const __vite__fileDeps=["assets/pdf-M5jsrN-P.js","assets/_commonjsHelpers-BosuxZz1.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
var g7=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);import{O as YM,N as Zh,ap as vm,Q as v7,m as tp,M as d0,P as GM,a7 as KM,ar as Xy,as as b7,ao as Jc,B as ot,E as Lu,L as vi,s as Kt,a0 as Ga,ag as Xn,at as y7,S as Qt,i as Jt,a as fu,b as K,f as ce,y as ct,l as U,a9 as pn,q as W,aa as hn,u as cu,j as _u,k as pu,r as _e,au as Qy,ad as Jy,D as lc,av as bm,aw as ha,e as P,U as re,d as w,g as m,V as ae,X as se,n as xa,am as Us,A as On,p as rs,R as Oe,ax as Zy,Y as Sn,x as wt,ay as XM,az as w7,w as Gn,t as Le,h as vt,aA as Es,v as Nn,aB as Cd,aC as cr,z as Hi,H as $s,T as $e,W as Ne,aD as QM,K as Pn,Z as oa,G as Ri,ab as ew,aE as pf,an as t_,I as o_,J as T7,ak as Gr,o as Ad,af as ym,aF as jb,aG as JM,aH as gv,aI as ZM,aJ as ex,aK as Bb,$ as No,aL as l_,aM as n_,aN as k7,aO as vv,aP as S7,aQ as C7,aR as P7,aS as E7,aT as I7,ah as Vh,aU as A7,aV as HS,aW as D7,aX as O7,F as M7,aY as tx,aZ as x7,_ as jS,a6 as BS,a3 as R7,a1 as $7,a4 as US,a5 as N7,a2 as F7,a8 as qS,ac as L7,ae as H7}from"./UtcDateTimeToLocal-BmDtKPV5.js";import{r as j7,j as au}from"./jquery-load-CrfGNa2Y.js";import{c as zs,g as cl,a as B7}from"./_commonjsHelpers-BosuxZz1.js";import{a as nx}from"./action_cable-BPzL5E7Z.js";import{s as U7}from"./SvelteComponentsLoader-k7nqJCp_.js";var OOe=g7((of,ou)=>{var q7=new YM(function(e){return e.complete()});function W7(e,t,n,i,r,a,s,o){var l=[],d=0,c=0,v=!1,T=function(){v&&!l.length&&!d&&t.complete()},b=function(E){return d<i?A(E):l.push(E)},A=function(E){d++;var y=!1;vm(n(E,c++)).subscribe(Zh(t,function(I){t.next(I)},function(){y=!0},void 0,function(){if(y)try{d--;for(var I=function(){var D=l.shift();s||A(D)};l.length&&d<i;)I();T()}catch(D){t.error(D)}}))};return e.subscribe(Zh(t,b,function(){v=!0,T()})),function(){}}function ix(e,t,n){return n===void 0&&(n=1/0),v7(t)?ix(function(i,r){return tp(function(a,s){return t(i,a,r,s)})(vm(e(i,r)))},n):(typeof t=="number"&&(n=t),d0(function(i,r){return W7(i,r,e,n)}))}function rx(e){return e===void 0&&(e=1/0),ix(GM,e)}function V7(){return rx(1)}function WS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V7()(KM(e,Xy(e)))}function z7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xy(e),i=b7(e,1/0),r=e;return r.length?r.length===1?vm(r[0]):rx(i)(KM(r,n)):q7}function ax(e){return d0(function(t,n){var i=null,r=!1,a;i=t.subscribe(Zh(n,void 0,void 0,function(s){a=vm(e(s,ax(e)(t))),i?(i.unsubscribe(),i=null,a.subscribe(n)):r=!0})),r&&(i.unsubscribe(),i=null,a.subscribe(n))})}function Y7(e,t){return t===void 0&&(t=GM),e=e??G7,d0(function(n,i){var r,a=!0;n.subscribe(Zh(i,function(s){var o=t(s);(a||!e(r,o))&&(a=!1,r=o,i.next(s))}))})}function G7(e,t){return e===t}function K7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xy(e);return d0(function(i,r){(n?WS(e,i,n):WS(e,i)).subscribe(r)})}window.getCurrentTimeFromEpoch=function(){return Math.floor(new Date().getTime()/1e3)};var VS={exports:{}};/*!
  * Bootstrap v4.6.2 (https://getbootstrap.com/)
  * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */(function(e,t){(function(n,i){i(t,j7())})(zs,function(n,i){function r(xe){return xe&&typeof xe=="object"&&"default"in xe?xe:{default:xe}}var a=r(i);function s(xe,Ue){for(var pe=0;pe<Ue.length;pe++){var Ae=Ue[pe];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(xe,Ae.key,Ae)}}function o(xe,Ue,pe){return pe&&s(xe,pe),Object.defineProperty(xe,"prototype",{writable:!1}),xe}function l(){return l=Object.assign?Object.assign.bind():function(xe){for(var Ue=1;Ue<arguments.length;Ue++){var pe=arguments[Ue];for(var Ae in pe)Object.prototype.hasOwnProperty.call(pe,Ae)&&(xe[Ae]=pe[Ae])}return xe},l.apply(this,arguments)}function d(xe,Ue){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pe,Ae){return pe.__proto__=Ae,pe},d(xe,Ue)}var c="transitionend",v={TRANSITION_END:"bsTransitionEnd",getUID:function(xe){do xe+=~~(1e6*Math.random());while(document.getElementById(xe));return xe},getSelectorFromElement:function(xe){var Ue=xe.getAttribute("data-target");if(!Ue||Ue==="#"){var pe=xe.getAttribute("href");Ue=pe&&pe!=="#"?pe.trim():""}try{return document.querySelector(Ue)?Ue:null}catch{return null}},getTransitionDurationFromElement:function(xe){if(!xe)return 0;var Ue=a.default(xe).css("transition-duration"),pe=a.default(xe).css("transition-delay"),Ae=parseFloat(Ue),at=parseFloat(pe);return Ae||at?(Ue=Ue.split(",")[0],pe=pe.split(",")[0],1e3*(parseFloat(Ue)+parseFloat(pe))):0},reflow:function(xe){return xe.offsetHeight},triggerTransitionEnd:function(xe){a.default(xe).trigger(c)},supportsTransitionEnd:function(){return!!c},isElement:function(xe){return(xe[0]||xe).nodeType},typeCheckConfig:function(xe,Ue,pe){for(var Ae in pe)if(Object.prototype.hasOwnProperty.call(pe,Ae)){var at=pe[Ae],gt=Ue[Ae],nt=gt&&v.isElement(gt)?"element":(jt=gt)===null||typeof jt>"u"?""+jt:{}.toString.call(jt).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(at).test(nt))throw new Error(xe.toUpperCase()+': Option "'+Ae+'" provided type "'+nt+'" but expected type "'+at+'".')}var jt},findShadowRoot:function(xe){if(!document.documentElement.attachShadow)return null;if(typeof xe.getRootNode=="function"){var Ue=xe.getRootNode();return Ue instanceof ShadowRoot?Ue:null}return xe instanceof ShadowRoot?xe:xe.parentNode?v.findShadowRoot(xe.parentNode):null},jQueryDetection:function(){if(typeof a.default>"u")throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var xe=a.default.fn.jquery.split(" ")[0].split(".");if(xe[0]<2&&xe[1]<9||xe[0]===1&&xe[1]===9&&xe[2]<1||xe[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};v.jQueryDetection(),a.default.fn.emulateTransitionEnd=function(xe){var Ue=this,pe=!1;return a.default(this).one(v.TRANSITION_END,function(){pe=!0}),setTimeout(function(){pe||v.triggerTransitionEnd(Ue)},xe),this},a.default.event.special[v.TRANSITION_END]={bindType:c,delegateType:c,handle:function(xe){if(a.default(xe.target).is(this))return xe.handleObj.handler.apply(this,arguments)}};var T="bs.alert",b=a.default.fn.alert,A=function(){function xe(pe){this._element=pe}var Ue=xe.prototype;return Ue.close=function(pe){var Ae=this._element;pe&&(Ae=this._getRootElement(pe)),this._triggerCloseEvent(Ae).isDefaultPrevented()||this._removeElement(Ae)},Ue.dispose=function(){a.default.removeData(this._element,T),this._element=null},Ue._getRootElement=function(pe){var Ae=v.getSelectorFromElement(pe),at=!1;return Ae&&(at=document.querySelector(Ae)),at||(at=a.default(pe).closest(".alert")[0]),at},Ue._triggerCloseEvent=function(pe){var Ae=a.default.Event("close.bs.alert");return a.default(pe).trigger(Ae),Ae},Ue._removeElement=function(pe){var Ae=this;if(a.default(pe).removeClass("show"),a.default(pe).hasClass("fade")){var at=v.getTransitionDurationFromElement(pe);a.default(pe).one(v.TRANSITION_END,function(gt){return Ae._destroyElement(pe,gt)}).emulateTransitionEnd(at)}else this._destroyElement(pe)},Ue._destroyElement=function(pe){a.default(pe).detach().trigger("closed.bs.alert").remove()},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this),at=Ae.data(T);at||(at=new xe(this),Ae.data(T,at)),pe==="close"&&at[pe](this)})},xe._handleDismiss=function(pe){return function(Ae){Ae&&Ae.preventDefault(),pe.close(this)}},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),xe}();a.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',A._handleDismiss(new A)),a.default.fn.alert=A._jQueryInterface,a.default.fn.alert.Constructor=A,a.default.fn.alert.noConflict=function(){return a.default.fn.alert=b,A._jQueryInterface};var E="bs.button",y=a.default.fn.button,I="active",D='[data-toggle^="button"]',O='input:not([type="hidden"])',M=".btn",F=function(){function xe(pe){this._element=pe,this.shouldAvoidTriggerChange=!1}var Ue=xe.prototype;return Ue.toggle=function(){var pe=!0,Ae=!0,at=a.default(this._element).closest('[data-toggle="buttons"]')[0];if(at){var gt=this._element.querySelector(O);if(gt){if(gt.type==="radio")if(gt.checked&&this._element.classList.contains(I))pe=!1;else{var nt=at.querySelector(".active");nt&&a.default(nt).removeClass(I)}pe&&(gt.type!=="checkbox"&&gt.type!=="radio"||(gt.checked=!this._element.classList.contains(I)),this.shouldAvoidTriggerChange||a.default(gt).trigger("change")),gt.focus(),Ae=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(Ae&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(I)),pe&&a.default(this._element).toggleClass(I))},Ue.dispose=function(){a.default.removeData(this._element,E),this._element=null},xe._jQueryInterface=function(pe,Ae){return this.each(function(){var at=a.default(this),gt=at.data(E);gt||(gt=new xe(this),at.data(E,gt)),gt.shouldAvoidTriggerChange=Ae,pe==="toggle"&&gt[pe]()})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),xe}();a.default(document).on("click.bs.button.data-api",D,function(xe){var Ue=xe.target,pe=Ue;if(a.default(Ue).hasClass("btn")||(Ue=a.default(Ue).closest(M)[0]),!Ue||Ue.hasAttribute("disabled")||Ue.classList.contains("disabled"))xe.preventDefault();else{var Ae=Ue.querySelector(O);if(Ae&&(Ae.hasAttribute("disabled")||Ae.classList.contains("disabled")))return void xe.preventDefault();pe.tagName!=="INPUT"&&Ue.tagName==="LABEL"||F._jQueryInterface.call(a.default(Ue),"toggle",pe.tagName==="INPUT")}}).on("focus.bs.button.data-api blur.bs.button.data-api",D,function(xe){var Ue=a.default(xe.target).closest(M)[0];a.default(Ue).toggleClass("focus",/^focus(in)?$/.test(xe.type))}),a.default(window).on("load.bs.button.data-api",function(){for(var xe=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),Ue=0,pe=xe.length;Ue<pe;Ue++){var Ae=xe[Ue],at=Ae.querySelector(O);at.checked||at.hasAttribute("checked")?Ae.classList.add(I):Ae.classList.remove(I)}for(var gt=0,nt=(xe=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;gt<nt;gt++){var jt=xe[gt];jt.getAttribute("aria-pressed")==="true"?jt.classList.add(I):jt.classList.remove(I)}}),a.default.fn.button=F._jQueryInterface,a.default.fn.button.Constructor=F,a.default.fn.button.noConflict=function(){return a.default.fn.button=y,F._jQueryInterface};var $="carousel",L="bs.carousel",j=a.default.fn[$],H="active",V="next",Q="prev",X="slid.bs.carousel",te=".active.carousel-item",ne={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},be={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},ue={TOUCH:"touch",PEN:"pen"},Ce=function(){function xe(pe,Ae){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(Ae),this._element=pe,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=!!(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var Ue=xe.prototype;return Ue.next=function(){this._isSliding||this._slide(V)},Ue.nextWhenVisible=function(){var pe=a.default(this._element);!document.hidden&&pe.is(":visible")&&pe.css("visibility")!=="hidden"&&this.next()},Ue.prev=function(){this._isSliding||this._slide(Q)},Ue.pause=function(pe){pe||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(v.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},Ue.cycle=function(pe){pe||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},Ue.to=function(pe){var Ae=this;this._activeElement=this._element.querySelector(te);var at=this._getItemIndex(this._activeElement);if(!(pe>this._items.length-1||pe<0))if(this._isSliding)a.default(this._element).one(X,function(){return Ae.to(pe)});else{if(at===pe)return this.pause(),void this.cycle();var gt=pe>at?V:Q;this._slide(gt,this._items[pe])}},Ue.dispose=function(){a.default(this._element).off(".bs.carousel"),a.default.removeData(this._element,L),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},Ue._getConfig=function(pe){return pe=l({},ne,pe),v.typeCheckConfig($,pe,be),pe},Ue._handleSwipe=function(){var pe=Math.abs(this.touchDeltaX);if(!(pe<=40)){var Ae=pe/this.touchDeltaX;this.touchDeltaX=0,Ae>0&&this.prev(),Ae<0&&this.next()}},Ue._addEventListeners=function(){var pe=this;this._config.keyboard&&a.default(this._element).on("keydown.bs.carousel",function(Ae){return pe._keydown(Ae)}),this._config.pause==="hover"&&a.default(this._element).on("mouseenter.bs.carousel",function(Ae){return pe.pause(Ae)}).on("mouseleave.bs.carousel",function(Ae){return pe.cycle(Ae)}),this._config.touch&&this._addTouchEventListeners()},Ue._addTouchEventListeners=function(){var pe=this;if(this._touchSupported){var Ae=function(gt){pe._pointerEvent&&ue[gt.originalEvent.pointerType.toUpperCase()]?pe.touchStartX=gt.originalEvent.clientX:pe._pointerEvent||(pe.touchStartX=gt.originalEvent.touches[0].clientX)},at=function(gt){pe._pointerEvent&&ue[gt.originalEvent.pointerType.toUpperCase()]&&(pe.touchDeltaX=gt.originalEvent.clientX-pe.touchStartX),pe._handleSwipe(),pe._config.pause==="hover"&&(pe.pause(),pe.touchTimeout&&clearTimeout(pe.touchTimeout),pe.touchTimeout=setTimeout(function(nt){return pe.cycle(nt)},500+pe._config.interval))};a.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",function(gt){return gt.preventDefault()}),this._pointerEvent?(a.default(this._element).on("pointerdown.bs.carousel",function(gt){return Ae(gt)}),a.default(this._element).on("pointerup.bs.carousel",function(gt){return at(gt)}),this._element.classList.add("pointer-event")):(a.default(this._element).on("touchstart.bs.carousel",function(gt){return Ae(gt)}),a.default(this._element).on("touchmove.bs.carousel",function(gt){return function(nt){pe.touchDeltaX=nt.originalEvent.touches&&nt.originalEvent.touches.length>1?0:nt.originalEvent.touches[0].clientX-pe.touchStartX}(gt)}),a.default(this._element).on("touchend.bs.carousel",function(gt){return at(gt)}))}},Ue._keydown=function(pe){if(!/input|textarea/i.test(pe.target.tagName))switch(pe.which){case 37:pe.preventDefault(),this.prev();break;case 39:pe.preventDefault(),this.next()}},Ue._getItemIndex=function(pe){return this._items=pe&&pe.parentNode?[].slice.call(pe.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(pe)},Ue._getItemByDirection=function(pe,Ae){var at=pe===V,gt=pe===Q,nt=this._getItemIndex(Ae),jt=this._items.length-1;if((gt&&nt===0||at&&nt===jt)&&!this._config.wrap)return Ae;var Yt=(nt+(pe===Q?-1:1))%this._items.length;return Yt===-1?this._items[this._items.length-1]:this._items[Yt]},Ue._triggerSlideEvent=function(pe,Ae){var at=this._getItemIndex(pe),gt=this._getItemIndex(this._element.querySelector(te)),nt=a.default.Event("slide.bs.carousel",{relatedTarget:pe,direction:Ae,from:gt,to:at});return a.default(this._element).trigger(nt),nt},Ue._setActiveIndicatorElement=function(pe){if(this._indicatorsElement){var Ae=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));a.default(Ae).removeClass(H);var at=this._indicatorsElement.children[this._getItemIndex(pe)];at&&a.default(at).addClass(H)}},Ue._updateInterval=function(){var pe=this._activeElement||this._element.querySelector(te);if(pe){var Ae=parseInt(pe.getAttribute("data-interval"),10);Ae?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=Ae):this._config.interval=this._config.defaultInterval||this._config.interval}},Ue._slide=function(pe,Ae){var at,gt,nt,jt=this,Yt=this._element.querySelector(te),Mn=this._getItemIndex(Yt),Yn=Ae||Yt&&this._getItemByDirection(pe,Yt),Wn=this._getItemIndex(Yn),ei=!!this._interval;if(pe===V?(at="carousel-item-left",gt="carousel-item-next",nt="left"):(at="carousel-item-right",gt="carousel-item-prev",nt="right"),Yn&&a.default(Yn).hasClass(H))this._isSliding=!1;else if(!this._triggerSlideEvent(Yn,nt).isDefaultPrevented()&&Yt&&Yn){this._isSliding=!0,ei&&this.pause(),this._setActiveIndicatorElement(Yn),this._activeElement=Yn;var Fi=a.default.Event(X,{relatedTarget:Yn,direction:nt,from:Mn,to:Wn});if(a.default(this._element).hasClass("slide")){a.default(Yn).addClass(gt),v.reflow(Yn),a.default(Yt).addClass(at),a.default(Yn).addClass(at);var Tr=v.getTransitionDurationFromElement(Yt);a.default(Yt).one(v.TRANSITION_END,function(){a.default(Yn).removeClass(at+" "+gt).addClass(H),a.default(Yt).removeClass("active "+gt+" "+at),jt._isSliding=!1,setTimeout(function(){return a.default(jt._element).trigger(Fi)},0)}).emulateTransitionEnd(Tr)}else a.default(Yt).removeClass(H),a.default(Yn).addClass(H),this._isSliding=!1,a.default(this._element).trigger(Fi);ei&&this.cycle()}},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this).data(L),at=l({},ne,a.default(this).data());typeof pe=="object"&&(at=l({},at,pe));var gt=typeof pe=="string"?pe:at.slide;if(Ae||(Ae=new xe(this,at),a.default(this).data(L,Ae)),typeof pe=="number")Ae.to(pe);else if(typeof gt=="string"){if(typeof Ae[gt]>"u")throw new TypeError('No method named "'+gt+'"');Ae[gt]()}else at.interval&&at.ride&&(Ae.pause(),Ae.cycle())})},xe._dataApiClickHandler=function(pe){var Ae=v.getSelectorFromElement(this);if(Ae){var at=a.default(Ae)[0];if(at&&a.default(at).hasClass("carousel")){var gt=l({},a.default(at).data(),a.default(this).data()),nt=this.getAttribute("data-slide-to");nt&&(gt.interval=!1),xe._jQueryInterface.call(a.default(at),gt),nt&&a.default(at).data(L).to(nt),pe.preventDefault()}}},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return ne}}]),xe}();a.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",Ce._dataApiClickHandler),a.default(window).on("load.bs.carousel.data-api",function(){for(var xe=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),Ue=0,pe=xe.length;Ue<pe;Ue++){var Ae=a.default(xe[Ue]);Ce._jQueryInterface.call(Ae,Ae.data())}}),a.default.fn[$]=Ce._jQueryInterface,a.default.fn[$].Constructor=Ce,a.default.fn[$].noConflict=function(){return a.default.fn[$]=j,Ce._jQueryInterface};var ie="collapse",Y="bs.collapse",he=a.default.fn[ie],Me="show",Pe="collapse",We="collapsing",qe="collapsed",ee="width",G='[data-toggle="collapse"]',me={toggle:!0,parent:""},Te={toggle:"boolean",parent:"(string|element)"},De=function(){function xe(pe,Ae){this._isTransitioning=!1,this._element=pe,this._config=this._getConfig(Ae),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+pe.id+'"],[data-toggle="collapse"][data-target="#'+pe.id+'"]'));for(var at=[].slice.call(document.querySelectorAll(G)),gt=0,nt=at.length;gt<nt;gt++){var jt=at[gt],Yt=v.getSelectorFromElement(jt),Mn=[].slice.call(document.querySelectorAll(Yt)).filter(function(Yn){return Yn===pe});Yt!==null&&Mn.length>0&&(this._selector=Yt,this._triggerArray.push(jt))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var Ue=xe.prototype;return Ue.toggle=function(){a.default(this._element).hasClass(Me)?this.hide():this.show()},Ue.show=function(){var pe,Ae,at=this;if(!(this._isTransitioning||a.default(this._element).hasClass(Me)||(this._parent&&(pe=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter(function(Mn){return typeof at._config.parent=="string"?Mn.getAttribute("data-parent")===at._config.parent:Mn.classList.contains(Pe)})).length===0&&(pe=null),pe&&(Ae=a.default(pe).not(this._selector).data(Y))&&Ae._isTransitioning))){var gt=a.default.Event("show.bs.collapse");if(a.default(this._element).trigger(gt),!gt.isDefaultPrevented()){pe&&(xe._jQueryInterface.call(a.default(pe).not(this._selector),"hide"),Ae||a.default(pe).data(Y,null));var nt=this._getDimension();a.default(this._element).removeClass(Pe).addClass(We),this._element.style[nt]=0,this._triggerArray.length&&a.default(this._triggerArray).removeClass(qe).attr("aria-expanded",!0),this.setTransitioning(!0);var jt="scroll"+(nt[0].toUpperCase()+nt.slice(1)),Yt=v.getTransitionDurationFromElement(this._element);a.default(this._element).one(v.TRANSITION_END,function(){a.default(at._element).removeClass(We).addClass("collapse show"),at._element.style[nt]="",at.setTransitioning(!1),a.default(at._element).trigger("shown.bs.collapse")}).emulateTransitionEnd(Yt),this._element.style[nt]=this._element[jt]+"px"}}},Ue.hide=function(){var pe=this;if(!this._isTransitioning&&a.default(this._element).hasClass(Me)){var Ae=a.default.Event("hide.bs.collapse");if(a.default(this._element).trigger(Ae),!Ae.isDefaultPrevented()){var at=this._getDimension();this._element.style[at]=this._element.getBoundingClientRect()[at]+"px",v.reflow(this._element),a.default(this._element).addClass(We).removeClass("collapse show");var gt=this._triggerArray.length;if(gt>0)for(var nt=0;nt<gt;nt++){var jt=this._triggerArray[nt],Yt=v.getSelectorFromElement(jt);Yt!==null&&(a.default([].slice.call(document.querySelectorAll(Yt))).hasClass(Me)||a.default(jt).addClass(qe).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[at]="";var Mn=v.getTransitionDurationFromElement(this._element);a.default(this._element).one(v.TRANSITION_END,function(){pe.setTransitioning(!1),a.default(pe._element).removeClass(We).addClass(Pe).trigger("hidden.bs.collapse")}).emulateTransitionEnd(Mn)}}},Ue.setTransitioning=function(pe){this._isTransitioning=pe},Ue.dispose=function(){a.default.removeData(this._element,Y),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},Ue._getConfig=function(pe){return(pe=l({},me,pe)).toggle=!!pe.toggle,v.typeCheckConfig(ie,pe,Te),pe},Ue._getDimension=function(){return a.default(this._element).hasClass(ee)?ee:"height"},Ue._getParent=function(){var pe,Ae=this;v.isElement(this._config.parent)?(pe=this._config.parent,typeof this._config.parent.jquery<"u"&&(pe=this._config.parent[0])):pe=document.querySelector(this._config.parent);var at='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',gt=[].slice.call(pe.querySelectorAll(at));return a.default(gt).each(function(nt,jt){Ae._addAriaAndCollapsedClass(xe._getTargetFromElement(jt),[jt])}),pe},Ue._addAriaAndCollapsedClass=function(pe,Ae){var at=a.default(pe).hasClass(Me);Ae.length&&a.default(Ae).toggleClass(qe,!at).attr("aria-expanded",at)},xe._getTargetFromElement=function(pe){var Ae=v.getSelectorFromElement(pe);return Ae?document.querySelector(Ae):null},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this),at=Ae.data(Y),gt=l({},me,Ae.data(),typeof pe=="object"&&pe?pe:{});if(!at&&gt.toggle&&typeof pe=="string"&&/show|hide/.test(pe)&&(gt.toggle=!1),at||(at=new xe(this,gt),Ae.data(Y,at)),typeof pe=="string"){if(typeof at[pe]>"u")throw new TypeError('No method named "'+pe+'"');at[pe]()}})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return me}}]),xe}();a.default(document).on("click.bs.collapse.data-api",G,function(xe){xe.currentTarget.tagName==="A"&&xe.preventDefault();var Ue=a.default(this),pe=v.getSelectorFromElement(this),Ae=[].slice.call(document.querySelectorAll(pe));a.default(Ae).each(function(){var at=a.default(this),gt=at.data(Y)?"toggle":Ue.data();De._jQueryInterface.call(at,gt)})}),a.default.fn[ie]=De._jQueryInterface,a.default.fn[ie].Constructor=De,a.default.fn[ie].noConflict=function(){return a.default.fn[ie]=he,De._jQueryInterface};var we=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Ve=function(){for(var xe=["Edge","Trident","Firefox"],Ue=0;Ue<xe.length;Ue+=1)if(we&&navigator.userAgent.indexOf(xe[Ue])>=0)return 1;return 0}(),Ke=we&&window.Promise?function(xe){var Ue=!1;return function(){Ue||(Ue=!0,window.Promise.resolve().then(function(){Ue=!1,xe()}))}}:function(xe){var Ue=!1;return function(){Ue||(Ue=!0,setTimeout(function(){Ue=!1,xe()},Ve))}};function yt(xe){return xe&&{}.toString.call(xe)==="[object Function]"}function ht(xe,Ue){if(xe.nodeType!==1)return[];var pe=xe.ownerDocument.defaultView.getComputedStyle(xe,null);return Ue?pe[Ue]:pe}function Je(xe){return xe.nodeName==="HTML"?xe:xe.parentNode||xe.host}function pt(xe){if(!xe)return document.body;switch(xe.nodeName){case"HTML":case"BODY":return xe.ownerDocument.body;case"#document":return xe.body}var Ue=ht(xe),pe=Ue.overflow,Ae=Ue.overflowX,at=Ue.overflowY;return/(auto|scroll|overlay)/.test(pe+at+Ae)?xe:pt(Je(xe))}function Tt(xe){return xe&&xe.referenceNode?xe.referenceNode:xe}var it=we&&!(!window.MSInputMethodContext||!document.documentMode),Ge=we&&/MSIE 10/.test(navigator.userAgent);function st(xe){return xe===11?it:xe===10?Ge:it||Ge}function It(xe){if(!xe)return document.documentElement;for(var Ue=st(10)?document.body:null,pe=xe.offsetParent||null;pe===Ue&&xe.nextElementSibling;)pe=(xe=xe.nextElementSibling).offsetParent;var Ae=pe&&pe.nodeName;return Ae&&Ae!=="BODY"&&Ae!=="HTML"?["TH","TD","TABLE"].indexOf(pe.nodeName)!==-1&&ht(pe,"position")==="static"?It(pe):pe:xe?xe.ownerDocument.documentElement:document.documentElement}function Ct(xe){return xe.parentNode!==null?Ct(xe.parentNode):xe}function bt(xe,Ue){if(!(xe&&xe.nodeType&&Ue&&Ue.nodeType))return document.documentElement;var pe=xe.compareDocumentPosition(Ue)&Node.DOCUMENT_POSITION_FOLLOWING,Ae=pe?xe:Ue,at=pe?Ue:xe,gt=document.createRange();gt.setStart(Ae,0),gt.setEnd(at,0);var nt,jt,Yt=gt.commonAncestorContainer;if(xe!==Yt&&Ue!==Yt||Ae.contains(at))return(jt=(nt=Yt).nodeName)==="BODY"||jt!=="HTML"&&It(nt.firstElementChild)!==nt?It(Yt):Yt;var Mn=Ct(xe);return Mn.host?bt(Mn.host,Ue):bt(xe,Ct(Ue).host)}function Rt(xe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",pe=Ue==="top"?"scrollTop":"scrollLeft",Ae=xe.nodeName;if(Ae==="BODY"||Ae==="HTML"){var at=xe.ownerDocument.documentElement,gt=xe.ownerDocument.scrollingElement||at;return gt[pe]}return xe[pe]}function cn(xe,Ue){var pe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Ae=Rt(Ue,"top"),at=Rt(Ue,"left"),gt=pe?-1:1;return xe.top+=Ae*gt,xe.bottom+=Ae*gt,xe.left+=at*gt,xe.right+=at*gt,xe}function nn(xe,Ue){var pe=Ue==="x"?"Left":"Top",Ae=pe==="Left"?"Right":"Bottom";return parseFloat(xe["border"+pe+"Width"])+parseFloat(xe["border"+Ae+"Width"])}function Qe(xe,Ue,pe,Ae){return Math.max(Ue["offset"+xe],Ue["scroll"+xe],pe["client"+xe],pe["offset"+xe],pe["scroll"+xe],st(10)?parseInt(pe["offset"+xe])+parseInt(Ae["margin"+(xe==="Height"?"Top":"Left")])+parseInt(Ae["margin"+(xe==="Height"?"Bottom":"Right")]):0)}function Ft(xe){var Ue=xe.body,pe=xe.documentElement,Ae=st(10)&&getComputedStyle(pe);return{height:Qe("Height",Ue,pe,Ae),width:Qe("Width",Ue,pe,Ae)}}var Fn=function(xe,Ue){if(!(xe instanceof Ue))throw new TypeError("Cannot call a class as a function")},He=function(){function xe(Ue,pe){for(var Ae=0;Ae<pe.length;Ae++){var at=pe[Ae];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(Ue,at.key,at)}}return function(Ue,pe,Ae){return pe&&xe(Ue.prototype,pe),Ae&&xe(Ue,Ae),Ue}}(),Dt=function(xe,Ue,pe){return Ue in xe?Object.defineProperty(xe,Ue,{value:pe,enumerable:!0,configurable:!0,writable:!0}):xe[Ue]=pe,xe},Xt=Object.assign||function(xe){for(var Ue=1;Ue<arguments.length;Ue++){var pe=arguments[Ue];for(var Ae in pe)Object.prototype.hasOwnProperty.call(pe,Ae)&&(xe[Ae]=pe[Ae])}return xe};function Mt(xe){return Xt({},xe,{right:xe.left+xe.width,bottom:xe.top+xe.height})}function Xe(xe){var Ue={};try{if(st(10)){Ue=xe.getBoundingClientRect();var pe=Rt(xe,"top"),Ae=Rt(xe,"left");Ue.top+=pe,Ue.left+=Ae,Ue.bottom+=pe,Ue.right+=Ae}else Ue=xe.getBoundingClientRect()}catch{}var at={left:Ue.left,top:Ue.top,width:Ue.right-Ue.left,height:Ue.bottom-Ue.top},gt=xe.nodeName==="HTML"?Ft(xe.ownerDocument):{},nt=gt.width||xe.clientWidth||at.width,jt=gt.height||xe.clientHeight||at.height,Yt=xe.offsetWidth-nt,Mn=xe.offsetHeight-jt;if(Yt||Mn){var Yn=ht(xe);Yt-=nn(Yn,"x"),Mn-=nn(Yn,"y"),at.width-=Yt,at.height-=Mn}return Mt(at)}function Nt(xe,Ue){var pe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Ae=st(10),at=Ue.nodeName==="HTML",gt=Xe(xe),nt=Xe(Ue),jt=pt(xe),Yt=ht(Ue),Mn=parseFloat(Yt.borderTopWidth),Yn=parseFloat(Yt.borderLeftWidth);pe&&at&&(nt.top=Math.max(nt.top,0),nt.left=Math.max(nt.left,0));var Wn=Mt({top:gt.top-nt.top-Mn,left:gt.left-nt.left-Yn,width:gt.width,height:gt.height});if(Wn.marginTop=0,Wn.marginLeft=0,!Ae&&at){var ei=parseFloat(Yt.marginTop),Fi=parseFloat(Yt.marginLeft);Wn.top-=Mn-ei,Wn.bottom-=Mn-ei,Wn.left-=Yn-Fi,Wn.right-=Yn-Fi,Wn.marginTop=ei,Wn.marginLeft=Fi}return(Ae&&!pe?Ue.contains(jt):Ue===jt&&jt.nodeName!=="BODY")&&(Wn=cn(Wn,Ue)),Wn}function on(xe){var Ue=arguments.length>1&&arguments[1]!==void 0&&arguments[1],pe=xe.ownerDocument.documentElement,Ae=Nt(xe,pe),at=Math.max(pe.clientWidth,window.innerWidth||0),gt=Math.max(pe.clientHeight,window.innerHeight||0),nt=Ue?0:Rt(pe),jt=Ue?0:Rt(pe,"left"),Yt={top:nt-Ae.top+Ae.marginTop,left:jt-Ae.left+Ae.marginLeft,width:at,height:gt};return Mt(Yt)}function In(xe){var Ue=xe.nodeName;if(Ue==="BODY"||Ue==="HTML")return!1;if(ht(xe,"position")==="fixed")return!0;var pe=Je(xe);return!!pe&&In(pe)}function dt(xe){if(!xe||!xe.parentElement||st())return document.documentElement;for(var Ue=xe.parentElement;Ue&&ht(Ue,"transform")==="none";)Ue=Ue.parentElement;return Ue||document.documentElement}function Zt(xe,Ue,pe,Ae){var at=arguments.length>4&&arguments[4]!==void 0&&arguments[4],gt={top:0,left:0},nt=at?dt(xe):bt(xe,Tt(Ue));if(Ae==="viewport")gt=on(nt,at);else{var jt=void 0;Ae==="scrollParent"?(jt=pt(Je(Ue))).nodeName==="BODY"&&(jt=xe.ownerDocument.documentElement):jt=Ae==="window"?xe.ownerDocument.documentElement:Ae;var Yt=Nt(jt,nt,at);if(jt.nodeName!=="HTML"||In(nt))gt=Yt;else{var Mn=Ft(xe.ownerDocument),Yn=Mn.height,Wn=Mn.width;gt.top+=Yt.top-Yt.marginTop,gt.bottom=Yn+Yt.top,gt.left+=Yt.left-Yt.marginLeft,gt.right=Wn+Yt.left}}var ei=typeof(pe=pe||0)=="number";return gt.left+=ei?pe:pe.left||0,gt.top+=ei?pe:pe.top||0,gt.right-=ei?pe:pe.right||0,gt.bottom-=ei?pe:pe.bottom||0,gt}function Ln(xe){return xe.width*xe.height}function xn(xe,Ue,pe,Ae,at){var gt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(xe.indexOf("auto")===-1)return xe;var nt=Zt(pe,Ae,gt,at),jt={top:{width:nt.width,height:Ue.top-nt.top},right:{width:nt.right-Ue.right,height:nt.height},bottom:{width:nt.width,height:nt.bottom-Ue.bottom},left:{width:Ue.left-nt.left,height:nt.height}},Yt=Object.keys(jt).map(function(ei){return Xt({key:ei},jt[ei],{area:Ln(jt[ei])})}).sort(function(ei,Fi){return Fi.area-ei.area}),Mn=Yt.filter(function(ei){var Fi=ei.width,Tr=ei.height;return Fi>=pe.clientWidth&&Tr>=pe.clientHeight}),Yn=Mn.length>0?Mn[0].key:Yt[0].key,Wn=xe.split("-")[1];return Yn+(Wn?"-"+Wn:"")}function Dn(xe,Ue,pe){var Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,at=Ae?dt(Ue):bt(Ue,Tt(pe));return Nt(pe,at,Ae)}function Un(xe){var Ue=xe.ownerDocument.defaultView.getComputedStyle(xe),pe=parseFloat(Ue.marginTop||0)+parseFloat(Ue.marginBottom||0),Ae=parseFloat(Ue.marginLeft||0)+parseFloat(Ue.marginRight||0);return{width:xe.offsetWidth+Ae,height:xe.offsetHeight+pe}}function qn(xe){var Ue={left:"right",right:"left",bottom:"top",top:"bottom"};return xe.replace(/left|right|bottom|top/g,function(pe){return Ue[pe]})}function ft(xe,Ue,pe){pe=pe.split("-")[0];var Ae=Un(xe),at={width:Ae.width,height:Ae.height},gt=["right","left"].indexOf(pe)!==-1,nt=gt?"top":"left",jt=gt?"left":"top",Yt=gt?"height":"width",Mn=gt?"width":"height";return at[nt]=Ue[nt]+Ue[Yt]/2-Ae[Yt]/2,at[jt]=pe===jt?Ue[jt]-Ae[Mn]:Ue[qn(jt)],at}function ni(xe,Ue){return Array.prototype.find?xe.find(Ue):xe.filter(Ue)[0]}function Et(xe,Ue,pe){return(pe===void 0?xe:xe.slice(0,function(Ae,at,gt){if(Array.prototype.findIndex)return Ae.findIndex(function(jt){return jt.name===gt});var nt=ni(Ae,function(jt){return jt.name===gt});return Ae.indexOf(nt)}(xe,0,pe))).forEach(function(Ae){Ae.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var at=Ae.function||Ae.fn;Ae.enabled&&yt(at)&&(Ue.offsets.popper=Mt(Ue.offsets.popper),Ue.offsets.reference=Mt(Ue.offsets.reference),Ue=at(Ue,Ae))}),Ue}function un(){if(!this.state.isDestroyed){var xe={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};xe.offsets.reference=Dn(this.state,this.popper,this.reference,this.options.positionFixed),xe.placement=xn(this.options.placement,xe.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),xe.originalPlacement=xe.placement,xe.positionFixed=this.options.positionFixed,xe.offsets.popper=ft(this.popper,xe.offsets.reference,xe.placement),xe.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",xe=Et(this.modifiers,xe),this.state.isCreated?this.options.onUpdate(xe):(this.state.isCreated=!0,this.options.onCreate(xe))}}function Ai(xe,Ue){return xe.some(function(pe){var Ae=pe.name;return pe.enabled&&Ae===Ue})}function St(xe){for(var Ue=[!1,"ms","Webkit","Moz","O"],pe=xe.charAt(0).toUpperCase()+xe.slice(1),Ae=0;Ae<Ue.length;Ae++){var at=Ue[Ae],gt=at?""+at+pe:xe;if(typeof document.body.style[gt]<"u")return gt}return null}function sn(){return this.state.isDestroyed=!0,Ai(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[St("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function ci(xe){var Ue=xe.ownerDocument;return Ue?Ue.defaultView:window}function pi(xe,Ue,pe,Ae){var at=xe.nodeName==="BODY",gt=at?xe.ownerDocument.defaultView:xe;gt.addEventListener(Ue,pe,{passive:!0}),at||pi(pt(gt.parentNode),Ue,pe,Ae),Ae.push(gt)}function Pi(xe,Ue,pe,Ae){pe.updateBound=Ae,ci(xe).addEventListener("resize",pe.updateBound,{passive:!0});var at=pt(xe);return pi(at,"scroll",pe.updateBound,pe.scrollParents),pe.scrollElement=at,pe.eventsEnabled=!0,pe}function $i(){this.state.eventsEnabled||(this.state=Pi(this.reference,this.options,this.state,this.scheduleUpdate))}function ji(){var xe,Ue;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(xe=this.reference,Ue=this.state,ci(xe).removeEventListener("resize",Ue.updateBound),Ue.scrollParents.forEach(function(pe){pe.removeEventListener("scroll",Ue.updateBound)}),Ue.updateBound=null,Ue.scrollParents=[],Ue.scrollElement=null,Ue.eventsEnabled=!1,Ue))}function ri(xe){return xe!==""&&!isNaN(parseFloat(xe))&&isFinite(xe)}function tr(xe,Ue){Object.keys(Ue).forEach(function(pe){var Ae="";["width","height","top","right","bottom","left"].indexOf(pe)!==-1&&ri(Ue[pe])&&(Ae="px"),xe.style[pe]=Ue[pe]+Ae})}var Ei=we&&/Firefox/i.test(navigator.userAgent);function Ti(xe,Ue,pe){var Ae=ni(xe,function(jt){return jt.name===Ue}),at=!!Ae&&xe.some(function(jt){return jt.name===pe&&jt.enabled&&jt.order<Ae.order});if(!at){var gt="`"+Ue+"`",nt="`"+pe+"`";console.warn(nt+" modifier is required by "+gt+" modifier in order to work, be sure to include it before "+gt+"!")}return at}var kn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Rn=kn.slice(3);function ki(xe){var Ue=arguments.length>1&&arguments[1]!==void 0&&arguments[1],pe=Rn.indexOf(xe),Ae=Rn.slice(pe+1).concat(Rn.slice(0,pe));return Ue?Ae.reverse():Ae}var mr={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(xe){var Ue=xe.placement,pe=Ue.split("-")[0],Ae=Ue.split("-")[1];if(Ae){var at=xe.offsets,gt=at.reference,nt=at.popper,jt=["bottom","top"].indexOf(pe)!==-1,Yt=jt?"left":"top",Mn=jt?"width":"height",Yn={start:Dt({},Yt,gt[Yt]),end:Dt({},Yt,gt[Yt]+gt[Mn]-nt[Mn])};xe.offsets.popper=Xt({},nt,Yn[Ae])}return xe}},offset:{order:200,enabled:!0,fn:function(xe,Ue){var pe,Ae=Ue.offset,at=xe.placement,gt=xe.offsets,nt=gt.popper,jt=gt.reference,Yt=at.split("-")[0];return pe=ri(+Ae)?[+Ae,0]:function(Mn,Yn,Wn,ei){var Fi=[0,0],Tr=["right","left"].indexOf(ei)!==-1,Yr=Mn.split(/(\+|\-)/).map(function(Nr){return Nr.trim()}),yr=Yr.indexOf(ni(Yr,function(Nr){return Nr.search(/,|\s/)!==-1}));Yr[yr]&&Yr[yr].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ka=/\s*,\s*|\s+/,fr=yr!==-1?[Yr.slice(0,yr).concat([Yr[yr].split(ka)[0]]),[Yr[yr].split(ka)[1]].concat(Yr.slice(yr+1))]:[Yr];return fr=fr.map(function(Nr,Na){var Wa=(Na===1?!Tr:Tr)?"height":"width",da=!1;return Nr.reduce(function(Sa,Br){return Sa[Sa.length-1]===""&&["+","-"].indexOf(Br)!==-1?(Sa[Sa.length-1]=Br,da=!0,Sa):da?(Sa[Sa.length-1]+=Br,da=!1,Sa):Sa.concat(Br)},[]).map(function(Sa){return function(Br,Ks,Qr,Oi){var Fs=Br.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),Qa=+Fs[1],as=Fs[2];return Qa?as.indexOf("%")===0?Mt(as==="%p"?Qr:Oi)[Ks]/100*Qa:as==="vh"||as==="vw"?(as==="vh"?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*Qa:Qa:Br}(Sa,Wa,Yn,Wn)})}),fr.forEach(function(Nr,Na){Nr.forEach(function(Wa,da){ri(Wa)&&(Fi[Na]+=Wa*(Nr[da-1]==="-"?-1:1))})}),Fi}(Ae,nt,jt,Yt),Yt==="left"?(nt.top+=pe[0],nt.left-=pe[1]):Yt==="right"?(nt.top+=pe[0],nt.left+=pe[1]):Yt==="top"?(nt.left+=pe[0],nt.top-=pe[1]):Yt==="bottom"&&(nt.left+=pe[0],nt.top+=pe[1]),xe.popper=nt,xe},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(xe,Ue){var pe=Ue.boundariesElement||It(xe.instance.popper);xe.instance.reference===pe&&(pe=It(pe));var Ae=St("transform"),at=xe.instance.popper.style,gt=at.top,nt=at.left,jt=at[Ae];at.top="",at.left="",at[Ae]="";var Yt=Zt(xe.instance.popper,xe.instance.reference,Ue.padding,pe,xe.positionFixed);at.top=gt,at.left=nt,at[Ae]=jt,Ue.boundaries=Yt;var Mn=Ue.priority,Yn=xe.offsets.popper,Wn={primary:function(ei){var Fi=Yn[ei];return Yn[ei]<Yt[ei]&&!Ue.escapeWithReference&&(Fi=Math.max(Yn[ei],Yt[ei])),Dt({},ei,Fi)},secondary:function(ei){var Fi=ei==="right"?"left":"top",Tr=Yn[Fi];return Yn[ei]>Yt[ei]&&!Ue.escapeWithReference&&(Tr=Math.min(Yn[Fi],Yt[ei]-(ei==="right"?Yn.width:Yn.height))),Dt({},Fi,Tr)}};return Mn.forEach(function(ei){var Fi=["left","top"].indexOf(ei)!==-1?"primary":"secondary";Yn=Xt({},Yn,Wn[Fi](ei))}),xe.offsets.popper=Yn,xe},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(xe){var Ue=xe.offsets,pe=Ue.popper,Ae=Ue.reference,at=xe.placement.split("-")[0],gt=Math.floor,nt=["top","bottom"].indexOf(at)!==-1,jt=nt?"right":"bottom",Yt=nt?"left":"top",Mn=nt?"width":"height";return pe[jt]<gt(Ae[Yt])&&(xe.offsets.popper[Yt]=gt(Ae[Yt])-pe[Mn]),pe[Yt]>gt(Ae[jt])&&(xe.offsets.popper[Yt]=gt(Ae[jt])),xe}},arrow:{order:500,enabled:!0,fn:function(xe,Ue){var pe;if(!Ti(xe.instance.modifiers,"arrow","keepTogether"))return xe;var Ae=Ue.element;if(typeof Ae=="string"){if(!(Ae=xe.instance.popper.querySelector(Ae)))return xe}else if(!xe.instance.popper.contains(Ae))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),xe;var at=xe.placement.split("-")[0],gt=xe.offsets,nt=gt.popper,jt=gt.reference,Yt=["left","right"].indexOf(at)!==-1,Mn=Yt?"height":"width",Yn=Yt?"Top":"Left",Wn=Yn.toLowerCase(),ei=Yt?"left":"top",Fi=Yt?"bottom":"right",Tr=Un(Ae)[Mn];jt[Fi]-Tr<nt[Wn]&&(xe.offsets.popper[Wn]-=nt[Wn]-(jt[Fi]-Tr)),jt[Wn]+Tr>nt[Fi]&&(xe.offsets.popper[Wn]+=jt[Wn]+Tr-nt[Fi]),xe.offsets.popper=Mt(xe.offsets.popper);var Yr=jt[Wn]+jt[Mn]/2-Tr/2,yr=ht(xe.instance.popper),ka=parseFloat(yr["margin"+Yn]),fr=parseFloat(yr["border"+Yn+"Width"]),Nr=Yr-xe.offsets.popper[Wn]-ka-fr;return Nr=Math.max(Math.min(nt[Mn]-Tr,Nr),0),xe.arrowElement=Ae,xe.offsets.arrow=(Dt(pe={},Wn,Math.round(Nr)),Dt(pe,ei,""),pe),xe},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(xe,Ue){if(Ai(xe.instance.modifiers,"inner")||xe.flipped&&xe.placement===xe.originalPlacement)return xe;var pe=Zt(xe.instance.popper,xe.instance.reference,Ue.padding,Ue.boundariesElement,xe.positionFixed),Ae=xe.placement.split("-")[0],at=qn(Ae),gt=xe.placement.split("-")[1]||"",nt=[];switch(Ue.behavior){case"flip":nt=[Ae,at];break;case"clockwise":nt=ki(Ae);break;case"counterclockwise":nt=ki(Ae,!0);break;default:nt=Ue.behavior}return nt.forEach(function(jt,Yt){if(Ae!==jt||nt.length===Yt+1)return xe;Ae=xe.placement.split("-")[0],at=qn(Ae);var Mn=xe.offsets.popper,Yn=xe.offsets.reference,Wn=Math.floor,ei=Ae==="left"&&Wn(Mn.right)>Wn(Yn.left)||Ae==="right"&&Wn(Mn.left)<Wn(Yn.right)||Ae==="top"&&Wn(Mn.bottom)>Wn(Yn.top)||Ae==="bottom"&&Wn(Mn.top)<Wn(Yn.bottom),Fi=Wn(Mn.left)<Wn(pe.left),Tr=Wn(Mn.right)>Wn(pe.right),Yr=Wn(Mn.top)<Wn(pe.top),yr=Wn(Mn.bottom)>Wn(pe.bottom),ka=Ae==="left"&&Fi||Ae==="right"&&Tr||Ae==="top"&&Yr||Ae==="bottom"&&yr,fr=["top","bottom"].indexOf(Ae)!==-1,Nr=!!Ue.flipVariations&&(fr&&gt==="start"&&Fi||fr&&gt==="end"&&Tr||!fr&&gt==="start"&&Yr||!fr&&gt==="end"&&yr),Na=!!Ue.flipVariationsByContent&&(fr&&gt==="start"&&Tr||fr&&gt==="end"&&Fi||!fr&&gt==="start"&&yr||!fr&&gt==="end"&&Yr),Wa=Nr||Na;(ei||ka||Wa)&&(xe.flipped=!0,(ei||ka)&&(Ae=nt[Yt+1]),Wa&&(gt=function(da){return da==="end"?"start":da==="start"?"end":da}(gt)),xe.placement=Ae+(gt?"-"+gt:""),xe.offsets.popper=Xt({},xe.offsets.popper,ft(xe.instance.popper,xe.offsets.reference,xe.placement)),xe=Et(xe.instance.modifiers,xe,"flip"))}),xe},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(xe){var Ue=xe.placement,pe=Ue.split("-")[0],Ae=xe.offsets,at=Ae.popper,gt=Ae.reference,nt=["left","right"].indexOf(pe)!==-1,jt=["top","left"].indexOf(pe)===-1;return at[nt?"left":"top"]=gt[pe]-(jt?at[nt?"width":"height"]:0),xe.placement=qn(Ue),xe.offsets.popper=Mt(at),xe}},hide:{order:800,enabled:!0,fn:function(xe){if(!Ti(xe.instance.modifiers,"hide","preventOverflow"))return xe;var Ue=xe.offsets.reference,pe=ni(xe.instance.modifiers,function(Ae){return Ae.name==="preventOverflow"}).boundaries;if(Ue.bottom<pe.top||Ue.left>pe.right||Ue.top>pe.bottom||Ue.right<pe.left){if(xe.hide===!0)return xe;xe.hide=!0,xe.attributes["x-out-of-boundaries"]=""}else{if(xe.hide===!1)return xe;xe.hide=!1,xe.attributes["x-out-of-boundaries"]=!1}return xe}},computeStyle:{order:850,enabled:!0,fn:function(xe,Ue){var pe=Ue.x,Ae=Ue.y,at=xe.offsets.popper,gt=ni(xe.instance.modifiers,function(Nr){return Nr.name==="applyStyle"}).gpuAcceleration;gt!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var nt,jt,Yt=gt!==void 0?gt:Ue.gpuAcceleration,Mn=It(xe.instance.popper),Yn=Xe(Mn),Wn={position:at.position},ei=function(Nr,Na){var Wa=Nr.offsets,da=Wa.popper,Sa=Wa.reference,Br=Math.round,Ks=Math.floor,Qr=function(Ts){return Ts},Oi=Br(Sa.width),Fs=Br(da.width),Qa=["left","right"].indexOf(Nr.placement)!==-1,as=Nr.placement.indexOf("-")!==-1,bo=Na?Qa||as||Oi%2==Fs%2?Br:Ks:Qr,yo=Na?Br:Qr;return{left:bo(Oi%2==1&&Fs%2==1&&!as&&Na?da.left-1:da.left),top:yo(da.top),bottom:yo(da.bottom),right:bo(da.right)}}(xe,window.devicePixelRatio<2||!Ei),Fi=pe==="bottom"?"top":"bottom",Tr=Ae==="right"?"left":"right",Yr=St("transform");if(jt=Fi==="bottom"?Mn.nodeName==="HTML"?-Mn.clientHeight+ei.bottom:-Yn.height+ei.bottom:ei.top,nt=Tr==="right"?Mn.nodeName==="HTML"?-Mn.clientWidth+ei.right:-Yn.width+ei.right:ei.left,Yt&&Yr)Wn[Yr]="translate3d("+nt+"px, "+jt+"px, 0)",Wn[Fi]=0,Wn[Tr]=0,Wn.willChange="transform";else{var yr=Fi==="bottom"?-1:1,ka=Tr==="right"?-1:1;Wn[Fi]=jt*yr,Wn[Tr]=nt*ka,Wn.willChange=Fi+", "+Tr}var fr={"x-placement":xe.placement};return xe.attributes=Xt({},fr,xe.attributes),xe.styles=Xt({},Wn,xe.styles),xe.arrowStyles=Xt({},xe.offsets.arrow,xe.arrowStyles),xe},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(xe){var Ue,pe;return tr(xe.instance.popper,xe.styles),Ue=xe.instance.popper,pe=xe.attributes,Object.keys(pe).forEach(function(Ae){pe[Ae]!==!1?Ue.setAttribute(Ae,pe[Ae]):Ue.removeAttribute(Ae)}),xe.arrowElement&&Object.keys(xe.arrowStyles).length&&tr(xe.arrowElement,xe.arrowStyles),xe},onLoad:function(xe,Ue,pe,Ae,at){var gt=Dn(at,Ue,xe,pe.positionFixed),nt=xn(pe.placement,gt,Ue,xe,pe.modifiers.flip.boundariesElement,pe.modifiers.flip.padding);return Ue.setAttribute("x-placement",nt),tr(Ue,{position:pe.positionFixed?"fixed":"absolute"}),pe},gpuAcceleration:void 0}}},_r=function(){function xe(Ue,pe){var Ae=this,at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Fn(this,xe),this.scheduleUpdate=function(){return requestAnimationFrame(Ae.update)},this.update=Ke(this.update.bind(this)),this.options=Xt({},xe.Defaults,at),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=Ue&&Ue.jquery?Ue[0]:Ue,this.popper=pe&&pe.jquery?pe[0]:pe,this.options.modifiers={},Object.keys(Xt({},xe.Defaults.modifiers,at.modifiers)).forEach(function(nt){Ae.options.modifiers[nt]=Xt({},xe.Defaults.modifiers[nt]||{},at.modifiers?at.modifiers[nt]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(nt){return Xt({name:nt},Ae.options.modifiers[nt])}).sort(function(nt,jt){return nt.order-jt.order}),this.modifiers.forEach(function(nt){nt.enabled&&yt(nt.onLoad)&&nt.onLoad(Ae.reference,Ae.popper,Ae.options,nt,Ae.state)}),this.update();var gt=this.options.eventsEnabled;gt&&this.enableEventListeners(),this.state.eventsEnabled=gt}return He(xe,[{key:"update",value:function(){return un.call(this)}},{key:"destroy",value:function(){return sn.call(this)}},{key:"enableEventListeners",value:function(){return $i.call(this)}},{key:"disableEventListeners",value:function(){return ji.call(this)}}]),xe}();_r.Utils=(typeof window<"u"?window:zs).PopperUtils,_r.placements=kn,_r.Defaults=mr;var Mi=_r,di="dropdown",Yi="bs.dropdown",na=a.default.fn[di],Ki=new RegExp("38|40|27"),Rr="disabled",Di="show",Wi="dropdown-menu-right",Bi="hide.bs.dropdown",_a="hidden.bs.dropdown",xi="click.bs.dropdown.data-api",Kr="keydown.bs.dropdown.data-api",kr='[data-toggle="dropdown"]',Ji=".dropdown-menu",ia={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},la={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ir=function(){function xe(pe,Ae){this._element=pe,this._popper=null,this._config=this._getConfig(Ae),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var Ue=xe.prototype;return Ue.toggle=function(){if(!this._element.disabled&&!a.default(this._element).hasClass(Rr)){var pe=a.default(this._menu).hasClass(Di);xe._clearMenus(),pe||this.show(!0)}},Ue.show=function(pe){if(pe===void 0&&(pe=!1),!(this._element.disabled||a.default(this._element).hasClass(Rr)||a.default(this._menu).hasClass(Di))){var Ae={relatedTarget:this._element},at=a.default.Event("show.bs.dropdown",Ae),gt=xe._getParentFromElement(this._element);if(a.default(gt).trigger(at),!at.isDefaultPrevented()){if(!this._inNavbar&&pe){if(typeof Mi>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var nt=this._element;this._config.reference==="parent"?nt=gt:v.isElement(this._config.reference)&&(nt=this._config.reference,typeof this._config.reference.jquery<"u"&&(nt=this._config.reference[0])),this._config.boundary!=="scrollParent"&&a.default(gt).addClass("position-static"),this._popper=new Mi(nt,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&a.default(gt).closest(".navbar-nav").length===0&&a.default(document.body).children().on("mouseover",null,a.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),a.default(this._menu).toggleClass(Di),a.default(gt).toggleClass(Di).trigger(a.default.Event("shown.bs.dropdown",Ae))}}},Ue.hide=function(){if(!this._element.disabled&&!a.default(this._element).hasClass(Rr)&&a.default(this._menu).hasClass(Di)){var pe={relatedTarget:this._element},Ae=a.default.Event(Bi,pe),at=xe._getParentFromElement(this._element);a.default(at).trigger(Ae),Ae.isDefaultPrevented()||(this._popper&&this._popper.destroy(),a.default(this._menu).toggleClass(Di),a.default(at).toggleClass(Di).trigger(a.default.Event(_a,pe)))}},Ue.dispose=function(){a.default.removeData(this._element,Yi),a.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,this._popper!==null&&(this._popper.destroy(),this._popper=null)},Ue.update=function(){this._inNavbar=this._detectNavbar(),this._popper!==null&&this._popper.scheduleUpdate()},Ue._addEventListeners=function(){var pe=this;a.default(this._element).on("click.bs.dropdown",function(Ae){Ae.preventDefault(),Ae.stopPropagation(),pe.toggle()})},Ue._getConfig=function(pe){return pe=l({},this.constructor.Default,a.default(this._element).data(),pe),v.typeCheckConfig(di,pe,this.constructor.DefaultType),pe},Ue._getMenuElement=function(){if(!this._menu){var pe=xe._getParentFromElement(this._element);pe&&(this._menu=pe.querySelector(Ji))}return this._menu},Ue._getPlacement=function(){var pe=a.default(this._element.parentNode),Ae="bottom-start";return pe.hasClass("dropup")?Ae=a.default(this._menu).hasClass(Wi)?"top-end":"top-start":pe.hasClass("dropright")?Ae="right-start":pe.hasClass("dropleft")?Ae="left-start":a.default(this._menu).hasClass(Wi)&&(Ae="bottom-end"),Ae},Ue._detectNavbar=function(){return a.default(this._element).closest(".navbar").length>0},Ue._getOffset=function(){var pe=this,Ae={};return typeof this._config.offset=="function"?Ae.fn=function(at){return at.offsets=l({},at.offsets,pe._config.offset(at.offsets,pe._element)),at}:Ae.offset=this._config.offset,Ae},Ue._getPopperConfig=function(){var pe={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return this._config.display==="static"&&(pe.modifiers.applyStyle={enabled:!1}),l({},pe,this._config.popperConfig)},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this).data(Yi);if(Ae||(Ae=new xe(this,typeof pe=="object"?pe:null),a.default(this).data(Yi,Ae)),typeof pe=="string"){if(typeof Ae[pe]>"u")throw new TypeError('No method named "'+pe+'"');Ae[pe]()}})},xe._clearMenus=function(pe){if(!pe||pe.which!==3&&(pe.type!=="keyup"||pe.which===9))for(var Ae=[].slice.call(document.querySelectorAll(kr)),at=0,gt=Ae.length;at<gt;at++){var nt=xe._getParentFromElement(Ae[at]),jt=a.default(Ae[at]).data(Yi),Yt={relatedTarget:Ae[at]};if(pe&&pe.type==="click"&&(Yt.clickEvent=pe),jt){var Mn=jt._menu;if(a.default(nt).hasClass(Di)&&!(pe&&(pe.type==="click"&&/input|textarea/i.test(pe.target.tagName)||pe.type==="keyup"&&pe.which===9)&&a.default.contains(nt,pe.target))){var Yn=a.default.Event(Bi,Yt);a.default(nt).trigger(Yn),Yn.isDefaultPrevented()||("ontouchstart"in document.documentElement&&a.default(document.body).children().off("mouseover",null,a.default.noop),Ae[at].setAttribute("aria-expanded","false"),jt._popper&&jt._popper.destroy(),a.default(Mn).removeClass(Di),a.default(nt).removeClass(Di).trigger(a.default.Event(_a,Yt)))}}}},xe._getParentFromElement=function(pe){var Ae,at=v.getSelectorFromElement(pe);return at&&(Ae=document.querySelector(at)),Ae||pe.parentNode},xe._dataApiKeydownHandler=function(pe){if(!(/input|textarea/i.test(pe.target.tagName)?pe.which===32||pe.which!==27&&(pe.which!==40&&pe.which!==38||a.default(pe.target).closest(Ji).length):!Ki.test(pe.which))&&!this.disabled&&!a.default(this).hasClass(Rr)){var Ae=xe._getParentFromElement(this),at=a.default(Ae).hasClass(Di);if(at||pe.which!==27){if(pe.preventDefault(),pe.stopPropagation(),!at||pe.which===27||pe.which===32)return pe.which===27&&a.default(Ae.querySelector(kr)).trigger("focus"),void a.default(this).trigger("click");var gt=[].slice.call(Ae.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter(function(jt){return a.default(jt).is(":visible")});if(gt.length!==0){var nt=gt.indexOf(pe.target);pe.which===38&&nt>0&&nt--,pe.which===40&&nt<gt.length-1&&nt++,nt<0&&(nt=0),gt[nt].focus()}}}},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return ia}},{key:"DefaultType",get:function(){return la}}]),xe}();a.default(document).on(Kr,kr,Ir._dataApiKeydownHandler).on(Kr,Ji,Ir._dataApiKeydownHandler).on(xi+" keyup.bs.dropdown.data-api",Ir._clearMenus).on(xi,kr,function(xe){xe.preventDefault(),xe.stopPropagation(),Ir._jQueryInterface.call(a.default(this),"toggle")}).on(xi,".dropdown form",function(xe){xe.stopPropagation()}),a.default.fn[di]=Ir._jQueryInterface,a.default.fn[di].Constructor=Ir,a.default.fn[di].noConflict=function(){return a.default.fn[di]=na,Ir._jQueryInterface};var Ur="bs.modal",qr=a.default.fn.modal,Ht="modal-open",et="fade",ln="show",Vi="modal-static",Ar="hidden.bs.modal",vr="show.bs.modal",ir="focusin.bs.modal",Si="resize.bs.modal",pr="click.dismiss.bs.modal",yi="keydown.dismiss.bs.modal",Dr="mousedown.dismiss.bs.modal",Wr=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Sr={backdrop:!0,keyboard:!0,focus:!0,show:!0},hr={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Vn=function(){function xe(pe,Ae){this._config=this._getConfig(Ae),this._element=pe,this._dialog=pe.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var Ue=xe.prototype;return Ue.toggle=function(pe){return this._isShown?this.hide():this.show(pe)},Ue.show=function(pe){var Ae=this;if(!this._isShown&&!this._isTransitioning){var at=a.default.Event(vr,{relatedTarget:pe});a.default(this._element).trigger(at),at.isDefaultPrevented()||(this._isShown=!0,a.default(this._element).hasClass(et)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),a.default(this._element).on(pr,'[data-dismiss="modal"]',function(gt){return Ae.hide(gt)}),a.default(this._dialog).on(Dr,function(){a.default(Ae._element).one("mouseup.dismiss.bs.modal",function(gt){a.default(gt.target).is(Ae._element)&&(Ae._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return Ae._showElement(pe)}))}},Ue.hide=function(pe){var Ae=this;if(pe&&pe.preventDefault(),this._isShown&&!this._isTransitioning){var at=a.default.Event("hide.bs.modal");if(a.default(this._element).trigger(at),this._isShown&&!at.isDefaultPrevented()){this._isShown=!1;var gt=a.default(this._element).hasClass(et);if(gt&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),a.default(document).off(ir),a.default(this._element).removeClass(ln),a.default(this._element).off(pr),a.default(this._dialog).off(Dr),gt){var nt=v.getTransitionDurationFromElement(this._element);a.default(this._element).one(v.TRANSITION_END,function(jt){return Ae._hideModal(jt)}).emulateTransitionEnd(nt)}else this._hideModal()}}},Ue.dispose=function(){[window,this._element,this._dialog].forEach(function(pe){return a.default(pe).off(".bs.modal")}),a.default(document).off(ir),a.default.removeData(this._element,Ur),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},Ue.handleUpdate=function(){this._adjustDialog()},Ue._getConfig=function(pe){return pe=l({},Sr,pe),v.typeCheckConfig("modal",pe,hr),pe},Ue._triggerBackdropTransition=function(){var pe=this,Ae=a.default.Event("hidePrevented.bs.modal");if(a.default(this._element).trigger(Ae),!Ae.isDefaultPrevented()){var at=this._element.scrollHeight>document.documentElement.clientHeight;at||(this._element.style.overflowY="hidden"),this._element.classList.add(Vi);var gt=v.getTransitionDurationFromElement(this._dialog);a.default(this._element).off(v.TRANSITION_END),a.default(this._element).one(v.TRANSITION_END,function(){pe._element.classList.remove(Vi),at||a.default(pe._element).one(v.TRANSITION_END,function(){pe._element.style.overflowY=""}).emulateTransitionEnd(pe._element,gt)}).emulateTransitionEnd(gt),this._element.focus()}},Ue._showElement=function(pe){var Ae=this,at=a.default(this._element).hasClass(et),gt=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),a.default(this._dialog).hasClass("modal-dialog-scrollable")&&gt?gt.scrollTop=0:this._element.scrollTop=0,at&&v.reflow(this._element),a.default(this._element).addClass(ln),this._config.focus&&this._enforceFocus();var nt=a.default.Event("shown.bs.modal",{relatedTarget:pe}),jt=function(){Ae._config.focus&&Ae._element.focus(),Ae._isTransitioning=!1,a.default(Ae._element).trigger(nt)};if(at){var Yt=v.getTransitionDurationFromElement(this._dialog);a.default(this._dialog).one(v.TRANSITION_END,jt).emulateTransitionEnd(Yt)}else jt()},Ue._enforceFocus=function(){var pe=this;a.default(document).off(ir).on(ir,function(Ae){document!==Ae.target&&pe._element!==Ae.target&&a.default(pe._element).has(Ae.target).length===0&&pe._element.focus()})},Ue._setEscapeEvent=function(){var pe=this;this._isShown?a.default(this._element).on(yi,function(Ae){pe._config.keyboard&&Ae.which===27?(Ae.preventDefault(),pe.hide()):pe._config.keyboard||Ae.which!==27||pe._triggerBackdropTransition()}):this._isShown||a.default(this._element).off(yi)},Ue._setResizeEvent=function(){var pe=this;this._isShown?a.default(window).on(Si,function(Ae){return pe.handleUpdate(Ae)}):a.default(window).off(Si)},Ue._hideModal=function(){var pe=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop(function(){a.default(document.body).removeClass(Ht),pe._resetAdjustments(),pe._resetScrollbar(),a.default(pe._element).trigger(Ar)})},Ue._removeBackdrop=function(){this._backdrop&&(a.default(this._backdrop).remove(),this._backdrop=null)},Ue._showBackdrop=function(pe){var Ae=this,at=a.default(this._element).hasClass(et)?et:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",at&&this._backdrop.classList.add(at),a.default(this._backdrop).appendTo(document.body),a.default(this._element).on(pr,function(Yt){Ae._ignoreBackdropClick?Ae._ignoreBackdropClick=!1:Yt.target===Yt.currentTarget&&(Ae._config.backdrop==="static"?Ae._triggerBackdropTransition():Ae.hide())}),at&&v.reflow(this._backdrop),a.default(this._backdrop).addClass(ln),!pe)return;if(!at)return void pe();var gt=v.getTransitionDurationFromElement(this._backdrop);a.default(this._backdrop).one(v.TRANSITION_END,pe).emulateTransitionEnd(gt)}else if(!this._isShown&&this._backdrop){a.default(this._backdrop).removeClass(ln);var nt=function(){Ae._removeBackdrop(),pe&&pe()};if(a.default(this._element).hasClass(et)){var jt=v.getTransitionDurationFromElement(this._backdrop);a.default(this._backdrop).one(v.TRANSITION_END,nt).emulateTransitionEnd(jt)}else nt()}else pe&&pe()},Ue._adjustDialog=function(){var pe=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&pe&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!pe&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},Ue._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},Ue._checkScrollbar=function(){var pe=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(pe.left+pe.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},Ue._setScrollbar=function(){var pe=this;if(this._isBodyOverflowing){var Ae=[].slice.call(document.querySelectorAll(Wr)),at=[].slice.call(document.querySelectorAll(".sticky-top"));a.default(Ae).each(function(jt,Yt){var Mn=Yt.style.paddingRight,Yn=a.default(Yt).css("padding-right");a.default(Yt).data("padding-right",Mn).css("padding-right",parseFloat(Yn)+pe._scrollbarWidth+"px")}),a.default(at).each(function(jt,Yt){var Mn=Yt.style.marginRight,Yn=a.default(Yt).css("margin-right");a.default(Yt).data("margin-right",Mn).css("margin-right",parseFloat(Yn)-pe._scrollbarWidth+"px")});var gt=document.body.style.paddingRight,nt=a.default(document.body).css("padding-right");a.default(document.body).data("padding-right",gt).css("padding-right",parseFloat(nt)+this._scrollbarWidth+"px")}a.default(document.body).addClass(Ht)},Ue._resetScrollbar=function(){var pe=[].slice.call(document.querySelectorAll(Wr));a.default(pe).each(function(gt,nt){var jt=a.default(nt).data("padding-right");a.default(nt).removeData("padding-right"),nt.style.paddingRight=jt||""});var Ae=[].slice.call(document.querySelectorAll(".sticky-top"));a.default(Ae).each(function(gt,nt){var jt=a.default(nt).data("margin-right");typeof jt<"u"&&a.default(nt).css("margin-right",jt).removeData("margin-right")});var at=a.default(document.body).data("padding-right");a.default(document.body).removeData("padding-right"),document.body.style.paddingRight=at||""},Ue._getScrollbarWidth=function(){var pe=document.createElement("div");pe.className="modal-scrollbar-measure",document.body.appendChild(pe);var Ae=pe.getBoundingClientRect().width-pe.clientWidth;return document.body.removeChild(pe),Ae},xe._jQueryInterface=function(pe,Ae){return this.each(function(){var at=a.default(this).data(Ur),gt=l({},Sr,a.default(this).data(),typeof pe=="object"&&pe?pe:{});if(at||(at=new xe(this,gt),a.default(this).data(Ur,at)),typeof pe=="string"){if(typeof at[pe]>"u")throw new TypeError('No method named "'+pe+'"');at[pe](Ae)}else gt.show&&at.show(Ae)})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Sr}}]),xe}();a.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(xe){var Ue,pe=this,Ae=v.getSelectorFromElement(this);Ae&&(Ue=document.querySelector(Ae));var at=a.default(Ue).data(Ur)?"toggle":l({},a.default(Ue).data(),a.default(this).data());this.tagName!=="A"&&this.tagName!=="AREA"||xe.preventDefault();var gt=a.default(Ue).one(vr,function(nt){nt.isDefaultPrevented()||gt.one(Ar,function(){a.default(pe).is(":visible")&&pe.focus()})});Vn._jQueryInterface.call(a.default(Ue),at,this)}),a.default.fn.modal=Vn._jQueryInterface,a.default.fn.modal.Constructor=Vn,a.default.fn.modal.noConflict=function(){return a.default.fn.modal=qr,Vn._jQueryInterface};var dn=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],wr=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Bn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function ra(xe,Ue,pe){if(xe.length===0)return xe;if(pe&&typeof pe=="function")return pe(xe);for(var Ae=new window.DOMParser().parseFromString(xe,"text/html"),at=Object.keys(Ue),gt=[].slice.call(Ae.body.querySelectorAll("*")),nt=function(Mn,Yn){var Wn=gt[Mn],ei=Wn.nodeName.toLowerCase();if(at.indexOf(Wn.nodeName.toLowerCase())===-1)return Wn.parentNode.removeChild(Wn),"continue";var Fi=[].slice.call(Wn.attributes),Tr=[].concat(Ue["*"]||[],Ue[ei]||[]);Fi.forEach(function(Yr){(function(yr,ka){var fr=yr.nodeName.toLowerCase();if(ka.indexOf(fr)!==-1)return dn.indexOf(fr)===-1||!!(wr.test(yr.nodeValue)||Bn.test(yr.nodeValue));for(var Nr=ka.filter(function(da){return da instanceof RegExp}),Na=0,Wa=Nr.length;Na<Wa;Na++)if(Nr[Na].test(fr))return!0;return!1})(Yr,Tr)||Wn.removeAttribute(Yr.nodeName)})},jt=0,Yt=gt.length;jt<Yt;jt++)nt(jt);return Ae.body.innerHTML}var _n="tooltip",Vr="bs.tooltip",rr=a.default.fn.tooltip,Or=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Ui=["sanitize","whiteList","sanitizeFn"],Fr="fade",wi="show",Ni="show",ar="out",sr="hover",Gi="focus",Cr={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},or={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},lr={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Ka={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Lr=function(){function xe(pe,Ae){if(typeof Mi>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=pe,this.config=this._getConfig(Ae),this.tip=null,this._setListeners()}var Ue=xe.prototype;return Ue.enable=function(){this._isEnabled=!0},Ue.disable=function(){this._isEnabled=!1},Ue.toggleEnabled=function(){this._isEnabled=!this._isEnabled},Ue.toggle=function(pe){if(this._isEnabled)if(pe){var Ae=this.constructor.DATA_KEY,at=a.default(pe.currentTarget).data(Ae);at||(at=new this.constructor(pe.currentTarget,this._getDelegateConfig()),a.default(pe.currentTarget).data(Ae,at)),at._activeTrigger.click=!at._activeTrigger.click,at._isWithActiveTrigger()?at._enter(null,at):at._leave(null,at)}else{if(a.default(this.getTipElement()).hasClass(wi))return void this._leave(null,this);this._enter(null,this)}},Ue.dispose=function(){clearTimeout(this._timeout),a.default.removeData(this.element,this.constructor.DATA_KEY),a.default(this.element).off(this.constructor.EVENT_KEY),a.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&a.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},Ue.show=function(){var pe=this;if(a.default(this.element).css("display")==="none")throw new Error("Please use show on visible elements");var Ae=a.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a.default(this.element).trigger(Ae);var at=v.findShadowRoot(this.element),gt=a.default.contains(at!==null?at:this.element.ownerDocument.documentElement,this.element);if(Ae.isDefaultPrevented()||!gt)return;var nt=this.getTipElement(),jt=v.getUID(this.constructor.NAME);nt.setAttribute("id",jt),this.element.setAttribute("aria-describedby",jt),this.setContent(),this.config.animation&&a.default(nt).addClass(Fr);var Yt=typeof this.config.placement=="function"?this.config.placement.call(this,nt,this.element):this.config.placement,Mn=this._getAttachment(Yt);this.addAttachmentClass(Mn);var Yn=this._getContainer();a.default(nt).data(this.constructor.DATA_KEY,this),a.default.contains(this.element.ownerDocument.documentElement,this.tip)||a.default(nt).appendTo(Yn),a.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Mi(this.element,nt,this._getPopperConfig(Mn)),a.default(nt).addClass(wi),a.default(nt).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&a.default(document.body).children().on("mouseover",null,a.default.noop);var Wn=function(){pe.config.animation&&pe._fixTransition();var Fi=pe._hoverState;pe._hoverState=null,a.default(pe.element).trigger(pe.constructor.Event.SHOWN),Fi===ar&&pe._leave(null,pe)};if(a.default(this.tip).hasClass(Fr)){var ei=v.getTransitionDurationFromElement(this.tip);a.default(this.tip).one(v.TRANSITION_END,Wn).emulateTransitionEnd(ei)}else Wn()}},Ue.hide=function(pe){var Ae=this,at=this.getTipElement(),gt=a.default.Event(this.constructor.Event.HIDE),nt=function(){Ae._hoverState!==Ni&&at.parentNode&&at.parentNode.removeChild(at),Ae._cleanTipClass(),Ae.element.removeAttribute("aria-describedby"),a.default(Ae.element).trigger(Ae.constructor.Event.HIDDEN),Ae._popper!==null&&Ae._popper.destroy(),pe&&pe()};if(a.default(this.element).trigger(gt),!gt.isDefaultPrevented()){if(a.default(at).removeClass(wi),"ontouchstart"in document.documentElement&&a.default(document.body).children().off("mouseover",null,a.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,a.default(this.tip).hasClass(Fr)){var jt=v.getTransitionDurationFromElement(at);a.default(at).one(v.TRANSITION_END,nt).emulateTransitionEnd(jt)}else nt();this._hoverState=""}},Ue.update=function(){this._popper!==null&&this._popper.scheduleUpdate()},Ue.isWithContent=function(){return!!this.getTitle()},Ue.addAttachmentClass=function(pe){a.default(this.getTipElement()).addClass("bs-tooltip-"+pe)},Ue.getTipElement=function(){return this.tip=this.tip||a.default(this.config.template)[0],this.tip},Ue.setContent=function(){var pe=this.getTipElement();this.setElementContent(a.default(pe.querySelectorAll(".tooltip-inner")),this.getTitle()),a.default(pe).removeClass("fade show")},Ue.setElementContent=function(pe,Ae){typeof Ae!="object"||!Ae.nodeType&&!Ae.jquery?this.config.html?(this.config.sanitize&&(Ae=ra(Ae,this.config.whiteList,this.config.sanitizeFn)),pe.html(Ae)):pe.text(Ae):this.config.html?a.default(Ae).parent().is(pe)||pe.empty().append(Ae):pe.text(a.default(Ae).text())},Ue.getTitle=function(){var pe=this.element.getAttribute("data-original-title");return pe||(pe=typeof this.config.title=="function"?this.config.title.call(this.element):this.config.title),pe},Ue._getPopperConfig=function(pe){var Ae=this;return l({},{placement:pe,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(at){at.originalPlacement!==at.placement&&Ae._handlePopperPlacementChange(at)},onUpdate:function(at){return Ae._handlePopperPlacementChange(at)}},this.config.popperConfig)},Ue._getOffset=function(){var pe=this,Ae={};return typeof this.config.offset=="function"?Ae.fn=function(at){return at.offsets=l({},at.offsets,pe.config.offset(at.offsets,pe.element)),at}:Ae.offset=this.config.offset,Ae},Ue._getContainer=function(){return this.config.container===!1?document.body:v.isElement(this.config.container)?a.default(this.config.container):a.default(document).find(this.config.container)},Ue._getAttachment=function(pe){return Cr[pe.toUpperCase()]},Ue._setListeners=function(){var pe=this;this.config.trigger.split(" ").forEach(function(Ae){if(Ae==="click")a.default(pe.element).on(pe.constructor.Event.CLICK,pe.config.selector,function(nt){return pe.toggle(nt)});else if(Ae!=="manual"){var at=Ae===sr?pe.constructor.Event.MOUSEENTER:pe.constructor.Event.FOCUSIN,gt=Ae===sr?pe.constructor.Event.MOUSELEAVE:pe.constructor.Event.FOCUSOUT;a.default(pe.element).on(at,pe.config.selector,function(nt){return pe._enter(nt)}).on(gt,pe.config.selector,function(nt){return pe._leave(nt)})}}),this._hideModalHandler=function(){pe.element&&pe.hide()},a.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},Ue._fixTitle=function(){var pe=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||pe!=="string")&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},Ue._enter=function(pe,Ae){var at=this.constructor.DATA_KEY;(Ae=Ae||a.default(pe.currentTarget).data(at))||(Ae=new this.constructor(pe.currentTarget,this._getDelegateConfig()),a.default(pe.currentTarget).data(at,Ae)),pe&&(Ae._activeTrigger[pe.type==="focusin"?Gi:sr]=!0),a.default(Ae.getTipElement()).hasClass(wi)||Ae._hoverState===Ni?Ae._hoverState=Ni:(clearTimeout(Ae._timeout),Ae._hoverState=Ni,Ae.config.delay&&Ae.config.delay.show?Ae._timeout=setTimeout(function(){Ae._hoverState===Ni&&Ae.show()},Ae.config.delay.show):Ae.show())},Ue._leave=function(pe,Ae){var at=this.constructor.DATA_KEY;(Ae=Ae||a.default(pe.currentTarget).data(at))||(Ae=new this.constructor(pe.currentTarget,this._getDelegateConfig()),a.default(pe.currentTarget).data(at,Ae)),pe&&(Ae._activeTrigger[pe.type==="focusout"?Gi:sr]=!1),Ae._isWithActiveTrigger()||(clearTimeout(Ae._timeout),Ae._hoverState=ar,Ae.config.delay&&Ae.config.delay.hide?Ae._timeout=setTimeout(function(){Ae._hoverState===ar&&Ae.hide()},Ae.config.delay.hide):Ae.hide())},Ue._isWithActiveTrigger=function(){for(var pe in this._activeTrigger)if(this._activeTrigger[pe])return!0;return!1},Ue._getConfig=function(pe){var Ae=a.default(this.element).data();return Object.keys(Ae).forEach(function(at){Ui.indexOf(at)!==-1&&delete Ae[at]}),typeof(pe=l({},this.constructor.Default,Ae,typeof pe=="object"&&pe?pe:{})).delay=="number"&&(pe.delay={show:pe.delay,hide:pe.delay}),typeof pe.title=="number"&&(pe.title=pe.title.toString()),typeof pe.content=="number"&&(pe.content=pe.content.toString()),v.typeCheckConfig(_n,pe,this.constructor.DefaultType),pe.sanitize&&(pe.template=ra(pe.template,pe.whiteList,pe.sanitizeFn)),pe},Ue._getDelegateConfig=function(){var pe={};if(this.config)for(var Ae in this.config)this.constructor.Default[Ae]!==this.config[Ae]&&(pe[Ae]=this.config[Ae]);return pe},Ue._cleanTipClass=function(){var pe=a.default(this.getTipElement()),Ae=pe.attr("class").match(Or);Ae!==null&&Ae.length&&pe.removeClass(Ae.join(""))},Ue._handlePopperPlacementChange=function(pe){this.tip=pe.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(pe.placement))},Ue._fixTransition=function(){var pe=this.getTipElement(),Ae=this.config.animation;pe.getAttribute("x-placement")===null&&(a.default(pe).removeClass(Fr),this.config.animation=!1,this.hide(),this.show(),this.config.animation=Ae)},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this),at=Ae.data(Vr),gt=typeof pe=="object"&&pe;if((at||!/dispose|hide/.test(pe))&&(at||(at=new xe(this,gt),Ae.data(Vr,at)),typeof pe=="string")){if(typeof at[pe]>"u")throw new TypeError('No method named "'+pe+'"');at[pe]()}})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return or}},{key:"NAME",get:function(){return _n}},{key:"DATA_KEY",get:function(){return Vr}},{key:"Event",get:function(){return Ka}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return lr}}]),xe}();a.default.fn.tooltip=Lr._jQueryInterface,a.default.fn.tooltip.Constructor=Lr,a.default.fn.tooltip.noConflict=function(){return a.default.fn.tooltip=rr,Lr._jQueryInterface};var nr="bs.popover",wa=a.default.fn.popover,zr=new RegExp("(^|\\s)bs-popover\\S+","g"),Ze=l({},Lr.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),tn=l({},Lr.DefaultType,{content:"(string|element|function)"}),Xr={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},ur=function(xe){var Ue,pe;function Ae(){return xe.apply(this,arguments)||this}pe=xe,(Ue=Ae).prototype=Object.create(pe.prototype),Ue.prototype.constructor=Ue,d(Ue,pe);var at=Ae.prototype;return at.isWithContent=function(){return this.getTitle()||this._getContent()},at.addAttachmentClass=function(gt){a.default(this.getTipElement()).addClass("bs-popover-"+gt)},at.getTipElement=function(){return this.tip=this.tip||a.default(this.config.template)[0],this.tip},at.setContent=function(){var gt=a.default(this.getTipElement());this.setElementContent(gt.find(".popover-header"),this.getTitle());var nt=this._getContent();typeof nt=="function"&&(nt=nt.call(this.element)),this.setElementContent(gt.find(".popover-body"),nt),gt.removeClass("fade show")},at._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},at._cleanTipClass=function(){var gt=a.default(this.getTipElement()),nt=gt.attr("class").match(zr);nt!==null&&nt.length>0&&gt.removeClass(nt.join(""))},Ae._jQueryInterface=function(gt){return this.each(function(){var nt=a.default(this).data(nr),jt=typeof gt=="object"?gt:null;if((nt||!/dispose|hide/.test(gt))&&(nt||(nt=new Ae(this,jt),a.default(this).data(nr,nt)),typeof gt=="string")){if(typeof nt[gt]>"u")throw new TypeError('No method named "'+gt+'"');nt[gt]()}})},o(Ae,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Ze}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return nr}},{key:"Event",get:function(){return Xr}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return tn}}]),Ae}(Lr);a.default.fn.popover=ur._jQueryInterface,a.default.fn.popover.Constructor=ur,a.default.fn.popover.noConflict=function(){return a.default.fn.popover=wa,ur._jQueryInterface};var Hr="scrollspy",Xi="bs.scrollspy",dr=a.default.fn[Hr],pa="active",qt="position",mn=".nav, .list-group",ai={offset:10,method:"auto",target:""},Ra={offset:"number",method:"string",target:"(string|element)"},aa=function(){function xe(pe,Ae){var at=this;this._element=pe,this._scrollElement=pe.tagName==="BODY"?window:pe,this._config=this._getConfig(Ae),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a.default(this._scrollElement).on("scroll.bs.scrollspy",function(gt){return at._process(gt)}),this.refresh(),this._process()}var Ue=xe.prototype;return Ue.refresh=function(){var pe=this,Ae=this._scrollElement===this._scrollElement.window?"offset":qt,at=this._config.method==="auto"?Ae:this._config.method,gt=at===qt?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(nt){var jt,Yt=v.getSelectorFromElement(nt);if(Yt&&(jt=document.querySelector(Yt)),jt){var Mn=jt.getBoundingClientRect();if(Mn.width||Mn.height)return[a.default(jt)[at]().top+gt,Yt]}return null}).filter(Boolean).sort(function(nt,jt){return nt[0]-jt[0]}).forEach(function(nt){pe._offsets.push(nt[0]),pe._targets.push(nt[1])})},Ue.dispose=function(){a.default.removeData(this._element,Xi),a.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},Ue._getConfig=function(pe){if(typeof(pe=l({},ai,typeof pe=="object"&&pe?pe:{})).target!="string"&&v.isElement(pe.target)){var Ae=a.default(pe.target).attr("id");Ae||(Ae=v.getUID(Hr),a.default(pe.target).attr("id",Ae)),pe.target="#"+Ae}return v.typeCheckConfig(Hr,pe,Ra),pe},Ue._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},Ue._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},Ue._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},Ue._process=function(){var pe=this._getScrollTop()+this._config.offset,Ae=this._getScrollHeight(),at=this._config.offset+Ae-this._getOffsetHeight();if(this._scrollHeight!==Ae&&this.refresh(),pe>=at){var gt=this._targets[this._targets.length-1];this._activeTarget!==gt&&this._activate(gt)}else{if(this._activeTarget&&pe<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var nt=this._offsets.length;nt--;)this._activeTarget!==this._targets[nt]&&pe>=this._offsets[nt]&&(typeof this._offsets[nt+1]>"u"||pe<this._offsets[nt+1])&&this._activate(this._targets[nt])}},Ue._activate=function(pe){this._activeTarget=pe,this._clear();var Ae=this._selector.split(",").map(function(gt){return gt+'[data-target="'+pe+'"],'+gt+'[href="'+pe+'"]'}),at=a.default([].slice.call(document.querySelectorAll(Ae.join(","))));at.hasClass("dropdown-item")?(at.closest(".dropdown").find(".dropdown-toggle").addClass(pa),at.addClass(pa)):(at.addClass(pa),at.parents(mn).prev(".nav-link, .list-group-item").addClass(pa),at.parents(mn).prev(".nav-item").children(".nav-link").addClass(pa)),a.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:pe})},Ue._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(pe){return pe.classList.contains(pa)}).forEach(function(pe){return pe.classList.remove(pa)})},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this).data(Xi);if(Ae||(Ae=new xe(this,typeof pe=="object"&&pe),a.default(this).data(Xi,Ae)),typeof pe=="string"){if(typeof Ae[pe]>"u")throw new TypeError('No method named "'+pe+'"');Ae[pe]()}})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return ai}}]),xe}();a.default(window).on("load.bs.scrollspy.data-api",function(){for(var xe=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),Ue=xe.length;Ue--;){var pe=a.default(xe[Ue]);aa._jQueryInterface.call(pe,pe.data())}}),a.default.fn[Hr]=aa._jQueryInterface,a.default.fn[Hr].Constructor=aa,a.default.fn[Hr].noConflict=function(){return a.default.fn[Hr]=dr,aa._jQueryInterface};var ga="bs.tab",Ta=a.default.fn.tab,va="active",$r="fade",ua="show",an=".active",gi="> li > .active",jr=function(){function xe(pe){this._element=pe}var Ue=xe.prototype;return Ue.show=function(){var pe=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&a.default(this._element).hasClass(va)||a.default(this._element).hasClass("disabled")||this._element.hasAttribute("disabled"))){var Ae,at,gt=a.default(this._element).closest(".nav, .list-group")[0],nt=v.getSelectorFromElement(this._element);if(gt){var jt=gt.nodeName==="UL"||gt.nodeName==="OL"?gi:an;at=(at=a.default.makeArray(a.default(gt).find(jt)))[at.length-1]}var Yt=a.default.Event("hide.bs.tab",{relatedTarget:this._element}),Mn=a.default.Event("show.bs.tab",{relatedTarget:at});if(at&&a.default(at).trigger(Yt),a.default(this._element).trigger(Mn),!Mn.isDefaultPrevented()&&!Yt.isDefaultPrevented()){nt&&(Ae=document.querySelector(nt)),this._activate(this._element,gt);var Yn=function(){var Wn=a.default.Event("hidden.bs.tab",{relatedTarget:pe._element}),ei=a.default.Event("shown.bs.tab",{relatedTarget:at});a.default(at).trigger(Wn),a.default(pe._element).trigger(ei)};Ae?this._activate(Ae,Ae.parentNode,Yn):Yn()}}},Ue.dispose=function(){a.default.removeData(this._element,ga),this._element=null},Ue._activate=function(pe,Ae,at){var gt=this,nt=(!Ae||Ae.nodeName!=="UL"&&Ae.nodeName!=="OL"?a.default(Ae).children(an):a.default(Ae).find(gi))[0],jt=at&&nt&&a.default(nt).hasClass($r),Yt=function(){return gt._transitionComplete(pe,nt,at)};if(nt&&jt){var Mn=v.getTransitionDurationFromElement(nt);a.default(nt).removeClass(ua).one(v.TRANSITION_END,Yt).emulateTransitionEnd(Mn)}else Yt()},Ue._transitionComplete=function(pe,Ae,at){if(Ae){a.default(Ae).removeClass(va);var gt=a.default(Ae.parentNode).find("> .dropdown-menu .active")[0];gt&&a.default(gt).removeClass(va),Ae.getAttribute("role")==="tab"&&Ae.setAttribute("aria-selected",!1)}a.default(pe).addClass(va),pe.getAttribute("role")==="tab"&&pe.setAttribute("aria-selected",!0),v.reflow(pe),pe.classList.contains($r)&&pe.classList.add(ua);var nt=pe.parentNode;if(nt&&nt.nodeName==="LI"&&(nt=nt.parentNode),nt&&a.default(nt).hasClass("dropdown-menu")){var jt=a.default(pe).closest(".dropdown")[0];if(jt){var Yt=[].slice.call(jt.querySelectorAll(".dropdown-toggle"));a.default(Yt).addClass(va)}pe.setAttribute("aria-expanded",!0)}at&&at()},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this),at=Ae.data(ga);if(at||(at=new xe(this),Ae.data(ga,at)),typeof pe=="string"){if(typeof at[pe]>"u")throw new TypeError('No method named "'+pe+'"');at[pe]()}})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),xe}();a.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(xe){xe.preventDefault(),jr._jQueryInterface.call(a.default(this),"show")}),a.default.fn.tab=jr._jQueryInterface,a.default.fn.tab.Constructor=jr,a.default.fn.tab.noConflict=function(){return a.default.fn.tab=Ta,jr._jQueryInterface};var Ia="bs.toast",Xa=a.default.fn.toast,Ha="hide",$a="show",Ii="showing",br="click.dismiss.bs.toast",Aa={animation:!0,autohide:!0,delay:500},Vt={animation:"boolean",autohide:"boolean",delay:"number"},_i=function(){function xe(pe,Ae){this._element=pe,this._config=this._getConfig(Ae),this._timeout=null,this._setListeners()}var Ue=xe.prototype;return Ue.show=function(){var pe=this,Ae=a.default.Event("show.bs.toast");if(a.default(this._element).trigger(Ae),!Ae.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var at=function(){pe._element.classList.remove(Ii),pe._element.classList.add($a),a.default(pe._element).trigger("shown.bs.toast"),pe._config.autohide&&(pe._timeout=setTimeout(function(){pe.hide()},pe._config.delay))};if(this._element.classList.remove(Ha),v.reflow(this._element),this._element.classList.add(Ii),this._config.animation){var gt=v.getTransitionDurationFromElement(this._element);a.default(this._element).one(v.TRANSITION_END,at).emulateTransitionEnd(gt)}else at()}},Ue.hide=function(){if(this._element.classList.contains($a)){var pe=a.default.Event("hide.bs.toast");a.default(this._element).trigger(pe),pe.isDefaultPrevented()||this._close()}},Ue.dispose=function(){this._clearTimeout(),this._element.classList.contains($a)&&this._element.classList.remove($a),a.default(this._element).off(br),a.default.removeData(this._element,Ia),this._element=null,this._config=null},Ue._getConfig=function(pe){return pe=l({},Aa,a.default(this._element).data(),typeof pe=="object"&&pe?pe:{}),v.typeCheckConfig("toast",pe,this.constructor.DefaultType),pe},Ue._setListeners=function(){var pe=this;a.default(this._element).on(br,'[data-dismiss="toast"]',function(){return pe.hide()})},Ue._close=function(){var pe=this,Ae=function(){pe._element.classList.add(Ha),a.default(pe._element).trigger("hidden.bs.toast")};if(this._element.classList.remove($a),this._config.animation){var at=v.getTransitionDurationFromElement(this._element);a.default(this._element).one(v.TRANSITION_END,Ae).emulateTransitionEnd(at)}else Ae()},Ue._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},xe._jQueryInterface=function(pe){return this.each(function(){var Ae=a.default(this),at=Ae.data(Ia);if(at||(at=new xe(this,typeof pe=="object"&&pe),Ae.data(Ia,at)),typeof pe=="string"){if(typeof at[pe]>"u")throw new TypeError('No method named "'+pe+'"');at[pe](this)}})},o(xe,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"DefaultType",get:function(){return Vt}},{key:"Default",get:function(){return Aa}}]),xe}();a.default.fn.toast=_i._jQueryInterface,a.default.fn.toast.Constructor=_i,a.default.fn.toast.noConflict=function(){return a.default.fn.toast=Xa,_i._jQueryInterface},n.Alert=A,n.Button=F,n.Carousel=Ce,n.Collapse=De,n.Dropdown=Ir,n.Modal=Vn,n.Popover=ur,n.Scrollspy=aa,n.Tab=jr,n.Toast=_i,n.Tooltip=Lr,n.Util=v,Object.defineProperty(n,"__esModule",{value:!0})})})(VS,VS.exports);(function(e,t){var n=e(window);function i(){return new Date(Date.UTC.apply(Date,arguments))}function r(){var y=new Date;return i(y.getFullYear(),y.getMonth(),y.getDate())}function a(y){return function(){return this[y].apply(this,arguments)}}var s=function(){var y={get:function(I){return this.slice(I)[0]},contains:function(I){for(var D=I&&I.valueOf(),O=0,M=this.length;O<M;O++)if(this[O].valueOf()===D)return O;return-1},remove:function(I){this.splice(I,1)},replace:function(I){I&&(e.isArray(I)||(I=[I]),this.clear(),this.push.apply(this,I))},clear:function(){this.length=0},copy:function(){var I=new s;return I.replace(this),I}};return function(){var I=[];return I.push.apply(I,arguments),e.extend(I,y),I}}(),o=function(y,I){this.dates=new s,this.viewDate=r(),this.focusDate=null,this._process_options(I),this.element=e(y),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on, .input-group-prepend, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(E.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today, tfoot th.clear").attr("colspan",function(D,O){return parseInt(O)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};o.prototype={constructor:o,_process_options:function(y){this._o=e.extend({},this._o,y);var I=this.o=e.extend({},this._o),D=I.language;switch(A[D]||(D=D.split("-")[0],A[D]||(D=T.language)),I.language=D,I.startView){case 2:case"decade":I.startView=2;break;case 1:case"year":I.startView=1;break;default:I.startView=0}switch(I.minViewMode){case 1:case"months":I.minViewMode=1;break;case 2:case"years":I.minViewMode=2;break;default:I.minViewMode=0}I.startView=Math.max(I.startView,I.minViewMode),I.multidate!==!0&&(I.multidate=Number(I.multidate)||!1,I.multidate!==!1?I.multidate=Math.max(0,I.multidate):I.multidate=1),I.multidateSeparator=String(I.multidateSeparator),I.weekStart%=7,I.weekEnd=(I.weekStart+6)%7;var O=E.parseFormat(I.format);I.startDate!==-1/0&&(I.startDate?I.startDate instanceof Date?I.startDate=this._local_to_utc(this._zero_time(I.startDate)):I.startDate=E.parseDate(I.startDate,O,I.language):I.startDate=-1/0),I.endDate!==1/0&&(I.endDate?I.endDate instanceof Date?I.endDate=this._local_to_utc(this._zero_time(I.endDate)):I.endDate=E.parseDate(I.endDate,O,I.language):I.endDate=1/0),I.daysOfWeekDisabled=I.daysOfWeekDisabled||[],e.isArray(I.daysOfWeekDisabled)||(I.daysOfWeekDisabled=I.daysOfWeekDisabled.split(/[,\s]*/)),I.daysOfWeekDisabled=e.map(I.daysOfWeekDisabled,function($){return parseInt($,10)});var M=String(I.orientation).toLowerCase().split(/\s+/g),F=I.orientation.toLowerCase();if(M=e.grep(M,function($){return/^auto|left|right|top|bottom$/.test($)}),I.orientation={x:"auto",y:"auto"},!(!F||F==="auto"))if(M.length===1)switch(M[0]){case"top":case"bottom":I.orientation.y=M[0];break;case"left":case"right":I.orientation.x=M[0];break}else F=e.grep(M,function($){return/^left|right$/.test($)}),I.orientation.x=F[0]||"auto",F=e.grep(M,function($){return/^top|bottom$/.test($)}),I.orientation.y=F[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(y){for(var I=0,D,O,M;I<y.length;I++)D=y[I][0],y[I].length===2?(O=t,M=y[I][1]):y[I].length===3&&(O=y[I][1],M=y[I][2]),D.on(M,O)},_unapplyEvents:function(y){for(var I=0,D,O,M;I<y.length;I++)D=y[I][0],y[I].length===2?(M=t,O=y[I][1]):y[I].length===3&&(M=y[I][1],O=y[I][2]),D.off(O,M)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(y){e.inArray(y.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(y){e.inArray(y.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(y){this._focused_from=y.target},this)}],[this.element,{blur:e.proxy(function(y){this._focused_from=y.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(y){this.element.is(y.target)||this.element.find(y.target).length||this.picker.is(y.target)||this.picker.find(y.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(y,I){var D=I||this.dates.get(-1),O=this._utc_to_local(D);this.element.trigger({type:y,date:O,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(M,F){arguments.length===0?(M=this.dates.length-1,F=this.o.format):typeof M=="string"&&(F=M,M=this.dates.length-1),F=F||this.o.format;var $=this.dates.get(M);return E.formatDate($,F,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(y){return y&&new Date(y.getTime()+y.getTimezoneOffset()*6e4)},_local_to_utc:function(y){return y&&new Date(y.getTime()-y.getTimezoneOffset()*6e4)},_zero_time:function(y){return y&&new Date(y.getFullYear(),y.getMonth(),y.getDate())},_zero_utc_time:function(y){return y&&new Date(Date.UTC(y.getUTCFullYear(),y.getUTCMonth(),y.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(y){return new Date(y)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var y=e.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,y),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var y=e.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,e.map(y,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:a("setDates"),setUTCDate:a("setUTCDates"),setValue:function(){var y=this.getFormattedDate();this.isInput?this.element.val(y).change():this.component&&this.element.find("input").val(y).change()},getFormattedDate:function(y){y===t&&(y=this.o.format);var I=this.o.language;return e.map(this.dates,function(D){return E.formatDate(D,y,I)}).join(this.o.multidateSeparator)},setStartDate:function(y){this._process_options({startDate:y}),this.update(),this.updateNavArrows()},setEndDate:function(y){this._process_options({endDate:y}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(y){this._process_options({daysOfWeekDisabled:y}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var y=this.picker.outerWidth(),I=this.picker.outerHeight(),D=10,O=n.width(),M=n.height(),F=n.scrollTop(),$=[];this.element.parents().each(function(){var ue=e(this).css("z-index");ue!=="auto"&&ue!==0&&$.push(parseInt(ue))});var L=Math.max.apply(Math,$)+10,j=this.component?this.component.parent().offset():this.element.offset(),H=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),V=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),Q=j.left,X=j.top;this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(Q-=y-V)):(this.picker.addClass("datepicker-orient-left"),j.left<0?Q-=j.left-D:j.left+y>O&&(Q=O-y-D));var te=this.o.orientation.y,ne,be;te==="auto"&&(ne=-F+j.top-I,be=F+M-(j.top+H+I),Math.max(ne,be)===be?te="top":te="bottom"),this.picker.addClass("datepicker-orient-"+te),te==="top"?X+=H:X-=I+parseInt(this.picker.css("padding-top")),this.picker.css({top:X,left:Q,zIndex:L})}},_allow_update:!0,update:function(){if(this._allow_update){var y=this.dates.copy(),I=[],D=!1;arguments.length?(e.each(arguments,e.proxy(function(O,M){M instanceof Date&&(M=this._local_to_utc(M)),I.push(M)},this)),D=!0):(I=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),I&&this.o.multidate?I=I.split(this.o.multidateSeparator):I=[I],delete this.element.data().date),I=e.map(I,e.proxy(function(O){return E.parseDate(O,this.o.format,this.o.language)},this)),I=e.grep(I,e.proxy(function(O){return O<this.o.startDate||O>this.o.endDate||!O},this),!0),this.dates.replace(I),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),D?this.setValue():I.length&&String(y)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&y.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var y=this.o.weekStart,I="<tr>";if(this.o.calendarWeeks){var D='<th class="cw">&nbsp;</th>';I+=D,this.picker.find(".datepicker-days thead tr:first-child").prepend(D)}for(;y<this.o.weekStart+7;)I+='<th class="dow">'+A[this.o.language].daysMin[y++%7]+"</th>";I+="</tr>",this.picker.find(".datepicker-days thead").append(I)},fillMonths:function(){for(var y="",I=0;I<12;)y+='<span class="month">'+A[this.o.language].monthsShort[I++]+"</span>";this.picker.find(".datepicker-months td").html(y)},setRange:function(y){!y||!y.length?delete this.range:this.range=e.map(y,function(I){return I.valueOf()}),this.fill()},getClassNames:function(y){var I=[],D=this.viewDate.getUTCFullYear(),O=this.viewDate.getUTCMonth(),M=new Date;return y.getUTCFullYear()<D||y.getUTCFullYear()===D&&y.getUTCMonth()<O?I.push("old"):(y.getUTCFullYear()>D||y.getUTCFullYear()===D&&y.getUTCMonth()>O)&&I.push("new"),this.focusDate&&y.valueOf()===this.focusDate.valueOf()&&I.push("focused"),this.o.todayHighlight&&y.getUTCFullYear()===M.getFullYear()&&y.getUTCMonth()===M.getMonth()&&y.getUTCDate()===M.getDate()&&I.push("today"),this.dates.contains(y)!==-1&&I.push("active"),(y.valueOf()<this.o.startDate||y.valueOf()>this.o.endDate||e.inArray(y.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&I.push("disabled"),this.range&&(y>this.range[0]&&y<this.range[this.range.length-1]&&I.push("range"),e.inArray(y.valueOf(),this.range)!==-1&&I.push("selected")),I},fill:function(){var y=new Date(this.viewDate),I=y.getUTCFullYear(),D=y.getUTCMonth(),O=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,M=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,F=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,$=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,L=A[this.o.language].today||A.en.today||"",j=A[this.o.language].clear||A.en.clear||"",H;if(!(isNaN(I)||isNaN(D))){this.picker.find(".datepicker-days thead th.datepicker-switch").text(A[this.o.language].months[D]+" "+I),this.picker.find("tfoot th.today").text(L).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.clear").text(j).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var V=i(I,D-1,28),Q=E.getDaysInMonth(V.getUTCFullYear(),V.getUTCMonth());V.setUTCDate(Q),V.setUTCDate(Q-(V.getUTCDay()-this.o.weekStart+7)%7);var X=new Date(V);X.setUTCDate(X.getUTCDate()+42),X=X.valueOf();for(var te=[],ne;V.valueOf()<X;){if(V.getUTCDay()===this.o.weekStart&&(te.push("<tr>"),this.o.calendarWeeks)){var be=new Date(+V+(this.o.weekStart-V.getUTCDay()-7)%7*864e5),ue=new Date(Number(be)+(11-be.getUTCDay())%7*864e5),Ce=new Date(Number(Ce=i(ue.getUTCFullYear(),0,1))+(11-Ce.getUTCDay())%7*864e5),ie=(ue-Ce)/864e5/7+1;te.push('<td class="cw">'+ie+"</td>")}if(ne=this.getClassNames(V),ne.push("day"),this.o.beforeShowDay!==e.noop){var Y=this.o.beforeShowDay(this._utc_to_local(V));Y===t?Y={}:typeof Y=="boolean"?Y={enabled:Y}:typeof Y=="string"&&(Y={classes:Y}),Y.enabled===!1&&ne.push("disabled"),Y.classes&&(ne=ne.concat(Y.classes.split(/\s+/))),Y.tooltip&&(H=Y.tooltip)}ne=e.unique(ne),te.push('<td class="'+ne.join(" ")+'"'+(H?' title="'+H+'"':"")+">"+V.getUTCDate()+"</td>"),H=null,V.getUTCDay()===this.o.weekEnd&&te.push("</tr>"),V.setUTCDate(V.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(te.join(""));var he=this.picker.find(".datepicker-months").find("th:eq(1)").text(I).end().find("span").removeClass("active");e.each(this.dates,function(ee,G){G.getUTCFullYear()===I&&he.eq(G.getUTCMonth()).addClass("active")}),(I<O||I>F)&&he.addClass("disabled"),I===O&&he.slice(0,M).addClass("disabled"),I===F&&he.slice($+1).addClass("disabled"),te="",I=parseInt(I/10,10)*10;var Me=this.picker.find(".datepicker-years").find("th:eq(1)").text(I+"-"+(I+9)).end().find("td");I-=1;for(var Pe=e.map(this.dates,function(ee){return ee.getUTCFullYear()}),We,qe=-1;qe<11;qe++)We=["year"],qe===-1?We.push("old"):qe===10&&We.push("new"),e.inArray(I,Pe)!==-1&&We.push("active"),(I<O||I>F)&&We.push("disabled"),te+='<span class="'+We.join(" ")+'">'+I+"</span>",I+=1;Me.html(te)}},updateNavArrows:function(){if(this._allow_update){var y=new Date(this.viewDate),I=y.getUTCFullYear(),D=y.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&I<=this.o.startDate.getUTCFullYear()&&D<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&I>=this.o.endDate.getUTCFullYear()&&D>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&I<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&I>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break}}},click:function(y){y.preventDefault();var I=e(y.target).closest("span, td, th"),D,O,M;if(I.length===1)switch(I[0].nodeName.toLowerCase()){case"th":switch(I[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var F=E.modes[this.viewMode].navStep*(I[0].className==="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,F),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,F),this.viewMode===1&&this._trigger("changeYear",this.viewDate);break}this.fill();break;case"today":var $=new Date;$=i($.getFullYear(),$.getMonth(),$.getDate(),0,0,0),this.showMode(-2);var L=this.o.todayBtn==="linked"?null:"view";this._setDate($,L);break;case"clear":var j;this.isInput?j=this.element:this.component&&(j=this.element.find("input")),j&&j.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide();break}break;case"span":I.is(".disabled")||(this.viewDate.setUTCDate(1),I.is(".month")?(M=1,O=I.parent().find("span").index(I),D=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(O),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(i(D,O,M))):(M=1,O=0,D=parseInt(I.text(),10)||0,this.viewDate.setUTCFullYear(D),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(i(D,O,M))),this.showMode(-1),this.fill());break;case"td":I.is(".day")&&!I.is(".disabled")&&(M=parseInt(I.text(),10)||1,D=this.viewDate.getUTCFullYear(),O=this.viewDate.getUTCMonth(),I.is(".old")?O===0?(O=11,D-=1):O-=1:I.is(".new")&&(O===11?(O=0,D+=1):O+=1),this._setDate(i(D,O,M)));break}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(y){var I=this.dates.contains(y);if(y||this.dates.clear(),this.o.multidate===1&&I===0||(I!==-1?this.dates.remove(I):this.dates.push(y)),typeof this.o.multidate=="number")for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(y,I){(!I||I==="date")&&this._toggle_multidate(y&&new Date(y)),(!I||I==="view")&&(this.viewDate=y&&new Date(y)),this.fill(),this.setValue(),this._trigger("changeDate");var D;this.isInput?D=this.element:this.component&&(D=this.element.find("input")),D&&D.change(),this.o.autoclose&&(!I||I==="date")&&this.hide()},moveMonth:function(y,I){if(!y)return t;if(!I)return y;var D=new Date(y.valueOf()),O=D.getUTCDate(),M=D.getUTCMonth(),F=Math.abs(I),$,L;if(I=I>0?1:-1,F===1)L=I===-1?function(){return D.getUTCMonth()===M}:function(){return D.getUTCMonth()!==$},$=M+I,D.setUTCMonth($),($<0||$>11)&&($=($+12)%12);else{for(var j=0;j<F;j++)D=this.moveMonth(D,I);$=D.getUTCMonth(),D.setUTCDate(O),L=function(){return $!==D.getUTCMonth()}}for(;L();)D.setUTCDate(--O),D.setUTCMonth($);return D},moveYear:function(y,I){return this.moveMonth(y,I*12)},dateWithinRange:function(y){return y>=this.o.startDate&&y<=this.o.endDate},keydown:function(y){if(this.picker.is(":not(:visible)")){y.keyCode===27&&this.show();return}var I=!1,D,O,M,F=this.focusDate||this.viewDate;switch(y.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),y.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;D=y.keyCode===37?-1:1,y.ctrlKey?(O=this.moveYear(this.dates.get(-1)||r(),D),M=this.moveYear(F,D),this._trigger("changeYear",this.viewDate)):y.shiftKey?(O=this.moveMonth(this.dates.get(-1)||r(),D),M=this.moveMonth(F,D),this._trigger("changeMonth",this.viewDate)):(O=new Date(this.dates.get(-1)||r()),O.setUTCDate(O.getUTCDate()+D),M=new Date(F),M.setUTCDate(F.getUTCDate()+D)),this.dateWithinRange(O)&&(this.focusDate=this.viewDate=M,this.setValue(),this.fill(),y.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;D=y.keyCode===38?-1:1,y.ctrlKey?(O=this.moveYear(this.dates.get(-1)||r(),D),M=this.moveYear(F,D),this._trigger("changeYear",this.viewDate)):y.shiftKey?(O=this.moveMonth(this.dates.get(-1)||r(),D),M=this.moveMonth(F,D),this._trigger("changeMonth",this.viewDate)):(O=new Date(this.dates.get(-1)||r()),O.setUTCDate(O.getUTCDate()+D*7),M=new Date(F),M.setUTCDate(F.getUTCDate()+D*7)),this.dateWithinRange(O)&&(this.focusDate=this.viewDate=M,this.setValue(),this.fill(),y.preventDefault());break;case 32:break;case 13:F=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(F),I=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(y.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide();break}if(I){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var $;this.isInput?$=this.element:this.component&&($=this.element.find("input")),$&&$.change()}},showMode:function(y){y&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+y))),this.picker.find(">div").hide().filter(".datepicker-"+E.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var l=function(y,I){this.element=e(y),this.inputs=e.map(I.inputs,function(D){return D.jquery?D[0]:D}),delete I.inputs,e(this.inputs).datepicker(I).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(D){return e(D).data("datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(y){return y.getUTCDate()}),this.updateRanges()},updateRanges:function(){var y=e.map(this.dates,function(I){return I.valueOf()});e.each(this.pickers,function(I,D){D.setRange(y)})},dateUpdated:function(y){if(!this.updating){this.updating=!0;var I=e(y.target).data("datepicker"),D=I.getUTCDate(),O=e.inArray(y.target,this.inputs),M=this.inputs.length;if(O!==-1){if(e.each(this.pickers,function(F,$){$.getUTCDate()||$.setUTCDate(D)}),D<this.dates[O])for(;O>=0&&D<this.dates[O];)this.pickers[O--].setUTCDate(D);else if(D>this.dates[O])for(;O<M&&D>this.dates[O];)this.pickers[O++].setUTCDate(D);this.updateDates(),delete this.updating}}},remove:function(){e.map(this.pickers,function(y){y.remove()}),delete this.element.data().datepicker}};function d(y,I){var D=e(y).data(),O={},M,F=new RegExp("^"+I.toLowerCase()+"([A-Z])");I=new RegExp("^"+I.toLowerCase());function $(j,H){return H.toLowerCase()}for(var L in D)I.test(L)&&(M=L.replace(F,$),O[M]=D[L]);return O}function c(y){var I={};if(!(!A[y]&&(y=y.split("-")[0],!A[y]))){var D=A[y];return e.each(b,function(O,M){M in D&&(I[M]=D[M])}),I}}var v=e.fn.datepicker;e.fn.datepicker=function(y){var I=Array.apply(null,arguments);I.shift();var D;return this.each(function(){var O=e(this),M=O.data("datepicker"),F=typeof y=="object"&&y;if(!M){var $=d(this,"date"),L=e.extend({},T,$,F),j=c(L.language),H=e.extend({},T,j,$,F);if(O.is(".input-daterange")||H.inputs){var V={inputs:H.inputs||O.find("input").toArray()};O.data("datepicker",M=new l(this,e.extend(H,V)))}else O.data("datepicker",M=new o(this,H))}if(typeof y=="string"&&typeof M[y]=="function"&&(D=M[y].apply(M,I),D!==t))return!1}),D!==t?D:this};var T=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},b=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=o;var A=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},E={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(y){return y%4===0&&y%100!==0||y%400===0},getDaysInMonth:function(y,I){return[31,E.isLeapYear(y)?29:28,31,30,31,30,31,31,30,31,30,31][I]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(y){var I=y.replace(this.validParts,"\0").split("\0"),D=y.match(this.validParts);if(!I||!I.length||!D||D.length===0)throw new Error("Invalid date format.");return{separators:I,parts:D}},parseDate:function(y,I,D){if(!y)return t;if(y instanceof Date)return y;typeof I=="string"&&(I=E.parseFormat(I));var O=/([\-+]\d+)([dmwy])/,M=y.match(/([\-+]\d+)([dmwy])/g),F,$,L;if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(y)){for(y=new Date,L=0;L<M.length;L++)switch(F=O.exec(M[L]),$=parseInt(F[1]),F[2]){case"d":y.setUTCDate(y.getUTCDate()+$);break;case"m":y=o.prototype.moveMonth.call(o.prototype,y,$);break;case"w":y.setUTCDate(y.getUTCDate()+$*7);break;case"y":y=o.prototype.moveYear.call(o.prototype,y,$);break}return i(y.getUTCFullYear(),y.getUTCMonth(),y.getUTCDate(),0,0,0)}M=y&&y.match(this.nonpunctuation)||[],y=new Date;var j={},H=["yyyy","yy","M","MM","m","mm","d","dd"],V={yyyy:function(ie,Y){return ie.setUTCFullYear(Y)},yy:function(ie,Y){return ie.setUTCFullYear(2e3+Y)},m:function(ie,Y){if(isNaN(ie))return ie;for(Y-=1;Y<0;)Y+=12;for(Y%=12,ie.setUTCMonth(Y);ie.getUTCMonth()!==Y;)ie.setUTCDate(ie.getUTCDate()-1);return ie},d:function(ie,Y){return ie.setUTCDate(Y)}},Q,X;V.M=V.MM=V.mm=V.m,V.dd=V.d,y=i(y.getFullYear(),y.getMonth(),y.getDate(),0,0,0);var te=I.parts.slice();M.length!==te.length&&(te=e(te).filter(function(ie,Y){return e.inArray(Y,H)!==-1}).toArray());function ne(){var ie=this.slice(0,M[L].length),Y=M[L].slice(0,ie.length);return ie===Y}if(M.length===te.length){var be;for(L=0,be=te.length;L<be;L++){if(Q=parseInt(M[L],10),F=te[L],isNaN(Q))switch(F){case"MM":X=e(A[D].months).filter(ne),Q=e.inArray(X[0],A[D].months)+1;break;case"M":X=e(A[D].monthsShort).filter(ne),Q=e.inArray(X[0],A[D].monthsShort)+1;break}j[F]=Q}var ue,Ce;for(L=0;L<H.length;L++)Ce=H[L],Ce in j&&!isNaN(j[Ce])&&(ue=new Date(y),V[Ce](ue,j[Ce]),isNaN(ue)||(y=ue))}return y},formatDate:function(y,I,D){if(!y)return"";typeof I=="string"&&(I=E.parseFormat(I));var O={d:y.getUTCDate(),D:A[D].daysShort[y.getUTCDay()],DD:A[D].days[y.getUTCDay()],m:y.getUTCMonth()+1,M:A[D].monthsShort[y.getUTCMonth()],MM:A[D].months[y.getUTCMonth()],yy:y.getUTCFullYear().toString().substring(2),yyyy:y.getUTCFullYear()};O.dd=(O.d<10?"0":"")+O.d,O.mm=(O.m<10?"0":"")+O.m,y=[];for(var M=e.extend([],I.separators),F=0,$=I.parts.length;F<=$;F++)M.length&&y.push(M.shift()),y.push(O[I.parts[F]]);return y.join("")},headTemplate:'<thead><tr><th class="prev">&laquo;</th><th colspan="5" class="datepicker-switch"></th><th class="next">&raquo;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};E.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+E.headTemplate+"<tbody></tbody>"+E.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+E.headTemplate+E.contTemplate+E.footTemplate+"</table></div></div>",e.fn.datepicker.DPGlobal=E,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=v,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(y){var I=e(this);I.data("datepicker")||(y.preventDefault(),I.datepicker("show"))}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()})})(window.jQuery);(function(e,t){e.rails!==t&&e.error("jquery-ujs has already been loaded!");var n,i=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return e("meta[name=csrf-token]").attr("content")},csrfParam:function(){return e("meta[name=csrf-param]").attr("content")},CSRFProtection:function(r){var a=n.csrfToken();a&&r.setRequestHeader("X-CSRF-Token",a)},refreshCSRFTokens:function(){e('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(r,a,s){var o=e.Event(a);return r.trigger(o,s),o.result!==!1},confirm:function(r){return confirm(r)},ajax:function(r){return e.ajax(r)},href:function(r){return r[0].href},handleRemote:function(r){var a,s,o,l,d,c;if(n.fire(r,"ajax:before")){if(l=r.data("with-credentials")||null,d=r.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,r.is("form")){a=r.attr("method"),s=r.attr("action"),o=r.serializeArray();var v=r.data("ujs:submit-button");v&&(o.push(v),r.data("ujs:submit-button",null))}else r.is(n.inputChangeSelector)?(a=r.data("method"),s=r.data("url"),o=r.serialize(),r.data("params")&&(o=o+"&"+r.data("params"))):r.is(n.buttonClickSelector)?(a=r.data("method")||"get",s=r.data("url"),o=r.serialize(),r.data("params")&&(o=o+"&"+r.data("params"))):(a=r.data("method"),s=n.href(r),o=r.data("params")||null);return c={type:a||"GET",data:o,dataType:d,beforeSend:function(T,b){if(b.dataType===t&&T.setRequestHeader("accept","*/*;q=0.5, "+b.accepts.script),n.fire(r,"ajax:beforeSend",[T,b]))r.trigger("ajax:send",T);else return!1},success:function(T,b,A){r.trigger("ajax:success",[T,b,A])},complete:function(T,b){r.trigger("ajax:complete",[T,b])},error:function(T,b,A){r.trigger("ajax:error",[T,b,A])},crossDomain:n.isCrossDomain(s)},l&&(c.xhrFields={withCredentials:l}),s&&(c.url=s),n.ajax(c)}else return!1},isCrossDomain:function(r){var a=document.createElement("a");a.href=location.href;var s=document.createElement("a");try{return s.href=r,s.href=s.href,!s.protocol||!s.host||a.protocol+"//"+a.host!=s.protocol+"//"+s.host}catch{return!0}},handleMethod:function(r){var a=n.href(r),s=r.data("method"),o=r.attr("target"),l=n.csrfToken(),d=n.csrfParam(),c=e('<form method="post" action="'+a+'"></form>'),v='<input name="_method" value="'+s+'" type="hidden" />';d!==t&&l!==t&&!n.isCrossDomain(a)&&(v+='<input name="'+d+'" value="'+l+'" type="hidden" />'),o&&c.attr("target",o),c.hide().append(v).appendTo("body"),c.submit()},formElements:function(r,a){return r.is("form")?e(r[0].elements).filter(a):r.find(a)},disableFormElements:function(r){n.formElements(r,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(r){var a,s;a=r.is("button")?"html":"val",s=r.data("disable-with"),r.data("ujs:enable-with",r[a]()),s!==t&&r[a](s),r.prop("disabled",!0)},enableFormElements:function(r){n.formElements(r,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(r){var a=r.is("button")?"html":"val";r.data("ujs:enable-with")&&r[a](r.data("ujs:enable-with")),r.prop("disabled",!1)},allowAction:function(r){var a=r.data("confirm"),s=!1,o;if(!a)return!0;if(n.fire(r,"confirm")){try{s=n.confirm(a)}catch(l){(console.error||console.log).call(console,l.stack||l)}o=n.fire(r,"confirm:complete",[s])}return s&&o},blankInputs:function(r,a,s){var o=e(),l,d,c=a||"input,textarea",v=r.find(c);return v.each(function(){if(l=e(this),d=l.is("input[type=checkbox],input[type=radio]")?l.is(":checked"):l.val(),!d==!s){if(l.is("input[type=radio]")&&v.filter('input[type=radio]:checked[name="'+l.attr("name")+'"]').length)return!0;o=o.add(l)}}),o.length?o:!1},nonBlankInputs:function(r,a){return n.blankInputs(r,a,!0)},stopEverything:function(r){return e(r.target).trigger("ujs:everythingStopped"),r.stopImmediatePropagation(),!1},disableElement:function(r){var a=r.data("disable-with");r.data("ujs:enable-with",r.html()),a!==t&&r.html(a),r.bind("click.railsDisable",function(s){return n.stopEverything(s)})},enableElement:function(r){r.data("ujs:enable-with")!==t&&(r.html(r.data("ujs:enable-with")),r.removeData("ujs:enable-with")),r.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(e.ajaxPrefilter(function(r,a,s){r.crossDomain||n.CSRFProtection(s)}),e(window).on("pageshow.rails",function(){e(e.rails.enableSelector).each(function(){var r=e(this);r.data("ujs:enable-with")&&e.rails.enableFormElement(r)}),e(e.rails.linkDisableSelector).each(function(){var r=e(this);r.data("ujs:enable-with")&&e.rails.enableElement(r)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(e(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(e(this))}),i.delegate(n.linkClickSelector,"click.rails",function(r){var a=e(this),s=a.data("method"),o=a.data("params"),l=r.metaKey||r.ctrlKey;if(!n.allowAction(a))return n.stopEverything(r);if(!l&&a.is(n.linkDisableSelector)&&n.disableElement(a),a.data("remote")!==t){if(l&&(!s||s==="GET")&&!o)return!0;var d=n.handleRemote(a);return d===!1?n.enableElement(a):d.fail(function(){n.enableElement(a)}),!1}else if(s)return n.handleMethod(a),!1}),i.delegate(n.buttonClickSelector,"click.rails",function(r){var a=e(this);if(!n.allowAction(a))return n.stopEverything(r);a.is(n.buttonDisableSelector)&&n.disableFormElement(a);var s=n.handleRemote(a);return s===!1?n.enableFormElement(a):s.fail(function(){n.enableFormElement(a)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(r){var a=e(this);return n.allowAction(a)?(n.handleRemote(a),!1):n.stopEverything(r)}),i.delegate(n.formSubmitSelector,"submit.rails",function(r){var a=e(this),s=a.data("remote")!==t,o,l;if(!n.allowAction(a)||a.attr("novalidate")==t&&(o=n.blankInputs(a,n.requiredInputSelector),o&&n.fire(a,"ajax:aborted:required",[o])))return n.stopEverything(r);if(s){if(l=n.nonBlankInputs(a,n.fileInputSelector),l){setTimeout(function(){n.disableFormElements(a)},13);var d=n.fire(a,"ajax:aborted:file",[l]);return d||setTimeout(function(){n.enableFormElements(a)},13),d}return n.handleRemote(a),!1}else setTimeout(function(){n.disableFormElements(a)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(r){var a=e(this);if(!n.allowAction(a))return n.stopEverything(r);var s=a.attr("name"),o=s?{name:s,value:a.val()}:null;a.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(r){this==r.target&&n.disableFormElements(e(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(r){this==r.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))})(Jc);var sx={exports:{}};/**
 * @license
 * Video.js 7.21.5 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/main/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
 */(function(e,t){(function(n,i){e.exports=i()})(zs,function(){for(var n="7.21.5",i={},r=function(f,_){return i[f]=i[f]||[],_&&(i[f]=i[f].concat(_)),i[f]},a=function(f,_){r(f,_)},s=function(f,_){var h=r(f).indexOf(_);return h<=-1?!1:(i[f]=i[f].slice(),i[f].splice(h,1),!0)},o=function(f,_){r(f,[].concat(_).map(function(h){var u=function p(){return s(f,p),h.apply(void 0,arguments)};return u}))},l={prefixed:!0},d=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],c=d[0],v,T=0;T<d.length;T++)if(d[T][1]in document){v=d[T];break}if(v){for(var b=0;b<v.length;b++)l[c[b]]=v[b];l.prefixed=v[0]!==c[0]}var A=[],E=function(f,_){return function(h,u,p){var k=_.levels[u],R=new RegExp("^("+k+")$");if(h!=="log"&&p.unshift(h.toUpperCase()+":"),p.unshift(f+":"),A){A.push([].concat(p));var q=A.length-1e3;A.splice(0,q>0?q:0)}if(window.console){var z=window.console[h];!z&&h==="debug"&&(z=window.console.info||window.console.log),!(!z||!k||!R.test(h))&&z[Array.isArray(p)?"apply":"call"](window.console,p)}}};function y(S){var f="info",_,h=function(){for(var p=arguments.length,k=new Array(p),R=0;R<p;R++)k[R]=arguments[R];_("log",f,k)};return _=E(S,h),h.createLogger=function(u){return y(S+": "+u)},h.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:f},h.level=function(u){if(typeof u=="string"){if(!h.levels.hasOwnProperty(u))throw new Error('"'+u+'" in not a valid log level');f=u}return f},h.history=function(){return A?[].concat(A):[]},h.history.filter=function(u){return(A||[]).filter(function(p){return new RegExp(".*"+u+".*").test(p[0])})},h.history.clear=function(){A&&(A.length=0)},h.history.disable=function(){A!==null&&(A.length=0,A=null)},h.history.enable=function(){A===null&&(A=[])},h.error=function(){for(var u=arguments.length,p=new Array(u),k=0;k<u;k++)p[k]=arguments[k];return _("error",f,p)},h.warn=function(){for(var u=arguments.length,p=new Array(u),k=0;k<u;k++)p[k]=arguments[k];return _("warn",f,p)},h.debug=function(){for(var u=arguments.length,p=new Array(u),k=0;k<u;k++)p[k]=arguments[k];return _("debug",f,p)},h}var I=y("VIDEOJS"),D=I.createLogger,O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof zs<"u"?zs:typeof self<"u"?self:{};function M(S,f){return f={exports:{}},S(f,f.exports),f.exports}var F=M(function(S){function f(){return S.exports=f=Object.assign||function(_){for(var h=1;h<arguments.length;h++){var u=arguments[h];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(_[p]=u[p])}return _},f.apply(this,arguments)}S.exports=f}),$=Object.prototype.toString,L=function(f){return Q(f)?Object.keys(f):[]};function j(S,f){L(S).forEach(function(_){return f(S[_],_)})}function H(S,f,_){return _===void 0&&(_=0),L(S).reduce(function(h,u){return f(h,S[u],u)},_)}function V(S){for(var f=arguments.length,_=new Array(f>1?f-1:0),h=1;h<f;h++)_[h-1]=arguments[h];return Object.assign?F.apply(void 0,[S].concat(_)):(_.forEach(function(u){u&&j(u,function(p,k){S[k]=p})}),S)}function Q(S){return!!S&&typeof S=="object"}function X(S){return Q(S)&&$.call(S)==="[object Object]"&&S.constructor===Object}function te(S,f){if(!S||!f)return"";if(typeof window.getComputedStyle=="function"){var _;try{_=window.getComputedStyle(S)}catch{return""}return _?_.getPropertyValue(f)||_[f]:""}return""}var ne=window.navigator&&window.navigator.userAgent||"",be=/AppleWebKit\/([\d.]+)/i.exec(ne),ue=be?parseFloat(be.pop()):null,Ce=/iPod/i.test(ne),ie=function(){var S=ne.match(/OS (\d+)_/i);return S&&S[1]?S[1]:null}(),Y=/Android/i.test(ne),he=function(){var S=ne.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!S)return null;var f=S[1]&&parseFloat(S[1]),_=S[2]&&parseFloat(S[2]);return f&&_?parseFloat(S[1]+"."+S[2]):f||null}(),Me=Y&&he<5&&ue<537,Pe=/Firefox/i.test(ne),We=/Edg/i.test(ne),qe=!We&&(/Chrome/i.test(ne)||/CriOS/i.test(ne)),ee=function(){var S=ne.match(/(Chrome|CriOS)\/(\d+)/);return S&&S[2]?parseFloat(S[2]):null}(),G=function(){var S=/MSIE\s(\d+)\.\d/.exec(ne),f=S&&parseFloat(S[1]);return!f&&/Trident\/7.0/i.test(ne)&&/rv:11.0/.test(ne)&&(f=11),f}(),me=/Safari/i.test(ne)&&!qe&&!Y&&!We,Te=/Windows/i.test(ne),De=!!(it()&&("ontouchstart"in window||window.navigator.maxTouchPoints||window.DocumentTouch&&window.document instanceof window.DocumentTouch)),we=/iPad/i.test(ne)||me&&De&&!/iPhone/i.test(ne),Ve=/iPhone/i.test(ne)&&!we,Ke=Ve||we||Ce,yt=(me||Ke)&&!qe,ht=Object.freeze({__proto__:null,IS_IPOD:Ce,IOS_VERSION:ie,IS_ANDROID:Y,ANDROID_VERSION:he,IS_NATIVE_ANDROID:Me,IS_FIREFOX:Pe,IS_EDGE:We,IS_CHROME:qe,CHROME_VERSION:ee,IE_VERSION:G,IS_SAFARI:me,IS_WINDOWS:Te,TOUCH_ENABLED:De,IS_IPAD:we,IS_IPHONE:Ve,IS_IOS:Ke,IS_ANY_SAFARI:yt});function Je(S){return typeof S=="string"&&!!S.trim()}function pt(S){if(S.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Tt(S){return new RegExp("(^|\\s)"+S+"($|\\s)")}function it(){return document===window.document}function Ge(S){return Q(S)&&S.nodeType===1}function st(){try{return window.parent!==window.self}catch{return!0}}function It(S){return function(f,_){if(!Je(f))return document[S](null);Je(_)&&(_=document.querySelector(_));var h=Ge(_)?_:document;return h[S]&&h[S](f)}}function Ct(S,f,_,h){S===void 0&&(S="div"),f===void 0&&(f={}),_===void 0&&(_={});var u=document.createElement(S);return Object.getOwnPropertyNames(f).forEach(function(p){var k=f[p];p.indexOf("aria-")!==-1||p==="role"||p==="type"?(I.warn(`Setting attributes in the second argument of createEl()
has been deprecated. Use the third argument instead.
`+("createEl(type, properties, attributes). Attempting to set "+p+" to "+k+".")),u.setAttribute(p,k)):p==="textContent"?bt(u,k):(u[p]!==k||p==="tabIndex")&&(u[p]=k)}),Object.getOwnPropertyNames(_).forEach(function(p){u.setAttribute(p,_[p])}),h&&Dn(u,h),u}function bt(S,f){return typeof S.textContent>"u"?S.innerText=f:S.textContent=f,S}function Rt(S,f){f.firstChild?f.insertBefore(S,f.firstChild):f.appendChild(S)}function cn(S,f){return pt(f),S.classList?S.classList.contains(f):Tt(f).test(S.className)}function nn(S,f){return S.classList?S.classList.add(f):cn(S,f)||(S.className=(S.className+" "+f).trim()),S}function Qe(S,f){return S?(S.classList?S.classList.remove(f):(pt(f),S.className=S.className.split(/\s+/).filter(function(_){return _!==f}).join(" ")),S):(I.warn("removeClass was called with an element that doesn't exist"),null)}function Ft(S,f,_){var h=cn(S,f);if(typeof _=="function"&&(_=_(S,f)),typeof _!="boolean"&&(_=!h),_!==h)return _?nn(S,f):Qe(S,f),S}function Fn(S,f){Object.getOwnPropertyNames(f).forEach(function(_){var h=f[_];h===null||typeof h>"u"||h===!1?S.removeAttribute(_):S.setAttribute(_,h===!0?"":h)})}function He(S){var f={},_=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(S&&S.attributes&&S.attributes.length>0)for(var h=S.attributes,u=h.length-1;u>=0;u--){var p=h[u].name,k=h[u].value;(typeof S[p]=="boolean"||_.indexOf(","+p+",")!==-1)&&(k=k!==null),f[p]=k}return f}function Dt(S,f){return S.getAttribute(f)}function Xt(S,f,_){S.setAttribute(f,_)}function Mt(S,f){S.removeAttribute(f)}function Xe(){document.body.focus(),document.onselectstart=function(){return!1}}function Nt(){document.onselectstart=function(){return!0}}function on(S){if(S&&S.getBoundingClientRect&&S.parentNode){var f=S.getBoundingClientRect(),_={};return["bottom","height","left","right","top","width"].forEach(function(h){f[h]!==void 0&&(_[h]=f[h])}),_.height||(_.height=parseFloat(te(S,"height"))),_.width||(_.width=parseFloat(te(S,"width"))),_}}function In(S){if(!S||S&&!S.offsetParent)return{left:0,top:0,width:0,height:0};for(var f=S.offsetWidth,_=S.offsetHeight,h=0,u=0;S.offsetParent&&S!==document[l.fullscreenElement];)h+=S.offsetLeft,u+=S.offsetTop,S=S.offsetParent;return{left:h,top:u,width:f,height:_}}function dt(S,f){var _={x:0,y:0};if(Ke)for(var h=S;h&&h.nodeName.toLowerCase()!=="html";){var u=te(h,"transform");if(/^matrix/.test(u)){var p=u.slice(7,-1).split(/,\s/).map(Number);_.x+=p[4],_.y+=p[5]}else if(/^matrix3d/.test(u)){var k=u.slice(9,-1).split(/,\s/).map(Number);_.x+=k[12],_.y+=k[13]}h=h.parentNode}var R={},q=In(f.target),z=In(S),de=z.width,Ee=z.height,Se=f.offsetY-(z.top-q.top),ze=f.offsetX-(z.left-q.left);return f.changedTouches&&(ze=f.changedTouches[0].pageX-z.left,Se=f.changedTouches[0].pageY+z.top,Ke&&(ze-=_.x,Se-=_.y)),R.y=1-Math.max(0,Math.min(1,Se/Ee)),R.x=Math.max(0,Math.min(1,ze/de)),R}function Zt(S){return Q(S)&&S.nodeType===3}function Ln(S){for(;S.firstChild;)S.removeChild(S.firstChild);return S}function xn(S){return typeof S=="function"&&(S=S()),(Array.isArray(S)?S:[S]).map(function(f){if(typeof f=="function"&&(f=f()),Ge(f)||Zt(f))return f;if(typeof f=="string"&&/\S/.test(f))return document.createTextNode(f)}).filter(function(f){return f})}function Dn(S,f){return xn(f).forEach(function(_){return S.appendChild(_)}),S}function Un(S,f){return Dn(Ln(S),f)}function qn(S){return S.button===void 0&&S.buttons===void 0||S.button===0&&S.buttons===void 0||S.type==="mouseup"&&S.button===0&&S.buttons===0?!0:!(S.button!==0||S.buttons!==1)}var ft=It("querySelector"),ni=It("querySelectorAll"),Et=Object.freeze({__proto__:null,isReal:it,isEl:Ge,isInFrame:st,createEl:Ct,textContent:bt,prependTo:Rt,hasClass:cn,addClass:nn,removeClass:Qe,toggleClass:Ft,setAttributes:Fn,getAttributes:He,getAttribute:Dt,setAttribute:Xt,removeAttribute:Mt,blockTextSelection:Xe,unblockTextSelection:Nt,getBoundingClientRect:on,findPosition:In,getPointerPosition:dt,isTextNode:Zt,emptyEl:Ln,normalizeContent:xn,appendContent:Dn,insertContent:Un,isSingleLeftClick:qn,$:ft,$$:ni}),un=!1,Ai,St=function(){if(Ai.options.autoSetup!==!1){var f=Array.prototype.slice.call(document.getElementsByTagName("video")),_=Array.prototype.slice.call(document.getElementsByTagName("audio")),h=Array.prototype.slice.call(document.getElementsByTagName("video-js")),u=f.concat(_,h);if(u&&u.length>0)for(var p=0,k=u.length;p<k;p++){var R=u[p];if(R&&R.getAttribute){if(R.player===void 0){var q=R.getAttribute("data-setup");q!==null&&Ai(R)}}else{sn(1);break}}else un||sn(1)}};function sn(S,f){it()&&(f&&(Ai=f),window.setTimeout(St,S))}function ci(){un=!0,window.removeEventListener("load",ci)}it()&&(document.readyState==="complete"?ci():window.addEventListener("load",ci));var pi=function(f){var _=document.createElement("style");return _.className=f,_},Pi=function(f,_){f.styleSheet?f.styleSheet.cssText=_:f.textContent=_},$i=3,ji=$i;function ri(){return ji++}var tr;window.WeakMap||(tr=function(){function S(){this.vdata="vdata"+Math.floor(window.performance&&window.performance.now()||Date.now()),this.data={}}var f=S.prototype;return f.set=function(h,u){var p=h[this.vdata]||ri();return h[this.vdata]||(h[this.vdata]=p),this.data[p]=u,this},f.get=function(h){var u=h[this.vdata];if(u)return this.data[u];I("We have no data for this element",h)},f.has=function(h){var u=h[this.vdata];return u in this.data},f.delete=function(h){var u=h[this.vdata];u&&(delete this.data[u],delete h[this.vdata])},S}());var Ei=window.WeakMap?new WeakMap:new tr;function Ti(S,f){if(Ei.has(S)){var _=Ei.get(S);_.handlers[f].length===0&&(delete _.handlers[f],S.removeEventListener?S.removeEventListener(f,_.dispatcher,!1):S.detachEvent&&S.detachEvent("on"+f,_.dispatcher)),Object.getOwnPropertyNames(_.handlers).length<=0&&(delete _.handlers,delete _.dispatcher,delete _.disabled),Object.getOwnPropertyNames(_).length===0&&Ei.delete(S)}}function kn(S,f,_,h){_.forEach(function(u){S(f,u,h)})}function Rn(S){if(S.fixed_)return S;function f(){return!0}function _(){return!1}if(!S||!S.isPropagationStopped||!S.isImmediatePropagationStopped){var h=S||window.event;S={};for(var u in h)u!=="layerX"&&u!=="layerY"&&u!=="keyLocation"&&u!=="webkitMovementX"&&u!=="webkitMovementY"&&u!=="path"&&(u==="returnValue"&&h.preventDefault||(S[u]=h[u]));if(S.target||(S.target=S.srcElement||document),S.relatedTarget||(S.relatedTarget=S.fromElement===S.target?S.toElement:S.fromElement),S.preventDefault=function(){h.preventDefault&&h.preventDefault(),S.returnValue=!1,h.returnValue=!1,S.defaultPrevented=!0},S.defaultPrevented=!1,S.stopPropagation=function(){h.stopPropagation&&h.stopPropagation(),S.cancelBubble=!0,h.cancelBubble=!0,S.isPropagationStopped=f},S.isPropagationStopped=_,S.stopImmediatePropagation=function(){h.stopImmediatePropagation&&h.stopImmediatePropagation(),S.isImmediatePropagationStopped=f,S.stopPropagation()},S.isImmediatePropagationStopped=_,S.clientX!==null&&S.clientX!==void 0){var p=document.documentElement,k=document.body;S.pageX=S.clientX+(p&&p.scrollLeft||k&&k.scrollLeft||0)-(p&&p.clientLeft||k&&k.clientLeft||0),S.pageY=S.clientY+(p&&p.scrollTop||k&&k.scrollTop||0)-(p&&p.clientTop||k&&k.clientTop||0)}S.which=S.charCode||S.keyCode,S.button!==null&&S.button!==void 0&&(S.button=S.button&1?0:S.button&4?1:S.button&2?2:0)}return S.fixed_=!0,S}var ki,mr=function(){if(typeof ki!="boolean"){ki=!1;try{var f=Object.defineProperty({},"passive",{get:function(){ki=!0}});window.addEventListener("test",null,f),window.removeEventListener("test",null,f)}catch{}}return ki},_r=["touchstart","touchmove"];function Mi(S,f,_){if(Array.isArray(f))return kn(Mi,S,f,_);Ei.has(S)||Ei.set(S,{});var h=Ei.get(S);if(h.handlers||(h.handlers={}),h.handlers[f]||(h.handlers[f]=[]),_.guid||(_.guid=ri()),h.handlers[f].push(_),h.dispatcher||(h.disabled=!1,h.dispatcher=function(p,k){if(!h.disabled){p=Rn(p);var R=h.handlers[p.type];if(R)for(var q=R.slice(0),z=0,de=q.length;z<de&&!p.isImmediatePropagationStopped();z++)try{q[z].call(S,p,k)}catch(Ee){I.error(Ee)}}}),h.handlers[f].length===1)if(S.addEventListener){var u=!1;mr()&&_r.indexOf(f)>-1&&(u={passive:!0}),S.addEventListener(f,h.dispatcher,u)}else S.attachEvent&&S.attachEvent("on"+f,h.dispatcher)}function di(S,f,_){if(Ei.has(S)){var h=Ei.get(S);if(h.handlers){if(Array.isArray(f))return kn(di,S,f,_);var u=function(z,de){h.handlers[de]=[],Ti(z,de)};if(f===void 0){for(var p in h.handlers)Object.prototype.hasOwnProperty.call(h.handlers||{},p)&&u(S,p);return}var k=h.handlers[f];if(k){if(!_){u(S,f);return}if(_.guid)for(var R=0;R<k.length;R++)k[R].guid===_.guid&&k.splice(R--,1);Ti(S,f)}}}}function Yi(S,f,_){var h=Ei.has(S)?Ei.get(S):{},u=S.parentNode||S.ownerDocument;if(typeof f=="string"?f={type:f,target:S}:f.target||(f.target=S),f=Rn(f),h.dispatcher&&h.dispatcher.call(S,f,_),u&&!f.isPropagationStopped()&&f.bubbles===!0)Yi.call(null,u,f,_);else if(!u&&!f.defaultPrevented&&f.target&&f.target[f.type]){Ei.has(f.target)||Ei.set(f.target,{});var p=Ei.get(f.target);f.target[f.type]&&(p.disabled=!0,typeof f.target[f.type]=="function"&&f.target[f.type](),p.disabled=!1)}return!f.defaultPrevented}function na(S,f,_){if(Array.isArray(f))return kn(na,S,f,_);var h=function u(){di(S,f,u),_.apply(this,arguments)};h.guid=_.guid=_.guid||ri(),Mi(S,f,h)}function Ki(S,f,_){var h=function u(){di(S,f,u),_.apply(this,arguments)};h.guid=_.guid=_.guid||ri(),Mi(S,f,h)}var Rr=Object.freeze({__proto__:null,fixEvent:Rn,on:Mi,off:di,trigger:Yi,one:na,any:Ki}),Di=30,Wi=function(f,_,h){_.guid||(_.guid=ri());var u=_.bind(f);return u.guid=h?h+"_"+_.guid:_.guid,u},Bi=function(f,_){var h=window.performance.now(),u=function(){var k=window.performance.now();k-h>=_&&(f.apply(void 0,arguments),h=k)};return u},_a=function(f,_,h,u){u===void 0&&(u=window);var p,k=function(){u.clearTimeout(p),p=null},R=function(){var z=this,de=arguments,Ee=function(){p=null,Ee=null,f.apply(z,de)};!p&&h&&f.apply(z,de),u.clearTimeout(p),p=u.setTimeout(Ee,_)};return R.cancel=k,R},xi=function(){};xi.prototype.allowedEvents_={},xi.prototype.on=function(S,f){var _=this.addEventListener;this.addEventListener=function(){},Mi(this,S,f),this.addEventListener=_},xi.prototype.addEventListener=xi.prototype.on,xi.prototype.off=function(S,f){di(this,S,f)},xi.prototype.removeEventListener=xi.prototype.off,xi.prototype.one=function(S,f){var _=this.addEventListener;this.addEventListener=function(){},na(this,S,f),this.addEventListener=_},xi.prototype.any=function(S,f){var _=this.addEventListener;this.addEventListener=function(){},Ki(this,S,f),this.addEventListener=_},xi.prototype.trigger=function(S){var f=S.type||S;typeof S=="string"&&(S={type:f}),S=Rn(S),this.allowedEvents_[f]&&this["on"+f]&&this["on"+f](S),Yi(this,S)},xi.prototype.dispatchEvent=xi.prototype.trigger;var Kr;xi.prototype.queueTrigger=function(S){var f=this;Kr||(Kr=new Map);var _=S.type||S,h=Kr.get(this);h||(h=new Map,Kr.set(this,h));var u=h.get(_);h.delete(_),window.clearTimeout(u);var p=window.setTimeout(function(){h.delete(_),h.size===0&&(h=null,Kr.delete(f)),f.trigger(S)},0);h.set(_,p)};var kr=function(f){return typeof f.name=="function"?f.name():typeof f.name=="string"?f.name:f.name_?f.name_:f.constructor&&f.constructor.name?f.constructor.name:typeof f},Ji=function(f){return f instanceof xi||!!f.eventBusEl_&&["on","one","off","trigger"].every(function(_){return typeof f[_]=="function"})},ia=function(f,_){Ji(f)?_():(f.eventedCallbacks||(f.eventedCallbacks=[]),f.eventedCallbacks.push(_))},la=function(f){return typeof f=="string"&&/\S/.test(f)||Array.isArray(f)&&!!f.length},Ir=function(f,_,h){if(!f||!f.nodeName&&!Ji(f))throw new Error("Invalid target for "+kr(_)+"#"+h+"; must be a DOM node or evented object.")},Ur=function(f,_,h){if(!la(f))throw new Error("Invalid event type for "+kr(_)+"#"+h+"; must be a non-empty string or array.")},qr=function(f,_,h){if(typeof f!="function")throw new Error("Invalid listener for "+kr(_)+"#"+h+"; must be a function.")},Ht=function(f,_,h){var u=_.length<3||_[0]===f||_[0]===f.eventBusEl_,p,k,R;return u?(p=f.eventBusEl_,_.length>=3&&_.shift(),k=_[0],R=_[1]):(p=_[0],k=_[1],R=_[2]),Ir(p,f,h),Ur(k,f,h),qr(R,f,h),R=Wi(f,R),{isTargetingSelf:u,target:p,type:k,listener:R}},et=function(f,_,h,u){Ir(f,f,_),f.nodeName?Rr[_](f,h,u):f[_](h,u)},ln={on:function(){for(var f=this,_=arguments.length,h=new Array(_),u=0;u<_;u++)h[u]=arguments[u];var p=Ht(this,h,"on"),k=p.isTargetingSelf,R=p.target,q=p.type,z=p.listener;if(et(R,"on",q,z),!k){var de=function(){return f.off(R,q,z)};de.guid=z.guid;var Ee=function(){return f.off("dispose",de)};Ee.guid=z.guid,et(this,"on","dispose",de),et(R,"on","dispose",Ee)}},one:function(){for(var f=this,_=arguments.length,h=new Array(_),u=0;u<_;u++)h[u]=arguments[u];var p=Ht(this,h,"one"),k=p.isTargetingSelf,R=p.target,q=p.type,z=p.listener;if(k)et(R,"one",q,z);else{var de=function Ee(){f.off(R,q,Ee);for(var Se=arguments.length,ze=new Array(Se),rt=0;rt<Se;rt++)ze[rt]=arguments[rt];z.apply(null,ze)};de.guid=z.guid,et(R,"one",q,de)}},any:function(){for(var f=this,_=arguments.length,h=new Array(_),u=0;u<_;u++)h[u]=arguments[u];var p=Ht(this,h,"any"),k=p.isTargetingSelf,R=p.target,q=p.type,z=p.listener;if(k)et(R,"any",q,z);else{var de=function Ee(){f.off(R,q,Ee);for(var Se=arguments.length,ze=new Array(Se),rt=0;rt<Se;rt++)ze[rt]=arguments[rt];z.apply(null,ze)};de.guid=z.guid,et(R,"any",q,de)}},off:function(f,_,h){if(!f||la(f))di(this.eventBusEl_,f,_);else{var u=f,p=_;Ir(u,this,"off"),Ur(p,this,"off"),qr(h,this,"off"),h=Wi(this,h),this.off("dispose",h),u.nodeName?(di(u,p,h),di(u,"dispose",h)):Ji(u)&&(u.off(p,h),u.off("dispose",h))}},trigger:function(f,_){Ir(this.eventBusEl_,this,"trigger");var h=f&&typeof f!="string"?f.type:f;if(!la(h)){var u="Invalid event type for "+kr(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(f)(this.log||I).error(u);else throw new Error(u)}return Yi(this.eventBusEl_,f,_)}};function Vi(S,f){f===void 0&&(f={});var _=f,h=_.eventBusKey;if(h){if(!S[h].nodeName)throw new Error('The eventBusKey "'+h+'" does not refer to an element.');S.eventBusEl_=S[h]}else S.eventBusEl_=Ct("span",{className:"vjs-event-bus"});return V(S,ln),S.eventedCallbacks&&S.eventedCallbacks.forEach(function(u){u()}),S.on("dispose",function(){S.off(),[S,S.el_,S.eventBusEl_].forEach(function(u){u&&Ei.has(u)&&Ei.delete(u)}),window.setTimeout(function(){S.eventBusEl_=null},0)}),S}var Ar={state:{},setState:function(f){var _=this;typeof f=="function"&&(f=f());var h;return j(f,function(u,p){_.state[p]!==u&&(h=h||{},h[p]={from:_.state[p],to:u}),_.state[p]=u}),h&&Ji(this)&&this.trigger({changes:h,type:"statechanged"}),h}};function vr(S,f){return V(S,Ar),S.state=V({},S.state,f),typeof S.handleStateChanged=="function"&&Ji(S)&&S.on("statechanged",S.handleStateChanged),S}var ir=function(f){return typeof f!="string"?f:f.replace(/./,function(_){return _.toLowerCase()})},Si=function(f){return typeof f!="string"?f:f.replace(/./,function(_){return _.toUpperCase()})},pr=function(f,_){return Si(f)===Si(_)};function yi(){for(var S={},f=arguments.length,_=new Array(f),h=0;h<f;h++)_[h]=arguments[h];return _.forEach(function(u){u&&j(u,function(p,k){if(!X(p)){S[k]=p;return}X(S[k])||(S[k]={}),S[k]=yi(S[k],p)})}),S}var Dr=function(){function S(){this.map_={}}var f=S.prototype;return f.has=function(h){return h in this.map_},f.delete=function(h){var u=this.has(h);return delete this.map_[h],u},f.set=function(h,u){return this.map_[h]=u,this},f.forEach=function(h,u){for(var p in this.map_)h.call(u,this.map_[p],p,this)},S}(),Wr=window.Map?window.Map:Dr,Sr=function(){function S(){this.set_={}}var f=S.prototype;return f.has=function(h){return h in this.set_},f.delete=function(h){var u=this.has(h);return delete this.set_[h],u},f.add=function(h){return this.set_[h]=1,this},f.forEach=function(h,u){for(var p in this.set_)h.call(u,p,p,this)},S}(),hr=window.Set?window.Set:Sr,Vn=M(function(S,f){function _(q){if(q&&typeof q=="object"){var z=q.which||q.keyCode||q.charCode;z&&(q=z)}if(typeof q=="number")return k[q];var de=String(q),Ee=h[de.toLowerCase()];if(Ee)return Ee;var Ee=u[de.toLowerCase()];if(Ee)return Ee;if(de.length===1)return de.charCodeAt(0)}_.isEventKey=function(z,de){if(z&&typeof z=="object"){var Ee=z.which||z.keyCode||z.charCode;if(Ee==null)return!1;if(typeof de=="string"){var Se=h[de.toLowerCase()];if(Se)return Se===Ee;var Se=u[de.toLowerCase()];if(Se)return Se===Ee}else if(typeof de=="number")return de===Ee;return!1}},f=S.exports=_;var h=f.code=f.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},u=f.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
 * Programatically add the following
 */for(p=97;p<123;p++)h[String.fromCharCode(p)]=p-32;for(var p=48;p<58;p++)h[p-48]=p;for(p=1;p<13;p++)h["f"+p]=p+111;for(p=0;p<10;p++)h["numpad "+p]=p+96;var k=f.names=f.title={};for(p in h)k[h[p]]=p;for(var R in u)h[R]=u[R]});Vn.code,Vn.codes,Vn.aliases,Vn.names,Vn.title;var dn=function(){function S(_,h,u){var p=this;if(!_&&this.play?this.player_=_=this:this.player_=_,this.isDisposed_=!1,this.parentComponent_=null,this.options_=yi({},this.options_),h=this.options_=yi(this.options_,h),this.id_=h.id||h.el&&h.el.id,!this.id_){var k=_&&_.id&&_.id()||"no_player";this.id_=k+"_component_"+ri()}this.name_=h.name||null,h.el?this.el_=h.el:h.createEl!==!1&&(this.el_=this.createEl()),h.className&&this.el_&&h.className.split(" ").forEach(function(R){return p.addClass(R)}),h.evented!==!1&&(Vi(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),vr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new hr,this.setIntervalIds_=new hr,this.rafIds_=new hr,this.namedRafs_=new Wr,this.clearingTimersOnDispose_=!1,h.initChildren!==!1&&this.initChildren(),this.ready(u),h.reportTouchActivity!==!1&&this.enableTouchActivity()}var f=S.prototype;return f.dispose=function(h){if(h===void 0&&(h={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var u=this.children_.length-1;u>=0;u--)this.children_[u].dispose&&this.children_[u].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(h.restoreEl?this.el_.parentNode.replaceChild(h.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},f.isDisposed=function(){return!!this.isDisposed_},f.player=function(){return this.player_},f.options=function(h){return h?(this.options_=yi(this.options_,h),this.options_):this.options_},f.el=function(){return this.el_},f.createEl=function(h,u,p){return Ct(h,u,p)},f.localize=function(h,u,p){p===void 0&&(p=h);var k=this.player_.language&&this.player_.language(),R=this.player_.languages&&this.player_.languages(),q=R&&R[k],z=k&&k.split("-")[0],de=R&&R[z],Ee=p;return q&&q[h]?Ee=q[h]:de&&de[h]&&(Ee=de[h]),u&&(Ee=Ee.replace(/\{(\d+)\}/g,function(Se,ze){var rt=u[ze-1],_t=rt;return typeof rt>"u"&&(_t=Se),_t})),Ee},f.handleLanguagechange=function(){},f.contentEl=function(){return this.contentEl_||this.el_},f.id=function(){return this.id_},f.name=function(){return this.name_},f.children=function(){return this.children_},f.getChildById=function(h){return this.childIndex_[h]},f.getChild=function(h){if(h)return this.childNameIndex_[h]},f.getDescendant=function(){for(var h=arguments.length,u=new Array(h),p=0;p<h;p++)u[p]=arguments[p];u=u.reduce(function(q,z){return q.concat(z)},[]);for(var k=this,R=0;R<u.length;R++)if(k=k.getChild(u[R]),!k||!k.getChild)return;return k},f.addChild=function(h,u,p){u===void 0&&(u={}),p===void 0&&(p=this.children_.length);var k,R;if(typeof h=="string"){R=Si(h);var q=u.componentClass||R;u.name=R;var z=S.getComponent(q);if(!z)throw new Error("Component "+q+" does not exist");if(typeof z!="function")return null;k=new z(this.player_||this,u)}else k=h;if(k.parentComponent_&&k.parentComponent_.removeChild(k),this.children_.splice(p,0,k),k.parentComponent_=this,typeof k.id=="function"&&(this.childIndex_[k.id()]=k),R=R||k.name&&Si(k.name()),R&&(this.childNameIndex_[R]=k,this.childNameIndex_[ir(R)]=k),typeof k.el=="function"&&k.el()){var de=null;this.children_[p+1]&&(this.children_[p+1].el_?de=this.children_[p+1].el_:Ge(this.children_[p+1])&&(de=this.children_[p+1])),this.contentEl().insertBefore(k.el(),de)}return k},f.removeChild=function(h){if(typeof h=="string"&&(h=this.getChild(h)),!(!h||!this.children_)){for(var u=!1,p=this.children_.length-1;p>=0;p--)if(this.children_[p]===h){u=!0,this.children_.splice(p,1);break}if(u){h.parentComponent_=null,this.childIndex_[h.id()]=null,this.childNameIndex_[Si(h.name())]=null,this.childNameIndex_[ir(h.name())]=null;var k=h.el();k&&k.parentNode===this.contentEl()&&this.contentEl().removeChild(h.el())}}},f.initChildren=function(){var h=this,u=this.options_.children;if(u){var p=this.options_,k=function(de){var Ee=de.name,Se=de.opts;if(p[Ee]!==void 0&&(Se=p[Ee]),Se!==!1){Se===!0&&(Se={}),Se.playerOptions=h.options_.playerOptions;var ze=h.addChild(Ee,Se);ze&&(h[Ee]=ze)}},R,q=S.getComponent("Tech");Array.isArray(u)?R=u:R=Object.keys(u),R.concat(Object.keys(this.options_).filter(function(z){return!R.some(function(de){return typeof de=="string"?z===de:z===de.name})})).map(function(z){var de,Ee;return typeof z=="string"?(de=z,Ee=u[de]||h.options_[de]||{}):(de=z.name,Ee=z),{name:de,opts:Ee}}).filter(function(z){var de=S.getComponent(z.opts.componentClass||Si(z.name));return de&&!q.isTech(de)}).forEach(k)}},f.buildCSSClass=function(){return""},f.ready=function(h,u){if(u===void 0&&(u=!1),!!h){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(h);return}u?h.call(this):this.setTimeout(h,1)}},f.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var h=this.readyQueue_;this.readyQueue_=[],h&&h.length>0&&h.forEach(function(u){u.call(this)},this),this.trigger("ready")},1)},f.$=function(h,u){return ft(h,u||this.contentEl())},f.$$=function(h,u){return ni(h,u||this.contentEl())},f.hasClass=function(h){return cn(this.el_,h)},f.addClass=function(h){nn(this.el_,h)},f.removeClass=function(h){Qe(this.el_,h)},f.toggleClass=function(h,u){Ft(this.el_,h,u)},f.show=function(){this.removeClass("vjs-hidden")},f.hide=function(){this.addClass("vjs-hidden")},f.lockShowing=function(){this.addClass("vjs-lock-showing")},f.unlockShowing=function(){this.removeClass("vjs-lock-showing")},f.getAttribute=function(h){return Dt(this.el_,h)},f.setAttribute=function(h,u){Xt(this.el_,h,u)},f.removeAttribute=function(h){Mt(this.el_,h)},f.width=function(h,u){return this.dimension("width",h,u)},f.height=function(h,u){return this.dimension("height",h,u)},f.dimensions=function(h,u){this.width(h,!0),this.height(u)},f.dimension=function(h,u,p){if(u!==void 0){(u===null||u!==u)&&(u=0),(""+u).indexOf("%")!==-1||(""+u).indexOf("px")!==-1?this.el_.style[h]=u:u==="auto"?this.el_.style[h]="":this.el_.style[h]=u+"px",p||this.trigger("componentresize");return}if(!this.el_)return 0;var k=this.el_.style[h],R=k.indexOf("px");return parseInt(R!==-1?k.slice(0,R):this.el_["offset"+Si(h)],10)},f.currentDimension=function(h){var u=0;if(h!=="width"&&h!=="height")throw new Error("currentDimension only accepts width or height value");if(u=te(this.el_,h),u=parseFloat(u),u===0||isNaN(u)){var p="offset"+Si(h);u=this.el_[p]}return u},f.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},f.currentWidth=function(){return this.currentDimension("width")},f.currentHeight=function(){return this.currentDimension("height")},f.focus=function(){this.el_.focus()},f.blur=function(){this.el_.blur()},f.handleKeyDown=function(h){this.player_&&(Vn.isEventKey(h,"Tab")||h.stopPropagation(),this.player_.handleKeyDown(h))},f.handleKeyPress=function(h){this.handleKeyDown(h)},f.emitTapEvents=function(){var h=0,u=null,p=10,k=200,R;this.on("touchstart",function(z){z.touches.length===1&&(u={pageX:z.touches[0].pageX,pageY:z.touches[0].pageY},h=window.performance.now(),R=!0)}),this.on("touchmove",function(z){if(z.touches.length>1)R=!1;else if(u){var de=z.touches[0].pageX-u.pageX,Ee=z.touches[0].pageY-u.pageY,Se=Math.sqrt(de*de+Ee*Ee);Se>p&&(R=!1)}});var q=function(){R=!1};this.on("touchleave",q),this.on("touchcancel",q),this.on("touchend",function(z){if(u=null,R===!0){var de=window.performance.now()-h;de<k&&(z.preventDefault(),this.trigger("tap"))}})},f.enableTouchActivity=function(){if(!(!this.player()||!this.player().reportUserActivity)){var h=Wi(this.player(),this.player().reportUserActivity),u;this.on("touchstart",function(){h(),this.clearInterval(u),u=this.setInterval(h,250)});var p=function(R){h(),this.clearInterval(u)};this.on("touchmove",h),this.on("touchend",p),this.on("touchcancel",p)}},f.setTimeout=function(h,u){var p=this,k;return h=Wi(this,h),this.clearTimersOnDispose_(),k=window.setTimeout(function(){p.setTimeoutIds_.has(k)&&p.setTimeoutIds_.delete(k),h()},u),this.setTimeoutIds_.add(k),k},f.clearTimeout=function(h){return this.setTimeoutIds_.has(h)&&(this.setTimeoutIds_.delete(h),window.clearTimeout(h)),h},f.setInterval=function(h,u){h=Wi(this,h),this.clearTimersOnDispose_();var p=window.setInterval(h,u);return this.setIntervalIds_.add(p),p},f.clearInterval=function(h){return this.setIntervalIds_.has(h)&&(this.setIntervalIds_.delete(h),window.clearInterval(h)),h},f.requestAnimationFrame=function(h){var u=this;if(!this.supportsRaf_)return this.setTimeout(h,1e3/60);this.clearTimersOnDispose_();var p;return h=Wi(this,h),p=window.requestAnimationFrame(function(){u.rafIds_.has(p)&&u.rafIds_.delete(p),h()}),this.rafIds_.add(p),p},f.requestNamedAnimationFrame=function(h,u){var p=this;if(!this.namedRafs_.has(h)){this.clearTimersOnDispose_(),u=Wi(this,u);var k=this.requestAnimationFrame(function(){u(),p.namedRafs_.has(h)&&p.namedRafs_.delete(h)});return this.namedRafs_.set(h,k),h}},f.cancelNamedAnimationFrame=function(h){this.namedRafs_.has(h)&&(this.cancelAnimationFrame(this.namedRafs_.get(h)),this.namedRafs_.delete(h))},f.cancelAnimationFrame=function(h){return this.supportsRaf_?(this.rafIds_.has(h)&&(this.rafIds_.delete(h),window.cancelAnimationFrame(h)),h):this.clearTimeout(h)},f.clearTimersOnDispose_=function(){var h=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(u){var p=u[0],k=u[1];h[p].forEach(function(R,q){return h[k](q)})}),h.clearingTimersOnDispose_=!1}))},S.registerComponent=function(h,u){if(typeof h!="string"||!h)throw new Error('Illegal component name, "'+h+'"; must be a non-empty string.');var p=S.getComponent("Tech"),k=p&&p.isTech(u),R=S===u||S.prototype.isPrototypeOf(u.prototype);if(k||!R){var q;throw k?q="techs must be registered using Tech.registerTech()":q="must be a Component subclass",new Error('Illegal component, "'+h+'"; '+q+".")}h=Si(h),S.components_||(S.components_={});var z=S.getComponent("Player");if(h==="Player"&&z&&z.players){var de=z.players,Ee=Object.keys(de);if(de&&Ee.length>0&&Ee.map(function(Se){return de[Se]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return S.components_[h]=u,S.components_[ir(h)]=u,u},S.getComponent=function(h){if(!(!h||!S.components_))return S.components_[h]},S}();dn.prototype.supportsRaf_=typeof window.requestAnimationFrame=="function"&&typeof window.cancelAnimationFrame=="function",dn.registerComponent("Component",dn);function wr(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}var Bn=wr;function ra(S,f){S.prototype=Object.create(f.prototype),S.prototype.constructor=S,S.__proto__=f}var _n=ra;function Vr(S,f,_){if(typeof f!="number"||f<0||f>_)throw new Error("Failed to execute '"+S+"' on 'TimeRanges': The index provided ("+f+") is non-numeric or out of bounds (0-"+_+").")}function rr(S,f,_,h){return Vr(S,h,_.length-1),_[h][f]}function Or(S){var f;return S===void 0||S.length===0?f={length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:f={length:S.length,start:rr.bind(null,"start",0,S),end:rr.bind(null,"end",1,S)},window.Symbol&&window.Symbol.iterator&&(f[window.Symbol.iterator]=function(){return(S||[]).values()}),f}function Ui(S,f){return Array.isArray(S)?Or(S):S===void 0||f===void 0?Or():Or([[S,f]])}function Fr(S,f){var _=0,h,u;if(!f)return 0;(!S||!S.length)&&(S=Ui(0,0));for(var p=0;p<S.length;p++)h=S.start(p),u=S.end(p),u>f&&(u=f),_+=u-h;return _/f}function wi(S){if(S instanceof wi)return S;typeof S=="number"?this.code=S:typeof S=="string"?this.message=S:Q(S)&&(typeof S.code=="number"&&(this.code=S.code),V(this,S)),this.message||(this.message=wi.defaultMessages[this.code]||"")}wi.prototype.code=0,wi.prototype.message="",wi.prototype.status=null,wi.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],wi.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Ni=0;Ni<wi.errorTypes.length;Ni++)wi[wi.errorTypes[Ni]]=Ni,wi.prototype[wi.errorTypes[Ni]]=Ni;var ar=sr;function sr(S,f){var _,h=null;try{_=JSON.parse(S,f)}catch(u){h=u}return[h,_]}function Gi(S){return S!=null&&typeof S.then=="function"}function Cr(S){Gi(S)&&S.then(null,function(f){})}var or=function(f){var _=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(h,u,p){return f[u]&&(h[u]=f[u]),h},{cues:f.cues&&Array.prototype.map.call(f.cues,function(h){return{startTime:h.startTime,endTime:h.endTime,text:h.text,id:h.id}})});return _},lr=function(f){var _=f.$$("track"),h=Array.prototype.map.call(_,function(p){return p.track}),u=Array.prototype.map.call(_,function(p){var k=or(p.track);return p.src&&(k.src=p.src),k});return u.concat(Array.prototype.filter.call(f.textTracks(),function(p){return h.indexOf(p)===-1}).map(or))},Ka=function(f,_){return f.forEach(function(h){var u=_.addRemoteTextTrack(h).track;!h.src&&h.cues&&h.cues.forEach(function(p){return u.addCue(p)})}),_.textTracks()},Lr={textTracksToJson:lr,jsonToTextTracks:Ka,trackToJson_:or},nr="vjs-modal-dialog",wa=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.handleKeyDown_=function(k){return p.handleKeyDown(k)},p.close_=function(k){return p.close(k)},p.opened_=p.hasBeenOpened_=p.hasBeenFilled_=!1,p.closeable(!p.options_.uncloseable),p.content(p.options_.content),p.contentEl_=Ct("div",{className:nr+"-content"},{role:"document"}),p.descEl_=Ct("p",{className:nr+"-description vjs-control-text",id:p.el().getAttribute("aria-describedby")}),bt(p.descEl_,p.description()),p.el_.appendChild(p.descEl_),p.el_.appendChild(p.contentEl_),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},_.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,S.prototype.dispose.call(this)},_.buildCSSClass=function(){return nr+" vjs-hidden "+S.prototype.buildCSSClass.call(this)},_.label=function(){return this.localize(this.options_.label||"Modal Window")},_.description=function(){var u=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(u+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),u},_.open=function(){if(!this.opened_){var u=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!u.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&u.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=u.controls(),u.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},_.opened=function(u){return typeof u=="boolean"&&this[u?"open":"close"](),this.opened_},_.close=function(){if(this.opened_){var u=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&u.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&u.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},_.closeable=function(u){if(typeof u=="boolean"){var p=this.closeable_=!!u,k=this.getChild("closeButton");if(p&&!k){var R=this.contentEl_;this.contentEl_=this.el_,k=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=R,this.on(k,"close",this.close_)}!p&&k&&(this.off(k,"close",this.close_),this.removeChild(k),k.dispose())}return this.closeable_},_.fill=function(){this.fillWith(this.content())},_.fillWith=function(u){var p=this.contentEl(),k=p.parentNode,R=p.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,k.removeChild(p),this.empty(),Un(p,u),this.trigger("modalfill"),R?k.insertBefore(p,R):k.appendChild(p);var q=this.getChild("closeButton");q&&k.appendChild(q.el_)},_.empty=function(){this.trigger("beforemodalempty"),Ln(this.contentEl()),this.trigger("modalempty")},_.content=function(u){return typeof u<"u"&&(this.content_=u),this.content_},_.conditionalFocus_=function(){var u=document.activeElement,p=this.player_.el_;this.previouslyActiveEl_=null,(p.contains(u)||p===u)&&(this.previouslyActiveEl_=u,this.focus())},_.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},_.handleKeyDown=function(u){if(u.stopPropagation(),Vn.isEventKey(u,"Escape")&&this.closeable()){u.preventDefault(),this.close();return}if(Vn.isEventKey(u,"Tab")){for(var p=this.focusableEls_(),k=this.el_.querySelector(":focus"),R,q=0;q<p.length;q++)if(k===p[q]){R=q;break}document.activeElement===this.el_&&(R=0),u.shiftKey&&R===0?(p[p.length-1].focus(),u.preventDefault()):!u.shiftKey&&R===p.length-1&&(p[0].focus(),u.preventDefault())}},_.focusableEls_=function(){var u=this.el_.querySelectorAll("*");return Array.prototype.filter.call(u,function(p){return(p instanceof window.HTMLAnchorElement||p instanceof window.HTMLAreaElement)&&p.hasAttribute("href")||(p instanceof window.HTMLInputElement||p instanceof window.HTMLSelectElement||p instanceof window.HTMLTextAreaElement||p instanceof window.HTMLButtonElement)&&!p.hasAttribute("disabled")||p instanceof window.HTMLIFrameElement||p instanceof window.HTMLObjectElement||p instanceof window.HTMLEmbedElement||p.hasAttribute("tabindex")&&p.getAttribute("tabindex")!==-1||p.hasAttribute("contenteditable")})},f}(dn);wa.prototype.options_={pauseOnOpen:!0,temporary:!0},dn.registerComponent("ModalDialog",wa);var zr=function(S){_n(f,S);function f(h){var u;h===void 0&&(h=[]),u=S.call(this)||this,u.tracks_=[],Object.defineProperty(Bn(u),"length",{get:function(){return this.tracks_.length}});for(var p=0;p<h.length;p++)u.addTrack(h[p]);return u}var _=f.prototype;return _.addTrack=function(u){var p=this,k=this.tracks_.length;""+k in this||Object.defineProperty(this,k,{get:function(){return this.tracks_[k]}}),this.tracks_.indexOf(u)===-1&&(this.tracks_.push(u),this.trigger({track:u,type:"addtrack",target:this})),u.labelchange_=function(){p.trigger({track:u,type:"labelchange",target:p})},Ji(u)&&u.addEventListener("labelchange",u.labelchange_)},_.removeTrack=function(u){for(var p,k=0,R=this.length;k<R;k++)if(this[k]===u){p=this[k],p.off&&p.off(),this.tracks_.splice(k,1);break}p&&this.trigger({track:p,type:"removetrack",target:this})},_.getTrackById=function(u){for(var p=null,k=0,R=this.length;k<R;k++){var q=this[k];if(q.id===u){p=q;break}}return p},f}(xi);zr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var Ze in zr.prototype.allowedEvents_)zr.prototype["on"+Ze]=null;var tn=function(f,_){for(var h=0;h<f.length;h++)!Object.keys(f[h]).length||_.id===f[h].id||(f[h].enabled=!1)},Xr=function(S){_n(f,S);function f(h){var u;h===void 0&&(h=[]);for(var p=h.length-1;p>=0;p--)if(h[p].enabled){tn(h,h[p]);break}return u=S.call(this,h)||this,u.changing_=!1,u}var _=f.prototype;return _.addTrack=function(u){var p=this;u.enabled&&tn(this,u),S.prototype.addTrack.call(this,u),u.addEventListener&&(u.enabledChange_=function(){p.changing_||(p.changing_=!0,tn(p,u),p.changing_=!1,p.trigger("change"))},u.addEventListener("enabledchange",u.enabledChange_))},_.removeTrack=function(u){S.prototype.removeTrack.call(this,u),u.removeEventListener&&u.enabledChange_&&(u.removeEventListener("enabledchange",u.enabledChange_),u.enabledChange_=null)},f}(zr),ur=function(f,_){for(var h=0;h<f.length;h++)!Object.keys(f[h]).length||_.id===f[h].id||(f[h].selected=!1)},Hr=function(S){_n(f,S);function f(h){var u;h===void 0&&(h=[]);for(var p=h.length-1;p>=0;p--)if(h[p].selected){ur(h,h[p]);break}return u=S.call(this,h)||this,u.changing_=!1,Object.defineProperty(Bn(u),"selectedIndex",{get:function(){for(var R=0;R<this.length;R++)if(this[R].selected)return R;return-1},set:function(){}}),u}var _=f.prototype;return _.addTrack=function(u){var p=this;u.selected&&ur(this,u),S.prototype.addTrack.call(this,u),u.addEventListener&&(u.selectedChange_=function(){p.changing_||(p.changing_=!0,ur(p,u),p.changing_=!1,p.trigger("change"))},u.addEventListener("selectedchange",u.selectedChange_))},_.removeTrack=function(u){S.prototype.removeTrack.call(this,u),u.removeEventListener&&u.selectedChange_&&(u.removeEventListener("selectedchange",u.selectedChange_),u.selectedChange_=null)},f}(zr),Xi=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.addTrack=function(u){var p=this;S.prototype.addTrack.call(this,u),this.queueChange_||(this.queueChange_=function(){return p.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return p.trigger("selectedlanguagechange")}),u.addEventListener("modechange",this.queueChange_);var k=["metadata","chapters"];k.indexOf(u.kind)===-1&&u.addEventListener("modechange",this.triggerSelectedlanguagechange_)},_.removeTrack=function(u){S.prototype.removeTrack.call(this,u),u.removeEventListener&&(this.queueChange_&&u.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&u.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},f}(zr),dr=function(){function S(_){_===void 0&&(_=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var h=0,u=_.length;h<u;h++)this.addTrackElement_(_[h])}var f=S.prototype;return f.addTrackElement_=function(h){var u=this.trackElements_.length;""+u in this||Object.defineProperty(this,u,{get:function(){return this.trackElements_[u]}}),this.trackElements_.indexOf(h)===-1&&this.trackElements_.push(h)},f.getTrackElementByTrack_=function(h){for(var u,p=0,k=this.trackElements_.length;p<k;p++)if(h===this.trackElements_[p].track){u=this.trackElements_[p];break}return u},f.removeTrackElement_=function(h){for(var u=0,p=this.trackElements_.length;u<p;u++)if(h===this.trackElements_[u]){this.trackElements_[u].track&&typeof this.trackElements_[u].track.off=="function"&&this.trackElements_[u].track.off(),typeof this.trackElements_[u].off=="function"&&this.trackElements_[u].off(),this.trackElements_.splice(u,1);break}},S}(),pa=function(){function S(_){S.prototype.setCues_.call(this,_),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var f=S.prototype;return f.setCues_=function(h){var u=this.length||0,p=0,k=h.length;this.cues_=h,this.length_=h.length;var R=function(z){""+z in this||Object.defineProperty(this,""+z,{get:function(){return this.cues_[z]}})};if(u<k)for(p=u;p<k;p++)R.call(this,p)},f.getCueById=function(h){for(var u=null,p=0,k=this.length;p<k;p++){var R=this[p];if(R.id===h){u=R;break}}return u},S}(),qt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},mn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ai={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ra={disabled:"disabled",hidden:"hidden",showing:"showing"},aa=function(S){_n(f,S);function f(_){var h;_===void 0&&(_={}),h=S.call(this)||this;var u={id:_.id||"vjs_track_"+ri(),kind:_.kind||"",language:_.language||""},p=_.label||"",k=function(z){Object.defineProperty(Bn(h),z,{get:function(){return u[z]},set:function(){}})};for(var R in u)k(R);return Object.defineProperty(Bn(h),"label",{get:function(){return p},set:function(z){z!==p&&(p=z,this.trigger("labelchange"))}}),h}return f}(xi),ga=function(f){var _=["protocol","hostname","port","pathname","search","hash","host"],h=document.createElement("a");h.href=f;for(var u={},p=0;p<_.length;p++)u[_[p]]=h[_[p]];return u.protocol==="http:"&&(u.host=u.host.replace(/:80$/,"")),u.protocol==="https:"&&(u.host=u.host.replace(/:443$/,"")),u.protocol||(u.protocol=window.location.protocol),u.host||(u.host=window.location.host),u},Ta=function(f){if(!f.match(/^https?:\/\//)){var _=document.createElement("a");_.href=f,f=_.href}return f},va=function(f){if(typeof f=="string"){var _=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,h=_.exec(f);if(h)return h.pop().toLowerCase()}return""},$r=function(f,_){_===void 0&&(_=window.location);var h=ga(f),u=h.protocol===":"?_.protocol:h.protocol,p=u+h.host!==_.protocol+_.host;return p},ua=Object.freeze({__proto__:null,parseUrl:ga,getAbsoluteURL:Ta,getFileExtension:va,isCrossOrigin:$r}),an;typeof window<"u"?an=window:typeof O<"u"?an=O:typeof self<"u"?an=self:an={};var gi=an,jr=Xa,Ia=Object.prototype.toString;function Xa(S){if(!S)return!1;var f=Ia.call(S);return f==="[object Function]"||typeof S=="function"&&f!=="[object RegExp]"||typeof window<"u"&&(S===window.setTimeout||S===window.alert||S===window.confirm||S===window.prompt)}var Ha=function(f,_){return _===void 0&&(_=!1),function(h,u,p){if(h){f(h);return}if(u.statusCode>=400&&u.statusCode<=599){var k=p;if(_)if(gi.TextDecoder){var R=$a(u.headers&&u.headers["content-type"]);try{k=new TextDecoder(R).decode(p)}catch{}}else k=String.fromCharCode.apply(null,new Uint8Array(p));f({cause:k});return}f(null,p)}};function $a(S){return S===void 0&&(S=""),S.toLowerCase().split(";").reduce(function(f,_){var h=_.split("="),u=h[0],p=h[1];return u.trim()==="charset"?p.trim():f},"utf-8")}var Ii=Ha;pe.httpHandler=Ii;/**
 * @license
 * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
 * Copyright (c) 2014 David Björklund
 * Available under the MIT license
 * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
 */var br=function(f){var _={};return f&&f.trim().split(`
`).forEach(function(h){var u=h.indexOf(":"),p=h.slice(0,u).trim().toLowerCase(),k=h.slice(u+1).trim();typeof _[p]>"u"?_[p]=k:Array.isArray(_[p])?_[p].push(k):_[p]=[_[p],k]}),_},Aa=pe,Vt=pe;pe.XMLHttpRequest=gi.XMLHttpRequest||gt,pe.XDomainRequest="withCredentials"in new pe.XMLHttpRequest?pe.XMLHttpRequest:gi.XDomainRequest,_i(["get","put","post","patch","head","delete"],function(S){pe[S==="delete"?"del":S]=function(f,_,h){return _=Ue(f,_,h),_.method=S.toUpperCase(),Ae(_)}});function _i(S,f){for(var _=0;_<S.length;_++)f(S[_])}function xe(S){for(var f in S)if(S.hasOwnProperty(f))return!1;return!0}function Ue(S,f,_){var h=S;return jr(f)?(_=f,typeof S=="string"&&(h={uri:S})):h=F({},f,{uri:S}),h.callback=_,h}function pe(S,f,_){return f=Ue(S,f,_),Ae(f)}function Ae(S){if(typeof S.callback>"u")throw new Error("callback argument missing");var f=!1,_=function(En,fn,gn){f||(f=!0,S.callback(En,fn,gn))};function h(){R.readyState===4&&setTimeout(k,0)}function u(){var en=void 0;if(R.response?en=R.response:en=R.responseText||at(R),_t)try{en=JSON.parse(en)}catch{}return en}function p(en){return clearTimeout(lt),en instanceof Error||(en=new Error(""+(en||"Unknown XMLHttpRequest Error"))),en.statusCode=0,_(en,Bt)}function k(){if(!z){var en;clearTimeout(lt),S.useXDR&&R.status===void 0?en=200:en=R.status===1223?204:R.status;var En=Bt,fn=null;return en!==0?(En={body:u(),statusCode:en,method:Ee,headers:{},url:de,rawRequest:R},R.getAllResponseHeaders&&(En.headers=br(R.getAllResponseHeaders()))):fn=new Error("Internal XMLHttpRequest Error"),_(fn,En,En.body)}}var R=S.xhr||null;R||(S.cors||S.useXDR?R=new pe.XDomainRequest:R=new pe.XMLHttpRequest);var q,z,de=R.url=S.uri||S.url,Ee=R.method=S.method||"GET",Se=S.body||S.data,ze=R.headers=S.headers||{},rt=!!S.sync,_t=!1,lt,Bt={body:void 0,headers:{},statusCode:0,method:Ee,url:de,rawRequest:R};if("json"in S&&S.json!==!1&&(_t=!0,ze.accept||ze.Accept||(ze.Accept="application/json"),Ee!=="GET"&&Ee!=="HEAD"&&(ze["content-type"]||ze["Content-Type"]||(ze["Content-Type"]="application/json"),Se=JSON.stringify(S.json===!0?Se:S.json))),R.onreadystatechange=h,R.onload=k,R.onerror=p,R.onprogress=function(){},R.onabort=function(){z=!0},R.ontimeout=p,R.open(Ee,de,!rt,S.username,S.password),rt||(R.withCredentials=!!S.withCredentials),!rt&&S.timeout>0&&(lt=setTimeout(function(){if(!z){z=!0,R.abort("timeout");var en=new Error("XMLHttpRequest timeout");en.code="ETIMEDOUT",p(en)}},S.timeout)),R.setRequestHeader)for(q in ze)ze.hasOwnProperty(q)&&R.setRequestHeader(q,ze[q]);else if(S.headers&&!xe(S.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in S&&(R.responseType=S.responseType),"beforeSend"in S&&typeof S.beforeSend=="function"&&S.beforeSend(R),R.send(Se||null),R}function at(S){try{if(S.responseType==="document")return S.responseXML;var f=S.responseXML&&S.responseXML.documentElement.nodeName==="parsererror";if(S.responseType===""&&!f)return S.responseXML}catch{}return null}function gt(){}Aa.default=Vt;var nt=function(f,_){var h=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()),u=[];h.oncue=function(p){_.addCue(p)},h.onparsingerror=function(p){u.push(p)},h.onflush=function(){_.trigger({type:"loadeddata",target:_})},h.parse(f),u.length>0&&(window.console&&window.console.groupCollapsed&&window.console.groupCollapsed("Text Track parsing errors for "+_.src),u.forEach(function(p){return I.error(p)}),window.console&&window.console.groupEnd&&window.console.groupEnd()),h.flush()},jt=function(f,_){var h={uri:f},u=$r(f);u&&(h.cors=u);var p=_.tech_.crossOrigin()==="use-credentials";p&&(h.withCredentials=p),Aa(h,Wi(this,function(k,R,q){if(k)return I.error(k,R);_.loaded_=!0,typeof window.WebVTT!="function"?_.tech_&&_.tech_.any(["vttjsloaded","vttjserror"],function(z){if(z.type==="vttjserror"){I.error("vttjs failed to load, stopping trying to process "+_.src);return}return nt(q,_)}):nt(q,_)}))},Yt=function(S){_n(f,S);function f(h){var u;if(h===void 0&&(h={}),!h.tech)throw new Error("A tech was not provided.");var p=yi(h,{kind:ai[h.kind]||"subtitles",language:h.language||h.srclang||""}),k=Ra[p.mode]||"disabled",R=p.default;(p.kind==="metadata"||p.kind==="chapters")&&(k="hidden"),u=S.call(this,p)||this,u.tech_=p.tech,u.cues_=[],u.activeCues_=[],u.preload_=u.tech_.preloadTextTracks!==!1;var q=new pa(u.cues_),z=new pa(u.activeCues_),de=!1;u.timeupdateHandler=Wi(Bn(u),function(Se){if(Se===void 0&&(Se={}),!this.tech_.isDisposed()){if(!this.tech_.isReady_){Se.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,de&&(this.trigger("cuechange"),de=!1),Se.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});var Ee=function(){u.stopTracking()};return u.tech_.one("dispose",Ee),k!=="disabled"&&u.startTracking(),Object.defineProperties(Bn(u),{default:{get:function(){return R},set:function(){}},mode:{get:function(){return k},set:function(ze){Ra[ze]&&k!==ze&&(k=ze,!this.preload_&&k!=="disabled"&&this.cues.length===0&&jt(this.src,this),this.stopTracking(),k!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?q:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(this.cues.length===0)return z;for(var ze=this.tech_.currentTime(),rt=[],_t=0,lt=this.cues.length;_t<lt;_t++){var Bt=this.cues[_t];(Bt.startTime<=ze&&Bt.endTime>=ze||Bt.startTime===Bt.endTime&&Bt.startTime<=ze&&Bt.startTime+.5>=ze)&&rt.push(Bt)}if(de=!1,rt.length!==this.activeCues_.length)de=!0;else for(var en=0;en<rt.length;en++)this.activeCues_.indexOf(rt[en])===-1&&(de=!0);return this.activeCues_=rt,z.setCues_(this.activeCues_),z},set:function(){}}}),p.src?(u.src=p.src,u.preload_||(u.loaded_=!0),(u.preload_||p.kind!=="subtitles"&&p.kind!=="captions")&&jt(u.src,Bn(u))):u.loaded_=!0,u}var _=f.prototype;return _.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},_.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},_.addCue=function(u){var p=u;if(p.constructor&&p.constructor.name!=="VTTCue"){p=new window.vttjs.VTTCue(u.startTime,u.endTime,u.text);for(var k in u)k in p||(p[k]=u[k]);p.id=u.id,p.originalCue_=u}for(var R=this.tech_.textTracks(),q=0;q<R.length;q++)R[q]!==this&&R[q].removeCue(p);this.cues_.push(p),this.cues.setCues_(this.cues_)},_.removeCue=function(u){for(var p=this.cues_.length;p--;){var k=this.cues_[p];if(k===u||k.originalCue_&&k.originalCue_===u){this.cues_.splice(p,1),this.cues.setCues_(this.cues_);break}}},f}(aa);Yt.prototype.allowedEvents_={cuechange:"cuechange"};var Mn=function(S){_n(f,S);function f(_){var h;_===void 0&&(_={});var u=yi(_,{kind:mn[_.kind]||""});h=S.call(this,u)||this;var p=!1;return Object.defineProperty(Bn(h),"enabled",{get:function(){return p},set:function(R){typeof R!="boolean"||R===p||(p=R,this.trigger("enabledchange"))}}),u.enabled&&(h.enabled=u.enabled),h.loaded_=!0,h}return f}(aa),Yn=function(S){_n(f,S);function f(_){var h;_===void 0&&(_={});var u=yi(_,{kind:qt[_.kind]||""});h=S.call(this,u)||this;var p=!1;return Object.defineProperty(Bn(h),"selected",{get:function(){return p},set:function(R){typeof R!="boolean"||R===p||(p=R,this.trigger("selectedchange"))}}),u.selected&&(h.selected=u.selected),h}return f}(aa),Wn=0,ei=1,Fi=2,Tr=3,Yr=function(S){_n(f,S);function f(_){var h;_===void 0&&(_={}),h=S.call(this)||this;var u,p=new Yt(_);return h.kind=p.kind,h.src=p.src,h.srclang=p.language,h.label=p.label,h.default=p.default,Object.defineProperties(Bn(h),{readyState:{get:function(){return u}},track:{get:function(){return p}}}),u=Wn,p.addEventListener("loadeddata",function(){u=Fi,h.trigger({type:"load",target:Bn(h)})}),h}return f}(xi);Yr.prototype.allowedEvents_={load:"load"},Yr.NONE=Wn,Yr.LOADING=ei,Yr.LOADED=Fi,Yr.ERROR=Tr;var yr={audio:{ListClass:Xr,TrackClass:Mn,capitalName:"Audio"},video:{ListClass:Hr,TrackClass:Yn,capitalName:"Video"},text:{ListClass:Xi,TrackClass:Yt,capitalName:"Text"}};Object.keys(yr).forEach(function(S){yr[S].getterName=S+"Tracks",yr[S].privateName=S+"Tracks_"});var ka={remoteText:{ListClass:Xi,TrackClass:Yt,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:dr,TrackClass:Yr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},fr=F({},yr,ka);ka.names=Object.keys(ka),yr.names=Object.keys(yr),fr.names=[].concat(ka.names).concat(yr.names);var Nr={},Na=typeof O<"u"?O:typeof window<"u"?window:{},Wa;typeof document<"u"?Wa=document:(Wa=Na["__GLOBAL_DOCUMENT_CACHE@4"],Wa||(Wa=Na["__GLOBAL_DOCUMENT_CACHE@4"]=Nr));var da=Wa,Sa=Object.create||function(){function S(){}return function(f){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return S.prototype=f,new S}}();function Br(S,f){this.name="ParsingError",this.code=S.code,this.message=f||S.message}Br.prototype=Sa(Error.prototype),Br.prototype.constructor=Br,Br.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Ks(S){function f(h,u,p,k){return(h|0)*3600+(u|0)*60+(p|0)+(k|0)/1e3}var _=S.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return _?_[3]?f(_[1],_[2],_[3].replace(":",""),_[4]):_[1]>59?f(_[1],_[2],0,_[4]):f(0,_[1],_[2],_[4]):null}function Qr(){this.values=Sa(null)}Qr.prototype={set:function(f,_){!this.get(f)&&_!==""&&(this.values[f]=_)},get:function(f,_,h){return h?this.has(f)?this.values[f]:_[h]:this.has(f)?this.values[f]:_},has:function(f){return f in this.values},alt:function(f,_,h){for(var u=0;u<h.length;++u)if(_===h[u]){this.set(f,_);break}},integer:function(f,_){/^-?\d+$/.test(_)&&this.set(f,parseInt(_,10))},percent:function(f,_){return _.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(_=parseFloat(_),_>=0&&_<=100)?(this.set(f,_),!0):!1}};function Oi(S,f,_,h){var u=h?S.split(h):[S];for(var p in u)if(typeof u[p]=="string"){var k=u[p].split(_);if(k.length===2){var R=k[0].trim(),q=k[1].trim();f(R,q)}}}function Fs(S,f,_){var h=S;function u(){var R=Ks(S);if(R===null)throw new Br(Br.Errors.BadTimeStamp,"Malformed timestamp: "+h);return S=S.replace(/^[^\sa-zA-Z-]+/,""),R}function p(R,q){var z=new Qr;Oi(R,function(de,Ee){switch(de){case"region":for(var Se=_.length-1;Se>=0;Se--)if(_[Se].id===Ee){z.set(de,_[Se].region);break}break;case"vertical":z.alt(de,Ee,["rl","lr"]);break;case"line":var ze=Ee.split(","),rt=ze[0];z.integer(de,rt),z.percent(de,rt)&&z.set("snapToLines",!1),z.alt(de,rt,["auto"]),ze.length===2&&z.alt("lineAlign",ze[1],["start","center","end"]);break;case"position":ze=Ee.split(","),z.percent(de,ze[0]),ze.length===2&&z.alt("positionAlign",ze[1],["start","center","end"]);break;case"size":z.percent(de,Ee);break;case"align":z.alt(de,Ee,["start","center","end","left","right"]);break}},/:/,/\s/),q.region=z.get("region",null),q.vertical=z.get("vertical","");try{q.line=z.get("line","auto")}catch{}q.lineAlign=z.get("lineAlign","start"),q.snapToLines=z.get("snapToLines",!0),q.size=z.get("size",100);try{q.align=z.get("align","center")}catch{q.align=z.get("align","middle")}try{q.position=z.get("position","auto")}catch{q.position=z.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},q.align)}q.positionAlign=z.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},q.align)}function k(){S=S.replace(/^\s+/,"")}if(k(),f.startTime=u(),k(),S.substr(0,3)!=="-->")throw new Br(Br.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+h);S=S.substr(3),k(),f.endTime=u(),k(),p(S,f)}var Qa=da.createElement&&da.createElement("textarea"),as={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},bo={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},yo={v:"title",lang:"lang"},Ts={rt:"ruby"};function Ls(S,f){function _(){if(!f)return null;function rt(lt){return f=f.substr(lt.length),lt}var _t=f.match(/^([^<]*)(<[^>]*>?)?/);return rt(_t[1]?_t[1]:_t[2])}function h(rt){return Qa.innerHTML=rt,rt=Qa.textContent,Qa.textContent="",rt}function u(rt,_t){return!Ts[_t.localName]||Ts[_t.localName]===rt.localName}function p(rt,_t){var lt=as[rt];if(!lt)return null;var Bt=S.document.createElement(lt),en=yo[rt];return en&&_t&&(Bt[en]=_t.trim()),Bt}for(var k=S.document.createElement("div"),R=k,q,z=[];(q=_())!==null;){if(q[0]==="<"){if(q[1]==="/"){z.length&&z[z.length-1]===q.substr(2).replace(">","")&&(z.pop(),R=R.parentNode);continue}var de=Ks(q.substr(1,q.length-2)),Ee;if(de){Ee=S.document.createProcessingInstruction("timestamp",de),R.appendChild(Ee);continue}var Se=q.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Se||(Ee=p(Se[1],Se[3]),!Ee)||!u(R,Ee))continue;if(Se[2]){var ze=Se[2].split(".");ze.forEach(function(rt){var _t=/^bg_/.test(rt),lt=_t?rt.slice(3):rt;if(bo.hasOwnProperty(lt)){var Bt=_t?"background-color":"color",en=bo[lt];Ee.style[Bt]=en}}),Ee.className=ze.join(" ")}z.push(Se[1]),R.appendChild(Ee),R=Ee;continue}R.appendChild(S.document.createTextNode(h(q)))}return k}var wo=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Is(S){for(var f=0;f<wo.length;f++){var _=wo[f];if(S>=_[0]&&S<=_[1])return!0}return!1}function Hs(S){var f=[],_="",h;if(!S||!S.childNodes)return"ltr";function u(R,q){for(var z=q.childNodes.length-1;z>=0;z--)R.push(q.childNodes[z])}function p(R){if(!R||!R.length)return null;var q=R.pop(),z=q.textContent||q.innerText;if(z){var de=z.match(/^.*(\n|\r)/);return de?(R.length=0,de[0]):z}if(q.tagName==="ruby")return p(R);if(q.childNodes)return u(R,q),p(R)}for(u(f,S);_=p(f);)for(var k=0;k<_.length;k++)if(h=_.charCodeAt(k),Is(h))return"rtl";return"ltr"}function pl(S){if(typeof S.line=="number"&&(S.snapToLines||S.line>=0&&S.line<=100))return S.line;if(!S.track||!S.track.textTrackList||!S.track.textTrackList.mediaElement)return-1;for(var f=S.track,_=f.textTrackList,h=0,u=0;u<_.length&&_[u]!==f;u++)_[u].mode==="showing"&&h++;return++h*-1}function zo(){}zo.prototype.applyStyles=function(S,f){f=f||this.div;for(var _ in S)S.hasOwnProperty(_)&&(f.style[_]=S[_])},zo.prototype.formatStyle=function(S,f){return S===0?0:S+f};function cs(S,f,_){zo.call(this),this.cue=f,this.cueDiv=Ls(S,f.text);var h={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:f.vertical===""?"horizontal-tb":f.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(h,this.cueDiv),this.div=S.document.createElement("div"),h={direction:Hs(this.cueDiv),writingMode:f.vertical===""?"horizontal-tb":f.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:f.align==="middle"?"center":f.align,font:_.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(h),this.div.appendChild(this.cueDiv);var u=0;switch(f.positionAlign){case"start":case"line-left":u=f.position;break;case"center":u=f.position-f.size/2;break;case"end":case"line-right":u=f.position-f.size;break}f.vertical===""?this.applyStyles({left:this.formatStyle(u,"%"),width:this.formatStyle(f.size,"%")}):this.applyStyles({top:this.formatStyle(u,"%"),height:this.formatStyle(f.size,"%")}),this.move=function(p){this.applyStyles({top:this.formatStyle(p.top,"px"),bottom:this.formatStyle(p.bottom,"px"),left:this.formatStyle(p.left,"px"),right:this.formatStyle(p.right,"px"),height:this.formatStyle(p.height,"px"),width:this.formatStyle(p.width,"px")})}}cs.prototype=Sa(zo.prototype),cs.prototype.constructor=cs;function ss(S){var f,_,h,u;if(S.div){_=S.div.offsetHeight,h=S.div.offsetWidth,u=S.div.offsetTop;var p=(p=S.div.childNodes)&&(p=p[0])&&p.getClientRects&&p.getClientRects();S=S.div.getBoundingClientRect(),f=p?Math.max(p[0]&&p[0].height||0,S.height/p.length):0}this.left=S.left,this.right=S.right,this.top=S.top||u,this.height=S.height||_,this.bottom=S.bottom||u+(S.height||_),this.width=S.width||h,this.lineHeight=f!==void 0?f:S.lineHeight}ss.prototype.move=function(S,f){switch(f=f!==void 0?f:this.lineHeight,S){case"+x":this.left+=f,this.right+=f;break;case"-x":this.left-=f,this.right-=f;break;case"+y":this.top+=f,this.bottom+=f;break;case"-y":this.top-=f,this.bottom-=f;break}},ss.prototype.overlaps=function(S){return this.left<S.right&&this.right>S.left&&this.top<S.bottom&&this.bottom>S.top},ss.prototype.overlapsAny=function(S){for(var f=0;f<S.length;f++)if(this.overlaps(S[f]))return!0;return!1},ss.prototype.within=function(S){return this.top>=S.top&&this.bottom<=S.bottom&&this.left>=S.left&&this.right<=S.right},ss.prototype.overlapsOppositeAxis=function(S,f){switch(f){case"+x":return this.left<S.left;case"-x":return this.right>S.right;case"+y":return this.top<S.top;case"-y":return this.bottom>S.bottom}},ss.prototype.intersectPercentage=function(S){var f=Math.max(0,Math.min(this.right,S.right)-Math.max(this.left,S.left)),_=Math.max(0,Math.min(this.bottom,S.bottom)-Math.max(this.top,S.top)),h=f*_;return h/(this.height*this.width)},ss.prototype.toCSSCompatValues=function(S){return{top:this.top-S.top,bottom:S.bottom-this.bottom,left:this.left-S.left,right:S.right-this.right,height:this.height,width:this.width}},ss.getSimpleBoxPosition=function(S){var f=S.div?S.div.offsetHeight:S.tagName?S.offsetHeight:0,_=S.div?S.div.offsetWidth:S.tagName?S.offsetWidth:0,h=S.div?S.div.offsetTop:S.tagName?S.offsetTop:0;S=S.div?S.div.getBoundingClientRect():S.tagName?S.getBoundingClientRect():S;var u={left:S.left,right:S.right,top:S.top||h,height:S.height||f,bottom:S.bottom||h+(S.height||f),width:S.width||_};return u};function Xs(S,f,_,h){function u(lt,Bt){for(var en,En=new ss(lt),fn=1,gn=0;gn<Bt.length;gn++){for(;lt.overlapsOppositeAxis(_,Bt[gn])||lt.within(_)&&lt.overlapsAny(h);)lt.move(Bt[gn]);if(lt.within(_))return lt;var $n=lt.intersectPercentage(_);fn>$n&&(en=new ss(lt),fn=$n),lt=new ss(En)}return en||En}var p=new ss(f),k=f.cue,R=pl(k),q=[];if(k.snapToLines){var z;switch(k.vertical){case"":q=["+y","-y"],z="height";break;case"rl":q=["+x","-x"],z="width";break;case"lr":q=["-x","+x"],z="width";break}var de=p.lineHeight,Ee=de*Math.round(R),Se=_[z]+de,ze=q[0];Math.abs(Ee)>Se&&(Ee=Ee<0?-1:1,Ee*=Math.ceil(Se/de)*de),R<0&&(Ee+=k.vertical===""?_.height:_.width,q=q.reverse()),p.move(ze,Ee)}else{var rt=p.lineHeight/_.height*100;switch(k.lineAlign){case"center":R-=rt/2;break;case"end":R-=rt;break}switch(k.vertical){case"":f.applyStyles({top:f.formatStyle(R,"%")});break;case"rl":f.applyStyles({left:f.formatStyle(R,"%")});break;case"lr":f.applyStyles({right:f.formatStyle(R,"%")});break}q=["+y","-x","+x","-y"],p=new ss(f)}var _t=u(p,q);f.move(_t.toCSSCompatValues(_))}function Qs(){}Qs.StringDecoder=function(){return{decode:function(f){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))}}},Qs.convertCueToDOMTree=function(S,f){return!S||!f?null:Ls(S,f)};var Yo=.05,gu="sans-serif",Vu="1.5%";Qs.processCues=function(S,f,_){if(!S||!f||!_)return null;for(;_.firstChild;)_.removeChild(_.firstChild);var h=S.document.createElement("div");h.style.position="absolute",h.style.left="0",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.margin=Vu,_.appendChild(h);function u(de){for(var Ee=0;Ee<de.length;Ee++)if(de[Ee].hasBeenReset||!de[Ee].displayState)return!0;return!1}if(!u(f)){for(var p=0;p<f.length;p++)h.appendChild(f[p].displayState);return}var k=[],R=ss.getSimpleBoxPosition(h),q=Math.round(R.height*Yo*100)/100,z={font:q+"px "+gu};(function(){for(var de,Ee,Se=0;Se<f.length;Se++)Ee=f[Se],de=new cs(S,Ee,z),h.appendChild(de.div),Xs(S,de,R,k),Ee.displayState=de.div,k.push(ss.getSimpleBoxPosition(de))})()},Qs.Parser=function(S,f,_){_||(_=f,f={}),f||(f={}),this.window=S,this.vttjs=f,this.state="INITIAL",this.buffer="",this.decoder=_||new TextDecoder("utf8"),this.regionList=[]},Qs.Parser.prototype={reportOrThrowError:function(f){if(f instanceof Br)this.onparsingerror&&this.onparsingerror(f);else throw f},parse:function(f){var _=this;f&&(_.buffer+=_.decoder.decode(f,{stream:!0}));function h(){for(var Ee=_.buffer,Se=0;Se<Ee.length&&Ee[Se]!=="\r"&&Ee[Se]!==`
`;)++Se;var ze=Ee.substr(0,Se);return Ee[Se]==="\r"&&++Se,Ee[Se]===`
`&&++Se,_.buffer=Ee.substr(Se),ze}function u(Ee){var Se=new Qr;if(Oi(Ee,function(rt,_t){switch(rt){case"id":Se.set(rt,_t);break;case"width":Se.percent(rt,_t);break;case"lines":Se.integer(rt,_t);break;case"regionanchor":case"viewportanchor":var lt=_t.split(",");if(lt.length!==2)break;var Bt=new Qr;if(Bt.percent("x",lt[0]),Bt.percent("y",lt[1]),!Bt.has("x")||!Bt.has("y"))break;Se.set(rt+"X",Bt.get("x")),Se.set(rt+"Y",Bt.get("y"));break;case"scroll":Se.alt(rt,_t,["up"]);break}},/=/,/\s/),Se.has("id")){var ze=new(_.vttjs.VTTRegion||_.window.VTTRegion);ze.width=Se.get("width",100),ze.lines=Se.get("lines",3),ze.regionAnchorX=Se.get("regionanchorX",0),ze.regionAnchorY=Se.get("regionanchorY",100),ze.viewportAnchorX=Se.get("viewportanchorX",0),ze.viewportAnchorY=Se.get("viewportanchorY",100),ze.scroll=Se.get("scroll",""),_.onregion&&_.onregion(ze),_.regionList.push({id:Se.get("id"),region:ze})}}function p(Ee){var Se=new Qr;Oi(Ee,function(ze,rt){switch(ze){case"MPEGT":Se.integer(ze+"S",rt);break;case"LOCA":Se.set(ze+"L",Ks(rt));break}},/[^\d]:/,/,/),_.ontimestampmap&&_.ontimestampmap({MPEGTS:Se.get("MPEGTS"),LOCAL:Se.get("LOCAL")})}function k(Ee){Ee.match(/X-TIMESTAMP-MAP/)?Oi(Ee,function(Se,ze){switch(Se){case"X-TIMESTAMP-MAP":p(ze);break}},/=/):Oi(Ee,function(Se,ze){switch(Se){case"Region":u(ze);break}},/:/)}try{var R;if(_.state==="INITIAL"){if(!/\r\n|\n/.test(_.buffer))return this;R=h();var q=R.match(/^WEBVTT([ \t].*)?$/);if(!q||!q[0])throw new Br(Br.Errors.BadSignature);_.state="HEADER"}for(var z=!1;_.buffer;){if(!/\r\n|\n/.test(_.buffer))return this;switch(z?z=!1:R=h(),_.state){case"HEADER":/:/.test(R)?k(R):R||(_.state="ID");continue;case"NOTE":R||(_.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){_.state="NOTE";break}if(!R)continue;_.cue=new(_.vttjs.VTTCue||_.window.VTTCue)(0,0,"");try{_.cue.align="center"}catch{_.cue.align="middle"}if(_.state="CUE",R.indexOf("-->")===-1){_.cue.id=R;continue}case"CUE":try{Fs(R,_.cue,_.regionList)}catch(Ee){_.reportOrThrowError(Ee),_.cue=null,_.state="BADCUE";continue}_.state="CUETEXT";continue;case"CUETEXT":var de=R.indexOf("-->")!==-1;if(!R||de&&(z=!0)){_.oncue&&_.oncue(_.cue),_.cue=null,_.state="ID";continue}_.cue.text&&(_.cue.text+=`
`),_.cue.text+=R.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":R||(_.state="ID");continue}}}catch(Ee){_.reportOrThrowError(Ee),_.state==="CUETEXT"&&_.cue&&_.oncue&&_.oncue(_.cue),_.cue=null,_.state=_.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var f=this;try{if(f.buffer+=f.decoder.decode(),(f.cue||f.state==="HEADER")&&(f.buffer+=`

`,f.parse()),f.state==="INITIAL")throw new Br(Br.Errors.BadSignature)}catch(_){f.reportOrThrowError(_)}return f.onflush&&f.onflush(),this}};var Ll=Qs,Hl="auto",zu={"":1,lr:1,rl:1},vf={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function hl(S){if(typeof S!="string")return!1;var f=zu[S.toLowerCase()];return f?S.toLowerCase():!1}function To(S){if(typeof S!="string")return!1;var f=vf[S.toLowerCase()];return f?S.toLowerCase():!1}function _s(S,f,_){this.hasBeenReset=!1;var h="",u=!1,p=S,k=f,R=_,q=null,z="",de=!0,Ee="auto",Se="start",ze="auto",rt="auto",_t=100,lt="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return h},set:function(en){h=""+en}},pauseOnExit:{enumerable:!0,get:function(){return u},set:function(en){u=!!en}},startTime:{enumerable:!0,get:function(){return p},set:function(en){if(typeof en!="number")throw new TypeError("Start time must be set to a number.");p=en,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return k},set:function(en){if(typeof en!="number")throw new TypeError("End time must be set to a number.");k=en,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return R},set:function(en){R=""+en,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return q},set:function(en){q=en,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return z},set:function(en){var En=hl(en);if(En===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");z=En,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return de},set:function(en){de=!!en,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return Ee},set:function(en){if(typeof en!="number"&&en!==Hl)throw new SyntaxError("Line: an invalid number or illegal string was specified.");Ee=en,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return Se},set:function(en){var En=To(en);En?(Se=En,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return ze},set:function(en){if(en<0||en>100)throw new Error("Position must be between 0 and 100.");ze=en,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return rt},set:function(en){var En=To(en);En?(rt=En,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return _t},set:function(en){if(en<0||en>100)throw new Error("Size must be between 0 and 100.");_t=en,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return lt},set:function(en){var En=To(en);if(!En)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");lt=En,this.hasBeenReset=!0}}}),this.displayState=void 0}_s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vu=_s,bf={"":!0,up:!0};function ml(S){if(typeof S!="string")return!1;var f=bf[S.toLowerCase()];return f?S.toLowerCase():!1}function Go(S){return typeof S=="number"&&S>=0&&S<=100}function yf(){var S=100,f=3,_=0,h=100,u=0,p=100,k="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return S},set:function(q){if(!Go(q))throw new Error("Width must be between 0 and 100.");S=q}},lines:{enumerable:!0,get:function(){return f},set:function(q){if(typeof q!="number")throw new TypeError("Lines must be set to a number.");f=q}},regionAnchorY:{enumerable:!0,get:function(){return h},set:function(q){if(!Go(q))throw new Error("RegionAnchorX must be between 0 and 100.");h=q}},regionAnchorX:{enumerable:!0,get:function(){return _},set:function(q){if(!Go(q))throw new Error("RegionAnchorY must be between 0 and 100.");_=q}},viewportAnchorY:{enumerable:!0,get:function(){return p},set:function(q){if(!Go(q))throw new Error("ViewportAnchorY must be between 0 and 100.");p=q}},viewportAnchorX:{enumerable:!0,get:function(){return u},set:function(q){if(!Go(q))throw new Error("ViewportAnchorX must be between 0 and 100.");u=q}},scroll:{enumerable:!0,get:function(){return k},set:function(q){var z=ml(q);z===!1?console.warn("Scroll: an invalid or illegal string was specified."):k=z}}})}var ko=yf,So=M(function(S){var f=S.exports={WebVTT:Ll,VTTCue:vu,VTTRegion:ko};gi.vttjs=f,gi.WebVTT=f.WebVTT;var _=f.VTTCue,h=f.VTTRegion,u=gi.VTTCue,p=gi.VTTRegion;f.shim=function(){gi.VTTCue=_,gi.VTTRegion=h},f.restore=function(){gi.VTTCue=u,gi.VTTRegion=p},gi.VTTCue||f.shim()});So.WebVTT,So.VTTCue,So.VTTRegion;function gl(S,f,_,h,u){u===void 0&&(u={});var p=S.textTracks();u.kind=f,_&&(u.label=_),h&&(u.language=h),u.tech=S;var k=new fr.text.TrackClass(u);return p.addTrack(k),k}var fa=function(S){_n(f,S);function f(h,u){var p;return h===void 0&&(h={}),u===void 0&&(u=function(){}),h.reportTouchActivity=!1,p=S.call(this,null,h,u)||this,p.onDurationChange_=function(k){return p.onDurationChange(k)},p.trackProgress_=function(k){return p.trackProgress(k)},p.trackCurrentTime_=function(k){return p.trackCurrentTime(k)},p.stopTrackingCurrentTime_=function(k){return p.stopTrackingCurrentTime(k)},p.disposeSourceHandler_=function(k){return p.disposeSourceHandler(k)},p.queuedHanders_=new Set,p.hasStarted_=!1,p.on("playing",function(){this.hasStarted_=!0}),p.on("loadstart",function(){this.hasStarted_=!1}),fr.names.forEach(function(k){var R=fr[k];h&&h[R.getterName]&&(p[R.privateName]=h[R.getterName])}),p.featuresProgressEvents||p.manualProgressOn(),p.featuresTimeupdateEvents||p.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(k){h["native"+k+"Tracks"]===!1&&(p["featuresNative"+k+"Tracks"]=!1)}),h.nativeCaptions===!1||h.nativeTextTracks===!1?p.featuresNativeTextTracks=!1:(h.nativeCaptions===!0||h.nativeTextTracks===!0)&&(p.featuresNativeTextTracks=!0),p.featuresNativeTextTracks||p.emulateTextTracks(),p.preloadTextTracks=h.preloadTextTracks!==!1,p.autoRemoteTextTracks_=new fr.text.ListClass,p.initTrackListeners(),h.nativeControlsForTouch||p.emitTapEvents(),p.constructor&&(p.name_=p.constructor.name||"Unknown Tech"),p}var _=f.prototype;return _.triggerSourceset=function(u){var p=this;this.isReady_||this.one("ready",function(){return p.setTimeout(function(){return p.triggerSourceset(u)},1)}),this.trigger({src:u,type:"sourceset"})},_.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},_.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},_.trackProgress=function(u){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Wi(this,function(){var p=this.bufferedPercent();this.bufferedPercent_!==p&&this.trigger("progress"),this.bufferedPercent_=p,p===1&&this.stopTrackingProgress()}),500)},_.onDurationChange=function(u){this.duration_=this.duration()},_.buffered=function(){return Ui(0,0)},_.bufferedPercent=function(){return Fr(this.buffered(),this.duration_)},_.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},_.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},_.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},_.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},_.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},_.dispose=function(){this.clearTracks(yr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),S.prototype.dispose.call(this)},_.clearTracks=function(u){var p=this;u=[].concat(u),u.forEach(function(k){for(var R=p[k+"Tracks"]()||[],q=R.length;q--;){var z=R[q];k==="text"&&p.removeRemoteTextTrack(z),R.removeTrack(z)}})},_.cleanupAutoTextTracks=function(){for(var u=this.autoRemoteTextTracks_||[],p=u.length;p--;){var k=u[p];this.removeRemoteTextTrack(k)}},_.reset=function(){},_.crossOrigin=function(){},_.setCrossOrigin=function(){},_.error=function(u){return u!==void 0&&(this.error_=new wi(u),this.trigger("error")),this.error_},_.played=function(){return this.hasStarted_?Ui(0,0):Ui()},_.play=function(){},_.setScrubbing=function(){},_.scrubbing=function(){},_.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},_.initTrackListeners=function(){var u=this;yr.names.forEach(function(p){var k=yr[p],R=function(){u.trigger(p+"trackchange")},q=u[k.getterName]();q.addEventListener("removetrack",R),q.addEventListener("addtrack",R),u.on("dispose",function(){q.removeEventListener("removetrack",R),q.removeEventListener("addtrack",R)})})},_.addWebVttScript_=function(){var u=this;if(!window.WebVTT)if(document.body.contains(this.el())){if(!this.options_["vtt.js"]&&X(So)&&Object.keys(So).length>0){this.trigger("vttjsloaded");return}var p=document.createElement("script");p.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",p.onload=function(){u.trigger("vttjsloaded")},p.onerror=function(){u.trigger("vttjserror")},this.on("dispose",function(){p.onload=null,p.onerror=null}),window.WebVTT=!0,this.el().parentNode.appendChild(p)}else this.ready(this.addWebVttScript_)},_.emulateTextTracks=function(){var u=this,p=this.textTracks(),k=this.remoteTextTracks(),R=function(Se){return p.addTrack(Se.track)},q=function(Se){return p.removeTrack(Se.track)};k.on("addtrack",R),k.on("removetrack",q),this.addWebVttScript_();var z=function(){return u.trigger("texttrackchange")},de=function(){z();for(var Se=0;Se<p.length;Se++){var ze=p[Se];ze.removeEventListener("cuechange",z),ze.mode==="showing"&&ze.addEventListener("cuechange",z)}};de(),p.addEventListener("change",de),p.addEventListener("addtrack",de),p.addEventListener("removetrack",de),this.on("dispose",function(){k.off("addtrack",R),k.off("removetrack",q),p.removeEventListener("change",de),p.removeEventListener("addtrack",de),p.removeEventListener("removetrack",de);for(var Ee=0;Ee<p.length;Ee++){var Se=p[Ee];Se.removeEventListener("cuechange",z)}})},_.addTextTrack=function(u,p,k){if(!u)throw new Error("TextTrack kind is required but was not provided");return gl(this,u,p,k)},_.createRemoteTextTrack=function(u){var p=yi(u,{tech:this});return new ka.remoteTextEl.TrackClass(p)},_.addRemoteTextTrack=function(u,p){var k=this;u===void 0&&(u={});var R=this.createRemoteTextTrack(u);return p!==!0&&p!==!1&&(I.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),p=!0),this.remoteTextTrackEls().addTrackElement_(R),this.remoteTextTracks().addTrack(R.track),p!==!0&&this.ready(function(){return k.autoRemoteTextTracks_.addTrack(R.track)}),R},_.removeRemoteTextTrack=function(u){var p=this.remoteTextTrackEls().getTrackElementByTrack_(u);this.remoteTextTrackEls().removeTrackElement_(p),this.remoteTextTracks().removeTrack(u),this.autoRemoteTextTracks_.removeTrack(u)},_.getVideoPlaybackQuality=function(){return{}},_.requestPictureInPicture=function(){var u=this.options_.Promise||window.Promise;if(u)return u.reject()},_.disablePictureInPicture=function(){return!0},_.setDisablePictureInPicture=function(){},_.requestVideoFrameCallback=function(u){var p=this,k=ri();return!this.isReady_||this.paused()?(this.queuedHanders_.add(k),this.one("playing",function(){p.queuedHanders_.has(k)&&(p.queuedHanders_.delete(k),u())})):this.requestNamedAnimationFrame(k,u),k},_.cancelVideoFrameCallback=function(u){this.queuedHanders_.has(u)?this.queuedHanders_.delete(u):this.cancelNamedAnimationFrame(u)},_.setPoster=function(){},_.playsinline=function(){},_.setPlaysinline=function(){},_.overrideNativeAudioTracks=function(){},_.overrideNativeVideoTracks=function(){},_.canPlayType=function(){return""},f.canPlayType=function(){return""},f.canPlaySource=function(u,p){return f.canPlayType(u.type)},f.isTech=function(u){return u.prototype instanceof f||u instanceof f||u===f},f.registerTech=function(u,p){if(f.techs_||(f.techs_={}),!f.isTech(p))throw new Error("Tech "+u+" must be a Tech");if(!f.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!f.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return u=Si(u),f.techs_[u]=p,f.techs_[ir(u)]=p,u!=="Tech"&&f.defaultTechOrder_.push(u),p},f.getTech=function(u){if(u){if(f.techs_&&f.techs_[u])return f.techs_[u];if(u=Si(u),window&&window.videojs&&window.videojs[u])return I.warn("The "+u+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window.videojs[u]}},f}(dn);fr.names.forEach(function(S){var f=fr[S];fa.prototype[f.getterName]=function(){return this[f.privateName]=this[f.privateName]||new f.ListClass,this[f.privateName]}}),fa.prototype.featuresVolumeControl=!0,fa.prototype.featuresMuteControl=!0,fa.prototype.featuresFullscreenResize=!1,fa.prototype.featuresPlaybackRate=!1,fa.prototype.featuresProgressEvents=!1,fa.prototype.featuresSourceset=!1,fa.prototype.featuresTimeupdateEvents=!1,fa.prototype.featuresNativeTextTracks=!1,fa.prototype.featuresVideoFrameCallback=!1,fa.withSourceHandlers=function(S){S.registerSourceHandler=function(_,h){var u=S.sourceHandlers;u||(u=S.sourceHandlers=[]),h===void 0&&(h=u.length),u.splice(h,0,_)},S.canPlayType=function(_){for(var h=S.sourceHandlers||[],u,p=0;p<h.length;p++)if(u=h[p].canPlayType(_),u)return u;return""},S.selectSourceHandler=function(_,h){for(var u=S.sourceHandlers||[],p,k=0;k<u.length;k++)if(p=u[k].canHandleSource(_,h),p)return u[k];return null},S.canPlaySource=function(_,h){var u=S.selectSourceHandler(_,h);return u?u.canHandleSource(_,h):""};var f=["seekable","seeking","duration"];f.forEach(function(_){var h=this[_];typeof h=="function"&&(this[_]=function(){return this.sourceHandler_&&this.sourceHandler_[_]?this.sourceHandler_[_].apply(this.sourceHandler_,arguments):h.apply(this,arguments)})},S.prototype),S.prototype.setSource=function(_){var h=S.selectSourceHandler(_,this.options_);h||(S.nativeSourceHandler?h=S.nativeSourceHandler:I.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),h!==S.nativeSourceHandler&&(this.currentSource_=_),this.sourceHandler_=h.handleSource(_,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},S.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},dn.registerComponent("Tech",fa),fa.registerTech("Tech",fa),fa.defaultTechOrder_=[];var Ko={},Co={},vl={};function wf(S,f){Ko[S]=Ko[S]||[],Ko[S].push(f)}function ks(S,f,_){S.setTimeout(function(){return so(f,Ko[f.type],_,S)},1)}function bl(S,f){S.forEach(function(_){return _.setTech&&_.setTech(f)})}function Yu(S,f,_){return S.reduceRight(As(_),f[_]())}function Gu(S,f,_,h){return f[_](S.reduce(As(_),h))}function Ja(S,f,_,h){h===void 0&&(h=null);var u="call"+Si(_),p=S.reduce(As(u),h),k=p===vl,R=k?null:f[_](p);return Tf(S,_,R,k),R}var jl={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ku={setCurrentTime:1,setMuted:1,setVolume:1},Bl={play:1,pause:1};function As(S){return function(f,_){return f===vl?vl:_[S]?_[S](f):f}}function Tf(S,f,_,h){for(var u=S.length-1;u>=0;u--){var p=S[u];p[f]&&p[f](h,_)}}function Xo(S){Co[S.id()]=null}function Xu(S,f){var _=Co[S.id()],h=null;if(_==null)return h=f(S),Co[S.id()]=[[f,h]],h;for(var u=0;u<_.length;u++){var p=_[u],k=p[0],R=p[1];k===f&&(h=R)}return h===null&&(h=f(S),_.push([f,h])),h}function so(S,f,_,h,u,p){S===void 0&&(S={}),f===void 0&&(f=[]),u===void 0&&(u=[]),p===void 0&&(p=!1);var k=f,R=k[0],q=k.slice(1);if(typeof R=="string")so(S,Ko[R],_,h,u,p);else if(R){var z=Xu(h,R);if(!z.setSource)return u.push(z),so(S,q,_,h,u,p);z.setSource(V({},S),function(de,Ee){if(de)return so(S,q,_,h,u,p);u.push(z),so(Ee,S.type===Ee.type?q:Ko[Ee.type],_,h,u,p)})}else q.length?so(S,q,_,h,u,p):p?_(S,u):so(S,Ko["*"],_,h,u,!0)}var $d={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},yl=function(f){f===void 0&&(f="");var _=va(f),h=$d[_.toLowerCase()];return h||""},Ul=function(f,_){if(!_)return"";if(f.cache_.source.src===_&&f.cache_.source.type)return f.cache_.source.type;var h=f.cache_.sources.filter(function(R){return R.src===_});if(h.length)return h[0].type;for(var u=f.$$("source"),p=0;p<u.length;p++){var k=u[p];if(k.type&&k.src&&k.src===_)return k.type}return yl(_)},bu=function S(f){if(Array.isArray(f)){var _=[];f.forEach(function(h){h=S(h),Array.isArray(h)?_=_.concat(h):Q(h)&&_.push(h)}),f=_}else typeof f=="string"&&f.trim()?f=[Nd({src:f})]:Q(f)&&typeof f.src=="string"&&f.src&&f.src.trim()?f=[Nd(f)]:f=[];return f};function Nd(S){if(!S.type){var f=yl(S.src);f&&(S.type=f)}return S}var ql=function(S){_n(f,S);function f(_,h,u){var p,k=yi({createEl:!1},h);if(p=S.call(this,_,k,u)||this,!h.playerOptions.sources||h.playerOptions.sources.length===0)for(var R=0,q=h.playerOptions.techOrder;R<q.length;R++){var z=Si(q[R]),de=fa.getTech(z);if(z||(de=dn.getComponent(z)),de&&de.isSupported()){_.loadTech_(z);break}}else _.src(h.playerOptions.sources);return p}return f}(dn);dn.registerComponent("MediaLoader",ql);var le=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.options_.controlText&&p.controlText(p.options_.controlText),p.handleMouseOver_=function(k){return p.handleMouseOver(k)},p.handleMouseOut_=function(k){return p.handleMouseOut(k)},p.handleClick_=function(k){return p.handleClick(k)},p.handleKeyDown_=function(k){return p.handleKeyDown(k)},p.emitTapEvents(),p.enable(),p}var _=f.prototype;return _.createEl=function(u,p,k){u===void 0&&(u="div"),p===void 0&&(p={}),k===void 0&&(k={}),p=V({className:this.buildCSSClass(),tabIndex:0},p),u==="button"&&I.error("Creating a ClickableComponent with an HTML element of "+u+" is not supported; use a Button instead."),k=V({role:"button"},k),this.tabIndex_=p.tabIndex;var R=Ct(u,p,k);return R.appendChild(Ct("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(R),R},_.dispose=function(){this.controlTextEl_=null,S.prototype.dispose.call(this)},_.createControlTextEl=function(u){return this.controlTextEl_=Ct("span",{className:"vjs-control-text"},{"aria-live":"polite"}),u&&u.appendChild(this.controlTextEl_),this.controlText(this.controlText_,u),this.controlTextEl_},_.controlText=function(u,p){if(p===void 0&&(p=this.el()),u===void 0)return this.controlText_||"Need Text";var k=this.localize(u);this.controlText_=u,bt(this.controlTextEl_,k),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&p.setAttribute("title",k)},_.buildCSSClass=function(){return"vjs-control vjs-button "+S.prototype.buildCSSClass.call(this)},_.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},_.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},_.handleLanguagechange=function(){this.controlText(this.controlText_)},_.handleClick=function(u){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},_.handleKeyDown=function(u){Vn.isEventKey(u,"Space")||Vn.isEventKey(u,"Enter")?(u.preventDefault(),u.stopPropagation(),this.trigger("click")):S.prototype.handleKeyDown.call(this,u)},f}(dn);dn.registerComponent("ClickableComponent",le);var vn=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update(),p.update_=function(k){return p.update(k)},h.on("posterchange",p.update_),p}var _=f.prototype;return _.dispose=function(){this.player().off("posterchange",this.update_),S.prototype.dispose.call(this)},_.createEl=function(){var u=Ct("div",{className:"vjs-poster",tabIndex:-1});return u},_.update=function(u){var p=this.player().poster();this.setSrc(p),p?this.show():this.hide()},_.setSrc=function(u){var p="";u&&(p='url("'+u+'")'),this.el_.style.backgroundImage=p},_.handleClick=function(u){if(this.player_.controls()){var p=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;this.player_.tech(!0)&&!((G||We)&&p)&&this.player_.tech(!0).focus(),this.player_.paused()?Cr(this.player_.play()):this.player_.pause()}},f}(le);dn.registerComponent("PosterImage",vn);var ui="#222",js="#ccc",Fd={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Wl(S,f){var _;if(S.length===4)_=S[1]+S[1]+S[2]+S[2]+S[3]+S[3];else if(S.length===7)_=S.slice(1);else throw new Error("Invalid color code provided, "+S+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(_.slice(0,2),16)+","+parseInt(_.slice(2,4),16)+","+parseInt(_.slice(4,6),16)+","+f+")"}function kf(S,f,_){try{S.style[f]=_}catch{return}}var Qu=function(S){_n(f,S);function f(h,u,p){var k;k=S.call(this,h,u,p)||this;var R=function(z){return k.updateDisplay(z)};return h.on("loadstart",function(q){return k.toggleDisplay(q)}),h.on("texttrackchange",R),h.on("loadedmetadata",function(q){return k.preselectTrack(q)}),h.ready(Wi(Bn(k),function(){if(h.tech_&&h.tech_.featuresNativeTextTracks){this.hide();return}h.on("fullscreenchange",R),h.on("playerresize",R),window.addEventListener("orientationchange",R),h.on("dispose",function(){return window.removeEventListener("orientationchange",R)});for(var q=this.options_.playerOptions.tracks||[],z=0;z<q.length;z++)this.player_.addRemoteTextTrack(q[z],!0);this.preselectTrack()})),k}var _=f.prototype;return _.preselectTrack=function(){for(var u={captions:1,subtitles:1},p=this.player_.textTracks(),k=this.player_.cache_.selectedLanguage,R,q,z,de=0;de<p.length;de++){var Ee=p[de];k&&k.enabled&&k.language&&k.language===Ee.language&&Ee.kind in u?Ee.kind===k.kind?z=Ee:z||(z=Ee):k&&!k.enabled?(z=null,R=null,q=null):Ee.default&&(Ee.kind==="descriptions"&&!R?R=Ee:Ee.kind in u&&!q&&(q=Ee))}z?z.mode="showing":q?q.mode="showing":R&&(R.mode="showing")},_.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},_.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},_.clearDisplay=function(){typeof window.WebVTT=="function"&&window.WebVTT.processCues(window,[],this.el_)},_.updateDisplay=function(){var u=this.player_.textTracks(),p=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),p){for(var k=[],R=0;R<u.length;++R){var q=u[R];q.mode==="showing"&&k.push(q)}this.updateForTrack(k);return}for(var z=null,de=null,Ee=u.length;Ee--;){var Se=u[Ee];Se.mode==="showing"&&(Se.kind==="descriptions"?z=Se:de=Se)}de?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(de)):z&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(z))},_.updateDisplayState=function(u){for(var p=this.player_.textTrackSettings.getValues(),k=u.activeCues,R=k.length;R--;){var q=k[R];if(q){var z=q.displayState;if(p.color&&(z.firstChild.style.color=p.color),p.textOpacity&&kf(z.firstChild,"color",Wl(p.color||"#fff",p.textOpacity)),p.backgroundColor&&(z.firstChild.style.backgroundColor=p.backgroundColor),p.backgroundOpacity&&kf(z.firstChild,"backgroundColor",Wl(p.backgroundColor||"#000",p.backgroundOpacity)),p.windowColor&&(p.windowOpacity?kf(z,"backgroundColor",Wl(p.windowColor,p.windowOpacity)):z.style.backgroundColor=p.windowColor),p.edgeStyle&&(p.edgeStyle==="dropshadow"?z.firstChild.style.textShadow="2px 2px 3px "+ui+", 2px 2px 4px "+ui+", 2px 2px 5px "+ui:p.edgeStyle==="raised"?z.firstChild.style.textShadow="1px 1px "+ui+", 2px 2px "+ui+", 3px 3px "+ui:p.edgeStyle==="depressed"?z.firstChild.style.textShadow="1px 1px "+js+", 0 1px "+js+", -1px -1px "+ui+", 0 -1px "+ui:p.edgeStyle==="uniform"&&(z.firstChild.style.textShadow="0 0 4px "+ui+", 0 0 4px "+ui+", 0 0 4px "+ui+", 0 0 4px "+ui)),p.fontPercent&&p.fontPercent!==1){var de=window.parseFloat(z.style.fontSize);z.style.fontSize=de*p.fontPercent+"px",z.style.height="auto",z.style.top="auto"}p.fontFamily&&p.fontFamily!=="default"&&(p.fontFamily==="small-caps"?z.firstChild.style.fontVariant="small-caps":z.firstChild.style.fontFamily=Fd[p.fontFamily])}}},_.updateForTrack=function(u){if(Array.isArray(u)||(u=[u]),!(typeof window.WebVTT!="function"||u.every(function(ze){return!ze.activeCues}))){for(var p=[],k=0;k<u.length;++k)for(var R=u[k],q=0;q<R.activeCues.length;++q)p.push(R.activeCues[q]);window.WebVTT.processCues(window,p,this.el_);for(var z=0;z<u.length;++z){for(var de=u[z],Ee=0;Ee<de.activeCues.length;++Ee){var Se=de.activeCues[Ee].displayState;nn(Se,"vjs-text-track-cue"),nn(Se,"vjs-text-track-cue-"+(de.language?de.language:z)),de.language&&Xt(Se,"lang",de.language)}this.player_.textTrackSettings&&this.updateDisplayState(de)}}},f}(dn);dn.registerComponent("TextTrackDisplay",Qu);var Sf=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(){var u=this.player_.isAudio(),p=this.localize(u?"Audio Player":"Video Player"),k=Ct("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[p])}),R=S.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return R.appendChild(k),R},f}(dn);dn.registerComponent("LoadingSpinner",Sf);var Po=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(u,p,k){p===void 0&&(p={}),k===void 0&&(k={}),u="button",p=V({className:this.buildCSSClass()},p),k=V({type:"button"},k);var R=Ct(u,p,k);return R.appendChild(Ct("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(R),R},_.addChild=function(u,p){p===void 0&&(p={});var k=this.constructor.name;return I.warn("Adding an actionable (user controllable) child to a Button ("+k+") is not supported; use a ClickableComponent instead."),dn.prototype.addChild.call(this,u,p)},_.enable=function(){S.prototype.enable.call(this),this.el_.removeAttribute("disabled")},_.disable=function(){S.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},_.handleKeyDown=function(u){if(Vn.isEventKey(u,"Space")||Vn.isEventKey(u,"Enter")){u.stopPropagation();return}S.prototype.handleKeyDown.call(this,u)},f}(le);dn.registerComponent("Button",Po);var Vl=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.mouseused_=!1,p.on("mousedown",function(k){return p.handleMouseDown(k)}),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-big-play-button"},_.handleClick=function(u){var p=this.player_.play();if(this.mouseused_&&u.clientX&&u.clientY){var k=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;Cr(p),this.player_.tech(!0)&&!((G||We)&&k)&&this.player_.tech(!0).focus();return}var R=this.player_.getChild("controlBar"),q=R&&R.getChild("playToggle");if(!q){this.player_.tech(!0).focus();return}var z=function(){return q.focus()};Gi(p)?p.then(z,function(){}):this.setTimeout(z,1)},_.handleKeyDown=function(u){this.mouseused_=!1,S.prototype.handleKeyDown.call(this,u)},_.handleMouseDown=function(u){this.mouseused_=!0},f}(Po);Vl.prototype.controlText_="Play Video",dn.registerComponent("BigPlayButton",Vl);var Ju=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.controlText(u&&u.controlText||p.localize("Close")),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-close-button "+S.prototype.buildCSSClass.call(this)},_.handleClick=function(u){this.trigger({type:"close",bubbles:!1})},_.handleKeyDown=function(u){Vn.isEventKey(u,"Esc")?(u.preventDefault(),u.stopPropagation(),this.trigger("click")):S.prototype.handleKeyDown.call(this,u)},f}(Po);dn.registerComponent("CloseButton",Ju);var Zu=function(S){_n(f,S);function f(h,u){var p;return u===void 0&&(u={}),p=S.call(this,h,u)||this,u.replay=u.replay===void 0||u.replay,p.on(h,"play",function(k){return p.handlePlay(k)}),p.on(h,"pause",function(k){return p.handlePause(k)}),u.replay&&p.on(h,"ended",function(k){return p.handleEnded(k)}),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-play-control "+S.prototype.buildCSSClass.call(this)},_.handleClick=function(u){this.player_.paused()?Cr(this.player_.play()):this.player_.pause()},_.handleSeeked=function(u){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(u):this.handlePlay(u)},_.handlePlay=function(u){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},_.handlePause=function(u){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},_.handleEnded=function(u){var p=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(k){return p.handleSeeked(k)})},f}(Po);Zu.prototype.controlText_="Play",dn.registerComponent("PlayToggle",Zu);var ps=function(f,_){f=f<0?0:f;var h=Math.floor(f%60),u=Math.floor(f/60%60),p=Math.floor(f/3600),k=Math.floor(_/60%60),R=Math.floor(_/3600);return(isNaN(f)||f===1/0)&&(p=u=h="-"),p=p>0||R>0?p+":":"",u=((p||k>=10)&&u<10?"0"+u:u)+":",h=h<10?"0"+h:h,p+u+h},wl=ps;function Cf(S){wl=S}function cc(){wl=ps}function Ss(S,f){return f===void 0&&(f=S),wl(S,f)}var yu=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on(h,["timeupdate","ended"],function(k){return p.updateContent(k)}),p.updateTextNode_(),p}var _=f.prototype;return _.createEl=function(){var u=this.buildCSSClass(),p=S.prototype.createEl.call(this,"div",{className:u+" vjs-time-control vjs-control"}),k=Ct("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return p.appendChild(k),this.contentEl_=Ct("span",{className:u+"-display"},{"aria-live":"off",role:"presentation"}),p.appendChild(this.contentEl_),p},_.dispose=function(){this.contentEl_=null,this.textNode_=null,S.prototype.dispose.call(this)},_.updateTextNode_=function(u){var p=this;u===void 0&&(u=0),u=Ss(u),this.formattedTime_!==u&&(this.formattedTime_=u,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(p.contentEl_){var k=p.textNode_;k&&p.contentEl_.firstChild!==k&&(k=null,I.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),p.textNode_=document.createTextNode(p.formattedTime_),p.textNode_&&(k?p.contentEl_.replaceChild(p.textNode_,k):p.contentEl_.appendChild(p.textNode_))}}))},_.updateContent=function(u){},f}(dn);yu.prototype.labelText_="Time",yu.prototype.controlText_="Time",dn.registerComponent("TimeDisplay",yu);var wu=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-current-time"},_.updateContent=function(u){var p;this.player_.ended()?p=this.player_.duration():p=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(p)},f}(yu);wu.prototype.labelText_="Current Time",wu.prototype.controlText_="Current Time",dn.registerComponent("CurrentTimeDisplay",wu);var Tl=function(S){_n(f,S);function f(h,u){var p;p=S.call(this,h,u)||this;var k=function(q){return p.updateContent(q)};return p.on(h,"durationchange",k),p.on(h,"loadstart",k),p.on(h,"loadedmetadata",k),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-duration"},_.updateContent=function(u){var p=this.player_.duration();this.updateTextNode_(p)},f}(yu);Tl.prototype.labelText_="Duration",Tl.prototype.controlText_="Duration",dn.registerComponent("DurationDisplay",Tl);var ed=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),p=S.prototype.createEl.call(this,"div"),k=S.prototype.createEl.call(this,"span",{textContent:"/"});return p.appendChild(k),u.appendChild(p),u},f}(dn);dn.registerComponent("TimeDivider",ed);var Lo=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on(h,"durationchange",function(k){return p.updateContent(k)}),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-remaining-time"},_.createEl=function(){var u=S.prototype.createEl.call(this);return this.options_.displayNegative!==!1&&u.insertBefore(Ct("span",{},{"aria-hidden":!0},"-"),this.contentEl_),u},_.updateContent=function(u){if(typeof this.player_.duration()=="number"){var p;this.player_.ended()?p=0:this.player_.remainingTimeDisplay?p=this.player_.remainingTimeDisplay():p=this.player_.remainingTime(),this.updateTextNode_(p)}},f}(yu);Lo.prototype.labelText_="Remaining Time",Lo.prototype.controlText_="Remaining Time",dn.registerComponent("RemainingTimeDisplay",Lo);var _c=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.updateShowing(),p.on(p.player(),"durationchange",function(k){return p.updateShowing(k)}),p}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ct("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ct("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(document.createTextNode(this.localize("LIVE"))),u.appendChild(this.contentEl_),u},_.dispose=function(){this.contentEl_=null,S.prototype.dispose.call(this)},_.updateShowing=function(u){this.player().duration()===1/0?this.show():this.hide()},f}(dn);dn.registerComponent("LiveDisplay",_c);var Tu=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.updateLiveEdgeStatus(),p.player_.liveTracker&&(p.updateLiveEdgeStatusHandler_=function(k){return p.updateLiveEdgeStatus(k)},p.on(p.player_.liveTracker,"liveedgechange",p.updateLiveEdgeStatusHandler_)),p}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ct("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),u.appendChild(this.textEl_),u},_.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},_.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},_.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,S.prototype.dispose.call(this)},f}(Po);Tu.prototype.controlText_="Seek to live, currently playing live",dn.registerComponent("SeekToLive",Tu);var ku=function(f,_,h){return f=Number(f),Math.min(h,Math.max(_,isNaN(f)?_:f))},Pf=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.handleMouseDown_=function(k){return p.handleMouseDown(k)},p.handleMouseUp_=function(k){return p.handleMouseUp(k)},p.handleKeyDown_=function(k){return p.handleKeyDown(k)},p.handleClick_=function(k){return p.handleClick(k)},p.handleMouseMove_=function(k){return p.handleMouseMove(k)},p.update_=function(k){return p.update(k)},p.bar=p.getChild(p.options_.barName),p.vertical(!!p.options_.vertical),p.enable(),p}var _=f.prototype;return _.enabled=function(){return this.enabled_},_.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},_.disable=function(){if(this.enabled()){var u=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(u,"mousemove",this.handleMouseMove_),this.off(u,"mouseup",this.handleMouseUp_),this.off(u,"touchmove",this.handleMouseMove_),this.off(u,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},_.createEl=function(u,p,k){return p===void 0&&(p={}),k===void 0&&(k={}),p.className=p.className+" vjs-slider",p=V({tabIndex:0},p),k=V({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},k),S.prototype.createEl.call(this,u,p,k)},_.handleMouseDown=function(u){var p=this.bar.el_.ownerDocument;u.type==="mousedown"&&u.preventDefault(),u.type==="touchstart"&&!qe&&u.preventDefault(),Xe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(p,"mousemove",this.handleMouseMove_),this.on(p,"mouseup",this.handleMouseUp_),this.on(p,"touchmove",this.handleMouseMove_),this.on(p,"touchend",this.handleMouseUp_),this.handleMouseMove(u,!0)},_.handleMouseMove=function(u){},_.handleMouseUp=function(){var u=this.bar.el_.ownerDocument;Nt(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(u,"mousemove",this.handleMouseMove_),this.off(u,"mouseup",this.handleMouseUp_),this.off(u,"touchmove",this.handleMouseMove_),this.off(u,"touchend",this.handleMouseUp_),this.update()},_.update=function(){var u=this;if(!(!this.el_||!this.bar)){var p=this.getProgress();return p===this.progress_||(this.progress_=p,this.requestNamedAnimationFrame("Slider#update",function(){var k=u.vertical()?"height":"width";u.bar.el().style[k]=(p*100).toFixed(2)+"%"})),p}},_.getProgress=function(){return Number(ku(this.getPercent(),0,1).toFixed(4))},_.calculateDistance=function(u){var p=dt(this.el_,u);return this.vertical()?p.y:p.x},_.handleKeyDown=function(u){Vn.isEventKey(u,"Left")||Vn.isEventKey(u,"Down")?(u.preventDefault(),u.stopPropagation(),this.stepBack()):Vn.isEventKey(u,"Right")||Vn.isEventKey(u,"Up")?(u.preventDefault(),u.stopPropagation(),this.stepForward()):S.prototype.handleKeyDown.call(this,u)},_.handleClick=function(u){u.stopPropagation(),u.preventDefault()},_.vertical=function(u){if(u===void 0)return this.vertical_||!1;this.vertical_=!!u,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},f}(dn);dn.registerComponent("Slider",Pf);var zl=function(f,_){return ku(f/_*100,0,100).toFixed(2)+"%"},td=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.partEls_=[],p.on(h,"progress",function(k){return p.update(k)}),p}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),p=Ct("span",{className:"vjs-control-text"}),k=Ct("span",{textContent:this.localize("Loaded")}),R=document.createTextNode(": ");return this.percentageEl_=Ct("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),u.appendChild(p),p.appendChild(k),p.appendChild(R),p.appendChild(this.percentageEl_),u},_.dispose=function(){this.partEls_=null,this.percentageEl_=null,S.prototype.dispose.call(this)},_.update=function(u){var p=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var k=p.player_.liveTracker,R=p.player_.buffered(),q=k&&k.isLive()?k.seekableEnd():p.player_.duration(),z=p.player_.bufferedEnd(),de=p.partEls_,Ee=zl(z,q);p.percent_!==Ee&&(p.el_.style.width=Ee,bt(p.percentageEl_,Ee),p.percent_=Ee);for(var Se=0;Se<R.length;Se++){var ze=R.start(Se),rt=R.end(Se),_t=de[Se];_t||(_t=p.el_.appendChild(Ct()),de[Se]=_t),!(_t.dataset.start===ze&&_t.dataset.end===rt)&&(_t.dataset.start=ze,_t.dataset.end=rt,_t.style.left=zl(ze,z),_t.style.width=zl(rt-ze,z))}for(var lt=de.length;lt>R.length;lt--)p.el_.removeChild(de[lt-1]);de.length=R.length})},f}(dn);dn.registerComponent("LoadProgressBar",td);var Ld=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update=Bi(Wi(Bn(p),p.update),Di),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},_.update=function(u,p,k){var R=In(this.el_),q=on(this.player_.el()),z=u.width*p;if(!(!q||!R)){var de=u.left-q.left+z,Ee=u.width-z+(q.right-u.right),Se=R.width/2;de<Se?Se+=Se-de:Ee<Se&&(Se=Ee),Se<0?Se=0:Se>R.width&&(Se=R.width),Se=Math.round(Se),this.el_.style.right="-"+Se+"px",this.write(k)}},_.write=function(u){bt(this.el_,u)},_.updateTime=function(u,p,k,R){var q=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var z,de=q.player_.duration();if(q.player_.liveTracker&&q.player_.liveTracker.isLive()){var Ee=q.player_.liveTracker.liveWindow(),Se=Ee-p*Ee;z=(Se<1?"":"-")+Ss(Se,Ee)}else z=Ss(k,de);q.update(u,p,z),R&&R()})},f}(dn);dn.registerComponent("TimeTooltip",Ld);var Ef=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update=Bi(Wi(Bn(p),p.update),Di),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},_.update=function(u,p){var k=this.getChild("timeTooltip");if(k){var R=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();k.updateTime(u,p,R)}},f}(dn);Ef.prototype.options_={children:[]},!Ke&&!Y&&Ef.prototype.options_.children.push("timeTooltip"),dn.registerComponent("PlayProgressBar",Ef);var Js=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update=Bi(Wi(Bn(p),p.update),Di),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},_.update=function(u,p){var k=this,R=p*this.player_.duration();this.getChild("timeTooltip").updateTime(u,p,R,function(){k.el_.style.left=u.width*p+"px"})},f}(dn);Js.prototype.options_={children:["timeTooltip"]},dn.registerComponent("MouseTimeDisplay",Js);var Hd=5,nd=12,If=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.setEventHandlers_(),p}var _=f.prototype;return _.setEventHandlers_=function(){var u=this;this.update_=Wi(this,this.update),this.update=Bi(this.update_,Di),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(p){return u.enableInterval_(p)},this.disableIntervalHandler_=function(p){return u.disableInterval_(p)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.on(document,"visibilitychange",this.toggleVisibility_)},_.toggleVisibility_=function(u){document.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(u)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},_.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Di))},_.disableInterval_=function(u){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&u&&u.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},_.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},_.update=function(u){var p=this;if(document.visibilityState!=="hidden"){var k=S.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var R=p.player_.ended()?p.player_.duration():p.getCurrentTime_(),q=p.player_.liveTracker,z=p.player_.duration();q&&q.isLive()&&(z=p.player_.liveTracker.liveCurrentTime()),p.percent_!==k&&(p.el_.setAttribute("aria-valuenow",(k*100).toFixed(2)),p.percent_=k),(p.currentTime_!==R||p.duration_!==z)&&(p.el_.setAttribute("aria-valuetext",p.localize("progress bar timing: currentTime={1} duration={2}",[Ss(R,z),Ss(z,z)],"{1} of {2}")),p.currentTime_=R,p.duration_=z),p.bar&&p.bar.update(on(p.el()),p.getProgress())}),k}},_.userSeek_=function(u){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(u)},_.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},_.getPercent=function(){var u=this.getCurrentTime_(),p,k=this.player_.liveTracker;return k&&k.isLive()?(p=(u-k.seekableStart())/k.liveWindow(),k.atLiveEdge()&&(p=1)):p=u/this.player_.duration(),p},_.handleMouseDown=function(u){qn(u)&&(u.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),S.prototype.handleMouseDown.call(this,u))},_.handleMouseMove=function(u,p){if(p===void 0&&(p=!1),!!qn(u)){!p&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var k,R=this.calculateDistance(u),q=this.player_.liveTracker;if(!q||!q.isLive())k=R*this.player_.duration(),k===this.player_.duration()&&(k=k-.1);else{if(R>=.99){q.seekToLiveEdge();return}var z=q.seekableStart(),de=q.liveCurrentTime();if(k=z+R*q.liveWindow(),k>=de&&(k=de),k<=z&&(k=z+.1),k===1/0)return}this.userSeek_(k)}},_.enable=function(){S.prototype.enable.call(this);var u=this.getChild("mouseTimeDisplay");u&&u.show()},_.disable=function(){S.prototype.disable.call(this);var u=this.getChild("mouseTimeDisplay");u&&u.hide()},_.handleMouseUp=function(u){S.prototype.handleMouseUp.call(this,u),u&&u.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Cr(this.player_.play()):this.update_()},_.stepForward=function(){this.userSeek_(this.player_.currentTime()+Hd)},_.stepBack=function(){this.userSeek_(this.player_.currentTime()-Hd)},_.handleAction=function(u){this.player_.paused()?this.player_.play():this.player_.pause()},_.handleKeyDown=function(u){var p=this.player_.liveTracker;if(Vn.isEventKey(u,"Space")||Vn.isEventKey(u,"Enter"))u.preventDefault(),u.stopPropagation(),this.handleAction(u);else if(Vn.isEventKey(u,"Home"))u.preventDefault(),u.stopPropagation(),this.userSeek_(0);else if(Vn.isEventKey(u,"End"))u.preventDefault(),u.stopPropagation(),p&&p.isLive()?this.userSeek_(p.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(Vn(u))){u.preventDefault(),u.stopPropagation();var k=(Vn.codes[Vn(u)]-Vn.codes[0])*10/100;p&&p.isLive()?this.userSeek_(p.seekableStart()+p.liveWindow()*k):this.userSeek_(this.player_.duration()*k)}else Vn.isEventKey(u,"PgDn")?(u.preventDefault(),u.stopPropagation(),this.userSeek_(this.player_.currentTime()-Hd*nd)):Vn.isEventKey(u,"PgUp")?(u.preventDefault(),u.stopPropagation(),this.userSeek_(this.player_.currentTime()+Hd*nd)):S.prototype.handleKeyDown.call(this,u)},_.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_),S.prototype.dispose.call(this)},f}(Pf);If.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Ke&&!Y&&If.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),dn.registerComponent("SeekBar",If);var jd=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.handleMouseMove=Bi(Wi(Bn(p),p.handleMouseMove),Di),p.throttledHandleMouseSeek=Bi(Wi(Bn(p),p.handleMouseSeek),Di),p.handleMouseUpHandler_=function(k){return p.handleMouseUp(k)},p.handleMouseDownHandler_=function(k){return p.handleMouseDown(k)},p.enable(),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},_.handleMouseMove=function(u){var p=this.getChild("seekBar");if(p){var k=p.getChild("playProgressBar"),R=p.getChild("mouseTimeDisplay");if(!(!k&&!R)){var q=p.el(),z=In(q),de=dt(q,u).x;de=ku(de,0,1),R&&R.update(z,de),k&&k.update(z,p.getProgress())}}},_.handleMouseSeek=function(u){var p=this.getChild("seekBar");p&&p.handleMouseMove(u)},_.enabled=function(){return this.enabled_},_.disable=function(){if(this.children().forEach(function(p){return p.disable&&p.disable()}),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var u=this.getChild("seekBar");this.player_.scrubbing(!1),u.videoWasPlaying&&Cr(this.player_.play())}},_.enable=function(){this.children().forEach(function(u){return u.enable&&u.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},_.removeListenersAddedOnMousedownAndTouchstart=function(){var u=this.el_.ownerDocument;this.off(u,"mousemove",this.throttledHandleMouseSeek),this.off(u,"touchmove",this.throttledHandleMouseSeek),this.off(u,"mouseup",this.handleMouseUpHandler_),this.off(u,"touchend",this.handleMouseUpHandler_)},_.handleMouseDown=function(u){var p=this.el_.ownerDocument,k=this.getChild("seekBar");k&&k.handleMouseDown(u),this.on(p,"mousemove",this.throttledHandleMouseSeek),this.on(p,"touchmove",this.throttledHandleMouseSeek),this.on(p,"mouseup",this.handleMouseUpHandler_),this.on(p,"touchend",this.handleMouseUpHandler_)},_.handleMouseUp=function(u){var p=this.getChild("seekBar");p&&p.handleMouseUp(u),this.removeListenersAddedOnMousedownAndTouchstart()},f}(dn);jd.prototype.options_={children:["seekBar"]},dn.registerComponent("ProgressControl",jd);var Af=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on(h,["enterpictureinpicture","leavepictureinpicture"],function(k){return p.handlePictureInPictureChange(k)}),p.on(h,["disablepictureinpicturechanged","loadedmetadata"],function(k){return p.handlePictureInPictureEnabledChange(k)}),p.on(h,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){var k=h.currentType().substring(0,5)==="audio";k||h.audioPosterMode()||h.audioOnlyMode()?(h.isInPictureInPicture()&&h.exitPictureInPicture(),p.hide()):p.show()}),p.disable(),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-picture-in-picture-control "+S.prototype.buildCSSClass.call(this)},_.handlePictureInPictureEnabledChange=function(){document.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1?this.enable():this.disable()},_.handlePictureInPictureChange=function(u){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},_.handleClick=function(u){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},f}(Po);Af.prototype.controlText_="Picture-in-Picture",dn.registerComponent("PictureInPictureToggle",Af);var pc=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on(h,"fullscreenchange",function(k){return p.handleFullscreenChange(k)}),document[h.fsApi_.fullscreenEnabled]===!1&&p.disable(),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-fullscreen-control "+S.prototype.buildCSSClass.call(this)},_.handleFullscreenChange=function(u){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},_.handleClick=function(u){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},f}(Po);pc.prototype.controlText_="Fullscreen",dn.registerComponent("FullscreenToggle",pc);var id=function(f,_){_.tech_&&!_.tech_.featuresVolumeControl&&f.addClass("vjs-hidden"),f.on(_,"loadstart",function(){_.tech_.featuresVolumeControl?f.removeClass("vjs-hidden"):f.addClass("vjs-hidden")})},Df=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return u.appendChild(S.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),u},f}(dn);dn.registerComponent("VolumeLevel",Df);var m_=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update=Bi(Wi(Bn(p),p.update),Di),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},_.update=function(u,p,k,R){if(!k){var q=on(this.el_),z=on(this.player_.el()),de=u.width*p;if(!z||!q)return;var Ee=u.left-z.left+de,Se=u.width-de+(z.right-u.right),ze=q.width/2;Ee<ze?ze+=ze-Ee:Se<ze&&(ze=Se),ze<0?ze=0:ze>q.width&&(ze=q.width),this.el_.style.right="-"+ze+"px"}this.write(R+"%")},_.write=function(u){bt(this.el_,u)},_.updateVolume=function(u,p,k,R,q){var z=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){z.update(u,p,k,R.toFixed(0)),q&&q()})},f}(dn);dn.registerComponent("VolumeLevelTooltip",m_);var Su=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.update=Bi(Wi(Bn(p),p.update),Di),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},_.update=function(u,p,k){var R=this,q=100*p;this.getChild("volumeLevelTooltip").updateVolume(u,p,k,q,function(){k?R.el_.style.bottom=u.height*p+"px":R.el_.style.left=u.width*p+"px"})},f}(dn);Su.prototype.options_={children:["volumeLevelTooltip"]},dn.registerComponent("MouseVolumeLevelDisplay",Su);var Qo=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on("slideractive",function(k){return p.updateLastVolume_(k)}),p.on(h,"volumechange",function(k){return p.updateARIAAttributes(k)}),h.ready(function(){return p.updateARIAAttributes()}),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},_.handleMouseDown=function(u){qn(u)&&S.prototype.handleMouseDown.call(this,u)},_.handleMouseMove=function(u){var p=this.getChild("mouseVolumeLevelDisplay");if(p){var k=this.el(),R=on(k),q=this.vertical(),z=dt(k,u);z=q?z.y:z.x,z=ku(z,0,1),p.update(R,z,q)}qn(u)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(u)))},_.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},_.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},_.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},_.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},_.updateARIAAttributes=function(u){var p=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",p),this.el_.setAttribute("aria-valuetext",p+"%")},_.volumeAsPercentage_=function(){return Math.round(this.player_.volume()*100)},_.updateLastVolume_=function(){var u=this,p=this.player_.volume();this.one("sliderinactive",function(){u.player_.volume()===0&&u.player_.lastVolume_(p)})},f}(Pf);Qo.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Ke&&!Y&&Qo.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Qo.prototype.playerEvent="volumechange",dn.registerComponent("VolumeBar",Qo);var rd=function(S){_n(f,S);function f(h,u){var p;return u===void 0&&(u={}),u.vertical=u.vertical||!1,(typeof u.volumeBar>"u"||X(u.volumeBar))&&(u.volumeBar=u.volumeBar||{},u.volumeBar.vertical=u.vertical),p=S.call(this,h,u)||this,id(Bn(p),h),p.throttledHandleMouseMove=Bi(Wi(Bn(p),p.handleMouseMove),Di),p.handleMouseUpHandler_=function(k){return p.handleMouseUp(k)},p.on("mousedown",function(k){return p.handleMouseDown(k)}),p.on("touchstart",function(k){return p.handleMouseDown(k)}),p.on("mousemove",function(k){return p.handleMouseMove(k)}),p.on(p.volumeBar,["focus","slideractive"],function(){p.volumeBar.addClass("vjs-slider-active"),p.addClass("vjs-slider-active"),p.trigger("slideractive")}),p.on(p.volumeBar,["blur","sliderinactive"],function(){p.volumeBar.removeClass("vjs-slider-active"),p.removeClass("vjs-slider-active"),p.trigger("sliderinactive")}),p}var _=f.prototype;return _.createEl=function(){var u="vjs-volume-horizontal";return this.options_.vertical&&(u="vjs-volume-vertical"),S.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+u})},_.handleMouseDown=function(u){var p=this.el_.ownerDocument;this.on(p,"mousemove",this.throttledHandleMouseMove),this.on(p,"touchmove",this.throttledHandleMouseMove),this.on(p,"mouseup",this.handleMouseUpHandler_),this.on(p,"touchend",this.handleMouseUpHandler_)},_.handleMouseUp=function(u){var p=this.el_.ownerDocument;this.off(p,"mousemove",this.throttledHandleMouseMove),this.off(p,"touchmove",this.throttledHandleMouseMove),this.off(p,"mouseup",this.handleMouseUpHandler_),this.off(p,"touchend",this.handleMouseUpHandler_)},_.handleMouseMove=function(u){this.volumeBar.handleMouseMove(u)},f}(dn);rd.prototype.options_={children:["volumeBar"]},dn.registerComponent("VolumeControl",rd);var g_=function(f,_){_.tech_&&!_.tech_.featuresMuteControl&&f.addClass("vjs-hidden"),f.on(_,"loadstart",function(){_.tech_.featuresMuteControl?f.removeClass("vjs-hidden"):f.addClass("vjs-hidden")})},oo=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,g_(Bn(p),h),p.on(h,["loadstart","volumechange"],function(k){return p.update(k)}),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-mute-control "+S.prototype.buildCSSClass.call(this)},_.handleClick=function(u){var p=this.player_.volume(),k=this.player_.lastVolume_();if(p===0){var R=k<.1?.1:k;this.player_.volume(R),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},_.update=function(u){this.updateIcon_(),this.updateControlText_()},_.updateIcon_=function(){var u=this.player_.volume(),p=3;Ke&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),u===0||this.player_.muted()?p=0:u<.33?p=1:u<.67&&(p=2);for(var k=0;k<4;k++)Qe(this.el_,"vjs-vol-"+k);nn(this.el_,"vjs-vol-"+p)},_.updateControlText_=function(){var u=this.player_.muted()||this.player_.volume()===0,p=u?"Unmute":"Mute";this.controlText()!==p&&this.controlText(p)},f}(Po);oo.prototype.controlText_="Mute",dn.registerComponent("MuteToggle",oo);var hc=function(S){_n(f,S);function f(h,u){var p;return u===void 0&&(u={}),typeof u.inline<"u"?u.inline=u.inline:u.inline=!0,(typeof u.volumeControl>"u"||X(u.volumeControl))&&(u.volumeControl=u.volumeControl||{},u.volumeControl.vertical=!u.inline),p=S.call(this,h,u)||this,p.handleKeyPressHandler_=function(k){return p.handleKeyPress(k)},p.on(h,["loadstart"],function(k){return p.volumePanelState_(k)}),p.on(p.muteToggle,"keyup",function(k){return p.handleKeyPress(k)}),p.on(p.volumeControl,"keyup",function(k){return p.handleVolumeControlKeyUp(k)}),p.on("keydown",function(k){return p.handleKeyPress(k)}),p.on("mouseover",function(k){return p.handleMouseOver(k)}),p.on("mouseout",function(k){return p.handleMouseOut(k)}),p.on(p.volumeControl,["slideractive"],p.sliderActive_),p.on(p.volumeControl,["sliderinactive"],p.sliderInactive_),p}var _=f.prototype;return _.sliderActive_=function(){this.addClass("vjs-slider-active")},_.sliderInactive_=function(){this.removeClass("vjs-slider-active")},_.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},_.createEl=function(){var u="vjs-volume-panel-horizontal";return this.options_.inline||(u="vjs-volume-panel-vertical"),S.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+u})},_.dispose=function(){this.handleMouseOut(),S.prototype.dispose.call(this)},_.handleVolumeControlKeyUp=function(u){Vn.isEventKey(u,"Esc")&&this.muteToggle.focus()},_.handleMouseOver=function(u){this.addClass("vjs-hover"),Mi(document,"keyup",this.handleKeyPressHandler_)},_.handleMouseOut=function(u){this.removeClass("vjs-hover"),di(document,"keyup",this.handleKeyPressHandler_)},_.handleKeyPress=function(u){Vn.isEventKey(u,"Esc")&&this.handleMouseOut()},f}(dn);hc.prototype.options_={children:["muteToggle","volumeControl"]},dn.registerComponent("VolumePanel",hc);var lo=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,u&&(p.menuButton_=u.menuButton),p.focusedChild_=-1,p.on("keydown",function(k){return p.handleKeyDown(k)}),p.boundHandleBlur_=function(k){return p.handleBlur(k)},p.boundHandleTapClick_=function(k){return p.handleTapClick(k)},p}var _=f.prototype;return _.addEventListenerForItem=function(u){u instanceof dn&&(this.on(u,"blur",this.boundHandleBlur_),this.on(u,["tap","click"],this.boundHandleTapClick_))},_.removeEventListenerForItem=function(u){u instanceof dn&&(this.off(u,"blur",this.boundHandleBlur_),this.off(u,["tap","click"],this.boundHandleTapClick_))},_.removeChild=function(u){typeof u=="string"&&(u=this.getChild(u)),this.removeEventListenerForItem(u),S.prototype.removeChild.call(this,u)},_.addItem=function(u){var p=this.addChild(u);p&&this.addEventListenerForItem(p)},_.createEl=function(){var u=this.options_.contentElType||"ul";this.contentEl_=Ct(u,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var p=S.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return p.appendChild(this.contentEl_),Mi(p,"click",function(k){k.preventDefault(),k.stopImmediatePropagation()}),p},_.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,S.prototype.dispose.call(this)},_.handleBlur=function(u){var p=u.relatedTarget||document.activeElement;if(!this.children().some(function(R){return R.el()===p})){var k=this.menuButton_;k&&k.buttonPressed_&&p!==k.el().firstChild&&k.unpressButton()}},_.handleTapClick=function(u){if(this.menuButton_){this.menuButton_.unpressButton();var p=this.children();if(!Array.isArray(p))return;var k=p.filter(function(R){return R.el()===u.target})[0];if(!k)return;k.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}},_.handleKeyDown=function(u){Vn.isEventKey(u,"Left")||Vn.isEventKey(u,"Down")?(u.preventDefault(),u.stopPropagation(),this.stepForward()):(Vn.isEventKey(u,"Right")||Vn.isEventKey(u,"Up"))&&(u.preventDefault(),u.stopPropagation(),this.stepBack())},_.stepForward=function(){var u=0;this.focusedChild_!==void 0&&(u=this.focusedChild_+1),this.focus(u)},_.stepBack=function(){var u=0;this.focusedChild_!==void 0&&(u=this.focusedChild_-1),this.focus(u)},_.focus=function(u){u===void 0&&(u=0);var p=this.children().slice(),k=p.length&&p[0].hasClass("vjs-menu-title");k&&p.shift(),p.length>0&&(u<0?u=0:u>=p.length&&(u=p.length-1),this.focusedChild_=u,p[u].el_.focus())},f}(dn);dn.registerComponent("Menu",lo);var Ho=function(S){_n(f,S);function f(h,u){var p;u===void 0&&(u={}),p=S.call(this,h,u)||this,p.menuButton_=new Po(h,u),p.menuButton_.controlText(p.controlText_),p.menuButton_.el_.setAttribute("aria-haspopup","true");var k=Po.prototype.buildCSSClass();p.menuButton_.el_.className=p.buildCSSClass()+" "+k,p.menuButton_.removeClass("vjs-control"),p.addChild(p.menuButton_),p.update(),p.enabled_=!0;var R=function(z){return p.handleClick(z)};return p.handleMenuKeyUp_=function(q){return p.handleMenuKeyUp(q)},p.on(p.menuButton_,"tap",R),p.on(p.menuButton_,"click",R),p.on(p.menuButton_,"keydown",function(q){return p.handleKeyDown(q)}),p.on(p.menuButton_,"mouseenter",function(){p.addClass("vjs-hover"),p.menu.show(),Mi(document,"keyup",p.handleMenuKeyUp_)}),p.on("mouseleave",function(q){return p.handleMouseLeave(q)}),p.on("keydown",function(q){return p.handleSubmenuKeyDown(q)}),p}var _=f.prototype;return _.update=function(){var u=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=u,this.addChild(u),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},_.createMenu=function(){var u=new lo(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var p=Ct("li",{className:"vjs-menu-title",textContent:Si(this.options_.title),tabIndex:-1}),k=new dn(this.player_,{el:p});u.addItem(k)}if(this.items=this.createItems(),this.items)for(var R=0;R<this.items.length;R++)u.addItem(this.items[R]);return u},_.createItems=function(){},_.createEl=function(){return S.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},_.buildWrapperCSSClass=function(){var u="vjs-menu-button";this.options_.inline===!0?u+="-inline":u+="-popup";var p=Po.prototype.buildCSSClass();return"vjs-menu-button "+u+" "+p+" "+S.prototype.buildCSSClass.call(this)},_.buildCSSClass=function(){var u="vjs-menu-button";return this.options_.inline===!0?u+="-inline":u+="-popup","vjs-menu-button "+u+" "+S.prototype.buildCSSClass.call(this)},_.controlText=function(u,p){return p===void 0&&(p=this.menuButton_.el()),this.menuButton_.controlText(u,p)},_.dispose=function(){this.handleMouseLeave(),S.prototype.dispose.call(this)},_.handleClick=function(u){this.buttonPressed_?this.unpressButton():this.pressButton()},_.handleMouseLeave=function(u){this.removeClass("vjs-hover"),di(document,"keyup",this.handleMenuKeyUp_)},_.focus=function(){this.menuButton_.focus()},_.blur=function(){this.menuButton_.blur()},_.handleKeyDown=function(u){Vn.isEventKey(u,"Esc")||Vn.isEventKey(u,"Tab")?(this.buttonPressed_&&this.unpressButton(),Vn.isEventKey(u,"Tab")||(u.preventDefault(),this.menuButton_.focus())):(Vn.isEventKey(u,"Up")||Vn.isEventKey(u,"Down"))&&(this.buttonPressed_||(u.preventDefault(),this.pressButton()))},_.handleMenuKeyUp=function(u){(Vn.isEventKey(u,"Esc")||Vn.isEventKey(u,"Tab"))&&this.removeClass("vjs-hover")},_.handleSubmenuKeyPress=function(u){this.handleSubmenuKeyDown(u)},_.handleSubmenuKeyDown=function(u){(Vn.isEventKey(u,"Esc")||Vn.isEventKey(u,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),Vn.isEventKey(u,"Tab")||(u.preventDefault(),this.menuButton_.focus()))},_.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Ke&&st())return;this.menu.focus()}},_.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},_.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},_.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},f}(dn);dn.registerComponent("MenuButton",Ho);var Yl=function(S){_n(f,S);function f(_,h){var u,p=h.tracks;if(u=S.call(this,_,h)||this,u.items.length<=1&&u.hide(),!p)return Bn(u);var k=Wi(Bn(u),u.update);return p.addEventListener("removetrack",k),p.addEventListener("addtrack",k),p.addEventListener("labelchange",k),u.player_.on("ready",k),u.player_.on("dispose",function(){p.removeEventListener("removetrack",k),p.removeEventListener("addtrack",k),p.removeEventListener("labelchange",k)}),u}return f}(Ho);dn.registerComponent("TrackButton",Yl);var Of=["Tab","Esc","Up","Down","Right","Left"],Cu=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.selectable=u.selectable,p.isSelected_=u.selected||!1,p.multiSelectable=u.multiSelectable,p.selected(p.isSelected_),p.selectable?p.multiSelectable?p.el_.setAttribute("role","menuitemcheckbox"):p.el_.setAttribute("role","menuitemradio"):p.el_.setAttribute("role","menuitem"),p}var _=f.prototype;return _.createEl=function(u,p,k){this.nonIconControl=!0;var R=S.prototype.createEl.call(this,"li",V({className:"vjs-menu-item",tabIndex:-1},p),k);return R.replaceChild(Ct("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),R.querySelector(".vjs-icon-placeholder")),R},_.handleKeyDown=function(u){Of.some(function(p){return Vn.isEventKey(u,p)})||S.prototype.handleKeyDown.call(this,u)},_.handleClick=function(u){this.selected(!0)},_.selected=function(u){this.selectable&&(u?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},f}(le);dn.registerComponent("MenuItem",Cu);var Jo=function(S){_n(f,S);function f(h,u){var p,k=u.track,R=h.textTracks();u.label=k.label||k.language||"Unknown",u.selected=k.mode==="showing",p=S.call(this,h,u)||this,p.track=k,p.kinds=(u.kinds||[u.kind||p.track.kind]).filter(Boolean);var q=function(){for(var Se=arguments.length,ze=new Array(Se),rt=0;rt<Se;rt++)ze[rt]=arguments[rt];p.handleTracksChange.apply(Bn(p),ze)},z=function(){for(var Se=arguments.length,ze=new Array(Se),rt=0;rt<Se;rt++)ze[rt]=arguments[rt];p.handleSelectedLanguageChange.apply(Bn(p),ze)};if(h.on(["loadstart","texttrackchange"],q),R.addEventListener("change",q),R.addEventListener("selectedlanguagechange",z),p.on("dispose",function(){h.off(["loadstart","texttrackchange"],q),R.removeEventListener("change",q),R.removeEventListener("selectedlanguagechange",z)}),R.onchange===void 0){var de;p.on(["tap","click"],function(){if(typeof window.Event!="object")try{de=new window.Event("change")}catch{}de||(de=document.createEvent("Event"),de.initEvent("change",!0,!0)),R.dispatchEvent(de)})}return p.handleTracksChange(),p}var _=f.prototype;return _.handleClick=function(u){var p=this.track,k=this.player_.textTracks();if(S.prototype.handleClick.call(this,u),!!k)for(var R=0;R<k.length;R++){var q=k[R];this.kinds.indexOf(q.kind)!==-1&&(q===p?q.mode!=="showing"&&(q.mode="showing"):q.mode!=="disabled"&&(q.mode="disabled"))}},_.handleTracksChange=function(u){var p=this.track.mode==="showing";p!==this.isSelected_&&this.selected(p)},_.handleSelectedLanguageChange=function(u){if(this.track.mode==="showing"){var p=this.player_.cache_.selectedLanguage;if(p&&p.enabled&&p.language===this.track.language&&p.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},_.dispose=function(){this.track=null,S.prototype.dispose.call(this)},f}(Cu);dn.registerComponent("TextTrackMenuItem",Jo);var uo=function(S){_n(f,S);function f(h,u){return u.track={player:h,kind:u.kind,kinds:u.kinds,default:!1,mode:"disabled"},u.kinds||(u.kinds=[u.kind]),u.label?u.track.label=u.label:u.track.label=u.kinds.join(" and ")+" off",u.selectable=!0,u.multiSelectable=!1,S.call(this,h,u)||this}var _=f.prototype;return _.handleTracksChange=function(u){for(var p=this.player().textTracks(),k=!0,R=0,q=p.length;R<q;R++){var z=p[R];if(this.options_.kinds.indexOf(z.kind)>-1&&z.mode==="showing"){k=!1;break}}k!==this.isSelected_&&this.selected(k)},_.handleSelectedLanguageChange=function(u){for(var p=this.player().textTracks(),k=!0,R=0,q=p.length;R<q;R++){var z=p[R];if(["captions","descriptions","subtitles"].indexOf(z.kind)>-1&&z.mode==="showing"){k=!1;break}}k&&(this.player_.cache_.selectedLanguage={enabled:!1})},f}(Jo);dn.registerComponent("OffTextTrackMenuItem",uo);var Gl=function(S){_n(f,S);function f(h,u){return u===void 0&&(u={}),u.tracks=h.textTracks(),S.call(this,h,u)||this}var _=f.prototype;return _.createItems=function(u,p){u===void 0&&(u=[]),p===void 0&&(p=Jo);var k;this.label_&&(k=this.label_+" off"),u.push(new uo(this.player_,{kinds:this.kinds_,kind:this.kind_,label:k})),this.hideThreshold_+=1;var R=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var q=0;q<R.length;q++){var z=R[q];if(this.kinds_.indexOf(z.kind)>-1){var de=new p(this.player_,{track:z,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});de.addClass("vjs-"+z.kind+"-menu-item"),u.push(de)}}return u},f}(Yl);dn.registerComponent("TextTrackButton",Gl);var Kl=function(S){_n(f,S);function f(h,u){var p,k=u.track,R=u.cue,q=h.currentTime();return u.selectable=!0,u.multiSelectable=!1,u.label=R.text,u.selected=R.startTime<=q&&q<R.endTime,p=S.call(this,h,u)||this,p.track=k,p.cue=R,p}var _=f.prototype;return _.handleClick=function(u){S.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},f}(Cu);dn.registerComponent("ChaptersTrackMenuItem",Kl);var Xl=function(S){_n(f,S);function f(h,u,p){var k;return k=S.call(this,h,u,p)||this,k.selectCurrentItem_=function(){k.items.forEach(function(R){R.selected(k.track_.activeCues[0]===R.cue)})},k}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-chapters-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-chapters-button "+S.prototype.buildWrapperCSSClass.call(this)},_.update=function(u){if(!(u&&u.track&&u.track.kind!=="chapters")){var p=this.findChaptersTrack();p!==this.track_?(this.setTrack(p),S.prototype.update.call(this)):(!this.items||p&&p.cues&&p.cues.length!==this.items.length)&&S.prototype.update.call(this)}},_.setTrack=function(u){if(this.track_!==u){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var p=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);p&&p.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=u,this.track_){this.track_.mode="hidden";var k=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);k&&k.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},_.findChaptersTrack=function(){for(var u=this.player_.textTracks()||[],p=u.length-1;p>=0;p--){var k=u[p];if(k.kind===this.kind_)return k}},_.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Si(this.kind_))},_.createMenu=function(){return this.options_.title=this.getMenuCaption(),S.prototype.createMenu.call(this)},_.createItems=function(){var u=[];if(!this.track_)return u;var p=this.track_.cues;if(!p)return u;for(var k=0,R=p.length;k<R;k++){var q=p[k],z=new Kl(this.player_,{track:this.track_,cue:q});u.push(z)}return u},f}(Gl);Xl.prototype.kind_="chapters",Xl.prototype.controlText_="Chapters",dn.registerComponent("ChaptersButton",Xl);var fo=function(S){_n(f,S);function f(h,u,p){var k;k=S.call(this,h,u,p)||this;var R=h.textTracks(),q=Wi(Bn(k),k.handleTracksChange);return R.addEventListener("change",q),k.on("dispose",function(){R.removeEventListener("change",q)}),k}var _=f.prototype;return _.handleTracksChange=function(u){for(var p=this.player().textTracks(),k=!1,R=0,q=p.length;R<q;R++){var z=p[R];if(z.kind!==this.kind_&&z.mode==="showing"){k=!0;break}}k?this.disable():this.enable()},_.buildCSSClass=function(){return"vjs-descriptions-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+S.prototype.buildWrapperCSSClass.call(this)},f}(Gl);fo.prototype.kind_="descriptions",fo.prototype.controlText_="Descriptions",dn.registerComponent("DescriptionsButton",fo);var Mf=function(S){_n(f,S);function f(h,u,p){return S.call(this,h,u,p)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-subtitles-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+S.prototype.buildWrapperCSSClass.call(this)},f}(Gl);Mf.prototype.kind_="subtitles",Mf.prototype.controlText_="Subtitles",dn.registerComponent("SubtitlesButton",Mf);var Zs=function(S){_n(f,S);function f(h,u){var p;return u.track={player:h,kind:u.kind,label:u.kind+" settings",selectable:!1,default:!1,mode:"disabled"},u.selectable=!1,u.name="CaptionSettingsMenuItem",p=S.call(this,h,u)||this,p.addClass("vjs-texttrack-settings"),p.controlText(", opens "+u.kind+" settings dialog"),p}var _=f.prototype;return _.handleClick=function(u){this.player().getChild("textTrackSettings").open()},f}(Jo);dn.registerComponent("CaptionSettingsMenuItem",Zs);var xf=function(S){_n(f,S);function f(h,u,p){return S.call(this,h,u,p)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-captions-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-captions-button "+S.prototype.buildWrapperCSSClass.call(this)},_.createItems=function(){var u=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(u.push(new Zs(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),S.prototype.createItems.call(this,u)},f}(Gl);xf.prototype.kind_="captions",xf.prototype.controlText_="Captions",dn.registerComponent("CaptionsButton",xf);var Pu=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(u,p,k){var R=S.prototype.createEl.call(this,u,p,k),q=R.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(q.appendChild(Ct("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),q.appendChild(Ct("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),R},f}(Jo);dn.registerComponent("SubsCapsMenuItem",Pu);var Rf=function(S){_n(f,S);function f(h,u){var p;return u===void 0&&(u={}),p=S.call(this,h,u)||this,p.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(p.player_.language_)>-1&&(p.label_="captions"),p.menuButton_.controlText(Si(p.label_)),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-subs-caps-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+S.prototype.buildWrapperCSSClass.call(this)},_.createItems=function(){var u=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(u.push(new Zs(this.player_,{kind:this.label_})),this.hideThreshold_+=1),u=S.prototype.createItems.call(this,u,Pu),u},f}(Gl);Rf.prototype.kinds_=["captions","subtitles"],Rf.prototype.controlText_="Subtitles",dn.registerComponent("SubsCapsButton",Rf);var g=function(S){_n(f,S);function f(h,u){var p,k=u.track,R=h.audioTracks();u.label=k.label||k.language||"Unknown",u.selected=k.enabled,p=S.call(this,h,u)||this,p.track=k,p.addClass("vjs-"+k.kind+"-menu-item");var q=function(){for(var de=arguments.length,Ee=new Array(de),Se=0;Se<de;Se++)Ee[Se]=arguments[Se];p.handleTracksChange.apply(Bn(p),Ee)};return R.addEventListener("change",q),p.on("dispose",function(){R.removeEventListener("change",q)}),p}var _=f.prototype;return _.createEl=function(u,p,k){var R=S.prototype.createEl.call(this,u,p,k),q=R.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="main-desc"&&(q.appendChild(Ct("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),q.appendChild(Ct("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),R},_.handleClick=function(u){if(S.prototype.handleClick.call(this,u),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var p=this.player_.audioTracks(),k=0;k<p.length;k++){var R=p[k];R!==this.track&&(R.enabled=R===this.track)}},_.handleTracksChange=function(u){this.selected(this.track.enabled)},f}(Cu);dn.registerComponent("AudioTrackMenuItem",g);var C=function(S){_n(f,S);function f(h,u){return u===void 0&&(u={}),u.tracks=h.audioTracks(),S.call(this,h,u)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-audio-button "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-audio-button "+S.prototype.buildWrapperCSSClass.call(this)},_.createItems=function(u){u===void 0&&(u=[]),this.hideThreshold_=1;for(var p=this.player_.audioTracks(),k=0;k<p.length;k++){var R=p[k];u.push(new g(this.player_,{track:R,selectable:!0,multiSelectable:!1}))}return u},f}(Yl);C.prototype.controlText_="Audio Track",dn.registerComponent("AudioTrackButton",C);var x=function(S){_n(f,S);function f(h,u){var p,k=u.rate,R=parseFloat(k,10);return u.label=k,u.selected=R===h.playbackRate(),u.selectable=!0,u.multiSelectable=!1,p=S.call(this,h,u)||this,p.label=k,p.rate=R,p.on(h,"ratechange",function(q){return p.update(q)}),p}var _=f.prototype;return _.handleClick=function(u){S.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},_.update=function(u){this.selected(this.player().playbackRate()===this.rate)},f}(Cu);x.prototype.contentElType="button",dn.registerComponent("PlaybackRateMenuItem",x);var N=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.menuButton_.el_.setAttribute("aria-describedby",p.labelElId_),p.updateVisibility(),p.updateLabel(),p.on(h,"loadstart",function(k){return p.updateVisibility(k)}),p.on(h,"ratechange",function(k){return p.updateLabel(k)}),p.on(h,"playbackrateschange",function(k){return p.handlePlaybackRateschange(k)}),p}var _=f.prototype;return _.createEl=function(){var u=S.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ct("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),u.appendChild(this.labelEl_),u},_.dispose=function(){this.labelEl_=null,S.prototype.dispose.call(this)},_.buildCSSClass=function(){return"vjs-playback-rate "+S.prototype.buildCSSClass.call(this)},_.buildWrapperCSSClass=function(){return"vjs-playback-rate "+S.prototype.buildWrapperCSSClass.call(this)},_.createItems=function(){for(var u=this.playbackRates(),p=[],k=u.length-1;k>=0;k--)p.push(new x(this.player(),{rate:u[k]+"x"}));return p},_.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},_.handleClick=function(u){var p=this.player().playbackRate(),k=this.playbackRates(),R=k.indexOf(p),q=(R+1)%k.length;this.player().playbackRate(k[q])},_.handlePlaybackRateschange=function(u){this.update()},_.playbackRates=function(){var u=this.player();return u.playbackRates&&u.playbackRates()||[]},_.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},_.updateVisibility=function(u){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},_.updateLabel=function(u){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},f}(Ho);N.prototype.controlText_="Playback Rate",dn.registerComponent("PlaybackRateMenuButton",N);var B=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-spacer "+S.prototype.buildCSSClass.call(this)},_.createEl=function(u,p,k){return u===void 0&&(u="div"),p===void 0&&(p={}),k===void 0&&(k={}),p.className||(p.className=this.buildCSSClass()),S.prototype.createEl.call(this,u,p,k)},f}(dn);dn.registerComponent("Spacer",B);var J=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-custom-control-spacer "+S.prototype.buildCSSClass.call(this)},_.createEl=function(){return S.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},f}(B);dn.registerComponent("CustomControlSpacer",J);var oe=function(S){_n(f,S);function f(){return S.apply(this,arguments)||this}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},f}(dn);oe.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in document&&oe.prototype.options_.children.splice(oe.prototype.options_.children.length-1,0,"pictureInPictureToggle"),dn.registerComponent("ControlBar",oe);var ye=function(S){_n(f,S);function f(h,u){var p;return p=S.call(this,h,u)||this,p.on(h,"error",function(k){return p.open(k)}),p}var _=f.prototype;return _.buildCSSClass=function(){return"vjs-error-display "+S.prototype.buildCSSClass.call(this)},_.content=function(){var u=this.player().error();return u?this.localize(u.message):""},f}(wa);ye.prototype.options_=F({},wa.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),dn.registerComponent("ErrorDisplay",ye);var fe="vjs-text-track-settings",Ie=["#000","Black"],Fe=["#00F","Blue"],je=["#0FF","Cyan"],ut=["#0F0","Green"],Pt=["#F0F","Magenta"],Ot=["#F00","Red"],Lt=["#FFF","White"],Gt=["#FF0","Yellow"],Cn=["1","Opaque"],ii=["0.5","Semi-Transparent"],si=["0","Transparent"],Li={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ie,Lt,Ot,ut,Fe,Gt,Pt,je]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Cn,ii,si]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Lt,Ie,Ot,ut,Fe,Gt,Pt,je]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(f){return f==="1.00"?null:Number(f)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Cn,ii]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[si,ii,Cn]}};Li.windowColor.options=Li.backgroundColor.options;function Qi(S,f){if(f&&(S=f(S)),S&&S!=="none")return S}function Jr(S,f){var _=S.options[S.options.selectedIndex].value;return Qi(_,f)}function Mr(S,f,_){if(f){for(var h=0;h<S.options.length;h++)if(Qi(S.options[h].value,_)===f){S.selectedIndex=h;break}}}var Zr=function(S){_n(f,S);function f(h,u){var p;return u.temporary=!1,p=S.call(this,h,u)||this,p.updateDisplay=p.updateDisplay.bind(Bn(p)),p.fill(),p.hasBeenOpened_=p.hasBeenFilled_=!0,p.endDialog=Ct("p",{className:"vjs-control-text",textContent:p.localize("End of dialog window.")}),p.el().appendChild(p.endDialog),p.setDefaults(),u.persistTextTrackSettings===void 0&&(p.options_.persistTextTrackSettings=p.options_.playerOptions.persistTextTrackSettings),p.on(p.$(".vjs-done-button"),"click",function(){p.saveSettings(),p.close()}),p.on(p.$(".vjs-default-button"),"click",function(){p.setDefaults(),p.updateDisplay()}),j(Li,function(k){p.on(p.$(k.selector),"change",p.updateDisplay)}),p.options_.persistTextTrackSettings&&p.restoreSettings(),p}var _=f.prototype;return _.dispose=function(){this.endDialog=null,S.prototype.dispose.call(this)},_.createElSelect_=function(u,p,k){var R=this;p===void 0&&(p=""),k===void 0&&(k="label");var q=Li[u],z=q.id.replace("%s",this.id_),de=[p,z].join(" ").trim();return["<"+k+' id="'+z+'" class="'+(k==="label"?"vjs-label":"")+'">',this.localize(q.label),"</"+k+">",'<select aria-labelledby="'+de+'">'].concat(q.options.map(function(Ee){var Se=z+"-"+Ee[1].replace(/\W+/g,"");return['<option id="'+Se+'" value="'+Ee[0]+'" ','aria-labelledby="'+de+" "+Se+'">',R.localize(Ee[1]),"</option>"].join("")})).concat("</select>").join("")},_.createElFgColor_=function(){var u="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",u),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",u),"</span>","</fieldset>"].join("")},_.createElBgColor_=function(){var u="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",u),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",u),"</span>","</fieldset>"].join("")},_.createElWinColor_=function(){var u="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+u+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",u),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",u),"</span>","</fieldset>"].join("")},_.createElColors_=function(){return Ct("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},_.createElFont_=function(){return Ct("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},_.createElControls_=function(){var u=this.localize("restore all settings to the default values");return Ct("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+u+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+u+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},_.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},_.label=function(){return this.localize("Caption Settings Dialog")},_.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},_.buildCSSClass=function(){return S.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},_.getValues=function(){var u=this;return H(Li,function(p,k,R){var q=Jr(u.$(k.selector),k.parser);return q!==void 0&&(p[R]=q),p},{})},_.setValues=function(u){var p=this;j(Li,function(k,R){Mr(p.$(k.selector),u[R],k.parser)})},_.setDefaults=function(){var u=this;j(Li,function(p){var k=p.hasOwnProperty("default")?p.default:0;u.$(p.selector).selectedIndex=k})},_.restoreSettings=function(){var u;try{u=JSON.parse(window.localStorage.getItem(fe))}catch(p){I.warn(p)}u&&this.setValues(u)},_.saveSettings=function(){if(this.options_.persistTextTrackSettings){var u=this.getValues();try{Object.keys(u).length?window.localStorage.setItem(fe,JSON.stringify(u)):window.localStorage.removeItem(fe)}catch(p){I.warn(p)}}},_.updateDisplay=function(){var u=this.player_.getChild("textTrackDisplay");u&&u.updateDisplay()},_.conditionalBlur_=function(){this.previouslyActiveEl_=null;var u=this.player_.controlBar,p=u&&u.subsCapsButton,k=u&&u.captionsButton;p?p.focus():k&&k.focus()},f}(wa);dn.registerComponent("TextTrackSettings",Zr);var ba=function(S){_n(f,S);function f(h,u){var p,k=u.ResizeObserver||window.ResizeObserver;u.ResizeObserver===null&&(k=!1);var R=yi({createEl:!k,reportTouchActivity:!1},u);return p=S.call(this,h,R)||this,p.ResizeObserver=u.ResizeObserver||window.ResizeObserver,p.loadListener_=null,p.resizeObserver_=null,p.debouncedHandler_=_a(function(){p.resizeHandler()},100,!1,Bn(p)),k?(p.resizeObserver_=new p.ResizeObserver(p.debouncedHandler_),p.resizeObserver_.observe(h.el())):(p.loadListener_=function(){if(!(!p.el_||!p.el_.contentWindow)){var q=p.debouncedHandler_,z=p.unloadListener_=function(){di(this,"resize",q),di(this,"unload",z),z=null};Mi(p.el_.contentWindow,"unload",z),Mi(p.el_.contentWindow,"resize",q)}},p.one("load",p.loadListener_)),p}var _=f.prototype;return _.createEl=function(){return S.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},_.resizeHandler=function(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")},_.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,S.prototype.dispose.call(this)},f}(dn);dn.registerComponent("ResizeManager",ba);var hs={trackingThreshold:20,liveTolerance:15},ms=function(S){_n(f,S);function f(h,u){var p,k=yi(hs,u,{createEl:!1});return p=S.call(this,h,k)||this,p.handleVisibilityChange_=function(R){return p.handleVisibilityChange(R)},p.trackLiveHandler_=function(){return p.trackLive_()},p.handlePlay_=function(R){return p.handlePlay(R)},p.handleFirstTimeupdate_=function(R){return p.handleFirstTimeupdate(R)},p.handleSeeked_=function(R){return p.handleSeeked(R)},p.seekToLiveEdge_=function(R){return p.seekToLiveEdge(R)},p.reset_(),p.on(p.player_,"durationchange",function(R){return p.handleDurationchange(R)}),p.on(p.player_,"canplay",function(){return p.toggleTracking()}),G&&"hidden"in document&&"visibilityState"in document&&p.on(document,"visibilitychange",p.handleVisibilityChange_),p}var _=f.prototype;return _.handleVisibilityChange=function(){this.player_.duration()===1/0&&(document.hidden?this.stopTracking():this.startTracking())},_.trackLive_=function(){var u=this.player_.seekable();if(!(!u||!u.length)){var p=Number(window.performance.now().toFixed(4)),k=this.lastTime_===-1?0:(p-this.lastTime_)/1e3;this.lastTime_=p,this.pastSeekEnd_=this.pastSeekEnd()+k;var R=this.liveCurrentTime(),q=this.player_.currentTime(),z=this.player_.paused()||this.seekedBehindLive_||Math.abs(R-q)>this.options_.liveTolerance;(!this.timeupdateSeen_||R===1/0)&&(z=!1),z!==this.behindLiveEdge_&&(this.behindLiveEdge_=z,this.trigger("liveedgechange"))}},_.handleDurationchange=function(){this.toggleTracking()},_.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},_.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Di),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},_.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},_.handleSeeked=function(){var u=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&u>2,this.nextSeekedFromUser_=!1,this.trackLive_()},_.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},_.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},_.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},_.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},_.seekableEnd=function(){for(var u=this.player_.seekable(),p=[],k=u?u.length:0;k--;)p.push(u.end(k));return p.length?p.sort()[p.length-1]:1/0},_.seekableStart=function(){for(var u=this.player_.seekable(),p=[],k=u?u.length:0;k--;)p.push(u.start(k));return p.length?p.sort()[0]:0},_.liveWindow=function(){var u=this.liveCurrentTime();return u===1/0?0:u-this.seekableStart()},_.isLive=function(){return this.isTracking()},_.atLiveEdge=function(){return!this.behindLiveEdge()},_.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},_.pastSeekEnd=function(){var u=this.seekableEnd();return this.lastSeekEnd_!==-1&&u!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=u,this.pastSeekEnd_},_.behindLiveEdge=function(){return this.behindLiveEdge_},_.isTracking=function(){return typeof this.trackingInterval_=="number"},_.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},_.dispose=function(){this.off(document,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),S.prototype.dispose.call(this)},f}(dn);dn.registerComponent("LiveTracker",ms);var Da=function(f){var _=f.el();if(_.hasAttribute("src"))return f.triggerSourceset(_.src),!0;var h=f.$$("source"),u=[],p="";if(!h.length)return!1;for(var k=0;k<h.length;k++){var R=h[k].src;R&&u.indexOf(R)===-1&&u.push(R)}return u.length?(u.length===1&&(p=u[0]),f.triggerSourceset(p),!0):!1},gs=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(f){var _=document.createElement(this.nodeName.toLowerCase());_.innerHTML=f;for(var h=document.createDocumentFragment();_.childNodes.length;)h.appendChild(_.childNodes[0]);return this.innerText="",window.Element.prototype.appendChild.call(this,h),this.innerHTML}}),Ql=function(f,_){for(var h={},u=0;u<f.length&&(h=Object.getOwnPropertyDescriptor(f[u],_),!(h&&h.set&&h.get));u++);return h.enumerable=!0,h.configurable=!0,h},kl=function(f){return Ql([f.el(),window.HTMLMediaElement.prototype,window.Element.prototype,gs],"innerHTML")},Sl=function(f){var _=f.el();if(!_.resetSourceWatch_){var h={},u=kl(f),p=function(R){return function(){for(var q=arguments.length,z=new Array(q),de=0;de<q;de++)z[de]=arguments[de];var Ee=R.apply(_,z);return Da(f),Ee}};["append","appendChild","insertAdjacentHTML"].forEach(function(k){_[k]&&(h[k]=_[k],_[k]=p(h[k]))}),Object.defineProperty(_,"innerHTML",yi(u,{set:p(u.set)})),_.resetSourceWatch_=function(){_.resetSourceWatch_=null,Object.keys(h).forEach(function(k){_[k]=h[k]}),Object.defineProperty(_,"innerHTML",u)},f.one("sourceset",_.resetSourceWatch_)}},$f=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ta(window.Element.prototype.getAttribute.call(this,"src")):""},set:function(f){return window.Element.prototype.setAttribute.call(this,"src",f),f}}),qp=function(f){return Ql([f.el(),window.HTMLMediaElement.prototype,$f],"src")},Bm=function(f){if(f.featuresSourceset){var _=f.el();if(!_.resetSourceset_){var h=qp(f),u=_.setAttribute,p=_.load;Object.defineProperty(_,"src",yi(h,{set:function(R){var q=h.set.call(_,R);return f.triggerSourceset(_.src),q}})),_.setAttribute=function(k,R){var q=u.call(_,k,R);return/src/i.test(k)&&f.triggerSourceset(_.src),q},_.load=function(){var k=p.call(_);return Da(f)||(f.triggerSourceset(""),Sl(f)),k},_.currentSrc?f.triggerSourceset(_.currentSrc):Da(f)||Sl(f),_.resetSourceset_=function(){_.resetSourceset_=null,_.load=p,_.setAttribute=u,Object.defineProperty(_,"src",h),_.resetSourceWatch_&&_.resetSourceWatch_()}}}},Jl=function(f,_,h,u){u===void 0&&(u=!0);var p=function(q){return Object.defineProperty(f,_,{value:q,enumerable:!0,writable:!0})},k={configurable:!0,enumerable:!0,get:function(){var q=h();return p(q),q}};return u&&(k.set=p),Object.defineProperty(f,_,k)},Qn=function(S){_n(f,S);function f(h,u){var p;p=S.call(this,h,u)||this;var k=h.source,R=!1;if(p.featuresVideoFrameCallback=p.featuresVideoFrameCallback&&p.el_.tagName==="VIDEO",k&&(p.el_.currentSrc!==k.src||h.tag&&h.tag.initNetworkState_===3)?p.setSource(k):p.handleLateInit_(p.el_),h.enableSourceset&&p.setupSourcesetHandling_(),p.isScrubbing_=!1,p.el_.hasChildNodes()){for(var q=p.el_.childNodes,z=q.length,de=[];z--;){var Ee=q[z],Se=Ee.nodeName.toLowerCase();Se==="track"&&(p.featuresNativeTextTracks?(p.remoteTextTrackEls().addTrackElement_(Ee),p.remoteTextTracks().addTrack(Ee.track),p.textTracks().addTrack(Ee.track),!R&&!p.el_.hasAttribute("crossorigin")&&$r(Ee.src)&&(R=!0)):de.push(Ee))}for(var ze=0;ze<de.length;ze++)p.el_.removeChild(de[ze])}return p.proxyNativeTracks_(),p.featuresNativeTextTracks&&R&&I.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),p.restoreMetadataTracksInIOSNativePlayer_(),(De||Ve||Me)&&h.nativeControlsForTouch===!0&&p.setControls(!0),p.proxyWebkitFullscreen_(),p.triggerReady(),p}var _=f.prototype;return _.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),f.disposeMediaElement(this.el_),this.options_=null,S.prototype.dispose.call(this)},_.setupSourcesetHandling_=function(){Bm(this)},_.restoreMetadataTracksInIOSNativePlayer_=function(){var u=this.textTracks(),p,k=function(){p=[];for(var z=0;z<u.length;z++){var de=u[z];de.kind==="metadata"&&p.push({track:de,storedMode:de.mode})}};k(),u.addEventListener("change",k),this.on("dispose",function(){return u.removeEventListener("change",k)});var R=function q(){for(var z=0;z<p.length;z++){var de=p[z];de.track.mode==="disabled"&&de.track.mode!==de.storedMode&&(de.track.mode=de.storedMode)}u.removeEventListener("change",q)};this.on("webkitbeginfullscreen",function(){u.removeEventListener("change",k),u.removeEventListener("change",R),u.addEventListener("change",R)}),this.on("webkitendfullscreen",function(){u.removeEventListener("change",k),u.addEventListener("change",k),u.removeEventListener("change",R)})},_.overrideNative_=function(u,p){var k=this;if(p===this["featuresNative"+u+"Tracks"]){var R=u.toLowerCase();this[R+"TracksListeners_"]&&Object.keys(this[R+"TracksListeners_"]).forEach(function(q){var z=k.el()[R+"Tracks"];z.removeEventListener(q,k[R+"TracksListeners_"][q])}),this["featuresNative"+u+"Tracks"]=!p,this[R+"TracksListeners_"]=null,this.proxyNativeTracksForType_(R)}},_.overrideNativeAudioTracks=function(u){this.overrideNative_("Audio",u)},_.overrideNativeVideoTracks=function(u){this.overrideNative_("Video",u)},_.proxyNativeTracksForType_=function(u){var p=this,k=yr[u],R=this.el()[k.getterName],q=this[k.getterName]();if(!(!this["featuresNative"+k.capitalName+"Tracks"]||!R||!R.addEventListener)){var z={change:function(Se){var ze={type:"change",target:q,currentTarget:q,srcElement:q};q.trigger(ze),u==="text"&&p[ka.remoteText.getterName]().trigger(ze)},addtrack:function(Se){q.addTrack(Se.track)},removetrack:function(Se){q.removeTrack(Se.track)}},de=function(){for(var Se=[],ze=0;ze<q.length;ze++){for(var rt=!1,_t=0;_t<R.length;_t++)if(R[_t]===q[ze]){rt=!0;break}rt||Se.push(q[ze])}for(;Se.length;)q.removeTrack(Se.shift())};this[k.getterName+"Listeners_"]=z,Object.keys(z).forEach(function(Ee){var Se=z[Ee];R.addEventListener(Ee,Se),p.on("dispose",function(ze){return R.removeEventListener(Ee,Se)})}),this.on("loadstart",de),this.on("dispose",function(Ee){return p.off("loadstart",de)})}},_.proxyNativeTracks_=function(){var u=this;yr.names.forEach(function(p){u.proxyNativeTracksForType_(p)})},_.createEl=function(){var u=this.options_.tag;if(!u||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(u){var p=u.cloneNode(!0);u.parentNode&&u.parentNode.insertBefore(p,u),f.disposeMediaElement(u),u=p}else{u=document.createElement("video");var k=this.options_.tag&&He(this.options_.tag),R=yi({},k);(!De||this.options_.nativeControlsForTouch!==!0)&&delete R.controls,Fn(u,V(R,{id:this.options_.techId,class:"vjs-tech"}))}u.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Xt(u,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(u.disablePictureInPicture=this.options_.disablePictureInPicture);for(var q=["loop","muted","playsinline","autoplay"],z=0;z<q.length;z++){var de=q[z],Ee=this.options_[de];typeof Ee<"u"&&(Ee?Xt(u,de,de):Mt(u,de),u[de]=Ee)}return u},_.handleLateInit_=function(u){if(!(u.networkState===0||u.networkState===3)){if(u.readyState===0){var p=!1,k=function(){p=!0};this.on("loadstart",k);var R=function(){p||this.trigger("loadstart")};this.on("loadedmetadata",R),this.ready(function(){this.off("loadstart",k),this.off("loadedmetadata",R),p||this.trigger("loadstart")});return}var q=["loadstart"];q.push("loadedmetadata"),u.readyState>=2&&q.push("loadeddata"),u.readyState>=3&&q.push("canplay"),u.readyState>=4&&q.push("canplaythrough"),this.ready(function(){q.forEach(function(z){this.trigger(z)},this)})}},_.setScrubbing=function(u){this.isScrubbing_=u},_.scrubbing=function(){return this.isScrubbing_},_.setCurrentTime=function(u){try{this.isScrubbing_&&this.el_.fastSeek&&yt?this.el_.fastSeek(u):this.el_.currentTime=u}catch(p){I(p,"Video is not ready. (Video.js)")}},_.duration=function(){var u=this;if(this.el_.duration===1/0&&Y&&qe&&this.el_.currentTime===0){var p=function k(){u.el_.currentTime>0&&(u.el_.duration===1/0&&u.trigger("durationchange"),u.off("timeupdate",k))};return this.on("timeupdate",p),NaN}return this.el_.duration||NaN},_.width=function(){return this.el_.offsetWidth},_.height=function(){return this.el_.offsetHeight},_.proxyWebkitFullscreen_=function(){var u=this;if("webkitDisplayingFullscreen"in this.el_){var p=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},k=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",p),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",k),this.on("dispose",function(){u.off("webkitbeginfullscreen",k),u.off("webkitendfullscreen",p)})}},_.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var u=window.navigator&&window.navigator.userAgent||"";if(/Android/.test(u)||!/Chrome|Mac OS X 10.5/.test(u))return!0}return!1},_.enterFullScreen=function(){var u=this.el_;if(u.paused&&u.networkState<=u.HAVE_METADATA)Cr(this.el_.play()),this.setTimeout(function(){u.pause();try{u.webkitEnterFullScreen()}catch(p){this.trigger("fullscreenerror",p)}},0);else try{u.webkitEnterFullScreen()}catch(p){this.trigger("fullscreenerror",p)}},_.exitFullScreen=function(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()},_.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},_.requestVideoFrameCallback=function(u){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(u):S.prototype.requestVideoFrameCallback.call(this,u)},_.cancelVideoFrameCallback=function(u){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(u):S.prototype.cancelVideoFrameCallback.call(this,u)},_.src=function(u){if(u===void 0)return this.el_.src;this.setSrc(u)},_.reset=function(){f.resetMediaElement(this.el_)},_.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},_.setControls=function(u){this.el_.controls=!!u},_.addTextTrack=function(u,p,k){return this.featuresNativeTextTracks?this.el_.addTextTrack(u,p,k):S.prototype.addTextTrack.call(this,u,p,k)},_.createRemoteTextTrack=function(u){if(!this.featuresNativeTextTracks)return S.prototype.createRemoteTextTrack.call(this,u);var p=document.createElement("track");return u.kind&&(p.kind=u.kind),u.label&&(p.label=u.label),(u.language||u.srclang)&&(p.srclang=u.language||u.srclang),u.default&&(p.default=u.default),u.id&&(p.id=u.id),u.src&&(p.src=u.src),p},_.addRemoteTextTrack=function(u,p){var k=S.prototype.addRemoteTextTrack.call(this,u,p);return this.featuresNativeTextTracks&&this.el().appendChild(k),k},_.removeRemoteTextTrack=function(u){if(S.prototype.removeRemoteTextTrack.call(this,u),this.featuresNativeTextTracks)for(var p=this.$$("track"),k=p.length;k--;)(u===p[k]||u===p[k].track)&&this.el().removeChild(p[k])},_.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var u={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(u.droppedVideoFrames=this.el().webkitDroppedFrameCount,u.totalVideoFrames=this.el().webkitDecodedFrameCount),window.performance&&typeof window.performance.now=="function"?u.creationTime=window.performance.now():window.performance&&window.performance.timing&&typeof window.performance.timing.navigationStart=="number"&&(u.creationTime=window.Date.now()-window.performance.timing.navigationStart),u},f}(fa);Jl(Qn,"TEST_VID",function(){if(it()){var S=document.createElement("video"),f=document.createElement("track");return f.kind="captions",f.srclang="en",f.label="English",S.appendChild(f),S}}),Qn.isSupported=function(){try{Qn.TEST_VID.volume=.5}catch{return!1}return!!(Qn.TEST_VID&&Qn.TEST_VID.canPlayType)},Qn.canPlayType=function(S){return Qn.TEST_VID.canPlayType(S)},Qn.canPlaySource=function(S,f){return Qn.canPlayType(S.type)},Qn.canControlVolume=function(){try{var S=Qn.TEST_VID.volume;Qn.TEST_VID.volume=S/2+.1;var f=S!==Qn.TEST_VID.volume;return f&&Ke?(window.setTimeout(function(){Qn&&Qn.prototype&&(Qn.prototype.featuresVolumeControl=S!==Qn.TEST_VID.volume)}),!1):f}catch{return!1}},Qn.canMuteVolume=function(){try{var S=Qn.TEST_VID.muted;return Qn.TEST_VID.muted=!S,Qn.TEST_VID.muted?Xt(Qn.TEST_VID,"muted","muted"):Mt(Qn.TEST_VID,"muted","muted"),S!==Qn.TEST_VID.muted}catch{return!1}},Qn.canControlPlaybackRate=function(){if(Y&&qe&&ee<58)return!1;try{var S=Qn.TEST_VID.playbackRate;return Qn.TEST_VID.playbackRate=S/2+.1,S!==Qn.TEST_VID.playbackRate}catch{return!1}},Qn.canOverrideAttributes=function(){try{var S=function(){};Object.defineProperty(document.createElement("video"),"src",{get:S,set:S}),Object.defineProperty(document.createElement("audio"),"src",{get:S,set:S}),Object.defineProperty(document.createElement("video"),"innerHTML",{get:S,set:S}),Object.defineProperty(document.createElement("audio"),"innerHTML",{get:S,set:S})}catch{return!1}return!0},Qn.supportsNativeTextTracks=function(){return yt||Ke&&qe},Qn.supportsNativeVideoTracks=function(){return!!(Qn.TEST_VID&&Qn.TEST_VID.videoTracks)},Qn.supportsNativeAudioTracks=function(){return!!(Qn.TEST_VID&&Qn.TEST_VID.audioTracks)},Qn.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(S){var f=S[0],_=S[1];Jl(Qn.prototype,f,function(){return Qn[_]()},!0)}),Qn.prototype.featuresVolumeControl=Qn.canControlVolume(),Qn.prototype.movingMediaElementInDOM=!Ke,Qn.prototype.featuresFullscreenResize=!0,Qn.prototype.featuresProgressEvents=!0,Qn.prototype.featuresTimeupdateEvents=!0,Qn.prototype.featuresVideoFrameCallback=!!(Qn.TEST_VID&&Qn.TEST_VID.requestVideoFrameCallback);var mc;Qn.patchCanPlayType=function(){he>=4&&!Pe&&!qe&&(mc=Qn.TEST_VID&&Qn.TEST_VID.constructor.prototype.canPlayType,Qn.TEST_VID.constructor.prototype.canPlayType=function(S){var f=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;return S&&f.test(S)?"maybe":mc.call(this,S)})},Qn.unpatchCanPlayType=function(){var S=Qn.TEST_VID.constructor.prototype.canPlayType;return mc&&(Qn.TEST_VID.constructor.prototype.canPlayType=mc),S},Qn.patchCanPlayType(),Qn.disposeMediaElement=function(S){if(S){for(S.parentNode&&S.parentNode.removeChild(S);S.hasChildNodes();)S.removeChild(S.firstChild);S.removeAttribute("src"),typeof S.load=="function"&&function(){try{S.load()}catch{}}()}},Qn.resetMediaElement=function(S){if(S){for(var f=S.querySelectorAll("source"),_=f.length;_--;)S.removeChild(f[_]);S.removeAttribute("src"),typeof S.load=="function"&&function(){try{S.load()}catch{}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(S){Qn.prototype[S]=function(){return this.el_[S]||this.el_.hasAttribute(S)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(S){Qn.prototype["set"+Si(S)]=function(f){this.el_[S]=f,f?this.el_.setAttribute(S,S):this.el_.removeAttribute(S)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(S){Qn.prototype[S]=function(){return this.el_[S]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(S){Qn.prototype["set"+Si(S)]=function(f){this.el_[S]=f}}),["pause","load","play"].forEach(function(S){Qn.prototype[S]=function(){return this.el_[S]()}}),fa.withSourceHandlers(Qn),Qn.nativeSourceHandler={},Qn.nativeSourceHandler.canPlayType=function(S){try{return Qn.TEST_VID.canPlayType(S)}catch{return""}},Qn.nativeSourceHandler.canHandleSource=function(S,f){if(S.type)return Qn.nativeSourceHandler.canPlayType(S.type);if(S.src){var _=va(S.src);return Qn.nativeSourceHandler.canPlayType("video/"+_)}return""},Qn.nativeSourceHandler.handleSource=function(S,f,_){f.setSrc(S.src)},Qn.nativeSourceHandler.dispose=function(){},Qn.registerSourceHandler(Qn.nativeSourceHandler),fa.registerTech("Html5",Qn);var Cl=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ad={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Nf=["tiny","xsmall","small","medium","large","xlarge","huge"],gc={};Nf.forEach(function(S){var f=S.charAt(0)==="x"?"x-"+S.substring(1):S;gc[S]="vjs-layout-"+f});var Ff={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ya=function(S){_n(f,S);function f(h,u,p){var k;if(h.id=h.id||u.id||"vjs_video_"+ri(),u=V(f.getTagSettings(h),u),u.initChildren=!1,u.createEl=!1,u.evented=!1,u.reportTouchActivity=!1,!u.language)if(typeof h.closest=="function"){var R=h.closest("[lang]");R&&R.getAttribute&&(u.language=R.getAttribute("lang"))}else for(var q=h;q&&q.nodeType===1;){if(He(q).hasOwnProperty("lang")){u.language=q.getAttribute("lang");break}q=q.parentNode}if(k=S.call(this,null,u,p)||this,k.boundDocumentFullscreenChange_=function(Se){return k.documentFullscreenChange_(Se)},k.boundFullWindowOnEscKey_=function(Se){return k.fullWindowOnEscKey(Se)},k.boundUpdateStyleEl_=function(Se){return k.updateStyleEl_(Se)},k.boundApplyInitTime_=function(Se){return k.applyInitTime_(Se)},k.boundUpdateCurrentBreakpoint_=function(Se){return k.updateCurrentBreakpoint_(Se)},k.boundHandleTechClick_=function(Se){return k.handleTechClick_(Se)},k.boundHandleTechDoubleClick_=function(Se){return k.handleTechDoubleClick_(Se)},k.boundHandleTechTouchStart_=function(Se){return k.handleTechTouchStart_(Se)},k.boundHandleTechTouchMove_=function(Se){return k.handleTechTouchMove_(Se)},k.boundHandleTechTouchEnd_=function(Se){return k.handleTechTouchEnd_(Se)},k.boundHandleTechTap_=function(Se){return k.handleTechTap_(Se)},k.isFullscreen_=!1,k.log=D(k.id_),k.fsApi_=l,k.isPosterFromTech_=!1,k.queuedCallbacks_=[],k.isReady_=!1,k.hasStarted_=!1,k.userActive_=!1,k.debugEnabled_=!1,k.audioOnlyMode_=!1,k.audioPosterMode_=!1,k.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!k.options_||!k.options_.techOrder||!k.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(k.tag=h,k.tagAttributes=h&&He(h),k.language(k.options_.language),u.languages){var z={};Object.getOwnPropertyNames(u.languages).forEach(function(Se){z[Se.toLowerCase()]=u.languages[Se]}),k.languages_=z}else k.languages_=f.prototype.options_.languages;k.resetCache_(),k.poster_=u.poster||"",k.controls_=!!u.controls,h.controls=!1,h.removeAttribute("controls"),k.changingSrc_=!1,k.playCallbacks_=[],k.playTerminatedQueue_=[],h.hasAttribute("autoplay")?k.autoplay(!0):k.autoplay(k.options_.autoplay),u.plugins&&Object.keys(u.plugins).forEach(function(Se){if(typeof k[Se]!="function")throw new Error('plugin "'+Se+'" does not exist')}),k.scrubbing_=!1,k.el_=k.createEl(),Vi(Bn(k),{eventBusKey:"el_"}),k.fsApi_.requestFullscreen&&(Mi(document,k.fsApi_.fullscreenchange,k.boundDocumentFullscreenChange_),k.on(k.fsApi_.fullscreenchange,k.boundDocumentFullscreenChange_)),k.fluid_&&k.on(["playerreset","resize"],k.boundUpdateStyleEl_);var de=yi(k.options_);u.plugins&&Object.keys(u.plugins).forEach(function(Se){k[Se](u.plugins[Se])}),u.debug&&k.debug(!0),k.options_.playerOptions=de,k.middleware_=[],k.playbackRates(u.playbackRates),k.initChildren(),k.isAudio(h.nodeName.toLowerCase()==="audio"),k.controls()?k.addClass("vjs-controls-enabled"):k.addClass("vjs-controls-disabled"),k.el_.setAttribute("role","region"),k.isAudio()?k.el_.setAttribute("aria-label",k.localize("Audio Player")):k.el_.setAttribute("aria-label",k.localize("Video Player")),k.isAudio()&&k.addClass("vjs-audio"),k.flexNotSupported_()&&k.addClass("vjs-no-flex"),De&&k.addClass("vjs-touch-enabled"),Ke||k.addClass("vjs-workinghover"),f.players[k.id_]=Bn(k);var Ee=n.split(".")[0];return k.addClass("vjs-v"+Ee),k.userActive(!0),k.reportUserActivity(),k.one("play",function(Se){return k.listenForUserActivity_(Se)}),k.on("stageclick",function(Se){return k.handleStageClick_(Se)}),k.on("keydown",function(Se){return k.handleKeyDown(Se)}),k.on("languagechange",function(Se){return k.handleLanguagechange(Se)}),k.breakpoints(k.options_.breakpoints),k.responsive(k.options_.responsive),k.on("ready",function(){k.audioPosterMode(k.options_.audioPosterMode),k.audioOnlyMode(k.options_.audioOnlyMode)}),k}var _=f.prototype;return _.dispose=function(){var u=this;this.trigger("dispose"),this.off("dispose"),di(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),di(document,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),f.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Xo(this),fr.names.forEach(function(p){var k=fr[p],R=u[k.getterName]();R&&R.off&&R.off()}),S.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},_.createEl=function(){var u=this.tag,p,k=this.playerElIngest_=u.parentNode&&u.parentNode.hasAttribute&&u.parentNode.hasAttribute("data-vjs-player"),R=this.tag.tagName.toLowerCase()==="video-js";k?p=this.el_=u.parentNode:R||(p=this.el_=S.prototype.createEl.call(this,"div"));var q=He(u);if(R){for(p=this.el_=u,u=this.tag=document.createElement("video");p.children.length;)u.appendChild(p.firstChild);cn(p,"video-js")||nn(p,"video-js"),p.appendChild(u),k=this.playerElIngest_=p,Object.keys(p).forEach(function(rt){try{u[rt]=p[rt]}catch{}})}if(u.setAttribute("tabindex","-1"),q.tabindex="-1",(G||qe&&Te)&&(u.setAttribute("role","application"),q.role="application"),u.removeAttribute("width"),u.removeAttribute("height"),"width"in q&&delete q.width,"height"in q&&delete q.height,Object.getOwnPropertyNames(q).forEach(function(rt){R&&rt==="class"||p.setAttribute(rt,q[rt]),R&&u.setAttribute(rt,q[rt])}),u.playerId=u.id,u.id+="_html5_api",u.className="vjs-tech",u.player=p.player=this,this.addClass("vjs-paused"),window.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=pi("vjs-styles-dimensions");var z=ft(".vjs-styles-defaults"),de=ft("head");de.insertBefore(this.styleEl_,z?z.nextSibling:de.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var Ee=u.getElementsByTagName("a"),Se=0;Se<Ee.length;Se++){var ze=Ee.item(Se);nn(ze,"vjs-hidden"),ze.setAttribute("hidden","hidden")}return u.initNetworkState_=u.networkState,u.parentNode&&!k&&u.parentNode.insertBefore(p,u),Rt(u,p),this.children_.unshift(u),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=p,p},_.crossOrigin=function(u){if(!u)return this.techGet_("crossOrigin");if(u!=="anonymous"&&u!=="use-credentials"){I.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+u+'"');return}this.techCall_("setCrossOrigin",u)},_.width=function(u){return this.dimension("width",u)},_.height=function(u){return this.dimension("height",u)},_.dimension=function(u,p){var k=u+"_";if(p===void 0)return this[k]||0;if(p===""||p==="auto"){this[k]=void 0,this.updateStyleEl_();return}var R=parseFloat(p);if(isNaN(R)){I.error('Improper value "'+p+'" supplied for for '+u);return}this[k]=R,this.updateStyleEl_()},_.fluid=function(u){var p=this;if(u===void 0)return!!this.fluid_;this.fluid_=!!u,Ji(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),u?(this.addClass("vjs-fluid"),this.fill(!1),ia(this,function(){p.on(["playerreset","resize"],p.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},_.fill=function(u){if(u===void 0)return!!this.fill_;this.fill_=!!u,u?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},_.aspectRatio=function(u){if(u===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(u))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=u,this.fluid(!0),this.updateStyleEl_()},_.updateStyleEl_=function(){if(window.VIDEOJS_NO_DYNAMIC_STYLE===!0){var u=typeof this.width_=="number"?this.width_:this.options_.width,p=typeof this.height_=="number"?this.height_:this.options_.height,k=this.tech_&&this.tech_.el();k&&(u>=0&&(k.width=u),p>=0&&(k.height=p));return}var R,q,z,de;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?z=this.aspectRatio_:this.videoWidth()>0?z=this.videoWidth()+":"+this.videoHeight():z="16:9";var Ee=z.split(":"),Se=Ee[1]/Ee[0];this.width_!==void 0?R=this.width_:this.height_!==void 0?R=this.height_/Se:R=this.videoWidth()||300,this.height_!==void 0?q=this.height_:q=R*Se,/^[^a-zA-Z]/.test(this.id())?de="dimensions-"+this.id():de=this.id()+"-dimensions",this.addClass(de),Pi(this.styleEl_,`
      .`+de+` {
        width: `+R+`px;
        height: `+q+`px;
      }

      .`+de+`.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: `+Se*100+`%;
      }
    `)},_.loadTech_=function(u,p){var k=this;this.tech_&&this.unloadTech_();var R=Si(u),q=u.charAt(0).toLowerCase()+u.slice(1);R!=="Html5"&&this.tag&&(fa.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=R,this.isReady_=!1;var z=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(z=!1);var de={source:p,autoplay:z,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+q+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};fr.names.forEach(function(Se){var ze=fr[Se];de[ze.getterName]=k[ze.privateName]}),V(de,this.options_[R]),V(de,this.options_[q]),V(de,this.options_[u.toLowerCase()]),this.tag&&(de.tag=this.tag),p&&p.src===this.cache_.src&&this.cache_.currentTime>0&&(de.startTime=this.cache_.currentTime);var Ee=fa.getTech(u);if(!Ee)throw new Error("No Tech named '"+R+"' exists! '"+R+"' should be registered using videojs.registerTech()'");this.tech_=new Ee(de),this.tech_.ready(Wi(this,this.handleTechReady_),!0),Lr.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Cl.forEach(function(Se){k.on(k.tech_,Se,function(ze){return k["handleTech"+Si(Se)+"_"](ze)})}),Object.keys(ad).forEach(function(Se){k.on(k.tech_,Se,function(ze){if(k.tech_.playbackRate()===0&&k.tech_.seeking()){k.queuedCallbacks_.push({callback:k["handleTech"+ad[Se]+"_"].bind(k),event:ze});return}k["handleTech"+ad[Se]+"_"](ze)})}),this.on(this.tech_,"loadstart",function(Se){return k.handleTechLoadStart_(Se)}),this.on(this.tech_,"sourceset",function(Se){return k.handleTechSourceset_(Se)}),this.on(this.tech_,"waiting",function(Se){return k.handleTechWaiting_(Se)}),this.on(this.tech_,"ended",function(Se){return k.handleTechEnded_(Se)}),this.on(this.tech_,"seeking",function(Se){return k.handleTechSeeking_(Se)}),this.on(this.tech_,"play",function(Se){return k.handleTechPlay_(Se)}),this.on(this.tech_,"firstplay",function(Se){return k.handleTechFirstPlay_(Se)}),this.on(this.tech_,"pause",function(Se){return k.handleTechPause_(Se)}),this.on(this.tech_,"durationchange",function(Se){return k.handleTechDurationChange_(Se)}),this.on(this.tech_,"fullscreenchange",function(Se,ze){return k.handleTechFullscreenChange_(Se,ze)}),this.on(this.tech_,"fullscreenerror",function(Se,ze){return k.handleTechFullscreenError_(Se,ze)}),this.on(this.tech_,"enterpictureinpicture",function(Se){return k.handleTechEnterPictureInPicture_(Se)}),this.on(this.tech_,"leavepictureinpicture",function(Se){return k.handleTechLeavePictureInPicture_(Se)}),this.on(this.tech_,"error",function(Se){return k.handleTechError_(Se)}),this.on(this.tech_,"posterchange",function(Se){return k.handleTechPosterChange_(Se)}),this.on(this.tech_,"textdata",function(Se){return k.handleTechTextData_(Se)}),this.on(this.tech_,"ratechange",function(Se){return k.handleTechRateChange_(Se)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(R!=="Html5"||!this.tag)&&Rt(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},_.unloadTech_=function(){var u=this;fr.names.forEach(function(p){var k=fr[p];u[k.privateName]=u[k.getterName]()}),this.textTracksJson_=Lr.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},_.tech=function(u){return u===void 0&&I.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_},_.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},_.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},_.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},_.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())},_.manualAutoplay_=function(u){var p=this;if(!(!this.tech_||typeof u!="string")){var k=function(){var z=p.muted();p.muted(!0);var de=function(){p.muted(z)};p.playTerminatedQueue_.push(de);var Ee=p.play();if(Gi(Ee))return Ee.catch(function(Se){throw de(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(Se||""))})},R;if(u==="any"&&!this.muted()?(R=this.play(),Gi(R)&&(R=R.catch(k))):u==="muted"&&!this.muted()?R=k():R=this.play(),!!Gi(R))return R.then(function(){p.trigger({type:"autoplay-success",autoplay:u})}).catch(function(){p.trigger({type:"autoplay-failure",autoplay:u})})}},_.updateSourceCaches_=function(u){u===void 0&&(u="");var p=u,k="";typeof p!="string"&&(p=u.src,k=u.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],p&&!k&&(k=Ul(this,p)),this.cache_.source=yi({},u,{src:p,type:k});for(var R=this.cache_.sources.filter(function(ze){return ze.src&&ze.src===p}),q=[],z=this.$$("source"),de=[],Ee=0;Ee<z.length;Ee++){var Se=He(z[Ee]);q.push(Se),Se.src&&Se.src===p&&de.push(Se.src)}de.length&&!R.length?this.cache_.sources=q:R.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=p},_.handleTechSourceset_=function(u){var p=this;if(!this.changingSrc_){var k=function(de){return p.updateSourceCaches_(de)},R=this.currentSource().src,q=u.src;R&&!/^blob:/.test(R)&&/^blob:/.test(q)&&(!this.lastSource_||this.lastSource_.tech!==q&&this.lastSource_.player!==R)&&(k=function(){}),k(q),u.src||this.tech_.any(["sourceset","loadstart"],function(z){if(z.type!=="sourceset"){var de=p.techGet("currentSrc");p.lastSource_.tech=de,p.updateSourceCaches_(de)}})}this.lastSource_={player:this.currentSource().src,tech:u.src},this.trigger({src:u.src,type:"sourceset"})},_.hasStarted=function(u){if(u===void 0)return this.hasStarted_;u!==this.hasStarted_&&(this.hasStarted_=u,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},_.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},_.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(u){return u.callback(u.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},_.handleTechWaiting_=function(){var u=this;this.addClass("vjs-waiting"),this.trigger("waiting");var p=this.currentTime(),k=function R(){p!==u.currentTime()&&(u.removeClass("vjs-waiting"),u.off("timeupdate",R))};this.on("timeupdate",k)},_.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},_.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},_.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},_.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},_.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},_.handleTechFirstPlay_=function(){this.options_.starttime&&(I.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},_.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},_.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},_.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},_.handleTechClick_=function(u){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,u):this.paused()?Cr(this.play()):this.pause())},_.handleTechDoubleClick_=function(u){if(this.controls_){var p=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(k){return k.contains(u.target)});p||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,u):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}},_.handleTechTap_=function(){this.userActive(!this.userActive())},_.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},_.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},_.handleTechTouchEnd_=function(u){u.cancelable&&u.preventDefault()},_.handleStageClick_=function(){this.reportUserActivity()},_.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},_.documentFullscreenChange_=function(u){var p=u.target.player;if(!(p&&p!==this)){var k=this.el(),R=document[this.fsApi_.fullscreenElement]===k;!R&&k.matches?R=k.matches(":"+this.fsApi_.fullscreen):!R&&k.msMatchesSelector&&(R=k.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(R)}},_.handleTechFullscreenChange_=function(u,p){var k=this;p&&(p.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){k.removeClass("vjs-ios-native-fs")})),this.isFullscreen(p.isFullscreen))},_.handleTechFullscreenError_=function(u,p){this.trigger("fullscreenerror",p)},_.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},_.handleTechEnterPictureInPicture_=function(u){this.isInPictureInPicture(!0)},_.handleTechLeavePictureInPicture_=function(u){this.isInPictureInPicture(!1)},_.handleTechError_=function(){var u=this.tech_.error();this.error(u)},_.handleTechTextData_=function(){var u=null;arguments.length>1&&(u=arguments[1]),this.trigger("textdata",u)},_.getCache=function(){return this.cache_},_.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},_.techCall_=function(u,p){this.ready(function(){if(u in Ku)return Gu(this.middleware_,this.tech_,u,p);if(u in Bl)return Ja(this.middleware_,this.tech_,u,p);try{this.tech_&&this.tech_[u](p)}catch(k){throw I(k),k}},!0)},_.techGet_=function(u){if(!(!this.tech_||!this.tech_.isReady_)){if(u in jl)return Yu(this.middleware_,this.tech_,u);if(u in Bl)return Ja(this.middleware_,this.tech_,u);try{return this.tech_[u]()}catch(p){throw this.tech_[u]===void 0?(I("Video.js: "+u+" method not defined for "+this.techName_+" playback technology.",p),p):p.name==="TypeError"?(I("Video.js: "+u+" unavailable on "+this.techName_+" playback technology element.",p),this.tech_.isReady_=!1,p):(I(p),p)}}},_.play=function(){var u=this,p=this.options_.Promise||window.Promise;return p?new p(function(k){u.play_(k)}):this.play_()},_.play_=function(u){var p=this;u===void 0&&(u=Cr),this.playCallbacks_.push(u);var k=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),R=!!(yt||Ke);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!k){this.waitToPlay_=function(de){p.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!k&&R&&this.load();return}var q=this.techGet_("play"),z=R&&this.hasClass("vjs-ended");z&&this.resetProgressBar_(),q===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(q)},_.runPlayTerminatedQueue_=function(){var u=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],u.forEach(function(p){p()})},_.runPlayCallbacks_=function(u){var p=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],p.forEach(function(k){k(u)})},_.pause=function(){this.techCall_("pause")},_.paused=function(){return this.techGet_("paused")!==!1},_.played=function(){return this.techGet_("played")||Ui(0,0)},_.scrubbing=function(u){if(typeof u>"u")return this.scrubbing_;this.scrubbing_=!!u,this.techCall_("setScrubbing",this.scrubbing_),u?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},_.currentTime=function(u){if(typeof u<"u"){if(u<0&&(u=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=u,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",u),this.cache_.initTime=0;return}return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime},_.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},_.duration=function(u){if(u===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;u=parseFloat(u),u<0&&(u=1/0),u!==this.cache_.duration&&(this.cache_.duration=u,u===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(u)||this.trigger("durationchange"))},_.remainingTime=function(){return this.duration()-this.currentTime()},_.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},_.buffered=function(){var u=this.techGet_("buffered");return(!u||!u.length)&&(u=Ui(0,0)),u},_.bufferedPercent=function(){return Fr(this.buffered(),this.duration())},_.bufferedEnd=function(){var u=this.buffered(),p=this.duration(),k=u.end(u.length-1);return k>p&&(k=p),k},_.volume=function(u){var p;if(u!==void 0){p=Math.max(0,Math.min(1,parseFloat(u))),this.cache_.volume=p,this.techCall_("setVolume",p),p>0&&this.lastVolume_(p);return}return p=parseFloat(this.techGet_("volume")),isNaN(p)?1:p},_.muted=function(u){if(u!==void 0){this.techCall_("setMuted",u);return}return this.techGet_("muted")||!1},_.defaultMuted=function(u){return u!==void 0?this.techCall_("setDefaultMuted",u):this.techGet_("defaultMuted")||!1},_.lastVolume_=function(u){if(u!==void 0&&u!==0){this.cache_.lastVolume=u;return}return this.cache_.lastVolume},_.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},_.isFullscreen=function(u){if(u!==void 0){var p=this.isFullscreen_;this.isFullscreen_=!!u,this.isFullscreen_!==p&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_},_.requestFullscreen=function(u){var p=this.options_.Promise||window.Promise;if(p){var k=this;return new p(function(R,q){function z(){k.off("fullscreenerror",Ee),k.off("fullscreenchange",de)}function de(){z(),R()}function Ee(ze,rt){z(),q(rt)}k.one("fullscreenchange",de),k.one("fullscreenerror",Ee);var Se=k.requestFullscreenHelper_(u);Se&&(Se.then(z,z),Se.then(R,q))})}return this.requestFullscreenHelper_()},_.requestFullscreenHelper_=function(u){var p=this,k;if(this.fsApi_.prefixed||(k=this.options_.fullscreen&&this.options_.fullscreen.options||{},u!==void 0&&(k=u)),this.fsApi_.requestFullscreen){var R=this.el_[this.fsApi_.requestFullscreen](k);return R&&R.then(function(){return p.isFullscreen(!0)},function(){return p.isFullscreen(!1)}),R}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},_.exitFullscreen=function(){var u=this.options_.Promise||window.Promise;if(u){var p=this;return new u(function(k,R){function q(){p.off("fullscreenerror",de),p.off("fullscreenchange",z)}function z(){q(),k()}function de(Se,ze){q(),R(ze)}p.one("fullscreenchange",z),p.one("fullscreenerror",de);var Ee=p.exitFullscreenHelper_();Ee&&(Ee.then(q,q),Ee.then(k,R))})}return this.exitFullscreenHelper_()},_.exitFullscreenHelper_=function(){var u=this;if(this.fsApi_.requestFullscreen){var p=document[this.fsApi_.exitFullscreen]();return p&&Cr(p.then(function(){return u.isFullscreen(!1)})),p}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},_.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,Mi(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow="hidden",nn(document.body,"vjs-full-window"),this.trigger("enterFullWindow")},_.fullWindowOnEscKey=function(u){Vn.isEventKey(u,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},_.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,di(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow=this.docOrigOverflow,Qe(document.body,"vjs-full-window"),this.trigger("exitFullWindow")},_.disablePictureInPicture=function(u){if(u===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",u),this.options_.disablePictureInPicture=u,this.trigger("disablepictureinpicturechanged")},_.isInPictureInPicture=function(u){if(u!==void 0){this.isInPictureInPicture_=!!u,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_},_.requestPictureInPicture=function(){if("pictureInPictureEnabled"in document&&this.disablePictureInPicture()===!1)return this.techGet_("requestPictureInPicture")},_.exitPictureInPicture=function(){if("pictureInPictureEnabled"in document)return document.exitPictureInPicture()},_.handleKeyDown=function(u){var p=this.options_.userActions;if(!(!p||!p.hotkeys)){var k=function(q){var z=q.tagName.toLowerCase();if(q.isContentEditable)return!0;var de=["button","checkbox","hidden","radio","reset","submit"];if(z==="input")return de.indexOf(q.type)===-1;var Ee=["textarea"];return Ee.indexOf(z)!==-1};k(this.el_.ownerDocument.activeElement)||(typeof p.hotkeys=="function"?p.hotkeys.call(this,u):this.handleHotkeys(u))}},_.handleHotkeys=function(u){var p=this.options_.userActions?this.options_.userActions.hotkeys:{},k=p.fullscreenKey,R=k===void 0?function(_t){return Vn.isEventKey(_t,"f")}:k,q=p.muteKey,z=q===void 0?function(_t){return Vn.isEventKey(_t,"m")}:q,de=p.playPauseKey,Ee=de===void 0?function(_t){return Vn.isEventKey(_t,"k")||Vn.isEventKey(_t,"Space")}:de;if(R.call(this,u)){u.preventDefault(),u.stopPropagation();var Se=dn.getComponent("FullscreenToggle");document[this.fsApi_.fullscreenEnabled]!==!1&&Se.prototype.handleClick.call(this,u)}else if(z.call(this,u)){u.preventDefault(),u.stopPropagation();var ze=dn.getComponent("MuteToggle");ze.prototype.handleClick.call(this,u)}else if(Ee.call(this,u)){u.preventDefault(),u.stopPropagation();var rt=dn.getComponent("PlayToggle");rt.prototype.handleClick.call(this,u)}},_.canPlayType=function(u){for(var p,k=0,R=this.options_.techOrder;k<R.length;k++){var q=R[k],z=fa.getTech(q);if(z||(z=dn.getComponent(q)),!z){I.error('The "'+q+'" tech is undefined. Skipped browser support check for that tech.');continue}if(z.isSupported()&&(p=z.canPlayType(u),p))return p}return""},_.selectSource=function(u){var p=this,k=this.options_.techOrder.map(function(Ee){return[Ee,fa.getTech(Ee)]}).filter(function(Ee){var Se=Ee[0],ze=Ee[1];return ze?ze.isSupported():(I.error('The "'+Se+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),R=function(Se,ze,rt){var _t;return Se.some(function(lt){return ze.some(function(Bt){if(_t=rt(lt,Bt),_t)return!0})}),_t},q,z=function(Se){return function(ze,rt){return Se(rt,ze)}},de=function(Se,ze){var rt=Se[0],_t=Se[1];if(_t.canPlaySource(ze,p.options_[rt.toLowerCase()]))return{source:ze,tech:rt}};return this.options_.sourceOrder?q=R(u,k,z(de)):q=R(k,u,de),q||!1},_.handleSrc_=function(u,p){var k=this;if(typeof u>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var R=bu(u);if(!R.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,p||(this.cache_.sources=R),this.updateSourceCaches_(R[0]),ks(this,R[0],function(de,Ee){k.middleware_=Ee,p||(k.cache_.sources=R),k.updateSourceCaches_(de);var Se=k.src_(de);if(Se){if(R.length>1)return k.handleSrc_(R.slice(1));k.changingSrc_=!1,k.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),k.triggerReady();return}bl(Ee,k.tech_)}),this.options_.retryOnError&&R.length>1){var q=function(){k.error(null),k.handleSrc_(R.slice(1),!0)},z=function(){k.off("error",q)};this.one("error",q),this.one("playing",z),this.resetRetryOnError_=function(){k.off("error",q),k.off("playing",z)}}},_.src=function(u){return this.handleSrc_(u,!1)},_.src_=function(u){var p=this,k=this.selectSource([u]);return k?pr(k.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",u):this.techCall_("src",u.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(k.tech,k.source),this.tech_.ready(function(){p.changingSrc_=!1}),!1):!0},_.load=function(){this.techCall_("load")},_.reset=function(){var u=this,p=this.options_.Promise||window.Promise;if(this.paused()||!p)this.doReset_();else{var k=this.play();Cr(k.then(function(){return u.doReset_()}))}},_.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Ji(this)&&this.trigger("playerreset")},_.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},_.resetProgressBar_=function(){this.currentTime(0);var u=this.controlBar||{},p=u.durationDisplay,k=u.remainingTimeDisplay;p&&p.updateContent(),k&&k.updateContent()},_.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},_.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},_.currentSources=function(){var u=this.currentSource(),p=[];return Object.keys(u).length!==0&&p.push(u),this.cache_.sources||p},_.currentSource=function(){return this.cache_.source||{}},_.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},_.currentType=function(){return this.currentSource()&&this.currentSource().type||""},_.preload=function(u){if(u!==void 0){this.techCall_("setPreload",u),this.options_.preload=u;return}return this.techGet_("preload")},_.autoplay=function(u){if(u===void 0)return this.options_.autoplay||!1;var p;typeof u=="string"&&/(any|play|muted)/.test(u)||u===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=u,this.manualAutoplay_(typeof u=="string"?u:"play"),p=!1):u?this.options_.autoplay=!0:this.options_.autoplay=!1,p=typeof p>"u"?this.options_.autoplay:p,this.tech_&&this.techCall_("setAutoplay",p)},_.playsinline=function(u){return u!==void 0?(this.techCall_("setPlaysinline",u),this.options_.playsinline=u,this):this.techGet_("playsinline")},_.loop=function(u){if(u!==void 0){this.techCall_("setLoop",u),this.options_.loop=u;return}return this.techGet_("loop")},_.poster=function(u){if(u===void 0)return this.poster_;u||(u=""),u!==this.poster_&&(this.poster_=u,this.techCall_("setPoster",u),this.isPosterFromTech_=!1,this.trigger("posterchange"))},_.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var u=this.tech_.poster()||"";u!==this.poster_&&(this.poster_=u,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},_.controls=function(u){if(u===void 0)return!!this.controls_;u=!!u,this.controls_!==u&&(this.controls_=u,this.usingNativeControls()&&this.techCall_("setControls",u),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},_.usingNativeControls=function(u){if(u===void 0)return!!this.usingNativeControls_;u=!!u,this.usingNativeControls_!==u&&(this.usingNativeControls_=u,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},_.error=function(u){var p=this;if(u===void 0)return this.error_||null;if(r("beforeerror").forEach(function(R){var q=R(p,u);if(!(Q(q)&&!Array.isArray(q)||typeof q=="string"||typeof q=="number"||q===null)){p.log.error("please return a value that MediaError expects in beforeerror hooks");return}u=q}),this.options_.suppressNotSupportedError&&u&&u.code===4){var k=function(){this.error(u)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],k),this.one("loadstart",function(){this.off(["click","touchstart"],k)});return}if(u===null){this.error_=u,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new wi(u),this.addClass("vjs-error"),I.error("(CODE:"+this.error_.code+" "+wi.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),r("error").forEach(function(R){return R(p,p.error_)})},_.reportUserActivity=function(u){this.userActivity_=!0},_.userActive=function(u){if(u===void 0)return this.userActive_;if(u=!!u,u!==this.userActive_){if(this.userActive_=u,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(p){p.stopPropagation(),p.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},_.listenForUserActivity_=function(){var u,p,k,R=Wi(this,this.reportUserActivity),q=function(rt){(rt.screenX!==p||rt.screenY!==k)&&(p=rt.screenX,k=rt.screenY,R())},z=function(){R(),this.clearInterval(u),u=this.setInterval(R,250)},de=function(rt){R(),this.clearInterval(u)};this.on("mousedown",z),this.on("mousemove",q),this.on("mouseup",de),this.on("mouseleave",de);var Ee=this.getChild("controlBar");Ee&&!Ke&&!Y&&(Ee.on("mouseenter",function(ze){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),Ee.on("mouseleave",function(ze){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",R),this.on("keyup",R);var Se;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(Se);var ze=this.options_.inactivityTimeout;ze<=0||(Se=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},ze))}},250)},_.playbackRate=function(u){if(u!==void 0){this.techCall_("setPlaybackRate",u);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},_.defaultPlaybackRate=function(u){return u!==void 0?this.techCall_("setDefaultPlaybackRate",u):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},_.isAudio=function(u){if(u!==void 0){this.isAudio_=!!u;return}return!!this.isAudio_},_.enableAudioOnlyUI_=function(){var u=this;this.addClass("vjs-audio-only-mode");var p=this.children(),k=this.getChild("ControlBar"),R=k&&k.currentHeight();p.forEach(function(q){q!==k&&q.el_&&!q.hasClass("vjs-hidden")&&(q.hide(),u.audioOnlyCache_.hiddenChildren.push(q))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(R),this.trigger("audioonlymodechange")},_.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(u){return u.show()}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},_.audioOnlyMode=function(u){var p=this;if(typeof u!="boolean"||u===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=u;var k=this.options_.Promise||window.Promise;if(k){if(u){var R=[];return this.isInPictureInPicture()&&R.push(this.exitPictureInPicture()),this.isFullscreen()&&R.push(this.exitFullscreen()),this.audioPosterMode()&&R.push(this.audioPosterMode(!1)),k.all(R).then(function(){return p.enableAudioOnlyUI_()})}return k.resolve().then(function(){return p.disableAudioOnlyUI_()})}u?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},_.enablePosterModeUI_=function(){var u=this.tech_&&this.tech_;u.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},_.disablePosterModeUI_=function(){var u=this.tech_&&this.tech_;u.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},_.audioPosterMode=function(u){var p=this;if(typeof u!="boolean"||u===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=u;var k=this.options_.Promise||window.Promise;if(k){if(u){if(this.audioOnlyMode()){var R=this.audioOnlyMode(!1);return R.then(function(){p.enablePosterModeUI_()})}return k.resolve().then(function(){p.enablePosterModeUI_()})}return k.resolve().then(function(){p.disablePosterModeUI_()})}if(u){this.audioOnlyMode()&&this.audioOnlyMode(!1),this.enablePosterModeUI_();return}this.disablePosterModeUI_()},_.addTextTrack=function(u,p,k){if(this.tech_)return this.tech_.addTextTrack(u,p,k)},_.addRemoteTextTrack=function(u,p){if(this.tech_)return this.tech_.addRemoteTextTrack(u,p)},_.removeRemoteTextTrack=function(u){u===void 0&&(u={});var p=u,k=p.track;if(k||(k=u),this.tech_)return this.tech_.removeRemoteTextTrack(k)},_.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},_.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},_.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},_.language=function(u){if(u===void 0)return this.language_;this.language_!==String(u).toLowerCase()&&(this.language_=String(u).toLowerCase(),Ji(this)&&this.trigger("languagechange"))},_.languages=function(){return yi(f.prototype.options_.languages,this.languages_)},_.toJSON=function(){var u=yi(this.options_),p=u.tracks;u.tracks=[];for(var k=0;k<p.length;k++){var R=p[k];R=yi(R),R.player=void 0,u.tracks[k]=R}return u},_.createModal=function(u,p){var k=this;p=p||{},p.content=u||"";var R=new wa(this,p);return this.addChild(R),R.on("dispose",function(){k.removeChild(R)}),R.open(),R},_.updateCurrentBreakpoint_=function(){if(this.responsive())for(var u=this.currentBreakpoint(),p=this.currentWidth(),k=0;k<Nf.length;k++){var R=Nf[k],q=this.breakpoints_[R];if(p<=q){if(u===R)return;u&&this.removeClass(gc[u]),this.addClass(gc[R]),this.breakpoint_=R;break}}},_.removeCurrentBreakpoint_=function(){var u=this.currentBreakpointClass();this.breakpoint_="",u&&this.removeClass(u)},_.breakpoints=function(u){return u===void 0?V(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=V({},Ff,u),this.updateCurrentBreakpoint_(),V(this.breakpoints_))},_.responsive=function(u){if(u===void 0)return this.responsive_;u=!!u;var p=this.responsive_;if(u!==p)return this.responsive_=u,u?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),u},_.currentBreakpoint=function(){return this.breakpoint_},_.currentBreakpointClass=function(){return gc[this.breakpoint_]||""},_.loadMedia=function(u,p){var k=this;if(!(!u||typeof u!="object")){this.reset(),this.cache_.media=yi(u);var R=this.cache_.media,q=R.artwork,z=R.poster,de=R.src,Ee=R.textTracks;!q&&z&&(this.cache_.media.artwork=[{src:z,type:yl(z)}]),de&&this.src(de),z&&this.poster(z),Array.isArray(Ee)&&Ee.forEach(function(Se){return k.addRemoteTextTrack(Se,!1)}),this.ready(p)}},_.getMedia=function(){if(!this.cache_.media){var u=this.poster(),p=this.currentSources(),k=Array.prototype.map.call(this.remoteTextTracks(),function(q){return{kind:q.kind,label:q.label,language:q.language,src:q.src}}),R={src:p,textTracks:k};return u&&(R.poster=u,R.artwork=[{src:R.poster,type:yl(R.poster)}]),R}return yi(this.cache_.media)},f.getTagSettings=function(u){var p={sources:[],tracks:[]},k=He(u),R=k["data-setup"];if(cn(u,"vjs-fill")&&(k.fill=!0),cn(u,"vjs-fluid")&&(k.fluid=!0),R!==null){var q=ar(R||"{}"),z=q[0],de=q[1];z&&I.error(z),V(k,de)}if(V(p,k),u.hasChildNodes())for(var Ee=u.childNodes,Se=0,ze=Ee.length;Se<ze;Se++){var rt=Ee[Se],_t=rt.nodeName.toLowerCase();_t==="source"?p.sources.push(He(rt)):_t==="track"&&p.tracks.push(He(rt))}return p},_.flexNotSupported_=function(){var u=document.createElement("i");return!("flexBasis"in u.style||"webkitFlexBasis"in u.style||"mozFlexBasis"in u.style||"msFlexBasis"in u.style||"msFlexOrder"in u.style)},_.debug=function(u){if(u===void 0)return this.debugEnabled_;u?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},_.playbackRates=function(u){if(u===void 0)return this.cache_.playbackRates;Array.isArray(u)&&u.every(function(p){return typeof p=="number"})&&(this.cache_.playbackRates=u,this.trigger("playbackrateschange"))},f}(dn);fr.names.forEach(function(S){var f=fr[S];Ya.prototype[f.getterName]=function(){return this.tech_?this.tech_[f.getterName]():(this[f.privateName]=this[f.privateName]||new f.ListClass,this[f.privateName])}}),Ya.prototype.crossorigin=Ya.prototype.crossOrigin,Ya.players={};var sd=window.navigator;Ya.prototype.options_={techOrder:fa.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:sd&&(sd.languages&&sd.languages[0]||sd.userLanguage||sd.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(S){Ya.prototype[S]=function(){return this.techGet_(S)}}),Cl.forEach(function(S){Ya.prototype["handleTech"+Si(S)+"_"]=function(){return this.trigger(S)}}),dn.registerComponent("Player",Ya);var v_=M(function(S){function f(_,h){return S.exports=f=Object.setPrototypeOf||function(p,k){return p.__proto__=k,p},f(_,h)}S.exports=f});function Zo(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Um=Zo,Lf=M(function(S){function f(_,h,u){return Um()?S.exports=f=Reflect.construct:S.exports=f=function(k,R,q){var z=[null];z.push.apply(z,R);var de=Function.bind.apply(k,z),Ee=new de;return q&&v_(Ee,q.prototype),Ee},f.apply(null,arguments)}S.exports=f}),vc="plugin",Eu="activePlugins_",od={},bc=function(f){return od.hasOwnProperty(f)},Iu=function(f){return bc(f)?od[f]:void 0},yc=function(f,_){f[Eu]=f[Eu]||{},f[Eu][_]=!0},wc=function(f,_,h){var u=(h?"before":"")+"pluginsetup";f.trigger(u,_),f.trigger(u+":"+_.name,_)},Hf=function(f,_){var h=function(){wc(this,{name:f,plugin:_,instance:null},!0);var p=_.apply(this,arguments);return yc(this,f),wc(this,{name:f,plugin:_,instance:p}),p};return Object.keys(_).forEach(function(u){h[u]=_[u]}),h},Bd=function(f,_){return _.prototype.name=f,function(){wc(this,{name:f,plugin:_,instance:null},!0);for(var h=arguments.length,u=new Array(h),p=0;p<h;p++)u[p]=arguments[p];var k=Lf(_,[this].concat(u));return this[f]=function(){return k},wc(this,k.getEventHash()),k}},jo=function(){function S(_){if(this.constructor===S)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=_,this.log||(this.log=this.player.log.createLogger(this.name)),Vi(this),delete this.trigger,vr(this,this.constructor.defaultState),yc(_,this.name),this.dispose=this.dispose.bind(this),_.on("dispose",this.dispose)}var f=S.prototype;return f.version=function(){return this.constructor.VERSION},f.getEventHash=function(h){return h===void 0&&(h={}),h.name=this.name,h.plugin=this.constructor,h.instance=this,h},f.trigger=function(h,u){return u===void 0&&(u={}),Yi(this.eventBusEl_,h,this.getEventHash(u))},f.handleStateChanged=function(h){},f.dispose=function(){var h=this.name,u=this.player;this.trigger("dispose"),this.off(),u.off("dispose",this.dispose),u[Eu][h]=!1,this.player=this.state=null,u[h]=Bd(h,od[h])},S.isBasic=function(h){var u=typeof h=="string"?Iu(h):h;return typeof u=="function"&&!S.prototype.isPrototypeOf(u.prototype)},S.registerPlugin=function(h,u){if(typeof h!="string")throw new Error('Illegal plugin name, "'+h+'", must be a string, was '+typeof h+".");if(bc(h))I.warn('A plugin named "'+h+'" already exists. You may want to avoid re-registering plugins!');else if(Ya.prototype.hasOwnProperty(h))throw new Error('Illegal plugin name, "'+h+'", cannot share a name with an existing player method!');if(typeof u!="function")throw new Error('Illegal plugin for "'+h+'", must be a function, was '+typeof u+".");return od[h]=u,h!==vc&&(S.isBasic(u)?Ya.prototype[h]=Hf(h,u):Ya.prototype[h]=Bd(h,u)),u},S.deregisterPlugin=function(h){if(h===vc)throw new Error("Cannot de-register base plugin.");bc(h)&&(delete od[h],delete Ya.prototype[h])},S.getPlugins=function(h){h===void 0&&(h=Object.keys(od));var u;return h.forEach(function(p){var k=Iu(p);k&&(u=u||{},u[p]=k)}),u},S.getPluginVersion=function(h){var u=Iu(h);return u&&u.VERSION||""},S}();jo.getPlugin=Iu,jo.BASE_PLUGIN_NAME=vc,jo.registerPlugin(vc,jo),Ya.prototype.usingPlugin=function(S){return!!this[Eu]&&this[Eu][S]===!0},Ya.prototype.hasPlugin=function(S){return!!bc(S)};function qm(S,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(f&&f.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),f&&v_(S,f)}var el=qm,Wp=!1,Tc=function(f,_){_===void 0&&(_={}),Wp||(I.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),Wp=!0);var h=function(){f.apply(this,arguments)},u={};typeof _=="object"?(_.constructor!==Object.prototype.constructor&&(h=_.constructor),u=_):typeof _=="function"&&(h=_),el(h,f),f&&(h.super_=f);for(var p in u)u.hasOwnProperty(p)&&(h.prototype[p]=u[p]);return h},Vp=function(f){return f.indexOf("#")===0?f.slice(1):f};function Wt(S,f,_){var h=Wt.getPlayer(S);if(h)return f&&I.warn('Player "'+S+'" is already initialised. Options will not be applied.'),_&&h.ready(_),h;var u=typeof S=="string"?ft("#"+Vp(S)):S;if(!Ge(u))throw new TypeError("The element or ID supplied is not valid. (videojs)");(!u.ownerDocument.defaultView||!u.ownerDocument.body.contains(u))&&I.warn("The element supplied is not included in the DOM"),f=f||{},f.restoreEl===!0&&(f.restoreEl=(u.parentNode&&u.parentNode.hasAttribute("data-vjs-player")?u.parentNode:u).cloneNode(!0)),r("beforesetup").forEach(function(k){var R=k(u,yi(f));if(!Q(R)||Array.isArray(R)){I.error("please return an object in beforesetup hooks");return}f=yi(f,R)});var p=dn.getComponent("Player");return h=new p(u,f,_),r("setup").forEach(function(k){return k(h)}),h}if(Wt.hooks_=i,Wt.hooks=r,Wt.hook=a,Wt.hookOnce=o,Wt.removeHook=s,window.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&it()){var jf=ft(".vjs-styles-defaults");if(!jf){jf=pi("vjs-styles-defaults");var b_=ft("head");b_&&b_.insertBefore(jf,b_.firstChild),Pi(jf,`
      .video-js {
        width: 300px;
        height: 150px;
      }

      .vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 56.25%
      }
    `)}}sn(1,Wt),Wt.VERSION=n,Wt.options=Ya.prototype.options_,Wt.getPlayers=function(){return Ya.players},Wt.getPlayer=function(S){var f=Ya.players,_;if(typeof S=="string"){var h=Vp(S),u=f[h];if(u)return u;_=ft("#"+h)}else _=S;if(Ge(_)){var p=_,k=p.player,R=p.playerId;if(k||f[R])return k||f[R]}},Wt.getAllPlayers=function(){return Object.keys(Ya.players).map(function(S){return Ya.players[S]}).filter(Boolean)},Wt.players=Ya.players,Wt.getComponent=dn.getComponent,Wt.registerComponent=function(S,f){fa.isTech(f)&&I.warn("The "+S+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),dn.registerComponent.call(dn,S,f)},Wt.getTech=fa.getTech,Wt.registerTech=fa.registerTech,Wt.use=wf,Object.defineProperty(Wt,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Wt.middleware,"TERMINATOR",{value:vl,writeable:!1,enumerable:!0}),Wt.browser=ht,Wt.TOUCH_ENABLED=De,Wt.extend=Tc,Wt.mergeOptions=yi,Wt.bind=Wi,Wt.registerPlugin=jo.registerPlugin,Wt.deregisterPlugin=jo.deregisterPlugin,Wt.plugin=function(S,f){return I.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),jo.registerPlugin(S,f)},Wt.getPlugins=jo.getPlugins,Wt.getPlugin=jo.getPlugin,Wt.getPluginVersion=jo.getPluginVersion,Wt.addLanguage=function(S,f){var _;return S=(""+S).toLowerCase(),Wt.options.languages=yi(Wt.options.languages,(_={},_[S]=f,_)),Wt.options.languages[S]},Wt.log=I,Wt.createLogger=D,Wt.createTimeRange=Wt.createTimeRanges=Ui,Wt.formatTime=Ss,Wt.setFormatTime=Cf,Wt.resetFormatTime=cc,Wt.parseUrl=ga,Wt.isCrossOrigin=$r,Wt.EventTarget=xi,Wt.on=Mi,Wt.one=na,Wt.off=di,Wt.trigger=Yi,Wt.xhr=Aa,Wt.TextTrack=Yt,Wt.AudioTrack=Mn,Wt.VideoTrack=Yn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(S){Wt[S]=function(){return I.warn("videojs."+S+"() is deprecated; use videojs.dom."+S+"() instead"),Et[S].apply(null,arguments)}}),Wt.computedStyle=te,Wt.dom=Et,Wt.url=ua,Wt.defineLazyProperty=Jl,Wt.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Au=M(function(S,f){(function(_){var h=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,u=/^([^\/?#]*)([^]*)$/,p=/(?:\/|^)\.(?=\/)/g,k=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,R={buildAbsoluteURL:function(z,de,Ee){if(Ee=Ee||{},z=z.trim(),de=de.trim(),!de){if(!Ee.alwaysNormalize)return z;var Se=R.parseURL(z);if(!Se)throw new Error("Error trying to parse base URL.");return Se.path=R.normalizePath(Se.path),R.buildURLFromParts(Se)}var ze=R.parseURL(de);if(!ze)throw new Error("Error trying to parse relative URL.");if(ze.scheme)return Ee.alwaysNormalize?(ze.path=R.normalizePath(ze.path),R.buildURLFromParts(ze)):de;var rt=R.parseURL(z);if(!rt)throw new Error("Error trying to parse base URL.");if(!rt.netLoc&&rt.path&&rt.path[0]!=="/"){var _t=u.exec(rt.path);rt.netLoc=_t[1],rt.path=_t[2]}rt.netLoc&&!rt.path&&(rt.path="/");var lt={scheme:rt.scheme,netLoc:ze.netLoc,path:null,params:ze.params,query:ze.query,fragment:ze.fragment};if(!ze.netLoc&&(lt.netLoc=rt.netLoc,ze.path[0]!=="/"))if(!ze.path)lt.path=rt.path,ze.params||(lt.params=rt.params,ze.query||(lt.query=rt.query));else{var Bt=rt.path,en=Bt.substring(0,Bt.lastIndexOf("/")+1)+ze.path;lt.path=R.normalizePath(en)}return lt.path===null&&(lt.path=Ee.alwaysNormalize?R.normalizePath(ze.path):ze.path),R.buildURLFromParts(lt)},parseURL:function(z){var de=h.exec(z);return de?{scheme:de[1]||"",netLoc:de[2]||"",path:de[3]||"",params:de[4]||"",query:de[5]||"",fragment:de[6]||""}:null},normalizePath:function(z){for(z=z.split("").reverse().join("").replace(p,"");z.length!==(z=z.replace(k,"")).length;);return z.split("").reverse().join("")},buildURLFromParts:function(z){return z.scheme+z.netLoc+z.path+z.params+z.query+z.fragment}};S.exports=R})()}),kc="http://example.com",Wm=function(f,_){if(/^[a-z]+:/i.test(_))return _;/^data:/.test(f)&&(f=window.location&&window.location.href||"");var h=typeof window.URL=="function",u=/^\/\//.test(f),p=!window.location&&!/\/\//i.test(f);if(h?f=new window.URL(f,window.location||kc):/\/\//i.test(f)||(f=Au.buildAbsoluteURL(window.location&&window.location.href||"",f)),h){var k=new URL(_,f);return p?k.href.slice(kc.length):u?k.href.slice(k.protocol.length):k.href}return Au.buildAbsoluteURL(f,_)},ld=function(){function S(){this.listeners={}}var f=S.prototype;return f.on=function(h,u){this.listeners[h]||(this.listeners[h]=[]),this.listeners[h].push(u)},f.off=function(h,u){if(!this.listeners[h])return!1;var p=this.listeners[h].indexOf(u);return this.listeners[h]=this.listeners[h].slice(0),this.listeners[h].splice(p,1),p>-1},f.trigger=function(h){var u=this.listeners[h];if(u)if(arguments.length===2)for(var p=u.length,k=0;k<p;++k)u[k].call(this,arguments[1]);else for(var R=Array.prototype.slice.call(arguments,1),q=u.length,z=0;z<q;++z)u[z].apply(this,R)},f.dispose=function(){this.listeners={}},f.pipe=function(h){this.on("data",function(u){h.push(u)})},S}(),Bf=function(f){return window.atob?window.atob(f):Buffer.from(f,"base64").toString("binary")};function y_(S){for(var f=Bf(S),_=new Uint8Array(f.length),h=0;h<f.length;h++)_[h]=f.charCodeAt(h);return _}/*! @name m3u8-parser @version 4.8.0 @license Apache-2.0 */var Vm=function(S){_n(f,S);function f(){var h;return h=S.call(this)||this,h.buffer="",h}var _=f.prototype;return _.push=function(u){var p;for(this.buffer+=u,p=this.buffer.indexOf(`
`);p>-1;p=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,p)),this.buffer=this.buffer.substring(p+1)},f}(ld),tl="	",w_=function(f){var _=/([0-9.]*)?@?([0-9.]*)?/.exec(f||""),h={};return _[1]&&(h.length=parseInt(_[1],10)),_[2]&&(h.offset=parseInt(_[2],10)),h},Sc=function(){var f="[^=]*",_='"[^"]*"|[^,]*',h="(?:"+f+")=(?:"+_+")";return new RegExp("(?:^|,)("+h+")")},nl=function(f){for(var _=f.split(Sc()),h={},u=_.length,p;u--;)_[u]!==""&&(p=/([^=]*)=(.*)/.exec(_[u]).slice(1),p[0]=p[0].replace(/^\s+|\s+$/g,""),p[1]=p[1].replace(/^\s+|\s+$/g,""),p[1]=p[1].replace(/^['"](.*)['"]$/g,"$1"),h[p[0]]=p[1]);return h},T_=function(S){_n(f,S);function f(){var h;return h=S.call(this)||this,h.customParsers=[],h.tagMappers=[],h}var _=f.prototype;return _.push=function(u){var p=this,k,R;if(u=u.trim(),u.length!==0){if(u[0]!=="#"){this.trigger("data",{type:"uri",uri:u});return}var q=this.tagMappers.reduce(function(z,de){var Ee=de(u);return Ee===u?z:z.concat([Ee])},[u]);q.forEach(function(z){for(var de=0;de<p.customParsers.length;de++)if(p.customParsers[de].call(p,z))return;if(z.indexOf("#EXT")!==0){p.trigger("data",{type:"comment",text:z.slice(1)});return}if(z=z.replace("\r",""),k=/^#EXTM3U/.exec(z),k){p.trigger("data",{type:"tag",tagType:"m3u"});return}if(k=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(z),k){R={type:"tag",tagType:"inf"},k[1]&&(R.duration=parseFloat(k[1])),k[2]&&(R.title=k[2]),p.trigger("data",R);return}if(k=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(z),k){R={type:"tag",tagType:"targetduration"},k[1]&&(R.duration=parseInt(k[1],10)),p.trigger("data",R);return}if(k=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(z),k){R={type:"tag",tagType:"version"},k[1]&&(R.version=parseInt(k[1],10)),p.trigger("data",R);return}if(k=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(z),k){R={type:"tag",tagType:"media-sequence"},k[1]&&(R.number=parseInt(k[1],10)),p.trigger("data",R);return}if(k=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(z),k){R={type:"tag",tagType:"discontinuity-sequence"},k[1]&&(R.number=parseInt(k[1],10)),p.trigger("data",R);return}if(k=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(z),k){R={type:"tag",tagType:"playlist-type"},k[1]&&(R.playlistType=k[1]),p.trigger("data",R);return}if(k=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(z),k){R=F(w_(k[1]),{type:"tag",tagType:"byterange"}),p.trigger("data",R);return}if(k=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(z),k){R={type:"tag",tagType:"allow-cache"},k[1]&&(R.allowed=!/NO/.test(k[1])),p.trigger("data",R);return}if(k=/^#EXT-X-MAP:?(.*)$/.exec(z),k){if(R={type:"tag",tagType:"map"},k[1]){var Ee=nl(k[1]);Ee.URI&&(R.uri=Ee.URI),Ee.BYTERANGE&&(R.byterange=w_(Ee.BYTERANGE))}p.trigger("data",R);return}if(k=/^#EXT-X-STREAM-INF:?(.*)$/.exec(z),k){if(R={type:"tag",tagType:"stream-inf"},k[1]){if(R.attributes=nl(k[1]),R.attributes.RESOLUTION){var Se=R.attributes.RESOLUTION.split("x"),ze={};Se[0]&&(ze.width=parseInt(Se[0],10)),Se[1]&&(ze.height=parseInt(Se[1],10)),R.attributes.RESOLUTION=ze}R.attributes.BANDWIDTH&&(R.attributes.BANDWIDTH=parseInt(R.attributes.BANDWIDTH,10)),R.attributes["FRAME-RATE"]&&(R.attributes["FRAME-RATE"]=parseFloat(R.attributes["FRAME-RATE"])),R.attributes["PROGRAM-ID"]&&(R.attributes["PROGRAM-ID"]=parseInt(R.attributes["PROGRAM-ID"],10))}p.trigger("data",R);return}if(k=/^#EXT-X-MEDIA:?(.*)$/.exec(z),k){R={type:"tag",tagType:"media"},k[1]&&(R.attributes=nl(k[1])),p.trigger("data",R);return}if(k=/^#EXT-X-ENDLIST/.exec(z),k){p.trigger("data",{type:"tag",tagType:"endlist"});return}if(k=/^#EXT-X-DISCONTINUITY/.exec(z),k){p.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(k=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(z),k){R={type:"tag",tagType:"program-date-time"},k[1]&&(R.dateTimeString=k[1],R.dateTimeObject=new Date(k[1])),p.trigger("data",R);return}if(k=/^#EXT-X-KEY:?(.*)$/.exec(z),k){R={type:"tag",tagType:"key"},k[1]&&(R.attributes=nl(k[1]),R.attributes.IV&&(R.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(R.attributes.IV=R.attributes.IV.substring(2)),R.attributes.IV=R.attributes.IV.match(/.{8}/g),R.attributes.IV[0]=parseInt(R.attributes.IV[0],16),R.attributes.IV[1]=parseInt(R.attributes.IV[1],16),R.attributes.IV[2]=parseInt(R.attributes.IV[2],16),R.attributes.IV[3]=parseInt(R.attributes.IV[3],16),R.attributes.IV=new Uint32Array(R.attributes.IV))),p.trigger("data",R);return}if(k=/^#EXT-X-START:?(.*)$/.exec(z),k){R={type:"tag",tagType:"start"},k[1]&&(R.attributes=nl(k[1]),R.attributes["TIME-OFFSET"]=parseFloat(R.attributes["TIME-OFFSET"]),R.attributes.PRECISE=/YES/.test(R.attributes.PRECISE)),p.trigger("data",R);return}if(k=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(z),k){R={type:"tag",tagType:"cue-out-cont"},k[1]?R.data=k[1]:R.data="",p.trigger("data",R);return}if(k=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(z),k){R={type:"tag",tagType:"cue-out"},k[1]?R.data=k[1]:R.data="",p.trigger("data",R);return}if(k=/^#EXT-X-CUE-IN:?(.*)?$/.exec(z),k){R={type:"tag",tagType:"cue-in"},k[1]?R.data=k[1]:R.data="",p.trigger("data",R);return}if(k=/^#EXT-X-SKIP:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"skip"},R.attributes=nl(k[1]),R.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(R.attributes["SKIPPED-SEGMENTS"]=parseInt(R.attributes["SKIPPED-SEGMENTS"],10)),R.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(R.attributes["RECENTLY-REMOVED-DATERANGES"]=R.attributes["RECENTLY-REMOVED-DATERANGES"].split(tl)),p.trigger("data",R);return}if(k=/^#EXT-X-PART:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"part"},R.attributes=nl(k[1]),["DURATION"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=parseFloat(R.attributes[rt]))}),["INDEPENDENT","GAP"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=/YES/.test(R.attributes[rt]))}),R.attributes.hasOwnProperty("BYTERANGE")&&(R.attributes.byterange=w_(R.attributes.BYTERANGE)),p.trigger("data",R);return}if(k=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"server-control"},R.attributes=nl(k[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=parseFloat(R.attributes[rt]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=/YES/.test(R.attributes[rt]))}),p.trigger("data",R);return}if(k=/^#EXT-X-PART-INF:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"part-inf"},R.attributes=nl(k[1]),["PART-TARGET"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=parseFloat(R.attributes[rt]))}),p.trigger("data",R);return}if(k=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"preload-hint"},R.attributes=nl(k[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(rt){if(R.attributes.hasOwnProperty(rt)){R.attributes[rt]=parseInt(R.attributes[rt],10);var _t=rt==="BYTERANGE-LENGTH"?"length":"offset";R.attributes.byterange=R.attributes.byterange||{},R.attributes.byterange[_t]=R.attributes[rt],delete R.attributes[rt]}}),p.trigger("data",R);return}if(k=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(z),k&&k[1]){R={type:"tag",tagType:"rendition-report"},R.attributes=nl(k[1]),["LAST-MSN","LAST-PART"].forEach(function(rt){R.attributes.hasOwnProperty(rt)&&(R.attributes[rt]=parseInt(R.attributes[rt],10))}),p.trigger("data",R);return}p.trigger("data",{type:"tag",data:z.slice(4)})})}},_.addParser=function(u){var p=this,k=u.expression,R=u.customType,q=u.dataParser,z=u.segment;typeof q!="function"&&(q=function(Ee){return Ee}),this.customParsers.push(function(de){var Ee=k.exec(de);if(Ee)return p.trigger("data",{type:"custom",data:q(de),customType:R,segment:z}),!0})},_.addTagMapper=function(u){var p=u.expression,k=u.map,R=function(z){return p.test(z)?k(z):z};this.tagMappers.push(R)},f}(ld),zp=function(f){return f.toLowerCase().replace(/-(\w)/g,function(_){return _[1].toUpperCase()})},Ud=function(f){var _={};return Object.keys(f).forEach(function(h){_[zp(h)]=f[h]}),_},ud=function(f){var _=f.serverControl,h=f.targetDuration,u=f.partTargetDuration;if(_){var p="#EXT-X-SERVER-CONTROL",k="holdBack",R="partHoldBack",q=h&&h*3,z=u&&u*2;h&&!_.hasOwnProperty(k)&&(_[k]=q,this.trigger("info",{message:p+" defaulting HOLD-BACK to targetDuration * 3 ("+q+")."})),q&&_[k]<q&&(this.trigger("warn",{message:p+" clamping HOLD-BACK ("+_[k]+") to targetDuration * 3 ("+q+")"}),_[k]=q),u&&!_.hasOwnProperty(R)&&(_[R]=u*3,this.trigger("info",{message:p+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+_[R]+")."})),u&&_[R]<z&&(this.trigger("warn",{message:p+" clamping PART-HOLD-BACK ("+_[R]+") to partTargetDuration * 2 ("+z+")."}),_[R]=z)}},k_=function(S){_n(f,S);function f(){var h;h=S.call(this)||this,h.lineStream=new Vm,h.parseStream=new T_,h.lineStream.pipe(h.parseStream);var u=Bn(h),p=[],k={},R,q,z=!1,de=function(){},Ee={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},Se="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",ze=0;h.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var rt=0,_t=0;return h.on("end",function(){k.uri||!k.parts&&!k.preloadHints||(!k.map&&R&&(k.map=R),!k.key&&q&&(k.key=q),!k.timeline&&typeof ze=="number"&&(k.timeline=ze),h.manifest.preloadSegment=k)}),h.parseStream.on("data",function(lt){var Bt,en;({tag:function(){({version:function(){lt.version&&(this.manifest.version=lt.version)},"allow-cache":function(){this.manifest.allowCache=lt.allowed,"allowed"in lt||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var gn={};"length"in lt&&(k.byterange=gn,gn.length=lt.length,"offset"in lt||(lt.offset=rt)),"offset"in lt&&(k.byterange=gn,gn.offset=lt.offset),rt=gn.offset+gn.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),lt.duration>0&&(k.duration=lt.duration),lt.duration===0&&(k.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=p},key:function(){if(!lt.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(lt.attributes.METHOD==="NONE"){q=null;return}if(!lt.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(lt.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:lt.attributes};return}if(lt.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:lt.attributes.URI};return}if(lt.attributes.KEYFORMAT===Se){var gn=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(gn.indexOf(lt.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(lt.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),lt.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(lt.attributes.KEYID&&lt.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:lt.attributes.KEYFORMAT,keyId:lt.attributes.KEYID.substring(2)},pssh:y_(lt.attributes.URI.split(",")[1])};return}lt.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),q={method:lt.attributes.METHOD||"AES-128",uri:lt.attributes.URI},typeof lt.attributes.IV<"u"&&(q.iv=lt.attributes.IV)},"media-sequence":function(){if(!isFinite(lt.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+lt.number});return}this.manifest.mediaSequence=lt.number},"discontinuity-sequence":function(){if(!isFinite(lt.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+lt.number});return}this.manifest.discontinuitySequence=lt.number,ze=lt.number},"playlist-type":function(){if(!/VOD|EVENT/.test(lt.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+lt.playlist});return}this.manifest.playlistType=lt.playlistType},map:function(){R={},lt.uri&&(R.uri=lt.uri),lt.byterange&&(R.byterange=lt.byterange),q&&(R.key=q)},"stream-inf":function(){if(this.manifest.playlists=p,this.manifest.mediaGroups=this.manifest.mediaGroups||Ee,!lt.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}k.attributes||(k.attributes={}),F(k.attributes,lt.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||Ee,!(lt.attributes&&lt.attributes.TYPE&&lt.attributes["GROUP-ID"]&&lt.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var gn=this.manifest.mediaGroups[lt.attributes.TYPE];gn[lt.attributes["GROUP-ID"]]=gn[lt.attributes["GROUP-ID"]]||{},Bt=gn[lt.attributes["GROUP-ID"]],en={default:/yes/i.test(lt.attributes.DEFAULT)},en.default?en.autoselect=!0:en.autoselect=/yes/i.test(lt.attributes.AUTOSELECT),lt.attributes.LANGUAGE&&(en.language=lt.attributes.LANGUAGE),lt.attributes.URI&&(en.uri=lt.attributes.URI),lt.attributes["INSTREAM-ID"]&&(en.instreamId=lt.attributes["INSTREAM-ID"]),lt.attributes.CHARACTERISTICS&&(en.characteristics=lt.attributes.CHARACTERISTICS),lt.attributes.FORCED&&(en.forced=/yes/i.test(lt.attributes.FORCED)),Bt[lt.attributes.NAME]=en},discontinuity:function(){ze+=1,k.discontinuity=!0,this.manifest.discontinuityStarts.push(p.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=lt.dateTimeString,this.manifest.dateTimeObject=lt.dateTimeObject),k.dateTimeString=lt.dateTimeString,k.dateTimeObject=lt.dateTimeObject},targetduration:function(){if(!isFinite(lt.duration)||lt.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+lt.duration});return}this.manifest.targetDuration=lt.duration,ud.call(this,this.manifest)},start:function(){if(!lt.attributes||isNaN(lt.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:lt.attributes["TIME-OFFSET"],precise:lt.attributes.PRECISE}},"cue-out":function(){k.cueOut=lt.data},"cue-out-cont":function(){k.cueOutCont=lt.data},"cue-in":function(){k.cueIn=lt.data},skip:function(){this.manifest.skip=Ud(lt.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",lt.attributes,["SKIPPED-SEGMENTS"])},part:function(){var gn=this;z=!0;var $n=this.manifest.segments.length,Tn=Ud(lt.attributes);k.parts=k.parts||[],k.parts.push(Tn),Tn.byterange&&(Tn.byterange.hasOwnProperty("offset")||(Tn.byterange.offset=_t),_t=Tn.byterange.offset+Tn.byterange.length);var bn=k.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+bn+" for segment #"+$n,lt.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(An,wn){An.hasOwnProperty("lastPart")||gn.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+wn+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var gn=this.manifest.serverControl=Ud(lt.attributes);gn.hasOwnProperty("canBlockReload")||(gn.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ud.call(this,this.manifest),gn.canSkipDateranges&&!gn.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var gn=this.manifest.segments.length,$n=Ud(lt.attributes),Tn=$n.type&&$n.type==="PART";k.preloadHints=k.preloadHints||[],k.preloadHints.push($n),$n.byterange&&($n.byterange.hasOwnProperty("offset")||($n.byterange.offset=Tn?_t:0,Tn&&(_t=$n.byterange.offset+$n.byterange.length)));var bn=k.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+bn+" for segment #"+gn,lt.attributes,["TYPE","URI"]),!!$n.type)for(var An=0;An<k.preloadHints.length-1;An++){var wn=k.preloadHints[An];wn.type&&wn.type===$n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+bn+" for segment #"+gn+" has the same TYPE "+$n.type+" as preload hint #"+An})}},"rendition-report":function(){var gn=Ud(lt.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(gn);var $n=this.manifest.renditionReports.length-1,Tn=["LAST-MSN","URI"];z&&Tn.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+$n,lt.attributes,Tn)},"part-inf":function(){this.manifest.partInf=Ud(lt.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",lt.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),ud.call(this,this.manifest)}}[lt.tagType]||de).call(u)},uri:function(){k.uri=lt.uri,p.push(k),this.manifest.targetDuration&&!("duration"in k)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),k.duration=this.manifest.targetDuration),q&&(k.key=q),k.timeline=ze,R&&(k.map=R),_t=0,k={}},comment:function(){},custom:function(){lt.segment?(k.custom=k.custom||{},k.custom[lt.customType]=lt.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[lt.customType]=lt.data)}})[lt.type].call(u)}),h}var _=f.prototype;return _.warnOnMissingAttributes_=function(u,p,k){var R=[];k.forEach(function(q){p.hasOwnProperty(q)||R.push(q)}),R.length&&this.trigger("warn",{message:u+" lacks required attribute(s): "+R.join(", ")})},_.push=function(u){this.lineStream.push(u)},_.end=function(){this.lineStream.push(`
`),this.trigger("end")},_.addParser=function(u){this.parseStream.addParser(u)},_.addTagMapper=function(u){this.parseStream.addTagMapper(u)},f}(ld),dd={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},Uf=["video","audio","text"],qd=["Video","Audio","Text"],Cc=function(f){return f&&f.replace(/avc1\.(\d+)\.(\d+)/i,function(_,h,u){var p=("00"+Number(h).toString(16)).slice(-2),k=("00"+Number(u).toString(16)).slice(-2);return"avc1."+p+"00"+k})},Pl=function(f){f===void 0&&(f="");var _=f.split(","),h=[];return _.forEach(function(u){u=u.trim();var p;Uf.forEach(function(k){var R=dd[k].exec(u.toLowerCase());if(!(!R||R.length<=1)){p=k;var q=u.substring(0,R[1].length),z=u.replace(q,"");h.push({type:q,details:z,mediaType:k})}}),p||h.push({type:u,details:"",mediaType:"unknown"})}),h},il=function(f,_){if(!f.mediaGroups.AUDIO||!_)return null;var h=f.mediaGroups.AUDIO[_];if(!h)return null;for(var u in h){var p=h[u];if(p.default&&p.playlists)return Pl(p.playlists[0].attributes.CODECS)}return null},Yp=function(f){return f===void 0&&(f=""),dd.audio.test(f.trim().toLowerCase())},Pc=function(f){return f===void 0&&(f=""),dd.text.test(f.trim().toLowerCase())},qf=function(f){if(!(!f||typeof f!="string")){var _=f.toLowerCase().split(",").map(function(p){return Cc(p.trim())}),h="video";_.length===1&&Yp(_[0])?h="audio":_.length===1&&Pc(_[0])&&(h="application");var u="mp4";return _.every(function(p){return dd.mp4.test(p)})?u="mp4":_.every(function(p){return dd.webm.test(p)})?u="webm":_.every(function(p){return dd.ogg.test(p)})&&(u="ogg"),h+"/"+u+';codecs="'+f+'"'}},Wd=function(f){return f===void 0&&(f=""),window.MediaSource&&window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported(qf(f))||!1},Ec=function(f){return f===void 0&&(f=""),f.toLowerCase().split(",").every(function(_){_=_.trim();for(var h=0;h<qd.length;h++){var u=qd[h];if(dd["muxer"+u].test(_))return!0}return!1})},Gp="mp4a.40.2",S_="avc1.4d400d",Wf=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,C_=/^application\/dash\+xml/i,Kp=function(f){return Wf.test(f)?"hls":C_.test(f)?"dash":f==="application/vnd.videojs.vhs+json"?"vhs-json":null},P_=function(f){return f.toString(2).length},Vf=function(f){return Math.ceil(P_(f)/8)},Ic=function(f){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer},Xp=function(f){return Ic(f)},qi=function(f){return f instanceof Uint8Array?f:(!Array.isArray(f)&&!Xp(f)&&!(f instanceof ArrayBuffer)&&(typeof f!="number"||typeof f=="number"&&f!==f?f=0:f=[f]),new Uint8Array(f&&f.buffer||f,f&&f.byteOffset||0,f&&f.byteLength||0))},Cs=window.BigInt||Number,zf=[Cs("0x1"),Cs("0x100"),Cs("0x10000"),Cs("0x1000000"),Cs("0x100000000"),Cs("0x10000000000"),Cs("0x1000000000000"),Cs("0x100000000000000"),Cs("0x10000000000000000")],Yf=function(f,_){var h=_===void 0?{}:_,u=h.signed,p=u===void 0?!1:u,k=h.le,R=k===void 0?!1:k;f=qi(f);var q=R?"reduce":"reduceRight",z=f[q]?f[q]:Array.prototype[q],de=z.call(f,function(Se,ze,rt){var _t=R?rt:Math.abs(rt+1-f.length);return Se+Cs(ze)*zf[_t]},Cs(0));if(p){var Ee=zf[f.length]/Cs(2)-Cs(1);de=Cs(de),de>Ee&&(de-=Ee,de-=Ee,de-=Cs(2))}return Number(de)},E_=function(f,_){var h={},u=h.le,p=u===void 0?!1:u;(typeof f!="bigint"&&typeof f!="number"||typeof f=="number"&&f!==f)&&(f=0),f=Cs(f);for(var k=Vf(f),R=new Uint8Array(new ArrayBuffer(k)),q=0;q<k;q++){var z=p?q:Math.abs(q+1-R.length);R[z]=Number(f/zf[q]&Cs(255)),f<0&&(R[z]=Math.abs(~R[z]),R[z]-=q===0?1:2)}return R},Qp=function(f,_){if(typeof f!="string"&&f&&typeof f.toString=="function"&&(f=f.toString()),typeof f!="string")return new Uint8Array;_||(f=unescape(encodeURIComponent(f)));for(var h=new Uint8Array(f.length),u=0;u<f.length;u++)h[u]=f.charCodeAt(u);return h},I_=function(){for(var f=arguments.length,_=new Array(f),h=0;h<f;h++)_[h]=arguments[h];if(_=_.filter(function(R){return R&&(R.byteLength||R.length)&&typeof R!="string"}),_.length<=1)return qi(_[0]);var u=_.reduce(function(R,q,z){return R+(q.byteLength||q.length)},0),p=new Uint8Array(u),k=0;return _.forEach(function(R){R=qi(R),p.set(R,k),k+=R.byteLength}),p},Oa=function(f,_,h){var u=h===void 0?{}:h,p=u.offset,k=p===void 0?0:p,R=u.mask,q=R===void 0?[]:R;f=qi(f),_=qi(_);var z=_.every?_.every:Array.prototype.every;return _.length&&f.length-k>=_.length&&z.call(_,function(de,Ee){var Se=q[Ee]?q[Ee]&f[k+Ee]:f[k+Ee];return de===Se})},Ac="http://example.com",Dc=function(f,_){if(/^[a-z]+:/i.test(_))return _;/^data:/.test(f)&&(f=window.location&&window.location.href||"");var h=typeof window.URL=="function",u=/^\/\//.test(f),p=!window.location&&!/\/\//i.test(f);if(h?f=new window.URL(f,window.location||Ac):/\/\//i.test(f)||(f=Au.buildAbsoluteURL(window.location&&window.location.href||"",f)),h){var k=new URL(_,f);return p?k.href.slice(Ac.length):u?k.href.slice(k.protocol.length):k.href}return Au.buildAbsoluteURL(f,_)},Jp=function(f,_,h){_.forEach(function(u){for(var p in f.mediaGroups[u])for(var k in f.mediaGroups[u][p]){var R=f.mediaGroups[u][p][k];h(R,u,p,k)}})},zm=function(f){return window.atob?window.atob(f):Buffer.from(f,"base64").toString("binary")};function Eo(S){for(var f=zm(S),_=new Uint8Array(f.length),h=0;h<f.length;h++)_[h]=f.charCodeAt(h);return _}function Gf(S,f,_){if(_===void 0&&(_=Array.prototype),S&&typeof _.find=="function")return _.find.call(S,f);for(var h=0;h<S.length;h++)if(Object.prototype.hasOwnProperty.call(S,h)){var u=S[h];if(f.call(void 0,u,h,S))return u}}function qs(S,f){return f===void 0&&(f=Object),f&&typeof f.freeze=="function"?f.freeze(S):S}function Kf(S,f){if(S===null||typeof S!="object")throw new TypeError("target is not an object");for(var _ in f)Object.prototype.hasOwnProperty.call(f,_)&&(S[_]=f[_]);return S}var eo=qs({HTML:"text/html",isHTML:function(f){return f===eo.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),rn=qs({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(f){return f===rn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"}),ti=Kf,ea=Gf,Oc=qs,oF=eo,lF=rn,Zp={assign:ti,find:ea,freeze:Oc,MIME_TYPE:oF,NAMESPACE:lF},fd=Zp.find,eh=Zp.NAMESPACE;function uF(S){return S!==""}function dF(S){return S?S.split(/[\t\n\f\r ]+/).filter(uF):[]}function fF(S,f){return S.hasOwnProperty(f)||(S[f]=!0),S}function j2(S){if(!S)return[];var f=dF(S);return Object.keys(f.reduce(fF,{}))}function cF(S){return function(f){return S&&S.indexOf(f)!==-1}}function th(S,f){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(f[_]=S[_])}function rl(S,f){var _=S.prototype;if(!(_ instanceof f)){var h=function(){};h.prototype=f.prototype,h=new h,th(_,h),S.prototype=_=h}_.constructor!=S&&(typeof S!="function"&&console.error("unknown Class:"+S),_.constructor=S)}var al={},Du=al.ELEMENT_NODE=1,A_=al.ATTRIBUTE_NODE=2,Ym=al.TEXT_NODE=3,B2=al.CDATA_SECTION_NODE=4,U2=al.ENTITY_REFERENCE_NODE=5,_F=al.ENTITY_NODE=6,q2=al.PROCESSING_INSTRUCTION_NODE=7,W2=al.COMMENT_NODE=8,V2=al.DOCUMENT_NODE=9,z2=al.DOCUMENT_TYPE_NODE=10,Vd=al.DOCUMENT_FRAGMENT_NODE=11,pF=al.NOTATION_NODE=12,Io={},to={};Io.INDEX_SIZE_ERR=(to[1]="Index size error",1),Io.DOMSTRING_SIZE_ERR=(to[2]="DOMString size error",2);var sl=Io.HIERARCHY_REQUEST_ERR=(to[3]="Hierarchy request error",3);Io.WRONG_DOCUMENT_ERR=(to[4]="Wrong document",4),Io.INVALID_CHARACTER_ERR=(to[5]="Invalid character",5),Io.NO_DATA_ALLOWED_ERR=(to[6]="No data allowed",6),Io.NO_MODIFICATION_ALLOWED_ERR=(to[7]="No modification allowed",7);var Y2=Io.NOT_FOUND_ERR=(to[8]="Not found",8);Io.NOT_SUPPORTED_ERR=(to[9]="Not supported",9);var G2=Io.INUSE_ATTRIBUTE_ERR=(to[10]="Attribute in use",10);Io.INVALID_STATE_ERR=(to[11]="Invalid state",11),Io.SYNTAX_ERR=(to[12]="Syntax error",12),Io.INVALID_MODIFICATION_ERR=(to[13]="Invalid modification",13),Io.NAMESPACE_ERR=(to[14]="Invalid namespace",14),Io.INVALID_ACCESS_ERR=(to[15]="Invalid access",15);function Ds(S,f){if(f instanceof Error)var _=f;else _=this,Error.call(this,to[S]),this.message=to[S],Error.captureStackTrace&&Error.captureStackTrace(this,Ds);return _.code=S,f&&(this.message=this.message+": "+f),_}Ds.prototype=Error.prototype,th(Io,Ds);function zd(){}zd.prototype={length:0,item:function(f){return this[f]||null},toString:function(f,_){for(var h=[],u=0;u<this.length;u++)O_(this[u],h,f,_);return h.join("")},filter:function(f){return Array.prototype.filter.call(this,f)},indexOf:function(f){return Array.prototype.indexOf.call(this,f)}};function D_(S,f){this._node=S,this._refresh=f,q0(this)}function q0(S){var f=S._node._inc||S._node.ownerDocument._inc;if(S._inc!=f){var _=S._refresh(S._node);fT(S,"length",_.length),th(_,S),S._inc=f}}D_.prototype.item=function(S){return q0(this),this[S]},rl(D_,zd);function Gm(){}function K2(S,f){for(var _=S.length;_--;)if(S[_]===f)return _}function X2(S,f,_,h){if(h?f[K2(f,h)]=_:f[f.length++]=_,S){_.ownerElement=S;var u=S.ownerDocument;u&&(h&&eT(u,S,h),hF(u,S,_))}}function Q2(S,f,_){var h=K2(f,_);if(h>=0){for(var u=f.length-1;h<u;)f[h]=f[++h];if(f.length=u,S){var p=S.ownerDocument;p&&(eT(p,S,_),_.ownerElement=null)}}else throw new Ds(Y2,new Error(S.tagName+"@"+_))}Gm.prototype={length:0,item:zd.prototype.item,getNamedItem:function(f){for(var _=this.length;_--;){var h=this[_];if(h.nodeName==f)return h}},setNamedItem:function(f){var _=f.ownerElement;if(_&&_!=this._ownerElement)throw new Ds(G2);var h=this.getNamedItem(f.nodeName);return X2(this._ownerElement,this,f,h),h},setNamedItemNS:function(f){var _=f.ownerElement,h;if(_&&_!=this._ownerElement)throw new Ds(G2);return h=this.getNamedItemNS(f.namespaceURI,f.localName),X2(this._ownerElement,this,f,h),h},removeNamedItem:function(f){var _=this.getNamedItem(f);return Q2(this._ownerElement,this,_),_},removeNamedItemNS:function(f,_){var h=this.getNamedItemNS(f,_);return Q2(this._ownerElement,this,h),h},getNamedItemNS:function(f,_){for(var h=this.length;h--;){var u=this[h];if(u.localName==_&&u.namespaceURI==f)return u}return null}};function J2(){}J2.prototype={hasFeature:function(f,_){return!0},createDocument:function(f,_,h){var u=new ih;if(u.implementation=this,u.childNodes=new zd,u.doctype=h||null,h&&u.appendChild(h),_){var p=u.createElementNS(f,_);u.appendChild(p)}return u},createDocumentType:function(f,_,h){var u=new Qm;return u.name=f,u.nodeName=f,u.publicId=_||"",u.systemId=h||"",u}};function ja(){}ja.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(f,_){return Km(this,f,_)},replaceChild:function(f,_){Km(this,f,_,rT),_&&this.removeChild(_)},removeChild:function(f){return tT(this,f)},appendChild:function(f){return this.insertBefore(f,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(f){return J0(this.ownerDocument||this,this,f)},normalize:function(){for(var f=this.firstChild;f;){var _=f.nextSibling;_&&_.nodeType==Ym&&f.nodeType==Ym?(this.removeChild(_),f.appendData(_.data)):(f.normalize(),f=_)}},isSupported:function(f,_){return this.ownerDocument.implementation.hasFeature(f,_)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(f){for(var _=this;_;){var h=_._nsMap;if(h){for(var u in h)if(Object.prototype.hasOwnProperty.call(h,u)&&h[u]===f)return u}_=_.nodeType==A_?_.ownerDocument:_.parentNode}return null},lookupNamespaceURI:function(f){for(var _=this;_;){var h=_._nsMap;if(h&&Object.prototype.hasOwnProperty.call(h,f))return h[f];_=_.nodeType==A_?_.ownerDocument:_.parentNode}return null},isDefaultNamespace:function(f){var _=this.lookupPrefix(f);return _==null}};function Z2(S){return S=="<"&&"&lt;"||S==">"&&"&gt;"||S=="&"&&"&amp;"||S=='"'&&"&quot;"||"&#"+S.charCodeAt()+";"}th(al,ja),th(al,ja.prototype);function nh(S,f){if(f(S))return!0;if(S=S.firstChild)do if(nh(S,f))return!0;while(S=S.nextSibling)}function ih(){this.ownerDocument=this}function hF(S,f,_){S&&S._inc++;var h=_.namespaceURI;h===eh.XMLNS&&(f._nsMap[_.prefix?_.localName:""]=_.value)}function eT(S,f,_,h){S&&S._inc++;var u=_.namespaceURI;u===eh.XMLNS&&delete f._nsMap[_.prefix?_.localName:""]}function W0(S,f,_){if(S&&S._inc){S._inc++;var h=f.childNodes;if(_)h[h.length++]=_;else{for(var u=f.firstChild,p=0;u;)h[p++]=u,u=u.nextSibling;h.length=p,delete h[h.length]}}}function tT(S,f){var _=f.previousSibling,h=f.nextSibling;return _?_.nextSibling=h:S.firstChild=h,h?h.previousSibling=_:S.lastChild=_,f.parentNode=null,f.previousSibling=null,f.nextSibling=null,W0(S.ownerDocument,S),f}function mF(S){return S&&(S.nodeType===ja.DOCUMENT_NODE||S.nodeType===ja.DOCUMENT_FRAGMENT_NODE||S.nodeType===ja.ELEMENT_NODE)}function gF(S){return S&&(cd(S)||V0(S)||Yd(S)||S.nodeType===ja.DOCUMENT_FRAGMENT_NODE||S.nodeType===ja.COMMENT_NODE||S.nodeType===ja.PROCESSING_INSTRUCTION_NODE)}function Yd(S){return S&&S.nodeType===ja.DOCUMENT_TYPE_NODE}function cd(S){return S&&S.nodeType===ja.ELEMENT_NODE}function V0(S){return S&&S.nodeType===ja.TEXT_NODE}function nT(S,f){var _=S.childNodes||[];if(fd(_,cd)||Yd(f))return!1;var h=fd(_,Yd);return!(f&&h&&_.indexOf(h)>_.indexOf(f))}function iT(S,f){var _=S.childNodes||[];function h(p){return cd(p)&&p!==f}if(fd(_,h))return!1;var u=fd(_,Yd);return!(f&&u&&_.indexOf(u)>_.indexOf(f))}function vF(S,f,_){if(!mF(S))throw new Ds(sl,"Unexpected parent node type "+S.nodeType);if(_&&_.parentNode!==S)throw new Ds(Y2,"child not in parent");if(!gF(f)||Yd(f)&&S.nodeType!==ja.DOCUMENT_NODE)throw new Ds(sl,"Unexpected node type "+f.nodeType+" for parent node type "+S.nodeType)}function bF(S,f,_){var h=S.childNodes||[],u=f.childNodes||[];if(f.nodeType===ja.DOCUMENT_FRAGMENT_NODE){var p=u.filter(cd);if(p.length>1||fd(u,V0))throw new Ds(sl,"More than one element or text in fragment");if(p.length===1&&!nT(S,_))throw new Ds(sl,"Element in fragment can not be inserted before doctype")}if(cd(f)&&!nT(S,_))throw new Ds(sl,"Only one element can be added and only after doctype");if(Yd(f)){if(fd(h,Yd))throw new Ds(sl,"Only one doctype is allowed");var k=fd(h,cd);if(_&&h.indexOf(k)<h.indexOf(_))throw new Ds(sl,"Doctype can only be inserted before an element");if(!_&&k)throw new Ds(sl,"Doctype can not be appended since element is present")}}function rT(S,f,_){var h=S.childNodes||[],u=f.childNodes||[];if(f.nodeType===ja.DOCUMENT_FRAGMENT_NODE){var p=u.filter(cd);if(p.length>1||fd(u,V0))throw new Ds(sl,"More than one element or text in fragment");if(p.length===1&&!iT(S,_))throw new Ds(sl,"Element in fragment can not be inserted before doctype")}if(cd(f)&&!iT(S,_))throw new Ds(sl,"Only one element can be added and only after doctype");if(Yd(f)){var k=function(z){return Yd(z)&&z!==_};if(fd(h,k))throw new Ds(sl,"Only one doctype is allowed");var R=fd(h,cd);if(_&&h.indexOf(R)<h.indexOf(_))throw new Ds(sl,"Doctype can only be inserted before an element")}}function Km(S,f,_,h){vF(S,f,_),S.nodeType===ja.DOCUMENT_NODE&&(h||bF)(S,f,_);var u=f.parentNode;if(u&&u.removeChild(f),f.nodeType===Vd){var p=f.firstChild;if(p==null)return f;var k=f.lastChild}else p=k=f;var R=_?_.previousSibling:S.lastChild;p.previousSibling=R,k.nextSibling=_,R?R.nextSibling=p:S.firstChild=p,_==null?S.lastChild=k:_.previousSibling=k;do p.parentNode=S;while(p!==k&&(p=p.nextSibling));return W0(S.ownerDocument||S,S),f.nodeType==Vd&&(f.firstChild=f.lastChild=null),f}function yF(S,f){return f.parentNode&&f.parentNode.removeChild(f),f.parentNode=S,f.previousSibling=S.lastChild,f.nextSibling=null,f.previousSibling?f.previousSibling.nextSibling=f:S.firstChild=f,S.lastChild=f,W0(S.ownerDocument,S,f),f}ih.prototype={nodeName:"#document",nodeType:V2,doctype:null,documentElement:null,_inc:1,insertBefore:function(f,_){if(f.nodeType==Vd){for(var h=f.firstChild;h;){var u=h.nextSibling;this.insertBefore(h,_),h=u}return f}return Km(this,f,_),f.ownerDocument=this,this.documentElement===null&&f.nodeType===Du&&(this.documentElement=f),f},removeChild:function(f){return this.documentElement==f&&(this.documentElement=null),tT(this,f)},replaceChild:function(f,_){Km(this,f,_,rT),f.ownerDocument=this,_&&this.removeChild(_),cd(f)&&(this.documentElement=f)},importNode:function(f,_){return dT(this,f,_)},getElementById:function(f){var _=null;return nh(this.documentElement,function(h){if(h.nodeType==Du&&h.getAttribute("id")==f)return _=h,!0}),_},getElementsByClassName:function(f){var _=j2(f);return new D_(this,function(h){var u=[];return _.length>0&&nh(h.documentElement,function(p){if(p!==h&&p.nodeType===Du){var k=p.getAttribute("class");if(k){var R=f===k;if(!R){var q=j2(k);R=_.every(cF(q))}R&&u.push(p)}}}),u})},createElement:function(f){var _=new Mc;_.ownerDocument=this,_.nodeName=f,_.tagName=f,_.localName=f,_.childNodes=new zd;var h=_.attributes=new Gm;return h._ownerElement=_,_},createDocumentFragment:function(){var f=new Jm;return f.ownerDocument=this,f.childNodes=new zd,f},createTextNode:function(f){var _=new z0;return _.ownerDocument=this,_.appendData(f),_},createComment:function(f){var _=new Y0;return _.ownerDocument=this,_.appendData(f),_},createCDATASection:function(f){var _=new G0;return _.ownerDocument=this,_.appendData(f),_},createProcessingInstruction:function(f,_){var h=new X0;return h.ownerDocument=this,h.tagName=h.target=f,h.nodeValue=h.data=_,h},createAttribute:function(f){var _=new Xm;return _.ownerDocument=this,_.name=f,_.nodeName=f,_.localName=f,_.specified=!0,_},createEntityReference:function(f){var _=new K0;return _.ownerDocument=this,_.nodeName=f,_},createElementNS:function(f,_){var h=new Mc,u=_.split(":"),p=h.attributes=new Gm;return h.childNodes=new zd,h.ownerDocument=this,h.nodeName=_,h.tagName=_,h.namespaceURI=f,u.length==2?(h.prefix=u[0],h.localName=u[1]):h.localName=_,p._ownerElement=h,h},createAttributeNS:function(f,_){var h=new Xm,u=_.split(":");return h.ownerDocument=this,h.nodeName=_,h.name=_,h.namespaceURI=f,h.specified=!0,u.length==2?(h.prefix=u[0],h.localName=u[1]):h.localName=_,h}},rl(ih,ja);function Mc(){this._nsMap={}}Mc.prototype={nodeType:Du,hasAttribute:function(f){return this.getAttributeNode(f)!=null},getAttribute:function(f){var _=this.getAttributeNode(f);return _&&_.value||""},getAttributeNode:function(f){return this.attributes.getNamedItem(f)},setAttribute:function(f,_){var h=this.ownerDocument.createAttribute(f);h.value=h.nodeValue=""+_,this.setAttributeNode(h)},removeAttribute:function(f){var _=this.getAttributeNode(f);_&&this.removeAttributeNode(_)},appendChild:function(f){return f.nodeType===Vd?this.insertBefore(f,null):yF(this,f)},setAttributeNode:function(f){return this.attributes.setNamedItem(f)},setAttributeNodeNS:function(f){return this.attributes.setNamedItemNS(f)},removeAttributeNode:function(f){return this.attributes.removeNamedItem(f.nodeName)},removeAttributeNS:function(f,_){var h=this.getAttributeNodeNS(f,_);h&&this.removeAttributeNode(h)},hasAttributeNS:function(f,_){return this.getAttributeNodeNS(f,_)!=null},getAttributeNS:function(f,_){var h=this.getAttributeNodeNS(f,_);return h&&h.value||""},setAttributeNS:function(f,_,h){var u=this.ownerDocument.createAttributeNS(f,_);u.value=u.nodeValue=""+h,this.setAttributeNode(u)},getAttributeNodeNS:function(f,_){return this.attributes.getNamedItemNS(f,_)},getElementsByTagName:function(f){return new D_(this,function(_){var h=[];return nh(_,function(u){u!==_&&u.nodeType==Du&&(f==="*"||u.tagName==f)&&h.push(u)}),h})},getElementsByTagNameNS:function(f,_){return new D_(this,function(h){var u=[];return nh(h,function(p){p!==h&&p.nodeType===Du&&(f==="*"||p.namespaceURI===f)&&(_==="*"||p.localName==_)&&u.push(p)}),u})}},ih.prototype.getElementsByTagName=Mc.prototype.getElementsByTagName,ih.prototype.getElementsByTagNameNS=Mc.prototype.getElementsByTagNameNS,rl(Mc,ja);function Xm(){}Xm.prototype.nodeType=A_,rl(Xm,ja);function rh(){}rh.prototype={data:"",substringData:function(f,_){return this.data.substring(f,f+_)},appendData:function(f){f=this.data+f,this.nodeValue=this.data=f,this.length=f.length},insertData:function(f,_){this.replaceData(f,0,_)},appendChild:function(f){throw new Error(to[sl])},deleteData:function(f,_){this.replaceData(f,_,"")},replaceData:function(f,_,h){var u=this.data.substring(0,f),p=this.data.substring(f+_);h=u+h+p,this.nodeValue=this.data=h,this.length=h.length}},rl(rh,ja);function z0(){}z0.prototype={nodeName:"#text",nodeType:Ym,splitText:function(f){var _=this.data,h=_.substring(f);_=_.substring(0,f),this.data=this.nodeValue=_,this.length=_.length;var u=this.ownerDocument.createTextNode(h);return this.parentNode&&this.parentNode.insertBefore(u,this.nextSibling),u}},rl(z0,rh);function Y0(){}Y0.prototype={nodeName:"#comment",nodeType:W2},rl(Y0,rh);function G0(){}G0.prototype={nodeName:"#cdata-section",nodeType:B2},rl(G0,rh);function Qm(){}Qm.prototype.nodeType=z2,rl(Qm,ja);function aT(){}aT.prototype.nodeType=pF,rl(aT,ja);function sT(){}sT.prototype.nodeType=_F,rl(sT,ja);function K0(){}K0.prototype.nodeType=U2,rl(K0,ja);function Jm(){}Jm.prototype.nodeName="#document-fragment",Jm.prototype.nodeType=Vd,rl(Jm,ja);function X0(){}X0.prototype.nodeType=q2,rl(X0,ja);function oT(){}oT.prototype.serializeToString=function(S,f,_){return lT.call(S,f,_)},ja.prototype.toString=lT;function lT(S,f){var _=[],h=this.nodeType==9&&this.documentElement||this,u=h.prefix,p=h.namespaceURI;if(p&&u==null){var u=h.lookupPrefix(p);if(u==null)var k=[{namespace:p,prefix:null}]}return O_(this,_,S,f,k),_.join("")}function uT(S,f,_){var h=S.prefix||"",u=S.namespaceURI;if(!u||h==="xml"&&u===eh.XML||u===eh.XMLNS)return!1;for(var p=_.length;p--;){var k=_[p];if(k.prefix===h)return k.namespace!==u}return!0}function Q0(S,f,_){S.push(" ",f,'="',_.replace(/[<>&"\t\n\r]/g,Z2),'"')}function O_(S,f,_,h,u){if(u||(u=[]),h)if(S=h(S),S){if(typeof S=="string"){f.push(S);return}}else return;switch(S.nodeType){case Du:var p=S.attributes,k=p.length,Bt=S.firstChild,R=S.tagName;_=eh.isHTML(S.namespaceURI)||_;var q=R;if(!_&&!S.prefix&&S.namespaceURI){for(var z,de=0;de<p.length;de++)if(p.item(de).name==="xmlns"){z=p.item(de).value;break}if(!z)for(var Ee=u.length-1;Ee>=0;Ee--){var Se=u[Ee];if(Se.prefix===""&&Se.namespace===S.namespaceURI){z=Se.namespace;break}}if(z!==S.namespaceURI)for(var Ee=u.length-1;Ee>=0;Ee--){var Se=u[Ee];if(Se.namespace===S.namespaceURI){Se.prefix&&(q=Se.prefix+":"+R);break}}}f.push("<",q);for(var ze=0;ze<k;ze++){var rt=p.item(ze);rt.prefix=="xmlns"?u.push({prefix:rt.localName,namespace:rt.value}):rt.nodeName=="xmlns"&&u.push({prefix:"",namespace:rt.value})}for(var ze=0;ze<k;ze++){var rt=p.item(ze);if(uT(rt,_,u)){var _t=rt.prefix||"",lt=rt.namespaceURI;Q0(f,_t?"xmlns:"+_t:"xmlns",lt),u.push({prefix:_t,namespace:lt})}O_(rt,f,_,h,u)}if(R===q&&uT(S,_,u)){var _t=S.prefix||"",lt=S.namespaceURI;Q0(f,_t?"xmlns:"+_t:"xmlns",lt),u.push({prefix:_t,namespace:lt})}if(Bt||_&&!/^(?:meta|link|img|br|hr|input)$/i.test(R)){if(f.push(">"),_&&/^script$/i.test(R))for(;Bt;)Bt.data?f.push(Bt.data):O_(Bt,f,_,h,u.slice()),Bt=Bt.nextSibling;else for(;Bt;)O_(Bt,f,_,h,u.slice()),Bt=Bt.nextSibling;f.push("</",q,">")}else f.push("/>");return;case V2:case Vd:for(var Bt=S.firstChild;Bt;)O_(Bt,f,_,h,u.slice()),Bt=Bt.nextSibling;return;case A_:return Q0(f,S.name,S.value);case Ym:return f.push(S.data.replace(/[<&>]/g,Z2));case B2:return f.push("<![CDATA[",S.data,"]]>");case W2:return f.push("<!--",S.data,"-->");case z2:var en=S.publicId,En=S.systemId;if(f.push("<!DOCTYPE ",S.name),en)f.push(" PUBLIC ",en),En&&En!="."&&f.push(" ",En),f.push(">");else if(En&&En!=".")f.push(" SYSTEM ",En,">");else{var fn=S.internalSubset;fn&&f.push(" [",fn,"]"),f.push(">")}return;case q2:return f.push("<?",S.target," ",S.data,"?>");case U2:return f.push("&",S.nodeName,";");default:f.push("??",S.nodeName)}}function dT(S,f,_){var h;switch(f.nodeType){case Du:h=f.cloneNode(!1),h.ownerDocument=S;case Vd:break;case A_:_=!0;break}if(h||(h=f.cloneNode(!1)),h.ownerDocument=S,h.parentNode=null,_)for(var u=f.firstChild;u;)h.appendChild(dT(S,u,_)),u=u.nextSibling;return h}function J0(S,f,_){var h=new f.constructor;for(var u in f)if(Object.prototype.hasOwnProperty.call(f,u)){var p=f[u];typeof p!="object"&&p!=h[u]&&(h[u]=p)}switch(f.childNodes&&(h.childNodes=new zd),h.ownerDocument=S,h.nodeType){case Du:var k=f.attributes,R=h.attributes=new Gm,q=k.length;R._ownerElement=h;for(var z=0;z<q;z++)h.setAttributeNode(J0(S,k.item(z),!0));break;case A_:_=!0}if(_)for(var de=f.firstChild;de;)h.appendChild(J0(S,de,_)),de=de.nextSibling;return h}function fT(S,f,_){S[f]=_}try{if(Object.defineProperty){var wF=function S(f){switch(f.nodeType){case Du:case Vd:var _=[];for(f=f.firstChild;f;)f.nodeType!==7&&f.nodeType!==8&&_.push(S(f)),f=f.nextSibling;return _.join("");default:return f.nodeValue}};Object.defineProperty(D_.prototype,"length",{get:function(){return q0(this),this.$$length}}),Object.defineProperty(ja.prototype,"textContent",{get:function(){return wF(this)},set:function(f){switch(this.nodeType){case Du:case Vd:for(;this.firstChild;)this.removeChild(this.firstChild);(f||String(f))&&this.appendChild(this.ownerDocument.createTextNode(f));break;default:this.data=f,this.value=f,this.nodeValue=f}}}),fT=function(f,_,h){f["$$"+_]=h}}}catch{}var TF=Qm,kF=Ds,SF=J2,CF=Mc,PF=ja,EF=zd,IF=oT,AF={DocumentType:TF,DOMException:kF,DOMImplementation:SF,Element:CF,Node:PF,NodeList:EF,XMLSerializer:IF},ah=M(function(S,f){var _=Zp.freeze;f.XML_ENTITIES=_({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),f.HTML_ENTITIES=_({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),f.entityMap=f.HTML_ENTITIES});ah.XML_ENTITIES,ah.HTML_ENTITIES,ah.entityMap;var sh=Zp.NAMESPACE,Z0=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,cT=new RegExp("[\\-\\.0-9"+Z0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),_T=new RegExp("^"+Z0.source+cT.source+"*(?::"+Z0.source+cT.source+"*)?$"),oh=0,Xf=1,M_=2,lh=3,x_=4,R_=5,uh=6,Zm=7;function $_(S,f){this.message=S,this.locator=f,Error.captureStackTrace&&Error.captureStackTrace(this,$_)}$_.prototype=new Error,$_.prototype.name=$_.name;function pT(){}pT.prototype={parse:function(f,_,h){var u=this.domBuilder;u.startDocument(),gT(_,_={}),DF(f,_,h,u,this.errorHandler),u.endDocument()}};function DF(S,f,_,h,u){function p(Pr){if(Pr>65535){Pr-=65536;var ya=55296+(Pr>>10),Za=56320+(Pr&1023);return String.fromCharCode(ya,Za)}else return String.fromCharCode(Pr)}function k(Pr){var ya=Pr.slice(1,-1);return Object.hasOwnProperty.call(_,ya)?_[ya]:ya.charAt(0)==="#"?p(parseInt(ya.substr(1).replace("x","0x"))):(u.error("entity not found:"+Pr),Pr)}function R(Pr){if(Pr>_t){var ya=S.substring(_t,Pr).replace(/&#?\w+;/g,k);Se&&q(_t),h.characters(ya,0,Pr-_t),_t=Pr}}function q(Pr,ya){for(;Pr>=de&&(ya=Ee.exec(S));)z=ya.index,de=z+ya[0].length,Se.lineNumber++;Se.columnNumber=Pr-z+1}for(var z=0,de=0,Ee=/.*(?:\r\n?|\n)|.*$/g,Se=h.locator,ze=[{currentNSMap:f}],rt={},_t=0;;){try{var lt=S.indexOf("<",_t);if(lt<0){if(!S.substr(_t).match(/^\s*$/)){var Bt=h.doc,en=Bt.createTextNode(S.substr(_t));Bt.appendChild(en),h.currentElement=en}return}switch(lt>_t&&R(lt),S.charAt(lt+1)){case"/":var oi=S.indexOf(">",lt+3),En=S.substring(lt+2,oi).replace(/[ \t\n\r]+$/g,""),fn=ze.pop();oi<0?(En=S.substring(lt+2).replace(/[\s<].*/,""),u.error("end tag name: "+En+" is not complete:"+fn.tagName),oi=lt+1+En.length):En.match(/\s</)&&(En=En.replace(/[\s<].*/,""),u.error("end tag name: "+En+" maybe not complete"),oi=lt+1+En.length);var gn=fn.localNSMap,$n=fn.tagName==En,Tn=$n||fn.tagName&&fn.tagName.toLowerCase()==En.toLowerCase();if(Tn){if(h.endElement(fn.uri,fn.localName,En),gn)for(var bn in gn)Object.prototype.hasOwnProperty.call(gn,bn)&&h.endPrefixMapping(bn);$n||u.fatalError("end tag name: "+En+" is not match the current start tagName:"+fn.tagName)}else ze.push(fn);oi++;break;case"?":Se&&q(lt),oi=$F(S,lt,h);break;case"!":Se&&q(lt),oi=RF(S,lt,h,u);break;default:Se&&q(lt);var An=new vT,wn=ze[ze.length-1].currentNSMap,oi=OF(S,lt,An,wn,k,u),Jn=An.length;if(!An.closed&&xF(S,oi,An.tagName,rt)&&(An.closed=!0,_.nbsp||u.warning("unclosed xml attribute")),Se&&Jn){for(var Zi=hT(Se,{}),Fa=0;Fa<Jn;Fa++){var Va=An[Fa];q(Va.offset),Va.locator=hT(Se,{})}h.locator=Zi,mT(An,h,wn)&&ze.push(An),h.locator=Se}else mT(An,h,wn)&&ze.push(An);sh.isHTML(An.uri)&&!An.closed?oi=MF(S,oi,An.tagName,k,h):oi++}}catch(Pr){if(Pr instanceof $_)throw Pr;u.error("element parse error: "+Pr),oi=-1}oi>_t?_t=oi:R(Math.max(lt,_t)+1)}}function hT(S,f){return f.lineNumber=S.lineNumber,f.columnNumber=S.columnNumber,f}function OF(S,f,_,h,u,p){function k(Se,ze,rt){_.attributeNames.hasOwnProperty(Se)&&p.fatalError("Attribute "+Se+" redefined"),_.addValue(Se,ze.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,u),rt)}for(var R,q,z=++f,de=oh;;){var Ee=S.charAt(z);switch(Ee){case"=":if(de===Xf)R=S.slice(f,z),de=lh;else if(de===M_)de=lh;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(de===lh||de===Xf)if(de===Xf&&(p.warning('attribute value must after "="'),R=S.slice(f,z)),f=z+1,z=S.indexOf(Ee,f),z>0)q=S.slice(f,z),k(R,q,f-1),de=R_;else throw new Error("attribute value no end '"+Ee+"' match");else if(de==x_)q=S.slice(f,z),k(R,q,f),p.warning('attribute "'+R+'" missed start quot('+Ee+")!!"),f=z+1,de=R_;else throw new Error('attribute value must after "="');break;case"/":switch(de){case oh:_.setTagName(S.slice(f,z));case R_:case uh:case Zm:de=Zm,_.closed=!0;case x_:case Xf:case M_:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return p.error("unexpected end of input"),de==oh&&_.setTagName(S.slice(f,z)),z;case">":switch(de){case oh:_.setTagName(S.slice(f,z));case R_:case uh:case Zm:break;case x_:case Xf:q=S.slice(f,z),q.slice(-1)==="/"&&(_.closed=!0,q=q.slice(0,-1));case M_:de===M_&&(q=R),de==x_?(p.warning('attribute "'+q+'" missed quot(")!'),k(R,q,f)):((!sh.isHTML(h[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&p.warning('attribute "'+q+'" missed value!! "'+q+'" instead!!'),k(q,q,f));break;case lh:throw new Error("attribute value missed!!")}return z;case"":Ee=" ";default:if(Ee<=" ")switch(de){case oh:_.setTagName(S.slice(f,z)),de=uh;break;case Xf:R=S.slice(f,z),de=M_;break;case x_:var q=S.slice(f,z);p.warning('attribute "'+q+'" missed quot(")!!'),k(R,q,f);case R_:de=uh;break}else switch(de){case M_:_.tagName,(!sh.isHTML(h[""])||!R.match(/^(?:disabled|checked|selected)$/i))&&p.warning('attribute "'+R+'" missed value!! "'+R+'" instead2!!'),k(R,R,f),f=z,de=Xf;break;case R_:p.warning('attribute space is required"'+R+'"!!');case uh:de=Xf,f=z;break;case lh:de=x_,f=z;break;case Zm:throw new Error("elements closed character '/' and '>' must be connected to")}}z++}}function mT(S,f,_){for(var h=S.tagName,u=null,Ee=S.length;Ee--;){var p=S[Ee],k=p.qName,R=p.value,Se=k.indexOf(":");if(Se>0)var q=p.prefix=k.slice(0,Se),z=k.slice(Se+1),de=q==="xmlns"&&z;else z=k,q=null,de=k==="xmlns"&&"";p.localName=z,de!==!1&&(u==null&&(u={},gT(_,_={})),_[de]=u[de]=R,p.uri=sh.XMLNS,f.startPrefixMapping(de,R))}for(var Ee=S.length;Ee--;){p=S[Ee];var q=p.prefix;q&&(q==="xml"&&(p.uri=sh.XML),q!=="xmlns"&&(p.uri=_[q||""]))}var Se=h.indexOf(":");Se>0?(q=S.prefix=h.slice(0,Se),z=S.localName=h.slice(Se+1)):(q=null,z=S.localName=h);var ze=S.uri=_[q||""];if(f.startElement(ze,z,h,S),S.closed){if(f.endElement(ze,z,h),u)for(q in u)Object.prototype.hasOwnProperty.call(u,q)&&f.endPrefixMapping(q)}else return S.currentNSMap=_,S.localNSMap=u,!0}function MF(S,f,_,h,u){if(/^(?:script|textarea)$/i.test(_)){var p=S.indexOf("</"+_+">",f),k=S.substring(f+1,p);if(/[&<]/.test(k))return/^script$/i.test(_)?(u.characters(k,0,k.length),p):(k=k.replace(/&#?\w+;/g,h),u.characters(k,0,k.length),p)}return f+1}function xF(S,f,_,h){var u=h[_];return u==null&&(u=S.lastIndexOf("</"+_+">"),u<f&&(u=S.lastIndexOf("</"+_)),h[_]=u),u<f}function gT(S,f){for(var _ in S)Object.prototype.hasOwnProperty.call(S,_)&&(f[_]=S[_])}function RF(S,f,_,h){var u=S.charAt(f+2);switch(u){case"-":if(S.charAt(f+3)==="-"){var p=S.indexOf("-->",f+4);return p>f?(_.comment(S,f+4,p-f-4),p+3):(h.error("Unclosed comment"),-1)}else return-1;default:if(S.substr(f+3,6)=="CDATA["){var p=S.indexOf("]]>",f+9);return _.startCDATA(),_.characters(S,f+9,p-f-9),_.endCDATA(),p+3}var k=NF(S,f),R=k.length;if(R>1&&/!doctype/i.test(k[0][0])){var q=k[1][0],z=!1,de=!1;R>3&&(/^public$/i.test(k[2][0])?(z=k[3][0],de=R>4&&k[4][0]):/^system$/i.test(k[2][0])&&(de=k[3][0]));var Ee=k[R-1];return _.startDTD(q,z,de),_.endDTD(),Ee.index+Ee[0].length}}return-1}function $F(S,f,_){var h=S.indexOf("?>",f);if(h){var u=S.substring(f,h).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return u?(u[0].length,_.processingInstruction(u[1],u[2]),h+2):-1}return-1}function vT(){this.attributeNames={}}vT.prototype={setTagName:function(f){if(!_T.test(f))throw new Error("invalid tagName:"+f);this.tagName=f},addValue:function(f,_,h){if(!_T.test(f))throw new Error("invalid attribute:"+f);this.attributeNames[f]=this.length,this[this.length++]={qName:f,value:_,offset:h}},length:0,getLocalName:function(f){return this[f].localName},getLocator:function(f){return this[f].locator},getQName:function(f){return this[f].qName},getURI:function(f){return this[f].uri},getValue:function(f){return this[f].value}};function NF(S,f){var _,h=[],u=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(u.lastIndex=f,u.exec(S);_=u.exec(S);)if(h.push(_),_[1])return h}var FF=pT,LF=$_,bT={XMLReader:FF,ParseError:LF},HF=AF.DOMImplementation,yT=Zp.NAMESPACE,jF=bT.ParseError,BF=bT.XMLReader;function wT(S){return S.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function TT(S){this.options=S||{locator:{}}}TT.prototype.parseFromString=function(S,f){var _=this.options,h=new BF,u=_.domBuilder||new dh,p=_.errorHandler,k=_.locator,R=_.xmlns||{},q=/\/x?html?$/.test(f),z=q?ah.HTML_ENTITIES:ah.XML_ENTITIES;k&&u.setDocumentLocator(k),h.errorHandler=UF(p,u,k),h.domBuilder=_.domBuilder||u,q&&(R[""]=yT.HTML),R.xml=R.xml||yT.XML;var de=_.normalizeLineEndings||wT;return S&&typeof S=="string"?h.parse(de(S),R,z):h.errorHandler.error("invalid doc source"),u.doc};function UF(S,f,_){if(!S){if(f instanceof dh)return f;S=f}var h={},u=S instanceof Function;_=_||{};function p(k){var R=S[k];!R&&u&&(R=S.length==2?function(q){S(k,q)}:S),h[k]=R&&function(q){R("[xmldom "+k+"]	"+q+e1(_))}||function(){}}return p("warning"),p("error"),p("fatalError"),h}function dh(){this.cdata=!1}function N_(S,f){f.lineNumber=S.lineNumber,f.columnNumber=S.columnNumber}dh.prototype={startDocument:function(){this.doc=new HF().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(f,_,h,u){var p=this.doc,k=p.createElementNS(f,h||_),R=u.length;eg(this,k),this.currentElement=k,this.locator&&N_(this.locator,k);for(var q=0;q<R;q++){var f=u.getURI(q),z=u.getValue(q),h=u.getQName(q),de=p.createAttributeNS(f,h);this.locator&&N_(u.getLocator(q),de),de.value=de.nodeValue=z,k.setAttributeNode(de)}},endElement:function(f,_,h){var u=this.currentElement;u.tagName,this.currentElement=u.parentNode},startPrefixMapping:function(f,_){},endPrefixMapping:function(f){},processingInstruction:function(f,_){var h=this.doc.createProcessingInstruction(f,_);this.locator&&N_(this.locator,h),eg(this,h)},ignorableWhitespace:function(f,_,h){},characters:function(f,_,h){if(f=kT.apply(this,arguments),f){if(this.cdata)var u=this.doc.createCDATASection(f);else var u=this.doc.createTextNode(f);this.currentElement?this.currentElement.appendChild(u):/^\s*$/.test(f)&&this.doc.appendChild(u),this.locator&&N_(this.locator,u)}},skippedEntity:function(f){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(f){(this.locator=f)&&(f.lineNumber=0)},comment:function(f,_,h){f=kT.apply(this,arguments);var u=this.doc.createComment(f);this.locator&&N_(this.locator,u),eg(this,u)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(f,_,h){var u=this.doc.implementation;if(u&&u.createDocumentType){var p=u.createDocumentType(f,_,h);this.locator&&N_(this.locator,p),eg(this,p),this.doc.doctype=p}},warning:function(f){console.warn("[xmldom warning]	"+f,e1(this.locator))},error:function(f){console.error("[xmldom error]	"+f,e1(this.locator))},fatalError:function(f){throw new jF(f,this.locator)}};function e1(S){if(S)return`
@`+(S.systemId||"")+"#[line:"+S.lineNumber+",col:"+S.columnNumber+"]"}function kT(S,f,_){return typeof S=="string"?S.substr(f,_):S.length>=f+_||f?new java.lang.String(S,f,_)+"":S}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(S){dh.prototype[S]=function(){return null}});function eg(S,f){S.currentElement?S.currentElement.appendChild(f):S.doc.appendChild(f)}var qF=dh,WF=wT,VF=TT,zF={__DOMHandler:qF,normalizeLineEndings:WF,DOMParser:VF},YF=zF.DOMParser;/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */var ST=function(f){return!!f&&typeof f=="object"},Bo=function S(){for(var f=arguments.length,_=new Array(f),h=0;h<f;h++)_[h]=arguments[h];return _.reduce(function(u,p){return typeof p!="object"||Object.keys(p).forEach(function(k){Array.isArray(u[k])&&Array.isArray(p[k])?u[k]=u[k].concat(p[k]):ST(u[k])&&ST(p[k])?u[k]=S(u[k],p[k]):u[k]=p[k]}),u},{})},CT=function(f){return Object.keys(f).map(function(_){return f[_]})},GF=function(f,_){for(var h=[],u=f;u<_;u++)h.push(u);return h},tg=function(f){return f.reduce(function(_,h){return _.concat(h)},[])},PT=function(f){if(!f.length)return[];for(var _=[],h=0;h<f.length;h++)_.push(f[h]);return _},KF=function(f,_){return f.reduce(function(h,u,p){return u[_]&&h.push(p),h},[])},t1=function(f,_){for(var h=0;h<f.length;h++)if(_(f[h]))return h;return-1},XF=function(f,_){return CT(f.reduce(function(h,u){return u.forEach(function(p){h[_(p)]=p}),h},{}))},F_={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},fh=function(f){var _=f.baseUrl,h=_===void 0?"":_,u=f.source,p=u===void 0?"":u,k=f.range,R=k===void 0?"":k,q=f.indexRange,z=q===void 0?"":q,de={uri:p,resolvedUri:Dc(h||"",p)};if(R||z){var Ee=R||z,Se=Ee.split("-"),ze=window.BigInt?window.BigInt(Se[0]):parseInt(Se[0],10),rt=window.BigInt?window.BigInt(Se[1]):parseInt(Se[1],10);ze<Number.MAX_SAFE_INTEGER&&typeof ze=="bigint"&&(ze=Number(ze)),rt<Number.MAX_SAFE_INTEGER&&typeof rt=="bigint"&&(rt=Number(rt));var _t;typeof rt=="bigint"||typeof ze=="bigint"?_t=window.BigInt(rt)-window.BigInt(ze)+window.BigInt(1):_t=rt-ze+1,typeof _t=="bigint"&&_t<Number.MAX_SAFE_INTEGER&&(_t=Number(_t)),de.byterange={length:_t,offset:ze}}return de},QF=function(f){var _;return typeof f.offset=="bigint"||typeof f.length=="bigint"?_=window.BigInt(f.offset)+window.BigInt(f.length)-window.BigInt(1):_=f.offset+f.length-1,f.offset+"-"+_},ET=function(f){return f&&typeof f!="number"&&(f=parseInt(f,10)),isNaN(f)?null:f},JF={static:function(f){var _=f.duration,h=f.timescale,u=h===void 0?1:h,p=f.sourceDuration,k=f.periodDuration,R=ET(f.endNumber),q=_/u;return typeof R=="number"?{start:0,end:R}:typeof k=="number"?{start:0,end:k/q}:{start:0,end:p/q}},dynamic:function(f){var _=f.NOW,h=f.clientOffset,u=f.availabilityStartTime,p=f.timescale,k=p===void 0?1:p,R=f.duration,q=f.periodStart,z=q===void 0?0:q,de=f.minimumUpdatePeriod,Ee=de===void 0?0:de,Se=f.timeShiftBufferDepth,ze=Se===void 0?1/0:Se,rt=ET(f.endNumber),_t=(_+h)/1e3,lt=u+z,Bt=_t+Ee,en=Bt-lt,En=Math.ceil(en*k/R),fn=Math.floor((_t-lt-ze)*k/R),gn=Math.floor((_t-lt)*k/R);return{start:Math.max(0,fn),end:typeof rt=="number"?rt:Math.min(En,gn)}}},ZF=function(f){return function(_){var h=f.duration,u=f.timescale,p=u===void 0?1:u,k=f.periodStart,R=f.startNumber,q=R===void 0?1:R;return{number:q+_,duration:h/p,timeline:k,time:_*h}}},n1=function(f){var _=f.type,h=f.duration,u=f.timescale,p=u===void 0?1:u,k=f.periodDuration,R=f.sourceDuration,q=JF[_](f),z=q.start,de=q.end,Ee=GF(z,de).map(ZF(f));if(_==="static"){var Se=Ee.length-1,ze=typeof k=="number"?k:R;Ee[Se].duration=ze-h/p*Se}return Ee},IT=function(f){var _=f.baseUrl,h=f.initialization,u=h===void 0?{}:h,p=f.sourceDuration,k=f.indexRange,R=k===void 0?"":k,q=f.periodStart,z=f.presentationTime,de=f.number,Ee=de===void 0?0:de,Se=f.duration;if(!_)throw new Error(F_.NO_BASE_URL);var ze=fh({baseUrl:_,source:u.sourceURL,range:u.range}),rt=fh({baseUrl:_,source:_,indexRange:R});if(rt.map=ze,Se){var _t=n1(f);_t.length&&(rt.duration=_t[0].duration,rt.timeline=_t[0].timeline)}else p&&(rt.duration=p,rt.timeline=q);return rt.presentationTime=z||q,rt.number=Ee,[rt]},i1=function(f,_,h){var u=f.sidx.map?f.sidx.map:null,p=f.sidx.duration,k=f.timeline||0,R=f.sidx.byterange,q=R.offset+R.length,z=_.timescale,de=_.references.filter(function(An){return An.referenceType!==1}),Ee=[],Se=f.endList?"static":"dynamic",ze=f.sidx.timeline,rt=ze,_t=f.mediaSequence||0,lt;typeof _.firstOffset=="bigint"?lt=window.BigInt(q)+_.firstOffset:lt=q+_.firstOffset;for(var Bt=0;Bt<de.length;Bt++){var en=_.references[Bt],En=en.referencedSize,fn=en.subsegmentDuration,gn=void 0;typeof lt=="bigint"?gn=lt+window.BigInt(En)-window.BigInt(1):gn=lt+En-1;var $n=lt+"-"+gn,Tn={baseUrl:h,timescale:z,timeline:k,periodStart:ze,presentationTime:rt,number:_t,duration:fn,sourceDuration:p,indexRange:$n,type:Se},bn=IT(Tn)[0];u&&(bn.map=u),Ee.push(bn),typeof lt=="bigint"?lt+=window.BigInt(En):lt+=En,rt+=fn/z,_t++}return f.segments=Ee,f},eL=["AUDIO","SUBTITLES"],tL=1/60,AT=function(f){return XF(f,function(_){var h=_.timeline;return h}).sort(function(_,h){return _.timeline>h.timeline?1:-1})},nL=function(f,_){for(var h=0;h<f.length;h++)if(f[h].attributes.NAME===_)return f[h];return null},DT=function(f){var _=[];return Jp(f,eL,function(h,u,p,k){_=_.concat(h.playlists||[])}),_},OT=function(f){var _=f.playlist,h=f.mediaSequence;_.mediaSequence=h,_.segments.forEach(function(u,p){u.number=_.mediaSequence+p})},iL=function(f){var _=f.oldPlaylists,h=f.newPlaylists,u=f.timelineStarts;h.forEach(function(p){p.discontinuitySequence=t1(u,function(de){var Ee=de.timeline;return Ee===p.timeline});var k=nL(_,p.attributes.NAME);if(k&&!p.sidx){var R=p.segments[0],q=t1(k.segments,function(de){return Math.abs(de.presentationTime-R.presentationTime)<tL});if(q===-1){OT({playlist:p,mediaSequence:k.mediaSequence+k.segments.length}),p.segments[0].discontinuity=!0,p.discontinuityStarts.unshift(0),(!k.segments.length&&p.timeline>k.timeline||k.segments.length&&p.timeline>k.segments[k.segments.length-1].timeline)&&p.discontinuitySequence--;return}var z=k.segments[q];z.discontinuity&&!R.discontinuity&&(R.discontinuity=!0,p.discontinuityStarts.unshift(0),p.discontinuitySequence--),OT({playlist:p,mediaSequence:k.segments[q].number})}})},rL=function(f){var _=f.oldManifest,h=f.newManifest,u=_.playlists.concat(DT(_)),p=h.playlists.concat(DT(h));return h.timelineStarts=AT([_.timelineStarts,h.timelineStarts]),iL({oldPlaylists:u,newPlaylists:p,timelineStarts:h.timelineStarts}),h},ng=function(f){return f&&f.uri+"-"+QF(f.byterange)},r1=function(f){var _=CT(f.reduce(function(h,u){var p=u.attributes.id+(u.attributes.lang||"");if(!h[p])h[p]=u,h[p].attributes.timelineStarts=[];else{if(u.segments){var k;u.segments[0]&&(u.segments[0].discontinuity=!0),(k=h[p].segments).push.apply(k,u.segments)}u.attributes.contentProtection&&(h[p].attributes.contentProtection=u.attributes.contentProtection)}return h[p].attributes.timelineStarts.push({start:u.attributes.periodStart,timeline:u.attributes.periodStart}),h},{}));return _.map(function(h){return h.discontinuityStarts=KF(h.segments||[],"discontinuity"),h})},a1=function(f,_){var h=ng(f.sidx),u=h&&_[h]&&_[h].sidx;return u&&i1(f,u,f.sidx.resolvedUri),f},aL=function(f,_){if(_===void 0&&(_={}),!Object.keys(_).length)return f;for(var h in f)f[h]=a1(f[h],_);return f},sL=function(f,_){var h,u=f.attributes,p=f.segments,k=f.sidx,R=f.mediaSequence,q=f.discontinuitySequence,z=f.discontinuityStarts,de={attributes:(h={NAME:u.id,BANDWIDTH:u.bandwidth,CODECS:u.codecs},h["PROGRAM-ID"]=1,h),uri:"",endList:u.type==="static",timeline:u.periodStart,resolvedUri:"",targetDuration:u.duration,discontinuitySequence:q,discontinuityStarts:z,timelineStarts:u.timelineStarts,mediaSequence:R,segments:p};return u.contentProtection&&(de.contentProtection=u.contentProtection),k&&(de.sidx=k),_&&(de.attributes.AUDIO="audio",de.attributes.SUBTITLES="subs"),de},oL=function(f){var _,h=f.attributes,u=f.segments,p=f.mediaSequence,k=f.discontinuityStarts,R=f.discontinuitySequence;typeof u>"u"&&(u=[{uri:h.baseUrl,timeline:h.periodStart,resolvedUri:h.baseUrl||"",duration:h.sourceDuration,number:0}],h.duration=h.sourceDuration);var q=(_={NAME:h.id,BANDWIDTH:h.bandwidth},_["PROGRAM-ID"]=1,_);return h.codecs&&(q.CODECS=h.codecs),{attributes:q,uri:"",endList:h.type==="static",timeline:h.periodStart,resolvedUri:h.baseUrl||"",targetDuration:h.duration,timelineStarts:h.timelineStarts,discontinuityStarts:k,discontinuitySequence:R,mediaSequence:p,segments:u}},lL=function(f,_,h){_===void 0&&(_={}),h===void 0&&(h=!1);var u,p=f.reduce(function(R,q){var z=q.attributes.role&&q.attributes.role.value||"",de=q.attributes.lang||"",Ee=q.attributes.label||"main";if(de&&!q.attributes.label){var Se=z?" ("+z+")":"";Ee=""+q.attributes.lang+Se}R[Ee]||(R[Ee]={language:de,autoselect:!0,default:z==="main",playlists:[],uri:""});var ze=a1(sL(q,h),_);return R[Ee].playlists.push(ze),typeof u>"u"&&z==="main"&&(u=q,u.default=!0),R},{});if(!u){var k=Object.keys(p)[0];p[k].default=!0}return p},uL=function(f,_){return _===void 0&&(_={}),f.reduce(function(h,u){var p=u.attributes.lang||"text";return h[p]||(h[p]={language:p,default:!1,autoselect:!1,playlists:[],uri:""}),h[p].playlists.push(a1(oL(u),_)),h},{})},dL=function(f){return f.reduce(function(_,h){return h&&h.forEach(function(u){var p=u.channel,k=u.language;_[k]={autoselect:!1,default:!1,instreamId:p,language:k},u.hasOwnProperty("aspectRatio")&&(_[k].aspectRatio=u.aspectRatio),u.hasOwnProperty("easyReader")&&(_[k].easyReader=u.easyReader),u.hasOwnProperty("3D")&&(_[k]["3D"]=u["3D"])}),_},{})},fL=function(f){var _,h=f.attributes,u=f.segments,p=f.sidx,k=f.discontinuityStarts,R={attributes:(_={NAME:h.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:h.width,height:h.height},CODECS:h.codecs,BANDWIDTH:h.bandwidth},_["PROGRAM-ID"]=1,_),uri:"",endList:h.type==="static",timeline:h.periodStart,resolvedUri:"",targetDuration:h.duration,discontinuityStarts:k,timelineStarts:h.timelineStarts,segments:u};return h.frameRate&&(R.attributes["FRAME-RATE"]=h.frameRate),h.contentProtection&&(R.contentProtection=h.contentProtection),p&&(R.sidx=p),R},cL=function(f){var _=f.attributes;return _.mimeType==="video/mp4"||_.mimeType==="video/webm"||_.contentType==="video"},_L=function(f){var _=f.attributes;return _.mimeType==="audio/mp4"||_.mimeType==="audio/webm"||_.contentType==="audio"},pL=function(f){var _=f.attributes;return _.mimeType==="text/vtt"||_.contentType==="text"},hL=function(f,_){f.forEach(function(h){h.mediaSequence=0,h.discontinuitySequence=t1(_,function(u){var p=u.timeline;return p===h.timeline}),h.segments&&h.segments.forEach(function(u,p){u.number=p})})},MT=function(f){return f?Object.keys(f).reduce(function(_,h){var u=f[h];return _.concat(u.playlists)},[]):[]},mL=function(f){var _,h=f.dashPlaylists,u=f.locations,p=f.sidxMapping,k=p===void 0?{}:p,R=f.previousManifest;if(!h.length)return{};var q=h[0].attributes,z=q.sourceDuration,de=q.type,Ee=q.suggestedPresentationDelay,Se=q.minimumUpdatePeriod,ze=r1(h.filter(cL)).map(fL),rt=r1(h.filter(_L)),_t=r1(h.filter(pL)),lt=h.map(function(Tn){return Tn.attributes.captionServices}).filter(Boolean),Bt={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(_={AUDIO:{},VIDEO:{}},_["CLOSED-CAPTIONS"]={},_.SUBTITLES={},_),uri:"",duration:z,playlists:aL(ze,k)};Se>=0&&(Bt.minimumUpdatePeriod=Se*1e3),u&&(Bt.locations=u),de==="dynamic"&&(Bt.suggestedPresentationDelay=Ee);var en=Bt.playlists.length===0,En=rt.length?lL(rt,k,en):null,fn=_t.length?uL(_t,k):null,gn=ze.concat(MT(En),MT(fn)),$n=gn.map(function(Tn){var bn=Tn.timelineStarts;return bn});return Bt.timelineStarts=AT($n),hL(gn,Bt.timelineStarts),En&&(Bt.mediaGroups.AUDIO.audio=En),fn&&(Bt.mediaGroups.SUBTITLES.subs=fn),lt.length&&(Bt.mediaGroups["CLOSED-CAPTIONS"].cc=dL(lt)),R?rL({oldManifest:R,newManifest:Bt}):Bt},gL=function(f,_,h){var u=f.NOW,p=f.clientOffset,k=f.availabilityStartTime,R=f.timescale,q=R===void 0?1:R,z=f.periodStart,de=z===void 0?0:z,Ee=f.minimumUpdatePeriod,Se=Ee===void 0?0:Ee,ze=(u+p)/1e3,rt=k+de,_t=ze+Se,lt=_t-rt;return Math.ceil((lt*q-_)/h)},xT=function(f,_){for(var h=f.type,u=f.minimumUpdatePeriod,p=u===void 0?0:u,k=f.media,R=k===void 0?"":k,q=f.sourceDuration,z=f.timescale,de=z===void 0?1:z,Ee=f.startNumber,Se=Ee===void 0?1:Ee,ze=f.periodStart,rt=[],_t=-1,lt=0;lt<_.length;lt++){var Bt=_[lt],en=Bt.d,En=Bt.r||0,fn=Bt.t||0;_t<0&&(_t=fn),fn&&fn>_t&&(_t=fn);var gn=void 0;if(En<0){var $n=lt+1;$n===_.length?h==="dynamic"&&p>0&&R.indexOf("$Number$")>0?gn=gL(f,_t,en):gn=(q*de-_t)/en:gn=(_[$n].t-_t)/en}else gn=En+1;for(var Tn=Se+rt.length+gn,bn=Se+rt.length;bn<Tn;)rt.push({number:bn,duration:en/de,time:_t,timeline:ze}),_t+=en,bn++}return rt},vL=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,bL=function(f){return function(_,h,u,p){if(_==="$$")return"$";if(typeof f[h]>"u")return _;var k=""+f[h];return h==="RepresentationID"||(u?p=parseInt(p,10):p=1,k.length>=p)?k:""+new Array(p-k.length+1).join("0")+k}},RT=function(f,_){return f.replace(vL,bL(_))},yL=function(f,_){return!f.duration&&!_?[{number:f.startNumber||1,duration:f.sourceDuration,time:0,timeline:f.periodStart}]:f.duration?n1(f):xT(f,_)},wL=function(f,_){var h={RepresentationID:f.id,Bandwidth:f.bandwidth||0},u=f.initialization,p=u===void 0?{sourceURL:"",range:""}:u,k=fh({baseUrl:f.baseUrl,source:RT(p.sourceURL,h),range:p.range}),R=yL(f,_);return R.map(function(q){h.Number=q.number,h.Time=q.time;var z=RT(f.media||"",h),de=f.timescale||1,Ee=f.presentationTimeOffset||0,Se=f.periodStart+(q.time-Ee)/de,ze={uri:z,timeline:q.timeline,duration:q.duration,resolvedUri:Dc(f.baseUrl||"",z),map:k,number:q.number,presentationTime:Se};return ze})},TL=function(f,_){var h=f.baseUrl,u=f.initialization,p=u===void 0?{}:u,k=fh({baseUrl:h,source:p.sourceURL,range:p.range}),R=fh({baseUrl:h,source:_.media,range:_.mediaRange});return R.map=k,R},kL=function(f,_){var h=f.duration,u=f.segmentUrls,p=u===void 0?[]:u,k=f.periodStart;if(!h&&!_||h&&_)throw new Error(F_.SEGMENT_TIME_UNSPECIFIED);var R=p.map(function(de){return TL(f,de)}),q;h&&(q=n1(f)),_&&(q=xT(f,_));var z=q.map(function(de,Ee){if(R[Ee]){var Se=R[Ee],ze=f.timescale||1,rt=f.presentationTimeOffset||0;return Se.timeline=de.timeline,Se.duration=de.duration,Se.number=de.number,Se.presentationTime=k+(de.time-rt)/ze,Se}}).filter(function(de){return de});return z},SL=function(f){var _=f.attributes,h=f.segmentInfo,u,p;h.template?(p=wL,u=Bo(_,h.template)):h.base?(p=IT,u=Bo(_,h.base)):h.list&&(p=kL,u=Bo(_,h.list));var k={attributes:_};if(!p)return k;var R=p(u,h.segmentTimeline);if(u.duration){var q=u,z=q.duration,de=q.timescale,Ee=de===void 0?1:de;u.duration=z/Ee}else R.length?u.duration=R.reduce(function(Se,ze){return Math.max(Se,Math.ceil(ze.duration))},0):u.duration=0;return k.attributes=u,k.segments=R,h.base&&u.indexRange&&(k.sidx=R[0],k.segments=[]),k},CL=function(f){return f.map(SL)},Os=function(f,_){return PT(f.childNodes).filter(function(h){var u=h.tagName;return u===_})},s1=function(f){return f.textContent.trim()},PL=function(f){return parseFloat(f.split("/").reduce(function(_,h){return _/h}))},L_=function(f){var _=31536e3,h=30*24*60*60,u=24*60*60,p=60*60,k=60,R=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,q=R.exec(f);if(!q)return 0;var z=q.slice(1),de=z[0],Ee=z[1],Se=z[2],ze=z[3],rt=z[4],_t=z[5];return parseFloat(de||0)*_+parseFloat(Ee||0)*h+parseFloat(Se||0)*u+parseFloat(ze||0)*p+parseFloat(rt||0)*k+parseFloat(_t||0)},EL=function(f){var _=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return _.test(f)&&(f+="Z"),Date.parse(f)},$T={mediaPresentationDuration:function(f){return L_(f)},availabilityStartTime:function(f){return EL(f)/1e3},minimumUpdatePeriod:function(f){return L_(f)},suggestedPresentationDelay:function(f){return L_(f)},type:function(f){return f},timeShiftBufferDepth:function(f){return L_(f)},start:function(f){return L_(f)},width:function(f){return parseInt(f,10)},height:function(f){return parseInt(f,10)},bandwidth:function(f){return parseInt(f,10)},frameRate:function(f){return PL(f)},startNumber:function(f){return parseInt(f,10)},timescale:function(f){return parseInt(f,10)},presentationTimeOffset:function(f){return parseInt(f,10)},duration:function(f){var _=parseInt(f,10);return isNaN(_)?L_(f):_},d:function(f){return parseInt(f,10)},t:function(f){return parseInt(f,10)},r:function(f){return parseInt(f,10)},DEFAULT:function(f){return f}},Ao=function(f){return f&&f.attributes?PT(f.attributes).reduce(function(_,h){var u=$T[h.name]||$T.DEFAULT;return _[h.name]=u(h.value),_},{}):{}},IL={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ig=function(f,_){return _.length?tg(f.map(function(h){return _.map(function(u){return Dc(h,s1(u))})})):f},o1=function(f){var _=Os(f,"SegmentTemplate")[0],h=Os(f,"SegmentList")[0],u=h&&Os(h,"SegmentURL").map(function(Se){return Bo({tag:"SegmentURL"},Ao(Se))}),p=Os(f,"SegmentBase")[0],k=h||_,R=k&&Os(k,"SegmentTimeline")[0],q=h||p||_,z=q&&Os(q,"Initialization")[0],de=_&&Ao(_);de&&z?de.initialization=z&&Ao(z):de&&de.initialization&&(de.initialization={sourceURL:de.initialization});var Ee={template:de,segmentTimeline:R&&Os(R,"S").map(function(Se){return Ao(Se)}),list:h&&Bo(Ao(h),{segmentUrls:u,initialization:Ao(z)}),base:p&&Bo(Ao(p),{initialization:Ao(z)})};return Object.keys(Ee).forEach(function(Se){Ee[Se]||delete Ee[Se]}),Ee},AL=function(f,_,h){return function(u){var p=Os(u,"BaseURL"),k=ig(_,p),R=Bo(f,Ao(u)),q=o1(u);return k.map(function(z){return{segmentInfo:Bo(h,q),attributes:Bo(R,{baseUrl:z})}})}},DL=function(f){return f.reduce(function(_,h){var u=Ao(h);u.schemeIdUri&&(u.schemeIdUri=u.schemeIdUri.toLowerCase());var p=IL[u.schemeIdUri];if(p){_[p]={attributes:u};var k=Os(h,"cenc:pssh")[0];if(k){var R=s1(k);_[p].pssh=R&&Eo(R)}}return _},{})},OL=function(f){if(f.schemeIdUri==="urn:scte:dash:cc:cea-608:2015"){var _=typeof f.value!="string"?[]:f.value.split(";");return _.map(function(u){var p,k;if(k=u,/^CC\d=/.test(u)){var R=u.split("=");p=R[0],k=R[1]}else/^CC\d$/.test(u)&&(p=u);return{channel:p,language:k}})}else if(f.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"){var h=typeof f.value!="string"?[]:f.value.split(";");return h.map(function(u){var p={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(u)){var k=u.split("="),R=k[0],q=k[1],z=q===void 0?"":q;p.channel=R,p.language=u,z.split(",").forEach(function(de){var Ee=de.split(":"),Se=Ee[0],ze=Ee[1];Se==="lang"?p.language=ze:Se==="er"?p.easyReader=Number(ze):Se==="war"?p.aspectRatio=Number(ze):Se==="3D"&&(p["3D"]=Number(ze))})}else p.language=u;return p.channel&&(p.channel="SERVICE"+p.channel),p})}},ML=function(f,_,h){return function(u){var p=Ao(u),k=ig(_,Os(u,"BaseURL")),R=Os(u,"Role")[0],q={role:Ao(R)},z=Bo(f,p,q),de=Os(u,"Accessibility")[0],Ee=OL(Ao(de));Ee&&(z=Bo(z,{captionServices:Ee}));var Se=Os(u,"Label")[0];if(Se&&Se.childNodes.length){var ze=Se.childNodes[0].nodeValue.trim();z=Bo(z,{label:ze})}var rt=DL(Os(u,"ContentProtection"));Object.keys(rt).length&&(z=Bo(z,{contentProtection:rt}));var _t=o1(u),lt=Os(u,"Representation"),Bt=Bo(h,_t);return tg(lt.map(AL(z,k,Bt)))}},xL=function(f,_){return function(h,u){var p=ig(_,Os(h.node,"BaseURL")),k=Bo(f,{periodStart:h.attributes.start});typeof h.attributes.duration=="number"&&(k.periodDuration=h.attributes.duration);var R=Os(h.node,"AdaptationSet"),q=o1(h.node);return tg(R.map(ML(k,p,q)))}},RL=function(f){var _=f.attributes,h=f.priorPeriodAttributes,u=f.mpdType;return typeof _.start=="number"?_.start:h&&typeof h.start=="number"&&typeof h.duration=="number"?h.start+h.duration:!h&&u==="static"?0:null},$L=function(f,_){_===void 0&&(_={});var h=_,u=h.manifestUri,p=u===void 0?"":u,k=h.NOW,R=k===void 0?Date.now():k,q=h.clientOffset,z=q===void 0?0:q,de=Os(f,"Period");if(!de.length)throw new Error(F_.INVALID_NUMBER_OF_PERIOD);var Ee=Os(f,"Location"),Se=Ao(f),ze=ig([p],Os(f,"BaseURL"));Se.type=Se.type||"static",Se.sourceDuration=Se.mediaPresentationDuration||0,Se.NOW=R,Se.clientOffset=z,Ee.length&&(Se.locations=Ee.map(s1));var rt=[];return de.forEach(function(_t,lt){var Bt=Ao(_t),en=rt[lt-1];Bt.start=RL({attributes:Bt,priorPeriodAttributes:en?en.attributes:null,mpdType:Se.type}),rt.push({node:_t,attributes:Bt})}),{locations:Se.locations,representationInfo:tg(rt.map(xL(Se,ze)))}},NT=function(f){if(f==="")throw new Error(F_.DASH_EMPTY_MANIFEST);var _=new YF,h,u;try{h=_.parseFromString(f,"application/xml"),u=h&&h.documentElement.tagName==="MPD"?h.documentElement:null}catch{}if(!u||u&&u.getElementsByTagName("parsererror").length>0)throw new Error(F_.DASH_INVALID_XML);return u},NL=function(f){var _=Os(f,"UTCTiming")[0];if(!_)return null;var h=Ao(_);switch(h.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":h.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":h.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":h.method="DIRECT",h.value=Date.parse(h.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(F_.UNSUPPORTED_UTC_TIMING_SCHEME)}return h},FL=function(f,_){_===void 0&&(_={});var h=$L(NT(f),_),u=CL(h.representationInfo);return mL({dashPlaylists:u,locations:h.locations,sidxMapping:_.sidxMapping,previousManifest:_.previousManifest})},LL=function(f){return NL(NT(f))},FT=Math.pow(2,32),HL=function(f){var _=new DataView(f.buffer,f.byteOffset,f.byteLength),h;return _.getBigUint64?(h=_.getBigUint64(0),h<Number.MAX_SAFE_INTEGER?Number(h):h):_.getUint32(0)*FT+_.getUint32(4)},jL={getUint64:HL,MAX_UINT32:FT},LT=jL.getUint64,BL=function(f){var _=new DataView(f.buffer,f.byteOffset,f.byteLength),h={version:f[0],flags:new Uint8Array(f.subarray(1,4)),references:[],referenceId:_.getUint32(4),timescale:_.getUint32(8)},u=12;h.version===0?(h.earliestPresentationTime=_.getUint32(u),h.firstOffset=_.getUint32(u+4),u+=8):(h.earliestPresentationTime=LT(f.subarray(u)),h.firstOffset=LT(f.subarray(u+8)),u+=16),u+=2;var p=_.getUint16(u);for(u+=2;p>0;u+=12,p--)h.references.push({referenceType:(f[u]&128)>>>7,referencedSize:_.getUint32(u)&2147483647,subsegmentDuration:_.getUint32(u+4),startsWithSap:!!(f[u+8]&128),sapType:(f[u+8]&112)>>>4,sapDeltaTime:_.getUint32(u+8)&268435455});return h},UL=BL,qL=qi([73,68,51]),WL=function(f,_){_===void 0&&(_=0),f=qi(f);var h=f[_+5],u=f[_+6]<<21|f[_+7]<<14|f[_+8]<<7|f[_+9],p=(h&16)>>4;return p?u+20:u+10},ch=function S(f,_){return _===void 0&&(_=0),f=qi(f),f.length-_<10||!Oa(f,qL,{offset:_})?_:(_+=WL(f,_),S(f,_))},HT=function(f){return typeof f=="string"?Qp(f):f},VL=function(f){return Array.isArray(f)?f.map(function(_){return HT(_)}):[HT(f)]},zL=function S(f,_,h){h===void 0&&(h=!1),_=VL(_),f=qi(f);var u=[];if(!_.length)return u;for(var p=0;p<f.length;){var k=(f[p]<<24|f[p+1]<<16|f[p+2]<<8|f[p+3])>>>0,R=f.subarray(p+4,p+8);if(k===0)break;var q=p+k;if(q>f.length){if(h)break;q=f.length}var z=f.subarray(p+8,q);Oa(R,_[0])&&(_.length===1?u.push(z):u.push.apply(u,S(z,_.slice(1),h))),p=q}return u},rg={EBML:qi([26,69,223,163]),DocType:qi([66,130]),Segment:qi([24,83,128,103]),SegmentInfo:qi([21,73,169,102]),Tracks:qi([22,84,174,107]),Track:qi([174]),TrackNumber:qi([215]),DefaultDuration:qi([35,227,131]),TrackEntry:qi([174]),TrackType:qi([131]),FlagDefault:qi([136]),CodecID:qi([134]),CodecPrivate:qi([99,162]),VideoTrack:qi([224]),AudioTrack:qi([225]),Cluster:qi([31,67,182,117]),Timestamp:qi([231]),TimestampScale:qi([42,215,177]),BlockGroup:qi([160]),BlockDuration:qi([155]),Block:qi([161]),SimpleBlock:qi([163])},l1=[128,64,32,16,8,4,2,1],YL=function(f){for(var _=1,h=0;h<l1.length&&!(f&l1[h]);h++)_++;return _},ag=function(f,_,h,u){h===void 0&&(h=!0),u===void 0&&(u=!1);var p=YL(f[_]),k=f.subarray(_,_+p);return h&&(k=Array.prototype.slice.call(f,_,_+p),k[0]^=l1[p-1]),{length:p,value:Yf(k,{signed:u}),bytes:k}},jT=function S(f){return typeof f=="string"?f.match(/.{1,2}/g).map(function(_){return S(_)}):typeof f=="number"?E_(f):f},GL=function(f){return Array.isArray(f)?f.map(function(_){return jT(_)}):[jT(f)]},KL=function S(f,_,h){if(h>=_.length)return _.length;var u=ag(_,h,!1);if(Oa(f.bytes,u.bytes))return h;var p=ag(_,h+u.length);return S(f,_,h+p.length+p.value+u.length)},BT=function S(f,_){_=GL(_),f=qi(f);var h=[];if(!_.length)return h;for(var u=0;u<f.length;){var p=ag(f,u,!1),k=ag(f,u+p.length),R=u+p.length+k.length;k.value===127&&(k.value=KL(p,f,R),k.value!==f.length&&(k.value-=R));var q=R+k.value>f.length?f.length:R+k.value,z=f.subarray(R,q);Oa(_[0],p.bytes)&&(_.length===1?h.push(z):h=h.concat(S(z,_.slice(1))));var de=p.length+k.length+z.length;u+=de}return h},XL=qi([0,0,0,1]),QL=qi([0,0,1]),JL=qi([0,0,3]),ZL=function(f){for(var _=[],h=1;h<f.length-2;)Oa(f.subarray(h,h+3),JL)&&(_.push(h+2),h++),h++;if(_.length===0)return f;var u=f.length-_.length,p=new Uint8Array(u),k=0;for(h=0;h<u;k++,h++)k===_[0]&&(k++,_.shift()),p[h]=f[k];return p},UT=function(f,_,h,u){f=qi(f),h=[].concat(h);for(var p=0,k,R=0;p<f.length&&(R<u||k);){var q=void 0;if(Oa(f.subarray(p),XL)?q=4:Oa(f.subarray(p),QL)&&(q=3),!q){p++;continue}if(R++,k)return ZL(f.subarray(k,p));var z=void 0;_==="h264"?z=f[p+q]&31:_==="h265"&&(z=f[p+q]>>1&63),h.indexOf(z)!==-1&&(k=p+q),p+=q+(_==="h264"?1:2)}return f.subarray(0,0)},e6=function(f,_,h){return UT(f,"h264",_,h)},t6=function(f,_,h){return UT(f,"h265",_,h)},Uo={webm:qi([119,101,98,109]),matroska:qi([109,97,116,114,111,115,107,97]),flac:qi([102,76,97,67]),ogg:qi([79,103,103,83]),ac3:qi([11,119]),riff:qi([82,73,70,70]),avi:qi([65,86,73]),wav:qi([87,65,86,69]),"3gp":qi([102,116,121,112,51,103]),mp4:qi([102,116,121,112]),fmp4:qi([115,116,121,112]),mov:qi([102,116,121,112,113,116]),moov:qi([109,111,111,118]),moof:qi([109,111,111,102])},H_={aac:function(f){var _=ch(f);return Oa(f,[255,16],{offset:_,mask:[255,22]})},mp3:function(f){var _=ch(f);return Oa(f,[255,2],{offset:_,mask:[255,6]})},webm:function(f){var _=BT(f,[rg.EBML,rg.DocType])[0];return Oa(_,Uo.webm)},mkv:function(f){var _=BT(f,[rg.EBML,rg.DocType])[0];return Oa(_,Uo.matroska)},mp4:function(f){if(H_["3gp"](f)||H_.mov(f))return!1;if(Oa(f,Uo.mp4,{offset:4})||Oa(f,Uo.fmp4,{offset:4})||Oa(f,Uo.moof,{offset:4})||Oa(f,Uo.moov,{offset:4}))return!0},mov:function(f){return Oa(f,Uo.mov,{offset:4})},"3gp":function(f){return Oa(f,Uo["3gp"],{offset:4})},ac3:function(f){var _=ch(f);return Oa(f,Uo.ac3,{offset:_})},ts:function(f){if(f.length<189&&f.length>=1)return f[0]===71;for(var _=0;_+188<f.length&&_<188;){if(f[_]===71&&f[_+188]===71)return!0;_+=1}return!1},flac:function(f){var _=ch(f);return Oa(f,Uo.flac,{offset:_})},ogg:function(f){return Oa(f,Uo.ogg)},avi:function(f){return Oa(f,Uo.riff)&&Oa(f,Uo.avi,{offset:8})},wav:function(f){return Oa(f,Uo.riff)&&Oa(f,Uo.wav,{offset:8})},h264:function(f){return e6(f,7,3).length},h265:function(f){return t6(f,[32,33],3).length}},u1=Object.keys(H_).filter(function(S){return S!=="ts"&&S!=="h264"&&S!=="h265"}).concat(["ts","h264","h265"]);u1.forEach(function(S){var f=H_[S];H_[S]=function(_){return f(qi(_))}});var n6=H_,d1=function(f){f=qi(f);for(var _=0;_<u1.length;_++){var h=u1[_];if(n6[h](f))return h}return""},i6=function(f){return zL(f,["moof"]).length>0},f1=9e4,c1,_1,sg,p1,qT,WT,VT;c1=function(f){return f*f1},_1=function(f,_){return f*_},sg=function(f){return f/f1},p1=function(f,_){return f/_},qT=function(f,_){return c1(p1(f,_))},WT=function(f,_){return _1(sg(f),_)},VT=function(f,_,h){return sg(h?f:f-_)};var r6={ONE_SECOND_IN_TS:f1,secondsToVideoTs:c1,secondsToAudioTs:_1,videoTsToSeconds:sg,audioTsToSeconds:p1,audioTsToVideoTs:qT,videoTsToAudioTs:WT,metadataTsToSeconds:VT},og=r6.ONE_SECOND_IN_TS,a6=M(function(S){function f(_){return S.exports=f=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},f(_)}S.exports=f});function s6(S){return Function.toString.call(S).indexOf("[native code]")!==-1}var o6=s6,l6=M(function(S){function f(_){var h=typeof Map=="function"?new Map:void 0;return S.exports=f=function(p){if(p===null||!o6(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof h<"u"){if(h.has(p))return h.get(p);h.set(p,k)}function k(){return Lf(p,arguments,a6(this).constructor)}return k.prototype=Object.create(p.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),v_(k,p)},f(_)}S.exports=f});/*! @name @videojs/http-streaming @version 2.16.2 @license Apache-2.0 */var Ou=Wm,lg=function(f,_,h){return f&&h&&h.responseURL&&_!==h.responseURL?h.responseURL:_},Mu=function(f){return Wt.log.debug?Wt.log.debug.bind(Wt,"VHS:",f+" >"):function(){}},Qf=1/30,_d=Qf*3,zT=function(f,_){var h=[],u;if(f&&f.length)for(u=0;u<f.length;u++)_(f.start(u),f.end(u))&&h.push([f.start(u),f.end(u)]);return Wt.createTimeRanges(h)},j_=function(f,_){return zT(f,function(h,u){return h-_d<=_&&u+_d>=_})},ug=function(f,_){return zT(f,function(h){return h-Qf>=_})},u6=function(f){if(f.length<2)return Wt.createTimeRanges();for(var _=[],h=1;h<f.length;h++){var u=f.end(h-1),p=f.start(h);_.push([u,p])}return Wt.createTimeRanges(_)},d6=function(f,_){var h=null,u=null,p=0,k=[],R=[];if(!f||!f.length||!_||!_.length)return Wt.createTimeRange();for(var q=f.length;q--;)k.push({time:f.start(q),type:"start"}),k.push({time:f.end(q),type:"end"});for(q=_.length;q--;)k.push({time:_.start(q),type:"start"}),k.push({time:_.end(q),type:"end"});for(k.sort(function(z,de){return z.time-de.time}),q=0;q<k.length;q++)k[q].type==="start"?(p++,p===2&&(h=k[q].time)):k[q].type==="end"&&(p--,p===1&&(u=k[q].time)),h!==null&&u!==null&&(R.push([h,u]),h=null,u=null);return Wt.createTimeRanges(R)},YT=function(f){var _=[];if(!f||!f.length)return"";for(var h=0;h<f.length;h++)_.push(f.start(h)+" => "+f.end(h));return _.join(", ")},f6=function(f,_,h){h===void 0&&(h=1);var u=f.length?f.end(f.length-1):0;return(u-_)/h},xc=function(f){for(var _=[],h=0;h<f.length;h++)_.push({start:f.start(h),end:f.end(h)});return _},c6=function(f,_){if(f===_)return!1;if(!f&&_||!_&&f||f.length!==_.length)return!0;for(var h=0;h<f.length;h++)if(f.start(h)!==_.start(h)||f.end(h)!==_.end(h))return!0;return!1},GT=function(f){if(!(!f||!f.length||!f.end))return f.end(f.length-1)},h1=function(f,_){var h=0;if(!f||!f.length)return h;for(var u=0;u<f.length;u++){var p=f.start(u),k=f.end(u);if(!(_>k)){if(_>p&&_<=k){h+=k-_;continue}h+=k-p}}return h},KT=Wt.createTimeRange,m1=function(f,_){if(!_.preload)return _.duration;var h=0;return(_.parts||[]).forEach(function(u){h+=u.duration}),(_.preloadHints||[]).forEach(function(u){u.type==="PART"&&(h+=f.partTargetDuration)}),h},g1=function(f){return(f.segments||[]).reduce(function(_,h,u){return h.parts?h.parts.forEach(function(p,k){_.push({duration:p.duration,segmentIndex:u,partIndex:k,part:p,segment:h})}):_.push({duration:h.duration,segmentIndex:u,partIndex:null,segment:h,part:null}),_},[])},XT=function(f){var _=f.segments&&f.segments.length&&f.segments[f.segments.length-1];return _&&_.parts||[]},QT=function(f){var _=f.preloadSegment;if(_){var h=_.parts,u=_.preloadHints,p=(u||[]).reduce(function(k,R){return k+(R.type==="PART"?1:0)},0);return p+=h&&h.length?h.length:0,p}},JT=function(f,_){if(_.endList)return 0;if(f&&f.suggestedPresentationDelay)return f.suggestedPresentationDelay;var h=XT(_).length>0;return h&&_.serverControl&&_.serverControl.partHoldBack?_.serverControl.partHoldBack:h&&_.partTargetDuration?_.partTargetDuration*3:_.serverControl&&_.serverControl.holdBack?_.serverControl.holdBack:_.targetDuration?_.targetDuration*3:0},_6=function(f,_){var h=0,u=_-f.mediaSequence,p=f.segments[u];if(p){if(typeof p.start<"u")return{result:p.start,precise:!0};if(typeof p.end<"u")return{result:p.end-p.duration,precise:!0}}for(;u--;){if(p=f.segments[u],typeof p.end<"u")return{result:h+p.end,precise:!0};if(h+=m1(f,p),typeof p.start<"u")return{result:h+p.start,precise:!0}}return{result:h,precise:!1}},p6=function(f,_){for(var h=0,u,p=_-f.mediaSequence;p<f.segments.length;p++){if(u=f.segments[p],typeof u.start<"u")return{result:u.start-h,precise:!0};if(h+=m1(f,u),typeof u.end<"u")return{result:u.end-h,precise:!0}}return{result:-1,precise:!1}},ZT=function(f,_,h){if(typeof _>"u"&&(_=f.mediaSequence+f.segments.length),_<f.mediaSequence)return 0;var u=_6(f,_);if(u.precise)return u.result;var p=p6(f,_);return p.precise?p.result:u.result+h},ek=function(f,_,h){if(!f)return 0;if(typeof h!="number"&&(h=0),typeof _>"u"){if(f.totalDuration)return f.totalDuration;if(!f.endList)return window.Infinity}return ZT(f,_,h)},_h=function(f){var _=f.defaultDuration,h=f.durationList,u=f.startIndex,p=f.endIndex,k=0;if(u>p){var R=[p,u];u=R[0],p=R[1]}if(u<0){for(var q=u;q<Math.min(0,p);q++)k+=_;u=0}for(var z=u;z<p;z++)k+=h[z].duration;return k},tk=function(f,_,h,u){if(!f||!f.segments)return null;if(f.endList)return ek(f);if(_===null)return null;_=_||0;var p=ZT(f,f.mediaSequence+f.segments.length,_);return h&&(u=typeof u=="number"?u:JT(null,f),p-=u),Math.max(0,p)},h6=function(f,_,h){var u=!0,p=_||0,k=tk(f,_,u,h);return k===null?KT():KT(p,k)},m6=function(f){for(var _=f.playlist,h=f.currentTime,u=f.startingSegmentIndex,p=f.startingPartIndex,k=f.startTime,R=f.experimentalExactManifestTimings,q=h-k,z=g1(_),de=0,Ee=0;Ee<z.length;Ee++){var Se=z[Ee];if(u===Se.segmentIndex&&!(typeof p=="number"&&typeof Se.partIndex=="number"&&p!==Se.partIndex)){de=Ee;break}}if(q<0){if(de>0)for(var ze=de-1;ze>=0;ze--){var rt=z[ze];if(q+=rt.duration,R){if(q<0)continue}else if(q+Qf<=0)continue;return{partIndex:rt.partIndex,segmentIndex:rt.segmentIndex,startTime:k-_h({defaultDuration:_.targetDuration,durationList:z,startIndex:de,endIndex:ze})}}return{partIndex:z[0]&&z[0].partIndex||null,segmentIndex:z[0]&&z[0].segmentIndex||0,startTime:h}}if(de<0){for(var _t=de;_t<0;_t++)if(q-=_.targetDuration,q<0)return{partIndex:z[0]&&z[0].partIndex||null,segmentIndex:z[0]&&z[0].segmentIndex||0,startTime:h};de=0}for(var lt=de;lt<z.length;lt++){var Bt=z[lt];if(q-=Bt.duration,R){if(q>0)continue}else if(q-Qf>=0)continue;return{partIndex:Bt.partIndex,segmentIndex:Bt.segmentIndex,startTime:k+_h({defaultDuration:_.targetDuration,durationList:z,startIndex:de,endIndex:lt})}}return{segmentIndex:z[z.length-1].segmentIndex,partIndex:z[z.length-1].partIndex,startTime:h}},nk=function(f){return f.excludeUntil&&f.excludeUntil>Date.now()},v1=function(f){return f.excludeUntil&&f.excludeUntil===1/0},dg=function(f){var _=nk(f);return!f.disabled&&!_},g6=function(f){return f.disabled},v6=function(f){for(var _=0;_<f.segments.length;_++)if(f.segments[_].key)return!0;return!1},ik=function(f,_){return _.attributes&&_.attributes[f]},b6=function(f,_,h,u){if(u===void 0&&(u=0),!ik("BANDWIDTH",h))return NaN;var p=f*h.attributes.BANDWIDTH;return(p-u*8)/_},b1=function(f,_){if(f.playlists.length===1)return!0;var h=_.attributes.BANDWIDTH||Number.MAX_VALUE;return f.playlists.filter(function(u){return dg(u)?(u.attributes.BANDWIDTH||0)<h:!1}).length===0},y1=function(f,_){return!f&&!_||!f&&_||f&&!_?!1:!!(f===_||f.id&&_.id&&f.id===_.id||f.resolvedUri&&_.resolvedUri&&f.resolvedUri===_.resolvedUri||f.uri&&_.uri&&f.uri===_.uri)},rk=function(f,_){var h=f&&f.mediaGroups&&f.mediaGroups.AUDIO||{},u=!1;for(var p in h){for(var k in h[p])if(u=_(h[p][k]),u)break;if(u)break}return!!u},ph=function(f){if(!f||!f.playlists||!f.playlists.length){var _=rk(f,function(k){return k.playlists&&k.playlists.length||k.uri});return _}for(var h=function(R){var q=f.playlists[R],z=q.attributes&&q.attributes.CODECS;if(z&&z.split(",").every(function(Ee){return Yp(Ee)}))return"continue";var de=rk(f,function(Ee){return y1(q,Ee)});return de?"continue":{v:!1}},u=0;u<f.playlists.length;u++){var p=h(u);if(p!=="continue"&&typeof p=="object")return p.v}return!0},ol={liveEdgeDelay:JT,duration:ek,seekable:h6,getMediaInfoForTime:m6,isEnabled:dg,isDisabled:g6,isBlacklisted:nk,isIncompatible:v1,playlistEnd:tk,isAes:v6,hasAttribute:ik,estimateSegmentRequestTime:b6,isLowestEnabledRendition:b1,isAudioOnly:ph,playlistMatch:y1,segmentDurationWithParts:m1},ak=Wt.log,w1=function(f,_){return f+"-"+_},y6=function(f,_,h){return"placeholder-uri-"+f+"-"+_+"-"+h},w6=function(f){var _=f.onwarn,h=f.oninfo,u=f.manifestString,p=f.customTagParsers,k=p===void 0?[]:p,R=f.customTagMappers,q=R===void 0?[]:R,z=f.experimentalLLHLS,de=new k_;_&&de.on("warn",_),h&&de.on("info",h),k.forEach(function(_t){return de.addParser(_t)}),q.forEach(function(_t){return de.addTagMapper(_t)}),de.push(u),de.end();var Ee=de.manifest;if(z||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(_t){Ee.hasOwnProperty(_t)&&delete Ee[_t]}),Ee.segments&&Ee.segments.forEach(function(_t){["parts","preloadHints"].forEach(function(lt){_t.hasOwnProperty(lt)&&delete _t[lt]})})),!Ee.targetDuration){var Se=10;Ee.segments&&Ee.segments.length&&(Se=Ee.segments.reduce(function(_t,lt){return Math.max(_t,lt.duration)},0)),_&&_("manifest has no targetDuration defaulting to "+Se),Ee.targetDuration=Se}var ze=XT(Ee);if(ze.length&&!Ee.partTargetDuration){var rt=ze.reduce(function(_t,lt){return Math.max(_t,lt.duration)},0);_&&(_("manifest has no partTargetDuration defaulting to "+rt),ak.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),Ee.partTargetDuration=rt}return Ee},B_=function(f,_){f.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(h){if(f.mediaGroups[h])for(var u in f.mediaGroups[h])for(var p in f.mediaGroups[h][u]){var k=f.mediaGroups[h][u][p];_(k,h,u,p)}})},sk=function(f){var _=f.playlist,h=f.uri,u=f.id;_.id=u,_.playlistErrors_=0,h&&(_.uri=h),_.attributes=_.attributes||{}},T6=function(f){for(var _=f.playlists.length;_--;){var h=f.playlists[_];sk({playlist:h,id:w1(_,h.uri)}),h.resolvedUri=Ou(f.uri,h.uri),f.playlists[h.id]=h,f.playlists[h.uri]=h,h.attributes.BANDWIDTH||ak.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},k6=function(f){B_(f,function(_){_.uri&&(_.resolvedUri=Ou(f.uri,_.uri))})},S6=function(f,_){var h=w1(0,_),u={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window.location.href,resolvedUri:window.location.href,playlists:[{uri:_,id:h,resolvedUri:_,attributes:{}}]};return u.playlists[h]=u.playlists[0],u.playlists[_]=u.playlists[0],u},ok=function(f,_,h){h===void 0&&(h=y6),f.uri=_;for(var u=0;u<f.playlists.length;u++)if(!f.playlists[u].uri){var p="placeholder-uri-"+u;f.playlists[u].uri=p}var k=ph(f);B_(f,function(R,q,z,de){if(!R.playlists||!R.playlists.length){if(k&&q==="AUDIO"&&!R.uri)for(var Ee=0;Ee<f.playlists.length;Ee++){var Se=f.playlists[Ee];if(Se.attributes&&Se.attributes.AUDIO&&Se.attributes.AUDIO===z)return}R.playlists=[F({},R)]}R.playlists.forEach(function(ze,rt){var _t=h(q,z,de,ze),lt=w1(rt,_t);ze.uri?ze.resolvedUri=ze.resolvedUri||Ou(f.uri,ze.uri):(ze.uri=rt===0?_t:lt,ze.resolvedUri=ze.uri),ze.id=ze.id||lt,ze.attributes=ze.attributes||{},f.playlists[ze.id]=ze,f.playlists[ze.uri]=ze})}),T6(f),k6(f)},fg=Wt.mergeOptions,C6=Wt.EventTarget,P6=function(f,_){if(_.endList||!_.serverControl)return f;var h={};if(_.serverControl.canBlockReload){var u=_.preloadSegment,p=_.mediaSequence+_.segments.length;if(u){var k=u.parts||[],R=QT(_)-1;R>-1&&R!==k.length-1&&(h._HLS_part=R),(R>-1||k.length)&&p--}h._HLS_msn=p}if(_.serverControl&&_.serverControl.canSkipUntil&&(h._HLS_skip=_.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(h).length){var q=new window.URL(f);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(z){h.hasOwnProperty(z)&&q.searchParams.set(z,h[z])}),f=q.toString()}return f},E6=function(f,_){if(!f)return _;var h=fg(f,_);if(f.preloadHints&&!_.preloadHints&&delete h.preloadHints,f.parts&&!_.parts)delete h.parts;else if(f.parts&&_.parts)for(var u=0;u<_.parts.length;u++)f.parts&&f.parts[u]&&(h.parts[u]=fg(f.parts[u],_.parts[u]));return!f.skipped&&_.skipped&&(h.skipped=!1),f.preload&&!_.preload&&(h.preload=!1),h},I6=function(f,_,h){var u=f.slice(),p=_.slice();h=h||0;for(var k=[],R,q=0;q<p.length;q++){var z=u[q+h],de=p[q];z?(R=z.map||R,k.push(E6(z,de))):(R&&!de.map&&(de.map=R),k.push(de))}return k},lk=function(f,_){!f.resolvedUri&&f.uri&&(f.resolvedUri=Ou(_,f.uri)),f.key&&!f.key.resolvedUri&&(f.key.resolvedUri=Ou(_,f.key.uri)),f.map&&!f.map.resolvedUri&&(f.map.resolvedUri=Ou(_,f.map.uri)),f.map&&f.map.key&&!f.map.key.resolvedUri&&(f.map.key.resolvedUri=Ou(_,f.map.key.uri)),f.parts&&f.parts.length&&f.parts.forEach(function(h){h.resolvedUri||(h.resolvedUri=Ou(_,h.uri))}),f.preloadHints&&f.preloadHints.length&&f.preloadHints.forEach(function(h){h.resolvedUri||(h.resolvedUri=Ou(_,h.uri))})},uk=function(f){var _=f.segments||[],h=f.preloadSegment;if(h&&h.parts&&h.parts.length){if(h.preloadHints){for(var u=0;u<h.preloadHints.length;u++)if(h.preloadHints[u].type==="MAP")return _}h.duration=f.targetDuration,h.preload=!0,_.push(h)}return _},dk=function(f,_){return f===_||f.segments&&_.segments&&f.segments.length===_.segments.length&&f.endList===_.endList&&f.mediaSequence===_.mediaSequence&&f.preloadSegment===_.preloadSegment},T1=function(f,_,h){h===void 0&&(h=dk);var u=fg(f,{}),p=u.playlists[_.id];if(!p||h(p,_))return null;_.segments=uk(_);var k=fg(p,_);if(k.preloadSegment&&!_.preloadSegment&&delete k.preloadSegment,p.segments){if(_.skip){_.segments=_.segments||[];for(var R=0;R<_.skip.skippedSegments;R++)_.segments.unshift({skipped:!0})}k.segments=I6(p.segments,_.segments,_.mediaSequence-p.mediaSequence)}k.segments.forEach(function(z){lk(z,k.resolvedUri)});for(var q=0;q<u.playlists.length;q++)u.playlists[q].id===_.id&&(u.playlists[q]=k);return u.playlists[_.id]=k,u.playlists[_.uri]=k,B_(f,function(z,de,Ee,Se){if(z.playlists)for(var ze=0;ze<z.playlists.length;ze++)_.id===z.playlists[ze].id&&(z.playlists[ze]=k)}),u},k1=function(f,_){var h=f.segments||[],u=h[h.length-1],p=u&&u.parts&&u.parts[u.parts.length-1],k=p&&p.duration||u&&u.duration;return _&&k?k*1e3:(f.partTargetDuration||f.targetDuration||10)*500},U_=function(S){_n(f,S);function f(h,u,p){var k;if(p===void 0&&(p={}),k=S.call(this)||this,!h)throw new Error("A non-empty playlist URL or object is required");k.logger_=Mu("PlaylistLoader");var R=p,q=R.withCredentials,z=q===void 0?!1:q,de=R.handleManifestRedirects,Ee=de===void 0?!1:de;k.src=h,k.vhs_=u,k.withCredentials=z,k.handleManifestRedirects=Ee;var Se=u.options_;return k.customTagParsers=Se&&Se.customTagParsers||[],k.customTagMappers=Se&&Se.customTagMappers||[],k.experimentalLLHLS=Se&&Se.experimentalLLHLS||!1,Wt.browser.IE_VERSION&&(k.experimentalLLHLS=!1),k.state="HAVE_NOTHING",k.handleMediaupdatetimeout_=k.handleMediaupdatetimeout_.bind(Bn(k)),k.on("mediaupdatetimeout",k.handleMediaupdatetimeout_),k}var _=f.prototype;return _.handleMediaupdatetimeout_=function(){var u=this;if(this.state==="HAVE_METADATA"){var p=this.media(),k=Ou(this.master.uri,p.uri);this.experimentalLLHLS&&(k=P6(k,p)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:k,withCredentials:this.withCredentials},function(R,q){if(u.request){if(R)return u.playlistRequestError(u.request,u.media(),"HAVE_METADATA");u.haveMetadata({playlistString:u.request.responseText,url:u.media().uri,id:u.media().id})}})}},_.playlistRequestError=function(u,p,k){var R=p.uri,q=p.id;this.request=null,k&&(this.state=k),this.error={playlist:this.master.playlists[q],status:u.status,message:"HLS playlist request error at URL: "+R+".",responseText:u.responseText,code:u.status>=500?4:2},this.trigger("error")},_.parseManifest_=function(u){var p=this,k=u.url,R=u.manifestString;return w6({onwarn:function(z){var de=z.message;return p.logger_("m3u8-parser warn for "+k+": "+de)},oninfo:function(z){var de=z.message;return p.logger_("m3u8-parser info for "+k+": "+de)},manifestString:R,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},_.haveMetadata=function(u){var p=u.playlistString,k=u.playlistObject,R=u.url,q=u.id;this.request=null,this.state="HAVE_METADATA";var z=k||this.parseManifest_({url:R,manifestString:p});z.lastRequest=Date.now(),sk({playlist:z,uri:R,id:q});var de=T1(this.master,z);this.targetDuration=z.partTargetDuration||z.targetDuration,this.pendingMedia_=null,de?(this.master=de,this.media_=this.master.playlists[q]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(k1(this.media(),!!de)),this.trigger("loadedplaylist")},_.dispose=function(){this.trigger("dispose"),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),window.clearTimeout(this.finalRenditionTimeout),this.off()},_.stopRequest=function(){if(this.request){var u=this.request;this.request=null,u.onreadystatechange=null,u.abort()}},_.media=function(u,p){var k=this;if(!u)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof u=="string"){if(!this.master.playlists[u])throw new Error("Unknown playlist URI: "+u);u=this.master.playlists[u]}if(window.clearTimeout(this.finalRenditionTimeout),p){var R=(u.partTargetDuration||u.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=window.setTimeout(this.media.bind(this,u,!1),R);return}var q=this.state,z=!this.media_||u.id!==this.media_.id,de=this.master.playlists[u.id];if(de&&de.endList||u.endList&&u.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=u,z&&(this.trigger("mediachanging"),q==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(k1(u,!0)),!!z){if(this.state="SWITCHING_MEDIA",this.request){if(u.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=u,this.request=this.vhs_.xhr({uri:u.resolvedUri,withCredentials:this.withCredentials},function(Ee,Se){if(k.request){if(u.lastRequest=Date.now(),u.resolvedUri=lg(k.handleManifestRedirects,u.resolvedUri,Se),Ee)return k.playlistRequestError(k.request,u,q);k.haveMetadata({playlistString:Se.responseText,url:u.uri,id:u.id}),q==="HAVE_MASTER"?k.trigger("loadedmetadata"):k.trigger("mediachange")}})}},_.pause=function(){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")},_.load=function(u){var p=this;this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var k=this.media();if(u){var R=k?(k.partTargetDuration||k.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=window.setTimeout(function(){p.mediaUpdateTimeout=null,p.load()},R);return}if(!this.started){this.start();return}k&&!k.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")},_.updateMediaUpdateTimeout_=function(u){var p=this;this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=window.setTimeout(function(){p.mediaUpdateTimeout=null,p.trigger("mediaupdatetimeout"),p.updateMediaUpdateTimeout_(u)},u))},_.start=function(){var u=this;if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=window.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){u.setupInitialPlaylist(u.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(p,k){if(u.request){if(u.request=null,p)return u.error={status:k.status,message:"HLS playlist request error at URL: "+u.src+".",responseText:k.responseText,code:2},u.state==="HAVE_NOTHING"&&(u.started=!1),u.trigger("error");u.src=lg(u.handleManifestRedirects,u.src,k);var R=u.parseManifest_({manifestString:k.responseText,url:u.src});u.setupInitialPlaylist(R)}})},_.srcUri=function(){return typeof this.src=="string"?this.src:this.src.uri},_.setupInitialPlaylist=function(u){if(this.state="HAVE_MASTER",u.playlists){this.master=u,ok(this.master,this.srcUri()),u.playlists.forEach(function(k){k.segments=uk(k),k.segments.forEach(function(R){lk(R,k.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.master.playlists[0]);return}var p=this.srcUri()||window.location.href;this.master=S6(u,p),this.haveMetadata({playlistObject:u,url:p,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},f}(C6),A6=Wt.xhr,D6=Wt.mergeOptions,S1=function(f,_,h,u){var p=f.responseType==="arraybuffer"?f.response:f.responseText;!_&&p&&(f.responseTime=Date.now(),f.roundTripTime=f.responseTime-f.requestTime,f.bytesReceived=p.byteLength||p.length,f.bandwidth||(f.bandwidth=Math.floor(f.bytesReceived/f.roundTripTime*8*1e3))),h.headers&&(f.responseHeaders=h.headers),_&&_.code==="ETIMEDOUT"&&(f.timedout=!0),!_&&!f.aborted&&h.statusCode!==200&&h.statusCode!==206&&h.statusCode!==0&&(_=new Error("XHR Failed with a response of: "+(f&&(p||f.responseText)))),u(_,f)},fk=function(){var f=function _(h,u){h=D6({timeout:45e3},h);var p=_.beforeRequest||Wt.Vhs.xhr.beforeRequest;if(p&&typeof p=="function"){var k=p(h);k&&(h=k)}var R=Wt.Vhs.xhr.original===!0?A6:Wt.Vhs.xhr,q=R(h,function(de,Ee){return S1(q,de,Ee,u)}),z=q.abort;return q.abort=function(){return q.aborted=!0,z.apply(q,arguments)},q.uri=h.uri,q.requestTime=Date.now(),q};return f.original=!0,f},O6=function(f){var _,h=f.offset;return typeof f.offset=="bigint"||typeof f.length=="bigint"?_=window.BigInt(f.offset)+window.BigInt(f.length)-window.BigInt(1):_=f.offset+f.length-1,"bytes="+h+"-"+_},C1=function(f){var _={};return f.byterange&&(_.Range=O6(f.byterange)),_},M6=function(f,_){return f.start(_)+"-"+f.end(_)},x6=function(f,_){var h=f.toString(16);return"00".substring(0,2-h.length)+h+(_%2?" ":"")},R6=function(f){return f>=32&&f<126?String.fromCharCode(f):"."},ck=function(f){var _={};return Object.keys(f).forEach(function(h){var u=f[h];Ic(u)?_[h]={bytes:u.buffer,byteOffset:u.byteOffset,byteLength:u.byteLength}:_[h]=u}),_},cg=function(f){var _=f.byterange||{length:1/0,offset:0};return[_.length,_.offset,f.resolvedUri].join(",")},_k=function(f){return f.resolvedUri},pk=function(f){for(var _=Array.prototype.slice.call(f),h=16,u="",p,k,R=0;R<_.length/h;R++)p=_.slice(R*h,R*h+h).map(x6).join(""),k=_.slice(R*h,R*h+h).map(R6).join(""),u+=p+" "+k+`
`;return u},$6=function(f){var _=f.bytes;return pk(_)},N6=function(f){var _="",h;for(h=0;h<f.length;h++)_+=M6(f,h)+" ";return _},F6=Object.freeze({__proto__:null,createTransferableMessage:ck,initSegmentId:cg,segmentKeyId:_k,hexDump:pk,tagDump:$6,textRanges:N6}),hk=.25,L6=function(f,_){if(!_.dateTimeObject)return null;var h=_.videoTimingInfo.transmuxerPrependedSeconds,u=_.videoTimingInfo.transmuxedPresentationStart,p=u+h,k=f-p;return new Date(_.dateTimeObject.getTime()+k*1e3)},H6=function(f){return f.transmuxedPresentationEnd-f.transmuxedPresentationStart-f.transmuxerPrependedSeconds},j6=function(f,_){var h;try{h=new Date(f)}catch{return null}if(!_||!_.segments||_.segments.length===0)return null;var u=_.segments[0];if(h<u.dateTimeObject)return null;for(var p=0;p<_.segments.length-1;p++){u=_.segments[p];var k=_.segments[p+1].dateTimeObject;if(h<k)break}var R=_.segments[_.segments.length-1],q=R.dateTimeObject,z=R.videoTimingInfo?H6(R.videoTimingInfo):R.duration+R.duration*hk,de=new Date(q.getTime()+z*1e3);return h>de?null:(h>q&&(u=R),{segment:u,estimatedStart:u.videoTimingInfo?u.videoTimingInfo.transmuxedPresentationStart:ol.duration(_,_.mediaSequence+_.segments.indexOf(u)),type:u.videoTimingInfo?"accurate":"estimate"})},B6=function(f,_){if(!_||!_.segments||_.segments.length===0)return null;for(var h=0,u,p=0;p<_.segments.length&&(u=_.segments[p],h=u.videoTimingInfo?u.videoTimingInfo.transmuxedPresentationEnd:h+u.duration,!(f<=h));p++);var k=_.segments[_.segments.length-1];if(k.videoTimingInfo&&k.videoTimingInfo.transmuxedPresentationEnd<f)return null;if(f>h){if(f>h+k.duration*hk)return null;u=k}return{segment:u,estimatedStart:u.videoTimingInfo?u.videoTimingInfo.transmuxedPresentationStart:h-u.duration,type:u.videoTimingInfo?"accurate":"estimate"}},U6=function(f,_){var h,u;try{h=new Date(f),u=new Date(_)}catch{}var p=h.getTime(),k=u.getTime();return(k-p)/1e3},q6=function(f){if(!f.segments||f.segments.length===0)return!1;for(var _=0;_<f.segments.length;_++){var h=f.segments[_];if(!h.dateTimeObject)return!1}return!0},W6=function(f){var _=f.playlist,h=f.time,u=h===void 0?void 0:h,p=f.callback;if(!p)throw new Error("getProgramTime: callback must be provided");if(!_||u===void 0)return p({message:"getProgramTime: playlist and time must be provided"});var k=B6(u,_);if(!k)return p({message:"valid programTime was not found"});if(k.type==="estimate")return p({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:k.estimatedStart});var R={mediaSeconds:u},q=L6(u,k.segment);return q&&(R.programDateTime=q.toISOString()),p(null,R)},V6=function S(f){var _=f.programTime,h=f.playlist,u=f.retryCount,p=u===void 0?2:u,k=f.seekTo,R=f.pauseAfterSeek,q=R===void 0?!0:R,z=f.tech,de=f.callback;if(!de)throw new Error("seekToProgramTime: callback must be provided");if(typeof _>"u"||!h||!k)return de({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!h.endList&&!z.hasStarted_)return de({message:"player must be playing a live stream to start buffering"});if(!q6(h))return de({message:"programDateTime tags must be provided in the manifest "+h.resolvedUri});var Ee=j6(_,h);if(!Ee)return de({message:_+" was not found in the stream"});var Se=Ee.segment,ze=U6(Se.dateTimeObject,_);if(Ee.type==="estimate"){if(p===0)return de({message:_+" is not buffered yet. Try again"});k(Ee.estimatedStart+ze),z.one("seeked",function(){S({programTime:_,playlist:h,retryCount:p-1,seekTo:k,pauseAfterSeek:q,tech:z,callback:de})});return}var rt=Se.start+ze,_t=function(){return de(null,z.currentTime())};z.one("seeked",_t),q&&z.pause(),k(rt)},P1=function(f,_){if(f.readyState===4)return _()},z6=function(f,_,h){var u=[],p,k=!1,R=function(Se,ze,rt,_t){return ze.abort(),k=!0,h(Se,ze,rt,_t)},q=function(Se,ze){if(!k){if(Se)return R(Se,ze,"",u);var rt=ze.responseText.substring(u&&u.byteLength||0,ze.responseText.length);if(u=I_(u,Qp(rt,!0)),p=p||ch(u),u.length<10||p&&u.length<p+2)return P1(ze,function(){return R(Se,ze,"",u)});var _t=d1(u);return _t==="ts"&&u.length<188?P1(ze,function(){return R(Se,ze,"",u)}):!_t&&u.length<376?P1(ze,function(){return R(Se,ze,"",u)}):R(null,ze,_t,u)}},z={uri:f,beforeSend:function(Se){Se.overrideMimeType("text/plain; charset=x-user-defined"),Se.addEventListener("progress",function(ze){return ze.total,ze.loaded,S1(Se,null,{statusCode:Se.status},q)})}},de=_(z,function(Ee,Se){return S1(de,Ee,Se,q)});return de},Y6=Wt.EventTarget,mk=Wt.mergeOptions,gk=function(f,_){if(!dk(f,_)||f.sidx&&_.sidx&&(f.sidx.offset!==_.sidx.offset||f.sidx.length!==_.sidx.length))return!1;if(!f.sidx&&_.sidx||f.sidx&&!_.sidx||f.segments&&!_.segments||!f.segments&&_.segments)return!1;if(!f.segments&&!_.segments)return!0;for(var h=0;h<f.segments.length;h++){var u=f.segments[h],p=_.segments[h];if(u.uri!==p.uri)return!1;if(!(!u.byterange&&!p.byterange)){var k=u.byterange,R=p.byterange;if(k&&!R||!k&&R||k.offset!==R.offset||k.length!==R.length)return!1}}return!0},G6=function(f,_,h,u){var p=u.attributes.NAME||h;return"placeholder-uri-"+f+"-"+_+"-"+p},K6=function(f){var _=f.masterXml,h=f.srcUrl,u=f.clientOffset,p=f.sidxMapping,k=f.previousManifest,R=FL(_,{manifestUri:h,clientOffset:u,sidxMapping:p,previousManifest:k});return ok(R,h,G6),R},X6=function(f,_){B_(f,function(h,u,p,k){k in _.mediaGroups[u][p]||delete f.mediaGroups[u][p][k]})},Q6=function(f,_,h){for(var u=!0,p=mk(f,{duration:_.duration,minimumUpdatePeriod:_.minimumUpdatePeriod,timelineStarts:_.timelineStarts}),k=0;k<_.playlists.length;k++){var R=_.playlists[k];if(R.sidx){var q=ng(R.sidx);h&&h[q]&&h[q].sidx&&i1(R,h[q].sidx,R.sidx.resolvedUri)}var z=T1(p,R,gk);z&&(p=z,u=!1)}return B_(_,function(de,Ee,Se,ze){if(de.playlists&&de.playlists.length){var rt=de.playlists[0].id,_t=T1(p,de.playlists[0],gk);_t&&(p=_t,ze in p.mediaGroups[Ee][Se]||(p.mediaGroups[Ee][Se][ze]=de),p.mediaGroups[Ee][Se][ze].playlists[0]=p.playlists[rt],u=!1)}}),X6(p,_),_.minimumUpdatePeriod!==f.minimumUpdatePeriod&&(u=!1),u?null:p},J6=function(f,_){var h=!f.map&&!_.map,u=h||!!(f.map&&_.map&&f.map.byterange.offset===_.map.byterange.offset&&f.map.byterange.length===_.map.byterange.length);return u&&f.uri===_.uri&&f.byterange.offset===_.byterange.offset&&f.byterange.length===_.byterange.length},vk=function(f,_){var h={};for(var u in f){var p=f[u],k=p.sidx;if(k){var R=ng(k);if(!_[R])break;var q=_[R].sidxInfo;J6(q,k)&&(h[R]=_[R])}}return h},Z6=function(f,_){var h=vk(f.playlists,_),u=h;return B_(f,function(p,k,R,q){if(p.playlists&&p.playlists.length){var z=p.playlists;u=mk(u,vk(z,_))}}),u},E1=function(S){_n(f,S);function f(h,u,p,k){var R;p===void 0&&(p={}),R=S.call(this)||this,R.masterPlaylistLoader_=k||Bn(R),k||(R.isMaster_=!0);var q=p,z=q.withCredentials,de=z===void 0?!1:z,Ee=q.handleManifestRedirects,Se=Ee===void 0?!1:Ee;if(R.vhs_=u,R.withCredentials=de,R.handleManifestRedirects=Se,!h)throw new Error("A non-empty playlist URL or object is required");return R.on("minimumUpdatePeriod",function(){R.refreshXml_()}),R.on("mediaupdatetimeout",function(){R.refreshMedia_(R.media().id)}),R.state="HAVE_NOTHING",R.loadedPlaylists_={},R.logger_=Mu("DashPlaylistLoader"),R.isMaster_?(R.masterPlaylistLoader_.srcUrl=h,R.masterPlaylistLoader_.sidxMapping_={}):R.childPlaylist_=h,R}var _=f.prototype;return _.requestErrored_=function(u,p,k){if(!this.request)return!0;if(this.request=null,u)return this.error=typeof u=="object"&&!(u instanceof Error)?u:{status:p.status,message:"DASH request error at URL: "+p.uri,response:p.response,code:2},k&&(this.state=k),this.trigger("error"),!0},_.addSidxSegments_=function(u,p,k){var R=this,q=u.sidx&&ng(u.sidx);if(!u.sidx||!q||this.masterPlaylistLoader_.sidxMapping_[q]){this.mediaRequest_=window.setTimeout(function(){return k(!1)},0);return}var z=lg(this.handleManifestRedirects,u.sidx.resolvedUri),de=function(Se,ze){if(!R.requestErrored_(Se,ze,p)){var rt=R.masterPlaylistLoader_.sidxMapping_,_t;try{_t=UL(qi(ze.response).subarray(8))}catch(lt){R.requestErrored_(lt,ze,p);return}return rt[q]={sidxInfo:u.sidx,sidx:_t},i1(u,_t,u.sidx.resolvedUri),k(!0)}};this.request=z6(z,this.vhs_.xhr,function(Ee,Se,ze,rt){if(Ee)return de(Ee,Se);if(!ze||ze!=="mp4")return de({status:Se.status,message:"Unsupported "+(ze||"unknown")+" container type for sidx segment at URL: "+z,response:"",playlist:u,internal:!0,blacklistDuration:1/0,code:2},Se);var _t=u.sidx.byterange,lt=_t.offset,Bt=_t.length;if(rt.length>=Bt+lt)return de(Ee,{response:rt.subarray(lt,lt+Bt),status:Se.status,uri:Se.uri});R.request=R.vhs_.xhr({uri:z,responseType:"arraybuffer",headers:C1({byterange:u.sidx.byterange})},de)})},_.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window.clearTimeout(this.minimumUpdatePeriodTimeout_),window.clearTimeout(this.mediaRequest_),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},_.hasPendingRequest=function(){return this.request||this.mediaRequest_},_.stopRequest=function(){if(this.request){var u=this.request;this.request=null,u.onreadystatechange=null,u.abort()}},_.media=function(u){var p=this;if(!u)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);var k=this.state;if(typeof u=="string"){if(!this.masterPlaylistLoader_.master.playlists[u])throw new Error("Unknown playlist URI: "+u);u=this.masterPlaylistLoader_.master.playlists[u]}var R=!this.media_||u.id!==this.media_.id;if(R&&this.loadedPlaylists_[u.id]&&this.loadedPlaylists_[u.id].endList){this.state="HAVE_METADATA",this.media_=u,R&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}R&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(u,k,function(q){p.haveMetadata({startingState:k,playlist:u})}))},_.haveMetadata=function(u){var p=u.startingState,k=u.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[k.id]=k,this.mediaRequest_=null,this.refreshMedia_(k.id),p==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange")},_.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(window.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)},_.load=function(u){var p=this;window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var k=this.media();if(u){var R=k?k.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=window.setTimeout(function(){return p.load()},R);return}if(!this.started){this.start();return}k&&!k.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")},_.start=function(){var u=this;if(this.started=!0,!this.isMaster_){this.mediaRequest_=window.setTimeout(function(){return u.haveMaster_()},0);return}this.requestMaster_(function(p,k){u.haveMaster_(),!u.hasPendingRequest()&&!u.media_&&u.media(u.masterPlaylistLoader_.master.playlists[0])})},_.requestMaster_=function(u){var p=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(k,R){if(p.requestErrored_(k,R)){p.state==="HAVE_NOTHING"&&(p.started=!1);return}var q=R.responseText!==p.masterPlaylistLoader_.masterXml_;if(p.masterPlaylistLoader_.masterXml_=R.responseText,R.responseHeaders&&R.responseHeaders.date?p.masterLoaded_=Date.parse(R.responseHeaders.date):p.masterLoaded_=Date.now(),p.masterPlaylistLoader_.srcUrl=lg(p.handleManifestRedirects,p.masterPlaylistLoader_.srcUrl,R),q){p.handleMaster_(),p.syncClientServerClock_(function(){return u(R,q)});return}return u(R,q)})},_.syncClientServerClock_=function(u){var p=this,k=LL(this.masterPlaylistLoader_.masterXml_);if(k===null)return this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),u();if(k.method==="DIRECT")return this.masterPlaylistLoader_.clientOffset_=k.value-Date.now(),u();this.request=this.vhs_.xhr({uri:Ou(this.masterPlaylistLoader_.srcUrl,k.value),method:k.method,withCredentials:this.withCredentials},function(R,q){if(p.request){if(R)return p.masterPlaylistLoader_.clientOffset_=p.masterLoaded_-Date.now(),u();var z;k.method==="HEAD"?!q.responseHeaders||!q.responseHeaders.date?z=p.masterLoaded_:z=Date.parse(q.responseHeaders.date):z=Date.parse(q.responseText),p.masterPlaylistLoader_.clientOffset_=z-Date.now(),u()}})},_.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},_.handleMaster_=function(){this.mediaRequest_=null;var u=this.masterPlaylistLoader_.master,p=K6({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:u});u&&(p=Q6(u,p,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=p||u;var k=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return k&&k!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=k),(!u||p&&p.minimumUpdatePeriod!==u.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),!!p},_.updateMinimumUpdatePeriodTimeout_=function(){var u=this.masterPlaylistLoader_;u.createMupOnMedia_&&(u.off("loadedmetadata",u.createMupOnMedia_),u.createMupOnMedia_=null),u.minimumUpdatePeriodTimeout_&&(window.clearTimeout(u.minimumUpdatePeriodTimeout_),u.minimumUpdatePeriodTimeout_=null);var p=u.master&&u.master.minimumUpdatePeriod;if(p===0&&(u.media()?p=u.media().targetDuration*1e3:(u.createMupOnMedia_=u.updateMinimumUpdatePeriodTimeout_,u.one("loadedmetadata",u.createMupOnMedia_))),typeof p!="number"||p<=0){p<0&&this.logger_("found invalid minimumUpdatePeriod of "+p+", not setting a timeout");return}this.createMUPTimeout_(p)},_.createMUPTimeout_=function(u){var p=this.masterPlaylistLoader_;p.minimumUpdatePeriodTimeout_=window.setTimeout(function(){p.minimumUpdatePeriodTimeout_=null,p.trigger("minimumUpdatePeriod"),p.createMUPTimeout_(u)},u)},_.refreshXml_=function(){var u=this;this.requestMaster_(function(p,k){k&&(u.media_&&(u.media_=u.masterPlaylistLoader_.master.playlists[u.media_.id]),u.masterPlaylistLoader_.sidxMapping_=Z6(u.masterPlaylistLoader_.master,u.masterPlaylistLoader_.sidxMapping_),u.addSidxSegments_(u.media(),u.state,function(R){u.refreshMedia_(u.media().id)}))})},_.refreshMedia_=function(u){var p=this;if(!u)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var k=this.masterPlaylistLoader_.master.playlists,R=!this.media_||this.media_!==k[u];if(R?this.media_=k[u]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){var q=function z(){p.media().endList||(p.mediaUpdateTimeout=window.setTimeout(function(){p.trigger("mediaupdatetimeout"),z()},k1(p.media(),!!R)))};q()}this.trigger("loadedplaylist")},f}(Y6),no={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},eH=function(f){for(var _=new Uint8Array(new ArrayBuffer(f.length)),h=0;h<f.length;h++)_[h]=f.charCodeAt(h);return _.buffer},bk=function(f){return f.on=f.addEventListener,f.off=f.removeEventListener,f},tH=function(f){try{return URL.createObjectURL(new Blob([f],{type:"application/javascript"}))}catch{var _=new BlobBuilder;return _.append(f),URL.createObjectURL(_.getBlob())}},yk=function(f){return function(){var _=tH(f),h=bk(new Worker(_));h.objURL=_;var u=h.terminate;return h.on=h.addEventListener,h.off=h.removeEventListener,h.terminate=function(){return URL.revokeObjectURL(_),u.call(this)},h}},wk=function(f){return"var browserWorkerPolyFill = "+bk.toString()+`;
browserWorkerPolyFill(self);
`+f},Tk=function(f){return f.toString().replace(/^function.+?{/,"").slice(0,-1)},nH=wk(Tk(function(){var S=function(){this.init=function(){var Z={};this.on=function(ve,ge){Z[ve]||(Z[ve]=[]),Z[ve]=Z[ve].concat(ge)},this.off=function(ve,ge){var ke;return Z[ve]?(ke=Z[ve].indexOf(ge),Z[ve]=Z[ve].slice(),Z[ve].splice(ke,1),ke>-1):!1},this.trigger=function(ve){var ge,ke,Re,Be;if(ge=Z[ve],!!ge)if(arguments.length===2)for(Re=ge.length,ke=0;ke<Re;++ke)ge[ke].call(this,arguments[1]);else{for(Be=[],ke=arguments.length,ke=1;ke<arguments.length;++ke)Be.push(arguments[ke]);for(Re=ge.length,ke=0;ke<Re;++ke)ge[ke].apply(this,Be)}},this.dispose=function(){Z={}}}};S.prototype.pipe=function(tt){return this.on("data",function(Z){tt.push(Z)}),this.on("done",function(Z){tt.flush(Z)}),this.on("partialdone",function(Z){tt.partialFlush(Z)}),this.on("endedtimeline",function(Z){tt.endTimeline(Z)}),this.on("reset",function(Z){tt.reset(Z)}),tt},S.prototype.push=function(tt){this.trigger("data",tt)},S.prototype.flush=function(tt){this.trigger("done",tt)},S.prototype.partialFlush=function(tt){this.trigger("partialdone",tt)},S.prototype.endTimeline=function(tt){this.trigger("endedtimeline",tt)},S.prototype.reset=function(tt){this.trigger("reset",tt)};var f=S,_=Math.pow(2,32),h=function(Z){var ve=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),ge;return ve.getBigUint64?(ge=ve.getBigUint64(0),ge<Number.MAX_SAFE_INTEGER?Number(ge):ge):ve.getUint32(0)*_+ve.getUint32(4)},u={getUint64:h,MAX_UINT32:_},p=u.MAX_UINT32,k,R,q,z,de,Ee,Se,ze,rt,_t,lt,Bt,en,En,fn,gn,$n,Tn,bn,An,wn,oi,Jn,Zi,Fa,Va,Pr,ya,Za,Do,Ba,yg,Zl,Xd,Jf,Rc;(function(){var tt;if(Jn={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(tt in Jn)Jn.hasOwnProperty(tt)&&(Jn[tt]=[tt.charCodeAt(0),tt.charCodeAt(1),tt.charCodeAt(2),tt.charCodeAt(3)]);Zi=new Uint8Array([105,115,111,109]),Va=new Uint8Array([97,118,99,49]),Fa=new Uint8Array([0,0,0,1]),Pr=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ya=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Za={video:Pr,audio:ya},yg=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ba=new Uint8Array([0,0,0,0,0,0,0,0]),Zl=new Uint8Array([0,0,0,0,0,0,0,0]),Xd=Zl,Jf=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Rc=Zl,Do=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),k=function(Z){var ve=[],ge=0,ke,Re,Be;for(ke=1;ke<arguments.length;ke++)ve.push(arguments[ke]);for(ke=ve.length;ke--;)ge+=ve[ke].byteLength;for(Re=new Uint8Array(ge+8),Be=new DataView(Re.buffer,Re.byteOffset,Re.byteLength),Be.setUint32(0,Re.byteLength),Re.set(Z,4),ke=0,ge=8;ke<ve.length;ke++)Re.set(ve[ke],ge),ge+=ve[ke].byteLength;return Re},R=function(){return k(Jn.dinf,k(Jn.dref,yg))},q=function(Z){return k(Jn.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,Z.audioobjecttype<<3|Z.samplingfrequencyindex>>>1,Z.samplingfrequencyindex<<7|Z.channelcount<<3,6,1,2]))},z=function(){return k(Jn.ftyp,Zi,Fa,Zi,Va)},gn=function(Z){return k(Jn.hdlr,Za[Z])},de=function(Z){return k(Jn.mdat,Z)},fn=function(Z){var ve=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,Z.duration>>>24&255,Z.duration>>>16&255,Z.duration>>>8&255,Z.duration&255,85,196,0,0]);return Z.samplerate&&(ve[12]=Z.samplerate>>>24&255,ve[13]=Z.samplerate>>>16&255,ve[14]=Z.samplerate>>>8&255,ve[15]=Z.samplerate&255),k(Jn.mdhd,ve)},En=function(Z){return k(Jn.mdia,fn(Z),gn(Z.type),Se(Z))},Ee=function(Z){return k(Jn.mfhd,new Uint8Array([0,0,0,0,(Z&4278190080)>>24,(Z&16711680)>>16,(Z&65280)>>8,Z&255]))},Se=function(Z){return k(Jn.minf,Z.type==="video"?k(Jn.vmhd,Do):k(Jn.smhd,Ba),R(),Tn(Z))},ze=function(Z,ve){for(var ge=[],ke=ve.length;ke--;)ge[ke]=An(ve[ke]);return k.apply(null,[Jn.moof,Ee(Z)].concat(ge))},rt=function(Z){for(var ve=Z.length,ge=[];ve--;)ge[ve]=Bt(Z[ve]);return k.apply(null,[Jn.moov,lt(4294967295)].concat(ge).concat(_t(Z)))},_t=function(Z){for(var ve=Z.length,ge=[];ve--;)ge[ve]=wn(Z[ve]);return k.apply(null,[Jn.mvex].concat(ge))},lt=function(Z){var ve=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(Z&4278190080)>>24,(Z&16711680)>>16,(Z&65280)>>8,Z&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return k(Jn.mvhd,ve)},$n=function(Z){var ve=Z.samples||[],ge=new Uint8Array(4+ve.length),ke,Re;for(Re=0;Re<ve.length;Re++)ke=ve[Re].flags,ge[Re+4]=ke.dependsOn<<4|ke.isDependedOn<<2|ke.hasRedundancy;return k(Jn.sdtp,ge)},Tn=function(Z){return k(Jn.stbl,bn(Z),k(Jn.stts,Rc),k(Jn.stsc,Xd),k(Jn.stsz,Jf),k(Jn.stco,Zl))},function(){var tt,Z;bn=function(ge){return k(Jn.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),ge.type==="video"?tt(ge):Z(ge))},tt=function(ge){var ke=ge.sps||[],Re=ge.pps||[],Be=[],mt=[],kt,Ut;for(kt=0;kt<ke.length;kt++)Be.push((ke[kt].byteLength&65280)>>>8),Be.push(ke[kt].byteLength&255),Be=Be.concat(Array.prototype.slice.call(ke[kt]));for(kt=0;kt<Re.length;kt++)mt.push((Re[kt].byteLength&65280)>>>8),mt.push(Re[kt].byteLength&255),mt=mt.concat(Array.prototype.slice.call(Re[kt]));if(Ut=[Jn.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(ge.width&65280)>>8,ge.width&255,(ge.height&65280)>>8,ge.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),k(Jn.avcC,new Uint8Array([1,ge.profileIdc,ge.profileCompatibility,ge.levelIdc,255].concat([ke.length],Be,[Re.length],mt))),k(Jn.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],ge.sarRatio){var $t=ge.sarRatio[0],zt=ge.sarRatio[1];Ut.push(k(Jn.pasp,new Uint8Array([($t&4278190080)>>24,($t&16711680)>>16,($t&65280)>>8,$t&255,(zt&4278190080)>>24,(zt&16711680)>>16,(zt&65280)>>8,zt&255])))}return k.apply(null,Ut)},Z=function(ge){return k(Jn.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(ge.channelcount&65280)>>8,ge.channelcount&255,(ge.samplesize&65280)>>8,ge.samplesize&255,0,0,0,0,(ge.samplerate&65280)>>8,ge.samplerate&255,0,0]),q(ge))}}(),en=function(Z){var ve=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(Z.id&4278190080)>>24,(Z.id&16711680)>>16,(Z.id&65280)>>8,Z.id&255,0,0,0,0,(Z.duration&4278190080)>>24,(Z.duration&16711680)>>16,(Z.duration&65280)>>8,Z.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(Z.width&65280)>>8,Z.width&255,0,0,(Z.height&65280)>>8,Z.height&255,0,0]);return k(Jn.tkhd,ve)},An=function(Z){var ve,ge,ke,Re,Be,mt,kt;return ve=k(Jn.tfhd,new Uint8Array([0,0,0,58,(Z.id&4278190080)>>24,(Z.id&16711680)>>16,(Z.id&65280)>>8,Z.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),mt=Math.floor(Z.baseMediaDecodeTime/p),kt=Math.floor(Z.baseMediaDecodeTime%p),ge=k(Jn.tfdt,new Uint8Array([1,0,0,0,mt>>>24&255,mt>>>16&255,mt>>>8&255,mt&255,kt>>>24&255,kt>>>16&255,kt>>>8&255,kt&255])),Be=92,Z.type==="audio"?(ke=oi(Z,Be),k(Jn.traf,ve,ge,ke)):(Re=$n(Z),ke=oi(Z,Re.length+Be),k(Jn.traf,ve,ge,ke,Re))},Bt=function(Z){return Z.duration=Z.duration||4294967295,k(Jn.trak,en(Z),En(Z))},wn=function(Z){var ve=new Uint8Array([0,0,0,0,(Z.id&4278190080)>>24,(Z.id&16711680)>>16,(Z.id&65280)>>8,Z.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Z.type!=="video"&&(ve[ve.length-1]=0),k(Jn.trex,ve)},function(){var tt,Z,ve;ve=function(ke,Re){var Be=0,mt=0,kt=0,Ut=0;return ke.length&&(ke[0].duration!==void 0&&(Be=1),ke[0].size!==void 0&&(mt=2),ke[0].flags!==void 0&&(kt=4),ke[0].compositionTimeOffset!==void 0&&(Ut=8)),[0,0,Be|mt|kt|Ut,1,(ke.length&4278190080)>>>24,(ke.length&16711680)>>>16,(ke.length&65280)>>>8,ke.length&255,(Re&4278190080)>>>24,(Re&16711680)>>>16,(Re&65280)>>>8,Re&255]},Z=function(ke,Re){var Be,mt,kt,Ut,$t,zt;for(Ut=ke.samples||[],Re+=20+16*Ut.length,kt=ve(Ut,Re),mt=new Uint8Array(kt.length+Ut.length*16),mt.set(kt),Be=kt.length,zt=0;zt<Ut.length;zt++)$t=Ut[zt],mt[Be++]=($t.duration&4278190080)>>>24,mt[Be++]=($t.duration&16711680)>>>16,mt[Be++]=($t.duration&65280)>>>8,mt[Be++]=$t.duration&255,mt[Be++]=($t.size&4278190080)>>>24,mt[Be++]=($t.size&16711680)>>>16,mt[Be++]=($t.size&65280)>>>8,mt[Be++]=$t.size&255,mt[Be++]=$t.flags.isLeading<<2|$t.flags.dependsOn,mt[Be++]=$t.flags.isDependedOn<<6|$t.flags.hasRedundancy<<4|$t.flags.paddingValue<<1|$t.flags.isNonSyncSample,mt[Be++]=$t.flags.degradationPriority&61440,mt[Be++]=$t.flags.degradationPriority&15,mt[Be++]=($t.compositionTimeOffset&4278190080)>>>24,mt[Be++]=($t.compositionTimeOffset&16711680)>>>16,mt[Be++]=($t.compositionTimeOffset&65280)>>>8,mt[Be++]=$t.compositionTimeOffset&255;return k(Jn.trun,mt)},tt=function(ke,Re){var Be,mt,kt,Ut,$t,zt;for(Ut=ke.samples||[],Re+=20+8*Ut.length,kt=ve(Ut,Re),Be=new Uint8Array(kt.length+Ut.length*8),Be.set(kt),mt=kt.length,zt=0;zt<Ut.length;zt++)$t=Ut[zt],Be[mt++]=($t.duration&4278190080)>>>24,Be[mt++]=($t.duration&16711680)>>>16,Be[mt++]=($t.duration&65280)>>>8,Be[mt++]=$t.duration&255,Be[mt++]=($t.size&4278190080)>>>24,Be[mt++]=($t.size&16711680)>>>16,Be[mt++]=($t.size&65280)>>>8,Be[mt++]=$t.size&255;return k(Jn.trun,Be)},oi=function(ke,Re){return ke.type==="audio"?tt(ke,Re):Z(ke,Re)}}();var md={ftyp:z,mdat:de,moof:ze,moov:rt,initSegment:function(Z){var ve=z(),ge=rt(Z),ke;return ke=new Uint8Array(ve.byteLength+ge.byteLength),ke.set(ve),ke.set(ge,ve.byteLength),ke}},V_=function(Z){var ve,ge,ke=[],Re=[];for(Re.byteLength=0,Re.nalCount=0,Re.duration=0,ke.byteLength=0,ve=0;ve<Z.length;ve++)ge=Z[ve],ge.nalUnitType==="access_unit_delimiter_rbsp"?(ke.length&&(ke.duration=ge.dts-ke.dts,Re.byteLength+=ke.byteLength,Re.nalCount+=ke.length,Re.duration+=ke.duration,Re.push(ke)),ke=[ge],ke.byteLength=ge.data.byteLength,ke.pts=ge.pts,ke.dts=ge.dts):(ge.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(ke.keyFrame=!0),ke.duration=ge.dts-ke.dts,ke.byteLength+=ge.data.byteLength,ke.push(ge));return Re.length&&(!ke.duration||ke.duration<=0)&&(ke.duration=Re[Re.length-1].duration),Re.byteLength+=ke.byteLength,Re.nalCount+=ke.length,Re.duration+=ke.duration,Re.push(ke),Re},z_=function(Z){var ve,ge,ke=[],Re=[];for(ke.byteLength=0,ke.nalCount=0,ke.duration=0,ke.pts=Z[0].pts,ke.dts=Z[0].dts,Re.byteLength=0,Re.nalCount=0,Re.duration=0,Re.pts=Z[0].pts,Re.dts=Z[0].dts,ve=0;ve<Z.length;ve++)ge=Z[ve],ge.keyFrame?(ke.length&&(Re.push(ke),Re.byteLength+=ke.byteLength,Re.nalCount+=ke.nalCount,Re.duration+=ke.duration),ke=[ge],ke.nalCount=ge.length,ke.byteLength=ge.byteLength,ke.pts=ge.pts,ke.dts=ge.dts,ke.duration=ge.duration):(ke.duration+=ge.duration,ke.nalCount+=ge.length,ke.byteLength+=ge.byteLength,ke.push(ge));return Re.length&&ke.duration<=0&&(ke.duration=Re[Re.length-1].duration),Re.byteLength+=ke.byteLength,Re.nalCount+=ke.nalCount,Re.duration+=ke.duration,Re.push(ke),Re},Y_=function(Z){var ve;return!Z[0][0].keyFrame&&Z.length>1&&(ve=Z.shift(),Z.byteLength-=ve.byteLength,Z.nalCount-=ve.nalCount,Z[0][0].dts=ve.dts,Z[0][0].pts=ve.pts,Z[0][0].duration+=ve.duration),Z},H8=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},tS=function(Z,ve){var ge=H8();return ge.dataOffset=ve,ge.compositionTimeOffset=Z.pts-Z.dts,ge.duration=Z.duration,ge.size=4*Z.length,ge.size+=Z.byteLength,Z.keyFrame&&(ge.flags.dependsOn=2,ge.flags.isNonSyncSample=0),ge},j8=function(Z,ve){var ge,ke,Re,Be,mt,kt=ve||0,Ut=[];for(ge=0;ge<Z.length;ge++)for(Be=Z[ge],ke=0;ke<Be.length;ke++)mt=Be[ke],Re=tS(mt,kt),kt+=Re.size,Ut.push(Re);return Ut},B8=function(Z){var ve,ge,ke,Re,Be,mt,kt=0,Ut=Z.byteLength,$t=Z.nalCount,zt=Ut+4*$t,yn=new Uint8Array(zt),Kn=new DataView(yn.buffer);for(ve=0;ve<Z.length;ve++)for(Re=Z[ve],ge=0;ge<Re.length;ge++)for(Be=Re[ge],ke=0;ke<Be.length;ke++)mt=Be[ke],Kn.setUint32(kt,mt.data.byteLength),kt+=4,yn.set(mt.data,kt),kt+=mt.data.byteLength;return yn},U8=function(Z,ve){var ge,ke=ve||0,Re=[];return ge=tS(Z,ke),Re.push(ge),Re},q8=function(Z){var ve,ge,ke=0,Re=Z.byteLength,Be=Z.length,mt=Re+4*Be,kt=new Uint8Array(mt),Ut=new DataView(kt.buffer);for(ve=0;ve<Z.length;ve++)ge=Z[ve],Ut.setUint32(ke,ge.data.byteLength),ke+=4,kt.set(ge.data,ke),ke+=ge.data.byteLength;return kt},bh={groupNalsIntoFrames:V_,groupFramesIntoGops:z_,extendFirstKeyFrame:Y_,generateSampleTable:j8,concatenateNalData:B8,generateSampleTableForFrame:U8,concatenateNalDataForFrame:q8},Zf=[33,16,5,32,164,27],F1=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ua=function(Z){for(var ve=[];Z--;)ve.push(0);return ve},W8=function(Z){return Object.keys(Z).reduce(function(ve,ge){return ve[ge]=new Uint8Array(Z[ge].reduce(function(ke,Re){return ke.concat(Re)},[])),ve},{})},L1,V8=function(){if(!L1){var Z={96e3:[Zf,[227,64],Ua(154),[56]],88200:[Zf,[231],Ua(170),[56]],64e3:[Zf,[248,192],Ua(240),[56]],48e3:[Zf,[255,192],Ua(268),[55,148,128],Ua(54),[112]],44100:[Zf,[255,192],Ua(268),[55,163,128],Ua(84),[112]],32e3:[Zf,[255,192],Ua(268),[55,234],Ua(226),[112]],24e3:[Zf,[255,192],Ua(268),[55,255,128],Ua(268),[111,112],Ua(126),[224]],16e3:[Zf,[255,192],Ua(268),[55,255,128],Ua(268),[111,255],Ua(269),[223,108],Ua(195),[1,192]],12e3:[F1,Ua(268),[3,127,248],Ua(268),[6,255,240],Ua(268),[13,255,224],Ua(268),[27,253,128],Ua(259),[56]],11025:[F1,Ua(268),[3,127,248],Ua(268),[6,255,240],Ua(268),[13,255,224],Ua(268),[27,255,192],Ua(268),[55,175,128],Ua(108),[112]],8e3:[F1,Ua(268),[3,121,16],Ua(47),[7]]};L1=W8(Z)}return L1},H1=9e4,j1,B1,wg,U1,nS,iS,rS;j1=function(Z){return Z*H1},B1=function(Z,ve){return Z*ve},wg=function(Z){return Z/H1},U1=function(Z,ve){return Z/ve},nS=function(Z,ve){return j1(U1(Z,ve))},iS=function(Z,ve){return B1(wg(Z),ve)},rS=function(Z,ve,ge){return wg(ge?Z:Z-ve)};var Ma={ONE_SECOND_IN_TS:H1,secondsToVideoTs:j1,secondsToAudioTs:B1,videoTsToSeconds:wg,audioTsToSeconds:U1,audioTsToVideoTs:nS,videoTsToAudioTs:iS,metadataTsToSeconds:rS},z8=function(Z){var ve,ge,ke=0;for(ve=0;ve<Z.length;ve++)ge=Z[ve],ke+=ge.data.byteLength;return ke},Y8=function(Z,ve,ge,ke){var Re,Be=0,mt=0,kt=0,Ut=0,$t,zt,yn;if(ve.length&&(Re=Ma.audioTsToVideoTs(Z.baseMediaDecodeTime,Z.samplerate),Be=Math.ceil(Ma.ONE_SECOND_IN_TS/(Z.samplerate/1024)),ge&&ke&&(mt=Re-Math.max(ge,ke),kt=Math.floor(mt/Be),Ut=kt*Be),!(kt<1||Ut>Ma.ONE_SECOND_IN_TS/2))){for($t=V8()[Z.samplerate],$t||($t=ve[0].data),zt=0;zt<kt;zt++)yn=ve[0],ve.splice(0,0,{data:$t,dts:yn.dts-Be,pts:yn.pts-Be});return Z.baseMediaDecodeTime-=Math.floor(Ma.videoTsToAudioTs(Ut,Z.samplerate)),Ut}},G8=function(Z,ve,ge){return ve.minSegmentDts>=ge?Z:(ve.minSegmentDts=1/0,Z.filter(function(ke){return ke.dts>=ge?(ve.minSegmentDts=Math.min(ve.minSegmentDts,ke.dts),ve.minSegmentPts=ve.minSegmentDts,!0):!1}))},K8=function(Z){var ve,ge,ke=[];for(ve=0;ve<Z.length;ve++)ge=Z[ve],ke.push({size:ge.data.byteLength,duration:1024});return ke},X8=function(Z){var ve,ge,ke=0,Re=new Uint8Array(z8(Z));for(ve=0;ve<Z.length;ve++)ge=Z[ve],Re.set(ge.data,ke),ke+=ge.data.byteLength;return Re},Tg={prefixWithSilence:Y8,trimAdtsFramesByEarliestDts:G8,generateSampleTable:K8,concatenateFrameData:X8},Q8=Ma.ONE_SECOND_IN_TS,J8=function(Z,ve){typeof ve.pts=="number"&&(Z.timelineStartInfo.pts===void 0&&(Z.timelineStartInfo.pts=ve.pts),Z.minSegmentPts===void 0?Z.minSegmentPts=ve.pts:Z.minSegmentPts=Math.min(Z.minSegmentPts,ve.pts),Z.maxSegmentPts===void 0?Z.maxSegmentPts=ve.pts:Z.maxSegmentPts=Math.max(Z.maxSegmentPts,ve.pts)),typeof ve.dts=="number"&&(Z.timelineStartInfo.dts===void 0&&(Z.timelineStartInfo.dts=ve.dts),Z.minSegmentDts===void 0?Z.minSegmentDts=ve.dts:Z.minSegmentDts=Math.min(Z.minSegmentDts,ve.dts),Z.maxSegmentDts===void 0?Z.maxSegmentDts=ve.dts:Z.maxSegmentDts=Math.max(Z.maxSegmentDts,ve.dts))},Z8=function(Z){delete Z.minSegmentDts,delete Z.maxSegmentDts,delete Z.minSegmentPts,delete Z.maxSegmentPts},ej=function(Z,ve){var ge,ke,Re=Z.minSegmentDts;return ve||(Re-=Z.timelineStartInfo.dts),ge=Z.timelineStartInfo.baseMediaDecodeTime,ge+=Re,ge=Math.max(0,ge),Z.type==="audio"&&(ke=Z.samplerate/Q8,ge*=ke,ge=Math.floor(ge)),ge},xu={clearDtsInfo:Z8,calculateTrackBaseMediaDecodeTime:ej,collectDtsInfo:J8},aS=4,tj=128,nj=function(Z){for(var ve=0,ge={payloadType:-1,payloadSize:0},ke=0,Re=0;ve<Z.byteLength&&Z[ve]!==tj;){for(;Z[ve]===255;)ke+=255,ve++;for(ke+=Z[ve++];Z[ve]===255;)Re+=255,ve++;if(Re+=Z[ve++],!ge.payload&&ke===aS){var Be=String.fromCharCode(Z[ve+3],Z[ve+4],Z[ve+5],Z[ve+6]);if(Be==="GA94"){ge.payloadType=ke,ge.payloadSize=Re,ge.payload=Z.subarray(ve,ve+Re);break}else ge.payload=void 0}ve+=Re,ke=0,Re=0}return ge},ij=function(Z){return Z.payload[0]!==181||(Z.payload[1]<<8|Z.payload[2])!==49||String.fromCharCode(Z.payload[3],Z.payload[4],Z.payload[5],Z.payload[6])!=="GA94"||Z.payload[7]!==3?null:Z.payload.subarray(8,Z.payload.length-1)},rj=function(Z,ve){var ge=[],ke,Re,Be,mt;if(!(ve[0]&64))return ge;for(Re=ve[0]&31,ke=0;ke<Re;ke++)Be=ke*3,mt={type:ve[Be+2]&3,pts:Z},ve[Be+2]&4&&(mt.ccData=ve[Be+3]<<8|ve[Be+4],ge.push(mt));return ge},aj=function(Z){for(var ve=Z.byteLength,ge=[],ke=1,Re,Be;ke<ve-2;)Z[ke]===0&&Z[ke+1]===0&&Z[ke+2]===3?(ge.push(ke+2),ke+=2):ke++;if(ge.length===0)return Z;Re=ve-ge.length,Be=new Uint8Array(Re);var mt=0;for(ke=0;ke<Re;mt++,ke++)mt===ge[0]&&(mt++,ge.shift()),Be[ke]=Z[mt];return Be},yh={parseSei:nj,parseUserData:ij,parseCaptionPackets:rj,discardEmulationPreventionBytes:aj,USER_DATA_REGISTERED_ITU_T_T35:aS},Al=function tt(Z){Z=Z||{},tt.prototype.init.call(this),this.parse708captions_=typeof Z.parse708captions=="boolean"?Z.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new ys(0,0),new ys(0,1),new ys(1,0),new ys(1,1)],this.parse708captions_&&(this.cc708Stream_=new es({captionServices:Z.captionServices})),this.reset(),this.ccStreams_.forEach(function(ve){ve.on("data",this.trigger.bind(this,"data")),ve.on("partialdone",this.trigger.bind(this,"partialdone")),ve.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Al.prototype=new f,Al.prototype.push=function(tt){var Z,ve,ge;if(tt.nalUnitType==="sei_rbsp"&&(Z=yh.parseSei(tt.escapedRBSP),!!Z.payload&&Z.payloadType===yh.USER_DATA_REGISTERED_ITU_T_T35&&(ve=yh.parseUserData(Z),!!ve))){if(tt.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(tt.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}ge=yh.parseCaptionPackets(tt.pts,ve),this.captionPackets_=this.captionPackets_.concat(ge),this.latestDts_!==tt.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=tt.dts}},Al.prototype.flushCCStreams=function(tt){this.ccStreams_.forEach(function(Z){return tt==="flush"?Z.flush():Z.partialFlush()},this)},Al.prototype.flushStream=function(tt){if(!this.captionPackets_.length){this.flushCCStreams(tt);return}this.captionPackets_.forEach(function(Z,ve){Z.presortIndex=ve}),this.captionPackets_.sort(function(Z,ve){return Z.pts===ve.pts?Z.presortIndex-ve.presortIndex:Z.pts-ve.pts}),this.captionPackets_.forEach(function(Z){Z.type<2?this.dispatchCea608Packet(Z):this.dispatchCea708Packet(Z)},this),this.captionPackets_.length=0,this.flushCCStreams(tt)},Al.prototype.flush=function(){return this.flushStream("flush")},Al.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Al.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(tt){tt.reset()})},Al.prototype.dispatchCea608Packet=function(tt){this.setsTextOrXDSActive(tt)?this.activeCea608Channel_[tt.type]=null:this.setsChannel1Active(tt)?this.activeCea608Channel_[tt.type]=0:this.setsChannel2Active(tt)&&(this.activeCea608Channel_[tt.type]=1),this.activeCea608Channel_[tt.type]!==null&&this.ccStreams_[(tt.type<<1)+this.activeCea608Channel_[tt.type]].push(tt)},Al.prototype.setsChannel1Active=function(tt){return(tt.ccData&30720)===4096},Al.prototype.setsChannel2Active=function(tt){return(tt.ccData&30720)===6144},Al.prototype.setsTextOrXDSActive=function(tt){return(tt.ccData&28928)===256||(tt.ccData&30974)===4138||(tt.ccData&30974)===6186},Al.prototype.dispatchCea708Packet=function(tt){this.parse708captions_&&this.cc708Stream_.push(tt)};var sj={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},oj=function(Z){var ve=sj[Z]||Z;return Z&4096&&Z===ve?"":String.fromCharCode(ve)},kg=function(Z){return 32<=Z&&Z<=127||160<=Z&&Z<=255},Qd=function(Z){this.windowNum=Z,this.reset()};Qd.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Qd.prototype.getText=function(){return this.rows.join(`
`)},Qd.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Qd.prototype.newLine=function(tt){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(tt),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Qd.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Qd.prototype.addText=function(tt){this.rows[this.rowIdx]+=tt},Qd.prototype.backspace=function(){if(!this.isEmpty()){var tt=this.rows[this.rowIdx];this.rows[this.rowIdx]=tt.substr(0,tt.length-1)}};var Sg=function(Z,ve,ge){this.serviceNum=Z,this.text="",this.currentWindow=new Qd(-1),this.windows=[],this.stream=ge,typeof ve=="string"&&this.createTextDecoder(ve)};Sg.prototype.init=function(tt,Z){this.startPts=tt;for(var ve=0;ve<8;ve++)this.windows[ve]=new Qd(ve),typeof Z=="function"&&(this.windows[ve].beforeRowOverflow=Z)},Sg.prototype.setCurrentWindow=function(tt){this.currentWindow=this.windows[tt]},Sg.prototype.createTextDecoder=function(tt){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(tt)}catch(Z){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+tt+" encoding. "+Z})}};var es=function tt(Z){Z=Z||{},tt.prototype.init.call(this);var ve=this,ge=Z.captionServices||{},ke={},Re;Object.keys(ge).forEach(function(Be){Re=ge[Be],/^SERVICE/.test(Be)&&(ke[Be]=Re.encoding)}),this.serviceEncodings=ke,this.current708Packet=null,this.services={},this.push=function(Be){Be.type===3?(ve.new708Packet(),ve.add708Bytes(Be)):(ve.current708Packet===null&&ve.new708Packet(),ve.add708Bytes(Be))}};es.prototype=new f,es.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},es.prototype.add708Bytes=function(tt){var Z=tt.ccData,ve=Z>>>8,ge=Z&255;this.current708Packet.ptsVals.push(tt.pts),this.current708Packet.data.push(ve),this.current708Packet.data.push(ge)},es.prototype.push708Packet=function(){var tt=this.current708Packet,Z=tt.data,ve=null,ge=null,ke=0,Re=Z[ke++];for(tt.seq=Re>>6,tt.sizeCode=Re&63;ke<Z.length;ke++)Re=Z[ke++],ve=Re>>5,ge=Re&31,ve===7&&ge>0&&(Re=Z[ke++],ve=Re),this.pushServiceBlock(ve,ke,ge),ge>0&&(ke+=ge-1)},es.prototype.pushServiceBlock=function(tt,Z,ve){var ge,ke=Z,Re=this.current708Packet.data,Be=this.services[tt];for(Be||(Be=this.initService(tt,ke));ke<Z+ve&&ke<Re.length;ke++)ge=Re[ke],kg(ge)?ke=this.handleText(ke,Be):ge===24?ke=this.multiByteCharacter(ke,Be):ge===16?ke=this.extendedCommands(ke,Be):128<=ge&&ge<=135?ke=this.setCurrentWindow(ke,Be):152<=ge&&ge<=159?ke=this.defineWindow(ke,Be):ge===136?ke=this.clearWindows(ke,Be):ge===140?ke=this.deleteWindows(ke,Be):ge===137?ke=this.displayWindows(ke,Be):ge===138?ke=this.hideWindows(ke,Be):ge===139?ke=this.toggleWindows(ke,Be):ge===151?ke=this.setWindowAttributes(ke,Be):ge===144?ke=this.setPenAttributes(ke,Be):ge===145?ke=this.setPenColor(ke,Be):ge===146?ke=this.setPenLocation(ke,Be):ge===143?Be=this.reset(ke,Be):ge===8?Be.currentWindow.backspace():ge===12?Be.currentWindow.clearText():ge===13?Be.currentWindow.pendingNewLine=!0:ge===14?Be.currentWindow.clearText():ge===141&&ke++},es.prototype.extendedCommands=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt];return kg(ge)&&(tt=this.handleText(tt,Z,{isExtended:!0})),tt},es.prototype.getPts=function(tt){return this.current708Packet.ptsVals[Math.floor(tt/2)]},es.prototype.initService=function(tt,Z){var ge="SERVICE"+tt,ve=this,ge,ke;return ge in this.serviceEncodings&&(ke=this.serviceEncodings[ge]),this.services[tt]=new Sg(tt,ke,ve),this.services[tt].init(this.getPts(Z),function(Re){ve.flushDisplayed(Re,ve.services[tt])}),this.services[tt]},es.prototype.handleText=function(tt,Z,ve){var ge=ve&&ve.isExtended,ke=ve&&ve.isMultiByte,Re=this.current708Packet.data,Be=ge?4096:0,mt=Re[tt],kt=Re[tt+1],Ut=Z.currentWindow,$t,zt;return Z.textDecoder_&&!ge?(ke?(zt=[mt,kt],tt++):zt=[mt],$t=Z.textDecoder_.decode(new Uint8Array(zt))):$t=oj(Be|mt),Ut.pendingNewLine&&!Ut.isEmpty()&&Ut.newLine(this.getPts(tt)),Ut.pendingNewLine=!1,Ut.addText($t),tt},es.prototype.multiByteCharacter=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt+1],ke=ve[tt+2];return kg(ge)&&kg(ke)&&(tt=this.handleText(++tt,Z,{isMultiByte:!0})),tt},es.prototype.setCurrentWindow=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=ge&7;return Z.setCurrentWindow(ke),tt},es.prototype.defineWindow=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=ge&7;Z.setCurrentWindow(ke);var Re=Z.currentWindow;return ge=ve[++tt],Re.visible=(ge&32)>>5,Re.rowLock=(ge&16)>>4,Re.columnLock=(ge&8)>>3,Re.priority=ge&7,ge=ve[++tt],Re.relativePositioning=(ge&128)>>7,Re.anchorVertical=ge&127,ge=ve[++tt],Re.anchorHorizontal=ge,ge=ve[++tt],Re.anchorPoint=(ge&240)>>4,Re.rowCount=ge&15,ge=ve[++tt],Re.columnCount=ge&63,ge=ve[++tt],Re.windowStyle=(ge&56)>>3,Re.penStyle=ge&7,Re.virtualRowCount=Re.rowCount+1,tt},es.prototype.setWindowAttributes=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=Z.currentWindow.winAttr;return ge=ve[++tt],ke.fillOpacity=(ge&192)>>6,ke.fillRed=(ge&48)>>4,ke.fillGreen=(ge&12)>>2,ke.fillBlue=ge&3,ge=ve[++tt],ke.borderType=(ge&192)>>6,ke.borderRed=(ge&48)>>4,ke.borderGreen=(ge&12)>>2,ke.borderBlue=ge&3,ge=ve[++tt],ke.borderType+=(ge&128)>>5,ke.wordWrap=(ge&64)>>6,ke.printDirection=(ge&48)>>4,ke.scrollDirection=(ge&12)>>2,ke.justify=ge&3,ge=ve[++tt],ke.effectSpeed=(ge&240)>>4,ke.effectDirection=(ge&12)>>2,ke.displayEffect=ge&3,tt},es.prototype.flushDisplayed=function(tt,Z){for(var ve=[],ge=0;ge<8;ge++)Z.windows[ge].visible&&!Z.windows[ge].isEmpty()&&ve.push(Z.windows[ge].getText());Z.endPts=tt,Z.text=ve.join(`

`),this.pushCaption(Z),Z.startPts=tt},es.prototype.pushCaption=function(tt){tt.text!==""&&(this.trigger("data",{startPts:tt.startPts,endPts:tt.endPts,text:tt.text,stream:"cc708_"+tt.serviceNum}),tt.text="",tt.startPts=tt.endPts)},es.prototype.displayWindows=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt],ke=this.getPts(tt);this.flushDisplayed(ke,Z);for(var Re=0;Re<8;Re++)ge&1<<Re&&(Z.windows[Re].visible=1);return tt},es.prototype.hideWindows=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt],ke=this.getPts(tt);this.flushDisplayed(ke,Z);for(var Re=0;Re<8;Re++)ge&1<<Re&&(Z.windows[Re].visible=0);return tt},es.prototype.toggleWindows=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt],ke=this.getPts(tt);this.flushDisplayed(ke,Z);for(var Re=0;Re<8;Re++)ge&1<<Re&&(Z.windows[Re].visible^=1);return tt},es.prototype.clearWindows=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt],ke=this.getPts(tt);this.flushDisplayed(ke,Z);for(var Re=0;Re<8;Re++)ge&1<<Re&&Z.windows[Re].clearText();return tt},es.prototype.deleteWindows=function(tt,Z){var ve=this.current708Packet.data,ge=ve[++tt],ke=this.getPts(tt);this.flushDisplayed(ke,Z);for(var Re=0;Re<8;Re++)ge&1<<Re&&Z.windows[Re].reset();return tt},es.prototype.setPenAttributes=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=Z.currentWindow.penAttr;return ge=ve[++tt],ke.textTag=(ge&240)>>4,ke.offset=(ge&12)>>2,ke.penSize=ge&3,ge=ve[++tt],ke.italics=(ge&128)>>7,ke.underline=(ge&64)>>6,ke.edgeType=(ge&56)>>3,ke.fontStyle=ge&7,tt},es.prototype.setPenColor=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=Z.currentWindow.penColor;return ge=ve[++tt],ke.fgOpacity=(ge&192)>>6,ke.fgRed=(ge&48)>>4,ke.fgGreen=(ge&12)>>2,ke.fgBlue=ge&3,ge=ve[++tt],ke.bgOpacity=(ge&192)>>6,ke.bgRed=(ge&48)>>4,ke.bgGreen=(ge&12)>>2,ke.bgBlue=ge&3,ge=ve[++tt],ke.edgeRed=(ge&48)>>4,ke.edgeGreen=(ge&12)>>2,ke.edgeBlue=ge&3,tt},es.prototype.setPenLocation=function(tt,Z){var ve=this.current708Packet.data,ge=ve[tt],ke=Z.currentWindow.penLoc;return Z.currentWindow.pendingNewLine=!0,ge=ve[++tt],ke.row=ge&15,ge=ve[++tt],ke.column=ge&63,tt},es.prototype.reset=function(tt,Z){var ve=this.getPts(tt);return this.flushDisplayed(ve,Z),this.initService(Z.serviceNum,tt)};var lj={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Cg=function(Z){return Z===null?"":(Z=lj[Z]||Z,String.fromCharCode(Z))},Pg=14,uj=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],$c=function(){for(var Z=[],ve=Pg+1;ve--;)Z.push("");return Z},ys=function tt(Z,ve){tt.prototype.init.call(this),this.field_=Z||0,this.dataChannel_=ve||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(ge){var ke,Re,Be,mt,kt;if(ke=ge.ccData&32639,ke===this.lastControlCode_){this.lastControlCode_=null;return}if((ke&61440)===4096?this.lastControlCode_=ke:ke!==this.PADDING_&&(this.lastControlCode_=null),Be=ke>>>8,mt=ke&255,ke!==this.PADDING_)if(ke===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(ke===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(ge.pts),this.flushDisplayed(ge.pts),Re=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=Re,this.startPts_=ge.pts;else if(ke===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(ge.pts);else if(ke===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(ge.pts);else if(ke===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(ge.pts);else if(ke===this.CARRIAGE_RETURN_)this.clearFormatting(ge.pts),this.flushDisplayed(ge.pts),this.shiftRowsUp_(),this.startPts_=ge.pts;else if(ke===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(ke===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(ge.pts),this.displayed_=$c();else if(ke===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=$c();else if(ke===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(ge.pts),this.displayed_=$c()),this.mode_="paintOn",this.startPts_=ge.pts;else if(this.isSpecialCharacter(Be,mt))Be=(Be&3)<<8,kt=Cg(Be|mt),this[this.mode_](ge.pts,kt),this.column_++;else if(this.isExtCharacter(Be,mt))this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),Be=(Be&3)<<8,kt=Cg(Be|mt),this[this.mode_](ge.pts,kt),this.column_++;else if(this.isMidRowCode(Be,mt))this.clearFormatting(ge.pts),this[this.mode_](ge.pts," "),this.column_++,(mt&14)===14&&this.addFormatting(ge.pts,["i"]),(mt&1)===1&&this.addFormatting(ge.pts,["u"]);else if(this.isOffsetControlCode(Be,mt))this.column_+=mt&3;else if(this.isPAC(Be,mt)){var Ut=uj.indexOf(ke&7968);this.mode_==="rollUp"&&(Ut-this.rollUpRows_+1<0&&(Ut=this.rollUpRows_-1),this.setRollUp(ge.pts,Ut)),Ut!==this.row_&&(this.clearFormatting(ge.pts),this.row_=Ut),mt&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(ge.pts,["u"]),(ke&16)===16&&(this.column_=((ke&14)>>1)*4),this.isColorPAC(mt)&&(mt&14)===14&&this.addFormatting(ge.pts,["i"])}else this.isNormalChar(Be)&&(mt===0&&(mt=null),kt=Cg(Be),kt+=Cg(mt),this[this.mode_](ge.pts,kt),this.column_+=kt.length)}};ys.prototype=new f,ys.prototype.flushDisplayed=function(tt){var Z=this.displayed_.map(function(ve,ge){try{return ve.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+ge+"."}),""}},this).join(`
`).replace(/^\n+|\n+$/g,"");Z.length&&this.trigger("data",{startPts:this.startPts_,endPts:tt,text:Z,stream:this.name_})},ys.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=$c(),this.nonDisplayed_=$c(),this.lastControlCode_=null,this.column_=0,this.row_=Pg,this.rollUpRows_=2,this.formatting_=[]},ys.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},ys.prototype.isSpecialCharacter=function(tt,Z){return tt===this.EXT_&&Z>=48&&Z<=63},ys.prototype.isExtCharacter=function(tt,Z){return(tt===this.EXT_+1||tt===this.EXT_+2)&&Z>=32&&Z<=63},ys.prototype.isMidRowCode=function(tt,Z){return tt===this.EXT_&&Z>=32&&Z<=47},ys.prototype.isOffsetControlCode=function(tt,Z){return tt===this.OFFSET_&&Z>=33&&Z<=35},ys.prototype.isPAC=function(tt,Z){return tt>=this.BASE_&&tt<this.BASE_+8&&Z>=64&&Z<=127},ys.prototype.isColorPAC=function(tt){return tt>=64&&tt<=79||tt>=96&&tt<=127},ys.prototype.isNormalChar=function(tt){return tt>=32&&tt<=127},ys.prototype.setRollUp=function(tt,Z){if(this.mode_!=="rollUp"&&(this.row_=Pg,this.mode_="rollUp",this.flushDisplayed(tt),this.nonDisplayed_=$c(),this.displayed_=$c()),Z!==void 0&&Z!==this.row_)for(var ve=0;ve<this.rollUpRows_;ve++)this.displayed_[Z-ve]=this.displayed_[this.row_-ve],this.displayed_[this.row_-ve]="";Z===void 0&&(Z=this.row_),this.topRow_=Z-this.rollUpRows_+1},ys.prototype.addFormatting=function(tt,Z){this.formatting_=this.formatting_.concat(Z);var ve=Z.reduce(function(ge,ke){return ge+"<"+ke+">"},"");this[this.mode_](tt,ve)},ys.prototype.clearFormatting=function(tt){if(this.formatting_.length){var Z=this.formatting_.reverse().reduce(function(ve,ge){return ve+"</"+ge+">"},"");this.formatting_=[],this[this.mode_](tt,Z)}},ys.prototype.popOn=function(tt,Z){var ve=this.nonDisplayed_[this.row_];ve+=Z,this.nonDisplayed_[this.row_]=ve},ys.prototype.rollUp=function(tt,Z){var ve=this.displayed_[this.row_];ve+=Z,this.displayed_[this.row_]=ve},ys.prototype.shiftRowsUp_=function(){var tt;for(tt=0;tt<this.topRow_;tt++)this.displayed_[tt]="";for(tt=this.row_+1;tt<Pg+1;tt++)this.displayed_[tt]="";for(tt=this.topRow_;tt<this.row_;tt++)this.displayed_[tt]=this.displayed_[tt+1];this.displayed_[this.row_]=""},ys.prototype.paintOn=function(tt,Z){var ve=this.displayed_[this.row_];ve+=Z,this.displayed_[this.row_]=ve};var Eg={CaptionStream:Al,Cea608Stream:ys,Cea708Stream:es},_o={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},dj=8589934592,fj=4294967296,sS="shared",q1=function(Z,ve){var ge=1;for(Z>ve&&(ge=-1);Math.abs(ve-Z)>fj;)Z+=ge*dj;return Z},oS=function tt(Z){var ve,ge;tt.prototype.init.call(this),this.type_=Z||sS,this.push=function(ke){this.type_!==sS&&ke.type!==this.type_||(ge===void 0&&(ge=ke.dts),ke.dts=q1(ke.dts,ge),ke.pts=q1(ke.pts,ge),ve=ke.dts,this.trigger("data",ke))},this.flush=function(){ge=ve,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){ge=void 0,ve=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};oS.prototype=new f;var lS={TimestampRolloverStream:oS,handleRollover:q1},uS=function(Z,ve,ge){var ke,Re="";for(ke=ve;ke<ge;ke++)Re+="%"+("00"+Z[ke].toString(16)).slice(-2);return Re},Ig=function(Z,ve,ge){return decodeURIComponent(uS(Z,ve,ge))},cj=function(Z,ve,ge){return unescape(uS(Z,ve,ge))},Ag=function(Z){return Z[0]<<21|Z[1]<<14|Z[2]<<7|Z[3]},dS={TXXX:function(Z){var ve;if(Z.data[0]===3){for(ve=1;ve<Z.data.length;ve++)if(Z.data[ve]===0){Z.description=Ig(Z.data,1,ve),Z.value=Ig(Z.data,ve+1,Z.data.length).replace(/\0*$/,"");break}Z.data=Z.value}},WXXX:function(Z){var ve;if(Z.data[0]===3){for(ve=1;ve<Z.data.length;ve++)if(Z.data[ve]===0){Z.description=Ig(Z.data,1,ve),Z.url=Ig(Z.data,ve+1,Z.data.length);break}}},PRIV:function(Z){var ve;for(ve=0;ve<Z.data.length;ve++)if(Z.data[ve]===0){Z.owner=cj(Z.data,0,ve);break}Z.privateData=Z.data.subarray(ve+1),Z.data=Z.privateData}},Dg;Dg=function(Z){var ve={descriptor:Z&&Z.descriptor},ge=0,ke=[],Re=0,Be;if(Dg.prototype.init.call(this),this.dispatchType=_o.METADATA_STREAM_TYPE.toString(16),ve.descriptor)for(Be=0;Be<ve.descriptor.length;Be++)this.dispatchType+=("00"+ve.descriptor[Be].toString(16)).slice(-2);this.push=function(mt){var kt,Ut,$t,zt,yn,Kn;if(mt.type==="timed-metadata"){if(mt.dataAlignmentIndicator&&(Re=0,ke.length=0),ke.length===0&&(mt.data.length<10||mt.data[0]!==73||mt.data[1]!==68||mt.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(ke.push(mt),Re+=mt.data.byteLength,ke.length===1&&(ge=Ag(mt.data.subarray(6,10)),ge+=10),!(Re<ge)){for(kt={data:new Uint8Array(ge),frames:[],pts:ke[0].pts,dts:ke[0].dts},yn=0;yn<ge;)kt.data.set(ke[0].data.subarray(0,ge-yn),yn),yn+=ke[0].data.byteLength,Re-=ke[0].data.byteLength,ke.shift();Ut=10,kt.data[5]&64&&(Ut+=4,Ut+=Ag(kt.data.subarray(10,14)),ge-=Ag(kt.data.subarray(16,20)));do{if($t=Ag(kt.data.subarray(Ut+4,Ut+8)),$t<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});return}if(Kn=String.fromCharCode(kt.data[Ut],kt.data[Ut+1],kt.data[Ut+2],kt.data[Ut+3]),zt={id:Kn,data:kt.data.subarray(Ut+10,Ut+$t+10)},zt.key=zt.id,dS[zt.id]&&(dS[zt.id](zt),zt.owner==="com.apple.streaming.transportStreamTimestamp")){var fi=zt.data,Hn=(fi[3]&1)<<30|fi[4]<<22|fi[5]<<14|fi[6]<<6|fi[7]>>>2;Hn*=4,Hn+=fi[7]&3,zt.timeStamp=Hn,kt.pts===void 0&&kt.dts===void 0&&(kt.pts=zt.timeStamp,kt.dts=zt.timeStamp),this.trigger("timestamp",zt)}kt.frames.push(zt),Ut+=10,Ut+=$t}while(Ut<ge);this.trigger("data",kt)}}}},Dg.prototype=new f;var _j=Dg,pj=lS.TimestampRolloverStream,Og,wh,Mg,G_=188,W1=71;Og=function(){var Z=new Uint8Array(G_),ve=0;Og.prototype.init.call(this),this.push=function(ge){var ke=0,Re=G_,Be;for(ve?(Be=new Uint8Array(ge.byteLength+ve),Be.set(Z.subarray(0,ve)),Be.set(ge,ve),ve=0):Be=ge;Re<Be.byteLength;){if(Be[ke]===W1&&Be[Re]===W1){this.trigger("data",Be.subarray(ke,Re)),ke+=G_,Re+=G_;continue}ke++,Re++}ke<Be.byteLength&&(Z.set(Be.subarray(ke),0),ve=Be.byteLength-ke)},this.flush=function(){ve===G_&&Z[0]===W1&&(this.trigger("data",Z),ve=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){ve=0,this.trigger("reset")}},Og.prototype=new f,wh=function(){var Z,ve,ge,ke;wh.prototype.init.call(this),ke=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,Z=function(Be,mt){var kt=0;mt.payloadUnitStartIndicator&&(kt+=Be[kt]+1),mt.type==="pat"?ve(Be.subarray(kt),mt):ge(Be.subarray(kt),mt)},ve=function(Be,mt){mt.section_number=Be[7],mt.last_section_number=Be[8],ke.pmtPid=(Be[10]&31)<<8|Be[11],mt.pmtPid=ke.pmtPid},ge=function(Be,mt){var kt,Ut,$t,zt;if(Be[5]&1){for(ke.programMapTable={video:null,audio:null,"timed-metadata":{}},kt=(Be[1]&15)<<8|Be[2],Ut=3+kt-4,$t=(Be[10]&15)<<8|Be[11],zt=12+$t;zt<Ut;){var yn=Be[zt],Kn=(Be[zt+1]&31)<<8|Be[zt+2];yn===_o.H264_STREAM_TYPE&&ke.programMapTable.video===null?ke.programMapTable.video=Kn:yn===_o.ADTS_STREAM_TYPE&&ke.programMapTable.audio===null?ke.programMapTable.audio=Kn:yn===_o.METADATA_STREAM_TYPE&&(ke.programMapTable["timed-metadata"][Kn]=yn),zt+=((Be[zt+3]&15)<<8|Be[zt+4])+5}mt.programMapTable=ke.programMapTable}},this.push=function(Re){var Be={},mt=4;if(Be.payloadUnitStartIndicator=!!(Re[1]&64),Be.pid=Re[1]&31,Be.pid<<=8,Be.pid|=Re[2],(Re[3]&48)>>>4>1&&(mt+=Re[mt]+1),Be.pid===0)Be.type="pat",Z(Re.subarray(mt),Be),this.trigger("data",Be);else if(Be.pid===this.pmtPid)for(Be.type="pmt",Z(Re.subarray(mt),Be),this.trigger("data",Be);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([Re,mt,Be]):this.processPes_(Re,mt,Be)},this.processPes_=function(Re,Be,mt){mt.pid===this.programMapTable.video?mt.streamType=_o.H264_STREAM_TYPE:mt.pid===this.programMapTable.audio?mt.streamType=_o.ADTS_STREAM_TYPE:mt.streamType=this.programMapTable["timed-metadata"][mt.pid],mt.type="pes",mt.data=Re.subarray(Be),this.trigger("data",mt)}},wh.prototype=new f,wh.STREAM_TYPES={h264:27,adts:15},Mg=function(){var Z=this,ve=!1,ge={data:[],size:0},ke={data:[],size:0},Re={data:[],size:0},Be,mt=function($t,zt){var yn,Kn=$t[0]<<16|$t[1]<<8|$t[2];zt.data=new Uint8Array,Kn===1&&(zt.packetLength=6+($t[4]<<8|$t[5]),zt.dataAlignmentIndicator=($t[6]&4)!==0,yn=$t[7],yn&192&&(zt.pts=($t[9]&14)<<27|($t[10]&255)<<20|($t[11]&254)<<12|($t[12]&255)<<5|($t[13]&254)>>>3,zt.pts*=4,zt.pts+=($t[13]&6)>>>1,zt.dts=zt.pts,yn&64&&(zt.dts=($t[14]&14)<<27|($t[15]&255)<<20|($t[16]&254)<<12|($t[17]&255)<<5|($t[18]&254)>>>3,zt.dts*=4,zt.dts+=($t[18]&6)>>>1)),zt.data=$t.subarray(9+$t[8]))},kt=function($t,zt,yn){var Kn=new Uint8Array($t.size),fi={type:zt},Hn=0,er=0,Ws=!1,Wo;if(!(!$t.data.length||$t.size<9)){for(fi.trackId=$t.data[0].pid,Hn=0;Hn<$t.data.length;Hn++)Wo=$t.data[Hn],Kn.set(Wo.data,er),er+=Wo.data.byteLength;mt(Kn,fi),Ws=zt==="video"||fi.packetLength<=$t.size,(yn||Ws)&&($t.size=0,$t.data.length=0),Ws&&Z.trigger("data",fi)}};Mg.prototype.init.call(this),this.push=function(Ut){({pat:function(){},pes:function(){var zt,yn;switch(Ut.streamType){case _o.H264_STREAM_TYPE:zt=ge,yn="video";break;case _o.ADTS_STREAM_TYPE:zt=ke,yn="audio";break;case _o.METADATA_STREAM_TYPE:zt=Re,yn="timed-metadata";break;default:return}Ut.payloadUnitStartIndicator&&kt(zt,yn,!0),zt.data.push(Ut),zt.size+=Ut.data.byteLength},pmt:function(){var zt={type:"metadata",tracks:[]};Be=Ut.programMapTable,Be.video!==null&&zt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Be.video,codec:"avc",type:"video"}),Be.audio!==null&&zt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Be.audio,codec:"adts",type:"audio"}),ve=!0,Z.trigger("data",zt)}})[Ut.type]()},this.reset=function(){ge.size=0,ge.data.length=0,ke.size=0,ke.data.length=0,this.trigger("reset")},this.flushStreams_=function(){kt(ge,"video"),kt(ke,"audio"),kt(Re,"timed-metadata")},this.flush=function(){if(!ve&&Be){var Ut={type:"metadata",tracks:[]};Be.video!==null&&Ut.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Be.video,codec:"avc",type:"video"}),Be.audio!==null&&Ut.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Be.audio,codec:"adts",type:"audio"}),Z.trigger("data",Ut)}ve=!1,this.flushStreams_(),this.trigger("done")}},Mg.prototype=new f;var fS={PAT_PID:0,MP2T_PACKET_LENGTH:G_,TransportPacketStream:Og,TransportParseStream:wh,ElementaryStream:Mg,TimestampRolloverStream:pj,CaptionStream:Eg.CaptionStream,Cea608Stream:Eg.Cea608Stream,Cea708Stream:Eg.Cea708Stream,MetadataStream:_j};for(var V1 in _o)_o.hasOwnProperty(V1)&&(fS[V1]=_o[V1]);var Jd=fS,hj=Ma.ONE_SECOND_IN_TS,xg,cS=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];xg=function(Z){var ve,ge=0;xg.prototype.init.call(this),this.skipWarn_=function(ke,Re){this.trigger("log",{level:"warn",message:"adts skiping bytes "+ke+" to "+Re+" in frame "+ge+" outside syncword"})},this.push=function(ke){var Re=0,Be,mt,kt,Ut,$t;if(Z||(ge=0),ke.type==="audio"){ve&&ve.length?(kt=ve,ve=new Uint8Array(kt.byteLength+ke.data.byteLength),ve.set(kt),ve.set(ke.data,kt.byteLength)):ve=ke.data;for(var zt;Re+7<ve.length;){if(ve[Re]!==255||(ve[Re+1]&246)!==240){typeof zt!="number"&&(zt=Re),Re++;continue}if(typeof zt=="number"&&(this.skipWarn_(zt,Re),zt=null),mt=(~ve[Re+1]&1)*2,Be=(ve[Re+3]&3)<<11|ve[Re+4]<<3|(ve[Re+5]&224)>>5,Ut=((ve[Re+6]&3)+1)*1024,$t=Ut*hj/cS[(ve[Re+2]&60)>>>2],ve.byteLength-Re<Be)break;this.trigger("data",{pts:ke.pts+ge*$t,dts:ke.dts+ge*$t,sampleCount:Ut,audioobjecttype:(ve[Re+2]>>>6&3)+1,channelcount:(ve[Re+2]&1)<<2|(ve[Re+3]&192)>>>6,samplerate:cS[(ve[Re+2]&60)>>>2],samplingfrequencyindex:(ve[Re+2]&60)>>>2,samplesize:16,data:ve.subarray(Re+7+mt,Re+Be)}),ge++,Re+=Be}typeof zt=="number"&&(this.skipWarn_(zt,Re),zt=null),ve=ve.subarray(Re)}},this.flush=function(){ge=0,this.trigger("done")},this.reset=function(){ve=void 0,this.trigger("reset")},this.endTimeline=function(){ve=void 0,this.trigger("endedtimeline")}},xg.prototype=new f;var _S=xg,pS;pS=function(Z){var ve=Z.byteLength,ge=0,ke=0;this.length=function(){return 8*ve},this.bitsAvailable=function(){return 8*ve+ke},this.loadWord=function(){var Re=Z.byteLength-ve,Be=new Uint8Array(4),mt=Math.min(4,ve);if(mt===0)throw new Error("no bytes available");Be.set(Z.subarray(Re,Re+mt)),ge=new DataView(Be.buffer).getUint32(0),ke=mt*8,ve-=mt},this.skipBits=function(Re){var Be;ke>Re?(ge<<=Re,ke-=Re):(Re-=ke,Be=Math.floor(Re/8),Re-=Be*8,ve-=Be,this.loadWord(),ge<<=Re,ke-=Re)},this.readBits=function(Re){var Be=Math.min(ke,Re),mt=ge>>>32-Be;return ke-=Be,ke>0?ge<<=Be:ve>0&&this.loadWord(),Be=Re-Be,Be>0?mt<<Be|this.readBits(Be):mt},this.skipLeadingZeros=function(){var Re;for(Re=0;Re<ke;++Re)if(ge&2147483648>>>Re)return ge<<=Re,ke-=Re,Re;return this.loadWord(),Re+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var Re=this.skipLeadingZeros();return this.readBits(Re+1)-1},this.readExpGolomb=function(){var Re=this.readUnsignedExpGolomb();return 1&Re?1+Re>>>1:-1*(Re>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var mj=pS,Rg,Th,hS;Th=function(){var Z=0,ve,ge;Th.prototype.init.call(this),this.push=function(ke){var Re;ge?(Re=new Uint8Array(ge.byteLength+ke.data.byteLength),Re.set(ge),Re.set(ke.data,ge.byteLength),ge=Re):ge=ke.data;for(var Be=ge.byteLength;Z<Be-3;Z++)if(ge[Z+2]===1){ve=Z+5;break}for(;ve<Be;)switch(ge[ve]){case 0:if(ge[ve-1]!==0){ve+=2;break}else if(ge[ve-2]!==0){ve++;break}Z+3!==ve-2&&this.trigger("data",ge.subarray(Z+3,ve-2));do ve++;while(ge[ve]!==1&&ve<Be);Z=ve-2,ve+=3;break;case 1:if(ge[ve-1]!==0||ge[ve-2]!==0){ve+=3;break}this.trigger("data",ge.subarray(Z+3,ve-2)),Z=ve-2,ve+=3;break;default:ve+=3;break}ge=ge.subarray(Z),ve-=Z,Z=0},this.reset=function(){ge=null,Z=0,this.trigger("reset")},this.flush=function(){ge&&ge.byteLength>3&&this.trigger("data",ge.subarray(Z+3)),ge=null,Z=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Th.prototype=new f,hS={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Rg=function(){var Z=new Th,ve,ge,ke,Re,Be,mt,kt;Rg.prototype.init.call(this),ve=this,this.push=function(Ut){Ut.type==="video"&&(ge=Ut.trackId,ke=Ut.pts,Re=Ut.dts,Z.push(Ut))},Z.on("data",function(Ut){var $t={trackId:ge,pts:ke,dts:Re,data:Ut,nalUnitTypeCode:Ut[0]&31};switch($t.nalUnitTypeCode){case 5:$t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:$t.nalUnitType="sei_rbsp",$t.escapedRBSP=Be(Ut.subarray(1));break;case 7:$t.nalUnitType="seq_parameter_set_rbsp",$t.escapedRBSP=Be(Ut.subarray(1)),$t.config=mt($t.escapedRBSP);break;case 8:$t.nalUnitType="pic_parameter_set_rbsp";break;case 9:$t.nalUnitType="access_unit_delimiter_rbsp";break}ve.trigger("data",$t)}),Z.on("done",function(){ve.trigger("done")}),Z.on("partialdone",function(){ve.trigger("partialdone")}),Z.on("reset",function(){ve.trigger("reset")}),Z.on("endedtimeline",function(){ve.trigger("endedtimeline")}),this.flush=function(){Z.flush()},this.partialFlush=function(){Z.partialFlush()},this.reset=function(){Z.reset()},this.endTimeline=function(){Z.endTimeline()},kt=function($t,zt){var yn=8,Kn=8,fi,Hn;for(fi=0;fi<$t;fi++)Kn!==0&&(Hn=zt.readExpGolomb(),Kn=(yn+Hn+256)%256),yn=Kn===0?yn:Kn},Be=function($t){for(var zt=$t.byteLength,yn=[],Kn=1,fi,Hn;Kn<zt-2;)$t[Kn]===0&&$t[Kn+1]===0&&$t[Kn+2]===3?(yn.push(Kn+2),Kn+=2):Kn++;if(yn.length===0)return $t;fi=zt-yn.length,Hn=new Uint8Array(fi);var er=0;for(Kn=0;Kn<fi;er++,Kn++)er===yn[0]&&(er++,yn.shift()),Hn[Kn]=$t[er];return Hn},mt=function($t){var zt=0,yn=0,Kn=0,fi=0,Hn,er,Ws,Wo,Hc,Q1,RS,$S,NS,J1,FS,Ms=[1,1],LS,jc;if(Hn=new mj($t),er=Hn.readUnsignedByte(),Wo=Hn.readUnsignedByte(),Ws=Hn.readUnsignedByte(),Hn.skipUnsignedExpGolomb(),hS[er]&&(Hc=Hn.readUnsignedExpGolomb(),Hc===3&&Hn.skipBits(1),Hn.skipUnsignedExpGolomb(),Hn.skipUnsignedExpGolomb(),Hn.skipBits(1),Hn.readBoolean()))for(FS=Hc!==3?8:12,jc=0;jc<FS;jc++)Hn.readBoolean()&&(jc<6?kt(16,Hn):kt(64,Hn));if(Hn.skipUnsignedExpGolomb(),Q1=Hn.readUnsignedExpGolomb(),Q1===0)Hn.readUnsignedExpGolomb();else if(Q1===1)for(Hn.skipBits(1),Hn.skipExpGolomb(),Hn.skipExpGolomb(),RS=Hn.readUnsignedExpGolomb(),jc=0;jc<RS;jc++)Hn.skipExpGolomb();if(Hn.skipUnsignedExpGolomb(),Hn.skipBits(1),$S=Hn.readUnsignedExpGolomb(),NS=Hn.readUnsignedExpGolomb(),J1=Hn.readBits(1),J1===0&&Hn.skipBits(1),Hn.skipBits(1),Hn.readBoolean()&&(zt=Hn.readUnsignedExpGolomb(),yn=Hn.readUnsignedExpGolomb(),Kn=Hn.readUnsignedExpGolomb(),fi=Hn.readUnsignedExpGolomb()),Hn.readBoolean()&&Hn.readBoolean()){switch(LS=Hn.readUnsignedByte(),LS){case 1:Ms=[1,1];break;case 2:Ms=[12,11];break;case 3:Ms=[10,11];break;case 4:Ms=[16,11];break;case 5:Ms=[40,33];break;case 6:Ms=[24,11];break;case 7:Ms=[20,11];break;case 8:Ms=[32,11];break;case 9:Ms=[80,33];break;case 10:Ms=[18,11];break;case 11:Ms=[15,11];break;case 12:Ms=[64,33];break;case 13:Ms=[160,99];break;case 14:Ms=[4,3];break;case 15:Ms=[3,2];break;case 16:Ms=[2,1];break;case 255:{Ms=[Hn.readUnsignedByte()<<8|Hn.readUnsignedByte(),Hn.readUnsignedByte()<<8|Hn.readUnsignedByte()];break}}Ms&&Ms[0]/Ms[1]}return{profileIdc:er,levelIdc:Ws,profileCompatibility:Wo,width:($S+1)*16-zt*2-yn*2,height:(2-J1)*(NS+1)*16-Kn*2-fi*2,sarRatio:Ms}}},Rg.prototype=new f;var gj={H264Stream:Rg,NalByteStream:Th},vj=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],mS=function(Z,ve){var ge=Z[ve+6]<<21|Z[ve+7]<<14|Z[ve+8]<<7|Z[ve+9],ke=Z[ve+5],Re=(ke&16)>>4;return ge=ge>=0?ge:0,Re?ge+20:ge+10},bj=function tt(Z,ve){return Z.length-ve<10||Z[ve]!==73||Z[ve+1]!==68||Z[ve+2]!==51?ve:(ve+=mS(Z,ve),tt(Z,ve))},yj=function(Z){var ve=bj(Z,0);return Z.length>=ve+2&&(Z[ve]&255)===255&&(Z[ve+1]&240)===240&&(Z[ve+1]&22)===16},gS=function(Z){return Z[0]<<21|Z[1]<<14|Z[2]<<7|Z[3]},wj=function(Z,ve,ge){var ke,Re="";for(ke=ve;ke<ge;ke++)Re+="%"+("00"+Z[ke].toString(16)).slice(-2);return Re},Tj=function(Z,ve,ge){return unescape(wj(Z,ve,ge))},kj=function(Z,ve){var ge=(Z[ve+5]&224)>>5,ke=Z[ve+4]<<3,Re=Z[ve+3]&6144;return Re|ke|ge},Sj=function(Z,ve){return Z[ve]===73&&Z[ve+1]===68&&Z[ve+2]===51?"timed-metadata":Z[ve]&!0&&(Z[ve+1]&240)===240?"audio":null},Cj=function(Z){for(var ve=0;ve+5<Z.length;){if(Z[ve]!==255||(Z[ve+1]&246)!==240){ve++;continue}return vj[(Z[ve+2]&60)>>>2]}return null},Pj=function(Z){var ve,ge,ke,Re;ve=10,Z[5]&64&&(ve+=4,ve+=gS(Z.subarray(10,14)));do{if(ge=gS(Z.subarray(ve+4,ve+8)),ge<1)return null;if(Re=String.fromCharCode(Z[ve],Z[ve+1],Z[ve+2],Z[ve+3]),Re==="PRIV"){ke=Z.subarray(ve+10,ve+ge+10);for(var Be=0;Be<ke.byteLength;Be++)if(ke[Be]===0){var mt=Tj(ke,0,Be);if(mt==="com.apple.streaming.transportStreamTimestamp"){var kt=ke.subarray(Be+1),Ut=(kt[3]&1)<<30|kt[4]<<22|kt[5]<<14|kt[6]<<6|kt[7]>>>2;return Ut*=4,Ut+=kt[7]&3,Ut}break}}ve+=10,ve+=ge}while(ve<Z.byteLength);return null},$g={isLikelyAacData:yj,parseId3TagSize:mS,parseAdtsSize:kj,parseType:Sj,parseSampleRate:Cj,parseAacTimestamp:Pj},Ng;Ng=function(){var Z=new Uint8Array,ve=0;Ng.prototype.init.call(this),this.setTimestamp=function(ge){ve=ge},this.push=function(ge){var ke=0,Re=0,Be,mt,kt,Ut;for(Z.length?(Ut=Z.length,Z=new Uint8Array(ge.byteLength+Ut),Z.set(Z.subarray(0,Ut)),Z.set(ge,Ut)):Z=ge;Z.length-Re>=3;){if(Z[Re]===73&&Z[Re+1]===68&&Z[Re+2]===51){if(Z.length-Re<10||(ke=$g.parseId3TagSize(Z,Re),Re+ke>Z.length))break;mt={type:"timed-metadata",data:Z.subarray(Re,Re+ke)},this.trigger("data",mt),Re+=ke;continue}else if((Z[Re]&255)===255&&(Z[Re+1]&240)===240){if(Z.length-Re<7||(ke=$g.parseAdtsSize(Z,Re),Re+ke>Z.length))break;kt={type:"audio",data:Z.subarray(Re,Re+ke),pts:ve,dts:ve},this.trigger("data",kt),Re+=ke;continue}Re++}Be=Z.length-Re,Be>0?Z=Z.subarray(Re):Z=new Uint8Array},this.reset=function(){Z=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){Z=new Uint8Array,this.trigger("endedtimeline")}},Ng.prototype=new f;var Ej=Ng,Ij=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],z1=Ij,Aj=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Y1=Aj,Dj=gj.H264Stream,Oj=$g.isLikelyAacData,Mj=Ma.ONE_SECOND_IN_TS,kh,K_,Fg,Nc,xj=function(Z,ve){ve.stream=Z,this.trigger("log",ve)},vS=function(Z,ve){for(var ge=Object.keys(ve),ke=0;ke<ge.length;ke++){var Re=ge[ke];Re==="headOfPipeline"||!ve[Re].on||ve[Re].on("log",xj.bind(Z,Re))}},bS=function(Z,ve){var ge;if(Z.length!==ve.length)return!1;for(ge=0;ge<Z.length;ge++)if(Z[ge]!==ve[ge])return!1;return!0},G1=function(Z,ve,ge,ke,Re,Be){var mt=ge-ve,kt=ke-ve,Ut=Re-ge;return{start:{dts:Z,pts:Z+mt},end:{dts:Z+kt,pts:Z+Ut},prependedContentDuration:Be,baseMediaDecodeTime:Z}};K_=function(Z,ve){var ge=[],ke,Re=0,Be=0,mt=1/0;ve=ve||{},ke=ve.firstSequenceNumber||0,K_.prototype.init.call(this),this.push=function(kt){xu.collectDtsInfo(Z,kt),Z&&z1.forEach(function(Ut){Z[Ut]=kt[Ut]}),ge.push(kt)},this.setEarliestDts=function(kt){Re=kt},this.setVideoBaseMediaDecodeTime=function(kt){mt=kt},this.setAudioAppendStart=function(kt){Be=kt},this.flush=function(){var kt,Ut,$t,zt,yn,Kn,fi;if(ge.length===0){this.trigger("done","AudioSegmentStream");return}kt=Tg.trimAdtsFramesByEarliestDts(ge,Z,Re),Z.baseMediaDecodeTime=xu.calculateTrackBaseMediaDecodeTime(Z,ve.keepOriginalTimestamps),fi=Tg.prefixWithSilence(Z,kt,Be,mt),Z.samples=Tg.generateSampleTable(kt),$t=md.mdat(Tg.concatenateFrameData(kt)),ge=[],Ut=md.moof(ke,[Z]),zt=new Uint8Array(Ut.byteLength+$t.byteLength),ke++,zt.set(Ut),zt.set($t,Ut.byteLength),xu.clearDtsInfo(Z),yn=Math.ceil(Mj*1024/Z.samplerate),kt.length&&(Kn=kt.length*yn,this.trigger("segmentTimingInfo",G1(Ma.audioTsToVideoTs(Z.baseMediaDecodeTime,Z.samplerate),kt[0].dts,kt[0].pts,kt[0].dts+Kn,kt[0].pts+Kn,fi||0)),this.trigger("timingInfo",{start:kt[0].pts,end:kt[0].pts+Kn})),this.trigger("data",{track:Z,boxes:zt}),this.trigger("done","AudioSegmentStream")},this.reset=function(){xu.clearDtsInfo(Z),ge=[],this.trigger("reset")}},K_.prototype=new f,kh=function(Z,ve){var ge,ke=[],Re=[],Be,mt;ve=ve||{},ge=ve.firstSequenceNumber||0,kh.prototype.init.call(this),delete Z.minPTS,this.gopCache_=[],this.push=function(kt){xu.collectDtsInfo(Z,kt),kt.nalUnitType==="seq_parameter_set_rbsp"&&!Be&&(Be=kt.config,Z.sps=[kt.data],Y1.forEach(function(Ut){Z[Ut]=Be[Ut]},this)),kt.nalUnitType==="pic_parameter_set_rbsp"&&!mt&&(mt=kt.data,Z.pps=[kt.data]),ke.push(kt)},this.flush=function(){for(var kt,Ut,$t,zt,yn,Kn,fi=0,Hn,er;ke.length&&ke[0].nalUnitType!=="access_unit_delimiter_rbsp";)ke.shift();if(ke.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(kt=bh.groupNalsIntoFrames(ke),$t=bh.groupFramesIntoGops(kt),$t[0][0].keyFrame||(Ut=this.getGopForFusion_(ke[0],Z),Ut?(fi=Ut.duration,$t.unshift(Ut),$t.byteLength+=Ut.byteLength,$t.nalCount+=Ut.nalCount,$t.pts=Ut.pts,$t.dts=Ut.dts,$t.duration+=Ut.duration):$t=bh.extendFirstKeyFrame($t)),Re.length){var Ws;if(ve.alignGopsAtEnd?Ws=this.alignGopsAtEnd_($t):Ws=this.alignGopsAtStart_($t),!Ws){this.gopCache_.unshift({gop:$t.pop(),pps:Z.pps,sps:Z.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),ke=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}xu.clearDtsInfo(Z),$t=Ws}xu.collectDtsInfo(Z,$t),Z.samples=bh.generateSampleTable($t),yn=md.mdat(bh.concatenateNalData($t)),Z.baseMediaDecodeTime=xu.calculateTrackBaseMediaDecodeTime(Z,ve.keepOriginalTimestamps),this.trigger("processedGopsInfo",$t.map(function(Wo){return{pts:Wo.pts,dts:Wo.dts,byteLength:Wo.byteLength}})),Hn=$t[0],er=$t[$t.length-1],this.trigger("segmentTimingInfo",G1(Z.baseMediaDecodeTime,Hn.dts,Hn.pts,er.dts+er.duration,er.pts+er.duration,fi)),this.trigger("timingInfo",{start:$t[0].pts,end:$t[$t.length-1].pts+$t[$t.length-1].duration}),this.gopCache_.unshift({gop:$t.pop(),pps:Z.pps,sps:Z.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),ke=[],this.trigger("baseMediaDecodeTime",Z.baseMediaDecodeTime),this.trigger("timelineStartInfo",Z.timelineStartInfo),zt=md.moof(ge,[Z]),Kn=new Uint8Array(zt.byteLength+yn.byteLength),ge++,Kn.set(zt),Kn.set(yn,zt.byteLength),this.trigger("data",{track:Z,boxes:Kn}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),ke=[],this.gopCache_.length=0,Re.length=0,this.trigger("reset")},this.resetStream_=function(){xu.clearDtsInfo(Z),Be=void 0,mt=void 0},this.getGopForFusion_=function(kt){var Ut=45e3,$t=1e4,zt=1/0,yn,Kn,fi,Hn,er;for(er=0;er<this.gopCache_.length;er++)Hn=this.gopCache_[er],fi=Hn.gop,!(!(Z.pps&&bS(Z.pps[0],Hn.pps[0]))||!(Z.sps&&bS(Z.sps[0],Hn.sps[0])))&&(fi.dts<Z.timelineStartInfo.dts||(yn=kt.dts-fi.dts-fi.duration,yn>=-$t&&yn<=Ut&&(!Kn||zt>yn)&&(Kn=Hn,zt=yn)));return Kn?Kn.gop:null},this.alignGopsAtStart_=function(kt){var Ut,$t,zt,yn,Kn,fi,Hn,er;for(Kn=kt.byteLength,fi=kt.nalCount,Hn=kt.duration,Ut=$t=0;Ut<Re.length&&$t<kt.length&&(zt=Re[Ut],yn=kt[$t],zt.pts!==yn.pts);){if(yn.pts>zt.pts){Ut++;continue}$t++,Kn-=yn.byteLength,fi-=yn.nalCount,Hn-=yn.duration}return $t===0?kt:$t===kt.length?null:(er=kt.slice($t),er.byteLength=Kn,er.duration=Hn,er.nalCount=fi,er.pts=er[0].pts,er.dts=er[0].dts,er)},this.alignGopsAtEnd_=function(kt){var Ut,$t,zt,yn,Kn,fi;for(Ut=Re.length-1,$t=kt.length-1,Kn=null,fi=!1;Ut>=0&&$t>=0;){if(zt=Re[Ut],yn=kt[$t],zt.pts===yn.pts){fi=!0;break}if(zt.pts>yn.pts){Ut--;continue}Ut===Re.length-1&&(Kn=$t),$t--}if(!fi&&Kn===null)return null;var Hn;if(fi?Hn=$t:Hn=Kn,Hn===0)return kt;var er=kt.slice(Hn),Ws=er.reduce(function(Wo,Hc){return Wo.byteLength+=Hc.byteLength,Wo.duration+=Hc.duration,Wo.nalCount+=Hc.nalCount,Wo},{byteLength:0,duration:0,nalCount:0});return er.byteLength=Ws.byteLength,er.duration=Ws.duration,er.nalCount=Ws.nalCount,er.pts=er[0].pts,er.dts=er[0].dts,er},this.alignGopsWith=function(kt){Re=kt}},kh.prototype=new f,Nc=function(Z,ve){this.numberOfTracks=0,this.metadataStream=ve,Z=Z||{},typeof Z.remux<"u"?this.remuxTracks=!!Z.remux:this.remuxTracks=!0,typeof Z.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=Z.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Nc.prototype.init.call(this),this.push=function(ge){if(ge.text)return this.pendingCaptions.push(ge);if(ge.frames)return this.pendingMetadata.push(ge);this.pendingTracks.push(ge.track),this.pendingBytes+=ge.boxes.byteLength,ge.track.type==="video"&&(this.videoTrack=ge.track,this.pendingBoxes.push(ge.boxes)),ge.track.type==="audio"&&(this.audioTrack=ge.track,this.pendingBoxes.unshift(ge.boxes))}},Nc.prototype=new f,Nc.prototype.flush=function(tt){var Z=0,ve={captions:[],captionStreams:{},metadata:[],info:{}},ge,ke,Re,Be=0,mt;if(this.pendingTracks.length<this.numberOfTracks){if(tt!=="VideoSegmentStream"&&tt!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(Be=this.videoTrack.timelineStartInfo.pts,Y1.forEach(function(kt){ve.info[kt]=this.videoTrack[kt]},this)):this.audioTrack&&(Be=this.audioTrack.timelineStartInfo.pts,z1.forEach(function(kt){ve.info[kt]=this.audioTrack[kt]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?ve.type=this.pendingTracks[0].type:ve.type="combined",this.emittedTracks+=this.pendingTracks.length,Re=md.initSegment(this.pendingTracks),ve.initSegment=new Uint8Array(Re.byteLength),ve.initSegment.set(Re),ve.data=new Uint8Array(this.pendingBytes),mt=0;mt<this.pendingBoxes.length;mt++)ve.data.set(this.pendingBoxes[mt],Z),Z+=this.pendingBoxes[mt].byteLength;for(mt=0;mt<this.pendingCaptions.length;mt++)ge=this.pendingCaptions[mt],ge.startTime=Ma.metadataTsToSeconds(ge.startPts,Be,this.keepOriginalTimestamps),ge.endTime=Ma.metadataTsToSeconds(ge.endPts,Be,this.keepOriginalTimestamps),ve.captionStreams[ge.stream]=!0,ve.captions.push(ge);for(mt=0;mt<this.pendingMetadata.length;mt++)ke=this.pendingMetadata[mt],ke.cueTime=Ma.metadataTsToSeconds(ke.pts,Be,this.keepOriginalTimestamps),ve.metadata.push(ke);for(ve.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",ve),mt=0;mt<ve.captions.length;mt++)ge=ve.captions[mt],this.trigger("caption",ge);for(mt=0;mt<ve.metadata.length;mt++)ke=ve.metadata[mt],this.trigger("id3Frame",ke)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Nc.prototype.setRemux=function(tt){this.remuxTracks=tt},Fg=function(Z){var ve=this,ge=!0,ke,Re;Fg.prototype.init.call(this),Z=Z||{},this.baseMediaDecodeTime=Z.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var Be={};this.transmuxPipeline_=Be,Be.type="aac",Be.metadataStream=new Jd.MetadataStream,Be.aacStream=new Ej,Be.audioTimestampRolloverStream=new Jd.TimestampRolloverStream("audio"),Be.timedMetadataTimestampRolloverStream=new Jd.TimestampRolloverStream("timed-metadata"),Be.adtsStream=new _S,Be.coalesceStream=new Nc(Z,Be.metadataStream),Be.headOfPipeline=Be.aacStream,Be.aacStream.pipe(Be.audioTimestampRolloverStream).pipe(Be.adtsStream),Be.aacStream.pipe(Be.timedMetadataTimestampRolloverStream).pipe(Be.metadataStream).pipe(Be.coalesceStream),Be.metadataStream.on("timestamp",function(mt){Be.aacStream.setTimestamp(mt.timeStamp)}),Be.aacStream.on("data",function(mt){mt.type!=="timed-metadata"&&mt.type!=="audio"||Be.audioSegmentStream||(Re=Re||{timelineStartInfo:{baseMediaDecodeTime:ve.baseMediaDecodeTime},codec:"adts",type:"audio"},Be.coalesceStream.numberOfTracks++,Be.audioSegmentStream=new K_(Re,Z),Be.audioSegmentStream.on("log",ve.getLogTrigger_("audioSegmentStream")),Be.audioSegmentStream.on("timingInfo",ve.trigger.bind(ve,"audioTimingInfo")),Be.adtsStream.pipe(Be.audioSegmentStream).pipe(Be.coalesceStream),ve.trigger("trackinfo",{hasAudio:!!Re,hasVideo:!!ke}))}),Be.coalesceStream.on("data",this.trigger.bind(this,"data")),Be.coalesceStream.on("done",this.trigger.bind(this,"done")),vS(this,Be)},this.setupTsPipeline=function(){var Be={};this.transmuxPipeline_=Be,Be.type="ts",Be.metadataStream=new Jd.MetadataStream,Be.packetStream=new Jd.TransportPacketStream,Be.parseStream=new Jd.TransportParseStream,Be.elementaryStream=new Jd.ElementaryStream,Be.timestampRolloverStream=new Jd.TimestampRolloverStream,Be.adtsStream=new _S,Be.h264Stream=new Dj,Be.captionStream=new Jd.CaptionStream(Z),Be.coalesceStream=new Nc(Z,Be.metadataStream),Be.headOfPipeline=Be.packetStream,Be.packetStream.pipe(Be.parseStream).pipe(Be.elementaryStream).pipe(Be.timestampRolloverStream),Be.timestampRolloverStream.pipe(Be.h264Stream),Be.timestampRolloverStream.pipe(Be.adtsStream),Be.timestampRolloverStream.pipe(Be.metadataStream).pipe(Be.coalesceStream),Be.h264Stream.pipe(Be.captionStream).pipe(Be.coalesceStream),Be.elementaryStream.on("data",function(mt){var kt;if(mt.type==="metadata"){for(kt=mt.tracks.length;kt--;)!ke&&mt.tracks[kt].type==="video"?(ke=mt.tracks[kt],ke.timelineStartInfo.baseMediaDecodeTime=ve.baseMediaDecodeTime):!Re&&mt.tracks[kt].type==="audio"&&(Re=mt.tracks[kt],Re.timelineStartInfo.baseMediaDecodeTime=ve.baseMediaDecodeTime);ke&&!Be.videoSegmentStream&&(Be.coalesceStream.numberOfTracks++,Be.videoSegmentStream=new kh(ke,Z),Be.videoSegmentStream.on("log",ve.getLogTrigger_("videoSegmentStream")),Be.videoSegmentStream.on("timelineStartInfo",function(Ut){Re&&!Z.keepOriginalTimestamps&&(Re.timelineStartInfo=Ut,Be.audioSegmentStream.setEarliestDts(Ut.dts-ve.baseMediaDecodeTime))}),Be.videoSegmentStream.on("processedGopsInfo",ve.trigger.bind(ve,"gopInfo")),Be.videoSegmentStream.on("segmentTimingInfo",ve.trigger.bind(ve,"videoSegmentTimingInfo")),Be.videoSegmentStream.on("baseMediaDecodeTime",function(Ut){Re&&Be.audioSegmentStream.setVideoBaseMediaDecodeTime(Ut)}),Be.videoSegmentStream.on("timingInfo",ve.trigger.bind(ve,"videoTimingInfo")),Be.h264Stream.pipe(Be.videoSegmentStream).pipe(Be.coalesceStream)),Re&&!Be.audioSegmentStream&&(Be.coalesceStream.numberOfTracks++,Be.audioSegmentStream=new K_(Re,Z),Be.audioSegmentStream.on("log",ve.getLogTrigger_("audioSegmentStream")),Be.audioSegmentStream.on("timingInfo",ve.trigger.bind(ve,"audioTimingInfo")),Be.audioSegmentStream.on("segmentTimingInfo",ve.trigger.bind(ve,"audioSegmentTimingInfo")),Be.adtsStream.pipe(Be.audioSegmentStream).pipe(Be.coalesceStream)),ve.trigger("trackinfo",{hasAudio:!!Re,hasVideo:!!ke})}}),Be.coalesceStream.on("data",this.trigger.bind(this,"data")),Be.coalesceStream.on("id3Frame",function(mt){mt.dispatchType=Be.metadataStream.dispatchType,ve.trigger("id3Frame",mt)}),Be.coalesceStream.on("caption",this.trigger.bind(this,"caption")),Be.coalesceStream.on("done",this.trigger.bind(this,"done")),vS(this,Be)},this.setBaseMediaDecodeTime=function(Be){var mt=this.transmuxPipeline_;Z.keepOriginalTimestamps||(this.baseMediaDecodeTime=Be),Re&&(Re.timelineStartInfo.dts=void 0,Re.timelineStartInfo.pts=void 0,xu.clearDtsInfo(Re),mt.audioTimestampRolloverStream&&mt.audioTimestampRolloverStream.discontinuity()),ke&&(mt.videoSegmentStream&&(mt.videoSegmentStream.gopCache_=[]),ke.timelineStartInfo.dts=void 0,ke.timelineStartInfo.pts=void 0,xu.clearDtsInfo(ke),mt.captionStream.reset()),mt.timestampRolloverStream&&mt.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(Be){Re&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(Be)},this.setRemux=function(Be){var mt=this.transmuxPipeline_;Z.remux=Be,mt&&mt.coalesceStream&&mt.coalesceStream.setRemux(Be)},this.alignGopsWith=function(Be){ke&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(Be)},this.getLogTrigger_=function(Be){var mt=this;return function(kt){kt.stream=Be,mt.trigger("log",kt)}},this.push=function(Be){if(ge){var mt=Oj(Be);mt&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!mt&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),ge=!1}this.transmuxPipeline_.headOfPipeline.push(Be)},this.flush=function(){ge=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Fg.prototype=new f;var Rj={Transmuxer:Fg,VideoSegmentStream:kh,AudioSegmentStream:K_,AUDIO_PROPERTIES:z1,VIDEO_PROPERTIES:Y1,generateSegmentTimingInfo:G1},$j=function(Z){return Z>>>0},Nj=function(Z){return("00"+Z.toString(16)).slice(-2)},Lg={toUnsigned:$j,toHexString:Nj},Fj=function(Z){var ve="";return ve+=String.fromCharCode(Z[0]),ve+=String.fromCharCode(Z[1]),ve+=String.fromCharCode(Z[2]),ve+=String.fromCharCode(Z[3]),ve},Fc=Fj,Lj=Lg.toUnsigned,Hj=function tt(Z,ve){var ge=[],ke,Re,Be,mt,kt;if(!ve.length)return null;for(ke=0;ke<Z.byteLength;)Re=Lj(Z[ke]<<24|Z[ke+1]<<16|Z[ke+2]<<8|Z[ke+3]),Be=Fc(Z.subarray(ke+4,ke+8)),mt=Re>1?ke+Re:Z.byteLength,Be===ve[0]&&(ve.length===1?ge.push(Z.subarray(ke+8,mt)):(kt=tt(Z.subarray(ke+8,mt),ve.slice(1)),kt.length&&(ge=ge.concat(kt)))),ke=mt;return ge},os=Hj,jj=Lg.toUnsigned,Bj=u.getUint64,Uj=function(Z){var ve={version:Z[0],flags:new Uint8Array(Z.subarray(1,4))};return ve.version===1?ve.baseMediaDecodeTime=Bj(Z.subarray(4)):ve.baseMediaDecodeTime=jj(Z[4]<<24|Z[5]<<16|Z[6]<<8|Z[7]),ve},yS=Uj,qj=function(Z){return{isLeading:(Z[0]&12)>>>2,dependsOn:Z[0]&3,isDependedOn:(Z[1]&192)>>>6,hasRedundancy:(Z[1]&48)>>>4,paddingValue:(Z[1]&14)>>>1,isNonSyncSample:Z[1]&1,degradationPriority:Z[2]<<8|Z[3]}},wS=qj,Wj=function(Z){var ve={version:Z[0],flags:new Uint8Array(Z.subarray(1,4)),samples:[]},ge=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),ke=ve.flags[2]&1,Re=ve.flags[2]&4,Be=ve.flags[1]&1,mt=ve.flags[1]&2,kt=ve.flags[1]&4,Ut=ve.flags[1]&8,$t=ge.getUint32(4),zt=8,yn;for(ke&&(ve.dataOffset=ge.getInt32(zt),zt+=4),Re&&$t&&(yn={flags:wS(Z.subarray(zt,zt+4))},zt+=4,Be&&(yn.duration=ge.getUint32(zt),zt+=4),mt&&(yn.size=ge.getUint32(zt),zt+=4),Ut&&(ve.version===1?yn.compositionTimeOffset=ge.getInt32(zt):yn.compositionTimeOffset=ge.getUint32(zt),zt+=4),ve.samples.push(yn),$t--);$t--;)yn={},Be&&(yn.duration=ge.getUint32(zt),zt+=4),mt&&(yn.size=ge.getUint32(zt),zt+=4),kt&&(yn.flags=wS(Z.subarray(zt,zt+4)),zt+=4),Ut&&(ve.version===1?yn.compositionTimeOffset=ge.getInt32(zt):yn.compositionTimeOffset=ge.getUint32(zt),zt+=4),ve.samples.push(yn);return ve},TS=Wj,Vj=function(Z){var ve=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),ge={version:Z[0],flags:new Uint8Array(Z.subarray(1,4)),trackId:ve.getUint32(4)},ke=ge.flags[2]&1,Re=ge.flags[2]&2,Be=ge.flags[2]&8,mt=ge.flags[2]&16,kt=ge.flags[2]&32,Ut=ge.flags[0]&65536,$t=ge.flags[0]&131072,zt;return zt=8,ke&&(zt+=4,ge.baseDataOffset=ve.getUint32(12),zt+=4),Re&&(ge.sampleDescriptionIndex=ve.getUint32(zt),zt+=4),Be&&(ge.defaultSampleDuration=ve.getUint32(zt),zt+=4),mt&&(ge.defaultSampleSize=ve.getUint32(zt),zt+=4),kt&&(ge.defaultSampleFlags=ve.getUint32(zt)),Ut&&(ge.durationIsEmpty=!0),!ke&&$t&&(ge.baseDataOffsetIsMoof=!0),ge},kS=Vj,SS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof zs<"u"?zs:typeof self<"u"?self:{},Sh;typeof window<"u"?Sh=window:typeof SS<"u"?Sh=SS:typeof self<"u"?Sh=self:Sh={};var Ch=Sh,zj=yh.discardEmulationPreventionBytes,Yj=Eg.CaptionStream,Gj=function(Z,ve){for(var ge=Z,ke=0;ke<ve.length;ke++){var Re=ve[ke];if(ge<Re.size)return Re;ge-=Re.size}return null},Kj=function(Z,ve,ge){var ke=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),Re={logs:[],seiNals:[]},Be,mt,kt,Ut;for(mt=0;mt+4<Z.length;mt+=kt)if(kt=ke.getUint32(mt),mt+=4,!(kt<=0))switch(Z[mt]&31){case 6:var $t=Z.subarray(mt+1,mt+1+kt),zt=Gj(mt,ve);if(Be={nalUnitType:"sei_rbsp",size:kt,data:$t,escapedRBSP:zj($t),trackId:ge},zt)Be.pts=zt.pts,Be.dts=zt.dts,Ut=zt;else if(Ut)Be.pts=Ut.pts,Be.dts=Ut.dts;else{Re.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+mt+" for trackId "+ge+". See mux.js#223."});break}Re.seiNals.push(Be);break}return Re},Xj=function(Z,ve,ge){var ke=ve,Re=ge.defaultSampleDuration||0,Be=ge.defaultSampleSize||0,mt=ge.trackId,kt=[];return Z.forEach(function(Ut){var $t=TS(Ut),zt=$t.samples;zt.forEach(function(yn){yn.duration===void 0&&(yn.duration=Re),yn.size===void 0&&(yn.size=Be),yn.trackId=mt,yn.dts=ke,yn.compositionTimeOffset===void 0&&(yn.compositionTimeOffset=0),typeof ke=="bigint"?(yn.pts=ke+Ch.BigInt(yn.compositionTimeOffset),ke+=Ch.BigInt(yn.duration)):(yn.pts=ke+yn.compositionTimeOffset,ke+=yn.duration)}),kt=kt.concat(zt)}),kt},Qj=function(Z,ve){var ge=os(Z,["moof","traf"]),ke=os(Z,["mdat"]),Re={},Be=[];return ke.forEach(function(mt,kt){var Ut=ge[kt];Be.push({mdat:mt,traf:Ut})}),Be.forEach(function(mt){var kt=mt.mdat,Ut=mt.traf,$t=os(Ut,["tfhd"]),zt=kS($t[0]),yn=zt.trackId,Kn=os(Ut,["tfdt"]),fi=Kn.length>0?yS(Kn[0]).baseMediaDecodeTime:0,Hn=os(Ut,["trun"]),er,Ws;ve===yn&&Hn.length>0&&(er=Xj(Hn,fi,zt),Ws=Kj(kt,er,yn),Re[yn]||(Re[yn]={seiNals:[],logs:[]}),Re[yn].seiNals=Re[yn].seiNals.concat(Ws.seiNals),Re[yn].logs=Re[yn].logs.concat(Ws.logs))}),Re},Jj=function(Z,ve,ge){var ke;if(ve===null)return null;ke=Qj(Z,ve);var Re=ke[ve]||{};return{seiNals:Re.seiNals,logs:Re.logs,timescale:ge}},Zj=function(){var Z=!1,ve,ge,ke,Re,Be,mt;this.isInitialized=function(){return Z},this.init=function(kt){ve=new Yj,Z=!0,mt=kt?kt.isPartial:!1,ve.on("data",function(Ut){Ut.startTime=Ut.startPts/Re,Ut.endTime=Ut.endPts/Re,Be.captions.push(Ut),Be.captionStreams[Ut.stream]=!0}),ve.on("log",function(Ut){Be.logs.push(Ut)})},this.isNewInit=function(kt,Ut){return kt&&kt.length===0||Ut&&typeof Ut=="object"&&Object.keys(Ut).length===0?!1:ke!==kt[0]||Re!==Ut[ke]},this.parse=function(kt,Ut,$t){var zt;if(this.isInitialized()){if(!Ut||!$t)return null;if(this.isNewInit(Ut,$t))ke=Ut[0],Re=$t[ke];else if(ke===null||!Re)return ge.push(kt),null}else return null;for(;ge.length>0;){var yn=ge.shift();this.parse(yn,Ut,$t)}return zt=Jj(kt,ke,Re),zt&&zt.logs&&(Be.logs=Be.logs.concat(zt.logs)),zt===null||!zt.seiNals?Be.logs.length?{logs:Be.logs,captions:[],captionStreams:[]}:null:(this.pushNals(zt.seiNals),this.flushStream(),Be)},this.pushNals=function(kt){if(!this.isInitialized()||!kt||kt.length===0)return null;kt.forEach(function(Ut){ve.push(Ut)})},this.flushStream=function(){if(!this.isInitialized())return null;mt?ve.partialFlush():ve.flush()},this.clearParsedCaptions=function(){Be.captions=[],Be.captionStreams={},Be.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;ve.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){ge=[],ke=null,Re=null,Be?this.clearParsedCaptions():Be={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},e7=Zj,Hg=Lg.toUnsigned,Ph=Lg.toHexString,t7=u.getUint64,CS,PS,ES,IS,AS,K1;CS=function(Z){var ve={},ge=os(Z,["moov","trak"]);return ge.reduce(function(ke,Re){var Be,mt,kt,Ut,$t;return Be=os(Re,["tkhd"])[0],!Be||(mt=Be[0],kt=mt===0?12:20,Ut=Hg(Be[kt]<<24|Be[kt+1]<<16|Be[kt+2]<<8|Be[kt+3]),$t=os(Re,["mdia","mdhd"])[0],!$t)?null:(mt=$t[0],kt=mt===0?12:20,ke[Ut]=Hg($t[kt]<<24|$t[kt+1]<<16|$t[kt+2]<<8|$t[kt+3]),ke)},ve)},PS=function(Z,ve){var ge;ge=os(ve,["moof","traf"]);var ke=ge.reduce(function(Re,Be){var mt=os(Be,["tfhd"])[0],kt=Hg(mt[4]<<24|mt[5]<<16|mt[6]<<8|mt[7]),Ut=Z[kt]||9e4,$t=os(Be,["tfdt"])[0],zt=new DataView($t.buffer,$t.byteOffset,$t.byteLength),yn;$t[0]===1?yn=t7($t.subarray(4,12)):yn=zt.getUint32(4);var Kn;return typeof yn=="bigint"?Kn=yn/Ch.BigInt(Ut):typeof yn=="number"&&!isNaN(yn)&&(Kn=yn/Ut),Kn<Number.MAX_SAFE_INTEGER&&(Kn=Number(Kn)),Kn<Re&&(Re=Kn),Re},1/0);return typeof ke=="bigint"||isFinite(ke)?ke:0},ES=function(Z,ve){var ge=os(ve,["moof","traf"]),ke=0,Re=0,Be;if(ge&&ge.length){var mt=os(ge[0],["tfhd"])[0],kt=os(ge[0],["trun"])[0],Ut=os(ge[0],["tfdt"])[0];if(mt){var $t=kS(mt);Be=$t.trackId}if(Ut){var zt=yS(Ut);ke=zt.baseMediaDecodeTime}if(kt){var yn=TS(kt);yn.samples&&yn.samples.length&&(Re=yn.samples[0].compositionTimeOffset||0)}}var Kn=Z[Be]||9e4;typeof ke=="bigint"&&(Re=Ch.BigInt(Re),Kn=Ch.BigInt(Kn));var fi=(ke+Re)/Kn;return typeof fi=="bigint"&&fi<Number.MAX_SAFE_INTEGER&&(fi=Number(fi)),fi},IS=function(Z){var ve=os(Z,["moov","trak"]),ge=[];return ve.forEach(function(ke){var Re=os(ke,["mdia","hdlr"]),Be=os(ke,["tkhd"]);Re.forEach(function(mt,kt){var Ut=Fc(mt.subarray(8,12)),$t=Be[kt],zt,yn,Kn;Ut==="vide"&&(zt=new DataView($t.buffer,$t.byteOffset,$t.byteLength),yn=zt.getUint8(0),Kn=yn===0?zt.getUint32(12):zt.getUint32(20),ge.push(Kn))})}),ge},K1=function(Z){var ve=Z[0],ge=ve===0?12:20;return Hg(Z[ge]<<24|Z[ge+1]<<16|Z[ge+2]<<8|Z[ge+3])},AS=function(Z){var ve=os(Z,["moov","trak"]),ge=[];return ve.forEach(function(ke){var Re={},Be=os(ke,["tkhd"])[0],mt,kt;Be&&(mt=new DataView(Be.buffer,Be.byteOffset,Be.byteLength),kt=mt.getUint8(0),Re.id=kt===0?mt.getUint32(12):mt.getUint32(20));var Ut=os(ke,["mdia","hdlr"])[0];if(Ut){var $t=Fc(Ut.subarray(8,12));$t==="vide"?Re.type="video":$t==="soun"?Re.type="audio":Re.type=$t}var zt=os(ke,["mdia","minf","stbl","stsd"])[0];if(zt){var yn=zt.subarray(8);Re.codec=Fc(yn.subarray(4,8));var Kn=os(yn,[Re.codec])[0],fi,Hn;Kn&&(/^[asm]vc[1-9]$/i.test(Re.codec)?(fi=Kn.subarray(78),Hn=Fc(fi.subarray(4,8)),Hn==="avcC"&&fi.length>11?(Re.codec+=".",Re.codec+=Ph(fi[9]),Re.codec+=Ph(fi[10]),Re.codec+=Ph(fi[11])):Re.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(Re.codec)?(fi=Kn.subarray(28),Hn=Fc(fi.subarray(4,8)),Hn==="esds"&&fi.length>20&&fi[19]!==0?(Re.codec+="."+Ph(fi[19]),Re.codec+="."+Ph(fi[20]>>>2&63).replace(/^0/,"")):Re.codec="mp4a.40.2"):Re.codec=Re.codec.toLowerCase())}var er=os(ke,["mdia","mdhd"])[0];er&&(Re.timescale=K1(er)),ge.push(Re)}),ge};var DS={findBox:os,parseType:Fc,timescale:CS,startTime:PS,compositionStartTime:ES,videoTrackIds:IS,tracks:AS,getTimescaleFromMediaHeader:K1},OS=function(Z){var ve=Z[1]&31;return ve<<=8,ve|=Z[2],ve},jg=function(Z){return!!(Z[1]&64)},Bg=function(Z){var ve=0;return(Z[3]&48)>>>4>1&&(ve+=Z[4]+1),ve},n7=function(Z,ve){var ge=OS(Z);return ge===0?"pat":ge===ve?"pmt":ve?"pes":null},i7=function(Z){var ve=jg(Z),ge=4+Bg(Z);return ve&&(ge+=Z[ge]+1),(Z[ge+10]&31)<<8|Z[ge+11]},r7=function(Z){var ve={},ge=jg(Z),ke=4+Bg(Z);if(ge&&(ke+=Z[ke]+1),!!(Z[ke+5]&1)){var Re,Be,mt;Re=(Z[ke+1]&15)<<8|Z[ke+2],Be=3+Re-4,mt=(Z[ke+10]&15)<<8|Z[ke+11];for(var kt=12+mt;kt<Be;){var Ut=ke+kt;ve[(Z[Ut+1]&31)<<8|Z[Ut+2]]=Z[Ut],kt+=((Z[Ut+3]&15)<<8|Z[Ut+4])+5}return ve}},a7=function(Z,ve){var ge=OS(Z),ke=ve[ge];switch(ke){case _o.H264_STREAM_TYPE:return"video";case _o.ADTS_STREAM_TYPE:return"audio";case _o.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},s7=function(Z){var ve=jg(Z);if(!ve)return null;var ge=4+Bg(Z);if(ge>=Z.byteLength)return null;var ke=null,Re;return Re=Z[ge+7],Re&192&&(ke={},ke.pts=(Z[ge+9]&14)<<27|(Z[ge+10]&255)<<20|(Z[ge+11]&254)<<12|(Z[ge+12]&255)<<5|(Z[ge+13]&254)>>>3,ke.pts*=4,ke.pts+=(Z[ge+13]&6)>>>1,ke.dts=ke.pts,Re&64&&(ke.dts=(Z[ge+14]&14)<<27|(Z[ge+15]&255)<<20|(Z[ge+16]&254)<<12|(Z[ge+17]&255)<<5|(Z[ge+18]&254)>>>3,ke.dts*=4,ke.dts+=(Z[ge+18]&6)>>>1)),ke},X1=function(Z){switch(Z){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},o7=function(Z){for(var ve=4+Bg(Z),ge=Z.subarray(ve),ke=0,Re=0,Be=!1,mt;Re<ge.byteLength-3;Re++)if(ge[Re+2]===1){ke=Re+5;break}for(;ke<ge.byteLength;)switch(ge[ke]){case 0:if(ge[ke-1]!==0){ke+=2;break}else if(ge[ke-2]!==0){ke++;break}Re+3!==ke-2&&(mt=X1(ge[Re+3]&31),mt==="slice_layer_without_partitioning_rbsp_idr"&&(Be=!0));do ke++;while(ge[ke]!==1&&ke<ge.length);Re=ke-2,ke+=3;break;case 1:if(ge[ke-1]!==0||ge[ke-2]!==0){ke+=3;break}mt=X1(ge[Re+3]&31),mt==="slice_layer_without_partitioning_rbsp_idr"&&(Be=!0),Re=ke-2,ke+=3;break;default:ke+=3;break}return ge=ge.subarray(Re),ke-=Re,Re=0,ge&&ge.byteLength>3&&(mt=X1(ge[Re+3]&31),mt==="slice_layer_without_partitioning_rbsp_idr"&&(Be=!0)),Be},l7={parseType:n7,parsePat:i7,parsePmt:r7,parsePayloadUnitStartIndicator:jg,parsePesType:a7,parsePesTime:s7,videoPacketContainsKeyFrame:o7},X_=lS.handleRollover,qa={};qa.ts=l7,qa.aac=$g;var Lc=Ma.ONE_SECOND_IN_TS,qo=188,gd=71,u7=function(Z,ve){for(var ge=0,ke=qo,Re,Be;ke<Z.byteLength;){if(Z[ge]===gd&&Z[ke]===gd){switch(Re=Z.subarray(ge,ke),Be=qa.ts.parseType(Re,ve.pid),Be){case"pat":ve.pid=qa.ts.parsePat(Re);break;case"pmt":var mt=qa.ts.parsePmt(Re);ve.table=ve.table||{},Object.keys(mt).forEach(function(kt){ve.table[kt]=mt[kt]});break}ge+=qo,ke+=qo;continue}ge++,ke++}},MS=function(Z,ve,ge){for(var ke=0,Re=qo,Be,mt,kt,Ut,$t,zt=!1;Re<=Z.byteLength;){if(Z[ke]===gd&&(Z[Re]===gd||Re===Z.byteLength)){switch(Be=Z.subarray(ke,Re),mt=qa.ts.parseType(Be,ve.pid),mt){case"pes":kt=qa.ts.parsePesType(Be,ve.table),Ut=qa.ts.parsePayloadUnitStartIndicator(Be),kt==="audio"&&Ut&&($t=qa.ts.parsePesTime(Be),$t&&($t.type="audio",ge.audio.push($t),zt=!0));break}if(zt)break;ke+=qo,Re+=qo;continue}ke++,Re++}for(Re=Z.byteLength,ke=Re-qo,zt=!1;ke>=0;){if(Z[ke]===gd&&(Z[Re]===gd||Re===Z.byteLength)){switch(Be=Z.subarray(ke,Re),mt=qa.ts.parseType(Be,ve.pid),mt){case"pes":kt=qa.ts.parsePesType(Be,ve.table),Ut=qa.ts.parsePayloadUnitStartIndicator(Be),kt==="audio"&&Ut&&($t=qa.ts.parsePesTime(Be),$t&&($t.type="audio",ge.audio.push($t),zt=!0));break}if(zt)break;ke-=qo,Re-=qo;continue}ke--,Re--}},d7=function(Z,ve,ge){for(var ke=0,Re=qo,Be,mt,kt,Ut,$t,zt,yn,Kn,fi=!1,Hn={data:[],size:0};Re<Z.byteLength;){if(Z[ke]===gd&&Z[Re]===gd){switch(Be=Z.subarray(ke,Re),mt=qa.ts.parseType(Be,ve.pid),mt){case"pes":if(kt=qa.ts.parsePesType(Be,ve.table),Ut=qa.ts.parsePayloadUnitStartIndicator(Be),kt==="video"&&(Ut&&!fi&&($t=qa.ts.parsePesTime(Be),$t&&($t.type="video",ge.video.push($t),fi=!0)),!ge.firstKeyFrame)){if(Ut&&Hn.size!==0){for(zt=new Uint8Array(Hn.size),yn=0;Hn.data.length;)Kn=Hn.data.shift(),zt.set(Kn,yn),yn+=Kn.byteLength;if(qa.ts.videoPacketContainsKeyFrame(zt)){var er=qa.ts.parsePesTime(zt);er?(ge.firstKeyFrame=er,ge.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Hn.size=0}Hn.data.push(Be),Hn.size+=Be.byteLength}break}if(fi&&ge.firstKeyFrame)break;ke+=qo,Re+=qo;continue}ke++,Re++}for(Re=Z.byteLength,ke=Re-qo,fi=!1;ke>=0;){if(Z[ke]===gd&&Z[Re]===gd){switch(Be=Z.subarray(ke,Re),mt=qa.ts.parseType(Be,ve.pid),mt){case"pes":kt=qa.ts.parsePesType(Be,ve.table),Ut=qa.ts.parsePayloadUnitStartIndicator(Be),kt==="video"&&Ut&&($t=qa.ts.parsePesTime(Be),$t&&($t.type="video",ge.video.push($t),fi=!0));break}if(fi)break;ke-=qo,Re-=qo;continue}ke--,Re--}},f7=function(Z,ve){if(Z.audio&&Z.audio.length){var ge=ve;(typeof ge>"u"||isNaN(ge))&&(ge=Z.audio[0].dts),Z.audio.forEach(function(Be){Be.dts=X_(Be.dts,ge),Be.pts=X_(Be.pts,ge),Be.dtsTime=Be.dts/Lc,Be.ptsTime=Be.pts/Lc})}if(Z.video&&Z.video.length){var ke=ve;if((typeof ke>"u"||isNaN(ke))&&(ke=Z.video[0].dts),Z.video.forEach(function(Be){Be.dts=X_(Be.dts,ke),Be.pts=X_(Be.pts,ke),Be.dtsTime=Be.dts/Lc,Be.ptsTime=Be.pts/Lc}),Z.firstKeyFrame){var Re=Z.firstKeyFrame;Re.dts=X_(Re.dts,ke),Re.pts=X_(Re.pts,ke),Re.dtsTime=Re.dts/Lc,Re.ptsTime=Re.pts/Lc}}},c7=function(Z){for(var ve=!1,ge=0,ke=null,Re=null,Be=0,mt=0,kt;Z.length-mt>=3;){var Ut=qa.aac.parseType(Z,mt);switch(Ut){case"timed-metadata":if(Z.length-mt<10){ve=!0;break}if(Be=qa.aac.parseId3TagSize(Z,mt),Be>Z.length){ve=!0;break}Re===null&&(kt=Z.subarray(mt,mt+Be),Re=qa.aac.parseAacTimestamp(kt)),mt+=Be;break;case"audio":if(Z.length-mt<7){ve=!0;break}if(Be=qa.aac.parseAdtsSize(Z,mt),Be>Z.length){ve=!0;break}ke===null&&(kt=Z.subarray(mt,mt+Be),ke=qa.aac.parseSampleRate(kt)),ge++,mt+=Be;break;default:mt++;break}if(ve)return null}if(ke===null||Re===null)return null;var $t=Lc/ke,zt={audio:[{type:"audio",dts:Re,pts:Re},{type:"audio",dts:Re+ge*1024*$t,pts:Re+ge*1024*$t}]};return zt},_7=function(Z){var ve={pid:null,table:null},ge={};u7(Z,ve);for(var ke in ve.table)if(ve.table.hasOwnProperty(ke)){var Re=ve.table[ke];switch(Re){case _o.H264_STREAM_TYPE:ge.video=[],d7(Z,ve,ge),ge.video.length===0&&delete ge.video;break;case _o.ADTS_STREAM_TYPE:ge.audio=[],MS(Z,ve,ge),ge.audio.length===0&&delete ge.audio;break}}return ge},p7=function(Z,ve){var ge=qa.aac.isLikelyAacData(Z),ke;return ge?ke=c7(Z):ke=_7(Z),!ke||!ke.audio&&!ke.video?null:(f7(ke,ve),ke)},h7={inspect:p7,parseAudioPes_:MS},m7=function(Z,ve){ve.on("data",function(ge){var ke=ge.initSegment;ge.initSegment={data:ke.buffer,byteOffset:ke.byteOffset,byteLength:ke.byteLength};var Re=ge.data;ge.data=Re.buffer,Z.postMessage({action:"data",segment:ge,byteOffset:Re.byteOffset,byteLength:Re.byteLength},[ge.data])}),ve.on("done",function(ge){Z.postMessage({action:"done"})}),ve.on("gopInfo",function(ge){Z.postMessage({action:"gopInfo",gopInfo:ge})}),ve.on("videoSegmentTimingInfo",function(ge){var ke={start:{decode:Ma.videoTsToSeconds(ge.start.dts),presentation:Ma.videoTsToSeconds(ge.start.pts)},end:{decode:Ma.videoTsToSeconds(ge.end.dts),presentation:Ma.videoTsToSeconds(ge.end.pts)},baseMediaDecodeTime:Ma.videoTsToSeconds(ge.baseMediaDecodeTime)};ge.prependedContentDuration&&(ke.prependedContentDuration=Ma.videoTsToSeconds(ge.prependedContentDuration)),Z.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:ke})}),ve.on("audioSegmentTimingInfo",function(ge){var ke={start:{decode:Ma.videoTsToSeconds(ge.start.dts),presentation:Ma.videoTsToSeconds(ge.start.pts)},end:{decode:Ma.videoTsToSeconds(ge.end.dts),presentation:Ma.videoTsToSeconds(ge.end.pts)},baseMediaDecodeTime:Ma.videoTsToSeconds(ge.baseMediaDecodeTime)};ge.prependedContentDuration&&(ke.prependedContentDuration=Ma.videoTsToSeconds(ge.prependedContentDuration)),Z.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:ke})}),ve.on("id3Frame",function(ge){Z.postMessage({action:"id3Frame",id3Frame:ge})}),ve.on("caption",function(ge){Z.postMessage({action:"caption",caption:ge})}),ve.on("trackinfo",function(ge){Z.postMessage({action:"trackinfo",trackInfo:ge})}),ve.on("audioTimingInfo",function(ge){Z.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ma.videoTsToSeconds(ge.start),end:Ma.videoTsToSeconds(ge.end)}})}),ve.on("videoTimingInfo",function(ge){Z.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ma.videoTsToSeconds(ge.start),end:Ma.videoTsToSeconds(ge.end)}})}),ve.on("log",function(ge){Z.postMessage({action:"log",log:ge})})},xS=function(){function tt(ve,ge){this.options=ge||{},this.self=ve,this.init()}var Z=tt.prototype;return Z.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Rj.Transmuxer(this.options),m7(this.self,this.transmuxer)},Z.pushMp4Captions=function(ge){this.captionParser||(this.captionParser=new e7,this.captionParser.init());var ke=new Uint8Array(ge.data,ge.byteOffset,ge.byteLength),Re=this.captionParser.parse(ke,ge.trackIds,ge.timescales);this.self.postMessage({action:"mp4Captions",captions:Re&&Re.captions||[],logs:Re&&Re.logs||[],data:ke.buffer},[ke.buffer])},Z.probeMp4StartTime=function(ge){var ke=ge.timescales,Re=ge.data,Be=DS.startTime(ke,Re);this.self.postMessage({action:"probeMp4StartTime",startTime:Be,data:Re},[Re.buffer])},Z.probeMp4Tracks=function(ge){var ke=ge.data,Re=DS.tracks(ke);this.self.postMessage({action:"probeMp4Tracks",tracks:Re,data:ke},[ke.buffer])},Z.probeTs=function(ge){var ke=ge.data,Re=ge.baseStartTime,Be=typeof Re=="number"&&!isNaN(Re)?Re*Ma.ONE_SECOND_IN_TS:void 0,mt=h7.inspect(ke,Be),kt=null;mt&&(kt={hasVideo:mt.video&&mt.video.length===2||!1,hasAudio:mt.audio&&mt.audio.length===2||!1},kt.hasVideo&&(kt.videoStart=mt.video[0].ptsTime),kt.hasAudio&&(kt.audioStart=mt.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:kt,data:ke},[ke.buffer])},Z.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},Z.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},Z.push=function(ge){var ke=new Uint8Array(ge.data,ge.byteOffset,ge.byteLength);this.transmuxer.push(ke)},Z.reset=function(){this.transmuxer.reset()},Z.setTimestampOffset=function(ge){var ke=ge.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ma.secondsToVideoTs(ke)))},Z.setAudioAppendStart=function(ge){this.transmuxer.setAudioAppendStart(Math.ceil(Ma.secondsToVideoTs(ge.appendStart)))},Z.setRemux=function(ge){this.transmuxer.setRemux(ge.remux)},Z.flush=function(ge){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},Z.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},Z.alignGopsWith=function(ge){this.transmuxer.alignGopsWith(ge.gopsToAlignWith.slice())},tt}();self.onmessage=function(tt){if(tt.data.action==="init"&&tt.data.options){this.messageHandlers=new xS(self,tt.data.options);return}this.messageHandlers||(this.messageHandlers=new xS(self)),tt.data&&tt.data.action&&tt.data.action!=="init"&&this.messageHandlers[tt.data.action]&&this.messageHandlers[tt.data.action](tt.data)}})),iH=yk(nH),rH=function(f,_,h){var u=f.data.segment,p=u.type,k=u.initSegment,R=u.captions,q=u.captionStreams,z=u.metadata,de=u.videoFrameDtsTime,Ee=u.videoFramePtsTime;_.buffer.push({captions:R,captionStreams:q,metadata:z});var Se=f.data.segment.boxes||{data:f.data.segment.data},ze={type:p,data:new Uint8Array(Se.data,Se.data.byteOffset,Se.data.byteLength),initSegment:new Uint8Array(k.data,k.byteOffset,k.byteLength)};typeof de<"u"&&(ze.videoFrameDtsTime=de),typeof Ee<"u"&&(ze.videoFramePtsTime=Ee),h(ze)},aH=function(f){var _=f.transmuxedData,h=f.callback;_.buffer=[],h(_)},sH=function(f,_){_.gopInfo=f.data.gopInfo},kk=function(f){var _=f.transmuxer,h=f.bytes,u=f.audioAppendStart,p=f.gopsToAlignWith,k=f.remux,R=f.onData,q=f.onTrackInfo,z=f.onAudioTimingInfo,de=f.onVideoTimingInfo,Ee=f.onVideoSegmentTimingInfo,Se=f.onAudioSegmentTimingInfo,ze=f.onId3,rt=f.onCaptions,_t=f.onDone,lt=f.onEndedTimeline,Bt=f.onTransmuxerLog,en=f.isEndOfTimeline,En={buffer:[]},fn=en,gn=function(An){_.currentTransmux===f&&(An.data.action==="data"&&rH(An,En,R),An.data.action==="trackinfo"&&q(An.data.trackInfo),An.data.action==="gopInfo"&&sH(An,En),An.data.action==="audioTimingInfo"&&z(An.data.audioTimingInfo),An.data.action==="videoTimingInfo"&&de(An.data.videoTimingInfo),An.data.action==="videoSegmentTimingInfo"&&Ee(An.data.videoSegmentTimingInfo),An.data.action==="audioSegmentTimingInfo"&&Se(An.data.audioSegmentTimingInfo),An.data.action==="id3Frame"&&ze([An.data.id3Frame],An.data.id3Frame.dispatchType),An.data.action==="caption"&&rt(An.data.caption),An.data.action==="endedtimeline"&&(fn=!1,lt()),An.data.action==="log"&&Bt(An.data.log),An.data.type==="transmuxed"&&(fn||(_.onmessage=null,aH({transmuxedData:En,callback:_t}),Sk(_))))};if(_.onmessage=gn,u&&_.postMessage({action:"setAudioAppendStart",appendStart:u}),Array.isArray(p)&&_.postMessage({action:"alignGopsWith",gopsToAlignWith:p}),typeof k<"u"&&_.postMessage({action:"setRemux",remux:k}),h.byteLength){var $n=h instanceof ArrayBuffer?h:h.buffer,Tn=h instanceof ArrayBuffer?0:h.byteOffset;_.postMessage({action:"push",data:$n,byteOffset:Tn,byteLength:h.byteLength},[$n])}en&&_.postMessage({action:"endTimeline"}),_.postMessage({action:"flush"})},Sk=function(f){f.currentTransmux=null,f.transmuxQueue.length&&(f.currentTransmux=f.transmuxQueue.shift(),typeof f.currentTransmux=="function"?f.currentTransmux():kk(f.currentTransmux))},Ck=function(f,_){f.postMessage({action:_}),Sk(f)},Pk=function(f,_){if(!_.currentTransmux){_.currentTransmux=f,Ck(_,f);return}_.transmuxQueue.push(Ck.bind(null,_,f))},oH=function(f){Pk("reset",f)},lH=function(f){Pk("endTimeline",f)},Ek=function(f){if(!f.transmuxer.currentTransmux){f.transmuxer.currentTransmux=f,kk(f);return}f.transmuxer.transmuxQueue.push(f)},uH=function(f){var _=new iH;_.currentTransmux=null,_.transmuxQueue=[];var h=_.terminate;return _.terminate=function(){return _.currentTransmux=null,_.transmuxQueue.length=0,h.call(_)},_.postMessage({action:"init",options:f}),_},I1={reset:oH,endTimeline:lH,transmux:Ek,createTransmuxer:uH},_g=function(f){var _=f.transmuxer,h=f.endAction||f.action,u=f.callback,p=F({},f,{endAction:null,transmuxer:null,callback:null}),k=function z(de){de.data.action===h&&(_.removeEventListener("message",z),de.data.data&&(de.data.data=new Uint8Array(de.data.data,f.byteOffset||0,f.byteLength||de.data.data.byteLength),f.data&&(f.data=de.data.data)),u(de.data))};if(_.addEventListener("message",k),f.data){var R=f.data instanceof ArrayBuffer;p.byteOffset=R?0:f.data.byteOffset,p.byteLength=f.data.byteLength;var q=[R?f.data:f.data.buffer];_.postMessage(p,q)}else _.postMessage(p)},pd={FAILURE:2,TIMEOUT:-101,ABORTED:-102},A1=function(f){f.forEach(function(_){_.abort()})},dH=function(f){return{bandwidth:f.bandwidth,bytesReceived:f.bytesReceived||0,roundTripTime:f.roundTripTime||0}},fH=function(f){var _=f.target,h=Date.now()-_.requestTime,u={bandwidth:1/0,bytesReceived:0,roundTripTime:h||0};return u.bytesReceived=f.loaded,u.bandwidth=Math.floor(u.bytesReceived/u.roundTripTime*8*1e3),u},D1=function(f,_){return _.timedout?{status:_.status,message:"HLS request timed-out at URL: "+_.uri,code:pd.TIMEOUT,xhr:_}:_.aborted?{status:_.status,message:"HLS request aborted at URL: "+_.uri,code:pd.ABORTED,xhr:_}:f?{status:_.status,message:"HLS request errored at URL: "+_.uri,code:pd.FAILURE,xhr:_}:_.responseType==="arraybuffer"&&_.response.byteLength===0?{status:_.status,message:"Empty HLS response at URL: "+_.uri,code:pd.FAILURE,xhr:_}:null},Ik=function(f,_,h){return function(u,p){var k=p.response,R=D1(u,p);if(R)return h(R,f);if(k.byteLength!==16)return h({status:p.status,message:"Invalid HLS key at URL: "+p.uri,code:pd.FAILURE,xhr:p},f);for(var q=new DataView(k),z=new Uint32Array([q.getUint32(0),q.getUint32(4),q.getUint32(8),q.getUint32(12)]),de=0;de<_.length;de++)_[de].bytes=z;return h(null,f)}},Ak=function(f,_){var h=d1(f.map.bytes);if(h!=="mp4"){var u=f.map.resolvedUri||f.map.uri;return _({internal:!0,message:"Found unsupported "+(h||"unknown")+" container for initialization segment at URL: "+u,code:pd.FAILURE})}_g({action:"probeMp4Tracks",data:f.map.bytes,transmuxer:f.transmuxer,callback:function(k){var R=k.tracks,q=k.data;return f.map.bytes=q,R.forEach(function(z){f.map.tracks=f.map.tracks||{},!f.map.tracks[z.type]&&(f.map.tracks[z.type]=z,typeof z.id=="number"&&z.timescale&&(f.map.timescales=f.map.timescales||{},f.map.timescales[z.id]=z.timescale))}),_(null)}})},cH=function(f){var _=f.segment,h=f.finishProcessingFn;return function(u,p){var k=D1(u,p);if(k)return h(k,_);var R=new Uint8Array(p.response);if(_.map.key)return _.map.encryptedBytes=R,h(null,_);_.map.bytes=R,Ak(_,function(q){if(q)return q.xhr=p,q.status=p.status,h(q,_);h(null,_)})}},_H=function(f){var _=f.segment,h=f.finishProcessingFn,u=f.responseType;return function(p,k){var R=D1(p,k);if(R)return h(R,_);var q=u==="arraybuffer"||!k.responseText?k.response:eH(k.responseText.substring(_.lastReachedChar||0));return _.stats=dH(k),_.key?_.encryptedBytes=new Uint8Array(q):_.bytes=new Uint8Array(q),h(null,_)}},pH=function(f){var _=f.segment,h=f.bytes,u=f.trackInfoFn,p=f.timingInfoFn,k=f.videoSegmentTimingInfoFn,R=f.audioSegmentTimingInfoFn,q=f.id3Fn,z=f.captionsFn,de=f.isEndOfTimeline,Ee=f.endedTimelineFn,Se=f.dataFn,ze=f.doneFn,rt=f.onTransmuxerLog,_t=_.map&&_.map.tracks||{},lt=!!(_t.audio&&_t.video),Bt=p.bind(null,_,"audio","start"),en=p.bind(null,_,"audio","end"),En=p.bind(null,_,"video","start"),fn=p.bind(null,_,"video","end"),gn=function(){return Ek({bytes:h,transmuxer:_.transmuxer,audioAppendStart:_.audioAppendStart,gopsToAlignWith:_.gopsToAlignWith,remux:lt,onData:function(bn){bn.type=bn.type==="combined"?"video":bn.type,Se(_,bn)},onTrackInfo:function(bn){u&&(lt&&(bn.isMuxed=!0),u(_,bn))},onAudioTimingInfo:function(bn){Bt&&typeof bn.start<"u"&&(Bt(bn.start),Bt=null),en&&typeof bn.end<"u"&&en(bn.end)},onVideoTimingInfo:function(bn){En&&typeof bn.start<"u"&&(En(bn.start),En=null),fn&&typeof bn.end<"u"&&fn(bn.end)},onVideoSegmentTimingInfo:function(bn){k(bn)},onAudioSegmentTimingInfo:function(bn){R(bn)},onId3:function(bn,An){q(_,bn,An)},onCaptions:function(bn){z(_,[bn])},isEndOfTimeline:de,onEndedTimeline:function(){Ee()},onTransmuxerLog:rt,onDone:function(bn){ze&&(bn.type=bn.type==="combined"?"video":bn.type,ze(null,_,bn))}})};_g({action:"probeTs",transmuxer:_.transmuxer,data:h,baseStartTime:_.baseStartTime,callback:function(Tn){_.bytes=h=Tn.data;var bn=Tn.result;bn&&(u(_,{hasAudio:bn.hasAudio,hasVideo:bn.hasVideo,isMuxed:lt}),u=null,bn.hasAudio&&!lt&&Bt(bn.audioStart),bn.hasVideo&&En(bn.videoStart),Bt=null,En=null),gn()}})},Dk=function(f){var _=f.segment,h=f.bytes,u=f.trackInfoFn,p=f.timingInfoFn,k=f.videoSegmentTimingInfoFn,R=f.audioSegmentTimingInfoFn,q=f.id3Fn,z=f.captionsFn,de=f.isEndOfTimeline,Ee=f.endedTimelineFn,Se=f.dataFn,ze=f.doneFn,rt=f.onTransmuxerLog,_t=new Uint8Array(h);if(i6(_t)){_.isFmp4=!0;var lt=_.map.tracks,Bt={isFmp4:!0,hasVideo:!!lt.video,hasAudio:!!lt.audio};lt.audio&&lt.audio.codec&&lt.audio.codec!=="enca"&&(Bt.audioCodec=lt.audio.codec),lt.video&&lt.video.codec&&lt.video.codec!=="encv"&&(Bt.videoCodec=lt.video.codec),lt.video&&lt.audio&&(Bt.isMuxed=!0),u(_,Bt);var en=function(fn){Se(_,{data:_t,type:Bt.hasAudio&&!Bt.isMuxed?"audio":"video"}),fn&&fn.length&&z(_,fn),ze(null,_,{})};_g({action:"probeMp4StartTime",timescales:_.map.timescales,data:_t,transmuxer:_.transmuxer,callback:function(fn){var gn=fn.data,$n=fn.startTime;if(h=gn.buffer,_.bytes=_t=gn,Bt.hasAudio&&!Bt.isMuxed&&p(_,"audio","start",$n),Bt.hasVideo&&p(_,"video","start",$n),!lt.video||!gn.byteLength||!_.transmuxer){en();return}_g({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:_.transmuxer,data:_t,timescales:_.map.timescales,trackIds:[lt.video.id],callback:function(bn){h=bn.data.buffer,_.bytes=_t=bn.data,bn.logs.forEach(function(An){rt(Wt.mergeOptions(An,{stream:"mp4CaptionParser"}))}),en(bn.captions)}})}});return}if(!_.transmuxer){ze(null,_,{});return}if(typeof _.container>"u"&&(_.container=d1(_t)),_.container!=="ts"&&_.container!=="aac"){u(_,{hasAudio:!1,hasVideo:!1}),ze(null,_,{});return}pH({segment:_,bytes:h,trackInfoFn:u,timingInfoFn:p,videoSegmentTimingInfoFn:k,audioSegmentTimingInfoFn:R,id3Fn:q,captionsFn:z,isEndOfTimeline:de,endedTimelineFn:Ee,dataFn:Se,doneFn:ze,onTransmuxerLog:rt})},Ok=function(f,_){var h=f.id,u=f.key,p=f.encryptedBytes,k=f.decryptionWorker,R=function z(de){if(de.data.source===h){k.removeEventListener("message",z);var Ee=de.data.decrypted;_(new Uint8Array(Ee.bytes,Ee.byteOffset,Ee.byteLength))}};k.addEventListener("message",R);var q;u.bytes.slice?q=u.bytes.slice():q=new Uint32Array(Array.prototype.slice.call(u.bytes)),k.postMessage(ck({source:h,encrypted:p,key:q,iv:u.iv}),[p.buffer,q.buffer])},hH=function(f){var _=f.decryptionWorker,h=f.segment,u=f.trackInfoFn,p=f.timingInfoFn,k=f.videoSegmentTimingInfoFn,R=f.audioSegmentTimingInfoFn,q=f.id3Fn,z=f.captionsFn,de=f.isEndOfTimeline,Ee=f.endedTimelineFn,Se=f.dataFn,ze=f.doneFn,rt=f.onTransmuxerLog;Ok({id:h.requestId,key:h.key,encryptedBytes:h.encryptedBytes,decryptionWorker:_},function(_t){h.bytes=_t,Dk({segment:h,bytes:h.bytes,trackInfoFn:u,timingInfoFn:p,videoSegmentTimingInfoFn:k,audioSegmentTimingInfoFn:R,id3Fn:q,captionsFn:z,isEndOfTimeline:de,endedTimelineFn:Ee,dataFn:Se,doneFn:ze,onTransmuxerLog:rt})})},mH=function(f){var _=f.activeXhrs,h=f.decryptionWorker,u=f.trackInfoFn,p=f.timingInfoFn,k=f.videoSegmentTimingInfoFn,R=f.audioSegmentTimingInfoFn,q=f.id3Fn,z=f.captionsFn,de=f.isEndOfTimeline,Ee=f.endedTimelineFn,Se=f.dataFn,ze=f.doneFn,rt=f.onTransmuxerLog,_t=0,lt=!1;return function(Bt,en){if(!lt){if(Bt)return lt=!0,A1(_),ze(Bt,en);if(_t+=1,_t===_.length){var En=function(){if(en.encryptedBytes)return hH({decryptionWorker:h,segment:en,trackInfoFn:u,timingInfoFn:p,videoSegmentTimingInfoFn:k,audioSegmentTimingInfoFn:R,id3Fn:q,captionsFn:z,isEndOfTimeline:de,endedTimelineFn:Ee,dataFn:Se,doneFn:ze,onTransmuxerLog:rt});Dk({segment:en,bytes:en.bytes,trackInfoFn:u,timingInfoFn:p,videoSegmentTimingInfoFn:k,audioSegmentTimingInfoFn:R,id3Fn:q,captionsFn:z,isEndOfTimeline:de,endedTimelineFn:Ee,dataFn:Se,doneFn:ze,onTransmuxerLog:rt})};if(en.endOfAllRequests=Date.now(),en.map&&en.map.encryptedBytes&&!en.map.bytes)return Ok({decryptionWorker:h,id:en.requestId+"-init",encryptedBytes:en.map.encryptedBytes,key:en.map.key},function(fn){en.map.bytes=fn,Ak(en,function(gn){if(gn)return A1(_),ze(gn,en);En()})});En()}}}},gH=function(f){var _=f.loadendState,h=f.abortFn;return function(u){var p=u.target;p.aborted&&h&&!_.calledAbortFn&&(h(),_.calledAbortFn=!0)}},vH=function(f){var _=f.segment,h=f.progressFn;return function(u){var p=u.target;if(!p.aborted)return _.stats=Wt.mergeOptions(_.stats,fH(u)),!_.stats.firstBytesReceivedAt&&_.stats.bytesReceived&&(_.stats.firstBytesReceivedAt=Date.now()),h(u,_)}},bH=function(f){var _=f.xhr,h=f.xhrOptions,u=f.decryptionWorker,p=f.segment,k=f.abortFn,R=f.progressFn,q=f.trackInfoFn,z=f.timingInfoFn,de=f.videoSegmentTimingInfoFn,Ee=f.audioSegmentTimingInfoFn,Se=f.id3Fn,ze=f.captionsFn,rt=f.isEndOfTimeline,_t=f.endedTimelineFn,lt=f.dataFn,Bt=f.doneFn,en=f.onTransmuxerLog,En=[],fn=mH({activeXhrs:En,decryptionWorker:u,trackInfoFn:q,timingInfoFn:z,videoSegmentTimingInfoFn:de,audioSegmentTimingInfoFn:Ee,id3Fn:Se,captionsFn:ze,isEndOfTimeline:rt,endedTimelineFn:_t,dataFn:lt,doneFn:Bt,onTransmuxerLog:en});if(p.key&&!p.key.bytes){var gn=[p.key];p.map&&!p.map.bytes&&p.map.key&&p.map.key.resolvedUri===p.key.resolvedUri&&gn.push(p.map.key);var $n=Wt.mergeOptions(h,{uri:p.key.resolvedUri,responseType:"arraybuffer"}),Tn=Ik(p,gn,fn),bn=_($n,Tn);En.push(bn)}if(p.map&&!p.map.bytes){var An=p.map.key&&(!p.key||p.key.resolvedUri!==p.map.key.resolvedUri);if(An){var wn=Wt.mergeOptions(h,{uri:p.map.key.resolvedUri,responseType:"arraybuffer"}),oi=Ik(p,[p.map.key],fn),Jn=_(wn,oi);En.push(Jn)}var Zi=Wt.mergeOptions(h,{uri:p.map.resolvedUri,responseType:"arraybuffer",headers:C1(p.map)}),Fa=cH({segment:p,finishProcessingFn:fn}),Va=_(Zi,Fa);En.push(Va)}var Pr=Wt.mergeOptions(h,{uri:p.part&&p.part.resolvedUri||p.resolvedUri,responseType:"arraybuffer",headers:C1(p)}),ya=_H({segment:p,finishProcessingFn:fn,responseType:Pr.responseType}),Za=_(Pr,ya);Za.addEventListener("progress",vH({segment:p,progressFn:R,trackInfoFn:q,timingInfoFn:z,videoSegmentTimingInfoFn:de,audioSegmentTimingInfoFn:Ee,id3Fn:Se,captionsFn:ze,isEndOfTimeline:rt,endedTimelineFn:_t,dataFn:lt})),En.push(Za);var Do={};return En.forEach(function(Ba){Ba.addEventListener("loadend",gH({loadendState:Do,abortFn:k}))}),function(){return A1(En)}},yH=Mu("CodecUtils"),wH=function(f){var _=f.attributes||{};if(_.CODECS)return Pl(_.CODECS)},Mk=function(f,_){var h=_.attributes||{};return f&&f.mediaGroups&&f.mediaGroups.AUDIO&&h.AUDIO&&f.mediaGroups.AUDIO[h.AUDIO]},TH=function(f,_){if(!Mk(f,_))return!0;var h=_.attributes||{},u=f.mediaGroups.AUDIO[h.AUDIO];for(var p in u)if(!u[p].uri&&!u[p].playlists)return!0;return!1},pg=function(f){var _={};return f.forEach(function(h){var u=h.mediaType,p=h.type,k=h.details;_[u]=_[u]||[],_[u].push(Cc(""+p+k))}),Object.keys(_).forEach(function(h){if(_[h].length>1){yH("multiple "+h+" codecs found as attributes: "+_[h].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),_[h]=null;return}_[h]=_[h][0]}),_},xk=function(f){var _=0;return f.audio&&_++,f.video&&_++,_},hh=function(f,_){var h=_.attributes||{},u=pg(wH(_)||[]);if(Mk(f,_)&&!u.audio&&!TH(f,_)){var p=pg(il(f,h.AUDIO)||[]);p.audio&&(u.audio=p.audio)}return u},hg=Mu("PlaylistSelector"),Rk=function(f){if(!(!f||!f.playlist)){var _=f.playlist;return JSON.stringify({id:_.id,bandwidth:f.bandwidth,width:f.width,height:f.height,codecs:_.attributes&&_.attributes.CODECS||""})}},mg=function(f,_){if(!f)return"";var h=window.getComputedStyle(f);return h?h[_]:""},q_=function(f,_){var h=f.slice();f.sort(function(u,p){var k=_(u,p);return k===0?h.indexOf(u)-h.indexOf(p):k})},O1=function(f,_){var h,u;return f.attributes.BANDWIDTH&&(h=f.attributes.BANDWIDTH),h=h||window.Number.MAX_VALUE,_.attributes.BANDWIDTH&&(u=_.attributes.BANDWIDTH),u=u||window.Number.MAX_VALUE,h-u},kH=function(f,_){var h,u;return f.attributes.RESOLUTION&&f.attributes.RESOLUTION.width&&(h=f.attributes.RESOLUTION.width),h=h||window.Number.MAX_VALUE,_.attributes.RESOLUTION&&_.attributes.RESOLUTION.width&&(u=_.attributes.RESOLUTION.width),u=u||window.Number.MAX_VALUE,h===u&&f.attributes.BANDWIDTH&&_.attributes.BANDWIDTH?f.attributes.BANDWIDTH-_.attributes.BANDWIDTH:h-u},$k=function(f,_,h,u,p,k){if(f){var R={bandwidth:_,width:h,height:u,limitRenditionByPlayerDimensions:p},q=f.playlists;ol.isAudioOnly(f)&&(q=k.getAudioTrackPlaylists_(),R.audioOnly=!0);var z=q.map(function(wn){var oi,Jn=wn.attributes&&wn.attributes.RESOLUTION&&wn.attributes.RESOLUTION.width,Zi=wn.attributes&&wn.attributes.RESOLUTION&&wn.attributes.RESOLUTION.height;return oi=wn.attributes&&wn.attributes.BANDWIDTH,oi=oi||window.Number.MAX_VALUE,{bandwidth:oi,width:Jn,height:Zi,playlist:wn}});q_(z,function(wn,oi){return wn.bandwidth-oi.bandwidth}),z=z.filter(function(wn){return!ol.isIncompatible(wn.playlist)});var de=z.filter(function(wn){return ol.isEnabled(wn.playlist)});de.length||(de=z.filter(function(wn){return!ol.isDisabled(wn.playlist)}));var Ee=de.filter(function(wn){return wn.bandwidth*no.BANDWIDTH_VARIANCE<_}),Se=Ee[Ee.length-1],ze=Ee.filter(function(wn){return wn.bandwidth===Se.bandwidth})[0];if(p===!1){var rt=ze||de[0]||z[0];if(rt&&rt.playlist){var _t="sortedPlaylistReps";return ze&&(_t="bandwidthBestRep"),de[0]&&(_t="enabledPlaylistReps"),hg("choosing "+Rk(rt)+" using "+_t+" with options",R),rt.playlist}return hg("could not choose a playlist with options",R),null}var lt=Ee.filter(function(wn){return wn.width&&wn.height});q_(lt,function(wn,oi){return wn.width-oi.width});var Bt=lt.filter(function(wn){return wn.width===h&&wn.height===u});Se=Bt[Bt.length-1];var en=Bt.filter(function(wn){return wn.bandwidth===Se.bandwidth})[0],En,fn,gn;en||(En=lt.filter(function(wn){return wn.width>h||wn.height>u}),fn=En.filter(function(wn){return wn.width===En[0].width&&wn.height===En[0].height}),Se=fn[fn.length-1],gn=fn.filter(function(wn){return wn.bandwidth===Se.bandwidth})[0]);var $n;if(k.experimentalLeastPixelDiffSelector){var Tn=lt.map(function(wn){return wn.pixelDiff=Math.abs(wn.width-h)+Math.abs(wn.height-u),wn});q_(Tn,function(wn,oi){return wn.pixelDiff===oi.pixelDiff?oi.bandwidth-wn.bandwidth:wn.pixelDiff-oi.pixelDiff}),$n=Tn[0]}var bn=$n||gn||en||ze||de[0]||z[0];if(bn&&bn.playlist){var An="sortedPlaylistReps";return $n?An="leastPixelDiffRep":gn?An="resolutionPlusOneRep":en?An="resolutionBestRep":ze?An="bandwidthBestRep":de[0]&&(An="enabledPlaylistReps"),hg("choosing "+Rk(bn)+" using "+An+" with options",R),bn.playlist}return hg("could not choose a playlist with options",R),null}},Nk=function(){var f=this.useDevicePixelRatio&&window.devicePixelRatio||1;return $k(this.playlists.master,this.systemBandwidth,parseInt(mg(this.tech_.el(),"width"),10)*f,parseInt(mg(this.tech_.el(),"height"),10)*f,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},SH=function(f){var _=-1,h=-1;if(f<0||f>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var u=this.useDevicePixelRatio&&window.devicePixelRatio||1;return _<0&&(_=this.systemBandwidth,h=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==h&&(_=f*this.systemBandwidth+(1-f)*_,h=this.systemBandwidth),$k(this.playlists.master,_,parseInt(mg(this.tech_.el(),"width"),10)*u,parseInt(mg(this.tech_.el(),"height"),10)*u,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},CH=function(f){var _=f.master,h=f.currentTime,u=f.bandwidth,p=f.duration,k=f.segmentDuration,R=f.timeUntilRebuffer,q=f.currentTimeline,z=f.syncController,de=_.playlists.filter(function(_t){return!ol.isIncompatible(_t)}),Ee=de.filter(ol.isEnabled);Ee.length||(Ee=de.filter(function(_t){return!ol.isDisabled(_t)}));var Se=Ee.filter(ol.hasAttribute.bind(null,"BANDWIDTH")),ze=Se.map(function(_t){var lt=z.getSyncPoint(_t,p,q,h),Bt=lt?1:2,en=ol.estimateSegmentRequestTime(k,u,_t),En=en*Bt-R;return{playlist:_t,rebufferingImpact:En}}),rt=ze.filter(function(_t){return _t.rebufferingImpact<=0});return q_(rt,function(_t,lt){return O1(lt.playlist,_t.playlist)}),rt.length?rt[0]:(q_(ze,function(_t,lt){return _t.rebufferingImpact-lt.rebufferingImpact}),ze[0]||null)},PH=function(){var f=this,_=this.playlists.master.playlists.filter(ol.isEnabled);q_(_,function(u,p){return O1(u,p)});var h=_.filter(function(u){return!!hh(f.playlists.master,u).video});return h[0]||null},EH=function(f){var _=0,h;return f.bytes&&(h=new Uint8Array(f.bytes),f.segments.forEach(function(u){h.set(u,_),_+=u.byteLength})),h},IH=function(f,_,h){if(!f[h]){_.trigger({type:"usage",name:"vhs-608"}),_.trigger({type:"usage",name:"hls-608"});var u=h;/^cc708_/.test(h)&&(u="SERVICE"+h.split("_")[1]);var p=_.textTracks().getTrackById(u);if(p)f[h]=p;else{var k=_.options_.vhs&&_.options_.vhs.captionServices||{},R=h,q=h,z=!1,de=k[u];de&&(R=de.label,q=de.language,z=de.default),f[h]=_.addRemoteTextTrack({kind:"captions",id:u,default:z,label:R,language:q},!1).track}}},AH=function(f){var _=f.inbandTextTracks,h=f.captionArray,u=f.timestampOffset;if(h){var p=window.WebKitDataCue||window.VTTCue;h.forEach(function(k){var R=k.stream;_[R].addCue(new p(k.startTime+u,k.endTime+u,k.text))})}},DH=function(f){Object.defineProperties(f.frame,{id:{get:function(){return Wt.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),f.value.key}},value:{get:function(){return Wt.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),f.value.data}},privateData:{get:function(){return Wt.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),f.value.data}}})},OH=function(f){var _=f.inbandTextTracks,h=f.metadataArray,u=f.timestampOffset,p=f.videoDuration;if(h){var k=window.WebKitDataCue||window.VTTCue,R=_.metadataTrack_;if(R&&(h.forEach(function(ze){var rt=ze.cueTime+u;typeof rt!="number"||window.isNaN(rt)||rt<0||!(rt<1/0)||ze.frames.forEach(function(_t){var lt=new k(rt,rt,_t.value||_t.url||_t.data||"");lt.frame=_t,lt.value=_t,DH(lt),R.addCue(lt)})}),!(!R.cues||!R.cues.length))){for(var q=R.cues,z=[],de=0;de<q.length;de++)q[de]&&z.push(q[de]);var Ee=z.reduce(function(ze,rt){var _t=ze[rt.startTime]||[];return _t.push(rt),ze[rt.startTime]=_t,ze},{}),Se=Object.keys(Ee).sort(function(ze,rt){return Number(ze)-Number(rt)});Se.forEach(function(ze,rt){var _t=Ee[ze],lt=Number(Se[rt+1])||p;_t.forEach(function(Bt){Bt.endTime=lt})})}}},MH=function(f,_,h){f.metadataTrack_||(f.metadataTrack_=h.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,f.metadataTrack_.inBandMetadataTrackDispatchType=_)},mh=function(f,_,h){var u,p;if(h&&h.cues)for(u=h.cues.length;u--;)p=h.cues[u],p.startTime>=f&&p.endTime<=_&&h.removeCue(p)},xH=function(f){var _=f.cues;if(_)for(var h=0;h<_.length;h++){for(var u=[],p=0,k=0;k<_.length;k++)_[h].startTime===_[k].startTime&&_[h].endTime===_[k].endTime&&_[h].text===_[k].text&&(p++,p>1&&u.push(_[k]));u.length&&u.forEach(function(R){return f.removeCue(R)})}},RH=function(f,_,h){if(typeof _>"u"||_===null||!f.length)return[];var u=Math.ceil((_-h+3)*og),p;for(p=0;p<f.length&&!(f[p].pts>u);p++);return f.slice(p)},$H=function(f,_,h){if(!_.length)return f;if(h)return _.slice();var u=_[0].pts,p=0;for(p;p<f.length&&!(f[p].pts>=u);p++);return f.slice(0,p).concat(_)},NH=function(f,_,h,u){for(var p=Math.ceil((_-u)*og),k=Math.ceil((h-u)*og),R=f.slice(),q=f.length;q--&&!(f[q].pts<=k););if(q===-1)return R;for(var z=q+1;z--&&!(f[z].pts<=p););return z=Math.max(z,0),R.splice(z,q-z+1),R},FH=function(f,_){if(!f&&!_||!f&&_||f&&!_)return!1;if(f===_)return!0;var h=Object.keys(f).sort(),u=Object.keys(_).sort();if(h.length!==u.length)return!1;for(var p=0;p<h.length;p++){var k=h[p];if(k!==u[p]||f[k]!==_[k])return!1}return!0},Fk=22,LH=function(f,_,h){_=_||[];for(var u=[],p=0,k=0;k<_.length;k++){var R=_[k];if(f===R.timeline&&(u.push(k),p+=R.duration,p>h))return k}return u.length===0?0:u[u.length-1]},gh=1,HH=500,Lk=function(f){return typeof f=="number"&&isFinite(f)},gg=1/60,jH=function(f,_,h){return f!=="main"||!_||!h?null:!h.hasAudio&&!h.hasVideo?"Neither audio nor video found in segment.":_.hasVideo&&!h.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!_.hasVideo&&h.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null},BH=function(f,_,h){var u=_-no.BACK_BUFFER_LENGTH;f.length&&(u=Math.max(u,f.start(0)));var p=_-h;return Math.min(p,u)},W_=function(f){var _=f.startOfSegment,h=f.duration,u=f.segment,p=f.part,k=f.playlist,R=k.mediaSequence,q=k.id,z=k.segments,de=z===void 0?[]:z,Ee=f.mediaIndex,Se=f.partIndex,ze=f.timeline,rt=de.length-1,_t="mediaIndex/partIndex increment";f.getMediaInfoForTime?_t="getMediaInfoForTime ("+f.getMediaInfoForTime+")":f.isSyncRequest&&(_t="getSyncSegmentCandidate (isSyncRequest)"),f.independent&&(_t+=" with independent "+f.independent);var lt=typeof Se=="number",Bt=f.segment.uri?"segment":"pre-segment",en=lt?QT({preloadSegment:u})-1:0;return Bt+" ["+(R+Ee)+"/"+(R+rt)+"]"+(lt?" part ["+Se+"/"+en+"]":"")+(" segment start/end ["+u.start+" => "+u.end+"]")+(lt?" part start/end ["+p.start+" => "+p.end+"]":"")+(" startOfSegment ["+_+"]")+(" duration ["+h+"]")+(" timeline ["+ze+"]")+(" selected by ["+_t+"]")+(" playlist ["+q+"]")},Hk=function(f){return f+"TimingInfo"},UH=function(f){var _=f.segmentTimeline,h=f.currentTimeline,u=f.startOfSegment,p=f.buffered,k=f.overrideCheck;return!k&&_===h?null:_<h?u:p.length?p.end(p.length-1):u},jk=function(f){var _=f.timelineChangeController,h=f.currentTimeline,u=f.segmentTimeline,p=f.loaderType,k=f.audioDisabled;if(h===u)return!1;if(p==="audio"){var R=_.lastTimelineChange({type:"main"});return!R||R.to!==u}if(p==="main"&&k){var q=_.pendingTimelineChange({type:"audio"});return!(q&&q.to===u)}return!1},qH=function(f){var _=0;return["video","audio"].forEach(function(h){var u=f[h+"TimingInfo"];if(u){var p=u.start,k=u.end,R;typeof p=="bigint"||typeof k=="bigint"?R=window.BigInt(k)-window.BigInt(p):typeof p=="number"&&typeof k=="number"&&(R=k-p),typeof R<"u"&&R>_&&(_=R)}}),typeof _=="bigint"&&_<Number.MAX_SAFE_INTEGER&&(_=Number(_)),_},Bk=function(f){var _=f.segmentDuration,h=f.maxDuration;return _?Math.round(_)>h+Qf:!1},WH=function(f,_){if(_!=="hls")return null;var h=qH({audioTimingInfo:f.audioTimingInfo,videoTimingInfo:f.videoTimingInfo});if(!h)return null;var u=f.playlist.targetDuration,p=Bk({segmentDuration:h,maxDuration:u*2}),k=Bk({segmentDuration:h,maxDuration:u}),R="Segment with index "+f.mediaIndex+" "+("from playlist "+f.playlist.id+" ")+("has a duration of "+h+" ")+("when the reported duration is "+f.duration+" ")+("and the target duration is "+u+". ")+"For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return p||k?{severity:p?"warn":"info",message:R}:null},M1=function(S){_n(f,S);function f(h,u){var p;if(p=S.call(this)||this,!h)throw new TypeError("Initialization settings are required");if(typeof h.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!h.mediaSource)throw new TypeError("No MediaSource specified");return p.bandwidth=h.bandwidth,p.throughput={rate:0,count:0},p.roundTrip=NaN,p.resetStats_(),p.mediaIndex=null,p.partIndex=null,p.hasPlayed_=h.hasPlayed,p.currentTime_=h.currentTime,p.seekable_=h.seekable,p.seeking_=h.seeking,p.duration_=h.duration,p.mediaSource_=h.mediaSource,p.vhs_=h.vhs,p.loaderType_=h.loaderType,p.currentMediaInfo_=void 0,p.startingMediaInfo_=void 0,p.segmentMetadataTrack_=h.segmentMetadataTrack,p.goalBufferLength_=h.goalBufferLength,p.sourceType_=h.sourceType,p.sourceUpdater_=h.sourceUpdater,p.inbandTextTracks_=h.inbandTextTracks,p.state_="INIT",p.timelineChangeController_=h.timelineChangeController,p.shouldSaveSegmentTimingInfo_=!0,p.parse708captions_=h.parse708captions,p.useDtsForTimestampOffset_=h.useDtsForTimestampOffset,p.captionServices_=h.captionServices,p.experimentalExactManifestTimings=h.experimentalExactManifestTimings,p.checkBufferTimeout_=null,p.error_=void 0,p.currentTimeline_=-1,p.pendingSegment_=null,p.xhrOptions_=null,p.pendingSegments_=[],p.audioDisabled_=!1,p.isPendingTimestampOffset_=!1,p.gopBuffer_=[],p.timeMapping_=0,p.safeAppend_=Wt.browser.IE_VERSION>=11,p.appendInitSegment_={audio:!0,video:!0},p.playlistOfLastInitSegment_={audio:null,video:null},p.callQueue_=[],p.loadQueue_=[],p.metadataQueue_={id3:[],caption:[]},p.waitingOnRemove_=!1,p.quotaExceededErrorRetryTimeout_=null,p.activeInitSegmentId_=null,p.initSegments_={},p.cacheEncryptionKeys_=h.cacheEncryptionKeys,p.keyCache_={},p.decrypter_=h.decrypter,p.syncController_=h.syncController,p.syncPoint_={segmentIndex:0,time:0},p.transmuxer_=p.createTransmuxer_(),p.triggerSyncInfoUpdate_=function(){return p.trigger("syncinfoupdate")},p.syncController_.on("syncinfoupdate",p.triggerSyncInfoUpdate_),p.mediaSource_.addEventListener("sourceopen",function(){p.isEndOfStream_()||(p.ended_=!1)}),p.fetchAtBuffer_=!1,p.logger_=Mu("SegmentLoader["+p.loaderType_+"]"),Object.defineProperty(Bn(p),"state",{get:function(){return this.state_},set:function(R){R!==this.state_&&(this.logger_(this.state_+" -> "+R),this.state_=R,this.trigger("statechange"))}}),p.sourceUpdater_.on("ready",function(){p.hasEnoughInfoToAppend_()&&p.processCallQueue_()}),p.loaderType_==="main"&&p.timelineChangeController_.on("pendingtimelinechange",function(){p.hasEnoughInfoToAppend_()&&p.processCallQueue_()}),p.loaderType_==="audio"&&p.timelineChangeController_.on("timelinechange",function(){p.hasEnoughInfoToLoad_()&&p.processLoadQueue_(),p.hasEnoughInfoToAppend_()&&p.processCallQueue_()}),p}var _=f.prototype;return _.createTransmuxer_=function(){return I1.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},_.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},_.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},_.setAudio=function(u){this.audioDisabled_=!u,u?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},_.abort=function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()},_.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,window.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},_.checkForAbort_=function(u){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==u},_.error=function(u){return typeof u<"u"&&(this.logger_("error occurred:",u),this.error_=u),this.pendingSegment_=null,this.error_},_.endOfStream=function(){this.ended_=!0,this.transmuxer_&&I1.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},_.buffered_=function(){var u=this.getMediaInfo_();if(!this.sourceUpdater_||!u)return Wt.createTimeRanges();if(this.loaderType_==="main"){var p=u.hasAudio,k=u.hasVideo,R=u.isMuxed;if(k&&p&&!this.audioDisabled_&&!R)return this.sourceUpdater_.buffered();if(k)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},_.initSegmentForMap=function(u,p){if(p===void 0&&(p=!1),!u)return null;var k=cg(u),R=this.initSegments_[k];return p&&!R&&u.bytes&&(this.initSegments_[k]=R={resolvedUri:u.resolvedUri,byterange:u.byterange,bytes:u.bytes,tracks:u.tracks,timescales:u.timescales}),R||u},_.segmentKey=function(u,p){if(p===void 0&&(p=!1),!u)return null;var k=_k(u),R=this.keyCache_[k];this.cacheEncryptionKeys_&&p&&!R&&u.bytes&&(this.keyCache_[k]=R={resolvedUri:u.resolvedUri,bytes:u.bytes});var q={resolvedUri:(R||u).resolvedUri};return R&&(q.bytes=R.bytes),q},_.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},_.load=function(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}},_.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},_.playlist=function(u,p){if(p===void 0&&(p={}),!!u){var k=this.playlist_,R=this.pendingSegment_;this.playlist_=u,this.xhrOptions_=p,this.state==="INIT"&&(u.syncInfo={mediaSequence:u.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(u));var q=null;if(k&&(k.id?q=k.id:k.uri&&(q=k.uri)),this.logger_("playlist update ["+q+" => "+(u.id||u.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!k||k.uri!==u.uri){this.mediaIndex!==null&&(u.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}var z=u.mediaSequence-k.mediaSequence;if(this.logger_("live window shift ["+z+"]"),this.mediaIndex!==null)if(this.mediaIndex-=z,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var de=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!de.parts||!de.parts.length||!de.parts[this.partIndex])){var Ee=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=Ee}}R&&(R.mediaIndex-=z,R.mediaIndex<0?(R.mediaIndex=null,R.partIndex=null):(R.mediaIndex>=0&&(R.segment=u.segments[R.mediaIndex]),R.partIndex>=0&&R.segment.parts&&(R.part=R.segment.parts[R.partIndex]))),this.syncController_.saveExpiredSegmentInfo(k,u)}},_.pause=function(){this.checkBufferTimeout_&&(window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},_.paused=function(){return this.checkBufferTimeout_===null},_.resetEverything=function(u){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,u),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},_.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},_.resyncLoader=function(){this.transmuxer_&&I1.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},_.remove=function(u,p,k,R){if(k===void 0&&(k=function(){}),R===void 0&&(R=!1),p===1/0&&(p=this.duration_()),p<=u){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}var q=1,z=function(){q--,q===0&&k()};(R||!this.audioDisabled_)&&(q++,this.sourceUpdater_.removeAudio(u,p,z)),(R||this.loaderType_==="main")&&(this.gopBuffer_=NH(this.gopBuffer_,u,p,this.timeMapping_),q++,this.sourceUpdater_.removeVideo(u,p,z));for(var de in this.inbandTextTracks_)mh(u,p,this.inbandTextTracks_[de]);mh(u,p,this.segmentMetadataTrack_),z()},_.monitorBuffer_=function(){this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),1)},_.monitorBufferTick_=function(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),HH)},_.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var u=this.chooseNextRequest_();u&&(typeof u.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:u.timeline})),this.loadSegment_(u))}},_.isEndOfStream_=function(u,p,k){if(u===void 0&&(u=this.mediaIndex),p===void 0&&(p=this.playlist_),k===void 0&&(k=this.partIndex),!p||!this.mediaSource_)return!1;var R=typeof u=="number"&&p.segments[u],q=u+1===p.segments.length,z=!R||!R.parts||k+1===R.parts.length;return p.endList&&this.mediaSource_.readyState==="open"&&q&&z},_.chooseNextRequest_=function(){var u=this.buffered_(),p=GT(u)||0,k=h1(u,this.currentTime_()),R=!this.hasPlayed_()&&k>=1,q=k>=this.goalBufferLength_(),z=this.playlist_.segments;if(!z.length||R||q)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var de={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(de.isSyncRequest)de.mediaIndex=LH(this.currentTimeline_,z,p);else if(this.mediaIndex!==null){var Ee=z[this.mediaIndex],Se=typeof this.partIndex=="number"?this.partIndex:-1;de.startOfSegment=Ee.end?Ee.end:p,Ee.parts&&Ee.parts[Se+1]?(de.mediaIndex=this.mediaIndex,de.partIndex=Se+1):de.mediaIndex=this.mediaIndex+1}else{var ze=ol.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?p:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),rt=ze.segmentIndex,_t=ze.startTime,lt=ze.partIndex;de.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+p:"currentTime "+this.currentTime_(),de.mediaIndex=rt,de.startOfSegment=_t,de.partIndex=lt}var Bt=z[de.mediaIndex],en=Bt&&typeof de.partIndex=="number"&&Bt.parts&&Bt.parts[de.partIndex];if(!Bt||typeof de.partIndex=="number"&&!en)return null;if(typeof de.partIndex!="number"&&Bt.parts&&(de.partIndex=0,en=Bt.parts[0]),!k&&en&&!en.independent)if(de.partIndex===0){var En=z[de.mediaIndex-1],fn=En.parts&&En.parts.length&&En.parts[En.parts.length-1];fn&&fn.independent&&(de.mediaIndex-=1,de.partIndex=En.parts.length-1,de.independent="previous segment")}else Bt.parts[de.partIndex-1].independent&&(de.partIndex-=1,de.independent="previous part");var gn=this.mediaSource_&&this.mediaSource_.readyState==="ended";return de.mediaIndex>=z.length-1&&gn&&!this.seeking_()?null:this.generateSegmentInfo_(de)},_.generateSegmentInfo_=function(u){var p=u.independent,k=u.playlist,R=u.mediaIndex,q=u.startOfSegment,z=u.isSyncRequest,de=u.partIndex,Ee=u.forceTimestampOffset,Se=u.getMediaInfoForTime,ze=k.segments[R],rt=typeof de=="number"&&ze.parts[de],_t={requestId:"segment-loader-"+Math.random(),uri:rt&&rt.resolvedUri||ze.resolvedUri,mediaIndex:R,partIndex:rt?de:null,isSyncRequest:z,startOfSegment:q,playlist:k,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:ze.timeline,duration:rt&&rt.duration||ze.duration,segment:ze,part:rt,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:Se,independent:p},lt=typeof Ee<"u"?Ee:this.isPendingTimestampOffset_;_t.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:ze.timeline,currentTimeline:this.currentTimeline_,startOfSegment:q,buffered:this.buffered_(),overrideCheck:lt});var Bt=GT(this.sourceUpdater_.audioBuffered());return typeof Bt=="number"&&(_t.audioAppendStart=Bt-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(_t.gopsToAlignWith=RH(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),_t},_.timestampOffsetForSegment_=function(u){return UH(u)},_.earlyAbortWhenNeeded_=function(u){if(!(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)&&!(Date.now()-(u.firstBytesReceivedAt||Date.now())<1e3)){var p=this.currentTime_(),k=u.bandwidth,R=this.pendingSegment_.duration,q=ol.estimateSegmentRequestTime(R,k,this.playlist_,u.bytesReceived),z=f6(this.buffered_(),p,this.vhs_.tech_.playbackRate())-1;if(!(q<=z)){var de=CH({master:this.vhs_.playlists.master,currentTime:p,bandwidth:k,duration:this.duration_(),segmentDuration:R,timeUntilRebuffer:z,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(de){var Ee=q-z,Se=Ee-de.rebufferingImpact,ze=.5;z<=Qf&&(ze=1),!(!de.playlist||de.playlist.uri===this.playlist_.uri||Se<ze)&&(this.bandwidth=de.playlist.attributes.BANDWIDTH*no.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},_.handleAbort_=function(u){this.logger_("Aborting "+W_(u)),this.mediaRequestsAborted+=1},_.handleProgress_=function(u,p){this.earlyAbortWhenNeeded_(p.stats),!this.checkForAbort_(p.requestId)&&this.trigger("progress")},_.handleTrackInfo_=function(u,p){this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId)&&(this.checkForIllegalMediaSwitch(p)||(p=p||{},FH(this.currentMediaInfo_,p)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=p,this.currentMediaInfo_=p,this.logger_("trackinfo update",p),this.trigger("trackinfo")),!this.checkForAbort_(u.requestId)&&(this.pendingSegment_.trackInfo=p,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))},_.handleTimingInfo_=function(u,p,k,R){if(this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId)){var q=this.pendingSegment_,z=Hk(p);q[z]=q[z]||{},q[z][k]=R,this.logger_("timinginfo: "+p+" - "+k+" - "+R),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},_.handleCaptions_=function(u,p){var k=this;if(this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId)){if(p.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}var R=this.pendingSegment_;if(!R.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,u,p));return}var q=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),z={};p.forEach(function(de){z[de.stream]=z[de.stream]||{startTime:1/0,captions:[],endTime:0};var Ee=z[de.stream];Ee.startTime=Math.min(Ee.startTime,de.startTime+q),Ee.endTime=Math.max(Ee.endTime,de.endTime+q),Ee.captions.push(de)}),Object.keys(z).forEach(function(de){var Ee=z[de],Se=Ee.startTime,ze=Ee.endTime,rt=Ee.captions,_t=k.inbandTextTracks_;k.logger_("adding cues from "+Se+" -> "+ze+" for "+de),IH(_t,k.vhs_.tech_,de),mh(Se,ze,_t[de]),AH({captionArray:rt,inbandTextTracks:_t,timestampOffset:q})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},_.handleId3_=function(u,p,k){if(this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId)){var R=this.pendingSegment_;if(!R.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,u,p,k));return}var q=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();MH(this.inbandTextTracks_,k,this.vhs_.tech_),OH({inbandTextTracks:this.inbandTextTracks_,metadataArray:p,timestampOffset:q,videoDuration:this.duration_()})}},_.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(u){return u()}),this.metadataQueue_.caption.forEach(function(u){return u()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},_.processCallQueue_=function(){var u=this.callQueue_;this.callQueue_=[],u.forEach(function(p){return p()})},_.processLoadQueue_=function(){var u=this.loadQueue_;this.loadQueue_=[],u.forEach(function(p){return p()})},_.hasEnoughInfoToLoad_=function(){if(this.loaderType_!=="audio")return!0;var u=this.pendingSegment_;return u?this.getCurrentMediaInfo_()?!jk({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:u.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1},_.getCurrentMediaInfo_=function(u){return u===void 0&&(u=this.pendingSegment_),u&&u.trackInfo||this.currentMediaInfo_},_.getMediaInfo_=function(u){return u===void 0&&(u=this.pendingSegment_),this.getCurrentMediaInfo_(u)||this.startingMediaInfo_},_.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},_.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var u=this.pendingSegment_,p=this.getCurrentMediaInfo_();if(!u||!p)return!1;var k=p.hasAudio,R=p.hasVideo,q=p.isMuxed;return!(R&&!u.videoTimingInfo||k&&!this.audioDisabled_&&!q&&!u.audioTimingInfo||jk({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:u.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},_.handleData_=function(u,p){if(this.earlyAbortWhenNeeded_(u.stats),!this.checkForAbort_(u.requestId)){if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,u,p));return}var k=this.pendingSegment_;if(this.setTimeMapping_(k.timeline),this.updateMediaSecondsLoaded_(k.part||k.segment),this.mediaSource_.readyState!=="closed"){if(u.map&&(u.map=this.initSegmentForMap(u.map,!0),k.segment.map=u.map),u.key&&this.segmentKey(u.key,!0),k.isFmp4=u.isFmp4,k.timingInfo=k.timingInfo||{},k.isFmp4)this.trigger("fmp4"),k.timingInfo.start=k[Hk(p.type)].start;else{var R=this.getCurrentMediaInfo_(),q=this.loaderType_==="main"&&R&&R.hasVideo,z;q&&(z=k.videoTimingInfo.start),k.timingInfo.start=this.trueSegmentStart_({currentStart:k.timingInfo.start,playlist:k.playlist,mediaIndex:k.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:q,firstVideoFrameTimeForData:z,videoTimingInfo:k.videoTimingInfo,audioTimingInfo:k.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(k,p.type),this.updateSourceBufferTimestampOffset_(k),k.isSyncRequest){this.updateTimingInfoEnd_(k),this.syncController_.saveSegmentTimingInfo({segmentInfo:k,shouldSaveTimelineMapping:this.loaderType_==="main"});var de=this.chooseNextRequest_();if(de.mediaIndex!==k.mediaIndex||de.partIndex!==k.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}k.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(k,p)}}},_.updateAppendInitSegmentStatus=function(u,p){this.loaderType_==="main"&&typeof u.timestampOffset=="number"&&!u.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[p]!==u.playlist&&(this.appendInitSegment_[p]=!0)},_.getInitSegmentAndUpdateState_=function(u){var p=u.type,k=u.initSegment,R=u.map,q=u.playlist;if(R){var z=cg(R);if(this.activeInitSegmentId_===z)return null;k=this.initSegmentForMap(R,!0).bytes,this.activeInitSegmentId_=z}return k&&this.appendInitSegment_[p]?(this.playlistOfLastInitSegment_[p]=q,this.appendInitSegment_[p]=!1,this.activeInitSegmentId_=null,k):null},_.handleQuotaExceededError_=function(u,p){var k=this,R=u.segmentInfo,q=u.type,z=u.bytes,de=this.sourceUpdater_.audioBuffered(),Ee=this.sourceUpdater_.videoBuffered();de.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+xc(de).join(", ")),Ee.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+xc(Ee).join(", "));var Se=de.length?de.start(0):0,ze=de.length?de.end(de.length-1):0,rt=Ee.length?Ee.start(0):0,_t=Ee.length?Ee.end(Ee.length-1):0;if(ze-Se<=gh&&_t-rt<=gh){this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+("Appended byte length: "+z.byteLength+", ")+("audio buffer: "+xc(de).join(", ")+", ")+("video buffer: "+xc(Ee).join(", ")+", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:R,type:q,bytes:z}));var lt=this.currentTime_(),Bt=lt-gh;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+Bt),this.remove(0,Bt,function(){k.logger_("On QUOTA_EXCEEDED_ERR, retrying append in "+gh+"s"),k.waitingOnRemove_=!1,k.quotaExceededErrorRetryTimeout_=window.setTimeout(function(){k.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),k.quotaExceededErrorRetryTimeout_=null,k.processCallQueue_()},gh*1e3)},!0)},_.handleAppendError_=function(u,p){var k=u.segmentInfo,R=u.type,q=u.bytes;if(p){if(p.code===Fk){this.handleQuotaExceededError_({segmentInfo:k,type:R,bytes:q});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",p),this.error(R+" append of "+q.length+"b failed for segment "+("#"+k.mediaIndex+" in playlist "+k.playlist.id)),this.trigger("appenderror")}},_.appendToSourceBuffer_=function(u){var p=u.segmentInfo,k=u.type,R=u.initSegment,q=u.data,z=u.bytes;if(!z){var de=[q],Ee=q.byteLength;R&&(de.unshift(R),Ee+=R.byteLength),z=EH({bytes:Ee,segments:de})}this.sourceUpdater_.appendBuffer({segmentInfo:p,type:k,bytes:z},this.handleAppendError_.bind(this,{segmentInfo:p,type:k,bytes:z}))},_.handleSegmentTimingInfo_=function(u,p,k){if(!(!this.pendingSegment_||p!==this.pendingSegment_.requestId)){var R=this.pendingSegment_.segment,q=u+"TimingInfo";R[q]||(R[q]={}),R[q].transmuxerPrependedSeconds=k.prependedContentDuration||0,R[q].transmuxedPresentationStart=k.start.presentation,R[q].transmuxedDecodeStart=k.start.decode,R[q].transmuxedPresentationEnd=k.end.presentation,R[q].transmuxedDecodeEnd=k.end.decode,R[q].baseMediaDecodeTime=k.baseMediaDecodeTime}},_.appendData_=function(u,p){var k=p.type,R=p.data;if(!(!R||!R.byteLength)&&!(k==="audio"&&this.audioDisabled_)){var q=this.getInitSegmentAndUpdateState_({type:k,initSegment:p.initSegment,playlist:u.playlist,map:u.isFmp4?u.segment.map:null});this.appendToSourceBuffer_({segmentInfo:u,type:k,initSegment:q,data:R})}},_.loadSegment_=function(u){var p=this;if(this.state="WAITING",this.pendingSegment_=u,this.trimBackBuffer_(u),typeof u.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(function(){var k=F({},u,{forceTimestampOffset:!0});F(u,p.generateSegmentInfo_(k)),p.isPendingTimestampOffset_=!1,p.updateTransmuxerAndRequestSegment_(u)});return}this.updateTransmuxerAndRequestSegment_(u)},_.updateTransmuxerAndRequestSegment_=function(u){var p=this;this.shouldUpdateTransmuxerTimestampOffset_(u.timestampOffset)&&(this.gopBuffer_.length=0,u.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:u.timestampOffset}));var k=this.createSimplifiedSegmentObj_(u),R=this.isEndOfStream_(u.mediaIndex,u.playlist,u.partIndex),q=this.mediaIndex!==null,z=u.timeline!==this.currentTimeline_&&u.timeline>0,de=R||q&&z;this.logger_("Requesting "+W_(u)),k.map&&!k.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),u.abortRequests=bH({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:k,abortFn:this.handleAbort_.bind(this,u),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",u.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",u.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:de,endedTimelineFn:function(){p.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(Se){var ze=Se.message,rt=Se.level,_t=Se.stream;p.logger_(W_(u)+" logged from transmuxer stream "+_t+" as a "+rt+": "+ze)}})},_.trimBackBuffer_=function(u){var p=BH(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);p>0&&this.remove(0,p)},_.createSimplifiedSegmentObj_=function(u){var p=u.segment,k=u.part,R={resolvedUri:k?k.resolvedUri:p.resolvedUri,byterange:k?k.byterange:p.byterange,requestId:u.requestId,transmuxer:u.transmuxer,audioAppendStart:u.audioAppendStart,gopsToAlignWith:u.gopsToAlignWith,part:u.part},q=u.playlist.segments[u.mediaIndex-1];if(q&&q.timeline===p.timeline&&(q.videoTimingInfo?R.baseStartTime=q.videoTimingInfo.transmuxedDecodeEnd:q.audioTimingInfo&&(R.baseStartTime=q.audioTimingInfo.transmuxedDecodeEnd)),p.key){var z=p.key.iv||new Uint32Array([0,0,0,u.mediaIndex+u.playlist.mediaSequence]);R.key=this.segmentKey(p.key),R.key.iv=z}return p.map&&(R.map=this.initSegmentForMap(p.map)),R},_.saveTransferStats_=function(u){this.mediaRequests+=1,u&&(this.mediaBytesTransferred+=u.bytesReceived,this.mediaTransferDuration+=u.roundTripTime)},_.saveBandwidthRelatedStats_=function(u,p){if(this.pendingSegment_.byteLength=p.bytesReceived,u<gg){this.logger_("Ignoring segment's bandwidth because its duration of "+u+(" is less than the min to record "+gg));return}this.bandwidth=p.bandwidth,this.roundTrip=p.roundTripTime},_.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},_.segmentRequestFinished_=function(u,p,k){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,u,p,k));return}if(this.saveTransferStats_(p.stats),!!this.pendingSegment_&&p.requestId===this.pendingSegment_.requestId){if(u){if(this.pendingSegment_=null,this.state="READY",u.code===pd.ABORTED)return;if(this.pause(),u.code===pd.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(u),this.trigger("error");return}var R=this.pendingSegment_;this.saveBandwidthRelatedStats_(R.duration,p.stats),R.endOfAllRequests=p.endOfAllRequests,k.gopInfo&&(this.gopBuffer_=$H(this.gopBuffer_,k.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(R)}},_.setTimeMapping_=function(u){var p=this.syncController_.mappingForTimeline(u);p!==null&&(this.timeMapping_=p)},_.updateMediaSecondsLoaded_=function(u){typeof u.start=="number"&&typeof u.end=="number"?this.mediaSecondsLoaded+=u.end-u.start:this.mediaSecondsLoaded+=u.duration},_.shouldUpdateTransmuxerTimestampOffset_=function(u){return u===null?!1:this.loaderType_==="main"&&u!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&u!==this.sourceUpdater_.audioTimestampOffset()},_.trueSegmentStart_=function(u){var p=u.currentStart,k=u.playlist,R=u.mediaIndex,q=u.firstVideoFrameTimeForData,z=u.currentVideoTimestampOffset,de=u.useVideoTimingInfo,Ee=u.videoTimingInfo,Se=u.audioTimingInfo;if(typeof p<"u")return p;if(!de)return Se.start;var ze=k.segments[R-1];return R===0||!ze||typeof ze.start>"u"||ze.end!==q+z?q:Ee.start},_.waitForAppendsToComplete_=function(u){var p=this.getCurrentMediaInfo_(u);if(!p){this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),this.trigger("error");return}var k=p.hasAudio,R=p.hasVideo,q=p.isMuxed,z=this.loaderType_==="main"&&R,de=!this.audioDisabled_&&k&&!q;if(u.waitingOnAppends=0,!u.hasAppendedData_){!u.timingInfo&&typeof u.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),u.timingInfo={start:0},u.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(u),this.processMetadataQueue_()),this.checkAppendsDone_(u);return}z&&u.waitingOnAppends++,de&&u.waitingOnAppends++,z&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,u)),de&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,u))},_.checkAppendsDone_=function(u){this.checkForAbort_(u.requestId)||(u.waitingOnAppends--,u.waitingOnAppends===0&&this.handleAppendsDone_())},_.checkForIllegalMediaSwitch=function(u){var p=jH(this.loaderType_,this.getCurrentMediaInfo_(),u);return p?(this.error({message:p,blacklistDuration:1/0}),this.trigger("error"),!0):!1},_.updateSourceBufferTimestampOffset_=function(u){if(!(u.timestampOffset===null||typeof u.timingInfo.start!="number"||u.changedTimestampOffset||this.loaderType_!=="main")){var p=!1;u.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:u.segment.videoTimingInfo,audioTimingInfo:u.segment.audioTimingInfo,timingInfo:u.timingInfo}),u.changedTimestampOffset=!0,u.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(u.timestampOffset),p=!0),u.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(u.timestampOffset),p=!0),p&&this.trigger("timestampoffset")}},_.getSegmentStartTimeForTimestampOffsetCalculation_=function(u){var p=u.videoTimingInfo,k=u.audioTimingInfo,R=u.timingInfo;return this.useDtsForTimestampOffset_?p&&typeof p.transmuxedDecodeStart=="number"?p.transmuxedDecodeStart:k&&typeof k.transmuxedDecodeStart=="number"?k.transmuxedDecodeStart:R.start:R.start},_.updateTimingInfoEnd_=function(u){u.timingInfo=u.timingInfo||{};var p=this.getMediaInfo_(),k=this.loaderType_==="main"&&p&&p.hasVideo,R=k&&u.videoTimingInfo?u.videoTimingInfo:u.audioTimingInfo;R&&(u.timingInfo.end=typeof R.end=="number"?R.end:R.start+u.duration)},_.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}var u=this.pendingSegment_;this.updateTimingInfoEnd_(u),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:u,shouldSaveTimelineMapping:this.loaderType_==="main"});var p=WH(u,this.sourceType_);if(p&&(p.severity==="warn"?Wt.log.warn(p.message):this.logger_(p.message)),this.recordThroughput_(u),this.pendingSegment_=null,this.state="READY",u.isSyncRequest&&(this.trigger("syncinfoupdate"),!u.hasAppendedData_)){this.logger_("Throwing away un-appended sync request "+W_(u));return}this.logger_("Appended "+W_(u)),this.addSegmentMetadataCue_(u),this.fetchAtBuffer_=!0,this.currentTimeline_!==u.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:u.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:u.timeline})),this.currentTimeline_=u.timeline,this.trigger("syncinfoupdate");var k=u.segment,R=u.part,q=k.end&&this.currentTime_()-k.end>u.playlist.targetDuration*3,z=R&&R.end&&this.currentTime_()-R.end>u.playlist.partTargetDuration*3;if(q||z){this.logger_("bad "+(q?"segment":"part")+" "+W_(u)),this.resetEverything();return}var de=this.mediaIndex!==null;de&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=u.mediaIndex,this.partIndex=u.partIndex,this.isEndOfStream_(u.mediaIndex,u.playlist,u.partIndex)&&this.endOfStream(),this.trigger("appended"),u.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()},_.recordThroughput_=function(u){if(u.duration<gg){this.logger_("Ignoring segment's throughput because its duration of "+u.duration+(" is less than the min to record "+gg));return}var p=this.throughput.rate,k=Date.now()-u.endOfAllRequests+1,R=Math.floor(u.byteLength/k*8*1e3);this.throughput.rate+=(R-p)/++this.throughput.count},_.addSegmentMetadataCue_=function(u){if(this.segmentMetadataTrack_){var p=u.segment,k=p.start,R=p.end;if(!(!Lk(k)||!Lk(R))){mh(k,R,this.segmentMetadataTrack_);var q=window.WebKitDataCue||window.VTTCue,z={custom:p.custom,dateTimeObject:p.dateTimeObject,dateTimeString:p.dateTimeString,bandwidth:u.playlist.attributes.BANDWIDTH,resolution:u.playlist.attributes.RESOLUTION,codecs:u.playlist.attributes.CODECS,byteLength:u.byteLength,uri:u.uri,timeline:u.timeline,playlist:u.playlist.id,start:k,end:R},de=JSON.stringify(z),Ee=new q(k,R,de);Ee.value=z,this.segmentMetadataTrack_.addCue(Ee)}}},f}(Wt.EventTarget);function Gd(){}var Uk=function(f){return typeof f!="string"?f:f.replace(/./,function(_){return _.toUpperCase()})},VH=["video","audio"],x1=function(f,_){var h=_[f+"Buffer"];return h&&h.updating||_.queuePending[f]},zH=function(f,_){for(var h=0;h<_.length;h++){var u=_[h];if(u.type==="mediaSource")return null;if(u.type===f)return h}return null},R1=function S(f,_){if(_.queue.length!==0){var h=0,u=_.queue[h];if(u.type==="mediaSource"){!_.updating()&&_.mediaSource.readyState!=="closed"&&(_.queue.shift(),u.action(_),u.doneFn&&u.doneFn(),S("audio",_),S("video",_));return}if(f!=="mediaSource"&&!(!_.ready()||_.mediaSource.readyState==="closed"||x1(f,_))){if(u.type!==f){if(h=zH(f,_.queue),h===null)return;u=_.queue[h]}if(_.queue.splice(h,1),_.queuePending[f]=u,u.action(f,_),!u.doneFn){_.queuePending[f]=null,S(f,_);return}}}},qk=function(f,_){var h=_[f+"Buffer"],u=Uk(f);h&&(h.removeEventListener("updateend",_["on"+u+"UpdateEnd_"]),h.removeEventListener("error",_["on"+u+"Error_"]),_.codecs[f]=null,_[f+"Buffer"]=null)},hd=function(f,_){return f&&_&&Array.prototype.indexOf.call(f.sourceBuffers,_)!==-1},El={appendBuffer:function(f,_,h){return function(u,p){var k=p[u+"Buffer"];if(hd(p.mediaSource,k)){p.logger_("Appending segment "+_.mediaIndex+"'s "+f.length+" bytes to "+u+"Buffer");try{k.appendBuffer(f)}catch(R){p.logger_("Error with code "+R.code+" "+(R.code===Fk?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+_.mediaIndex+" to "+u+"Buffer")),p.queuePending[u]=null,h(R)}}}},remove:function(f,_){return function(h,u){var p=u[h+"Buffer"];if(hd(u.mediaSource,p)){u.logger_("Removing "+f+" to "+_+" from "+h+"Buffer");try{p.remove(f,_)}catch{u.logger_("Remove "+f+" to "+_+" from "+h+"Buffer failed")}}}},timestampOffset:function(f){return function(_,h){var u=h[_+"Buffer"];hd(h.mediaSource,u)&&(h.logger_("Setting "+_+"timestampOffset to "+f),u.timestampOffset=f)}},callback:function(f){return function(_,h){f()}},endOfStream:function(f){return function(_){if(_.mediaSource.readyState==="open"){_.logger_("Calling mediaSource endOfStream("+(f||"")+")");try{_.mediaSource.endOfStream(f)}catch(h){Wt.log.warn("Failed to call media source endOfStream",h)}}}},duration:function(f){return function(_){_.logger_("Setting mediaSource duration to "+f);try{_.mediaSource.duration=f}catch(h){Wt.log.warn("Failed to set media source duration",h)}}},abort:function(){return function(f,_){if(_.mediaSource.readyState==="open"){var h=_[f+"Buffer"];if(hd(_.mediaSource,h)){_.logger_("calling abort on "+f+"Buffer");try{h.abort()}catch(u){Wt.log.warn("Failed to abort on "+f+"Buffer",u)}}}}},addSourceBuffer:function(f,_){return function(h){var u=Uk(f),p=qf(_);h.logger_("Adding "+f+"Buffer with codec "+_+" to mediaSource");var k=h.mediaSource.addSourceBuffer(p);k.addEventListener("updateend",h["on"+u+"UpdateEnd_"]),k.addEventListener("error",h["on"+u+"Error_"]),h.codecs[f]=_,h[f+"Buffer"]=k}},removeSourceBuffer:function(f){return function(_){var h=_[f+"Buffer"];if(qk(f,_),!!hd(_.mediaSource,h)){_.logger_("Removing "+f+"Buffer with codec "+_.codecs[f]+" from mediaSource");try{_.mediaSource.removeSourceBuffer(h)}catch(u){Wt.log.warn("Failed to removeSourceBuffer "+f+"Buffer",u)}}}},changeType:function(f){return function(_,h){var u=h[_+"Buffer"],p=qf(f);hd(h.mediaSource,u)&&h.codecs[_]!==f&&(h.logger_("changing "+_+"Buffer codec from "+h.codecs[_]+" to "+f),u.changeType(p),h.codecs[_]=f)}}},Il=function(f){var _=f.type,h=f.sourceUpdater,u=f.action,p=f.doneFn,k=f.name;h.queue.push({type:_,action:u,doneFn:p,name:k}),R1(_,h)},Wk=function(f,_){return function(h){if(_.queuePending[f]){var u=_.queuePending[f].doneFn;_.queuePending[f]=null,u&&u(_[f+"Error_"])}R1(f,_)}},Vk=function(S){_n(f,S);function f(h){var u;return u=S.call(this)||this,u.mediaSource=h,u.sourceopenListener_=function(){return R1("mediaSource",Bn(u))},u.mediaSource.addEventListener("sourceopen",u.sourceopenListener_),u.logger_=Mu("SourceUpdater"),u.audioTimestampOffset_=0,u.videoTimestampOffset_=0,u.queue=[],u.queuePending={audio:null,video:null},u.delayedAudioAppendQueue_=[],u.videoAppendQueued_=!1,u.codecs={},u.onVideoUpdateEnd_=Wk("video",Bn(u)),u.onAudioUpdateEnd_=Wk("audio",Bn(u)),u.onVideoError_=function(p){u.videoError_=p},u.onAudioError_=function(p){u.audioError_=p},u.createdSourceBuffers_=!1,u.initializedEme_=!1,u.triggeredReady_=!1,u}var _=f.prototype;return _.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},_.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},_.hasInitializedAnyEme=function(){return this.initializedEme_},_.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},_.createSourceBuffers=function(u){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(u),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},_.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},_.addSourceBuffer=function(u,p){Il({type:"mediaSource",sourceUpdater:this,action:El.addSourceBuffer(u,p),name:"addSourceBuffer"})},_.abort=function(u){Il({type:u,sourceUpdater:this,action:El.abort(u),name:"abort"})},_.removeSourceBuffer=function(u){if(!this.canRemoveSourceBuffer()){Wt.log.error("removeSourceBuffer is not supported!");return}Il({type:"mediaSource",sourceUpdater:this,action:El.removeSourceBuffer(u),name:"removeSourceBuffer"})},_.canRemoveSourceBuffer=function(){return!Wt.browser.IE_VERSION&&!Wt.browser.IS_FIREFOX&&window.MediaSource&&window.MediaSource.prototype&&typeof window.MediaSource.prototype.removeSourceBuffer=="function"},f.canChangeType=function(){return window.SourceBuffer&&window.SourceBuffer.prototype&&typeof window.SourceBuffer.prototype.changeType=="function"},_.canChangeType=function(){return this.constructor.canChangeType()},_.changeType=function(u,p){if(!this.canChangeType()){Wt.log.error("changeType is not supported!");return}Il({type:u,sourceUpdater:this,action:El.changeType(p),name:"changeType"})},_.addOrChangeSourceBuffers=function(u){var p=this;if(!u||typeof u!="object"||Object.keys(u).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(u).forEach(function(k){var R=u[k];if(!p.hasCreatedSourceBuffers())return p.addSourceBuffer(k,R);p.canChangeType()&&p.changeType(k,R)})},_.appendBuffer=function(u,p){var k=this,R=u.segmentInfo,q=u.type,z=u.bytes;if(this.processedAppend_=!0,q==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([u,p]),this.logger_("delayed audio append of "+z.length+" until video append");return}var de=p;if(Il({type:q,sourceUpdater:this,action:El.appendBuffer(z,R||{mediaIndex:-1},de),doneFn:p,name:"appendBuffer"}),q==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var Ee=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+Ee.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,Ee.forEach(function(Se){k.appendBuffer.apply(k,Se)})}},_.audioBuffered=function(){return hd(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Wt.createTimeRange()},_.videoBuffered=function(){return hd(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Wt.createTimeRange()},_.buffered=function(){var u=hd(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,p=hd(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return p&&!u?this.audioBuffered():u&&!p?this.videoBuffered():d6(this.audioBuffered(),this.videoBuffered())},_.setDuration=function(u,p){p===void 0&&(p=Gd),Il({type:"mediaSource",sourceUpdater:this,action:El.duration(u),name:"duration",doneFn:p})},_.endOfStream=function(u,p){u===void 0&&(u=null),p===void 0&&(p=Gd),typeof u!="string"&&(u=void 0),Il({type:"mediaSource",sourceUpdater:this,action:El.endOfStream(u),name:"endOfStream",doneFn:p})},_.removeAudio=function(u,p,k){if(k===void 0&&(k=Gd),!this.audioBuffered().length||this.audioBuffered().end(0)===0){k();return}Il({type:"audio",sourceUpdater:this,action:El.remove(u,p),doneFn:k,name:"remove"})},_.removeVideo=function(u,p,k){if(k===void 0&&(k=Gd),!this.videoBuffered().length||this.videoBuffered().end(0)===0){k();return}Il({type:"video",sourceUpdater:this,action:El.remove(u,p),doneFn:k,name:"remove"})},_.updating=function(){return!!(x1("audio",this)||x1("video",this))},_.audioTimestampOffset=function(u){return typeof u<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==u&&(Il({type:"audio",sourceUpdater:this,action:El.timestampOffset(u),name:"timestampOffset"}),this.audioTimestampOffset_=u),this.audioTimestampOffset_},_.videoTimestampOffset=function(u){return typeof u<"u"&&this.videoBuffer&&this.videoTimestampOffset!==u&&(Il({type:"video",sourceUpdater:this,action:El.timestampOffset(u),name:"timestampOffset"}),this.videoTimestampOffset_=u),this.videoTimestampOffset_},_.audioQueueCallback=function(u){this.audioBuffer&&Il({type:"audio",sourceUpdater:this,action:El.callback(u),name:"callback"})},_.videoQueueCallback=function(u){this.videoBuffer&&Il({type:"video",sourceUpdater:this,action:El.callback(u),name:"callback"})},_.dispose=function(){var u=this;this.trigger("dispose"),VH.forEach(function(p){u.abort(p),u.canRemoveSourceBuffer()?u.removeSourceBuffer(p):u[p+"QueueCallback"](function(){return qk(p,u)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},f}(Wt.EventTarget),zk=function(f){return decodeURIComponent(escape(String.fromCharCode.apply(null,f)))},Yk=new Uint8Array(`

`.split("").map(function(S){return S.charCodeAt(0)})),YH=function(S){_n(f,S);function f(){return S.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return f}(l6(Error)),GH=function(S){_n(f,S);function f(h,u){var p;return u===void 0&&(u={}),p=S.call(this,h,u)||this,p.mediaSource_=null,p.subtitlesTrack_=null,p.loaderType_="subtitle",p.featuresNativeTextTracks_=h.featuresNativeTextTracks,p.loadVttJs=h.loadVttJs,p.shouldSaveSegmentTimingInfo_=!1,p}var _=f.prototype;return _.createTransmuxer_=function(){return null},_.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Wt.createTimeRanges();var u=this.subtitlesTrack_.cues,p=u[0].startTime,k=u[u.length-1].startTime;return Wt.createTimeRanges([[p,k]])},_.initSegmentForMap=function(u,p){if(p===void 0&&(p=!1),!u)return null;var k=cg(u),R=this.initSegments_[k];if(p&&!R&&u.bytes){var q=Yk.byteLength+u.bytes.byteLength,z=new Uint8Array(q);z.set(u.bytes),z.set(Yk,u.bytes.byteLength),this.initSegments_[k]=R={resolvedUri:u.resolvedUri,byterange:u.byterange,bytes:z}}return R||u},_.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},_.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},_.track=function(u){return typeof u>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=u,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},_.remove=function(u,p){mh(u,p,this.subtitlesTrack_)},_.fillBuffer_=function(){var u=this,p=this.chooseNextRequest_();if(p){if(this.syncController_.timestampOffsetForTimeline(p.timeline)===null){var k=function(){u.state="READY",u.paused()||u.monitorBuffer_()};this.syncController_.one("timestampoffset",k),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(p)}},_.timestampOffsetForSegment_=function(){return null},_.chooseNextRequest_=function(){return this.skipEmptySegments_(S.prototype.chooseNextRequest_.call(this))},_.skipEmptySegments_=function(u){for(;u&&u.segment.empty;){if(u.mediaIndex+1>=u.playlist.segments.length){u=null;break}u=this.generateSegmentInfo_({playlist:u.playlist,mediaIndex:u.mediaIndex+1,startOfSegment:u.startOfSegment+u.duration,isSyncRequest:u.isSyncRequest})}return u},_.stopForError=function(u){this.error(u),this.state="READY",this.pause(),this.trigger("error")},_.segmentRequestFinished_=function(u,p,k){var R=this;if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(p.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(u){u.code===pd.TIMEOUT&&this.handleTimeout_(),u.code===pd.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(u);return}var q=this.pendingSegment_;this.saveBandwidthRelatedStats_(q.duration,p.stats),p.key&&this.segmentKey(p.key,!0),this.state="APPENDING",this.trigger("appending");var z=q.segment;if(z.map&&(z.map.bytes=p.map.bytes),q.bytes=p.bytes,typeof window.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(function(){return R.segmentRequestFinished_(u,p,k)},function(){return R.stopForError({message:"Error loading vtt.js"})});return}z.requested=!0;try{this.parseVTTCues_(q)}catch(de){this.stopForError({message:de.message});return}if(this.updateTimeMapping_(q,this.syncController_.timelines[q.timeline],this.playlist_),q.cues.length?q.timingInfo={start:q.cues[0].startTime,end:q.cues[q.cues.length-1].endTime}:q.timingInfo={start:q.startOfSegment,end:q.startOfSegment+q.duration},q.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}q.byteLength=q.bytes.byteLength,this.mediaSecondsLoaded+=z.duration,q.cues.forEach(function(de){R.subtitlesTrack_.addCue(R.featuresNativeTextTracks_?new window.VTTCue(de.startTime,de.endTime,de.text):de)}),xH(this.subtitlesTrack_),this.handleAppendsDone_()},_.handleData_=function(){},_.updateTimingInfoEnd_=function(){},_.parseVTTCues_=function(u){var p,k=!1;if(typeof window.WebVTT!="function")throw new YH;typeof window.TextDecoder=="function"?p=new window.TextDecoder("utf8"):(p=window.WebVTT.StringDecoder(),k=!0);var R=new window.WebVTT.Parser(window,window.vttjs,p);if(u.cues=[],u.timestampmap={MPEGTS:0,LOCAL:0},R.oncue=u.cues.push.bind(u.cues),R.ontimestampmap=function(de){u.timestampmap=de},R.onparsingerror=function(de){Wt.log.warn("Error encountered when parsing cues: "+de.message)},u.segment.map){var q=u.segment.map.bytes;k&&(q=zk(q)),R.parse(q)}var z=u.bytes;k&&(z=zk(z)),R.parse(z),R.flush()},_.updateTimeMapping_=function(u,p,k){var R=u.segment;if(p){if(!u.cues.length){R.empty=!0;return}var q=u.timestampmap,z=q.MPEGTS/og-q.LOCAL+p.mapping;if(u.cues.forEach(function(Se){Se.startTime+=z,Se.endTime+=z}),!k.syncInfo){var de=u.cues[0].startTime,Ee=u.cues[u.cues.length-1].startTime;k.syncInfo={mediaSequence:k.mediaSequence+u.mediaIndex,time:Math.min(de,Ee-R.duration)}}}},f}(M1),KH=function(f,_){for(var h=f.cues,u=0;u<h.length;u++){var p=h[u];if(_>=p.adStartTime&&_<=p.adEndTime)return p}return null},XH=function(f,_,h){if(h===void 0&&(h=0),!!f.segments)for(var u=h,p,k=0;k<f.segments.length;k++){var R=f.segments[k];if(p||(p=KH(_,u+R.duration/2)),p){if("cueIn"in R){p.endTime=u,p.adEndTime=u,u+=R.duration,p=null;continue}if(u<p.endTime){u+=R.duration;continue}p.endTime+=R.duration}else if("cueOut"in R&&(p=new window.VTTCue(u,u+R.duration,R.cueOut),p.adStartTime=u,p.adEndTime=u+parseFloat(R.cueOut),_.addCue(p)),"cueOutCont"in R){var q=R.cueOutCont.split("/").map(parseFloat),z=q[0],de=q[1];p=new window.VTTCue(u,u+R.duration,""),p.adStartTime=u-z,p.adEndTime=p.adStartTime+de,_.addCue(p)}u+=R.duration}},QH=86400,Gk=[{name:"VOD",run:function(f,_,h,u,p){if(h!==1/0){var k={time:0,segmentIndex:0,partIndex:null};return k}return null}},{name:"ProgramDateTime",run:function(f,_,h,u,p){if(!Object.keys(f.timelineToDatetimeMappings).length)return null;var k=null,R=null,q=g1(_);p=p||0;for(var z=0;z<q.length;z++){var de=_.endList||p===0?z:q.length-(z+1),Ee=q[de],Se=Ee.segment,ze=f.timelineToDatetimeMappings[Se.timeline];if(!(!ze||!Se.dateTimeObject)){var rt=Se.dateTimeObject.getTime()/1e3,_t=rt+ze;if(Se.parts&&typeof Ee.partIndex=="number")for(var lt=0;lt<Ee.partIndex;lt++)_t+=Se.parts[lt].duration;var Bt=Math.abs(p-_t);if(R!==null&&(Bt===0||R<Bt))break;R=Bt,k={time:_t,segmentIndex:Ee.segmentIndex,partIndex:Ee.partIndex}}}return k}},{name:"Segment",run:function(f,_,h,u,p){var k=null,R=null;p=p||0;for(var q=g1(_),z=0;z<q.length;z++){var de=_.endList||p===0?z:q.length-(z+1),Ee=q[de],Se=Ee.segment,ze=Ee.part&&Ee.part.start||Se&&Se.start;if(Se.timeline===u&&typeof ze<"u"){var rt=Math.abs(p-ze);if(R!==null&&R<rt)break;(!k||R===null||R>=rt)&&(R=rt,k={time:ze,segmentIndex:Ee.segmentIndex,partIndex:Ee.partIndex})}}return k}},{name:"Discontinuity",run:function(f,_,h,u,p){var k=null;if(p=p||0,_.discontinuityStarts&&_.discontinuityStarts.length)for(var R=null,q=0;q<_.discontinuityStarts.length;q++){var z=_.discontinuityStarts[q],de=_.discontinuitySequence+q+1,Ee=f.discontinuities[de];if(Ee){var Se=Math.abs(p-Ee.time);if(R!==null&&R<Se)break;(!k||R===null||R>=Se)&&(R=Se,k={time:Ee.time,segmentIndex:z,partIndex:null})}}return k}},{name:"Playlist",run:function(f,_,h,u,p){if(_.syncInfo){var k={time:_.syncInfo.time,segmentIndex:_.syncInfo.mediaSequence-_.mediaSequence,partIndex:null};return k}return null}}],JH=function(S){_n(f,S);function f(h){var u;return u=S.call(this)||this,u.timelines=[],u.discontinuities=[],u.timelineToDatetimeMappings={},u.logger_=Mu("SyncController"),u}var _=f.prototype;return _.getSyncPoint=function(u,p,k,R){var q=this.runStrategies_(u,p,k,R);return q.length?this.selectSyncPoint_(q,{key:"time",value:R}):null},_.getExpiredTime=function(u,p){if(!u||!u.segments)return null;var k=this.runStrategies_(u,p,u.discontinuitySequence,0);if(!k.length)return null;var R=this.selectSyncPoint_(k,{key:"segmentIndex",value:0});return R.segmentIndex>0&&(R.time*=-1),Math.abs(R.time+_h({defaultDuration:u.targetDuration,durationList:u.segments,startIndex:R.segmentIndex,endIndex:0}))},_.runStrategies_=function(u,p,k,R){for(var q=[],z=0;z<Gk.length;z++){var de=Gk[z],Ee=de.run(this,u,p,k,R);Ee&&(Ee.strategy=de.name,q.push({strategy:de.name,syncPoint:Ee}))}return q},_.selectSyncPoint_=function(u,p){for(var k=u[0].syncPoint,R=Math.abs(u[0].syncPoint[p.key]-p.value),q=u[0].strategy,z=1;z<u.length;z++){var de=Math.abs(u[z].syncPoint[p.key]-p.value);de<R&&(R=de,k=u[z].syncPoint,q=u[z].strategy)}return this.logger_("syncPoint for ["+p.key+": "+p.value+"] chosen with strategy"+(" ["+q+"]: [time:"+k.time+",")+(" segmentIndex:"+k.segmentIndex)+(typeof k.partIndex=="number"?",partIndex:"+k.partIndex:"")+"]"),k},_.saveExpiredSegmentInfo=function(u,p){var k=p.mediaSequence-u.mediaSequence;if(k>QH){Wt.log.warn("Not saving expired segment info. Media sequence gap "+k+" is too large.");return}for(var R=k-1;R>=0;R--){var q=u.segments[R];if(q&&typeof q.start<"u"){p.syncInfo={mediaSequence:u.mediaSequence+R,time:q.start},this.logger_("playlist refresh sync: [time:"+p.syncInfo.time+","+(" mediaSequence: "+p.syncInfo.mediaSequence+"]")),this.trigger("syncinfoupdate");break}}},_.setDateTimeMappingForStart=function(u){if(this.timelineToDatetimeMappings={},u.segments&&u.segments.length&&u.segments[0].dateTimeObject){var p=u.segments[0],k=p.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[p.timeline]=-k}},_.saveSegmentTimingInfo=function(u){var p=u.segmentInfo,k=u.shouldSaveTimelineMapping,R=this.calculateSegmentTimeMapping_(p,p.timingInfo,k),q=p.segment;R&&(this.saveDiscontinuitySyncInfo_(p),p.playlist.syncInfo||(p.playlist.syncInfo={mediaSequence:p.playlist.mediaSequence+p.mediaIndex,time:q.start}));var z=q.dateTimeObject;q.discontinuity&&k&&z&&(this.timelineToDatetimeMappings[q.timeline]=-(z.getTime()/1e3))},_.timestampOffsetForTimeline=function(u){return typeof this.timelines[u]>"u"?null:this.timelines[u].time},_.mappingForTimeline=function(u){return typeof this.timelines[u]>"u"?null:this.timelines[u].mapping},_.calculateSegmentTimeMapping_=function(u,p,k){var R=u.segment,q=u.part,z=this.timelines[u.timeline],de,Ee;if(typeof u.timestampOffset=="number")z={time:u.startOfSegment,mapping:u.startOfSegment-p.start},k&&(this.timelines[u.timeline]=z,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+u.timeline+": "+("[time: "+z.time+"] [mapping: "+z.mapping+"]"))),de=u.startOfSegment,Ee=p.end+z.mapping;else if(z)de=p.start+z.mapping,Ee=p.end+z.mapping;else return!1;return q&&(q.start=de,q.end=Ee),(!R.start||de<R.start)&&(R.start=de),R.end=Ee,!0},_.saveDiscontinuitySyncInfo_=function(u){var p=u.playlist,k=u.segment;if(k.discontinuity)this.discontinuities[k.timeline]={time:k.start,accuracy:0};else if(p.discontinuityStarts&&p.discontinuityStarts.length)for(var R=0;R<p.discontinuityStarts.length;R++){var q=p.discontinuityStarts[R],z=p.discontinuitySequence+R+1,de=q-u.mediaIndex,Ee=Math.abs(de);if(!this.discontinuities[z]||this.discontinuities[z].accuracy>Ee){var Se=void 0;de<0?Se=k.start-_h({defaultDuration:p.targetDuration,durationList:p.segments,startIndex:u.mediaIndex,endIndex:q}):Se=k.end+_h({defaultDuration:p.targetDuration,durationList:p.segments,startIndex:u.mediaIndex+1,endIndex:q}),this.discontinuities[z]={time:Se,accuracy:Ee}}}},_.dispose=function(){this.trigger("dispose"),this.off()},f}(Wt.EventTarget),ZH=function(S){_n(f,S);function f(){var h;return h=S.call(this)||this,h.pendingTimelineChanges_={},h.lastTimelineChanges_={},h}var _=f.prototype;return _.clearPendingTimelineChange=function(u){this.pendingTimelineChanges_[u]=null,this.trigger("pendingtimelinechange")},_.pendingTimelineChange=function(u){var p=u.type,k=u.from,R=u.to;return typeof k=="number"&&typeof R=="number"&&(this.pendingTimelineChanges_[p]={type:p,from:k,to:R},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[p]},_.lastTimelineChange=function(u){var p=u.type,k=u.from,R=u.to;return typeof k=="number"&&typeof R=="number"&&(this.lastTimelineChanges_[p]={type:p,from:k,to:R},delete this.pendingTimelineChanges_[p],this.trigger("timelinechange")),this.lastTimelineChanges_[p]},_.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},f}(Wt.EventTarget),e8=wk(Tk(function(){var S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof zs<"u"?zs:typeof self<"u"?self:{};function f(fn,gn,$n){return $n={path:gn,exports:{},require:function(bn,An){return _(bn,An??$n.path)}},fn($n,$n.exports),$n.exports}function _(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var h=f(function(fn){function gn(Tn,bn){for(var An=0;An<bn.length;An++){var wn=bn[An];wn.enumerable=wn.enumerable||!1,wn.configurable=!0,"value"in wn&&(wn.writable=!0),Object.defineProperty(Tn,wn.key,wn)}}function $n(Tn,bn,An){return bn&&gn(Tn.prototype,bn),An&&gn(Tn,An),Tn}fn.exports=$n,fn.exports.default=fn.exports,fn.exports.__esModule=!0}),u=f(function(fn){function gn($n,Tn){return fn.exports=gn=Object.setPrototypeOf||function(An,wn){return An.__proto__=wn,An},fn.exports.default=fn.exports,fn.exports.__esModule=!0,gn($n,Tn)}fn.exports=gn,fn.exports.default=fn.exports,fn.exports.__esModule=!0}),p=f(function(fn){function gn($n,Tn){$n.prototype=Object.create(Tn.prototype),$n.prototype.constructor=$n,u($n,Tn)}fn.exports=gn,fn.exports.default=fn.exports,fn.exports.__esModule=!0}),k=function(){function fn(){this.listeners={}}var gn=fn.prototype;return gn.on=function(Tn,bn){this.listeners[Tn]||(this.listeners[Tn]=[]),this.listeners[Tn].push(bn)},gn.off=function(Tn,bn){if(!this.listeners[Tn])return!1;var An=this.listeners[Tn].indexOf(bn);return this.listeners[Tn]=this.listeners[Tn].slice(0),this.listeners[Tn].splice(An,1),An>-1},gn.trigger=function(Tn){var bn=this.listeners[Tn];if(bn)if(arguments.length===2)for(var An=bn.length,wn=0;wn<An;++wn)bn[wn].call(this,arguments[1]);else for(var oi=Array.prototype.slice.call(arguments,1),Jn=bn.length,Zi=0;Zi<Jn;++Zi)bn[Zi].apply(this,oi)},gn.dispose=function(){this.listeners={}},gn.pipe=function(Tn){this.on("data",function(bn){Tn.push(bn)})},fn}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function R(fn){return fn.subarray(0,fn.byteLength-fn[fn.byteLength-1])}/*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */var q=function(){var gn=[[[],[],[],[],[]],[[],[],[],[],[]]],$n=gn[0],Tn=gn[1],bn=$n[4],An=Tn[4],wn,oi,Jn,Zi=[],Fa=[],Va,Pr,ya,Za,Do,Ba;for(wn=0;wn<256;wn++)Fa[(Zi[wn]=wn<<1^(wn>>7)*283)^wn]=wn;for(oi=Jn=0;!bn[oi];oi^=Va||1,Jn=Fa[Jn]||1)for(Za=Jn^Jn<<1^Jn<<2^Jn<<3^Jn<<4,Za=Za>>8^Za&255^99,bn[oi]=Za,An[Za]=oi,ya=Zi[Pr=Zi[Va=Zi[oi]]],Ba=ya*16843009^Pr*65537^Va*257^oi*16843008,Do=Zi[Za]*257^Za*16843008,wn=0;wn<4;wn++)$n[wn][oi]=Do=Do<<24^Do>>>8,Tn[wn][Za]=Ba=Ba<<24^Ba>>>8;for(wn=0;wn<5;wn++)$n[wn]=$n[wn].slice(0),Tn[wn]=Tn[wn].slice(0);return gn},z=null,de=function(){function fn($n){z||(z=q()),this._tables=[[z[0][0].slice(),z[0][1].slice(),z[0][2].slice(),z[0][3].slice(),z[0][4].slice()],[z[1][0].slice(),z[1][1].slice(),z[1][2].slice(),z[1][3].slice(),z[1][4].slice()]];var Tn,bn,An,wn=this._tables[0][4],oi=this._tables[1],Jn=$n.length,Zi=1;if(Jn!==4&&Jn!==6&&Jn!==8)throw new Error("Invalid aes key size");var Fa=$n.slice(0),Va=[];for(this._key=[Fa,Va],Tn=Jn;Tn<4*Jn+28;Tn++)An=Fa[Tn-1],(Tn%Jn===0||Jn===8&&Tn%Jn===4)&&(An=wn[An>>>24]<<24^wn[An>>16&255]<<16^wn[An>>8&255]<<8^wn[An&255],Tn%Jn===0&&(An=An<<8^An>>>24^Zi<<24,Zi=Zi<<1^(Zi>>7)*283)),Fa[Tn]=Fa[Tn-Jn]^An;for(bn=0;Tn;bn++,Tn--)An=Fa[bn&3?Tn:Tn-4],Tn<=4||bn<4?Va[bn]=An:Va[bn]=oi[0][wn[An>>>24]]^oi[1][wn[An>>16&255]]^oi[2][wn[An>>8&255]]^oi[3][wn[An&255]]}var gn=fn.prototype;return gn.decrypt=function(Tn,bn,An,wn,oi,Jn){var Zi=this._key[1],Fa=Tn^Zi[0],Va=wn^Zi[1],Pr=An^Zi[2],ya=bn^Zi[3],Za,Do,Ba,yg=Zi.length/4-2,Zl,Xd=4,Jf=this._tables[1],Rc=Jf[0],md=Jf[1],V_=Jf[2],z_=Jf[3],Y_=Jf[4];for(Zl=0;Zl<yg;Zl++)Za=Rc[Fa>>>24]^md[Va>>16&255]^V_[Pr>>8&255]^z_[ya&255]^Zi[Xd],Do=Rc[Va>>>24]^md[Pr>>16&255]^V_[ya>>8&255]^z_[Fa&255]^Zi[Xd+1],Ba=Rc[Pr>>>24]^md[ya>>16&255]^V_[Fa>>8&255]^z_[Va&255]^Zi[Xd+2],ya=Rc[ya>>>24]^md[Fa>>16&255]^V_[Va>>8&255]^z_[Pr&255]^Zi[Xd+3],Xd+=4,Fa=Za,Va=Do,Pr=Ba;for(Zl=0;Zl<4;Zl++)oi[(3&-Zl)+Jn]=Y_[Fa>>>24]<<24^Y_[Va>>16&255]<<16^Y_[Pr>>8&255]<<8^Y_[ya&255]^Zi[Xd++],Za=Fa,Fa=Va,Va=Pr,Pr=ya,ya=Za},fn}(),Ee=function(fn){p(gn,fn);function gn(){var Tn;return Tn=fn.call(this,k)||this,Tn.jobs=[],Tn.delay=1,Tn.timeout_=null,Tn}var $n=gn.prototype;return $n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},$n.push=function(bn){this.jobs.push(bn),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},gn}(k),Se=function(gn){return gn<<24|(gn&65280)<<8|(gn&16711680)>>8|gn>>>24},ze=function(gn,$n,Tn){var bn=new Int32Array(gn.buffer,gn.byteOffset,gn.byteLength>>2),An=new de(Array.prototype.slice.call($n)),wn=new Uint8Array(gn.byteLength),oi=new Int32Array(wn.buffer),Jn,Zi,Fa,Va,Pr,ya,Za,Do,Ba;for(Jn=Tn[0],Zi=Tn[1],Fa=Tn[2],Va=Tn[3],Ba=0;Ba<bn.length;Ba+=4)Pr=Se(bn[Ba]),ya=Se(bn[Ba+1]),Za=Se(bn[Ba+2]),Do=Se(bn[Ba+3]),An.decrypt(Pr,ya,Za,Do,oi,Ba),oi[Ba]=Se(oi[Ba]^Jn),oi[Ba+1]=Se(oi[Ba+1]^Zi),oi[Ba+2]=Se(oi[Ba+2]^Fa),oi[Ba+3]=Se(oi[Ba+3]^Va),Jn=Pr,Zi=ya,Fa=Za,Va=Do;return wn},rt=function(){function fn($n,Tn,bn,An){var wn=fn.STEP,oi=new Int32Array($n.buffer),Jn=new Uint8Array($n.byteLength),Zi=0;for(this.asyncStream_=new Ee,this.asyncStream_.push(this.decryptChunk_(oi.subarray(Zi,Zi+wn),Tn,bn,Jn)),Zi=wn;Zi<oi.length;Zi+=wn)bn=new Uint32Array([Se(oi[Zi-4]),Se(oi[Zi-3]),Se(oi[Zi-2]),Se(oi[Zi-1])]),this.asyncStream_.push(this.decryptChunk_(oi.subarray(Zi,Zi+wn),Tn,bn,Jn));this.asyncStream_.push(function(){An(null,R(Jn))})}var gn=fn.prototype;return gn.decryptChunk_=function(Tn,bn,An,wn){return function(){var oi=ze(Tn,bn,An);wn.set(oi,Tn.byteOffset)}},h(fn,null,[{key:"STEP",get:function(){return 32e3}}]),fn}(),_t;typeof window<"u"?_t=window:typeof S<"u"?_t=S:typeof self<"u"?_t=self:_t={};var lt=_t,Bt=function(gn){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(gn):gn&&gn.buffer instanceof ArrayBuffer},en=lt.BigInt||Number;en("0x1"),en("0x100"),en("0x10000"),en("0x1000000"),en("0x100000000"),en("0x10000000000"),en("0x1000000000000"),en("0x100000000000000"),en("0x10000000000000000");var En=function(gn){var $n={};return Object.keys(gn).forEach(function(Tn){var bn=gn[Tn];Bt(bn)?$n[Tn]={bytes:bn.buffer,byteOffset:bn.byteOffset,byteLength:bn.byteLength}:$n[Tn]=bn}),$n};self.onmessage=function(fn){var gn=fn.data,$n=new Uint8Array(gn.encrypted.bytes,gn.encrypted.byteOffset,gn.encrypted.byteLength),Tn=new Uint32Array(gn.key.bytes,gn.key.byteOffset,gn.key.byteLength/4),bn=new Uint32Array(gn.iv.bytes,gn.iv.byteOffset,gn.iv.byteLength/4);new rt($n,Tn,bn,function(An,wn){self.postMessage(En({source:gn.source,decrypted:wn}),[wn.buffer])})}})),t8=yk(e8),n8=function(f){var _=f.default?"main":"alternative";return f.characteristics&&f.characteristics.indexOf("public.accessibility.describes-video")>=0&&(_="main-desc"),_},vg=function(f,_){f.abort(),f.pause(),_&&_.activePlaylistLoader&&(_.activePlaylistLoader.pause(),_.activePlaylistLoader=null)},$1=function(f,_){_.activePlaylistLoader=f,f.load()},i8=function(f,_){return function(){var h=_.segmentLoaders,u=h[f],p=h.main,k=_.mediaTypes[f],R=k.activeTrack(),q=k.getActiveGroup(),z=k.activePlaylistLoader,de=k.lastGroup_;if(!(q&&de&&q.id===de.id)&&(k.lastGroup_=q,k.lastTrack_=R,vg(u,k),!(!q||q.isMasterPlaylist))){if(!q.playlistLoader){z&&p.resetEverything();return}u.resyncLoader(),$1(q.playlistLoader,k)}}},r8=function(f,_){return function(){var h=_.segmentLoaders[f],u=_.mediaTypes[f];u.lastGroup_=null,h.abort(),h.pause()}},a8=function(f,_){return function(){var h=_.masterPlaylistLoader,u=_.segmentLoaders,p=u[f],k=u.main,R=_.mediaTypes[f],q=R.activeTrack(),z=R.getActiveGroup(),de=R.activePlaylistLoader,Ee=R.lastTrack_;if(!(Ee&&q&&Ee.id===q.id)&&(R.lastGroup_=z,R.lastTrack_=q,vg(p,R),!!z)){if(z.isMasterPlaylist){if(!q||!Ee||q.id===Ee.id)return;var Se=_.vhs.masterPlaylistController_,ze=Se.selectPlaylist();if(Se.media()===ze)return;R.logger_("track change. Switching master audio from "+Ee.id+" to "+q.id),h.pause(),k.resetEverything(),Se.fastQualityChange_(ze);return}if(f==="AUDIO"){if(!z.playlistLoader){k.setAudio(!0),k.resetEverything();return}p.setAudio(!0),k.setAudio(!1)}if(de===z.playlistLoader){$1(z.playlistLoader,R);return}p.track&&p.track(q),p.resetEverything(),$1(z.playlistLoader,R)}}},bg={AUDIO:function(f,_){return function(){var h=_.segmentLoaders[f],u=_.mediaTypes[f],p=_.blacklistCurrentPlaylist;vg(h,u);var k=u.activeTrack(),R=u.activeGroup(),q=(R.filter(function(Ee){return Ee.default})[0]||R[0]).id,z=u.tracks[q];if(k===z){p({message:"Problem encountered loading the default audio track."});return}Wt.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var de in u.tracks)u.tracks[de].enabled=u.tracks[de]===z;u.onTrackChanged()}},SUBTITLES:function(f,_){return function(){var h=_.segmentLoaders[f],u=_.mediaTypes[f];Wt.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),vg(h,u);var p=u.activeTrack();p&&(p.mode="disabled"),u.onTrackChanged()}}},Kk={AUDIO:function(f,_,h){if(_){var u=h.tech,p=h.requestOptions,k=h.segmentLoaders[f];_.on("loadedmetadata",function(){var R=_.media();k.playlist(R,p),(!u.paused()||R.endList&&u.preload()!=="none")&&k.load()}),_.on("loadedplaylist",function(){k.playlist(_.media(),p),u.paused()||k.load()}),_.on("error",bg[f](f,h))}},SUBTITLES:function(f,_,h){var u=h.tech,p=h.requestOptions,k=h.segmentLoaders[f],R=h.mediaTypes[f];_.on("loadedmetadata",function(){var q=_.media();k.playlist(q,p),k.track(R.activeTrack()),(!u.paused()||q.endList&&u.preload()!=="none")&&k.load()}),_.on("loadedplaylist",function(){k.playlist(_.media(),p),u.paused()||k.load()}),_.on("error",bg[f](f,h))}},s8={AUDIO:function(f,_){var h=_.vhs,u=_.sourceType,p=_.segmentLoaders[f],k=_.requestOptions,R=_.master.mediaGroups,q=_.mediaTypes[f],z=q.groups,de=q.tracks,Ee=q.logger_,Se=_.masterPlaylistLoader,ze=ph(Se.master);(!R[f]||Object.keys(R[f]).length===0)&&(R[f]={main:{default:{default:!0}}},ze&&(R[f].main.default.playlists=Se.master.playlists));for(var rt in R[f]){z[rt]||(z[rt]=[]);for(var _t in R[f][rt]){var lt=R[f][rt][_t],Bt=void 0;if(ze?(Ee("AUDIO group '"+rt+"' label '"+_t+"' is a master playlist"),lt.isMasterPlaylist=!0,Bt=null):u==="vhs-json"&&lt.playlists?Bt=new U_(lt.playlists[0],h,k):lt.resolvedUri?Bt=new U_(lt.resolvedUri,h,k):lt.playlists&&u==="dash"?Bt=new E1(lt.playlists[0],h,k,Se):Bt=null,lt=Wt.mergeOptions({id:_t,playlistLoader:Bt},lt),Kk[f](f,lt.playlistLoader,_),z[rt].push(lt),typeof de[_t]>"u"){var en=new Wt.AudioTrack({id:_t,kind:n8(lt),enabled:!1,language:lt.language,default:lt.default,label:_t});de[_t]=en}}}p.on("error",bg[f](f,_))},SUBTITLES:function(f,_){var h=_.tech,u=_.vhs,p=_.sourceType,k=_.segmentLoaders[f],R=_.requestOptions,q=_.master.mediaGroups,z=_.mediaTypes[f],de=z.groups,Ee=z.tracks,Se=_.masterPlaylistLoader;for(var ze in q[f]){de[ze]||(de[ze]=[]);for(var rt in q[f][ze])if(!q[f][ze][rt].forced){var _t=q[f][ze][rt],lt=void 0;if(p==="hls")lt=new U_(_t.resolvedUri,u,R);else if(p==="dash"){var Bt=_t.playlists.filter(function(En){return En.excludeUntil!==1/0});if(!Bt.length)return;lt=new E1(_t.playlists[0],u,R,Se)}else p==="vhs-json"&&(lt=new U_(_t.playlists?_t.playlists[0]:_t.resolvedUri,u,R));if(_t=Wt.mergeOptions({id:rt,playlistLoader:lt},_t),Kk[f](f,_t.playlistLoader,_),de[ze].push(_t),typeof Ee[rt]>"u"){var en=h.addRemoteTextTrack({id:rt,kind:"subtitles",default:_t.default&&_t.autoselect,language:_t.language,label:rt},!1).track;Ee[rt]=en}}}k.on("error",bg[f](f,_))},"CLOSED-CAPTIONS":function(f,_){var h=_.tech,u=_.master.mediaGroups,p=_.mediaTypes[f],k=p.groups,R=p.tracks;for(var q in u[f]){k[q]||(k[q]=[]);for(var z in u[f][q]){var de=u[f][q][z];if(/^(?:CC|SERVICE)/.test(de.instreamId)){var Ee=h.options_.vhs&&h.options_.vhs.captionServices||{},Se={label:z,language:de.language,instreamId:de.instreamId,default:de.default&&de.autoselect};if(Ee[Se.instreamId]&&(Se=Wt.mergeOptions(Se,Ee[Se.instreamId])),Se.default===void 0&&delete Se.default,k[q].push(Wt.mergeOptions({id:z},de)),typeof R[z]>"u"){var ze=h.addRemoteTextTrack({id:Se.instreamId,kind:"captions",default:Se.default,language:Se.language,label:Se.label},!1).track;R[z]=ze}}}}}},o8=function S(f,_){for(var h=0;h<f.length;h++)if(y1(_,f[h])||f[h].playlists&&S(f[h].playlists,_))return!0;return!1},l8=function(f,_){return function(h){var u=_.masterPlaylistLoader,p=_.mediaTypes[f].groups,k=u.media();if(!k)return null;var R=null;k.attributes[f]&&(R=p[k.attributes[f]]);var q=Object.keys(p);if(!R)if(f==="AUDIO"&&q.length>1&&ph(_.master))for(var z=0;z<q.length;z++){var de=p[q[z]];if(o8(de,k)){R=de;break}}else p.main?R=p.main:q.length===1&&(R=p[q[0]]);return typeof h>"u"?R:h===null||!R?null:R.filter(function(Ee){return Ee.id===h.id})[0]||null}},u8={AUDIO:function(f,_){return function(){var h=_.mediaTypes[f].tracks;for(var u in h)if(h[u].enabled)return h[u];return null}},SUBTITLES:function(f,_){return function(){var h=_.mediaTypes[f].tracks;for(var u in h)if(h[u].mode==="showing"||h[u].mode==="hidden")return h[u];return null}}},d8=function(f,_){var h=_.mediaTypes;return function(){var u=h[f].activeTrack();return u?h[f].activeGroup(u):null}},f8=function(f){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(rt){s8[rt](rt,f)});var _=f.mediaTypes,h=f.masterPlaylistLoader,u=f.tech,p=f.vhs,k=f.segmentLoaders,R=k.AUDIO,q=k.main;["AUDIO","SUBTITLES"].forEach(function(rt){_[rt].activeGroup=l8(rt,f),_[rt].activeTrack=u8[rt](rt,f),_[rt].onGroupChanged=i8(rt,f),_[rt].onGroupChanging=r8(rt,f),_[rt].onTrackChanged=a8(rt,f),_[rt].getActiveGroup=d8(rt,f)});var z=_.AUDIO.activeGroup();if(z){var de=(z.filter(function(rt){return rt.default})[0]||z[0]).id;_.AUDIO.tracks[de].enabled=!0,_.AUDIO.onGroupChanged(),_.AUDIO.onTrackChanged();var Ee=_.AUDIO.getActiveGroup();Ee.playlistLoader?(q.setAudio(!1),R.setAudio(!0)):q.setAudio(!0)}h.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(rt){return _[rt].onGroupChanged()})}),h.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(rt){return _[rt].onGroupChanging()})});var Se=function(){_.AUDIO.onTrackChanged(),u.trigger({type:"usage",name:"vhs-audio-change"}),u.trigger({type:"usage",name:"hls-audio-change"})};u.audioTracks().addEventListener("change",Se),u.remoteTextTracks().addEventListener("change",_.SUBTITLES.onTrackChanged),p.on("dispose",function(){u.audioTracks().removeEventListener("change",Se),u.remoteTextTracks().removeEventListener("change",_.SUBTITLES.onTrackChanged)}),u.clearTracks("audio");for(var ze in _.AUDIO.tracks)u.audioTracks().addTrack(_.AUDIO.tracks[ze])},c8=function(){var f={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(_){f[_]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Gd,activeTrack:Gd,getActiveGroup:Gd,onGroupChanged:Gd,onTrackChanged:Gd,lastTrack_:null,logger_:Mu("MediaGroups["+_+"]")}}),f},_8=60*2,Kd,p8=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],h8=function(f){return this.audioSegmentLoader_[f]+this.mainSegmentLoader_[f]},m8=function(f){var _=f.currentPlaylist,h=f.buffered,u=f.currentTime,p=f.nextPlaylist,k=f.bufferLowWaterLine,R=f.bufferHighWaterLine,q=f.duration,z=f.experimentalBufferBasedABR,de=f.log;if(!p)return Wt.log.warn("We received no playlist to switch to. Please check your stream."),!1;var Ee="allowing switch "+(_&&_.id||"null")+" -> "+p.id;if(!_)return de(Ee+" as current playlist is not set"),!0;if(p.id===_.id)return!1;var Se=!!j_(h,u).length;if(!_.endList)return!Se&&typeof _.partTargetDuration=="number"?(de("not "+Ee+" as current playlist is live llhls, but currentTime isn't in buffered."),!1):(de(Ee+" as current playlist is live"),!0);var ze=h1(h,u),rt=z?no.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:no.MAX_BUFFER_LOW_WATER_LINE;if(q<rt)return de(Ee+" as duration < max low water line ("+q+" < "+rt+")"),!0;var _t=p.attributes.BANDWIDTH,lt=_.attributes.BANDWIDTH;if(_t<lt&&(!z||ze<R)){var Bt=Ee+" as next bandwidth < current bandwidth ("+_t+" < "+lt+")";return z&&(Bt+=" and forwardBuffer < bufferHighWaterLine ("+ze+" < "+R+")"),de(Bt),!0}if((!z||_t>lt)&&ze>=k){var en=Ee+" as forwardBuffer >= bufferLowWaterLine ("+ze+" >= "+k+")";return z&&(en+=" and next bandwidth > current bandwidth ("+_t+" > "+lt+")"),de(en),!0}return de("not "+Ee+" as no switching criteria met"),!1},g8=function(S){_n(f,S);function f(h){var u;u=S.call(this)||this;var p=h.src,k=h.handleManifestRedirects,R=h.withCredentials,q=h.tech,z=h.bandwidth,de=h.externVhs,Ee=h.useCueTags,Se=h.blacklistDuration,ze=h.enableLowInitialPlaylist,rt=h.sourceType,_t=h.cacheEncryptionKeys,lt=h.experimentalBufferBasedABR,Bt=h.experimentalLeastPixelDiffSelector,en=h.captionServices;if(!p)throw new Error("A non-empty playlist URL or JSON manifest string is required");var En=h.maxPlaylistRetries;(En===null||typeof En>"u")&&(En=1/0),Kd=de,u.experimentalBufferBasedABR=!!lt,u.experimentalLeastPixelDiffSelector=!!Bt,u.withCredentials=R,u.tech_=q,u.vhs_=q.vhs,u.sourceType_=rt,u.useCueTags_=Ee,u.blacklistDuration=Se,u.maxPlaylistRetries=En,u.enableLowInitialPlaylist=ze,u.useCueTags_&&(u.cueTagsTrack_=u.tech_.addTextTrack("metadata","ad-cues"),u.cueTagsTrack_.inBandMetadataTrackDispatchType=""),u.requestOptions_={withCredentials:R,handleManifestRedirects:k,maxPlaylistRetries:En,timeout:null},u.on("error",u.pauseLoading),u.mediaTypes_=c8(),u.mediaSource=new window.MediaSource,u.handleDurationChange_=u.handleDurationChange_.bind(Bn(u)),u.handleSourceOpen_=u.handleSourceOpen_.bind(Bn(u)),u.handleSourceEnded_=u.handleSourceEnded_.bind(Bn(u)),u.mediaSource.addEventListener("durationchange",u.handleDurationChange_),u.mediaSource.addEventListener("sourceopen",u.handleSourceOpen_),u.mediaSource.addEventListener("sourceended",u.handleSourceEnded_),u.seekable_=Wt.createTimeRanges(),u.hasPlayed_=!1,u.syncController_=new JH(h),u.segmentMetadataTrack_=q.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,u.decrypter_=new t8,u.sourceUpdater_=new Vk(u.mediaSource),u.inbandTextTracks_={},u.timelineChangeController_=new ZH;var fn={vhs:u.vhs_,parse708captions:h.parse708captions,useDtsForTimestampOffset:h.useDtsForTimestampOffset,captionServices:en,mediaSource:u.mediaSource,currentTime:u.tech_.currentTime.bind(u.tech_),seekable:function(){return u.seekable()},seeking:function(){return u.tech_.seeking()},duration:function(){return u.duration()},hasPlayed:function(){return u.hasPlayed_},goalBufferLength:function(){return u.goalBufferLength()},bandwidth:z,syncController:u.syncController_,decrypter:u.decrypter_,sourceType:u.sourceType_,inbandTextTracks:u.inbandTextTracks_,cacheEncryptionKeys:_t,sourceUpdater:u.sourceUpdater_,timelineChangeController:u.timelineChangeController_,experimentalExactManifestTimings:h.experimentalExactManifestTimings};u.masterPlaylistLoader_=u.sourceType_==="dash"?new E1(p,u.vhs_,u.requestOptions_):new U_(p,u.vhs_,u.requestOptions_),u.setupMasterPlaylistLoaderListeners_(),u.mainSegmentLoader_=new M1(Wt.mergeOptions(fn,{segmentMetadataTrack:u.segmentMetadataTrack_,loaderType:"main"}),h),u.audioSegmentLoader_=new M1(Wt.mergeOptions(fn,{loaderType:"audio"}),h),u.subtitleSegmentLoader_=new GH(Wt.mergeOptions(fn,{loaderType:"vtt",featuresNativeTextTracks:u.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(Tn,bn){function An(){q.off("vttjserror",wn),Tn()}function wn(){q.off("vttjsloaded",An),bn()}q.one("vttjsloaded",An),q.one("vttjserror",wn),q.addWebVttScript_()})}}),h),u.setupSegmentLoaderListeners_(),u.experimentalBufferBasedABR&&(u.masterPlaylistLoader_.one("loadedplaylist",function(){return u.startABRTimer_()}),u.tech_.on("pause",function(){return u.stopABRTimer_()}),u.tech_.on("play",function(){return u.startABRTimer_()})),p8.forEach(function($n){u[$n+"_"]=h8.bind(Bn(u),$n)}),u.logger_=Mu("MPC"),u.triggeredFmp4Usage=!1,u.tech_.preload()==="none"?(u.loadOnPlay_=function(){u.loadOnPlay_=null,u.masterPlaylistLoader_.load()},u.tech_.one("play",u.loadOnPlay_)):u.masterPlaylistLoader_.load(),u.timeToLoadedData__=-1,u.mainAppendsToLoadedData__=-1,u.audioAppendsToLoadedData__=-1;var gn=u.tech_.preload()==="none"?"play":"loadstart";return u.tech_.one(gn,function(){var $n=Date.now();u.tech_.one("loadeddata",function(){u.timeToLoadedData__=Date.now()-$n,u.mainAppendsToLoadedData__=u.mainSegmentLoader_.mediaAppends,u.audioAppendsToLoadedData__=u.audioSegmentLoader_.mediaAppends})}),u}var _=f.prototype;return _.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},_.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},_.appendsToLoadedData_=function(){var u=this.mainAppendsToLoadedData_(),p=this.audioAppendsToLoadedData_();return u===-1||p===-1?-1:u+p},_.timeToLoadedData_=function(){return this.timeToLoadedData__},_.checkABR_=function(u){u===void 0&&(u="abr");var p=this.selectPlaylist();p&&this.shouldSwitchToMedia_(p)&&this.switchMedia_(p,u)},_.switchMedia_=function(u,p,k){var R=this.media(),q=R&&(R.id||R.uri),z=u.id||u.uri;q&&q!==z&&(this.logger_("switch media "+q+" -> "+z+" from "+p),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+p})),this.masterPlaylistLoader_.media(u,k)},_.startABRTimer_=function(){var u=this;this.stopABRTimer_(),this.abrTimer_=window.setInterval(function(){return u.checkABR_()},250)},_.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window.clearInterval(this.abrTimer_),this.abrTimer_=null)},_.getAudioTrackPlaylists_=function(){var u=this.master(),p=u&&u.playlists||[];if(!u||!u.mediaGroups||!u.mediaGroups.AUDIO)return p;var k=u.mediaGroups.AUDIO,R=Object.keys(k),q;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)q=this.mediaTypes_.AUDIO.activeTrack();else{var z=k.main||R.length&&k[R[0]];for(var de in z)if(z[de].default){q={label:de};break}}if(!q)return p;var Ee=[];for(var Se in k)if(k[Se][q.label]){var ze=k[Se][q.label];if(ze.playlists&&ze.playlists.length)Ee.push.apply(Ee,ze.playlists);else if(ze.uri)Ee.push(ze);else if(u.playlists.length)for(var rt=0;rt<u.playlists.length;rt++){var _t=u.playlists[rt];_t.attributes&&_t.attributes.AUDIO&&_t.attributes.AUDIO===Se&&Ee.push(_t)}}return Ee.length?Ee:p},_.setupMasterPlaylistLoaderListeners_=function(){var u=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var p=u.masterPlaylistLoader_.media(),k=p.targetDuration*1.5*1e3;b1(u.masterPlaylistLoader_.master,u.masterPlaylistLoader_.media())?u.requestOptions_.timeout=0:u.requestOptions_.timeout=k,p.endList&&u.tech_.preload()!=="none"&&(u.mainSegmentLoader_.playlist(p,u.requestOptions_),u.mainSegmentLoader_.load()),f8({sourceType:u.sourceType_,segmentLoaders:{AUDIO:u.audioSegmentLoader_,SUBTITLES:u.subtitleSegmentLoader_,main:u.mainSegmentLoader_},tech:u.tech_,requestOptions:u.requestOptions_,masterPlaylistLoader:u.masterPlaylistLoader_,vhs:u.vhs_,master:u.master(),mediaTypes:u.mediaTypes_,blacklistCurrentPlaylist:u.blacklistCurrentPlaylist.bind(u)}),u.triggerPresenceUsage_(u.master(),p),u.setupFirstPlay(),!u.mediaTypes_.AUDIO.activePlaylistLoader||u.mediaTypes_.AUDIO.activePlaylistLoader.media()?u.trigger("selectedinitialmedia"):u.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){u.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){u.loadOnPlay_&&u.tech_.off("play",u.loadOnPlay_);var p=u.masterPlaylistLoader_.media();if(!p){u.excludeUnsupportedVariants_();var k;if(u.enableLowInitialPlaylist&&(k=u.selectInitialPlaylist()),k||(k=u.selectPlaylist()),!k||!u.shouldSwitchToMedia_(k))return;u.initialMedia_=k,u.switchMedia_(u.initialMedia_,"initial");var R=u.sourceType_==="vhs-json"&&u.initialMedia_.segments;if(!R)return;p=u.initialMedia_}u.handleUpdatedMediaPlaylist(p)}),this.masterPlaylistLoader_.on("error",function(){u.blacklistCurrentPlaylist(u.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){u.mainSegmentLoader_.abort(),u.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var p=u.masterPlaylistLoader_.media(),k=p.targetDuration*1.5*1e3;b1(u.masterPlaylistLoader_.master,u.masterPlaylistLoader_.media())?u.requestOptions_.timeout=0:u.requestOptions_.timeout=k,u.masterPlaylistLoader_.load(),u.mainSegmentLoader_.playlist(p,u.requestOptions_),u.mainSegmentLoader_.load(),u.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var p=u.masterPlaylistLoader_.media();if(p.lastExcludeReason_!=="playlist-unchanged"){var k=u.stuckAtPlaylistEnd_(p);k&&(u.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),u.tech_.trigger("playliststuck"))}}),this.masterPlaylistLoader_.on("renditiondisabled",function(){u.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),u.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){u.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),u.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},_.handleUpdatedMediaPlaylist=function(u){this.useCueTags_&&this.updateAdCues_(u),this.mainSegmentLoader_.playlist(u,this.requestOptions_),this.updateDuration(!u.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},_.triggerPresenceUsage_=function(u,p){var k=u.mediaGroups||{},R=!0,q=Object.keys(k.AUDIO);for(var z in k.AUDIO)for(var de in k.AUDIO[z]){var Ee=k.AUDIO[z][de];Ee.uri||(R=!1)}R&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(k.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Kd.Playlist.isAes(p)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),q.length&&Object.keys(k.AUDIO[q[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},_.shouldSwitchToMedia_=function(u){var p=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,k=this.tech_.currentTime(),R=this.bufferLowWaterLine(),q=this.bufferHighWaterLine(),z=this.tech_.buffered();return m8({buffered:z,currentTime:k,currentPlaylist:p,nextPlaylist:u,bufferLowWaterLine:R,bufferHighWaterLine:q,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},_.setupSegmentLoaderListeners_=function(){var u=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){u.checkABR_("bandwidthupdate"),u.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){u.experimentalBufferBasedABR&&u.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){u.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){u.blacklistCurrentPlaylist(u.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){u.error=u.mainSegmentLoader_.error_,u.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){u.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){u.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),u.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){u.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){u.error=u.audioSegmentLoader_.error_,u.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){u.logger_("main segment loader ended"),u.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(k){u.experimentalBufferBasedABR||(u.delegateLoaders_("all",["abort"]),u.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},_8))});var p=function(){if(!u.sourceUpdater_.hasCreatedSourceBuffers())return u.tryToCreateSourceBuffers_();var R=u.getCodecsOrExclude_();R&&u.sourceUpdater_.addOrChangeSourceBuffers(R)};this.mainSegmentLoader_.on("trackinfo",p),this.audioSegmentLoader_.on("trackinfo",p),this.mainSegmentLoader_.on("fmp4",function(){u.triggeredFmp4Usage||(u.tech_.trigger({type:"usage",name:"vhs-fmp4"}),u.tech_.trigger({type:"usage",name:"hls-fmp4"}),u.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){u.triggeredFmp4Usage||(u.tech_.trigger({type:"usage",name:"vhs-fmp4"}),u.tech_.trigger({type:"usage",name:"hls-fmp4"}),u.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){u.logger_("audioSegmentLoader ended"),u.onEndOfStream()})},_.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},_.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},_.smoothQualityChange_=function(u){u===void 0&&(u=this.selectPlaylist()),this.fastQualityChange_(u)},_.fastQualityChange_=function(u){var p=this;if(u===void 0&&(u=this.selectPlaylist()),u===this.masterPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(u,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){Wt.browser.IE_VERSION||Wt.browser.IS_EDGE?p.tech_.setCurrentTime(p.tech_.currentTime()+.04):p.tech_.setCurrentTime(p.tech_.currentTime())})},_.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var u=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<u.start(0))return this.tech_.setCurrentTime(u.end(u.length-1))}},_.setupFirstPlay=function(){var u=this,p=this.masterPlaylistLoader_.media();if(!p||this.tech_.paused()||this.hasPlayed_)return!1;if(!p.endList){var k=this.seekable();if(!k.length)return!1;if(Wt.browser.IE_VERSION&&this.tech_.readyState()===0)return this.tech_.one("loadedmetadata",function(){u.trigger("firstplay"),u.tech_.setCurrentTime(k.end(0)),u.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(k.end(0))}return this.hasPlayed_=!0,this.load(),!0},_.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var u=this.tech_.play();typeof u<"u"&&typeof u.then=="function"&&u.then(null,function(p){})}this.trigger("sourceopen")},_.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var u=this.inbandTextTracks_.metadataTrack_.cues;if(!(!u||!u.length)){var p=this.duration();u[u.length-1].endTime=isNaN(p)||Math.abs(p)===1/0?Number.MAX_VALUE:p}}},_.handleDurationChange_=function(){this.tech_.trigger("durationchange")},_.onEndOfStream=function(){var u=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var p=this.mainSegmentLoader_.getCurrentMediaInfo_();!p||p.hasVideo?u=u&&this.audioSegmentLoader_.ended_:u=this.audioSegmentLoader_.ended_}u&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},_.stuckAtPlaylistEnd_=function(u){var p=this.seekable();if(!p.length)return!1;var k=this.syncController_.getExpiredTime(u,this.duration());if(k===null)return!1;var R=Kd.Playlist.playlistEnd(u,k),q=this.tech_.currentTime(),z=this.tech_.buffered();if(!z.length)return R-q<=_d;var de=z.end(z.length-1);return de-q<=_d&&R-de<=_d},_.blacklistCurrentPlaylist=function(u,p){u===void 0&&(u={});var k=u.playlist||this.masterPlaylistLoader_.media();if(p=p||u.blacklistDuration||this.blacklistDuration,!k){this.error=u,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}k.playlistErrors_++;var R=this.masterPlaylistLoader_.master.playlists,q=R.filter(dg),z=q.length===1&&q[0]===k;if(R.length===1&&p!==1/0)return Wt.log.warn("Problem encountered with playlist "+k.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(z);if(z){var de=!1;R.forEach(function(Bt){if(Bt!==k){var en=Bt.excludeUntil;typeof en<"u"&&en!==1/0&&(de=!0,delete Bt.excludeUntil)}}),de&&(Wt.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}var Ee;k.playlistErrors_>this.maxPlaylistRetries?Ee=1/0:Ee=Date.now()+p*1e3,k.excludeUntil=Ee,u.reason&&(k.lastExcludeReason_=u.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var Se=this.selectPlaylist();if(!Se){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}var ze=u.internal?this.logger_:Wt.log.warn,rt=u.message?" "+u.message:"";ze((u.internal?"Internal problem":"Problem")+" encountered with playlist "+k.id+"."+(rt+" Switching to playlist "+Se.id+".")),Se.attributes.AUDIO!==k.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),Se.attributes.SUBTITLES!==k.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var _t=Se.targetDuration/2*1e3||5*1e3,lt=typeof Se.lastRequest=="number"&&Date.now()-Se.lastRequest<=_t;return this.switchMedia_(Se,"exclude",z||lt)},_.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},_.delegateLoaders_=function(u,p){var k=this,R=[],q=u==="all";(q||u==="main")&&R.push(this.masterPlaylistLoader_);var z=[];(q||u==="audio")&&z.push("AUDIO"),(q||u==="subtitle")&&(z.push("CLOSED-CAPTIONS"),z.push("SUBTITLES")),z.forEach(function(de){var Ee=k.mediaTypes_[de]&&k.mediaTypes_[de].activePlaylistLoader;Ee&&R.push(Ee)}),["main","audio","subtitle"].forEach(function(de){var Ee=k[de+"SegmentLoader_"];Ee&&(u===de||u==="all")&&R.push(Ee)}),R.forEach(function(de){return p.forEach(function(Ee){typeof de[Ee]=="function"&&de[Ee]()})})},_.setCurrentTime=function(u){var p=j_(this.tech_.buffered(),u);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(p&&p.length)return u;this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),this.load()},_.duration=function(){if(!this.masterPlaylistLoader_)return 0;var u=this.masterPlaylistLoader_.media();return u?u.endList?this.mediaSource?this.mediaSource.duration:Kd.Playlist.duration(u):1/0:0},_.seekable=function(){return this.seekable_},_.onSyncInfoUpdate_=function(){var u;if(this.masterPlaylistLoader_){var p=this.masterPlaylistLoader_.media();if(p){var k=this.syncController_.getExpiredTime(p,this.duration());if(k!==null){var R=this.masterPlaylistLoader_.master,q=Kd.Playlist.seekable(p,k,Kd.Playlist.liveEdgeDelay(R,p));if(q.length!==0&&!(this.mediaTypes_.AUDIO.activePlaylistLoader&&(p=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),k=this.syncController_.getExpiredTime(p,this.duration()),k===null||(u=Kd.Playlist.seekable(p,k,Kd.Playlist.liveEdgeDelay(R,p)),u.length===0)))){var z,de;this.seekable_&&this.seekable_.length&&(z=this.seekable_.end(0),de=this.seekable_.start(0)),u?u.start(0)>q.end(0)||q.start(0)>u.end(0)?this.seekable_=q:this.seekable_=Wt.createTimeRanges([[u.start(0)>q.start(0)?u.start(0):q.start(0),u.end(0)<q.end(0)?u.end(0):q.end(0)]]):this.seekable_=q,!(this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===z&&this.seekable_.start(0)===de)&&(this.logger_("seekable updated ["+YT(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},_.updateDuration=function(u){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,u),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(u){var p=this.seekable();if(!p.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<p.end(p.length-1))&&this.sourceUpdater_.setDuration(p.end(p.length-1));return}var k=this.tech_.buffered(),R=Kd.Playlist.duration(this.masterPlaylistLoader_.media());k.length>0&&(R=Math.max(R,k.end(k.length-1))),this.mediaSource.duration!==R&&this.sourceUpdater_.setDuration(R)},_.dispose=function(){var u=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(p){var k=u.mediaTypes_[p].groups;for(var R in k)k[R].forEach(function(q){q.playlistLoader&&q.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},_.master=function(){return this.masterPlaylistLoader_.master},_.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},_.areMediaTypesKnown_=function(){var u=!!this.mediaTypes_.AUDIO.activePlaylistLoader,p=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),k=u?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!p||!k)},_.getCodecsOrExclude_=function(){var u=this,p={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},k=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();p.video=p.main;var R=hh(this.master(),k),q={},z=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(p.main.hasVideo&&(q.video=R.video||p.main.videoCodec||S_),p.main.isMuxed&&(q.video+=","+(R.audio||p.main.audioCodec||Gp)),(p.main.hasAudio&&!p.main.isMuxed||p.audio.hasAudio||z)&&(q.audio=R.audio||p.main.audioCodec||p.audio.audioCodec||Gp,p.audio.isFmp4=p.main.hasAudio&&!p.main.isMuxed?p.main.isFmp4:p.audio.isFmp4),!q.audio&&!q.video){this.blacklistCurrentPlaylist({playlist:k,message:"Could not determine codecs for playlist.",blacklistDuration:1/0});return}var de=function(Bt,en){return Bt?Wd(en):Ec(en)},Ee={},Se;if(["video","audio"].forEach(function(lt){if(q.hasOwnProperty(lt)&&!de(p[lt].isFmp4,q[lt])){var Bt=p[lt].isFmp4?"browser":"muxer";Ee[Bt]=Ee[Bt]||[],Ee[Bt].push(q[lt]),lt==="audio"&&(Se=Bt)}}),z&&Se&&k.attributes.AUDIO){var ze=k.attributes.AUDIO;this.master().playlists.forEach(function(lt){var Bt=lt.attributes&&lt.attributes.AUDIO;Bt===ze&&lt!==k&&(lt.excludeUntil=1/0)}),this.logger_("excluding audio group "+ze+" as "+Se+' does not support codec(s): "'+q.audio+'"')}if(Object.keys(Ee).length){var rt=Object.keys(Ee).reduce(function(lt,Bt){return lt&&(lt+=", "),lt+=Bt+' does not support codec(s): "'+Ee[Bt].join(",")+'"',lt},"")+".";this.blacklistCurrentPlaylist({playlist:k,internal:!0,message:rt,blacklistDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var _t=[];if(["video","audio"].forEach(function(lt){var Bt=(Pl(u.sourceUpdater_.codecs[lt]||"")[0]||{}).type,en=(Pl(q[lt]||"")[0]||{}).type;Bt&&en&&Bt.toLowerCase()!==en.toLowerCase()&&_t.push('"'+u.sourceUpdater_.codecs[lt]+'" -> "'+q[lt]+'"')}),_t.length){this.blacklistCurrentPlaylist({playlist:k,message:"Codec switching not supported: "+_t.join(", ")+".",blacklistDuration:1/0,internal:!0});return}}return q},_.tryToCreateSourceBuffers_=function(){if(!(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers())&&this.areMediaTypesKnown_()){var u=this.getCodecsOrExclude_();if(u){this.sourceUpdater_.createSourceBuffers(u);var p=[u.video,u.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(p)}}},_.excludeUnsupportedVariants_=function(){var u=this,p=this.master().playlists,k=[];Object.keys(p).forEach(function(R){var q=p[R];if(k.indexOf(q.id)===-1){k.push(q.id);var z=hh(u.master,q),de=[];z.audio&&!Ec(z.audio)&&!Wd(z.audio)&&de.push("audio codec "+z.audio),z.video&&!Ec(z.video)&&!Wd(z.video)&&de.push("video codec "+z.video),z.text&&z.text==="stpp.ttml.im1t"&&de.push("text codec "+z.text),de.length&&(q.excludeUntil=1/0,u.logger_("excluding "+q.id+" for unsupported: "+de.join(", ")))}})},_.excludeIncompatibleVariants_=function(u){var p=this,k=[],R=this.master().playlists,q=pg(Pl(u)),z=xk(q),de=q.video&&Pl(q.video)[0]||null,Ee=q.audio&&Pl(q.audio)[0]||null;Object.keys(R).forEach(function(Se){var ze=R[Se];if(!(k.indexOf(ze.id)!==-1||ze.excludeUntil===1/0)){k.push(ze.id);var rt=[],_t=hh(p.masterPlaylistLoader_.master,ze),lt=xk(_t);if(!(!_t.audio&&!_t.video)){if(lt!==z&&rt.push('codec count "'+lt+'" !== "'+z+'"'),!p.sourceUpdater_.canChangeType()){var Bt=_t.video&&Pl(_t.video)[0]||null,en=_t.audio&&Pl(_t.audio)[0]||null;Bt&&de&&Bt.type.toLowerCase()!==de.type.toLowerCase()&&rt.push('video codec "'+Bt.type+'" !== "'+de.type+'"'),en&&Ee&&en.type.toLowerCase()!==Ee.type.toLowerCase()&&rt.push('audio codec "'+en.type+'" !== "'+Ee.type+'"')}rt.length&&(ze.excludeUntil=1/0,p.logger_("blacklisting "+ze.id+": "+rt.join(" && ")))}}})},_.updateAdCues_=function(u){var p=0,k=this.seekable();k.length&&(p=k.start(0)),XH(u,this.cueTagsTrack_,p)},_.goalBufferLength=function(){var u=this.tech_.currentTime(),p=no.GOAL_BUFFER_LENGTH,k=no.GOAL_BUFFER_LENGTH_RATE,R=Math.max(p,no.MAX_GOAL_BUFFER_LENGTH);return Math.min(p+u*k,R)},_.bufferLowWaterLine=function(){var u=this.tech_.currentTime(),p=no.BUFFER_LOW_WATER_LINE,k=no.BUFFER_LOW_WATER_LINE_RATE,R=Math.max(p,no.MAX_BUFFER_LOW_WATER_LINE),q=Math.max(p,no.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(p+u*k,this.experimentalBufferBasedABR?q:R)},_.bufferHighWaterLine=function(){return no.BUFFER_HIGH_WATER_LINE},f}(Wt.EventTarget),v8=function(f,_,h){return function(u){var p=f.master.playlists[_],k=v1(p),R=dg(p);return typeof u>"u"?R:(u?delete p.disabled:p.disabled=!0,u!==R&&!k&&(h(),u?f.trigger("renditionenabled"):f.trigger("renditiondisabled")),u)}},b8=function(f,_,h){var u=f.masterPlaylistController_,p=f.options_.smoothQualityChange,k=p?"smooth":"fast",R=u[k+"QualityChange_"].bind(u);if(_.attributes){var q=_.attributes.RESOLUTION;this.width=q&&q.width,this.height=q&&q.height,this.bandwidth=_.attributes.BANDWIDTH,this.frameRate=_.attributes["FRAME-RATE"]}this.codecs=hh(u.master(),_),this.playlist=_,this.id=h,this.enabled=v8(f.playlists,_.id,R)},y8=function(f){f.representations=function(){var _=f.masterPlaylistController_.master(),h=ph(_)?f.masterPlaylistController_.getAudioTrackPlaylists_():_.playlists;return h?h.filter(function(u){return!v1(u)}).map(function(u,p){return new b8(f,u,u.id)}):[]}},Xk=["seeking","seeked","pause","playing","error"],w8=function(){function S(_){var h=this;this.masterPlaylistController_=_.masterPlaylistController,this.tech_=_.tech,this.seekable=_.seekable,this.allowSeeksWithinUnsafeLiveWindow=_.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=_.liveRangeSafeTimeDelta,this.media=_.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Mu("PlaybackWatcher"),this.logger_("initialize");var u=function(){return h.monitorCurrentTime_()},p=function(){return h.monitorCurrentTime_()},k=function(){return h.techWaiting_()},R=function(){return h.cancelTimer_()},q=this.masterPlaylistController_,z=["main","subtitle","audio"],de={};z.forEach(function(Se){de[Se]={reset:function(){return h.resetSegmentDownloads_(Se)},updateend:function(){return h.checkSegmentDownloads_(Se)}},q[Se+"SegmentLoader_"].on("appendsdone",de[Se].updateend),q[Se+"SegmentLoader_"].on("playlistupdate",de[Se].reset),h.tech_.on(["seeked","seeking"],de[Se].reset)});var Ee=function(ze){["main","audio"].forEach(function(rt){q[rt+"SegmentLoader_"][ze]("appended",h.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){h.fixesBadSeeks_()&&(h.consecutiveUpdates=0,h.lastRecordedTime=h.tech_.currentTime(),Ee("off"))},this.clearSeekingAppendCheck_=function(){return Ee("off")},this.watchForBadSeeking_=function(){h.clearSeekingAppendCheck_(),Ee("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",k),this.tech_.on(Xk,R),this.tech_.on("canplay",p),this.tech_.one("play",u),this.dispose=function(){h.clearSeekingAppendCheck_(),h.logger_("dispose"),h.tech_.off("waiting",k),h.tech_.off(Xk,R),h.tech_.off("canplay",p),h.tech_.off("play",u),h.tech_.off("seeking",h.watchForBadSeeking_),h.tech_.off("seeked",h.clearSeekingAppendCheck_),z.forEach(function(Se){q[Se+"SegmentLoader_"].off("appendsdone",de[Se].updateend),q[Se+"SegmentLoader_"].off("playlistupdate",de[Se].reset),h.tech_.off(["seeked","seeking"],de[Se].reset)}),h.checkCurrentTimeTimeout_&&window.clearTimeout(h.checkCurrentTimeTimeout_),h.cancelTimer_()}}var f=S.prototype;return f.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=window.setTimeout(this.monitorCurrentTime_.bind(this),250)},f.resetSegmentDownloads_=function(h){var u=this.masterPlaylistController_[h+"SegmentLoader_"];this[h+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+h+" loader"),this[h+"StalledDownloads_"]=0,this[h+"Buffered_"]=u.buffered_()},f.checkSegmentDownloads_=function(h){var u=this.masterPlaylistController_,p=u[h+"SegmentLoader_"],k=p.buffered_(),R=c6(this[h+"Buffered_"],k);if(this[h+"Buffered_"]=k,R){this.resetSegmentDownloads_(h);return}this[h+"StalledDownloads_"]++,this.logger_("found #"+this[h+"StalledDownloads_"]+" "+h+" appends that did not increase buffer (possible stalled download)",{playlistId:p.playlist_&&p.playlist_.id,buffered:xc(k)}),!(this[h+"StalledDownloads_"]<10)&&(this.logger_(h+" loader stalled download exclusion"),this.resetSegmentDownloads_(h),this.tech_.trigger({type:"usage",name:"vhs-"+h+"-download-exclusion"}),h!=="subtitle"&&u.blacklistCurrentPlaylist({message:"Excessive "+h+" segment downloading detected."},1/0))},f.checkCurrentTime_=function(){if(!(this.tech_.paused()||this.tech_.seeking())){var h=this.tech_.currentTime(),u=this.tech_.buffered();if(this.lastRecordedTime===h&&(!u.length||h+_d>=u.end(u.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&h===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):h===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=h)}},f.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},f.fixesBadSeeks_=function(){var h=this.tech_.seeking();if(!h)return!1;var u=this.seekable(),p=this.tech_.currentTime(),k=this.afterSeekableWindow_(u,p,this.media(),this.allowSeeksWithinUnsafeLiveWindow),R;if(k){var q=u.end(u.length-1);R=q}if(this.beforeSeekableWindow_(u,p)){var z=u.start(0);R=z+(z===u.end(0)?0:_d)}if(typeof R<"u")return this.logger_("Trying to seek outside of seekable at time "+p+" with "+("seekable range "+YT(u)+". Seeking to ")+(R+".")),this.tech_.setCurrentTime(R),!0;for(var de=this.masterPlaylistController_.sourceUpdater_,Ee=this.tech_.buffered(),Se=de.audioBuffer?de.audioBuffered():null,ze=de.videoBuffer?de.videoBuffered():null,rt=this.media(),_t=rt.partTargetDuration?rt.partTargetDuration:(rt.targetDuration-Qf)*2,lt=[Se,ze],Bt=0;Bt<lt.length;Bt++)if(lt[Bt]){var en=h1(lt[Bt],p);if(en<_t)return!1}var En=ug(Ee,p);return En.length===0?!1:(R=En.start(0)+_d,this.logger_("Buffered region starts ("+En.start(0)+") "+(" just beyond seek point ("+p+"). Seeking to "+R+".")),this.tech_.setCurrentTime(R),!0)},f.waiting_=function(){if(!this.techWaiting_()){var h=this.tech_.currentTime(),u=this.tech_.buffered(),p=j_(u,h);if(p.length&&h+3<=p.end(0)){this.cancelTimer_(),this.tech_.setCurrentTime(h),this.logger_("Stopped at "+h+" while inside a buffered region "+("["+p.start(0)+" -> "+p.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},f.techWaiting_=function(){var h=this.seekable(),u=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null)return!0;if(this.beforeSeekableWindow_(h,u)){var p=h.end(h.length-1);return this.logger_("Fell out of live window at time "+u+". Seeking to "+("live point (seekable end) "+p)),this.cancelTimer_(),this.tech_.setCurrentTime(p),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var k=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,R=this.tech_.buffered(),q=this.videoUnderflow_({audioBuffered:k.audioBuffered(),videoBuffered:k.videoBuffered(),currentTime:u});if(q)return this.cancelTimer_(),this.tech_.setCurrentTime(u),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var z=ug(R,u);if(z.length>0){var de=z.start(0)-u;return this.logger_("Stopped at "+u+", setting timer for "+de+", seeking "+("to "+z.start(0))),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),de*1e3,u),!0}return!1},f.afterSeekableWindow_=function(h,u,p,k){if(k===void 0&&(k=!1),!h.length)return!1;var R=h.end(h.length-1)+_d,q=!p.endList;return q&&k&&(R=h.end(h.length-1)+p.targetDuration*3),u>R},f.beforeSeekableWindow_=function(h,u){return!!(h.length&&h.start(0)>0&&u<h.start(0)-this.liveRangeSafeTimeDelta)},f.videoUnderflow_=function(h){var u=h.videoBuffered,p=h.audioBuffered,k=h.currentTime;if(u){var R;if(u.length&&p.length){var q=j_(u,k-3),z=j_(u,k),de=j_(p,k);de.length&&!z.length&&q.length&&(R={start:q.end(0),end:de.end(0)})}else{var Ee=ug(u,k);Ee.length||(R=this.gapFromVideoUnderflow_(u,k))}return R?(this.logger_("Encountered a gap in video from "+R.start+" to "+R.end+". "+("Seeking to current time "+k)),!0):!1}},f.skipTheGap_=function(h){var u=this.tech_.buffered(),p=this.tech_.currentTime(),k=ug(u,p);this.cancelTimer_(),!(k.length===0||p!==h)&&(this.logger_("skipTheGap_:","currentTime:",p,"scheduled currentTime:",h,"nextRange start:",k.start(0)),this.tech_.setCurrentTime(k.start(0)+Qf),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},f.gapFromVideoUnderflow_=function(h,u){for(var p=u6(h),k=0;k<p.length;k++){var R=p.start(k),q=p.end(k);if(u-R<4&&u-R>2)return{start:R,end:q}}return null},S}(),T8={errorInterval:30,getSource:function(f){var _=this.tech({IWillNotUseThisInPlugins:!0}),h=_.currentSource_||this.currentSource();return f(h)}},k8=function S(f,_){var h=0,u=0,p=Wt.mergeOptions(T8,_);f.ready(function(){f.trigger({type:"usage",name:"vhs-error-reload-initialized"}),f.trigger({type:"usage",name:"hls-error-reload-initialized"})});var k=function(){u&&f.currentTime(u)},R=function(Se){Se!=null&&(u=f.duration()!==1/0&&f.currentTime()||0,f.one("loadedmetadata",k),f.src(Se),f.trigger({type:"usage",name:"vhs-error-reload"}),f.trigger({type:"usage",name:"hls-error-reload"}),f.play())},q=function(){if(Date.now()-h<p.errorInterval*1e3){f.trigger({type:"usage",name:"vhs-error-reload-canceled"}),f.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!p.getSource||typeof p.getSource!="function"){Wt.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return h=Date.now(),p.getSource.call(f,R)},z=function Ee(){f.off("loadedmetadata",k),f.off("error",q),f.off("dispose",Ee)},de=function(Se){z(),S(f,Se)};f.on("error",q),f.on("dispose",z),f.reloadSourceOnError=de},S8=function(f){k8(this,f)},Qk="2.16.2",C8="6.0.1",P8="0.22.1",E8="4.8.0",I8="3.1.3",co={PlaylistLoader:U_,Playlist:ol,utils:F6,STANDARD_PLAYLIST_SELECTOR:Nk,INITIAL_PLAYLIST_SELECTOR:PH,lastBandwidthSelector:Nk,movingAverageBandwidthSelector:SH,comparePlaylistBandwidth:O1,comparePlaylistResolution:kH,xhr:fk()};Object.keys(no).forEach(function(S){Object.defineProperty(co,S,{get:function(){return Wt.log.warn("using Vhs."+S+" is UNSAFE be sure you know what you are doing"),no[S]},set:function(_){if(Wt.log.warn("using Vhs."+S+" is UNSAFE be sure you know what you are doing"),typeof _!="number"||_<0){Wt.log.warn("value of Vhs."+S+" must be greater than or equal to 0");return}no[S]=_}})});var Jk="videojs-vhs",Zk=function(f,_){for(var h=_.media(),u=-1,p=0;p<f.length;p++)if(f[p].id===h.id){u=p;break}f.selectedIndex_=u,f.trigger({selectedIndex:u,type:"change"})},A8=function(f,_){_.representations().forEach(function(h){f.addQualityLevel(h)}),Zk(f,_.playlists)};co.canPlaySource=function(){return Wt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var D8=function(f,_,h){if(!f)return f;var u={};_&&_.attributes&&_.attributes.CODECS&&(u=pg(Pl(_.attributes.CODECS))),h&&h.attributes&&h.attributes.CODECS&&(u.audio=h.attributes.CODECS);var p=qf(u.video),k=qf(u.audio),R={};for(var q in f)R[q]={},k&&(R[q].audioContentType=k),p&&(R[q].videoContentType=p),_.contentProtection&&_.contentProtection[q]&&_.contentProtection[q].pssh&&(R[q].pssh=_.contentProtection[q].pssh),typeof f[q]=="string"&&(R[q].url=f[q]);return Wt.mergeOptions(f,R)},O8=function(f,_){return f.reduce(function(h,u){if(!u.contentProtection)return h;var p=_.reduce(function(k,R){var q=u.contentProtection[R];return q&&q.pssh&&(k[R]={pssh:q.pssh}),k},{});return Object.keys(p).length&&h.push(p),h},[])},M8=function(f){var _=f.player,h=f.sourceKeySystems,u=f.audioMedia,p=f.mainPlaylists;if(!_.eme.initializeMediaKeys)return Promise.resolve();var k=u?p.concat([u]):p,R=O8(k,Object.keys(h)),q=[],z=[];return R.forEach(function(de){z.push(new Promise(function(Ee,Se){_.tech_.one("keysessioncreated",Ee)})),q.push(new Promise(function(Ee,Se){_.eme.initializeMediaKeys({keySystems:de},function(ze){if(ze){Se(ze);return}Ee()})}))}),Promise.race([Promise.all(q),Promise.race(z)])},x8=function(f){var _=f.player,h=f.sourceKeySystems,u=f.media,p=f.audioMedia,k=D8(h,u,p);return k?(_.currentSource().keySystems=k,k&&!_.eme?(Wt.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},eS=function(){if(!window.localStorage)return null;var f=window.localStorage.getItem(Jk);if(!f)return null;try{return JSON.parse(f)}catch{return null}},R8=function(f){if(!window.localStorage)return!1;var _=eS();_=_?Wt.mergeOptions(_,f):f;try{window.localStorage.setItem(Jk,JSON.stringify(_))}catch{return!1}return _},$8=function(f){return f.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(f.substring(f.indexOf(",")+1)):f};co.supportsNativeHls=function(){if(!document||!document.createElement)return!1;var S=document.createElement("video");if(!Wt.getTech("Html5").isSupported())return!1;var f=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return f.some(function(_){return/maybe|probably/i.test(S.canPlayType(_))})}(),co.supportsNativeDash=function(){return!document||!document.createElement||!Wt.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(document.createElement("video").canPlayType("application/dash+xml"))}(),co.supportsTypeNatively=function(S){return S==="hls"?co.supportsNativeHls:S==="dash"?co.supportsNativeDash:!1},co.isSupported=function(){return Wt.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var N8=Wt.getComponent("Component"),N1=function(S){_n(f,S);function f(h,u,p){var k;if(k=S.call(this,u,Wt.mergeOptions(p.hls,p.vhs))||this,p.hls&&Object.keys(p.hls).length&&Wt.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),typeof p.initialBandwidth=="number"&&(k.options_.bandwidth=p.initialBandwidth),k.logger_=Mu("VhsHandler"),u.options_&&u.options_.playerId){var R=Wt(u.options_.playerId);R.hasOwnProperty("hls")||Object.defineProperty(R,"hls",{get:function(){return Wt.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),u.trigger({type:"usage",name:"hls-player-access"}),Bn(k)},configurable:!0}),R.hasOwnProperty("vhs")||Object.defineProperty(R,"vhs",{get:function(){return Wt.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),u.trigger({type:"usage",name:"vhs-player-access"}),Bn(k)},configurable:!0}),R.hasOwnProperty("dash")||Object.defineProperty(R,"dash",{get:function(){return Wt.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),Bn(k)},configurable:!0}),k.player_=R}if(k.tech_=u,k.source_=h,k.stats={},k.ignoreNextSeekingEvent_=!1,k.setOptions_(),k.options_.overrideNative&&u.overrideNativeAudioTracks&&u.overrideNativeVideoTracks)u.overrideNativeAudioTracks(!0),u.overrideNativeVideoTracks(!0);else if(k.options_.overrideNative&&(u.featuresNativeVideoTracks||u.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return k.on(document,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(q){var z=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;z&&z.contains(k.tech_.el())?k.masterPlaylistController_.fastQualityChange_():k.masterPlaylistController_.checkABR_()}),k.on(k.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),k.on(k.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),k.on(k.tech_,"play",k.play),k}var _=f.prototype;return _.setOptions_=function(){var u=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects!==!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=5*60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){var p=eS();p&&p.bandwidth&&(this.options_.bandwidth=p.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),p&&p.throughput&&(this.options_.throughput=p.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=no.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===no.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(k){typeof u.source_[k]<"u"&&(u.options_[k]=u.source_[k])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},_.src=function(u,p){var k=this;if(u){this.setOptions_(),this.options_.src=$8(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=co,this.options_.sourceType=Kp(p),this.options_.seekTo=function(z){k.tech_.setCurrentTime(z)},this.options_.smoothQualityChange&&Wt.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new g8(this.options_);var R=Wt.mergeOptions({liveRangeSafeTimeDelta:_d},this.options_,{seekable:function(){return k.seekable()},media:function(){return k.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new w8(R),this.masterPlaylistController_.on("error",function(){var z=Wt.players[k.tech_.options_.playerId],de=k.masterPlaylistController_.error;typeof de=="object"&&!de.code?de.code=3:typeof de=="string"&&(de={message:de,code:3}),z.error(de)});var q=this.options_.experimentalBufferBasedABR?co.movingAverageBandwidthSelector(.55):co.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):q.bind(this),this.masterPlaylistController_.selectInitialPlaylist=co.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(de){this.masterPlaylistController_.selectPlaylist=de.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(de){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=de,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var de=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,Ee=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,Se=1e7;if(this.options_.useNetworkInformationApi&&Ee){var ze=Ee.downlink*1e3*1e3;ze>=Se&&de>=Se?de=Math.max(de,ze):de=ze}return de},set:function(de){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=de,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var de=1/(this.bandwidth||1),Ee;this.throughput>0?Ee=1/this.throughput:Ee=0;var Se=Math.floor(1/(de+Ee));return Se},set:function(){Wt.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return k.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return k.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return k.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return k.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return k.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return k.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return k.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return k.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return k.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return k.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return k.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return k.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return k.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return xc(k.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return k.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return k.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return k.tech_.name_},enumerable:!0},duration:{get:function(){return k.tech_.duration()},enumerable:!0},master:{get:function(){return k.playlists.master},enumerable:!0},playerDimensions:{get:function(){return k.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return xc(k.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return k.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){k.options_.useBandwidthFromLocalStorage&&R8({bandwidth:k.bandwidth,throughput:Math.round(k.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){y8(k)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){k.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=window.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},_.createKeySessions_=function(){var u=this,p=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),M8({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:p&&p.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){u.logger_("created EME key session"),u.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(k){u.logger_("error while creating EME key session",k),u.player_.error({message:"Failed to initialize media keys for EME",code:3})})},_.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},_.setupEme_=function(){var u=this,p=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,k=x8({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:p&&p.media()});if(this.player_.tech_.on("keystatuschange",function(R){if(R.status==="output-restricted"){var q=u.masterPlaylistController_.master();if(!(!q||!q.playlists)){var z=[];if(q.playlists.forEach(function(Ee){Ee&&Ee.attributes&&Ee.attributes.RESOLUTION&&Ee.attributes.RESOLUTION.height>=720&&(!Ee.excludeUntil||Ee.excludeUntil<1/0)&&(Ee.excludeUntil=1/0,z.push(Ee))}),z.length){var de;(de=Wt.log).warn.apply(de,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(z)),u.masterPlaylistController_.fastQualityChange_()}}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),Wt.browser.IE_VERSION===11||!k){this.masterPlaylistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()},_.setupQualityLevels_=function(){var u=this,p=Wt.players[this.tech_.options_.playerId];!p||!p.qualityLevels||this.qualityLevels_||(this.qualityLevels_=p.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){A8(u.qualityLevels_,u)}),this.playlists.on("mediachange",function(){Zk(u.qualityLevels_,u.playlists)}))},f.version=function(){return{"@videojs/http-streaming":Qk,"mux.js":C8,"mpd-parser":P8,"m3u8-parser":E8,"aes-decrypter":I8}},_.version=function(){return this.constructor.version()},_.canChangeType=function(){return Vk.canChangeType()},_.play=function(){this.masterPlaylistController_.play()},_.setCurrentTime=function(u){this.masterPlaylistController_.setCurrentTime(u)},_.duration=function(){return this.masterPlaylistController_.duration()},_.seekable=function(){return this.masterPlaylistController_.seekable()},_.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&window.URL.revokeObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),S.prototype.dispose.call(this)},_.convertToProgramTime=function(u,p){return W6({playlist:this.masterPlaylistController_.media(),time:u,callback:p})},_.seekToProgramTime=function(u,p,k,R){return k===void 0&&(k=!0),R===void 0&&(R=2),V6({programTime:u,playlist:this.masterPlaylistController_.media(),retryCount:R,pauseAfterSeek:k,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:p})},f}(N8),vh={name:"videojs-http-streaming",VERSION:Qk,canHandleSource:function(f,_){_===void 0&&(_={});var h=Wt.mergeOptions(Wt.options,_);return vh.canPlayType(f.type,h)},handleSource:function(f,_,h){h===void 0&&(h={});var u=Wt.mergeOptions(Wt.options,h);return _.vhs=new N1(f,_,u),Wt.hasOwnProperty("hls")||Object.defineProperty(_,"hls",{get:function(){return Wt.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),_.vhs},configurable:!0}),_.vhs.xhr=fk(),_.vhs.src(f.src,f.type),_.vhs},canPlayType:function(f,_){var h=Kp(f);if(!h)return"";var u=vh.getOverrideNative(_),p=co.supportsTypeNatively(h),k=!p||u;return k?"maybe":""},getOverrideNative:function(f){f===void 0&&(f={});var _=f,h=_.vhs,u=h===void 0?{}:h,p=_.hls,k=p===void 0?{}:p,R=!(Wt.browser.IS_ANY_SAFARI||Wt.browser.IS_IOS),q=u.overrideNative,z=q===void 0?R:q,de=k.overrideNative,Ee=de===void 0?!1:de;return Ee||z}},F8=function(){return Wd("avc1.4d400d,mp4a.40.2")};if(F8()&&Wt.getTech("Html5").registerSourceHandler(vh,0),Wt.VhsHandler=N1,Object.defineProperty(Wt,"HlsHandler",{get:function(){return Wt.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),N1},configurable:!0}),Wt.VhsSourceHandler=vh,Object.defineProperty(Wt,"HlsSourceHandler",{get:function(){return Wt.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),vh},configurable:!0}),Wt.Vhs=co,Object.defineProperty(Wt,"Hls",{get:function(){return Wt.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),co},configurable:!0}),Wt.use||(Wt.registerComponent("Hls",co),Wt.registerComponent("Vhs",co)),Wt.options.vhs=Wt.options.vhs||{},Wt.options.hls=Wt.options.hls||{},!Wt.getPlugin||!Wt.getPlugin("reloadSourceOnError")){var L8=Wt.registerPlugin||Wt.plugin;L8("reloadSourceOnError",S8)}return Wt})})(sx);var HOe=sx.exports,Ub={exports:{}};(function(e,t){(function(n,i){i(e,t)})(zs,function(n,i){Object.defineProperty(i,"__esModule",{value:!0});var r,a;function s(M,F){if(!(M instanceof F))throw new TypeError("Cannot call a class as a function")}var o=function(){function M(F,$){for(var L=0;L<$.length;L++){var j=$[L];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(F,j.key,j)}}return function(F,$,L){return $&&M(F.prototype,$),L&&M(F,L),F}}();function l(M,F){return F.indexOf(M)>=0}function d(M,F){for(var $ in F)if(M[$]==null){var L=F[$];M[$]=L}return M}function c(M){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(M)}function v(M){var F=arguments.length<=1||arguments[1]===void 0?!1:arguments[1],$=arguments.length<=2||arguments[2]===void 0?!1:arguments[2],L=arguments.length<=3||arguments[3]===void 0?null:arguments[3],j=void 0;return document.createEvent!=null?(j=document.createEvent("CustomEvent"),j.initCustomEvent(M,F,$,L)):document.createEventObject!=null?(j=document.createEventObject(),j.eventType=M):j.eventName=M,j}function T(M,F){M.dispatchEvent!=null?M.dispatchEvent(F):F in(M!=null)?M[F]():"on"+F in(M!=null)&&M["on"+F]()}function b(M,F,$){M.addEventListener!=null?M.addEventListener(F,$,!1):M.attachEvent!=null?M.attachEvent("on"+F,$):M[F]=$}function A(M,F,$){M.removeEventListener!=null?M.removeEventListener(F,$,!1):M.detachEvent!=null?M.detachEvent("on"+F,$):delete M[F]}function E(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}var y=window.WeakMap||window.MozWeakMap||function(){function M(){s(this,M),this.keys=[],this.values=[]}return o(M,[{key:"get",value:function($){for(var L=0;L<this.keys.length;L++){var j=this.keys[L];if(j===$)return this.values[L]}}},{key:"set",value:function($,L){for(var j=0;j<this.keys.length;j++){var H=this.keys[j];if(H===$)return this.values[j]=L,this}return this.keys.push($),this.values.push(L),this}}]),M}(),I=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(a=r=function(){function M(){s(this,M),typeof console<"u"&&console!==null&&(console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content."))}return o(M,[{key:"observe",value:function(){}}]),M}(),r.notSupported=!0,a),D=window.getComputedStyle||function(F){var $=/(\-([a-z]){1})/g;return{getPropertyValue:function(j){j==="float"&&(j="styleFloat"),$.test(j)&&j.replace($,function(V,Q){return Q.toUpperCase()});var H=F.currentStyle;return(H!=null?H[j]:void 0)||null}}},O=function(){function M(){var F=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];s(this,M),this.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},this.animate=function(){return"requestAnimationFrame"in window?function(L){return window.requestAnimationFrame(L)}:function(L){return L()}}(),this.vendors=["moz","webkit"],this.start=this.start.bind(this),this.resetAnimation=this.resetAnimation.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.scrollCallback=this.scrollCallback.bind(this),this.scrolled=!0,this.config=d(F,this.defaults),F.scrollContainer!=null&&(this.config.scrollContainer=document.querySelector(F.scrollContainer)),this.animationNameCache=new y,this.wowEvent=v(this.config.boxClass)}return o(M,[{key:"init",value:function(){this.element=window.document.documentElement,l(document.readyState,["interactive","complete"])?this.start():b(document,"DOMContentLoaded",this.start),this.finished=[]}},{key:"start",value:function(){var $=this;if(this.stopped=!1,this.boxes=[].slice.call(this.element.querySelectorAll("."+this.config.boxClass)),this.all=this.boxes.slice(0),this.boxes.length)if(this.disabled())this.resetStyle();else for(var L=0;L<this.boxes.length;L++){var j=this.boxes[L];this.applyStyle(j,!0)}if(this.disabled()||(b(this.config.scrollContainer||window,"scroll",this.scrollHandler),b(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live){var H=new I(function(V){for(var Q=0;Q<V.length;Q++)for(var X=V[Q],te=0;te<X.addedNodes.length;te++){var ne=X.addedNodes[te];$.doSync(ne)}});H.observe(document.body,{childList:!0,subtree:!0})}}},{key:"stop",value:function(){this.stopped=!0,A(this.config.scrollContainer||window,"scroll",this.scrollHandler),A(window,"resize",this.scrollHandler),this.interval!=null&&clearInterval(this.interval)}},{key:"sync",value:function(){I.notSupported&&this.doSync(this.element)}},{key:"doSync",value:function($){if((typeof $>"u"||$===null)&&($=this.element),$.nodeType===1){$=$.parentNode||$;for(var L=$.querySelectorAll("."+this.config.boxClass),j=0;j<L.length;j++){var H=L[j];l(H,this.all)||(this.boxes.push(H),this.all.push(H),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(H,!0),this.scrolled=!0)}}}},{key:"show",value:function($){return this.applyStyle($),$.className=$.className+" "+this.config.animateClass,this.config.callback!=null&&this.config.callback($),T($,this.wowEvent),b($,"animationend",this.resetAnimation),b($,"oanimationend",this.resetAnimation),b($,"webkitAnimationEnd",this.resetAnimation),b($,"MSAnimationEnd",this.resetAnimation),$}},{key:"applyStyle",value:function($,L){var j=this,H=$.getAttribute("data-wow-duration"),V=$.getAttribute("data-wow-delay"),Q=$.getAttribute("data-wow-iteration");return this.animate(function(){return j.customStyle($,L,H,V,Q)})}},{key:"resetStyle",value:function(){for(var $=0;$<this.boxes.length;$++){var L=this.boxes[$];L.style.visibility="visible"}}},{key:"resetAnimation",value:function($){if($.type.toLowerCase().indexOf("animationend")>=0){var L=$.target||$.srcElement;L.className=L.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function($,L,j,H,V){return L&&this.cacheAnimationName($),$.style.visibility=L?"hidden":"visible",j&&this.vendorSet($.style,{animationDuration:j}),H&&this.vendorSet($.style,{animationDelay:H}),V&&this.vendorSet($.style,{animationIterationCount:V}),this.vendorSet($.style,{animationName:L?"none":this.cachedAnimationName($)}),$}},{key:"vendorSet",value:function($,L){for(var j in L)if(L.hasOwnProperty(j)){var H=L[j];$[""+j]=H;for(var V=0;V<this.vendors.length;V++){var Q=this.vendors[V];$[""+Q+j.charAt(0).toUpperCase()+j.substr(1)]=H}}}},{key:"vendorCSS",value:function($,L){for(var j=D($),H=j.getPropertyCSSValue(L),V=0;V<this.vendors.length;V++){var Q=this.vendors[V];H=H||j.getPropertyCSSValue("-"+Q+"-"+L)}return H}},{key:"animationName",value:function($){var L=void 0;try{L=this.vendorCSS($,"animation-name").cssText}catch{L=D($).getPropertyValue("animation-name")}return L==="none"?"":L}},{key:"cacheAnimationName",value:function($){return this.animationNameCache.set($,this.animationName($))}},{key:"cachedAnimationName",value:function($){return this.animationNameCache.get($)}},{key:"scrollHandler",value:function(){this.scrolled=!0}},{key:"scrollCallback",value:function(){if(this.scrolled){this.scrolled=!1;for(var $=[],L=0;L<this.boxes.length;L++){var j=this.boxes[L];if(j){if(this.isVisible(j)){this.show(j);continue}$.push(j)}}this.boxes=$,!this.boxes.length&&!this.config.live&&this.stop()}}},{key:"offsetTop",value:function($){for(;$.offsetTop===void 0;)$=$.parentNode;for(var L=$.offsetTop;$.offsetParent;)$=$.offsetParent,L+=$.offsetTop;return L}},{key:"isVisible",value:function($){var L=$.getAttribute("data-wow-offset")||this.config.offset,j=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,H=j+Math.min(this.element.clientHeight,E())-L,V=this.offsetTop($),Q=V+$.clientHeight;return V<=H&&Q>=j}},{key:"disabled",value:function(){return!this.config.mobile&&c(navigator.userAgent)}}]),M}();i.default=O,n.exports=i.default})})(Ub,Ub.exports);var X7=Ub.exports;const Q7=cl(X7);var ox={exports:{}};/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */(function(e,t){(function(n){var i;if(e.exports=n(),i=!0,!i){var r=window.Cookies,a=window.Cookies=n();a.noConflict=function(){return window.Cookies=r,a}}})(function(){function n(){for(var a=0,s={};a<arguments.length;a++){var o=arguments[a];for(var l in o)s[l]=o[l]}return s}function i(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function r(a){function s(){}function o(d,c,v){if(!(typeof document>"u")){v=n({path:"/"},s.defaults,v),typeof v.expires=="number"&&(v.expires=new Date(new Date*1+v.expires*864e5)),v.expires=v.expires?v.expires.toUTCString():"";try{var T=JSON.stringify(c);/^[\{\[]/.test(T)&&(c=T)}catch{}c=a.write?a.write(c,d):encodeURIComponent(String(c)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),d=encodeURIComponent(String(d)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var b="";for(var A in v)v[A]&&(b+="; "+A,v[A]!==!0&&(b+="="+v[A].split(";")[0]));return document.cookie=d+"="+c+b}}function l(d,c){if(!(typeof document>"u")){for(var v={},T=document.cookie?document.cookie.split("; "):[],b=0;b<T.length;b++){var A=T[b].split("="),E=A.slice(1).join("=");!c&&E.charAt(0)==='"'&&(E=E.slice(1,-1));try{var y=i(A[0]);if(E=(a.read||a)(E,y)||i(E),c)try{E=JSON.parse(E)}catch{}if(v[y]=E,d===y)break}catch{}}return d?v[d]:v}}return s.set=o,s.get=function(d){return l(d,!1)},s.getJSON=function(d){return l(d,!0)},s.remove=function(d,c){o(d,"",n(c,{expires:-1}))},s.defaults={},s.withConverter=r,s}return r(function(){})})})(ox);var J7=ox.exports;const Z7=cl(J7);au(function(){return au("#toggle-left").on("click",function(){var e;return e=au("#main-wrapper"),au(window).width()>767?e.toggleClass("sidebar-mini"):e.toggleClass("sidebar-opened"),Z7.set("sidebar_classes",e.attr("class"))})});const Q_=[];function eB(e,t){return{subscribe:ao(e,t).subscribe}}function ao(e,t=ot){let n;const i=new Set;function r(o){if(Kt(e,o)&&(e=o,n)){const l=!Q_.length;for(const d of i)d[1](),Q_.push(d,e);if(l){for(let d=0;d<Q_.length;d+=2)Q_[d][0](Q_[d+1]);Q_.length=0}}}function a(o){r(o(e))}function s(o,l=ot){const d=[o,l];return i.add(d),i.size===1&&(n=t(r)||ot),o(e),()=>{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:r,update:a,subscribe:s}}function vo(e,t,n){const i=!Array.isArray(e),r=i?[e]:e,a=t.length<2;return eB(n,s=>{let o=!1;const l=[];let d=0,c=ot;const v=()=>{if(d)return;c();const b=t(i?l[0]:l,s);a?s(b):c=Ga(b)?b:ot},T=r.map((b,A)=>Lu(b,E=>{l[A]=E,d&=~(1<<A),o&&v()},()=>{d|=1<<A}));return o=!0,v(),function(){vi(T),c(),o=!1}})}const Ye=ao({}),lx=vo(Ye,e=>({reportProjectionHash:e.personal_projection_attributes_hash,syncedAt:e.personal_projection_synced_at,syncType:e.personal_projection_sync_type,taxYear:e.tax_year}));var qb={exports:{}};(function(e,t){(function(){var n=this,i=n._,r=Array.prototype,a=Object.prototype,s=Function.prototype,o=r.push,l=r.slice,d=a.toString,c=a.hasOwnProperty,v=Array.isArray,T=Object.keys,b=s.bind,A=Object.create,E=function(){},y=function(ee){if(ee instanceof y)return ee;if(!(this instanceof y))return new y(ee);this._wrapped=ee};e.exports&&(t=e.exports=y),t._=y,y.VERSION="1.8.2";var I=function(ee,G,me){if(G===void 0)return ee;switch(me??3){case 1:return function(Te){return ee.call(G,Te)};case 2:return function(Te,De){return ee.call(G,Te,De)};case 3:return function(Te,De,we){return ee.call(G,Te,De,we)};case 4:return function(Te,De,we,Ve){return ee.call(G,Te,De,we,Ve)}}return function(){return ee.apply(G,arguments)}},D=function(ee,G,me){return ee==null?y.identity:y.isFunction(ee)?I(ee,G,me):y.isObject(ee)?y.matcher(ee):y.property(ee)};y.iteratee=function(ee,G){return D(ee,G,1/0)};var O=function(ee,G){return function(me){var Te=arguments.length;if(Te<2||me==null)return me;for(var De=1;De<Te;De++)for(var we=arguments[De],Ve=ee(we),Ke=Ve.length,yt=0;yt<Ke;yt++){var ht=Ve[yt];(!G||me[ht]===void 0)&&(me[ht]=we[ht])}return me}},M=function(ee){if(!y.isObject(ee))return{};if(A)return A(ee);E.prototype=ee;var G=new E;return E.prototype=null,G},F=Math.pow(2,53)-1,$=function(ee){var G=ee&&ee.length;return typeof G=="number"&&G>=0&&G<=F};y.each=y.forEach=function(ee,G,me){G=I(G,me);var Te,De;if($(ee))for(Te=0,De=ee.length;Te<De;Te++)G(ee[Te],Te,ee);else{var we=y.keys(ee);for(Te=0,De=we.length;Te<De;Te++)G(ee[we[Te]],we[Te],ee)}return ee},y.map=y.collect=function(ee,G,me){G=D(G,me);for(var Te=!$(ee)&&y.keys(ee),De=(Te||ee).length,we=Array(De),Ve=0;Ve<De;Ve++){var Ke=Te?Te[Ve]:Ve;we[Ve]=G(ee[Ke],Ke,ee)}return we};function L(ee){function G(me,Te,De,we,Ve,Ke){for(;Ve>=0&&Ve<Ke;Ve+=ee){var yt=we?we[Ve]:Ve;De=Te(De,me[yt],yt,me)}return De}return function(me,Te,De,we){Te=I(Te,we,4);var Ve=!$(me)&&y.keys(me),Ke=(Ve||me).length,yt=ee>0?0:Ke-1;return arguments.length<3&&(De=me[Ve?Ve[yt]:yt],yt+=ee),G(me,Te,De,Ve,yt,Ke)}}y.reduce=y.foldl=y.inject=L(1),y.reduceRight=y.foldr=L(-1),y.find=y.detect=function(ee,G,me){var Te;if($(ee)?Te=y.findIndex(ee,G,me):Te=y.findKey(ee,G,me),Te!==void 0&&Te!==-1)return ee[Te]},y.filter=y.select=function(ee,G,me){var Te=[];return G=D(G,me),y.each(ee,function(De,we,Ve){G(De,we,Ve)&&Te.push(De)}),Te},y.reject=function(ee,G,me){return y.filter(ee,y.negate(D(G)),me)},y.every=y.all=function(ee,G,me){G=D(G,me);for(var Te=!$(ee)&&y.keys(ee),De=(Te||ee).length,we=0;we<De;we++){var Ve=Te?Te[we]:we;if(!G(ee[Ve],Ve,ee))return!1}return!0},y.some=y.any=function(ee,G,me){G=D(G,me);for(var Te=!$(ee)&&y.keys(ee),De=(Te||ee).length,we=0;we<De;we++){var Ve=Te?Te[we]:we;if(G(ee[Ve],Ve,ee))return!0}return!1},y.contains=y.includes=y.include=function(ee,G,me){return $(ee)||(ee=y.values(ee)),y.indexOf(ee,G,typeof me=="number"&&me)>=0},y.invoke=function(ee,G){var me=l.call(arguments,2),Te=y.isFunction(G);return y.map(ee,function(De){var we=Te?G:De[G];return we==null?we:we.apply(De,me)})},y.pluck=function(ee,G){return y.map(ee,y.property(G))},y.where=function(ee,G){return y.filter(ee,y.matcher(G))},y.findWhere=function(ee,G){return y.find(ee,y.matcher(G))},y.max=function(ee,G,me){var Te=-1/0,De=-1/0,we,Ve;if(G==null&&ee!=null){ee=$(ee)?ee:y.values(ee);for(var Ke=0,yt=ee.length;Ke<yt;Ke++)we=ee[Ke],we>Te&&(Te=we)}else G=D(G,me),y.each(ee,function(ht,Je,pt){Ve=G(ht,Je,pt),(Ve>De||Ve===-1/0&&Te===-1/0)&&(Te=ht,De=Ve)});return Te},y.min=function(ee,G,me){var Te=1/0,De=1/0,we,Ve;if(G==null&&ee!=null){ee=$(ee)?ee:y.values(ee);for(var Ke=0,yt=ee.length;Ke<yt;Ke++)we=ee[Ke],we<Te&&(Te=we)}else G=D(G,me),y.each(ee,function(ht,Je,pt){Ve=G(ht,Je,pt),(Ve<De||Ve===1/0&&Te===1/0)&&(Te=ht,De=Ve)});return Te},y.shuffle=function(ee){for(var G=$(ee)?ee:y.values(ee),me=G.length,Te=Array(me),De=0,we;De<me;De++)we=y.random(0,De),we!==De&&(Te[De]=Te[we]),Te[we]=G[De];return Te},y.sample=function(ee,G,me){return G==null||me?($(ee)||(ee=y.values(ee)),ee[y.random(ee.length-1)]):y.shuffle(ee).slice(0,Math.max(0,G))},y.sortBy=function(ee,G,me){return G=D(G,me),y.pluck(y.map(ee,function(Te,De,we){return{value:Te,index:De,criteria:G(Te,De,we)}}).sort(function(Te,De){var we=Te.criteria,Ve=De.criteria;if(we!==Ve){if(we>Ve||we===void 0)return 1;if(we<Ve||Ve===void 0)return-1}return Te.index-De.index}),"value")};var j=function(ee){return function(G,me,Te){var De={};return me=D(me,Te),y.each(G,function(we,Ve){var Ke=me(we,Ve,G);ee(De,we,Ke)}),De}};y.groupBy=j(function(ee,G,me){y.has(ee,me)?ee[me].push(G):ee[me]=[G]}),y.indexBy=j(function(ee,G,me){ee[me]=G}),y.countBy=j(function(ee,G,me){y.has(ee,me)?ee[me]++:ee[me]=1}),y.toArray=function(ee){return ee?y.isArray(ee)?l.call(ee):$(ee)?y.map(ee,y.identity):y.values(ee):[]},y.size=function(ee){return ee==null?0:$(ee)?ee.length:y.keys(ee).length},y.partition=function(ee,G,me){G=D(G,me);var Te=[],De=[];return y.each(ee,function(we,Ve,Ke){(G(we,Ve,Ke)?Te:De).push(we)}),[Te,De]},y.first=y.head=y.take=function(ee,G,me){if(ee!=null)return G==null||me?ee[0]:y.initial(ee,ee.length-G)},y.initial=function(ee,G,me){return l.call(ee,0,Math.max(0,ee.length-(G==null||me?1:G)))},y.last=function(ee,G,me){if(ee!=null)return G==null||me?ee[ee.length-1]:y.rest(ee,Math.max(0,ee.length-G))},y.rest=y.tail=y.drop=function(ee,G,me){return l.call(ee,G==null||me?1:G)},y.compact=function(ee){return y.filter(ee,y.identity)};var H=function(ee,G,me,Te){for(var De=[],we=0,Ve=Te||0,Ke=ee&&ee.length;Ve<Ke;Ve++){var yt=ee[Ve];if($(yt)&&(y.isArray(yt)||y.isArguments(yt))){G||(yt=H(yt,G,me));var ht=0,Je=yt.length;for(De.length+=Je;ht<Je;)De[we++]=yt[ht++]}else me||(De[we++]=yt)}return De};y.flatten=function(ee,G){return H(ee,G,!1)},y.without=function(ee){return y.difference(ee,l.call(arguments,1))},y.uniq=y.unique=function(ee,G,me,Te){if(ee==null)return[];y.isBoolean(G)||(Te=me,me=G,G=!1),me!=null&&(me=D(me,Te));for(var De=[],we=[],Ve=0,Ke=ee.length;Ve<Ke;Ve++){var yt=ee[Ve],ht=me?me(yt,Ve,ee):yt;G?((!Ve||we!==ht)&&De.push(yt),we=ht):me?y.contains(we,ht)||(we.push(ht),De.push(yt)):y.contains(De,yt)||De.push(yt)}return De},y.union=function(){return y.uniq(H(arguments,!0,!0))},y.intersection=function(ee){if(ee==null)return[];for(var G=[],me=arguments.length,Te=0,De=ee.length;Te<De;Te++){var we=ee[Te];if(!y.contains(G,we)){for(var Ve=1;Ve<me&&y.contains(arguments[Ve],we);Ve++);Ve===me&&G.push(we)}}return G},y.difference=function(ee){var G=H(arguments,!0,!0,1);return y.filter(ee,function(me){return!y.contains(G,me)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(ee){for(var G=ee&&y.max(ee,"length").length||0,me=Array(G),Te=0;Te<G;Te++)me[Te]=y.pluck(ee,Te);return me},y.object=function(ee,G){for(var me={},Te=0,De=ee&&ee.length;Te<De;Te++)G?me[ee[Te]]=G[Te]:me[ee[Te][0]]=ee[Te][1];return me},y.indexOf=function(ee,G,me){var Te=0,De=ee&&ee.length;if(typeof me=="number")Te=me<0?Math.max(0,De+me):me;else if(me&&De)return Te=y.sortedIndex(ee,G),ee[Te]===G?Te:-1;if(G!==G)return y.findIndex(l.call(ee,Te),y.isNaN);for(;Te<De;Te++)if(ee[Te]===G)return Te;return-1},y.lastIndexOf=function(ee,G,me){var Te=ee?ee.length:0;if(typeof me=="number"&&(Te=me<0?Te+me+1:Math.min(Te,me+1)),G!==G)return y.findLastIndex(l.call(ee,0,Te),y.isNaN);for(;--Te>=0;)if(ee[Te]===G)return Te;return-1};function V(ee){return function(G,me,Te){me=D(me,Te);for(var De=G!=null&&G.length,we=ee>0?0:De-1;we>=0&&we<De;we+=ee)if(me(G[we],we,G))return we;return-1}}y.findIndex=V(1),y.findLastIndex=V(-1),y.sortedIndex=function(ee,G,me,Te){me=D(me,Te,1);for(var De=me(G),we=0,Ve=ee.length;we<Ve;){var Ke=Math.floor((we+Ve)/2);me(ee[Ke])<De?we=Ke+1:Ve=Ke}return we},y.range=function(ee,G,me){arguments.length<=1&&(G=ee||0,ee=0),me=me||1;for(var Te=Math.max(Math.ceil((G-ee)/me),0),De=Array(Te),we=0;we<Te;we++,ee+=me)De[we]=ee;return De};var Q=function(ee,G,me,Te,De){if(!(Te instanceof G))return ee.apply(me,De);var we=M(ee.prototype),Ve=ee.apply(we,De);return y.isObject(Ve)?Ve:we};y.bind=function(ee,G){if(b&&ee.bind===b)return b.apply(ee,l.call(arguments,1));if(!y.isFunction(ee))throw new TypeError("Bind must be called on a function");var me=l.call(arguments,2),Te=function(){return Q(ee,Te,G,this,me.concat(l.call(arguments)))};return Te},y.partial=function(ee){var G=l.call(arguments,1),me=function(){for(var Te=0,De=G.length,we=Array(De),Ve=0;Ve<De;Ve++)we[Ve]=G[Ve]===y?arguments[Te++]:G[Ve];for(;Te<arguments.length;)we.push(arguments[Te++]);return Q(ee,me,this,this,we)};return me},y.bindAll=function(ee){var G,me=arguments.length,Te;if(me<=1)throw new Error("bindAll must be passed function names");for(G=1;G<me;G++)Te=arguments[G],ee[Te]=y.bind(ee[Te],ee);return ee},y.memoize=function(ee,G){var me=function(Te){var De=me.cache,we=""+(G?G.apply(this,arguments):Te);return y.has(De,we)||(De[we]=ee.apply(this,arguments)),De[we]};return me.cache={},me},y.delay=function(ee,G){var me=l.call(arguments,2);return setTimeout(function(){return ee.apply(null,me)},G)},y.defer=y.partial(y.delay,y,1),y.throttle=function(ee,G,me){var Te,De,we,Ve=null,Ke=0;me||(me={});var yt=function(){Ke=me.leading===!1?0:y.now(),Ve=null,we=ee.apply(Te,De),Ve||(Te=De=null)};return function(){var ht=y.now();!Ke&&me.leading===!1&&(Ke=ht);var Je=G-(ht-Ke);return Te=this,De=arguments,Je<=0||Je>G?(Ve&&(clearTimeout(Ve),Ve=null),Ke=ht,we=ee.apply(Te,De),Ve||(Te=De=null)):!Ve&&me.trailing!==!1&&(Ve=setTimeout(yt,Je)),we}},y.debounce=function(ee,G,me){var Te,De,we,Ve,Ke,yt=function(){var ht=y.now()-Ve;ht<G&&ht>=0?Te=setTimeout(yt,G-ht):(Te=null,me||(Ke=ee.apply(we,De),Te||(we=De=null)))};return function(){we=this,De=arguments,Ve=y.now();var ht=me&&!Te;return Te||(Te=setTimeout(yt,G)),ht&&(Ke=ee.apply(we,De),we=De=null),Ke}},y.wrap=function(ee,G){return y.partial(G,ee)},y.negate=function(ee){return function(){return!ee.apply(this,arguments)}},y.compose=function(){var ee=arguments,G=ee.length-1;return function(){for(var me=G,Te=ee[G].apply(this,arguments);me--;)Te=ee[me].call(this,Te);return Te}},y.after=function(ee,G){return function(){if(--ee<1)return G.apply(this,arguments)}},y.before=function(ee,G){var me;return function(){return--ee>0&&(me=G.apply(this,arguments)),ee<=1&&(G=null),me}},y.once=y.partial(y.before,2);var X=!{toString:null}.propertyIsEnumerable("toString"),te=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function ne(ee,G){var me=te.length,Te=ee.constructor,De=y.isFunction(Te)&&Te.prototype||a,we="constructor";for(y.has(ee,we)&&!y.contains(G,we)&&G.push(we);me--;)we=te[me],we in ee&&ee[we]!==De[we]&&!y.contains(G,we)&&G.push(we)}y.keys=function(ee){if(!y.isObject(ee))return[];if(T)return T(ee);var G=[];for(var me in ee)y.has(ee,me)&&G.push(me);return X&&ne(ee,G),G},y.allKeys=function(ee){if(!y.isObject(ee))return[];var G=[];for(var me in ee)G.push(me);return X&&ne(ee,G),G},y.values=function(ee){for(var G=y.keys(ee),me=G.length,Te=Array(me),De=0;De<me;De++)Te[De]=ee[G[De]];return Te},y.mapObject=function(ee,G,me){G=D(G,me);for(var Te=y.keys(ee),De=Te.length,we={},Ve,Ke=0;Ke<De;Ke++)Ve=Te[Ke],we[Ve]=G(ee[Ve],Ve,ee);return we},y.pairs=function(ee){for(var G=y.keys(ee),me=G.length,Te=Array(me),De=0;De<me;De++)Te[De]=[G[De],ee[G[De]]];return Te},y.invert=function(ee){for(var G={},me=y.keys(ee),Te=0,De=me.length;Te<De;Te++)G[ee[me[Te]]]=me[Te];return G},y.functions=y.methods=function(ee){var G=[];for(var me in ee)y.isFunction(ee[me])&&G.push(me);return G.sort()},y.extend=O(y.allKeys),y.extendOwn=y.assign=O(y.keys),y.findKey=function(ee,G,me){G=D(G,me);for(var Te=y.keys(ee),De,we=0,Ve=Te.length;we<Ve;we++)if(De=Te[we],G(ee[De],De,ee))return De},y.pick=function(ee,G,me){var Te={},De=ee,we,Ve;if(De==null)return Te;y.isFunction(G)?(Ve=y.allKeys(De),we=I(G,me)):(Ve=H(arguments,!1,!1,1),we=function(pt,Tt,it){return Tt in it},De=Object(De));for(var Ke=0,yt=Ve.length;Ke<yt;Ke++){var ht=Ve[Ke],Je=De[ht];we(Je,ht,De)&&(Te[ht]=Je)}return Te},y.omit=function(ee,G,me){if(y.isFunction(G))G=y.negate(G);else{var Te=y.map(H(arguments,!1,!1,1),String);G=function(De,we){return!y.contains(Te,we)}}return y.pick(ee,G,me)},y.defaults=O(y.allKeys,!0),y.clone=function(ee){return y.isObject(ee)?y.isArray(ee)?ee.slice():y.extend({},ee):ee},y.tap=function(ee,G){return G(ee),ee},y.isMatch=function(ee,G){var me=y.keys(G),Te=me.length;if(ee==null)return!Te;for(var De=Object(ee),we=0;we<Te;we++){var Ve=me[we];if(G[Ve]!==De[Ve]||!(Ve in De))return!1}return!0};var be=function(ee,G,me,Te){if(ee===G)return ee!==0||1/ee===1/G;if(ee==null||G==null)return ee===G;ee instanceof y&&(ee=ee._wrapped),G instanceof y&&(G=G._wrapped);var De=d.call(ee);if(De!==d.call(G))return!1;switch(De){case"[object RegExp]":case"[object String]":return""+ee==""+G;case"[object Number]":return+ee!=+ee?+G!=+G:+ee==0?1/+ee===1/G:+ee==+G;case"[object Date]":case"[object Boolean]":return+ee==+G}var we=De==="[object Array]";if(!we){if(typeof ee!="object"||typeof G!="object")return!1;var Ve=ee.constructor,Ke=G.constructor;if(Ve!==Ke&&!(y.isFunction(Ve)&&Ve instanceof Ve&&y.isFunction(Ke)&&Ke instanceof Ke)&&"constructor"in ee&&"constructor"in G)return!1}me=me||[],Te=Te||[];for(var yt=me.length;yt--;)if(me[yt]===ee)return Te[yt]===G;if(me.push(ee),Te.push(G),we){if(yt=ee.length,yt!==G.length)return!1;for(;yt--;)if(!be(ee[yt],G[yt],me,Te))return!1}else{var ht=y.keys(ee),Je;if(yt=ht.length,y.keys(G).length!==yt)return!1;for(;yt--;)if(Je=ht[yt],!(y.has(G,Je)&&be(ee[Je],G[Je],me,Te)))return!1}return me.pop(),Te.pop(),!0};y.isEqual=function(ee,G){return be(ee,G)},y.isEmpty=function(ee){return ee==null?!0:$(ee)&&(y.isArray(ee)||y.isString(ee)||y.isArguments(ee))?ee.length===0:y.keys(ee).length===0},y.isElement=function(ee){return!!(ee&&ee.nodeType===1)},y.isArray=v||function(ee){return d.call(ee)==="[object Array]"},y.isObject=function(ee){var G=typeof ee;return G==="function"||G==="object"&&!!ee},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(ee){y["is"+ee]=function(G){return d.call(G)==="[object "+ee+"]"}}),y.isArguments(arguments)||(y.isArguments=function(ee){return y.has(ee,"callee")}),typeof/./!="function"&&typeof Int8Array!="object"&&(y.isFunction=function(ee){return typeof ee=="function"||!1}),y.isFinite=function(ee){return isFinite(ee)&&!isNaN(parseFloat(ee))},y.isNaN=function(ee){return y.isNumber(ee)&&ee!==+ee},y.isBoolean=function(ee){return ee===!0||ee===!1||d.call(ee)==="[object Boolean]"},y.isNull=function(ee){return ee===null},y.isUndefined=function(ee){return ee===void 0},y.has=function(ee,G){return ee!=null&&c.call(ee,G)},y.noConflict=function(){return n._=i,this},y.identity=function(ee){return ee},y.constant=function(ee){return function(){return ee}},y.noop=function(){},y.property=function(ee){return function(G){return G==null?void 0:G[ee]}},y.propertyOf=function(ee){return ee==null?function(){}:function(G){return ee[G]}},y.matcher=y.matches=function(ee){return ee=y.extendOwn({},ee),function(G){return y.isMatch(G,ee)}},y.times=function(ee,G,me){var Te=Array(Math.max(0,ee));G=I(G,me,1);for(var De=0;De<ee;De++)Te[De]=G(De);return Te},y.random=function(ee,G){return G==null&&(G=ee,ee=0),ee+Math.floor(Math.random()*(G-ee+1))},y.now=Date.now||function(){return new Date().getTime()};var ue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Ce=y.invert(ue),ie=function(ee){var G=function(we){return ee[we]},me="(?:"+y.keys(ee).join("|")+")",Te=RegExp(me),De=RegExp(me,"g");return function(we){return we=we==null?"":""+we,Te.test(we)?we.replace(De,G):we}};y.escape=ie(ue),y.unescape=ie(Ce),y.result=function(ee,G,me){var Te=ee==null?void 0:ee[G];return Te===void 0&&(Te=me),y.isFunction(Te)?Te.call(ee):Te};var Y=0;y.uniqueId=function(ee){var G=++Y+"";return ee?ee+G:G},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var he=/(.)^/,Me={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Pe=/\\|'|\r|\n|\u2028|\u2029/g,We=function(ee){return"\\"+Me[ee]};y.template=function(ee,G,me){!G&&me&&(G=me),G=y.defaults({},G,y.templateSettings);var Te=RegExp([(G.escape||he).source,(G.interpolate||he).source,(G.evaluate||he).source].join("|")+"|$","g"),De=0,we="__p+='";ee.replace(Te,function(ht,Je,pt,Tt,it){return we+=ee.slice(De,it).replace(Pe,We),De=it+ht.length,Je?we+=`'+
((__t=(`+Je+`))==null?'':_.escape(__t))+
'`:pt?we+=`'+
((__t=(`+pt+`))==null?'':__t)+
'`:Tt&&(we+=`';
`+Tt+`
__p+='`),ht}),we+=`';
`,G.variable||(we=`with(obj||{}){
`+we+`}
`),we=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
`+we+`return __p;
`;try{var Ve=new Function(G.variable||"obj","_",we)}catch(ht){throw ht.source=we,ht}var Ke=function(ht){return Ve.call(this,ht,y)},yt=G.variable||"obj";return Ke.source="function("+yt+`){
`+we+"}",Ke},y.chain=function(ee){var G=y(ee);return G._chain=!0,G};var qe=function(ee,G){return ee._chain?y(G).chain():G};y.mixin=function(ee){y.each(y.functions(ee),function(G){var me=y[G]=ee[G];y.prototype[G]=function(){var Te=[this._wrapped];return o.apply(Te,arguments),qe(this,me.apply(y,Te))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(ee){var G=r[ee];y.prototype[ee]=function(){var me=this._wrapped;return G.apply(me,arguments),(ee==="shift"||ee==="splice")&&me.length===0&&delete me[0],qe(this,me)}}),y.each(["concat","join","slice"],function(ee){var G=r[ee];y.prototype[ee]=function(){return qe(this,G.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped}}).call(zs)})(qb,qb.exports);var xs=qb.exports;const Ys=cl(xs);function ux(e,t,n){let i=t;for(const r of e){i=n(i,Xn.omit(r,"children"));const a=r.children;a&&(i=ux(a,i,n))}return i}function dx(e,t){return ux(t,[],(n,i)=>[...n,...e(i)])}const em={"S-Corporation":"S-Corporation","C-Corporation":"C-Corporation",Partnership:"Partnership","Sole-Proprietorship":"Sole-Proprietorship"},gp=[{name:"Sole Prop",code:"sole_prop"},{name:"C-Corp",code:"c_corp"},{name:"S-Corp",code:"s_corp"}],Wb=[{name:"First",code:"first"},{name:"Second",code:"second"},{name:"Third",code:"third"},{name:"Fourth",code:"fourth"}],tB={Single:"Single","Head-of-Household":"Head-of-Household","Married Joint":"Married Joint","Married Separate":"Married Separate"},nB={HSA:"Health Savings Account",HRA:"Health Reimbursement Account",FSA:"Flexible Spending Account"},Vb={s_corp_file_by:"S-corporation File By",s_corp_extend_to:"S-corporation Extend To",partnership_file_by:"Partnership File By",partnership_extend_to:"Partnership Extend To",c_corp_file_by:"C-corporation File By",c_corp_extend_to:"C-corporation Extend To",personal_1040_file_by:"Personal (1040) File By",personal_1040_extend_to:"Personal (1040) Extend To",trust_file_by:"Trust File By",trust_extend_to:"Trust Extend To",non_profit_file_by:"Non-Profit File By",non_profit_extend_to:"Non-Profit Extend To",personal_1q_file_by:"Personal 1st Quarter File By",personal_2q_file_by:"Personal 2nd Quarter File By",personal_3q_file_by:"Personal 3rd Quarter File By",personal_4q_file_by:"Personal 4th Quarter File By"},iB={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MP:"Northern Mariana Islands",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",VI:"Virgin Islands",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};let rB=[{title:"Report Options",id:"report_options",updatable:!0,children:[{title:"Layout",id:"layout_params",updatable:!1,children:[{title:"Name",id:"layout_name",updatable:!1},{title:"Primary",id:"layout_violet_color_text_primary",updatable:!1},{title:"Secondary",id:"layout_violet_color_text_secondary",updatable:!1},{title:"Light",id:"layout_violet_color_text_reverse",updatable:!1},{title:"Profit",id:"layout_violet_color_text_green",updatable:!1},{title:"Profit (on dark background)",id:"layout_violet_color_text_green_light",updatable:!1},{title:"Losses",id:"layout_violet_color_text_red",updatable:!1},{title:"Primary Background",id:"layout_violet_color_bg_primary",updatable:!1},{title:"Secondary Background",id:"layout_violet_color_bg_secondary",updatable:!1},{title:"Tertiary Background",id:"layout_violet_color_bg_tertiary",updatable:!1},{title:"Primary",id:"layout_orange_color_text_primary",updatable:!1},{title:"Light",id:"layout_orange_color_text_reverse",updatable:!1},{title:"Profit",id:"layout_orange_color_text_green",updatable:!1},{title:"Profit (on dark background)",id:"layout_orange_color_text_green_light",updatable:!1},{title:"Losses",id:"layout_orange_color_text_red",updatable:!1},{title:"Primary Background",id:"layout_orange_color_bg_primary",updatable:!1},{title:"Secondary Background",id:"layout_orange_color_bg_secondary",updatable:!1}]},{title:"Report Title",id:"general_params",updatable:!1,children:[{title:"Report Title",id:"front_page_report_title",updatable:!1},{id:"tax_year",updatable:!0,param:["tax_year"]}]},{title:"Front Page",id:"front_page_enable",updatable:!0,children:[{title:"Prepared for",id:"front_page_prepared_for_organization",param:["front_page_prepared_for_organization"],updatable:!0},{title:"Prepared by",id:"front_page_prepared_by_organization",param:["front_page_prepared_by_organization"],updatable:!0},{title:"Preparation Date",id:"front_page_date",param:["front_page_date"],updatable:!0},{title:"Show front page image",id:"front_page_center_image_enable",updatable:!1}]},{title:"Abstract",id:"abstract_enable",updatable:!1,children:[{title:"Introduction",id:"abstract_introduction",updatable:!1},{title:"Title",id:"abstract_title",updatable:!1},{title:"Inscription",id:"abstract_inscription",updatable:!1},{title:"Description",id:"abstract_description",updatable:!1},{title:"Postscript",id:"abstract_postscript",updatable:!1},{title:"Post-postscript",id:"abstract_post_postscript",updatable:!1}]},{title:"Introduction",id:"introduction_enable",updatable:!1,children:[{title:"Explain Grading System",id:"introduction_grading_systems_enable",updatable:!1}]},{title:"Tax Projection Summary",id:"tps_enable",updatable:!0,children:[{title:"Page 1 Income",id:"tps_page_1",updatable:!0,children:[{title:"Projected Revenue",id:"tps_page_1_income_projected_revenue",param:["tps_page_1_income_projected_revenue"],updatable:!0},{title:"Projected Expense",id:"tps_page_1_income_projected_expense",param:["tps_page_1_income_projected_expense"],updatable:!0},{title:"Business Income",id:"tps_page_1_income_projected_expense_sum",param:["tps_page_1_income_projected_expense_sum"],updatable:!0},{title:"Wages",id:"tps_page_1_income_wages",param:["tps_page_1_income_wages"],updatable:!0},{title:"Portfolio Income",id:"tps_page_1_income_portfolio_income",param:["tps_page_1_income_portfolio_income"],updatable:!0},{title:"Rental Income",id:"tps_page_1_income_rental_income",param:["tps_page_1_income_rental_income"],updatable:!0},{title:"Other Income",id:"tps_page_1_income_other_income",param:["tps_page_1_income_other_income"],updatable:!0},{title:"Personal Income",id:"tps_page_1_income_personal_income",param:["tps_page_1_income_personal_income"],updatable:!0}]},{title:"Page 1 Deductions & Credits",id:"tps_page_1_deductions_and_credits",updatable:!0,children:[{title:"Adjustments",id:"tps_page_1_deductions_and_credits_adjustments",param:["tps_page_1_deductions_and_credits_adjustments"],updatable:!0},{title:"Passthrough Deductions",id:"tps_page_1_deductions_and_credits_passthrough_deduction",param:["tps_page_1_deductions_and_credits_passthrough_deduction"],updatable:!0},{title:"Itemized Deduction",id:"tps_page_1_deductions_and_credits_itemized_deduction",param:["tps_page_1_deductions_and_credits_itemized_deduction"],updatable:!0},{title:"Credits",id:"tps_page_1_deductions_and_credits_credits",param:["tps_page_1_deductions_and_credits_credits"],updatable:!0},{title:"Deductions And Credits",id:"tps_page_1_deductions_and_credits_deductions_and_credits",param:["tps_page_1_deductions_and_credits_deductions_and_credits"],updatable:!0},{title:"Taxable Income",id:"tps_page_1_deductions_and_credits_taxable_income",param:["tps_page_1_deductions_and_credits_taxable_income"],updatable:!0}]},{title:"Page 1 Taxes & Payments",id:"tps_page_1_tax_and_payments",updatable:!0,children:[{title:"Tax Fed",id:"tps_page_1_tax_and_payments_tax_fed",param:["tps_page_1_tax_and_payments_tax_fed"],updatable:!0},{title:"Tax State",id:"tps_page_1_tax_and_payments_tax_state",param:["tps_page_1_tax_and_payments_tax_state"],updatable:!0},{title:"Witholding And Es Payments Fed",id:"tps_page_1_tax_and_payments_witholding_and_es_payments_fed",param:["tps_page_1_tax_and_payments_witholding_and_es_payments_fed"],updatable:!0},{title:"Witholding And Es Payments State",id:"tps_page_1_tax_and_payments_witholding_and_es_payments_stat",param:["tps_page_1_tax_and_payments_witholding_and_es_payments_stat"],updatable:!0},{title:"Tax Due Fed",id:"tps_page_1_tax_and_payments_tax_due_fed",param:["tps_page_1_tax_and_payments_tax_due_fed"],updatable:!0},{title:"Tax Due State",id:"tps_page_1_tax_and_payments_tax_due_state",param:["tps_page_1_tax_and_payments_tax_due_state"],updatable:!0},{title:"Next Lower Bracket",id:"tps_page_1_tax_and_payments_next_lower_bracket",param:["tps_page_1_tax_and_payments_next_lower_bracket"],updatable:!0},{title:"Effective Tax Rate",id:"tps_page_1_tax_and_payments_effective_tax_rate",param:["tps_page_1_tax_and_payments_effective_tax_rate"],updatable:!0},{title:"Distance To Bracket",id:"tps_page_1_tax_and_payments_distance_to_bracket",param:["tps_page_1_tax_and_payments_distance_to_bracket"],updatable:!0}]},{title:"Page 2 Income",id:"tps_page_2_income",updatable:!0,children:[{title:"Wages",id:"tps_page_2_income_wages",param:["tps_page_2_income_wages"],updatable:!0},{title:"Interest",id:"tps_page_2_income_interest",param:["tps_page_2_income_interest"],updatable:!0},{title:"Dividents",id:"tps_page_2_income_dividents",param:["tps_page_2_income_dividents"],updatable:!0},{title:"Capital Gains",id:"tps_page_2_income_capital_gains",param:["tps_page_2_income_capital_gains"],updatable:!0},{title:"Rental Income",id:"tps_page_2_income_rental_income",param:["tps_page_2_income_rental_income"],updatable:!0},{title:"First Company Name",id:"tps_page_2_income_first_company_name",param:["tps_page_2_income_first_company_name"],updatable:!0},{title:"First Company Income",id:"tps_page_2_income_first_company_income",param:["tps_page_2_income_first_company_income"],updatable:!0},{title:"Second Company Name",id:"tps_page_2_income_second_company_name",param:["tps_page_2_income_second_company_name"],updatable:!0},{title:"Second Company Income",id:"tps_page_2_income_second_company_income",param:["tps_page_2_income_second_company_income"],updatable:!0},{title:"Third Company Name",id:"tps_page_2_income_third_company_name",param:["tps_page_2_income_third_company_name"],updatable:!0},{title:"Third Company Income",id:"tps_page_2_income_third_company_income",param:["tps_page_2_income_third_company_income"],updatable:!0},{title:"Fourth Company Name",id:"tps_page_2_income_fourth_company_name",param:["tps_page_2_income_fourth_company_name"],updatable:!0},{title:"Fourth Company Income",id:"tps_page_2_income_fourth_company_income",param:["tps_page_2_income_fourth_company_income"],updatable:!0},{title:"Extra S-Corp Income",id:"tps_page_2_income_extra_s_corp_income",param:["tps_page_2_income_extra_s_corp_income"],updatable:!0},{title:"Extra Schedule C Business Income",id:"tps_page_2_income_extra_schedule_c_income",param:["tps_page_2_income_extra_schedule_c_income"],updatable:!0},{title:"Other Income",id:"tps_page_2_income_other_income",param:["tps_page_2_income_other_income"],updatable:!0},{title:"Total Income",id:"tps_page_2_income_total_income",param:["tps_page_2_income_total_income"],updatable:!0}]},{title:"Page 2 Adjustments",id:"tps_page_2_adjustments",updatable:!0,children:[{title:"Health Savings Account",id:"tps_page_2_adjustments_health_savings_account",param:["tps_page_2_adjustments_health_savings_account"],updatable:!0},{title:"Deductible Se Tax",id:"tps_page_2_adjustments_deductible_se_tax",param:["tps_page_2_adjustments_deductible_se_tax"],updatable:!0},{title:"Sep Simple Qual Plans",id:"tps_page_2_adjustments_sep_simple_qual_plans",param:["tps_page_2_adjustments_sep_simple_qual_plans"],updatable:!0},{title:"Self Employed Health Insurance",id:"tps_page_2_adjustments_self_employed_health_ins",param:["tps_page_2_adjustments_self_employed_health_ins"],updatable:!0},{title:"Ira Deduction",id:"tps_page_2_adjustments_ira_deduction",param:["tps_page_2_adjustments_ira_deduction"],updatable:!0},{title:"Other Adjustments",id:"tps_page_2_adjustments_other_adjustments",param:["tps_page_2_adjustments_other_adjustments"],updatable:!0},{title:"Total Adjustments",id:"tps_page_2_adjustments_total_adjustments",param:["tps_page_2_adjustments_total_adjustments"],updatable:!0},{title:"Adjusted Gross Income",id:"tps_page_2_adjustments_adjusted_gross_income",param:["tps_page_2_adjustments_adjusted_gross_income"],updatable:!0}]},{title:"Page 3 Deductions",id:"tps_page_3_deductions",updatable:!0,children:[{title:"Medical Related",id:"tps_page_3_deductions_medical_related",param:["tps_page_3_deductions_medical_related"],updatable:!0},{title:"Taxes",id:"tps_page_3_deductions_taxes",param:["tps_page_3_deductions_taxes"],updatable:!0},{title:"Mortgage Interest",id:"tps_page_3_deductions_mortgage_interest",param:["tps_page_3_deductions_mortgage_interest"],updatable:!0},{title:"Charity",id:"tps_page_3_deductions_charity",param:["tps_page_3_deductions_charity"],updatable:!0},{title:"Other Itemized Deductions",id:"tps_page_3_deductions_other_itemized_deductions",param:["tps_page_3_deductions_other_itemized_deductions"],updatable:!0},{title:"Passthrough Deduction",id:"tps_page_3_deductions_passthrough_deduction",param:["tps_page_3_deductions_passthrough_deduction"],updatable:!0},{title:"Total Deduction",id:"tps_page_3_deductions_total_deductions",param:["tps_page_3_deductions_total_deductions"],updatable:!0},{title:"Taxable Income",id:"tps_page_3_deductions_taxable_income",param:["tps_page_3_deductions_taxable_income"],updatable:!0}]},{title:"Page 3 Taxes & Payments",id:"tps_page_3_taxes_and_payments",updatable:!0,children:[{title:"Tax Fed",id:"tps_page_3_taxes_and_payments_tax_fed",param:["tps_page_3_taxes_and_payments_tax_fed"],updatable:!0},{title:"Tax State",id:"tps_page_3_taxes_and_payments_tax_state",param:["tps_page_3_taxes_and_payments_tax_state"],updatable:!0},{title:"Alternative Min Tax",id:"tps_page_3_taxes_and_payments_alternative_min_tax",param:["tps_page_3_taxes_and_payments_alternative_min_tax"],updatable:!0},{title:"Self Employment Tax",id:"tps_page_3_taxes_and_payments_self_employment_tax",param:["tps_page_3_taxes_and_payments_self_employment_tax"],updatable:!0},{title:"Other Taxes",id:"tps_page_3_taxes_and_payments_other_taxes",param:["tps_page_3_taxes_and_payments_other_taxes"],updatable:!0},{title:"Total Tax Fed",id:"tps_page_3_taxes_and_payments_total_tax_fed",param:["tps_page_3_taxes_and_payments_total_tax_fed"],updatable:!0},{title:"Total Tax State",id:"tps_page_3_taxes_and_payments_total_tax_state",param:["tps_page_3_taxes_and_payments_total_tax_state"],updatable:!0},{title:"Credits",id:"tps_page_3_taxes_and_payments_credits",param:["tps_page_3_taxes_and_payments_credits"],updatable:!0},{title:"State Tax Credit",id:"tps_page_3_taxes_and_payments_state_tax_credit",param:["tps_page_3_taxes_and_payments_state_tax_credit"],updatable:!0},{title:"Witholding Fed",id:"tps_page_3_taxes_and_payments_witholding_fed",param:["tps_page_3_taxes_and_payments_witholding_fed"],updatable:!0},{title:"Witholding State",id:"tps_page_3_taxes_and_payments_witholding_state",param:["tps_page_3_taxes_and_payments_witholding_state"],updatable:!0},{title:"Estimated Tax Payments Fed",id:"tps_page_3_taxes_and_payments_estimated_tax_payments_fed",param:["tps_page_3_taxes_and_payments_estimated_tax_payments_fed"],updatable:!0},{title:"Estimated Tax Payments State",id:"tps_page_3_taxes_and_payments_estimated_tax_payments_state",param:["tps_page_3_taxes_and_payments_estimated_tax_payments_state"],updatable:!0},{title:"Other Payments",id:"tps_page_3_taxes_and_payments_other_payments",param:["tps_page_3_taxes_and_payments_other_payments"],updatable:!0},{title:"Total Federal Tax Credits",id:"tps_page_3_taxes_and_payments_total_federal_tax_credits",param:["tps_page_3_taxes_and_payments_total_federal_tax_credits"],updatable:!0},{title:"Total State Tax Credits",id:"tps_page_3_taxes_and_payments_total_state_tax_credits",param:["tps_page_3_taxes_and_payments_total_state_tax_credits"],updatable:!0},{title:"Tax Due",id:"tps_page_3_taxes_and_payments_tax_due",param:["tps_page_3_taxes_and_payments_tax_due"],updatable:!0},{title:"State Tax Due",id:"tps_page_3_taxes_and_payments_state_tax_due",param:["tps_page_3_taxes_and_payments_state_tax_due"],updatable:!0}]}]},{title:"Top 3 Strategy Picks",id:"top_3_strategy_picks_enable",updatable:!1,children:[{title:"Strategy Pick #1",id:"top_3_strategy_picks_first_type",param:["top_3_strategy_picks_first_type"],updatable:!1},{title:"Strategy Pick #2",id:"top_3_strategy_picks_second_type",param:["top_3_strategy_picks_second_type"],updatable:!1},{title:"Strategy Pick #3",id:"top_3_strategy_picks_third_type",param:["top_3_strategy_picks_third_type"],updatable:!1}]},{title:"Strategy Details",id:"sd_enable",updatable:!0,children:[{title:"Section 179",id:"sd_sec_179_expense_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_sec_179_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_section179_adding",updatable:!0,param:["top_3_strategy_picks_section179_adding"]},{title:"Savings",id:"top_3_strategy_picks_section179_saves_you",updatable:!0,param:["top_3_strategy_picks_section179_saves_you"]}]},{title:"Description",id:"sd_sec_179_expense_what_it_is_text",updatable:!1},{title:"Second Description",id:"sd_sec_179_expense_what_it_is_text_extra",updatable:!1},{title:"First Item",id:"sd_sec_179_expense_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_sec_179_expense_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_sec_179_expense_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_sec_179_expense_what_it_is_fourth_item",updatable:!1},{title:"Fifth Item",id:"sd_sec_179_expense_what_it_is_fifth_item",updatable:!1},{title:"Description of Ratings",id:"sd_sec_179_expense_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_sec_179_expense_tax_saving_options_first_expense"],id:"sd_sec_179_expense_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_sec_179_expense_tax_saving_options_first_saves_you"],id:"sd_sec_179_expense_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_sec_179_expense_tax_saving_options_second_expense"],id:"sd_sec_179_expense_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_sec_179_expense_tax_saving_options_second_saves_you"],id:"sd_sec_179_expense_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_sec_179_expense_tax_saving_options_third_expense"],id:"sd_sec_179_expense_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_sec_179_expense_tax_saving_options_third_saves_you"],id:"sd_sec_179_expense_tax_saving_options_third_saves_you",updatable:!0},{title:"Max Section 179 Deduction",param:["sd_sec_179_expense_current_max_sec_179_deduction"],id:"sd_sec_179_expense_current_max_sec_179_deduction",updatable:!0}]},{title:"Expense Acceleration",id:"sd_expense_acceleration_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_expense_acceleration_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_expense_acceleration_adding",updatable:!0,param:["top_3_strategy_picks_expense_acceleration_adding"]},{title:"Savings",id:"top_3_strategy_picks_expense_acceleration_saves_you",updatable:!0,param:["top_3_strategy_picks_expense_acceleration_saves_you"]}]},{title:"Description",id:"sd_expense_acceleration_what_it_is_text",updatable:!1},{title:"First Item",id:"sd_expense_acceleration_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_expense_acceleration_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_expense_acceleration_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_expense_acceleration_what_it_is_fourth_item",updatable:!1},{title:"Fifth Item",id:"sd_expense_acceleration_what_it_is_fifth_item",updatable:!1},{title:"Sixth Item",id:"sd_expense_acceleration_what_it_is_sixth_item",updatable:!1},{title:"Seventh Item",id:"sd_expense_acceleration_what_it_is_seventh_item",updatable:!1},{title:"Description of Ratings",id:"sd_expense_acceleration_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_expense_acceleration_tax_saving_options_first_expense"],id:"sd_expense_acceleration_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_expense_acceleration_tax_saving_options_first_saves_you"],id:"sd_expense_acceleration_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_expense_acceleration_tax_saving_options_second_expense"],id:"sd_expense_acceleration_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_expense_acceleration_tax_saving_options_second_saves_you"],id:"sd_expense_acceleration_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_expense_acceleration_tax_saving_options_third_expense"],id:"sd_expense_acceleration_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_expense_acceleration_tax_saving_options_third_saves_you"],id:"sd_expense_acceleration_tax_saving_options_third_saves_you",updatable:!0}]},{title:"Missing Deductions",id:"sd_missing_deductions_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_missing_deductions_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_missing_deductions_adding",updatable:!0,param:["top_3_strategy_picks_missing_deductions_adding"]},{title:"Savings",id:"top_3_strategy_picks_missing_deductions_saves_you",updatable:!0,param:["top_3_strategy_picks_missing_deductions_saves_you"]}]},{title:"Description",id:"sd_missing_deductions_what_it_is_text",updatable:!1},{title:"Second Description",id:"sd_missing_deductions_what_it_is_text_extra",updatable:!1},{title:"First Item",id:"sd_missing_deductions_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_missing_deductions_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_missing_deductions_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_missing_deductions_what_it_is_fourth_item",updatable:!1},{title:"Fifth Item",id:"sd_missing_deductions_what_it_is_fifth_item",updatable:!1},{title:"Sixth Item",id:"sd_missing_deductions_what_it_is_sixth_item",updatable:!1},{title:"Seventh Item",id:"sd_missing_deductions_what_it_is_seventh_item",updatable:!1},{title:"Eighth Item",id:"sd_missing_deductions_what_it_is_eighth_item",updatable:!1},{title:"Ninth Item",id:"sd_missing_deductions_what_it_is_ninth_item",updatable:!1},{title:"Tenth Item",id:"sd_missing_deductions_what_it_is_tenth_item",updatable:!1},{title:"Eleventh Item",id:"sd_missing_deductions_what_it_is_eleventh_item",updatable:!1},{title:"Twelfth Item",id:"sd_missing_deductions_what_it_is_twelfth_item",updatable:!1},{title:"Current Meeting Expense",param:["sd_missing_deductions_annual_meeting_expense_current"],id:"sd_missing_deductions_annual_meeting_expense_current",updatable:!0},{title:"Recommended Meeting Expense",param:["sd_missing_deductions_annual_meeting_expense_recommended"],id:"sd_missing_deductions_annual_meeting_expense_recommended",updatable:!0},{title:"Current Meals",param:["sd_missing_deductions_meals_current"],id:"sd_missing_deductions_meals_current",updatable:!0},{title:"Recommended Meals",param:["sd_missing_deductions_meals_recommended"],id:"sd_missing_deductions_meals_recommended",updatable:!0},{title:"Current Travel",param:["sd_missing_deductions_travel_current"],id:"sd_missing_deductions_travel_current",updatable:!0},{title:"Recommended Travel",param:["sd_missing_deductions_travel_recommended"],id:"sd_missing_deductions_travel_recommended",updatable:!0},{title:"Current Telephone",param:["sd_missing_deductions_telephone_current"],id:"sd_missing_deductions_telephone_current",updatable:!0},{title:"Recommended Telephone",param:["sd_missing_deductions_telephone_recommended"],id:"sd_missing_deductions_telephone_recommended",updatable:!0},{title:"Current Internet",param:["sd_missing_deductions_internet_current"],id:"sd_missing_deductions_internet_current",updatable:!0},{title:"Recommended Internet",param:["sd_missing_deductions_internet_recommended"],id:"sd_missing_deductions_internet_recommended",updatable:!0},{title:"Current Auto",param:["sd_missing_deductions_auto_current"],id:"sd_missing_deductions_auto_current",updatable:!0},{title:"Recommended Auto",param:["sd_missing_deductions_auto_recommended"],id:"sd_missing_deductions_auto_recommended",updatable:!0},{title:"Current Office",param:["sd_missing_deductions_office_current"],id:"sd_missing_deductions_office_current",updatable:!0},{title:"Recommended Office",param:["sd_missing_deductions_office_recommended"],id:"sd_missing_deductions_office_recommended",updatable:!0},{title:"Current Legal",param:["sd_missing_deductions_legal_current"],id:"sd_missing_deductions_legal_current",updatable:!0},{title:"Recommended Legal",param:["sd_missing_deductions_legal_recommended"],id:"sd_missing_deductions_legal_recommended",updatable:!0},{title:"Current Mortgage",param:["sd_missing_deductions_mortgage_current"],id:"sd_missing_deductions_mortgage_current",updatable:!0},{title:"Recommended Mortgage",param:["sd_missing_deductions_mortgage_recommended"],id:"sd_missing_deductions_mortgage_recommended",updatable:!0},{title:"Current Health Savings Account",param:["sd_missing_deductions_health_savings_account_current"],id:"sd_missing_deductions_health_savings_account_current",updatable:!0},{title:"Recommended Health Savings Account",param:["sd_missing_deductions_health_savings_account_recommended"],id:"sd_missing_deductions_health_savings_account_recommended",updatable:!0},{title:"Current Charity Donations",param:["sd_missing_deductions_cash_charity_donations_current"],id:"sd_missing_deductions_cash_charity_donations_current",updatable:!0},{title:"Recommended Charity Donations",param:["sd_missing_deductions_cash_charity_donations_recommended"],id:"sd_missing_deductions_cash_charity_donations_recommended",updatable:!0},{title:"Current Non Cash Donations",param:["sd_missing_deductions_non_cash_donations_current"],id:"sd_missing_deductions_non_cash_donations_current",updatable:!0},{title:"Recommended Non Cash Donations",param:["sd_missing_deductions_non_cash_donations_recommended"],id:"sd_missing_deductions_non_cash_donations_recommended",updatable:!0},{title:"Total Tax Savings",param:["sd_missing_deductions_total_tax_savings_comes_to"],id:"sd_missing_deductions_total_tax_savings_comes_to",updatable:!0}]},{title:"Income Deferment",id:"sd_income_deferment_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_income_deferment_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_income_deferment_adding",updatable:!0,param:["top_3_strategy_picks_income_deferment_adding"]},{title:"Savings",id:"top_3_strategy_picks_income_deferment_saves_you",updatable:!0,param:["top_3_strategy_picks_income_deferment_saves_you"]}]},{title:"Description",id:"sd_income_deferment_what_it_is_text",updatable:!1},{title:"First Item",id:"sd_income_deferment_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_income_deferment_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_income_deferment_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_income_deferment_what_it_is_fourth_item",updatable:!1},{title:"Fifth Item",id:"sd_income_deferment_what_it_is_fifth_item",updatable:!1},{title:"Description of Ratings",id:"sd_income_deferment_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_income_deferment_tax_saving_options_first_expense"],id:"sd_income_deferment_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_income_deferment_tax_saving_options_first_saves_you"],id:"sd_income_deferment_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_income_deferment_tax_saving_options_second_expense"],id:"sd_income_deferment_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_income_deferment_tax_saving_options_second_saves_you"],id:"sd_income_deferment_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_income_deferment_tax_saving_options_third_expense"],id:"sd_income_deferment_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_income_deferment_tax_saving_options_third_saves_you"],id:"sd_income_deferment_tax_saving_options_third_saves_you",updatable:!0}]},{title:"SEP IRA",id:"sd_sep_ira_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_sep_ira_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_sep_ira_adding",updatable:!0,param:["top_3_strategy_picks_sep_ira_adding"]},{title:"Savings",id:"top_3_strategy_picks_sep_ira_saves_you",updatable:!0,param:["top_3_strategy_picks_sep_ira_saves_you"]}]},{title:"Description",id:"sd_sep_ira_what_it_is_text",updatable:!1},{title:"First Item",id:"sd_sep_ira_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_sep_ira_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_sep_ira_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_sep_ira_what_it_is_fourth_item",updatable:!1},{title:"Description of Ratings",id:"sd_sep_ira_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_sep_ira_tax_saving_options_first_expense"],id:"sd_sep_ira_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_sep_ira_tax_saving_options_first_saves_you"],id:"sd_sep_ira_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_sep_ira_tax_saving_options_second_expense"],id:"sd_sep_ira_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_sep_ira_tax_saving_options_second_saves_you"],id:"sd_sep_ira_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_sep_ira_tax_saving_options_third_expense"],id:"sd_sep_ira_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_sep_ira_tax_saving_options_third_saves_you"],id:"sd_sep_ira_tax_saving_options_third_saves_you",updatable:!0},{title:"Option A W-2 Wages Expense",param:["sd_sep_ira_w_2_wages_tax_saving_options_first_expense"],id:"sd_sep_ira_w_2_wages_tax_saving_options_first_expense",updatable:!0},{title:"Option A W-2 Wages Saves You",param:["sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you"],id:"sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B W-2 Wages Expense",param:["sd_sep_ira_w_2_wages_tax_saving_options_second_expense"],id:"sd_sep_ira_w_2_wages_tax_saving_options_second_expense",updatable:!0},{title:"Option B W-2 Wages Saves You",param:["sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you"],id:"sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C W-2 Wages Expense",param:["sd_sep_ira_w_2_wages_tax_saving_options_third_expense"],id:"sd_sep_ira_w_2_wages_tax_saving_options_third_expense",updatable:!0},{title:"Option C W-2 Wages Saves You",param:["sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you"],id:"sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you",updatable:!0},{title:"SEP Income",param:["sd_sep_ira_based_on_sep_income_of"],id:"sd_sep_ira_based_on_sep_income_of",updatable:!0},{title:"W-2 Wages",param:["sd_sep_ira_increase_w_2_wages_to"],id:"sd_sep_ira_increase_w_2_wages_to",updatable:!0}]},{title:"14 Day Home Rental",id:"sd_fourteen_day_home_rental_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_fourteen_day_home_rental_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_fourteen_day_home_rental_adding",updatable:!0,param:["top_3_strategy_picks_fourteen_day_home_rental_adding"]},{title:"Savings",id:"top_3_strategy_picks_fourteen_day_home_rental_saves_you",updatable:!0,param:["top_3_strategy_picks_fourteen_day_home_rental_saves_you"]}]},{title:"Description",id:"sd_fourteen_day_home_rental_what_it_is_text",updatable:!1},{title:"Description of Ratings",id:"sd_fourteen_day_home_rental_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_fourteen_day_home_rental_tax_saving_options_first_expense"],id:"sd_fourteen_day_home_rental_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_fourteen_day_home_rental_tax_saving_options_first_saves_you"],id:"sd_fourteen_day_home_rental_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_fourteen_day_home_rental_tax_saving_options_second_expense"],id:"sd_fourteen_day_home_rental_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_fourteen_day_home_rental_tax_saving_options_second_saves_you"],id:"sd_fourteen_day_home_rental_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_fourteen_day_home_rental_tax_saving_options_third_expense"],id:"sd_fourteen_day_home_rental_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_fourteen_day_home_rental_tax_saving_options_third_saves_you"],id:"sd_fourteen_day_home_rental_tax_saving_options_third_saves_you",updatable:!0}]},{title:"Employing Your Children",id:"sd_employing_your_children_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_employing_your_children_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_employing_your_children_adding",updatable:!0,param:["top_3_strategy_picks_employing_your_children_adding"]},{title:"Savings",id:"top_3_strategy_picks_employing_your_children_saves_you",updatable:!0,param:["top_3_strategy_picks_employing_your_children_saves_you"]}]},{title:"Description",id:"sd_employing_your_children_what_it_is_text",updatable:!1},{title:"Description of Ratings",id:"sd_employing_your_children_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_employing_your_children_tax_saving_options_first_expense"],id:"sd_employing_your_children_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_employing_your_children_tax_saving_options_first_saves_you"],id:"sd_employing_your_children_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_employing_your_children_tax_saving_options_second_expense"],id:"sd_employing_your_children_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_employing_your_children_tax_saving_options_second_saves_you"],id:"sd_employing_your_children_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_employing_your_children_tax_saving_options_third_expense"],id:"sd_employing_your_children_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_employing_your_children_tax_saving_options_third_saves_you"],id:"sd_employing_your_children_tax_saving_options_third_saves_you",updatable:!0}]},{title:"401K",id:"sd_plan_401k_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_plan_401k_top_3_widget_options",updatable:!0,children:[{title:"Contributions",id:"top_3_strategy_picks_plan_401k_contributions",updatable:!0,param:["top_3_strategy_picks_plan_401k_contributions"]},{title:"Savings",id:"top_3_strategy_picks_plan_401k_saves_you",updatable:!0,param:["top_3_strategy_picks_plan_401k_saves_you"]}]},{title:"Description",id:"sd_plan_401k_what_it_is_text",updatable:!1},{title:"Description of Ratings",id:"sd_plan_401k_ratings_text",updatable:!1},{title:"Option A Expense",param:["sd_plan_401k_tax_saving_options_first_contribute"],id:"sd_plan_401k_tax_saving_options_first_contribute",updatable:!0},{title:"Option A Saves You",param:["sd_plan_401k_tax_saving_options_first_saves_you"],id:"sd_plan_401k_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_plan_401k_tax_saving_options_second_contribute"],id:"sd_plan_401k_tax_saving_options_second_contribute",updatable:!0},{title:"Option B Saves You",param:["sd_plan_401k_tax_saving_options_second_saves_you"],id:"sd_plan_401k_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_plan_401k_tax_saving_options_third_contribute"],id:"sd_plan_401k_tax_saving_options_third_contribute",updatable:!0},{title:"Option C Saves You",param:["sd_plan_401k_tax_saving_options_third_saves_you"],id:"sd_plan_401k_tax_saving_options_third_saves_you",updatable:!0},{title:"Taxpayer Wages",param:["sd_plan_401k_taxpayer_wages"],id:"sd_plan_401k_taxpayer_wages",updatable:!0},{title:"Spouse Wages",param:["sd_plan_401k_spouse_wages"],id:"sd_plan_401k_spouse_wages",updatable:!0},{title:"Taxpayer 401k Contributions",param:["sd_plan_401k_current_taxpayer_401k_contributions"],id:"sd_plan_401k_current_taxpayer_401k_contributions",updatable:!0},{title:"Spouse 401k Contributions",param:["sd_plan_401k_current_spouse_401k_contributions"],id:"sd_plan_401k_current_spouse_401k_contributions",updatable:!0}]},{title:"Auto Lease",id:"sd_auto_lease_enable",updatable:!0,children:[{title:"Description",id:"sd_auto_lease_what_it_is_text",updatable:!1},{title:"Lease Pros",id:"sd_auto_lease_what_it_is_lease_pros",updatable:!1},{title:"Lease Cons",id:"sd_auto_lease_what_it_is_lease_cons",updatable:!1},{title:"Purchase Pros",id:"sd_auto_lease_what_it_is_purchase_pros",updatable:!1},{title:"Purchase Cons",id:"sd_auto_lease_what_it_is_purchase_cons",updatable:!1},{title:"Business Use",param:["sd_auto_lease_business_use"],id:"sd_auto_lease_business_use",updatable:!0},{title:"Purchase Price",param:["sd_auto_lease_purchase_price"],id:"sd_auto_lease_purchase_price",updatable:!0},{title:"Vehicle Weight",param:["sd_auto_lease_vehicle_weight"],id:"sd_auto_lease_vehicle_weight",updatable:!0},{title:"Lease Payment",param:["sd_auto_lease_lease_payment"],id:"sd_auto_lease_lease_payment",updatable:!0},{title:"Lease Term",param:["sd_auto_lease_lease_term"],id:"sd_auto_lease_lease_term",updatable:!0},{title:"Purchase Depreciation 1st Year",param:["sd_auto_lease_purchase_depreciation_first_year"],id:"sd_auto_lease_purchase_depreciation_first_year",updatable:!0},{title:"Purchase Depreciation 2nd Year",param:["sd_auto_lease_purchase_depreciation_second_year"],id:"sd_auto_lease_purchase_depreciation_second_year",updatable:!0},{title:"Purchase Depreciation 3rd Year",param:["sd_auto_lease_purchase_depreciation_third_year"],id:"sd_auto_lease_purchase_depreciation_third_year",updatable:!0},{title:"Purchase Depreciation 4th Year",param:["sd_auto_lease_purchase_depreciation_fourth_year"],id:"sd_auto_lease_purchase_depreciation_fourth_year",updatable:!0},{title:"Purchase Depreciation 5th Year",param:["sd_auto_lease_purchase_depreciation_fifth_year"],id:"sd_auto_lease_purchase_depreciation_fifth_year",updatable:!0},{title:"Purchase Tax Savings 1st Year",param:["sd_auto_lease_purchase_tax_savings_first_year"],id:"sd_auto_lease_purchase_tax_savings_first_year",updatable:!0},{title:"Purchase Tax Savings 2nd Year",param:["sd_auto_lease_purchase_tax_savings_second_year"],id:"sd_auto_lease_purchase_tax_savings_second_year",updatable:!0},{title:"Purchase Tax Savings 3rd Year",param:["sd_auto_lease_purchase_tax_savings_third_year"],id:"sd_auto_lease_purchase_tax_savings_third_year",updatable:!0},{title:"Purchase Tax Savings 4th Year",param:["sd_auto_lease_purchase_tax_savings_fourth_year"],id:"sd_auto_lease_purchase_tax_savings_fourth_year",updatable:!0},{title:"Purchase Tax Savings 5th Year",param:["sd_auto_lease_purchase_tax_savings_fifth_year"],id:"sd_auto_lease_purchase_tax_savings_fifth_year",updatable:!0},{title:"Lease Tax Savings 1st Year",param:["sd_auto_lease_lease_tax_savings_first_year"],id:"sd_auto_lease_lease_tax_savings_first_year",updatable:!0},{title:"Lease Tax Savings 2nd Year",param:["sd_auto_lease_lease_tax_savings_second_year"],id:"sd_auto_lease_lease_tax_savings_second_year",updatable:!0},{title:"Lease Tax Savings 3rd Year",param:["sd_auto_lease_lease_tax_savings_third_year"],id:"sd_auto_lease_lease_tax_savings_third_year",updatable:!0},{title:"Lease Tax Savings 4th Year",param:["sd_auto_lease_lease_tax_savings_fourth_year"],id:"sd_auto_lease_lease_tax_savings_fourth_year",updatable:!0},{title:"Lease Tax Savings 5th Year",param:["sd_auto_lease_lease_tax_savings_fifth_year"],id:"sd_auto_lease_lease_tax_savings_fifth_year",updatable:!0},{title:"Lease Expense 1st Year",param:["sd_auto_lease_lease_expense_first_year"],id:"sd_auto_lease_lease_expense_first_year",updatable:!0},{title:"Lease Expense 2nd Year",param:["sd_auto_lease_lease_expense_second_year"],id:"sd_auto_lease_lease_expense_second_year",updatable:!0},{title:"Lease Expense 3rd Year",param:["sd_auto_lease_lease_expense_third_year"],id:"sd_auto_lease_lease_expense_third_year",updatable:!0},{title:"Lease Expense 4th Year",param:["sd_auto_lease_lease_expense_fourth_year"],id:"sd_auto_lease_lease_expense_fourth_year",updatable:!0},{title:"Lease Expense 5th Year",param:["sd_auto_lease_lease_expense_fifth_year"],id:"sd_auto_lease_lease_expense_fifth_year",updatable:!0}]},{title:"Business Entity Planner",id:"sd_business_entity_planner_enable",updatable:!0,children:[{title:"What it is",id:"sd_business_entity_planner_what_it_is_tree",updatable:!1,children:[{title:"Description",id:"sd_business_entity_planner_what_it_is_text",updatable:!1},...xs.map(gp,function(e){return[{title:`${e.name} Description`,id:`sd_business_entity_planner_what_it_is_${e.code}_description`,updatable:!1},{title:`${e.name} Pros`,id:`sd_business_entity_planner_what_it_is_${e.code}_pros`,updatable:!1},{title:`${e.name} Cons`,id:`sd_business_entity_planner_what_it_is_${e.code}_cons`,updatable:!1},{title:`${e.name} Percent`,id:`sd_business_entity_planner_what_it_is_${e.code}_percent`,updatable:!1}]}).flat()]},{title:"Comparison",id:"sd_business_entity_planner_comparison_tree",updatable:!0,children:[{title:"Description",id:"sd_business_entity_planner_comparison_description",updatable:!1},...xs.map(Wb,function(e){return{title:`${e.name} Company`,id:`sd_business_entity_planner_${e.code}_company_tree`,updatable:!0,children:[{title:"Name",id:`sd_business_entity_planner_${e.code}_company_name`,param:[`sd_business_entity_planner_${e.code}_company_name`],updatable:!0},{title:"Current Type",id:`sd_business_entity_planner_${e.code}_company_type_current`,param:[`sd_business_entity_planner_${e.code}_company_type_current`],updatable:!0},{title:"Recommended Type",id:`sd_business_entity_planner_${e.code}_company_type_recommended`,param:[`sd_business_entity_planner_${e.code}_company_type_recommended`],updatable:!0},...xs.map(gp,function(t){return[{title:`${t.name} SE Tax`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_se_tax`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_se_tax`],updatable:!0},...t.code=="s_corp"?[{title:`${t.name} FICA Tax`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_fica_tax`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_fica_tax`],updatable:!0}]:[],...t.code=="c_corp"?[{title:`${t.name} Income Tax (Corporate)`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_income_tax_c`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_income_tax_c`],updatable:!0}]:[],{title:`${t.name} Income Tax`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_income_tax`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_income_tax`],updatable:!0},{title:`${t.name} State Tax`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_state_tax`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_state_tax`],updatable:!0},{title:`${t.name} Total Tax`,id:`sd_business_entity_planner_${e.code}_company_${t.code}_total_tax`,param:[`sd_business_entity_planner_${e.code}_company_${t.code}_total_tax`],updatable:!0}]}).flat(),{title:"Savings",id:`sd_business_entity_planner_${e.code}_company_savings`,param:[`sd_business_entity_planner_${e.code}_company_savings`],updatable:!0}]}})]},{title:"How to Сhange Your Business Stucture",id:"sd_business_entity_planner_how_to_change_business_tree",updatable:!1,children:[{title:"Description",id:"sd_business_entity_planner_how_to_change_business_stucture",updatable:!1}]},{title:"Top 3 Widget Options",id:"sd_business_entity_planner_top_3_widget_options",updatable:!0,children:[{title:"Company Name",id:"top_3_strategy_picks_business_entity_best_company_name",updatable:!0,param:["top_3_strategy_picks_business_entity_best_company_name"]},{title:"Recommended Type",id:"top_3_strategy_picks_business_entity_best_company_recommended",updatable:!0,param:["top_3_strategy_picks_business_entity_best_company_recommended"]},{title:"Savings",id:"top_3_strategy_picks_business_entity_best_company_saves_you",updatable:!0,param:["top_3_strategy_picks_business_entity_best_company_saves_you"]},{title:"Other Companies Savings",id:"top_3_strategy_picks_business_entity_other_companies_saves_you",updatable:!0,param:["top_3_strategy_picks_business_entity_other_companies_saves_you"]}]}]},{title:"Traditional and Roth IRA",id:"sd_traditional_and_roth_ira_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_traditional_ira_top_3_widget_options",updatable:!0,children:[{title:"Traditional IRA Contributions",id:"top_3_strategy_picks_traditional_ira_contributions",updatable:!0,param:["top_3_strategy_picks_traditional_ira_contributions"]},{title:"Traditional IRA Savings",id:"top_3_strategy_picks_traditional_ira_saves_you",updatable:!0,param:["top_3_strategy_picks_traditional_ira_saves_you"]}]},...xs.map([["traditional_ira","Traditional IRA"],["roth_ira","Roth IRA"]],([e,t])=>({title:t,id:`sd_${e}_tree`,updatable:!0,children:[{title:"Description",id:`sd_${e}_what_it_is_text`,param:[`sd_${e}_what_it_is_text`],updatable:!1},{title:"Planner Description",id:`sd_${e}_planner_description`,param:[`sd_${e}_planner_description`],updatable:!1},{title:"Contributions Grow",id:`sd_${e}_taxes_contributions_grow`,param:[`sd_${e}_taxes_contributions_grow`],updatable:!1},{title:"Tax-Deductibility",id:`sd_${e}_taxes_tax_deductibility`,param:[`sd_${e}_taxes_tax_deductibility`],updatable:!1},{title:"Contributions Come From",id:`sd_${e}_contributions_come_from`,param:[`sd_${e}_contributions_come_from`],updatable:!1},{title:"Max Contribution",id:`sd_${e}_contributions_max_contribution`,param:[`sd_${e}_contributions_max_contribution`],updatable:!1},{title:"Penalties",id:`sd_${e}_withdrawals_penalties`,param:[`sd_${e}_withdrawals_penalties`],updatable:!1},{title:"Mandatory Distributions",id:`sd_${e}_withdrawals_mandatory_distributions`,param:[`sd_${e}_withdrawals_mandatory_distributions`],updatable:!1},...xs.map([["taxpayer","Taxpayer"],["spouse","Spouse"]],([n,i])=>[{title:`${i} Wages`,id:`sd_${e}_tax_saving_${n}_wages`,param:[`sd_${e}_tax_saving_${n}_wages`],updatable:!0},{title:`${i} Current Contributions`,id:`sd_${e}_tax_saving_${n}_contributions`,param:[`sd_${e}_tax_saving_${n}_contributions`],updatable:!0}]).flat(),...xs.map([["first","Option A"],["second","Option B"],["third","Option C"]],([n,i])=>[{title:`${i} Contribute`,id:`sd_${e}_tax_saving_options_${n}_contribute`,param:[`sd_${e}_tax_saving_options_${n}_contribute`],updatable:!0},{title:`${i} And Save`,id:`sd_${e}_tax_saving_options_${n}_saves_you`,param:[`sd_${e}_tax_saving_options_${n}_saves_you`],updatable:!0}]).flat()]}))]},{title:"Health Savings",id:"sd_health_savings_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_health_savings_top_3_widget_options",updatable:!0,children:[{title:"Health Savings Type",id:"top_3_strategy_picks_health_savings_type",param:["top_3_strategy_picks_health_savings_type"],updatable:!0},{title:"Health Savings Contribution",id:"top_3_strategy_picks_health_savings_adding",param:["top_3_strategy_picks_health_savings_adding"],updatable:!0},{title:"Health Savings Saves You",id:"top_3_strategy_picks_health_savings_saves_you",param:["top_3_strategy_picks_health_savings_saves_you"],updatable:!0}]},{title:"Description",id:"sd_health_savings_what_it_is_text",param:["sd_health_savings_what_it_is_text"],updatable:!1},{title:"Notes",id:"sd_health_savings_description",param:["sd_health_savings_description"],updatable:!1},...xs.map([["previous","Previous Tax Year"],["current","Current Tax Year"]],([e,t])=>({title:`${t} Contribution Limits`,id:`sd_health_savings_contribution_limits_${e}_tree`,updatable:!0,children:[{title:t,param:[`sd_health_savings_contribution_limits_${e}_tax_year`],id:`sd_health_savings_contribution_limits_${e}_tax_year`,updatable:!0},...xs.map([["hsa","Health Savings Account (HSA)"],["hra","Health Reimbursement Agreement (HRA)"],["fsa","Flexible Spending Account (FSA)"]],([n,i])=>({title:i,id:`sd_health_savings_contribution_limits_${e}_tree_${n}_tree`,updatable:!0,children:[...xs.map([["general","General"],["self","Self Only"],["family","Family"]],([r,a])=>({title:a,param:[`sd_health_savings_contribution_limits_${e}_${n}_${r}`],id:`sd_health_savings_contribution_limits_${e}_${n}_${r}`,updatable:!0}))]}))]})),{title:"Tax Savings",id:"sd_health_savings_tax_saving_options_tree",updatable:!0,children:[...xs.map([["contribute","Contribute"],["hsa_saves_you","Health Savings Account (HSA)"],["hra_saves_you","Health Reimbursement Agreement (HRA)"],["fsa_saves_you","Flexible Spending Account (FSA)"]],([e,t])=>({title:t,id:`sd_health_savings_tax_saving_options_${e}_tree`,updatable:!0,children:[...xs.map([["first","Option A"],["second","Option B"],["third","Option C"]],([n,i])=>({title:i,param:[`sd_health_savings_tax_saving_options_${n}_${e}`],id:`sd_health_savings_tax_saving_options_${n}_${e}`,updatable:!0}))]}))]}]},{title:"Defined Benefit",id:"sd_defined_benefit_enable",updatable:!0,children:[{title:"Top 3 Widget Options",id:"sd_defined_benefit_top_3_widget_options",updatable:!0,children:[{title:"Adding",id:"top_3_strategy_picks_defined_benefit_adding",updatable:!0,param:["top_3_strategy_picks_defined_benefit_adding"]},{title:"Savings",id:"top_3_strategy_picks_defined_benefit_saves_you",updatable:!0,param:["top_3_strategy_picks_defined_benefit_saves_you"]}]},{title:"Description",id:"sd_defined_benefit_what_it_is_text",updatable:!1},{title:"First Item",id:"sd_defined_benefit_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_defined_benefit_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_defined_benefit_what_it_is_third_item",updatable:!1},{title:"Fourth Item",id:"sd_defined_benefit_what_it_is_fourth_item",updatable:!1},{title:"Description of Ratings",id:"sd_defined_benefit_ratings_text",updatable:!1},{title:"Current Taxable Income",param:["sd_defined_benefit_current_taxable_income"],id:"sd_defined_benefit_current_taxable_income",updatable:!0},{title:"Current Pension Contributions",param:["sd_defined_benefit_current_pension_contributions"],id:"sd_defined_benefit_current_pension_contributions",updatable:!0},{title:"Option A Expense",param:["sd_defined_benefit_tax_saving_options_first_expense"],id:"sd_defined_benefit_tax_saving_options_first_expense",updatable:!0},{title:"Option A Saves You",param:["sd_defined_benefit_tax_saving_options_first_saves_you"],id:"sd_defined_benefit_tax_saving_options_first_saves_you",updatable:!0},{title:"Option B Expense",param:["sd_defined_benefit_tax_saving_options_second_expense"],id:"sd_defined_benefit_tax_saving_options_second_expense",updatable:!0},{title:"Option B Saves You",param:["sd_defined_benefit_tax_saving_options_second_saves_you"],id:"sd_defined_benefit_tax_saving_options_second_saves_you",updatable:!0},{title:"Option C Expense",param:["sd_defined_benefit_tax_saving_options_third_expense"],id:"sd_defined_benefit_tax_saving_options_third_expense",updatable:!0},{title:"Option C Saves You",param:["sd_defined_benefit_tax_saving_options_third_saves_you"],id:"sd_defined_benefit_tax_saving_options_third_saves_you",updatable:!0}]},{title:"Estimated Tax Payments",id:"sd_etp_enable",updatable:!0,children:[{title:"Description",id:"sd_etp_what_it_is_text",updatable:!1},{title:"First Item",id:"sd_etp_what_it_is_first_item",updatable:!1},{title:"Second Item",id:"sd_etp_what_it_is_second_item",updatable:!1},{title:"Third Item",id:"sd_etp_what_it_is_third_item",updatable:!1},{title:"Previous Tax Year",param:["sd_etp_previous_tax_year"],id:"sd_etp_previous_tax_year",updatable:!0},{title:"Current Tax Year",param:["sd_etp_current_tax_year"],id:"sd_etp_current_tax_year",updatable:!0},...xs.map([["federal","Federal"],["state","State"]],([e,t])=>({title:t,id:`sd_etp_${e}_tree`,updatable:!0,children:[{title:"Projected Tax Due",param:[`sd_etp_projected_${e}_tax_due`],id:`sd_etp_projected_${e}_tax_due`,updatable:!0},{title:"Tax",param:[`sd_etp_previous_year_${e}_tax`],id:`sd_etp_previous_year_${e}_tax`,updatable:!0},{title:"AGI",param:[`sd_etp_${e}_agi`],id:`sd_etp_${e}_agi`,updatable:!0},{title:"Safe Harbor",param:[`sd_etp_${e}_safe_harbor`],id:`sd_etp_${e}_safe_harbor`,updatable:!0}]})),...xs.map([["first","1st Quarter"],["second","2nd Quarter"],["third","3rd Quarter"],["fourth","4th Quarter"],["total","Annual Totals"]],([e,t])=>({title:t,id:`sd_etp_quarters_${e}_tree`,updatable:!0,children:[...e!="total"?[{title:"Due Date",id:`sd_etp_quarters_${e}_due_date`,param:[`sd_etp_quarters_${e}_due_date`],updatable:!0}]:[],...xs.map([["federal","Federal"],["state","State"]],([n,i])=>({title:i,id:`sd_etp_quarters_${e}_tree_${n}_tree`,updatable:!0,children:[{title:"Required Payment",id:`sd_etp_quarters_${e}_required_${n}_payment`,param:[`sd_etp_quarters_${e}_required_${n}_payment`],updatable:!0},{title:"Projected Payment",id:`sd_etp_quarters_${e}_projected_${n}_payment`,param:[`sd_etp_quarters_${e}_projected_${n}_payment`],updatable:!0},{title:"Payment Made",id:`sd_etp_quarters_${e}_${n}_payment_made`,param:[`sd_etp_quarters_${e}_${n}_payment_made`],updatable:!0},{title:"Cumulative Shortfall",id:`sd_etp_quarters_${e}_${n}_cumulative_shortfall`,param:[`sd_etp_quarters_${e}_${n}_cumulative_shortfall`],updatable:!0}]}))]}))]}]},{title:"Tips And Advice For You",id:"tips_and_advices_for_you_enable",updatable:!1,children:[{title:"Description",id:"tips_and_advices_for_you_text",updatable:!1},{title:"Font Size",id:"tips_and_advices_for_you_font_size",updatable:!1}]},{title:"Important Tax Return Due Dates",id:"tax_return_due_dates_enable",updatable:!0,children:[{title:"Remember",id:"tax_return_due_dates_remember_text",param:["tax_return_due_dates_remember_text"],updatable:!1},...xs.map(Object.entries(Vb),([e,t])=>[{title:`${t}`,id:`tax_return_due_dates_${e}`,param:[`tax_return_due_dates_${e}`],updatable:!0}]).flat()]},{title:"Your Demographics",id:"your_demographics_enable",updatable:!0,children:[{title:"Personal Data",id:"your_demographics_personal_data",updatable:!0,children:[{title:"Name",id:"your_demographics_personal_data_name",param:["your_demographics_personal_data_name"],updatable:!0},{title:"Number Of Dependents",id:"your_demographics_personal_data_number_of_dependents",param:["your_demographics_personal_data_number_of_dependents"],updatable:!0},{title:"State Of Residency",id:"your_demographics_personal_data_state_of_residency",param:["your_demographics_personal_data_state_of_residency"],updatable:!0},{title:"Filing Status",id:"filing_status",param:["filing_status"],updatable:!0},{title:"Marginal Tax Rate",id:"your_demographics_personal_data_tax_brackets",param:["your_demographics_personal_data_tax_brackets"],updatable:!0},{title:"Extra Field Name",id:"your_demographics_personal_data_extra_field_name",param:["your_demographics_personal_data_extra_field_name"],updatable:!1},{title:"Extra Field",id:"your_demographics_personal_data_extra_field",param:["your_demographics_personal_data_extra_field"],updatable:!1}]},{title:"First Business Data",id:"your_demographics_business_data_first_enable",updatable:!0,children:[{title:"Name",id:"your_demographics_business_data_first_business_name",param:["your_demographics_business_data_first_business_name"],updatable:!0},{title:"Type",id:"your_demographics_business_data_first_business_entity_type",param:["your_demographics_business_data_first_business_entity_type"],updatable:!0},{title:"Ownership Share",id:"your_demographics_business_data_first_ownership_share",param:["your_demographics_business_data_first_ownership_share"],updatable:!0},{title:"Start Date",id:"your_demographics_business_data_first_start_date",param:["your_demographics_business_data_first_start_date"],updatable:!0}]},{title:"Second Business Data",id:"your_demographics_business_data_second_enable",updatable:!0,children:[{title:"Name",id:"your_demographics_business_data_second_business_name",param:["your_demographics_business_data_second_business_name"],updatable:!0},{title:"Type",id:"your_demographics_business_data_second_business_entity_type",param:["your_demographics_business_data_second_business_entity_type"],updatable:!0},{title:"Ownership Share",id:"your_demographics_business_data_second_ownership_share",param:["your_demographics_business_data_second_ownership_share"],updatable:!0},{title:"Start Date",id:"your_demographics_business_data_second_start_date",param:["your_demographics_business_data_second_start_date"],updatable:!0}]},{title:"Third Business Data",id:"your_demographics_business_data_third_enable",updatable:!0,children:[{title:"Name",id:"your_demographics_business_data_third_business_name",param:["your_demographics_business_data_third_business_name"],updatable:!0},{title:"Type",id:"your_demographics_business_data_third_business_entity_type",param:["your_demographics_business_data_third_business_entity_type"],updatable:!0},{title:"Ownership Share",id:"your_demographics_business_data_third_ownership_share",param:["your_demographics_business_data_third_ownership_share"],updatable:!0},{title:"Start Date",id:"your_demographics_business_data_third_start_date",param:["your_demographics_business_data_third_start_date"],updatable:!0}]},{title:"Tax Info",id:"tax_info",updatable:!0,children:[{title:"Federal Tax Due",id:"your_demographics_taxes_federal_tax_due",param:["your_demographics_taxes_federal_tax_due"],updatable:!0},{title:"Payments And Credits",id:"your_demographics_taxes_payments_and_credits",param:["your_demographics_taxes_payments_and_credits"],updatable:!0},{title:"Remaining Amount Due",id:"your_demographics_taxes_remaining_amount_due",param:["your_demographics_taxes_remaining_amount_due"],updatable:!0},{title:"Business State Tax Due",id:"your_demographics_taxes_business_state_tax_due",param:["your_demographics_taxes_business_state_tax_due"],updatable:!0},{title:"Business Payments And Credits",id:"your_demographics_taxes_business_payments_and_credits",param:["your_demographics_taxes_business_payments_and_credits"],updatable:!0},{title:"Business Remaining Amount Due",id:"your_demographics_taxes_business_remaining_amount_due",param:["your_demographics_taxes_business_remaining_amount_due"],updatable:!0},{title:"Next Lower Level Tax Bracket Income Level",id:"your_demographics_next_lower_tax_bracket_income_level",param:["your_demographics_next_lower_tax_bracket_income_level"],updatable:!0},{title:"Lower Taxable Income By",id:"your_demographics_lower_taxable_income_by",param:["your_demographics_lower_taxable_income_by"],updatable:!0},{title:"Federal Tax Savings If Filed Reverse Type: Joint or Separate",id:"your_demographics_married_and_separate_fed_tax_savings",param:["your_demographics_married_and_separate_fed_tax_savings"],updatable:!0},{title:"Federal Tax Savings Because of Current S-Corp Companies",id:"your_demographics_being_s_corp_fed_tax_has_saved",param:["your_demographics_being_s_corp_fed_tax_has_saved"],updatable:!0},{title:"Federal Tax Savings If Switch the Rest of the Companies to S-Corp",id:"your_demographics_being_s_corp_fed_tax_can_save",param:["your_demographics_being_s_corp_fed_tax_can_save"],updatable:!0}]}]}]}];const vp=ao(rB),Dd=vo(vp,(e,t)=>{t(Xn.fromPairs(dx(n=>[[n.id,n]],e)))});function aB(e){return function(t){const n=e[t.id];return n?{...t,title:n}:t}}function fx(e,t){return t.map(n=>{const i=e(Xn.omit(n,"children")),r=n.children;return r?{...i,children:fx(e,r)}:i})}const tw=ao(new Set),wm=vo(tw,e=>e.size>0),sB=vo(tw,e=>new Set([...e].flatMap(t=>zS[t]?[t,...zS[t]]:[t])));function cx(e,t=[],n={}){for(const i of e){const r=i.id;n={...n,[r]:t};const a=i.children;a&&(n=cx(a,[...t,r],n))}return n}const zS=cx(y7(vp));class Fo{constructor(t){this.baseEndpoint=t,this.controller=new AbortController,this.headers=Object.freeze({Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":this.csrfToken()})}async baseQuery(t,n={}){this.controller.abort(),this.controller=new AbortController;let i,r;try{const a=await fetch(t,Object.assign(n,{signal:this.controller.signal}));i=a.ok;const s=await a.text();r=JSON.parse(s)}catch(a){throw a.name==="AbortError"?a:(console.log(a),new Error(Fo.ERROR_MSG))}if(r.error)throw new Error(r.error);if(!i)throw new Error(Fo.ERROR_MSG);return r}csrfToken(){return window.$('meta[name="csrf-token"]').attr("content")}}Fo.ERROR_MSG="Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.";class oB extends Fo{async one(t){return this.baseQuery(this.baseEndpoint.replace(":report_id",t))}}//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var _x;function zn(){return _x.apply(null,arguments)}function lB(e){_x=e}function ju(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Zc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Pa(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nw(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Pa(e,t))return!1;return!0}function ll(e){return e===void 0}function df(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Tm(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function px(e,t){var n=[],i,r=e.length;for(i=0;i<r;++i)n.push(t(e[i],i));return n}function nc(e,t){for(var n in t)Pa(t,n)&&(e[n]=t[n]);return Pa(t,"toString")&&(e.toString=t.toString),Pa(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Od(e,t,n,i){return Fx(e,t,n,i,!0).utc()}function uB(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function xr(e){return e._pf==null&&(e._pf=uB()),e._pf}var zb;Array.prototype.some?zb=Array.prototype.some:zb=function(e){var t=Object(this),n=t.length>>>0,i;for(i=0;i<n;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};function iw(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(t=xr(e),n=zb.call(t.parsedDateParts,function(r){return r!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i;return e._isValid}function f0(e){var t=Od(NaN);return e!=null?nc(xr(t),e):xr(t).userInvalidated=!0,t}var YS=zn.momentProperties=[],Z1=!1;function rw(e,t){var n,i,r,a=YS.length;if(ll(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),ll(t._i)||(e._i=t._i),ll(t._f)||(e._f=t._f),ll(t._l)||(e._l=t._l),ll(t._strict)||(e._strict=t._strict),ll(t._tzm)||(e._tzm=t._tzm),ll(t._isUTC)||(e._isUTC=t._isUTC),ll(t._offset)||(e._offset=t._offset),ll(t._pf)||(e._pf=xr(t)),ll(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)i=YS[n],r=t[i],ll(r)||(e[i]=r);return e}function km(e){rw(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Z1===!1&&(Z1=!0,zn.updateOffset(this),Z1=!1)}function Bu(e){return e instanceof km||e!=null&&e._isAMomentObject!=null}function hx(e){zn.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function hu(e,t){var n=!0;return nc(function(){if(zn.deprecationHandler!=null&&zn.deprecationHandler(null,e),n){var i=[],r,a,s,o=arguments.length;for(a=0;a<o;a++){if(r="",typeof arguments[a]=="object"){r+=`
[`+a+"] ";for(s in arguments[0])Pa(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[a];i.push(r)}hx(e+`
Arguments: `+Array.prototype.slice.call(i).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var GS={};function mx(e,t){zn.deprecationHandler!=null&&zn.deprecationHandler(e,t),GS[e]||(hx(t),GS[e]=!0)}zn.suppressDeprecationWarnings=!1;zn.deprecationHandler=null;function Md(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function dB(e){var t,n;for(n in e)Pa(e,n)&&(t=e[n],Md(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Yb(e,t){var n=nc({},e),i;for(i in t)Pa(t,i)&&(Zc(e[i])&&Zc(t[i])?(n[i]={},nc(n[i],e[i]),nc(n[i],t[i])):t[i]!=null?n[i]=t[i]:delete n[i]);for(i in e)Pa(e,i)&&!Pa(t,i)&&Zc(e[i])&&(n[i]=nc({},n[i]));return n}function aw(e){e!=null&&this.set(e)}var Gb;Object.keys?Gb=Object.keys:Gb=function(e){var t,n=[];for(t in e)Pa(e,t)&&n.push(t);return n};var fB={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function cB(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return Md(i)?i.call(t,n):i}function Pd(e,t,n){var i=""+Math.abs(e),r=t-i.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var sw=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ug=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,eb={},fp={};function zi(e,t,n,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),e&&(fp[e]=r),t&&(fp[t[0]]=function(){return Pd(r.apply(this,arguments),t[1],t[2])}),n&&(fp[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function _B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function pB(e){var t=e.match(sw),n,i;for(n=0,i=t.length;n<i;n++)fp[t[n]]?t[n]=fp[t[n]]:t[n]=_B(t[n]);return function(r){var a="",s;for(s=0;s<i;s++)a+=Md(t[s])?t[s].call(r,e):t[s];return a}}function av(e,t){return e.isValid()?(t=gx(t,e.localeData()),eb[t]=eb[t]||pB(t),eb[t](e)):e.localeData().invalidDate()}function gx(e,t){var n=5;function i(r){return t.longDateFormat(r)||r}for(Ug.lastIndex=0;n>=0&&Ug.test(e);)e=e.replace(Ug,i),Ug.lastIndex=0,n-=1;return e}var hB={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function mB(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(sw).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var gB="Invalid date";function vB(){return this._invalidDate}var bB="%d",yB=/\d{1,2}/;function wB(e){return this._ordinal.replace("%d",e)}var TB={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function kB(e,t,n,i){var r=this._relativeTime[n];return Md(r)?r(e,t,n,i):r.replace(/%d/i,e)}function SB(e,t){var n=this._relativeTime[e>0?"future":"past"];return Md(n)?n(t):n.replace(/%s/i,t)}var KS={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function mu(e){return typeof e=="string"?KS[e]||KS[e.toLowerCase()]:void 0}function ow(e){var t={},n,i;for(i in e)Pa(e,i)&&(n=mu(i),n&&(t[n]=e[i]));return t}var CB={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function PB(e){var t=[],n;for(n in e)Pa(e,n)&&t.push({unit:n,priority:CB[n]});return t.sort(function(i,r){return i.priority-r.priority}),t}var vx=/\d/,$l=/\d\d/,bx=/\d{3}/,lw=/\d{4}/,c0=/[+-]?\d{6}/,fs=/\d\d?/,yx=/\d\d\d\d?/,wx=/\d\d\d\d\d\d?/,_0=/\d{1,3}/,uw=/\d{1,4}/,p0=/[+-]?\d{1,6}/,Ap=/\d+/,h0=/[+-]?\d+/,EB=/Z|[+-]\d\d:?\d\d/gi,m0=/Z|[+-]\d\d(?::?\d\d)?/gi,IB=/[+-]?\d+(\.\d{1,3})?/,Sm=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Dp=/^[1-9]\d?/,dw=/^([1-9]\d|\d)/,bv;bv={};function mi(e,t,n){bv[e]=Md(t)?t:function(i,r){return i&&n?n:t}}function AB(e,t){return Pa(bv,e)?bv[e](t._strict,t._locale):new RegExp(DB(e))}function DB(e){return lf(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,i,r,a){return n||i||r||a}))}function lf(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ru(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function sa(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ru(t)),n}var Kb={};function za(e,t){var n,i=t,r;for(typeof e=="string"&&(e=[e]),df(t)&&(i=function(a,s){s[t]=sa(a)}),r=e.length,n=0;n<r;n++)Kb[e[n]]=i}function Cm(e,t){za(e,function(n,i,r,a){r._w=r._w||{},t(n,r._w,r,a)})}function OB(e,t,n){t!=null&&Pa(Kb,e)&&Kb[e](t,n._a,n,e)}function g0(e){return e%4===0&&e%100!==0||e%400===0}var $o=0,af=1,yd=2,Gs=3,Nu=4,sf=5,Qc=6,MB=7,xB=8;zi("Y",0,0,function(){var e=this.year();return e<=9999?Pd(e,4):"+"+e});zi(0,["YY",2],0,function(){return this.year()%100});zi(0,["YYYY",4],0,"year");zi(0,["YYYYY",5],0,"year");zi(0,["YYYYYY",6,!0],0,"year");mi("Y",h0);mi("YY",fs,$l);mi("YYYY",uw,lw);mi("YYYYY",p0,c0);mi("YYYYYY",p0,c0);za(["YYYYY","YYYYYY"],$o);za("YYYY",function(e,t){t[$o]=e.length===2?zn.parseTwoDigitYear(e):sa(e)});za("YY",function(e,t){t[$o]=zn.parseTwoDigitYear(e)});za("Y",function(e,t){t[$o]=parseInt(e,10)});function zh(e){return g0(e)?366:365}zn.parseTwoDigitYear=function(e){return sa(e)+(sa(e)>68?1900:2e3)};var Tx=Op("FullYear",!0);function RB(){return g0(this.year())}function Op(e,t){return function(n){return n!=null?(kx(this,e,n),zn.updateOffset(this,t),this):tm(this,e)}}function tm(e,t){if(!e.isValid())return NaN;var n=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return i?n.getUTCSeconds():n.getSeconds();case"Minutes":return i?n.getUTCMinutes():n.getMinutes();case"Hours":return i?n.getUTCHours():n.getHours();case"Date":return i?n.getUTCDate():n.getDate();case"Day":return i?n.getUTCDay():n.getDay();case"Month":return i?n.getUTCMonth():n.getMonth();case"FullYear":return i?n.getUTCFullYear():n.getFullYear();default:return NaN}}function kx(e,t,n){var i,r,a,s,o;if(!(!e.isValid()||isNaN(n))){switch(i=e._d,r=e._isUTC,t){case"Milliseconds":return void(r?i.setUTCMilliseconds(n):i.setMilliseconds(n));case"Seconds":return void(r?i.setUTCSeconds(n):i.setSeconds(n));case"Minutes":return void(r?i.setUTCMinutes(n):i.setMinutes(n));case"Hours":return void(r?i.setUTCHours(n):i.setHours(n));case"Date":return void(r?i.setUTCDate(n):i.setDate(n));case"FullYear":break;default:return}a=n,s=e.month(),o=e.date(),o=o===29&&s===1&&!g0(a)?28:o,r?i.setUTCFullYear(a,s,o):i.setFullYear(a,s,o)}}function $B(e){return e=mu(e),Md(this[e])?this[e]():this}function NB(e,t){if(typeof e=="object"){e=ow(e);var n=PB(e),i,r=n.length;for(i=0;i<r;i++)this[n[i].unit](e[n[i].unit])}else if(e=mu(e),Md(this[e]))return this[e](t);return this}function FB(e,t){return(e%t+t)%t}var Rs;Array.prototype.indexOf?Rs=Array.prototype.indexOf:Rs=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function fw(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=FB(t,12);return e+=(t-n)/12,n===1?g0(e)?29:28:31-n%7%2}zi("M",["MM",2],"Mo",function(){return this.month()+1});zi("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});zi("MMMM",0,0,function(e){return this.localeData().months(this,e)});mi("M",fs,Dp);mi("MM",fs,$l);mi("MMM",function(e,t){return t.monthsShortRegex(e)});mi("MMMM",function(e,t){return t.monthsRegex(e)});za(["M","MM"],function(e,t){t[af]=sa(e)-1});za(["MMM","MMMM"],function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);r!=null?t[af]=r:xr(n).invalidMonth=e});var LB="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Sx="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Cx=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,HB=Sm,jB=Sm;function BB(e,t){return e?ju(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Cx).test(t)?"format":"standalone"][e.month()]:ju(this._months)?this._months:this._months.standalone}function UB(e,t){return e?ju(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Cx.test(t)?"format":"standalone"][e.month()]:ju(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function qB(e,t,n){var i,r,a,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=Od([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(r=Rs.call(this._shortMonthsParse,s),r!==-1?r:null):(r=Rs.call(this._longMonthsParse,s),r!==-1?r:null):t==="MMM"?(r=Rs.call(this._shortMonthsParse,s),r!==-1?r:(r=Rs.call(this._longMonthsParse,s),r!==-1?r:null)):(r=Rs.call(this._longMonthsParse,s),r!==-1?r:(r=Rs.call(this._shortMonthsParse,s),r!==-1?r:null))}function WB(e,t,n){var i,r,a;if(this._monthsParseExact)return qB.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=Od([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[i]&&(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[i].test(e))return i;if(n&&t==="MMM"&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}function Px(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=sa(t);else if(t=e.localeData().monthsParse(t),!df(t))return e}var n=t,i=e.date();return i=i<29?i:Math.min(i,fw(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,i):e._d.setMonth(n,i),e}function Ex(e){return e!=null?(Px(this,e),zn.updateOffset(this,!0),this):tm(this,"Month")}function VB(){return fw(this.year(),this.month())}function zB(e){return this._monthsParseExact?(Pa(this,"_monthsRegex")||Ix.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Pa(this,"_monthsShortRegex")||(this._monthsShortRegex=HB),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function YB(e){return this._monthsParseExact?(Pa(this,"_monthsRegex")||Ix.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Pa(this,"_monthsRegex")||(this._monthsRegex=jB),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ix(){function e(l,d){return d.length-l.length}var t=[],n=[],i=[],r,a,s,o;for(r=0;r<12;r++)a=Od([2e3,r]),s=lf(this.monthsShort(a,"")),o=lf(this.months(a,"")),t.push(s),n.push(o),i.push(o),i.push(s);t.sort(e),n.sort(e),i.sort(e),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function GB(e,t,n,i,r,a,s){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,i,r,a,s),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,i,r,a,s),o}function nm(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function yv(e,t,n){var i=7+t-n,r=(7+nm(e,0,i).getUTCDay()-t)%7;return-r+i-1}function Ax(e,t,n,i,r){var a=(7+n-i)%7,s=yv(e,i,r),o=1+7*(t-1)+a+s,l,d;return o<=0?(l=e-1,d=zh(l)+o):o>zh(e)?(l=e+1,d=o-zh(e)):(l=e,d=o),{year:l,dayOfYear:d}}function im(e,t,n){var i=yv(e.year(),t,n),r=Math.floor((e.dayOfYear()-i-1)/7)+1,a,s;return r<1?(s=e.year()-1,a=r+uf(s,t,n)):r>uf(e.year(),t,n)?(a=r-uf(e.year(),t,n),s=e.year()+1):(s=e.year(),a=r),{week:a,year:s}}function uf(e,t,n){var i=yv(e,t,n),r=yv(e+1,t,n);return(zh(e)-i+r)/7}zi("w",["ww",2],"wo","week");zi("W",["WW",2],"Wo","isoWeek");mi("w",fs,Dp);mi("ww",fs,$l);mi("W",fs,Dp);mi("WW",fs,$l);Cm(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=sa(e)});function KB(e){return im(e,this._week.dow,this._week.doy).week}var XB={dow:0,doy:6};function QB(){return this._week.dow}function JB(){return this._week.doy}function ZB(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function eU(e){var t=im(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}zi("d",0,"do","day");zi("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});zi("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});zi("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});zi("e",0,0,"weekday");zi("E",0,0,"isoWeekday");mi("d",fs);mi("e",fs);mi("E",fs);mi("dd",function(e,t){return t.weekdaysMinRegex(e)});mi("ddd",function(e,t){return t.weekdaysShortRegex(e)});mi("dddd",function(e,t){return t.weekdaysRegex(e)});Cm(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);r!=null?t.d=r:xr(n).invalidWeekday=e});Cm(["d","e","E"],function(e,t,n,i){t[i]=sa(e)});function tU(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function nU(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function cw(e,t){return e.slice(t,7).concat(e.slice(0,t))}var iU="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Dx="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),rU="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),aU=Sm,sU=Sm,oU=Sm;function lU(e,t){var n=ju(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?cw(n,this._week.dow):e?n[e.day()]:n}function uU(e){return e===!0?cw(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function dU(e){return e===!0?cw(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function fU(e,t,n){var i,r,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=Od([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(r=Rs.call(this._weekdaysParse,s),r!==-1?r:null):t==="ddd"?(r=Rs.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=Rs.call(this._minWeekdaysParse,s),r!==-1?r:null):t==="dddd"?(r=Rs.call(this._weekdaysParse,s),r!==-1||(r=Rs.call(this._shortWeekdaysParse,s),r!==-1)?r:(r=Rs.call(this._minWeekdaysParse,s),r!==-1?r:null)):t==="ddd"?(r=Rs.call(this._shortWeekdaysParse,s),r!==-1||(r=Rs.call(this._weekdaysParse,s),r!==-1)?r:(r=Rs.call(this._minWeekdaysParse,s),r!==-1?r:null)):(r=Rs.call(this._minWeekdaysParse,s),r!==-1||(r=Rs.call(this._weekdaysParse,s),r!==-1)?r:(r=Rs.call(this._shortWeekdaysParse,s),r!==-1?r:null))}function cU(e,t,n){var i,r,a;if(this._weekdaysParseExact)return fU.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=Od([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[i].test(e))return i;if(n&&t==="ddd"&&this._shortWeekdaysParse[i].test(e))return i;if(n&&t==="dd"&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function _U(e){if(!this.isValid())return e!=null?this:NaN;var t=tm(this,"Day");return e!=null?(e=tU(e,this.localeData()),this.add(e-t,"d")):t}function pU(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function hU(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=nU(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function mU(e){return this._weekdaysParseExact?(Pa(this,"_weekdaysRegex")||_w.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Pa(this,"_weekdaysRegex")||(this._weekdaysRegex=aU),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function gU(e){return this._weekdaysParseExact?(Pa(this,"_weekdaysRegex")||_w.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Pa(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sU),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function vU(e){return this._weekdaysParseExact?(Pa(this,"_weekdaysRegex")||_w.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Pa(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=oU),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _w(){function e(c,v){return v.length-c.length}var t=[],n=[],i=[],r=[],a,s,o,l,d;for(a=0;a<7;a++)s=Od([2e3,1]).day(a),o=lf(this.weekdaysMin(s,"")),l=lf(this.weekdaysShort(s,"")),d=lf(this.weekdays(s,"")),t.push(o),n.push(l),i.push(d),r.push(o),r.push(l),r.push(d);t.sort(e),n.sort(e),i.sort(e),r.sort(e),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function pw(){return this.hours()%12||12}function bU(){return this.hours()||24}zi("H",["HH",2],0,"hour");zi("h",["hh",2],0,pw);zi("k",["kk",2],0,bU);zi("hmm",0,0,function(){return""+pw.apply(this)+Pd(this.minutes(),2)});zi("hmmss",0,0,function(){return""+pw.apply(this)+Pd(this.minutes(),2)+Pd(this.seconds(),2)});zi("Hmm",0,0,function(){return""+this.hours()+Pd(this.minutes(),2)});zi("Hmmss",0,0,function(){return""+this.hours()+Pd(this.minutes(),2)+Pd(this.seconds(),2)});function Ox(e,t){zi(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ox("a",!0);Ox("A",!1);function Mx(e,t){return t._meridiemParse}mi("a",Mx);mi("A",Mx);mi("H",fs,dw);mi("h",fs,Dp);mi("k",fs,Dp);mi("HH",fs,$l);mi("hh",fs,$l);mi("kk",fs,$l);mi("hmm",yx);mi("hmmss",wx);mi("Hmm",yx);mi("Hmmss",wx);za(["H","HH"],Gs);za(["k","kk"],function(e,t,n){var i=sa(e);t[Gs]=i===24?0:i});za(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});za(["h","hh"],function(e,t,n){t[Gs]=sa(e),xr(n).bigHour=!0});za("hmm",function(e,t,n){var i=e.length-2;t[Gs]=sa(e.substr(0,i)),t[Nu]=sa(e.substr(i)),xr(n).bigHour=!0});za("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Gs]=sa(e.substr(0,i)),t[Nu]=sa(e.substr(i,2)),t[sf]=sa(e.substr(r)),xr(n).bigHour=!0});za("Hmm",function(e,t,n){var i=e.length-2;t[Gs]=sa(e.substr(0,i)),t[Nu]=sa(e.substr(i))});za("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Gs]=sa(e.substr(0,i)),t[Nu]=sa(e.substr(i,2)),t[sf]=sa(e.substr(r))});function yU(e){return(e+"").toLowerCase().charAt(0)==="p"}var wU=/[ap]\.?m?\.?/i,TU=Op("Hours",!0);function kU(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var xx={calendar:fB,longDateFormat:hB,invalidDate:gB,ordinal:bB,dayOfMonthOrdinalParse:yB,relativeTime:TB,months:LB,monthsShort:Sx,week:XB,weekdays:iU,weekdaysMin:rU,weekdaysShort:Dx,meridiemParse:wU},bs={},Eh={},rm;function SU(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function XS(e){return e&&e.toLowerCase().replace("_","-")}function CU(e){for(var t=0,n,i,r,a;t<e.length;){for(a=XS(e[t]).split("-"),n=a.length,i=XS(e[t+1]),i=i?i.split("-"):null;n>0;){if(r=v0(a.slice(0,n).join("-")),r)return r;if(i&&i.length>=n&&SU(a,i)>=n-1)break;n--}t++}return rm}function PU(e){return!!(e&&e.match("^[^/\\\\]*$"))}function v0(e){var t=null,n;if(bs[e]===void 0&&typeof ou<"u"&&ou&&ou.exports&&PU(e))try{t=rm._abbr,n=require,n("./locale/"+e),rc(t)}catch{bs[e]=null}return bs[e]}function rc(e,t){var n;return e&&(ll(t)?n=hf(e):n=hw(e,t),n?rm=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rm._abbr}function hw(e,t){if(t!==null){var n,i=xx;if(t.abbr=e,bs[e]!=null)mx("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=bs[e]._config;else if(t.parentLocale!=null)if(bs[t.parentLocale]!=null)i=bs[t.parentLocale]._config;else if(n=v0(t.parentLocale),n!=null)i=n._config;else return Eh[t.parentLocale]||(Eh[t.parentLocale]=[]),Eh[t.parentLocale].push({name:e,config:t}),null;return bs[e]=new aw(Yb(i,t)),Eh[e]&&Eh[e].forEach(function(r){hw(r.name,r.config)}),rc(e),bs[e]}else return delete bs[e],null}function EU(e,t){if(t!=null){var n,i,r=xx;bs[e]!=null&&bs[e].parentLocale!=null?bs[e].set(Yb(bs[e]._config,t)):(i=v0(e),i!=null&&(r=i._config),t=Yb(r,t),i==null&&(t.abbr=e),n=new aw(t),n.parentLocale=bs[e],bs[e]=n),rc(e)}else bs[e]!=null&&(bs[e].parentLocale!=null?(bs[e]=bs[e].parentLocale,e===rc()&&rc(e)):bs[e]!=null&&delete bs[e]);return bs[e]}function hf(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rm;if(!ju(e)){if(t=v0(e),t)return t;e=[e]}return CU(e)}function IU(){return Gb(bs)}function mw(e){var t,n=e._a;return n&&xr(e).overflow===-2&&(t=n[af]<0||n[af]>11?af:n[yd]<1||n[yd]>fw(n[$o],n[af])?yd:n[Gs]<0||n[Gs]>24||n[Gs]===24&&(n[Nu]!==0||n[sf]!==0||n[Qc]!==0)?Gs:n[Nu]<0||n[Nu]>59?Nu:n[sf]<0||n[sf]>59?sf:n[Qc]<0||n[Qc]>999?Qc:-1,xr(e)._overflowDayOfYear&&(t<$o||t>yd)&&(t=yd),xr(e)._overflowWeeks&&t===-1&&(t=MB),xr(e)._overflowWeekday&&t===-1&&(t=xB),xr(e).overflow=t),e}var AU=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DU=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,OU=/Z|[+-]\d\d(?::?\d\d)?/,qg=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],tb=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],MU=/^\/?Date\((-?\d+)/i,xU=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,RU={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Rx(e){var t,n,i=e._i,r=AU.exec(i)||DU.exec(i),a,s,o,l,d=qg.length,c=tb.length;if(r){for(xr(e).iso=!0,t=0,n=d;t<n;t++)if(qg[t][1].exec(r[1])){s=qg[t][0],a=qg[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(r[3]){for(t=0,n=c;t<n;t++)if(tb[t][1].exec(r[3])){o=(r[2]||" ")+tb[t][0];break}if(o==null){e._isValid=!1;return}}if(!a&&o!=null){e._isValid=!1;return}if(r[4])if(OU.exec(r[4]))l="Z";else{e._isValid=!1;return}e._f=s+(o||"")+(l||""),vw(e)}else e._isValid=!1}function $U(e,t,n,i,r,a){var s=[NU(e),Sx.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return a&&s.push(parseInt(a,10)),s}function NU(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function FU(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function LU(e,t,n){if(e){var i=Dx.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(i!==r)return xr(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function HU(e,t,n){if(e)return RU[e];if(t)return 0;var i=parseInt(n,10),r=i%100,a=(i-r)/100;return a*60+r}function $x(e){var t=xU.exec(FU(e._i)),n;if(t){if(n=$U(t[4],t[3],t[2],t[5],t[6],t[7]),!LU(t[1],n,e))return;e._a=n,e._tzm=HU(t[8],t[9],t[10]),e._d=nm.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),xr(e).rfc2822=!0}else e._isValid=!1}function jU(e){var t=MU.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Rx(e),e._isValid===!1)delete e._isValid;else return;if($x(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:zn.createFromInputFallback(e)}zn.createFromInputFallback=hu("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function np(e,t,n){return e??t??n}function BU(e){var t=new Date(zn.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function gw(e){var t,n,i=[],r,a,s;if(!e._d){for(r=BU(e),e._w&&e._a[yd]==null&&e._a[af]==null&&UU(e),e._dayOfYear!=null&&(s=np(e._a[$o],r[$o]),(e._dayOfYear>zh(s)||e._dayOfYear===0)&&(xr(e)._overflowDayOfYear=!0),n=nm(s,0,e._dayOfYear),e._a[af]=n.getUTCMonth(),e._a[yd]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Gs]===24&&e._a[Nu]===0&&e._a[sf]===0&&e._a[Qc]===0&&(e._nextDay=!0,e._a[Gs]=0),e._d=(e._useUTC?nm:GB).apply(null,i),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gs]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(xr(e).weekdayMismatch=!0)}}function UU(e){var t,n,i,r,a,s,o,l,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=np(t.GG,e._a[$o],im(ds(),1,4).year),i=np(t.W,1),r=np(t.E,1),(r<1||r>7)&&(l=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,d=im(ds(),a,s),n=np(t.gg,e._a[$o],d.year),i=np(t.w,d.week),t.d!=null?(r=t.d,(r<0||r>6)&&(l=!0)):t.e!=null?(r=t.e+a,(t.e<0||t.e>6)&&(l=!0)):r=a),i<1||i>uf(n,a,s)?xr(e)._overflowWeeks=!0:l!=null?xr(e)._overflowWeekday=!0:(o=Ax(n,i,r,a,s),e._a[$o]=o.year,e._dayOfYear=o.dayOfYear)}zn.ISO_8601=function(){};zn.RFC_2822=function(){};function vw(e){if(e._f===zn.ISO_8601){Rx(e);return}if(e._f===zn.RFC_2822){$x(e);return}e._a=[],xr(e).empty=!0;var t=""+e._i,n,i,r,a,s,o=t.length,l=0,d,c;for(r=gx(e._f,e._locale).match(sw)||[],c=r.length,n=0;n<c;n++)a=r[n],i=(t.match(AB(a,e))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&xr(e).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),l+=i.length),fp[a]?(i?xr(e).empty=!1:xr(e).unusedTokens.push(a),OB(a,i,e)):e._strict&&!i&&xr(e).unusedTokens.push(a);xr(e).charsLeftOver=o-l,t.length>0&&xr(e).unusedInput.push(t),e._a[Gs]<=12&&xr(e).bigHour===!0&&e._a[Gs]>0&&(xr(e).bigHour=void 0),xr(e).parsedDateParts=e._a.slice(0),xr(e).meridiem=e._meridiem,e._a[Gs]=qU(e._locale,e._a[Gs],e._meridiem),d=xr(e).era,d!==null&&(e._a[$o]=e._locale.erasConvertYear(d,e._a[$o])),gw(e),mw(e)}function qU(e,t,n){var i;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(i=e.isPM(n),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function WU(e){var t,n,i,r,a,s,o=!1,l=e._f.length;if(l===0){xr(e).invalidFormat=!0,e._d=new Date(NaN);return}for(r=0;r<l;r++)a=0,s=!1,t=rw({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[r],vw(t),iw(t)&&(s=!0),a+=xr(t).charsLeftOver,a+=xr(t).unusedTokens.length*10,xr(t).score=a,o?a<i&&(i=a,n=t):(i==null||a<i||s)&&(i=a,n=t,s&&(o=!0));nc(e,n||t)}function VU(e){if(!e._d){var t=ow(e._i),n=t.day===void 0?t.date:t.day;e._a=px([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),gw(e)}}function zU(e){var t=new km(mw(Nx(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Nx(e){var t=e._i,n=e._f;return e._locale=e._locale||hf(e._l),t===null||n===void 0&&t===""?f0({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Bu(t)?new km(mw(t)):(Tm(t)?e._d=t:ju(n)?WU(e):n?vw(e):YU(e),iw(e)||(e._d=null),e))}function YU(e){var t=e._i;ll(t)?e._d=new Date(zn.now()):Tm(t)?e._d=new Date(t.valueOf()):typeof t=="string"?jU(e):ju(t)?(e._a=px(t.slice(0),function(n){return parseInt(n,10)}),gw(e)):Zc(t)?VU(e):df(t)?e._d=new Date(t):zn.createFromInputFallback(e)}function Fx(e,t,n,i,r){var a={};return(t===!0||t===!1)&&(i=t,t=void 0),(n===!0||n===!1)&&(i=n,n=void 0),(Zc(e)&&nw(e)||ju(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=r,a._l=n,a._i=e,a._f=t,a._strict=i,zU(a)}function ds(e,t,n,i){return Fx(e,t,n,i,!1)}var GU=hu("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ds.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f0()}),KU=hu("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ds.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:f0()});function Lx(e,t){var n,i;if(t.length===1&&ju(t[0])&&(t=t[0]),!t.length)return ds();for(n=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](n))&&(n=t[i]);return n}function XU(){var e=[].slice.call(arguments,0);return Lx("isBefore",e)}function QU(){var e=[].slice.call(arguments,0);return Lx("isAfter",e)}var JU=function(){return Date.now?Date.now():+new Date},Ih=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ZU(e){var t,n=!1,i,r=Ih.length;for(t in e)if(Pa(e,t)&&!(Rs.call(Ih,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<r;++i)if(e[Ih[i]]){if(n)return!1;parseFloat(e[Ih[i]])!==sa(e[Ih[i]])&&(n=!0)}return!0}function e9(){return this._isValid}function t9(){return Uu(NaN)}function b0(e){var t=ow(e),n=t.year||0,i=t.quarter||0,r=t.month||0,a=t.week||t.isoWeek||0,s=t.day||0,o=t.hour||0,l=t.minute||0,d=t.second||0,c=t.millisecond||0;this._isValid=ZU(t),this._milliseconds=+c+d*1e3+l*6e4+o*1e3*60*60,this._days=+s+a*7,this._months=+r+i*3+n*12,this._data={},this._locale=hf(),this._bubble()}function sv(e){return e instanceof b0}function Xb(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function n9(e,t,n){var i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0,s;for(s=0;s<i;s++)sa(e[s])!==sa(t[s])&&a++;return a+r}function Hx(e,t){zi(e,0,0,function(){var n=this.utcOffset(),i="+";return n<0&&(n=-n,i="-"),i+Pd(~~(n/60),2)+t+Pd(~~n%60,2)})}Hx("Z",":");Hx("ZZ","");mi("Z",m0);mi("ZZ",m0);za(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=bw(m0,e)});var i9=/([\+\-]|\d\d)/gi;function bw(e,t){var n=(t||"").match(e),i,r,a;return n===null?null:(i=n[n.length-1]||[],r=(i+"").match(i9)||["-",0,0],a=+(r[1]*60)+sa(r[2]),a===0?0:r[0]==="+"?a:-a)}function yw(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(Bu(e)||Tm(e)?e.valueOf():ds(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),zn.updateOffset(n,!1),n):ds(e).local()}function Qb(e){return-Math.round(e._d.getTimezoneOffset())}zn.updateOffset=function(){};function r9(e,t,n){var i=this._offset||0,r;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=bw(m0,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(r=Qb(this)),this._offset=e,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Ux(this,Uu(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,zn.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Qb(this)}function a9(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function s9(e){return this.utcOffset(0,e)}function o9(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Qb(this),"m")),this}function l9(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=bw(EB,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function u9(e){return this.isValid()?(e=e?ds(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function d9(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function f9(){if(!ll(this._isDSTShifted))return this._isDSTShifted;var e={},t;return rw(e,this),e=Nx(e),e._a?(t=e._isUTC?Od(e._a):ds(e._a),this._isDSTShifted=this.isValid()&&n9(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function c9(){return this.isValid()?!this._isUTC:!1}function _9(){return this.isValid()?this._isUTC:!1}function jx(){return this.isValid()?this._isUTC&&this._offset===0:!1}var p9=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,h9=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Uu(e,t){var n=e,i=null,r,a,s;return sv(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:df(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(i=p9.exec(e))?(r=i[1]==="-"?-1:1,n={y:0,d:sa(i[yd])*r,h:sa(i[Gs])*r,m:sa(i[Nu])*r,s:sa(i[sf])*r,ms:sa(Xb(i[Qc]*1e3))*r}):(i=h9.exec(e))?(r=i[1]==="-"?-1:1,n={y:Bc(i[2],r),M:Bc(i[3],r),w:Bc(i[4],r),d:Bc(i[5],r),h:Bc(i[6],r),m:Bc(i[7],r),s:Bc(i[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=m9(ds(n.from),ds(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new b0(n),sv(e)&&Pa(e,"_locale")&&(a._locale=e._locale),sv(e)&&Pa(e,"_isValid")&&(a._isValid=e._isValid),a}Uu.fn=b0.prototype;Uu.invalid=t9;function Bc(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function QS(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function m9(e,t){var n;return e.isValid()&&t.isValid()?(t=yw(t,e),e.isBefore(t)?n=QS(e,t):(n=QS(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Bx(e,t){return function(n,i){var r,a;return i!==null&&!isNaN(+i)&&(mx(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),r=Uu(n,i),Ux(this,r,e),this}}function Ux(e,t,n,i){var r=t._milliseconds,a=Xb(t._days),s=Xb(t._months);e.isValid()&&(i=i??!0,s&&Px(e,tm(e,"Month")+s*n),a&&kx(e,"Date",tm(e,"Date")+a*n),r&&e._d.setTime(e._d.valueOf()+r*n),i&&zn.updateOffset(e,a||s))}var g9=Bx(1,"add"),v9=Bx(-1,"subtract");function qx(e){return typeof e=="string"||e instanceof String}function b9(e){return Bu(e)||Tm(e)||qx(e)||df(e)||w9(e)||y9(e)||e===null||e===void 0}function y9(e){var t=Zc(e)&&!nw(e),n=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,a,s=i.length;for(r=0;r<s;r+=1)a=i[r],n=n||Pa(e,a);return t&&n}function w9(e){var t=ju(e),n=!1;return t&&(n=e.filter(function(i){return!df(i)&&qx(e)}).length===0),t&&n}function T9(e){var t=Zc(e)&&!nw(e),n=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,a;for(r=0;r<i.length;r+=1)a=i[r],n=n||Pa(e,a);return t&&n}function k9(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function S9(e,t){arguments.length===1&&(arguments[0]?b9(arguments[0])?(e=arguments[0],t=void 0):T9(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||ds(),i=yw(n,this).startOf("day"),r=zn.calendarFormat(this,i)||"sameElse",a=t&&(Md(t[r])?t[r].call(this,n):t[r]);return this.format(a||this.localeData().calendar(r,this,ds(n)))}function C9(){return new km(this)}function P9(e,t){var n=Bu(e)?e:ds(e);return this.isValid()&&n.isValid()?(t=mu(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function E9(e,t){var n=Bu(e)?e:ds(e);return this.isValid()&&n.isValid()?(t=mu(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function I9(e,t,n,i){var r=Bu(e)?e:ds(e),a=Bu(t)?t:ds(t);return this.isValid()&&r.isValid()&&a.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(i[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function A9(e,t){var n=Bu(e)?e:ds(e),i;return this.isValid()&&n.isValid()?(t=mu(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function D9(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function O9(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function M9(e,t,n){var i,r,a;if(!this.isValid())return NaN;if(i=yw(e,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,t=mu(t),t){case"year":a=ov(this,i)/12;break;case"month":a=ov(this,i);break;case"quarter":a=ov(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:ru(a)}function ov(e,t){if(e.date()<t.date())return-ov(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(n,"months"),r,a;return t-i<0?(r=e.clone().add(n-1,"months"),a=(t-i)/(i-r)):(r=e.clone().add(n+1,"months"),a=(t-i)/(r-i)),-(n+a)||0}zn.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";zn.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function x9(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function R9(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?av(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Md(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",av(n,"Z")):av(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function $9(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,i,r,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+i+r+a)}function N9(e){e||(e=this.isUtc()?zn.defaultFormatUtc:zn.defaultFormat);var t=av(this,e);return this.localeData().postformat(t)}function F9(e,t){return this.isValid()&&(Bu(e)&&e.isValid()||ds(e).isValid())?Uu({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function L9(e){return this.from(ds(),e)}function H9(e,t){return this.isValid()&&(Bu(e)&&e.isValid()||ds(e).isValid())?Uu({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function j9(e){return this.to(ds(),e)}function Wx(e){var t;return e===void 0?this._locale._abbr:(t=hf(e),t!=null&&(this._locale=t),this)}var Vx=hu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function zx(){return this._locale}var wv=1e3,cp=60*wv,Tv=60*cp,Yx=(365*400+97)*24*Tv;function _p(e,t){return(e%t+t)%t}function Gx(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Yx:new Date(e,t,n).valueOf()}function Kx(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Yx:Date.UTC(e,t,n)}function B9(e){var t,n;if(e=mu(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kx:Gx,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=_p(t+(this._isUTC?0:this.utcOffset()*cp),Tv);break;case"minute":t=this._d.valueOf(),t-=_p(t,cp);break;case"second":t=this._d.valueOf(),t-=_p(t,wv);break}return this._d.setTime(t),zn.updateOffset(this,!0),this}function U9(e){var t,n;if(e=mu(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kx:Gx,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Tv-_p(t+(this._isUTC?0:this.utcOffset()*cp),Tv)-1;break;case"minute":t=this._d.valueOf(),t+=cp-_p(t,cp)-1;break;case"second":t=this._d.valueOf(),t+=wv-_p(t,wv)-1;break}return this._d.setTime(t),zn.updateOffset(this,!0),this}function q9(){return this._d.valueOf()-(this._offset||0)*6e4}function W9(){return Math.floor(this.valueOf()/1e3)}function V9(){return new Date(this.valueOf())}function z9(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Y9(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function G9(){return this.isValid()?this.toISOString():null}function K9(){return iw(this)}function X9(){return nc({},xr(this))}function Q9(){return xr(this).overflow}function J9(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}zi("N",0,0,"eraAbbr");zi("NN",0,0,"eraAbbr");zi("NNN",0,0,"eraAbbr");zi("NNNN",0,0,"eraName");zi("NNNNN",0,0,"eraNarrow");zi("y",["y",1],"yo","eraYear");zi("y",["yy",2],0,"eraYear");zi("y",["yyy",3],0,"eraYear");zi("y",["yyyy",4],0,"eraYear");mi("N",ww);mi("NN",ww);mi("NNN",ww);mi("NNNN",uq);mi("NNNNN",dq);za(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?xr(n).era=r:xr(n).invalidEra=e});mi("y",Ap);mi("yy",Ap);mi("yyy",Ap);mi("yyyy",Ap);mi("yo",fq);za(["y","yy","yyy","yyyy"],$o);za(["yo"],function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[$o]=n._locale.eraYearOrdinalParse(e,r):t[$o]=parseInt(e,10)});function Z9(e,t){var n,i,r,a=this._eras||hf("en")._eras;for(n=0,i=a.length;n<i;++n){switch(typeof a[n].since){case"string":r=zn(a[n].since).startOf("day"),a[n].since=r.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":r=zn(a[n].until).startOf("day").valueOf(),a[n].until=r.valueOf();break}}return a}function eq(e,t,n){var i,r,a=this.eras(),s,o,l;for(e=e.toUpperCase(),i=0,r=a.length;i<r;++i)if(s=a[i].name.toUpperCase(),o=a[i].abbr.toUpperCase(),l=a[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return a[i];break;case"NNNN":if(s===e)return a[i];break;case"NNNNN":if(l===e)return a[i];break}else if([s,o,l].indexOf(e)>=0)return a[i]}function tq(e,t){var n=e.since<=e.until?1:-1;return t===void 0?zn(e.since).year():zn(e.since).year()+(t-e.offset)*n}function nq(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return i[e].name;return""}function iq(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return i[e].narrow;return""}function rq(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return i[e].abbr;return""}function aq(){var e,t,n,i,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,i=this.clone().startOf("day").valueOf(),r[e].since<=i&&i<=r[e].until||r[e].until<=i&&i<=r[e].since)return(this.year()-zn(r[e].since).year())*n+r[e].offset;return this.year()}function sq(e){return Pa(this,"_erasNameRegex")||Tw.call(this),e?this._erasNameRegex:this._erasRegex}function oq(e){return Pa(this,"_erasAbbrRegex")||Tw.call(this),e?this._erasAbbrRegex:this._erasRegex}function lq(e){return Pa(this,"_erasNarrowRegex")||Tw.call(this),e?this._erasNarrowRegex:this._erasRegex}function ww(e,t){return t.erasAbbrRegex(e)}function uq(e,t){return t.erasNameRegex(e)}function dq(e,t){return t.erasNarrowRegex(e)}function fq(e,t){return t._eraYearOrdinalRegex||Ap}function Tw(){var e=[],t=[],n=[],i=[],r,a,s,o,l,d=this.eras();for(r=0,a=d.length;r<a;++r)s=lf(d[r].name),o=lf(d[r].abbr),l=lf(d[r].narrow),t.push(s),e.push(o),n.push(l),i.push(s),i.push(o),i.push(l);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}zi(0,["gg",2],0,function(){return this.weekYear()%100});zi(0,["GG",2],0,function(){return this.isoWeekYear()%100});function y0(e,t){zi(0,[e,e.length],0,t)}y0("gggg","weekYear");y0("ggggg","weekYear");y0("GGGG","isoWeekYear");y0("GGGGG","isoWeekYear");mi("G",h0);mi("g",h0);mi("GG",fs,$l);mi("gg",fs,$l);mi("GGGG",uw,lw);mi("gggg",uw,lw);mi("GGGGG",p0,c0);mi("ggggg",p0,c0);Cm(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=sa(e)});Cm(["gg","GG"],function(e,t,n,i){t[i]=zn.parseTwoDigitYear(e)});function cq(e){return Xx.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function _q(e){return Xx.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function pq(){return uf(this.year(),1,4)}function hq(){return uf(this.isoWeekYear(),1,4)}function mq(){var e=this.localeData()._week;return uf(this.year(),e.dow,e.doy)}function gq(){var e=this.localeData()._week;return uf(this.weekYear(),e.dow,e.doy)}function Xx(e,t,n,i,r){var a;return e==null?im(this,i,r).year:(a=uf(e,i,r),t>a&&(t=a),vq.call(this,e,t,n,i,r))}function vq(e,t,n,i,r){var a=Ax(e,t,n,i,r),s=nm(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}zi("Q",0,"Qo","quarter");mi("Q",vx);za("Q",function(e,t){t[af]=(sa(e)-1)*3});function bq(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}zi("D",["DD",2],"Do","date");mi("D",fs,Dp);mi("DD",fs,$l);mi("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});za(["D","DD"],yd);za("Do",function(e,t){t[yd]=sa(e.match(fs)[0])});var Qx=Op("Date",!0);zi("DDD",["DDDD",3],"DDDo","dayOfYear");mi("DDD",_0);mi("DDDD",bx);za(["DDD","DDDD"],function(e,t,n){n._dayOfYear=sa(e)});function yq(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}zi("m",["mm",2],0,"minute");mi("m",fs,dw);mi("mm",fs,$l);za(["m","mm"],Nu);var wq=Op("Minutes",!1);zi("s",["ss",2],0,"second");mi("s",fs,dw);mi("ss",fs,$l);za(["s","ss"],sf);var Tq=Op("Seconds",!1);zi("S",0,0,function(){return~~(this.millisecond()/100)});zi(0,["SS",2],0,function(){return~~(this.millisecond()/10)});zi(0,["SSS",3],0,"millisecond");zi(0,["SSSS",4],0,function(){return this.millisecond()*10});zi(0,["SSSSS",5],0,function(){return this.millisecond()*100});zi(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});zi(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});zi(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});zi(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});mi("S",_0,vx);mi("SS",_0,$l);mi("SSS",_0,bx);var ic,Jx;for(ic="SSSS";ic.length<=9;ic+="S")mi(ic,Ap);function kq(e,t){t[Qc]=sa(("0."+e)*1e3)}for(ic="S";ic.length<=9;ic+="S")za(ic,kq);Jx=Op("Milliseconds",!1);zi("z",0,0,"zoneAbbr");zi("zz",0,0,"zoneName");function Sq(){return this._isUTC?"UTC":""}function Cq(){return this._isUTC?"Coordinated Universal Time":""}var jn=km.prototype;jn.add=g9;jn.calendar=S9;jn.clone=C9;jn.diff=M9;jn.endOf=U9;jn.format=N9;jn.from=F9;jn.fromNow=L9;jn.to=H9;jn.toNow=j9;jn.get=$B;jn.invalidAt=Q9;jn.isAfter=P9;jn.isBefore=E9;jn.isBetween=I9;jn.isSame=A9;jn.isSameOrAfter=D9;jn.isSameOrBefore=O9;jn.isValid=K9;jn.lang=Vx;jn.locale=Wx;jn.localeData=zx;jn.max=KU;jn.min=GU;jn.parsingFlags=X9;jn.set=NB;jn.startOf=B9;jn.subtract=v9;jn.toArray=z9;jn.toObject=Y9;jn.toDate=V9;jn.toISOString=R9;jn.inspect=$9;typeof Symbol<"u"&&Symbol.for!=null&&(jn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});jn.toJSON=G9;jn.toString=x9;jn.unix=W9;jn.valueOf=q9;jn.creationData=J9;jn.eraName=nq;jn.eraNarrow=iq;jn.eraAbbr=rq;jn.eraYear=aq;jn.year=Tx;jn.isLeapYear=RB;jn.weekYear=cq;jn.isoWeekYear=_q;jn.quarter=jn.quarters=bq;jn.month=Ex;jn.daysInMonth=VB;jn.week=jn.weeks=ZB;jn.isoWeek=jn.isoWeeks=eU;jn.weeksInYear=mq;jn.weeksInWeekYear=gq;jn.isoWeeksInYear=pq;jn.isoWeeksInISOWeekYear=hq;jn.date=Qx;jn.day=jn.days=_U;jn.weekday=pU;jn.isoWeekday=hU;jn.dayOfYear=yq;jn.hour=jn.hours=TU;jn.minute=jn.minutes=wq;jn.second=jn.seconds=Tq;jn.millisecond=jn.milliseconds=Jx;jn.utcOffset=r9;jn.utc=s9;jn.local=o9;jn.parseZone=l9;jn.hasAlignedHourOffset=u9;jn.isDST=d9;jn.isLocal=c9;jn.isUtcOffset=_9;jn.isUtc=jx;jn.isUTC=jx;jn.zoneAbbr=Sq;jn.zoneName=Cq;jn.dates=hu("dates accessor is deprecated. Use date instead.",Qx);jn.months=hu("months accessor is deprecated. Use month instead",Ex);jn.years=hu("years accessor is deprecated. Use year instead",Tx);jn.zone=hu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",a9);jn.isDSTShifted=hu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",f9);function Pq(e){return ds(e*1e3)}function Eq(){return ds.apply(null,arguments).parseZone()}function Zx(e){return e}var Ea=aw.prototype;Ea.calendar=cB;Ea.longDateFormat=mB;Ea.invalidDate=vB;Ea.ordinal=wB;Ea.preparse=Zx;Ea.postformat=Zx;Ea.relativeTime=kB;Ea.pastFuture=SB;Ea.set=dB;Ea.eras=Z9;Ea.erasParse=eq;Ea.erasConvertYear=tq;Ea.erasAbbrRegex=oq;Ea.erasNameRegex=sq;Ea.erasNarrowRegex=lq;Ea.months=BB;Ea.monthsShort=UB;Ea.monthsParse=WB;Ea.monthsRegex=YB;Ea.monthsShortRegex=zB;Ea.week=KB;Ea.firstDayOfYear=JB;Ea.firstDayOfWeek=QB;Ea.weekdays=lU;Ea.weekdaysMin=dU;Ea.weekdaysShort=uU;Ea.weekdaysParse=cU;Ea.weekdaysRegex=mU;Ea.weekdaysShortRegex=gU;Ea.weekdaysMinRegex=vU;Ea.isPM=yU;Ea.meridiem=kU;function kv(e,t,n,i){var r=hf(),a=Od().set(i,t);return r[n](a,e)}function eR(e,t,n){if(df(e)&&(t=e,e=void 0),e=e||"",t!=null)return kv(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=kv(e,i,n,"month");return r}function kw(e,t,n,i){typeof e=="boolean"?(df(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,df(t)&&(n=t,t=void 0),t=t||"");var r=hf(),a=e?r._week.dow:0,s,o=[];if(n!=null)return kv(t,(n+a)%7,i,"day");for(s=0;s<7;s++)o[s]=kv(t,(s+a)%7,i,"day");return o}function Iq(e,t){return eR(e,t,"months")}function Aq(e,t){return eR(e,t,"monthsShort")}function Dq(e,t,n){return kw(e,t,n,"weekdays")}function Oq(e,t,n){return kw(e,t,n,"weekdaysShort")}function Mq(e,t,n){return kw(e,t,n,"weekdaysMin")}rc("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=sa(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});zn.lang=hu("moment.lang is deprecated. Use moment.locale instead.",rc);zn.langData=hu("moment.langData is deprecated. Use moment.localeData instead.",hf);var Zd=Math.abs;function xq(){var e=this._data;return this._milliseconds=Zd(this._milliseconds),this._days=Zd(this._days),this._months=Zd(this._months),e.milliseconds=Zd(e.milliseconds),e.seconds=Zd(e.seconds),e.minutes=Zd(e.minutes),e.hours=Zd(e.hours),e.months=Zd(e.months),e.years=Zd(e.years),this}function tR(e,t,n,i){var r=Uu(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Rq(e,t){return tR(this,e,t,1)}function $q(e,t){return tR(this,e,t,-1)}function JS(e){return e<0?Math.floor(e):Math.ceil(e)}function Nq(){var e=this._milliseconds,t=this._days,n=this._months,i=this._data,r,a,s,o,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=JS(Jb(n)+t)*864e5,t=0,n=0),i.milliseconds=e%1e3,r=ru(e/1e3),i.seconds=r%60,a=ru(r/60),i.minutes=a%60,s=ru(a/60),i.hours=s%24,t+=ru(s/24),l=ru(nR(t)),n+=l,t-=JS(Jb(l)),o=ru(n/12),n%=12,i.days=t,i.months=n,i.years=o,this}function nR(e){return e*4800/146097}function Jb(e){return e*146097/4800}function Fq(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if(e=mu(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,n=this._months+nR(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Jb(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function mf(e){return function(){return this.as(e)}}var iR=mf("ms"),Lq=mf("s"),Hq=mf("m"),jq=mf("h"),Bq=mf("d"),Uq=mf("w"),qq=mf("M"),Wq=mf("Q"),Vq=mf("y"),zq=iR;function Yq(){return Uu(this)}function Gq(e){return e=mu(e),this.isValid()?this[e+"s"]():NaN}function u_(e){return function(){return this.isValid()?this._data[e]:NaN}}var Kq=u_("milliseconds"),Xq=u_("seconds"),Qq=u_("minutes"),Jq=u_("hours"),Zq=u_("days"),eW=u_("months"),tW=u_("years");function nW(){return ru(this.days()/7)}var tf=Math.round,sp={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function iW(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function rW(e,t,n,i){var r=Uu(e).abs(),a=tf(r.as("s")),s=tf(r.as("m")),o=tf(r.as("h")),l=tf(r.as("d")),d=tf(r.as("M")),c=tf(r.as("w")),v=tf(r.as("y")),T=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||s<=1&&["m"]||s<n.m&&["mm",s]||o<=1&&["h"]||o<n.h&&["hh",o]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(T=T||c<=1&&["w"]||c<n.w&&["ww",c]),T=T||d<=1&&["M"]||d<n.M&&["MM",d]||v<=1&&["y"]||["yy",v],T[2]=t,T[3]=+e>0,T[4]=i,iW.apply(null,T)}function aW(e){return e===void 0?tf:typeof e=="function"?(tf=e,!0):!1}function sW(e,t){return sp[e]===void 0?!1:t===void 0?sp[e]:(sp[e]=t,e==="s"&&(sp.ss=t-1),!0)}function oW(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,i=sp,r,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(i=Object.assign({},sp,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),r=this.localeData(),a=rW(this,!n,i,r),n&&(a=r.pastFuture(+this,a)),r.postformat(a)}var nb=Math.abs;function J_(e){return(e>0)-(e<0)||+e}function w0(){if(!this.isValid())return this.localeData().invalidDate();var e=nb(this._milliseconds)/1e3,t=nb(this._days),n=nb(this._months),i,r,a,s,o=this.asSeconds(),l,d,c,v;return o?(i=ru(e/60),r=ru(i/60),e%=60,i%=60,a=ru(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",d=J_(this._months)!==J_(o)?"-":"",c=J_(this._days)!==J_(o)?"-":"",v=J_(this._milliseconds)!==J_(o)?"-":"",l+"P"+(a?d+a+"Y":"")+(n?d+n+"M":"")+(t?c+t+"D":"")+(r||i||e?"T":"")+(r?v+r+"H":"")+(i?v+i+"M":"")+(e?v+s+"S":"")):"P0D"}var ma=b0.prototype;ma.isValid=e9;ma.abs=xq;ma.add=Rq;ma.subtract=$q;ma.as=Fq;ma.asMilliseconds=iR;ma.asSeconds=Lq;ma.asMinutes=Hq;ma.asHours=jq;ma.asDays=Bq;ma.asWeeks=Uq;ma.asMonths=qq;ma.asQuarters=Wq;ma.asYears=Vq;ma.valueOf=zq;ma._bubble=Nq;ma.clone=Yq;ma.get=Gq;ma.milliseconds=Kq;ma.seconds=Xq;ma.minutes=Qq;ma.hours=Jq;ma.days=Zq;ma.weeks=nW;ma.months=eW;ma.years=tW;ma.humanize=oW;ma.toISOString=w0;ma.toString=w0;ma.toJSON=w0;ma.locale=Wx;ma.localeData=zx;ma.toIsoString=hu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",w0);ma.lang=Vx;zi("X",0,0,"unix");zi("x",0,0,"valueOf");mi("x",h0);mi("X",IB);za("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});za("x",function(e,t,n){n._d=new Date(sa(e))});//! moment.js
zn.version="2.30.1";lB(ds);zn.fn=jn;zn.min=XU;zn.max=QU;zn.now=JU;zn.utc=Od;zn.unix=Pq;zn.months=Iq;zn.isDate=Tm;zn.locale=rc;zn.invalid=f0;zn.duration=Uu;zn.isMoment=Bu;zn.weekdays=Dq;zn.parseZone=Eq;zn.localeData=hf;zn.isDuration=sv;zn.monthsShort=Aq;zn.weekdaysMin=Mq;zn.defineLocale=hw;zn.updateLocale=EU;zn.locales=IU;zn.weekdaysShort=Oq;zn.normalizeUnits=mu;zn.relativeTimeRounding=aW;zn.relativeTimeThreshold=sW;zn.calendarFormat=k9;zn.prototype=jn;zn.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const lW=Object.freeze(Object.defineProperty({__proto__:null,default:zn},Symbol.toStringTag,{value:"Module"}));class uW extends Fo{async one(t){return this.baseQuery(this.baseEndpoint.replace(":report_id",t))}async all(){return this.baseQuery(this.baseEndpoint.replace(":report_id",""))}async get_updated_params(t){return this.baseQuery(this.baseEndpoint.replace(":report_id","get_updated_params"),{method:"POST",headers:this.headers,body:JSON.stringify({report:t})})}async update(t,n,i){return this.baseQuery(this.baseEndpoint.replace(":report_id",t),{method:"PUT",headers:this.headers,body:JSON.stringify({report:n,sync_type:i})})}async create(){return this.baseQuery(this.baseEndpoint.replace(":report_id",""),{method:"POST",headers:this.headers,body:JSON.stringify({report:{name:`Report ${zn(window.getCurrentTimeFromEpoch()*1e3).format("L LT")}`}})})}async delete(t){return this.baseQuery(this.baseEndpoint.replace(":report_id",t),{method:"DELETE",headers:this.headers})}}class dW extends Fo{async all(){return this.baseQuery(this.baseEndpoint.replace(":template_id",""))}async create(t){return this.baseQuery(this.baseEndpoint.replace(":template_id",""),{method:"POST",headers:this.headers,body:JSON.stringify({template:t})})}async update(t,n){return this.baseQuery(this.baseEndpoint.replace(":template_id",t),{method:"PUT",headers:this.headers,body:JSON.stringify({template:n})})}async delete(t){return this.baseQuery(this.baseEndpoint.replace(":template_id",t),{method:"DELETE",headers:this.headers})}}const{window:fW}=bm;function ZS(e){let t,n,i,r,a,s,o,l,d,c,v,T=e[0].closeButton&&eC(e);var b=e[1];function A(E){return{}}return b&&(s=ha(b,A())),{c(){t=P("div"),n=P("div"),i=P("div"),T&&T.c(),r=K(),a=P("div"),s&&re(s.$$.fragment),w(a,"class","content svelte-1wbiuop"),w(a,"style",e[8]),w(i,"class","window svelte-1wbiuop"),w(i,"role","dialog"),w(i,"aria-modal","true"),w(i,"style",e[7]),w(n,"class","window-wrap svelte-1wbiuop"),w(n,"style",e[6]),w(t,"class","bg svelte-1wbiuop"),w(t,"style",e[5])},m(E,y){ce(E,t,y),m(t,n),m(n,i),T&&T.m(i,null),m(i,r),m(i,a),s&&ae(s,a,null),e[38](i),e[39](n),e[40](t),d=!0,c||(v=[ct(i,"introstart",function(){Ga(e[12])&&e[12].apply(this,arguments)}),ct(i,"outrostart",function(){Ga(e[13])&&e[13].apply(this,arguments)}),ct(i,"introend",function(){Ga(e[14])&&e[14].apply(this,arguments)}),ct(i,"outroend",function(){Ga(e[15])&&e[15].apply(this,arguments)}),ct(t,"mousedown",e[19]),ct(t,"mouseup",e[20])],c=!0)},p(E,y){if(e=E,e[0].closeButton?T?(T.p(e,y),y[0]&1&&U(T,1)):(T=eC(e),T.c(),U(T,1),T.m(i,r)):T&&(pn(),W(T,1,1,()=>{T=null}),hn()),y[0]&2&&b!==(b=e[1])){if(s){pn();const I=s;W(I.$$.fragment,1,0,()=>{se(I,1)}),hn()}b?(s=ha(b,A()),re(s.$$.fragment),U(s.$$.fragment,1),ae(s,a,null)):s=null}(!d||y[0]&256)&&w(a,"style",e[8]),(!d||y[0]&128)&&w(i,"style",e[7]),(!d||y[0]&64)&&w(n,"style",e[6]),(!d||y[0]&32)&&w(t,"style",e[5])},i(E){d||(U(T),s&&U(s.$$.fragment,E),xa(()=>{d&&(o||(o=Us(i,e[11],e[0].transitionWindowProps,!0)),o.run(1))}),xa(()=>{d&&(l||(l=Us(t,e[10],e[0].transitionBgProps,!0)),l.run(1))}),d=!0)},o(E){W(T),s&&W(s.$$.fragment,E),o||(o=Us(i,e[11],e[0].transitionWindowProps,!1)),o.run(0),l||(l=Us(t,e[10],e[0].transitionBgProps,!1)),l.run(0),d=!1},d(E){E&&_e(t),T&&T.d(),s&&se(s),e[38](null),E&&o&&o.end(),e[39](null),e[40](null),E&&l&&l.end(),c=!1,vi(v)}}}function eC(e){let t,n,i,r,a;const s=[_W,cW],o=[];function l(d,c){return c[0]&1&&(t=null),t==null&&(t=!!d[16](d[0].closeButton)),t?0:1}return n=l(e,[-1,-1]),i=o[n]=s[n](e),{c(){i.c(),r=On()},m(d,c){o[n].m(d,c),ce(d,r,c),a=!0},p(d,c){let v=n;n=l(d,c),n===v?o[n].p(d,c):(pn(),W(o[v],1,1,()=>{o[v]=null}),hn(),i=o[n],i?i.p(d,c):(i=o[n]=s[n](d),i.c()),U(i,1),i.m(r.parentNode,r))},i(d){a||(U(i),a=!0)},o(d){W(i),a=!1},d(d){o[n].d(d),d&&_e(r)}}}function cW(e){let t,n,i;return{c(){t=P("button"),w(t,"class","close svelte-1wbiuop"),w(t,"style",e[9])},m(r,a){ce(r,t,a),n||(i=ct(t,"click",e[17]),n=!0)},p(r,a){a[0]&512&&w(t,"style",r[9])},i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function _W(e){let t,n,i;var r=e[0].closeButton;function a(s){return{props:{onClose:s[17]}}}return r&&(t=ha(r,a(e))),{c(){t&&re(t.$$.fragment),n=On()},m(s,o){t&&ae(t,s,o),ce(s,n,o),i=!0},p(s,o){if(o[0]&1&&r!==(r=s[0].closeButton)){if(t){pn();const l=t;W(l.$$.fragment,1,0,()=>{se(l,1)}),hn()}r?(t=ha(r,a(s)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}},i(s){i||(t&&U(t.$$.fragment,s),i=!0)},o(s){t&&W(t.$$.fragment,s),i=!1},d(s){s&&_e(n),t&&se(t,s)}}}function pW(e){let t,n,i,r,a=e[1]&&ZS(e);const s=e[37].default,o=fu(s,e,e[36],null);return{c(){a&&a.c(),t=K(),o&&o.c()},m(l,d){a&&a.m(l,d),ce(l,t,d),o&&o.m(l,d),n=!0,i||(r=ct(fW,"keydown",e[18]),i=!0)},p(l,d){l[1]?a?(a.p(l,d),d[0]&2&&U(a,1)):(a=ZS(l),a.c(),U(a,1),a.m(t.parentNode,t)):a&&(pn(),W(a,1,1,()=>{a=null}),hn()),o&&o.p&&(!n||d[1]&32)&&cu(o,s,l,l[36],n?pu(s,l[36],d,null):_u(l[36]),null)},i(l){n||(U(a),U(o,l),n=!0)},o(l){W(a),W(o,l),n=!1},d(l){a&&a.d(l),l&&_e(t),o&&o.d(l),i=!1,r()}}}function hW(e,t={}){return function(i){return new e({...i,props:{...t,...i.props}})}}function mW(e,t,n){let{$$slots:i={},$$scope:r}=t;const a=Qy(),s=Zy;let{show:o=null}=t,{key:l="simple-modal"}=t,{closeButton:d=!0}=t,{closeOnEsc:c=!0}=t,{closeOnOuterClick:v=!0}=t,{styleBg:T={}}=t,{styleWindowWrap:b={}}=t,{styleWindow:A={}}=t,{styleContent:E={}}=t,{styleCloseButton:y={}}=t,{setContext:I=s}=t,{transitionBg:D=rs}=t,{transitionBgProps:O={duration:250}}=t,{transitionWindow:M=D}=t,{transitionWindowProps:F=O}=t;const $={closeButton:d,closeOnEsc:c,closeOnOuterClick:v,styleBg:T,styleWindowWrap:b,styleWindow:A,styleContent:E,styleCloseButton:y,transitionBg:D,transitionBgProps:O,transitionWindow:M,transitionWindowProps:F};let L={...$},j=null,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe;const We=Ct=>Ct.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase(),qe=Ct=>Ct?Object.keys(Ct).reduce((bt,Rt)=>`${bt}; ${We(Rt)}: ${Ct[Rt]}`,""):"",ee=Ct=>!!(Ct&&Ct.constructor&&Ct.call&&Ct.apply),G=()=>{n(5,te=qe(Object.assign({},{width:window.innerWidth,height:window.innerHeight},L.styleBg))),n(6,ne=qe(L.styleWindowWrap)),n(7,be=qe(L.styleWindow)),n(8,ue=qe(L.styleContent)),n(9,Ce=qe(L.styleCloseButton)),n(10,ie=L.transitionBg),n(11,Y=L.transitionWindow)},me=()=>{};let Te=me,De=me,we=me,Ve=me;const Ke=(Ct,bt={},Rt={},cn={})=>{n(1,j=hW(Ct,bt)),n(0,L={...$,...Rt}),G(),n(12,Te=nn=>{cn.onOpen&&cn.onOpen(nn),a("open"),a("opening")}),n(13,De=nn=>{cn.onClose&&cn.onClose(nn),a("close"),a("closing")}),n(14,we=nn=>{cn.onOpened&&cn.onOpened(nn),a("opened")}),n(15,Ve=nn=>{cn.onClosed&&cn.onClosed(nn),a("closed")})},yt=(Ct={})=>{n(13,De=Ct.onClose||De),n(15,Ve=Ct.onClosed||Ve),n(1,j=null)},ht=Ct=>{if(L.closeOnEsc&&j&&Ct.key==="Escape"&&(Ct.preventDefault(),yt()),j&&Ct.key==="Tab"){const bt=Q.querySelectorAll("*"),Rt=Array.from(bt).filter(nn=>nn.tabIndex>=0);let cn=Rt.indexOf(document.activeElement);cn===-1&&Ct.shiftKey&&(cn=0),cn+=Rt.length+(Ct.shiftKey?-1:1),cn%=Rt.length,Rt[cn].focus(),Ct.preventDefault()}},Je=Ct=>{L.closeOnOuterClick&&(Ct.target===H||Ct.target===V)&&(Pe=Ct.target)},pt=Ct=>{L.closeOnOuterClick&&Ct.target===Pe&&(Ct.preventDefault(),yt())},Tt=()=>{X=window.scrollY,he=document.body.style.position,Me=document.body.style.overflow,document.body.style.position="fixed",document.body.style.top=`-${X}px`,document.body.style.overflow="hidden"},it=()=>{document.body.style.position=he||"",document.body.style.top="",document.body.style.overflow=Me||"",window.scrollTo(0,X)};I(l,{open:Ke,close:yt}),Jy(()=>{yt()}),lc(()=>{j?Tt():it()});function Ge(Ct){Oe[Ct?"unshift":"push"](()=>{Q=Ct,n(4,Q)})}function st(Ct){Oe[Ct?"unshift":"push"](()=>{V=Ct,n(3,V)})}function It(Ct){Oe[Ct?"unshift":"push"](()=>{H=Ct,n(2,H)})}return e.$$set=Ct=>{"show"in Ct&&n(21,o=Ct.show),"key"in Ct&&n(22,l=Ct.key),"closeButton"in Ct&&n(23,d=Ct.closeButton),"closeOnEsc"in Ct&&n(24,c=Ct.closeOnEsc),"closeOnOuterClick"in Ct&&n(25,v=Ct.closeOnOuterClick),"styleBg"in Ct&&n(26,T=Ct.styleBg),"styleWindowWrap"in Ct&&n(27,b=Ct.styleWindowWrap),"styleWindow"in Ct&&n(28,A=Ct.styleWindow),"styleContent"in Ct&&n(29,E=Ct.styleContent),"styleCloseButton"in Ct&&n(30,y=Ct.styleCloseButton),"setContext"in Ct&&n(31,I=Ct.setContext),"transitionBg"in Ct&&n(32,D=Ct.transitionBg),"transitionBgProps"in Ct&&n(33,O=Ct.transitionBgProps),"transitionWindow"in Ct&&n(34,M=Ct.transitionWindow),"transitionWindowProps"in Ct&&n(35,F=Ct.transitionWindowProps),"$$scope"in Ct&&n(36,r=Ct.$$scope)},e.$$.update=()=>{e.$$.dirty[0]&2097152&&(ee(o)?Ke(o):yt())},[L,j,H,V,Q,te,ne,be,ue,Ce,ie,Y,Te,De,we,Ve,ee,yt,ht,Je,pt,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,r,i,Ge,st,It]}let am=class extends Qt{constructor(t){super(),Jt(this,t,mW,pW,Kt,{show:21,key:22,closeButton:23,closeOnEsc:24,closeOnOuterClick:25,styleBg:26,styleWindowWrap:27,styleWindow:28,styleContent:29,styleCloseButton:30,setContext:31,transitionBg:32,transitionBgProps:33,transitionWindow:34,transitionWindowProps:35},null,[-1,-1])}};var rR={};(function(e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,n=e.aliasToReal,i={};for(var r in n){var a=n[r];t.call(i,a)?i[a].push(r):i[a]=[r]}return i}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})(rR);var ib,tC;function aR(){return tC||(tC=1,ib={}),ib}var Vs=rR,gW=aR(),nC=Array.prototype.push;function vW(e,t){return t==2?function(n,i){return e.apply(void 0,arguments)}:function(n){return e.apply(void 0,arguments)}}function rb(e,t){return t==2?function(n,i){return e(n,i)}:function(n){return e(n)}}function iC(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function bW(e){return function(t){return e({},t)}}function yW(e,t){return function(){for(var n=arguments.length,i=n-1,r=Array(n);n--;)r[n]=arguments[n];var a=r[t],s=r.slice(0,t);return a&&nC.apply(s,a),t!=i&&nC.apply(s,r.slice(t+1)),e.apply(this,s)}}function ab(e,t){return function(){var n=arguments.length;if(n){for(var i=Array(n);n--;)i[n]=arguments[n];var r=i[0]=t.apply(void 0,i);return e.apply(void 0,i),r}}}function Zb(e,t,n,i){var r=typeof t=="function",a=t===Object(t);if(a&&(i=n,n=t,t=void 0),n==null)throw new TypeError;i||(i={});var s={cap:"cap"in i?i.cap:!0,curry:"curry"in i?i.curry:!0,fixed:"fixed"in i?i.fixed:!0,immutable:"immutable"in i?i.immutable:!0,rearg:"rearg"in i?i.rearg:!0},o=r?n:gW,l="curry"in i&&i.curry,d="fixed"in i&&i.fixed,c="rearg"in i&&i.rearg,v=r?n.runInContext():void 0,T=r?n:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},b=T.ary,A=T.assign,E=T.clone,y=T.curry,I=T.forEach,D=T.isArray,O=T.isError,M=T.isFunction,F=T.isWeakMap,$=T.keys,L=T.rearg,j=T.toInteger,H=T.toPath,V=$(Vs.aryMethod),Q={castArray:function(ee){return function(){var G=arguments[0];return D(G)?ee(iC(G)):ee.apply(void 0,arguments)}},iteratee:function(ee){return function(){var G=arguments[0],me=arguments[1],Te=ee(G,me),De=Te.length;return s.cap&&typeof me=="number"?(me=me>2?me-2:1,De&&De<=me?Te:rb(Te,me)):Te}},mixin:function(ee){return function(G){var me=this;if(!M(me))return ee(me,Object(G));var Te=[];return I($(G),function(De){M(G[De])&&Te.push([De,me.prototype[De]])}),ee(me,Object(G)),I(Te,function(De){var we=De[1];M(we)?me.prototype[De[0]]=we:delete me.prototype[De[0]]}),me}},nthArg:function(ee){return function(G){var me=G<0?1:j(G)+1;return y(ee(G),me)}},rearg:function(ee){return function(G,me){var Te=me?me.length:0;return y(ee(G,me),Te)}},runInContext:function(ee){return function(G){return Zb(e,ee(G),i)}}};function X(ee,G){if(s.cap){var me=Vs.iterateeRearg[ee];if(me)return he(G,me);var Te=!r&&Vs.iterateeAry[ee];if(Te)return Y(G,Te)}return G}function te(ee,G,me){return l||s.curry&&me>1?y(G,me):G}function ne(ee,G,me){if(s.fixed&&(d||!Vs.skipFixed[ee])){var Te=Vs.methodSpread[ee],De=Te&&Te.start;return De===void 0?b(G,me):yW(G,De)}return G}function be(ee,G,me){return s.rearg&&me>1&&(c||!Vs.skipRearg[ee])?L(G,Vs.methodRearg[ee]||Vs.aryRearg[me]):G}function ue(ee,G){G=H(G);for(var me=-1,Te=G.length,De=Te-1,we=E(Object(ee)),Ve=we;Ve!=null&&++me<Te;){var Ke=G[me],yt=Ve[Ke];yt!=null&&!(M(yt)||O(yt)||F(yt))&&(Ve[Ke]=E(me==De?yt:Object(yt))),Ve=Ve[Ke]}return we}function Ce(ee){return We.runInContext.convert(ee)(void 0)}function ie(ee,G){var me=Vs.aliasToReal[ee]||ee,Te=Vs.remap[me]||me,De=i;return function(we){var Ve=r?v:T,Ke=r?v[Te]:G,yt=A(A({},De),we);return Zb(Ve,me,Ke,yt)}}function Y(ee,G){return Me(ee,function(me){return typeof me=="function"?rb(me,G):me})}function he(ee,G){return Me(ee,function(me){var Te=G.length;return vW(L(rb(me,Te),G),Te)})}function Me(ee,G){return function(){var me=arguments.length;if(!me)return ee();for(var Te=Array(me);me--;)Te[me]=arguments[me];var De=s.rearg?0:me-1;return Te[De]=G(Te[De]),ee.apply(void 0,Te)}}function Pe(ee,G,me){var Te,De=Vs.aliasToReal[ee]||ee,we=G,Ve=Q[De];return Ve?we=Ve(G):s.immutable&&(Vs.mutate.array[De]?we=ab(G,iC):Vs.mutate.object[De]?we=ab(G,bW(G)):Vs.mutate.set[De]&&(we=ab(G,ue))),I(V,function(Ke){return I(Vs.aryMethod[Ke],function(yt){if(De==yt){var ht=Vs.methodSpread[De],Je=ht&&ht.afterRearg;return Te=Je?ne(De,be(De,we,Ke),Ke):be(De,ne(De,we,Ke),Ke),Te=X(De,Te),Te=te(De,Te,Ke),!1}}),!Te}),Te||(Te=we),Te==G&&(Te=l?y(Te,1):function(){return G.apply(this,arguments)}),Te.convert=ie(De,G),Te.placeholder=G.placeholder=me,Te}if(!a)return Pe(t,n,o);var We=n,qe=[];return I(V,function(ee){I(Vs.aryMethod[ee],function(G){var me=We[Vs.remap[G]||G];me&&qe.push([G,Pe(G,me,We)])})}),I($(We),function(ee){var G=We[ee];if(typeof G=="function"){for(var me=qe.length;me--;)if(qe[me][0]==ee)return;G.convert=ie(ee,G),qe.push([ee,G])}}),I(qe,function(ee){We[ee[0]]=ee[1]}),We.convert=Ce,We.placeholder=We,I($(We),function(ee){I(Vs.realToAlias[ee]||[],function(G){We[G]=We[ee]})}),We}var wW=Zb;function TW(e){return e}var Sw=TW,kW=typeof zs=="object"&&zs&&zs.Object===Object&&zs,sR=kW,SW=sR,CW=typeof self=="object"&&self&&self.Object===Object&&self,PW=SW||CW||Function("return this")(),_l=PW,EW=_l,IW=EW.Symbol,Mp=IW,rC=Mp,oR=Object.prototype,AW=oR.hasOwnProperty,DW=oR.toString,Ah=rC?rC.toStringTag:void 0;function OW(e){var t=AW.call(e,Ah),n=e[Ah];try{e[Ah]=void 0;var i=!0}catch{}var r=DW.call(e);return i&&(t?e[Ah]=n:delete e[Ah]),r}var MW=OW,xW=Object.prototype,RW=xW.toString;function $W(e){return RW.call(e)}var NW=$W,aC=Mp,FW=MW,LW=NW,HW="[object Null]",jW="[object Undefined]",sC=aC?aC.toStringTag:void 0;function BW(e){return e==null?e===void 0?jW:HW:sC&&sC in Object(e)?FW(e):LW(e)}var d_=BW;function UW(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var uc=UW,qW=d_,WW=uc,VW="[object AsyncFunction]",zW="[object Function]",YW="[object GeneratorFunction]",GW="[object Proxy]";function KW(e){if(!WW(e))return!1;var t=qW(e);return t==zW||t==YW||t==VW||t==GW}var Cw=KW,XW=_l,QW=XW["__core-js_shared__"],JW=QW,sb=JW,oC=function(){var e=/[^.]+$/.exec(sb&&sb.keys&&sb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZW(e){return!!oC&&oC in e}var eV=ZW,tV=Function.prototype,nV=tV.toString;function iV(e){if(e!=null){try{return nV.call(e)}catch{}try{return e+""}catch{}}return""}var lR=iV,rV=Cw,aV=eV,sV=uc,oV=lR,lV=/[\\^$.*+?()[\]{}|]/g,uV=/^\[object .+?Constructor\]$/,dV=Function.prototype,fV=Object.prototype,cV=dV.toString,_V=fV.hasOwnProperty,pV=RegExp("^"+cV.call(_V).replace(lV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hV(e){if(!sV(e)||aV(e))return!1;var t=rV(e)?pV:uV;return t.test(oV(e))}var mV=hV;function gV(e,t){return e==null?void 0:e[t]}var vV=gV,bV=mV,yV=vV;function wV(e,t){var n=yV(e,t);return bV(n)?n:void 0}var f_=wV,TV=f_,kV=_l,SV=TV(kV,"WeakMap"),uR=SV,lC=uR,CV=lC&&new lC,dR=CV,PV=Sw,uC=dR,EV=uC?function(e,t){return uC.set(e,t),e}:PV,fR=EV,IV=uc,dC=Object.create,AV=function(){function e(){}return function(t){if(!IV(t))return{};if(dC)return dC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),T0=AV,DV=T0,OV=uc;function MV(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=DV(e.prototype),i=e.apply(n,t);return OV(i)?i:n}}var k0=MV,xV=k0,RV=_l,$V=1;function NV(e,t,n){var i=t&$V,r=xV(e);function a(){var s=this&&this!==RV&&this instanceof a?r:e;return s.apply(i?n:this,arguments)}return a}var FV=NV;function LV(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Pw=LV,HV=Math.max;function jV(e,t,n,i){for(var r=-1,a=e.length,s=n.length,o=-1,l=t.length,d=HV(a-s,0),c=Array(l+d),v=!i;++o<l;)c[o]=t[o];for(;++r<s;)(v||r<a)&&(c[n[r]]=e[r]);for(;d--;)c[o++]=e[r++];return c}var cR=jV,BV=Math.max;function UV(e,t,n,i){for(var r=-1,a=e.length,s=-1,o=n.length,l=-1,d=t.length,c=BV(a-o,0),v=Array(c+d),T=!i;++r<c;)v[r]=e[r];for(var b=r;++l<d;)v[b+l]=t[l];for(;++s<o;)(T||r<a)&&(v[b+n[s]]=e[r++]);return v}var _R=UV;function qV(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var WV=qV;function VV(){}var Ew=VV,zV=T0,YV=Ew,GV=4294967295;function Sv(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=GV,this.__views__=[]}Sv.prototype=zV(YV.prototype);Sv.prototype.constructor=Sv;var Iw=Sv;function KV(){}var XV=KV,fC=dR,QV=XV,JV=fC?function(e){return fC.get(e)}:QV,pR=JV,ZV={},ez=ZV,cC=ez,tz=Object.prototype,nz=tz.hasOwnProperty;function iz(e){for(var t=e.name+"",n=cC[t],i=nz.call(cC,t)?n.length:0;i--;){var r=n[i],a=r.func;if(a==null||a==e)return r.name}return t}var rz=iz,az=T0,sz=Ew;function Cv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Cv.prototype=az(sz.prototype);Cv.prototype.constructor=Cv;var hR=Cv,oz=Array.isArray,Nl=oz;function lz(e){return e!=null&&typeof e=="object"}var qu=lz;function uz(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}var S0=uz,dz=Iw,fz=hR,cz=S0;function _z(e){if(e instanceof dz)return e.clone();var t=new fz(e.__wrapped__,e.__chain__);return t.__actions__=cz(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var pz=_z,hz=Iw,_C=hR,mz=Ew,gz=Nl,vz=qu,bz=pz,yz=Object.prototype,wz=yz.hasOwnProperty;function Pv(e){if(vz(e)&&!gz(e)&&!(e instanceof hz)){if(e instanceof _C)return e;if(wz.call(e,"__wrapped__"))return bz(e)}return new _C(e)}Pv.prototype=mz.prototype;Pv.prototype.constructor=Pv;var Tz=Pv,kz=Iw,Sz=pR,Cz=rz,Pz=Tz;function Ez(e){var t=Cz(e),n=Pz[t];if(typeof n!="function"||!(t in kz.prototype))return!1;if(e===n)return!0;var i=Sz(n);return!!i&&e===i[0]}var Iz=Ez,Az=800,Dz=16,Oz=Date.now;function Mz(e){var t=0,n=0;return function(){var i=Oz(),r=Dz-(i-n);if(n=i,r>0){if(++t>=Az)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mR=Mz,xz=fR,Rz=mR,$z=Rz(xz),gR=$z,Nz=/\{\n\/\* \[wrapped with (.+)\] \*/,Fz=/,? & /;function Lz(e){var t=e.match(Nz);return t?t[1].split(Fz):[]}var Hz=Lz,jz=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Bz(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(jz,`{
/* [wrapped with `+t+`] */
`)}var Uz=Bz;function qz(e){return function(){return e}}var Wz=qz,Vz=f_,zz=function(){try{var e=Vz(Object,"defineProperty");return e({},"",{}),e}catch{}}(),vR=zz,Yz=Wz,pC=vR,Gz=Sw,Kz=pC?function(e,t){return pC(e,"toString",{configurable:!0,enumerable:!1,value:Yz(t),writable:!0})}:Gz,Xz=Kz,Qz=Xz,Jz=mR,Zz=Jz(Qz),bR=Zz;function eY(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}var Aw=eY;function tY(e,t,n,i){for(var r=e.length,a=n+(i?1:-1);i?a--:++a<r;)if(t(e[a],a,e))return a;return-1}var nY=tY;function iY(e){return e!==e}var rY=iY;function aY(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}var sY=aY,oY=nY,lY=rY,uY=sY;function dY(e,t,n){return t===t?uY(e,t,n):oY(e,lY,n)}var fY=dY,cY=fY;function _Y(e,t){var n=e==null?0:e.length;return!!n&&cY(e,t,0)>-1}var pY=_Y,hY=Aw,mY=pY,gY=1,vY=2,bY=8,yY=16,wY=32,TY=64,kY=128,SY=256,CY=512,PY=[["ary",kY],["bind",gY],["bindKey",vY],["curry",bY],["curryRight",yY],["flip",CY],["partial",wY],["partialRight",TY],["rearg",SY]];function EY(e,t){return hY(PY,function(n){var i="_."+n[0];t&n[1]&&!mY(e,i)&&e.push(i)}),e.sort()}var IY=EY,AY=Hz,DY=Uz,OY=bR,MY=IY;function xY(e,t,n){var i=t+"";return OY(e,DY(i,MY(AY(i),n)))}var yR=xY,RY=Iz,$Y=gR,NY=yR,FY=1,LY=2,HY=4,jY=8,hC=32,mC=64;function BY(e,t,n,i,r,a,s,o,l,d){var c=t&jY,v=c?s:void 0,T=c?void 0:s,b=c?a:void 0,A=c?void 0:a;t|=c?hC:mC,t&=~(c?mC:hC),t&HY||(t&=~(FY|LY));var E=[e,t,r,b,v,A,T,o,l,d],y=n.apply(void 0,E);return RY(e)&&$Y(y,E),y.placeholder=i,NY(y,e,t)}var wR=BY;function UY(e){var t=e;return t.placeholder}var TR=UY,qY=9007199254740991,WY=/^(?:0|[1-9]\d*)$/;function VY(e,t){var n=typeof e;return t=t??qY,!!t&&(n=="number"||n!="symbol"&&WY.test(e))&&e>-1&&e%1==0&&e<t}var Dw=VY,zY=S0,YY=Dw,GY=Math.min;function KY(e,t){for(var n=e.length,i=GY(t.length,n),r=zY(e);i--;){var a=t[i];e[i]=YY(a,n)?r[a]:void 0}return e}var XY=KY,gC="__lodash_placeholder__";function QY(e,t){for(var n=-1,i=e.length,r=0,a=[];++n<i;){var s=e[n];(s===t||s===gC)&&(e[n]=gC,a[r++]=n)}return a}var Ow=QY,JY=cR,ZY=_R,eG=WV,vC=k0,tG=wR,nG=TR,iG=XY,rG=Ow,aG=_l,sG=1,oG=2,lG=8,uG=16,dG=128,fG=512;function kR(e,t,n,i,r,a,s,o,l,d){var c=t&dG,v=t&sG,T=t&oG,b=t&(lG|uG),A=t&fG,E=T?void 0:vC(e);function y(){for(var I=arguments.length,D=Array(I),O=I;O--;)D[O]=arguments[O];if(b)var M=nG(y),F=eG(D,M);if(i&&(D=JY(D,i,r,b)),a&&(D=ZY(D,a,s,b)),I-=F,b&&I<d){var $=rG(D,M);return tG(e,t,kR,y.placeholder,n,D,$,o,l,d-I)}var L=v?n:this,j=T?L[e]:e;return I=D.length,o?D=iG(D,o):A&&I>1&&D.reverse(),c&&l<I&&(D.length=l),this&&this!==aG&&this instanceof y&&(j=E||vC(j)),j.apply(L,D)}return y}var SR=kR,cG=Pw,_G=k0,pG=SR,hG=wR,mG=TR,gG=Ow,vG=_l;function bG(e,t,n){var i=_G(e);function r(){for(var a=arguments.length,s=Array(a),o=a,l=mG(r);o--;)s[o]=arguments[o];var d=a<3&&s[0]!==l&&s[a-1]!==l?[]:gG(s,l);if(a-=d.length,a<n)return hG(e,t,pG,r.placeholder,void 0,s,d,void 0,void 0,n-a);var c=this&&this!==vG&&this instanceof r?i:e;return cG(c,this,s)}return r}var yG=bG,wG=Pw,TG=k0,kG=_l,SG=1;function CG(e,t,n,i){var r=t&SG,a=TG(e);function s(){for(var o=-1,l=arguments.length,d=-1,c=i.length,v=Array(c+l),T=this&&this!==kG&&this instanceof s?a:e;++d<c;)v[d]=i[d];for(;l--;)v[d++]=arguments[++o];return wG(T,r?n:this,v)}return s}var PG=CG,EG=cR,IG=_R,bC=Ow,yC="__lodash_placeholder__",ob=1,AG=2,DG=4,wC=8,Dh=128,TC=256,OG=Math.min;function MG(e,t){var n=e[1],i=t[1],r=n|i,a=r<(ob|AG|Dh),s=i==Dh&&n==wC||i==Dh&&n==TC&&e[7].length<=t[8]||i==(Dh|TC)&&t[7].length<=t[8]&&n==wC;if(!(a||s))return e;i&ob&&(e[2]=t[2],r|=n&ob?0:DG);var o=t[3];if(o){var l=e[3];e[3]=l?EG(l,o,t[4]):o,e[4]=l?bC(e[3],yC):t[4]}return o=t[5],o&&(l=e[5],e[5]=l?IG(l,o,t[6]):o,e[6]=l?bC(e[5],yC):t[6]),o=t[7],o&&(e[7]=o),i&Dh&&(e[8]=e[8]==null?t[8]:OG(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}var xG=MG,RG=/\s/;function $G(e){for(var t=e.length;t--&&RG.test(e.charAt(t)););return t}var NG=$G,FG=NG,LG=/^\s+/;function HG(e){return e&&e.slice(0,FG(e)+1).replace(LG,"")}var jG=HG,BG=d_,UG=qu,qG="[object Symbol]";function WG(e){return typeof e=="symbol"||UG(e)&&BG(e)==qG}var Pm=WG,VG=jG,kC=uc,zG=Pm,SC=NaN,YG=/^[-+]0x[0-9a-f]+$/i,GG=/^0b[01]+$/i,KG=/^0o[0-7]+$/i,XG=parseInt;function QG(e){if(typeof e=="number")return e;if(zG(e))return SC;if(kC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=VG(e);var n=GG.test(e);return n||KG.test(e)?XG(e.slice(2),n?2:8):YG.test(e)?SC:+e}var JG=QG,ZG=JG,CC=1/0,eK=17976931348623157e292;function tK(e){if(!e)return e===0?e:0;if(e=ZG(e),e===CC||e===-CC){var t=e<0?-1:1;return t*eK}return e===e?e:0}var nK=tK,iK=nK;function rK(e){var t=iK(e),n=t%1;return t===t?n?t-n:t:0}var CR=rK,aK=fR,sK=FV,oK=yG,lK=SR,uK=PG,dK=pR,fK=xG,cK=gR,_K=yR,PC=CR,pK="Expected a function",EC=1,hK=2,lb=8,ub=16,db=32,IC=64,AC=Math.max;function mK(e,t,n,i,r,a,s,o){var l=t&hK;if(!l&&typeof e!="function")throw new TypeError(pK);var d=i?i.length:0;if(d||(t&=~(db|IC),i=r=void 0),s=s===void 0?s:AC(PC(s),0),o=o===void 0?o:PC(o),d-=r?r.length:0,t&IC){var c=i,v=r;i=r=void 0}var T=l?void 0:dK(e),b=[e,t,n,i,r,c,v,a,s,o];if(T&&fK(b,T),e=b[0],t=b[1],n=b[2],i=b[3],r=b[4],o=b[9]=b[9]===void 0?l?0:e.length:AC(b[9]-d,0),!o&&t&(lb|ub)&&(t&=~(lb|ub)),!t||t==EC)var A=sK(e,t,n);else t==lb||t==ub?A=oK(e,t,o):(t==db||t==(EC|db))&&!r.length?A=uK(e,t,n,i):A=lK.apply(void 0,b);var E=T?aK:cK;return _K(E(A,b),e,t)}var Mw=mK,gK=Mw,vK=128;function bK(e,t,n){return t=n?void 0:t,t=e&&t==null?e.length:t,gK(e,vK,void 0,void 0,void 0,void 0,t)}var yK=bK,DC=vR;function wK(e,t,n){t=="__proto__"&&DC?DC(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C0=wK;function TK(e,t){return e===t||e!==e&&t!==t}var xw=TK,kK=C0,SK=xw,CK=Object.prototype,PK=CK.hasOwnProperty;function EK(e,t,n){var i=e[t];(!(PK.call(e,t)&&SK(i,n))||n===void 0&&!(t in e))&&kK(e,t,n)}var PR=EK,IK=PR,AK=C0;function DK(e,t,n,i){var r=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=i?i(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),r?AK(n,o,l):IK(n,o,l)}return n}var P0=DK;function OK(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var MK=OK,xK=d_,RK=qu,$K="[object Arguments]";function NK(e){return RK(e)&&xK(e)==$K}var FK=NK,OC=FK,LK=qu,ER=Object.prototype,HK=ER.hasOwnProperty,jK=ER.propertyIsEnumerable,BK=OC(function(){return arguments}())?OC:function(e){return LK(e)&&HK.call(e,"callee")&&!jK.call(e,"callee")},Rw=BK,Ev={exports:{}};function UK(){return!1}var qK=UK;Ev.exports;(function(e,t){var n=_l,i=qK,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===r,o=s?n.Buffer:void 0,l=o?o.isBuffer:void 0,d=l||i;e.exports=d})(Ev,Ev.exports);var $w=Ev.exports,WK=9007199254740991;function VK(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WK}var Nw=VK,zK=d_,YK=Nw,GK=qu,KK="[object Arguments]",XK="[object Array]",QK="[object Boolean]",JK="[object Date]",ZK="[object Error]",eX="[object Function]",tX="[object Map]",nX="[object Number]",iX="[object Object]",rX="[object RegExp]",aX="[object Set]",sX="[object String]",oX="[object WeakMap]",lX="[object ArrayBuffer]",uX="[object DataView]",dX="[object Float32Array]",fX="[object Float64Array]",cX="[object Int8Array]",_X="[object Int16Array]",pX="[object Int32Array]",hX="[object Uint8Array]",mX="[object Uint8ClampedArray]",gX="[object Uint16Array]",vX="[object Uint32Array]",ls={};ls[dX]=ls[fX]=ls[cX]=ls[_X]=ls[pX]=ls[hX]=ls[mX]=ls[gX]=ls[vX]=!0;ls[KK]=ls[XK]=ls[lX]=ls[QK]=ls[uX]=ls[JK]=ls[ZK]=ls[eX]=ls[tX]=ls[nX]=ls[iX]=ls[rX]=ls[aX]=ls[sX]=ls[oX]=!1;function bX(e){return GK(e)&&YK(e.length)&&!!ls[zK(e)]}var yX=bX;function wX(e){return function(t){return e(t)}}var Fw=wX,Iv={exports:{}};Iv.exports;(function(e,t){var n=sR,i=t&&!t.nodeType&&t,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,s=a&&n.process,o=function(){try{var l=r&&r.require&&r.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Iv,Iv.exports);var Lw=Iv.exports,TX=yX,kX=Fw,MC=Lw,xC=MC&&MC.isTypedArray,SX=xC?kX(xC):TX,IR=SX,CX=MK,PX=Rw,EX=Nl,IX=$w,AX=Dw,DX=IR,OX=Object.prototype,MX=OX.hasOwnProperty;function xX(e,t){var n=EX(e),i=!n&&PX(e),r=!n&&!i&&IX(e),a=!n&&!i&&!r&&DX(e),s=n||i||r||a,o=s?CX(e.length,String):[],l=o.length;for(var d in e)(t||MX.call(e,d))&&!(s&&(d=="length"||r&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||AX(d,l)))&&o.push(d);return o}var AR=xX,RX=Object.prototype;function $X(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||RX;return e===n}var Hw=$X;function NX(e,t){return function(n){return e(t(n))}}var DR=NX,FX=DR,LX=FX(Object.keys,Object),HX=LX,jX=Hw,BX=HX,UX=Object.prototype,qX=UX.hasOwnProperty;function WX(e){if(!jX(e))return BX(e);var t=[];for(var n in Object(e))qX.call(e,n)&&n!="constructor"&&t.push(n);return t}var OR=WX,VX=Cw,zX=Nw;function YX(e){return e!=null&&zX(e.length)&&!VX(e)}var MR=YX,GX=AR,KX=OR,XX=MR;function QX(e){return XX(e)?GX(e):KX(e)}var Em=QX,JX=P0,ZX=Em;function eQ(e,t){return e&&JX(t,ZX(t),e)}var xR=eQ;function tQ(){this.__data__=[],this.size=0}var nQ=tQ,iQ=xw;function rQ(e,t){for(var n=e.length;n--;)if(iQ(e[n][0],t))return n;return-1}var E0=rQ,aQ=E0,sQ=Array.prototype,oQ=sQ.splice;function lQ(e){var t=this.__data__,n=aQ(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():oQ.call(t,n,1),--this.size,!0}var uQ=lQ,dQ=E0;function fQ(e){var t=this.__data__,n=dQ(t,e);return n<0?void 0:t[n][1]}var cQ=fQ,_Q=E0;function pQ(e){return _Q(this.__data__,e)>-1}var hQ=pQ,mQ=E0;function gQ(e,t){var n=this.__data__,i=mQ(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var vQ=gQ,bQ=nQ,yQ=uQ,wQ=cQ,TQ=hQ,kQ=vQ;function xp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}xp.prototype.clear=bQ;xp.prototype.delete=yQ;xp.prototype.get=wQ;xp.prototype.has=TQ;xp.prototype.set=kQ;var I0=xp,SQ=I0;function CQ(){this.__data__=new SQ,this.size=0}var PQ=CQ;function EQ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var IQ=EQ;function AQ(e){return this.__data__.get(e)}var DQ=AQ;function OQ(e){return this.__data__.has(e)}var MQ=OQ,xQ=f_,RQ=_l,$Q=xQ(RQ,"Map"),jw=$Q,NQ=f_,FQ=NQ(Object,"create"),A0=FQ,RC=A0;function LQ(){this.__data__=RC?RC(null):{},this.size=0}var HQ=LQ;function jQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var BQ=jQ,UQ=A0,qQ="__lodash_hash_undefined__",WQ=Object.prototype,VQ=WQ.hasOwnProperty;function zQ(e){var t=this.__data__;if(UQ){var n=t[e];return n===qQ?void 0:n}return VQ.call(t,e)?t[e]:void 0}var YQ=zQ,GQ=A0,KQ=Object.prototype,XQ=KQ.hasOwnProperty;function QQ(e){var t=this.__data__;return GQ?t[e]!==void 0:XQ.call(t,e)}var JQ=QQ,ZQ=A0,eJ="__lodash_hash_undefined__";function tJ(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ZQ&&t===void 0?eJ:t,this}var nJ=tJ,iJ=HQ,rJ=BQ,aJ=YQ,sJ=JQ,oJ=nJ;function Rp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Rp.prototype.clear=iJ;Rp.prototype.delete=rJ;Rp.prototype.get=aJ;Rp.prototype.has=sJ;Rp.prototype.set=oJ;var lJ=Rp,$C=lJ,uJ=I0,dJ=jw;function fJ(){this.size=0,this.__data__={hash:new $C,map:new(dJ||uJ),string:new $C}}var cJ=fJ;function _J(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var pJ=_J,hJ=pJ;function mJ(e,t){var n=e.__data__;return hJ(t)?n[typeof t=="string"?"string":"hash"]:n.map}var D0=mJ,gJ=D0;function vJ(e){var t=gJ(this,e).delete(e);return this.size-=t?1:0,t}var bJ=vJ,yJ=D0;function wJ(e){return yJ(this,e).get(e)}var TJ=wJ,kJ=D0;function SJ(e){return kJ(this,e).has(e)}var CJ=SJ,PJ=D0;function EJ(e,t){var n=PJ(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var IJ=EJ,AJ=cJ,DJ=bJ,OJ=TJ,MJ=CJ,xJ=IJ;function $p(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}$p.prototype.clear=AJ;$p.prototype.delete=DJ;$p.prototype.get=OJ;$p.prototype.has=MJ;$p.prototype.set=xJ;var Bw=$p,RJ=I0,$J=jw,NJ=Bw,FJ=200;function LJ(e,t){var n=this.__data__;if(n instanceof RJ){var i=n.__data__;if(!$J||i.length<FJ-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new NJ(i)}return n.set(e,t),this.size=n.size,this}var HJ=LJ,jJ=I0,BJ=PQ,UJ=IQ,qJ=DQ,WJ=MQ,VJ=HJ;function Np(e){var t=this.__data__=new jJ(e);this.size=t.size}Np.prototype.clear=BJ;Np.prototype.delete=UJ;Np.prototype.get=qJ;Np.prototype.has=WJ;Np.prototype.set=VJ;var Uw=Np;function zJ(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var YJ=zJ,GJ=uc,KJ=Hw,XJ=YJ,QJ=Object.prototype,JJ=QJ.hasOwnProperty;function ZJ(e){if(!GJ(e))return XJ(e);var t=KJ(e),n=[];for(var i in e)i=="constructor"&&(t||!JJ.call(e,i))||n.push(i);return n}var eZ=ZJ,tZ=AR,nZ=eZ,iZ=MR;function rZ(e){return iZ(e)?tZ(e,!0):nZ(e)}var qw=rZ,aZ=P0,sZ=qw;function oZ(e,t){return e&&aZ(t,sZ(t),e)}var lZ=oZ,Av={exports:{}};Av.exports;(function(e,t){var n=_l,i=t&&!t.nodeType&&t,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,s=a?n.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(d,c){if(c)return d.slice();var v=d.length,T=o?o(v):new d.constructor(v);return d.copy(T),T}e.exports=l})(Av,Av.exports);var uZ=Av.exports;function dZ(e,t){for(var n=-1,i=e==null?0:e.length,r=0,a=[];++n<i;){var s=e[n];t(s,n,e)&&(a[r++]=s)}return a}var fZ=dZ;function cZ(){return[]}var RR=cZ,_Z=fZ,pZ=RR,hZ=Object.prototype,mZ=hZ.propertyIsEnumerable,NC=Object.getOwnPropertySymbols,gZ=NC?function(e){return e==null?[]:(e=Object(e),_Z(NC(e),function(t){return mZ.call(e,t)}))}:pZ,Ww=gZ,vZ=P0,bZ=Ww;function yZ(e,t){return vZ(e,bZ(e),t)}var wZ=yZ;function TZ(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var Vw=TZ,kZ=DR,SZ=kZ(Object.getPrototypeOf,Object),zw=SZ,CZ=Vw,PZ=zw,EZ=Ww,IZ=RR,AZ=Object.getOwnPropertySymbols,DZ=AZ?function(e){for(var t=[];e;)CZ(t,EZ(e)),e=PZ(e);return t}:IZ,$R=DZ,OZ=P0,MZ=$R;function xZ(e,t){return OZ(e,MZ(e),t)}var RZ=xZ,$Z=Vw,NZ=Nl;function FZ(e,t,n){var i=t(e);return NZ(e)?i:$Z(i,n(e))}var NR=FZ,LZ=NR,HZ=Ww,jZ=Em;function BZ(e){return LZ(e,jZ,HZ)}var FR=BZ,UZ=NR,qZ=$R,WZ=qw;function VZ(e){return UZ(e,WZ,qZ)}var zZ=VZ,YZ=f_,GZ=_l,KZ=YZ(GZ,"DataView"),XZ=KZ,QZ=f_,JZ=_l,ZZ=QZ(JZ,"Promise"),eee=ZZ,tee=f_,nee=_l,iee=tee(nee,"Set"),ree=iee,ey=XZ,ty=jw,ny=eee,iy=ree,ry=uR,LR=d_,Fp=lR,FC="[object Map]",aee="[object Object]",LC="[object Promise]",HC="[object Set]",jC="[object WeakMap]",BC="[object DataView]",see=Fp(ey),oee=Fp(ty),lee=Fp(ny),uee=Fp(iy),dee=Fp(ry),Vc=LR;(ey&&Vc(new ey(new ArrayBuffer(1)))!=BC||ty&&Vc(new ty)!=FC||ny&&Vc(ny.resolve())!=LC||iy&&Vc(new iy)!=HC||ry&&Vc(new ry)!=jC)&&(Vc=function(e){var t=LR(e),n=t==aee?e.constructor:void 0,i=n?Fp(n):"";if(i)switch(i){case see:return BC;case oee:return FC;case lee:return LC;case uee:return HC;case dee:return jC}return t});var Im=Vc,fee=Object.prototype,cee=fee.hasOwnProperty;function _ee(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&cee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var pee=_ee,hee=_l,mee=hee.Uint8Array,HR=mee,UC=HR;function gee(e){var t=new e.constructor(e.byteLength);return new UC(t).set(new UC(e)),t}var Yw=gee,vee=Yw;function bee(e,t){var n=t?vee(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var yee=bee,wee=/\w*$/;function Tee(e){var t=new e.constructor(e.source,wee.exec(e));return t.lastIndex=e.lastIndex,t}var kee=Tee,qC=Mp,WC=qC?qC.prototype:void 0,VC=WC?WC.valueOf:void 0;function See(e){return VC?Object(VC.call(e)):{}}var Cee=See,Pee=Yw;function Eee(e,t){var n=t?Pee(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Iee=Eee,Aee=Yw,Dee=yee,Oee=kee,Mee=Cee,xee=Iee,Ree="[object Boolean]",$ee="[object Date]",Nee="[object Map]",Fee="[object Number]",Lee="[object RegExp]",Hee="[object Set]",jee="[object String]",Bee="[object Symbol]",Uee="[object ArrayBuffer]",qee="[object DataView]",Wee="[object Float32Array]",Vee="[object Float64Array]",zee="[object Int8Array]",Yee="[object Int16Array]",Gee="[object Int32Array]",Kee="[object Uint8Array]",Xee="[object Uint8ClampedArray]",Qee="[object Uint16Array]",Jee="[object Uint32Array]";function Zee(e,t,n){var i=e.constructor;switch(t){case Uee:return Aee(e);case Ree:case $ee:return new i(+e);case qee:return Dee(e,n);case Wee:case Vee:case zee:case Yee:case Gee:case Kee:case Xee:case Qee:case Jee:return xee(e,n);case Nee:return new i;case Fee:case jee:return new i(e);case Lee:return Oee(e);case Hee:return new i;case Bee:return Mee(e)}}var ete=Zee,tte=T0,nte=zw,ite=Hw;function rte(e){return typeof e.constructor=="function"&&!ite(e)?tte(nte(e)):{}}var ate=rte,ste=Im,ote=qu,lte="[object Map]";function ute(e){return ote(e)&&ste(e)==lte}var dte=ute,fte=dte,cte=Fw,zC=Lw,YC=zC&&zC.isMap,_te=YC?cte(YC):fte,pte=_te,hte=Im,mte=qu,gte="[object Set]";function vte(e){return mte(e)&&hte(e)==gte}var bte=vte,yte=bte,wte=Fw,GC=Lw,KC=GC&&GC.isSet,Tte=KC?wte(KC):yte,kte=Tte,Ste=Uw,Cte=Aw,Pte=PR,Ete=xR,Ite=lZ,Ate=uZ,Dte=S0,Ote=wZ,Mte=RZ,xte=FR,Rte=zZ,$te=Im,Nte=pee,Fte=ete,Lte=ate,Hte=Nl,jte=$w,Bte=pte,Ute=uc,qte=kte,Wte=Em,Vte=qw,zte=1,Yte=2,Gte=4,jR="[object Arguments]",Kte="[object Array]",Xte="[object Boolean]",Qte="[object Date]",Jte="[object Error]",BR="[object Function]",Zte="[object GeneratorFunction]",ene="[object Map]",tne="[object Number]",UR="[object Object]",nne="[object RegExp]",ine="[object Set]",rne="[object String]",ane="[object Symbol]",sne="[object WeakMap]",one="[object ArrayBuffer]",lne="[object DataView]",une="[object Float32Array]",dne="[object Float64Array]",fne="[object Int8Array]",cne="[object Int16Array]",_ne="[object Int32Array]",pne="[object Uint8Array]",hne="[object Uint8ClampedArray]",mne="[object Uint16Array]",gne="[object Uint32Array]",ts={};ts[jR]=ts[Kte]=ts[one]=ts[lne]=ts[Xte]=ts[Qte]=ts[une]=ts[dne]=ts[fne]=ts[cne]=ts[_ne]=ts[ene]=ts[tne]=ts[UR]=ts[nne]=ts[ine]=ts[rne]=ts[ane]=ts[pne]=ts[hne]=ts[mne]=ts[gne]=!0;ts[Jte]=ts[BR]=ts[sne]=!1;function lv(e,t,n,i,r,a){var s,o=t&zte,l=t&Yte,d=t&Gte;if(n&&(s=r?n(e,i,r,a):n(e)),s!==void 0)return s;if(!Ute(e))return e;var c=Hte(e);if(c){if(s=Nte(e),!o)return Dte(e,s)}else{var v=$te(e),T=v==BR||v==Zte;if(jte(e))return Ate(e,o);if(v==UR||v==jR||T&&!r){if(s=l||T?{}:Lte(e),!o)return l?Mte(e,Ite(s,e)):Ote(e,Ete(s,e))}else{if(!ts[v])return r?e:{};s=Fte(e,v,o)}}a||(a=new Ste);var b=a.get(e);if(b)return b;a.set(e,s),qte(e)?e.forEach(function(y){s.add(lv(y,t,n,y,e,a))}):Bte(e)&&e.forEach(function(y,I){s.set(I,lv(y,t,n,I,e,a))});var A=d?l?Rte:xte:l?Vte:Wte,E=c?void 0:A(e);return Cte(E||e,function(y,I){E&&(I=y,y=e[I]),Pte(s,I,lv(y,t,n,I,e,a))}),s}var qR=lv,vne=qR,bne=4;function yne(e){return vne(e,bne)}var wne=yne,Tne=Mw,kne=8;function Gw(e,t,n){t=n?void 0:t;var i=Tne(e,kne,void 0,void 0,void 0,void 0,void 0,t);return i.placeholder=Gw.placeholder,i}Gw.placeholder={};var Sne=Gw,Cne=d_,Pne=zw,Ene=qu,Ine="[object Object]",Ane=Function.prototype,Dne=Object.prototype,WR=Ane.toString,One=Dne.hasOwnProperty,Mne=WR.call(Object);function xne(e){if(!Ene(e)||Cne(e)!=Ine)return!1;var t=Pne(e);if(t===null)return!0;var n=One.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&WR.call(n)==Mne}var Rne=xne,$ne=d_,Nne=qu,Fne=Rne,Lne="[object DOMException]",Hne="[object Error]";function jne(e){if(!Nne(e))return!1;var t=$ne(e);return t==Hne||t==Lne||typeof e.message=="string"&&typeof e.name=="string"&&!Fne(e)}var Bne=jne,Une=Im,qne=qu,Wne="[object WeakMap]";function Vne(e){return qne(e)&&Une(e)==Wne}var zne=Vne,Yne="__lodash_hash_undefined__";function Gne(e){return this.__data__.set(e,Yne),this}var Kne=Gne;function Xne(e){return this.__data__.has(e)}var Qne=Xne,Jne=Bw,Zne=Kne,eie=Qne;function Dv(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Jne;++t<n;)this.add(e[t])}Dv.prototype.add=Dv.prototype.push=Zne;Dv.prototype.has=eie;var tie=Dv;function nie(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var iie=nie;function rie(e,t){return e.has(t)}var aie=rie,sie=tie,oie=iie,lie=aie,uie=1,die=2;function fie(e,t,n,i,r,a){var s=n&uie,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var d=a.get(e),c=a.get(t);if(d&&c)return d==t&&c==e;var v=-1,T=!0,b=n&die?new sie:void 0;for(a.set(e,t),a.set(t,e);++v<o;){var A=e[v],E=t[v];if(i)var y=s?i(E,A,v,t,e,a):i(A,E,v,e,t,a);if(y!==void 0){if(y)continue;T=!1;break}if(b){if(!oie(t,function(I,D){if(!lie(b,D)&&(A===I||r(A,I,n,i,a)))return b.push(D)})){T=!1;break}}else if(!(A===E||r(A,E,n,i,a))){T=!1;break}}return a.delete(e),a.delete(t),T}var VR=fie;function cie(e){var t=-1,n=Array(e.size);return e.forEach(function(i,r){n[++t]=[r,i]}),n}var _ie=cie;function pie(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var hie=pie,XC=Mp,QC=HR,mie=xw,gie=VR,vie=_ie,bie=hie,yie=1,wie=2,Tie="[object Boolean]",kie="[object Date]",Sie="[object Error]",Cie="[object Map]",Pie="[object Number]",Eie="[object RegExp]",Iie="[object Set]",Aie="[object String]",Die="[object Symbol]",Oie="[object ArrayBuffer]",Mie="[object DataView]",JC=XC?XC.prototype:void 0,fb=JC?JC.valueOf:void 0;function xie(e,t,n,i,r,a,s){switch(n){case Mie:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oie:return!(e.byteLength!=t.byteLength||!a(new QC(e),new QC(t)));case Tie:case kie:case Pie:return mie(+e,+t);case Sie:return e.name==t.name&&e.message==t.message;case Eie:case Aie:return e==t+"";case Cie:var o=vie;case Iie:var l=i&yie;if(o||(o=bie),e.size!=t.size&&!l)return!1;var d=s.get(e);if(d)return d==t;i|=wie,s.set(e,t);var c=gie(o(e),o(t),i,r,a,s);return s.delete(e),c;case Die:if(fb)return fb.call(e)==fb.call(t)}return!1}var Rie=xie,ZC=FR,$ie=1,Nie=Object.prototype,Fie=Nie.hasOwnProperty;function Lie(e,t,n,i,r,a){var s=n&$ie,o=ZC(e),l=o.length,d=ZC(t),c=d.length;if(l!=c&&!s)return!1;for(var v=l;v--;){var T=o[v];if(!(s?T in t:Fie.call(t,T)))return!1}var b=a.get(e),A=a.get(t);if(b&&A)return b==t&&A==e;var E=!0;a.set(e,t),a.set(t,e);for(var y=s;++v<l;){T=o[v];var I=e[T],D=t[T];if(i)var O=s?i(D,I,T,t,e,a):i(I,D,T,e,t,a);if(!(O===void 0?I===D||r(I,D,n,i,a):O)){E=!1;break}y||(y=T=="constructor")}if(E&&!y){var M=e.constructor,F=t.constructor;M!=F&&"constructor"in e&&"constructor"in t&&!(typeof M=="function"&&M instanceof M&&typeof F=="function"&&F instanceof F)&&(E=!1)}return a.delete(e),a.delete(t),E}var Hie=Lie,cb=Uw,jie=VR,Bie=Rie,Uie=Hie,eP=Im,tP=Nl,nP=$w,qie=IR,Wie=1,iP="[object Arguments]",rP="[object Array]",Wg="[object Object]",Vie=Object.prototype,aP=Vie.hasOwnProperty;function zie(e,t,n,i,r,a){var s=tP(e),o=tP(t),l=s?rP:eP(e),d=o?rP:eP(t);l=l==iP?Wg:l,d=d==iP?Wg:d;var c=l==Wg,v=d==Wg,T=l==d;if(T&&nP(e)){if(!nP(t))return!1;s=!0,c=!1}if(T&&!c)return a||(a=new cb),s||qie(e)?jie(e,t,n,i,r,a):Bie(e,t,l,n,i,r,a);if(!(n&Wie)){var b=c&&aP.call(e,"__wrapped__"),A=v&&aP.call(t,"__wrapped__");if(b||A){var E=b?e.value():e,y=A?t.value():t;return a||(a=new cb),r(E,y,n,i,a)}}return T?(a||(a=new cb),Uie(e,t,n,i,r,a)):!1}var Yie=zie,Gie=Yie,sP=qu;function zR(e,t,n,i,r){return e===t?!0:e==null||t==null||!sP(e)&&!sP(t)?e!==e&&t!==t:Gie(e,t,n,i,zR,r)}var YR=zR,Kie=Uw,Xie=YR,Qie=1,Jie=2;function Zie(e,t,n,i){var r=n.length,a=r,s=!i;if(e==null)return!a;for(e=Object(e);r--;){var o=n[r];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<a;){o=n[r];var l=o[0],d=e[l],c=o[1];if(s&&o[2]){if(d===void 0&&!(l in e))return!1}else{var v=new Kie;if(i)var T=i(d,c,l,e,t,v);if(!(T===void 0?Xie(c,d,Qie|Jie,i,v):T))return!1}}return!0}var ere=Zie,tre=uc;function nre(e){return e===e&&!tre(e)}var GR=nre,ire=GR,rre=Em;function are(e){for(var t=rre(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ire(r)]}return t}var sre=are;function ore(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var KR=ore,lre=ere,ure=sre,dre=KR;function fre(e){var t=ure(e);return t.length==1&&t[0][2]?dre(t[0][0],t[0][1]):function(n){return n===e||lre(n,e,t)}}var cre=fre,_re=Nl,pre=Pm,hre=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mre=/^\w*$/;function gre(e,t){if(_re(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||pre(e)?!0:mre.test(e)||!hre.test(e)||t!=null&&e in Object(t)}var Kw=gre,XR=Bw,vre="Expected a function";function Xw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vre);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=e.apply(this,i);return n.cache=a.set(r,s)||a,s};return n.cache=new(Xw.Cache||XR),n}Xw.Cache=XR;var bre=Xw,yre=bre,wre=500;function Tre(e){var t=yre(e,function(i){return n.size===wre&&n.clear(),i}),n=t.cache;return t}var kre=Tre,Sre=kre,Cre=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pre=/\\(\\)?/g,Ere=Sre(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Cre,function(n,i,r,a){t.push(r?a.replace(Pre,"$1"):i||n)}),t}),QR=Ere;function Ire(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var JR=Ire,oP=Mp,Are=JR,Dre=Nl,Ore=Pm,Mre=1/0,lP=oP?oP.prototype:void 0,uP=lP?lP.toString:void 0;function ZR(e){if(typeof e=="string")return e;if(Dre(e))return Are(e,ZR)+"";if(Ore(e))return uP?uP.call(e):"";var t=e+"";return t=="0"&&1/e==-Mre?"-0":t}var xre=ZR,Rre=xre;function $re(e){return e==null?"":Rre(e)}var Lp=$re,Nre=Nl,Fre=Kw,Lre=QR,Hre=Lp;function jre(e,t){return Nre(e)?e:Fre(e,t)?[e]:Lre(Hre(e))}var e$=jre,Bre=Pm,Ure=1/0;function qre(e){if(typeof e=="string"||Bre(e))return e;var t=e+"";return t=="0"&&1/e==-Ure?"-0":t}var Am=qre,Wre=e$,Vre=Am;function zre(e,t){t=Wre(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Vre(t[n++])];return n&&n==i?e:void 0}var t$=zre,Yre=t$;function Gre(e,t,n){var i=e==null?void 0:Yre(e,t);return i===void 0?n:i}var Kre=Gre;function Xre(e,t){return e!=null&&t in Object(e)}var Qre=Xre,Jre=e$,Zre=Rw,eae=Nl,tae=Dw,nae=Nw,iae=Am;function rae(e,t,n){t=Jre(t,e);for(var i=-1,r=t.length,a=!1;++i<r;){var s=iae(t[i]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++i!=r?a:(r=e==null?0:e.length,!!r&&nae(r)&&tae(s,r)&&(eae(e)||Zre(e)))}var n$=rae,aae=Qre,sae=n$;function oae(e,t){return e!=null&&sae(e,t,aae)}var lae=oae,uae=YR,dae=Kre,fae=lae,cae=Kw,_ae=GR,pae=KR,hae=Am,mae=1,gae=2;function vae(e,t){return cae(e)&&_ae(t)?pae(hae(e),t):function(n){var i=dae(n,e);return i===void 0&&i===t?fae(n,e):uae(t,i,mae|gae)}}var bae=vae;function yae(e){return function(t){return t==null?void 0:t[e]}}var wae=yae,Tae=t$;function kae(e){return function(t){return Tae(t,e)}}var Sae=kae,Cae=wae,Pae=Sae,Eae=Kw,Iae=Am;function Aae(e){return Eae(e)?Cae(Iae(e)):Pae(e)}var Dae=Aae,Oae=cre,Mae=bae,xae=Sw,Rae=Nl,$ae=Dae;function Nae(e){return typeof e=="function"?e:e==null?xae:typeof e=="object"?Rae(e)?Mae(e[0],e[1]):Oae(e):$ae(e)}var Qw=Nae,Fae=qR,Lae=Qw,Hae=1;function jae(e){return Lae(typeof e=="function"?e:Fae(e,Hae))}var Bae=jae,dP=Mp,Uae=Rw,qae=Nl,fP=dP?dP.isConcatSpreadable:void 0;function Wae(e){return qae(e)||Uae(e)||!!(fP&&e&&e[fP])}var Vae=Wae,zae=Vw,Yae=Vae;function i$(e,t,n,i,r){var a=-1,s=e.length;for(n||(n=Yae),r||(r=[]);++a<s;){var o=e[a];t>0&&n(o)?t>1?i$(o,t-1,n,i,r):zae(r,o):i||(r[r.length]=o)}return r}var Gae=i$,Kae=Gae;function Xae(e){var t=e==null?0:e.length;return t?Kae(e,1):[]}var Qae=Xae,Jae=Pw,cP=Math.max;function Zae(e,t,n){return t=cP(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=cP(i.length-t,0),s=Array(a);++r<a;)s[r]=i[t+r];r=-1;for(var o=Array(t+1);++r<t;)o[r]=i[r];return o[t]=n(s),Jae(e,this,o)}}var ese=Zae,tse=Qae,nse=ese,ise=bR;function rse(e){return ise(nse(e,void 0,tse),e+"")}var ase=rse,sse=Mw,ose=ase,lse=256,use=ose(function(e,t){return sse(e,lse,void 0,void 0,void 0,t)}),dse=use,fse=JR,cse=S0,_se=Nl,pse=Pm,hse=QR,mse=Am,gse=Lp;function vse(e){return _se(e)?fse(e,mse):pse(e)?[e]:cse(hse(gse(e)))}var bse=vse,yse={ary:yK,assign:xR,clone:wne,curry:Sne,forEach:Aw,isArray:Nl,isError:Bne,isFunction:Cw,isWeakMap:zne,iteratee:Bae,keys:OR,rearg:dse,toInteger:CR,toPath:bse},wse=wW,Tse=yse;function kse(e,t,n){return wse(Tse,e,t,n)}var Sse=kse;function Cse(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}var Pse=Cse,Ese=Pse;function Ise(e,t,n){var i=e.length;return n=n===void 0?i:n,!t&&n>=i?e:Ese(e,t,n)}var Ase=Ise,Dse="\\ud800-\\udfff",Ose="\\u0300-\\u036f",Mse="\\ufe20-\\ufe2f",xse="\\u20d0-\\u20ff",Rse=Ose+Mse+xse,$se="\\ufe0e\\ufe0f",Nse="\\u200d",Fse=RegExp("["+Nse+Dse+Rse+$se+"]");function Lse(e){return Fse.test(e)}var r$=Lse;function Hse(e){return e.split("")}var jse=Hse,a$="\\ud800-\\udfff",Bse="\\u0300-\\u036f",Use="\\ufe20-\\ufe2f",qse="\\u20d0-\\u20ff",Wse=Bse+Use+qse,Vse="\\ufe0e\\ufe0f",zse="["+a$+"]",ay="["+Wse+"]",sy="\\ud83c[\\udffb-\\udfff]",Yse="(?:"+ay+"|"+sy+")",s$="[^"+a$+"]",o$="(?:\\ud83c[\\udde6-\\uddff]){2}",l$="[\\ud800-\\udbff][\\udc00-\\udfff]",Gse="\\u200d",u$=Yse+"?",d$="["+Vse+"]?",Kse="(?:"+Gse+"(?:"+[s$,o$,l$].join("|")+")"+d$+u$+")*",Xse=d$+u$+Kse,Qse="(?:"+[s$+ay+"?",ay,o$,l$,zse].join("|")+")",Jse=RegExp(sy+"(?="+sy+")|"+Qse+Xse,"g");function Zse(e){return e.match(Jse)||[]}var eoe=Zse,toe=jse,noe=r$,ioe=eoe;function roe(e){return noe(e)?ioe(e):toe(e)}var aoe=roe,soe=Ase,ooe=r$,loe=aoe,uoe=Lp;function doe(e){return function(t){t=uoe(t);var n=ooe(t)?loe(t):void 0,i=n?n[0]:t.charAt(0),r=n?soe(n,1).join(""):t.slice(1);return i[e]()+r}}var foe=doe,coe=foe,_oe=coe("toUpperCase"),poe=_oe,hoe=Lp,moe=poe;function goe(e){return moe(hoe(e).toLowerCase())}var voe=goe;function boe(e,t,n,i){var r=-1,a=e==null?0:e.length;for(i&&a&&(n=e[++r]);++r<a;)n=t(n,e[r],r,e);return n}var yoe=boe;function woe(e){return function(t){return e==null?void 0:e[t]}}var Toe=woe,koe=Toe,Soe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},Coe=koe(Soe),Poe=Coe,Eoe=Poe,Ioe=Lp,Aoe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Doe="\\u0300-\\u036f",Ooe="\\ufe20-\\ufe2f",Moe="\\u20d0-\\u20ff",xoe=Doe+Ooe+Moe,Roe="["+xoe+"]",$oe=RegExp(Roe,"g");function Noe(e){return e=Ioe(e),e&&e.replace(Aoe,Eoe).replace($oe,"")}var Foe=Noe,Loe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Hoe(e){return e.match(Loe)||[]}var joe=Hoe,Boe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Uoe(e){return Boe.test(e)}var qoe=Uoe,f$="\\ud800-\\udfff",Woe="\\u0300-\\u036f",Voe="\\ufe20-\\ufe2f",zoe="\\u20d0-\\u20ff",Yoe=Woe+Voe+zoe,c$="\\u2700-\\u27bf",_$="a-z\\xdf-\\xf6\\xf8-\\xff",Goe="\\xac\\xb1\\xd7\\xf7",Koe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xoe="\\u2000-\\u206f",Qoe=" \\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",p$="A-Z\\xc0-\\xd6\\xd8-\\xde",Joe="\\ufe0e\\ufe0f",h$=Goe+Koe+Xoe+Qoe,m$="['’]",_P="["+h$+"]",Zoe="["+Yoe+"]",g$="\\d+",ele="["+c$+"]",v$="["+_$+"]",b$="[^"+f$+h$+g$+c$+_$+p$+"]",tle="\\ud83c[\\udffb-\\udfff]",nle="(?:"+Zoe+"|"+tle+")",ile="[^"+f$+"]",y$="(?:\\ud83c[\\udde6-\\uddff]){2}",w$="[\\ud800-\\udbff][\\udc00-\\udfff]",ip="["+p$+"]",rle="\\u200d",pP="(?:"+v$+"|"+b$+")",ale="(?:"+ip+"|"+b$+")",hP="(?:"+m$+"(?:d|ll|m|re|s|t|ve))?",mP="(?:"+m$+"(?:D|LL|M|RE|S|T|VE))?",T$=nle+"?",k$="["+Joe+"]?",sle="(?:"+rle+"(?:"+[ile,y$,w$].join("|")+")"+k$+T$+")*",ole="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lle="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ule=k$+T$+sle,dle="(?:"+[ele,y$,w$].join("|")+")"+ule,fle=RegExp([ip+"?"+v$+"+"+hP+"(?="+[_P,ip,"$"].join("|")+")",ale+"+"+mP+"(?="+[_P,ip+pP,"$"].join("|")+")",ip+"?"+pP+"+"+hP,ip+"+"+mP,lle,ole,g$,dle].join("|"),"g");function cle(e){return e.match(fle)||[]}var _le=cle,ple=joe,hle=qoe,mle=Lp,gle=_le;function vle(e,t,n){return e=mle(e),t=n?void 0:t,t===void 0?hle(e)?gle(e):ple(e):e.match(t)||[]}var ble=vle,yle=yoe,wle=Foe,Tle=ble,kle="['’]",Sle=RegExp(kle,"g");function Cle(e){return function(t){return yle(Tle(wle(t).replace(Sle,"")),e,"")}}var S$=Cle,Ple=voe,Ele=S$,Ile=Ele(function(e,t,n){return t=t.toLowerCase(),e+(n?Ple(t):t)}),C$=Ile;const Ale=cl(C$);var _b,gP;function Dle(){return gP||(gP=1,_b={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}),_b}var Ole=Sse,Mle=Ole("camelCase",C$,Dle());Mle.placeholder=aR();const pb=ao([]);function vP(e){let t;function n(a,s){return a[3]?Rle:xle}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,s){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},d(a){r.d(a),a&&_e(t)}}}function xle(e){let t,n,i;return{c(){t=P("i"),w(t,"class","fa refresh-button"),wt(t,"loading",e[2])},m(r,a){ce(r,t,a),e[8](t),n||(i=ct(t,"click",XM(w7(e[4]))),n=!0)},p(r,a){a&4&&wt(t,"loading",r[2])},d(r){r&&_e(t),e[8](null),n=!1,i()}}}function Rle(e){let t;return{c(){t=P("i"),w(t,"class","fa refresh-button"),w(t,"disabled",""),wt(t,"loading",e[2])},m(n,i){ce(n,t,i)},p(n,i){i&4&&wt(t,"loading",n[2])},d(n){n&&_e(t)}}}function $le(e){let t,n=e[0]&&vP(e);return{c(){n&&n.c(),t=On()},m(i,r){n&&n.m(i,r),ce(i,t,r)},p(i,[r]){i[0]?n?n.p(i,r):(n=vP(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:ot,o:ot,d(i){n&&n.d(i),i&&_e(t)}}}function P$(e,t){for(const n of e){if(n.id===t)return[n];const i=n.children;if(i){const r=P$(i,t);if(r.length!==0)return r}}return[]}function Nle(e,t,n){let i,r,a,s;Sn(e,vp,b=>n(9,r=b)),Sn(e,pb,b=>n(7,a=b)),Sn(e,wm,b=>n(3,s=b));let{specTreeNodeId:o}=t,{refreshReportParams:l}=t,{refreshType:d="partial"}=t,c;async function v(){const b=P$(r,o),A=dx(I=>[I],b),E=A.flatMap(I=>I.param||[]),y=A.flatMap(I=>[I.id]);pb.set(y);try{await l(E,d)}finally{pb.set([])}}function T(b){Oe[b?"unshift":"push"](()=>{c=b,n(1,c)})}return e.$$set=b=>{"specTreeNodeId"in b&&n(0,o=b.specTreeNodeId),"refreshReportParams"in b&&n(5,l=b.refreshReportParams),"refreshType"in b&&n(6,d=b.refreshType)},e.$$.update=()=>{e.$$.dirty&129&&n(2,i=a.includes(o)),e.$$.dirty&2&&c&&window.$(c).tooltip({title:"Update to Current Value",toggle:"tooltip",placement:"top"})},[o,c,i,s,v,l,d,a,T]}class xd extends Qt{constructor(t){super(),Jt(this,t,Nle,$le,Kt,{specTreeNodeId:0,refreshReportParams:5,refreshType:6})}}function Fle(e){let t,n,i;return{c(){t=P("div"),n=P("i"),w(n,"class","fa fa-circle"),w(t,"class",i="tpp-report-options-pane__not-saved-changes "+(e[0]?"tpp-report-options-pane__not-saved-changes_visible":"")),w(t,"title","This change is not saved yet. Press 'Save' in order to save it."),w(t,"data-toggle","tooltip"),w(t,"data-placement","right")},m(r,a){ce(r,t,a),m(t,n)},p(r,[a]){a&1&&i!==(i="tpp-report-options-pane__not-saved-changes "+(r[0]?"tpp-report-options-pane__not-saved-changes_visible":""))&&w(t,"class",i)},i:ot,o:ot,d(r){r&&_e(t)}}}function Lle(e,t,n){let i,r;Sn(e,sB,s=>n(2,r=s));let{param:a}=t;return e.$$set=s=>{"param"in s&&n(1,a=s.param)},e.$$.update=()=>{e.$$.dirty&6&&n(0,i=r.has(a))},[i,a,r]}class Rd extends Qt{constructor(t){super(),Jt(this,t,Lle,Fle,Kt,{param:1})}}const oy=ao(""),Fl=vo([oy,vp],([e,t])=>{const n=E$(t,e)[0];return{matches:n,isHidden:i=>!n[i.replace(/&quot;/g,'"').replace(/&amp;/g,"&")],matched:Object.values(n).some(i=>!i),noMatch:Object.values(n).every(i=>!i)}});function E$(e,t,n=!1){return e.reduce(([i,r],{title:a,children:s})=>{if(!a)return[i,r];const o=n||a.toUpperCase().includes((t||"").trim().toUpperCase()),[l,d]=Array.isArray(s)?E$(s,t,o):[{},o];return[Gn.mergeWith(i,l,{[a]:d},(c,v)=>c||v),r||d]},[{},n])}const Jw=ao(new Set);function bP(e){let t,n,i,r,a;function s(d,c){if(c&264&&(t=null),t==null&&(t=!!(d[3]&&d[8].has(d[3]))),t)return jle;if(d[3])return Hle}let o=s(e,-1),l=o&&o(e);return{c(){l&&l.c(),n=P("div"),i=P("input"),w(i,"type","checkbox"),w(i,"class","svelte-e0lren"),w(n,"class","report_option__checkbox")},m(d,c){l&&l.m(d,c),ce(d,n,c),m(n,i),i.checked=e[0],r||(a=ct(i,"change",e[14]),r=!0)},p(d,c){o===(o=s(d,c))&&l?l.p(d,c):(l&&l.d(1),l=o&&o(d),l&&(l.c(),l.m(n.parentNode,n))),c&1&&(i.checked=d[0])},d(d){l&&l.d(d),d&&_e(n),r=!1,a()}}}function Hle(e){let t;return{c(){t=P("div"),t.innerHTML='<span class="scroll-to" disabled=""></span>'},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function jle(e){let t,n,i,r;return{c(){t=P("div"),n=P("span"),w(n,"class","scroll-to")},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(n,"click",e[10]),i=!0)},p:ot,d(a){a&&_e(t),i=!1,r()}}}function yP(e){let t,n;return t=new xd({props:{refreshReportParams:e[4],specTreeNodeId:e[5]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.refreshReportParams=i[4]),r&32&&(a.specTreeNodeId=i[5]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Ble(e){let t,n,i=!Xn.isNil(e[0]),r,a,s=e[6].title+"",o,l,d,c,v,T,b,A,E,y=i&&bP(e);l=new Rd({props:{param:e[5]}});let I=e[6].updatable&&yP(e);const D=e[13].default,O=fu(D,e,e[12],null);return{c(){t=P("div"),n=P("div"),y&&y.c(),r=P("a"),a=P("h3"),o=Le(s),re(l.$$.fragment),I&&I.c(),T=P("div"),b=P("div"),O&&O.c(),w(a,"class","card-title report_option__header mb-0"),w(r,"class",d="report_option__dropdown "+e[2]+" svelte-e0lren"),w(r,"role","button"),w(r,"data-toggle","collapse"),w(r,"data-parent","#accordion"),w(r,"href",c="#"+e[7]),w(r,"aria-expanded",v=!!e[9].matched),wt(r,"collapsed",!e[9].matched),w(n,"class","card-header report_option svelte-e0lren"),w(n,"role","tab"),w(b,"class","card-body svelte-e0lren"),w(T,"class","panel-collapse collapse"),w(T,"id",e[7]),w(T,"role","tabpanel"),w(T,"aria-expanded",A=!!e[9].matched),wt(T,"show",e[9].matched),t.hidden=e[1]},m(M,F){ce(M,t,F),m(t,n),y&&y.m(n,null),m(n,r),m(r,a),m(a,o),ae(l,r,null),I&&I.m(r,null),m(t,T),m(T,b),O&&O.m(b,null),E=!0},p(M,[F]){F&1&&(i=!Xn.isNil(M[0])),i?y?y.p(M,F):(y=bP(M),y.c(),y.m(n,r)):y&&(y.d(1),y=null),(!E||F&64)&&s!==(s=M[6].title+"")&&vt(o,s);const $={};F&32&&($.param=M[5]),l.$set($),M[6].updatable?I?(I.p(M,F),F&64&&U(I,1)):(I=yP(M),I.c(),U(I,1),I.m(r,null)):I&&(pn(),W(I,1,1,()=>{I=null}),hn()),(!E||F&4&&d!==(d="report_option__dropdown "+M[2]+" svelte-e0lren"))&&w(r,"class",d),(!E||F&128&&c!==(c="#"+M[7]))&&w(r,"href",c),(!E||F&512&&v!==(v=!!M[9].matched))&&w(r,"aria-expanded",v),(!E||F&516)&&wt(r,"collapsed",!M[9].matched),O&&O.p&&(!E||F&4096)&&cu(O,D,M,M[12],E?pu(D,M[12],F,null):_u(M[12]),null),(!E||F&128)&&w(T,"id",M[7]),(!E||F&512&&A!==(A=!!M[9].matched))&&w(T,"aria-expanded",A),(!E||F&512)&&wt(T,"show",M[9].matched),(!E||F&2)&&(t.hidden=M[1])},i(M){E||(U(l.$$.fragment,M),U(I),U(O,M),E=!0)},o(M){W(l.$$.fragment,M),W(I),W(O,M),E=!1},d(M){M&&_e(t),y&&y.d(),se(l),I&&I.d(),O&&O.d(M)}}}function Ule(e,t,n){let i,r,a,s,o;Sn(e,Dd,D=>n(11,a=D)),Sn(e,Jw,D=>n(8,s=D)),Sn(e,Fl,D=>n(9,o=D));let{$$slots:l={},$$scope:d}=t,{hidden:c}=t,{checked:v}=t,{classNames:T=""}=t,{scrollToId:b}=t,{refreshReportParams:A}=t,{specTreeNodeId:E}=t;function y(){document.getElementById(b).scrollIntoView({behavior:"smooth"})}function I(){v=this.checked,n(0,v)}return e.$$set=D=>{"hidden"in D&&n(1,c=D.hidden),"checked"in D&&n(0,v=D.checked),"classNames"in D&&n(2,T=D.classNames),"scrollToId"in D&&n(3,b=D.scrollToId),"refreshReportParams"in D&&n(4,A=D.refreshReportParams),"specTreeNodeId"in D&&n(5,E=D.specTreeNodeId),"$$scope"in D&&n(12,d=D.$$scope)},e.$$.update=()=>{e.$$.dirty&2080&&n(6,i=a&&E&&a[E]),e.$$.dirty&96&&n(7,r=i&&E)},[v,c,T,b,A,E,i,r,s,o,y,a,d,l,I]}class Ci extends Qt{constructor(t){super(),Jt(this,t,Ule,Ble,Kt,{hidden:1,checked:0,classNames:2,scrollToId:3,refreshReportParams:4,specTreeNodeId:5})}}function wP(e,t,n){const i=e.slice();return i[10]=t[n][0],i[0]=t[n][1],i}function TP(e){let t,n;return t=new xd({props:{refreshReportParams:e[4],specTreeNodeId:e[3]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.refreshReportParams=i[4]),r&8&&(a.specTreeNodeId=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function kP(e){let t,n=e[0]+"",i,r;return{c(){t=P("option"),i=Le(n),t.__value=r=e[10],t.value=t.__value},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s&4&&n!==(n=a[0]+"")&&vt(i,n),s&4&&r!==(r=a[10])&&(t.__value=r,t.value=t.__value)},d(a){a&&_e(t)}}}function qle(e){let t,n,i,r,a,s=e[6].title+"",o,l,d,c,v,T;l=new Rd({props:{param:e[3]}});let b=e[6].updatable&&TP(e),A=Object.entries(e[2]),E=[];for(let y=0;y<A.length;y+=1)E[y]=kP(wP(e,A,y));return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),b&&b.c(),d=P("select");for(let y=0;y<E.length;y+=1)E[y].c();w(a,"class","report_option__title"),w(a,"for",e[7]),w(r,"class","report_option"),w(d,"class","form-control"),w(d,"id",e[7]),d.disabled=e[5],e[0]===void 0&&xa(()=>e[9].call(d)),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),b&&b.m(r,null),m(i,d);for(let D=0;D<E.length;D+=1)E[D]&&E[D].m(d,null);Es(d,e[0],!0),c=!0,v||(T=ct(d,"change",e[9]),v=!0)},p(y,[I]){(!c||I&64)&&s!==(s=y[6].title+"")&&vt(o,s);const D={};if(I&8&&(D.param=y[3]),l.$set(D),y[6].updatable?b?(b.p(y,I),I&64&&U(b,1)):(b=TP(y),b.c(),U(b,1),b.m(r,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn()),I&4){A=Object.entries(y[2]);let O;for(O=0;O<A.length;O+=1){const M=wP(y,A,O);E[O]?E[O].p(M,I):(E[O]=kP(M),E[O].c(),E[O].m(d,null))}for(;O<E.length;O+=1)E[O].d(1);E.length=A.length}(!c||I&32)&&(d.disabled=y[5]),I&5&&Es(d,y[0]),(!c||I&2)&&(t.hidden=y[1])},i(y){c||(U(l.$$.fragment,y),U(b),c=!0)},o(y){W(l.$$.fragment,y),W(b),c=!1},d(y){y&&_e(t),se(l),b&&b.d(),Nn(E,y),v=!1,T()}}}function Wle(e,t,n){let i,r;Sn(e,Dd,b=>n(8,r=b));let{value:a}=t,{hidden:s}=t,{options:o}=t,{specTreeNodeId:l}=t,{refreshReportParams:d}=t,{isDisabled:c=!1}=t;const v=Math.random().toString(16).substr(2,8);function T(){a=Cd(this),n(0,a),n(2,o)}return e.$$set=b=>{"value"in b&&n(0,a=b.value),"hidden"in b&&n(1,s=b.hidden),"options"in b&&n(2,o=b.options),"specTreeNodeId"in b&&n(3,l=b.specTreeNodeId),"refreshReportParams"in b&&n(4,d=b.refreshReportParams),"isDisabled"in b&&n(5,c=b.isDisabled)},e.$$.update=()=>{e.$$.dirty&264&&n(6,i=r&&l&&r[l])},[a,s,o,l,d,c,i,v,r,T]}let Ml=class extends Qt{constructor(t){super(),Jt(this,t,Wle,qle,Kt,{value:0,hidden:1,options:2,specTreeNodeId:3,refreshReportParams:4,isDisabled:5})}};function SP(e){let t,n,i;return{c(){t=P("i"),w(t,"class","fa restore-button")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",XM(e[2])),n=!0)},p:ot,d(r){r&&_e(t),n=!1,i()}}}function Vle(e){let t,n=e[0]!==e[1]&&SP(e);return{c(){n&&n.c(),t=On()},m(i,r){n&&n.m(i,r),ce(i,t,r)},p(i,[r]){i[0]!==i[1]?n?n.p(i,r):(n=SP(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:ot,o:ot,d(i){n&&n.d(i),i&&_e(t)}}}function zle(e,t,n){let{value:i}=t,{defaultValue:r}=t;const a=()=>{n(0,i=r)};return e.$$set=s=>{"value"in s&&n(0,i=s.value),"defaultValue"in s&&n(1,r=s.defaultValue)},[i,r,a]}class Yle extends Qt{constructor(t){super(),Jt(this,t,zle,Vle,Kt,{value:0,defaultValue:1})}}var Gle={grad:.9,turn:360,rad:360/(2*Math.PI)},ef=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ro=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},su=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},I$=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},CP=function(e){return{r:su(e.r,0,255),g:su(e.g,0,255),b:su(e.b,0,255),a:su(e.a)}},hb=function(e){return{r:ro(e.r),g:ro(e.g),b:ro(e.b),a:ro(e.a,3)}},Kle=/^#([0-9a-f]{3,8})$/i,Vg=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},A$=function(e){var t=e.r,n=e.g,i=e.b,r=e.a,a=Math.max(t,n,i),s=a-Math.min(t,n,i),o=s?a===t?(n-i)/s:a===n?2+(i-t)/s:4+(t-n)/s:0;return{h:60*(o<0?o+6:o),s:a?s/a*100:0,v:a/255*100,a:r}},D$=function(e){var t=e.h,n=e.s,i=e.v,r=e.a;t=t/360*6,n/=100,i/=100;var a=Math.floor(t),s=i*(1-n),o=i*(1-(t-a)*n),l=i*(1-(1-t+a)*n),d=a%6;return{r:255*[i,o,s,s,l,i][d],g:255*[l,i,i,o,s,s][d],b:255*[s,s,l,i,i,o][d],a:r}},PP=function(e){return{h:I$(e.h),s:su(e.s,0,100),l:su(e.l,0,100),a:su(e.a)}},EP=function(e){return{h:ro(e.h),s:ro(e.s),l:ro(e.l),a:ro(e.a,3)}},IP=function(e){return D$((n=(t=e).s,{h:t.h,s:(n*=((i=t.l)<50?i:100-i)/100)>0?2*n/(i+n)*100:0,v:i+n,a:t.a}));var t,n,i},Yh=function(e){return{h:(t=A$(e)).h,s:(r=(200-(n=t.s))*(i=t.v)/100)>0&&r<200?n*i/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,i,r},Xle=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qle=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Jle=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zle=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ly={string:[[function(e){var t=Kle.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ro(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?ro(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Jle.exec(e)||Zle.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:CP({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Xle.exec(e)||Qle.exec(e);if(!t)return null;var n,i,r=PP({h:(n=t[1],i=t[2],i===void 0&&(i="deg"),Number(n)*(Gle[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return IP(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,i=e.b,r=e.a,a=r===void 0?1:r;return ef(t)&&ef(n)&&ef(i)?CP({r:Number(t),g:Number(n),b:Number(i),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,i=e.l,r=e.a,a=r===void 0?1:r;if(!ef(t)||!ef(n)||!ef(i))return null;var s=PP({h:Number(t),s:Number(n),l:Number(i),a:Number(a)});return IP(s)},"hsl"],[function(e){var t=e.h,n=e.s,i=e.v,r=e.a,a=r===void 0?1:r;if(!ef(t)||!ef(n)||!ef(i))return null;var s=function(o){return{h:I$(o.h),s:su(o.s,0,100),v:su(o.v,0,100),a:su(o.a)}}({h:Number(t),s:Number(n),v:Number(i),a:Number(a)});return D$(s)},"hsv"]]},AP=function(e,t){for(var n=0;n<t.length;n++){var i=t[n][0](e);if(i)return[i,t[n][1]]}return[null,void 0]},eue=function(e){return typeof e=="string"?AP(e.trim(),ly.string):typeof e=="object"&&e!==null?AP(e,ly.object):[null,void 0]},mb=function(e,t){var n=Yh(e);return{h:n.h,s:su(n.s+100*t,0,100),l:n.l,a:n.a}},gb=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},DP=function(e,t){var n=Yh(e);return{h:n.h,s:n.s,l:su(n.l+100*t,0,100),a:n.a}},uy=function(){function e(t){this.parsed=eue(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return ro(gb(this.rgba),2)},e.prototype.isDark=function(){return gb(this.rgba)<.5},e.prototype.isLight=function(){return gb(this.rgba)>=.5},e.prototype.toHex=function(){return t=hb(this.rgba),n=t.r,i=t.g,r=t.b,s=(a=t.a)<1?Vg(ro(255*a)):"","#"+Vg(n)+Vg(i)+Vg(r)+s;var t,n,i,r,a,s},e.prototype.toRgb=function(){return hb(this.rgba)},e.prototype.toRgbString=function(){return t=hb(this.rgba),n=t.r,i=t.g,r=t.b,(a=t.a)<1?"rgba("+n+", "+i+", "+r+", "+a+")":"rgb("+n+", "+i+", "+r+")";var t,n,i,r,a},e.prototype.toHsl=function(){return EP(Yh(this.rgba))},e.prototype.toHslString=function(){return t=EP(Yh(this.rgba)),n=t.h,i=t.s,r=t.l,(a=t.a)<1?"hsla("+n+", "+i+"%, "+r+"%, "+a+")":"hsl("+n+", "+i+"%, "+r+"%)";var t,n,i,r,a},e.prototype.toHsv=function(){return t=A$(this.rgba),{h:ro(t.h),s:ro(t.s),v:ro(t.v),a:ro(t.a,3)};var t},e.prototype.invert=function(){return Vo({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Vo(mb(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Vo(mb(this.rgba,-t))},e.prototype.grayscale=function(){return Vo(mb(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Vo(DP(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Vo(DP(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Vo({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):ro(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Yh(this.rgba);return typeof t=="number"?Vo({h:t,s:n.s,l:n.l,a:n.a}):ro(n.h)},e.prototype.isEqual=function(t){return this.toHex()===Vo(t).toHex()},e}(),Vo=function(e){return e instanceof uy?e:new uy(e)},OP=[],tue=function(e){e.forEach(function(t){OP.indexOf(t)<0&&(t(uy,ly),OP.push(t))})},vb=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},bb=function(e){return .2126*vb(e.r)+.7152*vb(e.g)+.0722*vb(e.b)};function nue(e){e.prototype.luminance=function(){return t=bb(this.rgba),(n=2)===void 0&&(n=0),i===void 0&&(i=Math.pow(10,n)),Math.round(i*t)/i+0;var t,n,i},e.prototype.contrast=function(t){t===void 0&&(t="#FFF");var n,i,r,a,s,o,l,d=t instanceof e?t:new e(t);return a=this.rgba,s=d.toRgb(),o=bb(a),l=bb(s),n=o>l?(o+.05)/(l+.05):(l+.05)/(o+.05),(i=2)===void 0&&(i=0),r===void 0&&(r=Math.pow(10,i)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(t,n){return t===void 0&&(t="#FFF"),n===void 0&&(n={}),this.contrast(t)>=(o=(s=(i=n).size)===void 0?"normal":s,(a=(r=i.level)===void 0?"AA":r)==="AAA"&&o==="normal"?7:a==="AA"&&o==="large"?3:4.5);var i,r,a,s,o}}const nf=ao({ArrowLeft:0,ArrowUp:0,ArrowRight:0,ArrowDown:0}),Zw=vo(nf,e=>({...e,ArrowV:e.ArrowUp+e.ArrowDown,ArrowH:e.ArrowLeft+e.ArrowRight,ArrowVH:e.ArrowUp+e.ArrowDown+e.ArrowLeft+e.ArrowRight}));function e2(e,t=.001,n=.01){const a=Math.min(1,Math.max(1,e-50)/50);return t+(n-t)/2*(1-Math.cos(Math.PI*a))}const{window:Oh}=bm;function iue(e){let t,n,i,r,a,s;var o=e[2].pickerIndicator;function l(d){return{props:{pos:d[9],isDark:d[5],hex:Vo({h:d[3],s:d[0],v:d[1],a:1}).toHex()}}}return o&&(n=ha(o,l(e))),{c(){t=P("div"),n&&re(n.$$.fragment),w(t,"class","picker svelte-g98o25"),w(t,"tabindex","0"),cr(t,"--color-bg",e[8]),w(t,"aria-label","saturation and brightness picker (arrow keyboard navigation)"),w(t,"aria-valuemin",0),w(t,"aria-valuemax",100),w(t,"aria-valuetext",i="saturation "+(e[9].x?e[9].x.toFixed():null)+"%, brightness "+(e[9].y?e[9].y.toFixed():null)+"%")},m(d,c){ce(d,t,c),n&&ae(n,t,null),e[18](t),r=!0,a||(s=[ct(t,"mousedown",Hi(e[10])),ct(t,"touchstart",e[16]),ct(t,"touchmove",Hi(e[16])),ct(t,"touchend",e[16])],a=!0)},p(d,c){const v={};if(c&512&&(v.pos=d[9]),c&32&&(v.isDark=d[5]),c&11&&(v.hex=Vo({h:d[3],s:d[0],v:d[1],a:1}).toHex()),c&4&&o!==(o=d[2].pickerIndicator)){if(n){pn();const T=n;W(T.$$.fragment,1,0,()=>{se(T,1)}),hn()}o?(n=ha(o,l(d)),re(n.$$.fragment),U(n.$$.fragment,1),ae(n,t,null)):n=null}else o&&n.$set(v);(!r||c&256)&&cr(t,"--color-bg",d[8]),(!r||c&512&&i!==(i="saturation "+(d[9].x?d[9].x.toFixed():null)+"%, brightness "+(d[9].y?d[9].y.toFixed():null)+"%"))&&w(t,"aria-valuetext",i)},i(d){r||(n&&U(n.$$.fragment,d),r=!0)},o(d){n&&W(n.$$.fragment,d),r=!1},d(d){d&&_e(t),n&&se(n),e[18](null),a=!1,vi(s)}}}function rue(e){let t,n,i,r,a;var s=e[2].pickerWrapper;function o(l){return{props:{focused:l[7],toRight:l[4],$$slots:{default:[iue]},$$scope:{ctx:l}}}}return s&&(t=ha(s,o(e))),{c(){t&&re(t.$$.fragment),n=On()},m(l,d){t&&ae(t,l,d),ce(l,n,d),i=!0,r||(a=[ct(Oh,"mouseup",e[11]),ct(Oh,"mousedown",e[13]),ct(Oh,"mousemove",e[12]),ct(Oh,"keyup",e[14]),ct(Oh,"keydown",e[15])],r=!0)},p(l,[d]){const c={};if(d&128&&(c.focused=l[7]),d&16&&(c.toRight=l[4]),d&67109743&&(c.$$scope={dirty:d,ctx:l}),d&4&&s!==(s=l[2].pickerWrapper)){if(t){pn();const v=t;W(v.$$.fragment,1,0,()=>{se(v,1)}),hn()}s?(t=ha(s,o(l)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else s&&t.$set(c)},i(l){i||(t&&U(t.$$.fragment,l),i=!0)},o(l){t&&W(t.$$.fragment,l),i=!1},d(l){l&&_e(n),t&&se(t,l),r=!1,vi(a)}}}function MP(e,t,n){return Math.min(Math.max(t,e),n)}function aue(e,t,n){let i,r;Sn(e,nf,te=>n(22,i=te)),Sn(e,Zw,te=>n(23,r=te));let{components:a}=t,{h:s}=t,{s:o}=t,{v:l}=t,{isOpen:d}=t,{toRight:c}=t,{isDark:v}=t,T,b=!1,A=!1,E,y,I,D={x:100,y:0};function O(te){let ne={x:te.offsetX,y:te.offsetY},be=T.getBoundingClientRect().width,ue=T.getBoundingClientRect().height;n(0,o=MP(ne.x/be,0,1)*100),n(1,l=MP((ue-ne.y)/ue,0,1)*100)}function M(te){te.button===0&&(b=!0,O(te))}function F(){b=!1}function $(te){b&&O({offsetX:Math.max(0,Math.min(T.getBoundingClientRect().width,te.clientX-T.getBoundingClientRect().left)),offsetY:Math.max(0,Math.min(T.getBoundingClientRect().height,te.clientY-T.getBoundingClientRect().top))})}function L(te){te.target.isSameNode(T)||n(7,A=!1)}function j(te){te.key==="Tab"&&n(7,A=!!(document.activeElement&&document.activeElement.isSameNode(T))),!te.repeat&&A&&V()}function H(te){A&&r.ArrowVH&&(te.preventDefault(),te.repeat||V())}function V(){r.ArrowVH?E||(y=0,E=window.setInterval(()=>{let te=e2(++y);n(0,o=Math.min(100,Math.max(0,o+(i.ArrowRight-i.ArrowLeft)*te*100))),n(1,l=Math.min(100,Math.max(0,l+(i.ArrowUp-i.ArrowDown)*te*100)))},10)):E&&(clearInterval(E),E=void 0)}function Q(te){te.preventDefault(),O({offsetX:te.changedTouches[0].clientX-T.getBoundingClientRect().left,offsetY:te.changedTouches[0].clientY-T.getBoundingClientRect().top})}function X(te){Oe[te?"unshift":"push"](()=>{T=te,n(6,T)})}return e.$$set=te=>{"components"in te&&n(2,a=te.components),"h"in te&&n(3,s=te.h),"s"in te&&n(0,o=te.s),"v"in te&&n(1,l=te.v),"isOpen"in te&&n(17,d=te.isOpen),"toRight"in te&&n(4,c=te.toRight),"isDark"in te&&n(5,v=te.isDark)},e.$$.update=()=>{e.$$.dirty&8&&typeof s=="number"&&n(8,I=Vo({h:s,s:100,v:100,a:1}).toHex()),e.$$.dirty&67&&typeof o=="number"&&typeof l=="number"&&T&&n(9,D={x:o,y:100-l})},[o,l,a,s,c,v,T,A,I,D,M,F,$,L,j,H,Q,d,X]}class sue extends Qt{constructor(t){super(),Jt(this,t,aue,rue,Kt,{components:2,h:3,s:0,v:1,isOpen:17,toRight:4,isDark:5})}}const{window:zg}=bm;function oue(e){let t,n,i,r,a,s;var o=e[1].sliderIndicator;function l(d){return{props:{pos:d[4],toRight:d[2]}}}return o&&(n=ha(o,l(e))),{c(){t=P("div"),n&&re(n.$$.fragment),w(t,"class","slider svelte-7lysd0"),w(t,"tabindex","0"),w(t,"aria-label","hue picker (arrow keyboard navigation)"),w(t,"aria-valuemin",0),w(t,"aria-valuemax",360),w(t,"aria-valuenow",i=Math.round(e[0])),wt(t,"to-right",e[2])},m(d,c){ce(d,t,c),n&&ae(n,t,null),e[12](t),r=!0,a||(s=[ct(t,"mousedown",Hi(e[6])),ct(t,"touchstart",e[11]),ct(t,"touchmove",Hi(e[11])),ct(t,"touchend",e[11])],a=!0)},p(d,c){const v={};if(c&16&&(v.pos=d[4]),c&4&&(v.toRight=d[2]),c&2&&o!==(o=d[1].sliderIndicator)){if(n){pn();const T=n;W(T.$$.fragment,1,0,()=>{se(T,1)}),hn()}o?(n=ha(o,l(d)),re(n.$$.fragment),U(n.$$.fragment,1),ae(n,t,null)):n=null}else o&&n.$set(v);(!r||c&1&&i!==(i=Math.round(d[0])))&&w(t,"aria-valuenow",i),(!r||c&4)&&wt(t,"to-right",d[2])},i(d){r||(n&&U(n.$$.fragment,d),r=!0)},o(d){n&&W(n.$$.fragment,d),r=!1},d(d){d&&_e(t),n&&se(n),e[12](null),a=!1,vi(s)}}}function lue(e){let t,n,i,r,a;var s=e[1].sliderWrapper;function o(l){return{props:{focused:l[5],toRight:l[2],$$slots:{default:[oue]},$$scope:{ctx:l}}}}return s&&(t=ha(s,o(e))),{c(){t&&re(t.$$.fragment),n=On()},m(l,d){t&&ae(t,l,d),ce(l,n,d),i=!0,r||(a=[ct(zg,"mouseup",e[7]),ct(zg,"mousemove",e[8]),ct(zg,"keyup",e[9]),ct(zg,"keydown",e[10])],r=!0)},p(l,[d]){const c={};if(d&32&&(c.focused=l[5]),d&4&&(c.toRight=l[2]),d&1048607&&(c.$$scope={dirty:d,ctx:l}),d&2&&s!==(s=l[1].sliderWrapper)){if(t){pn();const v=t;W(v.$$.fragment,1,0,()=>{se(v,1)}),hn()}s?(t=ha(s,o(l)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else s&&t.$set(c)},i(l){i||(t&&U(t.$$.fragment,l),i=!0)},o(l){t&&W(t.$$.fragment,l),i=!1},d(l){l&&_e(n),t&&se(t,l),r=!1,vi(a)}}}function uue(e,t,n){let i,r;Sn(e,nf,L=>n(16,i=L)),Sn(e,Zw,L=>n(17,r=L));let{components:a}=t,{toRight:s}=t,o,l=!1,{h:d}=t,c=0,v=!1,T,b;function A(L){const j=s?o.getBoundingClientRect().width:o.getBoundingClientRect().height,H=Math.max(0,Math.min(j,L));n(0,d=H/j*360)}function E(L){L.button===0&&(l=!0,A(s?L.offsetX:L.offsetY))}function y(){l=!1}function I(L){l&&A(s?L.clientX-o.getBoundingClientRect().left:L.clientY-o.getBoundingClientRect().top)}function D(L){L.key==="Tab"&&n(5,v=!!(document.activeElement&&document.activeElement.isSameNode(o))),!L.repeat&&v&&M()}function O(L){v&&r.ArrowVH&&(L.preventDefault(),L.repeat||M())}function M(){r.ArrowVH?T||(b=0,T=window.setInterval(()=>{const L=e2(++b),j=s?i.ArrowRight-i.ArrowLeft:i.ArrowDown-i.ArrowUp;n(0,d=Math.min(360,Math.max(0,d+j*360*L)))},10)):T&&(clearInterval(T),T=void 0)}function F(L){L.preventDefault(),A(s?L.changedTouches[0].clientX-o.getBoundingClientRect().left:L.changedTouches[0].clientY-o.getBoundingClientRect().top)}function $(L){Oe[L?"unshift":"push"](()=>{o=L,n(3,o)})}return e.$$set=L=>{"components"in L&&n(1,a=L.components),"toRight"in L&&n(2,s=L.toRight),"h"in L&&n(0,d=L.h)},e.$$.update=()=>{e.$$.dirty&9&&typeof d=="number"&&o&&n(4,c=100*d/360)},[d,a,s,o,c,v,E,y,I,D,O,F,$]}class due extends Qt{constructor(t){super(),Jt(this,t,uue,lue,Kt,{components:1,toRight:2,h:0})}}const{window:Yg}=bm;function fue(e){let t,n,i,r,a,s,o;var l=e[0].alphaIndicator;function d(c){return{props:{pos:c[5],toRight:c[2]}}}return l&&(n=ha(l,d(e))),{c(){t=P("div"),n&&re(n.$$.fragment),w(t,"class","alpha svelte-1du8b4n"),w(t,"tabindex","0"),cr(t,"--alpha-color",e[1]?e[1].substring(0,7):null),w(t,"aria-label","transparency picker (arrow keyboard navigation)"),w(t,"aria-valuemin",0),w(t,"aria-valuemax",100),w(t,"aria-valuenow",i=Math.round(e[5])),w(t,"aria-valuetext",r=(e[5]?e[5].toFixed():null)+"%"),wt(t,"to-right",e[2])},m(c,v){ce(c,t,v),n&&ae(n,t,null),e[14](t),a=!0,s||(o=[ct(t,"mousedown",Hi(e[6])),ct(t,"touchstart",e[11]),ct(t,"touchmove",Hi(e[11])),ct(t,"touchend",e[11])],s=!0)},p(c,v){const T={};if(v&32&&(T.pos=c[5]),v&4&&(T.toRight=c[2]),v&1&&l!==(l=c[0].alphaIndicator)){if(n){pn();const b=n;W(b.$$.fragment,1,0,()=>{se(b,1)}),hn()}l?(n=ha(l,d(c)),re(n.$$.fragment),U(n.$$.fragment,1),ae(n,t,null)):n=null}else l&&n.$set(T);(!a||v&2)&&cr(t,"--alpha-color",c[1]?c[1].substring(0,7):null),(!a||v&32&&i!==(i=Math.round(c[5])))&&w(t,"aria-valuenow",i),(!a||v&32&&r!==(r=(c[5]?c[5].toFixed():null)+"%"))&&w(t,"aria-valuetext",r),(!a||v&4)&&wt(t,"to-right",c[2])},i(c){a||(n&&U(n.$$.fragment,c),a=!0)},o(c){n&&W(n.$$.fragment,c),a=!1},d(c){c&&_e(t),n&&se(n),e[14](null),s=!1,vi(o)}}}function cue(e){let t,n,i,r,a;var s=e[0].alphaWrapper;function o(l){return{props:{focused:l[4],toRight:l[2],$$slots:{default:[fue]},$$scope:{ctx:l}}}}return s&&(t=ha(s,o(e))),{c(){t&&re(t.$$.fragment),n=On()},m(l,d){t&&ae(t,l,d),ce(l,n,d),i=!0,r||(a=[ct(Yg,"mouseup",e[7]),ct(Yg,"mousemove",e[8]),ct(Yg,"keyup",e[9]),ct(Yg,"keydown",e[10])],r=!0)},p(l,[d]){const c={};if(d&16&&(c.focused=l[4]),d&4&&(c.toRight=l[2]),d&4194351&&(c.$$scope={dirty:d,ctx:l}),d&1&&s!==(s=l[0].alphaWrapper)){if(t){pn();const v=t;W(v.$$.fragment,1,0,()=>{se(v,1)}),hn()}s?(t=ha(s,o(l)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else s&&t.$set(c)},i(l){i||(t&&U(t.$$.fragment,l),i=!0)},o(l){t&&W(t.$$.fragment,l),i=!1},d(l){l&&_e(n),t&&se(t,l),r=!1,vi(a)}}}function _ue(e,t,n){let i,r;Sn(e,nf,H=>n(18,i=H)),Sn(e,Zw,H=>n(19,r=H));let{components:a}=t,{isOpen:s}=t,{a:o=1}=t,{hex:l}=t,{toRight:d}=t,c,v=!1,T=!1,b,A,E;function y(H){const V=d?c.getBoundingClientRect().width:c.getBoundingClientRect().height,Q=Math.max(0,Math.min(V,H));n(12,o=Q/V)}function I(H){H.button===0&&(v=!0,y(d?H.offsetX:H.offsetY))}function D(){v=!1}function O(H){v&&y(d?H.clientX-c.getBoundingClientRect().left:H.clientY-c.getBoundingClientRect().top)}function M(H){H.key==="Tab"&&n(4,T=!!(document.activeElement&&document.activeElement.isSameNode(c))),!H.repeat&&T&&$()}function F(H){T&&r.ArrowVH&&(H.preventDefault(),H.repeat||$())}function $(){r.ArrowVH?b||(A=0,b=window.setInterval(()=>{const H=e2(++A),V=d?i.ArrowRight-i.ArrowLeft:i.ArrowDown-i.ArrowUp;n(12,o=Math.min(1,Math.max(0,o+V*H)))},10)):b&&(clearInterval(b),b=void 0)}function L(H){H.preventDefault(),y(d?H.changedTouches[0].clientX-c.getBoundingClientRect().left:H.changedTouches[0].clientY-c.getBoundingClientRect().top)}function j(H){Oe[H?"unshift":"push"](()=>{c=H,n(3,c)})}return e.$$set=H=>{"components"in H&&n(0,a=H.components),"isOpen"in H&&n(13,s=H.isOpen),"a"in H&&n(12,o=H.a),"hex"in H&&n(1,l=H.hex),"toRight"in H&&n(2,d=H.toRight)},e.$$.update=()=>{e.$$.dirty&4104&&typeof o=="number"&&c&&n(5,E=100*o)},[a,l,d,c,T,E,I,D,O,M,F,L,o,s,j]}class pue extends Qt{constructor(t){super(),Jt(this,t,_ue,cue,Kt,{components:0,isOpen:13,a:12,hex:1,toRight:2})}}function hue(e){let t,n,i,r,a,s,o,l,d,c=e[2]&&xP(e);return{c(){t=P("div"),n=P("input"),i=K(),r=P("input"),a=K(),s=P("input"),o=K(),c&&c.c(),w(n,"aria-label","hue chanel color"),n.value=e[8],w(n,"type","number"),w(n,"min","0"),w(n,"max","360"),w(n,"class","svelte-m0nu03"),w(r,"aria-label","saturation chanel color"),r.value=e[7],w(r,"type","number"),w(r,"min","0"),w(r,"max","100"),w(r,"class","svelte-m0nu03"),w(s,"aria-label","brightness chanel color"),s.value=e[6],w(s,"type","number"),w(s,"min","0"),w(s,"max","100"),w(s,"class","svelte-m0nu03"),w(t,"class","input-container svelte-m0nu03")},m(v,T){ce(v,t,T),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(t,o),c&&c.m(t,null),l||(d=[ct(n,"input",e[12]("h")),ct(r,"input",e[12]("s")),ct(s,"input",e[12]("v"))],l=!0)},p(v,T){T&256&&n.value!==v[8]&&(n.value=v[8]),T&128&&r.value!==v[7]&&(r.value=v[7]),T&64&&s.value!==v[6]&&(s.value=v[6]),v[2]?c?c.p(v,T):(c=xP(v),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},d(v){v&&_e(t),c&&c.d(),l=!1,vi(d)}}}function mue(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=e[2]&&RP(e);return{c(){t=P("div"),n=P("input"),r=K(),a=P("input"),o=K(),l=P("input"),c=K(),b&&b.c(),w(n,"aria-label","red chanel color"),n.value=i=e[0].r,w(n,"type","number"),w(n,"min","0"),w(n,"max","255"),w(n,"class","svelte-m0nu03"),w(a,"aria-label","green chanel color"),a.value=s=e[0].g,w(a,"type","number"),w(a,"min","0"),w(a,"max","255"),w(a,"class","svelte-m0nu03"),w(l,"aria-label","blue chanel color"),l.value=d=e[0].b,w(l,"type","number"),w(l,"min","0"),w(l,"max","255"),w(l,"class","svelte-m0nu03"),w(t,"class","input-container svelte-m0nu03")},m(A,E){ce(A,t,E),m(t,n),m(t,r),m(t,a),m(t,o),m(t,l),m(t,c),b&&b.m(t,null),v||(T=[ct(n,"input",e[11]("r")),ct(a,"input",e[11]("g")),ct(l,"input",e[11]("b"))],v=!0)},p(A,E){E&1&&i!==(i=A[0].r)&&n.value!==i&&(n.value=i),E&1&&s!==(s=A[0].g)&&a.value!==s&&(a.value=s),E&1&&d!==(d=A[0].b)&&l.value!==d&&(l.value=d),A[2]?b?b.p(A,E):(b=RP(A),b.c(),b.m(t,null)):b&&(b.d(1),b=null)},d(A){A&&_e(t),b&&b.d(),v=!1,vi(T)}}}function gue(e){let t,n,i,r,a,s=e[2]&&$P(e);return{c(){t=P("div"),n=P("input"),i=K(),s&&s.c(),n.value=e[1],cr(n,"flex","3"),w(n,"class","svelte-m0nu03"),w(t,"class","input-container svelte-m0nu03")},m(o,l){ce(o,t,l),m(t,n),m(t,i),s&&s.m(t,null),r||(a=ct(n,"input",e[10]),r=!0)},p(o,l){l&2&&n.value!==o[1]&&(n.value=o[1]),o[2]?s?s.p(o,l):(s=$P(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},d(o){o&&_e(t),s&&s.d(),r=!1,a()}}}function xP(e){let t,n,i;return{c(){t=P("input"),w(t,"aria-label","transparency chanel color"),t.value=e[5],w(t,"type","number"),w(t,"min","0"),w(t,"max","1"),w(t,"step","0.01"),w(t,"class","svelte-m0nu03")},m(r,a){ce(r,t,a),n||(i=ct(t,"input",e[12]("a")),n=!0)},p(r,a){a&32&&t.value!==r[5]&&(t.value=r[5])},d(r){r&&_e(t),n=!1,i()}}}function RP(e){let t,n,i;return{c(){t=P("input"),w(t,"aria-label","transparency chanel color"),t.value=e[5],w(t,"type","number"),w(t,"min","0"),w(t,"max","1"),w(t,"step","0.01"),w(t,"class","svelte-m0nu03")},m(r,a){ce(r,t,a),n||(i=ct(t,"input",e[11]("a")),n=!0)},p(r,a){a&32&&t.value!==r[5]&&(t.value=r[5])},d(r){r&&_e(t),n=!1,i()}}}function $P(e){let t,n,i;return{c(){t=P("input"),w(t,"aria-label","hexadecimal color"),t.value=e[5],w(t,"type","number"),w(t,"min","0"),w(t,"max","1"),w(t,"step","0.01"),w(t,"class","svelte-m0nu03")},m(r,a){ce(r,t,a),n||(i=ct(t,"input",e[11]("a")),n=!0)},p(r,a){a&32&&t.value!==r[5]&&(t.value=r[5])},d(r){r&&_e(t),n=!1,i()}}}function NP(e){let t,n=e[9][e[4]]+"",i,r,a,s;return{c(){t=P("button"),i=Le(n),w(t,"aria-label",r="change inputs to "+e[9][(e[4]+1)%3]),w(t,"class","svelte-m0nu03")},m(o,l){ce(o,t,l),m(t,i),a||(s=ct(t,"click",e[14]),a=!0)},p(o,l){l&16&&n!==(n=o[9][o[4]]+"")&&vt(i,n),l&16&&r!==(r="change inputs to "+o[9][(o[4]+1)%3])&&w(t,"aria-label",r)},d(o){o&&_e(t),a=!1,s()}}}function vue(e){let t,n;function i(o,l){return o[4]===0?gue:o[4]===1?mue:hue}let r=i(e),a=r(e),s=e[3]&&NP(e);return{c(){t=P("div"),a.c(),n=K(),s&&s.c(),w(t,"class","text-input svelte-m0nu03")},m(o,l){ce(o,t,l),a.m(t,null),m(t,n),s&&s.m(t,null)},p(o,[l]){r===(r=i(o))&&a?a.p(o,l):(a.d(1),a=r(o),a&&(a.c(),a.m(t,n))),o[3]?s?s.p(o,l):(s=NP(o),s.c(),s.m(t,null)):s&&(s.d(1),s=null)},i:ot,o:ot,d(o){o&&_e(t),a.d(),s&&s.d()}}}const bue=/^#?([A-F0-9]{6}|[A-F0-9]{8})$/i;function yue(e,t,n){let i,r,a,s,{isAlpha:o}=t,{rgb:l}=t,{hsv:d}=t,{hex:c}=t,{canChangeMode:v}=t;const T=["HEX","RGB","HSV"];let b=0;function A(D){const O=D.target;bue.test(O.value)&&n(1,c=O.value)}function E(D){return function(O){n(0,l={...l,[D]:parseFloat(O.target.value)})}}function y(D){return function(O){n(13,d={...d,[D]:parseFloat(O.target.value)})}}const I=()=>n(4,b=(b+1)%3);return e.$$set=D=>{"isAlpha"in D&&n(2,o=D.isAlpha),"rgb"in D&&n(0,l=D.rgb),"hsv"in D&&n(13,d=D.hsv),"hex"in D&&n(1,c=D.hex),"canChangeMode"in D&&n(3,v=D.canChangeMode)},e.$$.update=()=>{e.$$.dirty&8192&&n(8,i=Math.round(d.h)),e.$$.dirty&8192&&n(7,r=Math.round(d.s)),e.$$.dirty&8192&&n(6,a=Math.round(d.v)),e.$$.dirty&8192&&n(5,s=d.a===void 0?1:Math.round(d.a*100)/100)},[l,c,o,v,b,s,a,r,i,T,A,E,y,d,I]}let wue=class extends Qt{constructor(t){super(),Jt(this,t,yue,vue,Kt,{isAlpha:2,rgb:0,hsv:13,hex:1,canChangeMode:3})}};function Tue(e){let t;return{c(){t=P("div"),w(t,"class","slider-indicator svelte-gmkgto"),cr(t,"top",e[0])},m(n,i){ce(n,t,i)},p(n,[i]){i&1&&cr(t,"top",n[0])},i:ot,o:ot,d(n){n&&_e(t)}}}function kue(e,t,n){let i,{pos:r}=t,{toRight:a}=t;return e.$$set=s=>{"pos"in s&&n(1,r=s.pos),"toRight"in s&&n(2,a=s.toRight)},e.$$.update=()=>{e.$$.dirty&2&&n(0,i=`calc(${r} * (var(--picker-height, 200px) - 14px) / 100 + 2px)`)},[i,r,a]}class FP extends Qt{constructor(t){super(),Jt(this,t,kue,Tue,Kt,{pos:1,toRight:2})}}function Sue(e){let t,n;return{c(){t=P("div"),w(t,"class","picker-indicator svelte-184t4gf"),w(t,"style",n=`left: ${e[2]}; top: ${e[1]}; box-shadow: 0 0 4px ${e[0]?"white":"black"};`)},m(i,r){ce(i,t,r)},p(i,[r]){r&7&&n!==(n=`left: ${i[2]}; top: ${i[1]}; box-shadow: 0 0 4px ${i[0]?"white":"black"};`)&&w(t,"style",n)},i:ot,o:ot,d(i){i&&_e(t)}}}function Cue(e,t,n){let i,r,{pos:a}=t,{hex:s}=t,{isDark:o}=t;return e.$$set=l=>{"pos"in l&&n(3,a=l.pos),"hex"in l&&n(4,s=l.hex),"isDark"in l&&n(0,o=l.isDark)},e.$$.update=()=>{e.$$.dirty&8&&n(2,i=`calc(${a.x} * (var(--picker-width, 200px) - 14px) / 100 + 2px)`),e.$$.dirty&8&&n(1,r=`calc(${a.y} * (var(--picker-height, 200px) - 14px) / 100 + 2px)`)},[o,r,i,a,s]}class Pue extends Qt{constructor(t){super(),Jt(this,t,Cue,Sue,Kt,{pos:3,hex:4,isDark:0})}}function Eue(e){let t,n;return{c:ot,m(i,r){t||(n=[ct(window,"keyup",e[0]),ct(window,"keydown",e[1])],t=!0)},p:ot,i:ot,o:ot,d(i){t=!1,vi(n)}}}function Iue(e,t,n){let i;Sn(e,nf,s=>n(2,i=s));function r(s){["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"].includes(s.key)&&($s(nf,i[s.key]=0,i),nf.set(i))}function a(s){["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"].includes(s.key)&&(s.repeat||($s(nf,i[s.key]=1,i),nf.set(i)))}return[r,a]}class Aue extends Qt{constructor(t){super(),Jt(this,t,Iue,Eue,Kt,{})}}function Due(e){let t,n;const i=e[3].default,r=fu(i,e,e[2],null);return{c(){t=P("div"),r&&r.c(),w(t,"class","picker-wrapper svelte-ku5kig"),wt(t,"focused",e[0])},m(a,s){ce(a,t,s),r&&r.m(t,null),n=!0},p(a,[s]){r&&r.p&&(!n||s&4)&&cu(r,i,a,a[2],n?pu(i,a[2],s,null):_u(a[2]),null),(!n||s&1)&&wt(t,"focused",a[0])},i(a){n||(U(r,a),n=!0)},o(a){W(r,a),n=!1},d(a){a&&_e(t),r&&r.d(a)}}}function Oue(e,t,n){let{$$slots:i={},$$scope:r}=t,{focused:a}=t,{toRight:s}=t;return e.$$set=o=>{"focused"in o&&n(0,a=o.focused),"toRight"in o&&n(1,s=o.toRight),"$$scope"in o&&n(2,r=o.$$scope)},[a,s,r,i]}class Mue extends Qt{constructor(t){super(),Jt(this,t,Oue,Due,Kt,{focused:0,toRight:1})}}function xue(e){let t,n;const i=e[3].default,r=fu(i,e,e[2],null);return{c(){t=P("div"),r&&r.c(),w(t,"class","slider-wrapper svelte-124tgpk"),wt(t,"focused",e[0])},m(a,s){ce(a,t,s),r&&r.m(t,null),n=!0},p(a,[s]){r&&r.p&&(!n||s&4)&&cu(r,i,a,a[2],n?pu(i,a[2],s,null):_u(a[2]),null),(!n||s&1)&&wt(t,"focused",a[0])},i(a){n||(U(r,a),n=!0)},o(a){W(r,a),n=!1},d(a){a&&_e(t),r&&r.d(a)}}}function Rue(e,t,n){let{$$slots:i={},$$scope:r}=t,{focused:a}=t,{toRight:s}=t;return e.$$set=o=>{"focused"in o&&n(0,a=o.focused),"toRight"in o&&n(1,s=o.toRight),"$$scope"in o&&n(2,r=o.$$scope)},[a,s,r,i]}class LP extends Qt{constructor(t){super(),Jt(this,t,Rue,xue,Kt,{focused:0,toRight:1})}}function $ue(e){let t,n,i,r,a,s,o,l,d,c,v;return{c(){t=P("label"),n=P("div"),i=P("input"),r=K(),a=P("div"),s=K(),o=P("div"),l=K(),d=Le(e[2]),w(i,"type","color"),w(i,"class","color-picker-input svelte-1bcljv9"),i.value=e[1],w(i,"aria-haspopup","dialog"),w(a,"class","color-picker-alpha svelte-1bcljv9"),w(o,"class","color-picker-color svelte-1bcljv9"),cr(o,"background",e[1]),w(n,"class","color-picker-container svelte-1bcljv9"),w(t,"class","color-picker-label svelte-1bcljv9")},m(T,b){ce(T,t,b),m(t,n),m(n,i),m(n,r),m(n,a),m(n,s),m(n,o),m(t,l),m(t,d),e[4](t),c||(v=[ct(i,"click",Hi(Nue)),ct(i,"mousedown",Hi(Fue)),ct(t,"click",Hi(Lue)),ct(t,"mousedown",Hi(Hue))],c=!0)},p(T,[b]){b&2&&(i.value=T[1]),b&2&&cr(o,"background",T[1]),b&4&&vt(d,T[2])},i:ot,o:ot,d(T){T&&_e(t),e[4](null),c=!1,vi(v)}}}const Nue=()=>{},Fue=()=>{},Lue=()=>{},Hue=()=>{};function jue(e,t,n){let{labelWrapper:i}=t,{hex:r}=t,{label:a}=t,{isOpen:s}=t;function o(l){Oe[l?"unshift":"push"](()=>{i=l,n(0,i)})}return e.$$set=l=>{"labelWrapper"in l&&n(0,i=l.labelWrapper),"hex"in l&&n(1,r=l.hex),"label"in l&&n(2,a=l.label),"isOpen"in l&&n(3,s=l.isOpen)},[i,r,a,s,o]}class Bue extends Qt{constructor(t){super(),Jt(this,t,jue,$ue,Kt,{labelWrapper:0,hex:1,label:2,isOpen:3})}}function Uue(e){let t,n,i;const r=e[5].default,a=fu(r,e,e[4],null);return{c(){t=P("div"),a&&a.c(),w(t,"class","wrapper svelte-edr9q"),w(t,"role",n=e[2]?"dialog":void 0),w(t,"aria-label","color picker"),wt(t,"isOpen",e[1]),wt(t,"isPopup",e[2])},m(s,o){ce(s,t,o),a&&a.m(t,null),e[6](t),i=!0},p(s,[o]){a&&a.p&&(!i||o&16)&&cu(a,r,s,s[4],i?pu(r,s[4],o,null):_u(s[4]),null),(!i||o&4&&n!==(n=s[2]?"dialog":void 0))&&w(t,"role",n),(!i||o&2)&&wt(t,"isOpen",s[1]),(!i||o&4)&&wt(t,"isPopup",s[2])},i(s){i||(U(a,s),i=!0)},o(s){W(a,s),i=!1},d(s){s&&_e(t),a&&a.d(s),e[6](null)}}}function que(e,t,n){let{$$slots:i={},$$scope:r}=t,{wrapper:a}=t,{isOpen:s}=t,{isPopup:o}=t,{toRight:l}=t;function d(c){Oe[c?"unshift":"push"](()=>{a=c,n(0,a)})}return e.$$set=c=>{"wrapper"in c&&n(0,a=c.wrapper),"isOpen"in c&&n(1,s=c.isOpen),"isPopup"in c&&n(2,o=c.isPopup),"toRight"in c&&n(3,l=c.toRight),"$$scope"in c&&n(4,r=c.$$scope)},[a,s,o,l,r,i,d]}class Wue extends Qt{constructor(t){super(),Jt(this,t,que,Uue,Kt,{wrapper:0,isOpen:1,isPopup:2,toRight:3})}}function HP(e,t,n){const i=e.slice();return i[9]=t[n].contrast,i[10]=t[n].hex,i[11]=t[n].placeholder,i[12]=t[n].reverse,i[13]=t[n].size,i}function jP(e){let t,n,i;var r=e[0].a11ySingleNotice;function a(s){return{props:{contrast:s[9],textColor:s[12]?s[10]:s[1],bgColor:s[12]?s[1]:s[10],placeholder:s[11],size:s[13]}}}return r&&(t=ha(r,a(e))),{c(){t&&re(t.$$.fragment),n=On()},m(s,o){t&&ae(t,s,o),ce(s,n,o),i=!0},p(s,o){const l={};if(o&16&&(l.contrast=s[9]),o&18&&(l.textColor=s[12]?s[10]:s[1]),o&18&&(l.bgColor=s[12]?s[1]:s[10]),o&16&&(l.placeholder=s[11]),o&16&&(l.size=s[13]),o&1&&r!==(r=s[0].a11ySingleNotice)){if(t){pn();const d=t;W(d.$$.fragment,1,0,()=>{se(d,1)}),hn()}r?(t=ha(r,a(s)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else r&&t.$set(l)},i(s){i||(t&&U(t.$$.fragment,s),i=!0)},o(s){t&&W(t.$$.fragment,s),i=!1},d(s){s&&_e(n),t&&se(t,s)}}}function BP(e){let t;return{c(){t=P("span"),w(t,"class","svelte-1edpg24")},m(n,i){ce(n,t,i),t.innerHTML=e[2]},p(n,i){i&4&&(t.innerHTML=n[2])},d(n){n&&_e(t)}}}function Vue(e){let t,n,i,r,a,s,o,l,d;var c=e[0].a11ySummary;function v(y){return{props:{a11yColors:y[4],hex:y[1]}}}c&&(i=ha(c,v(e)));let T=e[4],b=[];for(let y=0;y<T.length;y+=1)b[y]=jP(HP(e,T,y));const A=y=>W(b[y],1,1,()=>{b[y]=null});let E=e[2]&&BP(e);return{c(){t=P("details"),n=P("summary"),i&&re(i.$$.fragment),a=K(),s=P("div");for(let y=0;y<b.length;y+=1)b[y].c();o=K(),E&&E.c(),w(n,"tabindex",r=e[5]?-1:void 0),w(n,"class","svelte-1edpg24"),w(s,"class","svelte-1edpg24"),w(t,"class",l="a11y-notice "+(e[5]?"not-closable":"")+" svelte-1edpg24"),t.open=e[3]},m(y,I){ce(y,t,I),m(t,n),i&&ae(i,n,null),m(t,a),m(t,s);for(let D=0;D<b.length;D+=1)b[D]&&b[D].m(s,null);m(s,o),E&&E.m(s,null),d=!0},p(y,[I]){const D={};if(I&16&&(D.a11yColors=y[4]),I&2&&(D.hex=y[1]),I&1&&c!==(c=y[0].a11ySummary)){if(i){pn();const O=i;W(O.$$.fragment,1,0,()=>{se(O,1)}),hn()}c?(i=ha(c,v(y)),re(i.$$.fragment),U(i.$$.fragment,1),ae(i,n,null)):i=null}else c&&i.$set(D);if((!d||I&32&&r!==(r=y[5]?-1:void 0))&&w(n,"tabindex",r),I&19){T=y[4];let O;for(O=0;O<T.length;O+=1){const M=HP(y,T,O);b[O]?(b[O].p(M,I),U(b[O],1)):(b[O]=jP(M),b[O].c(),U(b[O],1),b[O].m(s,o))}for(pn(),O=T.length;O<b.length;O+=1)A(O);hn()}y[2]?E?E.p(y,I):(E=BP(y),E.c(),E.m(s,null)):E&&(E.d(1),E=null),(!d||I&32&&l!==(l="a11y-notice "+(y[5]?"not-closable":"")+" svelte-1edpg24"))&&w(t,"class",l),(!d||I&8)&&(t.open=y[3])},i(y){if(!d){i&&U(i.$$.fragment,y);for(let I=0;I<T.length;I+=1)U(b[I]);d=!0}},o(y){i&&W(i.$$.fragment,y),b=b.filter(Boolean);for(let I=0;I<b.length;I+=1)W(b[I]);d=!1},d(y){y&&_e(t),i&&se(i),Nn(b,y),E&&E.d()}}}function zue(e,t,n){let i,r,{components:a}=t,{a11yColors:s}=t,{hex:o}=t,{color:l}=t,{a11yGuidelines:d}=t,{isA11yOpen:c}=t,{isA11yClosable:v}=t;return e.$$set=T=>{"components"in T&&n(0,a=T.components),"a11yColors"in T&&n(6,s=T.a11yColors),"hex"in T&&n(1,o=T.hex),"color"in T&&n(7,l=T.color),"a11yGuidelines"in T&&n(2,d=T.a11yGuidelines),"isA11yOpen"in T&&n(3,c=T.isA11yOpen),"isA11yClosable"in T&&n(8,v=T.isA11yClosable)},e.$$.update=()=>{e.$$.dirty&264&&n(5,i=c&&!v),e.$$.dirty&192&&n(4,r=s.map(T=>({...T,contrast:l?l.contrast(T.hex):null})))},[a,o,d,c,r,i,s,l,v]}class Yue extends Qt{constructor(t){super(),Jt(this,t,zue,Vue,Kt,{components:0,a11yColors:6,hex:1,color:7,a11yGuidelines:2,isA11yOpen:3,isA11yClosable:8})}}function Gue(e){let t,n,i=(e[2]||"Lorem Ipsum")+"",r,a,s,o,l,d,c=(e[3]>=10?e[3].toFixed(1):e[3])+"",v,T,b,A,E;return{c(){t=P("div"),n=P("p"),r=Le(i),s=K(),o=P("div"),l=P("p"),d=Le("contrast: "),v=Le(c),T=K(),b=P("span"),b.textContent="AA",A=K(),E=P("span"),E.textContent="AAA",w(n,"class",a="lorem "+(e[4]==="large"&&"large")+" svelte-1hqs3vm"),cr(n,"color",e[0]),cr(n,"background-color",e[1]),w(l,"class","svelte-1hqs3vm"),w(b,"class","grade svelte-1hqs3vm"),wt(b,"grade-ok",e[3]>(e[4]==="large"?3:4.5)),w(E,"class","grade svelte-1hqs3vm"),wt(E,"grade-ok",e[3]>(e[4]==="large"?4.5:7)),w(o,"class","score svelte-1hqs3vm"),w(t,"class","a11y-single-notice svelte-1hqs3vm")},m(y,I){ce(y,t,I),m(t,n),m(n,r),m(t,s),m(t,o),m(o,l),m(l,d),m(l,v),m(o,T),m(o,b),m(o,A),m(o,E)},p(y,[I]){I&4&&i!==(i=(y[2]||"Lorem Ipsum")+"")&&vt(r,i),I&16&&a!==(a="lorem "+(y[4]==="large"&&"large")+" svelte-1hqs3vm")&&w(n,"class",a),I&1&&cr(n,"color",y[0]),I&2&&cr(n,"background-color",y[1]),I&8&&c!==(c=(y[3]>=10?y[3].toFixed(1):y[3])+"")&&vt(v,c),I&24&&wt(b,"grade-ok",y[3]>(y[4]==="large"?3:4.5)),I&24&&wt(E,"grade-ok",y[3]>(y[4]==="large"?4.5:7))},i:ot,o:ot,d(y){y&&_e(t)}}}function Kue(e,t,n){let{textColor:i}=t,{bgColor:r}=t,{placeholder:a=void 0}=t,{contrast:s=1}=t,{size:o=void 0}=t;return e.$$set=l=>{"textColor"in l&&n(0,i=l.textColor),"bgColor"in l&&n(1,r=l.bgColor),"placeholder"in l&&n(2,a=l.placeholder),"contrast"in l&&n(3,s=l.contrast),"size"in l&&n(4,o=l.size)},[i,r,a,s,o]}class Xue extends Qt{constructor(t){super(),Jt(this,t,Kue,Gue,Kt,{textColor:0,bgColor:1,placeholder:2,contrast:3,size:4})}}function Que(e){let t;return{c(){t=Le(e[0])},m(n,i){ce(n,t,i)},p(n,[i]){i&1&&vt(t,n[0])},i:ot,o:ot,d(n){n&&_e(t)}}}function Jue({contrast:e,size:t}){return e?t==="large"?e<3?2:e<4.5?1:0:e<4.5?2:e<7?1:0:1}function Zue(e,t,n){let i,r,{a11yColors:a}=t,{hex:s}=t;return e.$$set=o=>{"a11yColors"in o&&n(1,a=o.a11yColors),"hex"in o&&n(2,s=o.hex)},e.$$.update=()=>{e.$$.dirty&2&&n(3,i=a.map(Jue).reduce((o,l)=>o+l)),e.$$.dirty&8&&n(0,r=i?`⚠️ ${i} contrast grade${i&&"s"} fail`:"Contrast grade information")},[r,a,s,i]}class ede extends Qt{constructor(t){super(),Jt(this,t,Zue,Que,Kt,{a11yColors:1,hex:2})}}function tde(e){let t;return{c(){t=P("input"),w(t,"type","hidden"),t.value=e[2]},m(n,i){ce(n,t,i)},p(n,i){i[0]&4&&(t.value=n[2])},i:ot,o:ot,d(n){n&&_e(t)}}}function nde(e){let t,n,i,r,a;function s(c){e[26](c)}function o(c){e[27](c)}var l=e[21]().input;function d(c){let v={hex:c[2],label:c[6]};return c[19]!==void 0&&(v.labelWrapper=c[19]),c[3]!==void 0&&(v.isOpen=c[3]),{props:v}}return l&&(t=ha(l,d(e)),Oe.push(()=>$e(t,"labelWrapper",s)),Oe.push(()=>$e(t,"isOpen",o))),{c(){t&&re(t.$$.fragment),r=On()},m(c,v){t&&ae(t,c,v),ce(c,r,v),a=!0},p(c,v){const T={};if(v[0]&4&&(T.hex=c[2]),v[0]&64&&(T.label=c[6]),!n&&v[0]&524288&&(n=!0,T.labelWrapper=c[19],Ne(()=>n=!1)),!i&&v[0]&8&&(i=!0,T.isOpen=c[3],Ne(()=>i=!1)),l!==(l=c[21]().input)){if(t){pn();const b=t;W(b.$$.fragment,1,0,()=>{se(b,1)}),hn()}l?(t=ha(l,d(c)),Oe.push(()=>$e(t,"labelWrapper",s)),Oe.push(()=>$e(t,"isOpen",o)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,r.parentNode,r)):t=null}else l&&t.$set(T)},i(c){a||(t&&U(t.$$.fragment,c),a=!0)},o(c){t&&W(t.$$.fragment,c),a=!1},d(c){c&&_e(r),t&&se(t,c)}}}function UP(e){let t,n,i,r;function a(l){e[32](l)}function s(l){e[33](l)}let o={components:e[21](),hex:e[2],toRight:e[17]};return e[1].a!==void 0&&(o.a=e[1].a),e[3]!==void 0&&(o.isOpen=e[3]),t=new pue({props:o}),Oe.push(()=>$e(t,"a",a)),Oe.push(()=>$e(t,"isOpen",s)),{c(){re(t.$$.fragment)},m(l,d){ae(t,l,d),r=!0},p(l,d){const c={};d[0]&4&&(c.hex=l[2]),d[0]&131072&&(c.toRight=l[17]),!n&&d[0]&2&&(n=!0,c.a=l[1].a,Ne(()=>n=!1)),!i&&d[0]&8&&(i=!0,c.isOpen=l[3],Ne(()=>i=!1)),t.$set(c)},i(l){r||(U(t.$$.fragment,l),r=!0)},o(l){W(t.$$.fragment,l),r=!1},d(l){se(t,l)}}}function qP(e){let t,n,i,r,a,s;function o(T){e[34](T)}function l(T){e[35](T)}function d(T){e[36](T)}var c=e[21]().textInput;function v(T){let b={isAlpha:T[7],canChangeMode:T[10]};return T[2]!==void 0&&(b.hex=T[2]),T[0]!==void 0&&(b.rgb=T[0]),T[1]!==void 0&&(b.hsv=T[1]),{props:b}}return c&&(t=ha(c,v(e)),Oe.push(()=>$e(t,"hex",o)),Oe.push(()=>$e(t,"rgb",l)),Oe.push(()=>$e(t,"hsv",d))),{c(){t&&re(t.$$.fragment),a=On()},m(T,b){t&&ae(t,T,b),ce(T,a,b),s=!0},p(T,b){const A={};if(b[0]&128&&(A.isAlpha=T[7]),b[0]&1024&&(A.canChangeMode=T[10]),!n&&b[0]&4&&(n=!0,A.hex=T[2],Ne(()=>n=!1)),!i&&b[0]&1&&(i=!0,A.rgb=T[0],Ne(()=>i=!1)),!r&&b[0]&2&&(r=!0,A.hsv=T[1],Ne(()=>r=!1)),c!==(c=T[21]().textInput)){if(t){pn();const E=t;W(E.$$.fragment,1,0,()=>{se(E,1)}),hn()}c?(t=ha(c,v(T)),Oe.push(()=>$e(t,"hex",o)),Oe.push(()=>$e(t,"rgb",l)),Oe.push(()=>$e(t,"hsv",d)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,a.parentNode,a)):t=null}else c&&t.$set(A)},i(T){s||(t&&U(t.$$.fragment,T),s=!0)},o(T){t&&W(t.$$.fragment,T),s=!1},d(T){T&&_e(a),t&&se(t,T)}}}function WP(e){let t,n,i;var r=e[21]().a11yNotice;function a(s){return{props:{components:s[21](),a11yColors:s[12],color:s[4],hex:s[2],a11yGuidelines:s[13],isA11yOpen:s[14],isA11yClosable:s[15]}}}return r&&(t=ha(r,a(e))),{c(){t&&re(t.$$.fragment),n=On()},m(s,o){t&&ae(t,s,o),ce(s,n,o),i=!0},p(s,o){const l={};if(o[0]&4096&&(l.a11yColors=s[12]),o[0]&16&&(l.color=s[4]),o[0]&4&&(l.hex=s[2]),o[0]&8192&&(l.a11yGuidelines=s[13]),o[0]&16384&&(l.isA11yOpen=s[14]),o[0]&32768&&(l.isA11yClosable=s[15]),r!==(r=s[21]().a11yNotice)){if(t){pn();const d=t;W(d.$$.fragment,1,0,()=>{se(d,1)}),hn()}r?(t=ha(r,a(s)),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else r&&t.$set(l)},i(s){i||(t&&U(t.$$.fragment,s),i=!0)},o(s){t&&W(t.$$.fragment,s),i=!1},d(s){s&&_e(n),t&&se(t,s)}}}function ide(e){let t,n,i,r,a,s,o,l,d,c,v,T;function b($){e[28]($)}function A($){e[29]($)}function E($){e[30]($)}let y={components:e[21](),h:e[1].h,toRight:e[17],isDark:e[5]};e[1].s!==void 0&&(y.s=e[1].s),e[1].v!==void 0&&(y.v=e[1].v),e[3]!==void 0&&(y.isOpen=e[3]),t=new sue({props:y}),Oe.push(()=>$e(t,"s",b)),Oe.push(()=>$e(t,"v",A)),Oe.push(()=>$e(t,"isOpen",E));function I($){e[31]($)}let D={components:e[21](),toRight:e[17]};e[1].h!==void 0&&(D.h=e[1].h),s=new due({props:D}),Oe.push(()=>$e(s,"h",I));let O=e[7]&&UP(e),M=e[9]&&qP(e),F=e[11]&&WP(e);return{c(){re(t.$$.fragment),a=K(),re(s.$$.fragment),l=K(),O&&O.c(),d=K(),M&&M.c(),c=K(),F&&F.c(),v=On()},m($,L){ae(t,$,L),ce($,a,L),ae(s,$,L),ce($,l,L),O&&O.m($,L),ce($,d,L),M&&M.m($,L),ce($,c,L),F&&F.m($,L),ce($,v,L),T=!0},p($,L){const j={};L[0]&2&&(j.h=$[1].h),L[0]&131072&&(j.toRight=$[17]),L[0]&32&&(j.isDark=$[5]),!n&&L[0]&2&&(n=!0,j.s=$[1].s,Ne(()=>n=!1)),!i&&L[0]&2&&(i=!0,j.v=$[1].v,Ne(()=>i=!1)),!r&&L[0]&8&&(r=!0,j.isOpen=$[3],Ne(()=>r=!1)),t.$set(j);const H={};L[0]&131072&&(H.toRight=$[17]),!o&&L[0]&2&&(o=!0,H.h=$[1].h,Ne(()=>o=!1)),s.$set(H),$[7]?O?(O.p($,L),L[0]&128&&U(O,1)):(O=UP($),O.c(),U(O,1),O.m(d.parentNode,d)):O&&(pn(),W(O,1,1,()=>{O=null}),hn()),$[9]?M?(M.p($,L),L[0]&512&&U(M,1)):(M=qP($),M.c(),U(M,1),M.m(c.parentNode,c)):M&&(pn(),W(M,1,1,()=>{M=null}),hn()),$[11]?F?(F.p($,L),L[0]&2048&&U(F,1)):(F=WP($),F.c(),U(F,1),F.m(v.parentNode,v)):F&&(pn(),W(F,1,1,()=>{F=null}),hn())},i($){T||(U(t.$$.fragment,$),U(s.$$.fragment,$),U(O),U(M),U(F),T=!0)},o($){W(t.$$.fragment,$),W(s.$$.fragment,$),W(O),W(M),W(F),T=!1},d($){se(t,$),$&&_e(a),se(s,$),$&&_e(l),O&&O.d($),$&&_e(d),M&&M.d($),$&&_e(c),F&&F.d($),$&&_e(v)}}}function rde(e){let t,n,i,r,a,s,o,l,d,c,v;t=new Aue({});const T=[nde,tde],b=[];function A(D,O){return D[8]?0:1}r=A(e),a=b[r]=T[r](e);function E(D){e[37](D)}var y=e[21]().wrapper;function I(D){let O={isOpen:D[3],isPopup:D[16],toRight:D[17],$$slots:{default:[ide]},$$scope:{ctx:D}};return D[20]!==void 0&&(O.wrapper=D[20]),{props:O}}return y&&(o=ha(y,I(e)),Oe.push(()=>$e(o,"wrapper",E))),{c(){re(t.$$.fragment),n=K(),i=P("span"),a.c(),s=K(),o&&re(o.$$.fragment),w(i,"class","color-picker svelte-pkk6ct")},m(D,O){ae(t,D,O),ce(D,n,O),ce(D,i,O),b[r].m(i,null),m(i,s),o&&ae(o,i,null),e[38](i),d=!0,c||(v=[ct(window,"mousedown",e[22]),ct(window,"keyup",e[23])],c=!0)},p(D,O){let M=r;r=A(D),r===M?b[r].p(D,O):(pn(),W(b[M],1,1,()=>{b[M]=null}),hn(),a=b[r],a?a.p(D,O):(a=b[r]=T[r](D),a.c()),U(a,1),a.m(i,s));const F={};if(O[0]&8&&(F.isOpen=D[3]),O[0]&65536&&(F.isPopup=D[16]),O[0]&131072&&(F.toRight=D[17]),O[0]&196287|O[1]&16384&&(F.$$scope={dirty:O,ctx:D}),!l&&O[0]&1048576&&(l=!0,F.wrapper=D[20],Ne(()=>l=!1)),y!==(y=D[21]().wrapper)){if(o){pn();const $=o;W($.$$.fragment,1,0,()=>{se($,1)}),hn()}y?(o=ha(y,I(D)),Oe.push(()=>$e(o,"wrapper",E)),re(o.$$.fragment),U(o.$$.fragment,1),ae(o,i,null)):o=null}else y&&o.$set(F)},i(D){d||(U(t.$$.fragment,D),U(a),o&&U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(a),o&&W(o.$$.fragment,D),d=!1},d(D){se(t,D),D&&_e(n),D&&_e(i),b[r].d(),o&&se(o),e[38](null),c=!1,vi(v)}}}function ade(e,t,n){tue([nue]);let{components:i={}}=t;const r=Qy();let{label:a="Choose a color"}=t,{isAlpha:s=!0}=t,{isInput:o=!0}=t,{isTextInput:l=!0}=t,{canChangeMode:d=!0}=t,{isA11y:c=!1}=t,{a11yColors:v=[{hex:"#ffffff"}]}=t,{a11yGuidelines:T='<p style="margin: 0; font-size: 12px;">Learn more at <a href="https://webaim.org/articles/contrast/" target="_blank">WebAIM contrast guide</a></p>'}=t,{isA11yOpen:b=!1}=t,{isA11yClosable:A=!0}=t,{isPopup:E=o}=t,{isOpen:y=!o}=t,{toRight:I=!1}=t,{disableCloseClickOutside:D=!1}=t,{rgb:O={r:255,g:0,b:0,a:1}}=t,{hsv:M={h:0,s:100,v:100,a:1}}=t,{hex:F="#ff0000"}=t,{color:$=void 0}=t,{isDark:L=!1}=t,j={r:255,g:0,b:0,a:1},H={h:0,s:100,v:100,a:1},V="#ff0000",Q;const X={sliderIndicator:FP,pickerIndicator:Pue,alphaIndicator:FP,pickerWrapper:Mue,sliderWrapper:LP,alphaWrapper:LP,textInput:wue,a11yNotice:Yue,a11ySingleNotice:Xue,a11ySummary:ede,input:Bue,wrapper:Wue};function te(){return{...X,...i}}let ne,be;function ue({target:Ke}){o&&(ne.contains(Ke)||ne.isSameNode(Ke)?n(3,y=!y):y&&!be.contains(Ke)&&!D&&n(3,y=!1))}function Ce(Ke){Ke.key==="Tab"&&E&&n(3,y=Q&&Q.contains(document.activeElement))}function ie(){M.h===H.h&&M.s===H.s&&M.v===H.v&&M.a===H.a&&O.r===j.r&&O.g===j.g&&O.b===j.b&&O.a===j.a&&F===V||(M.a===void 0&&n(1,M.a=1,M),H.a===void 0&&(H.a=1),O.a===void 0&&n(0,O.a=1,O),j.a===void 0&&(j.a=1),F&&F.substring(7)==="ff"&&n(2,F=F.substring(0,7)),F&&F.substring(7)==="ff"&&n(2,F=F.substring(0,7)),M.h!==H.h||M.s!==H.s||M.v!==H.v||M.a!==H.a?(n(4,$=Vo(M)),n(0,O=$.toRgb()),n(2,F=$.toHex())):O.r!==j.r||O.g!==j.g||O.b!==j.b||O.a!==j.a?(n(4,$=Vo(O)),n(2,F=$.toHex()),n(1,M=$.toHsv())):F!==V&&(n(4,$=Vo(F)),n(0,O=$.toRgb()),n(1,M=$.toHsv())),$&&n(5,L=$.isDark()),H=Object.assign({},M),j=Object.assign({},O),V=F,r("input",{color:$,hsv:M,rgb:O,hex:F}))}function Y(Ke){ne=Ke,n(19,ne)}function he(Ke){y=Ke,n(3,y)}function Me(Ke){e.$$.not_equal(M.s,Ke)&&(M.s=Ke,n(1,M))}function Pe(Ke){e.$$.not_equal(M.v,Ke)&&(M.v=Ke,n(1,M))}function We(Ke){y=Ke,n(3,y)}function qe(Ke){e.$$.not_equal(M.h,Ke)&&(M.h=Ke,n(1,M))}function ee(Ke){e.$$.not_equal(M.a,Ke)&&(M.a=Ke,n(1,M))}function G(Ke){y=Ke,n(3,y)}function me(Ke){F=Ke,n(2,F)}function Te(Ke){O=Ke,n(0,O)}function De(Ke){M=Ke,n(1,M)}function we(Ke){be=Ke,n(20,be)}function Ve(Ke){Oe[Ke?"unshift":"push"](()=>{Q=Ke,n(18,Q)})}return e.$$set=Ke=>{"components"in Ke&&n(24,i=Ke.components),"label"in Ke&&n(6,a=Ke.label),"isAlpha"in Ke&&n(7,s=Ke.isAlpha),"isInput"in Ke&&n(8,o=Ke.isInput),"isTextInput"in Ke&&n(9,l=Ke.isTextInput),"canChangeMode"in Ke&&n(10,d=Ke.canChangeMode),"isA11y"in Ke&&n(11,c=Ke.isA11y),"a11yColors"in Ke&&n(12,v=Ke.a11yColors),"a11yGuidelines"in Ke&&n(13,T=Ke.a11yGuidelines),"isA11yOpen"in Ke&&n(14,b=Ke.isA11yOpen),"isA11yClosable"in Ke&&n(15,A=Ke.isA11yClosable),"isPopup"in Ke&&n(16,E=Ke.isPopup),"isOpen"in Ke&&n(3,y=Ke.isOpen),"toRight"in Ke&&n(17,I=Ke.toRight),"disableCloseClickOutside"in Ke&&n(25,D=Ke.disableCloseClickOutside),"rgb"in Ke&&n(0,O=Ke.rgb),"hsv"in Ke&&n(1,M=Ke.hsv),"hex"in Ke&&n(2,F=Ke.hex),"color"in Ke&&n(4,$=Ke.color),"isDark"in Ke&&n(5,L=Ke.isDark)},e.$$.update=()=>{e.$$.dirty[0]&7&&(M||O||F)&&ie()},[O,M,F,y,$,L,a,s,o,l,d,c,v,T,b,A,E,I,Q,ne,be,te,ue,Ce,i,D,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve]}class sde extends Qt{constructor(t){super(),Jt(this,t,ade,rde,Kt,{components:24,label:6,isAlpha:7,isInput:8,isTextInput:9,canChangeMode:10,isA11y:11,a11yColors:12,a11yGuidelines:13,isA11yOpen:14,isA11yClosable:15,isPopup:16,isOpen:3,toRight:17,disableCloseClickOutside:25,rgb:0,hsv:1,hex:2,color:4,isDark:5},null,[-1,-1])}}const ode=e=>({}),VP=e=>({});function zP(e){let t,n;return t=new xd({props:{refreshReportParams:e[4],specTreeNodeId:e[3]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.refreshReportParams=i[4]),r&8&&(a.specTreeNodeId=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function YP(e){let t,n;const i=e[10].description,r=fu(i,e,e[9],VP);return{c(){t=P("div"),r&&r.c(),w(t,"class","description svelte-358atz")},m(a,s){ce(a,t,s),r&&r.m(t,null),n=!0},p(a,s){r&&r.p&&(!n||s&512)&&cu(r,i,a,a[9],n?pu(i,a[9],s,ode):_u(a[9]),VP)},i(a){n||(U(r,a),n=!0)},o(a){W(r,a),n=!1},d(a){a&&_e(t),r&&r.d(a)}}}function lde(e){let t,n,i,r,a,s=e[5].title+"",o,l,d,c,v,T,b,A,E,y,I,D;d=new Rd({props:{param:e[3]}});let O=e[5].updatable&&zP(e);function M(L){e[11](L)}let F={defaultValue:e[1]};e[0]!==void 0&&(F.value=e[0]),T=new Yle({props:F}),Oe.push(()=>$e(T,"value",M));let $=e[7].description&&YP(e);return I=new sde({props:{id:e[6],hex:"#"+(e[0]||"ffffff"),isAlpha:!1,sliderDirection:"horizontal"}}),I.$on("input",e[12]),{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),l=K(),re(d.$$.fragment),c=K(),O&&O.c(),v=K(),re(T.$$.fragment),A=K(),$&&$.c(),E=K(),y=P("div"),re(I.$$.fragment),w(a,"class","report_option__title svelte-358atz"),w(a,"for",e[6]),w(r,"class","report_option"),w(y,"class","color-picker-wrapper svelte-358atz"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[2]},m(L,j){ce(L,t,j),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),m(r,l),ae(d,r,null),m(r,c),O&&O.m(r,null),m(r,v),ae(T,r,null),m(i,A),$&&$.m(i,null),m(i,E),m(i,y),ae(I,y,null),D=!0},p(L,[j]){(!D||j&32)&&s!==(s=L[5].title+"")&&vt(o,s);const H={};j&8&&(H.param=L[3]),d.$set(H),L[5].updatable?O?(O.p(L,j),j&32&&U(O,1)):(O=zP(L),O.c(),U(O,1),O.m(r,v)):O&&(pn(),W(O,1,1,()=>{O=null}),hn());const V={};j&2&&(V.defaultValue=L[1]),!b&&j&1&&(b=!0,V.value=L[0],Ne(()=>b=!1)),T.$set(V),L[7].description?$?($.p(L,j),j&128&&U($,1)):($=YP(L),$.c(),U($,1),$.m(i,E)):$&&(pn(),W($,1,1,()=>{$=null}),hn());const Q={};j&1&&(Q.hex="#"+(L[0]||"ffffff")),I.$set(Q),(!D||j&4)&&(t.hidden=L[2])},i(L){D||(U(d.$$.fragment,L),U(O),U(T.$$.fragment,L),U($),U(I.$$.fragment,L),D=!0)},o(L){W(d.$$.fragment,L),W(O),W(T.$$.fragment,L),W($),W(I.$$.fragment,L),D=!1},d(L){L&&_e(t),se(d),O&&O.d(),se(T),$&&$.d(),se(I)}}}function ude(e,t,n){let i,r;Sn(e,Dd,y=>n(8,r=y));let{$$slots:a={},$$scope:s}=t;const o=QM(a);let{value:l}=t,{defaultValue:d}=t,{hidden:c}=t,{specTreeNodeId:v}=t,{refreshReportParams:T}=t;const b="i"+Math.random().toString(16).substr(2,8);function A(y){l=y,n(0,l)}const E=y=>{n(0,l=y.detail.hex.replace("#",""))};return e.$$set=y=>{"value"in y&&n(0,l=y.value),"defaultValue"in y&&n(1,d=y.defaultValue),"hidden"in y&&n(2,c=y.hidden),"specTreeNodeId"in y&&n(3,v=y.specTreeNodeId),"refreshReportParams"in y&&n(4,T=y.refreshReportParams),"$$scope"in y&&n(9,s=y.$$scope)},e.$$.update=()=>{e.$$.dirty&264&&n(5,i=r&&v&&r[v])},[l,d,c,v,T,i,b,o,r,s,a,A,E]}class Oo extends Qt{constructor(t){super(),Jt(this,t,ude,lde,Kt,{value:0,defaultValue:1,hidden:2,specTreeNodeId:3,refreshReportParams:4})}}function dde(e){let t,n,i,r;const a=e[3].default,s=fu(a,e,e[2],null);return{c(){t=P("span"),s&&s.c(),w(t,"class","scroll-to svelte-n0hbzh")},m(o,l){ce(o,t,l),s&&s.m(t,null),n=!0,i||(r=ct(t,"click",e[0]),i=!0)},p(o,[l]){s&&s.p&&(!n||l&4)&&cu(s,a,o,o[2],n?pu(a,o[2],l,null):_u(o[2]),null)},i(o){n||(U(s,o),n=!0)},o(o){W(s,o),n=!1},d(o){o&&_e(t),s&&s.d(o),i=!1,r()}}}function fde(e,t,n){let i;Sn(e,Jw,l=>n(4,i=l));let{$$slots:r={},$$scope:a}=t,{bookmark:s}=t;function o(){i.has(s)&&document.getElementById(s)&&document.getElementById(s).scrollIntoView({behavior:"smooth"})}return e.$$set=l=>{"bookmark"in l&&n(1,s=l.bookmark),"$$scope"in l&&n(2,a=l.$$scope)},[o,s,a,r]}class i_ extends Qt{constructor(t){super(),Jt(this,t,fde,dde,Kt,{bookmark:1})}}function cde(e){let t;return{c(){t=P("div"),t.textContent="The primary text color of the report.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function _de(e){let t;return{c(){t=Le("Strategy Tax Saving Options")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function pde(e){let t,n,i,r,a;return i=new i_({props:{bookmark:"pdfStrategyDetails",$$slots:{default:[_de]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=Le(`The color of the Max Deduction notice, located within the
        `),re(i.$$.fragment),r=Le(" section."),w(t,"slot","description")},m(s,o){ce(s,t,o),m(t,n),ae(i,t,null),m(t,r),a=!0},p(s,o){const l={};o&4194304&&(l.$$scope={dirty:o,ctx:s}),i.$set(l)},i(s){a||(U(i.$$.fragment,s),a=!0)},o(s){W(i.$$.fragment,s),a=!1},d(s){s&&_e(t),se(i)}}}function hde(e){let t;return{c(){t=P("div"),t.textContent="The color of the text used on dark surfaces.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function mde(e){let t;return{c(){t=P("div"),t.textContent="The color of the text for elements indicating profit.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function gde(e){let t;return{c(){t=Le("Top 3 Strategy Picks")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function vde(e){let t,n,i,r,a;return i=new i_({props:{bookmark:"pdfTop3StrategyPicks",$$slots:{default:[gde]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=Le(`The green color is chosen to ensure visibility on dark blocks. It is utilized in
        `),re(i.$$.fragment),r=Le(' ("would save tax dollars").'),w(t,"slot","description")},m(s,o){ce(s,t,o),m(t,n),ae(i,t,null),m(t,r),a=!0},p(s,o){const l={};o&4194304&&(l.$$scope={dirty:o,ctx:s}),i.$set(l)},i(s){a||(U(i.$$.fragment,s),a=!0)},o(s){W(i.$$.fragment,s),a=!1},d(s){s&&_e(t),se(i)}}}function bde(e){let t;return{c(){t=P("div"),t.textContent="The color of the text for elements indicating losses.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function yde(e){let t;return{c(){t=P("div"),t.textContent="The primary background color of the report.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function wde(e){let t;return{c(){t=Le("Tax Projection Summary")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Tde(e){let t;return{c(){t=Le("Strategy Details sections")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function kde(e){let t,n,i,r,a,s,o;return i=new i_({props:{bookmark:"pdfTaxProjectionSummary",$$slots:{default:[wde]},$$scope:{ctx:e}}}),a=new i_({props:{bookmark:"pdfStrategyDetails",$$slots:{default:[Tde]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=Le(`It is utilized in
        `),re(i.$$.fragment),r=Le(` (last page of the section)
        and
        `),re(a.$$.fragment),s=Le(` (what it is items color, ratings
        color, subheadings background).`),w(t,"slot","description")},m(l,d){ce(l,t,d),m(t,n),ae(i,t,null),m(t,r),ae(a,t,null),m(t,s),o=!0},p(l,d){const c={};d&4194304&&(c.$$scope={dirty:d,ctx:l}),i.$set(c);const v={};d&4194304&&(v.$$scope={dirty:d,ctx:l}),a.$set(v)},i(l){o||(U(i.$$.fragment,l),U(a.$$.fragment,l),o=!0)},o(l){W(i.$$.fragment,l),W(a.$$.fragment,l),o=!1},d(l){l&&_e(t),se(i),se(a)}}}function Sde(e){let t;return{c(){t=Le("Traditional and ROTH IRA")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Cde(e){let t;return{c(){t=Le("Important Tax Return Due Dates")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Pde(e){let t,n,i,r,a,s,o;return i=new i_({props:{bookmark:"pdfTraditionalRothIra",$$slots:{default:[Sde]},$$scope:{ctx:e}}}),a=new i_({props:{bookmark:"pdfImportantTaxReturnDueDates",$$slots:{default:[Cde]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=Le(`It is utilized in
        `),re(i.$$.fragment),r=Le(` ("Contributions" text) and
        `),re(a.$$.fragment),s=Le(` ("Personal
        Estimated Tax Payments" heading and table).`),w(t,"slot","description")},m(l,d){ce(l,t,d),m(t,n),ae(i,t,null),m(t,r),ae(a,t,null),m(t,s),o=!0},p(l,d){const c={};d&4194304&&(c.$$scope={dirty:d,ctx:l}),i.$set(c);const v={};d&4194304&&(v.$$scope={dirty:d,ctx:l}),a.$set(v)},i(l){o||(U(i.$$.fragment,l),U(a.$$.fragment,l),o=!0)},o(l){W(i.$$.fragment,l),W(a.$$.fragment,l),o=!1},d(l){l&&_e(t),se(i),se(a)}}}function Ede(e){let t;return{c(){t=P("div"),t.textContent="The primary text color of the report.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Ide(e){let t;return{c(){t=P("div"),t.textContent="The color of the text used on dark surfaces.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Ade(e){let t;return{c(){t=P("div"),t.textContent="The color of the text for elements indicating profit.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Dde(e){let t;return{c(){t=Le("Top 3 Strategy Picks")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Ode(e){let t,n,i,r,a;return i=new i_({props:{bookmark:"pdfTop3StrategyPicks",$$slots:{default:[Dde]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=Le(`The green color is chosen to ensure visibility on dark blocks. It is utilized in
        `),re(i.$$.fragment),r=Le(' ("would save tax dollars").'),w(t,"slot","description")},m(s,o){ce(s,t,o),m(t,n),ae(i,t,null),m(t,r),a=!0},p(s,o){const l={};o&4194304&&(l.$$scope={dirty:o,ctx:s}),i.$set(l)},i(s){a||(U(i.$$.fragment,s),a=!0)},o(s){W(i.$$.fragment,s),a=!1},d(s){s&&_e(t),se(i)}}}function Mde(e){let t;return{c(){t=P("div"),t.textContent="The color of the text for elements indicating losses.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function xde(e){let t;return{c(){t=P("div"),t.textContent="The primary background color of the report.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Rde(e){let t;return{c(){t=P("div"),t.textContent="The secondary background color of the report.",w(t,"slot","description")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function $de(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je;function pt(St){e[5](St)}let Tt={specTreeNodeId:"layout_name",title:"Name",options:e[4],hidden:e[3].isHidden("Name")};e[0].layout_name!==void 0&&(Tt.value=e[0].layout_name),t=new Ml({props:Tt}),Oe.push(()=>$e(t,"value",pt));function it(St){e[6](St)}let Ge={specTreeNodeId:"layout_violet_color_text_primary",defaultValue:"000000",hidden:!e[2]||e[3].isHidden("Primary"),$$slots:{description:[cde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_primary!==void 0&&(Ge.value=e[0].layout_violet_color_text_primary),r=new Oo({props:Ge}),Oe.push(()=>$e(r,"value",it));function st(St){e[7](St)}let It={specTreeNodeId:"layout_violet_color_text_secondary",defaultValue:"231f20",hidden:!e[2]||e[3].isHidden("Secondary"),$$slots:{description:[pde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_secondary!==void 0&&(It.value=e[0].layout_violet_color_text_secondary),o=new Oo({props:It}),Oe.push(()=>$e(o,"value",st));function Ct(St){e[8](St)}let bt={specTreeNodeId:"layout_violet_color_text_reverse",defaultValue:"ffffff",hidden:!e[2]||e[3].isHidden("Light"),$$slots:{description:[hde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_reverse!==void 0&&(bt.value=e[0].layout_violet_color_text_reverse),c=new Oo({props:bt}),Oe.push(()=>$e(c,"value",Ct));function Rt(St){e[9](St)}let cn={specTreeNodeId:"layout_violet_color_text_green",defaultValue:"299154",hidden:!e[2]||e[3].isHidden("Profit"),$$slots:{description:[mde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_green!==void 0&&(cn.value=e[0].layout_violet_color_text_green),b=new Oo({props:cn}),Oe.push(()=>$e(b,"value",Rt));function nn(St){e[10](St)}let Qe={specTreeNodeId:"layout_violet_color_text_green_light",defaultValue:"85cf42",hidden:!e[2]||e[3].isHidden("Profit (on dark background)"),$$slots:{description:[vde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_green_light!==void 0&&(Qe.value=e[0].layout_violet_color_text_green_light),y=new Oo({props:Qe}),Oe.push(()=>$e(y,"value",nn));function Ft(St){e[11](St)}let Fn={specTreeNodeId:"layout_violet_color_text_red",defaultValue:"bb2e19",hidden:!e[2]||e[3].isHidden("Losses"),$$slots:{description:[bde]},$$scope:{ctx:e}};e[0].layout_violet_color_text_red!==void 0&&(Fn.value=e[0].layout_violet_color_text_red),O=new Oo({props:Fn}),Oe.push(()=>$e(O,"value",Ft));function He(St){e[12](St)}let Dt={specTreeNodeId:"layout_violet_color_bg_primary",defaultValue:"291d56",hidden:!e[2]||e[3].isHidden("Primary Background"),$$slots:{description:[yde]},$$scope:{ctx:e}};e[0].layout_violet_color_bg_primary!==void 0&&(Dt.value=e[0].layout_violet_color_bg_primary),$=new Oo({props:Dt}),Oe.push(()=>$e($,"value",He));function Xt(St){e[13](St)}let Mt={specTreeNodeId:"layout_violet_color_bg_secondary",defaultValue:"8b4da6",hidden:!e[2]||e[3].isHidden("Secondary Background"),$$slots:{description:[kde]},$$scope:{ctx:e}};e[0].layout_violet_color_bg_secondary!==void 0&&(Mt.value=e[0].layout_violet_color_bg_secondary),H=new Oo({props:Mt}),Oe.push(()=>$e(H,"value",Xt));function Xe(St){e[14](St)}let Nt={specTreeNodeId:"layout_violet_color_bg_tertiary",defaultValue:"a65892",hidden:!e[2]||e[3].isHidden("Tertiary Background"),$$slots:{description:[Pde]},$$scope:{ctx:e}};e[0].layout_violet_color_bg_tertiary!==void 0&&(Nt.value=e[0].layout_violet_color_bg_tertiary),X=new Oo({props:Nt}),Oe.push(()=>$e(X,"value",Xe));function on(St){e[15](St)}let In={specTreeNodeId:"layout_orange_color_text_primary",defaultValue:"000000",hidden:!e[1]||e[3].isHidden("Primary"),$$slots:{description:[Ede]},$$scope:{ctx:e}};e[0].layout_orange_color_text_primary!==void 0&&(In.value=e[0].layout_orange_color_text_primary),be=new Oo({props:In}),Oe.push(()=>$e(be,"value",on));function dt(St){e[16](St)}let Zt={specTreeNodeId:"layout_orange_color_text_reverse",defaultValue:"ffffff",hidden:!e[1]||e[3].isHidden("Light"),$$slots:{description:[Ide]},$$scope:{ctx:e}};e[0].layout_orange_color_text_reverse!==void 0&&(Zt.value=e[0].layout_orange_color_text_reverse),ie=new Oo({props:Zt}),Oe.push(()=>$e(ie,"value",dt));function Ln(St){e[17](St)}let xn={specTreeNodeId:"layout_orange_color_text_green",defaultValue:"299154",hidden:!e[1]||e[3].isHidden("Profit"),$$slots:{description:[Ade]},$$scope:{ctx:e}};e[0].layout_orange_color_text_green!==void 0&&(xn.value=e[0].layout_orange_color_text_green),Me=new Oo({props:xn}),Oe.push(()=>$e(Me,"value",Ln));function Dn(St){e[18](St)}let Un={specTreeNodeId:"layout_orange_color_text_green_light",defaultValue:"177648",hidden:!e[1]||e[3].isHidden("Profit (on dark background)"),$$slots:{description:[Ode]},$$scope:{ctx:e}};e[0].layout_orange_color_text_green_light!==void 0&&(Un.value=e[0].layout_orange_color_text_green_light),qe=new Oo({props:Un}),Oe.push(()=>$e(qe,"value",Dn));function qn(St){e[19](St)}let ft={specTreeNodeId:"layout_orange_color_text_red",defaultValue:"bb2e19",hidden:!e[1]||e[3].isHidden("Losses"),$$slots:{description:[Mde]},$$scope:{ctx:e}};e[0].layout_orange_color_text_red!==void 0&&(ft.value=e[0].layout_orange_color_text_red),me=new Oo({props:ft}),Oe.push(()=>$e(me,"value",qn));function ni(St){e[20](St)}let Et={specTreeNodeId:"layout_orange_color_bg_primary",defaultValue:"f05d22",hidden:!e[1]||e[3].isHidden("Primary Background"),$$slots:{description:[xde]},$$scope:{ctx:e}};e[0].layout_orange_color_bg_primary!==void 0&&(Et.value=e[0].layout_orange_color_bg_primary),we=new Oo({props:Et}),Oe.push(()=>$e(we,"value",ni));function un(St){e[21](St)}let Ai={specTreeNodeId:"layout_orange_color_bg_secondary",defaultValue:"f3d362",hidden:!e[1]||e[3].isHidden("Secondary Background"),$$slots:{description:[Rde]},$$scope:{ctx:e}};return e[0].layout_orange_color_bg_secondary!==void 0&&(Ai.value=e[0].layout_orange_color_bg_secondary),yt=new Oo({props:Ai}),Oe.push(()=>$e(yt,"value",un)),{c(){re(t.$$.fragment),i=K(),re(r.$$.fragment),s=K(),re(o.$$.fragment),d=K(),re(c.$$.fragment),T=K(),re(b.$$.fragment),E=K(),re(y.$$.fragment),D=K(),re(O.$$.fragment),F=K(),re($.$$.fragment),j=K(),re(H.$$.fragment),Q=K(),re(X.$$.fragment),ne=K(),re(be.$$.fragment),Ce=K(),re(ie.$$.fragment),he=K(),re(Me.$$.fragment),We=K(),re(qe.$$.fragment),G=K(),re(me.$$.fragment),De=K(),re(we.$$.fragment),Ke=K(),re(yt.$$.fragment)},m(St,sn){ae(t,St,sn),ce(St,i,sn),ae(r,St,sn),ce(St,s,sn),ae(o,St,sn),ce(St,d,sn),ae(c,St,sn),ce(St,T,sn),ae(b,St,sn),ce(St,E,sn),ae(y,St,sn),ce(St,D,sn),ae(O,St,sn),ce(St,F,sn),ae($,St,sn),ce(St,j,sn),ae(H,St,sn),ce(St,Q,sn),ae(X,St,sn),ce(St,ne,sn),ae(be,St,sn),ce(St,Ce,sn),ae(ie,St,sn),ce(St,he,sn),ae(Me,St,sn),ce(St,We,sn),ae(qe,St,sn),ce(St,G,sn),ae(me,St,sn),ce(St,De,sn),ae(we,St,sn),ce(St,Ke,sn),ae(yt,St,sn),Je=!0},p(St,sn){const ci={};sn&8&&(ci.hidden=St[3].isHidden("Name")),!n&&sn&1&&(n=!0,ci.value=St[0].layout_name,Ne(()=>n=!1)),t.$set(ci);const pi={};sn&12&&(pi.hidden=!St[2]||St[3].isHidden("Primary")),sn&4194304&&(pi.$$scope={dirty:sn,ctx:St}),!a&&sn&1&&(a=!0,pi.value=St[0].layout_violet_color_text_primary,Ne(()=>a=!1)),r.$set(pi);const Pi={};sn&12&&(Pi.hidden=!St[2]||St[3].isHidden("Secondary")),sn&4194304&&(Pi.$$scope={dirty:sn,ctx:St}),!l&&sn&1&&(l=!0,Pi.value=St[0].layout_violet_color_text_secondary,Ne(()=>l=!1)),o.$set(Pi);const $i={};sn&12&&($i.hidden=!St[2]||St[3].isHidden("Light")),sn&4194304&&($i.$$scope={dirty:sn,ctx:St}),!v&&sn&1&&(v=!0,$i.value=St[0].layout_violet_color_text_reverse,Ne(()=>v=!1)),c.$set($i);const ji={};sn&12&&(ji.hidden=!St[2]||St[3].isHidden("Profit")),sn&4194304&&(ji.$$scope={dirty:sn,ctx:St}),!A&&sn&1&&(A=!0,ji.value=St[0].layout_violet_color_text_green,Ne(()=>A=!1)),b.$set(ji);const ri={};sn&12&&(ri.hidden=!St[2]||St[3].isHidden("Profit (on dark background)")),sn&4194304&&(ri.$$scope={dirty:sn,ctx:St}),!I&&sn&1&&(I=!0,ri.value=St[0].layout_violet_color_text_green_light,Ne(()=>I=!1)),y.$set(ri);const tr={};sn&12&&(tr.hidden=!St[2]||St[3].isHidden("Losses")),sn&4194304&&(tr.$$scope={dirty:sn,ctx:St}),!M&&sn&1&&(M=!0,tr.value=St[0].layout_violet_color_text_red,Ne(()=>M=!1)),O.$set(tr);const Ei={};sn&12&&(Ei.hidden=!St[2]||St[3].isHidden("Primary Background")),sn&4194304&&(Ei.$$scope={dirty:sn,ctx:St}),!L&&sn&1&&(L=!0,Ei.value=St[0].layout_violet_color_bg_primary,Ne(()=>L=!1)),$.$set(Ei);const Ti={};sn&12&&(Ti.hidden=!St[2]||St[3].isHidden("Secondary Background")),sn&4194304&&(Ti.$$scope={dirty:sn,ctx:St}),!V&&sn&1&&(V=!0,Ti.value=St[0].layout_violet_color_bg_secondary,Ne(()=>V=!1)),H.$set(Ti);const kn={};sn&12&&(kn.hidden=!St[2]||St[3].isHidden("Tertiary Background")),sn&4194304&&(kn.$$scope={dirty:sn,ctx:St}),!te&&sn&1&&(te=!0,kn.value=St[0].layout_violet_color_bg_tertiary,Ne(()=>te=!1)),X.$set(kn);const Rn={};sn&10&&(Rn.hidden=!St[1]||St[3].isHidden("Primary")),sn&4194304&&(Rn.$$scope={dirty:sn,ctx:St}),!ue&&sn&1&&(ue=!0,Rn.value=St[0].layout_orange_color_text_primary,Ne(()=>ue=!1)),be.$set(Rn);const ki={};sn&10&&(ki.hidden=!St[1]||St[3].isHidden("Light")),sn&4194304&&(ki.$$scope={dirty:sn,ctx:St}),!Y&&sn&1&&(Y=!0,ki.value=St[0].layout_orange_color_text_reverse,Ne(()=>Y=!1)),ie.$set(ki);const mr={};sn&10&&(mr.hidden=!St[1]||St[3].isHidden("Profit")),sn&4194304&&(mr.$$scope={dirty:sn,ctx:St}),!Pe&&sn&1&&(Pe=!0,mr.value=St[0].layout_orange_color_text_green,Ne(()=>Pe=!1)),Me.$set(mr);const _r={};sn&10&&(_r.hidden=!St[1]||St[3].isHidden("Profit (on dark background)")),sn&4194304&&(_r.$$scope={dirty:sn,ctx:St}),!ee&&sn&1&&(ee=!0,_r.value=St[0].layout_orange_color_text_green_light,Ne(()=>ee=!1)),qe.$set(_r);const Mi={};sn&10&&(Mi.hidden=!St[1]||St[3].isHidden("Losses")),sn&4194304&&(Mi.$$scope={dirty:sn,ctx:St}),!Te&&sn&1&&(Te=!0,Mi.value=St[0].layout_orange_color_text_red,Ne(()=>Te=!1)),me.$set(Mi);const di={};sn&10&&(di.hidden=!St[1]||St[3].isHidden("Primary Background")),sn&4194304&&(di.$$scope={dirty:sn,ctx:St}),!Ve&&sn&1&&(Ve=!0,di.value=St[0].layout_orange_color_bg_primary,Ne(()=>Ve=!1)),we.$set(di);const Yi={};sn&10&&(Yi.hidden=!St[1]||St[3].isHidden("Secondary Background")),sn&4194304&&(Yi.$$scope={dirty:sn,ctx:St}),!ht&&sn&1&&(ht=!0,Yi.value=St[0].layout_orange_color_bg_secondary,Ne(()=>ht=!1)),yt.$set(Yi)},i(St){Je||(U(t.$$.fragment,St),U(r.$$.fragment,St),U(o.$$.fragment,St),U(c.$$.fragment,St),U(b.$$.fragment,St),U(y.$$.fragment,St),U(O.$$.fragment,St),U($.$$.fragment,St),U(H.$$.fragment,St),U(X.$$.fragment,St),U(be.$$.fragment,St),U(ie.$$.fragment,St),U(Me.$$.fragment,St),U(qe.$$.fragment,St),U(me.$$.fragment,St),U(we.$$.fragment,St),U(yt.$$.fragment,St),Je=!0)},o(St){W(t.$$.fragment,St),W(r.$$.fragment,St),W(o.$$.fragment,St),W(c.$$.fragment,St),W(b.$$.fragment,St),W(y.$$.fragment,St),W(O.$$.fragment,St),W($.$$.fragment,St),W(H.$$.fragment,St),W(X.$$.fragment,St),W(be.$$.fragment,St),W(ie.$$.fragment,St),W(Me.$$.fragment,St),W(qe.$$.fragment,St),W(me.$$.fragment,St),W(we.$$.fragment,St),W(yt.$$.fragment,St),Je=!1},d(St){se(t,St),St&&_e(i),se(r,St),St&&_e(s),se(o,St),St&&_e(d),se(c,St),St&&_e(T),se(b,St),St&&_e(E),se(y,St),St&&_e(D),se(O,St),St&&_e(F),se($,St),St&&_e(j),se(H,St),St&&_e(Q),se(X,St),St&&_e(ne),se(be,St),St&&_e(Ce),se(ie,St),St&&_e(he),se(Me,St),St&&_e(We),se(qe,St),St&&_e(G),se(me,St),St&&_e(De),se(we,St),St&&_e(Ke),se(yt,St)}}}function Nde(e){let t,n;return t=new Ci({props:{specTreeNodeId:"layout_params",hidden:e[3].isHidden("Layout"),$$slots:{default:[$de]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,[r]){const a={};r&8&&(a.hidden=i[3].isHidden("Layout")),r&4194319&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Fde(e,t,n){let i,r,a,s;Sn(e,Ye,H=>n(0,a=H)),Sn(e,Fl,H=>n(3,s=H));const o={default:"Template 1 - Original",violet:"Template 2 - Minimalist",orange:"Template 3 - Transitional"};function l(H){e.$$.not_equal(a.layout_name,H)&&(a.layout_name=H,Ye.set(a))}function d(H){e.$$.not_equal(a.layout_violet_color_text_primary,H)&&(a.layout_violet_color_text_primary=H,Ye.set(a))}function c(H){e.$$.not_equal(a.layout_violet_color_text_secondary,H)&&(a.layout_violet_color_text_secondary=H,Ye.set(a))}function v(H){e.$$.not_equal(a.layout_violet_color_text_reverse,H)&&(a.layout_violet_color_text_reverse=H,Ye.set(a))}function T(H){e.$$.not_equal(a.layout_violet_color_text_green,H)&&(a.layout_violet_color_text_green=H,Ye.set(a))}function b(H){e.$$.not_equal(a.layout_violet_color_text_green_light,H)&&(a.layout_violet_color_text_green_light=H,Ye.set(a))}function A(H){e.$$.not_equal(a.layout_violet_color_text_red,H)&&(a.layout_violet_color_text_red=H,Ye.set(a))}function E(H){e.$$.not_equal(a.layout_violet_color_bg_primary,H)&&(a.layout_violet_color_bg_primary=H,Ye.set(a))}function y(H){e.$$.not_equal(a.layout_violet_color_bg_secondary,H)&&(a.layout_violet_color_bg_secondary=H,Ye.set(a))}function I(H){e.$$.not_equal(a.layout_violet_color_bg_tertiary,H)&&(a.layout_violet_color_bg_tertiary=H,Ye.set(a))}function D(H){e.$$.not_equal(a.layout_orange_color_text_primary,H)&&(a.layout_orange_color_text_primary=H,Ye.set(a))}function O(H){e.$$.not_equal(a.layout_orange_color_text_reverse,H)&&(a.layout_orange_color_text_reverse=H,Ye.set(a))}function M(H){e.$$.not_equal(a.layout_orange_color_text_green,H)&&(a.layout_orange_color_text_green=H,Ye.set(a))}function F(H){e.$$.not_equal(a.layout_orange_color_text_green_light,H)&&(a.layout_orange_color_text_green_light=H,Ye.set(a))}function $(H){e.$$.not_equal(a.layout_orange_color_text_red,H)&&(a.layout_orange_color_text_red=H,Ye.set(a))}function L(H){e.$$.not_equal(a.layout_orange_color_bg_primary,H)&&(a.layout_orange_color_bg_primary=H,Ye.set(a))}function j(H){e.$$.not_equal(a.layout_orange_color_bg_secondary,H)&&(a.layout_orange_color_bg_secondary=H,Ye.set(a))}return e.$$.update=()=>{e.$$.dirty&1&&n(2,i=a.layout_name==="violet"),e.$$.dirty&1&&n(1,r=a.layout_name==="orange")},[a,r,i,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j]}class Lde extends Qt{constructor(t){super(),Jt(this,t,Fde,Nde,Kt,{})}}function GP(e){let t,n;return t=new xd({props:{refreshReportParams:e[3],specTreeNodeId:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&8&&(a.refreshReportParams=i[3]),r&4&&(a.specTreeNodeId=i[2]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Hde(e){let t,n,i,r,a,s=e[4].title+"",o,l,d,c,v,T;l=new Rd({props:{param:e[2]}});let b=e[4].updatable&&GP(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),b&&b.c(),d=P("input"),w(a,"class","report_option__title"),w(a,"for",e[5]),w(r,"class","report_option"),w(d,"class","form-control"),w(d,"id",e[5]),w(d,"type","text"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(A,E){ce(A,t,E),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),b&&b.m(r,null),m(i,d),Pn(d,e[0]),c=!0,v||(T=ct(d,"input",e[7]),v=!0)},p(A,[E]){(!c||E&16)&&s!==(s=A[4].title+"")&&vt(o,s);const y={};E&4&&(y.param=A[2]),l.$set(y),A[4].updatable?b?(b.p(A,E),E&16&&U(b,1)):(b=GP(A),b.c(),U(b,1),b.m(r,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn()),E&1&&d.value!==A[0]&&Pn(d,A[0]),(!c||E&2)&&(t.hidden=A[1])},i(A){c||(U(l.$$.fragment,A),U(b),c=!0)},o(A){W(l.$$.fragment,A),W(b),c=!1},d(A){A&&_e(t),se(l),b&&b.d(),v=!1,T()}}}function jde(e,t,n){let i,r;Sn(e,Dd,v=>n(6,r=v));let{value:a}=t,{hidden:s}=t,{specTreeNodeId:o}=t,{refreshReportParams:l}=t;const d="i"+Math.random().toString(16).substr(2,8);function c(){a=this.value,n(0,a)}return e.$$set=v=>{"value"in v&&n(0,a=v.value),"hidden"in v&&n(1,s=v.hidden),"specTreeNodeId"in v&&n(2,o=v.specTreeNodeId),"refreshReportParams"in v&&n(3,l=v.refreshReportParams)},e.$$.update=()=>{e.$$.dirty&68&&n(4,i=r&&o&&r[o])},[a,s,o,l,i,d,r,c]}let li=class extends Qt{constructor(t){super(),Jt(this,t,jde,Hde,Kt,{value:0,hidden:1,specTreeNodeId:2,refreshReportParams:3})}};function Bde(e){let t,n,i;function r(s){e[2](s)}let a={specTreeNodeId:"front_page_report_title",hidden:e[0].isHidden("Report Title")};return e[1].front_page_report_title!==void 0&&(a.value=e[1].front_page_report_title),t=new li({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o&1&&(l.hidden=s[0].isHidden("Report Title")),!n&&o&2&&(n=!0,l.value=s[1].front_page_report_title,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Ude(e){let t,n;return t=new Ci({props:{specTreeNodeId:"general_params",hidden:e[0].isHidden("Report Title"),$$slots:{default:[Bde]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,[r]){const a={};r&1&&(a.hidden=i[0].isHidden("Report Title")),r&11&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function qde(e,t,n){let i,r;Sn(e,Fl,s=>n(0,i=s)),Sn(e,Ye,s=>n(1,r=s));function a(s){e.$$.not_equal(r.front_page_report_title,s)&&(r.front_page_report_title=s,Ye.set(r))}return[i,r,a]}class Wde extends Qt{constructor(t){super(),Jt(this,t,qde,Ude,Kt,{})}}function KP(e){let t,n;return t=new xd({props:{refreshReportParams:e[2],specTreeNodeId:e[1]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.refreshReportParams=i[2]),r&2&&(a.specTreeNodeId=i[1]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Vde(e){let t,n,i,r,a,s=(e[5].title||"Date")+"",o,l,d,c,v,T;l=new Rd({props:{param:e[1]}});let b=e[5].updatable&&KP(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),b&&b.c(),d=P("div"),c=P("input"),v=P("div"),v.innerHTML='<span class="input-group-text border-left-0 rounded-right"><i class="fa fa-calendar"></i></span>',w(a,"class","report_option__title"),w(a,"for",e[6]),w(r,"class","report_option"),w(c,"class","form-control"),w(c,"id",e[6]),w(v,"class","input-group-prepend"),w(d,"class","input-group date"),w(d,"data-provide","datepicker"),w(d,"data-format",e[3]),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[0]},m(A,E){ce(A,t,E),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),b&&b.m(r,null),m(i,d),m(d,c),m(d,v),e[9](d),T=!0},p(A,[E]){(!T||E&32)&&s!==(s=(A[5].title||"Date")+"")&&vt(o,s);const y={};E&2&&(y.param=A[1]),l.$set(y),A[5].updatable?b?(b.p(A,E),E&32&&U(b,1)):(b=KP(A),b.c(),U(b,1),b.m(r,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn()),(!T||E&8)&&w(d,"data-format",A[3]),(!T||E&1)&&(t.hidden=A[0])},i(A){T||(U(l.$$.fragment,A),U(b),T=!0)},o(A){W(l.$$.fragment,A),W(b),T=!1},d(A){A&&_e(t),se(l),b&&b.d(),e[9](null)}}}function zde(e,t,n){let i,r;Sn(e,Dd,b=>n(8,r=b));let{value:a}=t,{hidden:s}=t,{specTreeNodeId:o}=t,{refreshReportParams:l}=t,{dateFormat:d="mm/dd/yyyy"}=t,c;const v=Math.random().toString(16).substr(2,8);oa(()=>{const b=window.$(c);b.datepicker({autoclose:!0,language:"en",...d?{format:d}:{}}),b.on("changeDate",function(){n(7,a=b.datepicker("getFormattedDate"))})});function T(b){Oe[b?"unshift":"push"](()=>{c=b,n(4,c)})}return e.$$set=b=>{"value"in b&&n(7,a=b.value),"hidden"in b&&n(0,s=b.hidden),"specTreeNodeId"in b&&n(1,o=b.specTreeNodeId),"refreshReportParams"in b&&n(2,l=b.refreshReportParams),"dateFormat"in b&&n(3,d=b.dateFormat)},e.$$.update=()=>{e.$$.dirty&258&&n(5,i=r&&o&&r[o]),e.$$.dirty&144&&window.$(c).datepicker("update",a)},[s,o,l,d,c,i,v,a,r,T]}class Hp extends Qt{constructor(t){super(),Jt(this,t,zde,Vde,Kt,{value:7,hidden:0,specTreeNodeId:1,refreshReportParams:2,dateFormat:3})}}function Yde(e){let t,n,i,r,a,s,o=e[3].title+"",l,d,c,v,T;return d=new Rd({props:{param:e[2]}}),{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("input"),s=P("div"),l=Le(o),re(d.$$.fragment),w(a,"type","checkbox"),w(r,"class","report_option__checkbox"),w(s,"class","report_option__title"),w(i,"class","report_option__title-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(b,A){ce(b,t,A),m(t,n),m(n,i),m(i,r),m(r,a),a.checked=e[0],m(i,s),m(s,l),ae(d,i,null),c=!0,v||(T=ct(a,"change",e[5]),v=!0)},p(b,[A]){A&1&&(a.checked=b[0]),(!c||A&8)&&o!==(o=b[3].title+"")&&vt(l,o);const E={};A&4&&(E.param=b[2]),d.$set(E),(!c||A&2)&&(t.hidden=b[1])},i(b){c||(U(d.$$.fragment,b),c=!0)},o(b){W(d.$$.fragment,b),c=!1},d(b){b&&_e(t),se(d),v=!1,T()}}}function Gde(e,t,n){let i,r;Sn(e,Dd,d=>n(4,r=d));let{checked:a}=t,{hidden:s}=t,{specTreeNodeId:o}=t;function l(){a=this.checked,n(0,a)}return e.$$set=d=>{"checked"in d&&n(0,a=d.checked),"hidden"in d&&n(1,s=d.hidden),"specTreeNodeId"in d&&n(2,o=d.specTreeNodeId)},e.$$.update=()=>{e.$$.dirty&20&&n(3,i=r&&o&&r[o])},[a,s,o,i,r,l]}let O$=class extends Qt{constructor(t){super(),Jt(this,t,Gde,Yde,Kt,{checked:0,hidden:1,specTreeNodeId:2})}};function Kde(e){let t,n,i,r,a,s,o,l,d;function c(D){e[3](D)}let v={refreshReportParams:e[0],specTreeNodeId:"front_page_prepared_for_organization",hidden:e[2].isHidden("Prepared for")};e[1].front_page_prepared_for_organization!==void 0&&(v.value=e[1].front_page_prepared_for_organization),t=new li({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[4](D)}let b={refreshReportParams:e[0],specTreeNodeId:"front_page_prepared_by_organization",hidden:e[2].isHidden("Prepared by")};e[1].front_page_prepared_by_organization!==void 0&&(b.value=e[1].front_page_prepared_by_organization),i=new li({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[5](D)}let E={refreshReportParams:e[0],specTreeNodeId:"front_page_date",hidden:e[2].isHidden("Preparation Date")};e[1].front_page_date!==void 0&&(E.value=e[1].front_page_date),a=new Hp({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[6](D)}let I={specTreeNodeId:"front_page_center_image_enable",hidden:e[2].isHidden("Show front page image")};return e[1].front_page_center_image_enable!==void 0&&(I.checked=e[1].front_page_center_image_enable),o=new O$({props:I}),Oe.push(()=>$e(o,"checked",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){const M={};O&1&&(M.refreshReportParams=D[0]),O&4&&(M.hidden=D[2].isHidden("Prepared for")),!n&&O&2&&(n=!0,M.value=D[1].front_page_prepared_for_organization,Ne(()=>n=!1)),t.$set(M);const F={};O&1&&(F.refreshReportParams=D[0]),O&4&&(F.hidden=D[2].isHidden("Prepared by")),!r&&O&2&&(r=!0,F.value=D[1].front_page_prepared_by_organization,Ne(()=>r=!1)),i.$set(F);const $={};O&1&&($.refreshReportParams=D[0]),O&4&&($.hidden=D[2].isHidden("Preparation Date")),!s&&O&2&&(s=!0,$.value=D[1].front_page_date,Ne(()=>s=!1)),a.$set($);const L={};O&4&&(L.hidden=D[2].isHidden("Show front page image")),!l&&O&2&&(l=!0,L.checked=D[1].front_page_center_image_enable,Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function Xde(e){let t,n,i;function r(s){e[7](s)}let a={refreshReportParams:e[0],specTreeNodeId:"front_page_enable",hidden:e[2].isHidden("Front Page"),scrollToId:"pdfFrontPage",$$slots:{default:[Kde]},$$scope:{ctx:e}};return e[1].front_page_enable!==void 0&&(a.checked=e[1].front_page_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&1&&(l.refreshReportParams=s[0]),o&4&&(l.hidden=s[2].isHidden("Front Page")),o&263&&(l.$$scope={dirty:o,ctx:s}),!n&&o&2&&(n=!0,l.checked=s[1].front_page_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Qde(e,t,n){let i,r;Sn(e,Ye,v=>n(1,i=v)),Sn(e,Fl,v=>n(2,r=v));let{refreshReportParams:a}=t;function s(v){e.$$.not_equal(i.front_page_prepared_for_organization,v)&&(i.front_page_prepared_for_organization=v,Ye.set(i))}function o(v){e.$$.not_equal(i.front_page_prepared_by_organization,v)&&(i.front_page_prepared_by_organization=v,Ye.set(i))}function l(v){e.$$.not_equal(i.front_page_date,v)&&(i.front_page_date=v,Ye.set(i))}function d(v){e.$$.not_equal(i.front_page_center_image_enable,v)&&(i.front_page_center_image_enable=v,Ye.set(i))}function c(v){e.$$.not_equal(i.front_page_enable,v)&&(i.front_page_enable=v,Ye.set(i))}return e.$$set=v=>{"refreshReportParams"in v&&n(0,a=v.refreshReportParams)},[a,i,r,s,o,l,d,c]}class Jde extends Qt{constructor(t){super(),Jt(this,t,Qde,Xde,Kt,{refreshReportParams:0})}}function XP(e){let t,n;return t=new xd({props:{refreshReportParams:e[3],specTreeNodeId:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&8&&(a.refreshReportParams=i[3]),r&4&&(a.specTreeNodeId=i[2]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Zde(e){let t,n,i,r,a,s=e[4].title+"",o,l,d,c,v,T;l=new Rd({props:{param:e[2]}});let b=e[4].updatable&&XP(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),b&&b.c(),d=P("textarea"),w(a,"class","report_option__title"),w(a,"for",e[5]),w(r,"class","report_option"),w(d,"class","form-control"),w(d,"id",e[5]),w(d,"rows","5"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(A,E){ce(A,t,E),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),b&&b.m(r,null),m(i,d),Pn(d,e[0]),c=!0,v||(T=ct(d,"input",e[7]),v=!0)},p(A,[E]){(!c||E&16)&&s!==(s=A[4].title+"")&&vt(o,s);const y={};E&4&&(y.param=A[2]),l.$set(y),A[4].updatable?b?(b.p(A,E),E&16&&U(b,1)):(b=XP(A),b.c(),U(b,1),b.m(r,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn()),E&1&&Pn(d,A[0]),(!c||E&2)&&(t.hidden=A[1])},i(A){c||(U(l.$$.fragment,A),U(b),c=!0)},o(A){W(l.$$.fragment,A),W(b),c=!1},d(A){A&&_e(t),se(l),b&&b.d(),v=!1,T()}}}function efe(e,t,n){let i,r;Sn(e,Dd,v=>n(6,r=v));let{value:a}=t,{hidden:s}=t,{specTreeNodeId:o}=t,{refreshReportParams:l}=t;const d=Math.random().toString(16).substr(2,8);function c(){a=this.value,n(0,a)}return e.$$set=v=>{"value"in v&&n(0,a=v.value),"hidden"in v&&n(1,s=v.hidden),"specTreeNodeId"in v&&n(2,o=v.specTreeNodeId),"refreshReportParams"in v&&n(3,l=v.refreshReportParams)},e.$$.update=()=>{e.$$.dirty&68&&n(4,i=r&&o&&r[o])},[a,s,o,l,i,d,r,c]}class ta extends Qt{constructor(t){super(),Jt(this,t,efe,Zde,Kt,{value:0,hidden:1,specTreeNodeId:2,refreshReportParams:3})}}function tfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b;function A(V){e[2](V)}let E={specTreeNodeId:"abstract_introduction",hidden:e[1].isHidden("Introduction")};e[0].abstract_introduction!==void 0&&(E.value=e[0].abstract_introduction),t=new li({props:E}),Oe.push(()=>$e(t,"value",A));function y(V){e[3](V)}let I={specTreeNodeId:"abstract_title",hidden:e[1].isHidden("Title")};e[0].abstract_title!==void 0&&(I.value=e[0].abstract_title),i=new li({props:I}),Oe.push(()=>$e(i,"value",y));function D(V){e[4](V)}let O={specTreeNodeId:"abstract_inscription",hidden:e[1].isHidden("Inscription")};e[0].abstract_inscription!==void 0&&(O.value=e[0].abstract_inscription),a=new ta({props:O}),Oe.push(()=>$e(a,"value",D));function M(V){e[5](V)}let F={specTreeNodeId:"abstract_description",hidden:e[1].isHidden("Description")};e[0].abstract_description!==void 0&&(F.value=e[0].abstract_description),o=new ta({props:F}),Oe.push(()=>$e(o,"value",M));function $(V){e[6](V)}let L={specTreeNodeId:"abstract_postscript",hidden:e[1].isHidden("Postscript")};e[0].abstract_postscript!==void 0&&(L.value=e[0].abstract_postscript),d=new li({props:L}),Oe.push(()=>$e(d,"value",$));function j(V){e[7](V)}let H={specTreeNodeId:"abstract_post_postscript",hidden:e[1].isHidden("Post-postscript")};return e[0].abstract_post_postscript!==void 0&&(H.value=e[0].abstract_post_postscript),v=new li({props:H}),Oe.push(()=>$e(v,"value",j)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment)},m(V,Q){ae(t,V,Q),ae(i,V,Q),ae(a,V,Q),ae(o,V,Q),ae(d,V,Q),ae(v,V,Q),b=!0},p(V,Q){const X={};Q&2&&(X.hidden=V[1].isHidden("Introduction")),!n&&Q&1&&(n=!0,X.value=V[0].abstract_introduction,Ne(()=>n=!1)),t.$set(X);const te={};Q&2&&(te.hidden=V[1].isHidden("Title")),!r&&Q&1&&(r=!0,te.value=V[0].abstract_title,Ne(()=>r=!1)),i.$set(te);const ne={};Q&2&&(ne.hidden=V[1].isHidden("Inscription")),!s&&Q&1&&(s=!0,ne.value=V[0].abstract_inscription,Ne(()=>s=!1)),a.$set(ne);const be={};Q&2&&(be.hidden=V[1].isHidden("Description")),!l&&Q&1&&(l=!0,be.value=V[0].abstract_description,Ne(()=>l=!1)),o.$set(be);const ue={};Q&2&&(ue.hidden=V[1].isHidden("Postscript")),!c&&Q&1&&(c=!0,ue.value=V[0].abstract_postscript,Ne(()=>c=!1)),d.$set(ue);const Ce={};Q&2&&(Ce.hidden=V[1].isHidden("Post-postscript")),!T&&Q&1&&(T=!0,Ce.value=V[0].abstract_post_postscript,Ne(()=>T=!1)),v.$set(Ce)},i(V){b||(U(t.$$.fragment,V),U(i.$$.fragment,V),U(a.$$.fragment,V),U(o.$$.fragment,V),U(d.$$.fragment,V),U(v.$$.fragment,V),b=!0)},o(V){W(t.$$.fragment,V),W(i.$$.fragment,V),W(a.$$.fragment,V),W(o.$$.fragment,V),W(d.$$.fragment,V),W(v.$$.fragment,V),b=!1},d(V){se(t,V),se(i,V),se(a,V),se(o,V),se(d,V),se(v,V)}}}function nfe(e){let t,n,i;function r(s){e[8](s)}let a={specTreeNodeId:"abstract_enable",hidden:e[1].isHidden("Abstract"),scrollToId:"pdfAbstract",$$slots:{default:[tfe]},$$scope:{ctx:e}};return e[0].abstract_enable!==void 0&&(a.checked=e[0].abstract_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&2&&(l.hidden=s[1].isHidden("Abstract")),o&515&&(l.$$scope={dirty:o,ctx:s}),!n&&o&1&&(n=!0,l.checked=s[0].abstract_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function ife(e,t,n){let i,r;Sn(e,Ye,T=>n(0,i=T)),Sn(e,Fl,T=>n(1,r=T));function a(T){e.$$.not_equal(i.abstract_introduction,T)&&(i.abstract_introduction=T,Ye.set(i))}function s(T){e.$$.not_equal(i.abstract_title,T)&&(i.abstract_title=T,Ye.set(i))}function o(T){e.$$.not_equal(i.abstract_inscription,T)&&(i.abstract_inscription=T,Ye.set(i))}function l(T){e.$$.not_equal(i.abstract_description,T)&&(i.abstract_description=T,Ye.set(i))}function d(T){e.$$.not_equal(i.abstract_postscript,T)&&(i.abstract_postscript=T,Ye.set(i))}function c(T){e.$$.not_equal(i.abstract_post_postscript,T)&&(i.abstract_post_postscript=T,Ye.set(i))}function v(T){e.$$.not_equal(i.abstract_enable,T)&&(i.abstract_enable=T,Ye.set(i))}return[i,r,a,s,o,l,d,c,v]}class rfe extends Qt{constructor(t){super(),Jt(this,t,ife,nfe,Kt,{})}}function afe(e){let t,n,i;function r(s){e[2](s)}let a={specTreeNodeId:"introduction_grading_systems_enable",hidden:e[1].isHidden(JP)};return e[0].introduction_grading_systems_enable!==void 0&&(a.checked=e[0].introduction_grading_systems_enable),t=new O$({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o&2&&(l.hidden=s[1].isHidden(JP)),!n&&o&1&&(n=!0,l.checked=s[0].introduction_grading_systems_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function sfe(e){let t,n,i;function r(s){e[3](s)}let a={specTreeNodeId:"introduction_enable",hidden:e[1].isHidden(QP),scrollToId:"pdfIntroduction",$$slots:{default:[afe]},$$scope:{ctx:e}};return e[0].introduction_enable!==void 0&&(a.checked=e[0].introduction_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&2&&(l.hidden=s[1].isHidden(QP)),o&19&&(l.$$scope={dirty:o,ctx:s}),!n&&o&1&&(n=!0,l.checked=s[0].introduction_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}let QP="Introduction",JP="Explain Grading System";function ofe(e,t,n){let i,r;Sn(e,Ye,o=>n(0,i=o)),Sn(e,Fl,o=>n(1,r=o));function a(o){e.$$.not_equal(i.introduction_grading_systems_enable,o)&&(i.introduction_grading_systems_enable=o,Ye.set(i))}function s(o){e.$$.not_equal(i.introduction_enable,o)&&(i.introduction_enable=o,Ye.set(i))}return[i,r,a,s]}class lfe extends Qt{constructor(t){super(),Jt(this,t,ofe,sfe,Kt,{})}}function ZP(e){let t,n;return t=new xd({props:{refreshReportParams:e[3],specTreeNodeId:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&8&&(a.refreshReportParams=i[3]),r&4&&(a.specTreeNodeId=i[2]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function ufe(e){let t,n,i,r,a,s=e[4].title+"",o,l,d,c,v,T;l=new Rd({props:{param:e[2]}});let b=e[4].updatable&&ZP(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),b&&b.c(),d=P("input"),w(a,"class","report_option__title"),w(a,"for",e[5]),w(r,"class","report_option"),w(d,"class","form-control"),w(d,"id",e[5]),w(d,"type","number"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(A,E){ce(A,t,E),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),b&&b.m(r,null),m(i,d),Pn(d,e[0]),c=!0,v||(T=[ct(d,"input",e[8]),ct(d,"change",e[6])],v=!0)},p(A,[E]){(!c||E&16)&&s!==(s=A[4].title+"")&&vt(o,s);const y={};E&4&&(y.param=A[2]),l.$set(y),A[4].updatable?b?(b.p(A,E),E&16&&U(b,1)):(b=ZP(A),b.c(),U(b,1),b.m(r,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn()),E&1&&Ri(d.value)!==A[0]&&Pn(d,A[0]),(!c||E&2)&&(t.hidden=A[1])},i(A){c||(U(l.$$.fragment,A),U(b),c=!0)},o(A){W(l.$$.fragment,A),W(b),c=!1},d(A){A&&_e(t),se(l),b&&b.d(),v=!1,vi(T)}}}function dfe(e,t,n){let i,r;Sn(e,Dd,T=>n(7,r=T));let{value:a}=t,{hidden:s}=t,{specTreeNodeId:o}=t,{refreshReportParams:l}=t;const d=Math.random().toString(16).substr(2,8);function c(T){T.target.value===""&&n(0,a=0)}function v(){a=Ri(this.value),n(0,a)}return e.$$set=T=>{"value"in T&&n(0,a=T.value),"hidden"in T&&n(1,s=T.hidden),"specTreeNodeId"in T&&n(2,o=T.specTreeNodeId),"refreshReportParams"in T&&n(3,l=T.refreshReportParams)},e.$$.update=()=>{e.$$.dirty&132&&n(4,i=r&&o&&r[o])},[a,s,o,l,i,d,c,r,v]}class ff extends Qt{constructor(t){super(),Jt(this,t,dfe,ufe,Kt,{value:0,hidden:1,specTreeNodeId:2,refreshReportParams:3})}}var M$={exports:{}};/*!
 * dist/inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2023 Robin Herbots
 * Licensed under the MIT license
 * Version: 5.0.8
 */(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:zs,function(){return function(){var n={8741:function(s,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=!(typeof window>"u"||!window.document||!window.document.createElement);o.default=l},3976:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var d=l(2839),c={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(v,T){return typeof T.onBeforeMask=="function"?T.onBeforeMask.call(this,v,T):v},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:[d.keys.Backspace,d.keys.Tab,d.keys.Pause,d.keys.Escape,d.keys.PageUp,d.keys.PageDown,d.keys.End,d.keys.Home,d.keys.ArrowLeft,d.keys.ArrowUp,d.keys.ArrowRight,d.keys.ArrowDown,d.keys.Insert,d.keys.Delete,d.keys.ContextMenu,d.keys.F1,d.keys.F2,d.keys.F3,d.keys.F4,d.keys.F5,d.keys.F6,d.keys.F7,d.keys.F8,d.keys.F9,d.keys.F10,d.keys.F11,d.keys.F12,d.keys.Process,d.keys.Unidentified,d.keys.Shift,d.keys.Control,d.keys.Alt,d.keys.Tab,d.keys.AltGraph,d.keys.CapsLock],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}};o.default=c},7392:function(s,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={9:{validator:"[0-9０-９]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-9０-９A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(s,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(l,d,c){if(c===void 0)return l.__data?l.__data[d]:null;l.__data=l.__data||{},l.__data[d]=c}},3776:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.Event=void 0,o.off=function(D,O){var M,F;return I(this[0])&&D&&(M=this[0].eventRegistry,F=this[0],D.split(" ").forEach(function($){var L=A($.split("."),2);(function(j,H){var V,Q,X=[];if(j.length>0)if(O===void 0)for(V=0,Q=M[j][H].length;V<Q;V++)X.push({ev:j,namespace:H&&H.length>0?H:"global",handler:M[j][H][V]});else X.push({ev:j,namespace:H&&H.length>0?H:"global",handler:O});else if(H.length>0){for(var te in M)for(var ne in M[te])if(ne===H)if(O===void 0)for(V=0,Q=M[te][ne].length;V<Q;V++)X.push({ev:te,namespace:ne,handler:M[te][ne][V]});else X.push({ev:te,namespace:ne,handler:O})}return X})(L[0],L[1]).forEach(function(j){var H=j.ev,V=j.handler;(function(Q,X,te){if(Q in M==1)if(F.removeEventListener?F.removeEventListener(Q,te,!1):F.detachEvent&&F.detachEvent("on".concat(Q),te),X==="global")for(var ne in M[Q])M[Q][ne].splice(M[Q][ne].indexOf(te),1);else M[Q][X].splice(M[Q][X].indexOf(te),1)})(H,j.namespace,V)})})),this},o.on=function(D,O){if(I(this[0])){var M=this[0].eventRegistry,F=this[0];D.split(" ").forEach(function($){var L=A($.split("."),2),j=L[0],H=L[1];(function(V,Q){F.addEventListener?F.addEventListener(V,O,!1):F.attachEvent&&F.attachEvent("on".concat(V),O),M[V]=M[V]||{},M[V][Q]=M[V][Q]||[],M[V][Q].push(O)})(j,H===void 0?"global":H)})}return this},o.trigger=function(D){var O=arguments;if(I(this[0]))for(var M=this[0].eventRegistry,F=this[0],$=typeof D=="string"?D.split(" "):[D.type],L=0;L<$.length;L++){var j=$[L].split("."),H=j[0],V=j[1]||"global";if(document!==void 0&&V==="global"){var Q,X={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(document.createEvent){try{H==="input"?(X.inputType="insertText",Q=new InputEvent(H,X)):Q=new CustomEvent(H,X)}catch{(Q=document.createEvent("CustomEvent")).initCustomEvent(H,X.bubbles,X.cancelable,X.detail)}D.type&&(0,c.default)(Q,D),F.dispatchEvent(Q)}else(Q=document.createEventObject()).eventType=H,Q.detail=arguments[1],D.type&&(0,c.default)(Q,D),F.fireEvent("on"+Q.eventType,Q)}else if(M[H]!==void 0){arguments[0]=arguments[0].type?arguments[0]:T.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var te=M[H];(V==="global"?Object.values(te).flat():te[V]).forEach(function(ne){return ne.apply(F,O)})}}return this};var d,c=y(l(600)),v=y(l(9380)),T=y(l(4963)),b=y(l(8741));function A(D,O){return function(M){if(Array.isArray(M))return M}(D)||function(M,F){var $=M==null?null:typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if($!=null){var L,j,H,V,Q=[],X=!0,te=!1;try{if(H=($=$.call(M)).next,F!==0)for(;!(X=(L=H.call($)).done)&&(Q.push(L.value),Q.length!==F);X=!0);}catch(ne){te=!0,j=ne}finally{try{if(!X&&$.return!=null&&(V=$.return(),Object(V)!==V))return}finally{if(te)throw j}}return Q}}(D,O)||function(M,F){if(M){if(typeof M=="string")return E(M,F);var $=Object.prototype.toString.call(M).slice(8,-1);if($==="Object"&&M.constructor&&($=M.constructor.name),$==="Map"||$==="Set")return Array.from(M);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return E(M,F)}}(D,O)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function E(D,O){(O==null||O>D.length)&&(O=D.length);for(var M=0,F=new Array(O);M<O;M++)F[M]=D[M];return F}function y(D){return D&&D.__esModule?D:{default:D}}function I(D){return D instanceof Element}o.Event=d,typeof v.default.CustomEvent=="function"?o.Event=d=v.default.CustomEvent:b.default&&(o.Event=d=function(D,O){O=O||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var M=document.createEvent("CustomEvent");return M.initCustomEvent(D,O.bubbles,O.cancelable,O.detail),M},d.prototype=v.default.Event.prototype)},600:function(s,o){function l(d){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},l(d)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=function d(){var c,v,T,b,A,E,y=arguments[0]||{},I=1,D=arguments.length,O=!1;for(typeof y=="boolean"&&(O=y,y=arguments[I]||{},I++),l(y)!=="object"&&typeof y!="function"&&(y={});I<D;I++)if((c=arguments[I])!=null)for(v in c)T=y[v],y!==(b=c[v])&&(O&&b&&(Object.prototype.toString.call(b)==="[object Object]"||(A=Array.isArray(b)))?(A?(A=!1,E=T&&Array.isArray(T)?T:[]):E=T&&Object.prototype.toString.call(T)==="[object Object]"?T:{},y[v]=d(O,E,b)):b!==void 0&&(y[v]=b));return y}},4963:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var d=b(l(600)),c=b(l(9380)),v=b(l(253)),T=l(3776);function b(I){return I&&I.__esModule?I:{default:I}}var A=c.default.document;function E(I){return I instanceof E?I:this instanceof E?void(I!=null&&I!==c.default&&(this[0]=I.nodeName?I:I[0]!==void 0&&I[0].nodeName?I[0]:A.querySelector(I),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new E(I)}E.prototype={on:T.on,off:T.off,trigger:T.trigger},E.extend=d.default,E.data=v.default,E.Event=T.Event;var y=E;o.default=y},9845:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mobile=o.iphone=o.ie=void 0;var d,c=(d=l(9380))&&d.__esModule?d:{default:d},v=c.default.navigator&&c.default.navigator.userAgent||"",T=v.indexOf("MSIE ")>0||v.indexOf("Trident/")>0,b=navigator.userAgentData&&navigator.userAgentData.mobile||c.default.navigator&&c.default.navigator.maxTouchPoints||"ontouchstart"in c.default,A=/iphone/i.test(v);o.iphone=A,o.mobile=b,o.ie=T},7184:function(s,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(d){return d.replace(l,"\\$1")};var l=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.EventHandlers=void 0;var d=l(8711),c=l(2839),v=l(9845),T=l(7215),b=l(7760),A=l(4713);function E(D,O){var M=typeof Symbol<"u"&&D[Symbol.iterator]||D["@@iterator"];if(!M){if(Array.isArray(D)||(M=function(V,Q){if(V){if(typeof V=="string")return y(V,Q);var X=Object.prototype.toString.call(V).slice(8,-1);if(X==="Object"&&V.constructor&&(X=V.constructor.name),X==="Map"||X==="Set")return Array.from(V);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return y(V,Q)}}(D))||O){M&&(D=M);var F=0,$=function(){};return{s:$,n:function(){return F>=D.length?{done:!0}:{done:!1,value:D[F++]}},e:function(V){throw V},f:$}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L,j=!0,H=!1;return{s:function(){M=M.call(D)},n:function(){var V=M.next();return j=V.done,V},e:function(V){H=!0,L=V},f:function(){try{j||M.return==null||M.return()}finally{if(H)throw L}}}}function y(D,O){(O==null||O>D.length)&&(O=D.length);for(var M=0,F=new Array(O);M<O;M++)F[M]=D[M];return F}var I={keyEvent:function(D,O,M,F,$){var L=this.inputmask,j=L.opts,H=L.dependencyLib,V=L.maskset,Q=this,X=H(Q),te=D.key,ne=d.caret.call(L,Q),be=j.onKeyDown.call(this,D,d.getBuffer.call(L),ne,j);if(be!==void 0)return be;if(te===c.keys.Backspace||te===c.keys.Delete||v.iphone&&te===c.keys.BACKSPACE_SAFARI||D.ctrlKey&&te===c.keys.x&&!("oncut"in Q))D.preventDefault(),T.handleRemove.call(L,Q,te,ne),(0,b.writeBuffer)(Q,d.getBuffer.call(L,!0),V.p,D,Q.inputmask._valueGet()!==d.getBuffer.call(L).join(""));else if(te===c.keys.End||te===c.keys.PageDown){D.preventDefault();var ue=d.seekNext.call(L,d.getLastValidPosition.call(L));d.caret.call(L,Q,D.shiftKey?ne.begin:ue,ue,!0)}else te===c.keys.Home&&!D.shiftKey||te===c.keys.PageUp?(D.preventDefault(),d.caret.call(L,Q,0,D.shiftKey?ne.begin:0,!0)):j.undoOnEscape&&te===c.keys.Escape&&D.altKey!==!0?((0,b.checkVal)(Q,!0,!1,L.undoValue.split("")),X.trigger("click")):te!==c.keys.Insert||D.shiftKey||D.ctrlKey||L.userOptions.insertMode!==void 0?j.tabThrough===!0&&te===c.keys.Tab?D.shiftKey===!0?(ne.end=d.seekPrevious.call(L,ne.end,!0),A.getTest.call(L,ne.end-1).match.static===!0&&ne.end--,ne.begin=d.seekPrevious.call(L,ne.end,!0),ne.begin>=0&&ne.end>0&&(D.preventDefault(),d.caret.call(L,Q,ne.begin,ne.end))):(ne.begin=d.seekNext.call(L,ne.begin,!0),ne.end=d.seekNext.call(L,ne.begin,!0),ne.end<V.maskLength&&ne.end--,ne.begin<=V.maskLength&&(D.preventDefault(),d.caret.call(L,Q,ne.begin,ne.end))):D.shiftKey||j.insertModeVisual&&j.insertMode===!1&&(te===c.keys.ArrowRight?setTimeout(function(){var Ce=d.caret.call(L,Q);d.caret.call(L,Q,Ce.begin)},0):te===c.keys.ArrowLeft&&setTimeout(function(){var Ce=d.translatePosition.call(L,Q.inputmask.caretPos.begin);d.translatePosition.call(L,Q.inputmask.caretPos.end),L.isRTL?d.caret.call(L,Q,Ce+(Ce===V.maskLength?0:1)):d.caret.call(L,Q,Ce-(Ce===0?0:1))},0)):T.isSelection.call(L,ne)?j.insertMode=!j.insertMode:(j.insertMode=!j.insertMode,d.caret.call(L,Q,ne.begin,ne.begin));return L.isComposing=te==c.keys.Process||te==c.keys.Unidentified,L.ignorable=j.ignorables.includes(te),I.keypressEvent.call(this,D,O,M,F,$)},keypressEvent:function(D,O,M,F,$){var L=this.inputmask||this,j=L.opts,H=L.dependencyLib,V=L.maskset,Q=L.el,X=H(Q),te=D.key;if(O===!0||D.ctrlKey&&D.altKey||!(D.ctrlKey||D.metaKey||L.ignorable)){if(te){var ne,be=O?{begin:$,end:$}:d.caret.call(L,Q);te=j.substitutes[te]||te,V.writeOutBuffer=!0;var ue=T.isValid.call(L,be,te,F,void 0,void 0,void 0,O);if(ue!==!1&&(d.resetMaskSet.call(L,!0),ne=ue.caret!==void 0?ue.caret:d.seekNext.call(L,ue.pos.begin?ue.pos.begin:ue.pos),V.p=ne),ne=j.numericInput&&ue.caret===void 0?d.seekPrevious.call(L,ne):ne,M!==!1&&(setTimeout(function(){j.onKeyValidation.call(Q,te,ue)},0),V.writeOutBuffer&&ue!==!1)){var Ce=d.getBuffer.call(L);(0,b.writeBuffer)(Q,Ce,ne,D,O!==!0)}if(D.preventDefault(),O)return ue!==!1&&(ue.forwardPosition=ne),ue}}else te===c.keys.Enter&&L.undoValue!==L._valueGet(!0)&&(L.undoValue=L._valueGet(!0),setTimeout(function(){X.trigger("change")},0))},pasteEvent:function(D){var O,M=this.inputmask,F=M.opts,$=M._valueGet(!0),L=d.caret.call(M,this);M.isRTL&&(O=L.end,L.end=d.translatePosition.call(M,L.begin),L.begin=d.translatePosition.call(M,O));var j=$.substr(0,L.begin),H=$.substr(L.end,$.length);if(j==(M.isRTL?d.getBufferTemplate.call(M).slice().reverse():d.getBufferTemplate.call(M)).slice(0,L.begin).join("")&&(j=""),H==(M.isRTL?d.getBufferTemplate.call(M).slice().reverse():d.getBufferTemplate.call(M)).slice(L.end).join("")&&(H=""),window.clipboardData&&window.clipboardData.getData)$=j+window.clipboardData.getData("Text")+H;else{if(!D.clipboardData||!D.clipboardData.getData)return!0;$=j+D.clipboardData.getData("text/plain")+H}var V=$;if(M.isRTL){V=V.split("");var Q,X=E(d.getBufferTemplate.call(M));try{for(X.s();!(Q=X.n()).done;){var te=Q.value;V[0]===te&&V.shift()}}catch(ne){X.e(ne)}finally{X.f()}V=V.join("")}if(typeof F.onBeforePaste=="function"){if((V=F.onBeforePaste.call(M,V,F))===!1)return!1;V||(V=$)}(0,b.checkVal)(this,!0,!1,V.toString().split(""),D),D.preventDefault()},inputFallBackEvent:function(D){var O=this.inputmask,M=O.opts,F=O.dependencyLib,$,L=this,j=L.inputmask._valueGet(!0),H=(O.isRTL?d.getBuffer.call(O).slice().reverse():d.getBuffer.call(O)).join(""),V=d.caret.call(O,L,void 0,void 0,!0);if(H!==j){if($=function(X,te,ne){for(var be,ue,Ce,ie=X.substr(0,ne.begin).split(""),Y=X.substr(ne.begin).split(""),he=te.substr(0,ne.begin).split(""),Me=te.substr(ne.begin).split(""),Pe=ie.length>=he.length?ie.length:he.length,We=Y.length>=Me.length?Y.length:Me.length,qe="",ee=[],G="~";ie.length<Pe;)ie.push(G);for(;he.length<Pe;)he.push(G);for(;Y.length<We;)Y.unshift(G);for(;Me.length<We;)Me.unshift(G);var me=ie.concat(Y),Te=he.concat(Me);for(ue=0,be=me.length;ue<be;ue++)switch(Ce=A.getPlaceholder.call(O,d.translatePosition.call(O,ue)),qe){case"insertText":Te[ue-1]===me[ue]&&ne.begin==me.length-1&&ee.push(me[ue]),ue=be;break;case"insertReplacementText":case"deleteContentBackward":me[ue]===G?ne.end++:ue=be;break;default:me[ue]!==Te[ue]&&(me[ue+1]!==G&&me[ue+1]!==Ce&&me[ue+1]!==void 0||(Te[ue]!==Ce||Te[ue+1]!==G)&&Te[ue]!==G?Te[ue+1]===G&&Te[ue]===me[ue+1]?(qe="insertText",ee.push(me[ue]),ne.begin--,ne.end--):me[ue]!==Ce&&me[ue]!==G&&(me[ue+1]===G||Te[ue]!==me[ue]&&Te[ue+1]===me[ue+1])?(qe="insertReplacementText",ee.push(me[ue]),ne.begin--):me[ue]===G?(qe="deleteContentBackward",(d.isMask.call(O,d.translatePosition.call(O,ue),!0)||Te[ue]===M.radixPoint)&&ne.end++):ue=be:(qe="insertText",ee.push(me[ue]),ne.begin--,ne.end--))}return{action:qe,data:ee,caret:ne}}(j,H,V),(L.inputmask.shadowRoot||L.ownerDocument).activeElement!==L&&L.focus(),(0,b.writeBuffer)(L,d.getBuffer.call(O)),d.caret.call(O,L,V.begin,V.end,!0),!v.mobile&&O.skipNextInsert&&D.inputType==="insertText"&&$.action==="insertText"&&O.isComposing)return!1;switch(D.inputType==="insertCompositionText"&&$.action==="insertText"&&O.isComposing?O.skipNextInsert=!0:O.skipNextInsert=!1,$.action){case"insertText":case"insertReplacementText":$.data.forEach(function(X,te){var ne=new F.Event("keypress");ne.key=X,O.ignorable=!1,I.keypressEvent.call(L,ne)}),setTimeout(function(){O.$el.trigger("keyup")},0);break;case"deleteContentBackward":var Q=new F.Event("keydown");Q.key=c.keys.Backspace,I.keyEvent.call(L,Q);break;default:(0,b.applyInputValue)(L,j),d.caret.call(O,L,V.begin,V.end,!0)}D.preventDefault()}},setValueEvent:function(D){var O=this.inputmask,M=this,F=D&&D.detail?D.detail[0]:arguments[1];F===void 0&&(F=M.inputmask._valueGet(!0)),(0,b.applyInputValue)(M,F),(D.detail&&D.detail[1]!==void 0||arguments[2]!==void 0)&&d.caret.call(O,M,D.detail?D.detail[1]:arguments[2])},focusEvent:function(D){var O=this.inputmask,M=O.opts,F=O==null?void 0:O._valueGet();M.showMaskOnFocus&&F!==d.getBuffer.call(O).join("")&&(0,b.writeBuffer)(this,d.getBuffer.call(O),d.seekNext.call(O,d.getLastValidPosition.call(O))),M.positionCaretOnTab!==!0||O.mouseEnter!==!1||T.isComplete.call(O,d.getBuffer.call(O))&&d.getLastValidPosition.call(O)!==-1||I.clickEvent.apply(this,[D,!0]),O.undoValue=O==null?void 0:O._valueGet(!0)},invalidEvent:function(D){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var D=this.inputmask,O=D.opts,M=this;D.mouseEnter=!1,O.clearMaskOnLostFocus&&(M.inputmask.shadowRoot||M.ownerDocument).activeElement!==M&&(0,b.HandleNativePlaceholder)(M,D.originalPlaceholder)},clickEvent:function(D,O){var M=this.inputmask;M.clicked++;var F=this;if((F.inputmask.shadowRoot||F.ownerDocument).activeElement===F){var $=d.determineNewCaretPosition.call(M,d.caret.call(M,F),O);$!==void 0&&d.caret.call(M,F,$)}},cutEvent:function(D){var O=this.inputmask,M=O.maskset,F=this,$=d.caret.call(O,F),L=O.isRTL?d.getBuffer.call(O).slice($.end,$.begin):d.getBuffer.call(O).slice($.begin,$.end),j=O.isRTL?L.reverse().join(""):L.join("");window.navigator.clipboard?window.navigator.clipboard.writeText(j):window.clipboardData&&window.clipboardData.getData&&window.clipboardData.setData("Text",j),T.handleRemove.call(O,F,c.keys.Delete,$),(0,b.writeBuffer)(F,d.getBuffer.call(O),M.p,D,O.undoValue!==O._valueGet(!0))},blurEvent:function(D){var O=this.inputmask,M=O.opts,F=O.dependencyLib;O.clicked=0;var $=F(this),L=this;if(L.inputmask){(0,b.HandleNativePlaceholder)(L,O.originalPlaceholder);var j=L.inputmask._valueGet(),H=d.getBuffer.call(O).slice();j!==""&&(M.clearMaskOnLostFocus&&(d.getLastValidPosition.call(O)===-1&&j===d.getBufferTemplate.call(O).join("")?H=[]:b.clearOptionalTail.call(O,H)),T.isComplete.call(O,H)===!1&&(setTimeout(function(){$.trigger("incomplete")},0),M.clearIncomplete&&(d.resetMaskSet.call(O),H=M.clearMaskOnLostFocus?[]:d.getBufferTemplate.call(O).slice())),(0,b.writeBuffer)(L,H,void 0,D)),O.undoValue!==O._valueGet(!0)&&(O.undoValue=O._valueGet(!0),$.trigger("change"))}},mouseenterEvent:function(){var D=this.inputmask,O=D.opts.showMaskOnHover,M=this;if(D.mouseEnter=!0,(M.inputmask.shadowRoot||M.ownerDocument).activeElement!==M){var F=(D.isRTL?d.getBufferTemplate.call(D).slice().reverse():d.getBufferTemplate.call(D)).join("");O&&(0,b.HandleNativePlaceholder)(M,F)}},submitEvent:function(){var D=this.inputmask,O=D.opts;D.undoValue!==D._valueGet(!0)&&D.$el.trigger("change"),d.getLastValidPosition.call(D)===-1&&D._valueGet&&D._valueGet()===d.getBufferTemplate.call(D).join("")&&D._valueSet(""),O.clearIncomplete&&T.isComplete.call(D,d.getBuffer.call(D))===!1&&D._valueSet(""),O.removeMaskOnSubmit&&(D._valueSet(D.unmaskedvalue(),!0),setTimeout(function(){(0,b.writeBuffer)(D.el,d.getBuffer.call(D))},0))},resetEvent:function(){var D=this.inputmask;D.refreshValue=!0,setTimeout(function(){(0,b.applyInputValue)(D.el,D._valueGet(!0))},0)}};o.EventHandlers=I},9716:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.EventRuler=void 0;var d,c=(d=l(2394))&&d.__esModule?d:{default:d},v=l(2839),T=l(8711),b=l(7760),A={on:function(E,y,I){var D=E.inputmask.dependencyLib,O=function(M){M.originalEvent&&(M=M.originalEvent||M,arguments[0]=M);var F,$=this,L=$.inputmask,j=L?L.opts:void 0;if(L===void 0&&this.nodeName!=="FORM"){var H=D.data($,"_inputmask_opts");D($).off(),H&&new c.default(H).mask($)}else{if(["submit","reset","setvalue"].includes(M.type)||this.nodeName==="FORM"||!($.disabled||$.readOnly&&!(M.type==="keydown"&&M.ctrlKey&&M.key===v.keys.c||j.tabThrough===!1&&M.key===v.keys.Tab))){switch(M.type){case"input":if(L.skipInputEvent===!0)return L.skipInputEvent=!1,M.preventDefault();break;case"click":case"focus":return L.validationEvent?(L.validationEvent=!1,E.blur(),(0,b.HandleNativePlaceholder)(E,(L.isRTL?T.getBufferTemplate.call(L).slice().reverse():T.getBufferTemplate.call(L)).join("")),setTimeout(function(){E.focus()},j.validationEventTimeOut),!1):(F=arguments,void setTimeout(function(){E.inputmask&&I.apply($,F)},0))}var V=I.apply($,arguments);return V===!1&&(M.preventDefault(),M.stopPropagation()),V}M.preventDefault()}};["submit","reset"].includes(y)?(O=O.bind(E),E.form!==null&&D(E.form).on(y,O)):D(E).on(y,O),E.inputmask.events[y]=E.inputmask.events[y]||[],E.inputmask.events[y].push(O)},off:function(E,y){if(E.inputmask&&E.inputmask.events){var I=E.inputmask.dependencyLib,D=E.inputmask.events;for(var O in y&&((D=[])[y]=E.inputmask.events[y]),D){for(var M=D[O];M.length>0;){var F=M.pop();["submit","reset"].includes(O)?E.form!==null&&I(E.form).off(O,F):I(E).off(O,F)}delete E.inputmask.events[O]}}}};o.EventRuler=A},219:function(s,o,l){var d=D(l(2394)),c=l(2839),v=D(l(7184)),T=l(8711),b=l(4713);function A(Y,he){return function(Me){if(Array.isArray(Me))return Me}(Y)||function(Me,Pe){var We=Me==null?null:typeof Symbol<"u"&&Me[Symbol.iterator]||Me["@@iterator"];if(We!=null){var qe,ee,G,me,Te=[],De=!0,we=!1;try{if(G=(We=We.call(Me)).next,Pe!==0)for(;!(De=(qe=G.call(We)).done)&&(Te.push(qe.value),Te.length!==Pe);De=!0);}catch(Ve){we=!0,ee=Ve}finally{try{if(!De&&We.return!=null&&(me=We.return(),Object(me)!==me))return}finally{if(we)throw ee}}return Te}}(Y,he)||function(Me,Pe){if(Me){if(typeof Me=="string")return E(Me,Pe);var We=Object.prototype.toString.call(Me).slice(8,-1);if(We==="Object"&&Me.constructor&&(We=Me.constructor.name),We==="Map"||We==="Set")return Array.from(Me);if(We==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(We))return E(Me,Pe)}}(Y,he)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function E(Y,he){(he==null||he>Y.length)&&(he=Y.length);for(var Me=0,Pe=new Array(he);Me<he;Me++)Pe[Me]=Y[Me];return Pe}function y(Y){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},y(Y)}function I(Y,he){for(var Me=0;Me<he.length;Me++){var Pe=he[Me];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(Y,(We=Pe.key,qe=void 0,qe=function(ee,G){if(y(ee)!=="object"||ee===null)return ee;var me=ee[Symbol.toPrimitive];if(me!==void 0){var Te=me.call(ee,G||"default");if(y(Te)!=="object")return Te;throw new TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(ee)}(We,"string"),y(qe)==="symbol"?qe:String(qe)),Pe)}var We,qe}function D(Y){return Y&&Y.__esModule?Y:{default:Y}}var O=d.default.dependencyLib,M=function(){function Y(Pe,We,qe){(function(ee,G){if(!(ee instanceof G))throw new TypeError("Cannot call a class as a function")})(this,Y),this.mask=Pe,this.format=We,this.opts=qe,this._date=new Date(1,0,1),this.initDateObject(Pe,this.opts)}var he,Me;return he=Y,(Me=[{key:"date",get:function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts)),this._date}},{key:"initDateObject",value:function(Pe,We){var qe;for(X(We).lastIndex=0;qe=X(We).exec(this.format);){var ee=new RegExp("\\d+$").exec(qe[0]),G=ee?qe[0][0]+"x":qe[0],me=void 0;if(Pe!==void 0){if(ee){var Te=X(We).lastIndex,De=ie(qe.index,We);X(We).lastIndex=Te,me=Pe.slice(0,Pe.indexOf(De.nextMatch[0]))}else me=Pe.slice(0,L[G]&&L[G][4]||G.length);Pe=Pe.slice(me.length)}Object.prototype.hasOwnProperty.call(L,G)&&this.setValue(this,me,G,L[G][2],L[G][1])}}},{key:"setValue",value:function(Pe,We,qe,ee,G){if(We!==void 0&&(Pe[ee]=ee==="ampm"?We:We.replace(/[^0-9]/g,"0"),Pe["raw"+ee]=We.replace(/\s/g,"_")),G!==void 0){var me=Pe[ee];(ee==="day"&&parseInt(me)===29||ee==="month"&&parseInt(me)===2)&&(parseInt(Pe.day)!==29||parseInt(Pe.month)!==2||Pe.year!==""&&Pe.year!==void 0||Pe._date.setFullYear(2012,1,29)),ee==="day"&&($=!0,parseInt(me)===0&&(me=1)),ee==="month"&&($=!0),ee==="year"&&($=!0,me.length<4&&(me=be(me,4,!0))),me===""||isNaN(me)||G.call(Pe._date,me),ee==="ampm"&&G.call(Pe._date,me)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&I(he.prototype,Me),Object.defineProperty(he,"prototype",{writable:!1}),Y}(),F=new Date().getFullYear(),$=!1,L={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return be(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(Y){var he=Y?parseInt(Y):0;return he>0&&he--,Date.prototype.setMonth.call(this,he)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(Y){var he=Y?parseInt(Y):0;return he>0&&he--,Date.prototype.setMonth.call(this,he)},"month",function(){return be(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return be(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return be(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return be(Date.prototype.getHours.call(this),2)}],hx:[function(Y){return"[0-9]{".concat(Y,"}")},Date.prototype.setHours,"hours",function(Y){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return be(Date.prototype.getHours.call(this),2)}],Hx:[function(Y){return"[0-9]{".concat(Y,"}")},Date.prototype.setHours,"hours",function(Y){return function(){return be(Date.prototype.getHours.call(this),Y)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return be(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return be(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return be(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return be(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",H,"ampm",V,1],tt:["[ap]m",H,"ampm",V,2],T:["[AP]",H,"ampm",V,1],TT:["[AP]M",H,"ampm",V,2],Z:[".*",void 0,"Z",function(){var Y=this.toString().match(/\((.+)\)/)[1];return Y.includes(" ")&&(Y=(Y=Y.replace("-"," ").toUpperCase()).split(" ").map(function(he){return A(he,1)[0]}).join("")),Y}],o:[""],S:[""]},j={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function H(Y){var he=this.getHours();Y.toLowerCase().includes("p")?this.setHours(he+12):Y.toLowerCase().includes("a")&&he>=12&&this.setHours(he-12)}function V(){var Y=this.getHours();return(Y=Y||12)>=12?"PM":"AM"}function Q(Y){var he=new RegExp("\\d+$").exec(Y[0]);if(he&&he[0]!==void 0){var Me=L[Y[0][0]+"x"].slice("");return Me[0]=Me[0](he[0]),Me[3]=Me[3](he[0]),Me}if(L[Y[0]])return L[Y[0]]}function X(Y){if(!Y.tokenizer){var he=[],Me=[];for(var Pe in L)if(/\.*x$/.test(Pe)){var We=Pe[0]+"\\d+";Me.indexOf(We)===-1&&Me.push(We)}else he.indexOf(Pe[0])===-1&&he.push(Pe[0]);Y.tokenizer="("+(Me.length>0?Me.join("|")+"|":"")+he.join("+|")+")+?|.",Y.tokenizer=new RegExp(Y.tokenizer,"g")}return Y.tokenizer}function te(Y,he,Me){if(!$)return!0;if(Y.rawday===void 0||!isFinite(Y.rawday)&&new Date(Y.date.getFullYear(),isFinite(Y.rawmonth)?Y.month:Y.date.getMonth()+1,0).getDate()>=Y.day||Y.day=="29"&&(!isFinite(Y.rawyear)||Y.rawyear===void 0||Y.rawyear==="")||new Date(Y.date.getFullYear(),isFinite(Y.rawmonth)?Y.month:Y.date.getMonth()+1,0).getDate()>=Y.day)return he;if(Y.day=="29"){var Pe=ie(he.pos,Me);if(Pe.targetMatch[0]==="yyyy"&&he.pos-Pe.targetMatchIndex==2)return he.remove=he.pos+1,he}else if(Y.month=="02"&&Y.day=="30"&&he.c!==void 0)return Y.day="03",Y.date.setDate(3),Y.date.setMonth(1),he.insert=[{pos:he.pos,c:"0"},{pos:he.pos+1,c:he.c}],he.caret=T.seekNext.call(this,he.pos+1),he;return!1}function ne(Y,he,Me,Pe){var We,qe,ee="";for(X(Me).lastIndex=0;We=X(Me).exec(Y);)if(he===void 0)if(qe=Q(We))ee+="("+qe[0]+")";else switch(We[0]){case"[":ee+="(";break;case"]":ee+=")?";break;default:ee+=(0,v.default)(We[0])}else(qe=Q(We))?Pe!==!0&&qe[3]?ee+=qe[3].call(he.date):qe[2]?ee+=he["raw"+qe[2]]:ee+=We[0]:ee+=We[0];return ee}function be(Y,he,Me){for(Y=String(Y),he=he||2;Y.length<he;)Y=Me?Y+"0":"0"+Y;return Y}function ue(Y,he,Me){return typeof Y=="string"?new M(Y,he,Me):Y&&y(Y)==="object"&&Object.prototype.hasOwnProperty.call(Y,"date")?Y:void 0}function Ce(Y,he){return ne(he.inputFormat,{date:Y},he)}function ie(Y,he){var Me,Pe,We=0,qe=0;for(X(he).lastIndex=0;Pe=X(he).exec(he.inputFormat);){var ee=new RegExp("\\d+$").exec(Pe[0]);if((We+=qe=ee?parseInt(ee[0]):Pe[0].length)>=Y+1){Me=Pe,Pe=X(he).exec(he.inputFormat);break}}return{targetMatchIndex:We-qe,nextMatch:Pe,targetMatch:Me}}d.default.extendAliases({datetime:{mask:function(Y){return Y.numericInput=!1,L.S=Y.i18n.ordinalSuffix.join("|"),Y.inputFormat=j[Y.inputFormat]||Y.inputFormat,Y.displayFormat=j[Y.displayFormat]||Y.displayFormat||Y.inputFormat,Y.outputFormat=j[Y.outputFormat]||Y.outputFormat||Y.inputFormat,Y.placeholder=Y.placeholder!==""?Y.placeholder:Y.inputFormat.replace(/[[\]]/,""),Y.regex=ne(Y.inputFormat,void 0,Y),Y.min=ue(Y.min,Y.inputFormat,Y),Y.max=ue(Y.max,Y.inputFormat,Y),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(Y,he,Me,Pe,We,qe,ee,G){if(G)return!0;if(isNaN(Me)&&Y[he]!==Me){var me=ie(he,We);if(me.nextMatch&&me.nextMatch[0]===Me&&me.targetMatch[0].length>1){var Te=L[me.targetMatch[0]][0];if(new RegExp(Te).test("0"+Y[he-1]))return Y[he]=Y[he-1],Y[he-1]="0",{fuzzy:!0,buffer:Y,refreshFromBuffer:{start:he-1,end:he+1},pos:he+1}}}return!0},postValidation:function(Y,he,Me,Pe,We,qe,ee,G){var me,Te;if(ee)return!0;if(Pe===!1&&(((me=ie(he+1,We)).targetMatch&&me.targetMatchIndex===he&&me.targetMatch[0].length>1&&L[me.targetMatch[0]]!==void 0||(me=ie(he+2,We)).targetMatch&&me.targetMatchIndex===he+1&&me.targetMatch[0].length>1&&L[me.targetMatch[0]]!==void 0)&&(Te=L[me.targetMatch[0]][0]),Te!==void 0&&(qe.validPositions[he+1]!==void 0&&new RegExp(Te).test(Me+"0")?(Y[he]=Me,Y[he+1]="0",Pe={pos:he+2,caret:he}):new RegExp(Te).test("0"+Me)&&(Y[he]="0",Y[he+1]=Me,Pe={pos:he+2})),Pe===!1))return Pe;if(Pe.fuzzy&&(Y=Pe.buffer,he=Pe.pos),(me=ie(he,We)).targetMatch&&me.targetMatch[0]&&L[me.targetMatch[0]]!==void 0){var De=L[me.targetMatch[0]];Te=De[0];var we=Y.slice(me.targetMatchIndex,me.targetMatchIndex+me.targetMatch[0].length);if(new RegExp(Te).test(we.join(""))===!1&&me.targetMatch[0].length===2&&qe.validPositions[me.targetMatchIndex]&&qe.validPositions[me.targetMatchIndex+1]&&(qe.validPositions[me.targetMatchIndex+1].input="0"),De[2]=="year")for(var Ve=b.getMaskTemplate.call(this,!1,1,void 0,!0),Ke=he+1;Ke<Y.length;Ke++)Y[Ke]=Ve[Ke],delete qe.validPositions[Ke]}var yt=Pe,ht=ue(Y.join(""),We.inputFormat,We);return yt&&!isNaN(ht.date.getTime())&&(We.prefillYear&&(yt=function(Je,pt,Tt){if(Je.year!==Je.rawyear){var it=F.toString(),Ge=Je.rawyear.replace(/[^0-9]/g,""),st=it.slice(0,Ge.length),It=it.slice(Ge.length);if(Ge.length===2&&Ge===st){var Ct=new Date(F,Je.month-1,Je.day);Je.day==Ct.getDate()&&(!Tt.max||Tt.max.date.getTime()>=Ct.getTime())&&(Je.date.setFullYear(F),Je.year=it,pt.insert=[{pos:pt.pos+1,c:It[0]},{pos:pt.pos+2,c:It[1]}])}}return pt}(ht,yt,We)),yt=function(Je,pt,Tt,it,Ge){if(!pt)return pt;if(pt&&Tt.min&&!isNaN(Tt.min.date.getTime())){var st;for(Je.reset(),X(Tt).lastIndex=0;st=X(Tt).exec(Tt.inputFormat);){var It;if((It=Q(st))&&It[3]){for(var Ct=It[1],bt=Je[It[2]],Rt=Tt.min[It[2]],cn=Tt.max?Tt.max[It[2]]:Rt,nn=[],Qe=!1,Ft=0;Ft<Rt.length;Ft++)it.validPositions[Ft+st.index]!==void 0||Qe?(nn[Ft]=bt[Ft],Qe=Qe||bt[Ft]>Rt[Ft]):(nn[Ft]=Rt[Ft],It[2]==="year"&&bt.length-1==Ft&&Rt!=cn&&(nn=(parseInt(nn.join(""))+1).toString().split("")),It[2]==="ampm"&&Rt!=cn&&Tt.min.date.getTime()>Je.date.getTime()&&(nn[Ft]=cn[Ft]));Ct.call(Je._date,nn.join(""))}}pt=Tt.min.date.getTime()<=Je.date.getTime(),Je.reInit()}return pt&&Tt.max&&(isNaN(Tt.max.date.getTime())||(pt=Tt.max.date.getTime()>=Je.date.getTime())),pt}(ht,yt=te.call(this,ht,yt,We),We,qe)),he!==void 0&&yt&&Pe.pos!==he?{buffer:ne(We.inputFormat,ht,We).split(""),refreshFromBuffer:{start:he,end:Pe.pos},pos:Pe.caret||Pe.pos}:yt},onKeyDown:function(Y,he,Me,Pe){Y.ctrlKey&&Y.key===c.keys.ArrowRight&&(this.inputmask._valueSet(Ce(new Date,Pe)),O(this).trigger("setvalue"))},onUnMask:function(Y,he,Me){return he&&ne(Me.outputFormat,ue(Y,Me.inputFormat,Me),Me,!0)},casing:function(Y,he,Me,Pe){return he.nativeDef.indexOf("[ap]")==0?Y.toLowerCase():he.nativeDef.indexOf("[AP]")==0?Y.toUpperCase():Y},onBeforeMask:function(Y,he){return Object.prototype.toString.call(Y)==="[object Date]"&&(Y=Ce(Y,he)),Y},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},3851:function(s,o,l){var d,c=(d=l(2394))&&d.__esModule?d:{default:d},v=l(8711),T=l(4713);c.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var b=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function A(E,y,I,D,O){return I-1>-1&&y.buffer[I-1]!=="."?(E=y.buffer[I-1]+E,E=I-2>-1&&y.buffer[I-2]!=="."?y.buffer[I-2]+E:"0"+E):E="00"+E,b.test(E)}c.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:A},j:{validator:A},k:{validator:A},l:{validator:A}},onUnMask:function(E,y,I){return E},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(E){var y=E.separator,I=E.quantifier,D="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",O=D;if(y)for(var M=0;M<I;M++)O+="[".concat(y).concat(D,"]");return O},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(E,y){return(E=E.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9１-９A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(E,y,I){return E},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(E,y,I,D,O,M,F){var $=T.getMaskTemplate.call(this,!0,v.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test($.join(""))}}})},207:function(s,o,l){var d=b(l(2394)),c=b(l(7184)),v=l(8711),T=l(2839);function b(M){return M&&M.__esModule?M:{default:M}}var A=d.default.dependencyLib;function E(M,F){for(var $="",L=0;L<M.length;L++)d.default.prototype.definitions[M.charAt(L)]||F.definitions[M.charAt(L)]||F.optionalmarker[0]===M.charAt(L)||F.optionalmarker[1]===M.charAt(L)||F.quantifiermarker[0]===M.charAt(L)||F.quantifiermarker[1]===M.charAt(L)||F.groupmarker[0]===M.charAt(L)||F.groupmarker[1]===M.charAt(L)||F.alternatormarker===M.charAt(L)?$+="\\"+M.charAt(L):$+=M.charAt(L);return $}function y(M,F,$,L){if(M.length>0&&F>0&&(!$.digitsOptional||L)){var j=M.indexOf($.radixPoint),H=!1;$.negationSymbol.back===M[M.length-1]&&(H=!0,M.length--),j===-1&&(M.push($.radixPoint),j=M.length-1);for(var V=1;V<=F;V++)isFinite(M[j+V])||(M[j+V]="0")}return H&&M.push($.negationSymbol.back),M}function I(M,F){var $=0;for(var L in M==="+"&&($=v.seekNext.call(this,F.validPositions.length-1)),F.tests)if((L=parseInt(L))>=$){for(var j=0,H=F.tests[L].length;j<H;j++)if((F.validPositions[L]===void 0||M==="-")&&F.tests[L][j].match.def===M)return L+(F.validPositions[L]!==void 0&&M!=="-"?1:0)}return $}function D(M,F){for(var $=-1,L=0,j=F.validPositions.length;L<j;L++){var H=F.validPositions[L];if(H&&H.match.def===M){$=L;break}}return $}function O(M,F,$,L,j){var H=F.buffer?F.buffer.indexOf(j.radixPoint):-1,V=(H!==-1||L&&j.jitMasking)&&new RegExp(j.definitions[9].validator).test(M);return j._radixDance&&H!==-1&&V&&F.validPositions[H]==null?{insert:{pos:H===$?H+1:H,c:j.radixPoint},pos:$}:V}d.default.extendAliases({numeric:{mask:function(M){M.repeat=0,M.groupSeparator===M.radixPoint&&M.digits&&M.digits!=="0"&&(M.radixPoint==="."?M.groupSeparator=",":M.radixPoint===","?M.groupSeparator=".":M.groupSeparator=""),M.groupSeparator===" "&&(M.skipOptionalPartCharacter=void 0),M.placeholder.length>1&&(M.placeholder=M.placeholder.charAt(0)),M.positionCaretOnClick==="radixFocus"&&M.placeholder===""&&(M.positionCaretOnClick="lvp");var F="0",$=M.radixPoint;M.numericInput===!0&&M.__financeInput===void 0?(F="1",M.positionCaretOnClick=M.positionCaretOnClick==="radixFocus"?"lvp":M.positionCaretOnClick,M.digitsOptional=!1,isNaN(M.digits)&&(M.digits=2),M._radixDance=!1,$=M.radixPoint===","?"?":"!",M.radixPoint!==""&&M.definitions[$]===void 0&&(M.definitions[$]={},M.definitions[$].validator="["+M.radixPoint+"]",M.definitions[$].placeholder=M.radixPoint,M.definitions[$].static=!0,M.definitions[$].generated=!0)):(M.__financeInput=!1,M.numericInput=!0);var L,j="[+]";if(j+=E(M.prefix,M),M.groupSeparator!==""?(M.definitions[M.groupSeparator]===void 0&&(M.definitions[M.groupSeparator]={},M.definitions[M.groupSeparator].validator="["+M.groupSeparator+"]",M.definitions[M.groupSeparator].placeholder=M.groupSeparator,M.definitions[M.groupSeparator].static=!0,M.definitions[M.groupSeparator].generated=!0),j+=M._mask(M)):j+="9{+}",M.digits!==void 0&&M.digits!==0){var H=M.digits.toString().split(",");isFinite(H[0])&&H[1]&&isFinite(H[1])?j+=$+F+"{"+M.digits+"}":(isNaN(M.digits)||parseInt(M.digits)>0)&&(M.digitsOptional||M.jitMasking?(L=j+$+F+"{0,"+M.digits+"}",M.keepStatic=!0):j+=$+F+"{"+M.digits+"}")}else M.inputmode="numeric";return j+=E(M.suffix,M),j+="[-]",L&&(j=[L+E(M.suffix,M)+"[-]",j]),M.greedy=!1,function(V){V.parseMinMaxOptions===void 0&&(V.min!==null&&(V.min=V.min.toString().replace(new RegExp((0,c.default)(V.groupSeparator),"g"),""),V.radixPoint===","&&(V.min=V.min.replace(V.radixPoint,".")),V.min=isFinite(V.min)?parseFloat(V.min):NaN,isNaN(V.min)&&(V.min=Number.MIN_VALUE)),V.max!==null&&(V.max=V.max.toString().replace(new RegExp((0,c.default)(V.groupSeparator),"g"),""),V.radixPoint===","&&(V.max=V.max.replace(V.radixPoint,".")),V.max=isFinite(V.max)?parseFloat(V.max):NaN,isNaN(V.max)&&(V.max=Number.MAX_VALUE)),V.parseMinMaxOptions="done")}(M),M.radixPoint!==""&&M.substituteRadixPoint&&(M.substitutes[M.radixPoint=="."?",":"."]=M.radixPoint),j},_mask:function(M){return"("+M.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:O},1:{validator:O,definitionSymbol:"9"},9:{validator:"[0-9０-９٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(M,F,$,L,j){return j.allowMinus&&(M==="-"||M===j.negationSymbol.front)}},"-":{validator:function(M,F,$,L,j){return j.allowMinus&&M===j.negationSymbol.back}}},preValidation:function(M,F,$,L,j,H,V,Q){if(j.__financeInput!==!1&&$===j.radixPoint)return!1;var X=M.indexOf(j.radixPoint),te=F;if(F=function(Ce,ie,Y,he,Me){return Me._radixDance&&Me.numericInput&&ie!==Me.negationSymbol.back&&Ce<=Y&&(Y>0||ie==Me.radixPoint)&&(he.validPositions[Ce-1]===void 0||he.validPositions[Ce-1].input!==Me.negationSymbol.back)&&(Ce-=1),Ce}(F,$,X,H,j),$==="-"||$===j.negationSymbol.front){if(j.allowMinus!==!0)return!1;var ne=!1,be=D("+",H),ue=D("-",H);return be!==-1&&(ne=[be,ue]),ne!==!1?{remove:ne,caret:te-j.negationSymbol.back.length}:{insert:[{pos:I.call(this,"+",H),c:j.negationSymbol.front,fromIsValid:!0},{pos:I.call(this,"-",H),c:j.negationSymbol.back,fromIsValid:void 0}],caret:te+j.negationSymbol.back.length}}if($===j.groupSeparator)return{caret:te};if(Q)return!0;if(X!==-1&&j._radixDance===!0&&L===!1&&$===j.radixPoint&&j.digits!==void 0&&(isNaN(j.digits)||parseInt(j.digits)>0)&&X!==F)return{caret:j._radixDance&&F===X-1?X+1:X};if(j.__financeInput===!1){if(L){if(j.digitsOptional)return{rewritePosition:V.end};if(!j.digitsOptional){if(V.begin>X&&V.end<=X)return $===j.radixPoint?{insert:{pos:X+1,c:"0",fromIsValid:!0},rewritePosition:X}:{rewritePosition:X+1};if(V.begin<X)return{rewritePosition:V.begin-1}}}else if(!j.showMaskOnHover&&!j.showMaskOnFocus&&!j.digitsOptional&&j.digits>0&&this.__valueGet.call(this.el)==="")return{rewritePosition:X}}return{rewritePosition:F}},postValidation:function(M,F,$,L,j,H,V){if(L===!1)return L;if(V)return!0;if(j.min!==null||j.max!==null){var Q=j.onUnMask(M.slice().reverse().join(""),void 0,A.extend({},j,{unmaskAsNumber:!0}));if(j.min!==null&&Q<j.min&&(Q.toString().length>j.min.toString().length||Q<0))return!1;if(j.max!==null&&Q>j.max)return!!j.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:y(j.max.toString().replace(".",j.radixPoint).split(""),j.digits,j).reverse()}}return L},onUnMask:function(M,F,$){if(F===""&&$.nullable===!0)return F;var L=M.replace($.prefix,"");return L=(L=L.replace($.suffix,"")).replace(new RegExp((0,c.default)($.groupSeparator),"g"),""),$.placeholder.charAt(0)!==""&&(L=L.replace(new RegExp($.placeholder.charAt(0),"g"),"0")),$.unmaskAsNumber?($.radixPoint!==""&&L.indexOf($.radixPoint)!==-1&&(L=L.replace(c.default.call(this,$.radixPoint),".")),L=(L=L.replace(new RegExp("^"+(0,c.default)($.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)($.negationSymbol.back)+"$"),""),Number(L)):L},isComplete:function(M,F){var $=(F.numericInput?M.slice().reverse():M).join("");return $=($=($=($=($=$.replace(new RegExp("^"+(0,c.default)(F.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)(F.negationSymbol.back)+"$"),"")).replace(F.prefix,"")).replace(F.suffix,"")).replace(new RegExp((0,c.default)(F.groupSeparator)+"([0-9]{3})","g"),"$1"),F.radixPoint===","&&($=$.replace((0,c.default)(F.radixPoint),".")),isFinite($)},onBeforeMask:function(M,F){var $=F.radixPoint||",";isFinite(F.digits)&&(F.digits=parseInt(F.digits)),typeof M!="number"&&F.inputType!=="number"||$===""||(M=M.toString().replace(".",$));var L=M.charAt(0)==="-"||M.charAt(0)===F.negationSymbol.front,j=M.split($),H=j[0].replace(/[^\-0-9]/g,""),V=j.length>1?j[1].replace(/[^0-9]/g,""):"",Q=j.length>1;M=H+(V!==""?$+V:V);var X=0;if($!==""&&(X=F.digitsOptional?F.digits<V.length?F.digits:V.length:F.digits,V!==""||!F.digitsOptional)){var te=Math.pow(10,X||1);M=M.replace((0,c.default)($),"."),isNaN(parseFloat(M))||(M=(F.roundingFN(parseFloat(M)*te)/te).toFixed(X)),M=M.toString().replace(".",$)}if(F.digits===0&&M.indexOf($)!==-1&&(M=M.substring(0,M.indexOf($))),F.min!==null||F.max!==null){var ne=M.toString().replace($,".");F.min!==null&&ne<F.min?M=F.min.toString().replace(".",$):F.max!==null&&ne>F.max&&(M=F.max.toString().replace(".",$))}return L&&M.charAt(0)!=="-"&&(M="-"+M),y(M.toString().split(""),X,F,Q).join("")},onBeforeWrite:function(M,F,$,L){function j(Ce,ie){if(L.__financeInput!==!1||ie){var Y=Ce.indexOf(L.radixPoint);Y!==-1&&Ce.splice(Y,1)}if(L.groupSeparator!=="")for(;(Y=Ce.indexOf(L.groupSeparator))!==-1;)Ce.splice(Y,1);return Ce}var H,V;if(L.stripLeadingZeroes&&(V=function(Ce,ie){var Y=new RegExp("(^"+(ie.negationSymbol.front!==""?(0,c.default)(ie.negationSymbol.front)+"?":"")+(0,c.default)(ie.prefix)+")(.*)("+(0,c.default)(ie.suffix)+(ie.negationSymbol.back!=""?(0,c.default)(ie.negationSymbol.back)+"?":"")+"$)").exec(Ce.slice().reverse().join("")),he=Y?Y[2]:"",Me=!1;return he&&(he=he.split(ie.radixPoint.charAt(0))[0],Me=new RegExp("^[0"+ie.groupSeparator+"]*").exec(he)),!(!Me||!(Me[0].length>1||Me[0].length>0&&Me[0].length<he.length))&&Me}(F,L)))for(var Q=F.join("").lastIndexOf(V[0].split("").reverse().join(""))-(V[0]==V.input?0:1),X=V[0]==V.input?1:0,te=V[0].length-X;te>0;te--)delete this.maskset.validPositions[Q+te],delete F[Q+te];if(M)switch(M.type){case"blur":case"checkval":if(L.min!==null){var ne=L.onUnMask(F.slice().reverse().join(""),void 0,A.extend({},L,{unmaskAsNumber:!0}));if(L.min!==null&&ne<L.min)return{refreshFromBuffer:!0,buffer:y(L.min.toString().replace(".",L.radixPoint).split(""),L.digits,L).reverse()}}if(F[F.length-1]===L.negationSymbol.front){var be=new RegExp("(^"+(L.negationSymbol.front!=""?(0,c.default)(L.negationSymbol.front)+"?":"")+(0,c.default)(L.prefix)+")(.*)("+(0,c.default)(L.suffix)+(L.negationSymbol.back!=""?(0,c.default)(L.negationSymbol.back)+"?":"")+"$)").exec(j(F.slice(),!0).reverse().join(""));(be?be[2]:"")==0&&(H={refreshFromBuffer:!0,buffer:[0]})}else L.radixPoint!==""&&F.indexOf(L.radixPoint)===L.suffix.length&&(H&&H.buffer?H.buffer.splice(0,1+L.suffix.length):(F.splice(0,1+L.suffix.length),H={refreshFromBuffer:!0,buffer:j(F)}));if(L.enforceDigitsOnBlur){var ue=(H=H||{})&&H.buffer||F.slice().reverse();H.refreshFromBuffer=!0,H.buffer=y(ue,L.digits,L,!0).reverse()}}return H},onKeyDown:function(M,F,$,L){var j,H=A(this);if(M.location!=3){var V,Q=M.key;if((V=L.shortcuts&&L.shortcuts[Q])&&V.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(V)),H.trigger("setvalue"),!1}if(M.ctrlKey)switch(M.key){case T.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(L.step)),H.trigger("setvalue"),!1;case T.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(L.step)),H.trigger("setvalue"),!1}if(!M.shiftKey&&(M.key===T.keys.Delete||M.key===T.keys.Backspace||M.key===T.keys.BACKSPACE_SAFARI)&&$.begin!==F.length){if(F[M.key===T.keys.Delete?$.begin-1:$.end]===L.negationSymbol.front)return j=F.slice().reverse(),L.negationSymbol.front!==""&&j.shift(),L.negationSymbol.back!==""&&j.pop(),H.trigger("setvalue",[j.join(""),$.begin]),!1;if(L._radixDance===!0){var X=F.indexOf(L.radixPoint);if(L.digitsOptional){if(X===0)return(j=F.slice().reverse()).pop(),H.trigger("setvalue",[j.join(""),$.begin>=j.length?j.length:$.begin]),!1}else if(X!==-1&&($.begin<X||$.end<X||M.key===T.keys.Delete&&($.begin===X||$.begin-1===X))){var te=void 0;return $.begin===$.end&&(M.key===T.keys.Backspace||M.key===T.keys.BACKSPACE_SAFARI?$.begin++:M.key===T.keys.Delete&&$.begin-1===X&&(te=A.extend({},$),$.begin--,$.end--)),(j=F.slice().reverse()).splice(j.length-$.begin,$.begin-$.end+1),j=y(j,L.digits,L).join(""),te&&($=te),H.trigger("setvalue",[j,$.begin>=j.length?X+1:$.begin]),!1}}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(M){return"("+M.groupSeparator+"99){*|1}("+M.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(s,o,l){var d;Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=((d=l(8741))&&d.__esModule?d:{default:d}).default?window:{};o.default=c},7760:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.HandleNativePlaceholder=function(O,M){var F=O?O.inputmask:this;if(b.ie){if(O.inputmask._valueGet()!==M&&(O.placeholder!==M||O.placeholder==="")){var $=v.getBuffer.call(F).slice(),L=O.inputmask._valueGet();if(L!==M){var j=v.getLastValidPosition.call(F);j===-1&&L===v.getBufferTemplate.call(F).join("")?$=[]:j!==-1&&y.call(F,$),D(O,$)}}}else O.placeholder!==M&&(O.placeholder=M,O.placeholder===""&&O.removeAttribute("placeholder"))},o.applyInputValue=E,o.checkVal=I,o.clearOptionalTail=y,o.unmaskedvalue=function(O){var M=O?O.inputmask:this,F=M.opts,$=M.maskset;if(O){if(O.inputmask===void 0)return O.value;O.inputmask&&O.inputmask.refreshValue&&E(O,O.inputmask._valueGet(!0))}for(var L=[],j=$.validPositions,H=0,V=j.length;H<V;H++)j[H]&&j[H].match&&(j[H].match.static!=1||Array.isArray($.metadata)&&j[H].generatedInput!==!0)&&L.push(j[H].input);var Q=L.length===0?"":(M.isRTL?L.reverse():L).join("");if(typeof F.onUnMask=="function"){var X=(M.isRTL?v.getBuffer.call(M).slice().reverse():v.getBuffer.call(M)).join("");Q=F.onUnMask.call(M,X,Q,F)}return Q},o.writeBuffer=D;var d=l(2839),c=l(4713),v=l(8711),T=l(7215),b=l(9845),A=l(6030);function E(O,M){var F=O?O.inputmask:this,$=F.opts;O.inputmask.refreshValue=!1,typeof $.onBeforeMask=="function"&&(M=$.onBeforeMask.call(F,M,$)||M),I(O,!0,!1,M=(M||"").toString().split("")),F.undoValue=F._valueGet(!0),($.clearMaskOnLostFocus||$.clearIncomplete)&&O.inputmask._valueGet()===v.getBufferTemplate.call(F).join("")&&v.getLastValidPosition.call(F)===-1&&O.inputmask._valueSet("")}function y(O){O.length=0;for(var M,F=c.getMaskTemplate.call(this,!0,0,!0,void 0,!0);(M=F.shift())!==void 0;)O.push(M);return O}function I(O,M,F,$,L){var j=O?O.inputmask:this,H=j.maskset,V=j.opts,Q=j.dependencyLib,X=$.slice(),te="",ne=-1,be=void 0,ue=V.skipOptionalPartCharacter;V.skipOptionalPartCharacter="",v.resetMaskSet.call(j),H.tests={},ne=V.radixPoint?v.determineNewCaretPosition.call(j,{begin:0,end:0},!1,V.__financeInput===!1?"radixFocus":void 0).begin:0,H.p=ne,j.caretPos={begin:ne};var Ce=[],ie=j.caretPos;if(X.forEach(function(qe,ee){if(qe!==void 0){var G=new Q.Event("_checkval");G.key=qe,te+=qe;var me=v.getLastValidPosition.call(j,void 0,!0);(function(Te,De){for(var we=c.getMaskTemplate.call(j,!0,0).slice(Te,v.seekNext.call(j,Te,!1,!1)).join("").replace(/'/g,""),Ve=we.indexOf(De);Ve>0&&we[Ve-1]===" ";)Ve--;var Ke=Ve===0&&!v.isMask.call(j,Te)&&(c.getTest.call(j,Te).match.nativeDef===De.charAt(0)||c.getTest.call(j,Te).match.static===!0&&c.getTest.call(j,Te).match.nativeDef==="'"+De.charAt(0)||c.getTest.call(j,Te).match.nativeDef===" "&&(c.getTest.call(j,Te+1).match.nativeDef===De.charAt(0)||c.getTest.call(j,Te+1).match.static===!0&&c.getTest.call(j,Te+1).match.nativeDef==="'"+De.charAt(0)));if(!Ke&&Ve>0&&!v.isMask.call(j,Te,!1,!0)){var yt=v.seekNext.call(j,Te);j.caretPos.begin<yt&&(j.caretPos={begin:yt})}return Ke})(ne,te)?be=A.EventHandlers.keypressEvent.call(j,G,!0,!1,F,me+1):(be=A.EventHandlers.keypressEvent.call(j,G,!0,!1,F,j.caretPos.begin))&&(ne=j.caretPos.begin+1,te=""),be?(be.pos!==void 0&&H.validPositions[be.pos]&&H.validPositions[be.pos].match.static===!0&&H.validPositions[be.pos].alternation===void 0&&(Ce.push(be.pos),j.isRTL||(be.forwardPosition=be.pos+1)),D.call(j,void 0,v.getBuffer.call(j),be.forwardPosition,G,!1),j.caretPos={begin:be.forwardPosition,end:be.forwardPosition},ie=j.caretPos):H.validPositions[ee]===void 0&&X[ee]===c.getPlaceholder.call(j,ee)&&v.isMask.call(j,ee,!0)?j.caretPos.begin++:j.caretPos=ie}}),Ce.length>0){var Y,he,Me=v.seekNext.call(j,-1,void 0,!1);if(!T.isComplete.call(j,v.getBuffer.call(j))&&Ce.length<=Me||T.isComplete.call(j,v.getBuffer.call(j))&&Ce.length>0&&Ce.length!==Me&&Ce[0]===0)for(var Pe=Me;(Y=Ce.shift())!==void 0;){var We=new Q.Event("_checkval");if((he=H.validPositions[Y]).generatedInput=!0,We.key=he.input,(be=A.EventHandlers.keypressEvent.call(j,We,!0,!1,F,Pe))&&be.pos!==void 0&&be.pos!==Y&&H.validPositions[be.pos]&&H.validPositions[be.pos].match.static===!0)Ce.push(be.pos);else if(!be)break;Pe++}}M&&D.call(j,O,v.getBuffer.call(j),be?be.forwardPosition:j.caretPos.begin,L||new Q.Event("checkval"),L&&(L.type==="input"&&j.undoValue!==v.getBuffer.call(j).join("")||L.type==="paste")),V.skipOptionalPartCharacter=ue}function D(O,M,F,$,L){var j=O?O.inputmask:this,H=j.opts,V=j.dependencyLib;if($&&typeof H.onBeforeWrite=="function"){var Q=H.onBeforeWrite.call(j,$,M,F,H);if(Q){if(Q.refreshFromBuffer){var X=Q.refreshFromBuffer;T.refreshFromBuffer.call(j,X===!0?X:X.start,X.end,Q.buffer||M),M=v.getBuffer.call(j,!0)}F!==void 0&&(F=Q.caret!==void 0?Q.caret:F)}}if(O!==void 0&&(O.inputmask._valueSet(M.join("")),F===void 0||$!==void 0&&$.type==="blur"||v.caret.call(j,O,F,void 0,void 0,$!==void 0&&$.type==="keydown"&&($.key===d.keys.Delete||$.key===d.keys.Backspace)),L===!0)){var te=V(O),ne=O.inputmask._valueGet();O.inputmask.skipInputEvent=!0,te.trigger("input"),setTimeout(function(){ne===v.getBufferTemplate.call(j).join("")?te.trigger("cleared"):T.isComplete.call(j,M)===!0&&te.trigger("complete")},0)}}},2394:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var d=l(157),c=$(l(4963)),v=$(l(9380)),T=l(2391),b=l(4713),A=l(8711),E=l(7215),y=l(7760),I=l(9716),D=$(l(7392)),O=$(l(3976)),M=$(l(8741));function F(X){return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},F(X)}function $(X){return X&&X.__esModule?X:{default:X}}var L=v.default.document,j="_inputmask_opts";function H(X,te,ne){if(M.default){if(!(this instanceof H))return new H(X,te,ne);this.dependencyLib=c.default,this.el=void 0,this.events={},this.maskset=void 0,ne!==!0&&(Object.prototype.toString.call(X)==="[object Object]"?te=X:(te=te||{},X&&(te.alias=X)),this.opts=c.default.extend(!0,{},this.defaults,te),this.noMasksCache=te&&te.definitions!==void 0,this.userOptions=te||{},V(this.opts.alias,te,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}}function V(X,te,ne){var be=H.prototype.aliases[X];return be?(be.alias&&V(be.alias,void 0,ne),c.default.extend(!0,ne,be),c.default.extend(!0,ne,te),!0):(ne.mask===null&&(ne.mask=X),!1)}H.prototype={dataAttribute:"data-inputmask",defaults:O.default,definitions:D.default,aliases:{},masksCache:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(X){var te=this;return typeof X=="string"&&(X=L.getElementById(X)||L.querySelectorAll(X)),(X=X.nodeName?[X]:Array.isArray(X)?X:[].slice.call(X)).forEach(function(ne,be){var ue=c.default.extend(!0,{},te.opts);if(function(ie,Y,he,Me){function Pe(Te,De){var we=Me===""?Te:Me+"-"+Te;(De=De!==void 0?De:ie.getAttribute(we))!==null&&(typeof De=="string"&&(Te.indexOf("on")===0?De=v.default[De]:De==="false"?De=!1:De==="true"&&(De=!0)),he[Te]=De)}if(Y.importDataAttributes===!0){var We,qe,ee,G,me=ie.getAttribute(Me);if(me&&me!==""&&(me=me.replace(/'/g,'"'),qe=JSON.parse("{"+me+"}")),qe){for(G in ee=void 0,qe)if(G.toLowerCase()==="alias"){ee=qe[G];break}}for(We in Pe("alias",ee),he.alias&&V(he.alias,he,Y),Y){if(qe){for(G in ee=void 0,qe)if(G.toLowerCase()===We.toLowerCase()){ee=qe[G];break}}Pe(We,ee)}}return c.default.extend(!0,Y,he),(ie.dir==="rtl"||Y.rightAlign)&&(ie.style.textAlign="right"),(ie.dir==="rtl"||Y.numericInput)&&(ie.dir="ltr",ie.removeAttribute("dir"),Y.isRTL=!0),Object.keys(he).length}(ne,ue,c.default.extend(!0,{},te.userOptions),te.dataAttribute)){var Ce=(0,T.generateMaskSet)(ue,te.noMasksCache);Ce!==void 0&&(ne.inputmask!==void 0&&(ne.inputmask.opts.autoUnmask=!0,ne.inputmask.remove()),ne.inputmask=new H(void 0,void 0,!0),ne.inputmask.opts=ue,ne.inputmask.noMasksCache=te.noMasksCache,ne.inputmask.userOptions=c.default.extend(!0,{},te.userOptions),ne.inputmask.el=ne,ne.inputmask.$el=(0,c.default)(ne),ne.inputmask.maskset=Ce,c.default.data(ne,j,te.userOptions),d.mask.call(ne.inputmask))}}),X&&X[0]&&X[0].inputmask||this},option:function(X,te){return typeof X=="string"?this.opts[X]:F(X)==="object"?(c.default.extend(this.userOptions,X),this.el&&te!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(X){if(this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache),this.el===void 0||X!==void 0){var te=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,X,this.opts)||X).split("");y.checkVal.call(this,void 0,!1,!1,te),typeof this.opts.onBeforeWrite=="function"&&this.opts.onBeforeWrite.call(this,void 0,A.getBuffer.call(this),0,this.opts)}return y.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){c.default.data(this.el,j,null);var X=this.opts.autoUnmask?(0,y.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);X!==A.getBufferTemplate.call(this).join("")?this._valueSet(X,this.opts.autoUnmask):this._valueSet(""),I.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):L.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?A.getBufferTemplate.call(this).reverse():A.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache),E.isComplete.call(this,A.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var X=b.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach(function(te){return te.mask!==X||(X=te,!1)}),X}return this.maskset.metadata},isValid:function(X){if(this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache),X){var te=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,X,this.opts)||X).split("");y.checkVal.call(this,void 0,!0,!1,te)}else X=this.isRTL?A.getBuffer.call(this).slice().reverse().join(""):A.getBuffer.call(this).join("");for(var ne=A.getBuffer.call(this),be=A.determineLastRequiredPosition.call(this),ue=ne.length-1;ue>be&&!A.isMask.call(this,ue);ue--);return ne.splice(be,ue+1-be),E.isComplete.call(this,ne)&&X===(this.isRTL?A.getBuffer.call(this).slice().reverse().join(""):A.getBuffer.call(this).join(""))},format:function(X,te){this.maskset=this.maskset||(0,T.generateMaskSet)(this.opts,this.noMasksCache);var ne=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,X,this.opts)||X).split("");y.checkVal.call(this,void 0,!0,!1,ne);var be=this.isRTL?A.getBuffer.call(this).slice().reverse().join(""):A.getBuffer.call(this).join("");return te?{value:be,metadata:this.getmetadata()}:be},setValue:function(X){this.el&&(0,c.default)(this.el).trigger("setvalue",[X])},analyseMask:T.analyseMask},H.extendDefaults=function(X){c.default.extend(!0,H.prototype.defaults,X)},H.extendDefinitions=function(X){c.default.extend(!0,H.prototype.definitions,X)},H.extendAliases=function(X){c.default.extend(!0,H.prototype.aliases,X)},H.format=function(X,te,ne){return H(te).format(X,ne)},H.unmask=function(X,te){return H(te).unmaskedvalue(X)},H.isValid=function(X,te){return H(te).isValid(X)},H.remove=function(X){typeof X=="string"&&(X=L.getElementById(X)||L.querySelectorAll(X)),(X=X.nodeName?[X]:X).forEach(function(te){te.inputmask&&te.inputmask.remove()})},H.setValue=function(X,te){typeof X=="string"&&(X=L.getElementById(X)||L.querySelectorAll(X)),(X=X.nodeName?[X]:X).forEach(function(ne){ne.inputmask?ne.inputmask.setValue(te):(0,c.default)(ne).trigger("setvalue",[te])})},H.dependencyLib=c.default,v.default.Inputmask=H;var Q=H;o.default=Q},5296:function(s,o,l){function d($){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},d($)}var c=O(l(9380)),v=O(l(2394)),T=O(l(8741));function b($){var L=y();return function(){var j,H=D($);if(L){var V=D(this).constructor;j=Reflect.construct(H,arguments,V)}else j=H.apply(this,arguments);return function(Q,X){if(X&&(d(X)==="object"||typeof X=="function"))return X;if(X!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}(Q)}(this,j)}}function A($){var L=typeof Map=="function"?new Map:void 0;return A=function(j){if(j===null||(H=j,Function.toString.call(H).indexOf("[native code]")===-1))return j;var H;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(L!==void 0){if(L.has(j))return L.get(j);L.set(j,V)}function V(){return E(j,arguments,D(this).constructor)}return V.prototype=Object.create(j.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),I(V,j)},A($)}function E($,L,j){return E=y()?Reflect.construct.bind():function(H,V,Q){var X=[null];X.push.apply(X,V);var te=new(Function.bind.apply(H,X));return Q&&I(te,Q.prototype),te},E.apply(null,arguments)}function y(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I($,L){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,H){return j.__proto__=H,j},I($,L)}function D($){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(L){return L.__proto__||Object.getPrototypeOf(L)},D($)}function O($){return $&&$.__esModule?$:{default:$}}var M=c.default.document;if(T.default&&M&&M.head&&M.head.attachShadow&&c.default.customElements&&c.default.customElements.get("input-mask")===void 0){var F=function($){(function(V,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function");V.prototype=Object.create(Q&&Q.prototype,{constructor:{value:V,writable:!0,configurable:!0}}),Object.defineProperty(V,"prototype",{writable:!1}),Q&&I(V,Q)})(H,$);var L,j=b(H);function H(){var V;(function(ue,Ce){if(!(ue instanceof Ce))throw new TypeError("Cannot call a class as a function")})(this,H);var Q=(V=j.call(this)).getAttributeNames(),X=V.attachShadow({mode:"closed"}),te=M.createElement("input");for(var ne in te.type="text",X.appendChild(te),Q)Object.prototype.hasOwnProperty.call(Q,ne)&&te.setAttribute(Q[ne],V.getAttribute(Q[ne]));var be=new v.default;return be.dataAttribute="",be.mask(te),te.inputmask.shadowRoot=X,V}return L=H,Object.defineProperty(L,"prototype",{writable:!1}),L}(A(HTMLElement));c.default.customElements.define("input-mask",F)}},2839:function(s,o){function l(b,A){return function(E){if(Array.isArray(E))return E}(b)||function(E,y){var I=E==null?null:typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(I!=null){var D,O,M,F,$=[],L=!0,j=!1;try{if(M=(I=I.call(E)).next,y!==0)for(;!(L=(D=M.call(I)).done)&&($.push(D.value),$.length!==y);L=!0);}catch(H){j=!0,O=H}finally{try{if(!L&&I.return!=null&&(F=I.return(),Object(F)!==F))return}finally{if(j)throw O}}return $}}(b,A)||function(E,y){if(E){if(typeof E=="string")return d(E,y);var I=Object.prototype.toString.call(E).slice(8,-1);if(I==="Object"&&E.constructor&&(I=E.constructor.name),I==="Map"||I==="Set")return Array.from(E);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return d(E,y)}}(b,A)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function d(b,A){(A==null||A>b.length)&&(A=b.length);for(var E=0,y=new Array(A);E<A;E++)y[E]=b[E];return y}Object.defineProperty(o,"__esModule",{value:!0}),o.keys=o.keyCode=void 0,o.toKey=function(b,A){return v[b]||(A?String.fromCharCode(b):String.fromCharCode(b).toLowerCase())},o.toKeyCode=function(b){return c[b]};var c={AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,BACKSPACE_SAFARI:127,CapsLock:20,Delete:46,End:35,Enter:13,Escape:27,Home:36,Insert:45,PageDown:34,PageUp:33,Space:32,Tab:9,c:67,x:88,z:90,Shift:16,Control:17,Alt:18,Pause:19,Meta_LEFT:91,Meta_RIGHT:92,ContextMenu:93,Process:229,Unidentified:229,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};o.keyCode=c;var v=Object.entries(c).reduce(function(b,A){var E=l(A,2),y=E[0],I=E[1];return b[I]=b[I]===void 0?y:b[I],b},{}),T=Object.entries(c).reduce(function(b,A){var E=l(A,2),y=E[0];return E[1],b[y]=y==="Space"?" ":y,b},{});o.keys=T},2391:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.analyseMask=function(E,y,I){var D,O,M,F,$,L,j=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,H=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,V=!1,Q=new c.default,X=[],te=[],ne=!1;function be(we,Ve,Ke){Ke=Ke!==void 0?Ke:we.matches.length;var yt=we.matches[Ke-1];if(y){if(Ve.indexOf("[")===0||V&&/\\d|\\s|\\w|\\p/i.test(Ve)||Ve==="."){var ht=I.casing?"i":"";/^\\p\{.*}$/i.test(Ve)&&(ht+="u"),we.matches.splice(Ke++,0,{fn:new RegExp(Ve,ht),static:!1,optionality:!1,newBlockMarker:yt===void 0?"master":yt.def!==Ve,casing:null,def:Ve,placeholder:void 0,nativeDef:Ve})}else V&&(Ve=Ve[Ve.length-1]),Ve.split("").forEach(function(pt,Tt){yt=we.matches[Ke-1],we.matches.splice(Ke++,0,{fn:/[a-z]/i.test(I.staticDefinitionSymbol||pt)?new RegExp("["+(I.staticDefinitionSymbol||pt)+"]",I.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:yt===void 0?"master":yt.def!==pt&&yt.static!==!0,casing:null,def:I.staticDefinitionSymbol||pt,placeholder:I.staticDefinitionSymbol!==void 0?pt:void 0,nativeDef:(V?"'":"")+pt})});V=!1}else{var Je=I.definitions&&I.definitions[Ve]||I.usePrototypeDefinitions&&v.default.prototype.definitions[Ve];Je&&!V?we.matches.splice(Ke++,0,{fn:Je.validator?typeof Je.validator=="string"?new RegExp(Je.validator,I.casing?"i":""):new function(){this.test=Je.validator}:new RegExp("."),static:Je.static||!1,optionality:Je.optional||!1,defOptionality:Je.optional||!1,newBlockMarker:yt===void 0||Je.optional?"master":yt.def!==(Je.definitionSymbol||Ve),casing:Je.casing,def:Je.definitionSymbol||Ve,placeholder:Je.placeholder,nativeDef:Ve,generated:Je.generated}):(we.matches.splice(Ke++,0,{fn:/[a-z]/i.test(I.staticDefinitionSymbol||Ve)?new RegExp("["+(I.staticDefinitionSymbol||Ve)+"]",I.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:yt===void 0?"master":yt.def!==Ve&&yt.static!==!0,casing:null,def:I.staticDefinitionSymbol||Ve,placeholder:I.staticDefinitionSymbol!==void 0?Ve:void 0,nativeDef:(V?"'":"")+Ve}),V=!1)}}function ue(){if(X.length>0){if(be(F=X[X.length-1],O),F.isAlternator){$=X.pop();for(var we=0;we<$.matches.length;we++)$.matches[we].isGroup&&($.matches[we].isGroup=!1);X.length>0?(F=X[X.length-1]).matches.push($):Q.matches.push($)}}else be(Q,O)}function Ce(we){var Ve=new c.default(!0);return Ve.openGroup=!1,Ve.matches=we,Ve}function ie(){if((M=X.pop()).openGroup=!1,M!==void 0)if(X.length>0){if((F=X[X.length-1]).matches.push(M),F.isAlternator){for(var we=($=X.pop()).matches[0].matches?$.matches[0].matches.length:1,Ve=0;Ve<$.matches.length;Ve++)$.matches[Ve].isGroup=!1,$.matches[Ve].alternatorGroup=!1,I.keepStatic===null&&we<($.matches[Ve].matches?$.matches[Ve].matches.length:1)&&(I.keepStatic=!0),we=$.matches[Ve].matches?$.matches[Ve].matches.length:1;X.length>0?(F=X[X.length-1]).matches.push($):Q.matches.push($)}}else Q.matches.push(M);else ue()}function Y(we){var Ve=we.pop();return Ve.isQuantifier&&(Ve=Ce([we.pop(),Ve])),Ve}for(y&&(I.optionalmarker[0]=void 0,I.optionalmarker[1]=void 0);D=y?H.exec(E):j.exec(E);){if(O=D[0],y){switch(O.charAt(0)){case"?":O="{0,1}";break;case"+":case"*":O="{"+O+"}";break;case"|":if(X.length===0){var he=Ce(Q.matches);he.openGroup=!0,X.push(he),Q.matches=[],ne=!0}}switch(O){case"\\d":O="[0-9]";break;case"\\p":O+=H.exec(E)[0],O+=H.exec(E)[0]}}if(V)ue();else switch(O.charAt(0)){case"$":case"^":y||ue();break;case I.escapeChar:V=!0,y&&ue();break;case I.optionalmarker[1]:case I.groupmarker[1]:ie();break;case I.optionalmarker[0]:X.push(new c.default(!1,!0));break;case I.groupmarker[0]:X.push(new c.default(!0));break;case I.quantifiermarker[0]:var Me=new c.default(!1,!1,!0),Pe=(O=O.replace(/[{}?]/g,"")).split("|"),We=Pe[0].split(","),qe=isNaN(We[0])?We[0]:parseInt(We[0]),ee=We.length===1?qe:isNaN(We[1])?We[1]:parseInt(We[1]),G=isNaN(Pe[1])?Pe[1]:parseInt(Pe[1]);qe!=="*"&&qe!=="+"||(qe=ee==="*"?0:1),Me.quantifier={min:qe,max:ee,jit:G};var me=X.length>0?X[X.length-1].matches:Q.matches;(D=me.pop()).isGroup||(D=Ce([D])),me.push(D),me.push(Me);break;case I.alternatormarker:if(X.length>0){var Te=(F=X[X.length-1]).matches[F.matches.length-1];L=F.openGroup&&(Te.matches===void 0||Te.isGroup===!1&&Te.isAlternator===!1)?X.pop():Y(F.matches)}else L=Y(Q.matches);if(L.isAlternator)X.push(L);else if(L.alternatorGroup?($=X.pop(),L.alternatorGroup=!1):$=new c.default(!1,!1,!1,!0),$.matches.push(L),X.push($),L.openGroup){L.openGroup=!1;var De=new c.default(!0);De.alternatorGroup=!0,X.push(De)}break;default:ue()}}for(ne&&ie();X.length>0;)M=X.pop(),Q.matches.push(M);return Q.matches.length>0&&(function we(Ve){Ve&&Ve.matches&&Ve.matches.forEach(function(Ke,yt){var ht=Ve.matches[yt+1];(ht===void 0||ht.matches===void 0||ht.isQuantifier===!1)&&Ke&&Ke.isGroup&&(Ke.isGroup=!1,y||(be(Ke,I.groupmarker[0],0),Ke.openGroup!==!0&&be(Ke,I.groupmarker[1]))),we(Ke)})}(Q),te.push(Q)),(I.numericInput||I.isRTL)&&function we(Ve){for(var Ke in Ve.matches=Ve.matches.reverse(),Ve.matches)if(Object.prototype.hasOwnProperty.call(Ve.matches,Ke)){var yt=parseInt(Ke);if(Ve.matches[Ke].isQuantifier&&Ve.matches[yt+1]&&Ve.matches[yt+1].isGroup){var ht=Ve.matches[Ke];Ve.matches.splice(Ke,1),Ve.matches.splice(yt+1,0,ht)}Ve.matches[Ke].matches!==void 0?Ve.matches[Ke]=we(Ve.matches[Ke]):Ve.matches[Ke]=((Je=Ve.matches[Ke])===I.optionalmarker[0]?Je=I.optionalmarker[1]:Je===I.optionalmarker[1]?Je=I.optionalmarker[0]:Je===I.groupmarker[0]?Je=I.groupmarker[1]:Je===I.groupmarker[1]&&(Je=I.groupmarker[0]),Je)}var Je;return Ve}(te[0]),te},o.generateMaskSet=function(E,y){var I;function D(F,$){var L=$.repeat,j=$.groupmarker,H=$.quantifiermarker,V=$.keepStatic;if(L>0||L==="*"||L==="+"){var Q=L==="*"?0:L==="+"?1:L;F=j[0]+F+j[1]+H[0]+Q+","+L+H[1]}if(V===!0){var X=F.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));X&&X.forEach(function(te,ne){var be=function(ie,Y){return function(he){if(Array.isArray(he))return he}(ie)||function(he,Me){var Pe=he==null?null:typeof Symbol<"u"&&he[Symbol.iterator]||he["@@iterator"];if(Pe!=null){var We,qe,ee,G,me=[],Te=!0,De=!1;try{if(ee=(Pe=Pe.call(he)).next,Me!==0)for(;!(Te=(We=ee.call(Pe)).done)&&(me.push(We.value),me.length!==Me);Te=!0);}catch(we){De=!0,qe=we}finally{try{if(!Te&&Pe.return!=null&&(G=Pe.return(),Object(G)!==G))return}finally{if(De)throw qe}}return me}}(ie,Y)||function(he,Me){if(he){if(typeof he=="string")return b(he,Me);var Pe=Object.prototype.toString.call(he).slice(8,-1);if(Pe==="Object"&&he.constructor&&(Pe=he.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(he);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return b(he,Me)}}(ie,Y)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(te.split("["),2),ue=be[0],Ce=be[1];Ce=Ce.replace("]",""),F=F.replace(new RegExp("".concat((0,T.default)(ue),"\\[").concat((0,T.default)(Ce),"\\]")),ue.charAt(0)===Ce.charAt(0)?"(".concat(ue,"|").concat(ue).concat(Ce,")"):"".concat(ue,"[").concat(Ce,"]"))})}return F}function O(F,$,L){var j,H,V=!1;return F!==null&&F!==""||((V=L.regex!==null)?F=(F=L.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(V=!0,F=".*")),F.length===1&&L.greedy===!1&&L.repeat!==0&&(L.placeholder=""),F=D(F,L),H=V?"regex_"+L.regex:L.numericInput?F.split("").reverse().join(""):F,L.keepStatic!==null&&(H="ks_"+L.keepStatic+H),v.default.prototype.masksCache[H]===void 0||y===!0?(j={mask:F,maskToken:v.default.prototype.analyseMask(F,V,L),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:$,maskLength:void 0,jitOffset:{}},y!==!0&&(v.default.prototype.masksCache[H]=j,j=d.default.extend(!0,{},v.default.prototype.masksCache[H]))):j=d.default.extend(!0,{},v.default.prototype.masksCache[H]),j}if(typeof E.mask=="function"&&(E.mask=E.mask(E)),Array.isArray(E.mask)){if(E.mask.length>1){E.keepStatic===null&&(E.keepStatic=!0);var M=E.groupmarker[0];return(E.isRTL?E.mask.reverse():E.mask).forEach(function(F){M.length>1&&(M+=E.alternatormarker),F.mask!==void 0&&typeof F.mask!="function"?M+=F.mask:M+=F}),O(M+=E.groupmarker[1],E.mask,E)}E.mask=E.mask.pop()}return I=E.mask&&E.mask.mask!==void 0&&typeof E.mask.mask!="function"?O(E.mask.mask,E.mask,E):O(E.mask,E.mask,E),E.keepStatic===null&&(E.keepStatic=!1),I};var d=A(l(4963)),c=A(l(9695)),v=A(l(2394)),T=A(l(7184));function b(E,y){(y==null||y>E.length)&&(y=E.length);for(var I=0,D=new Array(y);I<y;I++)D[I]=E[I];return D}function A(E){return E&&E.__esModule?E:{default:E}}},157:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mask=function(){var y=this,I=this.opts,D=this.el,O=this.dependencyLib;T.EventRuler.off(D);var M=function(L,j){L.tagName.toLowerCase()!=="textarea"&&j.ignorables.push(d.keys.Enter);var H=L.getAttribute("type"),V=L.tagName.toLowerCase()==="input"&&j.supportsInputType.includes(H)||L.isContentEditable||L.tagName.toLowerCase()==="textarea";if(!V)if(L.tagName.toLowerCase()==="input"){var Q=document.createElement("input");Q.setAttribute("type",H),V=Q.type==="text",Q=null}else V="partial";return V!==!1?function(X){var te,ne;function be(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():c.getLastValidPosition.call(y)!==-1||j.nullable!==!0?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&j.clearMaskOnLostFocus?(y.isRTL?v.clearOptionalTail.call(y,c.getBuffer.call(y).slice()).reverse():v.clearOptionalTail.call(y,c.getBuffer.call(y).slice())).join(""):te.call(this):"":te.call(this)}function ue(ie){ne.call(this,ie),this.inputmask&&(0,v.applyInputValue)(this,ie)}if(!X.inputmask.__valueGet){if(j.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){var Ce=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(X),"value"):void 0;Ce&&Ce.get&&Ce.set?(te=Ce.get,ne=Ce.set,Object.defineProperty(X,"value",{get:be,set:ue,configurable:!0})):X.tagName.toLowerCase()!=="input"&&(te=function(){return this.textContent},ne=function(ie){this.textContent=ie},Object.defineProperty(X,"value",{get:be,set:ue,configurable:!0}))}else document.__lookupGetter__&&X.__lookupGetter__("value")&&(te=X.__lookupGetter__("value"),ne=X.__lookupSetter__("value"),X.__defineGetter__("value",be),X.__defineSetter__("value",ue));X.inputmask.__valueGet=te,X.inputmask.__valueSet=ne}X.inputmask._valueGet=function(ie){return y.isRTL&&ie!==!0?te.call(this.el).split("").reverse().join(""):te.call(this.el)},X.inputmask._valueSet=function(ie,Y){ne.call(this.el,ie==null?"":Y!==!0&&y.isRTL?ie.split("").reverse().join(""):ie)},te===void 0&&(te=function(){return this.value},ne=function(ie){this.value=ie},function(ie){if(O.valHooks&&(O.valHooks[ie]===void 0||O.valHooks[ie].inputmaskpatch!==!0)){var Y=O.valHooks[ie]&&O.valHooks[ie].get?O.valHooks[ie].get:function(Me){return Me.value},he=O.valHooks[ie]&&O.valHooks[ie].set?O.valHooks[ie].set:function(Me,Pe){return Me.value=Pe,Me};O.valHooks[ie]={get:function(Me){if(Me.inputmask){if(Me.inputmask.opts.autoUnmask)return Me.inputmask.unmaskedvalue();var Pe=Y(Me);return c.getLastValidPosition.call(y,void 0,void 0,Me.inputmask.maskset.validPositions)!==-1||j.nullable!==!0?Pe:""}return Y(Me)},set:function(Me,Pe){var We=he(Me,Pe);return Me.inputmask&&(0,v.applyInputValue)(Me,Pe),We},inputmaskpatch:!0}}}(X.type),function(ie){T.EventRuler.on(ie,"mouseenter",function(){var Y=this,he=Y.inputmask._valueGet(!0);he!=(Y.inputmask.isRTL?c.getBuffer.call(Y.inputmask).slice().reverse():c.getBuffer.call(Y.inputmask)).join("")&&(0,v.applyInputValue)(Y,he)})}(X))}}(L):L.inputmask=void 0,V}(D,I);if(M!==!1){y.originalPlaceholder=D.placeholder,y.maxLength=D!==void 0?D.maxLength:void 0,y.maxLength===-1&&(y.maxLength=void 0),"inputMode"in D&&D.getAttribute("inputmode")===null&&(D.inputMode=I.inputmode,D.setAttribute("inputmode",I.inputmode)),M===!0&&(I.showMaskOnFocus=I.showMaskOnFocus&&["cc-number","cc-exp"].indexOf(D.autocomplete)===-1,b.iphone&&(I.insertModeVisual=!1,D.setAttribute("autocorrect","off")),T.EventRuler.on(D,"submit",E.EventHandlers.submitEvent),T.EventRuler.on(D,"reset",E.EventHandlers.resetEvent),T.EventRuler.on(D,"blur",E.EventHandlers.blurEvent),T.EventRuler.on(D,"focus",E.EventHandlers.focusEvent),T.EventRuler.on(D,"invalid",E.EventHandlers.invalidEvent),T.EventRuler.on(D,"click",E.EventHandlers.clickEvent),T.EventRuler.on(D,"mouseleave",E.EventHandlers.mouseleaveEvent),T.EventRuler.on(D,"mouseenter",E.EventHandlers.mouseenterEvent),T.EventRuler.on(D,"paste",E.EventHandlers.pasteEvent),T.EventRuler.on(D,"cut",E.EventHandlers.cutEvent),T.EventRuler.on(D,"complete",I.oncomplete),T.EventRuler.on(D,"incomplete",I.onincomplete),T.EventRuler.on(D,"cleared",I.oncleared),I.inputEventOnly!==!0&&T.EventRuler.on(D,"keydown",E.EventHandlers.keyEvent),(b.mobile||I.inputEventOnly)&&D.removeAttribute("maxLength"),T.EventRuler.on(D,"input",E.EventHandlers.inputFallBackEvent)),T.EventRuler.on(D,"setvalue",E.EventHandlers.setValueEvent),c.getBufferTemplate.call(y).join(""),y.undoValue=y._valueGet(!0);var F=(D.inputmask.shadowRoot||D.ownerDocument).activeElement;if(D.inputmask._valueGet(!0)!==""||I.clearMaskOnLostFocus===!1||F===D){(0,v.applyInputValue)(D,D.inputmask._valueGet(!0),I);var $=c.getBuffer.call(y).slice();A.isComplete.call(y,$)===!1&&I.clearIncomplete&&c.resetMaskSet.call(y),I.clearMaskOnLostFocus&&F!==D&&(c.getLastValidPosition.call(y)===-1?$=[]:v.clearOptionalTail.call(y,$)),(I.clearMaskOnLostFocus===!1||I.showMaskOnFocus&&F===D||D.inputmask._valueGet(!0)!=="")&&(0,v.writeBuffer)(D,$),F===D&&c.caret.call(y,D,c.seekNext.call(y,c.getLastValidPosition.call(y)))}}};var d=l(2839),c=l(8711),v=l(7760),T=l(9716),b=l(9845),A=l(7215),E=l(6030)},9695:function(s,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(l,d,c,v){this.matches=[],this.openGroup=l||!1,this.alternatorGroup=!1,this.isGroup=l||!1,this.isOptional=d||!1,this.isQuantifier=c||!1,this.isAlternator=v||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(s,o){if(this==null)throw new TypeError('"this" is null or not defined');var l=Object(this),d=l.length>>>0;if(d===0)return!1;for(var c=0|o,v=Math.max(c>=0?c:d-Math.abs(c),0);v<d;){if(l[v]===s)return!0;v++}return!1}})},9302:function(){var s=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),l=Function.bind.call(Function.call,Array.prototype.concat),d=Object.keys;Object.entries||(Object.entries=function(c){return s(d(c),function(v,T){return l(v,typeof T=="string"&&o(c,T)?[[T,c[T]]]:[])},[])})},7149:function(){function s(o){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},s(o)}typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=s("test".__proto__)==="object"?function(o){return o.__proto__}:function(o){return o.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(s,o){return typeof o!="number"&&(o=0),!(o+s.length>this.length)&&this.indexOf(s,o)!==-1})},8711:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.caret=function(y,I,D,O,M){var F,$=this,L=this.opts;if(I===void 0)return"selectionStart"in y&&"selectionEnd"in y?(I=y.selectionStart,D=y.selectionEnd):window.getSelection?(F=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==y&&F.commonAncestorContainer!==y||(I=F.startOffset,D=F.endOffset):document.selection&&document.selection.createRange&&(D=(I=0-(F=document.selection.createRange()).duplicate().moveStart("character",-y.inputmask._valueGet().length))+F.text.length),{begin:O?I:E.call($,I),end:O?D:E.call($,D)};if(Array.isArray(I)&&(D=$.isRTL?I[0]:I[1],I=$.isRTL?I[1]:I[0]),I.begin!==void 0&&(D=$.isRTL?I.begin:I.end,I=$.isRTL?I.end:I.begin),typeof I=="number"){I=O?I:E.call($,I),D=typeof(D=O?D:E.call($,D))=="number"?D:I;var j=parseInt(((y.ownerDocument.defaultView||window).getComputedStyle?(y.ownerDocument.defaultView||window).getComputedStyle(y,null):y.currentStyle).fontSize)*D;if(y.scrollLeft=j>y.scrollWidth?j:0,y.inputmask.caretPos={begin:I,end:D},L.insertModeVisual&&L.insertMode===!1&&I===D&&(M||D++),y===(y.inputmask.shadowRoot||y.ownerDocument).activeElement)if("setSelectionRange"in y)y.setSelectionRange(I,D);else if(window.getSelection){if(F=document.createRange(),y.firstChild===void 0||y.firstChild===null){var H=document.createTextNode("");y.appendChild(H)}F.setStart(y.firstChild,I<y.inputmask._valueGet().length?I:y.inputmask._valueGet().length),F.setEnd(y.firstChild,D<y.inputmask._valueGet().length?D:y.inputmask._valueGet().length),F.collapse(!0);var V=window.getSelection();V.removeAllRanges(),V.addRange(F)}else y.createTextRange&&((F=y.createTextRange()).collapse(!0),F.moveEnd("character",D),F.moveStart("character",I),F.select())}},o.determineLastRequiredPosition=function(y){var I,D,O=this,M=O.maskset,F=O.dependencyLib,$=d.getMaskTemplate.call(O,!0,T.call(O),!0,!0),L=$.length,j=T.call(O),H={},V=M.validPositions[j],Q=V!==void 0?V.locator.slice():void 0;for(I=j+1;I<$.length;I++)Q=(D=d.getTestTemplate.call(O,I,Q,I-1)).locator.slice(),H[I]=F.extend(!0,{},D);var X=V&&V.alternation!==void 0?V.locator[V.alternation]:void 0;for(I=L-1;I>j&&((D=H[I]).match.optionality||D.match.optionalQuantifier&&D.match.newBlockMarker||X&&(X!==H[I].locator[V.alternation]&&D.match.static!=1||D.match.static===!0&&D.locator[V.alternation]&&c.checkAlternationMatch.call(O,D.locator[V.alternation].toString().split(","),X.toString().split(","))&&d.getTests.call(O,I)[0].def!==""))&&$[I]===d.getPlaceholder.call(O,I,D.match);I--)L--;return y?{l:L,def:H[L]?H[L].match:void 0}:L},o.determineNewCaretPosition=function(y,I,D){var O=this,M=O.maskset,F=O.opts;if(I&&(O.isRTL?y.end=y.begin:y.begin=y.end),y.begin===y.end){switch(D=D||F.positionCaretOnClick){case"none":break;case"select":y={begin:0,end:v.call(O).length};break;case"ignore":y.end=y.begin=A.call(O,T.call(O));break;case"radixFocus":if(O.clicked>1&&M.validPositions.length==0)break;if(function(ne){if(F.radixPoint!==""&&F.digits!==0){var be=M.validPositions;if(be[ne]===void 0||be[ne].input===d.getPlaceholder.call(O,ne)){if(ne<A.call(O,-1))return!0;var ue=v.call(O).indexOf(F.radixPoint);if(ue!==-1){for(var Ce=0,ie=be.length;Ce<ie;Ce++)if(be[Ce]&&ue<Ce&&be[Ce].input!==d.getPlaceholder.call(O,Ce))return!1;return!0}}}return!1}(y.begin)){var $=v.call(O).join("").indexOf(F.radixPoint);y.end=y.begin=F.numericInput?A.call(O,$):$;break}default:var L=y.begin,j=T.call(O,L,!0),H=A.call(O,j!==-1||b.call(O,0)?j:-1);if(L<=H)y.end=y.begin=b.call(O,L,!1,!0)?L:A.call(O,L);else{var V=M.validPositions[j],Q=d.getTestTemplate.call(O,H,V?V.match.locator:void 0,V),X=d.getPlaceholder.call(O,H,Q.match);if(X!==""&&v.call(O)[H]!==X&&Q.match.optionalQuantifier!==!0&&Q.match.newBlockMarker!==!0||!b.call(O,H,F.keepStatic,!0)&&Q.match.def===X){var te=A.call(O,H);(L>=te||L===H)&&(H=te)}y.end=y.begin=H}}return y}},o.getBuffer=v,o.getBufferTemplate=function(){var y=this.maskset;return y._buffer===void 0&&(y._buffer=d.getMaskTemplate.call(this,!1,1),y.buffer===void 0&&(y.buffer=y._buffer.slice())),y._buffer},o.getLastValidPosition=T,o.isMask=b,o.resetMaskSet=function(y){var I=this.maskset;I.buffer=void 0,y!==!0&&(I.validPositions=[],I.p=0)},o.seekNext=A,o.seekPrevious=function(y,I){var D=this,O=y-1;if(y<=0)return 0;for(;O>0&&(I===!0&&(d.getTest.call(D,O).match.newBlockMarker!==!0||!b.call(D,O,void 0,!0))||I!==!0&&!b.call(D,O,void 0,!0));)O--;return O},o.translatePosition=E;var d=l(4713),c=l(7215);function v(y){var I=this,D=I.maskset;return D.buffer!==void 0&&y!==!0||(D.buffer=d.getMaskTemplate.call(I,!0,T.call(I),!0),D._buffer===void 0&&(D._buffer=D.buffer.slice())),D.buffer}function T(y,I,D){var O=this.maskset,M=-1,F=-1,$=D||O.validPositions;y===void 0&&(y=-1);for(var L=0,j=$.length;L<j;L++)$[L]&&(I||$[L].generatedInput!==!0)&&(L<=y&&(M=L),L>=y&&(F=L));return M===-1||M==y?F:F==-1||y-M<F-y?M:F}function b(y,I,D){var O=this,M=this.maskset,F=d.getTestTemplate.call(O,y).match;if(F.def===""&&(F=d.getTest.call(O,y).match),F.static!==!0)return F.fn;if(D===!0&&M.validPositions[y]!==void 0&&M.validPositions[y].generatedInput!==!0)return!0;if(I!==!0&&y>-1){if(D){var $=d.getTests.call(O,y);return $.length>1+($[$.length-1].match.def===""?1:0)}var L=d.determineTestTemplate.call(O,y,d.getTests.call(O,y)),j=d.getPlaceholder.call(O,y,L.match);return L.match.def!==j}return!1}function A(y,I,D){var O=this;D===void 0&&(D=!0);for(var M=y+1;d.getTest.call(O,M).match.def!==""&&(I===!0&&(d.getTest.call(O,M).match.newBlockMarker!==!0||!b.call(O,M,void 0,!0))||I!==!0&&!b.call(O,M,void 0,D));)M++;return M}function E(y){var I=this.opts,D=this.el;return!this.isRTL||typeof y!="number"||I.greedy&&I.placeholder===""||!D||(y=this._valueGet().length-y)<0&&(y=0),y}},4713:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.determineTestTemplate=E,o.getDecisionTaker=T,o.getMaskTemplate=function(O,M,F,$,L){var j=this,H=this.opts,V=this.maskset,Q=H.greedy;L&&H.greedy&&(H.greedy=!1,j.maskset.tests={}),M=M||0;var X,te,ne,be,ue=[],Ce=0;do{if(O===!0&&V.validPositions[Ce])te=(ne=L&&V.validPositions[Ce].match.optionality&&V.validPositions[Ce+1]===void 0&&(V.validPositions[Ce].generatedInput===!0||V.validPositions[Ce].input==H.skipOptionalPartCharacter&&Ce>0)?E.call(j,Ce,D.call(j,Ce,X,Ce-1)):V.validPositions[Ce]).match,X=ne.locator.slice(),ue.push(F===!0?ne.input:F===!1?te.nativeDef:b.call(j,Ce,te));else{te=(ne=A.call(j,Ce,X,Ce-1)).match,X=ne.locator.slice();var ie=$!==!0&&(H.jitMasking!==!1?H.jitMasking:te.jit);(be=(be&&te.static&&te.def!==H.groupSeparator&&te.fn===null||V.validPositions[Ce-1]&&te.static&&te.def!==H.groupSeparator&&te.fn===null)&&V.tests[Ce])||ie===!1||ie===void 0||typeof ie=="number"&&isFinite(ie)&&ie>Ce?ue.push(F===!1?te.nativeDef:b.call(j,ue.length,te)):be=!1}Ce++}while(te.static!==!0||te.def!==""||M>Ce);return ue[ue.length-1]===""&&ue.pop(),F===!1&&V.maskLength!==void 0||(V.maskLength=Ce-1),H.greedy=Q,ue},o.getPlaceholder=b,o.getTest=y,o.getTestTemplate=A,o.getTests=D,o.isSubsetOf=I;var d,c=(d=l(2394))&&d.__esModule?d:{default:d};function v(O,M){var F=(O.alternation!=null?O.mloc[T(O)]:O.locator).join("");if(F!=="")for(;F.length<M;)F+="0";return F}function T(O){var M=O.locator[O.alternation];return typeof M=="string"&&M.length>0&&(M=M.split(",")[0]),M!==void 0?M.toString():""}function b(O,M,F){var $=this.opts,L=this.maskset;if((M=M||y.call(this,O).match).placeholder!==void 0||F===!0)return typeof M.placeholder=="function"?M.placeholder($):M.placeholder;if(M.static===!0){if(O>-1&&L.validPositions[O]===void 0){var j,H=D.call(this,O),V=[];if(H.length>1+(H[H.length-1].match.def===""?1:0)){for(var Q=0;Q<H.length;Q++)if(H[Q].match.def!==""&&H[Q].match.optionality!==!0&&H[Q].match.optionalQuantifier!==!0&&(H[Q].match.static===!0||j===void 0||H[Q].match.fn.test(j.match.def,L,O,!0,$)!==!1)&&(V.push(H[Q]),H[Q].match.static===!0&&(j=H[Q]),V.length>1&&/[0-9a-bA-Z]/.test(V[0].match.def)))return $.placeholder.charAt(O%$.placeholder.length)}}return M.def}return $.placeholder.charAt(O%$.placeholder.length)}function A(O,M,F){return this.maskset.validPositions[O]||E.call(this,O,D.call(this,O,M&&M.slice(),F))}function E(O,M){var F=this.opts,$=0,L=function(be,ue){var Ce=0,ie=!1;return ue.forEach(function(Y){Y.match.optionality&&(Ce!==0&&Ce!==Y.match.optionality&&(ie=!0),(Ce===0||Ce>Y.match.optionality)&&(Ce=Y.match.optionality))}),Ce&&(be==0||ue.length==1?Ce=0:ie||(Ce=0)),Ce}(O,M);O=O>0?O-1:0;var j,H,V,Q=v(y.call(this,O));F.greedy&&M.length>1&&M[M.length-1].match.def===""&&($=1);for(var X=0;X<M.length-$;X++){var te=M[X];j=v(te,Q.length);var ne=Math.abs(j-Q);(H===void 0||j!==""&&ne<H||V&&!F.greedy&&V.match.optionality&&V.match.optionality-L>0&&V.match.newBlockMarker==="master"&&(!te.match.optionality||te.match.optionality-L<1||!te.match.newBlockMarker)||V&&!F.greedy&&V.match.optionalQuantifier&&!te.match.optionalQuantifier)&&(H=ne,V=te)}return V}function y(O,M){var F=this.maskset;return F.validPositions[O]?F.validPositions[O]:(M||D.call(this,O))[0]}function I(O,M,F){function $(L){for(var j,H=[],V=-1,Q=0,X=L.length;Q<X;Q++)if(L.charAt(Q)==="-")for(j=L.charCodeAt(Q+1);++V<j;)H.push(String.fromCharCode(V));else V=L.charCodeAt(Q),H.push(L.charAt(Q));return H.join("")}return O.match.def===M.match.nativeDef||!(!(F.regex||O.match.fn instanceof RegExp&&M.match.fn instanceof RegExp)||O.match.static===!0||M.match.static===!0)&&$(M.match.fn.toString().replace(/[[\]/]/g,"")).indexOf($(O.match.fn.toString().replace(/[[\]/]/g,"")))!==-1}function D(O,M,F){var $,L,j=this,H=this.dependencyLib,V=this.maskset,Q=this.opts,X=this.el,te=V.maskToken,ne=M?F:0,be=M?M.slice():[0],ue=[],Ce=!1,ie=M?M.join(""):"";function Y(qe,ee,G,me){function Te(Ve,Ke,yt){function ht(it,Ge){var st=Ge.matches.indexOf(it)===0;return st||Ge.matches.every(function(It,Ct){return It.isQuantifier===!0?st=ht(it,Ge.matches[Ct-1]):Object.prototype.hasOwnProperty.call(It,"matches")&&(st=ht(it,It)),!st}),st}function Je(it,Ge,st){var It,Ct;if((V.tests[it]||V.validPositions[it])&&(V.tests[it]||[V.validPositions[it]]).every(function(Rt,cn){if(Rt.mloc[Ge])return It=Rt,!1;var nn=st!==void 0?st:Rt.alternation,Qe=Rt.locator[nn]!==void 0?Rt.locator[nn].toString().indexOf(Ge):-1;return(Ct===void 0||Qe<Ct)&&Qe!==-1&&(It=Rt,Ct=Qe),!0}),It){var bt=It.locator[It.alternation];return(It.mloc[Ge]||It.mloc[bt]||It.locator).slice((st!==void 0?st:It.alternation)+1)}return st!==void 0?Je(it,Ge):void 0}function pt(it,Ge){var st=it.alternation,It=Ge===void 0||st===Ge.alternation&&it.locator[st].toString().indexOf(Ge.locator[st])===-1;if(!It&&st>Ge.alternation){for(var Ct=Ge.alternation;Ct<st;Ct++)if(it.locator[Ct]!==Ge.locator[Ct]){st=Ct,It=!0;break}}if(It){it.mloc=it.mloc||{};var bt=it.locator[st];if(bt!==void 0){if(typeof bt=="string"&&(bt=bt.split(",")[0]),it.mloc[bt]===void 0&&(it.mloc[bt]=it.locator.slice()),Ge!==void 0){for(var Rt in Ge.mloc)typeof Rt=="string"&&(Rt=Rt.split(",")[0]),it.mloc[Rt]===void 0&&(it.mloc[Rt]=Ge.mloc[Rt]);it.locator[st]=Object.keys(it.mloc).join(",")}return!0}it.alternation=void 0}return!1}function Tt(it,Ge){if(it.locator.length!==Ge.locator.length)return!1;for(var st=it.alternation+1;st<it.locator.length;st++)if(it.locator[st]!==Ge.locator[st])return!1;return!0}if(ne>O+Q._maxTestPos)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+V.mask;if(ne===O&&Ve.matches===void 0){if(ue.push({match:Ve,locator:Ke.reverse(),cd:ie,mloc:{}}),!Ve.optionality||yt!==void 0||!(Q.definitions&&Q.definitions[Ve.nativeDef]&&Q.definitions[Ve.nativeDef].optional||c.default.prototype.definitions[Ve.nativeDef]&&c.default.prototype.definitions[Ve.nativeDef].optional))return!0;Ce=!0,ne=O}else if(Ve.matches!==void 0){if(Ve.isGroup&&yt!==Ve)return function(){if(Ve=Te(qe.matches[qe.matches.indexOf(Ve)+1],Ke,yt))return!0}();if(Ve.isOptional)return function(){var it=Ve,Ge=ue.length;if(Ve=Y(Ve,ee,Ke,yt),ue.length>0){if(ue.forEach(function(st,It){It>=Ge&&(st.match.optionality=st.match.optionality?st.match.optionality+1:1)}),$=ue[ue.length-1].match,yt!==void 0||!ht($,it))return Ve;Ce=!0,ne=O}}();if(Ve.isAlternator)return function(){j.hasAlternator=!0;var it,Ge,st,It=Ve,Ct=[],bt=ue.slice(),Rt=Ke.length,cn=!1,nn=ee.length>0?ee.shift():-1;if(nn===-1||typeof nn=="string"){var Qe,Ft=ne,Fn=ee.slice(),He=[];if(typeof nn=="string")He=nn.split(",");else for(Qe=0;Qe<It.matches.length;Qe++)He.push(Qe.toString());if(V.excludes[O]!==void 0){for(var Dt=He.slice(),Xt=0,Mt=V.excludes[O].length;Xt<Mt;Xt++){var Xe=V.excludes[O][Xt].toString().split(":");Ke.length==Xe[1]&&He.splice(He.indexOf(Xe[0]),1)}He.length===0&&(delete V.excludes[O],He=Dt)}(Q.keepStatic===!0||isFinite(parseInt(Q.keepStatic))&&Ft>=Q.keepStatic)&&(He=He.slice(0,1));for(var Nt=0;Nt<He.length;Nt++){Qe=parseInt(He[Nt]),ue=[],ee=typeof nn=="string"&&Je(ne,Qe,Rt)||Fn.slice();var on=It.matches[Qe];if(on&&Te(on,[Qe].concat(Ke),yt))Ve=!0;else if(Nt===0&&(cn=!0),on&&on.matches&&on.matches.length>It.matches[0].matches.length)break;it=ue.slice(),ne=Ft,ue=[];for(var In=0;In<it.length;In++){var dt=it[In],Zt=!1;dt.match.jit=dt.match.jit||cn,dt.alternation=dt.alternation||Rt,pt(dt);for(var Ln=0;Ln<Ct.length;Ln++){var xn=Ct[Ln];if(typeof nn!="string"||dt.alternation!==void 0&&He.includes(dt.locator[dt.alternation].toString())){if(dt.match.nativeDef===xn.match.nativeDef){Zt=!0,pt(xn,dt);break}if(I(dt,xn,Q)){pt(dt,xn)&&(Zt=!0,Ct.splice(Ct.indexOf(xn),0,dt));break}if(I(xn,dt,Q)){pt(xn,dt);break}if(st=xn,(Ge=dt).match.static===!0&&st.match.static!==!0&&st.match.fn.test(Ge.match.def,V,O,!1,Q,!1)){Tt(dt,xn)||X.inputmask.userOptions.keepStatic!==void 0?pt(dt,xn)&&(Zt=!0,Ct.splice(Ct.indexOf(xn),0,dt)):Q.keepStatic=!0;break}}}Zt||Ct.push(dt)}}ue=bt.concat(Ct),ne=O,Ce=ue.length>0,Ve=Ct.length>0,ee=Fn.slice()}else Ve=Te(It.matches[nn]||qe.matches[nn],[nn].concat(Ke),yt);if(Ve)return!0}();if(Ve.isQuantifier&&yt!==qe.matches[qe.matches.indexOf(Ve)-1])return function(){for(var it=Ve,Ge=!1,st=ee.length>0?ee.shift():0;st<(isNaN(it.quantifier.max)?st+1:it.quantifier.max)&&ne<=O;st++){var It=qe.matches[qe.matches.indexOf(it)-1];if(Ve=Te(It,[st].concat(Ke),It)){if(ue.forEach(function(Ct,bt){($=he(It,Ct.match)?Ct.match:ue[ue.length-1].match).optionalQuantifier=st>=it.quantifier.min,$.jit=(st+1)*(It.matches.indexOf($)+1)>it.quantifier.jit,$.optionalQuantifier&&ht($,It)&&(Ce=!0,ne=O,Q.greedy&&V.validPositions[O-1]==null&&st>it.quantifier.min&&["*","+"].indexOf(it.quantifier.max)!=-1&&(ue.pop(),ie=void 0),Ge=!0,Ve=!1),!Ge&&$.jit&&(V.jitOffset[O]=It.matches.length-It.matches.indexOf($))}),Ge)break;return!0}}}();if(Ve=Y(Ve,ee,Ke,yt))return!0}else ne++}for(var De=ee.length>0?ee.shift():0;De<qe.matches.length;De++)if(qe.matches[De].isQuantifier!==!0){var we=Te(qe.matches[De],[De].concat(G),me);if(we&&ne===O)return we;if(ne>O)break}}function he(qe,ee){var G=qe.matches.indexOf(ee)!=-1;return G||qe.matches.forEach(function(me,Te){me.matches===void 0||G||(G=he(me,ee))}),G}if(O>-1){if(M===void 0){for(var Me,Pe=O-1;(Me=V.validPositions[Pe]||V.tests[Pe])===void 0&&Pe>-1;)Pe--;Me!==void 0&&Pe>-1&&(be=function(qe,ee){var G,me=[];return Array.isArray(ee)||(ee=[ee]),ee.length>0&&(ee[0].alternation===void 0||Q.keepStatic===!0?(me=E.call(j,qe,ee.slice()).locator.slice()).length===0&&(me=ee[0].locator.slice()):ee.forEach(function(Te){Te.def!==""&&(me.length===0?(G=Te.alternation,me=Te.locator.slice()):Te.locator[G]&&me[G].toString().indexOf(Te.locator[G])===-1&&(me[G]+=","+Te.locator[G]))})),me}(Pe,Me),ie=be.join(""),ne=Pe)}if(V.tests[O]&&V.tests[O][0].cd===ie)return V.tests[O];for(var We=be.shift();We<te.length&&!(Y(te[We],be,[We])&&ne===O||ne>O);We++);}return(ue.length===0||Ce)&&ue.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:ie}),M!==void 0&&V.tests[O]?L=H.extend(!0,[],ue):(V.tests[O]=H.extend(!0,[],ue),L=V.tests[O]),ue.forEach(function(qe){qe.match.optionality=qe.match.defOptionality||!1}),L}},7215:function(s,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.alternate=b,o.checkAlternationMatch=function($,L,j){for(var H,V=this.opts.greedy?L:L.slice(0,1),Q=!1,X=j!==void 0?j.split(","):[],te=0;te<X.length;te++)(H=$.indexOf(X[te]))!==-1&&$.splice(H,1);for(var ne=0;ne<$.length;ne++)if(V.includes($[ne])){Q=!0;break}return Q},o.handleRemove=function($,L,j,H,V){var Q=this,X=this.maskset,te=this.opts;if((te.numericInput||Q.isRTL)&&(L===c.keys.Backspace?L=c.keys.Delete:L===c.keys.Delete&&(L=c.keys.Backspace),Q.isRTL)){var ne=j.end;j.end=j.begin,j.begin=ne}var be,ue=v.getLastValidPosition.call(Q,void 0,!0);if(j.end>=v.getBuffer.call(Q).length&&ue>=j.end&&(j.end=ue+1),L===c.keys.Backspace?j.end-j.begin<1&&(j.begin=v.seekPrevious.call(Q,j.begin)):L===c.keys.Delete&&j.begin===j.end&&(j.end=v.isMask.call(Q,j.end,!0,!0)?j.end+1:v.seekNext.call(Q,j.end)+1),(be=F.call(Q,j))!==!1){if(H!==!0&&te.keepStatic!==!1||te.regex!==null&&d.getTest.call(Q,j.begin).match.def.indexOf("|")!==-1){var Ce=b.call(Q,!0);if(Ce){var ie=Ce.caret!==void 0?Ce.caret:Ce.pos?v.seekNext.call(Q,Ce.pos.begin?Ce.pos.begin:Ce.pos):v.getLastValidPosition.call(Q,-1,!0);(L!==c.keys.Delete||j.begin>ie)&&j.begin}}H!==!0&&(X.p=L===c.keys.Delete?j.begin+be:j.begin,X.p=v.determineNewCaretPosition.call(Q,{begin:X.p,end:X.p},!1,te.insertMode===!1&&L===c.keys.Backspace?"none":void 0).begin)}},o.isComplete=E,o.isSelection=y,o.isValid=I,o.refreshFromBuffer=O,o.revalidateMask=F;var d=l(4713),c=l(2839),v=l(8711),T=l(6030);function b($,L,j,H,V,Q){var X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We=this,qe=this.dependencyLib,ee=this.opts,G=We.maskset,me=qe.extend(!0,[],G.validPositions),Te=qe.extend(!0,{},G.tests),De=!1,we=!1,Ve=V!==void 0?V:v.getLastValidPosition.call(We);if(Q&&(Me=Q.begin,Pe=Q.end,Q.begin>Q.end&&(Me=Q.end,Pe=Q.begin)),Ve===-1&&V===void 0)X=0,te=(be=d.getTest.call(We,X)).alternation;else for(;Ve>=0;Ve--)if((ne=G.validPositions[Ve])&&ne.alternation!==void 0){if(Ve<=($||0)&&be&&be.locator[ne.alternation]!==ne.locator[ne.alternation])break;X=Ve,te=G.validPositions[X].alternation,be=ne}if(te!==void 0){ie=parseInt(X),G.excludes[ie]=G.excludes[ie]||[],$!==!0&&G.excludes[ie].push((0,d.getDecisionTaker)(be)+":"+be.alternation);var Ke=[],yt=-1;for(ue=ie;ue<v.getLastValidPosition.call(We,void 0,!0)+1;ue++)yt===-1&&$<=ue&&L!==void 0&&(Ke.push(L),yt=Ke.length-1),(Ce=G.validPositions[ue])&&Ce.generatedInput!==!0&&(Q===void 0||ue<Me||ue>=Pe)&&Ke.push(Ce.input),delete G.validPositions[ue];for(yt===-1&&L!==void 0&&(Ke.push(L),yt=Ke.length-1);G.excludes[ie]!==void 0&&G.excludes[ie].length<10;){for(G.tests={},v.resetMaskSet.call(We,!0),De=!0,ue=0;ue<Ke.length&&(Y=De.caret||v.getLastValidPosition.call(We,void 0,!0)+1,he=Ke[ue],De=I.call(We,Y,he,!1,H,!0));ue++)ue===yt&&(we=De),$==1&&De&&(we={caretPos:ue});if(De)break;if(v.resetMaskSet.call(We),be=d.getTest.call(We,ie),G.validPositions=qe.extend(!0,[],me),G.tests=qe.extend(!0,{},Te),!G.excludes[ie]){we=b.call(We,$,L,j,H,ie-1,Q);break}var ht=(0,d.getDecisionTaker)(be);if(G.excludes[ie].indexOf(ht+":"+be.alternation)!==-1){we=b.call(We,$,L,j,H,ie-1,Q);break}for(G.excludes[ie].push(ht+":"+be.alternation),ue=ie;ue<v.getLastValidPosition.call(We,void 0,!0)+1;ue++)delete G.validPositions[ue]}}return we&&ee.keepStatic===!1||delete G.excludes[ie],we}function A($,L,j){var H=this.opts,V=this.maskset;switch(H.casing||L.casing){case"upper":$=$.toUpperCase();break;case"lower":$=$.toLowerCase();break;case"title":var Q=V.validPositions[j-1];$=j===0||Q&&Q.input===String.fromCharCode(c.keyCode.Space)?$.toUpperCase():$.toLowerCase();break;default:if(typeof H.casing=="function"){var X=Array.prototype.slice.call(arguments);X.push(V.validPositions),$=H.casing.apply(this,X)}}return $}function E($){var L=this,j=this.opts,H=this.maskset;if(typeof j.isComplete=="function")return j.isComplete($,j);if(j.repeat!=="*"){var V=!1,Q=v.determineLastRequiredPosition.call(L,!0),X=v.seekPrevious.call(L,Q.l);if(Q.def===void 0||Q.def.newBlockMarker||Q.def.optionality||Q.def.optionalQuantifier){V=!0;for(var te=0;te<=X;te++){var ne=d.getTestTemplate.call(L,te).match;if(ne.static!==!0&&H.validPositions[te]===void 0&&ne.optionality!==!0&&ne.optionalQuantifier!==!0||ne.static===!0&&$[te]!==d.getPlaceholder.call(L,te,ne)){V=!1;break}}}return V}}function y($){var L=this.opts.insertMode?0:1;return this.isRTL?$.begin-$.end>L:$.end-$.begin>L}function I($,L,j,H,V,Q,X){var te=this,ne=this.dependencyLib,be=this.opts,ue=te.maskset;j=j===!0;var Ce=$;function ie(De){if(De!==void 0){if(De.remove!==void 0&&(Array.isArray(De.remove)||(De.remove=[De.remove]),De.remove.sort(function(Ve,Ke){return te.isRTL?Ve.pos-Ke.pos:Ke.pos-Ve.pos}).forEach(function(Ve){F.call(te,{begin:Ve,end:Ve+1})}),De.remove=void 0),De.insert!==void 0&&(Array.isArray(De.insert)||(De.insert=[De.insert]),De.insert.sort(function(Ve,Ke){return te.isRTL?Ke.pos-Ve.pos:Ve.pos-Ke.pos}).forEach(function(Ve){Ve.c!==""&&I.call(te,Ve.pos,Ve.c,Ve.strict===void 0||Ve.strict,Ve.fromIsValid!==void 0?Ve.fromIsValid:H)}),De.insert=void 0),De.refreshFromBuffer&&De.buffer){var we=De.refreshFromBuffer;O.call(te,we===!0?we:we.start,we.end,De.buffer),De.refreshFromBuffer=void 0}De.rewritePosition!==void 0&&(Ce=De.rewritePosition,De=!0)}return De}function Y(De,we,Ve){var Ke=!1;return d.getTests.call(te,De).every(function(yt,ht){var Je=yt.match;if(v.getBuffer.call(te,!0),(Ke=(!Je.jit||ue.validPositions[v.seekPrevious.call(te,De)]!==void 0)&&(Je.fn!=null?Je.fn.test(we,ue,De,Ve,be,y.call(te,$)):(we===Je.def||we===be.skipOptionalPartCharacter)&&Je.def!==""&&{c:d.getPlaceholder.call(te,De,Je,!0)||Je.def,pos:De}))!==!1){var pt=Ke.c!==void 0?Ke.c:we,Tt=De;return pt=pt===be.skipOptionalPartCharacter&&Je.static===!0?d.getPlaceholder.call(te,De,Je,!0)||Je.def:pt,(Ke=ie(Ke))!==!0&&Ke.pos!==void 0&&Ke.pos!==De&&(Tt=Ke.pos),Ke!==!0&&Ke.pos===void 0&&Ke.c===void 0||F.call(te,$,ne.extend({},yt,{input:A.call(te,pt,Je,Tt)}),H,Tt)===!1&&(Ke=!1),!1}return!0}),Ke}$.begin!==void 0&&(Ce=te.isRTL?$.end:$.begin);var he=!0,Me=ne.extend(!0,{},ue.validPositions);if(be.keepStatic===!1&&ue.excludes[Ce]!==void 0&&V!==!0&&H!==!0)for(var Pe=Ce;Pe<(te.isRTL?$.begin:$.end);Pe++)ue.excludes[Pe]!==void 0&&(ue.excludes[Pe]=void 0,delete ue.tests[Pe]);if(typeof be.preValidation=="function"&&H!==!0&&Q!==!0&&(he=ie(he=be.preValidation.call(te,v.getBuffer.call(te),Ce,L,y.call(te,$),be,ue,$,j||V))),he===!0){if(he=Y(Ce,L,j),(!j||H===!0)&&he===!1&&Q!==!0){var We=ue.validPositions[Ce];if(!We||We.match.static!==!0||We.match.def!==L&&L!==be.skipOptionalPartCharacter){if(be.insertMode||ue.validPositions[v.seekNext.call(te,Ce)]===void 0||$.end>Ce){var qe=!1;if(ue.jitOffset[Ce]&&ue.validPositions[v.seekNext.call(te,Ce)]===void 0&&(he=I.call(te,Ce+ue.jitOffset[Ce],L,!0,!0))!==!1&&(V!==!0&&(he.caret=Ce),qe=!0),$.end>Ce&&(ue.validPositions[Ce]=void 0),!qe&&!v.isMask.call(te,Ce,be.keepStatic&&Ce===0)){for(var ee=Ce+1,G=v.seekNext.call(te,Ce,!1,Ce!==0);ee<=G;ee++)if((he=Y(ee,L,j))!==!1){he=M.call(te,Ce,he.pos!==void 0?he.pos:ee)||he,Ce=ee;break}}}}else he={caret:v.seekNext.call(te,Ce)}}te.hasAlternator&&V!==!0&&!j&&(he===!1&&be.keepStatic&&(E.call(te,v.getBuffer.call(te))||Ce===0)?he=b.call(te,Ce,L,j,H,void 0,$):(y.call(te,$)&&ue.tests[Ce]&&ue.tests[Ce].length>1&&be.keepStatic||he==1&&be.numericInput!==!0&&ue.tests[Ce]&&ue.tests[Ce].length>1&&v.getLastValidPosition.call(te,void 0,!0)>Ce)&&(he=b.call(te,!0))),he===!0&&(he={pos:Ce})}if(typeof be.postValidation=="function"&&H!==!0&&Q!==!0){var me=be.postValidation.call(te,v.getBuffer.call(te,!0),$.begin!==void 0?te.isRTL?$.end:$.begin:$,L,he,be,ue,j,X);me!==void 0&&(he=me===!0?he:me)}he&&he.pos===void 0&&(he.pos=Ce),he===!1||Q===!0?(v.resetMaskSet.call(te,!0),ue.validPositions=ne.extend(!0,[],Me)):M.call(te,void 0,Ce,!0);var Te=ie(he);return te.maxLength!==void 0&&v.getBuffer.call(te).length>te.maxLength&&!H&&(v.resetMaskSet.call(te,!0),ue.validPositions=ne.extend(!0,[],Me),Te=!1),Te}function D($,L,j){for(var H=this.maskset,V=!1,Q=d.getTests.call(this,$),X=0;X<Q.length;X++){if(Q[X].match&&(Q[X].match.nativeDef===L.match[j.shiftPositions?"def":"nativeDef"]&&(!j.shiftPositions||!L.match.static)||Q[X].match.nativeDef===L.match.nativeDef||j.regex&&!Q[X].match.static&&Q[X].match.fn.test(L.input,H,$,!1,j))){V=!0;break}if(Q[X].match&&Q[X].match.def===L.match.nativeDef){V=void 0;break}}return V===!1&&H.jitOffset[$]!==void 0&&(V=D.call(this,$+H.jitOffset[$],L,j)),V}function O($,L,j){var H,V,Q=this,X=this.maskset,te=this.opts,ne=this.dependencyLib,be=te.skipOptionalPartCharacter,ue=Q.isRTL?j.slice().reverse():j;if(te.skipOptionalPartCharacter="",$===!0)v.resetMaskSet.call(Q),X.tests={},$=0,L=j.length,V=v.determineNewCaretPosition.call(Q,{begin:0,end:0},!1).begin;else{for(H=$;H<L;H++)delete X.validPositions[H];V=$}var Ce=new ne.Event("keypress");for(H=$;H<L;H++){Ce.key=ue[H].toString(),Q.ignorable=!1;var ie=T.EventHandlers.keypressEvent.call(Q,Ce,!0,!1,!1,V);ie!==!1&&ie!==void 0&&(V=ie.forwardPosition)}te.skipOptionalPartCharacter=be}function M($,L,j){var H=this,V=this.maskset,Q=this.dependencyLib;if($===void 0)for($=L-1;$>0&&!V.validPositions[$];$--);for(var X=$;X<L;X++)if(V.validPositions[X]===void 0&&!v.isMask.call(H,X,!1)&&(X==0?d.getTest.call(H,X):V.validPositions[X-1])){var te=d.getTests.call(H,X).slice();te[te.length-1].match.def===""&&te.pop();var ne,be=d.determineTestTemplate.call(H,X,te);if(be&&(be.match.jit!==!0||be.match.newBlockMarker==="master"&&(ne=V.validPositions[X+1])&&ne.match.optionalQuantifier===!0)&&((be=Q.extend({},be,{input:d.getPlaceholder.call(H,X,be.match,!0)||be.match.def})).generatedInput=!0,F.call(H,X,be,!0),j!==!0)){var ue=V.validPositions[L].input;return V.validPositions[L]=void 0,I.call(H,L,ue,!0,!0)}}}function F($,L,j,H){var V=this,Q=this.maskset,X=this.opts,te=this.dependencyLib;function ne(me,Te,De){var we=Te[me];if(we!==void 0&&we.match.static===!0&&we.match.optionality!==!0&&(Te[0]===void 0||Te[0].alternation===void 0)){var Ve=De.begin<=me-1?Te[me-1]&&Te[me-1].match.static===!0&&Te[me-1]:Te[me-1],Ke=De.end>me+1?Te[me+1]&&Te[me+1].match.static===!0&&Te[me+1]:Te[me+1];return Ve&&Ke}return!1}var be=0,ue=$.begin!==void 0?$.begin:$,Ce=$.end!==void 0?$.end:$,ie=!0;if($.begin>$.end&&(ue=$.end,Ce=$.begin),H=H!==void 0?H:ue,j===void 0&&(ue!==Ce||X.insertMode&&Q.validPositions[H]!==void 0||L===void 0||L.match.optionalQuantifier||L.match.optionality)){var Y,he=te.extend(!0,{},Q.validPositions),Me=v.getLastValidPosition.call(V,void 0,!0);for(Q.p=ue,Y=Me;Y>=ue;Y--)delete Q.validPositions[Y],L===void 0&&delete Q.tests[Y+1];var Pe,We,qe=H,ee=qe;for(L&&(Q.validPositions[H]=te.extend(!0,{},L),ee++,qe++),Y=L?Ce:Ce-1;Y<=Me;Y++){if((Pe=he[Y])!==void 0&&Pe.generatedInput!==!0&&(Y>=Ce||Y>=ue&&ne(Y,he,{begin:ue,end:Ce}))){for(;d.getTest.call(V,ee).match.def!=="";){if((We=D.call(V,ee,Pe,X))!==!1||Pe.match.def==="+"){Pe.match.def==="+"&&v.getBuffer.call(V,!0);var G=I.call(V,ee,Pe.input,Pe.match.def!=="+",!0);if(ie=G!==!1,qe=(G.pos||ee)+1,!ie&&We)break}else ie=!1;if(ie){L===void 0&&Pe.match.static&&Y===$.begin&&be++;break}if(!ie&&v.getBuffer.call(V),ee>Q.maskLength)break;ee++}d.getTest.call(V,ee).match.def==""&&(ie=!1),ee=qe}if(!ie)break}if(!ie)return Q.validPositions=te.extend(!0,[],he),v.resetMaskSet.call(V,!0),!1}else L&&d.getTest.call(V,H).match.cd===L.match.cd&&(Q.validPositions[H]=te.extend(!0,{},L));return v.resetMaskSet.call(V,!0),be}}},i={};function r(s){var o=i[s];if(o!==void 0)return o.exports;var l=i[s]={exports:{}};return n[s](l,l.exports,r),l.exports}var a={};return function(){var s,o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r(7149),r(3194),r(9302),r(4013),r(3851),r(219),r(207),r(5296);var l=((s=r(2394))&&s.__esModule?s:{default:s}).default;o.default=l}(),a}()})})(M$);var ffe=M$.exports;const dy=cl(ffe);function eE(e){let t,n;return t=new xd({props:{refreshReportParams:e[2],specTreeNodeId:e[3]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.refreshReportParams=i[2]),r&8&&(a.specTreeNodeId=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function cfe(e){let t,n,i,r,a,s=e[5].title+"",o,l,d,c,v,T,b,A;l=new Rd({props:{param:e[3]}});let E=e[5].updatable&&eE(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("label"),o=Le(s),re(l.$$.fragment),E&&E.c(),d=P("div"),c=P("div"),c.innerHTML='<span class="input-group-text">$</span>',v=P("input"),w(a,"class","report_option__title"),w(a,"for",e[6]),w(r,"class","report_option"),w(c,"class","input-group-prepend"),w(v,"class","form-control form-control"),w(v,"id",e[6]),w(d,"class","input-group"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),ae(l,r,null),E&&E.m(r,null),m(i,d),m(d,c),m(d,v),e[8](v),Pn(v,e[0]),T=!0,b||(A=ct(v,"input",e[9]),b=!0)},p(y,[I]){(!T||I&32)&&s!==(s=y[5].title+"")&&vt(o,s);const D={};I&8&&(D.param=y[3]),l.$set(D),y[5].updatable?E?(E.p(y,I),I&32&&U(E,1)):(E=eE(y),E.c(),U(E,1),E.m(r,null)):E&&(pn(),W(E,1,1,()=>{E=null}),hn()),I&1&&v.value!==y[0]&&Pn(v,y[0]),(!T||I&2)&&(t.hidden=y[1])},i(y){T||(U(l.$$.fragment,y),U(E),T=!0)},o(y){W(l.$$.fragment,y),W(E),T=!1},d(y){y&&_e(t),se(l),E&&E.d(),e[8](null),b=!1,A()}}}function _fe(e,t,n){let i,r;Sn(e,Dd,b=>n(7,r=b));let{value:a}=t,{hidden:s}=t,{refreshReportParams:o}=t,{specTreeNodeId:l}=t,d;const c=Math.random().toString(16).substr(2,8);oa(()=>{dy({alias:"currency",rightAlign:!1,allowMinus:!0,allowPlus:!1,digitsOptional:!0,autoUnmask:!0,clearMaskOnLostFocus:!1,onUnMask(b,A){const E=dy.unmask(b,{alias:"currency"});return parseFloat(E)}}).mask(d)});function v(b){Oe[b?"unshift":"push"](()=>{d=b,n(4,d)})}function T(){a=this.value,n(0,a)}return e.$$set=b=>{"value"in b&&n(0,a=b.value),"hidden"in b&&n(1,s=b.hidden),"refreshReportParams"in b&&n(2,o=b.refreshReportParams),"specTreeNodeId"in b&&n(3,l=b.specTreeNodeId)},e.$$.update=()=>{e.$$.dirty&136&&n(5,i=r&&l&&r[l])},[a,s,o,l,d,i,c,r,v,T]}class xt extends Qt{constructor(t){super(),Jt(this,t,_fe,cfe,Kt,{value:0,hidden:1,refreshReportParams:2,specTreeNodeId:3})}}function tE(e){let t,n;return t=new xd({props:{refreshReportParams:e[2],specTreeNodeId:e[3]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.refreshReportParams=i[2]),r&8&&(a.specTreeNodeId=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function pfe(e){let t;return{c(){t=Le("$")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function hfe(e){let t;return{c(){t=Le("N/A")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function mfe(e){let t,n,i,r,a=e[5].title+"",s,o,l,d,c,v,T,b;o=new Rd({props:{param:e[3]}});let A=e[5].updatable&&tE(e);function E(D,O){return typeof D[0]>"u"||D[0]===null||D[0]===""?hfe:pfe}let y=E(e),I=y(e);return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("label"),s=Le(a),re(o.$$.fragment),A&&A.c(),l=P("div"),d=P("div"),I.c(),c=P("input"),w(r,"class","report_option__title"),w(r,"for",e[6]),w(d,"class","input-group-prepend"),w(c,"class","form-control form-control"),w(c,"id",e[6]),w(l,"class","input-group"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row"),t.hidden=e[1]},m(D,O){ce(D,t,O),m(t,n),m(n,i),m(i,r),m(r,s),ae(o,i,null),A&&A.m(i,null),m(i,l),m(l,d),I.m(d,null),m(l,c),e[8](c),Pn(c,e[0]),v=!0,T||(b=ct(c,"input",e[9]),T=!0)},p(D,[O]){(!v||O&32)&&a!==(a=D[5].title+"")&&vt(s,a);const M={};O&8&&(M.param=D[3]),o.$set(M),D[5].updatable?A?(A.p(D,O),O&32&&U(A,1)):(A=tE(D),A.c(),U(A,1),A.m(i,l)):A&&(pn(),W(A,1,1,()=>{A=null}),hn()),y!==(y=E(D))&&(I.d(1),I=y(D),I&&(I.c(),I.m(d,null))),O&1&&c.value!==D[0]&&Pn(c,D[0]),(!v||O&2)&&(t.hidden=D[1])},i(D){v||(U(o.$$.fragment,D),U(A),v=!0)},o(D){W(o.$$.fragment,D),W(A),v=!1},d(D){D&&_e(t),se(o),A&&A.d(),I.d(),e[8](null),T=!1,b()}}}function gfe(e,t,n){let i,r;Sn(e,Dd,b=>n(7,r=b));let{value:a}=t,{hidden:s}=t,{refreshReportParams:o}=t,{specTreeNodeId:l}=t,d;const c=Math.random().toString(16).substr(2,8);oa(()=>{dy({alias:"currency",rightAlign:!1,allowMinus:!0,allowPlus:!1,digitsOptional:!0,autoUnmask:!0,clearMaskOnLostFocus:!1,clearIncomplete:!0,placeholder:"",onUnMask(b,A){const E=parseFloat(A);return isNaN(E)?"":E}}).mask(d)});function v(b){Oe[b?"unshift":"push"](()=>{d=b,n(4,d)})}function T(){a=this.value,n(0,a)}return e.$$set=b=>{"value"in b&&n(0,a=b.value),"hidden"in b&&n(1,s=b.hidden),"refreshReportParams"in b&&n(2,o=b.refreshReportParams),"specTreeNodeId"in b&&n(3,l=b.specTreeNodeId)},e.$$.update=()=>{e.$$.dirty&136&&n(5,i=r&&l&&r[l])},[a,s,o,l,d,i,c,r,v,T]}class Ov extends Qt{constructor(t){super(),Jt(this,t,gfe,mfe,Kt,{value:0,hidden:1,refreshReportParams:2,specTreeNodeId:3})}}function nE(e,t,n){const i=e.slice();return i[272]=t[n][0],i[273]=t[n][1],i[274]=t,i[275]=n,i}function iE(e,t,n){const i=e.slice();return i[276]=t[n][0],i[277]=t[n][1],i[278]=t,i[279]=n,i}function rE(e,t,n){const i=e.slice();return i[276]=t[n][0],i[277]=t[n][1],i[280]=t,i[281]=n,i}function aE(e,t,n){const i=e.slice();return i[276]=t[n][0],i[277]=t[n][1],i[282]=t,i[283]=n,i}function sE(e,t,n){const i=e.slice();return i[284]=t[n][0],i[285]=t[n][1],i[286]=t,i[287]=n,i}function oE(e,t,n){const i=e.slice();return i[288]=t[n][0],i[289]=t[n][1],i[290]=t,i[291]=n,i}function lE(e,t,n){const i=e.slice();return i[276]=t[n][0],i[277]=t[n][1],i[292]=t,i[293]=n,i}function uE(e,t,n){const i=e.slice();return i[294]=t[n][0],i[295]=t[n][1],i[296]=t,i[297]=n,i}function dE(e,t,n){const i=e.slice();return i[298]=t[n][0],i[299]=t[n][1],i[300]=t,i[301]=n,i}function fE(e,t,n){const i=e.slice();return i[272]=t[n][0],i[273]=t[n][1],i[302]=t,i[303]=n,i}function cE(e,t,n){const i=e.slice();return i[304]=t[n][0],i[305]=t[n][1],i[306]=t,i[307]=n,i}function _E(e,t,n){const i=e.slice();return i[272]=t[n],i[308]=t,i[309]=n,i}function pE(e,t,n){const i=e.slice();return i[310]=t[n],i[311]=t,i[312]=n,i}function hE(e,t,n){const i=e.slice();return i[310]=t[n],i[313]=t,i[314]=n,i}function vfe(e){let t,n,i;function r(s){e[22](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_enable",classNames:"report-suboption",hidden:e[2].isHidden("Section 179"),scrollToId:"pdfSection179Expense",$$slots:{default:[yfe]},$$scope:{ctx:e}};return e[1].sd_sec_179_expense_enable!==void 0&&(a.checked=e[1].sd_sec_179_expense_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Section 179")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_sec_179_expense_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function bfe(e){let t,n,i,r,a;function s(c){e[5](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_section179_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_section179_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_section179_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[6](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_section179_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_section179_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_section179_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_section179_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_section179_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function yfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[bfe]},$$scope:{ctx:e}}});function Ce(Qe){e[7](Qe)}let ie={specTreeNodeId:"sd_sec_179_expense_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_sec_179_expense_what_it_is_text!==void 0&&(ie.value=e[1].sd_sec_179_expense_what_it_is_text),n=new ta({props:ie}),Oe.push(()=>$e(n,"value",Ce));function Y(Qe){e[8](Qe)}let he={specTreeNodeId:"sd_sec_179_expense_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_sec_179_expense_what_it_is_first_item!==void 0&&(he.value=e[1].sd_sec_179_expense_what_it_is_first_item),r=new li({props:he}),Oe.push(()=>$e(r,"value",Y));function Me(Qe){e[9](Qe)}let Pe={specTreeNodeId:"sd_sec_179_expense_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_sec_179_expense_what_it_is_second_item!==void 0&&(Pe.value=e[1].sd_sec_179_expense_what_it_is_second_item),s=new li({props:Pe}),Oe.push(()=>$e(s,"value",Me));function We(Qe){e[10](Qe)}let qe={specTreeNodeId:"sd_sec_179_expense_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_sec_179_expense_what_it_is_third_item!==void 0&&(qe.value=e[1].sd_sec_179_expense_what_it_is_third_item),l=new li({props:qe}),Oe.push(()=>$e(l,"value",We));function ee(Qe){e[11](Qe)}let G={specTreeNodeId:"sd_sec_179_expense_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_sec_179_expense_what_it_is_fourth_item!==void 0&&(G.value=e[1].sd_sec_179_expense_what_it_is_fourth_item),c=new li({props:G}),Oe.push(()=>$e(c,"value",ee));function me(Qe){e[12](Qe)}let Te={specTreeNodeId:"sd_sec_179_expense_what_it_is_fifth_item",hidden:e[2].isHidden("Fifth Item")};e[1].sd_sec_179_expense_what_it_is_fifth_item!==void 0&&(Te.value=e[1].sd_sec_179_expense_what_it_is_fifth_item),T=new li({props:Te}),Oe.push(()=>$e(T,"value",me));function De(Qe){e[13](Qe)}let we={specTreeNodeId:"sd_sec_179_expense_what_it_is_text_extra",hidden:e[2].isHidden("Second Description")};e[1].sd_sec_179_expense_what_it_is_text_extra!==void 0&&(we.value=e[1].sd_sec_179_expense_what_it_is_text_extra),A=new ta({props:we}),Oe.push(()=>$e(A,"value",De));function Ve(Qe){e[14](Qe)}let Ke={specTreeNodeId:"sd_sec_179_expense_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_sec_179_expense_ratings_text!==void 0&&(Ke.value=e[1].sd_sec_179_expense_ratings_text),y=new ta({props:Ke}),Oe.push(()=>$e(y,"value",Ve));function yt(Qe){e[15](Qe)}let ht={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_sec_179_expense_tax_saving_options_first_expense!==void 0&&(ht.value=e[1].sd_sec_179_expense_tax_saving_options_first_expense),D=new xt({props:ht}),Oe.push(()=>$e(D,"value",yt));function Je(Qe){e[16](Qe)}let pt={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_sec_179_expense_tax_saving_options_first_saves_you!==void 0&&(pt.value=e[1].sd_sec_179_expense_tax_saving_options_first_saves_you),M=new xt({props:pt}),Oe.push(()=>$e(M,"value",Je));function Tt(Qe){e[17](Qe)}let it={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_sec_179_expense_tax_saving_options_second_expense!==void 0&&(it.value=e[1].sd_sec_179_expense_tax_saving_options_second_expense),$=new xt({props:it}),Oe.push(()=>$e($,"value",Tt));function Ge(Qe){e[18](Qe)}let st={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_sec_179_expense_tax_saving_options_second_saves_you!==void 0&&(st.value=e[1].sd_sec_179_expense_tax_saving_options_second_saves_you),j=new xt({props:st}),Oe.push(()=>$e(j,"value",Ge));function It(Qe){e[19](Qe)}let Ct={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_sec_179_expense_tax_saving_options_third_expense!==void 0&&(Ct.value=e[1].sd_sec_179_expense_tax_saving_options_third_expense),V=new xt({props:Ct}),Oe.push(()=>$e(V,"value",It));function bt(Qe){e[20](Qe)}let Rt={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};e[1].sd_sec_179_expense_tax_saving_options_third_saves_you!==void 0&&(Rt.value=e[1].sd_sec_179_expense_tax_saving_options_third_saves_you),X=new xt({props:Rt}),Oe.push(()=>$e(X,"value",bt));function cn(Qe){e[21](Qe)}let nn={refreshReportParams:e[0],specTreeNodeId:"sd_sec_179_expense_current_max_sec_179_deduction",hidden:e[2].isHidden("Max Section 179 Deduction")};return e[1].sd_sec_179_expense_current_max_sec_179_deduction!==void 0&&(nn.value=e[1].sd_sec_179_expense_current_max_sec_179_deduction),ne=new xt({props:nn}),Oe.push(()=>$e(ne,"value",cn)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment),re(X.$$.fragment),re(ne.$$.fragment)},m(Qe,Ft){ae(t,Qe,Ft),ae(n,Qe,Ft),ae(r,Qe,Ft),ae(s,Qe,Ft),ae(l,Qe,Ft),ae(c,Qe,Ft),ae(T,Qe,Ft),ae(A,Qe,Ft),ae(y,Qe,Ft),ae(D,Qe,Ft),ae(M,Qe,Ft),ae($,Qe,Ft),ae(j,Qe,Ft),ae(V,Qe,Ft),ae(X,Qe,Ft),ae(ne,Qe,Ft),ue=!0},p(Qe,Ft){const Fn={};Ft[0]&1&&(Fn.refreshReportParams=Qe[0]),Ft[0]&4&&(Fn.hidden=Qe[2].isHidden("Top 3 Widget Options")),Ft[0]&7|Ft[10]&32&&(Fn.$$scope={dirty:Ft,ctx:Qe}),t.$set(Fn);const He={};Ft[0]&4&&(He.hidden=Qe[2].isHidden("Description")),!i&&Ft[0]&2&&(i=!0,He.value=Qe[1].sd_sec_179_expense_what_it_is_text,Ne(()=>i=!1)),n.$set(He);const Dt={};Ft[0]&4&&(Dt.hidden=Qe[2].isHidden("First Item")),!a&&Ft[0]&2&&(a=!0,Dt.value=Qe[1].sd_sec_179_expense_what_it_is_first_item,Ne(()=>a=!1)),r.$set(Dt);const Xt={};Ft[0]&4&&(Xt.hidden=Qe[2].isHidden("Second Item")),!o&&Ft[0]&2&&(o=!0,Xt.value=Qe[1].sd_sec_179_expense_what_it_is_second_item,Ne(()=>o=!1)),s.$set(Xt);const Mt={};Ft[0]&4&&(Mt.hidden=Qe[2].isHidden("Third Item")),!d&&Ft[0]&2&&(d=!0,Mt.value=Qe[1].sd_sec_179_expense_what_it_is_third_item,Ne(()=>d=!1)),l.$set(Mt);const Xe={};Ft[0]&4&&(Xe.hidden=Qe[2].isHidden("Fourth Item")),!v&&Ft[0]&2&&(v=!0,Xe.value=Qe[1].sd_sec_179_expense_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(Xe);const Nt={};Ft[0]&4&&(Nt.hidden=Qe[2].isHidden("Fifth Item")),!b&&Ft[0]&2&&(b=!0,Nt.value=Qe[1].sd_sec_179_expense_what_it_is_fifth_item,Ne(()=>b=!1)),T.$set(Nt);const on={};Ft[0]&4&&(on.hidden=Qe[2].isHidden("Second Description")),!E&&Ft[0]&2&&(E=!0,on.value=Qe[1].sd_sec_179_expense_what_it_is_text_extra,Ne(()=>E=!1)),A.$set(on);const In={};Ft[0]&4&&(In.hidden=Qe[2].isHidden("Description of Ratings")),!I&&Ft[0]&2&&(I=!0,In.value=Qe[1].sd_sec_179_expense_ratings_text,Ne(()=>I=!1)),y.$set(In);const dt={};Ft[0]&1&&(dt.refreshReportParams=Qe[0]),Ft[0]&4&&(dt.hidden=Qe[2].isHidden("Option A Expense")),!O&&Ft[0]&2&&(O=!0,dt.value=Qe[1].sd_sec_179_expense_tax_saving_options_first_expense,Ne(()=>O=!1)),D.$set(dt);const Zt={};Ft[0]&1&&(Zt.refreshReportParams=Qe[0]),Ft[0]&4&&(Zt.hidden=Qe[2].isHidden("Option A Saves You")),!F&&Ft[0]&2&&(F=!0,Zt.value=Qe[1].sd_sec_179_expense_tax_saving_options_first_saves_you,Ne(()=>F=!1)),M.$set(Zt);const Ln={};Ft[0]&1&&(Ln.refreshReportParams=Qe[0]),Ft[0]&4&&(Ln.hidden=Qe[2].isHidden("Option B Expense")),!L&&Ft[0]&2&&(L=!0,Ln.value=Qe[1].sd_sec_179_expense_tax_saving_options_second_expense,Ne(()=>L=!1)),$.$set(Ln);const xn={};Ft[0]&1&&(xn.refreshReportParams=Qe[0]),Ft[0]&4&&(xn.hidden=Qe[2].isHidden("Option B Saves You")),!H&&Ft[0]&2&&(H=!0,xn.value=Qe[1].sd_sec_179_expense_tax_saving_options_second_saves_you,Ne(()=>H=!1)),j.$set(xn);const Dn={};Ft[0]&1&&(Dn.refreshReportParams=Qe[0]),Ft[0]&4&&(Dn.hidden=Qe[2].isHidden("Option C Expense")),!Q&&Ft[0]&2&&(Q=!0,Dn.value=Qe[1].sd_sec_179_expense_tax_saving_options_third_expense,Ne(()=>Q=!1)),V.$set(Dn);const Un={};Ft[0]&1&&(Un.refreshReportParams=Qe[0]),Ft[0]&4&&(Un.hidden=Qe[2].isHidden("Option C Saves You")),!te&&Ft[0]&2&&(te=!0,Un.value=Qe[1].sd_sec_179_expense_tax_saving_options_third_saves_you,Ne(()=>te=!1)),X.$set(Un);const qn={};Ft[0]&1&&(qn.refreshReportParams=Qe[0]),Ft[0]&4&&(qn.hidden=Qe[2].isHidden("Max Section 179 Deduction")),!be&&Ft[0]&2&&(be=!0,qn.value=Qe[1].sd_sec_179_expense_current_max_sec_179_deduction,Ne(()=>be=!1)),ne.$set(qn)},i(Qe){ue||(U(t.$$.fragment,Qe),U(n.$$.fragment,Qe),U(r.$$.fragment,Qe),U(s.$$.fragment,Qe),U(l.$$.fragment,Qe),U(c.$$.fragment,Qe),U(T.$$.fragment,Qe),U(A.$$.fragment,Qe),U(y.$$.fragment,Qe),U(D.$$.fragment,Qe),U(M.$$.fragment,Qe),U($.$$.fragment,Qe),U(j.$$.fragment,Qe),U(V.$$.fragment,Qe),U(X.$$.fragment,Qe),U(ne.$$.fragment,Qe),ue=!0)},o(Qe){W(t.$$.fragment,Qe),W(n.$$.fragment,Qe),W(r.$$.fragment,Qe),W(s.$$.fragment,Qe),W(l.$$.fragment,Qe),W(c.$$.fragment,Qe),W(T.$$.fragment,Qe),W(A.$$.fragment,Qe),W(y.$$.fragment,Qe),W(D.$$.fragment,Qe),W(M.$$.fragment,Qe),W($.$$.fragment,Qe),W(j.$$.fragment,Qe),W(V.$$.fragment,Qe),W(X.$$.fragment,Qe),W(ne.$$.fragment,Qe),ue=!1},d(Qe){se(t,Qe),se(n,Qe),se(r,Qe),se(s,Qe),se(l,Qe),se(c,Qe),se(T,Qe),se(A,Qe),se(y,Qe),se(D,Qe),se(M,Qe),se($,Qe),se(j,Qe),se(V,Qe),se(X,Qe),se(ne,Qe)}}}function wfe(e){let t,n,i;function r(s){e[40](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_enable",classNames:"report-suboption",hidden:e[2].isHidden("Expense Acceleration"),scrollToId:"pdfExpenseAcceleration",$$slots:{default:[kfe]},$$scope:{ctx:e}};return e[1].sd_expense_acceleration_enable!==void 0&&(a.checked=e[1].sd_expense_acceleration_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Expense Acceleration")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_expense_acceleration_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Tfe(e){let t,n,i,r,a;function s(c){e[23](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_expense_acceleration_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_expense_acceleration_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_expense_acceleration_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[24](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_expense_acceleration_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_expense_acceleration_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_expense_acceleration_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_expense_acceleration_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_expense_acceleration_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function kfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Tfe]},$$scope:{ctx:e}}});function Ce(Qe){e[25](Qe)}let ie={specTreeNodeId:"sd_expense_acceleration_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_expense_acceleration_what_it_is_text!==void 0&&(ie.value=e[1].sd_expense_acceleration_what_it_is_text),n=new ta({props:ie}),Oe.push(()=>$e(n,"value",Ce));function Y(Qe){e[26](Qe)}let he={specTreeNodeId:"sd_expense_acceleration_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_expense_acceleration_what_it_is_first_item!==void 0&&(he.value=e[1].sd_expense_acceleration_what_it_is_first_item),r=new li({props:he}),Oe.push(()=>$e(r,"value",Y));function Me(Qe){e[27](Qe)}let Pe={specTreeNodeId:"sd_expense_acceleration_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_expense_acceleration_what_it_is_second_item!==void 0&&(Pe.value=e[1].sd_expense_acceleration_what_it_is_second_item),s=new li({props:Pe}),Oe.push(()=>$e(s,"value",Me));function We(Qe){e[28](Qe)}let qe={specTreeNodeId:"sd_expense_acceleration_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_expense_acceleration_what_it_is_third_item!==void 0&&(qe.value=e[1].sd_expense_acceleration_what_it_is_third_item),l=new li({props:qe}),Oe.push(()=>$e(l,"value",We));function ee(Qe){e[29](Qe)}let G={specTreeNodeId:"sd_expense_acceleration_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_expense_acceleration_what_it_is_fourth_item!==void 0&&(G.value=e[1].sd_expense_acceleration_what_it_is_fourth_item),c=new li({props:G}),Oe.push(()=>$e(c,"value",ee));function me(Qe){e[30](Qe)}let Te={specTreeNodeId:"sd_expense_acceleration_what_it_is_fifth_item",hidden:e[2].isHidden("Fifth Item")};e[1].sd_expense_acceleration_what_it_is_fifth_item!==void 0&&(Te.value=e[1].sd_expense_acceleration_what_it_is_fifth_item),T=new li({props:Te}),Oe.push(()=>$e(T,"value",me));function De(Qe){e[31](Qe)}let we={specTreeNodeId:"sd_expense_acceleration_what_it_is_sixth_item",hidden:e[2].isHidden("Sixth Item")};e[1].sd_expense_acceleration_what_it_is_sixth_item!==void 0&&(we.value=e[1].sd_expense_acceleration_what_it_is_sixth_item),A=new li({props:we}),Oe.push(()=>$e(A,"value",De));function Ve(Qe){e[32](Qe)}let Ke={specTreeNodeId:"sd_expense_acceleration_what_it_is_seventh_item",hidden:e[2].isHidden("Seventh Item")};e[1].sd_expense_acceleration_what_it_is_seventh_item!==void 0&&(Ke.value=e[1].sd_expense_acceleration_what_it_is_seventh_item),y=new li({props:Ke}),Oe.push(()=>$e(y,"value",Ve));function yt(Qe){e[33](Qe)}let ht={specTreeNodeId:"sd_expense_acceleration_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_expense_acceleration_ratings_text!==void 0&&(ht.value=e[1].sd_expense_acceleration_ratings_text),D=new ta({props:ht}),Oe.push(()=>$e(D,"value",yt));function Je(Qe){e[34](Qe)}let pt={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_expense_acceleration_tax_saving_options_first_expense!==void 0&&(pt.value=e[1].sd_expense_acceleration_tax_saving_options_first_expense),M=new xt({props:pt}),Oe.push(()=>$e(M,"value",Je));function Tt(Qe){e[35](Qe)}let it={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_expense_acceleration_tax_saving_options_first_saves_you!==void 0&&(it.value=e[1].sd_expense_acceleration_tax_saving_options_first_saves_you),$=new xt({props:it}),Oe.push(()=>$e($,"value",Tt));function Ge(Qe){e[36](Qe)}let st={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_expense_acceleration_tax_saving_options_second_expense!==void 0&&(st.value=e[1].sd_expense_acceleration_tax_saving_options_second_expense),j=new xt({props:st}),Oe.push(()=>$e(j,"value",Ge));function It(Qe){e[37](Qe)}let Ct={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_expense_acceleration_tax_saving_options_second_saves_you!==void 0&&(Ct.value=e[1].sd_expense_acceleration_tax_saving_options_second_saves_you),V=new xt({props:Ct}),Oe.push(()=>$e(V,"value",It));function bt(Qe){e[38](Qe)}let Rt={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_expense_acceleration_tax_saving_options_third_expense!==void 0&&(Rt.value=e[1].sd_expense_acceleration_tax_saving_options_third_expense),X=new xt({props:Rt}),Oe.push(()=>$e(X,"value",bt));function cn(Qe){e[39](Qe)}let nn={refreshReportParams:e[0],specTreeNodeId:"sd_expense_acceleration_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};return e[1].sd_expense_acceleration_tax_saving_options_third_saves_you!==void 0&&(nn.value=e[1].sd_expense_acceleration_tax_saving_options_third_saves_you),ne=new xt({props:nn}),Oe.push(()=>$e(ne,"value",cn)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment),re(X.$$.fragment),re(ne.$$.fragment)},m(Qe,Ft){ae(t,Qe,Ft),ae(n,Qe,Ft),ae(r,Qe,Ft),ae(s,Qe,Ft),ae(l,Qe,Ft),ae(c,Qe,Ft),ae(T,Qe,Ft),ae(A,Qe,Ft),ae(y,Qe,Ft),ae(D,Qe,Ft),ae(M,Qe,Ft),ae($,Qe,Ft),ae(j,Qe,Ft),ae(V,Qe,Ft),ae(X,Qe,Ft),ae(ne,Qe,Ft),ue=!0},p(Qe,Ft){const Fn={};Ft[0]&1&&(Fn.refreshReportParams=Qe[0]),Ft[0]&4&&(Fn.hidden=Qe[2].isHidden("Top 3 Widget Options")),Ft[0]&7|Ft[10]&32&&(Fn.$$scope={dirty:Ft,ctx:Qe}),t.$set(Fn);const He={};Ft[0]&4&&(He.hidden=Qe[2].isHidden("Description")),!i&&Ft[0]&2&&(i=!0,He.value=Qe[1].sd_expense_acceleration_what_it_is_text,Ne(()=>i=!1)),n.$set(He);const Dt={};Ft[0]&4&&(Dt.hidden=Qe[2].isHidden("First Item")),!a&&Ft[0]&2&&(a=!0,Dt.value=Qe[1].sd_expense_acceleration_what_it_is_first_item,Ne(()=>a=!1)),r.$set(Dt);const Xt={};Ft[0]&4&&(Xt.hidden=Qe[2].isHidden("Second Item")),!o&&Ft[0]&2&&(o=!0,Xt.value=Qe[1].sd_expense_acceleration_what_it_is_second_item,Ne(()=>o=!1)),s.$set(Xt);const Mt={};Ft[0]&4&&(Mt.hidden=Qe[2].isHidden("Third Item")),!d&&Ft[0]&2&&(d=!0,Mt.value=Qe[1].sd_expense_acceleration_what_it_is_third_item,Ne(()=>d=!1)),l.$set(Mt);const Xe={};Ft[0]&4&&(Xe.hidden=Qe[2].isHidden("Fourth Item")),!v&&Ft[0]&2&&(v=!0,Xe.value=Qe[1].sd_expense_acceleration_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(Xe);const Nt={};Ft[0]&4&&(Nt.hidden=Qe[2].isHidden("Fifth Item")),!b&&Ft[0]&2&&(b=!0,Nt.value=Qe[1].sd_expense_acceleration_what_it_is_fifth_item,Ne(()=>b=!1)),T.$set(Nt);const on={};Ft[0]&4&&(on.hidden=Qe[2].isHidden("Sixth Item")),!E&&Ft[0]&2&&(E=!0,on.value=Qe[1].sd_expense_acceleration_what_it_is_sixth_item,Ne(()=>E=!1)),A.$set(on);const In={};Ft[0]&4&&(In.hidden=Qe[2].isHidden("Seventh Item")),!I&&Ft[0]&2&&(I=!0,In.value=Qe[1].sd_expense_acceleration_what_it_is_seventh_item,Ne(()=>I=!1)),y.$set(In);const dt={};Ft[0]&4&&(dt.hidden=Qe[2].isHidden("Description of Ratings")),!O&&Ft[0]&2&&(O=!0,dt.value=Qe[1].sd_expense_acceleration_ratings_text,Ne(()=>O=!1)),D.$set(dt);const Zt={};Ft[0]&1&&(Zt.refreshReportParams=Qe[0]),Ft[0]&4&&(Zt.hidden=Qe[2].isHidden("Option A Expense")),!F&&Ft[0]&2&&(F=!0,Zt.value=Qe[1].sd_expense_acceleration_tax_saving_options_first_expense,Ne(()=>F=!1)),M.$set(Zt);const Ln={};Ft[0]&1&&(Ln.refreshReportParams=Qe[0]),Ft[0]&4&&(Ln.hidden=Qe[2].isHidden("Option A Saves You")),!L&&Ft[0]&2&&(L=!0,Ln.value=Qe[1].sd_expense_acceleration_tax_saving_options_first_saves_you,Ne(()=>L=!1)),$.$set(Ln);const xn={};Ft[0]&1&&(xn.refreshReportParams=Qe[0]),Ft[0]&4&&(xn.hidden=Qe[2].isHidden("Option B Expense")),!H&&Ft[0]&2&&(H=!0,xn.value=Qe[1].sd_expense_acceleration_tax_saving_options_second_expense,Ne(()=>H=!1)),j.$set(xn);const Dn={};Ft[0]&1&&(Dn.refreshReportParams=Qe[0]),Ft[0]&4&&(Dn.hidden=Qe[2].isHidden("Option B Saves You")),!Q&&Ft[0]&2&&(Q=!0,Dn.value=Qe[1].sd_expense_acceleration_tax_saving_options_second_saves_you,Ne(()=>Q=!1)),V.$set(Dn);const Un={};Ft[0]&1&&(Un.refreshReportParams=Qe[0]),Ft[0]&4&&(Un.hidden=Qe[2].isHidden("Option C Expense")),!te&&Ft[0]&2&&(te=!0,Un.value=Qe[1].sd_expense_acceleration_tax_saving_options_third_expense,Ne(()=>te=!1)),X.$set(Un);const qn={};Ft[0]&1&&(qn.refreshReportParams=Qe[0]),Ft[0]&4&&(qn.hidden=Qe[2].isHidden("Option C Saves You")),!be&&Ft[0]&2&&(be=!0,qn.value=Qe[1].sd_expense_acceleration_tax_saving_options_third_saves_you,Ne(()=>be=!1)),ne.$set(qn)},i(Qe){ue||(U(t.$$.fragment,Qe),U(n.$$.fragment,Qe),U(r.$$.fragment,Qe),U(s.$$.fragment,Qe),U(l.$$.fragment,Qe),U(c.$$.fragment,Qe),U(T.$$.fragment,Qe),U(A.$$.fragment,Qe),U(y.$$.fragment,Qe),U(D.$$.fragment,Qe),U(M.$$.fragment,Qe),U($.$$.fragment,Qe),U(j.$$.fragment,Qe),U(V.$$.fragment,Qe),U(X.$$.fragment,Qe),U(ne.$$.fragment,Qe),ue=!0)},o(Qe){W(t.$$.fragment,Qe),W(n.$$.fragment,Qe),W(r.$$.fragment,Qe),W(s.$$.fragment,Qe),W(l.$$.fragment,Qe),W(c.$$.fragment,Qe),W(T.$$.fragment,Qe),W(A.$$.fragment,Qe),W(y.$$.fragment,Qe),W(D.$$.fragment,Qe),W(M.$$.fragment,Qe),W($.$$.fragment,Qe),W(j.$$.fragment,Qe),W(V.$$.fragment,Qe),W(X.$$.fragment,Qe),W(ne.$$.fragment,Qe),ue=!1},d(Qe){se(t,Qe),se(n,Qe),se(r,Qe),se(s,Qe),se(l,Qe),se(c,Qe),se(T,Qe),se(A,Qe),se(y,Qe),se(D,Qe),se(M,Qe),se($,Qe),se(j,Qe),se(V,Qe),se(X,Qe),se(ne,Qe)}}}function Sfe(e){let t,n,i;function r(s){e[82](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_enable",classNames:"report-suboption",hidden:e[2].isHidden("Missing Deductions"),scrollToId:"pdfMissingDeductions",$$slots:{default:[Pfe]},$$scope:{ctx:e}};return e[1].sd_missing_deductions_enable!==void 0&&(a.checked=e[1].sd_missing_deductions_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Missing Deductions")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_missing_deductions_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Cfe(e){let t,n,i,r,a;function s(c){e[41](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_missing_deductions_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_missing_deductions_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_missing_deductions_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[42](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_missing_deductions_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_missing_deductions_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_missing_deductions_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_missing_deductions_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_missing_deductions_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function Pfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt,on,In,dt,Zt,Ln,xn,Dn,Un,qn;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Cfe]},$$scope:{ctx:e}}});function ft(Ze){e[43](Ze)}let ni={specTreeNodeId:"sd_missing_deductions_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_missing_deductions_what_it_is_text!==void 0&&(ni.value=e[1].sd_missing_deductions_what_it_is_text),n=new ta({props:ni}),Oe.push(()=>$e(n,"value",ft));function Et(Ze){e[44](Ze)}let un={specTreeNodeId:"sd_missing_deductions_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_missing_deductions_what_it_is_first_item!==void 0&&(un.value=e[1].sd_missing_deductions_what_it_is_first_item),r=new li({props:un}),Oe.push(()=>$e(r,"value",Et));function Ai(Ze){e[45](Ze)}let St={specTreeNodeId:"sd_missing_deductions_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_missing_deductions_what_it_is_second_item!==void 0&&(St.value=e[1].sd_missing_deductions_what_it_is_second_item),s=new li({props:St}),Oe.push(()=>$e(s,"value",Ai));function sn(Ze){e[46](Ze)}let ci={specTreeNodeId:"sd_missing_deductions_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_missing_deductions_what_it_is_third_item!==void 0&&(ci.value=e[1].sd_missing_deductions_what_it_is_third_item),l=new li({props:ci}),Oe.push(()=>$e(l,"value",sn));function pi(Ze){e[47](Ze)}let Pi={specTreeNodeId:"sd_missing_deductions_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_missing_deductions_what_it_is_fourth_item!==void 0&&(Pi.value=e[1].sd_missing_deductions_what_it_is_fourth_item),c=new li({props:Pi}),Oe.push(()=>$e(c,"value",pi));function $i(Ze){e[48](Ze)}let ji={specTreeNodeId:"sd_missing_deductions_what_it_is_fifth_item",hidden:e[2].isHidden("Fifth Item")};e[1].sd_missing_deductions_what_it_is_fifth_item!==void 0&&(ji.value=e[1].sd_missing_deductions_what_it_is_fifth_item),T=new li({props:ji}),Oe.push(()=>$e(T,"value",$i));function ri(Ze){e[49](Ze)}let tr={specTreeNodeId:"sd_missing_deductions_what_it_is_sixth_item",hidden:e[2].isHidden("Sixth Item")};e[1].sd_missing_deductions_what_it_is_sixth_item!==void 0&&(tr.value=e[1].sd_missing_deductions_what_it_is_sixth_item),A=new li({props:tr}),Oe.push(()=>$e(A,"value",ri));function Ei(Ze){e[50](Ze)}let Ti={specTreeNodeId:"sd_missing_deductions_what_it_is_seventh_item",hidden:e[2].isHidden("Seventh Item")};e[1].sd_missing_deductions_what_it_is_seventh_item!==void 0&&(Ti.value=e[1].sd_missing_deductions_what_it_is_seventh_item),y=new li({props:Ti}),Oe.push(()=>$e(y,"value",Ei));function kn(Ze){e[51](Ze)}let Rn={specTreeNodeId:"sd_missing_deductions_what_it_is_eighth_item",hidden:e[2].isHidden("Eighth Item")};e[1].sd_missing_deductions_what_it_is_eighth_item!==void 0&&(Rn.value=e[1].sd_missing_deductions_what_it_is_eighth_item),D=new li({props:Rn}),Oe.push(()=>$e(D,"value",kn));function ki(Ze){e[52](Ze)}let mr={specTreeNodeId:"sd_missing_deductions_what_it_is_ninth_item",hidden:e[2].isHidden("Ninth Item")};e[1].sd_missing_deductions_what_it_is_ninth_item!==void 0&&(mr.value=e[1].sd_missing_deductions_what_it_is_ninth_item),M=new li({props:mr}),Oe.push(()=>$e(M,"value",ki));function _r(Ze){e[53](Ze)}let Mi={specTreeNodeId:"sd_missing_deductions_what_it_is_tenth_item",hidden:e[2].isHidden("Tenth Item")};e[1].sd_missing_deductions_what_it_is_tenth_item!==void 0&&(Mi.value=e[1].sd_missing_deductions_what_it_is_tenth_item),$=new li({props:Mi}),Oe.push(()=>$e($,"value",_r));function di(Ze){e[54](Ze)}let Yi={specTreeNodeId:"sd_missing_deductions_what_it_is_eleventh_item",hidden:e[2].isHidden("Eleventh Item")};e[1].sd_missing_deductions_what_it_is_eleventh_item!==void 0&&(Yi.value=e[1].sd_missing_deductions_what_it_is_eleventh_item),j=new li({props:Yi}),Oe.push(()=>$e(j,"value",di));function na(Ze){e[55](Ze)}let Ki={specTreeNodeId:"sd_missing_deductions_what_it_is_twelfth_item",hidden:e[2].isHidden("Twelfth Item")};e[1].sd_missing_deductions_what_it_is_twelfth_item!==void 0&&(Ki.value=e[1].sd_missing_deductions_what_it_is_twelfth_item),V=new li({props:Ki}),Oe.push(()=>$e(V,"value",na));function Rr(Ze){e[56](Ze)}let Di={specTreeNodeId:"sd_missing_deductions_what_it_is_text_extra",hidden:e[2].isHidden("Second Description")};e[1].sd_missing_deductions_what_it_is_text_extra!==void 0&&(Di.value=e[1].sd_missing_deductions_what_it_is_text_extra),X=new ta({props:Di}),Oe.push(()=>$e(X,"value",Rr));function Wi(Ze){e[57](Ze)}let Bi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_annual_meeting_expense_current",hidden:e[2].isHidden("Current Meeting Expense")};e[1].sd_missing_deductions_annual_meeting_expense_current!==void 0&&(Bi.value=e[1].sd_missing_deductions_annual_meeting_expense_current),ne=new xt({props:Bi}),Oe.push(()=>$e(ne,"value",Wi));function _a(Ze){e[58](Ze)}let xi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_annual_meeting_expense_recommended",hidden:e[2].isHidden("Recommended Meeting Expense")};e[1].sd_missing_deductions_annual_meeting_expense_recommended!==void 0&&(xi.value=e[1].sd_missing_deductions_annual_meeting_expense_recommended),ue=new xt({props:xi}),Oe.push(()=>$e(ue,"value",_a));function Kr(Ze){e[59](Ze)}let kr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_meals_current",hidden:e[2].isHidden("Current Meals")};e[1].sd_missing_deductions_meals_current!==void 0&&(kr.value=e[1].sd_missing_deductions_meals_current),ie=new xt({props:kr}),Oe.push(()=>$e(ie,"value",Kr));function Ji(Ze){e[60](Ze)}let ia={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_meals_recommended",hidden:e[2].isHidden("Recommended Meals")};e[1].sd_missing_deductions_meals_recommended!==void 0&&(ia.value=e[1].sd_missing_deductions_meals_recommended),he=new xt({props:ia}),Oe.push(()=>$e(he,"value",Ji));function la(Ze){e[61](Ze)}let Ir={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_travel_current",hidden:e[2].isHidden("Current Travel")};e[1].sd_missing_deductions_travel_current!==void 0&&(Ir.value=e[1].sd_missing_deductions_travel_current),Pe=new xt({props:Ir}),Oe.push(()=>$e(Pe,"value",la));function Ur(Ze){e[62](Ze)}let qr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_travel_recommended",hidden:e[2].isHidden("Recommended Travel")};e[1].sd_missing_deductions_travel_recommended!==void 0&&(qr.value=e[1].sd_missing_deductions_travel_recommended),qe=new xt({props:qr}),Oe.push(()=>$e(qe,"value",Ur));function Ht(Ze){e[63](Ze)}let et={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_telephone_current",hidden:e[2].isHidden("Current Telephone")};e[1].sd_missing_deductions_telephone_current!==void 0&&(et.value=e[1].sd_missing_deductions_telephone_current),G=new xt({props:et}),Oe.push(()=>$e(G,"value",Ht));function ln(Ze){e[64](Ze)}let Vi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_telephone_recommended",hidden:e[2].isHidden("Recommended Telephone")};e[1].sd_missing_deductions_telephone_recommended!==void 0&&(Vi.value=e[1].sd_missing_deductions_telephone_recommended),Te=new xt({props:Vi}),Oe.push(()=>$e(Te,"value",ln));function Ar(Ze){e[65](Ze)}let vr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_internet_current",hidden:e[2].isHidden("Current Internet")};e[1].sd_missing_deductions_internet_current!==void 0&&(vr.value=e[1].sd_missing_deductions_internet_current),we=new xt({props:vr}),Oe.push(()=>$e(we,"value",Ar));function ir(Ze){e[66](Ze)}let Si={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_internet_recommended",hidden:e[2].isHidden("Recommended Internet")};e[1].sd_missing_deductions_internet_recommended!==void 0&&(Si.value=e[1].sd_missing_deductions_internet_recommended),Ke=new xt({props:Si}),Oe.push(()=>$e(Ke,"value",ir));function pr(Ze){e[67](Ze)}let yi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_auto_current",hidden:e[2].isHidden("Current Auto")};e[1].sd_missing_deductions_auto_current!==void 0&&(yi.value=e[1].sd_missing_deductions_auto_current),ht=new xt({props:yi}),Oe.push(()=>$e(ht,"value",pr));function Dr(Ze){e[68](Ze)}let Wr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_auto_recommended",hidden:e[2].isHidden("Recommended Auto")};e[1].sd_missing_deductions_auto_recommended!==void 0&&(Wr.value=e[1].sd_missing_deductions_auto_recommended),pt=new xt({props:Wr}),Oe.push(()=>$e(pt,"value",Dr));function Sr(Ze){e[69](Ze)}let hr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_office_current",hidden:e[2].isHidden("Current Office")};e[1].sd_missing_deductions_office_current!==void 0&&(hr.value=e[1].sd_missing_deductions_office_current),it=new xt({props:hr}),Oe.push(()=>$e(it,"value",Sr));function Vn(Ze){e[70](Ze)}let dn={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_office_recommended",hidden:e[2].isHidden("Recommended Office")};e[1].sd_missing_deductions_office_recommended!==void 0&&(dn.value=e[1].sd_missing_deductions_office_recommended),st=new xt({props:dn}),Oe.push(()=>$e(st,"value",Vn));function wr(Ze){e[71](Ze)}let Bn={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_legal_current",hidden:e[2].isHidden("Current Legal")};e[1].sd_missing_deductions_legal_current!==void 0&&(Bn.value=e[1].sd_missing_deductions_legal_current),Ct=new xt({props:Bn}),Oe.push(()=>$e(Ct,"value",wr));function ra(Ze){e[72](Ze)}let _n={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_legal_recommended",hidden:e[2].isHidden("Recommended Legal")};e[1].sd_missing_deductions_legal_recommended!==void 0&&(_n.value=e[1].sd_missing_deductions_legal_recommended),Rt=new xt({props:_n}),Oe.push(()=>$e(Rt,"value",ra));function Vr(Ze){e[73](Ze)}let rr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_mortgage_current",hidden:e[2].isHidden("Current Mortgage")};e[1].sd_missing_deductions_mortgage_current!==void 0&&(rr.value=e[1].sd_missing_deductions_mortgage_current),nn=new xt({props:rr}),Oe.push(()=>$e(nn,"value",Vr));function Or(Ze){e[74](Ze)}let Ui={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_mortgage_recommended",hidden:e[2].isHidden("Recommended Mortgage")};e[1].sd_missing_deductions_mortgage_recommended!==void 0&&(Ui.value=e[1].sd_missing_deductions_mortgage_recommended),Ft=new xt({props:Ui}),Oe.push(()=>$e(Ft,"value",Or));function Fr(Ze){e[75](Ze)}let wi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_health_savings_account_current",hidden:e[2].isHidden("Current Health Savings Account")};e[1].sd_missing_deductions_health_savings_account_current!==void 0&&(wi.value=e[1].sd_missing_deductions_health_savings_account_current),He=new xt({props:wi}),Oe.push(()=>$e(He,"value",Fr));function Ni(Ze){e[76](Ze)}let ar={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_health_savings_account_recommended",hidden:e[2].isHidden("Recommended Health Savings Account")};e[1].sd_missing_deductions_health_savings_account_recommended!==void 0&&(ar.value=e[1].sd_missing_deductions_health_savings_account_recommended),Xt=new xt({props:ar}),Oe.push(()=>$e(Xt,"value",Ni));function sr(Ze){e[77](Ze)}let Gi={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_cash_charity_donations_current",hidden:e[2].isHidden("Current Charity Donations")};e[1].sd_missing_deductions_cash_charity_donations_current!==void 0&&(Gi.value=e[1].sd_missing_deductions_cash_charity_donations_current),Xe=new xt({props:Gi}),Oe.push(()=>$e(Xe,"value",sr));function Cr(Ze){e[78](Ze)}let or={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_cash_charity_donations_recommended",hidden:e[2].isHidden("Recommended Charity Donations")};e[1].sd_missing_deductions_cash_charity_donations_recommended!==void 0&&(or.value=e[1].sd_missing_deductions_cash_charity_donations_recommended),on=new xt({props:or}),Oe.push(()=>$e(on,"value",Cr));function lr(Ze){e[79](Ze)}let Ka={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_non_cash_donations_current",hidden:e[2].isHidden("Current Non Cash Donations")};e[1].sd_missing_deductions_non_cash_donations_current!==void 0&&(Ka.value=e[1].sd_missing_deductions_non_cash_donations_current),dt=new xt({props:Ka}),Oe.push(()=>$e(dt,"value",lr));function Lr(Ze){e[80](Ze)}let nr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_non_cash_donations_recommended",hidden:e[2].isHidden("Recommended Non Cash Donations")};e[1].sd_missing_deductions_non_cash_donations_recommended!==void 0&&(nr.value=e[1].sd_missing_deductions_non_cash_donations_recommended),Ln=new xt({props:nr}),Oe.push(()=>$e(Ln,"value",Lr));function wa(Ze){e[81](Ze)}let zr={refreshReportParams:e[0],specTreeNodeId:"sd_missing_deductions_total_tax_savings_comes_to",hidden:e[2].isHidden("Total Tax Savings")};return e[1].sd_missing_deductions_total_tax_savings_comes_to!==void 0&&(zr.value=e[1].sd_missing_deductions_total_tax_savings_comes_to),Dn=new xt({props:zr}),Oe.push(()=>$e(Dn,"value",wa)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment),re(X.$$.fragment),re(ne.$$.fragment),re(ue.$$.fragment),re(ie.$$.fragment),re(he.$$.fragment),re(Pe.$$.fragment),re(qe.$$.fragment),re(G.$$.fragment),re(Te.$$.fragment),re(we.$$.fragment),re(Ke.$$.fragment),re(ht.$$.fragment),re(pt.$$.fragment),re(it.$$.fragment),re(st.$$.fragment),re(Ct.$$.fragment),re(Rt.$$.fragment),re(nn.$$.fragment),re(Ft.$$.fragment),re(He.$$.fragment),re(Xt.$$.fragment),re(Xe.$$.fragment),re(on.$$.fragment),re(dt.$$.fragment),re(Ln.$$.fragment),re(Dn.$$.fragment)},m(Ze,tn){ae(t,Ze,tn),ae(n,Ze,tn),ae(r,Ze,tn),ae(s,Ze,tn),ae(l,Ze,tn),ae(c,Ze,tn),ae(T,Ze,tn),ae(A,Ze,tn),ae(y,Ze,tn),ae(D,Ze,tn),ae(M,Ze,tn),ae($,Ze,tn),ae(j,Ze,tn),ae(V,Ze,tn),ae(X,Ze,tn),ae(ne,Ze,tn),ae(ue,Ze,tn),ae(ie,Ze,tn),ae(he,Ze,tn),ae(Pe,Ze,tn),ae(qe,Ze,tn),ae(G,Ze,tn),ae(Te,Ze,tn),ae(we,Ze,tn),ae(Ke,Ze,tn),ae(ht,Ze,tn),ae(pt,Ze,tn),ae(it,Ze,tn),ae(st,Ze,tn),ae(Ct,Ze,tn),ae(Rt,Ze,tn),ae(nn,Ze,tn),ae(Ft,Ze,tn),ae(He,Ze,tn),ae(Xt,Ze,tn),ae(Xe,Ze,tn),ae(on,Ze,tn),ae(dt,Ze,tn),ae(Ln,Ze,tn),ae(Dn,Ze,tn),qn=!0},p(Ze,tn){const Xr={};tn[0]&1&&(Xr.refreshReportParams=Ze[0]),tn[0]&4&&(Xr.hidden=Ze[2].isHidden("Top 3 Widget Options")),tn[0]&7|tn[10]&32&&(Xr.$$scope={dirty:tn,ctx:Ze}),t.$set(Xr);const ur={};tn[0]&4&&(ur.hidden=Ze[2].isHidden("Description")),!i&&tn[0]&2&&(i=!0,ur.value=Ze[1].sd_missing_deductions_what_it_is_text,Ne(()=>i=!1)),n.$set(ur);const Hr={};tn[0]&4&&(Hr.hidden=Ze[2].isHidden("First Item")),!a&&tn[0]&2&&(a=!0,Hr.value=Ze[1].sd_missing_deductions_what_it_is_first_item,Ne(()=>a=!1)),r.$set(Hr);const Xi={};tn[0]&4&&(Xi.hidden=Ze[2].isHidden("Second Item")),!o&&tn[0]&2&&(o=!0,Xi.value=Ze[1].sd_missing_deductions_what_it_is_second_item,Ne(()=>o=!1)),s.$set(Xi);const dr={};tn[0]&4&&(dr.hidden=Ze[2].isHidden("Third Item")),!d&&tn[0]&2&&(d=!0,dr.value=Ze[1].sd_missing_deductions_what_it_is_third_item,Ne(()=>d=!1)),l.$set(dr);const pa={};tn[0]&4&&(pa.hidden=Ze[2].isHidden("Fourth Item")),!v&&tn[0]&2&&(v=!0,pa.value=Ze[1].sd_missing_deductions_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(pa);const qt={};tn[0]&4&&(qt.hidden=Ze[2].isHidden("Fifth Item")),!b&&tn[0]&2&&(b=!0,qt.value=Ze[1].sd_missing_deductions_what_it_is_fifth_item,Ne(()=>b=!1)),T.$set(qt);const mn={};tn[0]&4&&(mn.hidden=Ze[2].isHidden("Sixth Item")),!E&&tn[0]&2&&(E=!0,mn.value=Ze[1].sd_missing_deductions_what_it_is_sixth_item,Ne(()=>E=!1)),A.$set(mn);const ai={};tn[0]&4&&(ai.hidden=Ze[2].isHidden("Seventh Item")),!I&&tn[0]&2&&(I=!0,ai.value=Ze[1].sd_missing_deductions_what_it_is_seventh_item,Ne(()=>I=!1)),y.$set(ai);const Ra={};tn[0]&4&&(Ra.hidden=Ze[2].isHidden("Eighth Item")),!O&&tn[0]&2&&(O=!0,Ra.value=Ze[1].sd_missing_deductions_what_it_is_eighth_item,Ne(()=>O=!1)),D.$set(Ra);const aa={};tn[0]&4&&(aa.hidden=Ze[2].isHidden("Ninth Item")),!F&&tn[0]&2&&(F=!0,aa.value=Ze[1].sd_missing_deductions_what_it_is_ninth_item,Ne(()=>F=!1)),M.$set(aa);const ga={};tn[0]&4&&(ga.hidden=Ze[2].isHidden("Tenth Item")),!L&&tn[0]&2&&(L=!0,ga.value=Ze[1].sd_missing_deductions_what_it_is_tenth_item,Ne(()=>L=!1)),$.$set(ga);const Ta={};tn[0]&4&&(Ta.hidden=Ze[2].isHidden("Eleventh Item")),!H&&tn[0]&2&&(H=!0,Ta.value=Ze[1].sd_missing_deductions_what_it_is_eleventh_item,Ne(()=>H=!1)),j.$set(Ta);const va={};tn[0]&4&&(va.hidden=Ze[2].isHidden("Twelfth Item")),!Q&&tn[0]&2&&(Q=!0,va.value=Ze[1].sd_missing_deductions_what_it_is_twelfth_item,Ne(()=>Q=!1)),V.$set(va);const $r={};tn[0]&4&&($r.hidden=Ze[2].isHidden("Second Description")),!te&&tn[0]&2&&(te=!0,$r.value=Ze[1].sd_missing_deductions_what_it_is_text_extra,Ne(()=>te=!1)),X.$set($r);const ua={};tn[0]&1&&(ua.refreshReportParams=Ze[0]),tn[0]&4&&(ua.hidden=Ze[2].isHidden("Current Meeting Expense")),!be&&tn[0]&2&&(be=!0,ua.value=Ze[1].sd_missing_deductions_annual_meeting_expense_current,Ne(()=>be=!1)),ne.$set(ua);const an={};tn[0]&1&&(an.refreshReportParams=Ze[0]),tn[0]&4&&(an.hidden=Ze[2].isHidden("Recommended Meeting Expense")),!Ce&&tn[0]&2&&(Ce=!0,an.value=Ze[1].sd_missing_deductions_annual_meeting_expense_recommended,Ne(()=>Ce=!1)),ue.$set(an);const gi={};tn[0]&1&&(gi.refreshReportParams=Ze[0]),tn[0]&4&&(gi.hidden=Ze[2].isHidden("Current Meals")),!Y&&tn[0]&2&&(Y=!0,gi.value=Ze[1].sd_missing_deductions_meals_current,Ne(()=>Y=!1)),ie.$set(gi);const jr={};tn[0]&1&&(jr.refreshReportParams=Ze[0]),tn[0]&4&&(jr.hidden=Ze[2].isHidden("Recommended Meals")),!Me&&tn[0]&2&&(Me=!0,jr.value=Ze[1].sd_missing_deductions_meals_recommended,Ne(()=>Me=!1)),he.$set(jr);const Ia={};tn[0]&1&&(Ia.refreshReportParams=Ze[0]),tn[0]&4&&(Ia.hidden=Ze[2].isHidden("Current Travel")),!We&&tn[0]&2&&(We=!0,Ia.value=Ze[1].sd_missing_deductions_travel_current,Ne(()=>We=!1)),Pe.$set(Ia);const Xa={};tn[0]&1&&(Xa.refreshReportParams=Ze[0]),tn[0]&4&&(Xa.hidden=Ze[2].isHidden("Recommended Travel")),!ee&&tn[0]&2&&(ee=!0,Xa.value=Ze[1].sd_missing_deductions_travel_recommended,Ne(()=>ee=!1)),qe.$set(Xa);const Ha={};tn[0]&1&&(Ha.refreshReportParams=Ze[0]),tn[0]&4&&(Ha.hidden=Ze[2].isHidden("Current Telephone")),!me&&tn[0]&2&&(me=!0,Ha.value=Ze[1].sd_missing_deductions_telephone_current,Ne(()=>me=!1)),G.$set(Ha);const $a={};tn[0]&1&&($a.refreshReportParams=Ze[0]),tn[0]&4&&($a.hidden=Ze[2].isHidden("Recommended Telephone")),!De&&tn[0]&2&&(De=!0,$a.value=Ze[1].sd_missing_deductions_telephone_recommended,Ne(()=>De=!1)),Te.$set($a);const Ii={};tn[0]&1&&(Ii.refreshReportParams=Ze[0]),tn[0]&4&&(Ii.hidden=Ze[2].isHidden("Current Internet")),!Ve&&tn[0]&2&&(Ve=!0,Ii.value=Ze[1].sd_missing_deductions_internet_current,Ne(()=>Ve=!1)),we.$set(Ii);const br={};tn[0]&1&&(br.refreshReportParams=Ze[0]),tn[0]&4&&(br.hidden=Ze[2].isHidden("Recommended Internet")),!yt&&tn[0]&2&&(yt=!0,br.value=Ze[1].sd_missing_deductions_internet_recommended,Ne(()=>yt=!1)),Ke.$set(br);const Aa={};tn[0]&1&&(Aa.refreshReportParams=Ze[0]),tn[0]&4&&(Aa.hidden=Ze[2].isHidden("Current Auto")),!Je&&tn[0]&2&&(Je=!0,Aa.value=Ze[1].sd_missing_deductions_auto_current,Ne(()=>Je=!1)),ht.$set(Aa);const Vt={};tn[0]&1&&(Vt.refreshReportParams=Ze[0]),tn[0]&4&&(Vt.hidden=Ze[2].isHidden("Recommended Auto")),!Tt&&tn[0]&2&&(Tt=!0,Vt.value=Ze[1].sd_missing_deductions_auto_recommended,Ne(()=>Tt=!1)),pt.$set(Vt);const _i={};tn[0]&1&&(_i.refreshReportParams=Ze[0]),tn[0]&4&&(_i.hidden=Ze[2].isHidden("Current Office")),!Ge&&tn[0]&2&&(Ge=!0,_i.value=Ze[1].sd_missing_deductions_office_current,Ne(()=>Ge=!1)),it.$set(_i);const xe={};tn[0]&1&&(xe.refreshReportParams=Ze[0]),tn[0]&4&&(xe.hidden=Ze[2].isHidden("Recommended Office")),!It&&tn[0]&2&&(It=!0,xe.value=Ze[1].sd_missing_deductions_office_recommended,Ne(()=>It=!1)),st.$set(xe);const Ue={};tn[0]&1&&(Ue.refreshReportParams=Ze[0]),tn[0]&4&&(Ue.hidden=Ze[2].isHidden("Current Legal")),!bt&&tn[0]&2&&(bt=!0,Ue.value=Ze[1].sd_missing_deductions_legal_current,Ne(()=>bt=!1)),Ct.$set(Ue);const pe={};tn[0]&1&&(pe.refreshReportParams=Ze[0]),tn[0]&4&&(pe.hidden=Ze[2].isHidden("Recommended Legal")),!cn&&tn[0]&2&&(cn=!0,pe.value=Ze[1].sd_missing_deductions_legal_recommended,Ne(()=>cn=!1)),Rt.$set(pe);const Ae={};tn[0]&1&&(Ae.refreshReportParams=Ze[0]),tn[0]&4&&(Ae.hidden=Ze[2].isHidden("Current Mortgage")),!Qe&&tn[0]&2&&(Qe=!0,Ae.value=Ze[1].sd_missing_deductions_mortgage_current,Ne(()=>Qe=!1)),nn.$set(Ae);const at={};tn[0]&1&&(at.refreshReportParams=Ze[0]),tn[0]&4&&(at.hidden=Ze[2].isHidden("Recommended Mortgage")),!Fn&&tn[0]&2&&(Fn=!0,at.value=Ze[1].sd_missing_deductions_mortgage_recommended,Ne(()=>Fn=!1)),Ft.$set(at);const gt={};tn[0]&1&&(gt.refreshReportParams=Ze[0]),tn[0]&4&&(gt.hidden=Ze[2].isHidden("Current Health Savings Account")),!Dt&&tn[0]&2&&(Dt=!0,gt.value=Ze[1].sd_missing_deductions_health_savings_account_current,Ne(()=>Dt=!1)),He.$set(gt);const nt={};tn[0]&1&&(nt.refreshReportParams=Ze[0]),tn[0]&4&&(nt.hidden=Ze[2].isHidden("Recommended Health Savings Account")),!Mt&&tn[0]&2&&(Mt=!0,nt.value=Ze[1].sd_missing_deductions_health_savings_account_recommended,Ne(()=>Mt=!1)),Xt.$set(nt);const jt={};tn[0]&1&&(jt.refreshReportParams=Ze[0]),tn[0]&4&&(jt.hidden=Ze[2].isHidden("Current Charity Donations")),!Nt&&tn[0]&2&&(Nt=!0,jt.value=Ze[1].sd_missing_deductions_cash_charity_donations_current,Ne(()=>Nt=!1)),Xe.$set(jt);const Yt={};tn[0]&1&&(Yt.refreshReportParams=Ze[0]),tn[0]&4&&(Yt.hidden=Ze[2].isHidden("Recommended Charity Donations")),!In&&tn[0]&2&&(In=!0,Yt.value=Ze[1].sd_missing_deductions_cash_charity_donations_recommended,Ne(()=>In=!1)),on.$set(Yt);const Mn={};tn[0]&1&&(Mn.refreshReportParams=Ze[0]),tn[0]&4&&(Mn.hidden=Ze[2].isHidden("Current Non Cash Donations")),!Zt&&tn[0]&2&&(Zt=!0,Mn.value=Ze[1].sd_missing_deductions_non_cash_donations_current,Ne(()=>Zt=!1)),dt.$set(Mn);const Yn={};tn[0]&1&&(Yn.refreshReportParams=Ze[0]),tn[0]&4&&(Yn.hidden=Ze[2].isHidden("Recommended Non Cash Donations")),!xn&&tn[0]&2&&(xn=!0,Yn.value=Ze[1].sd_missing_deductions_non_cash_donations_recommended,Ne(()=>xn=!1)),Ln.$set(Yn);const Wn={};tn[0]&1&&(Wn.refreshReportParams=Ze[0]),tn[0]&4&&(Wn.hidden=Ze[2].isHidden("Total Tax Savings")),!Un&&tn[0]&2&&(Un=!0,Wn.value=Ze[1].sd_missing_deductions_total_tax_savings_comes_to,Ne(()=>Un=!1)),Dn.$set(Wn)},i(Ze){qn||(U(t.$$.fragment,Ze),U(n.$$.fragment,Ze),U(r.$$.fragment,Ze),U(s.$$.fragment,Ze),U(l.$$.fragment,Ze),U(c.$$.fragment,Ze),U(T.$$.fragment,Ze),U(A.$$.fragment,Ze),U(y.$$.fragment,Ze),U(D.$$.fragment,Ze),U(M.$$.fragment,Ze),U($.$$.fragment,Ze),U(j.$$.fragment,Ze),U(V.$$.fragment,Ze),U(X.$$.fragment,Ze),U(ne.$$.fragment,Ze),U(ue.$$.fragment,Ze),U(ie.$$.fragment,Ze),U(he.$$.fragment,Ze),U(Pe.$$.fragment,Ze),U(qe.$$.fragment,Ze),U(G.$$.fragment,Ze),U(Te.$$.fragment,Ze),U(we.$$.fragment,Ze),U(Ke.$$.fragment,Ze),U(ht.$$.fragment,Ze),U(pt.$$.fragment,Ze),U(it.$$.fragment,Ze),U(st.$$.fragment,Ze),U(Ct.$$.fragment,Ze),U(Rt.$$.fragment,Ze),U(nn.$$.fragment,Ze),U(Ft.$$.fragment,Ze),U(He.$$.fragment,Ze),U(Xt.$$.fragment,Ze),U(Xe.$$.fragment,Ze),U(on.$$.fragment,Ze),U(dt.$$.fragment,Ze),U(Ln.$$.fragment,Ze),U(Dn.$$.fragment,Ze),qn=!0)},o(Ze){W(t.$$.fragment,Ze),W(n.$$.fragment,Ze),W(r.$$.fragment,Ze),W(s.$$.fragment,Ze),W(l.$$.fragment,Ze),W(c.$$.fragment,Ze),W(T.$$.fragment,Ze),W(A.$$.fragment,Ze),W(y.$$.fragment,Ze),W(D.$$.fragment,Ze),W(M.$$.fragment,Ze),W($.$$.fragment,Ze),W(j.$$.fragment,Ze),W(V.$$.fragment,Ze),W(X.$$.fragment,Ze),W(ne.$$.fragment,Ze),W(ue.$$.fragment,Ze),W(ie.$$.fragment,Ze),W(he.$$.fragment,Ze),W(Pe.$$.fragment,Ze),W(qe.$$.fragment,Ze),W(G.$$.fragment,Ze),W(Te.$$.fragment,Ze),W(we.$$.fragment,Ze),W(Ke.$$.fragment,Ze),W(ht.$$.fragment,Ze),W(pt.$$.fragment,Ze),W(it.$$.fragment,Ze),W(st.$$.fragment,Ze),W(Ct.$$.fragment,Ze),W(Rt.$$.fragment,Ze),W(nn.$$.fragment,Ze),W(Ft.$$.fragment,Ze),W(He.$$.fragment,Ze),W(Xt.$$.fragment,Ze),W(Xe.$$.fragment,Ze),W(on.$$.fragment,Ze),W(dt.$$.fragment,Ze),W(Ln.$$.fragment,Ze),W(Dn.$$.fragment,Ze),qn=!1},d(Ze){se(t,Ze),se(n,Ze),se(r,Ze),se(s,Ze),se(l,Ze),se(c,Ze),se(T,Ze),se(A,Ze),se(y,Ze),se(D,Ze),se(M,Ze),se($,Ze),se(j,Ze),se(V,Ze),se(X,Ze),se(ne,Ze),se(ue,Ze),se(ie,Ze),se(he,Ze),se(Pe,Ze),se(qe,Ze),se(G,Ze),se(Te,Ze),se(we,Ze),se(Ke,Ze),se(ht,Ze),se(pt,Ze),se(it,Ze),se(st,Ze),se(Ct,Ze),se(Rt,Ze),se(nn,Ze),se(Ft,Ze),se(He,Ze),se(Xt,Ze),se(Xe,Ze),se(on,Ze),se(dt,Ze),se(Ln,Ze),se(Dn,Ze)}}}function Efe(e){let t,n,i;function r(s){e[98](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_enable",classNames:"report-suboption",hidden:e[2].isHidden("Income Deferment"),scrollToId:"pdfIncomeDeferment",$$slots:{default:[Afe]},$$scope:{ctx:e}};return e[1].sd_income_deferment_enable!==void 0&&(a.checked=e[1].sd_income_deferment_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Income Deferment")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_income_deferment_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Ife(e){let t,n,i,r,a;function s(c){e[83](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_income_deferment_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_income_deferment_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_income_deferment_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[84](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_income_deferment_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_income_deferment_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_income_deferment_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_income_deferment_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_income_deferment_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function Afe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Ife]},$$scope:{ctx:e}}});function te(Ge){e[85](Ge)}let ne={specTreeNodeId:"sd_income_deferment_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_income_deferment_what_it_is_text!==void 0&&(ne.value=e[1].sd_income_deferment_what_it_is_text),n=new ta({props:ne}),Oe.push(()=>$e(n,"value",te));function be(Ge){e[86](Ge)}let ue={specTreeNodeId:"sd_income_deferment_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_income_deferment_what_it_is_first_item!==void 0&&(ue.value=e[1].sd_income_deferment_what_it_is_first_item),r=new li({props:ue}),Oe.push(()=>$e(r,"value",be));function Ce(Ge){e[87](Ge)}let ie={specTreeNodeId:"sd_income_deferment_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_income_deferment_what_it_is_second_item!==void 0&&(ie.value=e[1].sd_income_deferment_what_it_is_second_item),s=new li({props:ie}),Oe.push(()=>$e(s,"value",Ce));function Y(Ge){e[88](Ge)}let he={specTreeNodeId:"sd_income_deferment_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_income_deferment_what_it_is_third_item!==void 0&&(he.value=e[1].sd_income_deferment_what_it_is_third_item),l=new li({props:he}),Oe.push(()=>$e(l,"value",Y));function Me(Ge){e[89](Ge)}let Pe={specTreeNodeId:"sd_income_deferment_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_income_deferment_what_it_is_fourth_item!==void 0&&(Pe.value=e[1].sd_income_deferment_what_it_is_fourth_item),c=new li({props:Pe}),Oe.push(()=>$e(c,"value",Me));function We(Ge){e[90](Ge)}let qe={specTreeNodeId:"sd_income_deferment_what_it_is_fifth_item",hidden:e[2].isHidden("Fifth Item")};e[1].sd_income_deferment_what_it_is_fifth_item!==void 0&&(qe.value=e[1].sd_income_deferment_what_it_is_fifth_item),T=new li({props:qe}),Oe.push(()=>$e(T,"value",We));function ee(Ge){e[91](Ge)}let G={specTreeNodeId:"sd_income_deferment_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_income_deferment_ratings_text!==void 0&&(G.value=e[1].sd_income_deferment_ratings_text),A=new ta({props:G}),Oe.push(()=>$e(A,"value",ee));function me(Ge){e[92](Ge)}let Te={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_income_deferment_tax_saving_options_first_expense!==void 0&&(Te.value=e[1].sd_income_deferment_tax_saving_options_first_expense),y=new xt({props:Te}),Oe.push(()=>$e(y,"value",me));function De(Ge){e[93](Ge)}let we={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_income_deferment_tax_saving_options_first_saves_you!==void 0&&(we.value=e[1].sd_income_deferment_tax_saving_options_first_saves_you),D=new xt({props:we}),Oe.push(()=>$e(D,"value",De));function Ve(Ge){e[94](Ge)}let Ke={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_income_deferment_tax_saving_options_second_expense!==void 0&&(Ke.value=e[1].sd_income_deferment_tax_saving_options_second_expense),M=new xt({props:Ke}),Oe.push(()=>$e(M,"value",Ve));function yt(Ge){e[95](Ge)}let ht={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_income_deferment_tax_saving_options_second_saves_you!==void 0&&(ht.value=e[1].sd_income_deferment_tax_saving_options_second_saves_you),$=new xt({props:ht}),Oe.push(()=>$e($,"value",yt));function Je(Ge){e[96](Ge)}let pt={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_income_deferment_tax_saving_options_third_expense!==void 0&&(pt.value=e[1].sd_income_deferment_tax_saving_options_third_expense),j=new xt({props:pt}),Oe.push(()=>$e(j,"value",Je));function Tt(Ge){e[97](Ge)}let it={refreshReportParams:e[0],specTreeNodeId:"sd_income_deferment_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};return e[1].sd_income_deferment_tax_saving_options_third_saves_you!==void 0&&(it.value=e[1].sd_income_deferment_tax_saving_options_third_saves_you),V=new xt({props:it}),Oe.push(()=>$e(V,"value",Tt)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment)},m(Ge,st){ae(t,Ge,st),ae(n,Ge,st),ae(r,Ge,st),ae(s,Ge,st),ae(l,Ge,st),ae(c,Ge,st),ae(T,Ge,st),ae(A,Ge,st),ae(y,Ge,st),ae(D,Ge,st),ae(M,Ge,st),ae($,Ge,st),ae(j,Ge,st),ae(V,Ge,st),X=!0},p(Ge,st){const It={};st[0]&1&&(It.refreshReportParams=Ge[0]),st[0]&4&&(It.hidden=Ge[2].isHidden("Top 3 Widget Options")),st[0]&7|st[10]&32&&(It.$$scope={dirty:st,ctx:Ge}),t.$set(It);const Ct={};st[0]&4&&(Ct.hidden=Ge[2].isHidden("Description")),!i&&st[0]&2&&(i=!0,Ct.value=Ge[1].sd_income_deferment_what_it_is_text,Ne(()=>i=!1)),n.$set(Ct);const bt={};st[0]&4&&(bt.hidden=Ge[2].isHidden("First Item")),!a&&st[0]&2&&(a=!0,bt.value=Ge[1].sd_income_deferment_what_it_is_first_item,Ne(()=>a=!1)),r.$set(bt);const Rt={};st[0]&4&&(Rt.hidden=Ge[2].isHidden("Second Item")),!o&&st[0]&2&&(o=!0,Rt.value=Ge[1].sd_income_deferment_what_it_is_second_item,Ne(()=>o=!1)),s.$set(Rt);const cn={};st[0]&4&&(cn.hidden=Ge[2].isHidden("Third Item")),!d&&st[0]&2&&(d=!0,cn.value=Ge[1].sd_income_deferment_what_it_is_third_item,Ne(()=>d=!1)),l.$set(cn);const nn={};st[0]&4&&(nn.hidden=Ge[2].isHidden("Fourth Item")),!v&&st[0]&2&&(v=!0,nn.value=Ge[1].sd_income_deferment_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(nn);const Qe={};st[0]&4&&(Qe.hidden=Ge[2].isHidden("Fifth Item")),!b&&st[0]&2&&(b=!0,Qe.value=Ge[1].sd_income_deferment_what_it_is_fifth_item,Ne(()=>b=!1)),T.$set(Qe);const Ft={};st[0]&4&&(Ft.hidden=Ge[2].isHidden("Description of Ratings")),!E&&st[0]&2&&(E=!0,Ft.value=Ge[1].sd_income_deferment_ratings_text,Ne(()=>E=!1)),A.$set(Ft);const Fn={};st[0]&1&&(Fn.refreshReportParams=Ge[0]),st[0]&4&&(Fn.hidden=Ge[2].isHidden("Option A Expense")),!I&&st[0]&2&&(I=!0,Fn.value=Ge[1].sd_income_deferment_tax_saving_options_first_expense,Ne(()=>I=!1)),y.$set(Fn);const He={};st[0]&1&&(He.refreshReportParams=Ge[0]),st[0]&4&&(He.hidden=Ge[2].isHidden("Option A Saves You")),!O&&st[0]&2&&(O=!0,He.value=Ge[1].sd_income_deferment_tax_saving_options_first_saves_you,Ne(()=>O=!1)),D.$set(He);const Dt={};st[0]&1&&(Dt.refreshReportParams=Ge[0]),st[0]&4&&(Dt.hidden=Ge[2].isHidden("Option B Expense")),!F&&st[0]&2&&(F=!0,Dt.value=Ge[1].sd_income_deferment_tax_saving_options_second_expense,Ne(()=>F=!1)),M.$set(Dt);const Xt={};st[0]&1&&(Xt.refreshReportParams=Ge[0]),st[0]&4&&(Xt.hidden=Ge[2].isHidden("Option B Saves You")),!L&&st[0]&2&&(L=!0,Xt.value=Ge[1].sd_income_deferment_tax_saving_options_second_saves_you,Ne(()=>L=!1)),$.$set(Xt);const Mt={};st[0]&1&&(Mt.refreshReportParams=Ge[0]),st[0]&4&&(Mt.hidden=Ge[2].isHidden("Option C Expense")),!H&&st[0]&2&&(H=!0,Mt.value=Ge[1].sd_income_deferment_tax_saving_options_third_expense,Ne(()=>H=!1)),j.$set(Mt);const Xe={};st[0]&1&&(Xe.refreshReportParams=Ge[0]),st[0]&4&&(Xe.hidden=Ge[2].isHidden("Option C Saves You")),!Q&&st[0]&2&&(Q=!0,Xe.value=Ge[1].sd_income_deferment_tax_saving_options_third_saves_you,Ne(()=>Q=!1)),V.$set(Xe)},i(Ge){X||(U(t.$$.fragment,Ge),U(n.$$.fragment,Ge),U(r.$$.fragment,Ge),U(s.$$.fragment,Ge),U(l.$$.fragment,Ge),U(c.$$.fragment,Ge),U(T.$$.fragment,Ge),U(A.$$.fragment,Ge),U(y.$$.fragment,Ge),U(D.$$.fragment,Ge),U(M.$$.fragment,Ge),U($.$$.fragment,Ge),U(j.$$.fragment,Ge),U(V.$$.fragment,Ge),X=!0)},o(Ge){W(t.$$.fragment,Ge),W(n.$$.fragment,Ge),W(r.$$.fragment,Ge),W(s.$$.fragment,Ge),W(l.$$.fragment,Ge),W(c.$$.fragment,Ge),W(T.$$.fragment,Ge),W(A.$$.fragment,Ge),W(y.$$.fragment,Ge),W(D.$$.fragment,Ge),W(M.$$.fragment,Ge),W($.$$.fragment,Ge),W(j.$$.fragment,Ge),W(V.$$.fragment,Ge),X=!1},d(Ge){se(t,Ge),se(n,Ge),se(r,Ge),se(s,Ge),se(l,Ge),se(c,Ge),se(T,Ge),se(A,Ge),se(y,Ge),se(D,Ge),se(M,Ge),se($,Ge),se(j,Ge),se(V,Ge)}}}function Dfe(e){let t,n,i;function r(s){e[121](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_enable",classNames:"report-suboption",hidden:e[2].isHidden("SEP IRA"),scrollToId:"pdfSepIra",$$slots:{default:[Mfe]},$$scope:{ctx:e}};return e[1].sd_sep_ira_enable!==void 0&&(a.checked=e[1].sd_sep_ira_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("SEP IRA")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_sep_ira_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Ofe(e){let t,n,i,r,a;function s(c){e[99](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_sep_ira_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_sep_ira_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_sep_ira_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[100](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_sep_ira_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_sep_ira_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_sep_ira_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_sep_ira_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_sep_ira_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function Mfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Ofe]},$$scope:{ctx:e}}});function me(Et){e[101](Et)}let Te={specTreeNodeId:"sd_sep_ira_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_sep_ira_what_it_is_text!==void 0&&(Te.value=e[1].sd_sep_ira_what_it_is_text),n=new ta({props:Te}),Oe.push(()=>$e(n,"value",me));function De(Et){e[102](Et)}let we={specTreeNodeId:"sd_sep_ira_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_sep_ira_what_it_is_first_item!==void 0&&(we.value=e[1].sd_sep_ira_what_it_is_first_item),r=new li({props:we}),Oe.push(()=>$e(r,"value",De));function Ve(Et){e[103](Et)}let Ke={specTreeNodeId:"sd_sep_ira_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_sep_ira_what_it_is_second_item!==void 0&&(Ke.value=e[1].sd_sep_ira_what_it_is_second_item),s=new li({props:Ke}),Oe.push(()=>$e(s,"value",Ve));function yt(Et){e[104](Et)}let ht={specTreeNodeId:"sd_sep_ira_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_sep_ira_what_it_is_third_item!==void 0&&(ht.value=e[1].sd_sep_ira_what_it_is_third_item),l=new li({props:ht}),Oe.push(()=>$e(l,"value",yt));function Je(Et){e[105](Et)}let pt={specTreeNodeId:"sd_sep_ira_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_sep_ira_what_it_is_fourth_item!==void 0&&(pt.value=e[1].sd_sep_ira_what_it_is_fourth_item),c=new li({props:pt}),Oe.push(()=>$e(c,"value",Je));function Tt(Et){e[106](Et)}let it={specTreeNodeId:"sd_sep_ira_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_sep_ira_ratings_text!==void 0&&(it.value=e[1].sd_sep_ira_ratings_text),T=new ta({props:it}),Oe.push(()=>$e(T,"value",Tt));function Ge(Et){e[107](Et)}let st={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_sep_ira_tax_saving_options_first_expense!==void 0&&(st.value=e[1].sd_sep_ira_tax_saving_options_first_expense),A=new xt({props:st}),Oe.push(()=>$e(A,"value",Ge));function It(Et){e[108](Et)}let Ct={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_sep_ira_tax_saving_options_first_saves_you!==void 0&&(Ct.value=e[1].sd_sep_ira_tax_saving_options_first_saves_you),y=new xt({props:Ct}),Oe.push(()=>$e(y,"value",It));function bt(Et){e[109](Et)}let Rt={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_sep_ira_tax_saving_options_second_expense!==void 0&&(Rt.value=e[1].sd_sep_ira_tax_saving_options_second_expense),D=new xt({props:Rt}),Oe.push(()=>$e(D,"value",bt));function cn(Et){e[110](Et)}let nn={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_sep_ira_tax_saving_options_second_saves_you!==void 0&&(nn.value=e[1].sd_sep_ira_tax_saving_options_second_saves_you),M=new xt({props:nn}),Oe.push(()=>$e(M,"value",cn));function Qe(Et){e[111](Et)}let Ft={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_sep_ira_tax_saving_options_third_expense!==void 0&&(Ft.value=e[1].sd_sep_ira_tax_saving_options_third_expense),$=new xt({props:Ft}),Oe.push(()=>$e($,"value",Qe));function Fn(Et){e[112](Et)}let He={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};e[1].sd_sep_ira_tax_saving_options_third_saves_you!==void 0&&(He.value=e[1].sd_sep_ira_tax_saving_options_third_saves_you),j=new xt({props:He}),Oe.push(()=>$e(j,"value",Fn));function Dt(Et){e[113](Et)}let Xt={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A W-2 Wages Expense")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_first_expense!==void 0&&(Xt.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_first_expense),V=new xt({props:Xt}),Oe.push(()=>$e(V,"value",Dt));function Mt(Et){e[114](Et)}let Xe={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A W-2 Wages Saves You")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you!==void 0&&(Xe.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you),X=new xt({props:Xe}),Oe.push(()=>$e(X,"value",Mt));function Nt(Et){e[115](Et)}let on={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B W-2 Wages Expense")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_second_expense!==void 0&&(on.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_second_expense),ne=new xt({props:on}),Oe.push(()=>$e(ne,"value",Nt));function In(Et){e[116](Et)}let dt={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B W-2 Wages Saves You")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you!==void 0&&(dt.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you),ue=new xt({props:dt}),Oe.push(()=>$e(ue,"value",In));function Zt(Et){e[117](Et)}let Ln={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C W-2 Wages Expense")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_third_expense!==void 0&&(Ln.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_third_expense),ie=new xt({props:Ln}),Oe.push(()=>$e(ie,"value",Zt));function xn(Et){e[118](Et)}let Dn={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C W-2 Wages Saves You")};e[1].sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you!==void 0&&(Dn.value=e[1].sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you),he=new xt({props:Dn}),Oe.push(()=>$e(he,"value",xn));function Un(Et){e[119](Et)}let qn={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_based_on_sep_income_of",hidden:e[2].isHidden("SEP Income")};e[1].sd_sep_ira_based_on_sep_income_of!==void 0&&(qn.value=e[1].sd_sep_ira_based_on_sep_income_of),Pe=new xt({props:qn}),Oe.push(()=>$e(Pe,"value",Un));function ft(Et){e[120](Et)}let ni={refreshReportParams:e[0],specTreeNodeId:"sd_sep_ira_increase_w_2_wages_to",hidden:e[2].isHidden("W-2 Wages")};return e[1].sd_sep_ira_increase_w_2_wages_to!==void 0&&(ni.value=e[1].sd_sep_ira_increase_w_2_wages_to),qe=new xt({props:ni}),Oe.push(()=>$e(qe,"value",ft)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment),re(X.$$.fragment),re(ne.$$.fragment),re(ue.$$.fragment),re(ie.$$.fragment),re(he.$$.fragment),re(Pe.$$.fragment),re(qe.$$.fragment)},m(Et,un){ae(t,Et,un),ae(n,Et,un),ae(r,Et,un),ae(s,Et,un),ae(l,Et,un),ae(c,Et,un),ae(T,Et,un),ae(A,Et,un),ae(y,Et,un),ae(D,Et,un),ae(M,Et,un),ae($,Et,un),ae(j,Et,un),ae(V,Et,un),ae(X,Et,un),ae(ne,Et,un),ae(ue,Et,un),ae(ie,Et,un),ae(he,Et,un),ae(Pe,Et,un),ae(qe,Et,un),G=!0},p(Et,un){const Ai={};un[0]&1&&(Ai.refreshReportParams=Et[0]),un[0]&4&&(Ai.hidden=Et[2].isHidden("Top 3 Widget Options")),un[0]&7|un[10]&32&&(Ai.$$scope={dirty:un,ctx:Et}),t.$set(Ai);const St={};un[0]&4&&(St.hidden=Et[2].isHidden("Description")),!i&&un[0]&2&&(i=!0,St.value=Et[1].sd_sep_ira_what_it_is_text,Ne(()=>i=!1)),n.$set(St);const sn={};un[0]&4&&(sn.hidden=Et[2].isHidden("First Item")),!a&&un[0]&2&&(a=!0,sn.value=Et[1].sd_sep_ira_what_it_is_first_item,Ne(()=>a=!1)),r.$set(sn);const ci={};un[0]&4&&(ci.hidden=Et[2].isHidden("Second Item")),!o&&un[0]&2&&(o=!0,ci.value=Et[1].sd_sep_ira_what_it_is_second_item,Ne(()=>o=!1)),s.$set(ci);const pi={};un[0]&4&&(pi.hidden=Et[2].isHidden("Third Item")),!d&&un[0]&2&&(d=!0,pi.value=Et[1].sd_sep_ira_what_it_is_third_item,Ne(()=>d=!1)),l.$set(pi);const Pi={};un[0]&4&&(Pi.hidden=Et[2].isHidden("Fourth Item")),!v&&un[0]&2&&(v=!0,Pi.value=Et[1].sd_sep_ira_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(Pi);const $i={};un[0]&4&&($i.hidden=Et[2].isHidden("Description of Ratings")),!b&&un[0]&2&&(b=!0,$i.value=Et[1].sd_sep_ira_ratings_text,Ne(()=>b=!1)),T.$set($i);const ji={};un[0]&1&&(ji.refreshReportParams=Et[0]),un[0]&4&&(ji.hidden=Et[2].isHidden("Option A Expense")),!E&&un[0]&2&&(E=!0,ji.value=Et[1].sd_sep_ira_tax_saving_options_first_expense,Ne(()=>E=!1)),A.$set(ji);const ri={};un[0]&1&&(ri.refreshReportParams=Et[0]),un[0]&4&&(ri.hidden=Et[2].isHidden("Option A Saves You")),!I&&un[0]&2&&(I=!0,ri.value=Et[1].sd_sep_ira_tax_saving_options_first_saves_you,Ne(()=>I=!1)),y.$set(ri);const tr={};un[0]&1&&(tr.refreshReportParams=Et[0]),un[0]&4&&(tr.hidden=Et[2].isHidden("Option B Expense")),!O&&un[0]&2&&(O=!0,tr.value=Et[1].sd_sep_ira_tax_saving_options_second_expense,Ne(()=>O=!1)),D.$set(tr);const Ei={};un[0]&1&&(Ei.refreshReportParams=Et[0]),un[0]&4&&(Ei.hidden=Et[2].isHidden("Option B Saves You")),!F&&un[0]&2&&(F=!0,Ei.value=Et[1].sd_sep_ira_tax_saving_options_second_saves_you,Ne(()=>F=!1)),M.$set(Ei);const Ti={};un[0]&1&&(Ti.refreshReportParams=Et[0]),un[0]&4&&(Ti.hidden=Et[2].isHidden("Option C Expense")),!L&&un[0]&2&&(L=!0,Ti.value=Et[1].sd_sep_ira_tax_saving_options_third_expense,Ne(()=>L=!1)),$.$set(Ti);const kn={};un[0]&1&&(kn.refreshReportParams=Et[0]),un[0]&4&&(kn.hidden=Et[2].isHidden("Option C Saves You")),!H&&un[0]&2&&(H=!0,kn.value=Et[1].sd_sep_ira_tax_saving_options_third_saves_you,Ne(()=>H=!1)),j.$set(kn);const Rn={};un[0]&1&&(Rn.refreshReportParams=Et[0]),un[0]&4&&(Rn.hidden=Et[2].isHidden("Option A W-2 Wages Expense")),!Q&&un[0]&2&&(Q=!0,Rn.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_first_expense,Ne(()=>Q=!1)),V.$set(Rn);const ki={};un[0]&1&&(ki.refreshReportParams=Et[0]),un[0]&4&&(ki.hidden=Et[2].isHidden("Option A W-2 Wages Saves You")),!te&&un[0]&2&&(te=!0,ki.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you,Ne(()=>te=!1)),X.$set(ki);const mr={};un[0]&1&&(mr.refreshReportParams=Et[0]),un[0]&4&&(mr.hidden=Et[2].isHidden("Option B W-2 Wages Expense")),!be&&un[0]&2&&(be=!0,mr.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_second_expense,Ne(()=>be=!1)),ne.$set(mr);const _r={};un[0]&1&&(_r.refreshReportParams=Et[0]),un[0]&4&&(_r.hidden=Et[2].isHidden("Option B W-2 Wages Saves You")),!Ce&&un[0]&2&&(Ce=!0,_r.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you,Ne(()=>Ce=!1)),ue.$set(_r);const Mi={};un[0]&1&&(Mi.refreshReportParams=Et[0]),un[0]&4&&(Mi.hidden=Et[2].isHidden("Option C W-2 Wages Expense")),!Y&&un[0]&2&&(Y=!0,Mi.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_third_expense,Ne(()=>Y=!1)),ie.$set(Mi);const di={};un[0]&1&&(di.refreshReportParams=Et[0]),un[0]&4&&(di.hidden=Et[2].isHidden("Option C W-2 Wages Saves You")),!Me&&un[0]&2&&(Me=!0,di.value=Et[1].sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you,Ne(()=>Me=!1)),he.$set(di);const Yi={};un[0]&1&&(Yi.refreshReportParams=Et[0]),un[0]&4&&(Yi.hidden=Et[2].isHidden("SEP Income")),!We&&un[0]&2&&(We=!0,Yi.value=Et[1].sd_sep_ira_based_on_sep_income_of,Ne(()=>We=!1)),Pe.$set(Yi);const na={};un[0]&1&&(na.refreshReportParams=Et[0]),un[0]&4&&(na.hidden=Et[2].isHidden("W-2 Wages")),!ee&&un[0]&2&&(ee=!0,na.value=Et[1].sd_sep_ira_increase_w_2_wages_to,Ne(()=>ee=!1)),qe.$set(na)},i(Et){G||(U(t.$$.fragment,Et),U(n.$$.fragment,Et),U(r.$$.fragment,Et),U(s.$$.fragment,Et),U(l.$$.fragment,Et),U(c.$$.fragment,Et),U(T.$$.fragment,Et),U(A.$$.fragment,Et),U(y.$$.fragment,Et),U(D.$$.fragment,Et),U(M.$$.fragment,Et),U($.$$.fragment,Et),U(j.$$.fragment,Et),U(V.$$.fragment,Et),U(X.$$.fragment,Et),U(ne.$$.fragment,Et),U(ue.$$.fragment,Et),U(ie.$$.fragment,Et),U(he.$$.fragment,Et),U(Pe.$$.fragment,Et),U(qe.$$.fragment,Et),G=!0)},o(Et){W(t.$$.fragment,Et),W(n.$$.fragment,Et),W(r.$$.fragment,Et),W(s.$$.fragment,Et),W(l.$$.fragment,Et),W(c.$$.fragment,Et),W(T.$$.fragment,Et),W(A.$$.fragment,Et),W(y.$$.fragment,Et),W(D.$$.fragment,Et),W(M.$$.fragment,Et),W($.$$.fragment,Et),W(j.$$.fragment,Et),W(V.$$.fragment,Et),W(X.$$.fragment,Et),W(ne.$$.fragment,Et),W(ue.$$.fragment,Et),W(ie.$$.fragment,Et),W(he.$$.fragment,Et),W(Pe.$$.fragment,Et),W(qe.$$.fragment,Et),G=!1},d(Et){se(t,Et),se(n,Et),se(r,Et),se(s,Et),se(l,Et),se(c,Et),se(T,Et),se(A,Et),se(y,Et),se(D,Et),se(M,Et),se($,Et),se(j,Et),se(V,Et),se(X,Et),se(ne,Et),se(ue,Et),se(ie,Et),se(he,Et),se(Pe,Et),se(qe,Et)}}}function xfe(e){let t,n,i;function r(s){e[132](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_enable",classNames:"report-suboption",hidden:e[2].isHidden("14 Day Home Rental"),scrollToId:"pdf14DayHomeRental",$$slots:{default:[$fe]},$$scope:{ctx:e}};return e[1].sd_fourteen_day_home_rental_enable!==void 0&&(a.checked=e[1].sd_fourteen_day_home_rental_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("14 Day Home Rental")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_fourteen_day_home_rental_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Rfe(e){let t,n,i,r,a;function s(c){e[122](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_fourteen_day_home_rental_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_fourteen_day_home_rental_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_fourteen_day_home_rental_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[123](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_fourteen_day_home_rental_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_fourteen_day_home_rental_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_fourteen_day_home_rental_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_fourteen_day_home_rental_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_fourteen_day_home_rental_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function $fe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Rfe]},$$scope:{ctx:e}}});function O(Y){e[124](Y)}let M={specTreeNodeId:"sd_fourteen_day_home_rental_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_fourteen_day_home_rental_what_it_is_text!==void 0&&(M.value=e[1].sd_fourteen_day_home_rental_what_it_is_text),n=new ta({props:M}),Oe.push(()=>$e(n,"value",O));function F(Y){e[125](Y)}let $={specTreeNodeId:"sd_fourteen_day_home_rental_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_fourteen_day_home_rental_ratings_text!==void 0&&($.value=e[1].sd_fourteen_day_home_rental_ratings_text),r=new ta({props:$}),Oe.push(()=>$e(r,"value",F));function L(Y){e[126](Y)}let j={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_fourteen_day_home_rental_tax_saving_options_first_expense!==void 0&&(j.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_first_expense),s=new xt({props:j}),Oe.push(()=>$e(s,"value",L));function H(Y){e[127](Y)}let V={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_fourteen_day_home_rental_tax_saving_options_first_saves_you!==void 0&&(V.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_first_saves_you),l=new xt({props:V}),Oe.push(()=>$e(l,"value",H));function Q(Y){e[128](Y)}let X={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_fourteen_day_home_rental_tax_saving_options_second_expense!==void 0&&(X.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_second_expense),c=new xt({props:X}),Oe.push(()=>$e(c,"value",Q));function te(Y){e[129](Y)}let ne={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_fourteen_day_home_rental_tax_saving_options_second_saves_you!==void 0&&(ne.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_second_saves_you),T=new xt({props:ne}),Oe.push(()=>$e(T,"value",te));function be(Y){e[130](Y)}let ue={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_fourteen_day_home_rental_tax_saving_options_third_expense!==void 0&&(ue.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_third_expense),A=new xt({props:ue}),Oe.push(()=>$e(A,"value",be));function Ce(Y){e[131](Y)}let ie={refreshReportParams:e[0],specTreeNodeId:"sd_fourteen_day_home_rental_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};return e[1].sd_fourteen_day_home_rental_tax_saving_options_third_saves_you!==void 0&&(ie.value=e[1].sd_fourteen_day_home_rental_tax_saving_options_third_saves_you),y=new xt({props:ie}),Oe.push(()=>$e(y,"value",Ce)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment)},m(Y,he){ae(t,Y,he),ae(n,Y,he),ae(r,Y,he),ae(s,Y,he),ae(l,Y,he),ae(c,Y,he),ae(T,Y,he),ae(A,Y,he),ae(y,Y,he),D=!0},p(Y,he){const Me={};he[0]&1&&(Me.refreshReportParams=Y[0]),he[0]&4&&(Me.hidden=Y[2].isHidden("Top 3 Widget Options")),he[0]&7|he[10]&32&&(Me.$$scope={dirty:he,ctx:Y}),t.$set(Me);const Pe={};he[0]&4&&(Pe.hidden=Y[2].isHidden("Description")),!i&&he[0]&2&&(i=!0,Pe.value=Y[1].sd_fourteen_day_home_rental_what_it_is_text,Ne(()=>i=!1)),n.$set(Pe);const We={};he[0]&4&&(We.hidden=Y[2].isHidden("Description of Ratings")),!a&&he[0]&2&&(a=!0,We.value=Y[1].sd_fourteen_day_home_rental_ratings_text,Ne(()=>a=!1)),r.$set(We);const qe={};he[0]&1&&(qe.refreshReportParams=Y[0]),he[0]&4&&(qe.hidden=Y[2].isHidden("Option A Expense")),!o&&he[0]&2&&(o=!0,qe.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_first_expense,Ne(()=>o=!1)),s.$set(qe);const ee={};he[0]&1&&(ee.refreshReportParams=Y[0]),he[0]&4&&(ee.hidden=Y[2].isHidden("Option A Saves You")),!d&&he[0]&2&&(d=!0,ee.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_first_saves_you,Ne(()=>d=!1)),l.$set(ee);const G={};he[0]&1&&(G.refreshReportParams=Y[0]),he[0]&4&&(G.hidden=Y[2].isHidden("Option B Expense")),!v&&he[0]&2&&(v=!0,G.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_second_expense,Ne(()=>v=!1)),c.$set(G);const me={};he[0]&1&&(me.refreshReportParams=Y[0]),he[0]&4&&(me.hidden=Y[2].isHidden("Option B Saves You")),!b&&he[0]&2&&(b=!0,me.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_second_saves_you,Ne(()=>b=!1)),T.$set(me);const Te={};he[0]&1&&(Te.refreshReportParams=Y[0]),he[0]&4&&(Te.hidden=Y[2].isHidden("Option C Expense")),!E&&he[0]&2&&(E=!0,Te.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_third_expense,Ne(()=>E=!1)),A.$set(Te);const De={};he[0]&1&&(De.refreshReportParams=Y[0]),he[0]&4&&(De.hidden=Y[2].isHidden("Option C Saves You")),!I&&he[0]&2&&(I=!0,De.value=Y[1].sd_fourteen_day_home_rental_tax_saving_options_third_saves_you,Ne(()=>I=!1)),y.$set(De)},i(Y){D||(U(t.$$.fragment,Y),U(n.$$.fragment,Y),U(r.$$.fragment,Y),U(s.$$.fragment,Y),U(l.$$.fragment,Y),U(c.$$.fragment,Y),U(T.$$.fragment,Y),U(A.$$.fragment,Y),U(y.$$.fragment,Y),D=!0)},o(Y){W(t.$$.fragment,Y),W(n.$$.fragment,Y),W(r.$$.fragment,Y),W(s.$$.fragment,Y),W(l.$$.fragment,Y),W(c.$$.fragment,Y),W(T.$$.fragment,Y),W(A.$$.fragment,Y),W(y.$$.fragment,Y),D=!1},d(Y){se(t,Y),se(n,Y),se(r,Y),se(s,Y),se(l,Y),se(c,Y),se(T,Y),se(A,Y),se(y,Y)}}}function Nfe(e){let t,n,i;function r(s){e[143](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_enable",classNames:"report-suboption",hidden:e[2].isHidden("Employing Your Children"),scrollToId:"pdfEmployingYourChildren",$$slots:{default:[Lfe]},$$scope:{ctx:e}};return e[1].sd_employing_your_children_enable!==void 0&&(a.checked=e[1].sd_employing_your_children_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Employing Your Children")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_employing_your_children_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Ffe(e){let t,n,i,r,a;function s(c){e[133](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_employing_your_children_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_employing_your_children_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_employing_your_children_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[134](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_employing_your_children_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_employing_your_children_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_employing_your_children_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_employing_your_children_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_employing_your_children_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function Lfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[Ffe]},$$scope:{ctx:e}}});function O(Y){e[135](Y)}let M={specTreeNodeId:"sd_employing_your_children_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_employing_your_children_what_it_is_text!==void 0&&(M.value=e[1].sd_employing_your_children_what_it_is_text),n=new ta({props:M}),Oe.push(()=>$e(n,"value",O));function F(Y){e[136](Y)}let $={specTreeNodeId:"sd_employing_your_children_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_employing_your_children_ratings_text!==void 0&&($.value=e[1].sd_employing_your_children_ratings_text),r=new ta({props:$}),Oe.push(()=>$e(r,"value",F));function L(Y){e[137](Y)}let j={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_employing_your_children_tax_saving_options_first_expense!==void 0&&(j.value=e[1].sd_employing_your_children_tax_saving_options_first_expense),s=new xt({props:j}),Oe.push(()=>$e(s,"value",L));function H(Y){e[138](Y)}let V={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_employing_your_children_tax_saving_options_first_saves_you!==void 0&&(V.value=e[1].sd_employing_your_children_tax_saving_options_first_saves_you),l=new xt({props:V}),Oe.push(()=>$e(l,"value",H));function Q(Y){e[139](Y)}let X={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_employing_your_children_tax_saving_options_second_expense!==void 0&&(X.value=e[1].sd_employing_your_children_tax_saving_options_second_expense),c=new xt({props:X}),Oe.push(()=>$e(c,"value",Q));function te(Y){e[140](Y)}let ne={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_employing_your_children_tax_saving_options_second_saves_you!==void 0&&(ne.value=e[1].sd_employing_your_children_tax_saving_options_second_saves_you),T=new xt({props:ne}),Oe.push(()=>$e(T,"value",te));function be(Y){e[141](Y)}let ue={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_employing_your_children_tax_saving_options_third_expense!==void 0&&(ue.value=e[1].sd_employing_your_children_tax_saving_options_third_expense),A=new xt({props:ue}),Oe.push(()=>$e(A,"value",be));function Ce(Y){e[142](Y)}let ie={refreshReportParams:e[0],specTreeNodeId:"sd_employing_your_children_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};return e[1].sd_employing_your_children_tax_saving_options_third_saves_you!==void 0&&(ie.value=e[1].sd_employing_your_children_tax_saving_options_third_saves_you),y=new xt({props:ie}),Oe.push(()=>$e(y,"value",Ce)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment)},m(Y,he){ae(t,Y,he),ae(n,Y,he),ae(r,Y,he),ae(s,Y,he),ae(l,Y,he),ae(c,Y,he),ae(T,Y,he),ae(A,Y,he),ae(y,Y,he),D=!0},p(Y,he){const Me={};he[0]&1&&(Me.refreshReportParams=Y[0]),he[0]&4&&(Me.hidden=Y[2].isHidden("Top 3 Widget Options")),he[0]&7|he[10]&32&&(Me.$$scope={dirty:he,ctx:Y}),t.$set(Me);const Pe={};he[0]&4&&(Pe.hidden=Y[2].isHidden("Description")),!i&&he[0]&2&&(i=!0,Pe.value=Y[1].sd_employing_your_children_what_it_is_text,Ne(()=>i=!1)),n.$set(Pe);const We={};he[0]&4&&(We.hidden=Y[2].isHidden("Description of Ratings")),!a&&he[0]&2&&(a=!0,We.value=Y[1].sd_employing_your_children_ratings_text,Ne(()=>a=!1)),r.$set(We);const qe={};he[0]&1&&(qe.refreshReportParams=Y[0]),he[0]&4&&(qe.hidden=Y[2].isHidden("Option A Expense")),!o&&he[0]&2&&(o=!0,qe.value=Y[1].sd_employing_your_children_tax_saving_options_first_expense,Ne(()=>o=!1)),s.$set(qe);const ee={};he[0]&1&&(ee.refreshReportParams=Y[0]),he[0]&4&&(ee.hidden=Y[2].isHidden("Option A Saves You")),!d&&he[0]&2&&(d=!0,ee.value=Y[1].sd_employing_your_children_tax_saving_options_first_saves_you,Ne(()=>d=!1)),l.$set(ee);const G={};he[0]&1&&(G.refreshReportParams=Y[0]),he[0]&4&&(G.hidden=Y[2].isHidden("Option B Expense")),!v&&he[0]&2&&(v=!0,G.value=Y[1].sd_employing_your_children_tax_saving_options_second_expense,Ne(()=>v=!1)),c.$set(G);const me={};he[0]&1&&(me.refreshReportParams=Y[0]),he[0]&4&&(me.hidden=Y[2].isHidden("Option B Saves You")),!b&&he[0]&2&&(b=!0,me.value=Y[1].sd_employing_your_children_tax_saving_options_second_saves_you,Ne(()=>b=!1)),T.$set(me);const Te={};he[0]&1&&(Te.refreshReportParams=Y[0]),he[0]&4&&(Te.hidden=Y[2].isHidden("Option C Expense")),!E&&he[0]&2&&(E=!0,Te.value=Y[1].sd_employing_your_children_tax_saving_options_third_expense,Ne(()=>E=!1)),A.$set(Te);const De={};he[0]&1&&(De.refreshReportParams=Y[0]),he[0]&4&&(De.hidden=Y[2].isHidden("Option C Saves You")),!I&&he[0]&2&&(I=!0,De.value=Y[1].sd_employing_your_children_tax_saving_options_third_saves_you,Ne(()=>I=!1)),y.$set(De)},i(Y){D||(U(t.$$.fragment,Y),U(n.$$.fragment,Y),U(r.$$.fragment,Y),U(s.$$.fragment,Y),U(l.$$.fragment,Y),U(c.$$.fragment,Y),U(T.$$.fragment,Y),U(A.$$.fragment,Y),U(y.$$.fragment,Y),D=!0)},o(Y){W(t.$$.fragment,Y),W(n.$$.fragment,Y),W(r.$$.fragment,Y),W(s.$$.fragment,Y),W(l.$$.fragment,Y),W(c.$$.fragment,Y),W(T.$$.fragment,Y),W(A.$$.fragment,Y),W(y.$$.fragment,Y),D=!1},d(Y){se(t,Y),se(n,Y),se(r,Y),se(s,Y),se(l,Y),se(c,Y),se(T,Y),se(A,Y),se(y,Y)}}}function Hfe(e){let t,n,i;function r(s){e[158](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_enable",classNames:"report-suboption",hidden:e[2].isHidden("401K"),scrollToId:"pdfPlan401K",$$slots:{default:[Bfe]},$$scope:{ctx:e}};return e[1].sd_plan_401k_enable!==void 0&&(a.checked=e[1].sd_plan_401k_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("401K")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_plan_401k_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function jfe(e){let t,n,i,r,a;function s(c){e[144](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_plan_401k_contributions",hidden:e[2].isHidden("Contributions")};e[1].top_3_strategy_picks_plan_401k_contributions!==void 0&&(o.value=e[1].top_3_strategy_picks_plan_401k_contributions),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[145](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_plan_401k_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_plan_401k_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_plan_401k_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Contributions")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_plan_401k_contributions,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_plan_401k_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function Bfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[jfe]},$$scope:{ctx:e}}});function Q(Je){e[146](Je)}let X={specTreeNodeId:"sd_plan_401k_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_plan_401k_what_it_is_text!==void 0&&(X.value=e[1].sd_plan_401k_what_it_is_text),n=new ta({props:X}),Oe.push(()=>$e(n,"value",Q));function te(Je){e[147](Je)}let ne={specTreeNodeId:"sd_plan_401k_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_plan_401k_ratings_text!==void 0&&(ne.value=e[1].sd_plan_401k_ratings_text),r=new ta({props:ne}),Oe.push(()=>$e(r,"value",te));function be(Je){e[148](Je)}let ue={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_first_contribute",hidden:e[2].isHidden("Option A Expense")};e[1].sd_plan_401k_tax_saving_options_first_contribute!==void 0&&(ue.value=e[1].sd_plan_401k_tax_saving_options_first_contribute),s=new xt({props:ue}),Oe.push(()=>$e(s,"value",be));function Ce(Je){e[149](Je)}let ie={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_plan_401k_tax_saving_options_first_saves_you!==void 0&&(ie.value=e[1].sd_plan_401k_tax_saving_options_first_saves_you),l=new xt({props:ie}),Oe.push(()=>$e(l,"value",Ce));function Y(Je){e[150](Je)}let he={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_second_contribute",hidden:e[2].isHidden("Option B Expense")};e[1].sd_plan_401k_tax_saving_options_second_contribute!==void 0&&(he.value=e[1].sd_plan_401k_tax_saving_options_second_contribute),c=new xt({props:he}),Oe.push(()=>$e(c,"value",Y));function Me(Je){e[151](Je)}let Pe={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_plan_401k_tax_saving_options_second_saves_you!==void 0&&(Pe.value=e[1].sd_plan_401k_tax_saving_options_second_saves_you),T=new xt({props:Pe}),Oe.push(()=>$e(T,"value",Me));function We(Je){e[152](Je)}let qe={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_third_contribute",hidden:e[2].isHidden("Option C Expense")};e[1].sd_plan_401k_tax_saving_options_third_contribute!==void 0&&(qe.value=e[1].sd_plan_401k_tax_saving_options_third_contribute),A=new xt({props:qe}),Oe.push(()=>$e(A,"value",We));function ee(Je){e[153](Je)}let G={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};e[1].sd_plan_401k_tax_saving_options_third_saves_you!==void 0&&(G.value=e[1].sd_plan_401k_tax_saving_options_third_saves_you),y=new xt({props:G}),Oe.push(()=>$e(y,"value",ee));function me(Je){e[154](Je)}let Te={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_taxpayer_wages",hidden:e[2].isHidden("Taxpayer Wages")};e[1].sd_plan_401k_taxpayer_wages!==void 0&&(Te.value=e[1].sd_plan_401k_taxpayer_wages),D=new xt({props:Te}),Oe.push(()=>$e(D,"value",me));function De(Je){e[155](Je)}let we={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_spouse_wages",hidden:e[2].isHidden("Spouse Wages")};e[1].sd_plan_401k_spouse_wages!==void 0&&(we.value=e[1].sd_plan_401k_spouse_wages),M=new xt({props:we}),Oe.push(()=>$e(M,"value",De));function Ve(Je){e[156](Je)}let Ke={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_current_taxpayer_401k_contributions",hidden:e[2].isHidden("Taxpayer 401k Contributions")};e[1].sd_plan_401k_current_taxpayer_401k_contributions!==void 0&&(Ke.value=e[1].sd_plan_401k_current_taxpayer_401k_contributions),$=new xt({props:Ke}),Oe.push(()=>$e($,"value",Ve));function yt(Je){e[157](Je)}let ht={refreshReportParams:e[0],specTreeNodeId:"sd_plan_401k_current_spouse_401k_contributions",hidden:e[2].isHidden("Spouse 401k Contributions")};return e[1].sd_plan_401k_current_spouse_401k_contributions!==void 0&&(ht.value=e[1].sd_plan_401k_current_spouse_401k_contributions),j=new xt({props:ht}),Oe.push(()=>$e(j,"value",yt)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment)},m(Je,pt){ae(t,Je,pt),ae(n,Je,pt),ae(r,Je,pt),ae(s,Je,pt),ae(l,Je,pt),ae(c,Je,pt),ae(T,Je,pt),ae(A,Je,pt),ae(y,Je,pt),ae(D,Je,pt),ae(M,Je,pt),ae($,Je,pt),ae(j,Je,pt),V=!0},p(Je,pt){const Tt={};pt[0]&1&&(Tt.refreshReportParams=Je[0]),pt[0]&4&&(Tt.hidden=Je[2].isHidden("Top 3 Widget Options")),pt[0]&7|pt[10]&32&&(Tt.$$scope={dirty:pt,ctx:Je}),t.$set(Tt);const it={};pt[0]&4&&(it.hidden=Je[2].isHidden("Description")),!i&&pt[0]&2&&(i=!0,it.value=Je[1].sd_plan_401k_what_it_is_text,Ne(()=>i=!1)),n.$set(it);const Ge={};pt[0]&4&&(Ge.hidden=Je[2].isHidden("Description of Ratings")),!a&&pt[0]&2&&(a=!0,Ge.value=Je[1].sd_plan_401k_ratings_text,Ne(()=>a=!1)),r.$set(Ge);const st={};pt[0]&1&&(st.refreshReportParams=Je[0]),pt[0]&4&&(st.hidden=Je[2].isHidden("Option A Expense")),!o&&pt[0]&2&&(o=!0,st.value=Je[1].sd_plan_401k_tax_saving_options_first_contribute,Ne(()=>o=!1)),s.$set(st);const It={};pt[0]&1&&(It.refreshReportParams=Je[0]),pt[0]&4&&(It.hidden=Je[2].isHidden("Option A Saves You")),!d&&pt[0]&2&&(d=!0,It.value=Je[1].sd_plan_401k_tax_saving_options_first_saves_you,Ne(()=>d=!1)),l.$set(It);const Ct={};pt[0]&1&&(Ct.refreshReportParams=Je[0]),pt[0]&4&&(Ct.hidden=Je[2].isHidden("Option B Expense")),!v&&pt[0]&2&&(v=!0,Ct.value=Je[1].sd_plan_401k_tax_saving_options_second_contribute,Ne(()=>v=!1)),c.$set(Ct);const bt={};pt[0]&1&&(bt.refreshReportParams=Je[0]),pt[0]&4&&(bt.hidden=Je[2].isHidden("Option B Saves You")),!b&&pt[0]&2&&(b=!0,bt.value=Je[1].sd_plan_401k_tax_saving_options_second_saves_you,Ne(()=>b=!1)),T.$set(bt);const Rt={};pt[0]&1&&(Rt.refreshReportParams=Je[0]),pt[0]&4&&(Rt.hidden=Je[2].isHidden("Option C Expense")),!E&&pt[0]&2&&(E=!0,Rt.value=Je[1].sd_plan_401k_tax_saving_options_third_contribute,Ne(()=>E=!1)),A.$set(Rt);const cn={};pt[0]&1&&(cn.refreshReportParams=Je[0]),pt[0]&4&&(cn.hidden=Je[2].isHidden("Option C Saves You")),!I&&pt[0]&2&&(I=!0,cn.value=Je[1].sd_plan_401k_tax_saving_options_third_saves_you,Ne(()=>I=!1)),y.$set(cn);const nn={};pt[0]&1&&(nn.refreshReportParams=Je[0]),pt[0]&4&&(nn.hidden=Je[2].isHidden("Taxpayer Wages")),!O&&pt[0]&2&&(O=!0,nn.value=Je[1].sd_plan_401k_taxpayer_wages,Ne(()=>O=!1)),D.$set(nn);const Qe={};pt[0]&1&&(Qe.refreshReportParams=Je[0]),pt[0]&4&&(Qe.hidden=Je[2].isHidden("Spouse Wages")),!F&&pt[0]&2&&(F=!0,Qe.value=Je[1].sd_plan_401k_spouse_wages,Ne(()=>F=!1)),M.$set(Qe);const Ft={};pt[0]&1&&(Ft.refreshReportParams=Je[0]),pt[0]&4&&(Ft.hidden=Je[2].isHidden("Taxpayer 401k Contributions")),!L&&pt[0]&2&&(L=!0,Ft.value=Je[1].sd_plan_401k_current_taxpayer_401k_contributions,Ne(()=>L=!1)),$.$set(Ft);const Fn={};pt[0]&1&&(Fn.refreshReportParams=Je[0]),pt[0]&4&&(Fn.hidden=Je[2].isHidden("Spouse 401k Contributions")),!H&&pt[0]&2&&(H=!0,Fn.value=Je[1].sd_plan_401k_current_spouse_401k_contributions,Ne(()=>H=!1)),j.$set(Fn)},i(Je){V||(U(t.$$.fragment,Je),U(n.$$.fragment,Je),U(r.$$.fragment,Je),U(s.$$.fragment,Je),U(l.$$.fragment,Je),U(c.$$.fragment,Je),U(T.$$.fragment,Je),U(A.$$.fragment,Je),U(y.$$.fragment,Je),U(D.$$.fragment,Je),U(M.$$.fragment,Je),U($.$$.fragment,Je),U(j.$$.fragment,Je),V=!0)},o(Je){W(t.$$.fragment,Je),W(n.$$.fragment,Je),W(r.$$.fragment,Je),W(s.$$.fragment,Je),W(l.$$.fragment,Je),W(c.$$.fragment,Je),W(T.$$.fragment,Je),W(A.$$.fragment,Je),W(y.$$.fragment,Je),W(D.$$.fragment,Je),W(M.$$.fragment,Je),W($.$$.fragment,Je),W(j.$$.fragment,Je),V=!1},d(Je){se(t,Je),se(n,Je),se(r,Je),se(s,Je),se(l,Je),se(c,Je),se(T,Je),se(A,Je),se(y,Je),se(D,Je),se(M,Je),se($,Je),se(j,Je)}}}function Ufe(e){let t,n,i;function r(s){e[180](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_business_entity_planner_enable",classNames:"report-suboption",hidden:e[2].isHidden("Business Entity Planner"),scrollToId:"pdfBusinessEntity",$$slots:{default:[Xfe]},$$scope:{ctx:e}};return e[1].sd_business_entity_planner_enable!==void 0&&(a.checked=e[1].sd_business_entity_planner_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Business Entity Planner")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_business_entity_planner_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function qfe(e){let t,n,i,r,a,s,o,l,d;function c(D){e[159](D)}let v={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_business_entity_best_company_name",hidden:e[2].isHidden("Company Name")};e[1].top_3_strategy_picks_business_entity_best_company_name!==void 0&&(v.value=e[1].top_3_strategy_picks_business_entity_best_company_name),t=new li({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[160](D)}let b={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_business_entity_best_company_recommended",hidden:e[2].isHidden("Recommended Type")};e[1].top_3_strategy_picks_business_entity_best_company_recommended!==void 0&&(b.value=e[1].top_3_strategy_picks_business_entity_best_company_recommended),i=new li({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[161](D)}let E={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_business_entity_best_company_saves_you",hidden:e[2].isHidden("Savings")};e[1].top_3_strategy_picks_business_entity_best_company_saves_you!==void 0&&(E.value=e[1].top_3_strategy_picks_business_entity_best_company_saves_you),a=new xt({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[162](D)}let I={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_business_entity_other_companies_saves_you",hidden:e[2].isHidden("Other Companies Savings")};return e[1].top_3_strategy_picks_business_entity_other_companies_saves_you!==void 0&&(I.value=e[1].top_3_strategy_picks_business_entity_other_companies_saves_you),o=new xt({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){const M={};O[0]&1&&(M.refreshReportParams=D[0]),O[0]&4&&(M.hidden=D[2].isHidden("Company Name")),!n&&O[0]&2&&(n=!0,M.value=D[1].top_3_strategy_picks_business_entity_best_company_name,Ne(()=>n=!1)),t.$set(M);const F={};O[0]&1&&(F.refreshReportParams=D[0]),O[0]&4&&(F.hidden=D[2].isHidden("Recommended Type")),!r&&O[0]&2&&(r=!0,F.value=D[1].top_3_strategy_picks_business_entity_best_company_recommended,Ne(()=>r=!1)),i.$set(F);const $={};O[0]&1&&($.refreshReportParams=D[0]),O[0]&4&&($.hidden=D[2].isHidden("Savings")),!s&&O[0]&2&&(s=!0,$.value=D[1].top_3_strategy_picks_business_entity_best_company_saves_you,Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=D[0]),O[0]&4&&(L.hidden=D[2].isHidden("Other Companies Savings")),!l&&O[0]&2&&(l=!0,L.value=D[1].top_3_strategy_picks_business_entity_other_companies_saves_you,Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function mE(e){let t,n,i,r,a,s,o,l,d;function c(D){e[164](D,e[310])}let v={specTreeNodeId:`sd_business_entity_planner_what_it_is_${e[310].code}_description`,hidden:e[2].isHidden(`${e[310].name} Description`)};e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_description`]!==void 0&&(v.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_description`]),t=new ta({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[165](D,e[310])}let b={specTreeNodeId:`sd_business_entity_planner_what_it_is_${e[310].code}_pros`,hidden:e[2].isHidden(`${e[310].name} Pros`)};e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_pros`]!==void 0&&(b.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_pros`]),i=new ta({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[166](D,e[310])}let E={specTreeNodeId:`sd_business_entity_planner_what_it_is_${e[310].code}_cons`,hidden:e[2].isHidden(`${e[310].name} Cons`)};e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_cons`]!==void 0&&(E.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_cons`]),a=new ta({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[167](D,e[310])}let I={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_what_it_is_${e[310].code}_percent`,hidden:e[2].isHidden(`${e[310].name} Percent`)};return e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_percent`]!==void 0&&(I.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_percent`]),o=new ff({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){e=D;const M={};O[0]&4&&(M.hidden=e[2].isHidden(`${e[310].name} Description`)),!n&&O[0]&2&&(n=!0,M.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_description`],Ne(()=>n=!1)),t.$set(M);const F={};O[0]&4&&(F.hidden=e[2].isHidden(`${e[310].name} Pros`)),!r&&O[0]&2&&(r=!0,F.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_pros`],Ne(()=>r=!1)),i.$set(F);const $={};O[0]&4&&($.hidden=e[2].isHidden(`${e[310].name} Cons`)),!s&&O[0]&2&&(s=!0,$.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_cons`],Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=e[0]),O[0]&4&&(L.hidden=e[2].isHidden(`${e[310].name} Percent`)),!l&&O[0]&2&&(l=!0,L.value=e[1][`sd_business_entity_planner_what_it_is_${e[310].code}_percent`],Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function Wfe(e){let t,n,i,r;function a(c){e[163](c)}let s={specTreeNodeId:"sd_business_entity_planner_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_business_entity_planner_what_it_is_text!==void 0&&(s.value=e[1].sd_business_entity_planner_what_it_is_text),t=new ta({props:s}),Oe.push(()=>$e(t,"value",a));let o=gp,l=[];for(let c=0;c<o.length;c+=1)l[c]=mE(hE(e,o,c));const d=c=>W(l[c],1,1,()=>{l[c]=null});return{c(){re(t.$$.fragment);for(let c=0;c<l.length;c+=1)l[c].c();i=On()},m(c,v){ae(t,c,v);for(let T=0;T<l.length;T+=1)l[T]&&l[T].m(c,v);ce(c,i,v),r=!0},p(c,v){const T={};if(v[0]&4&&(T.hidden=c[2].isHidden("Description")),!n&&v[0]&2&&(n=!0,T.value=c[1].sd_business_entity_planner_what_it_is_text,Ne(()=>n=!1)),t.$set(T),v[0]&7){o=gp;let b;for(b=0;b<o.length;b+=1){const A=hE(c,o,b);l[b]?(l[b].p(A,v),U(l[b],1)):(l[b]=mE(A),l[b].c(),U(l[b],1),l[b].m(i.parentNode,i))}for(pn(),b=o.length;b<l.length;b+=1)d(b);hn()}},i(c){if(!r){U(t.$$.fragment,c);for(let v=0;v<o.length;v+=1)U(l[v]);r=!0}},o(c){W(t.$$.fragment,c),l=l.filter(Boolean);for(let v=0;v<l.length;v+=1)W(l[v]);r=!1},d(c){se(t,c),Nn(l,c),c&&_e(i)}}}function Vfe(e){let t,n,i;function r(s){e[173](s,e[272],e[310])}let a={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_fica_tax`,hidden:e[2].isHidden(`${e[310].name} FICA Tax`)};return e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_fica_tax`]!==void 0&&(a.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_fica_tax`]),t=new xt({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o[0]&1&&(l.refreshReportParams=e[0]),o[0]&4&&(l.hidden=e[2].isHidden(`${e[310].name} FICA Tax`)),!n&&o[0]&2&&(n=!0,l.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_fica_tax`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function zfe(e){let t,n,i;function r(s){e[174](s,e[272],e[310])}let a={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax_c`,hidden:e[2].isHidden(`${e[310].name} Income Tax (Corporate)`)};return e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax_c`]!==void 0&&(a.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax_c`]),t=new xt({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o[0]&1&&(l.refreshReportParams=e[0]),o[0]&4&&(l.hidden=e[2].isHidden(`${e[310].name} Income Tax (Corporate)`)),!n&&o[0]&2&&(n=!0,l.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax_c`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function gE(e){let t,n,i,r,a,s,o,l,d,c,v;function T($){e[172]($,e[272],e[310])}let b={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_se_tax`,hidden:e[2].isHidden(`${e[310].name} SE Tax`)};e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_se_tax`]!==void 0&&(b.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_se_tax`]),t=new xt({props:b}),Oe.push(()=>$e(t,"value",T));let A=e[310].code=="s_corp"&&Vfe(e),E=e[310].code=="c_corp"&&zfe(e);function y($){e[175]($,e[272],e[310])}let I={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax`,hidden:e[2].isHidden(`${e[310].name} Income Tax`)};e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax`]!==void 0&&(I.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax`]),a=new xt({props:I}),Oe.push(()=>$e(a,"value",y));function D($){e[176]($,e[272],e[310])}let O={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_state_tax`,hidden:e[2].isHidden(`${e[310].name} State Tax`)};e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_state_tax`]!==void 0&&(O.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_state_tax`]),o=new xt({props:O}),Oe.push(()=>$e(o,"value",D));function M($){e[177]($,e[272],e[310])}let F={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_total_tax`,hidden:e[2].isHidden(`${e[310].name} Total Tax`)};return e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_total_tax`]!==void 0&&(F.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_total_tax`]),d=new xt({props:F}),Oe.push(()=>$e(d,"value",M)),{c(){re(t.$$.fragment),A&&A.c(),i=On(),E&&E.c(),r=On(),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment)},m($,L){ae(t,$,L),A&&A.m($,L),ce($,i,L),E&&E.m($,L),ce($,r,L),ae(a,$,L),ae(o,$,L),ae(d,$,L),v=!0},p($,L){e=$;const j={};L[0]&1&&(j.refreshReportParams=e[0]),L[0]&4&&(j.hidden=e[2].isHidden(`${e[310].name} SE Tax`)),!n&&L[0]&2&&(n=!0,j.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_se_tax`],Ne(()=>n=!1)),t.$set(j),e[310].code=="s_corp"&&A.p(e,L),e[310].code=="c_corp"&&E.p(e,L);const H={};L[0]&1&&(H.refreshReportParams=e[0]),L[0]&4&&(H.hidden=e[2].isHidden(`${e[310].name} Income Tax`)),!s&&L[0]&2&&(s=!0,H.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_income_tax`],Ne(()=>s=!1)),a.$set(H);const V={};L[0]&1&&(V.refreshReportParams=e[0]),L[0]&4&&(V.hidden=e[2].isHidden(`${e[310].name} State Tax`)),!l&&L[0]&2&&(l=!0,V.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_state_tax`],Ne(()=>l=!1)),o.$set(V);const Q={};L[0]&1&&(Q.refreshReportParams=e[0]),L[0]&4&&(Q.hidden=e[2].isHidden(`${e[310].name} Total Tax`)),!c&&L[0]&2&&(c=!0,Q.value=e[1][`sd_business_entity_planner_${e[272].code}_company_${e[310].code}_total_tax`],Ne(()=>c=!1)),d.$set(Q)},i($){v||(U(t.$$.fragment,$),U(A),U(E),U(a.$$.fragment,$),U(o.$$.fragment,$),U(d.$$.fragment,$),v=!0)},o($){W(t.$$.fragment,$),W(A),W(E),W(a.$$.fragment,$),W(o.$$.fragment,$),W(d.$$.fragment,$),v=!1},d($){se(t,$),A&&A.d($),$&&_e(i),E&&E.d($),$&&_e(r),se(a,$),se(o,$),se(d,$)}}}function Yfe(e){let t,n,i,r,a,s,o,l,d,c;function v($){e[169]($,e[272])}let T={specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_name`,hidden:e[2].isHidden("Name")};e[1][`sd_business_entity_planner_${e[272].code}_company_name`]!==void 0&&(T.value=e[1][`sd_business_entity_planner_${e[272].code}_company_name`]),t=new li({props:T}),Oe.push(()=>$e(t,"value",v));function b($){e[170]($,e[272])}let A={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_type_current`,options:em,hidden:e[2].isHidden("Current Type")};e[1][`sd_business_entity_planner_${e[272].code}_company_type_current`]!==void 0&&(A.value=e[1][`sd_business_entity_planner_${e[272].code}_company_type_current`]),i=new Ml({props:A}),Oe.push(()=>$e(i,"value",b));function E($){e[171]($,e[272])}let y={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_type_recommended`,options:em,hidden:e[2].isHidden("Recommended Type")};e[1][`sd_business_entity_planner_${e[272].code}_company_type_recommended`]!==void 0&&(y.value=e[1][`sd_business_entity_planner_${e[272].code}_company_type_recommended`]),a=new Ml({props:y}),Oe.push(()=>$e(a,"value",E));let I=gp,D=[];for(let $=0;$<I.length;$+=1)D[$]=gE(pE(e,I,$));const O=$=>W(D[$],1,1,()=>{D[$]=null});function M($){e[178]($,e[272])}let F={refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_savings`,hidden:e[2].isHidden("Savings")};return e[1][`sd_business_entity_planner_${e[272].code}_company_savings`]!==void 0&&(F.value=e[1][`sd_business_entity_planner_${e[272].code}_company_savings`]),l=new xt({props:F}),Oe.push(()=>$e(l,"value",M)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment);for(let $=0;$<D.length;$+=1)D[$].c();o=On(),re(l.$$.fragment)},m($,L){ae(t,$,L),ae(i,$,L),ae(a,$,L);for(let j=0;j<D.length;j+=1)D[j]&&D[j].m($,L);ce($,o,L),ae(l,$,L),c=!0},p($,L){e=$;const j={};L[0]&4&&(j.hidden=e[2].isHidden("Name")),!n&&L[0]&2&&(n=!0,j.value=e[1][`sd_business_entity_planner_${e[272].code}_company_name`],Ne(()=>n=!1)),t.$set(j);const H={};L[0]&1&&(H.refreshReportParams=e[0]),L[0]&4&&(H.hidden=e[2].isHidden("Current Type")),!r&&L[0]&2&&(r=!0,H.value=e[1][`sd_business_entity_planner_${e[272].code}_company_type_current`],Ne(()=>r=!1)),i.$set(H);const V={};if(L[0]&1&&(V.refreshReportParams=e[0]),L[0]&4&&(V.hidden=e[2].isHidden("Recommended Type")),!s&&L[0]&2&&(s=!0,V.value=e[1][`sd_business_entity_planner_${e[272].code}_company_type_recommended`],Ne(()=>s=!1)),a.$set(V),L[0]&7){I=gp;let X;for(X=0;X<I.length;X+=1){const te=pE(e,I,X);D[X]?(D[X].p(te,L),U(D[X],1)):(D[X]=gE(te),D[X].c(),U(D[X],1),D[X].m(o.parentNode,o))}for(pn(),X=I.length;X<D.length;X+=1)O(X);hn()}const Q={};L[0]&1&&(Q.refreshReportParams=e[0]),L[0]&4&&(Q.hidden=e[2].isHidden("Savings")),!d&&L[0]&2&&(d=!0,Q.value=e[1][`sd_business_entity_planner_${e[272].code}_company_savings`],Ne(()=>d=!1)),l.$set(Q)},i($){if(!c){U(t.$$.fragment,$),U(i.$$.fragment,$),U(a.$$.fragment,$);for(let L=0;L<I.length;L+=1)U(D[L]);U(l.$$.fragment,$),c=!0}},o($){W(t.$$.fragment,$),W(i.$$.fragment,$),W(a.$$.fragment,$),D=D.filter(Boolean);for(let L=0;L<D.length;L+=1)W(D[L]);W(l.$$.fragment,$),c=!1},d($){se(t,$),se(i,$),se(a,$),Nn(D,$),$&&_e(o),se(l,$)}}}function vE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_business_entity_planner_${e[272].code}_company_tree`,classNames:"report-suboption",hidden:e[2].isHidden(`${e[272].name} Company`),$$slots:{default:[Yfe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(`${i[272].name} Company`)),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Gfe(e){let t,n,i,r;function a(c){e[168](c)}let s={specTreeNodeId:"sd_business_entity_planner_comparison_description",hidden:e[2].isHidden("Description")};e[1].sd_business_entity_planner_comparison_description!==void 0&&(s.value=e[1].sd_business_entity_planner_comparison_description),t=new ta({props:s}),Oe.push(()=>$e(t,"value",a));let o=Wb,l=[];for(let c=0;c<o.length;c+=1)l[c]=vE(_E(e,o,c));const d=c=>W(l[c],1,1,()=>{l[c]=null});return{c(){re(t.$$.fragment);for(let c=0;c<l.length;c+=1)l[c].c();i=On()},m(c,v){ae(t,c,v);for(let T=0;T<l.length;T+=1)l[T]&&l[T].m(c,v);ce(c,i,v),r=!0},p(c,v){const T={};if(v[0]&4&&(T.hidden=c[2].isHidden("Description")),!n&&v[0]&2&&(n=!0,T.value=c[1].sd_business_entity_planner_comparison_description,Ne(()=>n=!1)),t.$set(T),v[0]&7){o=Wb;let b;for(b=0;b<o.length;b+=1){const A=_E(c,o,b);l[b]?(l[b].p(A,v),U(l[b],1)):(l[b]=vE(A),l[b].c(),U(l[b],1),l[b].m(i.parentNode,i))}for(pn(),b=o.length;b<l.length;b+=1)d(b);hn()}},i(c){if(!r){U(t.$$.fragment,c);for(let v=0;v<o.length;v+=1)U(l[v]);r=!0}},o(c){W(t.$$.fragment,c),l=l.filter(Boolean);for(let v=0;v<l.length;v+=1)W(l[v]);r=!1},d(c){se(t,c),Nn(l,c),c&&_e(i)}}}function Kfe(e){let t,n,i;function r(s){e[179](s)}let a={specTreeNodeId:"sd_business_entity_planner_how_to_change_business_stucture",hidden:e[2].isHidden("Description")};return e[1].sd_business_entity_planner_how_to_change_business_stucture!==void 0&&(a.value=e[1].sd_business_entity_planner_how_to_change_business_stucture),t=new ta({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&4&&(l.hidden=s[2].isHidden("Description")),!n&&o[0]&2&&(n=!0,l.value=s[1].sd_business_entity_planner_how_to_change_business_stucture,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Xfe(e){let t,n,i,r,a;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_business_entity_planner_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[qfe]},$$scope:{ctx:e}}}),n=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_business_entity_planner_what_it_is_tree",classNames:"report-suboption",hidden:e[2].isHidden("What it is"),$$slots:{default:[Wfe]},$$scope:{ctx:e}}}),i=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_business_entity_planner_comparison_tree",classNames:"report-suboption",hidden:e[2].isHidden("Comparison"),$$slots:{default:[Gfe]},$$scope:{ctx:e}}}),r=new Ci({props:{specTreeNodeId:"sd_business_entity_planner_how_to_change_business_tree",classNames:"report-suboption",hidden:e[2].isHidden("How to Сhange Your Business Stucture"),$$slots:{default:[Kfe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment),re(n.$$.fragment),re(i.$$.fragment),re(r.$$.fragment)},m(s,o){ae(t,s,o),ae(n,s,o),ae(i,s,o),ae(r,s,o),a=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Top 3 Widget Options")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),t.$set(l);const d={};o[0]&1&&(d.refreshReportParams=s[0]),o[0]&4&&(d.hidden=s[2].isHidden("What it is")),o[0]&7|o[10]&32&&(d.$$scope={dirty:o,ctx:s}),n.$set(d);const c={};o[0]&1&&(c.refreshReportParams=s[0]),o[0]&4&&(c.hidden=s[2].isHidden("Comparison")),o[0]&7|o[10]&32&&(c.$$scope={dirty:o,ctx:s}),i.$set(c);const v={};o[0]&4&&(v.hidden=s[2].isHidden("How to Сhange Your Business Stucture")),o[0]&6|o[10]&32&&(v.$$scope={dirty:o,ctx:s}),r.$set(v)},i(s){a||(U(t.$$.fragment,s),U(n.$$.fragment,s),U(i.$$.fragment,s),U(r.$$.fragment,s),a=!0)},o(s){W(t.$$.fragment,s),W(n.$$.fragment,s),W(i.$$.fragment,s),W(r.$$.fragment,s),a=!1},d(s){se(t,s),se(n,s),se(i,s),se(r,s)}}}function Qfe(e){let t,n,i;function r(s){e[211](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_enable",classNames:"report-suboption",hidden:e[2].isHidden("Auto Lease"),scrollToId:"pdfAutoLease",$$slots:{default:[Jfe]},$$scope:{ctx:e}};return e[1].sd_auto_lease_enable!==void 0&&(a.checked=e[1].sd_auto_lease_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Auto Lease")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_auto_lease_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Jfe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn;function nn(et){e[181](et)}let Qe={specTreeNodeId:"sd_auto_lease_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_auto_lease_what_it_is_text!==void 0&&(Qe.value=e[1].sd_auto_lease_what_it_is_text),t=new ta({props:Qe}),Oe.push(()=>$e(t,"value",nn));function Ft(et){e[182](et)}let Fn={specTreeNodeId:"sd_auto_lease_what_it_is_lease_pros",hidden:e[2].isHidden("Lease Pros")};e[1].sd_auto_lease_what_it_is_lease_pros!==void 0&&(Fn.value=e[1].sd_auto_lease_what_it_is_lease_pros),i=new ta({props:Fn}),Oe.push(()=>$e(i,"value",Ft));function He(et){e[183](et)}let Dt={specTreeNodeId:"sd_auto_lease_what_it_is_lease_cons",hidden:e[2].isHidden("Lease Cons")};e[1].sd_auto_lease_what_it_is_lease_cons!==void 0&&(Dt.value=e[1].sd_auto_lease_what_it_is_lease_cons),a=new ta({props:Dt}),Oe.push(()=>$e(a,"value",He));function Xt(et){e[184](et)}let Mt={specTreeNodeId:"sd_auto_lease_what_it_is_purchase_pros",hidden:e[2].isHidden("Purchase Pros")};e[1].sd_auto_lease_what_it_is_purchase_pros!==void 0&&(Mt.value=e[1].sd_auto_lease_what_it_is_purchase_pros),o=new ta({props:Mt}),Oe.push(()=>$e(o,"value",Xt));function Xe(et){e[185](et)}let Nt={specTreeNodeId:"sd_auto_lease_what_it_is_purchase_cons",hidden:e[2].isHidden("Purchase Cons")};e[1].sd_auto_lease_what_it_is_purchase_cons!==void 0&&(Nt.value=e[1].sd_auto_lease_what_it_is_purchase_cons),d=new ta({props:Nt}),Oe.push(()=>$e(d,"value",Xe));function on(et){e[186](et)}let In={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_business_use",hidden:e[2].isHidden("Business Use")};e[1].sd_auto_lease_business_use!==void 0&&(In.value=e[1].sd_auto_lease_business_use),v=new ff({props:In}),Oe.push(()=>$e(v,"value",on));function dt(et){e[187](et)}let Zt={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_price",hidden:e[2].isHidden("Purchase Price")};e[1].sd_auto_lease_purchase_price!==void 0&&(Zt.value=e[1].sd_auto_lease_purchase_price),b=new xt({props:Zt}),Oe.push(()=>$e(b,"value",dt));function Ln(et){e[188](et)}let xn={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_vehicle_weight",hidden:e[2].isHidden("Vehicle Weight")};e[1].sd_auto_lease_vehicle_weight!==void 0&&(xn.value=e[1].sd_auto_lease_vehicle_weight),E=new li({props:xn}),Oe.push(()=>$e(E,"value",Ln));function Dn(et){e[189](et)}let Un={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_payment",hidden:e[2].isHidden("Lease Payment")};e[1].sd_auto_lease_lease_payment!==void 0&&(Un.value=e[1].sd_auto_lease_lease_payment),I=new xt({props:Un}),Oe.push(()=>$e(I,"value",Dn));function qn(et){e[190](et)}let ft={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_term",hidden:e[2].isHidden("Lease Term")};e[1].sd_auto_lease_lease_term!==void 0&&(ft.value=e[1].sd_auto_lease_lease_term),O=new ff({props:ft}),Oe.push(()=>$e(O,"value",qn));function ni(et){e[191](et)}let Et={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_expense_first_year",hidden:e[2].isHidden("Lease Expense 1st Year")};e[1].sd_auto_lease_lease_expense_first_year!==void 0&&(Et.value=e[1].sd_auto_lease_lease_expense_first_year),F=new xt({props:Et}),Oe.push(()=>$e(F,"value",ni));function un(et){e[192](et)}let Ai={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_tax_savings_first_year",hidden:e[2].isHidden("Lease Tax Savings 1st Year")};e[1].sd_auto_lease_lease_tax_savings_first_year!==void 0&&(Ai.value=e[1].sd_auto_lease_lease_tax_savings_first_year),L=new xt({props:Ai}),Oe.push(()=>$e(L,"value",un));function St(et){e[193](et)}let sn={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_expense_second_year",hidden:e[2].isHidden("Lease Expense 2nd Year")};e[1].sd_auto_lease_lease_expense_second_year!==void 0&&(sn.value=e[1].sd_auto_lease_lease_expense_second_year),H=new xt({props:sn}),Oe.push(()=>$e(H,"value",St));function ci(et){e[194](et)}let pi={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_tax_savings_second_year",hidden:e[2].isHidden("Lease Tax Savings 2nd Year")};e[1].sd_auto_lease_lease_tax_savings_second_year!==void 0&&(pi.value=e[1].sd_auto_lease_lease_tax_savings_second_year),Q=new xt({props:pi}),Oe.push(()=>$e(Q,"value",ci));function Pi(et){e[195](et)}let $i={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_expense_third_year",hidden:e[2].isHidden("Lease Expense 3rd Year")};e[1].sd_auto_lease_lease_expense_third_year!==void 0&&($i.value=e[1].sd_auto_lease_lease_expense_third_year),te=new xt({props:$i}),Oe.push(()=>$e(te,"value",Pi));function ji(et){e[196](et)}let ri={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_tax_savings_third_year",hidden:e[2].isHidden("Lease Tax Savings 3rd Year")};e[1].sd_auto_lease_lease_tax_savings_third_year!==void 0&&(ri.value=e[1].sd_auto_lease_lease_tax_savings_third_year),be=new xt({props:ri}),Oe.push(()=>$e(be,"value",ji));function tr(et){e[197](et)}let Ei={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_expense_fourth_year",hidden:e[2].isHidden("Lease Expense 4th Year")};e[1].sd_auto_lease_lease_expense_fourth_year!==void 0&&(Ei.value=e[1].sd_auto_lease_lease_expense_fourth_year),Ce=new xt({props:Ei}),Oe.push(()=>$e(Ce,"value",tr));function Ti(et){e[198](et)}let kn={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_tax_savings_fourth_year",hidden:e[2].isHidden("Lease Tax Savings 4th Year")};e[1].sd_auto_lease_lease_tax_savings_fourth_year!==void 0&&(kn.value=e[1].sd_auto_lease_lease_tax_savings_fourth_year),Y=new xt({props:kn}),Oe.push(()=>$e(Y,"value",Ti));function Rn(et){e[199](et)}let ki={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_expense_fifth_year",hidden:e[2].isHidden("Lease Expense 5th Year")};e[1].sd_auto_lease_lease_expense_fifth_year!==void 0&&(ki.value=e[1].sd_auto_lease_lease_expense_fifth_year),Me=new xt({props:ki}),Oe.push(()=>$e(Me,"value",Rn));function mr(et){e[200](et)}let _r={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_lease_tax_savings_fifth_year",hidden:e[2].isHidden("Lease Tax Savings 5th Year")};e[1].sd_auto_lease_lease_tax_savings_fifth_year!==void 0&&(_r.value=e[1].sd_auto_lease_lease_tax_savings_fifth_year),We=new xt({props:_r}),Oe.push(()=>$e(We,"value",mr));function Mi(et){e[201](et)}let di={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_depreciation_first_year",hidden:e[2].isHidden("Purchase Depreciation 1st Year")};e[1].sd_auto_lease_purchase_depreciation_first_year!==void 0&&(di.value=e[1].sd_auto_lease_purchase_depreciation_first_year),ee=new xt({props:di}),Oe.push(()=>$e(ee,"value",Mi));function Yi(et){e[202](et)}let na={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_tax_savings_first_year",hidden:e[2].isHidden("Purchase Tax Savings 1st Year")};e[1].sd_auto_lease_purchase_tax_savings_first_year!==void 0&&(na.value=e[1].sd_auto_lease_purchase_tax_savings_first_year),me=new xt({props:na}),Oe.push(()=>$e(me,"value",Yi));function Ki(et){e[203](et)}let Rr={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_depreciation_second_year",hidden:e[2].isHidden("Purchase Depreciation 2nd Year")};e[1].sd_auto_lease_purchase_depreciation_second_year!==void 0&&(Rr.value=e[1].sd_auto_lease_purchase_depreciation_second_year),De=new xt({props:Rr}),Oe.push(()=>$e(De,"value",Ki));function Di(et){e[204](et)}let Wi={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_tax_savings_second_year",hidden:e[2].isHidden("Purchase Tax Savings 2nd Year")};e[1].sd_auto_lease_purchase_tax_savings_second_year!==void 0&&(Wi.value=e[1].sd_auto_lease_purchase_tax_savings_second_year),Ve=new xt({props:Wi}),Oe.push(()=>$e(Ve,"value",Di));function Bi(et){e[205](et)}let _a={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_depreciation_third_year",hidden:e[2].isHidden("Purchase Depreciation 3rd Year")};e[1].sd_auto_lease_purchase_depreciation_third_year!==void 0&&(_a.value=e[1].sd_auto_lease_purchase_depreciation_third_year),yt=new xt({props:_a}),Oe.push(()=>$e(yt,"value",Bi));function xi(et){e[206](et)}let Kr={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_tax_savings_third_year",hidden:e[2].isHidden("Purchase Tax Savings 3rd Year")};e[1].sd_auto_lease_purchase_tax_savings_third_year!==void 0&&(Kr.value=e[1].sd_auto_lease_purchase_tax_savings_third_year),Je=new xt({props:Kr}),Oe.push(()=>$e(Je,"value",xi));function kr(et){e[207](et)}let Ji={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_depreciation_fourth_year",hidden:e[2].isHidden("Purchase Depreciation 4th Year")};e[1].sd_auto_lease_purchase_depreciation_fourth_year!==void 0&&(Ji.value=e[1].sd_auto_lease_purchase_depreciation_fourth_year),Tt=new xt({props:Ji}),Oe.push(()=>$e(Tt,"value",kr));function ia(et){e[208](et)}let la={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_tax_savings_fourth_year",hidden:e[2].isHidden("Purchase Tax Savings 4th Year")};e[1].sd_auto_lease_purchase_tax_savings_fourth_year!==void 0&&(la.value=e[1].sd_auto_lease_purchase_tax_savings_fourth_year),Ge=new xt({props:la}),Oe.push(()=>$e(Ge,"value",ia));function Ir(et){e[209](et)}let Ur={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_depreciation_fifth_year",hidden:e[2].isHidden("Purchase Depreciation 5th Year")};e[1].sd_auto_lease_purchase_depreciation_fifth_year!==void 0&&(Ur.value=e[1].sd_auto_lease_purchase_depreciation_fifth_year),It=new xt({props:Ur}),Oe.push(()=>$e(It,"value",Ir));function qr(et){e[210](et)}let Ht={refreshReportParams:e[0],specTreeNodeId:"sd_auto_lease_purchase_tax_savings_fifth_year",hidden:e[2].isHidden("Purchase Tax Savings 5th Year")};return e[1].sd_auto_lease_purchase_tax_savings_fifth_year!==void 0&&(Ht.value=e[1].sd_auto_lease_purchase_tax_savings_fifth_year),bt=new xt({props:Ht}),Oe.push(()=>$e(bt,"value",qr)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment),re(I.$$.fragment),re(O.$$.fragment),re(F.$$.fragment),re(L.$$.fragment),re(H.$$.fragment),re(Q.$$.fragment),re(te.$$.fragment),re(be.$$.fragment),re(Ce.$$.fragment),re(Y.$$.fragment),re(Me.$$.fragment),re(We.$$.fragment),re(ee.$$.fragment),re(me.$$.fragment),re(De.$$.fragment),re(Ve.$$.fragment),re(yt.$$.fragment),re(Je.$$.fragment),re(Tt.$$.fragment),re(Ge.$$.fragment),re(It.$$.fragment),re(bt.$$.fragment)},m(et,ln){ae(t,et,ln),ae(i,et,ln),ae(a,et,ln),ae(o,et,ln),ae(d,et,ln),ae(v,et,ln),ae(b,et,ln),ae(E,et,ln),ae(I,et,ln),ae(O,et,ln),ae(F,et,ln),ae(L,et,ln),ae(H,et,ln),ae(Q,et,ln),ae(te,et,ln),ae(be,et,ln),ae(Ce,et,ln),ae(Y,et,ln),ae(Me,et,ln),ae(We,et,ln),ae(ee,et,ln),ae(me,et,ln),ae(De,et,ln),ae(Ve,et,ln),ae(yt,et,ln),ae(Je,et,ln),ae(Tt,et,ln),ae(Ge,et,ln),ae(It,et,ln),ae(bt,et,ln),cn=!0},p(et,ln){const Vi={};ln[0]&4&&(Vi.hidden=et[2].isHidden("Description")),!n&&ln[0]&2&&(n=!0,Vi.value=et[1].sd_auto_lease_what_it_is_text,Ne(()=>n=!1)),t.$set(Vi);const Ar={};ln[0]&4&&(Ar.hidden=et[2].isHidden("Lease Pros")),!r&&ln[0]&2&&(r=!0,Ar.value=et[1].sd_auto_lease_what_it_is_lease_pros,Ne(()=>r=!1)),i.$set(Ar);const vr={};ln[0]&4&&(vr.hidden=et[2].isHidden("Lease Cons")),!s&&ln[0]&2&&(s=!0,vr.value=et[1].sd_auto_lease_what_it_is_lease_cons,Ne(()=>s=!1)),a.$set(vr);const ir={};ln[0]&4&&(ir.hidden=et[2].isHidden("Purchase Pros")),!l&&ln[0]&2&&(l=!0,ir.value=et[1].sd_auto_lease_what_it_is_purchase_pros,Ne(()=>l=!1)),o.$set(ir);const Si={};ln[0]&4&&(Si.hidden=et[2].isHidden("Purchase Cons")),!c&&ln[0]&2&&(c=!0,Si.value=et[1].sd_auto_lease_what_it_is_purchase_cons,Ne(()=>c=!1)),d.$set(Si);const pr={};ln[0]&1&&(pr.refreshReportParams=et[0]),ln[0]&4&&(pr.hidden=et[2].isHidden("Business Use")),!T&&ln[0]&2&&(T=!0,pr.value=et[1].sd_auto_lease_business_use,Ne(()=>T=!1)),v.$set(pr);const yi={};ln[0]&1&&(yi.refreshReportParams=et[0]),ln[0]&4&&(yi.hidden=et[2].isHidden("Purchase Price")),!A&&ln[0]&2&&(A=!0,yi.value=et[1].sd_auto_lease_purchase_price,Ne(()=>A=!1)),b.$set(yi);const Dr={};ln[0]&1&&(Dr.refreshReportParams=et[0]),ln[0]&4&&(Dr.hidden=et[2].isHidden("Vehicle Weight")),!y&&ln[0]&2&&(y=!0,Dr.value=et[1].sd_auto_lease_vehicle_weight,Ne(()=>y=!1)),E.$set(Dr);const Wr={};ln[0]&1&&(Wr.refreshReportParams=et[0]),ln[0]&4&&(Wr.hidden=et[2].isHidden("Lease Payment")),!D&&ln[0]&2&&(D=!0,Wr.value=et[1].sd_auto_lease_lease_payment,Ne(()=>D=!1)),I.$set(Wr);const Sr={};ln[0]&1&&(Sr.refreshReportParams=et[0]),ln[0]&4&&(Sr.hidden=et[2].isHidden("Lease Term")),!M&&ln[0]&2&&(M=!0,Sr.value=et[1].sd_auto_lease_lease_term,Ne(()=>M=!1)),O.$set(Sr);const hr={};ln[0]&1&&(hr.refreshReportParams=et[0]),ln[0]&4&&(hr.hidden=et[2].isHidden("Lease Expense 1st Year")),!$&&ln[0]&2&&($=!0,hr.value=et[1].sd_auto_lease_lease_expense_first_year,Ne(()=>$=!1)),F.$set(hr);const Vn={};ln[0]&1&&(Vn.refreshReportParams=et[0]),ln[0]&4&&(Vn.hidden=et[2].isHidden("Lease Tax Savings 1st Year")),!j&&ln[0]&2&&(j=!0,Vn.value=et[1].sd_auto_lease_lease_tax_savings_first_year,Ne(()=>j=!1)),L.$set(Vn);const dn={};ln[0]&1&&(dn.refreshReportParams=et[0]),ln[0]&4&&(dn.hidden=et[2].isHidden("Lease Expense 2nd Year")),!V&&ln[0]&2&&(V=!0,dn.value=et[1].sd_auto_lease_lease_expense_second_year,Ne(()=>V=!1)),H.$set(dn);const wr={};ln[0]&1&&(wr.refreshReportParams=et[0]),ln[0]&4&&(wr.hidden=et[2].isHidden("Lease Tax Savings 2nd Year")),!X&&ln[0]&2&&(X=!0,wr.value=et[1].sd_auto_lease_lease_tax_savings_second_year,Ne(()=>X=!1)),Q.$set(wr);const Bn={};ln[0]&1&&(Bn.refreshReportParams=et[0]),ln[0]&4&&(Bn.hidden=et[2].isHidden("Lease Expense 3rd Year")),!ne&&ln[0]&2&&(ne=!0,Bn.value=et[1].sd_auto_lease_lease_expense_third_year,Ne(()=>ne=!1)),te.$set(Bn);const ra={};ln[0]&1&&(ra.refreshReportParams=et[0]),ln[0]&4&&(ra.hidden=et[2].isHidden("Lease Tax Savings 3rd Year")),!ue&&ln[0]&2&&(ue=!0,ra.value=et[1].sd_auto_lease_lease_tax_savings_third_year,Ne(()=>ue=!1)),be.$set(ra);const _n={};ln[0]&1&&(_n.refreshReportParams=et[0]),ln[0]&4&&(_n.hidden=et[2].isHidden("Lease Expense 4th Year")),!ie&&ln[0]&2&&(ie=!0,_n.value=et[1].sd_auto_lease_lease_expense_fourth_year,Ne(()=>ie=!1)),Ce.$set(_n);const Vr={};ln[0]&1&&(Vr.refreshReportParams=et[0]),ln[0]&4&&(Vr.hidden=et[2].isHidden("Lease Tax Savings 4th Year")),!he&&ln[0]&2&&(he=!0,Vr.value=et[1].sd_auto_lease_lease_tax_savings_fourth_year,Ne(()=>he=!1)),Y.$set(Vr);const rr={};ln[0]&1&&(rr.refreshReportParams=et[0]),ln[0]&4&&(rr.hidden=et[2].isHidden("Lease Expense 5th Year")),!Pe&&ln[0]&2&&(Pe=!0,rr.value=et[1].sd_auto_lease_lease_expense_fifth_year,Ne(()=>Pe=!1)),Me.$set(rr);const Or={};ln[0]&1&&(Or.refreshReportParams=et[0]),ln[0]&4&&(Or.hidden=et[2].isHidden("Lease Tax Savings 5th Year")),!qe&&ln[0]&2&&(qe=!0,Or.value=et[1].sd_auto_lease_lease_tax_savings_fifth_year,Ne(()=>qe=!1)),We.$set(Or);const Ui={};ln[0]&1&&(Ui.refreshReportParams=et[0]),ln[0]&4&&(Ui.hidden=et[2].isHidden("Purchase Depreciation 1st Year")),!G&&ln[0]&2&&(G=!0,Ui.value=et[1].sd_auto_lease_purchase_depreciation_first_year,Ne(()=>G=!1)),ee.$set(Ui);const Fr={};ln[0]&1&&(Fr.refreshReportParams=et[0]),ln[0]&4&&(Fr.hidden=et[2].isHidden("Purchase Tax Savings 1st Year")),!Te&&ln[0]&2&&(Te=!0,Fr.value=et[1].sd_auto_lease_purchase_tax_savings_first_year,Ne(()=>Te=!1)),me.$set(Fr);const wi={};ln[0]&1&&(wi.refreshReportParams=et[0]),ln[0]&4&&(wi.hidden=et[2].isHidden("Purchase Depreciation 2nd Year")),!we&&ln[0]&2&&(we=!0,wi.value=et[1].sd_auto_lease_purchase_depreciation_second_year,Ne(()=>we=!1)),De.$set(wi);const Ni={};ln[0]&1&&(Ni.refreshReportParams=et[0]),ln[0]&4&&(Ni.hidden=et[2].isHidden("Purchase Tax Savings 2nd Year")),!Ke&&ln[0]&2&&(Ke=!0,Ni.value=et[1].sd_auto_lease_purchase_tax_savings_second_year,Ne(()=>Ke=!1)),Ve.$set(Ni);const ar={};ln[0]&1&&(ar.refreshReportParams=et[0]),ln[0]&4&&(ar.hidden=et[2].isHidden("Purchase Depreciation 3rd Year")),!ht&&ln[0]&2&&(ht=!0,ar.value=et[1].sd_auto_lease_purchase_depreciation_third_year,Ne(()=>ht=!1)),yt.$set(ar);const sr={};ln[0]&1&&(sr.refreshReportParams=et[0]),ln[0]&4&&(sr.hidden=et[2].isHidden("Purchase Tax Savings 3rd Year")),!pt&&ln[0]&2&&(pt=!0,sr.value=et[1].sd_auto_lease_purchase_tax_savings_third_year,Ne(()=>pt=!1)),Je.$set(sr);const Gi={};ln[0]&1&&(Gi.refreshReportParams=et[0]),ln[0]&4&&(Gi.hidden=et[2].isHidden("Purchase Depreciation 4th Year")),!it&&ln[0]&2&&(it=!0,Gi.value=et[1].sd_auto_lease_purchase_depreciation_fourth_year,Ne(()=>it=!1)),Tt.$set(Gi);const Cr={};ln[0]&1&&(Cr.refreshReportParams=et[0]),ln[0]&4&&(Cr.hidden=et[2].isHidden("Purchase Tax Savings 4th Year")),!st&&ln[0]&2&&(st=!0,Cr.value=et[1].sd_auto_lease_purchase_tax_savings_fourth_year,Ne(()=>st=!1)),Ge.$set(Cr);const or={};ln[0]&1&&(or.refreshReportParams=et[0]),ln[0]&4&&(or.hidden=et[2].isHidden("Purchase Depreciation 5th Year")),!Ct&&ln[0]&2&&(Ct=!0,or.value=et[1].sd_auto_lease_purchase_depreciation_fifth_year,Ne(()=>Ct=!1)),It.$set(or);const lr={};ln[0]&1&&(lr.refreshReportParams=et[0]),ln[0]&4&&(lr.hidden=et[2].isHidden("Purchase Tax Savings 5th Year")),!Rt&&ln[0]&2&&(Rt=!0,lr.value=et[1].sd_auto_lease_purchase_tax_savings_fifth_year,Ne(()=>Rt=!1)),bt.$set(lr)},i(et){cn||(U(t.$$.fragment,et),U(i.$$.fragment,et),U(a.$$.fragment,et),U(o.$$.fragment,et),U(d.$$.fragment,et),U(v.$$.fragment,et),U(b.$$.fragment,et),U(E.$$.fragment,et),U(I.$$.fragment,et),U(O.$$.fragment,et),U(F.$$.fragment,et),U(L.$$.fragment,et),U(H.$$.fragment,et),U(Q.$$.fragment,et),U(te.$$.fragment,et),U(be.$$.fragment,et),U(Ce.$$.fragment,et),U(Y.$$.fragment,et),U(Me.$$.fragment,et),U(We.$$.fragment,et),U(ee.$$.fragment,et),U(me.$$.fragment,et),U(De.$$.fragment,et),U(Ve.$$.fragment,et),U(yt.$$.fragment,et),U(Je.$$.fragment,et),U(Tt.$$.fragment,et),U(Ge.$$.fragment,et),U(It.$$.fragment,et),U(bt.$$.fragment,et),cn=!0)},o(et){W(t.$$.fragment,et),W(i.$$.fragment,et),W(a.$$.fragment,et),W(o.$$.fragment,et),W(d.$$.fragment,et),W(v.$$.fragment,et),W(b.$$.fragment,et),W(E.$$.fragment,et),W(I.$$.fragment,et),W(O.$$.fragment,et),W(F.$$.fragment,et),W(L.$$.fragment,et),W(H.$$.fragment,et),W(Q.$$.fragment,et),W(te.$$.fragment,et),W(be.$$.fragment,et),W(Ce.$$.fragment,et),W(Y.$$.fragment,et),W(Me.$$.fragment,et),W(We.$$.fragment,et),W(ee.$$.fragment,et),W(me.$$.fragment,et),W(De.$$.fragment,et),W(Ve.$$.fragment,et),W(yt.$$.fragment,et),W(Je.$$.fragment,et),W(Tt.$$.fragment,et),W(Ge.$$.fragment,et),W(It.$$.fragment,et),W(bt.$$.fragment,et),cn=!1},d(et){se(t,et),se(i,et),se(a,et),se(o,et),se(d,et),se(v,et),se(b,et),se(E,et),se(I,et),se(O,et),se(F,et),se(L,et),se(H,et),se(Q,et),se(te,et),se(be,et),se(Ce,et),se(Y,et),se(Me,et),se(We,et),se(ee,et),se(me,et),se(De,et),se(Ve,et),se(yt,et),se(Je,et),se(Tt,et),se(Ge,et),se(It,et),se(bt,et)}}}function Zfe(e){let t,n,i;function r(s){e[226](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_traditional_and_roth_ira_enable",classNames:"report-suboption",hidden:e[2].isHidden("Traditional and Roth IRA"),scrollToId:"pdfTraditionalRothIra",$$slots:{default:[nce]},$$scope:{ctx:e}};return e[1].sd_traditional_and_roth_ira_enable!==void 0&&(a.checked=e[1].sd_traditional_and_roth_ira_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Traditional and Roth IRA")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_traditional_and_roth_ira_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function ece(e){let t,n,i,r,a;function s(c){e[212](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_traditional_ira_contributions",hidden:e[2].isHidden("Traditional IRA Contributions")};e[1].top_3_strategy_picks_traditional_ira_contributions!==void 0&&(o.value=e[1].top_3_strategy_picks_traditional_ira_contributions),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[213](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_traditional_ira_saves_you",hidden:e[2].isHidden("Traditional IRA Savings")};return e[1].top_3_strategy_picks_traditional_ira_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_traditional_ira_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Traditional IRA Contributions")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_traditional_ira_contributions,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Traditional IRA Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_traditional_ira_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function bE(e){let t,n,i,r,a;function s(c){e[222](c,e[298],e[304])}let o={refreshReportParams:e[0],specTreeNodeId:`sd_${e[298]}_tax_saving_${e[304]}_wages`,hidden:e[2].isHidden(`${e[305]} Wages`)};e[1][`sd_${e[298]}_tax_saving_${e[304]}_wages`]!==void 0&&(o.value=e[1][`sd_${e[298]}_tax_saving_${e[304]}_wages`]),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[223](c,e[298],e[304])}let d={refreshReportParams:e[0],specTreeNodeId:`sd_${e[298]}_tax_saving_${e[304]}_contributions`,hidden:e[2].isHidden(`${e[305]} Current Contributions`)};return e[1][`sd_${e[298]}_tax_saving_${e[304]}_contributions`]!==void 0&&(d.value=e[1][`sd_${e[298]}_tax_saving_${e[304]}_contributions`]),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){e=c;const T={};v[0]&1&&(T.refreshReportParams=e[0]),v[0]&4&&(T.hidden=e[2].isHidden(`${e[305]} Wages`)),!n&&v[0]&2&&(n=!0,T.value=e[1][`sd_${e[298]}_tax_saving_${e[304]}_wages`],Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=e[0]),v[0]&4&&(b.hidden=e[2].isHidden(`${e[305]} Current Contributions`)),!r&&v[0]&2&&(r=!0,b.value=e[1][`sd_${e[298]}_tax_saving_${e[304]}_contributions`],Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function yE(e){let t,n,i,r,a;function s(c){e[224](c,e[298],e[272])}let o={refreshReportParams:e[0],specTreeNodeId:`sd_${e[298]}_tax_saving_options_${e[272]}_contribute`,hidden:e[2].isHidden(`${e[273]} Contribute`)};e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_contribute`]!==void 0&&(o.value=e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_contribute`]),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[225](c,e[298],e[272])}let d={refreshReportParams:e[0],specTreeNodeId:`sd_${e[298]}_tax_saving_options_${e[272]}_saves_you`,hidden:e[2].isHidden(`${e[273]} And Save`)};return e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_saves_you`]!==void 0&&(d.value=e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_saves_you`]),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){e=c;const T={};v[0]&1&&(T.refreshReportParams=e[0]),v[0]&4&&(T.hidden=e[2].isHidden(`${e[273]} Contribute`)),!n&&v[0]&2&&(n=!0,T.value=e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_contribute`],Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=e[0]),v[0]&4&&(b.hidden=e[2].isHidden(`${e[273]} And Save`)),!r&&v[0]&2&&(r=!0,b.value=e[1][`sd_${e[298]}_tax_saving_options_${e[272]}_saves_you`],Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function tce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O;function M(G){e[214](G,e[298])}let F={specTreeNodeId:`sd_${e[298]}_what_it_is_text`,hidden:e[2].isHidden("Description")};e[1][`sd_${e[298]}_what_it_is_text`]!==void 0&&(F.value=e[1][`sd_${e[298]}_what_it_is_text`]),t=new li({props:F}),Oe.push(()=>$e(t,"value",M));function $(G){e[215](G,e[298])}let L={specTreeNodeId:`sd_${e[298]}_planner_description`,hidden:e[2].isHidden("Planner Description")};e[1][`sd_${e[298]}_planner_description`]!==void 0&&(L.value=e[1][`sd_${e[298]}_planner_description`]),i=new li({props:L}),Oe.push(()=>$e(i,"value",$));function j(G){e[216](G,e[298])}let H={specTreeNodeId:`sd_${e[298]}_taxes_contributions_grow`,hidden:e[2].isHidden("Contributions Grow")};e[1][`sd_${e[298]}_taxes_contributions_grow`]!==void 0&&(H.value=e[1][`sd_${e[298]}_taxes_contributions_grow`]),a=new li({props:H}),Oe.push(()=>$e(a,"value",j));function V(G){e[217](G,e[298])}let Q={specTreeNodeId:`sd_${e[298]}_taxes_tax_deductibility`,hidden:e[2].isHidden("Tax-Deductibility")};e[1][`sd_${e[298]}_taxes_tax_deductibility`]!==void 0&&(Q.value=e[1][`sd_${e[298]}_taxes_tax_deductibility`]),o=new li({props:Q}),Oe.push(()=>$e(o,"value",V));function X(G){e[218](G,e[298])}let te={specTreeNodeId:`sd_${e[298]}_contributions_come_from`,hidden:e[2].isHidden("Contributions Come From")};e[1][`sd_${e[298]}_contributions_come_from`]!==void 0&&(te.value=e[1][`sd_${e[298]}_contributions_come_from`]),d=new li({props:te}),Oe.push(()=>$e(d,"value",X));function ne(G){e[219](G,e[298])}let be={specTreeNodeId:`sd_${e[298]}_contributions_max_contribution`,hidden:e[2].isHidden("Max Contribution")};e[1][`sd_${e[298]}_contributions_max_contribution`]!==void 0&&(be.value=e[1][`sd_${e[298]}_contributions_max_contribution`]),v=new li({props:be}),Oe.push(()=>$e(v,"value",ne));function ue(G){e[220](G,e[298])}let Ce={specTreeNodeId:`sd_${e[298]}_withdrawals_penalties`,hidden:e[2].isHidden("Penalties")};e[1][`sd_${e[298]}_withdrawals_penalties`]!==void 0&&(Ce.value=e[1][`sd_${e[298]}_withdrawals_penalties`]),b=new li({props:Ce}),Oe.push(()=>$e(b,"value",ue));function ie(G){e[221](G,e[298])}let Y={specTreeNodeId:`sd_${e[298]}_withdrawals_mandatory_distributions`,hidden:e[2].isHidden("Mandatory Distributions")};e[1][`sd_${e[298]}_withdrawals_mandatory_distributions`]!==void 0&&(Y.value=e[1][`sd_${e[298]}_withdrawals_mandatory_distributions`]),E=new li({props:Y}),Oe.push(()=>$e(E,"value",ie));let he=[["taxpayer","Taxpayer"],["spouse","Spouse"]],Me=[];for(let G=0;G<2;G+=1)Me[G]=bE(cE(e,he,G));const Pe=G=>W(Me[G],1,1,()=>{Me[G]=null});let We=[["first","Option A"],["second","Option B"],["third","Option C"]],qe=[];for(let G=0;G<3;G+=1)qe[G]=yE(fE(e,We,G));const ee=G=>W(qe[G],1,1,()=>{qe[G]=null});return{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment);for(let G=0;G<2;G+=1)Me[G].c();I=On();for(let G=0;G<3;G+=1)qe[G].c();D=On()},m(G,me){ae(t,G,me),ae(i,G,me),ae(a,G,me),ae(o,G,me),ae(d,G,me),ae(v,G,me),ae(b,G,me),ae(E,G,me);for(let Te=0;Te<2;Te+=1)Me[Te]&&Me[Te].m(G,me);ce(G,I,me);for(let Te=0;Te<3;Te+=1)qe[Te]&&qe[Te].m(G,me);ce(G,D,me),O=!0},p(G,me){e=G;const Te={};me[0]&4&&(Te.hidden=e[2].isHidden("Description")),!n&&me[0]&2&&(n=!0,Te.value=e[1][`sd_${e[298]}_what_it_is_text`],Ne(()=>n=!1)),t.$set(Te);const De={};me[0]&4&&(De.hidden=e[2].isHidden("Planner Description")),!r&&me[0]&2&&(r=!0,De.value=e[1][`sd_${e[298]}_planner_description`],Ne(()=>r=!1)),i.$set(De);const we={};me[0]&4&&(we.hidden=e[2].isHidden("Contributions Grow")),!s&&me[0]&2&&(s=!0,we.value=e[1][`sd_${e[298]}_taxes_contributions_grow`],Ne(()=>s=!1)),a.$set(we);const Ve={};me[0]&4&&(Ve.hidden=e[2].isHidden("Tax-Deductibility")),!l&&me[0]&2&&(l=!0,Ve.value=e[1][`sd_${e[298]}_taxes_tax_deductibility`],Ne(()=>l=!1)),o.$set(Ve);const Ke={};me[0]&4&&(Ke.hidden=e[2].isHidden("Contributions Come From")),!c&&me[0]&2&&(c=!0,Ke.value=e[1][`sd_${e[298]}_contributions_come_from`],Ne(()=>c=!1)),d.$set(Ke);const yt={};me[0]&4&&(yt.hidden=e[2].isHidden("Max Contribution")),!T&&me[0]&2&&(T=!0,yt.value=e[1][`sd_${e[298]}_contributions_max_contribution`],Ne(()=>T=!1)),v.$set(yt);const ht={};me[0]&4&&(ht.hidden=e[2].isHidden("Penalties")),!A&&me[0]&2&&(A=!0,ht.value=e[1][`sd_${e[298]}_withdrawals_penalties`],Ne(()=>A=!1)),b.$set(ht);const Je={};if(me[0]&4&&(Je.hidden=e[2].isHidden("Mandatory Distributions")),!y&&me[0]&2&&(y=!0,Je.value=e[1][`sd_${e[298]}_withdrawals_mandatory_distributions`],Ne(()=>y=!1)),E.$set(Je),me[0]&7){he=[["taxpayer","Taxpayer"],["spouse","Spouse"]];let pt;for(pt=0;pt<2;pt+=1){const Tt=cE(e,he,pt);Me[pt]?(Me[pt].p(Tt,me),U(Me[pt],1)):(Me[pt]=bE(Tt),Me[pt].c(),U(Me[pt],1),Me[pt].m(I.parentNode,I))}for(pn(),pt=2;pt<2;pt+=1)Pe(pt);hn()}if(me[0]&7){We=[["first","Option A"],["second","Option B"],["third","Option C"]];let pt;for(pt=0;pt<3;pt+=1){const Tt=fE(e,We,pt);qe[pt]?(qe[pt].p(Tt,me),U(qe[pt],1)):(qe[pt]=yE(Tt),qe[pt].c(),U(qe[pt],1),qe[pt].m(D.parentNode,D))}for(pn(),pt=3;pt<3;pt+=1)ee(pt);hn()}},i(G){if(!O){U(t.$$.fragment,G),U(i.$$.fragment,G),U(a.$$.fragment,G),U(o.$$.fragment,G),U(d.$$.fragment,G),U(v.$$.fragment,G),U(b.$$.fragment,G),U(E.$$.fragment,G);for(let me=0;me<2;me+=1)U(Me[me]);for(let me=0;me<3;me+=1)U(qe[me]);O=!0}},o(G){W(t.$$.fragment,G),W(i.$$.fragment,G),W(a.$$.fragment,G),W(o.$$.fragment,G),W(d.$$.fragment,G),W(v.$$.fragment,G),W(b.$$.fragment,G),W(E.$$.fragment,G),Me=Me.filter(Boolean);for(let me=0;me<2;me+=1)W(Me[me]);qe=qe.filter(Boolean);for(let me=0;me<3;me+=1)W(qe[me]);O=!1},d(G){se(t,G),se(i,G),se(a,G),se(o,G),se(d,G),se(v,G),se(b,G),se(E,G),Nn(Me,G),G&&_e(I),Nn(qe,G),G&&_e(D)}}}function wE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_${e[298]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[299]),$$slots:{default:[tce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[299])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function nce(e){let t,n,i;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_traditional_ira_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[ece]},$$scope:{ctx:e}}});let r=[["traditional_ira","Traditional IRA"],["roth_ira","Roth IRA"]],a=[];for(let o=0;o<2;o+=1)a[o]=wE(dE(e,r,o));const s=o=>W(a[o],1,1,()=>{a[o]=null});return{c(){re(t.$$.fragment);for(let o=0;o<2;o+=1)a[o].c();n=On()},m(o,l){ae(t,o,l);for(let d=0;d<2;d+=1)a[d]&&a[d].m(o,l);ce(o,n,l),i=!0},p(o,l){const d={};if(l[0]&1&&(d.refreshReportParams=o[0]),l[0]&4&&(d.hidden=o[2].isHidden("Top 3 Widget Options")),l[0]&7|l[10]&32&&(d.$$scope={dirty:l,ctx:o}),t.$set(d),l[0]&7){r=[["traditional_ira","Traditional IRA"],["roth_ira","Roth IRA"]];let c;for(c=0;c<2;c+=1){const v=dE(o,r,c);a[c]?(a[c].p(v,l),U(a[c],1)):(a[c]=wE(v),a[c].c(),U(a[c],1),a[c].m(n.parentNode,n))}for(pn(),c=2;c<2;c+=1)s(c);hn()}},i(o){if(!i){U(t.$$.fragment,o);for(let l=0;l<2;l+=1)U(a[l]);i=!0}},o(o){W(t.$$.fragment,o),a=a.filter(Boolean);for(let l=0;l<2;l+=1)W(a[l]);i=!1},d(o){se(t,o),Nn(a,o),o&&_e(n)}}}function ice(e){let t,n,i;function r(s){e[235](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_health_savings_enable",classNames:"report-suboption",hidden:e[2].isHidden("Health Savings"),scrollToId:"pdfHealthSavings",$$slots:{default:[uce]},$$scope:{ctx:e}};return e[1].sd_health_savings_enable!==void 0&&(a.checked=e[1].sd_health_savings_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Health Savings")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_health_savings_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function rce(e){let t,n,i,r,a,s,o;function l(A){e[227](A)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_health_savings_type",options:nB,hidden:e[2].isHidden("Health Savings Type")};e[1].top_3_strategy_picks_health_savings_type!==void 0&&(d.value=e[1].top_3_strategy_picks_health_savings_type),t=new Ml({props:d}),Oe.push(()=>$e(t,"value",l));function c(A){e[228](A)}let v={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_health_savings_adding",hidden:e[2].isHidden("Health Savings Contribution")};e[1].top_3_strategy_picks_health_savings_adding!==void 0&&(v.value=e[1].top_3_strategy_picks_health_savings_adding),i=new xt({props:v}),Oe.push(()=>$e(i,"value",c));function T(A){e[229](A)}let b={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_health_savings_saves_you",hidden:e[2].isHidden("Health Savings Saves You")};return e[1].top_3_strategy_picks_health_savings_saves_you!==void 0&&(b.value=e[1].top_3_strategy_picks_health_savings_saves_you),a=new xt({props:b}),Oe.push(()=>$e(a,"value",T)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment)},m(A,E){ae(t,A,E),ae(i,A,E),ae(a,A,E),o=!0},p(A,E){const y={};E[0]&1&&(y.refreshReportParams=A[0]),E[0]&4&&(y.hidden=A[2].isHidden("Health Savings Type")),!n&&E[0]&2&&(n=!0,y.value=A[1].top_3_strategy_picks_health_savings_type,Ne(()=>n=!1)),t.$set(y);const I={};E[0]&1&&(I.refreshReportParams=A[0]),E[0]&4&&(I.hidden=A[2].isHidden("Health Savings Contribution")),!r&&E[0]&2&&(r=!0,I.value=A[1].top_3_strategy_picks_health_savings_adding,Ne(()=>r=!1)),i.$set(I);const D={};E[0]&1&&(D.refreshReportParams=A[0]),E[0]&4&&(D.hidden=A[2].isHidden("Health Savings Saves You")),!s&&E[0]&2&&(s=!0,D.value=A[1].top_3_strategy_picks_health_savings_saves_you,Ne(()=>s=!1)),a.$set(D)},i(A){o||(U(t.$$.fragment,A),U(i.$$.fragment,A),U(a.$$.fragment,A),o=!0)},o(A){W(t.$$.fragment,A),W(i.$$.fragment,A),W(a.$$.fragment,A),o=!1},d(A){se(t,A),se(i,A),se(a,A)}}}function TE(e){let t,n,i;function r(s){e[233](s,e[288],e[276],e[294])}let a={refreshReportParams:e[0],specTreeNodeId:`sd_health_savings_contribution_limits_${e[288]}_${e[276]}_${e[294]}`,hidden:e[2].isHidden(e[295])};return e[1][`sd_health_savings_contribution_limits_${e[288]}_${e[276]}_${e[294]}`]!==void 0&&(a.value=e[1][`sd_health_savings_contribution_limits_${e[288]}_${e[276]}_${e[294]}`]),t=new Ov({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o[0]&1&&(l.refreshReportParams=e[0]),o[0]&4&&(l.hidden=e[2].isHidden(e[295])),!n&&o[0]&2&&(n=!0,l.value=e[1][`sd_health_savings_contribution_limits_${e[288]}_${e[276]}_${e[294]}`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function ace(e){let t,n,i=[["general","General"],["self","Self Only"],["family","Family"]],r=[];for(let s=0;s<3;s+=1)r[s]=TE(uE(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<3;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<3;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,o){if(o[0]&7){i=[["general","General"],["self","Self Only"],["family","Family"]];let l;for(l=0;l<3;l+=1){const d=uE(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=TE(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=3;l<3;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<3;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<3;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function kE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_health_savings_contribution_limits_${e[288]}_tree_${e[276]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[277]),$$slots:{default:[ace]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[277])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function sce(e){let t,n,i,r;function a(c){e[232](c,e[288])}let s={specTreeNodeId:`sd_health_savings_contribution_limits_${e[288]}_tax_year`,hidden:e[2].isHidden(e[289])};e[1][`sd_health_savings_contribution_limits_${e[288]}_tax_year`]!==void 0&&(s.value=e[1][`sd_health_savings_contribution_limits_${e[288]}_tax_year`]),t=new li({props:s}),Oe.push(()=>$e(t,"value",a));let o=[["hsa","Health Savings Account (HSA)"],["hra","Health Reimbursement Agreement (HRA)"],["fsa","Flexible Spending Account (FSA)"]],l=[];for(let c=0;c<3;c+=1)l[c]=kE(lE(e,o,c));const d=c=>W(l[c],1,1,()=>{l[c]=null});return{c(){re(t.$$.fragment);for(let c=0;c<3;c+=1)l[c].c();i=On()},m(c,v){ae(t,c,v);for(let T=0;T<3;T+=1)l[T]&&l[T].m(c,v);ce(c,i,v),r=!0},p(c,v){e=c;const T={};if(v[0]&4&&(T.hidden=e[2].isHidden(e[289])),!n&&v[0]&2&&(n=!0,T.value=e[1][`sd_health_savings_contribution_limits_${e[288]}_tax_year`],Ne(()=>n=!1)),t.$set(T),v[0]&7){o=[["hsa","Health Savings Account (HSA)"],["hra","Health Reimbursement Agreement (HRA)"],["fsa","Flexible Spending Account (FSA)"]];let b;for(b=0;b<3;b+=1){const A=lE(e,o,b);l[b]?(l[b].p(A,v),U(l[b],1)):(l[b]=kE(A),l[b].c(),U(l[b],1),l[b].m(i.parentNode,i))}for(pn(),b=3;b<3;b+=1)d(b);hn()}},i(c){if(!r){U(t.$$.fragment,c);for(let v=0;v<3;v+=1)U(l[v]);r=!0}},o(c){W(t.$$.fragment,c),l=l.filter(Boolean);for(let v=0;v<3;v+=1)W(l[v]);r=!1},d(c){se(t,c),Nn(l,c),c&&_e(i)}}}function SE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_health_savings_contribution_limits_${e[288]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(`${e[289]} Contribution Limits`),$$slots:{default:[sce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(`${i[289]} Contribution Limits`)),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function CE(e){let t,n,i;function r(s){e[234](s,e[284],e[276])}let a={refreshReportParams:e[0],specTreeNodeId:`sd_health_savings_tax_saving_options_${e[284]}_${e[276]}`,hidden:e[2].isHidden(e[285])};return e[1][`sd_health_savings_tax_saving_options_${e[284]}_${e[276]}`]!==void 0&&(a.value=e[1][`sd_health_savings_tax_saving_options_${e[284]}_${e[276]}`]),t=new Ov({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o[0]&1&&(l.refreshReportParams=e[0]),o[0]&4&&(l.hidden=e[2].isHidden(e[285])),!n&&o[0]&2&&(n=!0,l.value=e[1][`sd_health_savings_tax_saving_options_${e[284]}_${e[276]}`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function oce(e){let t,n,i=[["first","Option A"],["second","Option B"],["third","Option C"]],r=[];for(let s=0;s<3;s+=1)r[s]=CE(sE(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<3;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<3;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,o){if(o[0]&7){i=[["first","Option A"],["second","Option B"],["third","Option C"]];let l;for(l=0;l<3;l+=1){const d=sE(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=CE(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=3;l<3;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<3;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<3;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function PE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_health_savings_tax_saving_options_${e[276]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[277]),$$slots:{default:[oce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[277])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function lce(e){let t,n,i=[["contribute","Contribute"],["hsa_saves_you","Health Savings Account (HSA)"],["hra_saves_you","Health Reimbursement Agreement (HRA)"],["fsa_saves_you","Flexible Spending Account (FSA)"]],r=[];for(let s=0;s<4;s+=1)r[s]=PE(aE(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<4;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<4;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,o){if(o[0]&7){i=[["contribute","Contribute"],["hsa_saves_you","Health Savings Account (HSA)"],["hra_saves_you","Health Reimbursement Agreement (HRA)"],["fsa_saves_you","Flexible Spending Account (FSA)"]];let l;for(l=0;l<4;l+=1){const d=aE(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=PE(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=4;l<4;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<4;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<4;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function uce(e){let t,n,i,r,a,s,o,l;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_health_savings_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[rce]},$$scope:{ctx:e}}});function d(y){e[230](y)}let c={specTreeNodeId:"sd_health_savings_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_health_savings_what_it_is_text!==void 0&&(c.value=e[1].sd_health_savings_what_it_is_text),n=new ta({props:c}),Oe.push(()=>$e(n,"value",d));function v(y){e[231](y)}let T={specTreeNodeId:"sd_health_savings_description",hidden:e[2].isHidden("Notes")};e[1].sd_health_savings_description!==void 0&&(T.value=e[1].sd_health_savings_description),r=new ta({props:T}),Oe.push(()=>$e(r,"value",v));let b=[["previous","Previous Tax Year"],["current","Current Tax Year"]],A=[];for(let y=0;y<2;y+=1)A[y]=SE(oE(e,b,y));const E=y=>W(A[y],1,1,()=>{A[y]=null});return o=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_health_savings_tax_saving_options_tree",classNames:"report-suboption",hidden:e[2].isHidden("Tax Savings"),$$slots:{default:[lce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment);for(let y=0;y<2;y+=1)A[y].c();s=On(),re(o.$$.fragment)},m(y,I){ae(t,y,I),ae(n,y,I),ae(r,y,I);for(let D=0;D<2;D+=1)A[D]&&A[D].m(y,I);ce(y,s,I),ae(o,y,I),l=!0},p(y,I){const D={};I[0]&1&&(D.refreshReportParams=y[0]),I[0]&4&&(D.hidden=y[2].isHidden("Top 3 Widget Options")),I[0]&7|I[10]&32&&(D.$$scope={dirty:I,ctx:y}),t.$set(D);const O={};I[0]&4&&(O.hidden=y[2].isHidden("Description")),!i&&I[0]&2&&(i=!0,O.value=y[1].sd_health_savings_what_it_is_text,Ne(()=>i=!1)),n.$set(O);const M={};if(I[0]&4&&(M.hidden=y[2].isHidden("Notes")),!a&&I[0]&2&&(a=!0,M.value=y[1].sd_health_savings_description,Ne(()=>a=!1)),r.$set(M),I[0]&7){b=[["previous","Previous Tax Year"],["current","Current Tax Year"]];let $;for($=0;$<2;$+=1){const L=oE(y,b,$);A[$]?(A[$].p(L,I),U(A[$],1)):(A[$]=SE(L),A[$].c(),U(A[$],1),A[$].m(s.parentNode,s))}for(pn(),$=2;$<2;$+=1)E($);hn()}const F={};I[0]&1&&(F.refreshReportParams=y[0]),I[0]&4&&(F.hidden=y[2].isHidden("Tax Savings")),I[0]&7|I[10]&32&&(F.$$scope={dirty:I,ctx:y}),o.$set(F)},i(y){if(!l){U(t.$$.fragment,y),U(n.$$.fragment,y),U(r.$$.fragment,y);for(let I=0;I<2;I+=1)U(A[I]);U(o.$$.fragment,y),l=!0}},o(y){W(t.$$.fragment,y),W(n.$$.fragment,y),W(r.$$.fragment,y),A=A.filter(Boolean);for(let I=0;I<2;I+=1)W(A[I]);W(o.$$.fragment,y),l=!1},d(y){se(t,y),se(n,y),se(r,y),Nn(A,y),y&&_e(s),se(o,y)}}}function dce(e){let t,n,i;function r(s){e[252](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_enable",classNames:"report-suboption",hidden:e[2].isHidden("Defined Benefit"),scrollToId:"pdfDefinedBenefit",$$slots:{default:[cce]},$$scope:{ctx:e}};return e[1].sd_defined_benefit_enable!==void 0&&(a.checked=e[1].sd_defined_benefit_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Defined Benefit")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_defined_benefit_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function fce(e){let t,n,i,r,a;function s(c){e[236](c)}let o={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_defined_benefit_adding",hidden:e[2].isHidden("Adding")};e[1].top_3_strategy_picks_defined_benefit_adding!==void 0&&(o.value=e[1].top_3_strategy_picks_defined_benefit_adding),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[237](c)}let d={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_defined_benefit_saves_you",hidden:e[2].isHidden("Savings")};return e[1].top_3_strategy_picks_defined_benefit_saves_you!==void 0&&(d.value=e[1].top_3_strategy_picks_defined_benefit_saves_you),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v[0]&1&&(T.refreshReportParams=c[0]),v[0]&4&&(T.hidden=c[2].isHidden("Adding")),!n&&v[0]&2&&(n=!0,T.value=c[1].top_3_strategy_picks_defined_benefit_adding,Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=c[0]),v[0]&4&&(b.hidden=c[2].isHidden("Savings")),!r&&v[0]&2&&(r=!0,b.value=c[1].top_3_strategy_picks_defined_benefit_saves_you,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function cce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_top_3_widget_options",classNames:"report-suboption",hidden:e[2].isHidden("Top 3 Widget Options"),$$slots:{default:[fce]},$$scope:{ctx:e}}});function be(bt){e[238](bt)}let ue={specTreeNodeId:"sd_defined_benefit_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_defined_benefit_what_it_is_text!==void 0&&(ue.value=e[1].sd_defined_benefit_what_it_is_text),n=new ta({props:ue}),Oe.push(()=>$e(n,"value",be));function Ce(bt){e[239](bt)}let ie={specTreeNodeId:"sd_defined_benefit_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_defined_benefit_what_it_is_first_item!==void 0&&(ie.value=e[1].sd_defined_benefit_what_it_is_first_item),r=new li({props:ie}),Oe.push(()=>$e(r,"value",Ce));function Y(bt){e[240](bt)}let he={specTreeNodeId:"sd_defined_benefit_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_defined_benefit_what_it_is_second_item!==void 0&&(he.value=e[1].sd_defined_benefit_what_it_is_second_item),s=new li({props:he}),Oe.push(()=>$e(s,"value",Y));function Me(bt){e[241](bt)}let Pe={specTreeNodeId:"sd_defined_benefit_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_defined_benefit_what_it_is_third_item!==void 0&&(Pe.value=e[1].sd_defined_benefit_what_it_is_third_item),l=new li({props:Pe}),Oe.push(()=>$e(l,"value",Me));function We(bt){e[242](bt)}let qe={specTreeNodeId:"sd_defined_benefit_what_it_is_fourth_item",hidden:e[2].isHidden("Fourth Item")};e[1].sd_defined_benefit_what_it_is_fourth_item!==void 0&&(qe.value=e[1].sd_defined_benefit_what_it_is_fourth_item),c=new li({props:qe}),Oe.push(()=>$e(c,"value",We));function ee(bt){e[243](bt)}let G={specTreeNodeId:"sd_defined_benefit_ratings_text",hidden:e[2].isHidden("Description of Ratings")};e[1].sd_defined_benefit_ratings_text!==void 0&&(G.value=e[1].sd_defined_benefit_ratings_text),T=new ta({props:G}),Oe.push(()=>$e(T,"value",ee));function me(bt){e[244](bt)}let Te={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_current_taxable_income",hidden:e[2].isHidden("Current Taxable Income")};e[1].sd_defined_benefit_current_taxable_income!==void 0&&(Te.value=e[1].sd_defined_benefit_current_taxable_income),A=new xt({props:Te}),Oe.push(()=>$e(A,"value",me));function De(bt){e[245](bt)}let we={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_current_pension_contributions",hidden:e[2].isHidden("Current Pension Contributions")};e[1].sd_defined_benefit_current_pension_contributions!==void 0&&(we.value=e[1].sd_defined_benefit_current_pension_contributions),y=new xt({props:we}),Oe.push(()=>$e(y,"value",De));function Ve(bt){e[246](bt)}let Ke={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_first_expense",hidden:e[2].isHidden("Option A Expense")};e[1].sd_defined_benefit_tax_saving_options_first_expense!==void 0&&(Ke.value=e[1].sd_defined_benefit_tax_saving_options_first_expense),D=new xt({props:Ke}),Oe.push(()=>$e(D,"value",Ve));function yt(bt){e[247](bt)}let ht={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_first_saves_you",hidden:e[2].isHidden("Option A Saves You")};e[1].sd_defined_benefit_tax_saving_options_first_saves_you!==void 0&&(ht.value=e[1].sd_defined_benefit_tax_saving_options_first_saves_you),M=new xt({props:ht}),Oe.push(()=>$e(M,"value",yt));function Je(bt){e[248](bt)}let pt={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_second_expense",hidden:e[2].isHidden("Option B Expense")};e[1].sd_defined_benefit_tax_saving_options_second_expense!==void 0&&(pt.value=e[1].sd_defined_benefit_tax_saving_options_second_expense),$=new xt({props:pt}),Oe.push(()=>$e($,"value",Je));function Tt(bt){e[249](bt)}let it={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_second_saves_you",hidden:e[2].isHidden("Option B Saves You")};e[1].sd_defined_benefit_tax_saving_options_second_saves_you!==void 0&&(it.value=e[1].sd_defined_benefit_tax_saving_options_second_saves_you),j=new xt({props:it}),Oe.push(()=>$e(j,"value",Tt));function Ge(bt){e[250](bt)}let st={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_third_expense",hidden:e[2].isHidden("Option C Expense")};e[1].sd_defined_benefit_tax_saving_options_third_expense!==void 0&&(st.value=e[1].sd_defined_benefit_tax_saving_options_third_expense),V=new xt({props:st}),Oe.push(()=>$e(V,"value",Ge));function It(bt){e[251](bt)}let Ct={refreshReportParams:e[0],specTreeNodeId:"sd_defined_benefit_tax_saving_options_third_saves_you",hidden:e[2].isHidden("Option C Saves You")};return e[1].sd_defined_benefit_tax_saving_options_third_saves_you!==void 0&&(Ct.value=e[1].sd_defined_benefit_tax_saving_options_third_saves_you),X=new xt({props:Ct}),Oe.push(()=>$e(X,"value",It)),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment),re(c.$$.fragment),re(T.$$.fragment),re(A.$$.fragment),re(y.$$.fragment),re(D.$$.fragment),re(M.$$.fragment),re($.$$.fragment),re(j.$$.fragment),re(V.$$.fragment),re(X.$$.fragment)},m(bt,Rt){ae(t,bt,Rt),ae(n,bt,Rt),ae(r,bt,Rt),ae(s,bt,Rt),ae(l,bt,Rt),ae(c,bt,Rt),ae(T,bt,Rt),ae(A,bt,Rt),ae(y,bt,Rt),ae(D,bt,Rt),ae(M,bt,Rt),ae($,bt,Rt),ae(j,bt,Rt),ae(V,bt,Rt),ae(X,bt,Rt),ne=!0},p(bt,Rt){const cn={};Rt[0]&1&&(cn.refreshReportParams=bt[0]),Rt[0]&4&&(cn.hidden=bt[2].isHidden("Top 3 Widget Options")),Rt[0]&7|Rt[10]&32&&(cn.$$scope={dirty:Rt,ctx:bt}),t.$set(cn);const nn={};Rt[0]&4&&(nn.hidden=bt[2].isHidden("Description")),!i&&Rt[0]&2&&(i=!0,nn.value=bt[1].sd_defined_benefit_what_it_is_text,Ne(()=>i=!1)),n.$set(nn);const Qe={};Rt[0]&4&&(Qe.hidden=bt[2].isHidden("First Item")),!a&&Rt[0]&2&&(a=!0,Qe.value=bt[1].sd_defined_benefit_what_it_is_first_item,Ne(()=>a=!1)),r.$set(Qe);const Ft={};Rt[0]&4&&(Ft.hidden=bt[2].isHidden("Second Item")),!o&&Rt[0]&2&&(o=!0,Ft.value=bt[1].sd_defined_benefit_what_it_is_second_item,Ne(()=>o=!1)),s.$set(Ft);const Fn={};Rt[0]&4&&(Fn.hidden=bt[2].isHidden("Third Item")),!d&&Rt[0]&2&&(d=!0,Fn.value=bt[1].sd_defined_benefit_what_it_is_third_item,Ne(()=>d=!1)),l.$set(Fn);const He={};Rt[0]&4&&(He.hidden=bt[2].isHidden("Fourth Item")),!v&&Rt[0]&2&&(v=!0,He.value=bt[1].sd_defined_benefit_what_it_is_fourth_item,Ne(()=>v=!1)),c.$set(He);const Dt={};Rt[0]&4&&(Dt.hidden=bt[2].isHidden("Description of Ratings")),!b&&Rt[0]&2&&(b=!0,Dt.value=bt[1].sd_defined_benefit_ratings_text,Ne(()=>b=!1)),T.$set(Dt);const Xt={};Rt[0]&1&&(Xt.refreshReportParams=bt[0]),Rt[0]&4&&(Xt.hidden=bt[2].isHidden("Current Taxable Income")),!E&&Rt[0]&2&&(E=!0,Xt.value=bt[1].sd_defined_benefit_current_taxable_income,Ne(()=>E=!1)),A.$set(Xt);const Mt={};Rt[0]&1&&(Mt.refreshReportParams=bt[0]),Rt[0]&4&&(Mt.hidden=bt[2].isHidden("Current Pension Contributions")),!I&&Rt[0]&2&&(I=!0,Mt.value=bt[1].sd_defined_benefit_current_pension_contributions,Ne(()=>I=!1)),y.$set(Mt);const Xe={};Rt[0]&1&&(Xe.refreshReportParams=bt[0]),Rt[0]&4&&(Xe.hidden=bt[2].isHidden("Option A Expense")),!O&&Rt[0]&2&&(O=!0,Xe.value=bt[1].sd_defined_benefit_tax_saving_options_first_expense,Ne(()=>O=!1)),D.$set(Xe);const Nt={};Rt[0]&1&&(Nt.refreshReportParams=bt[0]),Rt[0]&4&&(Nt.hidden=bt[2].isHidden("Option A Saves You")),!F&&Rt[0]&2&&(F=!0,Nt.value=bt[1].sd_defined_benefit_tax_saving_options_first_saves_you,Ne(()=>F=!1)),M.$set(Nt);const on={};Rt[0]&1&&(on.refreshReportParams=bt[0]),Rt[0]&4&&(on.hidden=bt[2].isHidden("Option B Expense")),!L&&Rt[0]&2&&(L=!0,on.value=bt[1].sd_defined_benefit_tax_saving_options_second_expense,Ne(()=>L=!1)),$.$set(on);const In={};Rt[0]&1&&(In.refreshReportParams=bt[0]),Rt[0]&4&&(In.hidden=bt[2].isHidden("Option B Saves You")),!H&&Rt[0]&2&&(H=!0,In.value=bt[1].sd_defined_benefit_tax_saving_options_second_saves_you,Ne(()=>H=!1)),j.$set(In);const dt={};Rt[0]&1&&(dt.refreshReportParams=bt[0]),Rt[0]&4&&(dt.hidden=bt[2].isHidden("Option C Expense")),!Q&&Rt[0]&2&&(Q=!0,dt.value=bt[1].sd_defined_benefit_tax_saving_options_third_expense,Ne(()=>Q=!1)),V.$set(dt);const Zt={};Rt[0]&1&&(Zt.refreshReportParams=bt[0]),Rt[0]&4&&(Zt.hidden=bt[2].isHidden("Option C Saves You")),!te&&Rt[0]&2&&(te=!0,Zt.value=bt[1].sd_defined_benefit_tax_saving_options_third_saves_you,Ne(()=>te=!1)),X.$set(Zt)},i(bt){ne||(U(t.$$.fragment,bt),U(n.$$.fragment,bt),U(r.$$.fragment,bt),U(s.$$.fragment,bt),U(l.$$.fragment,bt),U(c.$$.fragment,bt),U(T.$$.fragment,bt),U(A.$$.fragment,bt),U(y.$$.fragment,bt),U(D.$$.fragment,bt),U(M.$$.fragment,bt),U($.$$.fragment,bt),U(j.$$.fragment,bt),U(V.$$.fragment,bt),U(X.$$.fragment,bt),ne=!0)},o(bt){W(t.$$.fragment,bt),W(n.$$.fragment,bt),W(r.$$.fragment,bt),W(s.$$.fragment,bt),W(l.$$.fragment,bt),W(c.$$.fragment,bt),W(T.$$.fragment,bt),W(A.$$.fragment,bt),W(y.$$.fragment,bt),W(D.$$.fragment,bt),W(M.$$.fragment,bt),W($.$$.fragment,bt),W(j.$$.fragment,bt),W(V.$$.fragment,bt),W(X.$$.fragment,bt),ne=!1},d(bt){se(t,bt),se(n,bt),se(r,bt),se(s,bt),se(l,bt),se(c,bt),se(T,bt),se(A,bt),se(y,bt),se(D,bt),se(M,bt),se($,bt),se(j,bt),se(V,bt),se(X,bt)}}}function _ce(e){let t,n,i;function r(s){e[270](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_etp_enable",classNames:"report-suboption",hidden:e[2].isHidden("Estimated Tax Payments"),scrollToId:"pdfEstimatedTaxPayments",$$slots:{default:[yce]},$$scope:{ctx:e}};return e[1].sd_etp_enable!==void 0&&(a.checked=e[1].sd_etp_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Estimated Tax Payments")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_etp_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function pce(e){let t,n,i,r,a,s,o,l,d;function c(D){e[259](D,e[276])}let v={refreshReportParams:e[0],specTreeNodeId:`sd_etp_projected_${e[276]}_tax_due`,hidden:e[2].isHidden("Projected Tax Due")};e[1][`sd_etp_projected_${e[276]}_tax_due`]!==void 0&&(v.value=e[1][`sd_etp_projected_${e[276]}_tax_due`]),t=new xt({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[260](D,e[276])}let b={refreshReportParams:e[0],specTreeNodeId:`sd_etp_previous_year_${e[276]}_tax`,hidden:e[2].isHidden("Tax")};e[1][`sd_etp_previous_year_${e[276]}_tax`]!==void 0&&(b.value=e[1][`sd_etp_previous_year_${e[276]}_tax`]),i=new xt({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[261](D,e[276])}let E={refreshReportParams:e[0],specTreeNodeId:`sd_etp_${e[276]}_agi`,hidden:e[2].isHidden("AGI")};e[1][`sd_etp_${e[276]}_agi`]!==void 0&&(E.value=e[1][`sd_etp_${e[276]}_agi`]),a=new xt({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[262](D,e[276])}let I={refreshReportParams:e[0],specTreeNodeId:`sd_etp_${e[276]}_safe_harbor`,hidden:e[2].isHidden("Safe Harbor")};return e[1][`sd_etp_${e[276]}_safe_harbor`]!==void 0&&(I.value=e[1][`sd_etp_${e[276]}_safe_harbor`]),o=new xt({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){e=D;const M={};O[0]&1&&(M.refreshReportParams=e[0]),O[0]&4&&(M.hidden=e[2].isHidden("Projected Tax Due")),!n&&O[0]&2&&(n=!0,M.value=e[1][`sd_etp_projected_${e[276]}_tax_due`],Ne(()=>n=!1)),t.$set(M);const F={};O[0]&1&&(F.refreshReportParams=e[0]),O[0]&4&&(F.hidden=e[2].isHidden("Tax")),!r&&O[0]&2&&(r=!0,F.value=e[1][`sd_etp_previous_year_${e[276]}_tax`],Ne(()=>r=!1)),i.$set(F);const $={};O[0]&1&&($.refreshReportParams=e[0]),O[0]&4&&($.hidden=e[2].isHidden("AGI")),!s&&O[0]&2&&(s=!0,$.value=e[1][`sd_etp_${e[276]}_agi`],Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=e[0]),O[0]&4&&(L.hidden=e[2].isHidden("Safe Harbor")),!l&&O[0]&2&&(l=!0,L.value=e[1][`sd_etp_${e[276]}_safe_harbor`],Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function EE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_etp_${e[276]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[277]),$$slots:{default:[pce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[277])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function hce(e){let t,n,i;function r(s){e[263](s,e[272])}let a={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_due_date`,hidden:e[2].isHidden("Due Date")};return e[1][`sd_etp_quarters_${e[272]}_due_date`]!==void 0&&(a.value=e[1][`sd_etp_quarters_${e[272]}_due_date`]),t=new Hp({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o[0]&1&&(l.refreshReportParams=e[0]),o[0]&4&&(l.hidden=e[2].isHidden("Due Date")),!n&&o[0]&2&&(n=!0,l.value=e[1][`sd_etp_quarters_${e[272]}_due_date`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function mce(e){let t,n,i,r,a;function s(c){e[268](c,e[272],e[276])}let o={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`,hidden:e[2].isHidden("Payment Made")};e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`]!==void 0&&(o.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`]),t=new xt({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[269](c,e[272],e[276])}let d={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`,hidden:e[2].isHidden("Cumulative Shortfall")};return e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`]!==void 0&&(d.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`]),i=new xt({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){e=c;const T={};v[0]&1&&(T.refreshReportParams=e[0]),v[0]&4&&(T.hidden=e[2].isHidden("Payment Made")),!n&&v[0]&2&&(n=!0,T.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`],Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=e[0]),v[0]&4&&(b.hidden=e[2].isHidden("Cumulative Shortfall")),!r&&v[0]&2&&(r=!0,b.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`],Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function gce(e){let t,n,i,r,a;function s(c){e[266](c,e[272],e[276])}let o={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`,hidden:e[2].isHidden("Payment Made")};e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`]!==void 0&&(o.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`]),t=new Ov({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[267](c,e[272],e[276])}let d={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`,hidden:e[2].isHidden("Cumulative Shortfall")};return e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`]!==void 0&&(d.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`]),i=new Ov({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){e=c;const T={};v[0]&1&&(T.refreshReportParams=e[0]),v[0]&4&&(T.hidden=e[2].isHidden("Payment Made")),!n&&v[0]&2&&(n=!0,T.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_payment_made`],Ne(()=>n=!1)),t.$set(T);const b={};v[0]&1&&(b.refreshReportParams=e[0]),v[0]&4&&(b.hidden=e[2].isHidden("Cumulative Shortfall")),!r&&v[0]&2&&(r=!0,b.value=e[1][`sd_etp_quarters_${e[272]}_${e[276]}_cumulative_shortfall`],Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function vce(e){let t,n,i,r,a,s,o,l;function d(y){e[264](y,e[272],e[276])}let c={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_required_${e[276]}_payment`,hidden:e[2].isHidden("Required Payment")};e[1][`sd_etp_quarters_${e[272]}_required_${e[276]}_payment`]!==void 0&&(c.value=e[1][`sd_etp_quarters_${e[272]}_required_${e[276]}_payment`]),t=new xt({props:c}),Oe.push(()=>$e(t,"value",d));function v(y){e[265](y,e[272],e[276])}let T={refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_projected_${e[276]}_payment`,hidden:e[2].isHidden("Projected Payment")};e[1][`sd_etp_quarters_${e[272]}_projected_${e[276]}_payment`]!==void 0&&(T.value=e[1][`sd_etp_quarters_${e[272]}_projected_${e[276]}_payment`]),i=new xt({props:T}),Oe.push(()=>$e(i,"value",v));const b=[gce,mce],A=[];function E(y,I){return y[272]!="total"?0:1}return a=E(e),s=A[a]=b[a](e),{c(){re(t.$$.fragment),re(i.$$.fragment),s.c(),o=On()},m(y,I){ae(t,y,I),ae(i,y,I),A[a].m(y,I),ce(y,o,I),l=!0},p(y,I){e=y;const D={};I[0]&1&&(D.refreshReportParams=e[0]),I[0]&4&&(D.hidden=e[2].isHidden("Required Payment")),!n&&I[0]&2&&(n=!0,D.value=e[1][`sd_etp_quarters_${e[272]}_required_${e[276]}_payment`],Ne(()=>n=!1)),t.$set(D);const O={};I[0]&1&&(O.refreshReportParams=e[0]),I[0]&4&&(O.hidden=e[2].isHidden("Projected Payment")),!r&&I[0]&2&&(r=!0,O.value=e[1][`sd_etp_quarters_${e[272]}_projected_${e[276]}_payment`],Ne(()=>r=!1)),i.$set(O),s.p(e,I)},i(y){l||(U(t.$$.fragment,y),U(i.$$.fragment,y),U(s),l=!0)},o(y){W(t.$$.fragment,y),W(i.$$.fragment,y),W(s),l=!1},d(y){se(t,y),se(i,y),A[a].d(y),y&&_e(o)}}}function IE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_tree_${e[276]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[277]),$$slots:{default:[vce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[277])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function bce(e){let t,n,i,r=e[272]!="total"&&hce(e),a=[["federal","Federal"],["state","State"]],s=[];for(let l=0;l<2;l+=1)s[l]=IE(iE(e,a,l));const o=l=>W(s[l],1,1,()=>{s[l]=null});return{c(){r&&r.c(),t=On();for(let l=0;l<2;l+=1)s[l].c();n=On()},m(l,d){r&&r.m(l,d),ce(l,t,d);for(let c=0;c<2;c+=1)s[c]&&s[c].m(l,d);ce(l,n,d),i=!0},p(l,d){if(l[272]!="total"&&r.p(l,d),d[0]&7){a=[["federal","Federal"],["state","State"]];let c;for(c=0;c<2;c+=1){const v=iE(l,a,c);s[c]?(s[c].p(v,d),U(s[c],1)):(s[c]=IE(v),s[c].c(),U(s[c],1),s[c].m(n.parentNode,n))}for(pn(),c=2;c<2;c+=1)o(c);hn()}},i(l){if(!i){U(r);for(let d=0;d<2;d+=1)U(s[d]);i=!0}},o(l){W(r),s=s.filter(Boolean);for(let d=0;d<2;d+=1)W(s[d]);i=!1},d(l){r&&r.d(l),l&&_e(t),Nn(s,l),l&&_e(n)}}}function AE(e){let t,n;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:`sd_etp_quarters_${e[272]}_tree`,classNames:"report-suboption",hidden:e[2].isHidden(e[273]),$$slots:{default:[bce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1&&(a.refreshReportParams=i[0]),r[0]&4&&(a.hidden=i[2].isHidden(i[273])),r[0]&7|r[10]&32&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function yce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E;function y(ie){e[253](ie)}let I={specTreeNodeId:"sd_etp_what_it_is_text",hidden:e[2].isHidden("Description")};e[1].sd_etp_what_it_is_text!==void 0&&(I.value=e[1].sd_etp_what_it_is_text),t=new ta({props:I}),Oe.push(()=>$e(t,"value",y));function D(ie){e[254](ie)}let O={specTreeNodeId:"sd_etp_what_it_is_first_item",hidden:e[2].isHidden("First Item")};e[1].sd_etp_what_it_is_first_item!==void 0&&(O.value=e[1].sd_etp_what_it_is_first_item),i=new li({props:O}),Oe.push(()=>$e(i,"value",D));function M(ie){e[255](ie)}let F={specTreeNodeId:"sd_etp_what_it_is_second_item",hidden:e[2].isHidden("Second Item")};e[1].sd_etp_what_it_is_second_item!==void 0&&(F.value=e[1].sd_etp_what_it_is_second_item),a=new li({props:F}),Oe.push(()=>$e(a,"value",M));function $(ie){e[256](ie)}let L={specTreeNodeId:"sd_etp_what_it_is_third_item",hidden:e[2].isHidden("Third Item")};e[1].sd_etp_what_it_is_third_item!==void 0&&(L.value=e[1].sd_etp_what_it_is_third_item),o=new li({props:L}),Oe.push(()=>$e(o,"value",$));function j(ie){e[257](ie)}let H={specTreeNodeId:"sd_etp_previous_tax_year",hidden:e[2].isHidden("Previous Tax Year")};e[1].sd_etp_previous_tax_year!==void 0&&(H.value=e[1].sd_etp_previous_tax_year),d=new li({props:H}),Oe.push(()=>$e(d,"value",j));function V(ie){e[258](ie)}let Q={specTreeNodeId:"sd_etp_current_tax_year",hidden:e[2].isHidden("Current Tax Year")};e[1].sd_etp_current_tax_year!==void 0&&(Q.value=e[1].sd_etp_current_tax_year),v=new li({props:Q}),Oe.push(()=>$e(v,"value",V));let X=[["federal","Federal"],["state","State"]],te=[];for(let ie=0;ie<2;ie+=1)te[ie]=EE(rE(e,X,ie));const ne=ie=>W(te[ie],1,1,()=>{te[ie]=null});let be=[["first","1st Quarter"],["second","2nd Quarter"],["third","3rd Quarter"],["fourth","4th Quarter"],["total","Annual Totals"]],ue=[];for(let ie=0;ie<5;ie+=1)ue[ie]=AE(nE(e,be,ie));const Ce=ie=>W(ue[ie],1,1,()=>{ue[ie]=null});return{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment);for(let ie=0;ie<2;ie+=1)te[ie].c();b=On();for(let ie=0;ie<5;ie+=1)ue[ie].c();A=On()},m(ie,Y){ae(t,ie,Y),ae(i,ie,Y),ae(a,ie,Y),ae(o,ie,Y),ae(d,ie,Y),ae(v,ie,Y);for(let he=0;he<2;he+=1)te[he]&&te[he].m(ie,Y);ce(ie,b,Y);for(let he=0;he<5;he+=1)ue[he]&&ue[he].m(ie,Y);ce(ie,A,Y),E=!0},p(ie,Y){const he={};Y[0]&4&&(he.hidden=ie[2].isHidden("Description")),!n&&Y[0]&2&&(n=!0,he.value=ie[1].sd_etp_what_it_is_text,Ne(()=>n=!1)),t.$set(he);const Me={};Y[0]&4&&(Me.hidden=ie[2].isHidden("First Item")),!r&&Y[0]&2&&(r=!0,Me.value=ie[1].sd_etp_what_it_is_first_item,Ne(()=>r=!1)),i.$set(Me);const Pe={};Y[0]&4&&(Pe.hidden=ie[2].isHidden("Second Item")),!s&&Y[0]&2&&(s=!0,Pe.value=ie[1].sd_etp_what_it_is_second_item,Ne(()=>s=!1)),a.$set(Pe);const We={};Y[0]&4&&(We.hidden=ie[2].isHidden("Third Item")),!l&&Y[0]&2&&(l=!0,We.value=ie[1].sd_etp_what_it_is_third_item,Ne(()=>l=!1)),o.$set(We);const qe={};Y[0]&4&&(qe.hidden=ie[2].isHidden("Previous Tax Year")),!c&&Y[0]&2&&(c=!0,qe.value=ie[1].sd_etp_previous_tax_year,Ne(()=>c=!1)),d.$set(qe);const ee={};if(Y[0]&4&&(ee.hidden=ie[2].isHidden("Current Tax Year")),!T&&Y[0]&2&&(T=!0,ee.value=ie[1].sd_etp_current_tax_year,Ne(()=>T=!1)),v.$set(ee),Y[0]&7){X=[["federal","Federal"],["state","State"]];let G;for(G=0;G<2;G+=1){const me=rE(ie,X,G);te[G]?(te[G].p(me,Y),U(te[G],1)):(te[G]=EE(me),te[G].c(),U(te[G],1),te[G].m(b.parentNode,b))}for(pn(),G=2;G<2;G+=1)ne(G);hn()}if(Y[0]&7){be=[["first","1st Quarter"],["second","2nd Quarter"],["third","3rd Quarter"],["fourth","4th Quarter"],["total","Annual Totals"]];let G;for(G=0;G<5;G+=1){const me=nE(ie,be,G);ue[G]?(ue[G].p(me,Y),U(ue[G],1)):(ue[G]=AE(me),ue[G].c(),U(ue[G],1),ue[G].m(A.parentNode,A))}for(pn(),G=5;G<5;G+=1)Ce(G);hn()}},i(ie){if(!E){U(t.$$.fragment,ie),U(i.$$.fragment,ie),U(a.$$.fragment,ie),U(o.$$.fragment,ie),U(d.$$.fragment,ie),U(v.$$.fragment,ie);for(let Y=0;Y<2;Y+=1)U(te[Y]);for(let Y=0;Y<5;Y+=1)U(ue[Y]);E=!0}},o(ie){W(t.$$.fragment,ie),W(i.$$.fragment,ie),W(a.$$.fragment,ie),W(o.$$.fragment,ie),W(d.$$.fragment,ie),W(v.$$.fragment,ie),te=te.filter(Boolean);for(let Y=0;Y<2;Y+=1)W(te[Y]);ue=ue.filter(Boolean);for(let Y=0;Y<5;Y+=1)W(ue[Y]);E=!1},d(ie){se(t,ie),se(i,ie),se(a,ie),se(o,ie),se(d,ie),se(v,ie),Nn(te,ie),ie&&_e(b),Nn(ue,ie),ie&&_e(A)}}}function wce(e){let t=e[3]("sd_sec_179_expense_enable"),n,i=e[3]("sd_expense_acceleration_enable"),r,a=e[3]("sd_missing_deductions_enable"),s,o=e[3]("sd_income_deferment_enable"),l,d=e[3]("sd_sep_ira_enable"),c,v=e[3]("sd_fourteen_day_home_rental_enable"),T,b=e[3]("sd_employing_your_children_enable"),A,E=e[3]("sd_plan_401k_enable"),y,I=e[3]("sd_business_entity_planner_enable"),D,O=e[3]("sd_auto_lease_enable"),M,F=e[3]("sd_traditional_and_roth_ira_enable"),$,L=e[3]("sd_health_savings_enable"),j,H=e[3]("sd_defined_benefit_enable"),V,Q=e[3]("sd_etp_enable"),X,te,ne=t&&vfe(e),be=i&&wfe(e),ue=a&&Sfe(e),Ce=o&&Efe(e),ie=d&&Dfe(e),Y=v&&xfe(e),he=b&&Nfe(e),Me=E&&Hfe(e),Pe=I&&Ufe(e),We=O&&Qfe(e),qe=F&&Zfe(e),ee=L&&ice(e),G=H&&dce(e),me=Q&&_ce(e);return{c(){ne&&ne.c(),n=On(),be&&be.c(),r=On(),ue&&ue.c(),s=On(),Ce&&Ce.c(),l=On(),ie&&ie.c(),c=On(),Y&&Y.c(),T=On(),he&&he.c(),A=On(),Me&&Me.c(),y=On(),Pe&&Pe.c(),D=On(),We&&We.c(),M=On(),qe&&qe.c(),$=On(),ee&&ee.c(),j=On(),G&&G.c(),V=On(),me&&me.c(),X=On()},m(Te,De){ne&&ne.m(Te,De),ce(Te,n,De),be&&be.m(Te,De),ce(Te,r,De),ue&&ue.m(Te,De),ce(Te,s,De),Ce&&Ce.m(Te,De),ce(Te,l,De),ie&&ie.m(Te,De),ce(Te,c,De),Y&&Y.m(Te,De),ce(Te,T,De),he&&he.m(Te,De),ce(Te,A,De),Me&&Me.m(Te,De),ce(Te,y,De),Pe&&Pe.m(Te,De),ce(Te,D,De),We&&We.m(Te,De),ce(Te,M,De),qe&&qe.m(Te,De),ce(Te,$,De),ee&&ee.m(Te,De),ce(Te,j,De),G&&G.m(Te,De),ce(Te,V,De),me&&me.m(Te,De),ce(Te,X,De),te=!0},p(Te,De){t&&ne.p(Te,De),i&&be.p(Te,De),a&&ue.p(Te,De),o&&Ce.p(Te,De),d&&ie.p(Te,De),v&&Y.p(Te,De),b&&he.p(Te,De),E&&Me.p(Te,De),I&&Pe.p(Te,De),O&&We.p(Te,De),F&&qe.p(Te,De),L&&ee.p(Te,De),H&&G.p(Te,De),Q&&me.p(Te,De)},i(Te){te||(U(ne),U(be),U(ue),U(Ce),U(ie),U(Y),U(he),U(Me),U(Pe),U(We),U(qe),U(ee),U(G),U(me),te=!0)},o(Te){W(ne),W(be),W(ue),W(Ce),W(ie),W(Y),W(he),W(Me),W(Pe),W(We),W(qe),W(ee),W(G),W(me),te=!1},d(Te){ne&&ne.d(Te),Te&&_e(n),be&&be.d(Te),Te&&_e(r),ue&&ue.d(Te),Te&&_e(s),Ce&&Ce.d(Te),Te&&_e(l),ie&&ie.d(Te),Te&&_e(c),Y&&Y.d(Te),Te&&_e(T),he&&he.d(Te),Te&&_e(A),Me&&Me.d(Te),Te&&_e(y),Pe&&Pe.d(Te),Te&&_e(D),We&&We.d(Te),Te&&_e(M),qe&&qe.d(Te),Te&&_e($),ee&&ee.d(Te),Te&&_e(j),G&&G.d(Te),Te&&_e(V),me&&me.d(Te),Te&&_e(X)}}}function Tce(e){let t,n,i;function r(s){e[271](s)}let a={refreshReportParams:e[0],specTreeNodeId:"sd_enable",hidden:e[2].isHidden("Strategy Details"),scrollToId:"pdfStrategyDetails",$$slots:{default:[wce]},$$scope:{ctx:e}};return e[1].sd_enable!==void 0&&(a.checked=e[1].sd_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Strategy Details")),o[0]&7|o[10]&32&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].sd_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function kce(e,t,n){let i,r;Sn(e,Ye,le=>n(1,i=le)),Sn(e,Fl,le=>n(2,r=le));let{refreshReportParams:a}=t,{unpermittedReportAtrributes:s}=t;const o=le=>!s.includes(le);function l(le){e.$$.not_equal(i.top_3_strategy_picks_section179_adding,le)&&(i.top_3_strategy_picks_section179_adding=le,Ye.set(i))}function d(le){e.$$.not_equal(i.top_3_strategy_picks_section179_saves_you,le)&&(i.top_3_strategy_picks_section179_saves_you=le,Ye.set(i))}function c(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_text,le)&&(i.sd_sec_179_expense_what_it_is_text=le,Ye.set(i))}function v(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_first_item,le)&&(i.sd_sec_179_expense_what_it_is_first_item=le,Ye.set(i))}function T(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_second_item,le)&&(i.sd_sec_179_expense_what_it_is_second_item=le,Ye.set(i))}function b(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_third_item,le)&&(i.sd_sec_179_expense_what_it_is_third_item=le,Ye.set(i))}function A(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_fourth_item,le)&&(i.sd_sec_179_expense_what_it_is_fourth_item=le,Ye.set(i))}function E(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_fifth_item,le)&&(i.sd_sec_179_expense_what_it_is_fifth_item=le,Ye.set(i))}function y(le){e.$$.not_equal(i.sd_sec_179_expense_what_it_is_text_extra,le)&&(i.sd_sec_179_expense_what_it_is_text_extra=le,Ye.set(i))}function I(le){e.$$.not_equal(i.sd_sec_179_expense_ratings_text,le)&&(i.sd_sec_179_expense_ratings_text=le,Ye.set(i))}function D(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_first_expense,le)&&(i.sd_sec_179_expense_tax_saving_options_first_expense=le,Ye.set(i))}function O(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_first_saves_you,le)&&(i.sd_sec_179_expense_tax_saving_options_first_saves_you=le,Ye.set(i))}function M(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_second_expense,le)&&(i.sd_sec_179_expense_tax_saving_options_second_expense=le,Ye.set(i))}function F(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_second_saves_you,le)&&(i.sd_sec_179_expense_tax_saving_options_second_saves_you=le,Ye.set(i))}function $(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_third_expense,le)&&(i.sd_sec_179_expense_tax_saving_options_third_expense=le,Ye.set(i))}function L(le){e.$$.not_equal(i.sd_sec_179_expense_tax_saving_options_third_saves_you,le)&&(i.sd_sec_179_expense_tax_saving_options_third_saves_you=le,Ye.set(i))}function j(le){e.$$.not_equal(i.sd_sec_179_expense_current_max_sec_179_deduction,le)&&(i.sd_sec_179_expense_current_max_sec_179_deduction=le,Ye.set(i))}function H(le){e.$$.not_equal(i.sd_sec_179_expense_enable,le)&&(i.sd_sec_179_expense_enable=le,Ye.set(i))}function V(le){e.$$.not_equal(i.top_3_strategy_picks_expense_acceleration_adding,le)&&(i.top_3_strategy_picks_expense_acceleration_adding=le,Ye.set(i))}function Q(le){e.$$.not_equal(i.top_3_strategy_picks_expense_acceleration_saves_you,le)&&(i.top_3_strategy_picks_expense_acceleration_saves_you=le,Ye.set(i))}function X(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_text,le)&&(i.sd_expense_acceleration_what_it_is_text=le,Ye.set(i))}function te(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_first_item,le)&&(i.sd_expense_acceleration_what_it_is_first_item=le,Ye.set(i))}function ne(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_second_item,le)&&(i.sd_expense_acceleration_what_it_is_second_item=le,Ye.set(i))}function be(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_third_item,le)&&(i.sd_expense_acceleration_what_it_is_third_item=le,Ye.set(i))}function ue(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_fourth_item,le)&&(i.sd_expense_acceleration_what_it_is_fourth_item=le,Ye.set(i))}function Ce(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_fifth_item,le)&&(i.sd_expense_acceleration_what_it_is_fifth_item=le,Ye.set(i))}function ie(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_sixth_item,le)&&(i.sd_expense_acceleration_what_it_is_sixth_item=le,Ye.set(i))}function Y(le){e.$$.not_equal(i.sd_expense_acceleration_what_it_is_seventh_item,le)&&(i.sd_expense_acceleration_what_it_is_seventh_item=le,Ye.set(i))}function he(le){e.$$.not_equal(i.sd_expense_acceleration_ratings_text,le)&&(i.sd_expense_acceleration_ratings_text=le,Ye.set(i))}function Me(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_first_expense,le)&&(i.sd_expense_acceleration_tax_saving_options_first_expense=le,Ye.set(i))}function Pe(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_first_saves_you,le)&&(i.sd_expense_acceleration_tax_saving_options_first_saves_you=le,Ye.set(i))}function We(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_second_expense,le)&&(i.sd_expense_acceleration_tax_saving_options_second_expense=le,Ye.set(i))}function qe(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_second_saves_you,le)&&(i.sd_expense_acceleration_tax_saving_options_second_saves_you=le,Ye.set(i))}function ee(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_third_expense,le)&&(i.sd_expense_acceleration_tax_saving_options_third_expense=le,Ye.set(i))}function G(le){e.$$.not_equal(i.sd_expense_acceleration_tax_saving_options_third_saves_you,le)&&(i.sd_expense_acceleration_tax_saving_options_third_saves_you=le,Ye.set(i))}function me(le){e.$$.not_equal(i.sd_expense_acceleration_enable,le)&&(i.sd_expense_acceleration_enable=le,Ye.set(i))}function Te(le){e.$$.not_equal(i.top_3_strategy_picks_missing_deductions_adding,le)&&(i.top_3_strategy_picks_missing_deductions_adding=le,Ye.set(i))}function De(le){e.$$.not_equal(i.top_3_strategy_picks_missing_deductions_saves_you,le)&&(i.top_3_strategy_picks_missing_deductions_saves_you=le,Ye.set(i))}function we(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_text,le)&&(i.sd_missing_deductions_what_it_is_text=le,Ye.set(i))}function Ve(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_first_item,le)&&(i.sd_missing_deductions_what_it_is_first_item=le,Ye.set(i))}function Ke(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_second_item,le)&&(i.sd_missing_deductions_what_it_is_second_item=le,Ye.set(i))}function yt(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_third_item,le)&&(i.sd_missing_deductions_what_it_is_third_item=le,Ye.set(i))}function ht(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_fourth_item,le)&&(i.sd_missing_deductions_what_it_is_fourth_item=le,Ye.set(i))}function Je(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_fifth_item,le)&&(i.sd_missing_deductions_what_it_is_fifth_item=le,Ye.set(i))}function pt(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_sixth_item,le)&&(i.sd_missing_deductions_what_it_is_sixth_item=le,Ye.set(i))}function Tt(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_seventh_item,le)&&(i.sd_missing_deductions_what_it_is_seventh_item=le,Ye.set(i))}function it(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_eighth_item,le)&&(i.sd_missing_deductions_what_it_is_eighth_item=le,Ye.set(i))}function Ge(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_ninth_item,le)&&(i.sd_missing_deductions_what_it_is_ninth_item=le,Ye.set(i))}function st(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_tenth_item,le)&&(i.sd_missing_deductions_what_it_is_tenth_item=le,Ye.set(i))}function It(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_eleventh_item,le)&&(i.sd_missing_deductions_what_it_is_eleventh_item=le,Ye.set(i))}function Ct(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_twelfth_item,le)&&(i.sd_missing_deductions_what_it_is_twelfth_item=le,Ye.set(i))}function bt(le){e.$$.not_equal(i.sd_missing_deductions_what_it_is_text_extra,le)&&(i.sd_missing_deductions_what_it_is_text_extra=le,Ye.set(i))}function Rt(le){e.$$.not_equal(i.sd_missing_deductions_annual_meeting_expense_current,le)&&(i.sd_missing_deductions_annual_meeting_expense_current=le,Ye.set(i))}function cn(le){e.$$.not_equal(i.sd_missing_deductions_annual_meeting_expense_recommended,le)&&(i.sd_missing_deductions_annual_meeting_expense_recommended=le,Ye.set(i))}function nn(le){e.$$.not_equal(i.sd_missing_deductions_meals_current,le)&&(i.sd_missing_deductions_meals_current=le,Ye.set(i))}function Qe(le){e.$$.not_equal(i.sd_missing_deductions_meals_recommended,le)&&(i.sd_missing_deductions_meals_recommended=le,Ye.set(i))}function Ft(le){e.$$.not_equal(i.sd_missing_deductions_travel_current,le)&&(i.sd_missing_deductions_travel_current=le,Ye.set(i))}function Fn(le){e.$$.not_equal(i.sd_missing_deductions_travel_recommended,le)&&(i.sd_missing_deductions_travel_recommended=le,Ye.set(i))}function He(le){e.$$.not_equal(i.sd_missing_deductions_telephone_current,le)&&(i.sd_missing_deductions_telephone_current=le,Ye.set(i))}function Dt(le){e.$$.not_equal(i.sd_missing_deductions_telephone_recommended,le)&&(i.sd_missing_deductions_telephone_recommended=le,Ye.set(i))}function Xt(le){e.$$.not_equal(i.sd_missing_deductions_internet_current,le)&&(i.sd_missing_deductions_internet_current=le,Ye.set(i))}function Mt(le){e.$$.not_equal(i.sd_missing_deductions_internet_recommended,le)&&(i.sd_missing_deductions_internet_recommended=le,Ye.set(i))}function Xe(le){e.$$.not_equal(i.sd_missing_deductions_auto_current,le)&&(i.sd_missing_deductions_auto_current=le,Ye.set(i))}function Nt(le){e.$$.not_equal(i.sd_missing_deductions_auto_recommended,le)&&(i.sd_missing_deductions_auto_recommended=le,Ye.set(i))}function on(le){e.$$.not_equal(i.sd_missing_deductions_office_current,le)&&(i.sd_missing_deductions_office_current=le,Ye.set(i))}function In(le){e.$$.not_equal(i.sd_missing_deductions_office_recommended,le)&&(i.sd_missing_deductions_office_recommended=le,Ye.set(i))}function dt(le){e.$$.not_equal(i.sd_missing_deductions_legal_current,le)&&(i.sd_missing_deductions_legal_current=le,Ye.set(i))}function Zt(le){e.$$.not_equal(i.sd_missing_deductions_legal_recommended,le)&&(i.sd_missing_deductions_legal_recommended=le,Ye.set(i))}function Ln(le){e.$$.not_equal(i.sd_missing_deductions_mortgage_current,le)&&(i.sd_missing_deductions_mortgage_current=le,Ye.set(i))}function xn(le){e.$$.not_equal(i.sd_missing_deductions_mortgage_recommended,le)&&(i.sd_missing_deductions_mortgage_recommended=le,Ye.set(i))}function Dn(le){e.$$.not_equal(i.sd_missing_deductions_health_savings_account_current,le)&&(i.sd_missing_deductions_health_savings_account_current=le,Ye.set(i))}function Un(le){e.$$.not_equal(i.sd_missing_deductions_health_savings_account_recommended,le)&&(i.sd_missing_deductions_health_savings_account_recommended=le,Ye.set(i))}function qn(le){e.$$.not_equal(i.sd_missing_deductions_cash_charity_donations_current,le)&&(i.sd_missing_deductions_cash_charity_donations_current=le,Ye.set(i))}function ft(le){e.$$.not_equal(i.sd_missing_deductions_cash_charity_donations_recommended,le)&&(i.sd_missing_deductions_cash_charity_donations_recommended=le,Ye.set(i))}function ni(le){e.$$.not_equal(i.sd_missing_deductions_non_cash_donations_current,le)&&(i.sd_missing_deductions_non_cash_donations_current=le,Ye.set(i))}function Et(le){e.$$.not_equal(i.sd_missing_deductions_non_cash_donations_recommended,le)&&(i.sd_missing_deductions_non_cash_donations_recommended=le,Ye.set(i))}function un(le){e.$$.not_equal(i.sd_missing_deductions_total_tax_savings_comes_to,le)&&(i.sd_missing_deductions_total_tax_savings_comes_to=le,Ye.set(i))}function Ai(le){e.$$.not_equal(i.sd_missing_deductions_enable,le)&&(i.sd_missing_deductions_enable=le,Ye.set(i))}function St(le){e.$$.not_equal(i.top_3_strategy_picks_income_deferment_adding,le)&&(i.top_3_strategy_picks_income_deferment_adding=le,Ye.set(i))}function sn(le){e.$$.not_equal(i.top_3_strategy_picks_income_deferment_saves_you,le)&&(i.top_3_strategy_picks_income_deferment_saves_you=le,Ye.set(i))}function ci(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_text,le)&&(i.sd_income_deferment_what_it_is_text=le,Ye.set(i))}function pi(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_first_item,le)&&(i.sd_income_deferment_what_it_is_first_item=le,Ye.set(i))}function Pi(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_second_item,le)&&(i.sd_income_deferment_what_it_is_second_item=le,Ye.set(i))}function $i(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_third_item,le)&&(i.sd_income_deferment_what_it_is_third_item=le,Ye.set(i))}function ji(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_fourth_item,le)&&(i.sd_income_deferment_what_it_is_fourth_item=le,Ye.set(i))}function ri(le){e.$$.not_equal(i.sd_income_deferment_what_it_is_fifth_item,le)&&(i.sd_income_deferment_what_it_is_fifth_item=le,Ye.set(i))}function tr(le){e.$$.not_equal(i.sd_income_deferment_ratings_text,le)&&(i.sd_income_deferment_ratings_text=le,Ye.set(i))}function Ei(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_first_expense,le)&&(i.sd_income_deferment_tax_saving_options_first_expense=le,Ye.set(i))}function Ti(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_first_saves_you,le)&&(i.sd_income_deferment_tax_saving_options_first_saves_you=le,Ye.set(i))}function kn(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_second_expense,le)&&(i.sd_income_deferment_tax_saving_options_second_expense=le,Ye.set(i))}function Rn(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_second_saves_you,le)&&(i.sd_income_deferment_tax_saving_options_second_saves_you=le,Ye.set(i))}function ki(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_third_expense,le)&&(i.sd_income_deferment_tax_saving_options_third_expense=le,Ye.set(i))}function mr(le){e.$$.not_equal(i.sd_income_deferment_tax_saving_options_third_saves_you,le)&&(i.sd_income_deferment_tax_saving_options_third_saves_you=le,Ye.set(i))}function _r(le){e.$$.not_equal(i.sd_income_deferment_enable,le)&&(i.sd_income_deferment_enable=le,Ye.set(i))}function Mi(le){e.$$.not_equal(i.top_3_strategy_picks_sep_ira_adding,le)&&(i.top_3_strategy_picks_sep_ira_adding=le,Ye.set(i))}function di(le){e.$$.not_equal(i.top_3_strategy_picks_sep_ira_saves_you,le)&&(i.top_3_strategy_picks_sep_ira_saves_you=le,Ye.set(i))}function Yi(le){e.$$.not_equal(i.sd_sep_ira_what_it_is_text,le)&&(i.sd_sep_ira_what_it_is_text=le,Ye.set(i))}function na(le){e.$$.not_equal(i.sd_sep_ira_what_it_is_first_item,le)&&(i.sd_sep_ira_what_it_is_first_item=le,Ye.set(i))}function Ki(le){e.$$.not_equal(i.sd_sep_ira_what_it_is_second_item,le)&&(i.sd_sep_ira_what_it_is_second_item=le,Ye.set(i))}function Rr(le){e.$$.not_equal(i.sd_sep_ira_what_it_is_third_item,le)&&(i.sd_sep_ira_what_it_is_third_item=le,Ye.set(i))}function Di(le){e.$$.not_equal(i.sd_sep_ira_what_it_is_fourth_item,le)&&(i.sd_sep_ira_what_it_is_fourth_item=le,Ye.set(i))}function Wi(le){e.$$.not_equal(i.sd_sep_ira_ratings_text,le)&&(i.sd_sep_ira_ratings_text=le,Ye.set(i))}function Bi(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_first_expense,le)&&(i.sd_sep_ira_tax_saving_options_first_expense=le,Ye.set(i))}function _a(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_first_saves_you,le)&&(i.sd_sep_ira_tax_saving_options_first_saves_you=le,Ye.set(i))}function xi(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_second_expense,le)&&(i.sd_sep_ira_tax_saving_options_second_expense=le,Ye.set(i))}function Kr(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_second_saves_you,le)&&(i.sd_sep_ira_tax_saving_options_second_saves_you=le,Ye.set(i))}function kr(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_third_expense,le)&&(i.sd_sep_ira_tax_saving_options_third_expense=le,Ye.set(i))}function Ji(le){e.$$.not_equal(i.sd_sep_ira_tax_saving_options_third_saves_you,le)&&(i.sd_sep_ira_tax_saving_options_third_saves_you=le,Ye.set(i))}function ia(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_first_expense,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_first_expense=le,Ye.set(i))}function la(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_first_saves_you=le,Ye.set(i))}function Ir(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_second_expense,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_second_expense=le,Ye.set(i))}function Ur(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_second_saves_you=le,Ye.set(i))}function qr(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_third_expense,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_third_expense=le,Ye.set(i))}function Ht(le){e.$$.not_equal(i.sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you,le)&&(i.sd_sep_ira_w_2_wages_tax_saving_options_third_saves_you=le,Ye.set(i))}function et(le){e.$$.not_equal(i.sd_sep_ira_based_on_sep_income_of,le)&&(i.sd_sep_ira_based_on_sep_income_of=le,Ye.set(i))}function ln(le){e.$$.not_equal(i.sd_sep_ira_increase_w_2_wages_to,le)&&(i.sd_sep_ira_increase_w_2_wages_to=le,Ye.set(i))}function Vi(le){e.$$.not_equal(i.sd_sep_ira_enable,le)&&(i.sd_sep_ira_enable=le,Ye.set(i))}function Ar(le){e.$$.not_equal(i.top_3_strategy_picks_fourteen_day_home_rental_adding,le)&&(i.top_3_strategy_picks_fourteen_day_home_rental_adding=le,Ye.set(i))}function vr(le){e.$$.not_equal(i.top_3_strategy_picks_fourteen_day_home_rental_saves_you,le)&&(i.top_3_strategy_picks_fourteen_day_home_rental_saves_you=le,Ye.set(i))}function ir(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_what_it_is_text,le)&&(i.sd_fourteen_day_home_rental_what_it_is_text=le,Ye.set(i))}function Si(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_ratings_text,le)&&(i.sd_fourteen_day_home_rental_ratings_text=le,Ye.set(i))}function pr(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_first_expense,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_first_expense=le,Ye.set(i))}function yi(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_first_saves_you,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_first_saves_you=le,Ye.set(i))}function Dr(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_second_expense,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_second_expense=le,Ye.set(i))}function Wr(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_second_saves_you,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_second_saves_you=le,Ye.set(i))}function Sr(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_third_expense,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_third_expense=le,Ye.set(i))}function hr(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_tax_saving_options_third_saves_you,le)&&(i.sd_fourteen_day_home_rental_tax_saving_options_third_saves_you=le,Ye.set(i))}function Vn(le){e.$$.not_equal(i.sd_fourteen_day_home_rental_enable,le)&&(i.sd_fourteen_day_home_rental_enable=le,Ye.set(i))}function dn(le){e.$$.not_equal(i.top_3_strategy_picks_employing_your_children_adding,le)&&(i.top_3_strategy_picks_employing_your_children_adding=le,Ye.set(i))}function wr(le){e.$$.not_equal(i.top_3_strategy_picks_employing_your_children_saves_you,le)&&(i.top_3_strategy_picks_employing_your_children_saves_you=le,Ye.set(i))}function Bn(le){e.$$.not_equal(i.sd_employing_your_children_what_it_is_text,le)&&(i.sd_employing_your_children_what_it_is_text=le,Ye.set(i))}function ra(le){e.$$.not_equal(i.sd_employing_your_children_ratings_text,le)&&(i.sd_employing_your_children_ratings_text=le,Ye.set(i))}function _n(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_first_expense,le)&&(i.sd_employing_your_children_tax_saving_options_first_expense=le,Ye.set(i))}function Vr(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_first_saves_you,le)&&(i.sd_employing_your_children_tax_saving_options_first_saves_you=le,Ye.set(i))}function rr(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_second_expense,le)&&(i.sd_employing_your_children_tax_saving_options_second_expense=le,Ye.set(i))}function Or(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_second_saves_you,le)&&(i.sd_employing_your_children_tax_saving_options_second_saves_you=le,Ye.set(i))}function Ui(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_third_expense,le)&&(i.sd_employing_your_children_tax_saving_options_third_expense=le,Ye.set(i))}function Fr(le){e.$$.not_equal(i.sd_employing_your_children_tax_saving_options_third_saves_you,le)&&(i.sd_employing_your_children_tax_saving_options_third_saves_you=le,Ye.set(i))}function wi(le){e.$$.not_equal(i.sd_employing_your_children_enable,le)&&(i.sd_employing_your_children_enable=le,Ye.set(i))}function Ni(le){e.$$.not_equal(i.top_3_strategy_picks_plan_401k_contributions,le)&&(i.top_3_strategy_picks_plan_401k_contributions=le,Ye.set(i))}function ar(le){e.$$.not_equal(i.top_3_strategy_picks_plan_401k_saves_you,le)&&(i.top_3_strategy_picks_plan_401k_saves_you=le,Ye.set(i))}function sr(le){e.$$.not_equal(i.sd_plan_401k_what_it_is_text,le)&&(i.sd_plan_401k_what_it_is_text=le,Ye.set(i))}function Gi(le){e.$$.not_equal(i.sd_plan_401k_ratings_text,le)&&(i.sd_plan_401k_ratings_text=le,Ye.set(i))}function Cr(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_first_contribute,le)&&(i.sd_plan_401k_tax_saving_options_first_contribute=le,Ye.set(i))}function or(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_first_saves_you,le)&&(i.sd_plan_401k_tax_saving_options_first_saves_you=le,Ye.set(i))}function lr(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_second_contribute,le)&&(i.sd_plan_401k_tax_saving_options_second_contribute=le,Ye.set(i))}function Ka(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_second_saves_you,le)&&(i.sd_plan_401k_tax_saving_options_second_saves_you=le,Ye.set(i))}function Lr(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_third_contribute,le)&&(i.sd_plan_401k_tax_saving_options_third_contribute=le,Ye.set(i))}function nr(le){e.$$.not_equal(i.sd_plan_401k_tax_saving_options_third_saves_you,le)&&(i.sd_plan_401k_tax_saving_options_third_saves_you=le,Ye.set(i))}function wa(le){e.$$.not_equal(i.sd_plan_401k_taxpayer_wages,le)&&(i.sd_plan_401k_taxpayer_wages=le,Ye.set(i))}function zr(le){e.$$.not_equal(i.sd_plan_401k_spouse_wages,le)&&(i.sd_plan_401k_spouse_wages=le,Ye.set(i))}function Ze(le){e.$$.not_equal(i.sd_plan_401k_current_taxpayer_401k_contributions,le)&&(i.sd_plan_401k_current_taxpayer_401k_contributions=le,Ye.set(i))}function tn(le){e.$$.not_equal(i.sd_plan_401k_current_spouse_401k_contributions,le)&&(i.sd_plan_401k_current_spouse_401k_contributions=le,Ye.set(i))}function Xr(le){e.$$.not_equal(i.sd_plan_401k_enable,le)&&(i.sd_plan_401k_enable=le,Ye.set(i))}function ur(le){e.$$.not_equal(i.top_3_strategy_picks_business_entity_best_company_name,le)&&(i.top_3_strategy_picks_business_entity_best_company_name=le,Ye.set(i))}function Hr(le){e.$$.not_equal(i.top_3_strategy_picks_business_entity_best_company_recommended,le)&&(i.top_3_strategy_picks_business_entity_best_company_recommended=le,Ye.set(i))}function Xi(le){e.$$.not_equal(i.top_3_strategy_picks_business_entity_best_company_saves_you,le)&&(i.top_3_strategy_picks_business_entity_best_company_saves_you=le,Ye.set(i))}function dr(le){e.$$.not_equal(i.top_3_strategy_picks_business_entity_other_companies_saves_you,le)&&(i.top_3_strategy_picks_business_entity_other_companies_saves_you=le,Ye.set(i))}function pa(le){e.$$.not_equal(i.sd_business_entity_planner_what_it_is_text,le)&&(i.sd_business_entity_planner_what_it_is_text=le,Ye.set(i))}function qt(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_what_it_is_${vn.code}_description`],le)&&(i[`sd_business_entity_planner_what_it_is_${vn.code}_description`]=le,Ye.set(i))}function mn(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_what_it_is_${vn.code}_pros`],le)&&(i[`sd_business_entity_planner_what_it_is_${vn.code}_pros`]=le,Ye.set(i))}function ai(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_what_it_is_${vn.code}_cons`],le)&&(i[`sd_business_entity_planner_what_it_is_${vn.code}_cons`]=le,Ye.set(i))}function Ra(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_what_it_is_${vn.code}_percent`],le)&&(i[`sd_business_entity_planner_what_it_is_${vn.code}_percent`]=le,Ye.set(i))}function aa(le){e.$$.not_equal(i.sd_business_entity_planner_comparison_description,le)&&(i.sd_business_entity_planner_comparison_description=le,Ye.set(i))}function ga(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_name`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_name`]=le,Ye.set(i))}function Ta(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_type_current`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_type_current`]=le,Ye.set(i))}function va(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_type_recommended`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_type_recommended`]=le,Ye.set(i))}function $r(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_se_tax`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_se_tax`]=le,Ye.set(i))}function ua(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_fica_tax`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_fica_tax`]=le,Ye.set(i))}function an(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_income_tax_c`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_income_tax_c`]=le,Ye.set(i))}function gi(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_income_tax`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_income_tax`]=le,Ye.set(i))}function jr(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_state_tax`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_state_tax`]=le,Ye.set(i))}function Ia(le,vn,ui){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_total_tax`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_${ui.code}_total_tax`]=le,Ye.set(i))}function Xa(le,vn){e.$$.not_equal(i[`sd_business_entity_planner_${vn.code}_company_savings`],le)&&(i[`sd_business_entity_planner_${vn.code}_company_savings`]=le,Ye.set(i))}function Ha(le){e.$$.not_equal(i.sd_business_entity_planner_how_to_change_business_stucture,le)&&(i.sd_business_entity_planner_how_to_change_business_stucture=le,Ye.set(i))}function $a(le){e.$$.not_equal(i.sd_business_entity_planner_enable,le)&&(i.sd_business_entity_planner_enable=le,Ye.set(i))}function Ii(le){e.$$.not_equal(i.sd_auto_lease_what_it_is_text,le)&&(i.sd_auto_lease_what_it_is_text=le,Ye.set(i))}function br(le){e.$$.not_equal(i.sd_auto_lease_what_it_is_lease_pros,le)&&(i.sd_auto_lease_what_it_is_lease_pros=le,Ye.set(i))}function Aa(le){e.$$.not_equal(i.sd_auto_lease_what_it_is_lease_cons,le)&&(i.sd_auto_lease_what_it_is_lease_cons=le,Ye.set(i))}function Vt(le){e.$$.not_equal(i.sd_auto_lease_what_it_is_purchase_pros,le)&&(i.sd_auto_lease_what_it_is_purchase_pros=le,Ye.set(i))}function _i(le){e.$$.not_equal(i.sd_auto_lease_what_it_is_purchase_cons,le)&&(i.sd_auto_lease_what_it_is_purchase_cons=le,Ye.set(i))}function xe(le){e.$$.not_equal(i.sd_auto_lease_business_use,le)&&(i.sd_auto_lease_business_use=le,Ye.set(i))}function Ue(le){e.$$.not_equal(i.sd_auto_lease_purchase_price,le)&&(i.sd_auto_lease_purchase_price=le,Ye.set(i))}function pe(le){e.$$.not_equal(i.sd_auto_lease_vehicle_weight,le)&&(i.sd_auto_lease_vehicle_weight=le,Ye.set(i))}function Ae(le){e.$$.not_equal(i.sd_auto_lease_lease_payment,le)&&(i.sd_auto_lease_lease_payment=le,Ye.set(i))}function at(le){e.$$.not_equal(i.sd_auto_lease_lease_term,le)&&(i.sd_auto_lease_lease_term=le,Ye.set(i))}function gt(le){e.$$.not_equal(i.sd_auto_lease_lease_expense_first_year,le)&&(i.sd_auto_lease_lease_expense_first_year=le,Ye.set(i))}function nt(le){e.$$.not_equal(i.sd_auto_lease_lease_tax_savings_first_year,le)&&(i.sd_auto_lease_lease_tax_savings_first_year=le,Ye.set(i))}function jt(le){e.$$.not_equal(i.sd_auto_lease_lease_expense_second_year,le)&&(i.sd_auto_lease_lease_expense_second_year=le,Ye.set(i))}function Yt(le){e.$$.not_equal(i.sd_auto_lease_lease_tax_savings_second_year,le)&&(i.sd_auto_lease_lease_tax_savings_second_year=le,Ye.set(i))}function Mn(le){e.$$.not_equal(i.sd_auto_lease_lease_expense_third_year,le)&&(i.sd_auto_lease_lease_expense_third_year=le,Ye.set(i))}function Yn(le){e.$$.not_equal(i.sd_auto_lease_lease_tax_savings_third_year,le)&&(i.sd_auto_lease_lease_tax_savings_third_year=le,Ye.set(i))}function Wn(le){e.$$.not_equal(i.sd_auto_lease_lease_expense_fourth_year,le)&&(i.sd_auto_lease_lease_expense_fourth_year=le,Ye.set(i))}function ei(le){e.$$.not_equal(i.sd_auto_lease_lease_tax_savings_fourth_year,le)&&(i.sd_auto_lease_lease_tax_savings_fourth_year=le,Ye.set(i))}function Fi(le){e.$$.not_equal(i.sd_auto_lease_lease_expense_fifth_year,le)&&(i.sd_auto_lease_lease_expense_fifth_year=le,Ye.set(i))}function Tr(le){e.$$.not_equal(i.sd_auto_lease_lease_tax_savings_fifth_year,le)&&(i.sd_auto_lease_lease_tax_savings_fifth_year=le,Ye.set(i))}function Yr(le){e.$$.not_equal(i.sd_auto_lease_purchase_depreciation_first_year,le)&&(i.sd_auto_lease_purchase_depreciation_first_year=le,Ye.set(i))}function yr(le){e.$$.not_equal(i.sd_auto_lease_purchase_tax_savings_first_year,le)&&(i.sd_auto_lease_purchase_tax_savings_first_year=le,Ye.set(i))}function ka(le){e.$$.not_equal(i.sd_auto_lease_purchase_depreciation_second_year,le)&&(i.sd_auto_lease_purchase_depreciation_second_year=le,Ye.set(i))}function fr(le){e.$$.not_equal(i.sd_auto_lease_purchase_tax_savings_second_year,le)&&(i.sd_auto_lease_purchase_tax_savings_second_year=le,Ye.set(i))}function Nr(le){e.$$.not_equal(i.sd_auto_lease_purchase_depreciation_third_year,le)&&(i.sd_auto_lease_purchase_depreciation_third_year=le,Ye.set(i))}function Na(le){e.$$.not_equal(i.sd_auto_lease_purchase_tax_savings_third_year,le)&&(i.sd_auto_lease_purchase_tax_savings_third_year=le,Ye.set(i))}function Wa(le){e.$$.not_equal(i.sd_auto_lease_purchase_depreciation_fourth_year,le)&&(i.sd_auto_lease_purchase_depreciation_fourth_year=le,Ye.set(i))}function da(le){e.$$.not_equal(i.sd_auto_lease_purchase_tax_savings_fourth_year,le)&&(i.sd_auto_lease_purchase_tax_savings_fourth_year=le,Ye.set(i))}function Sa(le){e.$$.not_equal(i.sd_auto_lease_purchase_depreciation_fifth_year,le)&&(i.sd_auto_lease_purchase_depreciation_fifth_year=le,Ye.set(i))}function Br(le){e.$$.not_equal(i.sd_auto_lease_purchase_tax_savings_fifth_year,le)&&(i.sd_auto_lease_purchase_tax_savings_fifth_year=le,Ye.set(i))}function Ks(le){e.$$.not_equal(i.sd_auto_lease_enable,le)&&(i.sd_auto_lease_enable=le,Ye.set(i))}function Qr(le){e.$$.not_equal(i.top_3_strategy_picks_traditional_ira_contributions,le)&&(i.top_3_strategy_picks_traditional_ira_contributions=le,Ye.set(i))}function Oi(le){e.$$.not_equal(i.top_3_strategy_picks_traditional_ira_saves_you,le)&&(i.top_3_strategy_picks_traditional_ira_saves_you=le,Ye.set(i))}function Fs(le,vn){e.$$.not_equal(i[`sd_${vn}_what_it_is_text`],le)&&(i[`sd_${vn}_what_it_is_text`]=le,Ye.set(i))}function Qa(le,vn){e.$$.not_equal(i[`sd_${vn}_planner_description`],le)&&(i[`sd_${vn}_planner_description`]=le,Ye.set(i))}function as(le,vn){e.$$.not_equal(i[`sd_${vn}_taxes_contributions_grow`],le)&&(i[`sd_${vn}_taxes_contributions_grow`]=le,Ye.set(i))}function bo(le,vn){e.$$.not_equal(i[`sd_${vn}_taxes_tax_deductibility`],le)&&(i[`sd_${vn}_taxes_tax_deductibility`]=le,Ye.set(i))}function yo(le,vn){e.$$.not_equal(i[`sd_${vn}_contributions_come_from`],le)&&(i[`sd_${vn}_contributions_come_from`]=le,Ye.set(i))}function Ts(le,vn){e.$$.not_equal(i[`sd_${vn}_contributions_max_contribution`],le)&&(i[`sd_${vn}_contributions_max_contribution`]=le,Ye.set(i))}function Ls(le,vn){e.$$.not_equal(i[`sd_${vn}_withdrawals_penalties`],le)&&(i[`sd_${vn}_withdrawals_penalties`]=le,Ye.set(i))}function wo(le,vn){e.$$.not_equal(i[`sd_${vn}_withdrawals_mandatory_distributions`],le)&&(i[`sd_${vn}_withdrawals_mandatory_distributions`]=le,Ye.set(i))}function Is(le,vn,ui){e.$$.not_equal(i[`sd_${vn}_tax_saving_${ui}_wages`],le)&&(i[`sd_${vn}_tax_saving_${ui}_wages`]=le,Ye.set(i))}function Hs(le,vn,ui){e.$$.not_equal(i[`sd_${vn}_tax_saving_${ui}_contributions`],le)&&(i[`sd_${vn}_tax_saving_${ui}_contributions`]=le,Ye.set(i))}function pl(le,vn,ui){e.$$.not_equal(i[`sd_${vn}_tax_saving_options_${ui}_contribute`],le)&&(i[`sd_${vn}_tax_saving_options_${ui}_contribute`]=le,Ye.set(i))}function zo(le,vn,ui){e.$$.not_equal(i[`sd_${vn}_tax_saving_options_${ui}_saves_you`],le)&&(i[`sd_${vn}_tax_saving_options_${ui}_saves_you`]=le,Ye.set(i))}function cs(le){e.$$.not_equal(i.sd_traditional_and_roth_ira_enable,le)&&(i.sd_traditional_and_roth_ira_enable=le,Ye.set(i))}function ss(le){e.$$.not_equal(i.top_3_strategy_picks_health_savings_type,le)&&(i.top_3_strategy_picks_health_savings_type=le,Ye.set(i))}function Xs(le){e.$$.not_equal(i.top_3_strategy_picks_health_savings_adding,le)&&(i.top_3_strategy_picks_health_savings_adding=le,Ye.set(i))}function Qs(le){e.$$.not_equal(i.top_3_strategy_picks_health_savings_saves_you,le)&&(i.top_3_strategy_picks_health_savings_saves_you=le,Ye.set(i))}function Yo(le){e.$$.not_equal(i.sd_health_savings_what_it_is_text,le)&&(i.sd_health_savings_what_it_is_text=le,Ye.set(i))}function gu(le){e.$$.not_equal(i.sd_health_savings_description,le)&&(i.sd_health_savings_description=le,Ye.set(i))}function Vu(le,vn){e.$$.not_equal(i[`sd_health_savings_contribution_limits_${vn}_tax_year`],le)&&(i[`sd_health_savings_contribution_limits_${vn}_tax_year`]=le,Ye.set(i))}function Ll(le,vn,ui,js){e.$$.not_equal(i[`sd_health_savings_contribution_limits_${vn}_${ui}_${js}`],le)&&(i[`sd_health_savings_contribution_limits_${vn}_${ui}_${js}`]=le,Ye.set(i))}function Hl(le,vn,ui){e.$$.not_equal(i[`sd_health_savings_tax_saving_options_${vn}_${ui}`],le)&&(i[`sd_health_savings_tax_saving_options_${vn}_${ui}`]=le,Ye.set(i))}function zu(le){e.$$.not_equal(i.sd_health_savings_enable,le)&&(i.sd_health_savings_enable=le,Ye.set(i))}function vf(le){e.$$.not_equal(i.top_3_strategy_picks_defined_benefit_adding,le)&&(i.top_3_strategy_picks_defined_benefit_adding=le,Ye.set(i))}function hl(le){e.$$.not_equal(i.top_3_strategy_picks_defined_benefit_saves_you,le)&&(i.top_3_strategy_picks_defined_benefit_saves_you=le,Ye.set(i))}function To(le){e.$$.not_equal(i.sd_defined_benefit_what_it_is_text,le)&&(i.sd_defined_benefit_what_it_is_text=le,Ye.set(i))}function _s(le){e.$$.not_equal(i.sd_defined_benefit_what_it_is_first_item,le)&&(i.sd_defined_benefit_what_it_is_first_item=le,Ye.set(i))}function vu(le){e.$$.not_equal(i.sd_defined_benefit_what_it_is_second_item,le)&&(i.sd_defined_benefit_what_it_is_second_item=le,Ye.set(i))}function bf(le){e.$$.not_equal(i.sd_defined_benefit_what_it_is_third_item,le)&&(i.sd_defined_benefit_what_it_is_third_item=le,Ye.set(i))}function ml(le){e.$$.not_equal(i.sd_defined_benefit_what_it_is_fourth_item,le)&&(i.sd_defined_benefit_what_it_is_fourth_item=le,Ye.set(i))}function Go(le){e.$$.not_equal(i.sd_defined_benefit_ratings_text,le)&&(i.sd_defined_benefit_ratings_text=le,Ye.set(i))}function yf(le){e.$$.not_equal(i.sd_defined_benefit_current_taxable_income,le)&&(i.sd_defined_benefit_current_taxable_income=le,Ye.set(i))}function ko(le){e.$$.not_equal(i.sd_defined_benefit_current_pension_contributions,le)&&(i.sd_defined_benefit_current_pension_contributions=le,Ye.set(i))}function So(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_first_expense,le)&&(i.sd_defined_benefit_tax_saving_options_first_expense=le,Ye.set(i))}function gl(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_first_saves_you,le)&&(i.sd_defined_benefit_tax_saving_options_first_saves_you=le,Ye.set(i))}function fa(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_second_expense,le)&&(i.sd_defined_benefit_tax_saving_options_second_expense=le,Ye.set(i))}function Ko(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_second_saves_you,le)&&(i.sd_defined_benefit_tax_saving_options_second_saves_you=le,Ye.set(i))}function Co(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_third_expense,le)&&(i.sd_defined_benefit_tax_saving_options_third_expense=le,Ye.set(i))}function vl(le){e.$$.not_equal(i.sd_defined_benefit_tax_saving_options_third_saves_you,le)&&(i.sd_defined_benefit_tax_saving_options_third_saves_you=le,Ye.set(i))}function wf(le){e.$$.not_equal(i.sd_defined_benefit_enable,le)&&(i.sd_defined_benefit_enable=le,Ye.set(i))}function ks(le){e.$$.not_equal(i.sd_etp_what_it_is_text,le)&&(i.sd_etp_what_it_is_text=le,Ye.set(i))}function bl(le){e.$$.not_equal(i.sd_etp_what_it_is_first_item,le)&&(i.sd_etp_what_it_is_first_item=le,Ye.set(i))}function Yu(le){e.$$.not_equal(i.sd_etp_what_it_is_second_item,le)&&(i.sd_etp_what_it_is_second_item=le,Ye.set(i))}function Gu(le){e.$$.not_equal(i.sd_etp_what_it_is_third_item,le)&&(i.sd_etp_what_it_is_third_item=le,Ye.set(i))}function Ja(le){e.$$.not_equal(i.sd_etp_previous_tax_year,le)&&(i.sd_etp_previous_tax_year=le,Ye.set(i))}function jl(le){e.$$.not_equal(i.sd_etp_current_tax_year,le)&&(i.sd_etp_current_tax_year=le,Ye.set(i))}function Ku(le,vn){e.$$.not_equal(i[`sd_etp_projected_${vn}_tax_due`],le)&&(i[`sd_etp_projected_${vn}_tax_due`]=le,Ye.set(i))}function Bl(le,vn){e.$$.not_equal(i[`sd_etp_previous_year_${vn}_tax`],le)&&(i[`sd_etp_previous_year_${vn}_tax`]=le,Ye.set(i))}function As(le,vn){e.$$.not_equal(i[`sd_etp_${vn}_agi`],le)&&(i[`sd_etp_${vn}_agi`]=le,Ye.set(i))}function Tf(le,vn){e.$$.not_equal(i[`sd_etp_${vn}_safe_harbor`],le)&&(i[`sd_etp_${vn}_safe_harbor`]=le,Ye.set(i))}function Xo(le,vn){e.$$.not_equal(i[`sd_etp_quarters_${vn}_due_date`],le)&&(i[`sd_etp_quarters_${vn}_due_date`]=le,Ye.set(i))}function Xu(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_required_${ui}_payment`],le)&&(i[`sd_etp_quarters_${vn}_required_${ui}_payment`]=le,Ye.set(i))}function so(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_projected_${ui}_payment`],le)&&(i[`sd_etp_quarters_${vn}_projected_${ui}_payment`]=le,Ye.set(i))}function $d(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_${ui}_payment_made`],le)&&(i[`sd_etp_quarters_${vn}_${ui}_payment_made`]=le,Ye.set(i))}function yl(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_${ui}_cumulative_shortfall`],le)&&(i[`sd_etp_quarters_${vn}_${ui}_cumulative_shortfall`]=le,Ye.set(i))}function Ul(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_${ui}_payment_made`],le)&&(i[`sd_etp_quarters_${vn}_${ui}_payment_made`]=le,Ye.set(i))}function bu(le,vn,ui){e.$$.not_equal(i[`sd_etp_quarters_${vn}_${ui}_cumulative_shortfall`],le)&&(i[`sd_etp_quarters_${vn}_${ui}_cumulative_shortfall`]=le,Ye.set(i))}function Nd(le){e.$$.not_equal(i.sd_etp_enable,le)&&(i.sd_etp_enable=le,Ye.set(i))}function ql(le){e.$$.not_equal(i.sd_enable,le)&&(i.sd_enable=le,Ye.set(i))}return e.$$set=le=>{"refreshReportParams"in le&&n(0,a=le.refreshReportParams),"unpermittedReportAtrributes"in le&&n(4,s=le.unpermittedReportAtrributes)},[a,i,r,o,s,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt,on,In,dt,Zt,Ln,xn,Dn,Un,qn,ft,ni,Et,un,Ai,St,sn,ci,pi,Pi,$i,ji,ri,tr,Ei,Ti,kn,Rn,ki,mr,_r,Mi,di,Yi,na,Ki,Rr,Di,Wi,Bi,_a,xi,Kr,kr,Ji,ia,la,Ir,Ur,qr,Ht,et,ln,Vi,Ar,vr,ir,Si,pr,yi,Dr,Wr,Sr,hr,Vn,dn,wr,Bn,ra,_n,Vr,rr,Or,Ui,Fr,wi,Ni,ar,sr,Gi,Cr,or,lr,Ka,Lr,nr,wa,zr,Ze,tn,Xr,ur,Hr,Xi,dr,pa,qt,mn,ai,Ra,aa,ga,Ta,va,$r,ua,an,gi,jr,Ia,Xa,Ha,$a,Ii,br,Aa,Vt,_i,xe,Ue,pe,Ae,at,gt,nt,jt,Yt,Mn,Yn,Wn,ei,Fi,Tr,Yr,yr,ka,fr,Nr,Na,Wa,da,Sa,Br,Ks,Qr,Oi,Fs,Qa,as,bo,yo,Ts,Ls,wo,Is,Hs,pl,zo,cs,ss,Xs,Qs,Yo,gu,Vu,Ll,Hl,zu,vf,hl,To,_s,vu,bf,ml,Go,yf,ko,So,gl,fa,Ko,Co,vl,wf,ks,bl,Yu,Gu,Ja,jl,Ku,Bl,As,Tf,Xo,Xu,so,$d,yl,Ul,bu,Nd,ql]}class Sce extends Qt{constructor(t){super(),Jt(this,t,kce,Tce,Kt,{refreshReportParams:0,unpermittedReportAtrributes:4},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}}function Cce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E;function y(ne){e[9](ne)}let I={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_name",hidden:e[3].isHidden("Name")};e[2].your_demographics_personal_data_name!==void 0&&(I.value=e[2].your_demographics_personal_data_name),t=new li({props:I}),Oe.push(()=>$e(t,"value",y));function D(ne){e[10](ne)}let O={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_number_of_dependents",hidden:e[3].isHidden("Number Of Dependents")};e[2].your_demographics_personal_data_number_of_dependents!==void 0&&(O.value=e[2].your_demographics_personal_data_number_of_dependents),i=new ff({props:O}),Oe.push(()=>$e(i,"value",D));function M(ne){e[11](ne)}let F={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_state_of_residency",options:iB,hidden:e[3].isHidden("State Of Residency")};e[2].your_demographics_personal_data_state_of_residency!==void 0&&(F.value=e[2].your_demographics_personal_data_state_of_residency),a=new Ml({props:F}),Oe.push(()=>$e(a,"value",M));function $(ne){e[12](ne)}let L={refreshReportParams:e[0],specTreeNodeId:"filing_status",options:tB,hidden:e[3].isHidden("Filing Status")};e[2].filing_status!==void 0&&(L.value=e[2].filing_status),o=new Ml({props:L}),Oe.push(()=>$e(o,"value",$));function j(ne){e[13](ne)}let H={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_tax_brackets",hidden:e[3].isHidden("Marginal Tax Rate")};e[2].your_demographics_personal_data_tax_brackets!==void 0&&(H.value=e[2].your_demographics_personal_data_tax_brackets),d=new ff({props:H}),Oe.push(()=>$e(d,"value",j));function V(ne){e[14](ne)}let Q={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_extra_field_name",hidden:e[3].isHidden("Extra Field Name")};e[2].your_demographics_personal_data_extra_field_name!==void 0&&(Q.value=e[2].your_demographics_personal_data_extra_field_name),v=new li({props:Q}),Oe.push(()=>$e(v,"value",V));function X(ne){e[15](ne)}let te={refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data_extra_field",hidden:e[3].isHidden("Extra Field")};return e[2].your_demographics_personal_data_extra_field!==void 0&&(te.value=e[2].your_demographics_personal_data_extra_field),b=new li({props:te}),Oe.push(()=>$e(b,"value",X)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment)},m(ne,be){ae(t,ne,be),ae(i,ne,be),ae(a,ne,be),ae(o,ne,be),ae(d,ne,be),ae(v,ne,be),ae(b,ne,be),E=!0},p(ne,be){const ue={};be[0]&1&&(ue.refreshReportParams=ne[0]),be[0]&8&&(ue.hidden=ne[3].isHidden("Name")),!n&&be[0]&4&&(n=!0,ue.value=ne[2].your_demographics_personal_data_name,Ne(()=>n=!1)),t.$set(ue);const Ce={};be[0]&1&&(Ce.refreshReportParams=ne[0]),be[0]&8&&(Ce.hidden=ne[3].isHidden("Number Of Dependents")),!r&&be[0]&4&&(r=!0,Ce.value=ne[2].your_demographics_personal_data_number_of_dependents,Ne(()=>r=!1)),i.$set(Ce);const ie={};be[0]&1&&(ie.refreshReportParams=ne[0]),be[0]&8&&(ie.hidden=ne[3].isHidden("State Of Residency")),!s&&be[0]&4&&(s=!0,ie.value=ne[2].your_demographics_personal_data_state_of_residency,Ne(()=>s=!1)),a.$set(ie);const Y={};be[0]&1&&(Y.refreshReportParams=ne[0]),be[0]&8&&(Y.hidden=ne[3].isHidden("Filing Status")),!l&&be[0]&4&&(l=!0,Y.value=ne[2].filing_status,Ne(()=>l=!1)),o.$set(Y);const he={};be[0]&1&&(he.refreshReportParams=ne[0]),be[0]&8&&(he.hidden=ne[3].isHidden("Marginal Tax Rate")),!c&&be[0]&4&&(c=!0,he.value=ne[2].your_demographics_personal_data_tax_brackets,Ne(()=>c=!1)),d.$set(he);const Me={};be[0]&1&&(Me.refreshReportParams=ne[0]),be[0]&8&&(Me.hidden=ne[3].isHidden("Extra Field Name")),!T&&be[0]&4&&(T=!0,Me.value=ne[2].your_demographics_personal_data_extra_field_name,Ne(()=>T=!1)),v.$set(Me);const Pe={};be[0]&1&&(Pe.refreshReportParams=ne[0]),be[0]&8&&(Pe.hidden=ne[3].isHidden("Extra Field")),!A&&be[0]&4&&(A=!0,Pe.value=ne[2].your_demographics_personal_data_extra_field,Ne(()=>A=!1)),b.$set(Pe)},i(ne){E||(U(t.$$.fragment,ne),U(i.$$.fragment,ne),U(a.$$.fragment,ne),U(o.$$.fragment,ne),U(d.$$.fragment,ne),U(v.$$.fragment,ne),U(b.$$.fragment,ne),E=!0)},o(ne){W(t.$$.fragment,ne),W(i.$$.fragment,ne),W(a.$$.fragment,ne),W(o.$$.fragment,ne),W(d.$$.fragment,ne),W(v.$$.fragment,ne),W(b.$$.fragment,ne),E=!1},d(ne){se(t,ne),se(i,ne),se(a,ne),se(o,ne),se(d,ne),se(v,ne),se(b,ne)}}}function Pce(e){let t,n,i,r,a,s,o,l,d;function c(D){e[16](D)}let v={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_first_business_name",hidden:e[3].isHidden("Name")};e[2].your_demographics_business_data_first_business_name!==void 0&&(v.value=e[2].your_demographics_business_data_first_business_name),t=new li({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[17](D)}let b={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_first_business_entity_type",options:em,hidden:e[3].isHidden("Type")};e[2].your_demographics_business_data_first_business_entity_type!==void 0&&(b.value=e[2].your_demographics_business_data_first_business_entity_type),i=new Ml({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[18](D)}let E={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_first_ownership_share",hidden:e[3].isHidden("Ownership Share")};e[2].your_demographics_business_data_first_ownership_share!==void 0&&(E.value=e[2].your_demographics_business_data_first_ownership_share),a=new ff({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[19](D)}let I={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_first_start_date",hidden:e[3].isHidden("Start Date")};return e[2].your_demographics_business_data_first_start_date!==void 0&&(I.value=e[2].your_demographics_business_data_first_start_date),o=new Hp({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){const M={};O[0]&1&&(M.refreshReportParams=D[0]),O[0]&8&&(M.hidden=D[3].isHidden("Name")),!n&&O[0]&4&&(n=!0,M.value=D[2].your_demographics_business_data_first_business_name,Ne(()=>n=!1)),t.$set(M);const F={};O[0]&1&&(F.refreshReportParams=D[0]),O[0]&8&&(F.hidden=D[3].isHidden("Type")),!r&&O[0]&4&&(r=!0,F.value=D[2].your_demographics_business_data_first_business_entity_type,Ne(()=>r=!1)),i.$set(F);const $={};O[0]&1&&($.refreshReportParams=D[0]),O[0]&8&&($.hidden=D[3].isHidden("Ownership Share")),!s&&O[0]&4&&(s=!0,$.value=D[2].your_demographics_business_data_first_ownership_share,Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=D[0]),O[0]&8&&(L.hidden=D[3].isHidden("Start Date")),!l&&O[0]&4&&(l=!0,L.value=D[2].your_demographics_business_data_first_start_date,Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function Ece(e){let t,n,i,r,a,s,o,l,d;function c(D){e[21](D)}let v={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_second_business_name",hidden:e[3].isHidden("Name")};e[2].your_demographics_business_data_second_business_name!==void 0&&(v.value=e[2].your_demographics_business_data_second_business_name),t=new li({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[22](D)}let b={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_second_business_entity_type",options:em,hidden:e[3].isHidden("Type")};e[2].your_demographics_business_data_second_business_entity_type!==void 0&&(b.value=e[2].your_demographics_business_data_second_business_entity_type),i=new Ml({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[23](D)}let E={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_second_ownership_share",hidden:e[3].isHidden("Ownership Share")};e[2].your_demographics_business_data_second_ownership_share!==void 0&&(E.value=e[2].your_demographics_business_data_second_ownership_share),a=new ff({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[24](D)}let I={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_second_start_date",hidden:e[3].isHidden("Start Date")};return e[2].your_demographics_business_data_second_start_date!==void 0&&(I.value=e[2].your_demographics_business_data_second_start_date),o=new Hp({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){const M={};O[0]&1&&(M.refreshReportParams=D[0]),O[0]&8&&(M.hidden=D[3].isHidden("Name")),!n&&O[0]&4&&(n=!0,M.value=D[2].your_demographics_business_data_second_business_name,Ne(()=>n=!1)),t.$set(M);const F={};O[0]&1&&(F.refreshReportParams=D[0]),O[0]&8&&(F.hidden=D[3].isHidden("Type")),!r&&O[0]&4&&(r=!0,F.value=D[2].your_demographics_business_data_second_business_entity_type,Ne(()=>r=!1)),i.$set(F);const $={};O[0]&1&&($.refreshReportParams=D[0]),O[0]&8&&($.hidden=D[3].isHidden("Ownership Share")),!s&&O[0]&4&&(s=!0,$.value=D[2].your_demographics_business_data_second_ownership_share,Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=D[0]),O[0]&8&&(L.hidden=D[3].isHidden("Start Date")),!l&&O[0]&4&&(l=!0,L.value=D[2].your_demographics_business_data_second_start_date,Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function Ice(e){let t,n,i,r,a,s,o,l,d;function c(D){e[26](D)}let v={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_third_business_name",hidden:e[3].isHidden("Name")};e[2].your_demographics_business_data_third_business_name!==void 0&&(v.value=e[2].your_demographics_business_data_third_business_name),t=new li({props:v}),Oe.push(()=>$e(t,"value",c));function T(D){e[27](D)}let b={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_third_business_entity_type",options:em,hidden:e[3].isHidden("Type")};e[2].your_demographics_business_data_third_business_entity_type!==void 0&&(b.value=e[2].your_demographics_business_data_third_business_entity_type),i=new Ml({props:b}),Oe.push(()=>$e(i,"value",T));function A(D){e[28](D)}let E={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_third_ownership_share",hidden:e[3].isHidden("Ownership Share")};e[2].your_demographics_business_data_third_ownership_share!==void 0&&(E.value=e[2].your_demographics_business_data_third_ownership_share),a=new ff({props:E}),Oe.push(()=>$e(a,"value",A));function y(D){e[29](D)}let I={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_third_start_date",hidden:e[3].isHidden("Start Date")};return e[2].your_demographics_business_data_third_start_date!==void 0&&(I.value=e[2].your_demographics_business_data_third_start_date),o=new Hp({props:I}),Oe.push(()=>$e(o,"value",y)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment)},m(D,O){ae(t,D,O),ae(i,D,O),ae(a,D,O),ae(o,D,O),d=!0},p(D,O){const M={};O[0]&1&&(M.refreshReportParams=D[0]),O[0]&8&&(M.hidden=D[3].isHidden("Name")),!n&&O[0]&4&&(n=!0,M.value=D[2].your_demographics_business_data_third_business_name,Ne(()=>n=!1)),t.$set(M);const F={};O[0]&1&&(F.refreshReportParams=D[0]),O[0]&8&&(F.hidden=D[3].isHidden("Type")),!r&&O[0]&4&&(r=!0,F.value=D[2].your_demographics_business_data_third_business_entity_type,Ne(()=>r=!1)),i.$set(F);const $={};O[0]&1&&($.refreshReportParams=D[0]),O[0]&8&&($.hidden=D[3].isHidden("Ownership Share")),!s&&O[0]&4&&(s=!0,$.value=D[2].your_demographics_business_data_third_ownership_share,Ne(()=>s=!1)),a.$set($);const L={};O[0]&1&&(L.refreshReportParams=D[0]),O[0]&8&&(L.hidden=D[3].isHidden("Start Date")),!l&&O[0]&4&&(l=!0,L.value=D[2].your_demographics_business_data_third_start_date,Ne(()=>l=!1)),o.$set(L)},i(D){d||(U(t.$$.fragment,D),U(i.$$.fragment,D),U(a.$$.fragment,D),U(o.$$.fragment,D),d=!0)},o(D){W(t.$$.fragment,D),W(i.$$.fragment,D),W(a.$$.fragment,D),W(o.$$.fragment,D),d=!1},d(D){se(t,D),se(i,D),se(a,D),se(o,D)}}}function Ace(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L;function j(we){e[31](we)}let H={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_federal_tax_due",hidden:e[3].isHidden("Federal Tax Due")};e[2].your_demographics_taxes_federal_tax_due!==void 0&&(H.value=e[2].your_demographics_taxes_federal_tax_due),t=new xt({props:H}),Oe.push(()=>$e(t,"value",j));function V(we){e[32](we)}let Q={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_payments_and_credits",hidden:e[3].isHidden("Payments And Credits")};e[2].your_demographics_taxes_payments_and_credits!==void 0&&(Q.value=e[2].your_demographics_taxes_payments_and_credits),i=new xt({props:Q}),Oe.push(()=>$e(i,"value",V));function X(we){e[33](we)}let te={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_remaining_amount_due",hidden:e[3].isHidden("Remaining Amount Due")};e[2].your_demographics_taxes_remaining_amount_due!==void 0&&(te.value=e[2].your_demographics_taxes_remaining_amount_due),a=new xt({props:te}),Oe.push(()=>$e(a,"value",X));function ne(we){e[34](we)}let be={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_business_state_tax_due",hidden:e[3].isHidden("Business State Tax Due")};e[2].your_demographics_taxes_business_state_tax_due!==void 0&&(be.value=e[2].your_demographics_taxes_business_state_tax_due),o=new xt({props:be}),Oe.push(()=>$e(o,"value",ne));function ue(we){e[35](we)}let Ce={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_business_payments_and_credits",hidden:e[3].isHidden("Business Payments And Credits")};e[2].your_demographics_taxes_business_payments_and_credits!==void 0&&(Ce.value=e[2].your_demographics_taxes_business_payments_and_credits),d=new xt({props:Ce}),Oe.push(()=>$e(d,"value",ue));function ie(we){e[36](we)}let Y={refreshReportParams:e[0],specTreeNodeId:"your_demographics_taxes_business_remaining_amount_due",hidden:e[3].isHidden("Business Remaining Amount Due")};e[2].your_demographics_taxes_business_remaining_amount_due!==void 0&&(Y.value=e[2].your_demographics_taxes_business_remaining_amount_due),v=new xt({props:Y}),Oe.push(()=>$e(v,"value",ie));function he(we){e[37](we)}let Me={refreshReportParams:e[0],specTreeNodeId:"your_demographics_next_lower_tax_bracket_income_level",hidden:e[3].isHidden("Next Lower Level Tax Bracket Income Level")};e[2].your_demographics_next_lower_tax_bracket_income_level!==void 0&&(Me.value=e[2].your_demographics_next_lower_tax_bracket_income_level),b=new xt({props:Me}),Oe.push(()=>$e(b,"value",he));function Pe(we){e[38](we)}let We={refreshReportParams:e[0],specTreeNodeId:"your_demographics_lower_taxable_income_by",hidden:e[3].isHidden("Lower Taxable Income By")};e[2].your_demographics_lower_taxable_income_by!==void 0&&(We.value=e[2].your_demographics_lower_taxable_income_by),E=new xt({props:We}),Oe.push(()=>$e(E,"value",Pe));function qe(we){e[39](we)}let ee={refreshReportParams:e[0],specTreeNodeId:"your_demographics_married_and_separate_fed_tax_savings",hidden:e[3].isHidden("Federal Tax Savings If Filed Reverse Type: Joint or Separate")};e[2].your_demographics_married_and_separate_fed_tax_savings!==void 0&&(ee.value=e[2].your_demographics_married_and_separate_fed_tax_savings),I=new xt({props:ee}),Oe.push(()=>$e(I,"value",qe));function G(we){e[40](we)}let me={refreshReportParams:e[0],specTreeNodeId:"your_demographics_being_s_corp_fed_tax_has_saved",hidden:e[3].isHidden("Federal Tax Savings Because of Current S-Corp Companies")};e[2].your_demographics_being_s_corp_fed_tax_has_saved!==void 0&&(me.value=e[2].your_demographics_being_s_corp_fed_tax_has_saved),O=new xt({props:me}),Oe.push(()=>$e(O,"value",G));function Te(we){e[41](we)}let De={refreshReportParams:e[0],specTreeNodeId:"your_demographics_being_s_corp_fed_tax_can_save",hidden:e[3].isHidden("Federal Tax Savings If Switch the Rest of the Companies to S-Corp")};return e[2].your_demographics_being_s_corp_fed_tax_can_save!==void 0&&(De.value=e[2].your_demographics_being_s_corp_fed_tax_can_save),F=new xt({props:De}),Oe.push(()=>$e(F,"value",Te)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment),re(I.$$.fragment),re(O.$$.fragment),re(F.$$.fragment)},m(we,Ve){ae(t,we,Ve),ae(i,we,Ve),ae(a,we,Ve),ae(o,we,Ve),ae(d,we,Ve),ae(v,we,Ve),ae(b,we,Ve),ae(E,we,Ve),ae(I,we,Ve),ae(O,we,Ve),ae(F,we,Ve),L=!0},p(we,Ve){const Ke={};Ve[0]&1&&(Ke.refreshReportParams=we[0]),Ve[0]&8&&(Ke.hidden=we[3].isHidden("Federal Tax Due")),!n&&Ve[0]&4&&(n=!0,Ke.value=we[2].your_demographics_taxes_federal_tax_due,Ne(()=>n=!1)),t.$set(Ke);const yt={};Ve[0]&1&&(yt.refreshReportParams=we[0]),Ve[0]&8&&(yt.hidden=we[3].isHidden("Payments And Credits")),!r&&Ve[0]&4&&(r=!0,yt.value=we[2].your_demographics_taxes_payments_and_credits,Ne(()=>r=!1)),i.$set(yt);const ht={};Ve[0]&1&&(ht.refreshReportParams=we[0]),Ve[0]&8&&(ht.hidden=we[3].isHidden("Remaining Amount Due")),!s&&Ve[0]&4&&(s=!0,ht.value=we[2].your_demographics_taxes_remaining_amount_due,Ne(()=>s=!1)),a.$set(ht);const Je={};Ve[0]&1&&(Je.refreshReportParams=we[0]),Ve[0]&8&&(Je.hidden=we[3].isHidden("Business State Tax Due")),!l&&Ve[0]&4&&(l=!0,Je.value=we[2].your_demographics_taxes_business_state_tax_due,Ne(()=>l=!1)),o.$set(Je);const pt={};Ve[0]&1&&(pt.refreshReportParams=we[0]),Ve[0]&8&&(pt.hidden=we[3].isHidden("Business Payments And Credits")),!c&&Ve[0]&4&&(c=!0,pt.value=we[2].your_demographics_taxes_business_payments_and_credits,Ne(()=>c=!1)),d.$set(pt);const Tt={};Ve[0]&1&&(Tt.refreshReportParams=we[0]),Ve[0]&8&&(Tt.hidden=we[3].isHidden("Business Remaining Amount Due")),!T&&Ve[0]&4&&(T=!0,Tt.value=we[2].your_demographics_taxes_business_remaining_amount_due,Ne(()=>T=!1)),v.$set(Tt);const it={};Ve[0]&1&&(it.refreshReportParams=we[0]),Ve[0]&8&&(it.hidden=we[3].isHidden("Next Lower Level Tax Bracket Income Level")),!A&&Ve[0]&4&&(A=!0,it.value=we[2].your_demographics_next_lower_tax_bracket_income_level,Ne(()=>A=!1)),b.$set(it);const Ge={};Ve[0]&1&&(Ge.refreshReportParams=we[0]),Ve[0]&8&&(Ge.hidden=we[3].isHidden("Lower Taxable Income By")),!y&&Ve[0]&4&&(y=!0,Ge.value=we[2].your_demographics_lower_taxable_income_by,Ne(()=>y=!1)),E.$set(Ge);const st={};Ve[0]&1&&(st.refreshReportParams=we[0]),Ve[0]&8&&(st.hidden=we[3].isHidden("Federal Tax Savings If Filed Reverse Type: Joint or Separate")),!D&&Ve[0]&4&&(D=!0,st.value=we[2].your_demographics_married_and_separate_fed_tax_savings,Ne(()=>D=!1)),I.$set(st);const It={};Ve[0]&1&&(It.refreshReportParams=we[0]),Ve[0]&8&&(It.hidden=we[3].isHidden("Federal Tax Savings Because of Current S-Corp Companies")),!M&&Ve[0]&4&&(M=!0,It.value=we[2].your_demographics_being_s_corp_fed_tax_has_saved,Ne(()=>M=!1)),O.$set(It);const Ct={};Ve[0]&1&&(Ct.refreshReportParams=we[0]),Ve[0]&8&&(Ct.hidden=we[3].isHidden("Federal Tax Savings If Switch the Rest of the Companies to S-Corp")),!$&&Ve[0]&4&&($=!0,Ct.value=we[2].your_demographics_being_s_corp_fed_tax_can_save,Ne(()=>$=!1)),F.$set(Ct)},i(we){L||(U(t.$$.fragment,we),U(i.$$.fragment,we),U(a.$$.fragment,we),U(o.$$.fragment,we),U(d.$$.fragment,we),U(v.$$.fragment,we),U(b.$$.fragment,we),U(E.$$.fragment,we),U(I.$$.fragment,we),U(O.$$.fragment,we),U(F.$$.fragment,we),L=!0)},o(we){W(t.$$.fragment,we),W(i.$$.fragment,we),W(a.$$.fragment,we),W(o.$$.fragment,we),W(d.$$.fragment,we),W(v.$$.fragment,we),W(b.$$.fragment,we),W(E.$$.fragment,we),W(I.$$.fragment,we),W(O.$$.fragment,we),W(F.$$.fragment,we),L=!1},d(we){se(t,we),se(i,we),se(a,we),se(o,we),se(d,we),se(v,we),se(b,we),se(E,we),se(I,we),se(O,we),se(F,we)}}}function Dce(e){let t,n,i,r,a,s,o,l,d;t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"your_demographics_personal_data",classNames:"report-suboption",hidden:e[3].isHidden("Personal Data"),$$slots:{default:[Cce]},$$scope:{ctx:e}}});function c(y){e[20](y)}let v={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_first_enable",classNames:"report-suboption",hidden:e[3].isHidden(`${e[1].your_demographics_business_data_first_enable}`),$$slots:{default:[Pce]},$$scope:{ctx:e}};e[2].your_demographics_business_data_first_enable!==void 0&&(v.checked=e[2].your_demographics_business_data_first_enable),n=new Ci({props:v}),Oe.push(()=>$e(n,"checked",c));function T(y){e[25](y)}let b={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_second_enable",classNames:"report-suboption",hidden:e[3].isHidden(`${e[1].your_demographics_business_data_second_enable}`),$$slots:{default:[Ece]},$$scope:{ctx:e}};e[2].your_demographics_business_data_second_enable!==void 0&&(b.checked=e[2].your_demographics_business_data_second_enable),r=new Ci({props:b}),Oe.push(()=>$e(r,"checked",T));function A(y){e[30](y)}let E={refreshReportParams:e[0],specTreeNodeId:"your_demographics_business_data_third_enable",classNames:"report-suboption",hidden:e[3].isHidden(`${e[1].your_demographics_business_data_third_enable}`),$$slots:{default:[Ice]},$$scope:{ctx:e}};return e[2].your_demographics_business_data_third_enable!==void 0&&(E.checked=e[2].your_demographics_business_data_third_enable),s=new Ci({props:E}),Oe.push(()=>$e(s,"checked",A)),l=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tax_info",classNames:"report-suboption",hidden:e[3].isHidden("Tax Info"),$$slots:{default:[Ace]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment),re(n.$$.fragment),re(r.$$.fragment),re(s.$$.fragment),re(l.$$.fragment)},m(y,I){ae(t,y,I),ae(n,y,I),ae(r,y,I),ae(s,y,I),ae(l,y,I),d=!0},p(y,I){const D={};I[0]&1&&(D.refreshReportParams=y[0]),I[0]&8&&(D.hidden=y[3].isHidden("Personal Data")),I[0]&13|I[1]&4096&&(D.$$scope={dirty:I,ctx:y}),t.$set(D);const O={};I[0]&1&&(O.refreshReportParams=y[0]),I[0]&10&&(O.hidden=y[3].isHidden(`${y[1].your_demographics_business_data_first_enable}`)),I[0]&13|I[1]&4096&&(O.$$scope={dirty:I,ctx:y}),!i&&I[0]&4&&(i=!0,O.checked=y[2].your_demographics_business_data_first_enable,Ne(()=>i=!1)),n.$set(O);const M={};I[0]&1&&(M.refreshReportParams=y[0]),I[0]&10&&(M.hidden=y[3].isHidden(`${y[1].your_demographics_business_data_second_enable}`)),I[0]&13|I[1]&4096&&(M.$$scope={dirty:I,ctx:y}),!a&&I[0]&4&&(a=!0,M.checked=y[2].your_demographics_business_data_second_enable,Ne(()=>a=!1)),r.$set(M);const F={};I[0]&1&&(F.refreshReportParams=y[0]),I[0]&10&&(F.hidden=y[3].isHidden(`${y[1].your_demographics_business_data_third_enable}`)),I[0]&13|I[1]&4096&&(F.$$scope={dirty:I,ctx:y}),!o&&I[0]&4&&(o=!0,F.checked=y[2].your_demographics_business_data_third_enable,Ne(()=>o=!1)),s.$set(F);const $={};I[0]&1&&($.refreshReportParams=y[0]),I[0]&8&&($.hidden=y[3].isHidden("Tax Info")),I[0]&13|I[1]&4096&&($.$$scope={dirty:I,ctx:y}),l.$set($)},i(y){d||(U(t.$$.fragment,y),U(n.$$.fragment,y),U(r.$$.fragment,y),U(s.$$.fragment,y),U(l.$$.fragment,y),d=!0)},o(y){W(t.$$.fragment,y),W(n.$$.fragment,y),W(r.$$.fragment,y),W(s.$$.fragment,y),W(l.$$.fragment,y),d=!1},d(y){se(t,y),se(n,y),se(r,y),se(s,y),se(l,y)}}}function Oce(e){let t,n,i;function r(s){e[42](s)}let a={refreshReportParams:e[0],specTreeNodeId:"your_demographics_enable",hidden:e[3].isHidden("Your Demographics"),scrollToId:"pdfYourDemographics",$$slots:{default:[Dce]},$$scope:{ctx:e}};return e[2].your_demographics_enable!==void 0&&(a.checked=e[2].your_demographics_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&8&&(l.hidden=s[3].isHidden("Your Demographics")),o[0]&15|o[1]&4096&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&4&&(n=!0,l.checked=s[2].your_demographics_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Mce(e,t,n){let i,r,a,s,o,l,d;Sn(e,vp,we=>n(8,o=we)),Sn(e,Ye,we=>n(2,l=we)),Sn(e,Fl,we=>n(3,d=we));let{memoizedReport:c}=t,{refreshReportParams:v}=t;function T(we){e.$$.not_equal(l.your_demographics_personal_data_name,we)&&(l.your_demographics_personal_data_name=we,Ye.set(l))}function b(we){e.$$.not_equal(l.your_demographics_personal_data_number_of_dependents,we)&&(l.your_demographics_personal_data_number_of_dependents=we,Ye.set(l))}function A(we){e.$$.not_equal(l.your_demographics_personal_data_state_of_residency,we)&&(l.your_demographics_personal_data_state_of_residency=we,Ye.set(l))}function E(we){e.$$.not_equal(l.filing_status,we)&&(l.filing_status=we,Ye.set(l))}function y(we){e.$$.not_equal(l.your_demographics_personal_data_tax_brackets,we)&&(l.your_demographics_personal_data_tax_brackets=we,Ye.set(l))}function I(we){e.$$.not_equal(l.your_demographics_personal_data_extra_field_name,we)&&(l.your_demographics_personal_data_extra_field_name=we,Ye.set(l))}function D(we){e.$$.not_equal(l.your_demographics_personal_data_extra_field,we)&&(l.your_demographics_personal_data_extra_field=we,Ye.set(l))}function O(we){e.$$.not_equal(l.your_demographics_business_data_first_business_name,we)&&(l.your_demographics_business_data_first_business_name=we,Ye.set(l))}function M(we){e.$$.not_equal(l.your_demographics_business_data_first_business_entity_type,we)&&(l.your_demographics_business_data_first_business_entity_type=we,Ye.set(l))}function F(we){e.$$.not_equal(l.your_demographics_business_data_first_ownership_share,we)&&(l.your_demographics_business_data_first_ownership_share=we,Ye.set(l))}function $(we){e.$$.not_equal(l.your_demographics_business_data_first_start_date,we)&&(l.your_demographics_business_data_first_start_date=we,Ye.set(l))}function L(we){e.$$.not_equal(l.your_demographics_business_data_first_enable,we)&&(l.your_demographics_business_data_first_enable=we,Ye.set(l))}function j(we){e.$$.not_equal(l.your_demographics_business_data_second_business_name,we)&&(l.your_demographics_business_data_second_business_name=we,Ye.set(l))}function H(we){e.$$.not_equal(l.your_demographics_business_data_second_business_entity_type,we)&&(l.your_demographics_business_data_second_business_entity_type=we,Ye.set(l))}function V(we){e.$$.not_equal(l.your_demographics_business_data_second_ownership_share,we)&&(l.your_demographics_business_data_second_ownership_share=we,Ye.set(l))}function Q(we){e.$$.not_equal(l.your_demographics_business_data_second_start_date,we)&&(l.your_demographics_business_data_second_start_date=we,Ye.set(l))}function X(we){e.$$.not_equal(l.your_demographics_business_data_second_enable,we)&&(l.your_demographics_business_data_second_enable=we,Ye.set(l))}function te(we){e.$$.not_equal(l.your_demographics_business_data_third_business_name,we)&&(l.your_demographics_business_data_third_business_name=we,Ye.set(l))}function ne(we){e.$$.not_equal(l.your_demographics_business_data_third_business_entity_type,we)&&(l.your_demographics_business_data_third_business_entity_type=we,Ye.set(l))}function be(we){e.$$.not_equal(l.your_demographics_business_data_third_ownership_share,we)&&(l.your_demographics_business_data_third_ownership_share=we,Ye.set(l))}function ue(we){e.$$.not_equal(l.your_demographics_business_data_third_start_date,we)&&(l.your_demographics_business_data_third_start_date=we,Ye.set(l))}function Ce(we){e.$$.not_equal(l.your_demographics_business_data_third_enable,we)&&(l.your_demographics_business_data_third_enable=we,Ye.set(l))}function ie(we){e.$$.not_equal(l.your_demographics_taxes_federal_tax_due,we)&&(l.your_demographics_taxes_federal_tax_due=we,Ye.set(l))}function Y(we){e.$$.not_equal(l.your_demographics_taxes_payments_and_credits,we)&&(l.your_demographics_taxes_payments_and_credits=we,Ye.set(l))}function he(we){e.$$.not_equal(l.your_demographics_taxes_remaining_amount_due,we)&&(l.your_demographics_taxes_remaining_amount_due=we,Ye.set(l))}function Me(we){e.$$.not_equal(l.your_demographics_taxes_business_state_tax_due,we)&&(l.your_demographics_taxes_business_state_tax_due=we,Ye.set(l))}function Pe(we){e.$$.not_equal(l.your_demographics_taxes_business_payments_and_credits,we)&&(l.your_demographics_taxes_business_payments_and_credits=we,Ye.set(l))}function We(we){e.$$.not_equal(l.your_demographics_taxes_business_remaining_amount_due,we)&&(l.your_demographics_taxes_business_remaining_amount_due=we,Ye.set(l))}function qe(we){e.$$.not_equal(l.your_demographics_next_lower_tax_bracket_income_level,we)&&(l.your_demographics_next_lower_tax_bracket_income_level=we,Ye.set(l))}function ee(we){e.$$.not_equal(l.your_demographics_lower_taxable_income_by,we)&&(l.your_demographics_lower_taxable_income_by=we,Ye.set(l))}function G(we){e.$$.not_equal(l.your_demographics_married_and_separate_fed_tax_savings,we)&&(l.your_demographics_married_and_separate_fed_tax_savings=we,Ye.set(l))}function me(we){e.$$.not_equal(l.your_demographics_being_s_corp_fed_tax_has_saved,we)&&(l.your_demographics_being_s_corp_fed_tax_has_saved=we,Ye.set(l))}function Te(we){e.$$.not_equal(l.your_demographics_being_s_corp_fed_tax_can_save,we)&&(l.your_demographics_being_s_corp_fed_tax_can_save=we,Ye.set(l))}function De(we){e.$$.not_equal(l.your_demographics_enable,we)&&(l.your_demographics_enable=we,Ye.set(l))}return e.$$set=we=>{"memoizedReport"in we&&n(4,c=we.memoizedReport),"refreshReportParams"in we&&n(0,v=we.refreshReportParams)},e.$$.update=()=>{e.$$.dirty[0]&16&&n(7,i=c.your_demographics_business_data_first_business_name||"First"),e.$$.dirty[0]&16&&n(6,r=c.your_demographics_business_data_second_business_name||"Second"),e.$$.dirty[0]&16&&n(5,a=c.your_demographics_business_data_third_business_name||"Third"),e.$$.dirty[0]&224&&n(1,s={your_demographics_business_data_first_enable:`${i} Business Data`,your_demographics_business_data_second_enable:`${r} Business Data`,your_demographics_business_data_third_enable:`${a} Business Data`}),e.$$.dirty[0]&258&&o&&vp.set(fx(aB(s),o))},[v,s,l,d,c,a,r,i,o,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De]}class xce extends Qt{constructor(t){super(),Jt(this,t,Mce,Oce,Kt,{memoizedReport:4,refreshReportParams:0},null,[-1,-1])}}function Rce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I;function D(ie){e[3](ie)}let O={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_projected_revenue",hidden:e[2].isHidden("Projected Revenue")};e[1].tps_page_1_income_projected_revenue!==void 0&&(O.value=e[1].tps_page_1_income_projected_revenue),t=new xt({props:O}),Oe.push(()=>$e(t,"value",D));function M(ie){e[4](ie)}let F={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_projected_expense",hidden:e[2].isHidden("Projected Expense")};e[1].tps_page_1_income_projected_expense!==void 0&&(F.value=e[1].tps_page_1_income_projected_expense),i=new xt({props:F}),Oe.push(()=>$e(i,"value",M));function $(ie){e[5](ie)}let L={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_projected_expense_sum",hidden:e[2].isHidden("Business Income")};e[1].tps_page_1_income_projected_expense_sum!==void 0&&(L.value=e[1].tps_page_1_income_projected_expense_sum),a=new xt({props:L}),Oe.push(()=>$e(a,"value",$));function j(ie){e[6](ie)}let H={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_wages",hidden:e[2].isHidden("Wages")};e[1].tps_page_1_income_wages!==void 0&&(H.value=e[1].tps_page_1_income_wages),o=new xt({props:H}),Oe.push(()=>$e(o,"value",j));function V(ie){e[7](ie)}let Q={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_portfolio_income",hidden:e[2].isHidden("Portfolio Income")};e[1].tps_page_1_income_portfolio_income!==void 0&&(Q.value=e[1].tps_page_1_income_portfolio_income),d=new xt({props:Q}),Oe.push(()=>$e(d,"value",V));function X(ie){e[8](ie)}let te={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_rental_income",hidden:e[2].isHidden("Rental Income")};e[1].tps_page_1_income_rental_income!==void 0&&(te.value=e[1].tps_page_1_income_rental_income),v=new xt({props:te}),Oe.push(()=>$e(v,"value",X));function ne(ie){e[9](ie)}let be={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_other_income",hidden:e[2].isHidden("Other Income")};e[1].tps_page_1_income_other_income!==void 0&&(be.value=e[1].tps_page_1_income_other_income),b=new xt({props:be}),Oe.push(()=>$e(b,"value",ne));function ue(ie){e[10](ie)}let Ce={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_income_personal_income",hidden:e[2].isHidden("Personal Income")};return e[1].tps_page_1_income_personal_income!==void 0&&(Ce.value=e[1].tps_page_1_income_personal_income),E=new xt({props:Ce}),Oe.push(()=>$e(E,"value",ue)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment)},m(ie,Y){ae(t,ie,Y),ae(i,ie,Y),ae(a,ie,Y),ae(o,ie,Y),ae(d,ie,Y),ae(v,ie,Y),ae(b,ie,Y),ae(E,ie,Y),I=!0},p(ie,Y){const he={};Y[0]&1&&(he.refreshReportParams=ie[0]),Y[0]&4&&(he.hidden=ie[2].isHidden("Projected Revenue")),!n&&Y[0]&2&&(n=!0,he.value=ie[1].tps_page_1_income_projected_revenue,Ne(()=>n=!1)),t.$set(he);const Me={};Y[0]&1&&(Me.refreshReportParams=ie[0]),Y[0]&4&&(Me.hidden=ie[2].isHidden("Projected Expense")),!r&&Y[0]&2&&(r=!0,Me.value=ie[1].tps_page_1_income_projected_expense,Ne(()=>r=!1)),i.$set(Me);const Pe={};Y[0]&1&&(Pe.refreshReportParams=ie[0]),Y[0]&4&&(Pe.hidden=ie[2].isHidden("Business Income")),!s&&Y[0]&2&&(s=!0,Pe.value=ie[1].tps_page_1_income_projected_expense_sum,Ne(()=>s=!1)),a.$set(Pe);const We={};Y[0]&1&&(We.refreshReportParams=ie[0]),Y[0]&4&&(We.hidden=ie[2].isHidden("Wages")),!l&&Y[0]&2&&(l=!0,We.value=ie[1].tps_page_1_income_wages,Ne(()=>l=!1)),o.$set(We);const qe={};Y[0]&1&&(qe.refreshReportParams=ie[0]),Y[0]&4&&(qe.hidden=ie[2].isHidden("Portfolio Income")),!c&&Y[0]&2&&(c=!0,qe.value=ie[1].tps_page_1_income_portfolio_income,Ne(()=>c=!1)),d.$set(qe);const ee={};Y[0]&1&&(ee.refreshReportParams=ie[0]),Y[0]&4&&(ee.hidden=ie[2].isHidden("Rental Income")),!T&&Y[0]&2&&(T=!0,ee.value=ie[1].tps_page_1_income_rental_income,Ne(()=>T=!1)),v.$set(ee);const G={};Y[0]&1&&(G.refreshReportParams=ie[0]),Y[0]&4&&(G.hidden=ie[2].isHidden("Other Income")),!A&&Y[0]&2&&(A=!0,G.value=ie[1].tps_page_1_income_other_income,Ne(()=>A=!1)),b.$set(G);const me={};Y[0]&1&&(me.refreshReportParams=ie[0]),Y[0]&4&&(me.hidden=ie[2].isHidden("Personal Income")),!y&&Y[0]&2&&(y=!0,me.value=ie[1].tps_page_1_income_personal_income,Ne(()=>y=!1)),E.$set(me)},i(ie){I||(U(t.$$.fragment,ie),U(i.$$.fragment,ie),U(a.$$.fragment,ie),U(o.$$.fragment,ie),U(d.$$.fragment,ie),U(v.$$.fragment,ie),U(b.$$.fragment,ie),U(E.$$.fragment,ie),I=!0)},o(ie){W(t.$$.fragment,ie),W(i.$$.fragment,ie),W(a.$$.fragment,ie),W(o.$$.fragment,ie),W(d.$$.fragment,ie),W(v.$$.fragment,ie),W(b.$$.fragment,ie),W(E.$$.fragment,ie),I=!1},d(ie){se(t,ie),se(i,ie),se(a,ie),se(o,ie),se(d,ie),se(v,ie),se(b,ie),se(E,ie)}}}function $ce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b;function A(V){e[11](V)}let E={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_adjustments",hidden:e[2].isHidden("Adjustments")};e[1].tps_page_1_deductions_and_credits_adjustments!==void 0&&(E.value=e[1].tps_page_1_deductions_and_credits_adjustments),t=new xt({props:E}),Oe.push(()=>$e(t,"value",A));function y(V){e[12](V)}let I={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_passthrough_deduction",hidden:e[2].isHidden("Passthrough Deductions")};e[1].tps_page_1_deductions_and_credits_passthrough_deduction!==void 0&&(I.value=e[1].tps_page_1_deductions_and_credits_passthrough_deduction),i=new xt({props:I}),Oe.push(()=>$e(i,"value",y));function D(V){e[13](V)}let O={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_itemized_deduction",hidden:e[2].isHidden("Itemized Deduction")};e[1].tps_page_1_deductions_and_credits_itemized_deduction!==void 0&&(O.value=e[1].tps_page_1_deductions_and_credits_itemized_deduction),a=new xt({props:O}),Oe.push(()=>$e(a,"value",D));function M(V){e[14](V)}let F={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_credits",hidden:e[2].isHidden("Credits")};e[1].tps_page_1_deductions_and_credits_credits!==void 0&&(F.value=e[1].tps_page_1_deductions_and_credits_credits),o=new xt({props:F}),Oe.push(()=>$e(o,"value",M));function $(V){e[15](V)}let L={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_deductions_and_credits",hidden:e[2].isHidden("Deductions And Credits")};e[1].tps_page_1_deductions_and_credits_deductions_and_credits!==void 0&&(L.value=e[1].tps_page_1_deductions_and_credits_deductions_and_credits),d=new xt({props:L}),Oe.push(()=>$e(d,"value",$));function j(V){e[16](V)}let H={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits_taxable_income",hidden:e[2].isHidden("Taxable Income")};return e[1].tps_page_1_deductions_and_credits_taxable_income!==void 0&&(H.value=e[1].tps_page_1_deductions_and_credits_taxable_income),v=new xt({props:H}),Oe.push(()=>$e(v,"value",j)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment)},m(V,Q){ae(t,V,Q),ae(i,V,Q),ae(a,V,Q),ae(o,V,Q),ae(d,V,Q),ae(v,V,Q),b=!0},p(V,Q){const X={};Q[0]&1&&(X.refreshReportParams=V[0]),Q[0]&4&&(X.hidden=V[2].isHidden("Adjustments")),!n&&Q[0]&2&&(n=!0,X.value=V[1].tps_page_1_deductions_and_credits_adjustments,Ne(()=>n=!1)),t.$set(X);const te={};Q[0]&1&&(te.refreshReportParams=V[0]),Q[0]&4&&(te.hidden=V[2].isHidden("Passthrough Deductions")),!r&&Q[0]&2&&(r=!0,te.value=V[1].tps_page_1_deductions_and_credits_passthrough_deduction,Ne(()=>r=!1)),i.$set(te);const ne={};Q[0]&1&&(ne.refreshReportParams=V[0]),Q[0]&4&&(ne.hidden=V[2].isHidden("Itemized Deduction")),!s&&Q[0]&2&&(s=!0,ne.value=V[1].tps_page_1_deductions_and_credits_itemized_deduction,Ne(()=>s=!1)),a.$set(ne);const be={};Q[0]&1&&(be.refreshReportParams=V[0]),Q[0]&4&&(be.hidden=V[2].isHidden("Credits")),!l&&Q[0]&2&&(l=!0,be.value=V[1].tps_page_1_deductions_and_credits_credits,Ne(()=>l=!1)),o.$set(be);const ue={};Q[0]&1&&(ue.refreshReportParams=V[0]),Q[0]&4&&(ue.hidden=V[2].isHidden("Deductions And Credits")),!c&&Q[0]&2&&(c=!0,ue.value=V[1].tps_page_1_deductions_and_credits_deductions_and_credits,Ne(()=>c=!1)),d.$set(ue);const Ce={};Q[0]&1&&(Ce.refreshReportParams=V[0]),Q[0]&4&&(Ce.hidden=V[2].isHidden("Taxable Income")),!T&&Q[0]&2&&(T=!0,Ce.value=V[1].tps_page_1_deductions_and_credits_taxable_income,Ne(()=>T=!1)),v.$set(Ce)},i(V){b||(U(t.$$.fragment,V),U(i.$$.fragment,V),U(a.$$.fragment,V),U(o.$$.fragment,V),U(d.$$.fragment,V),U(v.$$.fragment,V),b=!0)},o(V){W(t.$$.fragment,V),W(i.$$.fragment,V),W(a.$$.fragment,V),W(o.$$.fragment,V),W(d.$$.fragment,V),W(v.$$.fragment,V),b=!1},d(V){se(t,V),se(i,V),se(a,V),se(o,V),se(d,V),se(v,V)}}}function Nce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O;function M(Pe){e[17](Pe)}let F={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_tax_fed",hidden:e[2].isHidden("Tax Fed")};e[1].tps_page_1_tax_and_payments_tax_fed!==void 0&&(F.value=e[1].tps_page_1_tax_and_payments_tax_fed),t=new xt({props:F}),Oe.push(()=>$e(t,"value",M));function $(Pe){e[18](Pe)}let L={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_tax_state",hidden:e[2].isHidden("Tax State")};e[1].tps_page_1_tax_and_payments_tax_state!==void 0&&(L.value=e[1].tps_page_1_tax_and_payments_tax_state),i=new xt({props:L}),Oe.push(()=>$e(i,"value",$));function j(Pe){e[19](Pe)}let H={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_witholding_and_es_payments_fed",hidden:e[2].isHidden("Witholding And Es Payments Fed")};e[1].tps_page_1_tax_and_payments_witholding_and_es_payments_fed!==void 0&&(H.value=e[1].tps_page_1_tax_and_payments_witholding_and_es_payments_fed),a=new xt({props:H}),Oe.push(()=>$e(a,"value",j));function V(Pe){e[20](Pe)}let Q={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_witholding_and_es_payments_stat",hidden:e[2].isHidden("Witholding And Es Payments State")};e[1].tps_page_1_tax_and_payments_witholding_and_es_payments_stat!==void 0&&(Q.value=e[1].tps_page_1_tax_and_payments_witholding_and_es_payments_stat),o=new xt({props:Q}),Oe.push(()=>$e(o,"value",V));function X(Pe){e[21](Pe)}let te={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_tax_due_fed",hidden:e[2].isHidden("Tax Due Fed")};e[1].tps_page_1_tax_and_payments_tax_due_fed!==void 0&&(te.value=e[1].tps_page_1_tax_and_payments_tax_due_fed),d=new xt({props:te}),Oe.push(()=>$e(d,"value",X));function ne(Pe){e[22](Pe)}let be={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_tax_due_state",hidden:e[2].isHidden("Tax Due State")};e[1].tps_page_1_tax_and_payments_tax_due_state!==void 0&&(be.value=e[1].tps_page_1_tax_and_payments_tax_due_state),v=new xt({props:be}),Oe.push(()=>$e(v,"value",ne));function ue(Pe){e[23](Pe)}let Ce={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_next_lower_bracket",hidden:e[2].isHidden("Next Lower Bracket")};e[1].tps_page_1_tax_and_payments_next_lower_bracket!==void 0&&(Ce.value=e[1].tps_page_1_tax_and_payments_next_lower_bracket),b=new xt({props:Ce}),Oe.push(()=>$e(b,"value",ue));function ie(Pe){e[24](Pe)}let Y={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_effective_tax_rate",hidden:e[2].isHidden("Effective Tax Rate")};e[1].tps_page_1_tax_and_payments_effective_tax_rate!==void 0&&(Y.value=e[1].tps_page_1_tax_and_payments_effective_tax_rate),E=new ff({props:Y}),Oe.push(()=>$e(E,"value",ie));function he(Pe){e[25](Pe)}let Me={refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments_distance_to_bracket",hidden:e[2].isHidden("Distance To Bracket")};return e[1].tps_page_1_tax_and_payments_distance_to_bracket!==void 0&&(Me.value=e[1].tps_page_1_tax_and_payments_distance_to_bracket),I=new xt({props:Me}),Oe.push(()=>$e(I,"value",he)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment),re(I.$$.fragment)},m(Pe,We){ae(t,Pe,We),ae(i,Pe,We),ae(a,Pe,We),ae(o,Pe,We),ae(d,Pe,We),ae(v,Pe,We),ae(b,Pe,We),ae(E,Pe,We),ae(I,Pe,We),O=!0},p(Pe,We){const qe={};We[0]&1&&(qe.refreshReportParams=Pe[0]),We[0]&4&&(qe.hidden=Pe[2].isHidden("Tax Fed")),!n&&We[0]&2&&(n=!0,qe.value=Pe[1].tps_page_1_tax_and_payments_tax_fed,Ne(()=>n=!1)),t.$set(qe);const ee={};We[0]&1&&(ee.refreshReportParams=Pe[0]),We[0]&4&&(ee.hidden=Pe[2].isHidden("Tax State")),!r&&We[0]&2&&(r=!0,ee.value=Pe[1].tps_page_1_tax_and_payments_tax_state,Ne(()=>r=!1)),i.$set(ee);const G={};We[0]&1&&(G.refreshReportParams=Pe[0]),We[0]&4&&(G.hidden=Pe[2].isHidden("Witholding And Es Payments Fed")),!s&&We[0]&2&&(s=!0,G.value=Pe[1].tps_page_1_tax_and_payments_witholding_and_es_payments_fed,Ne(()=>s=!1)),a.$set(G);const me={};We[0]&1&&(me.refreshReportParams=Pe[0]),We[0]&4&&(me.hidden=Pe[2].isHidden("Witholding And Es Payments State")),!l&&We[0]&2&&(l=!0,me.value=Pe[1].tps_page_1_tax_and_payments_witholding_and_es_payments_stat,Ne(()=>l=!1)),o.$set(me);const Te={};We[0]&1&&(Te.refreshReportParams=Pe[0]),We[0]&4&&(Te.hidden=Pe[2].isHidden("Tax Due Fed")),!c&&We[0]&2&&(c=!0,Te.value=Pe[1].tps_page_1_tax_and_payments_tax_due_fed,Ne(()=>c=!1)),d.$set(Te);const De={};We[0]&1&&(De.refreshReportParams=Pe[0]),We[0]&4&&(De.hidden=Pe[2].isHidden("Tax Due State")),!T&&We[0]&2&&(T=!0,De.value=Pe[1].tps_page_1_tax_and_payments_tax_due_state,Ne(()=>T=!1)),v.$set(De);const we={};We[0]&1&&(we.refreshReportParams=Pe[0]),We[0]&4&&(we.hidden=Pe[2].isHidden("Next Lower Bracket")),!A&&We[0]&2&&(A=!0,we.value=Pe[1].tps_page_1_tax_and_payments_next_lower_bracket,Ne(()=>A=!1)),b.$set(we);const Ve={};We[0]&1&&(Ve.refreshReportParams=Pe[0]),We[0]&4&&(Ve.hidden=Pe[2].isHidden("Effective Tax Rate")),!y&&We[0]&2&&(y=!0,Ve.value=Pe[1].tps_page_1_tax_and_payments_effective_tax_rate,Ne(()=>y=!1)),E.$set(Ve);const Ke={};We[0]&1&&(Ke.refreshReportParams=Pe[0]),We[0]&4&&(Ke.hidden=Pe[2].isHidden("Distance To Bracket")),!D&&We[0]&2&&(D=!0,Ke.value=Pe[1].tps_page_1_tax_and_payments_distance_to_bracket,Ne(()=>D=!1)),I.$set(Ke)},i(Pe){O||(U(t.$$.fragment,Pe),U(i.$$.fragment,Pe),U(a.$$.fragment,Pe),U(o.$$.fragment,Pe),U(d.$$.fragment,Pe),U(v.$$.fragment,Pe),U(b.$$.fragment,Pe),U(E.$$.fragment,Pe),U(I.$$.fragment,Pe),O=!0)},o(Pe){W(t.$$.fragment,Pe),W(i.$$.fragment,Pe),W(a.$$.fragment,Pe),W(o.$$.fragment,Pe),W(d.$$.fragment,Pe),W(v.$$.fragment,Pe),W(b.$$.fragment,Pe),W(E.$$.fragment,Pe),W(I.$$.fragment,Pe),O=!1},d(Pe){se(t,Pe),se(i,Pe),se(a,Pe),se(o,Pe),se(d,Pe),se(v,Pe),se(b,Pe),se(E,Pe),se(I,Pe)}}}function Fce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y;function he(Xe){e[26](Xe)}let Me={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_wages",hidden:e[2].isHidden("Wages")};e[1].tps_page_2_income_wages!==void 0&&(Me.value=e[1].tps_page_2_income_wages),t=new xt({props:Me}),Oe.push(()=>$e(t,"value",he));function Pe(Xe){e[27](Xe)}let We={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_interest",hidden:e[2].isHidden("Interest")};e[1].tps_page_2_income_interest!==void 0&&(We.value=e[1].tps_page_2_income_interest),i=new xt({props:We}),Oe.push(()=>$e(i,"value",Pe));function qe(Xe){e[28](Xe)}let ee={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_dividents",hidden:e[2].isHidden("Dividents")};e[1].tps_page_2_income_dividents!==void 0&&(ee.value=e[1].tps_page_2_income_dividents),a=new xt({props:ee}),Oe.push(()=>$e(a,"value",qe));function G(Xe){e[29](Xe)}let me={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_capital_gains",hidden:e[2].isHidden("Capital Gains")};e[1].tps_page_2_income_capital_gains!==void 0&&(me.value=e[1].tps_page_2_income_capital_gains),o=new xt({props:me}),Oe.push(()=>$e(o,"value",G));function Te(Xe){e[30](Xe)}let De={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_rental_income",hidden:e[2].isHidden("Rental Income")};e[1].tps_page_2_income_rental_income!==void 0&&(De.value=e[1].tps_page_2_income_rental_income),d=new xt({props:De}),Oe.push(()=>$e(d,"value",Te));function we(Xe){e[31](Xe)}let Ve={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_first_company_name",hidden:e[2].isHidden("First Company Name")};e[1].tps_page_2_income_first_company_name!==void 0&&(Ve.value=e[1].tps_page_2_income_first_company_name),v=new li({props:Ve}),Oe.push(()=>$e(v,"value",we));function Ke(Xe){e[32](Xe)}let yt={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_first_company_income",hidden:e[2].isHidden("First Company Income")};e[1].tps_page_2_income_first_company_income!==void 0&&(yt.value=e[1].tps_page_2_income_first_company_income),b=new xt({props:yt}),Oe.push(()=>$e(b,"value",Ke));function ht(Xe){e[33](Xe)}let Je={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_second_company_name",hidden:e[2].isHidden("Second Company Name")};e[1].tps_page_2_income_second_company_name!==void 0&&(Je.value=e[1].tps_page_2_income_second_company_name),E=new li({props:Je}),Oe.push(()=>$e(E,"value",ht));function pt(Xe){e[34](Xe)}let Tt={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_second_company_income",hidden:e[2].isHidden("Second Company Income")};e[1].tps_page_2_income_second_company_income!==void 0&&(Tt.value=e[1].tps_page_2_income_second_company_income),I=new xt({props:Tt}),Oe.push(()=>$e(I,"value",pt));function it(Xe){e[35](Xe)}let Ge={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_third_company_name",hidden:e[2].isHidden("Third Company Name")};e[1].tps_page_2_income_third_company_name!==void 0&&(Ge.value=e[1].tps_page_2_income_third_company_name),O=new li({props:Ge}),Oe.push(()=>$e(O,"value",it));function st(Xe){e[36](Xe)}let It={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_third_company_income",hidden:e[2].isHidden("Third Company Income")};e[1].tps_page_2_income_third_company_income!==void 0&&(It.value=e[1].tps_page_2_income_third_company_income),F=new xt({props:It}),Oe.push(()=>$e(F,"value",st));function Ct(Xe){e[37](Xe)}let bt={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_fourth_company_name",hidden:e[2].isHidden("Fourth Company Name")};e[1].tps_page_2_income_fourth_company_name!==void 0&&(bt.value=e[1].tps_page_2_income_fourth_company_name),L=new li({props:bt}),Oe.push(()=>$e(L,"value",Ct));function Rt(Xe){e[38](Xe)}let cn={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_fourth_company_income",hidden:e[2].isHidden("Fourth Company Income")};e[1].tps_page_2_income_fourth_company_income!==void 0&&(cn.value=e[1].tps_page_2_income_fourth_company_income),H=new xt({props:cn}),Oe.push(()=>$e(H,"value",Rt));function nn(Xe){e[39](Xe)}let Qe={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_extra_s_corp_income",hidden:e[2].isHidden("Extra S-Corp Income")};e[1].tps_page_2_income_extra_s_corp_income!==void 0&&(Qe.value=e[1].tps_page_2_income_extra_s_corp_income),Q=new xt({props:Qe}),Oe.push(()=>$e(Q,"value",nn));function Ft(Xe){e[40](Xe)}let Fn={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_extra_schedule_c_income",hidden:e[2].isHidden("Extra Schedule C Business Income")};e[1].tps_page_2_income_extra_schedule_c_income!==void 0&&(Fn.value=e[1].tps_page_2_income_extra_schedule_c_income),te=new xt({props:Fn}),Oe.push(()=>$e(te,"value",Ft));function He(Xe){e[41](Xe)}let Dt={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_other_income",hidden:e[2].isHidden("Other Income")};e[1].tps_page_2_income_other_income!==void 0&&(Dt.value=e[1].tps_page_2_income_other_income),be=new xt({props:Dt}),Oe.push(()=>$e(be,"value",He));function Xt(Xe){e[42](Xe)}let Mt={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income_total_income",hidden:e[2].isHidden("Total Income")};return e[1].tps_page_2_income_total_income!==void 0&&(Mt.value=e[1].tps_page_2_income_total_income),Ce=new xt({props:Mt}),Oe.push(()=>$e(Ce,"value",Xt)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment),re(I.$$.fragment),re(O.$$.fragment),re(F.$$.fragment),re(L.$$.fragment),re(H.$$.fragment),re(Q.$$.fragment),re(te.$$.fragment),re(be.$$.fragment),re(Ce.$$.fragment)},m(Xe,Nt){ae(t,Xe,Nt),ae(i,Xe,Nt),ae(a,Xe,Nt),ae(o,Xe,Nt),ae(d,Xe,Nt),ae(v,Xe,Nt),ae(b,Xe,Nt),ae(E,Xe,Nt),ae(I,Xe,Nt),ae(O,Xe,Nt),ae(F,Xe,Nt),ae(L,Xe,Nt),ae(H,Xe,Nt),ae(Q,Xe,Nt),ae(te,Xe,Nt),ae(be,Xe,Nt),ae(Ce,Xe,Nt),Y=!0},p(Xe,Nt){const on={};Nt[0]&1&&(on.refreshReportParams=Xe[0]),Nt[0]&4&&(on.hidden=Xe[2].isHidden("Wages")),!n&&Nt[0]&2&&(n=!0,on.value=Xe[1].tps_page_2_income_wages,Ne(()=>n=!1)),t.$set(on);const In={};Nt[0]&1&&(In.refreshReportParams=Xe[0]),Nt[0]&4&&(In.hidden=Xe[2].isHidden("Interest")),!r&&Nt[0]&2&&(r=!0,In.value=Xe[1].tps_page_2_income_interest,Ne(()=>r=!1)),i.$set(In);const dt={};Nt[0]&1&&(dt.refreshReportParams=Xe[0]),Nt[0]&4&&(dt.hidden=Xe[2].isHidden("Dividents")),!s&&Nt[0]&2&&(s=!0,dt.value=Xe[1].tps_page_2_income_dividents,Ne(()=>s=!1)),a.$set(dt);const Zt={};Nt[0]&1&&(Zt.refreshReportParams=Xe[0]),Nt[0]&4&&(Zt.hidden=Xe[2].isHidden("Capital Gains")),!l&&Nt[0]&2&&(l=!0,Zt.value=Xe[1].tps_page_2_income_capital_gains,Ne(()=>l=!1)),o.$set(Zt);const Ln={};Nt[0]&1&&(Ln.refreshReportParams=Xe[0]),Nt[0]&4&&(Ln.hidden=Xe[2].isHidden("Rental Income")),!c&&Nt[0]&2&&(c=!0,Ln.value=Xe[1].tps_page_2_income_rental_income,Ne(()=>c=!1)),d.$set(Ln);const xn={};Nt[0]&1&&(xn.refreshReportParams=Xe[0]),Nt[0]&4&&(xn.hidden=Xe[2].isHidden("First Company Name")),!T&&Nt[0]&2&&(T=!0,xn.value=Xe[1].tps_page_2_income_first_company_name,Ne(()=>T=!1)),v.$set(xn);const Dn={};Nt[0]&1&&(Dn.refreshReportParams=Xe[0]),Nt[0]&4&&(Dn.hidden=Xe[2].isHidden("First Company Income")),!A&&Nt[0]&2&&(A=!0,Dn.value=Xe[1].tps_page_2_income_first_company_income,Ne(()=>A=!1)),b.$set(Dn);const Un={};Nt[0]&1&&(Un.refreshReportParams=Xe[0]),Nt[0]&4&&(Un.hidden=Xe[2].isHidden("Second Company Name")),!y&&Nt[0]&2&&(y=!0,Un.value=Xe[1].tps_page_2_income_second_company_name,Ne(()=>y=!1)),E.$set(Un);const qn={};Nt[0]&1&&(qn.refreshReportParams=Xe[0]),Nt[0]&4&&(qn.hidden=Xe[2].isHidden("Second Company Income")),!D&&Nt[0]&2&&(D=!0,qn.value=Xe[1].tps_page_2_income_second_company_income,Ne(()=>D=!1)),I.$set(qn);const ft={};Nt[0]&1&&(ft.refreshReportParams=Xe[0]),Nt[0]&4&&(ft.hidden=Xe[2].isHidden("Third Company Name")),!M&&Nt[0]&2&&(M=!0,ft.value=Xe[1].tps_page_2_income_third_company_name,Ne(()=>M=!1)),O.$set(ft);const ni={};Nt[0]&1&&(ni.refreshReportParams=Xe[0]),Nt[0]&4&&(ni.hidden=Xe[2].isHidden("Third Company Income")),!$&&Nt[0]&2&&($=!0,ni.value=Xe[1].tps_page_2_income_third_company_income,Ne(()=>$=!1)),F.$set(ni);const Et={};Nt[0]&1&&(Et.refreshReportParams=Xe[0]),Nt[0]&4&&(Et.hidden=Xe[2].isHidden("Fourth Company Name")),!j&&Nt[0]&2&&(j=!0,Et.value=Xe[1].tps_page_2_income_fourth_company_name,Ne(()=>j=!1)),L.$set(Et);const un={};Nt[0]&1&&(un.refreshReportParams=Xe[0]),Nt[0]&4&&(un.hidden=Xe[2].isHidden("Fourth Company Income")),!V&&Nt[0]&2&&(V=!0,un.value=Xe[1].tps_page_2_income_fourth_company_income,Ne(()=>V=!1)),H.$set(un);const Ai={};Nt[0]&1&&(Ai.refreshReportParams=Xe[0]),Nt[0]&4&&(Ai.hidden=Xe[2].isHidden("Extra S-Corp Income")),!X&&Nt[0]&2&&(X=!0,Ai.value=Xe[1].tps_page_2_income_extra_s_corp_income,Ne(()=>X=!1)),Q.$set(Ai);const St={};Nt[0]&1&&(St.refreshReportParams=Xe[0]),Nt[0]&4&&(St.hidden=Xe[2].isHidden("Extra Schedule C Business Income")),!ne&&Nt[0]&2&&(ne=!0,St.value=Xe[1].tps_page_2_income_extra_schedule_c_income,Ne(()=>ne=!1)),te.$set(St);const sn={};Nt[0]&1&&(sn.refreshReportParams=Xe[0]),Nt[0]&4&&(sn.hidden=Xe[2].isHidden("Other Income")),!ue&&Nt[0]&2&&(ue=!0,sn.value=Xe[1].tps_page_2_income_other_income,Ne(()=>ue=!1)),be.$set(sn);const ci={};Nt[0]&1&&(ci.refreshReportParams=Xe[0]),Nt[0]&4&&(ci.hidden=Xe[2].isHidden("Total Income")),!ie&&Nt[0]&2&&(ie=!0,ci.value=Xe[1].tps_page_2_income_total_income,Ne(()=>ie=!1)),Ce.$set(ci)},i(Xe){Y||(U(t.$$.fragment,Xe),U(i.$$.fragment,Xe),U(a.$$.fragment,Xe),U(o.$$.fragment,Xe),U(d.$$.fragment,Xe),U(v.$$.fragment,Xe),U(b.$$.fragment,Xe),U(E.$$.fragment,Xe),U(I.$$.fragment,Xe),U(O.$$.fragment,Xe),U(F.$$.fragment,Xe),U(L.$$.fragment,Xe),U(H.$$.fragment,Xe),U(Q.$$.fragment,Xe),U(te.$$.fragment,Xe),U(be.$$.fragment,Xe),U(Ce.$$.fragment,Xe),Y=!0)},o(Xe){W(t.$$.fragment,Xe),W(i.$$.fragment,Xe),W(a.$$.fragment,Xe),W(o.$$.fragment,Xe),W(d.$$.fragment,Xe),W(v.$$.fragment,Xe),W(b.$$.fragment,Xe),W(E.$$.fragment,Xe),W(I.$$.fragment,Xe),W(O.$$.fragment,Xe),W(F.$$.fragment,Xe),W(L.$$.fragment,Xe),W(H.$$.fragment,Xe),W(Q.$$.fragment,Xe),W(te.$$.fragment,Xe),W(be.$$.fragment,Xe),W(Ce.$$.fragment,Xe),Y=!1},d(Xe){se(t,Xe),se(i,Xe),se(a,Xe),se(o,Xe),se(d,Xe),se(v,Xe),se(b,Xe),se(E,Xe),se(I,Xe),se(O,Xe),se(F,Xe),se(L,Xe),se(H,Xe),se(Q,Xe),se(te,Xe),se(be,Xe),se(Ce,Xe)}}}function Lce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I;function D(ie){e[43](ie)}let O={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_health_savings_account",hidden:e[2].isHidden("Health Savings Account")};e[1].tps_page_2_adjustments_health_savings_account!==void 0&&(O.value=e[1].tps_page_2_adjustments_health_savings_account),t=new xt({props:O}),Oe.push(()=>$e(t,"value",D));function M(ie){e[44](ie)}let F={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_deductible_se_tax",hidden:e[2].isHidden("Deductible Se Tax")};e[1].tps_page_2_adjustments_deductible_se_tax!==void 0&&(F.value=e[1].tps_page_2_adjustments_deductible_se_tax),i=new xt({props:F}),Oe.push(()=>$e(i,"value",M));function $(ie){e[45](ie)}let L={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_sep_simple_qual_plans",hidden:e[2].isHidden("Sep Simple Qual Plans")};e[1].tps_page_2_adjustments_sep_simple_qual_plans!==void 0&&(L.value=e[1].tps_page_2_adjustments_sep_simple_qual_plans),a=new xt({props:L}),Oe.push(()=>$e(a,"value",$));function j(ie){e[46](ie)}let H={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_self_employed_health_ins",hidden:e[2].isHidden("Self Employed Health Insurance")};e[1].tps_page_2_adjustments_self_employed_health_ins!==void 0&&(H.value=e[1].tps_page_2_adjustments_self_employed_health_ins),o=new xt({props:H}),Oe.push(()=>$e(o,"value",j));function V(ie){e[47](ie)}let Q={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_ira_deduction",hidden:e[2].isHidden("Ira Deduction")};e[1].tps_page_2_adjustments_ira_deduction!==void 0&&(Q.value=e[1].tps_page_2_adjustments_ira_deduction),d=new xt({props:Q}),Oe.push(()=>$e(d,"value",V));function X(ie){e[48](ie)}let te={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_other_adjustments",hidden:e[2].isHidden("Other Adjustments")};e[1].tps_page_2_adjustments_other_adjustments!==void 0&&(te.value=e[1].tps_page_2_adjustments_other_adjustments),v=new xt({props:te}),Oe.push(()=>$e(v,"value",X));function ne(ie){e[49](ie)}let be={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_total_adjustments",hidden:e[2].isHidden("Total Adjustments")};e[1].tps_page_2_adjustments_total_adjustments!==void 0&&(be.value=e[1].tps_page_2_adjustments_total_adjustments),b=new xt({props:be}),Oe.push(()=>$e(b,"value",ne));function ue(ie){e[50](ie)}let Ce={refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments_adjusted_gross_income",hidden:e[2].isHidden("Adjusted Gross Income")};return e[1].tps_page_2_adjustments_adjusted_gross_income!==void 0&&(Ce.value=e[1].tps_page_2_adjustments_adjusted_gross_income),E=new xt({props:Ce}),Oe.push(()=>$e(E,"value",ue)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment)},m(ie,Y){ae(t,ie,Y),ae(i,ie,Y),ae(a,ie,Y),ae(o,ie,Y),ae(d,ie,Y),ae(v,ie,Y),ae(b,ie,Y),ae(E,ie,Y),I=!0},p(ie,Y){const he={};Y[0]&1&&(he.refreshReportParams=ie[0]),Y[0]&4&&(he.hidden=ie[2].isHidden("Health Savings Account")),!n&&Y[0]&2&&(n=!0,he.value=ie[1].tps_page_2_adjustments_health_savings_account,Ne(()=>n=!1)),t.$set(he);const Me={};Y[0]&1&&(Me.refreshReportParams=ie[0]),Y[0]&4&&(Me.hidden=ie[2].isHidden("Deductible Se Tax")),!r&&Y[0]&2&&(r=!0,Me.value=ie[1].tps_page_2_adjustments_deductible_se_tax,Ne(()=>r=!1)),i.$set(Me);const Pe={};Y[0]&1&&(Pe.refreshReportParams=ie[0]),Y[0]&4&&(Pe.hidden=ie[2].isHidden("Sep Simple Qual Plans")),!s&&Y[0]&2&&(s=!0,Pe.value=ie[1].tps_page_2_adjustments_sep_simple_qual_plans,Ne(()=>s=!1)),a.$set(Pe);const We={};Y[0]&1&&(We.refreshReportParams=ie[0]),Y[0]&4&&(We.hidden=ie[2].isHidden("Self Employed Health Insurance")),!l&&Y[0]&2&&(l=!0,We.value=ie[1].tps_page_2_adjustments_self_employed_health_ins,Ne(()=>l=!1)),o.$set(We);const qe={};Y[0]&1&&(qe.refreshReportParams=ie[0]),Y[0]&4&&(qe.hidden=ie[2].isHidden("Ira Deduction")),!c&&Y[0]&2&&(c=!0,qe.value=ie[1].tps_page_2_adjustments_ira_deduction,Ne(()=>c=!1)),d.$set(qe);const ee={};Y[0]&1&&(ee.refreshReportParams=ie[0]),Y[0]&4&&(ee.hidden=ie[2].isHidden("Other Adjustments")),!T&&Y[0]&2&&(T=!0,ee.value=ie[1].tps_page_2_adjustments_other_adjustments,Ne(()=>T=!1)),v.$set(ee);const G={};Y[0]&1&&(G.refreshReportParams=ie[0]),Y[0]&4&&(G.hidden=ie[2].isHidden("Total Adjustments")),!A&&Y[0]&2&&(A=!0,G.value=ie[1].tps_page_2_adjustments_total_adjustments,Ne(()=>A=!1)),b.$set(G);const me={};Y[0]&1&&(me.refreshReportParams=ie[0]),Y[0]&4&&(me.hidden=ie[2].isHidden("Adjusted Gross Income")),!y&&Y[0]&2&&(y=!0,me.value=ie[1].tps_page_2_adjustments_adjusted_gross_income,Ne(()=>y=!1)),E.$set(me)},i(ie){I||(U(t.$$.fragment,ie),U(i.$$.fragment,ie),U(a.$$.fragment,ie),U(o.$$.fragment,ie),U(d.$$.fragment,ie),U(v.$$.fragment,ie),U(b.$$.fragment,ie),U(E.$$.fragment,ie),I=!0)},o(ie){W(t.$$.fragment,ie),W(i.$$.fragment,ie),W(a.$$.fragment,ie),W(o.$$.fragment,ie),W(d.$$.fragment,ie),W(v.$$.fragment,ie),W(b.$$.fragment,ie),W(E.$$.fragment,ie),I=!1},d(ie){se(t,ie),se(i,ie),se(a,ie),se(o,ie),se(d,ie),se(v,ie),se(b,ie),se(E,ie)}}}function Hce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I;function D(ie){e[51](ie)}let O={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_medical_related",hidden:e[2].isHidden("Medical Related")};e[1].tps_page_3_deductions_medical_related!==void 0&&(O.value=e[1].tps_page_3_deductions_medical_related),t=new xt({props:O}),Oe.push(()=>$e(t,"value",D));function M(ie){e[52](ie)}let F={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_taxes",hidden:e[2].isHidden("Taxes")};e[1].tps_page_3_deductions_taxes!==void 0&&(F.value=e[1].tps_page_3_deductions_taxes),i=new xt({props:F}),Oe.push(()=>$e(i,"value",M));function $(ie){e[53](ie)}let L={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_mortgage_interest",hidden:e[2].isHidden("Mortgage Interest")};e[1].tps_page_3_deductions_mortgage_interest!==void 0&&(L.value=e[1].tps_page_3_deductions_mortgage_interest),a=new xt({props:L}),Oe.push(()=>$e(a,"value",$));function j(ie){e[54](ie)}let H={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_charity",hidden:e[2].isHidden("Charity")};e[1].tps_page_3_deductions_charity!==void 0&&(H.value=e[1].tps_page_3_deductions_charity),o=new xt({props:H}),Oe.push(()=>$e(o,"value",j));function V(ie){e[55](ie)}let Q={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_other_itemized_deductions",hidden:e[2].isHidden("Other Itemized Deductions")};e[1].tps_page_3_deductions_other_itemized_deductions!==void 0&&(Q.value=e[1].tps_page_3_deductions_other_itemized_deductions),d=new xt({props:Q}),Oe.push(()=>$e(d,"value",V));function X(ie){e[56](ie)}let te={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_passthrough_deduction",hidden:e[2].isHidden("Passthrough Deduction")};e[1].tps_page_3_deductions_passthrough_deduction!==void 0&&(te.value=e[1].tps_page_3_deductions_passthrough_deduction),v=new xt({props:te}),Oe.push(()=>$e(v,"value",X));function ne(ie){e[57](ie)}let be={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_total_deductions",hidden:e[2].isHidden("Total Deduction")};e[1].tps_page_3_deductions_total_deductions!==void 0&&(be.value=e[1].tps_page_3_deductions_total_deductions),b=new xt({props:be}),Oe.push(()=>$e(b,"value",ne));function ue(ie){e[58](ie)}let Ce={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions_taxable_income",hidden:e[2].isHidden("Taxable Income")};return e[1].tps_page_3_deductions_taxable_income!==void 0&&(Ce.value=e[1].tps_page_3_deductions_taxable_income),E=new xt({props:Ce}),Oe.push(()=>$e(E,"value",ue)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment)},m(ie,Y){ae(t,ie,Y),ae(i,ie,Y),ae(a,ie,Y),ae(o,ie,Y),ae(d,ie,Y),ae(v,ie,Y),ae(b,ie,Y),ae(E,ie,Y),I=!0},p(ie,Y){const he={};Y[0]&1&&(he.refreshReportParams=ie[0]),Y[0]&4&&(he.hidden=ie[2].isHidden("Medical Related")),!n&&Y[0]&2&&(n=!0,he.value=ie[1].tps_page_3_deductions_medical_related,Ne(()=>n=!1)),t.$set(he);const Me={};Y[0]&1&&(Me.refreshReportParams=ie[0]),Y[0]&4&&(Me.hidden=ie[2].isHidden("Taxes")),!r&&Y[0]&2&&(r=!0,Me.value=ie[1].tps_page_3_deductions_taxes,Ne(()=>r=!1)),i.$set(Me);const Pe={};Y[0]&1&&(Pe.refreshReportParams=ie[0]),Y[0]&4&&(Pe.hidden=ie[2].isHidden("Mortgage Interest")),!s&&Y[0]&2&&(s=!0,Pe.value=ie[1].tps_page_3_deductions_mortgage_interest,Ne(()=>s=!1)),a.$set(Pe);const We={};Y[0]&1&&(We.refreshReportParams=ie[0]),Y[0]&4&&(We.hidden=ie[2].isHidden("Charity")),!l&&Y[0]&2&&(l=!0,We.value=ie[1].tps_page_3_deductions_charity,Ne(()=>l=!1)),o.$set(We);const qe={};Y[0]&1&&(qe.refreshReportParams=ie[0]),Y[0]&4&&(qe.hidden=ie[2].isHidden("Other Itemized Deductions")),!c&&Y[0]&2&&(c=!0,qe.value=ie[1].tps_page_3_deductions_other_itemized_deductions,Ne(()=>c=!1)),d.$set(qe);const ee={};Y[0]&1&&(ee.refreshReportParams=ie[0]),Y[0]&4&&(ee.hidden=ie[2].isHidden("Passthrough Deduction")),!T&&Y[0]&2&&(T=!0,ee.value=ie[1].tps_page_3_deductions_passthrough_deduction,Ne(()=>T=!1)),v.$set(ee);const G={};Y[0]&1&&(G.refreshReportParams=ie[0]),Y[0]&4&&(G.hidden=ie[2].isHidden("Total Deduction")),!A&&Y[0]&2&&(A=!0,G.value=ie[1].tps_page_3_deductions_total_deductions,Ne(()=>A=!1)),b.$set(G);const me={};Y[0]&1&&(me.refreshReportParams=ie[0]),Y[0]&4&&(me.hidden=ie[2].isHidden("Taxable Income")),!y&&Y[0]&2&&(y=!0,me.value=ie[1].tps_page_3_deductions_taxable_income,Ne(()=>y=!1)),E.$set(me)},i(ie){I||(U(t.$$.fragment,ie),U(i.$$.fragment,ie),U(a.$$.fragment,ie),U(o.$$.fragment,ie),U(d.$$.fragment,ie),U(v.$$.fragment,ie),U(b.$$.fragment,ie),U(E.$$.fragment,ie),I=!0)},o(ie){W(t.$$.fragment,ie),W(i.$$.fragment,ie),W(a.$$.fragment,ie),W(o.$$.fragment,ie),W(d.$$.fragment,ie),W(v.$$.fragment,ie),W(b.$$.fragment,ie),W(E.$$.fragment,ie),I=!1},d(ie){se(t,ie),se(i,ie),se(a,ie),se(o,ie),se(d,ie),se(v,ie),se(b,ie),se(E,ie)}}}function jce(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me;function Pe(dt){e[59](dt)}let We={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_tax_fed",hidden:e[2].isHidden("Tax Fed")};e[1].tps_page_3_taxes_and_payments_tax_fed!==void 0&&(We.value=e[1].tps_page_3_taxes_and_payments_tax_fed),t=new xt({props:We}),Oe.push(()=>$e(t,"value",Pe));function qe(dt){e[60](dt)}let ee={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_tax_state",hidden:e[2].isHidden("Tax State")};e[1].tps_page_3_taxes_and_payments_tax_state!==void 0&&(ee.value=e[1].tps_page_3_taxes_and_payments_tax_state),i=new xt({props:ee}),Oe.push(()=>$e(i,"value",qe));function G(dt){e[61](dt)}let me={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_alternative_min_tax",hidden:e[2].isHidden("Alternative Min Tax")};e[1].tps_page_3_taxes_and_payments_alternative_min_tax!==void 0&&(me.value=e[1].tps_page_3_taxes_and_payments_alternative_min_tax),a=new xt({props:me}),Oe.push(()=>$e(a,"value",G));function Te(dt){e[62](dt)}let De={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_self_employment_tax",hidden:e[2].isHidden("Self Employment Tax")};e[1].tps_page_3_taxes_and_payments_self_employment_tax!==void 0&&(De.value=e[1].tps_page_3_taxes_and_payments_self_employment_tax),o=new xt({props:De}),Oe.push(()=>$e(o,"value",Te));function we(dt){e[63](dt)}let Ve={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_other_taxes",hidden:e[2].isHidden("Other Taxes")};e[1].tps_page_3_taxes_and_payments_other_taxes!==void 0&&(Ve.value=e[1].tps_page_3_taxes_and_payments_other_taxes),d=new xt({props:Ve}),Oe.push(()=>$e(d,"value",we));function Ke(dt){e[64](dt)}let yt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_total_tax_fed",hidden:e[2].isHidden("Total Tax Fed")};e[1].tps_page_3_taxes_and_payments_total_tax_fed!==void 0&&(yt.value=e[1].tps_page_3_taxes_and_payments_total_tax_fed),v=new xt({props:yt}),Oe.push(()=>$e(v,"value",Ke));function ht(dt){e[65](dt)}let Je={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_total_tax_state",hidden:e[2].isHidden("Total Tax State")};e[1].tps_page_3_taxes_and_payments_total_tax_state!==void 0&&(Je.value=e[1].tps_page_3_taxes_and_payments_total_tax_state),b=new xt({props:Je}),Oe.push(()=>$e(b,"value",ht));function pt(dt){e[66](dt)}let Tt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_credits",hidden:e[2].isHidden("Credits")};e[1].tps_page_3_taxes_and_payments_credits!==void 0&&(Tt.value=e[1].tps_page_3_taxes_and_payments_credits),E=new xt({props:Tt}),Oe.push(()=>$e(E,"value",pt));function it(dt){e[67](dt)}let Ge={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_state_tax_credit",hidden:e[2].isHidden("State Tax Credit")};e[1].tps_page_3_taxes_and_payments_state_tax_credit!==void 0&&(Ge.value=e[1].tps_page_3_taxes_and_payments_state_tax_credit),I=new xt({props:Ge}),Oe.push(()=>$e(I,"value",it));function st(dt){e[68](dt)}let It={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_witholding_fed",hidden:e[2].isHidden("Witholding Fed")};e[1].tps_page_3_taxes_and_payments_witholding_fed!==void 0&&(It.value=e[1].tps_page_3_taxes_and_payments_witholding_fed),O=new xt({props:It}),Oe.push(()=>$e(O,"value",st));function Ct(dt){e[69](dt)}let bt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_witholding_state",hidden:e[2].isHidden("Witholding State")};e[1].tps_page_3_taxes_and_payments_witholding_state!==void 0&&(bt.value=e[1].tps_page_3_taxes_and_payments_witholding_state),F=new xt({props:bt}),Oe.push(()=>$e(F,"value",Ct));function Rt(dt){e[70](dt)}let cn={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_estimated_tax_payments_fed",hidden:e[2].isHidden("Estimated Tax Payments Fed")};e[1].tps_page_3_taxes_and_payments_estimated_tax_payments_fed!==void 0&&(cn.value=e[1].tps_page_3_taxes_and_payments_estimated_tax_payments_fed),L=new xt({props:cn}),Oe.push(()=>$e(L,"value",Rt));function nn(dt){e[71](dt)}let Qe={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_estimated_tax_payments_state",hidden:e[2].isHidden("Estimated Tax Payments State")};e[1].tps_page_3_taxes_and_payments_estimated_tax_payments_state!==void 0&&(Qe.value=e[1].tps_page_3_taxes_and_payments_estimated_tax_payments_state),H=new xt({props:Qe}),Oe.push(()=>$e(H,"value",nn));function Ft(dt){e[72](dt)}let Fn={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_other_payments",hidden:e[2].isHidden("Other Payments")};e[1].tps_page_3_taxes_and_payments_other_payments!==void 0&&(Fn.value=e[1].tps_page_3_taxes_and_payments_other_payments),Q=new xt({props:Fn}),Oe.push(()=>$e(Q,"value",Ft));function He(dt){e[73](dt)}let Dt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_total_federal_tax_credits",hidden:e[2].isHidden("Total Federal Tax Credits")};e[1].tps_page_3_taxes_and_payments_total_federal_tax_credits!==void 0&&(Dt.value=e[1].tps_page_3_taxes_and_payments_total_federal_tax_credits),te=new xt({props:Dt}),Oe.push(()=>$e(te,"value",He));function Xt(dt){e[74](dt)}let Mt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_total_state_tax_credits",hidden:e[2].isHidden("Total State Tax Credits")};e[1].tps_page_3_taxes_and_payments_total_state_tax_credits!==void 0&&(Mt.value=e[1].tps_page_3_taxes_and_payments_total_state_tax_credits),be=new xt({props:Mt}),Oe.push(()=>$e(be,"value",Xt));function Xe(dt){e[75](dt)}let Nt={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_tax_due",hidden:e[2].isHidden("Tax Due")};e[1].tps_page_3_taxes_and_payments_tax_due!==void 0&&(Nt.value=e[1].tps_page_3_taxes_and_payments_tax_due),Ce=new xt({props:Nt}),Oe.push(()=>$e(Ce,"value",Xe));function on(dt){e[76](dt)}let In={refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments_state_tax_due",hidden:e[2].isHidden("State Tax Due")};return e[1].tps_page_3_taxes_and_payments_state_tax_due!==void 0&&(In.value=e[1].tps_page_3_taxes_and_payments_state_tax_due),Y=new xt({props:In}),Oe.push(()=>$e(Y,"value",on)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment),re(o.$$.fragment),re(d.$$.fragment),re(v.$$.fragment),re(b.$$.fragment),re(E.$$.fragment),re(I.$$.fragment),re(O.$$.fragment),re(F.$$.fragment),re(L.$$.fragment),re(H.$$.fragment),re(Q.$$.fragment),re(te.$$.fragment),re(be.$$.fragment),re(Ce.$$.fragment),re(Y.$$.fragment)},m(dt,Zt){ae(t,dt,Zt),ae(i,dt,Zt),ae(a,dt,Zt),ae(o,dt,Zt),ae(d,dt,Zt),ae(v,dt,Zt),ae(b,dt,Zt),ae(E,dt,Zt),ae(I,dt,Zt),ae(O,dt,Zt),ae(F,dt,Zt),ae(L,dt,Zt),ae(H,dt,Zt),ae(Q,dt,Zt),ae(te,dt,Zt),ae(be,dt,Zt),ae(Ce,dt,Zt),ae(Y,dt,Zt),Me=!0},p(dt,Zt){const Ln={};Zt[0]&1&&(Ln.refreshReportParams=dt[0]),Zt[0]&4&&(Ln.hidden=dt[2].isHidden("Tax Fed")),!n&&Zt[0]&2&&(n=!0,Ln.value=dt[1].tps_page_3_taxes_and_payments_tax_fed,Ne(()=>n=!1)),t.$set(Ln);const xn={};Zt[0]&1&&(xn.refreshReportParams=dt[0]),Zt[0]&4&&(xn.hidden=dt[2].isHidden("Tax State")),!r&&Zt[0]&2&&(r=!0,xn.value=dt[1].tps_page_3_taxes_and_payments_tax_state,Ne(()=>r=!1)),i.$set(xn);const Dn={};Zt[0]&1&&(Dn.refreshReportParams=dt[0]),Zt[0]&4&&(Dn.hidden=dt[2].isHidden("Alternative Min Tax")),!s&&Zt[0]&2&&(s=!0,Dn.value=dt[1].tps_page_3_taxes_and_payments_alternative_min_tax,Ne(()=>s=!1)),a.$set(Dn);const Un={};Zt[0]&1&&(Un.refreshReportParams=dt[0]),Zt[0]&4&&(Un.hidden=dt[2].isHidden("Self Employment Tax")),!l&&Zt[0]&2&&(l=!0,Un.value=dt[1].tps_page_3_taxes_and_payments_self_employment_tax,Ne(()=>l=!1)),o.$set(Un);const qn={};Zt[0]&1&&(qn.refreshReportParams=dt[0]),Zt[0]&4&&(qn.hidden=dt[2].isHidden("Other Taxes")),!c&&Zt[0]&2&&(c=!0,qn.value=dt[1].tps_page_3_taxes_and_payments_other_taxes,Ne(()=>c=!1)),d.$set(qn);const ft={};Zt[0]&1&&(ft.refreshReportParams=dt[0]),Zt[0]&4&&(ft.hidden=dt[2].isHidden("Total Tax Fed")),!T&&Zt[0]&2&&(T=!0,ft.value=dt[1].tps_page_3_taxes_and_payments_total_tax_fed,Ne(()=>T=!1)),v.$set(ft);const ni={};Zt[0]&1&&(ni.refreshReportParams=dt[0]),Zt[0]&4&&(ni.hidden=dt[2].isHidden("Total Tax State")),!A&&Zt[0]&2&&(A=!0,ni.value=dt[1].tps_page_3_taxes_and_payments_total_tax_state,Ne(()=>A=!1)),b.$set(ni);const Et={};Zt[0]&1&&(Et.refreshReportParams=dt[0]),Zt[0]&4&&(Et.hidden=dt[2].isHidden("Credits")),!y&&Zt[0]&2&&(y=!0,Et.value=dt[1].tps_page_3_taxes_and_payments_credits,Ne(()=>y=!1)),E.$set(Et);const un={};Zt[0]&1&&(un.refreshReportParams=dt[0]),Zt[0]&4&&(un.hidden=dt[2].isHidden("State Tax Credit")),!D&&Zt[0]&2&&(D=!0,un.value=dt[1].tps_page_3_taxes_and_payments_state_tax_credit,Ne(()=>D=!1)),I.$set(un);const Ai={};Zt[0]&1&&(Ai.refreshReportParams=dt[0]),Zt[0]&4&&(Ai.hidden=dt[2].isHidden("Witholding Fed")),!M&&Zt[0]&2&&(M=!0,Ai.value=dt[1].tps_page_3_taxes_and_payments_witholding_fed,Ne(()=>M=!1)),O.$set(Ai);const St={};Zt[0]&1&&(St.refreshReportParams=dt[0]),Zt[0]&4&&(St.hidden=dt[2].isHidden("Witholding State")),!$&&Zt[0]&2&&($=!0,St.value=dt[1].tps_page_3_taxes_and_payments_witholding_state,Ne(()=>$=!1)),F.$set(St);const sn={};Zt[0]&1&&(sn.refreshReportParams=dt[0]),Zt[0]&4&&(sn.hidden=dt[2].isHidden("Estimated Tax Payments Fed")),!j&&Zt[0]&2&&(j=!0,sn.value=dt[1].tps_page_3_taxes_and_payments_estimated_tax_payments_fed,Ne(()=>j=!1)),L.$set(sn);const ci={};Zt[0]&1&&(ci.refreshReportParams=dt[0]),Zt[0]&4&&(ci.hidden=dt[2].isHidden("Estimated Tax Payments State")),!V&&Zt[0]&2&&(V=!0,ci.value=dt[1].tps_page_3_taxes_and_payments_estimated_tax_payments_state,Ne(()=>V=!1)),H.$set(ci);const pi={};Zt[0]&1&&(pi.refreshReportParams=dt[0]),Zt[0]&4&&(pi.hidden=dt[2].isHidden("Other Payments")),!X&&Zt[0]&2&&(X=!0,pi.value=dt[1].tps_page_3_taxes_and_payments_other_payments,Ne(()=>X=!1)),Q.$set(pi);const Pi={};Zt[0]&1&&(Pi.refreshReportParams=dt[0]),Zt[0]&4&&(Pi.hidden=dt[2].isHidden("Total Federal Tax Credits")),!ne&&Zt[0]&2&&(ne=!0,Pi.value=dt[1].tps_page_3_taxes_and_payments_total_federal_tax_credits,Ne(()=>ne=!1)),te.$set(Pi);const $i={};Zt[0]&1&&($i.refreshReportParams=dt[0]),Zt[0]&4&&($i.hidden=dt[2].isHidden("Total State Tax Credits")),!ue&&Zt[0]&2&&(ue=!0,$i.value=dt[1].tps_page_3_taxes_and_payments_total_state_tax_credits,Ne(()=>ue=!1)),be.$set($i);const ji={};Zt[0]&1&&(ji.refreshReportParams=dt[0]),Zt[0]&4&&(ji.hidden=dt[2].isHidden("Tax Due")),!ie&&Zt[0]&2&&(ie=!0,ji.value=dt[1].tps_page_3_taxes_and_payments_tax_due,Ne(()=>ie=!1)),Ce.$set(ji);const ri={};Zt[0]&1&&(ri.refreshReportParams=dt[0]),Zt[0]&4&&(ri.hidden=dt[2].isHidden("State Tax Due")),!he&&Zt[0]&2&&(he=!0,ri.value=dt[1].tps_page_3_taxes_and_payments_state_tax_due,Ne(()=>he=!1)),Y.$set(ri)},i(dt){Me||(U(t.$$.fragment,dt),U(i.$$.fragment,dt),U(a.$$.fragment,dt),U(o.$$.fragment,dt),U(d.$$.fragment,dt),U(v.$$.fragment,dt),U(b.$$.fragment,dt),U(E.$$.fragment,dt),U(I.$$.fragment,dt),U(O.$$.fragment,dt),U(F.$$.fragment,dt),U(L.$$.fragment,dt),U(H.$$.fragment,dt),U(Q.$$.fragment,dt),U(te.$$.fragment,dt),U(be.$$.fragment,dt),U(Ce.$$.fragment,dt),U(Y.$$.fragment,dt),Me=!0)},o(dt){W(t.$$.fragment,dt),W(i.$$.fragment,dt),W(a.$$.fragment,dt),W(o.$$.fragment,dt),W(d.$$.fragment,dt),W(v.$$.fragment,dt),W(b.$$.fragment,dt),W(E.$$.fragment,dt),W(I.$$.fragment,dt),W(O.$$.fragment,dt),W(F.$$.fragment,dt),W(L.$$.fragment,dt),W(H.$$.fragment,dt),W(Q.$$.fragment,dt),W(te.$$.fragment,dt),W(be.$$.fragment,dt),W(Ce.$$.fragment,dt),W(Y.$$.fragment,dt),Me=!1},d(dt){se(t,dt),se(i,dt),se(a,dt),se(o,dt),se(d,dt),se(v,dt),se(b,dt),se(E,dt),se(I,dt),se(O,dt),se(F,dt),se(L,dt),se(H,dt),se(Q,dt),se(te,dt),se(be,dt),se(Ce,dt),se(Y,dt)}}}function Bce(e){let t,n,i,r,a,s,o,l;return t=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_1",classNames:"report-suboption",hidden:e[2].isHidden("Page 1 Income"),$$slots:{default:[Rce]},$$scope:{ctx:e}}}),n=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_1_deductions_and_credits",classNames:"report-suboption",hidden:e[2].isHidden("Page 1 Deductions &amp; Credits"),$$slots:{default:[$ce]},$$scope:{ctx:e}}}),i=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_1_tax_and_payments",classNames:"report-suboption",hidden:e[2].isHidden("Page 1 Taxes &amp; Payments"),$$slots:{default:[Nce]},$$scope:{ctx:e}}}),r=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_2_income",classNames:"report-suboption",hidden:e[2].isHidden("Page 2 Income"),$$slots:{default:[Fce]},$$scope:{ctx:e}}}),a=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_2_adjustments",classNames:"report-suboption",hidden:e[2].isHidden("Page 2 Adjustments"),$$slots:{default:[Lce]},$$scope:{ctx:e}}}),s=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_3_deductions",classNames:"report-suboption",hidden:e[2].isHidden("Page 3 Deductions"),$$slots:{default:[Hce]},$$scope:{ctx:e}}}),o=new Ci({props:{refreshReportParams:e[0],specTreeNodeId:"tps_page_3_taxes_and_payments",classNames:"report-suboption",hidden:e[2].isHidden("Page 3 Taxes &amp; Payments"),$$slots:{default:[jce]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment),re(n.$$.fragment),re(i.$$.fragment),re(r.$$.fragment),re(a.$$.fragment),re(s.$$.fragment),re(o.$$.fragment)},m(d,c){ae(t,d,c),ae(n,d,c),ae(i,d,c),ae(r,d,c),ae(a,d,c),ae(s,d,c),ae(o,d,c),l=!0},p(d,c){const v={};c[0]&1&&(v.refreshReportParams=d[0]),c[0]&4&&(v.hidden=d[2].isHidden("Page 1 Income")),c[0]&7|c[2]&65536&&(v.$$scope={dirty:c,ctx:d}),t.$set(v);const T={};c[0]&1&&(T.refreshReportParams=d[0]),c[0]&4&&(T.hidden=d[2].isHidden("Page 1 Deductions &amp; Credits")),c[0]&7|c[2]&65536&&(T.$$scope={dirty:c,ctx:d}),n.$set(T);const b={};c[0]&1&&(b.refreshReportParams=d[0]),c[0]&4&&(b.hidden=d[2].isHidden("Page 1 Taxes &amp; Payments")),c[0]&7|c[2]&65536&&(b.$$scope={dirty:c,ctx:d}),i.$set(b);const A={};c[0]&1&&(A.refreshReportParams=d[0]),c[0]&4&&(A.hidden=d[2].isHidden("Page 2 Income")),c[0]&7|c[2]&65536&&(A.$$scope={dirty:c,ctx:d}),r.$set(A);const E={};c[0]&1&&(E.refreshReportParams=d[0]),c[0]&4&&(E.hidden=d[2].isHidden("Page 2 Adjustments")),c[0]&7|c[2]&65536&&(E.$$scope={dirty:c,ctx:d}),a.$set(E);const y={};c[0]&1&&(y.refreshReportParams=d[0]),c[0]&4&&(y.hidden=d[2].isHidden("Page 3 Deductions")),c[0]&7|c[2]&65536&&(y.$$scope={dirty:c,ctx:d}),s.$set(y);const I={};c[0]&1&&(I.refreshReportParams=d[0]),c[0]&4&&(I.hidden=d[2].isHidden("Page 3 Taxes &amp; Payments")),c[0]&7|c[2]&65536&&(I.$$scope={dirty:c,ctx:d}),o.$set(I)},i(d){l||(U(t.$$.fragment,d),U(n.$$.fragment,d),U(i.$$.fragment,d),U(r.$$.fragment,d),U(a.$$.fragment,d),U(s.$$.fragment,d),U(o.$$.fragment,d),l=!0)},o(d){W(t.$$.fragment,d),W(n.$$.fragment,d),W(i.$$.fragment,d),W(r.$$.fragment,d),W(a.$$.fragment,d),W(s.$$.fragment,d),W(o.$$.fragment,d),l=!1},d(d){se(t,d),se(n,d),se(i,d),se(r,d),se(a,d),se(s,d),se(o,d)}}}function Uce(e){let t,n,i;function r(s){e[77](s)}let a={refreshReportParams:e[0],specTreeNodeId:"tps_enable",hidden:e[2].isHidden("Tax Projection Summary"),scrollToId:"pdfTaxProjectionSummary",$$slots:{default:[Bce]},$$scope:{ctx:e}};return e[1].tps_enable!==void 0&&(a.checked=e[1].tps_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};o[0]&1&&(l.refreshReportParams=s[0]),o[0]&4&&(l.hidden=s[2].isHidden("Tax Projection Summary")),o[0]&7|o[2]&65536&&(l.$$scope={dirty:o,ctx:s}),!n&&o[0]&2&&(n=!0,l.checked=s[1].tps_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function qce(e,t,n){let i,r;Sn(e,Ye,ft=>n(1,i=ft)),Sn(e,Fl,ft=>n(2,r=ft));let{refreshReportParams:a}=t;function s(ft){e.$$.not_equal(i.tps_page_1_income_projected_revenue,ft)&&(i.tps_page_1_income_projected_revenue=ft,Ye.set(i))}function o(ft){e.$$.not_equal(i.tps_page_1_income_projected_expense,ft)&&(i.tps_page_1_income_projected_expense=ft,Ye.set(i))}function l(ft){e.$$.not_equal(i.tps_page_1_income_projected_expense_sum,ft)&&(i.tps_page_1_income_projected_expense_sum=ft,Ye.set(i))}function d(ft){e.$$.not_equal(i.tps_page_1_income_wages,ft)&&(i.tps_page_1_income_wages=ft,Ye.set(i))}function c(ft){e.$$.not_equal(i.tps_page_1_income_portfolio_income,ft)&&(i.tps_page_1_income_portfolio_income=ft,Ye.set(i))}function v(ft){e.$$.not_equal(i.tps_page_1_income_rental_income,ft)&&(i.tps_page_1_income_rental_income=ft,Ye.set(i))}function T(ft){e.$$.not_equal(i.tps_page_1_income_other_income,ft)&&(i.tps_page_1_income_other_income=ft,Ye.set(i))}function b(ft){e.$$.not_equal(i.tps_page_1_income_personal_income,ft)&&(i.tps_page_1_income_personal_income=ft,Ye.set(i))}function A(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_adjustments,ft)&&(i.tps_page_1_deductions_and_credits_adjustments=ft,Ye.set(i))}function E(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_passthrough_deduction,ft)&&(i.tps_page_1_deductions_and_credits_passthrough_deduction=ft,Ye.set(i))}function y(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_itemized_deduction,ft)&&(i.tps_page_1_deductions_and_credits_itemized_deduction=ft,Ye.set(i))}function I(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_credits,ft)&&(i.tps_page_1_deductions_and_credits_credits=ft,Ye.set(i))}function D(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_deductions_and_credits,ft)&&(i.tps_page_1_deductions_and_credits_deductions_and_credits=ft,Ye.set(i))}function O(ft){e.$$.not_equal(i.tps_page_1_deductions_and_credits_taxable_income,ft)&&(i.tps_page_1_deductions_and_credits_taxable_income=ft,Ye.set(i))}function M(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_tax_fed,ft)&&(i.tps_page_1_tax_and_payments_tax_fed=ft,Ye.set(i))}function F(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_tax_state,ft)&&(i.tps_page_1_tax_and_payments_tax_state=ft,Ye.set(i))}function $(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_witholding_and_es_payments_fed,ft)&&(i.tps_page_1_tax_and_payments_witholding_and_es_payments_fed=ft,Ye.set(i))}function L(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_witholding_and_es_payments_stat,ft)&&(i.tps_page_1_tax_and_payments_witholding_and_es_payments_stat=ft,Ye.set(i))}function j(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_tax_due_fed,ft)&&(i.tps_page_1_tax_and_payments_tax_due_fed=ft,Ye.set(i))}function H(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_tax_due_state,ft)&&(i.tps_page_1_tax_and_payments_tax_due_state=ft,Ye.set(i))}function V(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_next_lower_bracket,ft)&&(i.tps_page_1_tax_and_payments_next_lower_bracket=ft,Ye.set(i))}function Q(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_effective_tax_rate,ft)&&(i.tps_page_1_tax_and_payments_effective_tax_rate=ft,Ye.set(i))}function X(ft){e.$$.not_equal(i.tps_page_1_tax_and_payments_distance_to_bracket,ft)&&(i.tps_page_1_tax_and_payments_distance_to_bracket=ft,Ye.set(i))}function te(ft){e.$$.not_equal(i.tps_page_2_income_wages,ft)&&(i.tps_page_2_income_wages=ft,Ye.set(i))}function ne(ft){e.$$.not_equal(i.tps_page_2_income_interest,ft)&&(i.tps_page_2_income_interest=ft,Ye.set(i))}function be(ft){e.$$.not_equal(i.tps_page_2_income_dividents,ft)&&(i.tps_page_2_income_dividents=ft,Ye.set(i))}function ue(ft){e.$$.not_equal(i.tps_page_2_income_capital_gains,ft)&&(i.tps_page_2_income_capital_gains=ft,Ye.set(i))}function Ce(ft){e.$$.not_equal(i.tps_page_2_income_rental_income,ft)&&(i.tps_page_2_income_rental_income=ft,Ye.set(i))}function ie(ft){e.$$.not_equal(i.tps_page_2_income_first_company_name,ft)&&(i.tps_page_2_income_first_company_name=ft,Ye.set(i))}function Y(ft){e.$$.not_equal(i.tps_page_2_income_first_company_income,ft)&&(i.tps_page_2_income_first_company_income=ft,Ye.set(i))}function he(ft){e.$$.not_equal(i.tps_page_2_income_second_company_name,ft)&&(i.tps_page_2_income_second_company_name=ft,Ye.set(i))}function Me(ft){e.$$.not_equal(i.tps_page_2_income_second_company_income,ft)&&(i.tps_page_2_income_second_company_income=ft,Ye.set(i))}function Pe(ft){e.$$.not_equal(i.tps_page_2_income_third_company_name,ft)&&(i.tps_page_2_income_third_company_name=ft,Ye.set(i))}function We(ft){e.$$.not_equal(i.tps_page_2_income_third_company_income,ft)&&(i.tps_page_2_income_third_company_income=ft,Ye.set(i))}function qe(ft){e.$$.not_equal(i.tps_page_2_income_fourth_company_name,ft)&&(i.tps_page_2_income_fourth_company_name=ft,Ye.set(i))}function ee(ft){e.$$.not_equal(i.tps_page_2_income_fourth_company_income,ft)&&(i.tps_page_2_income_fourth_company_income=ft,Ye.set(i))}function G(ft){e.$$.not_equal(i.tps_page_2_income_extra_s_corp_income,ft)&&(i.tps_page_2_income_extra_s_corp_income=ft,Ye.set(i))}function me(ft){e.$$.not_equal(i.tps_page_2_income_extra_schedule_c_income,ft)&&(i.tps_page_2_income_extra_schedule_c_income=ft,Ye.set(i))}function Te(ft){e.$$.not_equal(i.tps_page_2_income_other_income,ft)&&(i.tps_page_2_income_other_income=ft,Ye.set(i))}function De(ft){e.$$.not_equal(i.tps_page_2_income_total_income,ft)&&(i.tps_page_2_income_total_income=ft,Ye.set(i))}function we(ft){e.$$.not_equal(i.tps_page_2_adjustments_health_savings_account,ft)&&(i.tps_page_2_adjustments_health_savings_account=ft,Ye.set(i))}function Ve(ft){e.$$.not_equal(i.tps_page_2_adjustments_deductible_se_tax,ft)&&(i.tps_page_2_adjustments_deductible_se_tax=ft,Ye.set(i))}function Ke(ft){e.$$.not_equal(i.tps_page_2_adjustments_sep_simple_qual_plans,ft)&&(i.tps_page_2_adjustments_sep_simple_qual_plans=ft,Ye.set(i))}function yt(ft){e.$$.not_equal(i.tps_page_2_adjustments_self_employed_health_ins,ft)&&(i.tps_page_2_adjustments_self_employed_health_ins=ft,Ye.set(i))}function ht(ft){e.$$.not_equal(i.tps_page_2_adjustments_ira_deduction,ft)&&(i.tps_page_2_adjustments_ira_deduction=ft,Ye.set(i))}function Je(ft){e.$$.not_equal(i.tps_page_2_adjustments_other_adjustments,ft)&&(i.tps_page_2_adjustments_other_adjustments=ft,Ye.set(i))}function pt(ft){e.$$.not_equal(i.tps_page_2_adjustments_total_adjustments,ft)&&(i.tps_page_2_adjustments_total_adjustments=ft,Ye.set(i))}function Tt(ft){e.$$.not_equal(i.tps_page_2_adjustments_adjusted_gross_income,ft)&&(i.tps_page_2_adjustments_adjusted_gross_income=ft,Ye.set(i))}function it(ft){e.$$.not_equal(i.tps_page_3_deductions_medical_related,ft)&&(i.tps_page_3_deductions_medical_related=ft,Ye.set(i))}function Ge(ft){e.$$.not_equal(i.tps_page_3_deductions_taxes,ft)&&(i.tps_page_3_deductions_taxes=ft,Ye.set(i))}function st(ft){e.$$.not_equal(i.tps_page_3_deductions_mortgage_interest,ft)&&(i.tps_page_3_deductions_mortgage_interest=ft,Ye.set(i))}function It(ft){e.$$.not_equal(i.tps_page_3_deductions_charity,ft)&&(i.tps_page_3_deductions_charity=ft,Ye.set(i))}function Ct(ft){e.$$.not_equal(i.tps_page_3_deductions_other_itemized_deductions,ft)&&(i.tps_page_3_deductions_other_itemized_deductions=ft,Ye.set(i))}function bt(ft){e.$$.not_equal(i.tps_page_3_deductions_passthrough_deduction,ft)&&(i.tps_page_3_deductions_passthrough_deduction=ft,Ye.set(i))}function Rt(ft){e.$$.not_equal(i.tps_page_3_deductions_total_deductions,ft)&&(i.tps_page_3_deductions_total_deductions=ft,Ye.set(i))}function cn(ft){e.$$.not_equal(i.tps_page_3_deductions_taxable_income,ft)&&(i.tps_page_3_deductions_taxable_income=ft,Ye.set(i))}function nn(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_tax_fed,ft)&&(i.tps_page_3_taxes_and_payments_tax_fed=ft,Ye.set(i))}function Qe(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_tax_state,ft)&&(i.tps_page_3_taxes_and_payments_tax_state=ft,Ye.set(i))}function Ft(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_alternative_min_tax,ft)&&(i.tps_page_3_taxes_and_payments_alternative_min_tax=ft,Ye.set(i))}function Fn(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_self_employment_tax,ft)&&(i.tps_page_3_taxes_and_payments_self_employment_tax=ft,Ye.set(i))}function He(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_other_taxes,ft)&&(i.tps_page_3_taxes_and_payments_other_taxes=ft,Ye.set(i))}function Dt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_total_tax_fed,ft)&&(i.tps_page_3_taxes_and_payments_total_tax_fed=ft,Ye.set(i))}function Xt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_total_tax_state,ft)&&(i.tps_page_3_taxes_and_payments_total_tax_state=ft,Ye.set(i))}function Mt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_credits,ft)&&(i.tps_page_3_taxes_and_payments_credits=ft,Ye.set(i))}function Xe(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_state_tax_credit,ft)&&(i.tps_page_3_taxes_and_payments_state_tax_credit=ft,Ye.set(i))}function Nt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_witholding_fed,ft)&&(i.tps_page_3_taxes_and_payments_witholding_fed=ft,Ye.set(i))}function on(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_witholding_state,ft)&&(i.tps_page_3_taxes_and_payments_witholding_state=ft,Ye.set(i))}function In(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_estimated_tax_payments_fed,ft)&&(i.tps_page_3_taxes_and_payments_estimated_tax_payments_fed=ft,Ye.set(i))}function dt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_estimated_tax_payments_state,ft)&&(i.tps_page_3_taxes_and_payments_estimated_tax_payments_state=ft,Ye.set(i))}function Zt(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_other_payments,ft)&&(i.tps_page_3_taxes_and_payments_other_payments=ft,Ye.set(i))}function Ln(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_total_federal_tax_credits,ft)&&(i.tps_page_3_taxes_and_payments_total_federal_tax_credits=ft,Ye.set(i))}function xn(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_total_state_tax_credits,ft)&&(i.tps_page_3_taxes_and_payments_total_state_tax_credits=ft,Ye.set(i))}function Dn(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_tax_due,ft)&&(i.tps_page_3_taxes_and_payments_tax_due=ft,Ye.set(i))}function Un(ft){e.$$.not_equal(i.tps_page_3_taxes_and_payments_state_tax_due,ft)&&(i.tps_page_3_taxes_and_payments_state_tax_due=ft,Ye.set(i))}function qn(ft){e.$$.not_equal(i.tps_enable,ft)&&(i.tps_enable=ft,Ye.set(i))}return e.$$set=ft=>{"refreshReportParams"in ft&&n(0,a=ft.refreshReportParams)},[a,i,r,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt,on,In,dt,Zt,Ln,xn,Dn,Un,qn]}class Wce extends Qt{constructor(t){super(),Jt(this,t,qce,Uce,Kt,{refreshReportParams:0},null,[-1,-1,-1])}}function Vce(e){let t,n,i,r,a;function s(c){e[3](c)}let o={specTreeNodeId:"tips_and_advices_for_you_text",hidden:e[1].isHidden("Description")};e[0].tips_and_advices_for_you_text!==void 0&&(o.value=e[0].tips_and_advices_for_you_text),t=new ta({props:o}),Oe.push(()=>$e(t,"value",s));function l(c){e[4](c)}let d={specTreeNodeId:"tips_and_advices_for_you_font_size",title:"Font Size",options:e[2],hidden:e[1].isHidden("Font Size")};return e[0].tips_and_advices_for_you_font_size!==void 0&&(d.value=e[0].tips_and_advices_for_you_font_size),i=new Ml({props:d}),Oe.push(()=>$e(i,"value",l)),{c(){re(t.$$.fragment),re(i.$$.fragment)},m(c,v){ae(t,c,v),ae(i,c,v),a=!0},p(c,v){const T={};v&2&&(T.hidden=c[1].isHidden("Description")),!n&&v&1&&(n=!0,T.value=c[0].tips_and_advices_for_you_text,Ne(()=>n=!1)),t.$set(T);const b={};v&2&&(b.hidden=c[1].isHidden("Font Size")),!r&&v&1&&(r=!0,b.value=c[0].tips_and_advices_for_you_font_size,Ne(()=>r=!1)),i.$set(b)},i(c){a||(U(t.$$.fragment,c),U(i.$$.fragment,c),a=!0)},o(c){W(t.$$.fragment,c),W(i.$$.fragment,c),a=!1},d(c){se(t,c),se(i,c)}}}function zce(e){let t,n,i;function r(s){e[5](s)}let a={specTreeNodeId:"tips_and_advices_for_you_enable",hidden:e[1].isHidden("Tips And Advice For You"),scrollToId:"pdfTaxTipsAdvice",$$slots:{default:[Vce]},$$scope:{ctx:e}};return e[0].tips_and_advices_for_you_enable!==void 0&&(a.checked=e[0].tips_and_advices_for_you_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&2&&(l.hidden=s[1].isHidden("Tips And Advice For You")),o&67&&(l.$$scope={dirty:o,ctx:s}),!n&&o&1&&(n=!0,l.checked=s[0].tips_and_advices_for_you_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Yce(e,t,n){let i,r;Sn(e,Ye,d=>n(0,i=d)),Sn(e,Fl,d=>n(1,r=d));const a={big:"Big",small:"Small"};function s(d){e.$$.not_equal(i.tips_and_advices_for_you_text,d)&&(i.tips_and_advices_for_you_text=d,Ye.set(i))}function o(d){e.$$.not_equal(i.tips_and_advices_for_you_font_size,d)&&(i.tips_and_advices_for_you_font_size=d,Ye.set(i))}function l(d){e.$$.not_equal(i.tips_and_advices_for_you_enable,d)&&(i.tips_and_advices_for_you_enable=d,Ye.set(i))}return[i,r,a,s,o,l]}class Gce extends Qt{constructor(t){super(),Jt(this,t,Yce,zce,Kt,{})}}function Kce(e){let t,n,i,r,a,s,o;function l(A){e[4](A)}let d={specTreeNodeId:"top_3_strategy_picks_first_type",title:"Strategy Pick #1",options:e[3],hidden:e[2].isHidden("Strategy Pick #1")};e[1].top_3_strategy_picks_first_type!==void 0&&(d.value=e[1].top_3_strategy_picks_first_type),t=new Ml({props:d}),Oe.push(()=>$e(t,"value",l));function c(A){e[5](A)}let v={specTreeNodeId:"top_3_strategy_picks_second_type",title:"Strategy Pick #2",options:e[3],hidden:e[2].isHidden("Strategy Pick #2")};e[1].top_3_strategy_picks_second_type!==void 0&&(v.value=e[1].top_3_strategy_picks_second_type),i=new Ml({props:v}),Oe.push(()=>$e(i,"value",c));function T(A){e[6](A)}let b={specTreeNodeId:"top_3_strategy_picks_third_type",title:"Strategy Pick #3",options:e[3],hidden:e[2].isHidden("Strategy Pick #3")};return e[1].top_3_strategy_picks_third_type!==void 0&&(b.value=e[1].top_3_strategy_picks_third_type),a=new Ml({props:b}),Oe.push(()=>$e(a,"value",T)),{c(){re(t.$$.fragment),re(i.$$.fragment),re(a.$$.fragment)},m(A,E){ae(t,A,E),ae(i,A,E),ae(a,A,E),o=!0},p(A,E){const y={};E&4&&(y.hidden=A[2].isHidden("Strategy Pick #1")),!n&&E&2&&(n=!0,y.value=A[1].top_3_strategy_picks_first_type,Ne(()=>n=!1)),t.$set(y);const I={};E&4&&(I.hidden=A[2].isHidden("Strategy Pick #2")),!r&&E&2&&(r=!0,I.value=A[1].top_3_strategy_picks_second_type,Ne(()=>r=!1)),i.$set(I);const D={};E&4&&(D.hidden=A[2].isHidden("Strategy Pick #3")),!s&&E&2&&(s=!0,D.value=A[1].top_3_strategy_picks_third_type,Ne(()=>s=!1)),a.$set(D)},i(A){o||(U(t.$$.fragment,A),U(i.$$.fragment,A),U(a.$$.fragment,A),o=!0)},o(A){W(t.$$.fragment,A),W(i.$$.fragment,A),W(a.$$.fragment,A),o=!1},d(A){se(t,A),se(i,A),se(a,A)}}}function Xce(e){let t,n,i;function r(s){e[7](s)}let a={refreshReportParams:e[0],specTreeNodeId:"top_3_strategy_picks_enable",hidden:e[2].isHidden("Top 3 Strategy Picks"),scrollToId:"pdfTop3StrategyPicks",$$slots:{default:[Kce]},$$scope:{ctx:e}};return e[1].top_3_strategy_picks_enable!==void 0&&(a.checked=e[1].top_3_strategy_picks_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&1&&(l.refreshReportParams=s[0]),o&4&&(l.hidden=s[2].isHidden("Top 3 Strategy Picks")),o&262&&(l.$$scope={dirty:o,ctx:s}),!n&&o&2&&(n=!0,l.checked=s[1].top_3_strategy_picks_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Qce(e,t,n){let i,r;Sn(e,Ye,v=>n(1,i=v)),Sn(e,Fl,v=>n(2,r=v));let{refreshReportParams:a}=t;const s={section179:"Section 179",expense_acceleration:"Expense Acceleration",missing_deductions:"Missing Deductions",income_deferment:"Income Deferment",sep_ira:"SEP IRA",fourteen_day_home_rental:"14 Day Home Rental",employing_your_children:"Employing Your Children",plan_401k:"Plan 401K",traditional_ira:"Traditional IRA",business_entity:"Business Entity",health_savings:"Health Savings",defined_benefit:"Defined Benefit"};function o(v){e.$$.not_equal(i.top_3_strategy_picks_first_type,v)&&(i.top_3_strategy_picks_first_type=v,Ye.set(i))}function l(v){e.$$.not_equal(i.top_3_strategy_picks_second_type,v)&&(i.top_3_strategy_picks_second_type=v,Ye.set(i))}function d(v){e.$$.not_equal(i.top_3_strategy_picks_third_type,v)&&(i.top_3_strategy_picks_third_type=v,Ye.set(i))}function c(v){e.$$.not_equal(i.top_3_strategy_picks_enable,v)&&(i.top_3_strategy_picks_enable=v,Ye.set(i))}return e.$$set=v=>{"refreshReportParams"in v&&n(0,a=v.refreshReportParams)},[a,i,r,s,o,l,d,c]}class Jce extends Qt{constructor(t){super(),Jt(this,t,Qce,Xce,Kt,{refreshReportParams:0})}}function DE(e,t,n){const i=e.slice();return i[6]=t[n][0],i[7]=t[n][1],i[8]=t,i[9]=n,i}function OE(e){let t,n,i;function r(s){e[4](s,e[6])}let a={refreshReportParams:e[0],specTreeNodeId:`tax_return_due_dates_${e[6]}`,hidden:e[2].isHidden(`${e[7]}`)};return e[1][`tax_return_due_dates_${e[6]}`]!==void 0&&(a.value=e[1][`tax_return_due_dates_${e[6]}`]),t=new Hp({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o&1&&(l.refreshReportParams=e[0]),o&4&&(l.hidden=e[2].isHidden(`${e[7]}`)),!n&&o&2&&(n=!0,l.value=e[1][`tax_return_due_dates_${e[6]}`],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function Zce(e){let t,n,i,r;function a(c){e[3](c)}let s={specTreeNodeId:"tax_return_due_dates_remember_text",hidden:e[2].isHidden("Remember")};e[1].tax_return_due_dates_remember_text!==void 0&&(s.value=e[1].tax_return_due_dates_remember_text),t=new ta({props:s}),Oe.push(()=>$e(t,"value",a));let o=Object.entries(Vb),l=[];for(let c=0;c<o.length;c+=1)l[c]=OE(DE(e,o,c));const d=c=>W(l[c],1,1,()=>{l[c]=null});return{c(){re(t.$$.fragment);for(let c=0;c<l.length;c+=1)l[c].c();i=On()},m(c,v){ae(t,c,v);for(let T=0;T<l.length;T+=1)l[T]&&l[T].m(c,v);ce(c,i,v),r=!0},p(c,v){const T={};if(v&4&&(T.hidden=c[2].isHidden("Remember")),!n&&v&2&&(n=!0,T.value=c[1].tax_return_due_dates_remember_text,Ne(()=>n=!1)),t.$set(T),v&7){o=Object.entries(Vb);let b;for(b=0;b<o.length;b+=1){const A=DE(c,o,b);l[b]?(l[b].p(A,v),U(l[b],1)):(l[b]=OE(A),l[b].c(),U(l[b],1),l[b].m(i.parentNode,i))}for(pn(),b=o.length;b<l.length;b+=1)d(b);hn()}},i(c){if(!r){U(t.$$.fragment,c);for(let v=0;v<o.length;v+=1)U(l[v]);r=!0}},o(c){W(t.$$.fragment,c),l=l.filter(Boolean);for(let v=0;v<l.length;v+=1)W(l[v]);r=!1},d(c){se(t,c),Nn(l,c),c&&_e(i)}}}function e_e(e){let t,n,i;function r(s){e[5](s)}let a={refreshReportParams:e[0],specTreeNodeId:"tax_return_due_dates_enable",hidden:e[2].isHidden("Important Tax Return Due Dates"),scrollToId:"pdfImportantTaxReturnDueDates",$$slots:{default:[Zce]},$$scope:{ctx:e}};return e[1].tax_return_due_dates_enable!==void 0&&(a.checked=e[1].tax_return_due_dates_enable),t=new Ci({props:a}),Oe.push(()=>$e(t,"checked",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,[o]){const l={};o&1&&(l.refreshReportParams=s[0]),o&4&&(l.hidden=s[2].isHidden("Important Tax Return Due Dates")),o&1031&&(l.$$scope={dirty:o,ctx:s}),!n&&o&2&&(n=!0,l.checked=s[1].tax_return_due_dates_enable,Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function t_e(e,t,n){let i,r;Sn(e,Ye,d=>n(1,i=d)),Sn(e,Fl,d=>n(2,r=d));let{refreshReportParams:a}=t;function s(d){e.$$.not_equal(i.tax_return_due_dates_remember_text,d)&&(i.tax_return_due_dates_remember_text=d,Ye.set(i))}function o(d,c){e.$$.not_equal(i[`tax_return_due_dates_${c}`],d)&&(i[`tax_return_due_dates_${c}`]=d,Ye.set(i))}function l(d){e.$$.not_equal(i.tax_return_due_dates_enable,d)&&(i.tax_return_due_dates_enable=d,Ye.set(i))}return e.$$set=d=>{"refreshReportParams"in d&&n(0,a=d.refreshReportParams)},[a,i,r,s,o,l]}class n_e extends Qt{constructor(t){super(),Jt(this,t,t_e,e_e,Kt,{refreshReportParams:0})}}function i_e(e){let t,n,i,r;return n=new ew({props:{containerStyles:o_e,items:e[1],optionIdentifier:r_e,isClearable:a_e,showIndicator:s_e,value:e[0]}}),n.$on("select",e[2]),{c(){t=P("div"),i=P("div"),re(n.$$.fragment),cr(i,"display","contents"),cr(i,"--itemIsActiveBG","#27b6af"),cr(i,"--itemHoverBG","#f6f8f8"),cr(i,"--borderFocusColor","#452161"),w(t,"id","reportSelector"),w(t,"class","svelte-6bzhen")},m(a,s){ce(a,t,s),m(t,i),ae(n,i,null),r=!0},p(a,[s]){const o={};s&2&&(o.items=a[1]),s&1&&(o.value=a[0]),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}const r_e="id",a_e=!1,s_e=!0,o_e="margin-bottom: 5px;";function l_e(e,t,n){let i,r,a;Sn(e,Ye,c=>n(6,a=c));let{reports:s}=t,{loadMaterializedReport:o}=t,{applyReport:l}=t;function d(c){const v=c.detail.id,T=Xn.find(s,{id:v});l(T),o()}return e.$$set=c=>{"reports"in c&&n(3,s=c.reports),"loadMaterializedReport"in c&&n(4,o=c.loadMaterializedReport),"applyReport"in c&&n(5,l=c.applyReport)},e.$$.update=()=>{e.$$.dirty&8&&n(1,i=s.map(c=>({id:c.id,label:c.name}))),e.$$.dirty&64&&n(0,r={id:a.id,label:a.name})},[r,i,d,s,o,l,a]}class u_e extends Qt{constructor(t){super(),Jt(this,t,l_e,i_e,Kt,{reports:3,loadMaterializedReport:4,applyReport:5})}}function d_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Create New Report",w(t,"class","btn svelte-plbetf")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(function(){Ga(e[0])&&e[0].apply(this,arguments)})),n=!0)},p(r,[a]){e=r},i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function f_e(e,t,n){let{createReport:i}=t;return e.$$set=r=>{"createReport"in r&&n(0,i=r.createReport)},[i]}class c_e extends Qt{constructor(t){super(),Jt(this,t,f_e,d_e,Kt,{createReport:0})}}function __e(e){let t,n,i,r,a,s,o,l,d,c,v,T;return{c(){t=P("h2"),t.textContent="Rename Report",n=K(),i=P("input"),r=K(),a=P("div"),s=P("button"),o=Le("Save"),d=K(),c=P("button"),c.textContent="Cancel",w(t,"class","svelte-1smtxtp"),w(i,"class","form-control svelte-1smtxtp"),w(s,"class","btn btn-success"),s.disabled=l=e[1].name===e[0],w(c,"class","btn btn-secondary"),w(a,"class","buttons svelte-1smtxtp")},m(b,A){ce(b,t,A),ce(b,n,A),ce(b,i,A),Pn(i,e[0]),ce(b,r,A),ce(b,a,A),m(a,s),m(s,o),m(a,d),m(a,c),v||(T=[ct(i,"input",e[6]),ct(i,"keypress",e[7]),ct(s,"click",Hi(e[2])),ct(c,"click",Hi(e[3]))],v=!0)},p(b,[A]){A&1&&i.value!==b[0]&&Pn(i,b[0]),A&3&&l!==(l=b[1].name===b[0])&&(s.disabled=l)},i:ot,o:ot,d(b){b&&_e(t),b&&_e(n),b&&_e(i),b&&_e(r),b&&_e(a),v=!1,vi(T)}}}function p_e(e,t,n){let i;Sn(e,Ye,v=>n(1,i=v));let{onSave:r}=t,{onCancel:a}=t,s=i.name;function o(){r(s)}function l(){a()}oa(()=>{document.body.style.position="initial"});function d(){s=this.value,n(0,s)}const c=v=>v.key==="Enter"&&o();return e.$$set=v=>{"onSave"in v&&n(4,r=v.onSave),"onCancel"in v&&n(5,a=v.onCancel)},[s,i,o,l,r,a,d,c]}class h_e extends Qt{constructor(t){super(),Jt(this,t,p_e,__e,Kt,{onSave:4,onCancel:5})}}function m_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Rename Report",w(t,"class","btn svelte-1113c4k")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(e[0])),n=!0)},p:ot,i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function g_e(e,t,n){let{updateReportName:i}=t;const{open:r,close:a}=pf("simple-modal"),s=d=>{i(d),a()},o=()=>{a()},l=()=>{r(h_e,{onSave:s,onCancel:o},{styleWindow:{width:"35%",height:"80%"},closeButton:!1,closeOnEsc:!1,closeOnOuterClick:!1,transitionWindow:t_,transitionWindowProps:{y:-100,duration:500}})};return e.$$set=d=>{"updateReportName"in d&&n(1,i=d.updateReportName)},[l,i]}class v_e extends Qt{constructor(t){super(),Jt(this,t,g_e,m_e,Kt,{updateReportName:1})}}function b_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Delete Report",w(t,"class","btn svelte-1rf9dt1")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(function(){Ga(e[0])&&e[0].apply(this,arguments)})),n=!0)},p(r,[a]){e=r},i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function y_e(e,t,n){let{deleteReport:i}=t;return e.$$set=r=>{"deleteReport"in r&&n(0,i=r.deleteReport)},[i]}class w_e extends Qt{constructor(t){super(),Jt(this,t,y_e,b_e,Kt,{deleteReport:0})}}function ME(e,t,n){const i=e.slice();return i[10]=t[n],i}function xE(e,t,n){const i=e.slice();return i[13]=t[n],i}function RE(e){let t;return{c(){t=P("div"),t.textContent="The updated template will replace the existing one",w(t,"class","help-text svelte-f7pgu")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function $E(e){let t,n,i,r=[],a=new Map,s,o=e[0];const l=d=>d[13].id;for(let d=0;d<o.length;d+=1){let c=xE(e,o,d),v=l(c);a.set(v,r[d]=NE(v,c))}return{c(){t=P("div"),t.textContent="Existing Templates",n=K(),i=P("ul");for(let d=0;d<r.length;d+=1)r[d].c();s=K(),w(t,"class","header svelte-f7pgu"),w(i,"class","list-group")},m(d,c){ce(d,t,c),ce(d,n,c),ce(d,i,c);for(let v=0;v<r.length;v+=1)r[v]&&r[v].m(i,null);m(i,s)},p(d,c){c&3&&(o=d[0],r=o_(r,c,l,1,d,o,a,i,T7,NE,s,xE))},d(d){d&&_e(t),d&&_e(n),d&&_e(i);for(let c=0;c<r.length;c+=1)r[c].d()}}}function NE(e,t){let n,i=t[13].name+"",r,a,s;function o(){return t[9](t[13])}return{key:e,first:null,c(){n=P("li"),r=Le(i),w(n,"class","svelte-f7pgu"),this.first=n},m(l,d){ce(l,n,d),m(n,r),a||(s=ct(n,"click",o),a=!0)},p(l,d){t=l,d&1&&i!==(i=t[13].name+"")&&vt(r,i)},d(l){l&&_e(n),a=!1,s()}}}function FE(e){let t;return{c(){t=P("div")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function T_e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=e[2]&&RE(),E=[],y=[];for(let D=0;D<E.length;D+=1)y[D]=FE(ME(e,E,D));let I=null;return E.length||(I=$E(e)),{c(){t=P("div"),n=P("input"),i=K(),A&&A.c(),r=K();for(let D=0;D<y.length;D+=1)y[D].c();I&&I.c(),a=K(),s=P("div"),o=P("button"),l=Le("Save"),c=K(),v=P("button"),v.textContent="Cancel",w(n,"placeholder","New Template"),w(n,"class","form-control svelte-f7pgu"),w(o,"class","btn btn-success"),o.disabled=d=e[1]==="",w(v,"class","btn btn-secondary"),w(s,"class","buttons svelte-f7pgu")},m(D,O){ce(D,t,O),m(t,n),Pn(n,e[1]),m(t,i),A&&A.m(t,null),m(t,r);for(let M=0;M<y.length;M+=1)y[M]&&y[M].m(t,null);I&&I.m(t,null),ce(D,a,O),ce(D,s,O),m(s,o),m(o,l),m(s,c),m(s,v),T||(b=[ct(n,"input",e[7]),ct(n,"keypress",e[8]),ct(o,"click",Hi(e[3])),ct(v,"click",Hi(e[4]))],T=!0)},p(D,[O]){if(O&2&&n.value!==D[1]&&Pn(n,D[1]),D[2]?A||(A=RE(),A.c(),A.m(t,r)):A&&(A.d(1),A=null),O&3){E=[];let M;for(M=0;M<E.length;M+=1){const F=ME(D,E,M);y[M]?y[M].p(F,O):(y[M]=FE(),y[M].c(),y[M].m(t,null))}for(;M<y.length;M+=1)y[M].d(1);y.length=E.length,!E.length&&I?I.p(D,O):E.length?I&&(I.d(1),I=null):(I=$E(D),I.c(),I.m(t,null))}O&2&&d!==(d=D[1]==="")&&(o.disabled=d)},i:ot,o:ot,d(D){D&&_e(t),A&&A.d(),Nn(y,D),I&&I.d(),D&&_e(a),D&&_e(s),T=!1,vi(b)}}}function k_e(e,t,n){let i,{onSave:r}=t,{onCancel:a}=t,{templates:s=[]}=t,o="";function l(){r(o,i)}function d(){a()}oa(()=>{document.body.style.position="initial"});function c(){o=this.value,n(1,o)}const v=b=>b.key==="Enter"&&l(),T=b=>n(1,o=b.name);return e.$$set=b=>{"onSave"in b&&n(5,r=b.onSave),"onCancel"in b&&n(6,a=b.onCancel),"templates"in b&&n(0,s=b.templates)},e.$$.update=()=>{e.$$.dirty&3&&n(2,i=s.find(b=>b.name===o))},[s,o,i,l,d,r,a,c,v,T]}class S_e extends Qt{constructor(t){super(),Jt(this,t,k_e,T_e,Kt,{onSave:5,onCancel:6,templates:0})}}function C_e(e){let t,n,i,r;return{c(){t=P("button"),n=Le("Save as Firm Template"),w(t,"class","btn svelte-147v66u"),t.disabled=e[0]},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(t,"click",Hi(e[1])),i=!0)},p(a,[s]){s&1&&(t.disabled=a[0])},i:ot,o:ot,d(a){a&&_e(t),i=!1,r()}}}function P_e(e,t,n){let i,r;Sn(e,Ye,b=>n(5,i=b)),Sn(e,wm,b=>n(0,r=b));let{createTemplate:a}=t,{updateTemplate:s}=t,{templates:o}=t;const{open:l,close:d}=pf("simple-modal"),c=(b,A)=>{A?s(A.id,{report_id:i.id}):a(b),d()},v=()=>{d()},T=()=>{l(S_e,{onSave:c,onCancel:v,templates:o},{styleWindow:{width:"35%",height:"auto"},closeButton:!1,closeOnOuterClick:!1,transitionWindow:t_,transitionWindowProps:{y:-100,duration:500}})};return e.$$set=b=>{"createTemplate"in b&&n(2,a=b.createTemplate),"updateTemplate"in b&&n(3,s=b.updateTemplate),"templates"in b&&n(4,o=b.templates)},[r,T,a,s,o]}class E_e extends Qt{constructor(t){super(),Jt(this,t,P_e,C_e,Kt,{createTemplate:2,updateTemplate:3,templates:4})}}function LE(e,t,n){const i=e.slice();return i[9]=t[n],i}function HE(e){let t,n,i,r,a,s,o,l,d,c,v,T;return t=new ew({props:{items:e[1],optionIdentifier:A_e,isClearable:D_e,showIndicator:O_e}}),t.$on("select",e[4]),{c(){n=P("div"),re(t.$$.fragment),i=K(),r=P("div"),a=P("button"),s=Le("Apply"),o=K(),l=P("button"),l.textContent="Cancel",d=K(),cr(n,"display","contents"),cr(n,"--itemIsActiveBG","#27b6af"),cr(n,"--itemHoverBG","#f6f8f8"),cr(n,"--borderFocusColor","#452161"),w(a,"class","btn btn-success"),a.disabled=e[0],w(l,"class","btn btn-secondary"),w(r,"class","buttons svelte-zr6ev9")},m(b,A){ce(b,n,A),ae(t,n,null),ce(b,i,A),ce(b,r,A),m(r,a),m(a,s),m(r,o),m(r,l),m(r,d),c=!0,v||(T=[ct(a,"click",Hi(e[2])),ct(l,"click",Hi(e[3]))],v=!0)},p(b,A){const E={};A&2&&(E.items=b[1]),t.$set(E),(!c||A&1)&&(a.disabled=b[0])},i(b){c||(U(t.$$.fragment,b),c=!0)},o(b){W(t.$$.fragment,b),c=!1},d(b){b&&t&&_e(n),se(t,b),b&&_e(i),b&&_e(r),v=!1,vi(T)}}}function jE(e){let t;return{c(){t=P("div")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function I_e(e){let t,n,i,r=[],a=[];for(let o=0;o<r.length;o+=1)a[o]=jE(LE(e,r,o));let s=null;return r.length||(s=HE(e)),{c(){t=P("h2"),t.textContent="Select template to apply",n=K();for(let o=0;o<a.length;o+=1)a[o].c();i=On(),s&&s.c(),w(t,"class","svelte-zr6ev9")},m(o,l){ce(o,t,l),ce(o,n,l);for(let d=0;d<a.length;d+=1)a[d]&&a[d].m(o,l);ce(o,i,l),s&&s.m(o,l)},p(o,[l]){if(l&31){r=[];let d;for(d=0;d<r.length;d+=1){const c=LE(o,r,d);a[d]?a[d].p(c,l):(a[d]=jE(),a[d].c(),a[d].m(i.parentNode,i))}for(;d<a.length;d+=1)a[d].d(1);a.length=r.length,!r.length&&s?s.p(o,l):r.length?s&&(pn(),W(s,1,1,()=>{s=null}),hn()):(s=HE(o),s.c(),U(s,1),s.m(i.parentNode,i))}},i:ot,o:ot,d(o){o&&_e(t),o&&_e(n),Nn(a,o),o&&_e(i),s&&s.d(o)}}}const A_e="id",D_e=!1,O_e=!0;function M_e(e,t,n){let i,r,{templates:a}=t,{onCancel:s}=t,{onApply:o}=t,l;function d(){o(l)}function c(){s()}function v(T){const b=T.detail.id,A=Gn.find(a,{id:b}),{id:E,updated_at:y,created_at:I,accountant_id:D,name:O,...M}=A;n(8,l=M)}return oa(()=>{document.body.style.position="initial"}),e.$$set=T=>{"templates"in T&&n(5,a=T.templates),"onCancel"in T&&n(6,s=T.onCancel),"onApply"in T&&n(7,o=T.onApply)},e.$$.update=()=>{e.$$.dirty&32&&n(1,i=a.map(T=>({id:T.id,label:T.name}))),e.$$.dirty&256&&n(0,r=l===void 0)},[r,i,d,c,v,a,s,o,l]}class x_e extends Qt{constructor(t){super(),Jt(this,t,M_e,I_e,Kt,{templates:5,onCancel:6,onApply:7})}}function R_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Apply Template",w(t,"class","btn svelte-1udpmcm")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(e[0])),n=!0)},p:ot,i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function $_e(e,t,n){let{updateReport:i}=t,{templates:r}=t;const{open:a,close:s}=pf("simple-modal");function o(c){Ye.update(v=>({...v,...c})),i(),s()}function l(){s()}const d=()=>{a(x_e,{onApply:o,onCancel:l,templates:r},{styleWindow:{width:"35%",height:"80%"},styleContent:{overflow:"initial"},closeButton:!1,transitionWindow:t_,transitionWindowProps:{y:-100,duration:500}})};return e.$$set=c=>{"updateReport"in c&&n(1,i=c.updateReport),"templates"in c&&n(2,r=c.templates)},[d,i,r]}class N_e extends Qt{constructor(t){super(),Jt(this,t,$_e,R_e,Kt,{updateReport:1,templates:2})}}function F_e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=e[2]&&BE(),E=e[1]&&UE(e);return{c(){t=P("div"),n=P("div"),i=Le(e[0]),r=K(),A&&A.c(),a=K(),s=P("div"),E&&E.c(),o=K(),l=P("button"),l.textContent="Rename",d=K(),c=P("button"),c.textContent="Delete",w(n,"class","form-control svelte-1eihj6t"),w(t,"class","col-sm-5"),w(l,"class","btn button-rename svelte-1eihj6t"),w(c,"class","btn button-delete svelte-1eihj6t"),w(s,"class","col-sm-7 buttons svelte-1eihj6t")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(n,r),A&&A.m(n,null),ce(y,a,I),ce(y,s,I),E&&E.m(s,null),m(s,o),m(s,l),m(s,d),m(s,c),T||(b=[ct(l,"click",Hi(e[5])),ct(c,"click",Hi(e[8]))],T=!0)},p(y,I){I&1&&vt(i,y[0]),y[2]?A||(A=BE(),A.c(),A.m(n,null)):A&&(A.d(1),A=null),y[1]?E?E.p(y,I):(E=UE(y),E.c(),E.m(s,o)):E&&(E.d(1),E=null)},i(y){v||xa(()=>{v=Ad(s,rs,{duration:300}),v.start()})},o:ot,d(y){y&&_e(t),A&&A.d(),y&&_e(a),y&&_e(s),E&&E.d(),T=!1,vi(b)}}}function L_e(e){let t,n,i,r,a,s,o,l,d,c,v,T;return{c(){t=P("div"),n=P("input"),i=K(),r=P("div"),a=P("button"),s=Le("Save"),l=K(),d=P("button"),d.textContent="Cancel",w(n,"name","simulated_projection"),w(n,"class","form-control svelte-1eihj6t"),w(t,"class","col-sm-7"),w(a,"class","btn button-save svelte-1eihj6t"),a.disabled=o=e[4]===e[0]||e[0]==="",w(d,"class","btn button-cancel svelte-1eihj6t"),w(r,"class","col-sm-5 buttons svelte-1eihj6t")},m(b,A){ce(b,t,A),m(t,n),Pn(n,e[0]),ce(b,i,A),ce(b,r,A),m(r,a),m(a,s),m(r,l),m(r,d),v||(T=[ct(n,"input",e[14]),ct(n,"keydown",e[15]),ct(a,"click",Hi(e[6])),ct(d,"click",Hi(e[7]))],v=!0)},p(b,A){A&1&&n.value!==b[0]&&Pn(n,b[0]),A&17&&o!==(o=b[4]===b[0]||b[0]==="")&&(a.disabled=o)},i(b){c||xa(()=>{c=Ad(r,rs,{duration:300}),c.start()})},o:ot,d(b){b&&_e(t),b&&_e(i),b&&_e(r),v=!1,vi(T)}}}function BE(e){let t;return{c(){t=P("span"),t.textContent="Last Applied",w(t,"class","active-item svelte-1eihj6t")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function UE(e){let t;function n(a,s){return a[2]?j_e:H_e}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,s){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},d(a){r.d(a),a&&_e(t)}}}function H_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Apply",w(t,"class","btn button-apply svelte-1eihj6t")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(e[9])),n=!0)},p:ot,d(r){r&&_e(t),n=!1,i()}}}function j_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Update",w(t,"class","btn button-update svelte-1eihj6t")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(e[10])),n=!0)},p:ot,d(r){r&&_e(t),n=!1,i()}}}function B_e(e){let t;function n(a,s){return a[3]?L_e:F_e}let i=n(e),r=i(e);return{c(){t=P("div"),r.c(),w(t,"class","row")},m(a,s){ce(a,t,s),r.m(t,null)},p(a,[s]){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),U(r,1),r.m(t,null)))},i(a){U(r)},o:ot,d(a){a&&_e(t),r.d()}}}function U_e(e,t,n){let{id:i}=t,{name:r}=t,{handleUpdate:a}=t,{handleDelete:s}=t,{handleApply:o}=t,{lastApplied:l}=t,d=!1,c=r;function v(){n(3,d=!0)}async function T(){try{const O=await a(i,{name:r});O&&O.result==="success"?n(4,c=r):n(0,r=c)}catch(O){if(O.name==="AbortError")return;Gr.error(O.message)}finally{n(3,d=!1)}}function b(){n(0,r=c),n(3,d=!1)}function A(){s(i)}function E(){o(i)}async function y(){try{await a(i)}catch(O){if(O.name==="AbortError")return;Gr.error(O.message)}}function I(){r=this.value,n(0,r)}const D=O=>O.key==="Enter"&&T();return e.$$set=O=>{"id"in O&&n(11,i=O.id),"name"in O&&n(0,r=O.name),"handleUpdate"in O&&n(12,a=O.handleUpdate),"handleDelete"in O&&n(13,s=O.handleDelete),"handleApply"in O&&n(1,o=O.handleApply),"lastApplied"in O&&n(2,l=O.lastApplied)},[r,o,l,d,c,v,T,b,A,E,y,i,a,s,I,D]}class x$ extends Qt{constructor(t){super(),Jt(this,t,U_e,B_e,Kt,{id:11,name:0,handleUpdate:12,handleDelete:13,handleApply:1,lastApplied:2})}}function qE(e,t,n){const i=e.slice();return i[5]=t[n],i}function WE(e,t,n){const i=e.slice();return i[8]=t[n],i}function VE(e){let t,n=[],i=new Map,r,a,s=e[0];const o=l=>l[8].id;for(let l=0;l<s.length;l+=1){let d=WE(e,s,l),c=o(d);i.set(c,n[l]=zE(c,d))}return{c(){t=P("ul");for(let l=0;l<n.length;l+=1)n[l].c();r=K(),w(t,"class","list-group svelte-wit72d")},m(l,d){ce(l,t,d);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(t,null);m(t,r),a=!0},p(l,d){d&7&&(s=l[0],pn(),n=o_(n,d,o,1,l,s,i,t,ym,zE,r,WE),hn())},i(l){if(!a){for(let d=0;d<s.length;d+=1)U(n[d]);a=!0}},o(l){for(let d=0;d<n.length;d+=1)W(n[d]);a=!1},d(l){l&&_e(t);for(let d=0;d<n.length;d+=1)n[d].d()}}}function zE(e,t){let n,i,r,a;return i=new x$({props:{id:t[8].id,name:t[8].name,handleUpdate:t[1],handleDelete:t[2]}}),{key:e,first:null,c(){n=P("li"),re(i.$$.fragment),w(n,"class","list-group-item"),this.first=n},m(s,o){ce(s,n,o),ae(i,n,null),a=!0},p(s,o){t=s;const l={};o&1&&(l.id=t[8].id),o&1&&(l.name=t[8].name),o&2&&(l.handleUpdate=t[1]),i.$set(l)},i(s){a||(U(i.$$.fragment,s),xa(()=>{a&&(r||(r=Us(n,rs,{},!0)),r.run(1))}),a=!0)},o(s){W(i.$$.fragment,s),r||(r=Us(n,rs,{},!1)),r.run(0),a=!1},d(s){s&&_e(n),se(i),s&&r&&r.end()}}}function YE(e){let t;return{c(){t=P("div")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function q_e(e){let t,n=[],i=[];for(let a=0;a<n.length;a+=1)i[a]=YE(qE(e,n,a));let r=null;return n.length||(r=VE(e)),{c(){for(let a=0;a<i.length;a+=1)i[a].c();t=On(),r&&r.c()},m(a,s){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(a,s);ce(a,t,s),r&&r.m(a,s)},p(a,[s]){if(s&7){n=[];let o;for(o=0;o<n.length;o+=1){const l=qE(a,n,o);i[o]?i[o].p(l,s):(i[o]=YE(),i[o].c(),i[o].m(t.parentNode,t))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length,!n.length&&r?r.p(a,s):n.length?r&&(pn(),W(r,1,1,()=>{r=null}),hn()):(r=VE(a),r.c(),U(r,1),r.m(t.parentNode,t))}},i:ot,o:ot,d(a){Nn(i,a),a&&_e(t),r&&r.d(a)}}}function W_e(e,t,n){let{templates:i}=t,{updateTemplate:r}=t,{deleteTemplate:a}=t,{close:s}=t;async function o(l){const d=await a(l);d&&d.name!=="Error"&&(n(0,i=d.templates),i.length===0&&s())}return oa(()=>{document.body.style.position="initial"}),e.$$set=l=>{"templates"in l&&n(0,i=l.templates),"updateTemplate"in l&&n(1,r=l.updateTemplate),"deleteTemplate"in l&&n(3,a=l.deleteTemplate),"close"in l&&n(4,s=l.close)},[i,r,o,a,s]}class V_e extends Qt{constructor(t){super(),Jt(this,t,W_e,q_e,Kt,{templates:0,updateTemplate:1,deleteTemplate:3,close:4})}}function z_e(e){let t,n,i;return{c(){t=P("button"),t.textContent="Manage Templates",w(t,"class","btn svelte-lbgsc8")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",Hi(e[0])),n=!0)},p:ot,i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function Y_e(e,t,n){const{open:i,close:r}=pf("simple-modal");let{templates:a}=t,{updateTemplate:s}=t,{deleteTemplate:o}=t;const l=()=>{i(V_e,{templates:a,updateTemplate:s,deleteTemplate:o,close:r},{styleWindow:{width:"35%",maxHeight:"100%"},styleCloseButton:{opacity:1},transitionWindow:t_,closeOnOuterClick:!1,transitionWindowProps:{y:-100,duration:500}})};return e.$$set=d=>{"templates"in d&&n(1,a=d.templates),"updateTemplate"in d&&n(2,s=d.updateTemplate),"deleteTemplate"in d&&n(3,o=d.deleteTemplate)},[l,a,s,o]}class G_e extends Qt{constructor(t){super(),Jt(this,t,Y_e,z_e,Kt,{templates:1,updateTemplate:2,deleteTemplate:3})}}function GE(e){let t,n;return{c(){t=P("label"),n=Le(e[0]),w(t,"class","report_option__title"),w(t,"for","InputTitle")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function K_e(e){let t,n,i,r,a,s,o,l=e[0]&&GE(e);return{c(){t=P("div"),n=P("div"),i=P("div"),l&&l.c(),r=P("div"),a=P("input"),w(a,"class","form-control svelte-1ivcq9u"),w(a,"placeholder",e[1]),w(a,"type","search"),w(r,"class","searchgroup btn-group svelte-1ivcq9u"),w(i,"class","form-group"),w(n,"class","col-sm-12"),w(t,"class","row")},m(d,c){ce(d,t,c),m(t,n),m(n,i),l&&l.m(i,null),m(i,r),m(r,a),Pn(a,e[2]),s||(o=ct(a,"input",e[3]),s=!0)},p(d,[c]){d[0]?l?l.p(d,c):(l=GE(d),l.c(),l.m(i,r)):l&&(l.d(1),l=null),c&2&&w(a,"placeholder",d[1]),c&4&&a.value!==d[2]&&Pn(a,d[2])},i:ot,o:ot,d(d){d&&_e(t),l&&l.d(),s=!1,o()}}}function X_e(e,t,n){let i;Sn(e,oy,o=>n(2,i=o));let{title:r}=t,{placeholder:a=""}=t;function s(){i=this.value,oy.set(i)}return e.$$set=o=>{"title"in o&&n(0,r=o.title),"placeholder"in o&&n(1,a=o.placeholder)},[r,a,i,s]}class Q_e extends Qt{constructor(t){super(),Jt(this,t,X_e,K_e,Kt,{title:0,placeholder:1})}}function KE(e,t,n){const i=e.slice();return i[25]=t[n],i}function XE(e,t,n){const i=e.slice();return i[25]=t[n],i}function QE(e){let t;return{c(){t=P("div"),t.innerHTML='<div class="svelte-giszd9"><h2>Loading new options</h2></div><div class="svelte-giszd9"><span class="pane-loading-indicator__bounce1"></span><span class="pane-loading-indicator__bounce2"></span><span class="pane-loading-indicator__bounce3"></span></div>',w(t,"class","report-options-loading svelte-giszd9")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function J_e(e){let t,n;return t=new v_e({props:{updateReportName:e[7]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&128&&(a.updateReportName=i[7]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Z_e(e){let t,n;return t=new E_e({props:{createTemplate:e[10],updateTemplate:e[11],templates:e[12]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1024&&(a.createTemplate=i[10]),r&2048&&(a.updateTemplate=i[11]),r&4096&&(a.templates=i[12]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function JE(e){let t,n,i=[],r=[];for(let d=0;d<i.length;d+=1)r[d]=e3(XE(e,i,d));let a=null;i.length||(a=ZE(e));let s=[],o=[];for(let d=0;d<s.length;d+=1)o[d]=n3(KE(e,s,d));let l=null;return s.length||(l=t3(e)),{c(){for(let d=0;d<r.length;d+=1)r[d].c();t=On(),a&&a.c();for(let d=0;d<o.length;d+=1)o[d].c();n=On(),l&&l.c()},m(d,c){for(let v=0;v<r.length;v+=1)r[v]&&r[v].m(d,c);ce(d,t,c),a&&a.m(d,c);for(let v=0;v<o.length;v+=1)o[v]&&o[v].m(d,c);ce(d,n,c),l&&l.m(d,c)},p(d,c){if(c&4097){i=[];let v;for(v=0;v<i.length;v+=1){const T=XE(d,i,v);r[v]?r[v].p(T,c):(r[v]=e3(),r[v].c(),r[v].m(t.parentNode,t))}for(;v<r.length;v+=1)r[v].d(1);r.length=i.length,!i.length&&a?a.p(d,c):i.length?a&&(pn(),W(a,1,1,()=>{a=null}),hn()):(a=ZE(d),a.c(),U(a,1),a.m(t.parentNode,t))}if(c&22528){s=[];let v;for(v=0;v<s.length;v+=1){const T=KE(d,s,v);o[v]?o[v].p(T,c):(o[v]=n3(),o[v].c(),o[v].m(n.parentNode,n))}for(;v<o.length;v+=1)o[v].d(1);o.length=s.length,!s.length&&l?l.p(d,c):s.length?l&&(pn(),W(l,1,1,()=>{l=null}),hn()):(l=t3(d),l.c(),U(l,1),l.m(n.parentNode,n))}},i:ot,o:ot,d(d){Nn(r,d),d&&_e(t),a&&a.d(d),Nn(o,d),d&&_e(n),l&&l.d(d)}}}function ZE(e){let t,n;return t=new am({props:{$$slots:{default:[epe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1073745921&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function epe(e){let t,n;return t=new N_e({props:{templates:e[12],updateReport:e[0]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4096&&(a.templates=i[12]),r&1&&(a.updateReport=i[0]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function e3(e){let t;return{c(){t=P("div"),w(t,"class","svelte-giszd9")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function t3(e){let t,n;return t=new am({props:{$$slots:{default:[tpe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1073764352&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function tpe(e){let t,n;return t=new G_e({props:{templates:e[12],updateTemplate:e[11],deleteTemplate:e[14]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4096&&(a.templates=i[12]),r&2048&&(a.updateTemplate=i[11]),r&16384&&(a.deleteTemplate=i[14]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function n3(e){let t;return{c(){t=P("div"),w(t,"class","svelte-giszd9")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function npe(e){let t,n,i,r,a=`- You did a ${e[21].syncType} sync on ${zn(e[21].syncedAt).format("l")}`,s;return{c(){t=P("div"),n=P("div"),i=P("div"),i.textContent="- Report is based on the old version of personal projection",r=P("div"),s=Le(a),w(i,"class","svelte-giszd9"),w(r,"class","svelte-giszd9"),w(n,"class","alert alert-warning svelte-giszd9"),w(t,"class","tpp-report-options-pane__sync-info svelte-giszd9")},m(o,l){ce(o,t,l),m(t,n),m(n,i),m(n,r),m(r,s)},p(o,l){l&2097152&&a!==(a=`- You did a ${o[21].syncType} sync on ${zn(o[21].syncedAt).format("l")}`)&&vt(s,a)},d(o){o&&_e(t)}}}function ipe(e){let t,n,i,r=`- Report year ${e[21].taxYear||""} differs from current projection year ${e[19]||""}`,a;return{c(){t=P("div"),n=P("div"),i=P("div"),a=Le(r),w(i,"class","svelte-giszd9"),w(n,"class","alert alert-warning svelte-giszd9"),w(t,"class","tpp-report-options-pane__sync-info svelte-giszd9")},m(s,o){ce(s,t,o),m(t,n),m(n,i),m(i,a)},p(s,o){o&2621440&&r!==(r=`- Report year ${s[21].taxYear||""} differs from current projection year ${s[19]||""}`)&&vt(a,r)},d(s){s&&_e(t)}}}function i3(e){let t,n,i=e[21].taxYear+"",r,a;return{c(){t=P("div"),n=Le("Based on "),r=Le(i),a=Le(" Tax Year's Data"),w(t,"class","tpp-report-options-pane__notice svelte-giszd9")},m(s,o){ce(s,t,o),m(t,n),m(t,r),m(t,a)},p(s,o){o&2097152&&i!==(i=s[21].taxYear+"")&&vt(r,i)},d(s){s&&_e(t)}}}function r3(e){let t;return{c(){t=Le("No matching field or sections found")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function a3(e){let t,n;return t=new Jce({props:{refreshReportParams:e[15]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&32768&&(a.refreshReportParams=i[15]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function s3(e){let t,n;return t=new Sce({props:{refreshReportParams:e[15],unpermittedReportAtrributes:e[20]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&32768&&(a.refreshReportParams=i[15]),r&1048576&&(a.unpermittedReportAtrributes=i[20]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function rpe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X=!e[20].includes("top_3_strategy_picks_enable"),te,ne=!e[20].includes("sd_enable"),be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De=e[16]!=="done"&&QE();r=new u_e({props:{reports:e[3],loadMaterializedReport:e[4],applyReport:e[5]}}),a=new c_e({props:{createReport:e[6]}}),s=new am({props:{$$slots:{default:[J_e]},$$scope:{ctx:e}}}),o=new w_e({props:{deleteReport:e[9]}}),d=new am({props:{$$slots:{default:[Z_e]},$$scope:{ctx:e}}});let we=e[13]&&JE(e);function Ve(it,Ge){if(it[18])return ipe;if(!it[17])return npe}let Ke=Ve(e),yt=Ke&&Ke(e);I=new xd({props:{refreshReportParams:e[15],specTreeNodeId:"report_options",refreshType:"full"}});let ht=e[21].taxYear&&i3(e);O=new Q_e({props:{placeholder:"Field Filter"}});let Je=e[23].noMatch&&r3();F=new Lde({}),$=new Wde({}),L=new Jde({props:{refreshReportParams:e[15],updateReport:e[0]}}),j=new rfe({}),H=new lfe({}),V=new xce({props:{memoizedReport:e[8],refreshReportParams:e[15],updateReport:e[0]}}),Q=new Wce({props:{refreshReportParams:e[15]}});let pt=X&&a3(e),Tt=ne&&s3(e);return ue=new Gce({}),Ce=new n_e({props:{refreshReportParams:e[15]}}),{c(){t=P("div"),De&&De.c(),n=P("div"),i=P("h2"),i.textContent="Reports",re(r.$$.fragment),re(a.$$.fragment),re(s.$$.fragment),re(o.$$.fragment),l=P("hr"),re(d.$$.fragment),we&&we.c(),c=P("hr"),v=P("div"),yt&&yt.c(),T=P("h2"),b=P("span"),b.textContent="Report Options",A=P("div"),E=P("i"),re(I.$$.fragment),ht&&ht.c(),D=P("div"),re(O.$$.fragment),Je&&Je.c(),M=P("div"),re(F.$$.fragment),re($.$$.fragment),re(L.$$.fragment),re(j.$$.fragment),re(H.$$.fragment),re(V.$$.fragment),re(Q.$$.fragment),pt&&pt.c(),te=On(),Tt&&Tt.c(),be=On(),re(ue.$$.fragment),re(Ce.$$.fragment),ie=P("div"),Y=P("button"),he=Le("Save"),Pe=P("button"),We=Le("Undo Current Changes"),w(i,"class","tpp-report-options-pane__header"),w(l,"class","svelte-giszd9"),w(c,"class","svelte-giszd9"),w(E,"class","fa fa-circle"),w(A,"class",y="tpp-report-options-pane__not-saved-changes "+(e[22]?"tpp-report-options-pane__not-saved-changes_visible":"")+" svelte-giszd9"),w(A,"title","There are unsaved changes. Press 'Save' in order to save them"),w(A,"data-toggle","tooltip"),w(A,"data-placement","right"),w(T,"class","tpp-report-options-pane__header"),w(M,"class","report_options card panel-group svelte-giszd9"),w(M,"id","accordion"),w(M,"role","tablist"),w(M,"aria-multiselectable","true"),w(D,"class","tpp-report-options-pane__options svelte-giszd9"),w(v,"class","svelte-giszd9"),w(n,"class","tpp-report-options-pane__section svelte-giszd9"),w(Y,"class","btn btn-primary svelte-giszd9"),Y.disabled=Me=!e[22],w(Pe,"class","btn undo-btn svelte-giszd9"),Pe.disabled=qe=!e[22],w(ie,"class","tpp-report-options-pane__actions svelte-giszd9"),w(t,"class",ee="tpp-report-options-pane "+(e[2]?"tpp-report-options-pane_visible":"")+" svelte-giszd9")},m(it,Ge){ce(it,t,Ge),De&&De.m(t,null),m(t,n),m(n,i),ae(r,n,null),ae(a,n,null),ae(s,n,null),ae(o,n,null),m(n,l),ae(d,n,null),we&&we.m(n,null),m(n,c),m(n,v),yt&&yt.m(v,null),m(v,T),m(T,b),m(T,A),m(A,E),ae(I,T,null),ht&&ht.m(v,null),m(v,D),ae(O,D,null),Je&&Je.m(D,null),m(D,M),ae(F,M,null),ae($,M,null),ae(L,M,null),ae(j,M,null),ae(H,M,null),ae(V,M,null),ae(Q,M,null),pt&&pt.m(M,null),m(M,te),Tt&&Tt.m(M,null),m(M,be),ae(ue,M,null),ae(Ce,M,null),m(t,ie),m(ie,Y),m(Y,he),m(ie,Pe),m(Pe,We),G=!0,me||(Te=[ct(Y,"click",e[24]),ct(Pe,"click",function(){Ga(e[1])&&e[1].apply(this,arguments)})],me=!0)},p(it,[Ge]){e=it,e[16]!=="done"?De||(De=QE(),De.c(),De.m(t,n)):De&&(De.d(1),De=null);const st={};Ge&8&&(st.reports=e[3]),Ge&16&&(st.loadMaterializedReport=e[4]),Ge&32&&(st.applyReport=e[5]),r.$set(st);const It={};Ge&64&&(It.createReport=e[6]),a.$set(It);const Ct={};Ge&1073741952&&(Ct.$$scope={dirty:Ge,ctx:e}),s.$set(Ct);const bt={};Ge&512&&(bt.deleteReport=e[9]),o.$set(bt);const Rt={};Ge&1073748992&&(Rt.$$scope={dirty:Ge,ctx:e}),d.$set(Rt),e[13]?we?(we.p(e,Ge),Ge&8192&&U(we,1)):(we=JE(e),we.c(),U(we,1),we.m(n,c)):we&&(pn(),W(we,1,1,()=>{we=null}),hn()),Ke===(Ke=Ve(e))&&yt?yt.p(e,Ge):(yt&&yt.d(1),yt=Ke&&Ke(e),yt&&(yt.c(),yt.m(v,T))),(!G||Ge&4194304&&y!==(y="tpp-report-options-pane__not-saved-changes "+(e[22]?"tpp-report-options-pane__not-saved-changes_visible":"")+" svelte-giszd9"))&&w(A,"class",y);const cn={};Ge&32768&&(cn.refreshReportParams=e[15]),I.$set(cn),e[21].taxYear?ht?ht.p(e,Ge):(ht=i3(e),ht.c(),ht.m(v,D)):ht&&(ht.d(1),ht=null),e[23].noMatch?Je||(Je=r3(),Je.c(),Je.m(D,M)):Je&&(Je.d(1),Je=null);const nn={};Ge&32768&&(nn.refreshReportParams=e[15]),Ge&1&&(nn.updateReport=e[0]),L.$set(nn);const Qe={};Ge&256&&(Qe.memoizedReport=e[8]),Ge&32768&&(Qe.refreshReportParams=e[15]),Ge&1&&(Qe.updateReport=e[0]),V.$set(Qe);const Ft={};Ge&32768&&(Ft.refreshReportParams=e[15]),Q.$set(Ft),Ge&1048576&&(X=!e[20].includes("top_3_strategy_picks_enable")),X?pt?(pt.p(e,Ge),Ge&1048576&&U(pt,1)):(pt=a3(e),pt.c(),U(pt,1),pt.m(M,te)):pt&&(pn(),W(pt,1,1,()=>{pt=null}),hn()),Ge&1048576&&(ne=!e[20].includes("sd_enable")),ne?Tt?(Tt.p(e,Ge),Ge&1048576&&U(Tt,1)):(Tt=s3(e),Tt.c(),U(Tt,1),Tt.m(M,be)):Tt&&(pn(),W(Tt,1,1,()=>{Tt=null}),hn());const Fn={};Ge&32768&&(Fn.refreshReportParams=e[15]),Ce.$set(Fn),(!G||Ge&4194304&&Me!==(Me=!e[22]))&&(Y.disabled=Me),(!G||Ge&4194304&&qe!==(qe=!e[22]))&&(Pe.disabled=qe),(!G||Ge&4&&ee!==(ee="tpp-report-options-pane "+(e[2]?"tpp-report-options-pane_visible":"")+" svelte-giszd9"))&&w(t,"class",ee)},i(it){G||(U(r.$$.fragment,it),U(a.$$.fragment,it),U(s.$$.fragment,it),U(o.$$.fragment,it),U(d.$$.fragment,it),U(we),U(I.$$.fragment,it),U(O.$$.fragment,it),U(F.$$.fragment,it),U($.$$.fragment,it),U(L.$$.fragment,it),U(j.$$.fragment,it),U(H.$$.fragment,it),U(V.$$.fragment,it),U(Q.$$.fragment,it),U(pt),U(Tt),U(ue.$$.fragment,it),U(Ce.$$.fragment,it),G=!0)},o(it){W(r.$$.fragment,it),W(a.$$.fragment,it),W(s.$$.fragment,it),W(o.$$.fragment,it),W(d.$$.fragment,it),W(we),W(I.$$.fragment,it),W(O.$$.fragment,it),W(F.$$.fragment,it),W($.$$.fragment,it),W(L.$$.fragment,it),W(j.$$.fragment,it),W(H.$$.fragment,it),W(V.$$.fragment,it),W(Q.$$.fragment,it),W(pt),W(Tt),W(ue.$$.fragment,it),W(Ce.$$.fragment,it),G=!1},d(it){it&&_e(t),De&&De.d(),se(r),se(a),se(s),se(o),se(d),we&&we.d(),yt&&yt.d(),se(I),ht&&ht.d(),se(O),Je&&Je.d(),se(F),se($),se(L),se(j),se(H),se(V),se(Q),pt&&pt.d(),Tt&&Tt.d(),se(ue),se(Ce),me=!1,vi(Te)}}}function ape(e,t,n){let i,r,a;Sn(e,lx,X=>n(21,i=X)),Sn(e,wm,X=>n(22,r=X)),Sn(e,Fl,X=>n(23,a=X));let{updateReport:s}=t,{undoCurrentChanges:o}=t,{showOptionsPane:l}=t,{reports:d}=t,{loadMaterializedReport:c}=t,{applyReport:v}=t,{createReport:T}=t,{updateReportName:b}=t,{memoizedReport:A}=t,{deleteReport:E}=t,{createTemplate:y}=t,{updateTemplate:I}=t,{templates:D}=t,{showTemplateButtons:O}=t,{deleteTemplate:M}=t,{refreshReportParams:F}=t,{reportStatus:$}=t,{projectionsMatch:L}=t,{taxYearMismatch:j}=t,{currentSelectedTaxYear:H}=t,{unpermittedReportAtrributes:V}=t;const Q=function(){s()};return e.$$set=X=>{"updateReport"in X&&n(0,s=X.updateReport),"undoCurrentChanges"in X&&n(1,o=X.undoCurrentChanges),"showOptionsPane"in X&&n(2,l=X.showOptionsPane),"reports"in X&&n(3,d=X.reports),"loadMaterializedReport"in X&&n(4,c=X.loadMaterializedReport),"applyReport"in X&&n(5,v=X.applyReport),"createReport"in X&&n(6,T=X.createReport),"updateReportName"in X&&n(7,b=X.updateReportName),"memoizedReport"in X&&n(8,A=X.memoizedReport),"deleteReport"in X&&n(9,E=X.deleteReport),"createTemplate"in X&&n(10,y=X.createTemplate),"updateTemplate"in X&&n(11,I=X.updateTemplate),"templates"in X&&n(12,D=X.templates),"showTemplateButtons"in X&&n(13,O=X.showTemplateButtons),"deleteTemplate"in X&&n(14,M=X.deleteTemplate),"refreshReportParams"in X&&n(15,F=X.refreshReportParams),"reportStatus"in X&&n(16,$=X.reportStatus),"projectionsMatch"in X&&n(17,L=X.projectionsMatch),"taxYearMismatch"in X&&n(18,j=X.taxYearMismatch),"currentSelectedTaxYear"in X&&n(19,H=X.currentSelectedTaxYear),"unpermittedReportAtrributes"in X&&n(20,V=X.unpermittedReportAtrributes)},[s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,i,r,a,Q]}class spe extends Qt{constructor(t){super(),Jt(this,t,ape,rpe,Kt,{updateReport:0,undoCurrentChanges:1,showOptionsPane:2,reports:3,loadMaterializedReport:4,applyReport:5,createReport:6,updateReportName:7,memoizedReport:8,deleteReport:9,createTemplate:10,updateTemplate:11,templates:12,showTemplateButtons:13,deleteTemplate:14,refreshReportParams:15,reportStatus:16,projectionsMatch:17,taxYearMismatch:18,currentSelectedTaxYear:19,unpermittedReportAtrributes:20})}}function ope(e){let t;return{c(){t=P("div"),t.innerHTML=`<div class="pane-loading-indicator"><h2>Loading your report</h2> 
    <p>Just a few seconds, please...</p> 
    <span class="pane-loading-indicator__bounce1"></span> 
    <span class="pane-loading-indicator__bounce2"></span> 
    <span class="pane-loading-indicator__bounce3"></span></div>`,w(t,"class","text-center")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}class lpe extends Qt{constructor(t){super(),Jt(this,t,null,ope,Kt,{})}}function upe(e){let t;return{c(){t=P("div"),t.innerHTML=`<div class="pane-loading-indicator"><h2>Generating your report</h2> 
    <p>It will be ready in about half a minute...</p> 
    <span class="pane-loading-indicator__bounce1"></span> 
    <span class="pane-loading-indicator__bounce2"></span> 
    <span class="pane-loading-indicator__bounce3"></span></div>`,w(t,"class","text-center")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}class R$ extends Qt{constructor(t){super(),Jt(this,t,null,upe,Kt,{})}}const dpe="modulepreload",fpe=function(e){return"/vite/"+e},o3={},cpe=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.all(n.map(o=>{if(o=fpe(o),o in o3)return;o3[o]=!0;const l=o.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${d}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":dpe,l||(c.as="script",c.crossOrigin=""),c.href=o,s&&c.setAttribute("nonce",s),document.head.appendChild(c),l)return new Promise((v,T)=>{c.addEventListener("load",v),c.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${o}`)))})}))}return r.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})},$$=ao(1.25);function _pe(e){let t;return{c(){t=P("canvas"),w(t,"id",e[0]),w(t,"class","svelte-129hqhr")},m(n,i){ce(n,t,i),e[5](t)},p(n,[i]){i&1&&w(t,"id",n[0])},i:ot,o:ot,d(n){n&&_e(t),e[5](null)}}}function ppe(e,t,n){let i;Sn(e,$$,b=>n(4,i=b));let{page:r}=t,{scrollToId:a}=t,{areas:s}=t,o,l=!1,d=window.location.href.substring(window.location.href.indexOf("#")+1)=="debug";function c(b,A,E){if(l)return;l=!0;const y=window.devicePixelRatio||1,I=b.getViewport({scale:E,rotation:0,dontFlip:!1});n(1,o.width=I.width*y,o),n(1,o.height=I.height*y,o),n(1,o.style.width=Math.floor(I.width)+"px",o),n(1,o.style.height=Math.floor(I.height)+"px",o);const D=o.getContext("2d"),O=y!==1?[y,0,0,y,0,0]:null;b.render({canvasContext:D,transform:O,viewport:I}).promise.then(()=>{v(D,A,o.width,o.height),l=!1})}function v(b,A,E,y){d&&(b.globalAlpha=.4,b.fillStyle="red",b.fillRect(0,0,10,10),b.fillStyle="green",b.fillRect(E-10,0,E,10),b.fillStyle="yellow",b.fillRect(0,y-10,10,y),b.fillStyle="blue",b.fillRect(E-10,y-10,E,y),b.globalAlpha=1),typeof A=="object"&&(b.globalAlpha=d?.1:0,b.fillStyle="blue",Object.entries(A).forEach(([I,D])=>{if(Array.isArray(D)){const[O,M]=[D[0],D[1]];Array.isArray(O)&&Array.isArray(M)&&b.fillRect(O[0]*E,O[1]*y,(M[0]-O[0])*E,(M[1]-O[1])*y)}}),b.globalAlpha=1)}function T(b){Oe[b?"unshift":"push"](()=>{o=b,n(1,o)})}return e.$$set=b=>{"page"in b&&n(2,r=b.page),"scrollToId"in b&&n(0,a=b.scrollToId),"areas"in b&&n(3,s=b.areas)},e.$$.update=()=>{e.$$.dirty&30&&o&&c(r,s,i)},[a,o,r,s,i,T]}class hpe extends Qt{constructor(t){super(),Jt(this,t,ppe,_pe,Kt,{page:2,scrollToId:0,areas:3})}}function l3(e,t,n){const i=e.slice();return i[14]=t[n],i}function mpe(e){return{c:ot,m:ot,p:ot,i:ot,o:ot,d:ot}}function gpe(e){let t,n,i=e[0],r=[];for(let s=0;s<i.length;s+=1)r[s]=u3(l3(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<r.length;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,o){if(o&1){i=s[0];let l;for(l=0;l<i.length;l+=1){const d=l3(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=u3(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=i.length;l<r.length;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<i.length;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function u3(e){let t,n;const i=[e[14]];let r={};for(let a=0;a<i.length;a+=1)r=gv(r,i[a]);return t=new hpe({props:r}),{c(){re(t.$$.fragment)},m(a,s){ae(t,a,s),n=!0},p(a,s){const o=s&1?ZM(i,[ex(a[14])]):{};t.$set(o)},i(a){n||(U(t.$$.fragment,a),n=!0)},o(a){W(t.$$.fragment,a),n=!1},d(a){se(t,a)}}}function vpe(e){let t;const n=e[5].default,i=fu(n,e,e[4],null);return{c(){i&&i.c()},m(r,a){i&&i.m(r,a),t=!0},p(r,a){i&&i.p&&(!t||a&16)&&cu(i,n,r,r[4],t?pu(n,r[4],a,null):_u(r[4]),null)},i(r){t||(U(i,r),t=!0)},o(r){W(i,r),t=!1},d(r){i&&i.d(r)}}}function bpe(e){let t,n,i,r={ctx:e,current:null,token:null,hasCatch:!1,pending:vpe,then:gpe,catch:mpe,blocks:[,,,]};return jb(n=e[1],r),{c(){t=On(),r.block.c()},m(a,s){ce(a,t,s),r.block.m(a,r.anchor=s),r.mount=()=>t.parentNode,r.anchor=t,i=!0},p(a,[s]){e=a,r.ctx=e,s&2&&n!==(n=e[1])&&jb(n,r)||JM(r,e,s)},i(a){i||(U(r.block),i=!0)},o(a){for(let s=0;s<3;s+=1){const o=r.blocks[s];W(o)}i=!1},d(a){a&&_e(t),r.block.d(a),r.token=null,r=null}}}function ype(e,t,n){let i,{$$slots:r={},$$scope:a}=t,{pdfPath:s}=t,{areaTrackingPath:o}=t,l=[],d,c,v={},T=window.location.href.substring(window.location.href.indexOf("#")+1)=="debug";const b={method:"GET",Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":window.$('meta[name="csrf-token"]').attr("content")},A=async(I,D={})=>{try{return await(await fetch(I,{headers:b,...D})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}};async function E(){d||(d=await cpe(()=>import("./pdf-M5jsrN-P.js").then(I=>I.p),__vite__mapDeps([0,1])),d.GlobalWorkerOptions.workerSrc="/pdfjs/pdf.worker.min-13dce91a31bde2c245f9eeccdd1e6775.js")}async function y(I,D){await E(),c=await d.getDocument(I).promise,v=await A(D)||{},T&&console.log("Area Tracking:",v);let O=[];for(let $=1;$<=c.numPages;$++)O.push({scrollToId:null,page:await c.getPage($),areas:v[$]});async function M($){for await(const L of $){const j=await c.getDestination(L.dest),H=await c.getPageIndex(j[0]),V=Xn.camelCase(`pdf${L.title}`);O[H].scrollToId=V,L.items&&await M(L.items)}}const F=await c.getOutline();await M(F),Jw.set(new Set(O.map($=>$.scrollToId).filter($=>$!=null))),n(0,l=O)}return e.$$set=I=>{"pdfPath"in I&&n(2,s=I.pdfPath),"areaTrackingPath"in I&&n(3,o=I.areaTrackingPath),"$$scope"in I&&n(4,a=I.$$scope)},e.$$.update=()=>{e.$$.dirty&12&&n(1,i=y(s,o))},[l,i,s,o,a,r]}class wpe extends Qt{constructor(t){super(),Jt(this,t,ype,bpe,Kt,{pdfPath:2,areaTrackingPath:3})}}function Tpe(e){let t,n;return t=new R$({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function kpe(e){let t,n,i;return n=new wpe({props:{pdfPath:e[0],areaTrackingPath:e[1],$$slots:{default:[Tpe]},$$scope:{ctx:e}}}),{c(){t=P("div"),re(n.$$.fragment),w(t,"class","report-area")},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,[a]){const s={};a&1&&(s.pdfPath=r[0]),a&2&&(s.areaTrackingPath=r[1]),a&4&&(s.$$scope={dirty:a,ctx:r}),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function Spe(e,t,n){let{pdfPath:i}=t,{areaTrackingPath:r}=t;return e.$$set=a=>{"pdfPath"in a&&n(0,i=a.pdfPath),"areaTrackingPath"in a&&n(1,r=a.areaTrackingPath)},[i,r]}class Cpe extends Qt{constructor(t){super(),Jt(this,t,Spe,kpe,Kt,{pdfPath:0,areaTrackingPath:1})}}function Ppe(e){let t;return{c(){t=Le("try reloading the page.")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Epe(e){let t;return{c(){t=Le("click the Retry button below.")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function d3(e){let t,n,i,r;return{c(){t=P("button"),n=Le("Retry"),w(t,"class","btn btn-primary"),t.disabled=e[1]},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(t,"click",function(){Ga(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(a,s){e=a,s&2&&(t.disabled=e[1])},d(a){a&&_e(t),i=!1,r()}}}function Ipe(e){let t,n,i,r,a,s,o,l,d,c;function v(E,y){return E[0]?Epe:Ppe}let T=v(e),b=T(e),A=e[0]&&d3(e);return{c(){t=P("div"),n=P("h2"),n.textContent="Report Failed To Load",i=K(),r=P("p"),a=Le(`Sorry, but we were unable to load your report. Please
    `),b.c(),s=K(),o=P("p"),o.textContent=`If the error persists, please do not hesitate to reach out for support using the chat button at the bottom
    right corner of the page.`,l=K(),d=P("p"),d.textContent="Thank you!",c=K(),A&&A.c(),w(t,"class","text-center svelte-my8q7b")},m(E,y){ce(E,t,y),m(t,n),m(t,i),m(t,r),m(r,a),b.m(r,null),m(t,s),m(t,o),m(t,l),m(t,d),m(t,c),A&&A.m(t,null)},p(E,[y]){T!==(T=v(E))&&(b.d(1),b=T(E),b&&(b.c(),b.m(r,null))),E[0]?A?A.p(E,y):(A=d3(E),A.c(),A.m(t,null)):A&&(A.d(1),A=null)},i:ot,o:ot,d(E){E&&_e(t),b.d(),A&&A.d()}}}function Ape(e,t,n){let i;Sn(e,wm,a=>n(1,i=a));let{regenerateReport:r}=t;return e.$$set=a=>{"regenerateReport"in a&&n(0,r=a.regenerateReport)},[r,i]}class N$ extends Qt{constructor(t){super(),Jt(this,t,Ape,Ipe,Kt,{regenerateReport:0})}}function f3(e,t,n){const i=e.slice();return i[7]=t[n],i[9]=n,i}function c3(e){let t,n=e[7]+"",i,r;return{c(){t=P("option"),i=Le(n),r=Le("%"),t.__value=e[9],t.value=t.__value},m(a,s){ce(a,t,s),m(t,i),m(t,r)},p:ot,d(a){a&&_e(t)}}}function Dpe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=e[1],E=[];for(let y=0;y<A.length;y+=1)E[y]=c3(f3(e,A,y));return{c(){t=P("div"),n=P("button"),i=P("i"),a=K(),s=P("div"),o=P("select");for(let y=0;y<E.length;y+=1)E[y].c();l=K(),d=P("button"),c=P("i"),w(i,"class","fa fa-search-minus"),w(n,"class","btn btn-sm btn-info svelte-152l8uy"),n.disabled=r=e[0]===0,e[0]===void 0&&xa(()=>e[5].call(o)),w(s,"class","zoom-selector svelte-152l8uy"),w(c,"class","fa fa-search-plus"),w(d,"class","btn btn-sm btn-info svelte-152l8uy"),d.disabled=v=e[0]===e[1].length-1,w(t,"class","zoom-controls svelte-152l8uy")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(t,a),m(t,s),m(s,o);for(let D=0;D<E.length;D+=1)E[D]&&E[D].m(o,null);Es(o,e[0],!0),m(t,l),m(t,d),m(d,c),T||(b=[ct(n,"click",e[3]),ct(o,"change",e[5]),ct(o,"change",e[2]),ct(d,"click",e[4])],T=!0)},p(y,[I]){if(I&1&&r!==(r=y[0]===0)&&(n.disabled=r),I&2){A=y[1];let D;for(D=0;D<A.length;D+=1){const O=f3(y,A,D);E[D]?E[D].p(O,I):(E[D]=c3(O),E[D].c(),E[D].m(o,null))}for(;D<E.length;D+=1)E[D].d(1);E.length=A.length}I&1&&Es(o,y[0]),I&1&&v!==(v=y[0]===y[1].length-1)&&(d.disabled=v)},i:ot,o:ot,d(y){y&&_e(t),Nn(E,y),T=!1,vi(b)}}}function Ope(e,t,n){const i=[50,60,70,80,90,100,110,125];let r=i.length-1;function a(c){const v=parseInt(c.target.value);s(v)}const s=c=>{n(0,r=c),$$.set(i[r]/100)},o=()=>{r>0&&s(r-1)},l=()=>{r<i.length-1&&s(r+1)};function d(){r=Cd(this),n(0,r)}return[r,i,a,o,l,d]}class Mpe extends Qt{constructor(t){super(),Jt(this,t,Ope,Dpe,Kt,{})}}function _3(e){let t,n;return{c(){t=P("a"),n=Le("Download PDF"),w(t,"class","btn btn-sm btn-info mb-0 svelte-18cagi0"),w(t,"href",e[13])},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r[0]&8192&&w(t,"href",i[13])},d(i){i&&_e(t)}}}function p3(e){let t,n=e[8]?"Hide":"Show",i,r,a,s;return{c(){t=P("div"),i=Le(n),r=Le(" Report Options"),w(t,"class","btn btn-sm btn-info mb-0"),w(t,"data-toggle","delayed-tooltip"),w(t,"data-placement","bottom"),w(t,"title","Ctrl + /")},m(o,l){ce(o,t,l),m(t,i),m(t,r),a||(s=ct(t,"click",e[28]),a=!0)},p(o,l){l[0]&256&&n!==(n=o[8]?"Hide":"Show")&&vt(i,n)},d(o){o&&_e(t),a=!1,s()}}}function h3(e){let t,n;return t=new Mpe({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function m3(e){let t;return{c(){t=P("div"),t.innerHTML='<div class="tpp-loading-indicator"><div class="tpp-loading-indicator__bounce1 svelte-18cagi0"></div><div class="tpp-loading-indicator__bounce2 svelte-18cagi0"></div><div class="tpp-loading-indicator__bounce3 svelte-18cagi0"></div></div>',w(t,"class","tpp-report-header__loading-indicator svelte-18cagi0")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function xpe(e){let t,n;return t=new N$({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Rpe(e){let t,n,i,r;const a=[Lpe,Fpe,Npe],s=[];function o(l,d){return l[4].status===l[16].generating?0:l[4].status===l[16].generated?1:2}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,d){let c=t;t=o(l),t===c?s[t].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i))},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function $pe(e){let t,n;return t=new lpe({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Npe(e){let t,n;return t=new N$({props:{regenerateReport:e[38]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Fpe(e){let t,n;return t=new Cpe({props:{pdfPath:e[13],areaTrackingPath:e[12]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&8192&&(a.pdfPath=i[13]),r[0]&4096&&(a.areaTrackingPath=i[12]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Lpe(e){let t,n;return t=new R$({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function g3(e){let t,n;return t=new spe({props:{updateReport:e[21],undoCurrentChanges:e[29],showOptionsPane:e[8],reports:e[2],applyReport:e[19],loadMaterializedReport:e[18],createReport:e[22],updateReportName:e[24],memoizedReport:e[5],deleteReport:e[23],createTemplate:e[25],updateTemplate:e[26],templates:e[3],showTemplateButtons:e[11],deleteTemplate:e[27],refreshReportParams:e[20],reportStatus:e[7],projectionsMatch:e[14],taxYearMismatch:e[9],currentSelectedTaxYear:e[1],unpermittedReportAtrributes:e[0]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&256&&(a.showOptionsPane=i[8]),r[0]&4&&(a.reports=i[2]),r[0]&32&&(a.memoizedReport=i[5]),r[0]&8&&(a.templates=i[3]),r[0]&2048&&(a.showTemplateButtons=i[11]),r[0]&128&&(a.reportStatus=i[7]),r[0]&16384&&(a.projectionsMatch=i[14]),r[0]&512&&(a.taxYearMismatch=i[9]),r[0]&2&&(a.currentSelectedTaxYear=i[1]),r[0]&1&&(a.unpermittedReportAtrributes=i[0]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Hpe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=e[10]&&_3(e),A=e[2].length>0&&p3(e),E=e[10]&&h3(),y=(e[6]===e[15].initialLoading||e[7]!==e[17].done)&&m3();const I=[$pe,Rpe,xpe],D=[];function O(F,$){return F[6]===F[15].initialLoading?0:F[6]===F[15].done?1:2}c=O(e),v=D[c]=I[c](e);let M=e[2].length>0&&g3(e);return{c(){t=P("div"),n=P("div"),i=P("div"),b&&b.c(),r=On(),A&&A.c(),a=P("h1"),s=P("div"),s.textContent="Report",E&&E.c(),o=On(),y&&y.c(),l=P("div"),d=P("section"),v.c(),M&&M.c(),w(i,"class","tpp-report-header__buttons float-right svelte-18cagi0"),w(s,"class","tpp-report-header__label"),w(a,"class","tpp-report-header__title svelte-18cagi0"),w(n,"class","tpp-report-header pageheader"),w(d,"class","tpp-report-layout__report_pane svelte-18cagi0"),w(l,"class","tpp-report-layout svelte-18cagi0"),w(t,"class","tpp-report")},m(F,$){ce(F,t,$),m(t,n),m(n,i),b&&b.m(i,null),m(i,r),A&&A.m(i,null),m(n,a),m(a,s),E&&E.m(a,null),m(a,o),y&&y.m(a,null),m(t,l),m(l,d),D[c].m(d,null),M&&M.m(l,null),T=!0},p(F,$){F[10]?b?b.p(F,$):(b=_3(F),b.c(),b.m(i,r)):b&&(b.d(1),b=null),F[2].length>0?A?A.p(F,$):(A=p3(F),A.c(),A.m(i,null)):A&&(A.d(1),A=null),F[10]?E?$[0]&1024&&U(E,1):(E=h3(),E.c(),U(E,1),E.m(a,o)):E&&(pn(),W(E,1,1,()=>{E=null}),hn()),F[6]===F[15].initialLoading||F[7]!==F[17].done?y||(y=m3(),y.c(),y.m(a,null)):y&&(y.d(1),y=null);let L=c;c=O(F),c===L?D[c].p(F,$):(pn(),W(D[L],1,1,()=>{D[L]=null}),hn(),v=D[c],v?v.p(F,$):(v=D[c]=I[c](F),v.c()),U(v,1),v.m(d,null)),F[2].length>0?M?(M.p(F,$),$[0]&4&&U(M,1)):(M=g3(F),M.c(),U(M,1),M.m(l,null)):M&&(pn(),W(M,1,1,()=>{M=null}),hn())},i(F){T||(U(E),U(v),U(M),T=!0)},o(F){W(E),W(v),W(M),T=!1},d(F){F&&_e(t),b&&b.d(),A&&A.d(),E&&E.d(),y&&y.d(),D[c].d(),M&&M.d()}}}const jpe=1e4;function Bpe(e,t,n){let i,r,a,s,o,l,d,c,v;Sn(e,wm,it=>n(40,d=it)),Sn(e,Ye,it=>n(36,c=it)),Sn(e,lx,it=>n(37,v=it));let{reportEndpoint:T}=t,{reportOptionsEndpoint:b}=t,{reportTemplatesEndpoint:A}=t,{pdfUrlBase:E}=t,{areaTrackingUrlBase:y}=t,{currentProjectionHash:I}=t,{unpermittedReportAtrributes:D}=t,{currentSelectedTaxYear:O}=t;const M=Object.freeze({initialLoading:1,done:2,failed:3}),F=Object.freeze({generating:"generating",generated:"generated",failed:"failed"}),$=Object.freeze({loading:"loading",done:"done"}),L=new oB(T),j=new uW(b),H=new dW(A);let V=[],Q=[],X=M.initialLoading,te=$.loading,ne={},be={},ue,Ce=localStorage.showOptionsPane==="true";async function ie(){n(7,te=$.loading);try{n(2,V=await j.all());const it=V[0],Ge=he(it);Me(Ge||it)}catch(it){if(it.name==="AbortError")return;n(6,X=M.failed),Gr.error(it.message)}finally{n(7,te=$.done)}}async function Y(){n(6,X=M.initialLoading);try{n(4,ne=await L.one(c.id)),ne.status===F.generated&&clearTimeout(ue),n(6,X=M.done),ne.status===F.generating&&(ue=setTimeout(Y,jpe))}catch(it){if(it.name==="AbortError")return;Gr.error(it.message),n(6,X=M.failed)}}function he(it){const Ge=JSON.parse(localStorage.getItem("storedUsersReport"));return Ge&&Ge.v1[it.user_id]?Gn.find(V,{id:Ge.v1[it.user_id].report_id}):null}function Me(it){const Ge={v1:{[it.user_id]:{report_id:it.id}}};localStorage.setItem("storedUsersReport",JSON.stringify(Ge)),Ye.set(it),Pe(it),n(7,te=$.done)}function Pe(it){n(5,be=Gn.clone(it))}function We(){window.$('[data-toggle="delayed-tooltip"]').tooltip({delay:{show:1e3,hide:100}}),window.$('[data-toggle="tooltip"]').tooltip(),document.addEventListener("keydown",it=>{it.ctrlKey&&it.code==="Slash"&&(ht(),it.preventDefault())})}async function qe(it,Ge){const st="You're about to update your report with a different, "+(O||"")+" tax year projection data. Proceed?";if(r&&!confirm(st))return!1;try{const Ct=(await j.get_updated_params({params_to_refresh:it})).updated_params;Ye.update(bt=>({...bt,...Ct})),ee(Ge)}catch(It){if(It.name==="AbortError")return;Gr.error(It.message)}}function ee(it){n(7,te=$.loading),n(6,X=M.initialLoading),De(()=>j.update(c.id,c,it))}function G(){n(7,te=$.loading),n(6,X=M.initialLoading),De(()=>j.create())}async function me(){if(!confirm("This will delete current report. Are you sure you want to proceed?"))return!1;try{await j.delete(c.id),n(2,V=V.filter(it=>it.id!==c.id)),await ie(),await Y(),Gr.success("Report has been deleted!")}catch(it){if(it.name==="AbortError")return;Gr.error(it.message)}}async function Te(it){n(7,te=$.loading);const st=(await j.update(c.id,{name:it})).report_id;n(2,V=await j.all());const It=Gn.find(V,{id:st});Me(It),Gr.success("Report name has been updated")}async function De(it){try{const Ge=await it(),st=Ge.report_id;n(2,V=await j.all());const It=Gn.find(V,{id:st});Me(It),await Y(),Gr.success(Ge.notice)}catch(Ge){if(Ge.name==="AbortError")return;n(6,X=M.failed),Gr.error(Ge.message)}finally{n(7,te=$.done)}}async function we(){try{n(3,Q=await H.all())}catch(it){if(it.name==="AbortError")return;Gr.error(it.message)}}async function Ve(it){try{const Ge=await H.create({report_id:c.id,name:it});Gr.success("Your Template has been successfully saved!"),n(3,Q=await H.all())}catch(Ge){if(Ge.name==="AbortError")return;Gr.error(Ge.message)}}async function Ke(it,Ge){try{const st=await H.update(it,Ge);Gr.success("Your template has been successfully updated!"),n(3,Q=await H.all())}catch(st){if(st.name==="AbortError")return;Gr.error(st.message)}}async function yt(it){if(!confirm("This will delete template. Are you sure you want to proceed?"))return!1;try{return await H.delete(it),n(3,Q=await H.all()),Gr.success("Your Template has been deleted!"),{name:"success",templates:Q}}catch(Ge){return Ge.name==="AbortError"?void 0:(Gr.error(Ge.message),Ge)}}function ht(){n(8,Ce=!Ce),localStorage.showOptionsPane=Ce}function Je(){window.onbeforeunload=()=>{if(d)return!0}}async function pt(){if(!confirm("This will undo current changes and restore report options to the saved ones. Are you sure you want to proceed?"))return!1;Ye.set(Gn.cloneDeep(be))}oa(async()=>{await ie(),await Y(),await we(),nx.createConsumer().subscriptions.create("ReportsChannel",{received(Ge){Ge==="report_generated"&&Y()}}),We(),Je()});const Tt=function(){ee()};return e.$$set=it=>{"reportEndpoint"in it&&n(30,T=it.reportEndpoint),"reportOptionsEndpoint"in it&&n(31,b=it.reportOptionsEndpoint),"reportTemplatesEndpoint"in it&&n(32,A=it.reportTemplatesEndpoint),"pdfUrlBase"in it&&n(33,E=it.pdfUrlBase),"areaTrackingUrlBase"in it&&n(34,y=it.areaTrackingUrlBase),"currentProjectionHash"in it&&n(35,I=it.currentProjectionHash),"unpermittedReportAtrributes"in it&&n(0,D=it.unpermittedReportAtrributes),"currentSelectedTaxYear"in it&&n(1,O=it.currentSelectedTaxYear)},e.$$.update=()=>{e.$$.dirty[1]&80&&n(14,i=v.reportProjectionHash===I),e.$$.dirty[0]&2|e.$$.dirty[1]&64&&n(9,r=v.taxYear!==O),e.$$.dirty[0]&32|e.$$.dirty[1]&32&&tw.set(new Set(Object.entries(c).flatMap(([it,Ge])=>be[it]!==Ge?it:[]))),e.$$.dirty[1]&36&&n(13,a=E.replace("@",c.id)),e.$$.dirty[1]&40&&n(12,s=y.replace("@",c.id)),e.$$.dirty[0]&8&&n(11,o=Q.length>0),e.$$.dirty[0]&20&&n(10,l=V.length>0&&ne&&ne.status==F.generated)},[D,O,V,Q,ne,be,X,te,Ce,r,l,o,s,a,i,M,F,$,Y,Me,qe,ee,G,me,Te,Ve,Ke,yt,ht,pt,T,b,A,E,y,I,c,v,Tt]}class Upe extends Qt{constructor(t){super(),Jt(this,t,Bpe,Hpe,Kt,{reportEndpoint:30,reportOptionsEndpoint:31,reportTemplatesEndpoint:32,pdfUrlBase:33,areaTrackingUrlBase:34,currentProjectionHash:35,unpermittedReportAtrributes:0,currentSelectedTaxYear:1},null,[-1,-1])}}function qpe(e){let t,n,i,r,a,s;return{c(){t=P("span"),n=P("a"),i=P("img"),a=K(),s=P("span"),s.textContent="Sign in with Xero",Bb(i.src,r="data:image/svg+xml,%3Csvg viewBox='0 0 45 46' xmlns='http://www.w3.org/2000/svg'%3E %3Ctitle%3EXero%3C/title%3E %3Cpath fill='%2313B5EA' d='M22.457 45.49c12.402 0 22.456-10.072 22.456-22.495C44.913 10.57 34.86.5 22.457.5 10.054.5 0 10.57 0 22.995 0 35.418 10.054 45.49 22.457 45.49' /%3E %3Cpath fill='%23FFFFFF' d='M10.75 22.935l3.832-3.85a.688.688 0 0 0-.977-.965l-3.83 3.833-3.845-3.84a.687.687 0 0 0-.966.979l3.832 3.837-3.83 3.84a.688.688 0 1 0 .964.981l3.84-3.842 3.825 3.827a.685.685 0 0 0 1.184-.473.68.68 0 0 0-.2-.485l-3.83-3.846m22.782.003c0 .69.56 1.25 1.25 1.25a1.25 1.25 0 0 0-.001-2.5c-.687 0-1.246.56-1.246 1.25m-2.368 0c0-1.995 1.62-3.62 3.614-3.62 1.99 0 3.613 1.625 3.613 3.62s-1.622 3.62-3.613 3.62a3.62 3.62 0 0 1-3.614-3.62m-1.422 0c0 2.78 2.26 5.044 5.036 5.044s5.036-2.262 5.036-5.043c0-2.78-2.26-5.044-5.036-5.044a5.046 5.046 0 0 0-5.036 5.044m-.357-4.958h-.21c-.635 0-1.247.2-1.758.595a.696.696 0 0 0-.674-.54.68.68 0 0 0-.68.684l.002 8.495a.687.687 0 0 0 1.372-.002v-5.224c0-1.74.16-2.444 1.648-2.63.14-.017.288-.014.29-.014.406-.015.696-.296.696-.675a.69.69 0 0 0-.69-.688m-13.182 4.127c0-.02.002-.04.003-.058a3.637 3.637 0 0 1 7.065.055H16.2zm8.473-.13c-.296-1.403-1.063-2.556-2.23-3.296a5.064 5.064 0 0 0-5.61.15 5.098 5.098 0 0 0-1.973 5.357 5.08 5.08 0 0 0 4.274 3.767c.608.074 1.2.04 1.81-.12a4.965 4.965 0 0 0 1.506-.644c.487-.313.894-.727 1.29-1.222.006-.01.014-.017.022-.027.274-.34.223-.826-.077-1.056-.254-.195-.68-.274-1.014.156-.072.104-.153.21-.24.315-.267.295-.598.58-.994.802-.506.27-1.08.423-1.69.427-1.998-.023-3.066-1.42-3.447-2.416a3.716 3.716 0 0 1-.153-.58l-.01-.105h7.17c.982-.022 1.51-.717 1.364-1.51z' /%3E %3C/svg%3E")||w(i,"src",r),w(i,"alt","Xero logo"),w(i,"aria-role","presentation"),w(i,"class","xero-sso-logo svelte-4wv8pl"),w(s,"class","xero-sso-label svelte-4wv8pl"),w(n,"href",e[0]),w(n,"class","xero-sso-link svelte-4wv8pl"),w(t,"data-xero-sso",""),w(t,"data-href",e[0]),w(t,"data-label","Sign in with Xero"),w(t,"data-size","normal"),w(t,"data-box-shadow","none"),w(t,"data-no-track","true"),w(t,"dara-border-color","#dddddd"),w(t,"data-border-width","4"),w(t,"class","xero-sso xero-sso-inline xero-sso-normal xero-sso-light xero-sso-font-family svelte-4wv8pl"),cr(t,"background-color","transparent",1)},m(o,l){ce(o,t,l),m(t,n),m(n,i),m(n,a),m(n,s)},p(o,[l]){l&1&&w(n,"href",o[0]),l&1&&w(t,"data-href",o[0])},i:ot,o:ot,d(o){o&&_e(t)}}}function Wpe(e,t,n){let{xeroSsoPath:i}=t;return e.$$set=r=>{"xeroSsoPath"in r&&n(0,i=r.xeroSsoPath)},[i]}class Vpe extends Qt{constructor(t){super(),Jt(this,t,Wpe,qpe,Kt,{xeroSsoPath:0})}}function zpe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L=!e[7]&&v3(e);return{c(){t=P("h1"),t.innerHTML=`<b>Welcome
        <br/>
        Back !</b>`,n=K(),i=P("div"),r=P("form"),a=P("input"),s=K(),o=P("input"),l=K(),d=P("input"),c=K(),v=P("a"),T=Le("Forgot your password?"),b=K(),A=P("button"),A.textContent="Log in",E=K(),y=P("div"),y.textContent="Other login options",I=K(),D=P("a"),O=Le("Are you an accountant?"),M=K(),L&&L.c(),w(a,"type","hidden"),w(a,"name","authenticity_token"),a.value=e[3],w(o,"class","devise-form__input"),w(o,"name","user[email]"),w(o,"type","email"),w(o,"placeholder","Email Address"),w(d,"class","devise-form__input"),w(d,"name","user[password]"),w(d,"type","password"),w(d,"placeholder","Password"),w(v,"class","devise-form__action-link devise-form__mt-1"),w(v,"href",e[2]),w(A,"type","submit"),w(A,"class","devise-form__button devise-form__sign-in"),w(y,"class","devise-form__action-link"),w(D,"class","devise-form__action-link"),cr(D,"margin-top","3px"),w(D,"href",e[1]),w(r,"id","new_user"),w(r,"class","devise-form__container"),r.noValidate=!0,w(r,"action",e[0]),w(r,"method","post"),w(i,"class","devise-form")},m(j,H){ce(j,t,H),ce(j,n,H),ce(j,i,H),m(i,r),m(r,a),m(r,s),m(r,o),Pn(o,e[8]),m(r,l),m(r,d),Pn(d,e[9]),m(r,c),m(r,v),m(v,T),m(r,b),m(r,A),m(r,E),m(r,y),m(r,I),m(r,D),m(D,O),m(r,M),L&&L.m(r,null),F||($=[ct(o,"input",e[12]),ct(d,"input",e[13]),ct(y,"click",e[14])],F=!0)},p(j,H){H&8&&(a.value=j[3]),H&256&&o.value!==j[8]&&Pn(o,j[8]),H&512&&d.value!==j[9]&&Pn(d,j[9]),H&4&&w(v,"href",j[2]),H&2&&w(D,"href",j[1]),j[7]?L&&(L.d(1),L=null):L?L.p(j,H):(L=v3(j),L.c(),L.m(r,null)),H&1&&w(r,"action",j[0])},i:ot,o:ot,d(j){j&&_e(t),j&&_e(n),j&&_e(i),L&&L.d(),F=!1,vi($)}}}function Ype(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A;return d=new Vpe({props:{xeroSsoPath:e[5]}}),{c(){t=P("h1"),t.innerHTML=`<b>Use Payroll
        <br/>
        Provider</b>`,n=K(),i=P("div"),r=P("div"),a=P("a"),s=Le("Sign in with Intuit"),o=K(),l=P("div"),re(d.$$.fragment),c=K(),v=P("div"),v.textContent="Back to login",w(a,"href",e[4]),w(a,"class","intuit-signin__link devise-form__mt-2"),w(a,"type","button"),w(r,"class","tpp-login-sso__button_intuit"),w(l,"class","tpp-login-sso__button_xero"),w(i,"class","tpp-login-sso svelte-12zryit"),w(v,"class","devise-form__back-to-login devise-form__mt-5")},m(E,y){ce(E,t,y),ce(E,n,y),ce(E,i,y),m(i,r),m(r,a),m(a,s),m(i,o),m(i,l),ae(d,l,null),ce(E,c,y),ce(E,v,y),T=!0,b||(A=ct(v,"click",e[11]),b=!0)},p(E,y){(!T||y&16)&&w(a,"href",E[4]);const I={};y&32&&(I.xeroSsoPath=E[5]),d.$set(I)},i(E){T||(U(d.$$.fragment,E),T=!0)},o(E){W(d.$$.fragment,E),T=!1},d(E){E&&_e(t),E&&_e(n),E&&_e(i),se(d),E&&_e(c),E&&_e(v),b=!1,A()}}}function v3(e){let t,n;return{c(){t=P("a"),n=Le("Sign up"),w(t,"href",e[6]),cr(t,"margin-top","30px"),w(t,"class","devise-form__button devise-form__register-button")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&64&&w(t,"href",i[6])},d(i){i&&_e(t)}}}function Gpe(e){let t,n,i,r;const a=[Ype,zpe],s=[];function o(l,d){return l[10]?0:1}return n=o(e),i=s[n]=a[n](e),{c(){t=P("div"),i.c()},m(l,d){ce(l,t,d),s[n].m(t,null),r=!0},p(l,[d]){let c=n;n=o(l),n===c?s[n].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),i=s[n],i?i.p(l,d):(i=s[n]=a[n](l),i.c()),U(i,1),i.m(t,null))},i(l){r||(U(i),r=!0)},o(l){W(i),r=!1},d(l){l&&_e(t),s[n].d()}}}function Kpe(e,t,n){let i="",r="",a=!1,{loginPath:s=""}=t,{accountantPath:o}=t,{passRecoveryPath:l=""}=t,{authenticityToken:d=""}=t,{intuitSsoPath:c=""}=t,{xeroSsoPath:v=""}=t,{registrationPath:T=""}=t,{disableSignup:b=!1}=t;const A=()=>n(10,a=!1);function E(){i=this.value,n(8,i)}function y(){r=this.value,n(9,r)}const I=()=>n(10,a=!0);return e.$$set=D=>{"loginPath"in D&&n(0,s=D.loginPath),"accountantPath"in D&&n(1,o=D.accountantPath),"passRecoveryPath"in D&&n(2,l=D.passRecoveryPath),"authenticityToken"in D&&n(3,d=D.authenticityToken),"intuitSsoPath"in D&&n(4,c=D.intuitSsoPath),"xeroSsoPath"in D&&n(5,v=D.xeroSsoPath),"registrationPath"in D&&n(6,T=D.registrationPath),"disableSignup"in D&&n(7,b=D.disableSignup)},[s,o,l,d,c,v,T,b,i,r,a,A,E,y,I]}let Xpe=class extends Qt{constructor(t){super(),Jt(this,t,Kpe,Gpe,Kt,{loginPath:0,accountantPath:1,passRecoveryPath:2,authenticityToken:3,intuitSsoPath:4,xeroSsoPath:5,registrationPath:6,disableSignup:7})}};function b3(e){let t,n,i;return{c(){t=P("p"),t.textContent="The code has expired. Please, request a new one by clicking 'Proceed'.",n=K(),i=P("div"),w(t,"class","devise-form__help-text"),cr(t,"color","red"),w(i,"class","devise-form__mt-2")},m(r,a){ce(r,t,a),ce(r,n,a),ce(r,i,a)},d(r){r&&_e(t),r&&_e(n),r&&_e(i)}}}function Qpe(e){let t,n;return{c(){t=P("a"),n=Le("Request a new code."),w(t,"href",e[5]),w(t,"data-method","delete"),w(t,"class","devise-form__action-link")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&32&&w(t,"href",i[5])},d(i){i&&_e(t)}}}function Jpe(e){let t,n,i,r;return{c(){t=P("p"),n=Le("You can request a new code in "),i=Le(e[0]),r=Le(" seconds"),w(t,"class","devise-form__action-link devise-form__action-link_disabled")},m(a,s){ce(a,t,s),m(t,n),m(t,i),m(t,r)},p(a,s){s&1&&vt(i,a[0])},d(a){a&&_e(t)}}}function Zpe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y=e[1]<=0&&b3();function he(We,qe){return We[0]>0?Jpe:Qpe}let Me=he(e),Pe=Me(e);return{c(){t=P("div"),n=P("h1"),i=P("b"),r=Le(`We've sent you a code
      `),a=P("br"),s=Le(`
      to `),o=Le(e[4]),l=K(),d=P("div"),c=P("form"),v=P("input"),T=K(),b=P("p"),b.textContent="Enter the code to confirm that it's you.",A=K(),E=P("input"),y=K(),I=P("input"),D=K(),O=P("p"),O.textContent="We'll remember your device and won't ask for the code in the next 30 days.",M=K(),F=P("button"),F.textContent="Proceed",$=K(),Y&&Y.c(),L=K(),j=P("p"),H=Le(`Didn't received the code?
      `),Pe.c(),V=K(),Q=P("div"),X=Le(`Don't have access to your phone?
      `),te=P("div"),te.textContent="Reach out to our support team.",ne=K(),be=P("a"),ue=Le("Sign out"),w(t,"class","devise-form__title"),w(v,"name","_method"),w(v,"type","hidden"),v.value="patch",w(b,"class","devise-form__help-text"),w(E,"type","hidden"),w(E,"name","authenticity_token"),E.value=e[2],w(I,"class","devise-form__input"),w(I,"name","code"),w(I,"type","text"),w(I,"placeholder","Code"),I.value=e[3],w(O,"class","devise-form__help-text devise-form__mt-1"),w(F,"type","submit"),w(F,"class","devise-form__button devise-form__sign-in"),w(j,"class","devise-form__action-link-label devise-form__mt-1"),w(te,"class","devise-form__action-link"),w(Q,"class","devise-form__action-link-label"),w(be,"href",e[6]),cr(be,"margin-top","30px"),w(be,"data-method","delete"),w(be,"class","devise-form__button devise-form__register-button"),w(c,"id","new_user"),w(c,"class","devise-form__container"),c.noValidate=!0,w(c,"action",e[5]),w(c,"method","post"),w(d,"class","devise-form")},m(We,qe){ce(We,t,qe),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(i,o),ce(We,l,qe),ce(We,d,qe),m(d,c),m(c,v),m(c,T),m(c,b),m(c,A),m(c,E),m(c,y),m(c,I),m(c,D),m(c,O),m(c,M),m(c,F),m(c,$),Y&&Y.m(c,null),m(c,L),m(c,j),m(j,H),Pe.m(j,null),m(c,V),m(c,Q),m(Q,X),m(Q,te),m(c,ne),m(c,be),m(be,ue),Ce||(ie=ct(te,"click",ehe),Ce=!0)},p(We,[qe]){qe&16&&vt(o,We[4]),qe&4&&(E.value=We[2]),qe&8&&I.value!==We[3]&&(I.value=We[3]),We[1]<=0?Y||(Y=b3(),Y.c(),Y.m(c,L)):Y&&(Y.d(1),Y=null),Me===(Me=he(We))&&Pe?Pe.p(We,qe):(Pe.d(1),Pe=Me(We),Pe&&(Pe.c(),Pe.m(j,null))),qe&64&&w(be,"href",We[6]),qe&32&&w(c,"action",We[5])},i:ot,o:ot,d(We){We&&_e(t),We&&_e(l),We&&_e(d),Y&&Y.d(),Pe.d(),Ce=!1,ie()}}}function ehe(){if(typeof Intercom<"u"){Intercom("show");return}alert("Please click the chat button towards the bottom of the screen or drop us an email to support@taxplannerpro.com")}function the(e,t,n){let{authenticityToken:i}=t,{smsCode:r}=t,{phoneNumber:a}=t,{confirmCodePath:s}=t,{signOutPath:o}=t,{secondsTillNewCode:l}=t,{secondsTillCodeExpiration:d}=t;return oa(()=>{let c=setInterval(()=>{if(l<=0){clearInterval(c);return}n(0,l-=1)},1e3),v=setInterval(()=>{if(d<=0){clearInterval(v);return}n(1,d-=1)},1e3)}),e.$$set=c=>{"authenticityToken"in c&&n(2,i=c.authenticityToken),"smsCode"in c&&n(3,r=c.smsCode),"phoneNumber"in c&&n(4,a=c.phoneNumber),"confirmCodePath"in c&&n(5,s=c.confirmCodePath),"signOutPath"in c&&n(6,o=c.signOutPath),"secondsTillNewCode"in c&&n(0,l=c.secondsTillNewCode),"secondsTillCodeExpiration"in c&&n(1,d=c.secondsTillCodeExpiration)},[l,d,i,r,a,s,o]}class nhe extends Qt{constructor(t){super(),Jt(this,t,the,Zpe,Kt,{authenticityToken:2,smsCode:3,phoneNumber:4,confirmCodePath:5,signOutPath:6,secondsTillNewCode:0,secondsTillCodeExpiration:1})}}var fy;try{fy=Map}catch{}var cy;try{cy=Set}catch{}function F$(e,t,n){if(!e||typeof e!="object"||typeof e=="function")return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(_y);if(fy&&e instanceof fy)return new Map(Array.from(e.entries()));if(cy&&e instanceof cy)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var i=Object.create(e);n.push(i);for(var r in e){var a=t.findIndex(function(s){return s===e[r]});i[r]=a>-1?n[a]:F$(e[r],t,n)}return i}return e}function _y(e){return F$(e,[],[])}const ihe=Object.prototype.toString,rhe=Error.prototype.toString,ahe=RegExp.prototype.toString,she=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",ohe=/^Symbol\((.*)\)(.*)$/;function lhe(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function y3(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return lhe(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return she.call(e).replace(ohe,"Symbol($1)");const i=ihe.call(e).slice(8,-1);return i==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):i==="Error"||e instanceof Error?"["+rhe.call(e)+"]":i==="RegExp"?ahe.call(e):null}function bp(e,t){let n=y3(e,t);return n!==null?n:JSON.stringify(e,function(i,r){let a=y3(this[i],t);return a!==null?a:r},2)}let zc={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:i})=>{let r=i!=null&&i!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${bp(n,!0)}\``+(r?` (cast from the value \`${bp(i,!0)}\`).`:".");return n===null&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},Ru={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},tc={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},py={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},hy={isValue:"${path} field must be ${value}"},my={noUnknown:"${path} field has unspecified keys: ${unknown}"},uv={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:zc,string:Ru,number:tc,date:py,object:my,array:uv,boolean:hy});var uhe=Object.prototype,dhe=uhe.hasOwnProperty;function fhe(e,t){return e!=null&&dhe.call(e,t)}var che=fhe,_he=che,phe=n$;function hhe(e,t){return e!=null&&phe(e,t,_he)}var mhe=hhe;const Mv=cl(mhe),Dm=e=>e&&e.__isYupSchema__;class ghe{constructor(t,n){if(this.fn=void 0,this.refs=t,this.refs=t,typeof n=="function"){this.fn=n;return}if(!Mv(n,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:r,otherwise:a}=n,s=typeof i=="function"?i:(...o)=>o.every(l=>l===i);this.fn=function(...o){let l=o.pop(),d=o.pop(),c=s(...o)?r:a;if(c)return typeof c=="function"?c(d):d.concat(c.resolve(l))}}resolve(t,n){let i=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),r=this.fn.apply(t,i.concat(t,n));if(r===void 0||r===t)return t;if(!Dm(r))throw new TypeError("conditions must return a schema object");return r.resolve(n)}}function L$(e){return e==null?[]:[].concat(e)}function gy(){return gy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},gy.apply(this,arguments)}let vhe=/\$\{\s*(\w+)\s*\}/g;class ul extends Error{static formatError(t,n){const i=n.label||n.path||"this";return i!==n.path&&(n=gy({},n,{path:i})),typeof t=="string"?t.replace(vhe,(r,a)=>bp(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,i,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=n,this.path=i,this.type=r,this.errors=[],this.inner=[],L$(t).forEach(a=>{ul.isError(a)?(this.errors.push(...a.errors),this.inner=this.inner.concat(a.inner.length?a.inner:a)):this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,ul)}}const bhe=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function xv(e,t){let{endEarly:n,tests:i,args:r,value:a,errors:s,sort:o,path:l}=e,d=bhe(t),c=i.length;const v=[];if(s=s||[],!c)return s.length?d(new ul(s,a,l)):d(null,a);for(let T=0;T<i.length;T++){const b=i[T];b(r,function(E){if(E){if(!ul.isError(E))return d(E,a);if(n)return E.value=a,d(E,a);v.push(E)}if(--c<=0){if(v.length&&(o&&v.sort(o),s.length&&v.push(...s),s=v),s.length){d(new ul(s,a,l),a);return}d(null,a)}})}}function yhe(e){return function(t,n,i){for(var r=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[e?o:++r];if(n(a[l],l,a)===!1)break}return t}}var whe=yhe,The=whe,khe=The(),She=khe,Che=She,Phe=Em;function Ehe(e,t){return e&&Che(e,t,Phe)}var H$=Ehe,Ihe=C0,Ahe=H$,Dhe=Qw;function Ohe(e,t){var n={};return t=Dhe(t),Ahe(e,function(i,r,a){Ihe(n,r,t(i,r,a))}),n}var Mhe=Ohe;const j$=cl(Mhe);function c_(e){this._maxSize=e,this.clear()}c_.prototype.clear=function(){this._size=0,this._values=Object.create(null)};c_.prototype.get=function(e){return this._values[e]};c_.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var xhe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,B$=/^\d+$/,Rhe=/^\d/,$he=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Nhe=/^\s*(['"]?)(.*?)(\1)\s*$/,t2=512,w3=new c_(t2),T3=new c_(t2),k3=new c_(t2),O0={Cache:c_,split:vy,normalizePath:yb,setter:function(e){var t=yb(e);return T3.get(e)||T3.set(e,function(i,r){for(var a=0,s=t.length,o=i;a<s-1;){var l=t[a];if(l==="__proto__"||l==="constructor"||l==="prototype")return i;o=o[t[a++]]}o[t[a]]=r})},getter:function(e,t){var n=yb(e);return k3.get(e)||k3.set(e,function(r){for(var a=0,s=n.length;a<s;)if(r!=null||!t)r=r[n[a++]];else return;return r})},join:function(e){return e.reduce(function(t,n){return t+(n2(n)||B$.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){Fhe(Array.isArray(e)?e:vy(e),t,n)}};function yb(e){return w3.get(e)||w3.set(e,vy(e).map(function(t){return t.replace(Nhe,"$2")}))}function vy(e){return e.match(xhe)||[""]}function Fhe(e,t,n){var i=e.length,r,a,s,o;for(a=0;a<i;a++)r=e[a],r&&(jhe(r)&&(r='"'+r+'"'),o=n2(r),s=!o&&/^\d+$/.test(r),t.call(n,r,o,s,a,e))}function n2(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function Lhe(e){return e.match(Rhe)&&!e.match(B$)}function Hhe(e){return $he.test(e)}function jhe(e){return!n2(e)&&(Lhe(e)||Hhe(e))}const Gg={context:"$",value:"."};class ac{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gg.context,this.isValue=this.key[0]===Gg.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Gg.context:this.isValue?Gg.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&O0.getter(this.path,!0),this.map=n.map}getValue(t,n,i){let r=this.isContext?i:this.isValue?t:n;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ac.prototype.__isYupRef=!0;function Rv(){return Rv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Rv.apply(this,arguments)}function Bhe(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,a;for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Kg(e){function t(n,i){let{value:r,path:a="",label:s,options:o,originalValue:l,sync:d}=n,c=Bhe(n,["value","path","label","options","originalValue","sync"]);const{name:v,test:T,params:b,message:A}=e;let{parent:E,context:y}=o;function I($){return ac.isRef($)?$.getValue(r,E,y):$}function D($={}){const L=j$(Rv({value:r,originalValue:l,label:s,path:$.path||a},b,$.params),I),j=new ul(ul.formatError($.message||A,L),r,L.path,$.type||v);return j.params=L,j}let O=Rv({path:a,parent:E,type:v,createError:D,resolve:I,options:o,originalValue:l},c);if(!d){try{Promise.resolve(T.call(O,r,O)).then($=>{ul.isError($)?i($):$?i(null,$):i(D())}).catch(i)}catch($){i($)}return}let M;try{var F;if(M=T.call(O,r,O),typeof((F=M)==null?void 0:F.then)=="function")throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch($){i($);return}ul.isError(M)?i(M):M?i(null,M):i(D())}return t.OPTIONS=e,t}let Uhe=e=>e.substr(0,e.length-1).substr(1);function qhe(e,t,n,i=n){let r,a,s;return t?(O0.forEach(t,(o,l,d)=>{let c=l?Uhe(o):o;if(e=e.resolve({context:i,parent:r,value:n}),e.innerType){let v=d?parseInt(c,10):0;if(n&&v>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[v],e=e.innerType}if(!d){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e._type}")`);r=n,n=n&&n[c],e=e.fields[c]}a=c,s=l?"["+o+"]":"."+o}),{schema:e,parent:r,parentPath:a}):{parent:r,parentPath:t,schema:e}}class $v{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const t=[];for(const n of this.list)t.push(n);for(const[,n]of this.refs)t.push(n.describe());return t}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(t){return this.toArray().reduce((n,i)=>n.concat(ac.isRef(i)?t(i):i),[])}add(t){ac.isRef(t)?this.refs.set(t.key,t):this.list.add(t)}delete(t){ac.isRef(t)?this.refs.delete(t.key):this.list.delete(t)}clone(){const t=new $v;return t.list=new Set(this.list),t.refs=new Map(this.refs),t}merge(t,n){const i=this.clone();return t.list.forEach(r=>i.add(r)),t.refs.forEach(r=>i.add(r)),n.list.forEach(r=>i.delete(r)),n.refs.forEach(r=>i.delete(r)),i}}function nu(){return nu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nu.apply(this,arguments)}class mo{constructor(t){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new $v,this._blacklist=new $v,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(zc.notType)}),this.type=(t==null?void 0:t.type)||"mixed",this.spec=nu({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},t==null?void 0:t.spec)}get _type(){return this.type}_typeCheck(t){return!0}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeError=this._typeError,n._whitelistError=this._whitelistError,n._blacklistError=this._blacklistError,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.exclusiveTests=nu({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=_y(nu({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let i=t(this);return this._mutate=n,i}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,i=t.clone();const r=nu({},n.spec,i.spec);return i.spec=r,i._typeError||(i._typeError=n._typeError),i._whitelistError||(i._whitelistError=n._whitelistError),i._blacklistError||(i._blacklistError=n._blacklistError),i._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),i._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),i.tests=n.tests,i.exclusiveTests=n.exclusiveTests,i.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),i.transforms=[...n.transforms,...i.transforms],i}isType(t){return this.spec.nullable&&t===null?!0:this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let i=n.conditions;n=n.clone(),n.conditions=[],n=i.reduce((r,a)=>a.resolve(r,t),n),n=n.resolve(t)}return n}cast(t,n={}){let i=this.resolve(nu({value:t},n)),r=i._cast(t,n);if(t!==void 0&&n.assert!==!1&&i.isType(r)!==!0){let a=bp(t),s=bp(r);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${i._type}". 

attempted value: ${a} 
`+(s!==a?`result of cast: ${s}`:""))}return r}_cast(t,n){let i=t===void 0?t:this.transforms.reduce((r,a)=>a.call(this,r,t,this),t);return i===void 0&&(i=this.getDefault()),i}_validate(t,n={},i){let{sync:r,path:a,from:s=[],originalValue:o=t,strict:l=this.spec.strict,abortEarly:d=this.spec.abortEarly}=n,c=t;l||(c=this._cast(c,nu({assert:!1},n)));let v={value:c,path:a,options:n,originalValue:o,schema:this,label:this.spec.label,sync:r,from:s},T=[];this._typeError&&T.push(this._typeError);let b=[];this._whitelistError&&b.push(this._whitelistError),this._blacklistError&&b.push(this._blacklistError),xv({args:v,value:c,path:a,sync:r,tests:T,endEarly:d},A=>{if(A)return void i(A,c);xv({tests:this.tests.concat(b),args:v,path:a,sync:r,value:c,endEarly:d},i)})}validate(t,n,i){let r=this.resolve(nu({},n,{value:t}));return typeof i=="function"?r._validate(t,n,i):new Promise((a,s)=>r._validate(t,n,(o,l)=>{o?s(o):a(l)}))}validateSync(t,n){let i=this.resolve(nu({},n,{value:t})),r;return i._validate(t,nu({},n,{sync:!0}),(a,s)=>{if(a)throw a;r=s}),r}isValid(t,n){return this.validate(t,n).then(()=>!0,i=>{if(ul.isError(i))return!1;throw i})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(i){if(ul.isError(i))return!1;throw i}}_getDefault(){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this):_y(t)}getDefault(t){return this.resolve(t||{})._getDefault()}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){let n=this.clone();return n.spec.strict=t,n}_isPresent(t){return t!=null}defined(t=zc.defined){return this.test({message:t,name:"defined",exclusive:!0,test(n){return n!==void 0}})}required(t=zc.required){return this.clone({presence:"required"}).withMutation(n=>n.test({message:t,name:"required",exclusive:!0,test(i){return this.schema._isPresent(i)}}))}notRequired(){let t=this.clone({presence:"optional"});return t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t}nullable(t=!0){return this.clone({nullable:t!==!1})}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=zc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),r=Kg(n),a=n.exclusive||n.name&&i.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(i.exclusiveTests[n.name]=!!n.exclusive),i.tests=i.tests.filter(s=>!(s.OPTIONS.name===n.name&&(a||s.OPTIONS.test===r.OPTIONS.test))),i.tests.push(r),i}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let i=this.clone(),r=L$(t).map(a=>new ac(a));return r.forEach(a=>{a.isSibling&&i.deps.push(a.key)}),i.conditions.push(new ghe(r,n)),i}typeError(t){let n=this.clone();return n._typeError=Kg({message:t,name:"typeError",test(i){return i!==void 0&&!this.schema.isType(i)?this.createError({params:{type:this.schema._type}}):!0}}),n}oneOf(t,n=zc.oneOf){let i=this.clone();return t.forEach(r=>{i._whitelist.add(r),i._blacklist.delete(r)}),i._whitelistError=Kg({message:n,name:"oneOf",test(r){if(r===void 0)return!0;let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(r)?!0:this.createError({params:{values:a.toArray().join(", "),resolved:s}})}}),i}notOneOf(t,n=zc.notOneOf){let i=this.clone();return t.forEach(r=>{i._blacklist.add(r),i._whitelist.delete(r)}),i._blacklistError=Kg({message:n,name:"notOneOf",test(r){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(r)?this.createError({params:{values:a.toArray().join(", "),resolved:s}}):!0}}),i}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(){const t=this.clone(),{label:n,meta:i}=t.spec;return{meta:i,label:n,type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(a=>({name:a.OPTIONS.name,params:a.OPTIONS.params})).filter((a,s,o)=>o.findIndex(l=>l.name===a.name)===s)}}}mo.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])mo.prototype[`${e}At`]=function(t,n,i={}){const{parent:r,parentPath:a,schema:s}=qhe(this,t,n,i.context);return s[e](r&&r[a],nu({},i,{parent:r,path:t}))};for(const e of["equals","is"])mo.prototype[e]=mo.prototype.oneOf;for(const e of["not","nope"])mo.prototype[e]=mo.prototype.notOneOf;mo.prototype.optional=mo.prototype.notRequired;const Whe=mo;Whe.prototype;const ws=e=>e==null;function Nv(){return new U$}class U$ extends mo{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(t){if(!this.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}_typeCheck(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}isTrue(t=hy.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return ws(n)||n===!0}})}isFalse(t=hy.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return ws(n)||n===!1}})}}Nv.prototype=U$.prototype;let Vhe=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,zhe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Yhe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ghe=e=>ws(e)||e===e.trim(),Khe={}.toString();function Ps(){return new q$}class q$ extends mo{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(t){if(this.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===Khe?t:n})})}_typeCheck(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}_isPresent(t){return super._isPresent(t)&&!!t.length}length(t,n=Ru.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},test(i){return ws(i)||i.length===this.resolve(t)}})}min(t,n=Ru.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(i){return ws(i)||i.length>=this.resolve(t)}})}max(t,n=Ru.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},test(i){return ws(i)||i.length<=this.resolve(t)}})}matches(t,n){let i=!1,r,a;return n&&(typeof n=="object"?{excludeEmptyString:i=!1,message:r,name:a}=n:r=n),this.test({name:a||"matches",message:r||Ru.matches,params:{regex:t},test:s=>ws(s)||s===""&&i||s.search(t)!==-1})}email(t=Ru.email){return this.matches(Vhe,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ru.url){return this.matches(zhe,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ru.uuid){return this.matches(Yhe,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ru.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Ghe})}lowercase(t=Ru.lowercase){return this.transform(n=>ws(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,test:n=>ws(n)||n===n.toLowerCase()})}uppercase(t=Ru.uppercase){return this.transform(n=>ws(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,test:n=>ws(n)||n===n.toUpperCase()})}}Ps.prototype=q$.prototype;let Xhe=e=>e!=+e;function At(){return new W$}class W$ extends mo{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(t){let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)?n:parseFloat(n)})})}_typeCheck(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Xhe(t)}min(t,n=tc.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(i){return ws(i)||i>=this.resolve(t)}})}max(t,n=tc.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},test(i){return ws(i)||i<=this.resolve(t)}})}lessThan(t,n=tc.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},test(i){return ws(i)||i<this.resolve(t)}})}moreThan(t,n=tc.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},test(i){return ws(i)||i>this.resolve(t)}})}positive(t=tc.positive){return this.moreThan(0,t)}negative(t=tc.negative){return this.lessThan(0,t)}integer(t=tc.integer){return this.test({name:"integer",message:t,test:n=>ws(n)||Number.isInteger(n)})}truncate(){return this.transform(t=>ws(t)?t:t|0)}round(t){var n;let i=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(i.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+i.join(", "));return this.transform(r=>ws(r)?r:Math[t](r))}}At.prototype=W$.prototype;var Qhe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function Jhe(e){var t=[1,4,5,6,7,10,11],n=0,i,r;if(r=Qhe.exec(e)){for(var a=0,s;s=t[a];++a)r[s]=+r[s]||0;r[2]=(+r[2]||1)-1,r[3]=+r[3]||1,r[7]=r[7]?String(r[7]).substr(0,3):0,(r[8]===void 0||r[8]==="")&&(r[9]===void 0||r[9]==="")?i=+new Date(r[1],r[2],r[3],r[4],r[5],r[6],r[7]):(r[8]!=="Z"&&r[9]!==void 0&&(n=r[10]*60+r[11],r[9]==="+"&&(n=0-n)),i=Date.UTC(r[1],r[2],r[3],r[4],r[5]+n,r[6],r[7]))}else i=Date.parse?Date.parse(e):NaN;return i}let V$=new Date(""),Zhe=e=>Object.prototype.toString.call(e)==="[object Date]";class z$ extends mo{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(t){return this.isType(t)?t:(t=Jhe(t),isNaN(t)?V$:new Date(t))})})}_typeCheck(t){return Zhe(t)&&!isNaN(t.getTime())}prepareParam(t,n){let i;if(ac.isRef(t))i=t;else{let r=this.cast(t);if(!this._typeCheck(r))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);i=r}return i}min(t,n=py.min){let i=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(r){return ws(r)||r>=this.resolve(i)}})}max(t,n=py.max){let i=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},test(r){return ws(r)||r<=this.resolve(i)}})}}z$.INVALID_DATE=V$;z$.prototype;var eme=S$,tme=eme(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),nme=tme;const S3=cl(nme);var ime=C0,rme=H$,ame=Qw;function sme(e,t){var n={};return t=ame(t),rme(e,function(i,r,a){ime(n,t(i,r,a),i)}),n}var ome=sme;const lme=cl(ome);var i2={exports:{}};i2.exports=function(e){return Y$(ume(e),e)};i2.exports.array=Y$;function Y$(e,t){var n=e.length,i=new Array(n),r={},a=n,s=dme(t),o=fme(e);for(t.forEach(function(d){if(!o.has(d[0])||!o.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)r[a]||l(e[a],a,new Set);return i;function l(d,c,v){if(v.has(d)){var T;try{T=", node was:"+JSON.stringify(d)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!o.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!r[c]){r[c]=!0;var b=s.get(d)||new Set;if(b=Array.from(b),c=b.length){v.add(d);do{var A=b[--c];l(A,o.get(A),v)}while(c);v.delete(d)}i[--n]=d}}}function ume(e){for(var t=new Set,n=0,i=e.length;n<i;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}function dme(e){for(var t=new Map,n=0,i=e.length;n<i;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}function fme(e){for(var t=new Map,n=0,i=e.length;n<i;n++)t.set(e[n],n);return t}var cme=i2.exports;const _me=cl(cme);function pme(e,t=[]){let n=[],i=new Set,r=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=O0.split(s)[0];i.add(l),r.has(`${o}-${l}`)||n.push([o,l])}for(const s in e)if(Mv(e,s)){let o=e[s];i.add(s),ac.isRef(o)&&o.isSibling?a(o.path,s):Dm(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return _me.array(Array.from(i),n).reverse()}function C3(e,t){let n=1/0;return e.some((i,r)=>{var a;if(((a=t.path)==null?void 0:a.indexOf(i))!==-1)return n=r,!0}),n}function G$(e){return(t,n)=>C3(e,t)-C3(e,n)}function op(){return op=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},op.apply(this,arguments)}let P3=e=>Object.prototype.toString.call(e)==="[object Object]";function hme(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(i=>n.indexOf(i)===-1)}const mme=G$([]);class K$ extends mo{constructor(t){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=mme,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(i){if(typeof i=="string")try{i=JSON.parse(i)}catch{i=null}return this.isType(i)?i:null}),t&&this.shape(t)})}_typeCheck(t){return P3(t)||typeof t=="function"}_cast(t,n={}){var i;let r=super._cast(t,n);if(r===void 0)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,s=(i=n.stripUnknown)!=null?i:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(v=>this._nodes.indexOf(v)===-1)),l={},d=op({},n,{parent:l,__validating:n.__validating||!1}),c=!1;for(const v of o){let T=a[v],b=Mv(r,v);if(T){let A,E=r[v];d.path=(n.path?`${n.path}.`:"")+v,T=T.resolve({value:E,context:n.context,parent:l});let y="spec"in T?T.spec:void 0,I=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||v in r;continue}A=!n.__validating||!I?T.cast(r[v],d):r[v],A!==void 0&&(l[v]=A)}else b&&!s&&(l[v]=r[v]);l[v]!==r[v]&&(c=!0)}return c?l:r}_validate(t,n={},i){let r=[],{sync:a,from:s=[],originalValue:o=t,abortEarly:l=this.spec.abortEarly,recursive:d=this.spec.recursive}=n;s=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,n.from=s,super._validate(t,n,(c,v)=>{if(c){if(!ul.isError(c)||l)return void i(c,v);r.push(c)}if(!d||!P3(v)){i(r[0]||null,v);return}o=o||v;let T=this._nodes.map(b=>(A,E)=>{let y=b.indexOf(".")===-1?(n.path?`${n.path}.`:"")+b:`${n.path||""}["${b}"]`,I=this.fields[b];if(I&&"validate"in I){I.validate(v[b],op({},n,{path:y,from:s,strict:!0,parent:v,originalValue:o[b]}),E);return}E(null)});xv({sync:a,tests:T,value:v,errors:r,endEarly:l,sort:this._sortErrors,path:n.path},i)})}clone(t){const n=super.clone(t);return n.fields=op({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),i=n.fields;for(let[r,a]of Object.entries(this.fields)){const s=i[r];s===void 0?i[r]=a:s instanceof mo&&a instanceof mo&&(i[r]=a.concat(s))}return n.withMutation(()=>n.shape(i,this._excludedEdges))}getDefaultFromShape(){let t={};return this._nodes.forEach(n=>{const i=this.fields[n];t[n]="default"in i?i.getDefault():void 0}),t}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(t,n=[]){let i=this.clone(),r=Object.assign(i.fields,t);return i.fields=r,i._sortErrors=G$(Object.keys(r)),n.length&&(Array.isArray(n[0])||(n=[n]),i._excludedEdges=[...i._excludedEdges,...n]),i._nodes=pme(r,i._excludedEdges),i}pick(t){const n={};for(const i of t)this.fields[i]&&(n[i]=this.fields[i]);return this.clone().withMutation(i=>(i.fields={},i.shape(n)))}omit(t){const n=this.clone(),i=n.fields;n.fields={};for(const r of t)delete i[r];return n.withMutation(()=>n.shape(i))}from(t,n,i){let r=O0.getter(t,!0);return this.transform(a=>{if(a==null)return a;let s=a;return Mv(a,t)&&(s=op({},a),i||delete s[t],s[n]=r(a)),s})}noUnknown(t=!0,n=my.noUnknown){typeof t=="string"&&(n=t,t=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:n,test(r){if(r==null)return!0;const a=hme(this.schema,r);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return i.spec.noUnknown=t,i}unknown(t=!0,n=my.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>n&&lme(n,(i,r)=>t(r)))}camelCase(){return this.transformKeys(Ale)}snakeCase(){return this.transformKeys(S3)}constantCase(){return this.transformKeys(t=>S3(t).toUpperCase())}describe(){let t=super.describe();return t.fields=j$(this.fields,n=>n.describe()),t}}function Bs(e){return new K$(e)}Bs.prototype=K$.prototype;function Fv(){return Fv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Fv.apply(this,arguments)}function yp(e){return new X$(e)}class X$ extends mo{constructor(t){super({type:"array"}),this.innerType=void 0,this.innerType=t,this.withMutation(()=>{this.transform(function(n){if(typeof n=="string")try{n=JSON.parse(n)}catch{n=null}return this.isType(n)?n:null})})}_typeCheck(t){return Array.isArray(t)}get _subType(){return this.innerType}_cast(t,n){const i=super._cast(t,n);if(!this._typeCheck(i)||!this.innerType)return i;let r=!1;const a=i.map((s,o)=>{const l=this.innerType.cast(s,Fv({},n,{path:`${n.path||""}[${o}]`}));return l!==s&&(r=!0),l});return r?a:i}_validate(t,n={},i){var r,a;let s=[],o=n.sync,l=n.path,d=this.innerType,c=(r=n.abortEarly)!=null?r:this.spec.abortEarly,v=(a=n.recursive)!=null?a:this.spec.recursive,T=n.originalValue!=null?n.originalValue:t;super._validate(t,n,(b,A)=>{if(b){if(!ul.isError(b)||c)return void i(b,A);s.push(b)}if(!v||!d||!this._typeCheck(A)){i(s[0]||null,A);return}T=T||A;let E=new Array(A.length);for(let y=0;y<A.length;y++){let I=A[y],D=`${n.path||""}[${y}]`,O=Fv({},n,{path:D,strict:!0,parent:A,index:y,originalValue:T[y]});E[y]=(M,F)=>d.validate(I,O,F)}xv({sync:o,path:l,value:A,errors:s,endEarly:c,tests:E},i)})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Dm(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+bp(t));return n.innerType=t,n}length(t,n=uv.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},test(i){return ws(i)||i.length===this.resolve(t)}})}min(t,n){return n=n||uv.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(i){return ws(i)||i.length>=this.resolve(t)}})}max(t,n){return n=n||uv.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},test(i){return ws(i)||i.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(i,r,a)=>!t(i,r,a):i=>!!i;return this.transform(i=>i!=null?i.filter(n):i)}describe(){let t=super.describe();return this.innerType&&(t.innerType=this.innerType.describe()),t}nullable(t=!0){return super.nullable(t)}defined(){return super.defined()}required(t){return super.required(t)}}yp.prototype=X$.prototype;function gme(e){return new vme(e)}class vme{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.__inputType=void 0,this.__outputType=void 0,this._resolve=(n,i={})=>{let r=this.builder(n,i);if(!Dm(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(i)},this.builder=t}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}validate(t,n,i){return this._resolve(t,n).validate(t,n,i)}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,i){return this._resolve(n,i).validateAt(t,n,i)}validateSyncAt(t,n,i){return this._resolve(n,i).validateSyncAt(t,n,i)}describe(){return null}isValid(t,n){return this._resolve(t,n).isValid(t,n)}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}}function bme(e,t,n){if(!e||!Dm(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const yme=Bs().shape({selectedBusinessUse:At().required().min(.01).max(1),purchasePrice:At().required().min(1),leasePayment:At().required().min(1),leaseTerm:At().required().min(1),selectedVehicleType:Ps().required().oneOf(["car","truck"])}),wme=e=>{try{return yme.validateSync(e,{abortEarly:!1}),new Set}catch(t){return new Set(t.inner.map(n=>n.path))}};class Tme extends Fo{async update(t){return this.baseQuery(this.baseEndpoint,{method:"PATCH",headers:this.headers,body:JSON.stringify({auto_lease:t})})}async recalculate(){return this.baseQuery(`${this.baseEndpoint}/recalculate`,{method:"GET",headers:this.headers})}}function E3(e,t,n){const i=e.slice();return i[22]=t[n],i}function I3(e,t,n){const i=e.slice();return i[25]=t[n].lease_expense,i[26]=t[n].tax_savings,i[28]=n,i}function A3(e,t,n){const i=e.slice();return i[22]=t[n],i}function D3(e,t,n){const i=e.slice();return i[31]=t[n].depreciation,i[26]=t[n].tax_savings,i[28]=n,i}function O3(e,t,n){const i=e.slice();return i[33]=t[n],i}function kme(e,t,n){const i=e.slice();return i[22]=t[n],i[28]=n,i}function Sme(e){let t,n=e[28]+1+"",i,r;return{c(){t=P("option"),i=Le(n),r=Le(`%
            `),t.__value=(e[28]+1)/100,t.value=t.__value},m(a,s){ce(a,t,s),m(t,i),m(t,r)},p:ot,d(a){a&&_e(t)}}}function M3(e){let t,n=e[33].text+"",i,r;return{c(){t=P("option"),i=Le(n),r=K(),t.__value=e[33].type,t.value=t.__value},m(a,s){ce(a,t,s),m(t,i),m(t,r)},p:ot,d(a){a&&_e(t)}}}function Cme(e){let t,n,i,r;function a(l,d){return l[1].size>0?Ime:Eme}let s=a(e),o=s(e);return{c(){t=P("div"),n=P("div"),o.c(),w(n,"class","col-lg-12 text-center data-placeholder svelte-wdpv5u"),w(t,"class","row summary svelte-wdpv5u")},m(l,d){ce(l,t,d),m(t,n),o.m(n,null),r=!0},p(l,d){s!==(s=a(l))&&(o.d(1),o=s(l),o&&(o.c(),o.m(n,null)))},i(l){r||(xa(()=>{r&&(i||(i=Us(t,rs,{},!0)),i.run(1))}),r=!0)},o(l){i||(i=Us(t,rs,{},!1)),i.run(0),r=!1},d(l){l&&_e(t),o.d(),l&&i&&i.end()}}}function Pme(e){let t,n,i,r,a,s,o,l,d,c;function v(I,D){return I[2].length>0?Dme:Ame}let T=v(e),b=T(e);function A(I,D){return I[3].length>0?Mme:Ome}let E=A(e),y=E(e);return{c(){t=P("div"),n=P("div"),i=P("div"),i.textContent="Vehicle Purchase Summary",r=K(),b.c(),a=K(),s=P("div"),o=P("div"),o.textContent="Vehicle Lease Summary",l=K(),y.c(),w(i,"class","text-center summary-text svelte-wdpv5u"),w(n,"class","col-lg-6"),w(o,"class","text-center summary-text svelte-wdpv5u"),w(s,"class","col-lg-6"),w(t,"class","row summary svelte-wdpv5u")},m(I,D){ce(I,t,D),m(t,n),m(n,i),m(n,r),b.m(n,null),m(t,a),m(t,s),m(s,o),m(s,l),y.m(s,null),c=!0},p(I,D){T===(T=v(I))&&b?b.p(I,D):(b.d(1),b=T(I),b&&(b.c(),b.m(n,null))),E===(E=A(I))&&y?y.p(I,D):(y.d(1),y=E(I),y&&(y.c(),y.m(s,null)))},i(I){c||(xa(()=>{c&&(d||(d=Us(t,rs,{},!0)),d.run(1))}),c=!0)},o(I){d||(d=Us(t,rs,{},!1)),d.run(0),c=!1},d(I){I&&_e(t),b.d(),y.d(),I&&d&&d.end()}}}function Eme(e){let t;return{c(){t=P("i"),t.textContent="Just a second..."},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Ime(e){let t;return{c(){t=P("i"),t.textContent="Please, update the fields to have valid values"},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Ame(e){let t;return{c(){t=P("div"),t.textContent="No Data",w(t,"class","text-center")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Dme(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=e[2],A=[];for(let I=0;I<b.length;I+=1)A[I]=x3(D3(e,b,I));let E=Array(e[6]),y=[];for(let I=0;I<E.length;I+=1)y[I]=R3(A3(e,E,I));return{c(){t=P("table"),n=P("thead"),n.innerHTML=`<tr><th scope="col"></th> 
              <th scope="col">Depreciation</th> 
              <th scope="col">Tax Savings</th></tr>`,i=K(),r=P("tbody");for(let I=0;I<A.length;I+=1)A[I].c();a=K();for(let I=0;I<y.length;I+=1)y[I].c();s=K(),o=P("tr"),l=P("th"),l.textContent="Total:",d=K(),c=P("td"),v=Le("$"),T=Le(e[8]),w(l,"scope","row"),w(l,"colspan","2"),w(l,"class","text-right"),w(t,"class","table table-sm")},m(I,D){ce(I,t,D),m(t,n),m(t,i),m(t,r);for(let O=0;O<A.length;O+=1)A[O]&&A[O].m(r,null);m(r,a);for(let O=0;O<y.length;O+=1)y[O]&&y[O].m(r,null);m(r,s),m(r,o),m(o,l),m(o,d),m(o,c),m(c,v),m(c,T)},p(I,D){if(D[0]&4){b=I[2];let O;for(O=0;O<b.length;O+=1){const M=D3(I,b,O);A[O]?A[O].p(M,D):(A[O]=x3(M),A[O].c(),A[O].m(r,a))}for(;O<A.length;O+=1)A[O].d(1);A.length=b.length}if(D[0]&64){E=Array(I[6]);let O;for(O=0;O<E.length;O+=1){const M=A3(I,E,O);y[O]?y[O].p(M,D):(y[O]=R3(),y[O].c(),y[O].m(r,s))}for(;O<y.length;O+=1)y[O].d(1);y.length=E.length}D[0]&256&&vt(T,I[8])},d(I){I&&_e(t),Nn(A,I),Nn(y,I)}}}function x3(e){let t,n,i,r=e[28]+1+"",a,s,o,l,d=e[31]+"",c,v,T,b,A=e[26]+"",E;return{c(){t=P("tr"),n=P("th"),i=Le("Year "),a=Le(r),s=K(),o=P("td"),l=Le("$"),c=Le(d),v=K(),T=P("td"),b=Le("$"),E=Le(A),w(n,"scope","row")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(n,a),m(t,s),m(t,o),m(o,l),m(o,c),m(t,v),m(t,T),m(T,b),m(T,E)},p(y,I){I[0]&4&&d!==(d=y[31]+"")&&vt(c,d),I[0]&4&&A!==(A=y[26]+"")&&vt(E,A)},d(y){y&&_e(t)}}}function R3(e){let t;return{c(){t=P("tr"),t.innerHTML='<td colspan="3"> </td>'},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Ome(e){let t;return{c(){t=P("div"),t.textContent="No Data",w(t,"class","text-center")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Mme(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=e[3],A=[];for(let I=0;I<b.length;I+=1)A[I]=$3(I3(e,b,I));let E=Array(e[7]),y=[];for(let I=0;I<E.length;I+=1)y[I]=N3(E3(e,E,I));return{c(){t=P("table"),n=P("thead"),n.innerHTML=`<tr><th></th> 
              <th>Lease Expense</th> 
              <th>Tax Savings</th></tr>`,i=K(),r=P("tbody");for(let I=0;I<A.length;I+=1)A[I].c();a=K();for(let I=0;I<y.length;I+=1)y[I].c();s=K(),o=P("tr"),l=P("th"),l.textContent="Total:",d=K(),c=P("td"),v=Le("$"),T=Le(e[9]),w(l,"scope","row"),w(l,"colspan","2"),w(l,"class","text-right"),w(t,"class","table table-sm")},m(I,D){ce(I,t,D),m(t,n),m(t,i),m(t,r);for(let O=0;O<A.length;O+=1)A[O]&&A[O].m(r,null);m(r,a);for(let O=0;O<y.length;O+=1)y[O]&&y[O].m(r,null);m(r,s),m(r,o),m(o,l),m(o,d),m(o,c),m(c,v),m(c,T)},p(I,D){if(D[0]&8){b=I[3];let O;for(O=0;O<b.length;O+=1){const M=I3(I,b,O);A[O]?A[O].p(M,D):(A[O]=$3(M),A[O].c(),A[O].m(r,a))}for(;O<A.length;O+=1)A[O].d(1);A.length=b.length}if(D[0]&128){E=Array(I[7]);let O;for(O=0;O<E.length;O+=1){const M=E3(I,E,O);y[O]?y[O].p(M,D):(y[O]=N3(),y[O].c(),y[O].m(r,s))}for(;O<y.length;O+=1)y[O].d(1);y.length=E.length}D[0]&512&&vt(T,I[9])},d(I){I&&_e(t),Nn(A,I),Nn(y,I)}}}function $3(e){let t,n,i,r=e[28]+1+"",a,s,o,l,d=e[25]+"",c,v,T,b,A=e[26]+"",E;return{c(){t=P("tr"),n=P("th"),i=Le("Year "),a=Le(r),s=K(),o=P("td"),l=Le("$"),c=Le(d),v=K(),T=P("td"),b=Le("$"),E=Le(A),w(n,"scope","row")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(n,a),m(t,s),m(t,o),m(o,l),m(o,c),m(t,v),m(t,T),m(T,b),m(T,E)},p(y,I){I[0]&8&&d!==(d=y[25]+"")&&vt(c,d),I[0]&8&&A!==(A=y[26]+"")&&vt(E,A)},d(y){y&&_e(t)}}}function N3(e){let t;return{c(){t=P("tr"),t.innerHTML='<td colspan="3"> </td>'},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function xme(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me=Array(100),Te=[];for(let ht=0;ht<me.length;ht+=1)Te[ht]=Sme(kme(e,me,ht));let De=e[10],we=[];for(let ht=0;ht<De.length;ht+=1)we[ht]=M3(O3(e,De,ht));const Ve=[Pme,Cme],Ke=[];function yt(ht,Je){return ht[5]?0:1}return he=yt(e),Me=Ke[he]=Ve[he](e),{c(){t=P("div"),n=P("div"),i=P("div"),r=P("label"),r.textContent="Business Use %:",a=K(),s=P("div"),o=P("select");for(let ht=0;ht<Te.length;ht+=1)Te[ht].c();l=K(),d=P("div"),c=P("div"),v=P("div"),T=P("label"),T.textContent="Purchase Price:",b=K(),A=P("div"),E=P("input"),y=K(),I=P("div"),D=P("label"),D.textContent="Vehicle Weight:",O=K(),M=P("div"),F=P("select");for(let ht=0;ht<we.length;ht+=1)we[ht].c();$=K(),L=P("div"),j=P("div"),H=P("label"),H.textContent="Lease Payment:",V=K(),Q=P("div"),X=P("input"),te=K(),ne=P("div"),be=P("label"),be.textContent="Lease Term (months):",ue=K(),Ce=P("div"),ie=P("input"),Y=K(),Me.c(),Pe=K(),We=P("div"),w(r,"class","col-form-label col-sm-4"),w(r,"for","businessUse"),w(o,"id","businessUse"),w(o,"class","form-control"),e[0].selectedBusinessUse===void 0&&xa(()=>e[14].call(o)),wt(o,"is-invalid",e[1].has("selectedBusinessUse")),w(s,"class","col-sm-8"),w(i,"class","form-group svelte-wdpv5u"),w(n,"class","col-lg-6 offset-3"),w(t,"class","row"),w(T,"class","col-form-label col-sm-4"),w(T,"for","purchasePrice"),w(E,"id","purchasePrice"),w(E,"class","form-control"),w(E,"type","number"),w(E,"min","1"),w(E,"max","10"),wt(E,"is-invalid",e[1].has("purchasePrice")),w(A,"class","col-sm-8"),w(v,"class","form-group svelte-wdpv5u"),w(D,"class","col-form-label col-sm-4"),w(D,"for","vehicle"),w(F,"id","vehicle"),w(F,"class","form-control"),e[0].selectedVehicleType===void 0&&xa(()=>e[16].call(F)),wt(F,"is-invalid",e[1].has("selectedVehicleType")),w(M,"class","col-sm-8"),w(I,"class","form-group svelte-wdpv5u"),w(c,"class","col-lg-6"),w(H,"class","col-form-label col-sm-4"),w(H,"for","leasePayment"),w(X,"id","leasePayment"),w(X,"class","form-control"),w(X,"type","number"),wt(X,"is-invalid",e[1].has("leasePayment")),w(Q,"class","col-sm-8"),w(j,"class","form-group svelte-wdpv5u"),w(be,"class","col-form-label col-sm-4"),w(be,"for","leaseTerm"),w(ie,"id","leaseTerm"),w(ie,"class","form-control"),w(ie,"type","number"),wt(ie,"is-invalid",e[1].has("leaseTerm")),w(Ce,"class","col-sm-8"),w(ne,"class","form-group svelte-wdpv5u"),w(L,"class","col-lg-6"),w(d,"class","row")},m(ht,Je){ce(ht,t,Je),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,o);for(let pt=0;pt<Te.length;pt+=1)Te[pt]&&Te[pt].m(o,null);Es(o,e[0].selectedBusinessUse,!0),ce(ht,l,Je),ce(ht,d,Je),m(d,c),m(c,v),m(v,T),m(v,b),m(v,A),m(A,E),Pn(E,e[0].purchasePrice),m(c,y),m(c,I),m(I,D),m(I,O),m(I,M),m(M,F);for(let pt=0;pt<we.length;pt+=1)we[pt]&&we[pt].m(F,null);Es(F,e[0].selectedVehicleType,!0),m(d,$),m(d,L),m(L,j),m(j,H),m(j,V),m(j,Q),m(Q,X),Pn(X,e[0].leasePayment),m(L,te),m(L,ne),m(ne,be),m(ne,ue),m(ne,Ce),m(Ce,ie),Pn(ie,e[0].leaseTerm),ce(ht,Y,Je),Ke[he].m(ht,Je),ce(ht,Pe,Je),ce(ht,We,Je),e[19](We),qe=!0,ee||(G=[ct(o,"change",e[14]),ct(E,"input",e[15]),ct(F,"change",e[16]),ct(X,"input",e[17]),ct(ie,"input",e[18])],ee=!0)},p(ht,Je){if(Je[0]&1&&Es(o,ht[0].selectedBusinessUse),(!qe||Je[0]&2)&&wt(o,"is-invalid",ht[1].has("selectedBusinessUse")),Je[0]&1&&Ri(E.value)!==ht[0].purchasePrice&&Pn(E,ht[0].purchasePrice),(!qe||Je[0]&2)&&wt(E,"is-invalid",ht[1].has("purchasePrice")),Je[0]&1024){De=ht[10];let Tt;for(Tt=0;Tt<De.length;Tt+=1){const it=O3(ht,De,Tt);we[Tt]?we[Tt].p(it,Je):(we[Tt]=M3(it),we[Tt].c(),we[Tt].m(F,null))}for(;Tt<we.length;Tt+=1)we[Tt].d(1);we.length=De.length}Je[0]&1&&Es(F,ht[0].selectedVehicleType),(!qe||Je[0]&2)&&wt(F,"is-invalid",ht[1].has("selectedVehicleType")),Je[0]&1&&Ri(X.value)!==ht[0].leasePayment&&Pn(X,ht[0].leasePayment),(!qe||Je[0]&2)&&wt(X,"is-invalid",ht[1].has("leasePayment")),Je[0]&1&&Ri(ie.value)!==ht[0].leaseTerm&&Pn(ie,ht[0].leaseTerm),(!qe||Je[0]&2)&&wt(ie,"is-invalid",ht[1].has("leaseTerm"));let pt=he;he=yt(ht),he===pt?Ke[he].p(ht,Je):(pn(),W(Ke[pt],1,1,()=>{Ke[pt]=null}),hn(),Me=Ke[he],Me?Me.p(ht,Je):(Me=Ke[he]=Ve[he](ht),Me.c()),U(Me,1),Me.m(Pe.parentNode,Pe))},i(ht){qe||(U(Me),qe=!0)},o(ht){W(Me),qe=!1},d(ht){ht&&_e(t),Nn(Te,ht),ht&&_e(l),ht&&_e(d),Nn(we,ht),ht&&_e(Y),Ke[he].d(ht),ht&&_e(Pe),ht&&_e(We),e[19](null),ee=!1,vi(G)}}}function Rme(e,t,n){let{autoLeaseEndpoint:i}=t,{autoLeasePlanner:r}=t;const a=new Tme(i);let s=[{id:1,text:"Under 6,000 lbs",type:"car"},{id:2,text:"Over 6,000 lbs",type:"truck"}],o={selectedBusinessUse:1,purchasePrice:0,leasePayment:0,leaseTerm:12,selectedVehicleType:"car"},l=null,d=new Set([]),c={dummy:"initial value"},v=!1,T=[],b=0,A=[],E=0,y,I;const D=Ys.debounce(async()=>{No.start();try{if((await a.update({business_use:o.selectedBusinessUse,purchase_price:o.purchasePrice,lease_payment:o.leasePayment,lease_term:o.leaseTerm,vehicle_type:o.selectedVehicleType})).status==200){const V=await a.recalculate();n(2,T=V.purchase_summary),n(3,A=V.lease_summary),n(13,c=Ys.clone(o)),l.scrollIntoView()}}catch(H){if(H.name==="AbortError")return}finally{No.done()}},500);oa(()=>{r&&n(0,o={selectedBusinessUse:r.business_use,purchasePrice:r.purchase_price,leasePayment:r.lease_payment,leaseTerm:r.lease_term,selectedVehicleType:r.vehicle_type})});function O(){o.selectedBusinessUse=Cd(this),n(0,o)}function M(){o.purchasePrice=Ri(this.value),n(0,o)}function F(){o.selectedVehicleType=Cd(this),n(0,o)}function $(){o.leasePayment=Ri(this.value),n(0,o)}function L(){o.leaseTerm=Ri(this.value),n(0,o)}function j(H){Oe[H?"unshift":"push"](()=>{l=H,n(4,l)})}return e.$$set=H=>{"autoLeaseEndpoint"in H&&n(11,i=H.autoLeaseEndpoint),"autoLeasePlanner"in H&&n(12,r=H.autoLeasePlanner)},e.$$.update=()=>{if(e.$$.dirty[0]&1&&n(1,d=wme(o)),e.$$.dirty[0]&8193&&n(5,v=Ys.isMatch(o,c)),e.$$.dirty[0]&3&&d.size===0&&D(o),e.$$.dirty[0]&4&&n(8,y=T.reduce((H,V)=>H+(V.tax_savings||0),0)),e.$$.dirty[0]&8&&n(9,I=A.reduce((H,V)=>H+(V.tax_savings||0),0)),e.$$.dirty[0]&12){const H=T.length,V=A.length;n(6,b=0),n(7,E=0),Ys.isNumber(H)&&Ys.isNumber(V)&&(H>V?n(7,E=H-V):n(6,b=V-H))}},[o,d,T,A,l,v,b,E,y,I,s,i,r,c,O,M,F,$,L,j]}class $me extends Qt{constructor(t){super(),Jt(this,t,Rme,xme,Kt,{autoLeaseEndpoint:11,autoLeasePlanner:12},null,[-1,-1])}}function Nme(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M;return{c(){t=P("div"),n=P("form"),i=P("small"),i.textContent="Tax Year:",r=K(),a=P("select"),s=P("option"),o=Le(e[3]),l=P("option"),d=Le(e[4]),c=K(),v=P("form"),T=P("input"),b=K(),A=P("input"),E=K(),y=P("input"),I=K(),D=P("input"),s.__value=e[3],s.value=s.__value,l.__value=e[4],l.value=l.__value,w(a,"class","form-control form-control-sm ml-2 svelte-pz8wn9"),e[0]===void 0&&xa(()=>e[8].call(a)),w(n,"class","form-inline"),w(T,"type","hidden"),w(T,"name","_method"),T.value="put",w(A,"type","hidden"),w(A,"name","authenticity_token"),A.value=e[5],w(y,"type","hidden"),w(y,"name","strategy"),y.value=e[0],w(D,"type","hidden"),w(D,"name","redirect_after_update"),D.value=e[2],w(v,"action",e[1]),w(v,"method","post")},m(F,$){ce(F,t,$),m(t,n),m(n,i),m(n,r),m(n,a),m(a,s),m(s,o),m(a,l),m(l,d),Es(a,e[0],!0),m(t,c),m(t,v),m(v,T),m(v,b),m(v,A),m(v,E),m(v,y),m(v,I),m(v,D),e[9](v),O||(M=[ct(a,"change",e[7]),ct(a,"change",e[8])],O=!0)},p(F,[$]){$&8&&vt(o,F[3]),$&8&&(s.__value=F[3],s.value=s.__value),$&16&&vt(d,F[4]),$&16&&(l.__value=F[4],l.value=l.__value),$&25&&Es(a,F[0]),$&32&&(A.value=F[5]),$&25&&(y.value=F[0]),$&4&&(D.value=F[2]),$&2&&w(v,"action",F[1])},i:ot,o:ot,d(F){F&&_e(t),e[9](null),O=!1,vi(M)}}}function Fme(e,t,n){let{strategyUpdateUrl:i}=t,{strategyAfterUpdateUrl:r}=t,{previousYear:a}=t,{currentYear:s}=t,{selectedYear:o}=t,{csrf:l}=t,d=o,c=null;function v(A){n(0,o=A.target.value)}function T(){o=Cd(this),n(0,o),n(4,s),n(3,a)}function b(A){Oe[A?"unshift":"push"](()=>{c=A,n(6,c)})}return e.$$set=A=>{"strategyUpdateUrl"in A&&n(1,i=A.strategyUpdateUrl),"strategyAfterUpdateUrl"in A&&n(2,r=A.strategyAfterUpdateUrl),"previousYear"in A&&n(3,a=A.previousYear),"currentYear"in A&&n(4,s=A.currentYear),"selectedYear"in A&&n(0,o=A.selectedYear),"csrf"in A&&n(5,l=A.csrf)},e.$$.update=()=>{e.$$.dirty&65&&d!==o&&c!==null&&lc(()=>c.submit())},[o,i,r,a,s,l,c,v,T,b]}class Q$ extends Qt{constructor(t){super(),Jt(this,t,Fme,Nme,Kt,{strategyUpdateUrl:1,strategyAfterUpdateUrl:2,previousYear:3,currentYear:4,selectedYear:0,csrf:5})}}function J$(){return{"401k_contributions":0,business_owned:!1,covered_by_retirement_plan:!1,age:21,dependent_care_benefits:0,employer_name:"Wages",employer_type:"TAXPAYER",federal_income_tax_withheld:0,paystub_date:`12/31/${new Date().getFullYear()}`,state_income_tax_withheld:0,wages:0}}function Z$(){return{name:"",income:0,advertising:0,auto_expenses:0,cleaning:0,commissions:0,depreciation:0,insurance:0,legal_expenses:0,management_fees:0,mortage_interest:0,repairs:0,supplies:0,taxes:0,utilities:0,other:0}}function Lme(e){const t=/.*_(\d+)_/,n=/.*_(\d+)_.*/,i=Gn.keys(e),r=Gn.values(e),a=Gn.map(i,d=>Gn.parseInt(d.replace(n,"$1"))-1),s=Gn.chain(a).zip(i,r).groupBy(d=>d[0]).value(),o=Gn.min(a),l=Gn.max(a);return Gn.flatMap(Gn.range(o,l+1),d=>{const c=s[d-o];return c?[Gn.chain(c).keyBy(v=>Gn.replace(v[1],t,"")).mapValues(v=>v[2]).value()]:[]})}function F3(e,t){return Gn.merge({},...Gn.flatMap(t,(n,i)=>{const r=`${e}_${i+1}_`;return Gn.chain(n).map((a,s)=>[`${r}${s}`,a]).keyBy(a=>a[0]).mapValues(a=>a[1]).value()}))}function r2(e){function t(s,o){function l(d){return Gn.mapValues(d,c=>c==="YES"?!0:c==="NO"?!1:c)}return Lme(Gn.pickBy(s,o)).map(l).filter(d=>d.enabled).map(d=>Gn.omit(d,"enabled"))}function n(s){return{...s,paystub_date:zn(s.paystub_date,"YYYY-MM-DD").format("MM/DD/YYYY")}}const i=(s,o)=>o.match(/^wages_\d/),r=(s,o)=>o.match(/^rental_real_estate_\d/);var a=Gn.omitBy(e,(s,o)=>i(s,o)||r(s,o));return a.wages=Gn.map(t(e,i),n),a.rental_real_estate=t(e,r),a.rental_real_estate_professional=e.rental_real_estate_professional==="YES",a}function Hme(e,t,n){return Gn.map(Gn.range(e.length,t),i=>n())}function jme(e){function t(l){return{...l,enabled:!0}}function n(l){return{...l,enabled:!1}}function i(l){return Gn.mapValues(l,d=>d===!0?"YES":d===!1?"NO":d)}function r(l,d){return Gn.concat(e[l].map(t),Hme(e[l],8,d).map(n)).map(i)}function a(l){return{...l,paystub_date:zn(l.paystub_date,"MM/DD/YYYY").format("YYYY-MM-DD")}}const s=Gn.map(r("wages",J$),a),o=r("rental_real_estate",Z$);return{...Gn.omit(e,"wages","rental_real_estate"),...F3("wages",s),...F3("rental_real_estate",o),rental_real_estate_professional:e.rental_real_estate_professional?"YES":"NO"}}const eN=[{value:"single",title:"Single"},{value:"joint",title:"Married Joint"},{value:"head",title:"Head-of-Household"},{value:"separate",title:"Married Separate"}],a2=[{value:"AK",title:"Alaska"},{value:"AL",title:"Alabama"},{value:"AR",title:"Arkansas"},{value:"AS",title:"American Samoa"},{value:"AZ",title:"Arizona"},{value:"CA",title:"California"},{value:"CO",title:"Colorado"},{value:"CT",title:"Connecticut"},{value:"DC",title:"District of Columbia"},{value:"DE",title:"Delaware"},{value:"FL",title:"Florida"},{value:"GA",title:"Georgia"},{value:"GU",title:"Guam"},{value:"HI",title:"Hawaii"},{value:"IA",title:"Iowa"},{value:"ID",title:"Idaho"},{value:"IL",title:"Illinois"},{value:"IN",title:"Indiana"},{value:"KS",title:"Kansas"},{value:"KY",title:"Kentucky"},{value:"LA",title:"Louisiana"},{value:"MA",title:"Massachusetts"},{value:"MD",title:"Maryland"},{value:"ME",title:"Maine"},{value:"MI",title:"Michigan"},{value:"MN",title:"Minnesota"},{value:"MO",title:"Missouri"},{value:"MP",title:"Northern Mariana Islands"},{value:"MS",title:"Mississippi"},{value:"MT",title:"Montana"},{value:"NC",title:"North Carolina"},{value:"ND",title:"North Dakota"},{value:"NE",title:"Nebraska"},{value:"NH",title:"New Hampshire"},{value:"NJ",title:"New Jersey"},{value:"NM",title:"New Mexico"},{value:"NV",title:"Nevada"},{value:"NY",title:"New York"},{value:"OH",title:"Ohio"},{value:"OK",title:"Oklahoma"},{value:"OR",title:"Oregon"},{value:"PA",title:"Pennsylvania"},{value:"PR",title:"Puerto Rico"},{value:"RI",title:"Rhode Island"},{value:"SC",title:"South Carolina"},{value:"SD",title:"South Dakota"},{value:"TN",title:"Tennessee"},{value:"TX",title:"Texas"},{value:"UT",title:"Utah"},{value:"VA",title:"Virginia"},{value:"VI",title:"Virgin Islands"},{value:"VT",title:"Vermont"},{value:"WA",title:"Washington"},{value:"WI",title:"Wisconsin"},{value:"WV",title:"West Virginia"},{value:"WY",title:"Wyoming"}],Bme=[{value:1,title:"Adams"},{value:2,title:"Allen"},{value:3,title:"Bartholomew"},{value:4,title:"Benton"},{value:5,title:"Blackford"},{value:6,title:"Boone"},{value:7,title:"Brown"},{value:8,title:"Carroll"},{value:9,title:"Cass"},{value:10,title:"Clark"},{value:11,title:"Clay"},{value:12,title:"Clinton"},{value:13,title:"Crawford"},{value:14,title:"Daviess"},{value:15,title:"Dearborn"},{value:16,title:"Decatur"},{value:17,title:"DeKalb"},{value:18,title:"Delaware"},{value:19,title:"Dubois"},{value:20,title:"Elkhart"},{value:21,title:"Fayette"},{value:22,title:"Floyd"},{value:23,title:"Fountain"},{value:24,title:"Franklin"},{value:25,title:"Fulton"},{value:26,title:"Gibson"},{value:27,title:"Grant"},{value:28,title:"Greene"},{value:29,title:"Hamilton"},{value:30,title:"Hancock"},{value:31,title:"Harrison"},{value:32,title:"Hendricks"},{value:33,title:"Henry"},{value:34,title:"Howard"},{value:35,title:"Huntington"},{value:36,title:"Jackson"},{value:37,title:"Jasper"},{value:38,title:"Jay"},{value:39,title:"Jefferson"},{value:40,title:"Jennings"},{value:41,title:"Johnson"},{value:42,title:"Knox"},{value:43,title:"Kosciusko"},{value:44,title:"LaGrange"},{value:45,title:"Lake"},{value:46,title:"LaPorte"},{value:47,title:"Lawrence"},{value:48,title:"Madison"},{value:49,title:"Marion"},{value:50,title:"Marshall"},{value:51,title:"Martin"},{value:52,title:"Miami"},{value:53,title:"Monroe"},{value:54,title:"Montgomery"},{value:55,title:"Morgan"},{value:56,title:"Newton"},{value:57,title:"Noble"},{value:58,title:"Ohio"},{value:59,title:"Orange"},{value:60,title:"Owen"},{value:61,title:"Parke"},{value:62,title:"Perry"},{value:63,title:"Pike"},{value:64,title:"Porter"},{value:65,title:"Posey"},{value:66,title:"Pulaski"},{value:67,title:"Putnam"},{value:68,title:"Randolph"},{value:69,title:"Ripley"},{value:70,title:"Rush"},{value:71,title:"St. Joseph"},{value:72,title:"Scott"},{value:73,title:"Shelby"},{value:74,title:"Spencer"},{value:75,title:"Starke"},{value:76,title:"Steuben"},{value:77,title:"Sullivan"},{value:78,title:"Switzerland"},{value:79,title:"Tippecanoe"},{value:80,title:"Tipton"},{value:81,title:"Union"},{value:82,title:"Vanderburgh"},{value:83,title:"Vermillion"},{value:84,title:"Vigo"},{value:85,title:"Wabash"},{value:86,title:"Warren"},{value:87,title:"Warrick"},{value:88,title:"Washington"},{value:89,title:"Wayne"},{value:90,title:"Wells"},{value:91,title:"White"},{value:92,title:"Whitley"}],Ume=[{value:1,title:"Allegany"},{value:2,title:"Anne Arundel"},{value:3,title:"Baltimore City"},{value:4,title:"Baltimore County"},{value:5,title:"Calvert"},{value:6,title:"Caroline"},{value:7,title:"Carrol"},{value:8,title:"Cecil"},{value:9,title:"Charles"},{value:10,title:"Dorchester"},{value:11,title:"Frederick"},{value:12,title:"Garrett"},{value:13,title:"Harford"},{value:14,title:"Howard"},{value:15,title:"Kent"},{value:16,title:"Montgomery"},{value:17,title:"Prince George's"},{value:18,title:"Queen Anne's"},{value:19,title:"St. Mary's"},{value:20,title:"Somerset"},{value:21,title:"Talbot"},{value:22,title:"Washington"},{value:23,title:"Wicomico"},{value:24,title:"Worcester"},{value:25,title:"Nonresidents"}],qme={AL:["state_529_plan_contributions","state_unreimbursed_employee_expenses"],AZ:["tax_exempt_interest"],CO:["taxpayer_age"],GA:["fed_tax_free_interest"],KS:["tax_exempt_interest","fed_inc_tax_refund","state_529_plan_contributions","state_ks_tax_credits","state_child_dependent_care_expenses"],IL:["tax_exempt_interest","state_529_plan_contributions","state_dependent_education_expenses"],IN:["state_dependent_education_expenses","state_in_county_code","state_ks_tax_credits","state_sec_179_deduction"],MD:["state_md_county_code","tax_exempt_interest","state_529_plan_contributions","state_child_dependent_care_expenses"],OH:["state_529_plan_contributions","tax_exempt_interest","state_ks_tax_credits"],OR:["tax_exempt_interest","fed_tax_free_interest","fed_passive_activity_losses","state_529_plan_contributions","taxpayer_age","state_ks_tax_credits"],MI:["tax_exempt_interest","state_529_plan_contributions","taxpayer_age","state_ks_tax_credits"],MN:["tax_exempt_interest","state_unreimbursed_employee_expenses"],NC:["tax_exempt_interest","state_529_plan_contributions","state_depreciation_adjustment","state_ks_tax_credits","state_sec_179_deduction"],PA:["state_unreimbursed_employee_expenses","state_529_plan_contributions","fed_estate_trust_income","fed_gambling_income","state_ks_tax_credits"],SC:["tax_exempt_interest","state_529_plan_contributions","taxpayer_age","state_ks_tax_credits","state_sc_college_tuition"],UT:["tax_exempt_interest","state_ks_tax_credits"],VA:["tax_exempt_interest","state_529_plan_contributions","state_child_dependent_care_expenses"]};let tN=Bs().shape({fed_est_tax_pay_march_taxpayer:At().required(),fed_est_tax_pay_march_spouse:At().required(),fed_est_tax_pay_june_taxpayer:At().required(),fed_est_tax_pay_june_spouse:At(),fed_est_tax_pay_september_taxpayer:At().required(),fed_est_tax_pay_september_spouse:At(),fed_est_tax_pay_december_taxpayer:At().required(),fed_est_tax_pay_december_spouse:At(),state_estimated_tax_payments_q1_taxpayer:At().required(),state_estimated_tax_payments_q1_spouse:At(),state_estimated_tax_payments_q2_taxpayer:At().required(),state_estimated_tax_payments_q2_spouse:At(),state_estimated_tax_payments_q3_taxpayer:At().required(),state_estimated_tax_payments_q3_spouse:At(),state_estimated_tax_payments_q4_taxpayer:At().required(),state_estimated_tax_payments_q4_spouse:At(),wages:yp().of(Bs().shape({employer_name:Ps().required(),employer_type:Ps().required(),paystub_date:Ps().matches(/^([01]?\d)\/([0123]?\d)\/\d\d\d\d$/).required(),wages:At().required(),federal_income_tax_withheld:At().required(),state_income_tax_withheld:At().required(),dependent_care_benefits:At().required(),"401k_contributions":At().required(),age:At().required(),covered_by_retirement_plan:Nv().required(),business_owned:Nv().required()})),state_adj_additions_taxpayer:At().required(),state_adj_additions_spouse:At(),state_adj_substractions_taxpayer:At().required(),state_adj_substractions_spouse:At(),state_adj_tax_credit_taxpayer:At().required(),state_adj_tax_credit_spouse:At(),fed_inc_adj_health_insurance_premium_taxpayer:At().required(),fed_inc_adj_health_insurance_premium_spouse:At(),ira_deduction_taxpayer:At().required(),ira_deduction_spouse:At(),per_ira_deduction_taxpayer:At().required(),per_ira_deduction_spouse:At(),per_health_savings_acct_taxpayer:At().required(),per_health_savings_acct_spouse:At(),other_deductions_taxpayer:At().required(),other_deductions_spouse:At(),usr_scorp_business_income_taxpayer:At().required(),usr_scorp_business_income_spouse:At(),usr_schedule_c_income_taxpayer:At().required(),usr_schedule_c_income_spouse:At(),fed_tax_owed_other_taxes_taxpayer:At().required(),fed_tax_owed_other_taxes_spouse:At(),fed_tax_owed_prior_year_amt_carryforward_taxpayer:At().required(),fed_tax_owed_prior_year_amt_carryforward_spouse:At(),fed_tax_owed_tax_credits_taxpayer:At().required(),fed_tax_owed_tax_credits_spouse:At(),social_security_taxpayer:At().required(),social_security_spouse:At().required(),fed_inc_bank_1_interest_taxpayer:At().required(),fed_inc_bank_1_interest_spouse:At(),fed_inc_ordinary_dividends_taxpayer:At().required(),fed_inc_ordinary_dividends_spouse:At(),fed_inc_money_market_1_interest_taxpayer:At().required(),fed_inc_money_market_1_interest_spouse:At(),fed_inc_stock_qualified_div_taxpayer:At().required(),fed_inc_stock_qualified_div_spouse:At(),fed_inc_stock_st_div_gains_taxpayer:At().required(),fed_inc_stock_st_div_gains_spouse:At(),fed_inc_stock_lt_cap_gains_taxpayer:At().required(),fed_inc_stock_lt_cap_gains_spouse:At(),fed_inc_adj_capital_losses_this_year_taxpayer:At().required(),fed_inc_adj_capital_losses_this_year_spouse:At(),fed_inc_stock_60man_cap_gains_taxpayer:At().required(),fed_inc_stock_60man_cap_gains_spouse:At(),fed_inc_other_income_taxpayer:At().required(),fed_inc_other_income_spouse:At(),fed_inc_ca_tax_refund_taxpayer:At(),fed_inc_ca_tax_refund_spouse:At(),fed_ded_mortgage_interest_taxpayer:At().required(),fed_ded_mortgage_interest_spouse:At(),fed_ded_state_income_taxes_taxpayer:At().required(),fed_ded_state_income_taxes_spouse:At(),fed_ded_local_income_taxes_taxpayer:At().required(),fed_ded_local_income_taxes_spouse:At(),fed_ded_prior_state_inc_taxes_taxpayer:At().required(),fed_ded_prior_state_inc_taxes_spouse:At(),fed_ded_property_taxes_taxpayer:At().required(),fed_ded_property_taxes_spouse:At(),fed_ded_personal_property_taxes_taxpayer:At().required(),fed_ded_personal_property_taxes_spouse:At(),fed_ded_home_loan_points_taxpayer:At().required(),fed_ded_home_loan_points_spouse:At(),fed_ded_medical_and_dental_taxpayer:At().required(),fed_ded_medical_and_dental_spouse:At(),fed_ded_cash_donations_taxpayer:At().required(),fed_ded_cash_donations_spouse:At(),fed_ded_noncash_donations_taxpayer:At().required(),fed_ded_noncash_donations_spouse:At(),fed_ded_other_deductions_taxpayer:At().required(),fed_ded_other_deductions_spouse:At(),fed_tax_owed_child_tax_credit_override_taxpayer:At().when("fed_tax_owed_child_tax_credit_override_guard",{is:1,then:At().required()}),fed_tax_owed_child_tax_credit_override_guard_taxpayer:At().oneOf([0,1]),fed_tax_owed_child_tax_credit_override_spouse:At().when("fed_tax_owed_child_tax_credit_override_guard",{is:1,then:At().required()}),fed_tax_owed_child_tax_credit_override_guard_spouse:At().oneOf([0,1]),res_inc_itemized_override_taxpayer:At().when("res_inc_itemized_override_guard",{is:1,then:At().required()}),res_inc_itemized_override_guard_taxpayer:At().oneOf([0,1]),res_inc_itemized_override_spouse:At().when("res_inc_itemized_override_guard",{is:1,then:At().required()}),res_inc_itemized_override_guard_spouse:At().oneOf([0,1]),res_passthrough_deduction_override_taxpayer:At().when("res_passthrough_deduction_override_guard",{is:1,then:At().required()}),res_passthrough_deduction_override_guard_taxpayer:At().oneOf([0,1]),res_passthrough_deduction_override_spouse:At().when("res_passthrough_deduction_override_guard",{is:1,then:At().required()}),res_passthrough_deduction_override_guard_spouse:At().oneOf([0,1]),res_se_tax_override_taxpayer:At().when("res_se_tax_override_guard",{is:1,then:At().required()}),res_se_tax_override_guard_taxpayer:At().oneOf([0,1]),res_se_tax_override_spouse:At().when("res_se_tax_override_guard",{is:1,then:At().required()}),res_se_tax_override_guard_spouse:At().oneOf([0,1]),res_total_tax_override_taxpayer:At().when("res_total_tax_override_guard",{is:1,then:At().required()}),res_total_tax_override_guard_taxpayer:At().oneOf([0,1]),res_total_tax_override_spouse:At().when("res_total_tax_override_guard",{is:1,then:At().required()}),res_total_tax_override_guard_spouse:At().oneOf([0,1]),res_state_tax_before_payments_override_taxpayer:At().when("res_state_tax_before_payments_override_guard",{is:1,then:At().required()}),res_state_tax_before_payments_override_guard_taxpayer:At().oneOf([0,1]),res_state_tax_before_payments_override_spouse:At().when("res_state_tax_before_payments_override_guard",{is:1,then:At().required()}),res_state_tax_before_payments_override_guard_spouse:At().oneOf([0,1]),business_inc_ccorp_fed_tax_override_taxpayer:At().when("business_inc_ccorp_fed_tax_override_guard",{is:1,then:At().required()}),business_inc_ccorp_fed_tax_override_guard_taxpayer:At().oneOf([0,1]),business_inc_ccorp_fed_tax_override_spouse:At().when("business_inc_ccorp_fed_tax_override_guard",{is:1,then:At().required()}),business_inc_ccorp_fed_tax_override_guard_spouse:At().oneOf([0,1]),business_inc_ccorp_state_tax_override_taxpayer:At().when("business_inc_ccorp_state_tax_override_guard",{is:1,then:At().required()}),business_inc_ccorp_state_tax_override_guard_taxpayer:At().oneOf([0,1]),business_inc_ccorp_state_tax_override_spouse:At().when("business_inc_ccorp_state_tax_override_guard",{is:1,then:At().required()}),business_inc_ccorp_state_tax_override_guard_spouse:At().oneOf([0,1]),type:Ps().oneOf(eN.map(e=>e.value)).required(),state_of_residency:Ps().oneOf(a2.map(e=>e.value)).required(),fed_par_no_of_dependents_from_0_to_6:At().required(),fed_par_no_of_dependents_from_6_to_17:At().required(),fed_par_no_of_dependents_over_17:At().required(),rental_real_estate:yp().of(Bs().shape({name:Ps().required(),income:At().required(),advertising:At().required(),auto_expenses:At().required(),cleaning:At().required(),commissions:At().required(),depreciation:At().required(),insurance:At().required(),legal_expenses:At().required(),management_fees:At().required(),mortage_interest:At().required(),repairs:At().required(),supplies:At().required(),taxes:At().required(),utilities:At().required(),other:At().required()})),fed_estate_trust_income_taxpayer:At().when("state_of_residency",{is:e=>["PA"].includes(e),then:At().required()}),fed_estate_trust_income_spouse:At(),fed_gambling_income_taxpayer:At().when("state_of_residency",{is:e=>["PA"].includes(e),then:At().required()}),fed_gambling_income_spouse:At(),fed_tax_free_interest_taxpayer:At().when("state_of_residency",{is:e=>["GA","OR"].includes(e),then:At().required()}),fed_tax_free_interest_spouse:At(),fed_passive_activity_losses_taxpayer:At().when("state_of_residency",{is:e=>["OR"].includes(e),then:At().required()}),fed_passive_activity_losses_spouse:At(),fed_inc_tax_refund_taxpayer:At().when("state_of_residency",{is:e=>["KS"].includes(e),then:At().required()}),fed_inc_tax_refund_spouse:At(),state_ks_tax_credits_taxpayer:At().when("state_of_residency",{is:e=>["KS","MI","IN","NC","OR","PA","UT"].includes(e),then:At().required()}),state_ks_tax_credits_spouse:At(),state_529_plan_contributions_taxpayer:At().when("state_of_residency",{is:e=>["AL","KS","IL","MI","NC","OR","PA","VA"].includes(e),then:At().required()}),state_529_plan_contributions_spouse:At(),state_child_dependent_care_expenses_taxpayer:At().when("state_of_residency",{is:e=>["VA"].includes(e),then:At().required()}),state_child_dependent_care_expenses_spouse:At(),state_dependent_education_expenses_taxpayer:At().when("state_of_residency",{is:e=>["IL","IN"].includes(e),then:At().required()}),state_dependent_education_expenses_spouse:At(),state_unreimbursed_employee_expenses_taxpayer:At().when("state_of_residency",{is:e=>["AL","MN","PA"].includes(e),then:At().required()}),state_unreimbursed_employee_expenses_spouse:At(),state_in_county_code:At().when("state_of_residency",{is:e=>["IN"].includes(e),then:At().required()}),state_md_county_code:At().when("state_of_residency",{is:e=>["MD"].includes(e),then:At().required()}),state_sec_179_deduction_taxpayer:At().when("state_of_residency",{is:e=>["IN","NC"].includes(e),then:At().required()}),state_sec_179_deduction_spouse:At(),tax_exempt_interest_taxpayer:At().when("state_of_residency",{is:e=>["AZ","KS","IL","MI","MN","NC","OR","UT","VA"].includes(e),then:At().required()}),state_depreciation_adjustment_taxpayer:At().when("state_of_residency",{is:e=>["NC"].includes(e),then:At().required()}),tax_exempt_interest_spouse:At(),taxpayer_age:At().when("state_of_residency",{is:e=>["CO","MI","OR"].includes(e),then:At().required()}),state_sc_college_tuition_taxpayer:At().when("state_of_residency",{is:e=>["SC"].includes(e),then:At().required()}),state_sc_college_tuition_spouse:At().when("state_of_residency",{is:e=>["SC"].includes(e),then:At().required()})},[["fed_par_no_of_dependents_from_0_to_6_taxpayer","fed_par_no_of_dependents_from_0_to_6_spouse"],["fed_est_tax_pay_march_taxpayer","fed_est_tax_pay_march_spouse"]]),nN=gme(e=>Bs(Gn.mapValues(e,()=>Bs({revenue:At().required(),expense:At().required()}))));function Wme(e){function t(n){let i=[];return Gn.forOwn(n,(r,a)=>{Array.isArray(r)?Gn.each(r,(s,o)=>{i=[...i,...Gn.map(t(s),l=>`.${a}[${o}]${l}`)]}):i=[...i,`.${a}`]}),i}return Gn.map(t(e),n=>n.substring(1))}const hi=ao({}),Hu=ao({}),__=vo(hi,e=>{try{return tN.validateSync(e,{abortEarly:!1}),new Set}catch(t){return new Set(t.inner.map(n=>n.path))}}),sm=vo([hi,Hu],([e,t])=>{try{return tN.validateSync(e,{abortEarly:!0}),Object.keys(t).length>0&&nN.validateSync(t,{abortEarly:!0}),jme(e)}catch{return null}}),Vme=vo(hi,Wme),jp=ao(new Set([]));function Td(e){jp.update(t=>new Set([...t,e]))}const iN=vo(Hu,e=>{try{return nN.validateSync(e,{abortEarly:!1}),new Set}catch(t){return new Set(t.inner.map(n=>n.path))}});var dl="top",uu="bottom",du="right",fl="left",s2="auto",Om=[dl,uu,du,fl],wp="start",om="end",zme="clippingParents",rN="viewport",Mh="popper",Yme="reference",L3=Om.reduce(function(e,t){return e.concat([t+"-"+wp,t+"-"+om])},[]),aN=[].concat(Om,[s2]).reduce(function(e,t){return e.concat([t,t+"-"+wp,t+"-"+om])},[]),Gme="beforeRead",Kme="read",Xme="afterRead",Qme="beforeMain",Jme="main",Zme="afterMain",ege="beforeWrite",tge="write",nge="afterWrite",ige=[Gme,Kme,Xme,Qme,Jme,Zme,ege,tge,nge];function Ed(e){return e?(e.nodeName||"").toLowerCase():null}function xl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function r_(e){var t=xl(e).Element;return e instanceof t||e instanceof Element}function lu(e){var t=xl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o2(e){if(typeof ShadowRoot>"u")return!1;var t=xl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rge(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},r=t.attributes[n]||{},a=t.elements[n];!lu(a)||!Ed(a)||(Object.assign(a.style,i),Object.keys(r).forEach(function(s){var o=r[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function age(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),o=s.reduce(function(l,d){return l[d]="",l},{});!lu(r)||!Ed(r)||(Object.assign(r.style,o),Object.keys(a).forEach(function(l){r.removeAttribute(l)}))})}}const sN={name:"applyStyles",enabled:!0,phase:"write",fn:rge,effect:age,requires:["computeStyles"]};function kd(e){return e.split("-")[0]}var e_=Math.max,Lv=Math.min,Tp=Math.round;function by(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function oN(){return!/^((?!chrome|android).)*safari/i.test(by())}function kp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),r=1,a=1;t&&lu(e)&&(r=e.offsetWidth>0&&Tp(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Tp(i.height)/e.offsetHeight||1);var s=r_(e)?xl(e):window,o=s.visualViewport,l=!oN()&&n,d=(i.left+(l&&o?o.offsetLeft:0))/r,c=(i.top+(l&&o?o.offsetTop:0))/a,v=i.width/r,T=i.height/a;return{width:v,height:T,top:c,right:d+v,bottom:c+T,left:d,x:d,y:c}}function l2(e){var t=kp(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function lN(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o2(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function cf(e){return xl(e).getComputedStyle(e)}function sge(e){return["table","td","th"].indexOf(Ed(e))>=0}function dc(e){return((r_(e)?e.ownerDocument:e.document)||window.document).documentElement}function M0(e){return Ed(e)==="html"?e:e.assignedSlot||e.parentNode||(o2(e)?e.host:null)||dc(e)}function H3(e){return!lu(e)||cf(e).position==="fixed"?null:e.offsetParent}function oge(e){var t=/firefox/i.test(by()),n=/Trident/i.test(by());if(n&&lu(e)){var i=cf(e);if(i.position==="fixed")return null}var r=M0(e);for(o2(r)&&(r=r.host);lu(r)&&["html","body"].indexOf(Ed(r))<0;){var a=cf(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function Mm(e){for(var t=xl(e),n=H3(e);n&&sge(n)&&cf(n).position==="static";)n=H3(n);return n&&(Ed(n)==="html"||Ed(n)==="body"&&cf(n).position==="static")?t:n||oge(e)||t}function u2(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Gh(e,t,n){return e_(e,Lv(t,n))}function lge(e,t,n){var i=Gh(e,t,n);return i>n?n:i}function uN(){return{top:0,right:0,bottom:0,left:0}}function dN(e){return Object.assign({},uN(),e)}function fN(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var uge=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,dN(typeof t!="number"?t:fN(t,Om))};function dge(e){var t,n=e.state,i=e.name,r=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,o=kd(n.placement),l=u2(o),d=[fl,du].indexOf(o)>=0,c=d?"height":"width";if(!(!a||!s)){var v=uge(r.padding,n),T=l2(a),b=l==="y"?dl:fl,A=l==="y"?uu:du,E=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],y=s[l]-n.rects.reference[l],I=Mm(a),D=I?l==="y"?I.clientHeight||0:I.clientWidth||0:0,O=E/2-y/2,M=v[b],F=D-T[c]-v[A],$=D/2-T[c]/2+O,L=Gh(M,$,F),j=l;n.modifiersData[i]=(t={},t[j]=L,t.centerOffset=L-$,t)}}function fge(e){var t=e.state,n=e.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||lN(t.elements.popper,r)&&(t.elements.arrow=r))}const cge={name:"arrow",enabled:!0,phase:"main",fn:dge,effect:fge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sp(e){return e.split("-")[1]}var _ge={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pge(e,t){var n=e.x,i=e.y,r=t.devicePixelRatio||1;return{x:Tp(n*r)/r||0,y:Tp(i*r)/r||0}}function j3(e){var t,n=e.popper,i=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,v=e.isFixed,T=s.x,b=T===void 0?0:T,A=s.y,E=A===void 0?0:A,y=typeof c=="function"?c({x:b,y:E}):{x:b,y:E};b=y.x,E=y.y;var I=s.hasOwnProperty("x"),D=s.hasOwnProperty("y"),O=fl,M=dl,F=window;if(d){var $=Mm(n),L="clientHeight",j="clientWidth";if($===xl(n)&&($=dc(n),cf($).position!=="static"&&o==="absolute"&&(L="scrollHeight",j="scrollWidth")),$=$,r===dl||(r===fl||r===du)&&a===om){M=uu;var H=v&&$===F&&F.visualViewport?F.visualViewport.height:$[L];E-=H-i.height,E*=l?1:-1}if(r===fl||(r===dl||r===uu)&&a===om){O=du;var V=v&&$===F&&F.visualViewport?F.visualViewport.width:$[j];b-=V-i.width,b*=l?1:-1}}var Q=Object.assign({position:o},d&&_ge),X=c===!0?pge({x:b,y:E},xl(n)):{x:b,y:E};if(b=X.x,E=X.y,l){var te;return Object.assign({},Q,(te={},te[M]=D?"0":"",te[O]=I?"0":"",te.transform=(F.devicePixelRatio||1)<=1?"translate("+b+"px, "+E+"px)":"translate3d("+b+"px, "+E+"px, 0)",te))}return Object.assign({},Q,(t={},t[M]=D?E+"px":"",t[O]=I?b+"px":"",t.transform="",t))}function hge(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=i===void 0?!0:i,a=n.adaptive,s=a===void 0?!0:a,o=n.roundOffsets,l=o===void 0?!0:o,d={placement:kd(t.placement),variation:Sp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,j3(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,j3(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const mge={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hge,data:{}};var Xg={passive:!0};function gge(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,a=r===void 0?!0:r,s=i.resize,o=s===void 0?!0:s,l=xl(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(c){c.addEventListener("scroll",n.update,Xg)}),o&&l.addEventListener("resize",n.update,Xg),function(){a&&d.forEach(function(c){c.removeEventListener("scroll",n.update,Xg)}),o&&l.removeEventListener("resize",n.update,Xg)}}const vge={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:gge,data:{}};var bge={left:"right",right:"left",bottom:"top",top:"bottom"};function dv(e){return e.replace(/left|right|bottom|top/g,function(t){return bge[t]})}var yge={start:"end",end:"start"};function B3(e){return e.replace(/start|end/g,function(t){return yge[t]})}function d2(e){var t=xl(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function f2(e){return kp(dc(e)).left+d2(e).scrollLeft}function wge(e,t){var n=xl(e),i=dc(e),r=n.visualViewport,a=i.clientWidth,s=i.clientHeight,o=0,l=0;if(r){a=r.width,s=r.height;var d=oN();(d||!d&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}return{width:a,height:s,x:o+f2(e),y:l}}function Tge(e){var t,n=dc(e),i=d2(e),r=(t=e.ownerDocument)==null?void 0:t.body,a=e_(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=e_(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-i.scrollLeft+f2(e),l=-i.scrollTop;return cf(r||n).direction==="rtl"&&(o+=e_(n.clientWidth,r?r.clientWidth:0)-a),{width:a,height:s,x:o,y:l}}function c2(e){var t=cf(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function cN(e){return["html","body","#document"].indexOf(Ed(e))>=0?e.ownerDocument.body:lu(e)&&c2(e)?e:cN(M0(e))}function Kh(e,t){var n;t===void 0&&(t=[]);var i=cN(e),r=i===((n=e.ownerDocument)==null?void 0:n.body),a=xl(i),s=r?[a].concat(a.visualViewport||[],c2(i)?i:[]):i,o=t.concat(s);return r?o:o.concat(Kh(M0(s)))}function yy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kge(e,t){var n=kp(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function U3(e,t,n){return t===rN?yy(wge(e,n)):r_(t)?kge(t,n):yy(Tge(dc(e)))}function Sge(e){var t=Kh(M0(e)),n=["absolute","fixed"].indexOf(cf(e).position)>=0,i=n&&lu(e)?Mm(e):e;return r_(i)?t.filter(function(r){return r_(r)&&lN(r,i)&&Ed(r)!=="body"}):[]}function Cge(e,t,n,i){var r=t==="clippingParents"?Sge(e):[].concat(t),a=[].concat(r,[n]),s=a[0],o=a.reduce(function(l,d){var c=U3(e,d,i);return l.top=e_(c.top,l.top),l.right=Lv(c.right,l.right),l.bottom=Lv(c.bottom,l.bottom),l.left=e_(c.left,l.left),l},U3(e,s,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function _N(e){var t=e.reference,n=e.element,i=e.placement,r=i?kd(i):null,a=i?Sp(i):null,s=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2,l;switch(r){case dl:l={x:s,y:t.y-n.height};break;case uu:l={x:s,y:t.y+t.height};break;case du:l={x:t.x+t.width,y:o};break;case fl:l={x:t.x-n.width,y:o};break;default:l={x:t.x,y:t.y}}var d=r?u2(r):null;if(d!=null){var c=d==="y"?"height":"width";switch(a){case wp:l[d]=l[d]-(t[c]/2-n[c]/2);break;case om:l[d]=l[d]+(t[c]/2-n[c]/2);break}}return l}function lm(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=i===void 0?e.placement:i,a=n.strategy,s=a===void 0?e.strategy:a,o=n.boundary,l=o===void 0?zme:o,d=n.rootBoundary,c=d===void 0?rN:d,v=n.elementContext,T=v===void 0?Mh:v,b=n.altBoundary,A=b===void 0?!1:b,E=n.padding,y=E===void 0?0:E,I=dN(typeof y!="number"?y:fN(y,Om)),D=T===Mh?Yme:Mh,O=e.rects.popper,M=e.elements[A?D:T],F=Cge(r_(M)?M:M.contextElement||dc(e.elements.popper),l,c,s),$=kp(e.elements.reference),L=_N({reference:$,element:O,strategy:"absolute",placement:r}),j=yy(Object.assign({},O,L)),H=T===Mh?j:$,V={top:F.top-H.top+I.top,bottom:H.bottom-F.bottom+I.bottom,left:F.left-H.left+I.left,right:H.right-F.right+I.right},Q=e.modifiersData.offset;if(T===Mh&&Q){var X=Q[r];Object.keys(V).forEach(function(te){var ne=[du,uu].indexOf(te)>=0?1:-1,be=[dl,uu].indexOf(te)>=0?"y":"x";V[te]+=X[be]*ne})}return V}function Pge(e,t){t===void 0&&(t={});var n=t,i=n.placement,r=n.boundary,a=n.rootBoundary,s=n.padding,o=n.flipVariations,l=n.allowedAutoPlacements,d=l===void 0?aN:l,c=Sp(i),v=c?o?L3:L3.filter(function(A){return Sp(A)===c}):Om,T=v.filter(function(A){return d.indexOf(A)>=0});T.length===0&&(T=v);var b=T.reduce(function(A,E){return A[E]=lm(e,{placement:E,boundary:r,rootBoundary:a,padding:s})[kd(E)],A},{});return Object.keys(b).sort(function(A,E){return b[A]-b[E]})}function Ege(e){if(kd(e)===s2)return[];var t=dv(e);return[B3(e),t,B3(t)]}function Ige(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,a=r===void 0?!0:r,s=n.altAxis,o=s===void 0?!0:s,l=n.fallbackPlacements,d=n.padding,c=n.boundary,v=n.rootBoundary,T=n.altBoundary,b=n.flipVariations,A=b===void 0?!0:b,E=n.allowedAutoPlacements,y=t.options.placement,I=kd(y),D=I===y,O=l||(D||!A?[dv(y)]:Ege(y)),M=[y].concat(O).reduce(function(qe,ee){return qe.concat(kd(ee)===s2?Pge(t,{placement:ee,boundary:c,rootBoundary:v,padding:d,flipVariations:A,allowedAutoPlacements:E}):ee)},[]),F=t.rects.reference,$=t.rects.popper,L=new Map,j=!0,H=M[0],V=0;V<M.length;V++){var Q=M[V],X=kd(Q),te=Sp(Q)===wp,ne=[dl,uu].indexOf(X)>=0,be=ne?"width":"height",ue=lm(t,{placement:Q,boundary:c,rootBoundary:v,altBoundary:T,padding:d}),Ce=ne?te?du:fl:te?uu:dl;F[be]>$[be]&&(Ce=dv(Ce));var ie=dv(Ce),Y=[];if(a&&Y.push(ue[X]<=0),o&&Y.push(ue[Ce]<=0,ue[ie]<=0),Y.every(function(qe){return qe})){H=Q,j=!1;break}L.set(Q,Y)}if(j)for(var he=A?3:1,Me=function(ee){var G=M.find(function(me){var Te=L.get(me);if(Te)return Te.slice(0,ee).every(function(De){return De})});if(G)return H=G,"break"},Pe=he;Pe>0;Pe--){var We=Me(Pe);if(We==="break")break}t.placement!==H&&(t.modifiersData[i]._skip=!0,t.placement=H,t.reset=!0)}}const Age={name:"flip",enabled:!0,phase:"main",fn:Ige,requiresIfExists:["offset"],data:{_skip:!1}};function q3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function W3(e){return[dl,du,uu,fl].some(function(t){return e[t]>=0})}function Dge(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,s=lm(t,{elementContext:"reference"}),o=lm(t,{altBoundary:!0}),l=q3(s,i),d=q3(o,r,a),c=W3(l),v=W3(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":v})}const Oge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dge};function Mge(e,t,n){var i=kd(e),r=[fl,dl].indexOf(i)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],o=a[1];return s=s||0,o=(o||0)*r,[fl,du].indexOf(i)>=0?{x:o,y:s}:{x:s,y:o}}function xge(e){var t=e.state,n=e.options,i=e.name,r=n.offset,a=r===void 0?[0,0]:r,s=aN.reduce(function(c,v){return c[v]=Mge(v,t.rects,a),c},{}),o=s[t.placement],l=o.x,d=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=s}const Rge={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xge};function $ge(e){var t=e.state,n=e.name;t.modifiersData[n]=_N({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Nge={name:"popperOffsets",enabled:!0,phase:"read",fn:$ge,data:{}};function Fge(e){return e==="x"?"y":"x"}function Lge(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,a=r===void 0?!0:r,s=n.altAxis,o=s===void 0?!1:s,l=n.boundary,d=n.rootBoundary,c=n.altBoundary,v=n.padding,T=n.tether,b=T===void 0?!0:T,A=n.tetherOffset,E=A===void 0?0:A,y=lm(t,{boundary:l,rootBoundary:d,padding:v,altBoundary:c}),I=kd(t.placement),D=Sp(t.placement),O=!D,M=u2(I),F=Fge(M),$=t.modifiersData.popperOffsets,L=t.rects.reference,j=t.rects.popper,H=typeof E=="function"?E(Object.assign({},t.rects,{placement:t.placement})):E,V=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,X={x:0,y:0};if($){if(a){var te,ne=M==="y"?dl:fl,be=M==="y"?uu:du,ue=M==="y"?"height":"width",Ce=$[M],ie=Ce+y[ne],Y=Ce-y[be],he=b?-j[ue]/2:0,Me=D===wp?L[ue]:j[ue],Pe=D===wp?-j[ue]:-L[ue],We=t.elements.arrow,qe=b&&We?l2(We):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uN(),G=ee[ne],me=ee[be],Te=Gh(0,L[ue],qe[ue]),De=O?L[ue]/2-he-Te-G-V.mainAxis:Me-Te-G-V.mainAxis,we=O?-L[ue]/2+he+Te+me+V.mainAxis:Pe+Te+me+V.mainAxis,Ve=t.elements.arrow&&Mm(t.elements.arrow),Ke=Ve?M==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,yt=(te=Q==null?void 0:Q[M])!=null?te:0,ht=Ce+De-yt-Ke,Je=Ce+we-yt,pt=Gh(b?Lv(ie,ht):ie,Ce,b?e_(Y,Je):Y);$[M]=pt,X[M]=pt-Ce}if(o){var Tt,it=M==="x"?dl:fl,Ge=M==="x"?uu:du,st=$[F],It=F==="y"?"height":"width",Ct=st+y[it],bt=st-y[Ge],Rt=[dl,fl].indexOf(I)!==-1,cn=(Tt=Q==null?void 0:Q[F])!=null?Tt:0,nn=Rt?Ct:st-L[It]-j[It]-cn+V.altAxis,Qe=Rt?st+L[It]+j[It]-cn-V.altAxis:bt,Ft=b&&Rt?lge(nn,st,Qe):Gh(b?nn:Ct,st,b?Qe:bt);$[F]=Ft,X[F]=Ft-st}t.modifiersData[i]=X}}const Hge={name:"preventOverflow",enabled:!0,phase:"main",fn:Lge,requiresIfExists:["offset"]};function jge(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bge(e){return e===xl(e)||!lu(e)?d2(e):jge(e)}function Uge(e){var t=e.getBoundingClientRect(),n=Tp(t.width)/e.offsetWidth||1,i=Tp(t.height)/e.offsetHeight||1;return n!==1||i!==1}function qge(e,t,n){n===void 0&&(n=!1);var i=lu(t),r=lu(t)&&Uge(t),a=dc(t),s=kp(e,r,n),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ed(t)!=="body"||c2(a))&&(o=Bge(t)),lu(t)?(l=kp(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=f2(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function Wge(e){var t=new Map,n=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function r(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!n.has(o)){var l=t.get(o);l&&r(l)}}),i.push(a)}return e.forEach(function(a){n.has(a.name)||r(a)}),i}function Vge(e){var t=Wge(e);return ige.reduce(function(n,i){return n.concat(t.filter(function(r){return r.phase===i}))},[])}function zge(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Yge(e){var t=e.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var V3={placement:"bottom",modifiers:[],strategy:"absolute"};function z3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Gge(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,r=t.defaultOptions,a=r===void 0?V3:r;return function(o,l,d){d===void 0&&(d=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},V3,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},v=[],T=!1,b={state:c,setOptions:function(I){var D=typeof I=="function"?I(c.options):I;E(),c.options=Object.assign({},a,c.options,D),c.scrollParents={reference:r_(o)?Kh(o):o.contextElement?Kh(o.contextElement):[],popper:Kh(l)};var O=Vge(Yge([].concat(i,c.options.modifiers)));return c.orderedModifiers=O.filter(function(M){return M.enabled}),A(),b.update()},forceUpdate:function(){if(!T){var I=c.elements,D=I.reference,O=I.popper;if(z3(D,O)){c.rects={reference:qge(D,Mm(O),c.options.strategy==="fixed"),popper:l2(O)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(V){return c.modifiersData[V.name]=Object.assign({},V.data)});for(var M=0;M<c.orderedModifiers.length;M++){if(c.reset===!0){c.reset=!1,M=-1;continue}var F=c.orderedModifiers[M],$=F.fn,L=F.options,j=L===void 0?{}:L,H=F.name;typeof $=="function"&&(c=$({state:c,options:j,name:H,instance:b})||c)}}}},update:zge(function(){return new Promise(function(y){b.forceUpdate(),y(c)})}),destroy:function(){E(),T=!0}};if(!z3(o,l))return b;b.setOptions(d).then(function(y){!T&&d.onFirstUpdate&&d.onFirstUpdate(y)});function A(){c.orderedModifiers.forEach(function(y){var I=y.name,D=y.options,O=D===void 0?{}:D,M=y.effect;if(typeof M=="function"){var F=M({state:c,name:I,instance:b,options:O}),$=function(){};v.push(F||$)}})}function E(){v.forEach(function(y){return y()}),v=[]}return b}}var Kge=[vge,Nge,mge,sN,Rge,Age,Hge,cge,Oge],Xge=Gge({defaultModifiers:Kge}),Qge="tippy-box",pN="tippy-content",Jge="tippy-backdrop",hN="tippy-arrow",mN="tippy-svg-arrow",Yc={passive:!0,capture:!0},gN=function(){return document.body};function wb(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function _2(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function vN(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Y3(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function Zge(e){return e.split(/\s+/).filter(Boolean)}function rp(e){return[].concat(e)}function G3(e,t){e.indexOf(t)===-1&&e.push(t)}function eve(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function tve(e){return e.split("-")[0]}function Hv(e){return[].slice.call(e)}function K3(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Xh(){return document.createElement("div")}function x0(e){return["Element","Fragment"].some(function(t){return _2(e,t)})}function nve(e){return _2(e,"NodeList")}function ive(e){return _2(e,"MouseEvent")}function rve(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function ave(e){return x0(e)?[e]:nve(e)?Hv(e):Array.isArray(e)?e:Hv(document.querySelectorAll(e))}function Tb(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function X3(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function sve(e){var t,n=rp(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function ove(e,t){var n=t.clientX,i=t.clientY;return e.every(function(r){var a=r.popperRect,s=r.popperState,o=r.props,l=o.interactiveBorder,d=tve(s.placement),c=s.modifiersData.offset;if(!c)return!0;var v=d==="bottom"?c.top.y:0,T=d==="top"?c.bottom.y:0,b=d==="right"?c.left.x:0,A=d==="left"?c.right.x:0,E=a.top-i+v>l,y=i-a.bottom-T>l,I=a.left-n+b>l,D=n-a.right-A>l;return E||y||I||D})}function kb(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[i](r,n)})}function Q3(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var bd={isTouch:!1},J3=0;function lve(){bd.isTouch||(bd.isTouch=!0,window.performance&&document.addEventListener("mousemove",bN))}function bN(){var e=performance.now();e-J3<20&&(bd.isTouch=!1,document.removeEventListener("mousemove",bN)),J3=e}function uve(){var e=document.activeElement;if(rve(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function dve(){document.addEventListener("touchstart",lve,Yc),window.addEventListener("blur",uve)}var fve=typeof window<"u"&&typeof document<"u",cve=fve?!!window.msCrypto:!1,_ve={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},pve={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Fu=Object.assign({appendTo:gN,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},_ve,pve),hve=Object.keys(Fu),mve=function(t){var n=Object.keys(t);n.forEach(function(i){Fu[i]=t[i]})};function yN(e){var t=e.plugins||[],n=t.reduce(function(i,r){var a=r.name,s=r.defaultValue;if(a){var o;i[a]=e[a]!==void 0?e[a]:(o=Fu[a])!=null?o:s}return i},{});return Object.assign({},e,n)}function gve(e,t){var n=t?Object.keys(yN(Object.assign({},Fu,{plugins:t}))):hve,i=n.reduce(function(r,a){var s=(e.getAttribute("data-tippy-"+a)||"").trim();if(!s)return r;if(a==="content")r[a]=s;else try{r[a]=JSON.parse(s)}catch{r[a]=s}return r},{});return i}function Z3(e,t){var n=Object.assign({},t,{content:vN(t.content,[e])},t.ignoreAttributes?{}:gve(e,t.plugins));return n.aria=Object.assign({},Fu.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var vve=function(){return"innerHTML"};function wy(e,t){e[vve()]=t}function eI(e){var t=Xh();return e===!0?t.className=hN:(t.className=mN,x0(e)?t.appendChild(e):wy(t,e)),t}function tI(e,t){x0(t.content)?(wy(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?wy(e,t.content):e.textContent=t.content)}function Ty(e){var t=e.firstElementChild,n=Hv(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(pN)}),arrow:n.find(function(i){return i.classList.contains(hN)||i.classList.contains(mN)}),backdrop:n.find(function(i){return i.classList.contains(Jge)})}}function wN(e){var t=Xh(),n=Xh();n.className=Qge,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Xh();i.className=pN,i.setAttribute("data-state","hidden"),tI(i,e.props),t.appendChild(n),n.appendChild(i),r(e.props,e.props);function r(a,s){var o=Ty(t),l=o.box,d=o.content,c=o.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&tI(d,e.props),s.arrow?c?a.arrow!==s.arrow&&(l.removeChild(c),l.appendChild(eI(s.arrow))):l.appendChild(eI(s.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:r}}wN.$$tippy=!0;var bve=1,Qg=[],Sb=[];function yve(e,t){var n=Z3(e,Object.assign({},Fu,yN(K3(t)))),i,r,a,s=!1,o=!1,l=!1,d=!1,c,v,T,b=[],A=Y3(ht,n.interactiveDebounce),E,y=bve++,I=null,D=eve(n.plugins),O={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},M={id:y,reference:e,popper:Xh(),popperInstance:I,props:n,state:O,plugins:D,clearDelayTimeouts:nn,setProps:Qe,setContent:Ft,show:Fn,hide:He,hideWithInteractivity:Dt,enable:Rt,disable:cn,unmount:Xt,destroy:Mt};if(!n.render)return M;var F=n.render(M),$=F.popper,L=F.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+M.id,M.popper=$,e._tippy=M,$._tippy=M;var j=D.map(function(Xe){return Xe.fn(M)}),H=e.hasAttribute("aria-expanded");return Ve(),he(),Ce(),ie("onCreate",[M]),n.showOnCreate&&Ct(),$.addEventListener("mouseenter",function(){M.props.interactive&&M.state.isVisible&&M.clearDelayTimeouts()}),$.addEventListener("mouseleave",function(){M.props.interactive&&M.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",A)}),M;function V(){var Xe=M.props.touch;return Array.isArray(Xe)?Xe:[Xe,0]}function Q(){return V()[0]==="hold"}function X(){var Xe;return!!((Xe=M.props.render)!=null&&Xe.$$tippy)}function te(){return E||e}function ne(){var Xe=te().parentNode;return Xe?sve(Xe):document}function be(){return Ty($)}function ue(Xe){return M.state.isMounted&&!M.state.isVisible||bd.isTouch||c&&c.type==="focus"?0:wb(M.props.delay,Xe?0:1,Fu.delay)}function Ce(Xe){Xe===void 0&&(Xe=!1),$.style.pointerEvents=M.props.interactive&&!Xe?"":"none",$.style.zIndex=""+M.props.zIndex}function ie(Xe,Nt,on){if(on===void 0&&(on=!0),j.forEach(function(dt){dt[Xe]&&dt[Xe].apply(dt,Nt)}),on){var In;(In=M.props)[Xe].apply(In,Nt)}}function Y(){var Xe=M.props.aria;if(Xe.content){var Nt="aria-"+Xe.content,on=$.id,In=rp(M.props.triggerTarget||e);In.forEach(function(dt){var Zt=dt.getAttribute(Nt);if(M.state.isVisible)dt.setAttribute(Nt,Zt?Zt+" "+on:on);else{var Ln=Zt&&Zt.replace(on,"").trim();Ln?dt.setAttribute(Nt,Ln):dt.removeAttribute(Nt)}})}}function he(){if(!(H||!M.props.aria.expanded)){var Xe=rp(M.props.triggerTarget||e);Xe.forEach(function(Nt){M.props.interactive?Nt.setAttribute("aria-expanded",M.state.isVisible&&Nt===te()?"true":"false"):Nt.removeAttribute("aria-expanded")})}}function Me(){ne().removeEventListener("mousemove",A),Qg=Qg.filter(function(Xe){return Xe!==A})}function Pe(Xe){if(!(bd.isTouch&&(l||Xe.type==="mousedown"))){var Nt=Xe.composedPath&&Xe.composedPath()[0]||Xe.target;if(!(M.props.interactive&&Q3($,Nt))){if(rp(M.props.triggerTarget||e).some(function(on){return Q3(on,Nt)})){if(bd.isTouch||M.state.isVisible&&M.props.trigger.indexOf("click")>=0)return}else ie("onClickOutside",[M,Xe]);M.props.hideOnClick===!0&&(M.clearDelayTimeouts(),M.hide(),o=!0,setTimeout(function(){o=!1}),M.state.isMounted||G())}}}function We(){l=!0}function qe(){l=!1}function ee(){var Xe=ne();Xe.addEventListener("mousedown",Pe,!0),Xe.addEventListener("touchend",Pe,Yc),Xe.addEventListener("touchstart",qe,Yc),Xe.addEventListener("touchmove",We,Yc)}function G(){var Xe=ne();Xe.removeEventListener("mousedown",Pe,!0),Xe.removeEventListener("touchend",Pe,Yc),Xe.removeEventListener("touchstart",qe,Yc),Xe.removeEventListener("touchmove",We,Yc)}function me(Xe,Nt){De(Xe,function(){!M.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&Nt()})}function Te(Xe,Nt){De(Xe,Nt)}function De(Xe,Nt){var on=be().box;function In(dt){dt.target===on&&(kb(on,"remove",In),Nt())}if(Xe===0)return Nt();kb(on,"remove",v),kb(on,"add",In),v=In}function we(Xe,Nt,on){on===void 0&&(on=!1);var In=rp(M.props.triggerTarget||e);In.forEach(function(dt){dt.addEventListener(Xe,Nt,on),b.push({node:dt,eventType:Xe,handler:Nt,options:on})})}function Ve(){Q()&&(we("touchstart",yt,{passive:!0}),we("touchend",Je,{passive:!0})),Zge(M.props.trigger).forEach(function(Xe){if(Xe!=="manual")switch(we(Xe,yt),Xe){case"mouseenter":we("mouseleave",Je);break;case"focus":we(cve?"focusout":"blur",pt);break;case"focusin":we("focusout",pt);break}})}function Ke(){b.forEach(function(Xe){var Nt=Xe.node,on=Xe.eventType,In=Xe.handler,dt=Xe.options;Nt.removeEventListener(on,In,dt)}),b=[]}function yt(Xe){var Nt,on=!1;if(!(!M.state.isEnabled||Tt(Xe)||o)){var In=((Nt=c)==null?void 0:Nt.type)==="focus";c=Xe,E=Xe.currentTarget,he(),!M.state.isVisible&&ive(Xe)&&Qg.forEach(function(dt){return dt(Xe)}),Xe.type==="click"&&(M.props.trigger.indexOf("mouseenter")<0||s)&&M.props.hideOnClick!==!1&&M.state.isVisible?on=!0:Ct(Xe),Xe.type==="click"&&(s=!on),on&&!In&&bt(Xe)}}function ht(Xe){var Nt=Xe.target,on=te().contains(Nt)||$.contains(Nt);if(!(Xe.type==="mousemove"&&on)){var In=It().concat($).map(function(dt){var Zt,Ln=dt._tippy,xn=(Zt=Ln.popperInstance)==null?void 0:Zt.state;return xn?{popperRect:dt.getBoundingClientRect(),popperState:xn,props:n}:null}).filter(Boolean);ove(In,Xe)&&(Me(),bt(Xe))}}function Je(Xe){var Nt=Tt(Xe)||M.props.trigger.indexOf("click")>=0&&s;if(!Nt){if(M.props.interactive){M.hideWithInteractivity(Xe);return}bt(Xe)}}function pt(Xe){M.props.trigger.indexOf("focusin")<0&&Xe.target!==te()||M.props.interactive&&Xe.relatedTarget&&$.contains(Xe.relatedTarget)||bt(Xe)}function Tt(Xe){return bd.isTouch?Q()!==Xe.type.indexOf("touch")>=0:!1}function it(){Ge();var Xe=M.props,Nt=Xe.popperOptions,on=Xe.placement,In=Xe.offset,dt=Xe.getReferenceClientRect,Zt=Xe.moveTransition,Ln=X()?Ty($).arrow:null,xn=dt?{getBoundingClientRect:dt,contextElement:dt.contextElement||te()}:e,Dn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ft){var ni=ft.state;if(X()){var Et=be(),un=Et.box;["placement","reference-hidden","escaped"].forEach(function(Ai){Ai==="placement"?un.setAttribute("data-placement",ni.placement):ni.attributes.popper["data-popper-"+Ai]?un.setAttribute("data-"+Ai,""):un.removeAttribute("data-"+Ai)}),ni.attributes.popper={}}}},Un=[{name:"offset",options:{offset:In}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Zt}},Dn];X()&&Ln&&Un.push({name:"arrow",options:{element:Ln,padding:3}}),Un.push.apply(Un,(Nt==null?void 0:Nt.modifiers)||[]),M.popperInstance=Xge(xn,$,Object.assign({},Nt,{placement:on,onFirstUpdate:T,modifiers:Un}))}function Ge(){M.popperInstance&&(M.popperInstance.destroy(),M.popperInstance=null)}function st(){var Xe=M.props.appendTo,Nt,on=te();M.props.interactive&&Xe===gN||Xe==="parent"?Nt=on.parentNode:Nt=vN(Xe,[on]),Nt.contains($)||Nt.appendChild($),M.state.isMounted=!0,it()}function It(){return Hv($.querySelectorAll("[data-tippy-root]"))}function Ct(Xe){M.clearDelayTimeouts(),Xe&&ie("onTrigger",[M,Xe]),ee();var Nt=ue(!0),on=V(),In=on[0],dt=on[1];bd.isTouch&&In==="hold"&&dt&&(Nt=dt),Nt?i=setTimeout(function(){M.show()},Nt):M.show()}function bt(Xe){if(M.clearDelayTimeouts(),ie("onUntrigger",[M,Xe]),!M.state.isVisible){G();return}if(!(M.props.trigger.indexOf("mouseenter")>=0&&M.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Xe.type)>=0&&s)){var Nt=ue(!1);Nt?r=setTimeout(function(){M.state.isVisible&&M.hide()},Nt):a=requestAnimationFrame(function(){M.hide()})}}function Rt(){M.state.isEnabled=!0}function cn(){M.hide(),M.state.isEnabled=!1}function nn(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(a)}function Qe(Xe){if(!M.state.isDestroyed){ie("onBeforeUpdate",[M,Xe]),Ke();var Nt=M.props,on=Z3(e,Object.assign({},Nt,K3(Xe),{ignoreAttributes:!0}));M.props=on,Ve(),Nt.interactiveDebounce!==on.interactiveDebounce&&(Me(),A=Y3(ht,on.interactiveDebounce)),Nt.triggerTarget&&!on.triggerTarget?rp(Nt.triggerTarget).forEach(function(In){In.removeAttribute("aria-expanded")}):on.triggerTarget&&e.removeAttribute("aria-expanded"),he(),Ce(),L&&L(Nt,on),M.popperInstance&&(it(),It().forEach(function(In){requestAnimationFrame(In._tippy.popperInstance.forceUpdate)})),ie("onAfterUpdate",[M,Xe])}}function Ft(Xe){M.setProps({content:Xe})}function Fn(){var Xe=M.state.isVisible,Nt=M.state.isDestroyed,on=!M.state.isEnabled,In=bd.isTouch&&!M.props.touch,dt=wb(M.props.duration,0,Fu.duration);if(!(Xe||Nt||on||In)&&!te().hasAttribute("disabled")&&(ie("onShow",[M],!1),M.props.onShow(M)!==!1)){if(M.state.isVisible=!0,X()&&($.style.visibility="visible"),Ce(),ee(),M.state.isMounted||($.style.transition="none"),X()){var Zt=be(),Ln=Zt.box,xn=Zt.content;Tb([Ln,xn],0)}T=function(){var Un;if(!(!M.state.isVisible||d)){if(d=!0,$.offsetHeight,$.style.transition=M.props.moveTransition,X()&&M.props.animation){var qn=be(),ft=qn.box,ni=qn.content;Tb([ft,ni],dt),X3([ft,ni],"visible")}Y(),he(),G3(Sb,M),(Un=M.popperInstance)==null||Un.forceUpdate(),ie("onMount",[M]),M.props.animation&&X()&&Te(dt,function(){M.state.isShown=!0,ie("onShown",[M])})}},st()}}function He(){var Xe=!M.state.isVisible,Nt=M.state.isDestroyed,on=!M.state.isEnabled,In=wb(M.props.duration,1,Fu.duration);if(!(Xe||Nt||on)&&(ie("onHide",[M],!1),M.props.onHide(M)!==!1)){if(M.state.isVisible=!1,M.state.isShown=!1,d=!1,s=!1,X()&&($.style.visibility="hidden"),Me(),G(),Ce(!0),X()){var dt=be(),Zt=dt.box,Ln=dt.content;M.props.animation&&(Tb([Zt,Ln],In),X3([Zt,Ln],"hidden"))}Y(),he(),M.props.animation?X()&&me(In,M.unmount):M.unmount()}}function Dt(Xe){ne().addEventListener("mousemove",A),G3(Qg,A),A(Xe)}function Xt(){M.state.isVisible&&M.hide(),M.state.isMounted&&(Ge(),It().forEach(function(Xe){Xe._tippy.unmount()}),$.parentNode&&$.parentNode.removeChild($),Sb=Sb.filter(function(Xe){return Xe!==M}),M.state.isMounted=!1,ie("onHidden",[M]))}function Mt(){M.state.isDestroyed||(M.clearDelayTimeouts(),M.unmount(),Ke(),delete e._tippy,M.state.isDestroyed=!0,ie("onDestroy",[M]))}}function xm(e,t){t===void 0&&(t={});var n=Fu.plugins.concat(t.plugins||[]);dve();var i=Object.assign({},t,{plugins:n}),r=ave(e),a=r.reduce(function(s,o){var l=o&&yve(o,i);return l&&s.push(l),s},[]);return x0(e)?a[0]:a}xm.defaultProps=Fu;xm.setDefaultProps=mve;xm.currentInput=bd;Object.assign({},sN,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}});xm.setDefaultProps({render:wN});function Rm(e,t){const n=xm(e,{animation:"scale",offset:[10,10],content:t});return{update(i){n.setContent(i)},destroy(){n.destroy()}}}const wve=[[["type"],["Demographics","Filing Status"]],[["state_of_residency"],["Demographics","State of Residency"]],[["fed_par_no_of_dependents_from_0_to_6"],["Demographics","Number of Dependents from 0 to 6"]],[["fed_par_no_of_dependents_from_6_to_17"],["Demographics","Number of Dependents from 6 to 17"]],[["fed_par_no_of_dependents_over_17"],["Demographics","Number of Dependents over 17"]],...[...Array(8)].flatMap((e,t)=>[[[`wages_${t+1}_enabled`],["Wages/W-2s",`Tab ${t+1}`,"Enabled"]],[[`employer_name_${t}`,`wages_${t+1}_employer_name`],["Wages/W-2s",`Tab ${t+1}`,"Employer Name"]],[[`employer_type_${t}`,`wages_${t+1}_employer_type`],["Wages/W-2s",`Tab ${t+1}`,"Taxpayer or Spouse"]],[[`paystub_date_${t}`,`wages_${t+1}_paystub_date`],["Wages/W-2s",`Tab ${t+1}`,"Paystub Date"]],[[`age_${t}`,`wages_${t+1}_age`],["Wages/W-2s",`Tab ${t+1}`,"Age"]],[[`wages_${t}`,`wages_${t+1}_wages`],["Wages/W-2s",`Tab ${t+1}`,"Wages"]],[[`federal_income_tax_withheld_${t}`,`wages_${t+1}_federal_income_tax_withheld`],["Wages/W-2s",`Tab ${t+1}`,"Federal Income Tax Withheld"]],[[`state_income_tax_withheld_${t}`,`wages_${t+1}_state_income_tax_withheld`],["Wages/W-2s",`Tab ${t+1}`,"State Income Tax Withheld"]],[[`dependent_care_benefits_${t}`,`wages_${t+1}_dependent_care_benefits`],["Wages/W-2s",`Tab ${t+1}`,"Dependent Care Benefits"]],[[`401k_contributions_${t}`,`wages_${t+1}_401k_contributions`],["Wages/W-2s",`Tab ${t+1}`,"401K Contributions"]],[[`business_owned_${t}`,`wages_${t+1}_business_owned`],["Wages/W-2s",`Tab ${t+1}`,"Business Owned by Taxpayer/Spouse?"]],[[`covered_by_retirement_plan_${t}`,`wages_${t+1}_covered_by_retirement_plan`],["Wages/W-2s",`Tab ${t+1}`,"Covered by retirement plan at work"]]]),[["social_security_taxpayer"],["Income","Social Security"]],[["social_security_spouse"],["Income","Spouse Social Security"]],[["fed_inc_bank_1_interest_taxpayer"],["Income","Interest Income"]],[["fed_inc_ordinary_dividends_taxpayer"],["Income","Ordinary Dividends"]],[["fed_inc_money_market_1_interest_taxpayer"],["Income","IRA Distribution Income"]],[["fed_inc_stock_qualified_div_taxpayer"],["Income","Qualified Dividends"]],[["fed_inc_stock_st_div_gains_taxpayer"],["Income","Short Term Capital Gains"]],[["fed_inc_stock_lt_cap_gains_taxpayer"],["Income","Long Term Cap Gains"]],[["fed_inc_adj_capital_losses_this_year_taxpayer"],["Income","Capital Losses"]],[["fed_inc_stock_60man_cap_gains_taxpayer"],["Income","60 Month Capital Gains"]],[["fed_inc_other_income_taxpayer"],["Income","Other Income"]],[["fed_inc_bank_1_interest_spouse"],["Income","Spouse Interest Income"]],[["fed_inc_ordinary_dividends_spouse"],["Income","Spouse Ordinary Dividends"]],[["fed_inc_money_market_1_interest_spouse"],["Income","Spouse IRA Distribution Income"]],[["fed_inc_stock_qualified_div_spouse"],["Income","Spouse Qualified Dividends"]],[["fed_inc_stock_st_div_gains_spouse"],["Income","Spouse Short Term Capital Gains"]],[["fed_inc_stock_lt_cap_gains_spouse"],["Income","Spouse Long Term Cap Gains"]],[["fed_inc_adj_capital_losses_this_year_spouse"],["Income","Spouse Capital Losses"]],[["fed_inc_stock_60man_cap_gains_spouse"],["Income","Spouse 60 Month Capital Gains"]],[["fed_inc_other_income_spouse"],["Income","Spouse Other Income"]],[["fed_inc_ca_tax_refund_taxpayer"],["Income","State Tax Refund"]],[["rental_real_estate_professional"],["Rental Real Estate","I am a rental real estate professional"]],...[...Array(8)].flatMap((e,t)=>[[[`rental_real_estate_${t+1}_enabled`],["Rental Real Estate",`Tab ${t+1}`,"Enabled"]],[[`name_${t}`,`rental_real_estate_${t+1}_name`],["Rental Real Estate",`Tab ${t+1}`,"Real Estate Name"]],[[`income_${t}`,`rental_real_estate_${t+1}_income`],["Rental Real Estate",`Tab ${t+1}`,"Income"]],[[`advertising_${t}`,`rental_real_estate_${t+1}_advertising`],["Rental Real Estate",`Tab ${t+1}`,"Advertising"]],[[`auto_expenses_${t}`,`rental_real_estate_${t+1}_auto_expenses`],["Rental Real Estate",`Tab ${t+1}`,"Auto Expenses"]],[[`cleaning_${t}`,`rental_real_estate_${t+1}_cleaning`],["Rental Real Estate",`Tab ${t+1}`,"Cleaning"]],[[`commissions_${t}`,`rental_real_estate_${t+1}_commisions`],["Rental Real Estate",`Tab ${t+1}`,"Commissions"]],[[`depreciation_${t}`,`rental_real_estate_${t+1}_depreciation`],["Rental Real Estate",`Tab ${t+1}`,"Depreciation"]],[[`insurance_${t}`,`rental_real_estate_${t+1}_insurance`],["Rental Real Estate",`Tab ${t+1}`,"Insurance"]],[[`legal_expenses_${t}`,`rental_real_estate_${t+1}_legal_expenses`],["Rental Real Estate",`Tab ${t+1}`,"Legal Expenses"]],[[`management_fees_${t}`,`rental_real_estate_${t+1}_management_fees`],["Rental Real Estate",`Tab ${t+1}`,"Management Fees"]],[[`mortage_interest_${t}`,`rental_real_estate_${t+1}_mortage_interest`],["Rental Real Estate",`Tab ${t+1}`,"Mortage Interest"]],[[`repairs_${t}`,`rental_real_estate_${t+1}_repairs`],["Rental Real Estate",`Tab ${t+1}`,"Repairs"]],[[`supplies_${t}`,`rental_real_estate_${t+1}_supplies`],["Rental Real Estate",`Tab ${t+1}`,"Supplies"]],[[`taxes_${t}`,`rental_real_estate_${t+1}_taxes`],["Rental Real Estate",`Tab ${t+1}`,"Taxes"]],[[`utilities_${t}`,`rental_real_estate_${t+1}_utilities`],["Rental Real Estate",`Tab ${t+1}`,"Utilities"]],[[`other_${t}`,`rental_real_estate_${t+1}_other`],["Rental Real Estate",`Tab ${t+1}`,"Other"]]]),[["fed_inc_adj_health_insurance_premium_taxpayer"],["Adjustments","Self Employed Health Insurance"]],[["ira_deduction_taxpayer"],["Adjustments","SEP IRA Contribution"]],[["per_ira_deduction_taxpayer"],["Adjustments","Traditional IRA Deduction"]],[["per_health_savings_acct_taxpayer"],["Adjustments","Health Savings Account"]],[["other_deductions_taxpayer"],["Adjustments","Other Deductions"]],[["fed_ded_mortgage_interest_taxpayer"],["Deductions","Mortgage Interest"]],[["fed_ded_state_income_taxes_taxpayer"],["Deductions","State Income Taxes"]],[["fed_ded_local_income_taxes_taxpayer"],["Deductions","Local/City Income Taxes"]],[["fed_ded_prior_state_inc_taxes_taxpayer"],["Deductions","Prior Year State Income Taxes"]],[["fed_ded_property_taxes_taxpayer"],["Deductions","Property Taxes"]],[["fed_ded_personal_property_taxes_taxpayer"],["Deductions","Personal Property Taxes"]],[["fed_ded_home_loan_points_taxpayer"],["Deductions","Home Loan Points"]],[["fed_ded_medical_and_dental_taxpayer"],["Deductions","Medical and Dental Costs"]],[["fed_ded_cash_donations_taxpayer"],["Deductions","Cash Donations"]],[["fed_ded_noncash_donations_taxpayer"],["Deductions","Non Cash Donations"]],[["fed_ded_other_deductions_taxpayer"],["Deductions","Other Deductions"]],[["usr_scorp_business_income_taxpayer"],["Other Business Income","Other S-corp Business Income"]],[["usr_schedule_c_income_taxpayer"],["Other Business Income","Other Schedule C Business Income"]],[["fed_tax_previous_year_taxpayer"],["Taxes","Previous Year Federal Tax"]],[["state_tax_previous_year_taxpayer"],["Taxes","Previous Year State Tax"]],[["fed_tax_previous_year_spouse"],["Taxes","Spouse Previous Year Federal Tax"]],[["state_tax_previous_year_spouse"],["Taxes","Spouse Previous Year State Tax"]],[["fed_tax_owed_other_taxes_taxpayer"],["Taxes","Other Taxes"]],[["fed_tax_owed_prior_year_amt_carryforward_taxpayer"],["Taxes","Prior Year AMT Carryforward"]],[["fed_tax_owed_tax_credits_taxpayer"],["Taxes","Tax Credits"]],[["fed_tax_owed_child_tax_credit_override_taxpayer"],["Taxes","Child Tax Credits"]],[["res_inc_itemized_override_taxpayer"],["Taxes","Itemized Deductions"]],[["res_passthrough_deduction_override_taxpayer"],["Taxes","Passthrough Deduction"]],[["res_se_tax_override_taxpayer"],["Taxes","SE Tax"]],[["res_passthrough_deduction_override_taxpayer"],["Taxes","Passthrough Deduction"]],[["res_total_tax_override_taxpayer"],["Total Federal Tax"]],[["res_state_tax_before_payments_override_taxpayer"],["Taxes","Total State Tax"]],[["business_inc_ccorp_fed_tax_override_taxpayer"],["Taxes","C Corp Federal Tax"]],[["business_inc_ccorp_state_tax_override_taxpayer"],["Taxes","C Corp State Tax"]],[["fed_est_tax_pay_march_taxpayer"],["Payments","Federal Q1 Estimated Tax Payment"]],[["fed_est_tax_pay_june_taxpayer"],["Payments","Federal Q2 Estimated Tax Payment"]],[["fed_est_tax_pay_september_taxpayer"],["Payments","Federal Q3 Estimated Tax Payment"]],[["fed_est_tax_pay_december_taxpayer"],["Payments","Federal Q4 Estimated Tax Payment"]],[["state_estimated_tax_payments_q1_taxpayer"],["Payments","State Q1 Estimated Tax Payment"]],[["state_estimated_tax_payments_q2_taxpayer"],["Payments","State Q2 Estimated Tax Payment"]],[["state_estimated_tax_payments_q3_taxpayer"],["Payments","State Q3 Estimated Tax Payment"]],[["state_estimated_tax_payments_q4_taxpayer"],["Payments","State Q4 Estimated Tax Payment"]],[["state_529_plan_contributions_taxpayer"],["State Adjustments","529 Plan Contributions"]],[["state_dependent_education_expenses_taxpayer"],["State Adjustments","Dependent Education Expenses"]],[["state_child_dependent_care_expenses_taxpayer"],["State Adjustments","Child Dependent Care Expenses"]],[["state_unreimbursed_employee_expenses_taxpayer"],["State Adjustments","Unreimbursed Employee Expenses"]],[["tax_exempt_interest_taxpayer"],["State Adjustments","Tax Exempt Interest"]],[["taxpayer_age"],["State Adjustments","Taxpayer Age"]],[["state_in_county_code"],["State Adjustments","County"]],[["state_md_county_code"],["State Adjustments","County"]],[["state_sec_179_deduction_taxpayer"],["State Adjustments","Section 179 deduction from K1 or Sch C"]],[["state_depreciation_adjustment_taxpayer"],["State Adjustments","Depreciation Adjustment"]],[["fed_estate_trust_income_taxpayer"],["State Adjustments","Estate or Trust Income"]],[["fed_gambling_income_taxpayer"],["State Adjustments","Net Gambling Winnings"]],[["fed_tax_free_interest_taxpayer"],["State Adjustments","US Govt Bond Interest"]],[["fed_passive_activity_losses_taxpayer"],["State Adjustments","Passive Activity Losses"]],[["fed_inc_tax_refund_taxpayer"],["State Adjustments","Federal Income Tax Refund"]],[["state_ks_tax_credits_taxpayer"],["State Adjustments","Other Credits"]],[["state_sc_college_tuition_taxpayer"],["State Adjustments","College Tuition Credit"]],[["state_adj_additions_taxpayer"],["State Adjustments","Additions"]],[["state_adj_substractions_taxpayer"],["State Adjustments","Subtractions"]],[["state_adj_tax_credit_taxpayer"],["State Adjustments","Tax Credit"]],[["fed_inc_adj_health_insurance_premium_spouse"],["Adjustments","Spouse Self Employed Health Insurance"]],[["ira_deduction_spouse"],["Adjustments","Spouse SEP IRA Contribution"]],[["per_ira_deduction_spouse"],["Adjustments","Spouse Traditional IRA Deduction"]],[["per_health_savings_acct_spouse"],["Adjustments","Spouse Health Savings Account"]],[["other_deductions_spouse"],["Adjustments","Spouse Other Deductions"]],[["fed_ded_mortgage_interest_spouse"],["Deductions","Spouse Mortgage Interest"]],[["fed_ded_state_income_taxes_spouse"],["Deductions","Spouse State Income Taxes"]],[["fed_ded_local_income_taxes_spouse"],["Deductions","Spouse Local/City Income Taxes"]],[["fed_ded_prior_state_inc_taxes_spouse"],["Deductions","Spouse Prior Year State Income Taxes"]],[["fed_ded_property_taxes_spouse"],["Deductions","Spouse Property Taxes"]],[["fed_ded_personal_property_taxes_spouse"],["Deductions","Spouse Personal Property Taxes"]],[["fed_ded_home_loan_points_spouse"],["Deductions","Spouse Home Loan Points"]],[["fed_ded_medical_and_dental_spouse"],["Deductions","Spouse Medical and Dental Costs"]],[["fed_ded_cash_donations_spouse"],["Deductions","Spouse Cash Donations"]],[["fed_ded_noncash_donations_spouse"],["Deductions","Spouse Non Cash Donations"]],[["fed_ded_other_deductions_spouse"],["Deductions","Spouse Other Deductions"]],[["usr_scorp_business_income_spouse"],["Other Business Income","Spouse Other S-corp Business Income"]],[["usr_schedule_c_income_spouse"],["Other Business Income","Spouse Other Schedule C Business Income"]],[["fed_tax_owed_other_taxes_spouse"],["Taxes","Spouse Other Taxes"]],[["fed_tax_owed_prior_year_amt_carryforward_spouse"],["Taxes","Spouse Prior Year AMT Carryforward"]],[["fed_tax_owed_tax_credits_spouse"],["Taxes","Spouse Tax Credits"]],[["fed_tax_owed_child_tax_credit_override_spouse"],["Taxes","Spouse Child Tax Credits"]],[["res_inc_itemized_override_spouse"],["Taxes","Spouse Itemized Deductions"]],[["res_passthrough_deduction_override_spouse"],["Taxes","Spouse Passthrough Deduction"]],[["res_se_tax_override_spouse"],["Taxes","Spouse SE Tax"]],[["res_passthrough_deduction_override_spouse"],["Taxes","Spouse Passthrough Deduction"]],[["res_total_tax_override_spouse"],["Spouse Total Federal Tax"]],[["res_state_tax_before_payments_override_spouse"],["Taxes","Spouse Total State Tax"]],[["business_inc_ccorp_fed_tax_override_spouse"],["Taxes","Spouse C Corp Federal Tax"]],[["business_inc_ccorp_state_tax_override_spouse"],["Taxes","Spouse C Corp State Tax"]],[["fed_est_tax_pay_march_spouse"],["Payments","Spouse Federal Q1 Estimated Tax Payment"]],[["fed_est_tax_pay_june_spouse"],["Payments","Spouse Federal Q2 Estimated Tax Payment"]],[["fed_est_tax_pay_september_spouse"],["Payments","Spouse Federal Q3 Estimated Tax Payment"]],[["fed_est_tax_pay_december_spouse"],["Payments","Spouse Federal Q4 Estimated Tax Payment"]],[["state_estimated_tax_payments_q1_spouse"],["Payments","Spouse State Q1 Estimated Tax Payment"]],[["state_estimated_tax_payments_q2_spouse"],["Payments","Spouse State Q2 Estimated Tax Payment"]],[["state_estimated_tax_payments_q3_spouse"],["Payments","Spouse State Q3 Estimated Tax Payment"]],[["state_estimated_tax_payments_q4_spouse"],["Payments","Spouse State Q4 Estimated Tax Payment"]],[["state_adj_additions_spouse"],["State Adjustments","Spouse Additions"]],[["state_adj_substractions_spouse"],["State Adjustments","Spouse Subtractions"]],[["state_adj_tax_credit_spouse"],["State Adjustments","Spouse Tax Credit"]],...[...Array(8)].flatMap((e,t)=>[[[`revenue_${t}`,`business_inc_${t+1}_revenue`],["Business Income & Expense",`Tab ${t+1}`,"Total Business Revenue"]],[[`expense_${t}`,`business_inc_${t+1}_expense`],["Business Income & Expense",`Tab ${t+1}`,"Total Business Expense"]]])],Tve=[["res_wages","Wages"],["res_interest_and_dividents","Interest & Dividends"],["res_capital_gains","Capital Gains"],["business_income","Business Income"],["res_rental_income","Rental Income"],["res_other_income","Other Income"],["res_inc_total","Total Income"],["res_inc_adjustments","Adjustments"],["res_inc_itemized","Itemized Deductions"],["res_taxable_income","Taxable Income"],["fed_tax_owed_tax_credits","Credits"],["payments_and_withholdings","Payments & Withholding"],["total_deductions","Total Deductions & Payments"],["res_federal_tax_remaining","Current Tax Due"],["res_state_tax","State Tax"]],go={},p2=[];wve.forEach(e=>{go[e[0][0]]=e[1].slice(-1)[0],p2.push([e[0][1]||e[0][0],e[1]])});const nI=Object.fromEntries(p2);function kve(e){let t,n,i=go[e[1]]+"",r;return{c(){t=P("div"),n=P("span"),r=Le(i)},m(a,s){ce(a,t,s),m(t,n),m(n,r)},p(a,s){s&2&&i!==(i=go[a[1]]+"")&&vt(r,i)},d(a){a&&_e(t)}}}function Sve(e){let t,n,i=go[e[1]]+"",r,a,s,o,l,d;return{c(){t=P("div"),n=P("span"),r=Le(i),a=K(),s=P("i"),w(s,"class","fa fa-info-circle ml-1")},m(c,v){ce(c,t,v),m(t,n),m(n,r),m(t,a),m(t,s),l||(d=l_(o=Rm.call(null,t,e[5])),l=!0)},p(c,v){v&2&&i!==(i=go[c[1]]+"")&&vt(r,i),o&&Ga(o.update)&&v&32&&o.update.call(null,c[5])},d(c){c&&_e(t),l=!1,d()}}}function iI(e){let t,n,i;return{c(){t=P("div"),n=P("span"),i=Le(e[4]),w(n,"class","input-group-text"),w(t,"class","input-group-prepend")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&16&&vt(i,r[4])},d(r){r&&_e(t)}}}function Cve(e){let t,n,i,r,a,s,o=!Xn.isNil(e[4]),l,d,c,v,T,b;function A(D,O){return O&32&&(r=null),r==null&&(r=!Xn.isNil(D[5])),r?Sve:kve}let E=A(e,-1),y=E(e),I=o&&iI(e);return{c(){t=P("div"),n=P("div"),i=P("label"),y.c(),a=K(),s=P("span"),I&&I.c(),l=K(),d=P("input"),c=K(),v=P("span"),w(i,"for",e[7]),w(i,"class","col-form-label tpp-form-label"),d.required="",w(d,"placeholder","0.0"),w(d,"type","number"),w(d,"id",e[7]),w(d,"class","personal-projection-form-section-4 personal-projection-form-validation form-control"),wt(d,"is-invalid",e[3]),wt(d,"is-valid",e[8]),w(s,"class","input-group"),w(v,"class","form-text"),w(n,"class","form-group tpp-form-group"),w(t,"class","personal-projection-form-content__column")},m(D,O){ce(D,t,O),m(t,n),m(n,i),y.m(i,null),m(n,a),m(n,s),I&&I.m(s,null),m(s,l),m(s,d),Pn(d,e[0]),m(n,c),m(n,v),T||(b=[ct(d,"input",e[10]),ct(d,"blur",e[11]),ct(d,"input",function(){Ga(e[6])&&e[6].apply(this,arguments)})],T=!0)},p(D,[O]){e=D,E===(E=A(e,O))&&y?y.p(e,O):(y.d(1),y=E(e),y&&(y.c(),y.m(i,null))),O&128&&w(i,"for",e[7]),O&16&&(o=!Xn.isNil(e[4])),o?I?I.p(e,O):(I=iI(e),I.c(),I.m(s,l)):I&&(I.d(1),I=null),O&128&&w(d,"id",e[7]),O&1&&Ri(d.value)!==e[0]&&Pn(d,e[0]),O&8&&wt(d,"is-invalid",e[3]),O&256&&wt(d,"is-valid",e[8])},i:ot,o:ot,d(D){D&&_e(t),y.d(),I&&I.d(),T=!1,vi(b)}}}function Pve(e,t,n){let i;Sn(e,jp,y=>n(9,i=y));let{key:r}=t,{visitKey:a=r}=t,{value:s=0}=t,{hasError:o}=t,{inputAddon:l=null}=t,{tooltip:d=null}=t,{handleChange:c=null}=t,v,T;const{type:b}=pf("ppType");function A(){s=Ri(this.value),n(0,s)}const E=()=>Td(a);return e.$$set=y=>{"key"in y&&n(1,r=y.key),"visitKey"in y&&n(2,a=y.visitKey),"value"in y&&n(0,s=y.value),"hasError"in y&&n(3,o=y.hasError),"inputAddon"in y&&n(4,l=y.inputAddon),"tooltip"in y&&n(5,d=y.tooltip),"handleChange"in y&&n(6,c=y.handleChange)},e.$$.update=()=>{e.$$.dirty&524&&n(8,T=i.has(a)&&!o&&b!=="simulator"),e.$$.dirty&2&&n(7,v=`personal_projection_parameters[${r}]`)},[s,r,a,o,l,d,c,v,T,i,A,E]}let ns=class extends Qt{constructor(t){super(),Jt(this,t,Pve,Cve,Kt,{key:1,visitKey:2,value:0,hasError:3,inputAddon:4,tooltip:5,handleChange:6})}};function rI(e,t,n){const i=e.slice();return i[12]=t[n],i}function aI(e){let t,n=e[12].title+"",i,r;return{c(){t=P("option"),i=Le(n),t.__value=r=e[12].value,t.value=t.__value},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s&32&&n!==(n=a[12].title+"")&&vt(i,n),s&32&&r!==(r=a[12].value)&&(t.__value=r,t.value=t.__value)},d(a){a&&_e(t)}}}function Eve(e){let t,n,i,r,a,s=go[e[1]]+"",o,l,d,c,v,T,b,A,E,y,I,D=e[5],O=[];for(let M=0;M<D.length;M+=1)O[M]=aI(rI(e,D,M));return{c(){t=P("div"),n=P("div"),i=P("label"),r=P("div"),a=P("span"),o=Le(s),l=K(),d=P("select"),c=P("option"),v=Le("-- "),T=Le(e[4]),b=Le(" --");for(let M=0;M<O.length;M+=1)O[M].c();A=K(),E=P("span"),w(i,"for",e[6]),w(i,"class","col-form-label tpp-form-label"),c.disabled="",c.__value="",c.value=c.__value,w(d,"id",e[6]),w(d,"class","personal-projection-form-validation personal-projection-form--viewed form-control"),e[0]===void 0&&xa(()=>e[9].call(d)),wt(d,"is-invalid",e[3]),wt(d,"is-valid",e[7]),w(E,"class","form-text"),w(n,"class","form-group tpp-form-group"),w(t,"class","personal-projection-form-content__column")},m(M,F){ce(M,t,F),m(t,n),m(n,i),m(i,r),m(r,a),m(a,o),m(n,l),m(n,d),m(d,c),m(c,v),m(c,T),m(c,b);for(let $=0;$<O.length;$+=1)O[$]&&O[$].m(d,null);Es(d,e[0],!0),m(n,A),m(n,E),y||(I=[ct(d,"change",e[9]),ct(d,"blur",e[10])],y=!0)},p(M,[F]){if(F&2&&s!==(s=go[M[1]]+"")&&vt(o,s),F&64&&w(i,"for",M[6]),F&16&&vt(T,M[4]),F&32){D=M[5];let $;for($=0;$<D.length;$+=1){const L=rI(M,D,$);O[$]?O[$].p(L,F):(O[$]=aI(L),O[$].c(),O[$].m(d,null))}for(;$<O.length;$+=1)O[$].d(1);O.length=D.length}F&64&&w(d,"id",M[6]),F&33&&Es(d,M[0]),F&8&&wt(d,"is-invalid",M[3]),F&128&&wt(d,"is-valid",M[7])},i:ot,o:ot,d(M){M&&_e(t),Nn(O,M),y=!1,vi(I)}}}function Ive(e,t,n){let i;Sn(e,jp,E=>n(8,i=E));let{key:r}=t,{visitKey:a=r}=t,{value:s}=t,{hasError:o}=t,{caption:l}=t,{options:d}=t;const{type:c}=pf("ppType");let v,T;function b(){s=Cd(this),n(0,s),n(5,d)}const A=()=>Td(a);return e.$$set=E=>{"key"in E&&n(1,r=E.key),"visitKey"in E&&n(2,a=E.visitKey),"value"in E&&n(0,s=E.value),"hasError"in E&&n(3,o=E.hasError),"caption"in E&&n(4,l=E.caption),"options"in E&&n(5,d=E.options)},e.$$.update=()=>{e.$$.dirty&268&&n(7,T=i.has(a)&&!o&&c!=="simulator"),e.$$.dirty&2&&n(6,v=`personal_projection_parameters[${r}]`)},[s,r,a,o,l,d,v,T,i,b,A]}let um=class extends Qt{constructor(t){super(),Jt(this,t,Ive,Eve,Kt,{key:1,visitKey:2,value:0,hasError:3,caption:4,options:5})}};function sI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function Ave(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j=a&&sI(e);function H(Y){e[3](Y)}let V={key:"type",hasError:e[2].has("type"),caption:"Select Filing Status",options:eN};e[1].type!==void 0&&(V.value=e[1].type),d=new um({props:V}),Oe.push(()=>$e(d,"value",H));function Q(Y){e[4](Y)}let X={key:"state_of_residency",hasError:e[2].has("state_of_residency"),caption:"Select State of Residency",options:a2};e[1].state_of_residency!==void 0&&(X.value=e[1].state_of_residency),T=new um({props:X}),Oe.push(()=>$e(T,"value",Q));function te(Y){e[5](Y)}let ne={key:"fed_par_no_of_dependents_from_0_to_6",hasError:e[2].has("fed_par_no_of_dependents_from_0_to_6")};e[1].fed_par_no_of_dependents_from_0_to_6!==void 0&&(ne.value=e[1].fed_par_no_of_dependents_from_0_to_6),E=new ns({props:ne}),Oe.push(()=>$e(E,"value",te));function be(Y){e[6](Y)}let ue={key:"fed_par_no_of_dependents_from_6_to_17",hasError:e[2].has("fed_par_no_of_dependents_from_6_to_17")};e[1].fed_par_no_of_dependents_from_6_to_17!==void 0&&(ue.value=e[1].fed_par_no_of_dependents_from_6_to_17),D=new ns({props:ue}),Oe.push(()=>$e(D,"value",be));function Ce(Y){e[7](Y)}let ie={key:"fed_par_no_of_dependents_over_17",hasError:e[2].has("fed_par_no_of_dependents_over_17")};return e[1].fed_par_no_of_dependents_over_17!==void 0&&(ie.value=e[1].fed_par_no_of_dependents_over_17),F=new ns({props:ie}),Oe.push(()=>$e(F,"value",Ce)),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Demographics",r=K(),j&&j.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),v=K(),re(T.$$.fragment),A=K(),re(E.$$.fragment),I=K(),re(D.$$.fragment),M=K(),re(F.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields"),w(t,"class","")},m(Y,he){ce(Y,t,he),m(t,n),m(n,i),m(n,r),j&&j.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(l,v),ae(T,l,null),m(l,A),ae(E,l,null),m(l,I),ae(D,l,null),m(l,M),ae(F,l,null),L=!0},p(Y,[he]){he&1&&(a=!Xn.isNil(Y[0])),a?j?j.p(Y,he):(j=sI(Y),j.c(),j.m(n,null)):j&&(j.d(1),j=null);const Me={};he&4&&(Me.hasError=Y[2].has("type")),!c&&he&2&&(c=!0,Me.value=Y[1].type,Ne(()=>c=!1)),d.$set(Me);const Pe={};he&4&&(Pe.hasError=Y[2].has("state_of_residency")),!b&&he&2&&(b=!0,Pe.value=Y[1].state_of_residency,Ne(()=>b=!1)),T.$set(Pe);const We={};he&4&&(We.hasError=Y[2].has("fed_par_no_of_dependents_from_0_to_6")),!y&&he&2&&(y=!0,We.value=Y[1].fed_par_no_of_dependents_from_0_to_6,Ne(()=>y=!1)),E.$set(We);const qe={};he&4&&(qe.hasError=Y[2].has("fed_par_no_of_dependents_from_6_to_17")),!O&&he&2&&(O=!0,qe.value=Y[1].fed_par_no_of_dependents_from_6_to_17,Ne(()=>O=!1)),D.$set(qe);const ee={};he&4&&(ee.hasError=Y[2].has("fed_par_no_of_dependents_over_17")),!$&&he&2&&($=!0,ee.value=Y[1].fed_par_no_of_dependents_over_17,Ne(()=>$=!1)),F.$set(ee)},i(Y){L||(U(d.$$.fragment,Y),U(T.$$.fragment,Y),U(E.$$.fragment,Y),U(D.$$.fragment,Y),U(F.$$.fragment,Y),L=!0)},o(Y){W(d.$$.fragment,Y),W(T.$$.fragment,Y),W(E.$$.fragment,Y),W(D.$$.fragment,Y),W(F.$$.fragment,Y),L=!1},d(Y){Y&&_e(t),j&&j.d(),se(d),se(T),se(E),se(D),se(F)}}}function Dve(e,t,n){let i,r;Sn(e,hi,v=>n(1,i=v)),Sn(e,__,v=>n(2,r=v));let{statusNotice:a=null}=t;function s(v){e.$$.not_equal(i.type,v)&&(i.type=v,hi.set(i))}function o(v){e.$$.not_equal(i.state_of_residency,v)&&(i.state_of_residency=v,hi.set(i))}function l(v){e.$$.not_equal(i.fed_par_no_of_dependents_from_0_to_6,v)&&(i.fed_par_no_of_dependents_from_0_to_6=v,hi.set(i))}function d(v){e.$$.not_equal(i.fed_par_no_of_dependents_from_6_to_17,v)&&(i.fed_par_no_of_dependents_from_6_to_17=v,hi.set(i))}function c(v){e.$$.not_equal(i.fed_par_no_of_dependents_over_17,v)&&(i.fed_par_no_of_dependents_over_17=v,hi.set(i))}return e.$$set=v=>{"statusNotice"in v&&n(0,a=v.statusNotice)},[a,i,r,s,o,l,d,c]}class Ove extends Qt{constructor(t){super(),Jt(this,t,Dve,Ave,Kt,{statusNotice:0})}}var TN={exports:{}};/*! @preserve
 * numeral.js
 * version : 2.0.6
 * author : Adam Draper
 * license : MIT
 * http://adamwdraper.github.com/Numeral-js/
 */(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(zs,function(){var t,n,i="2.0.6",r={},a={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},o={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function l(d,c){this._input=d,this._value=c}return t=function(d){var c,v,T,b;if(t.isNumeral(d))c=d.value();else if(d===0||typeof d>"u")c=0;else if(d===null||n.isNaN(d))c=null;else if(typeof d=="string")if(o.zeroFormat&&d===o.zeroFormat)c=0;else if(o.nullFormat&&d===o.nullFormat||!d.replace(/[^0-9]+/g,"").length)c=null;else{for(v in r)if(b=typeof r[v].regexps.unformat=="function"?r[v].regexps.unformat():r[v].regexps.unformat,b&&d.match(b)){T=r[v].unformat;break}T=T||t._.stringToNumber,c=T(d)}else c=Number(d)||null;return new l(d,c)},t.version=i,t.isNumeral=function(d){return d instanceof l},t._=n={numberToFormat:function(d,c,v){var T=a[t.options.currentLocale],b=!1,A=!1,E=0,y="",I=1e12,D=1e9,O=1e6,M=1e3,F="",$=!1,L,j,H,V,Q,X,te;if(d=d||0,j=Math.abs(d),t._.includes(c,"(")?(b=!0,c=c.replace(/[\(|\)]/g,"")):(t._.includes(c,"+")||t._.includes(c,"-"))&&(Q=t._.includes(c,"+")?c.indexOf("+"):d<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),t._.includes(c,"a")&&(L=c.match(/a(k|m|b|t)?/),L=L?L[1]:!1,t._.includes(c," a")&&(y=" "),c=c.replace(new RegExp(y+"a[kmbt]?"),""),j>=I&&!L||L==="t"?(y+=T.abbreviations.trillion,d=d/I):j<I&&j>=D&&!L||L==="b"?(y+=T.abbreviations.billion,d=d/D):j<D&&j>=O&&!L||L==="m"?(y+=T.abbreviations.million,d=d/O):(j<O&&j>=M&&!L||L==="k")&&(y+=T.abbreviations.thousand,d=d/M)),t._.includes(c,"[.]")&&(A=!0,c=c.replace("[.]",".")),H=d.toString().split(".")[0],V=c.split(".")[1],X=c.indexOf(","),E=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,V?(t._.includes(V,"[")?(V=V.replace("]",""),V=V.split("["),F=t._.toFixed(d,V[0].length+V[1].length,v,V[1].length)):F=t._.toFixed(d,V.length,v),H=F.split(".")[0],t._.includes(F,".")?F=T.delimiters.decimal+F.split(".")[1]:F="",A&&Number(F.slice(1))===0&&(F="")):H=t._.toFixed(d,0,v),y&&!L&&Number(H)>=1e3&&y!==T.abbreviations.trillion)switch(H=String(Number(H)/1e3),y){case T.abbreviations.thousand:y=T.abbreviations.million;break;case T.abbreviations.million:y=T.abbreviations.billion;break;case T.abbreviations.billion:y=T.abbreviations.trillion;break}if(t._.includes(H,"-")&&(H=H.slice(1),$=!0),H.length<E)for(var ne=E-H.length;ne>0;ne--)H="0"+H;return X>-1&&(H=H.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+T.delimiters.thousands)),c.indexOf(".")===0&&(H=""),te=H+F+(y||""),b?te=(b&&$?"(":"")+te+(b&&$?")":""):Q>=0?te=Q===0?($?"-":"+")+te:te+($?"-":"+"):$&&(te="-"+te),te},stringToNumber:function(d){var c=a[o.currentLocale],v=d,T={thousand:3,million:6,billion:9,trillion:12},b,A,E;if(o.zeroFormat&&d===o.zeroFormat)A=0;else if(o.nullFormat&&d===o.nullFormat||!d.replace(/[^0-9]+/g,"").length)A=null;else{A=1,c.delimiters.decimal!=="."&&(d=d.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(b in T)if(E=new RegExp("[^a-zA-Z]"+c.abbreviations[b]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),v.match(E)){A*=Math.pow(10,T[b]);break}A*=(d.split("-").length+Math.min(d.split("(").length-1,d.split(")").length-1))%2?1:-1,d=d.replace(/[^0-9\.]+/g,""),A*=Number(d)}return A},isNaN:function(d){return typeof d=="number"&&isNaN(d)},includes:function(d,c){return d.indexOf(c)!==-1},insert:function(d,c,v){return d.slice(0,v)+c+d.slice(v)},reduce:function(d,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var v=Object(d),T=v.length>>>0,b=0,A;if(arguments.length===3)A=arguments[2];else{for(;b<T&&!(b in v);)b++;if(b>=T)throw new TypeError("Reduce of empty array with no initial value");A=v[b++]}for(;b<T;b++)b in v&&(A=c(A,v[b],b,v));return A},multiplier:function(d){var c=d.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var d=Array.prototype.slice.call(arguments);return d.reduce(function(c,v){var T=n.multiplier(v);return c>T?c:T},1)},toFixed:function(d,c,v,T){var b=d.toString().split("."),A=c-(T||0),E,y,I,D;return b.length===2?E=Math.min(Math.max(b[1].length,A),c):E=A,I=Math.pow(10,E),D=(v(d+"e+"+E)/I).toFixed(E),T>c-E&&(y=new RegExp("\\.?0{1,"+(T-(c-E))+"}$"),D=D.replace(y,"")),D}},t.options=o,t.formats=r,t.locales=a,t.locale=function(d){return d&&(o.currentLocale=d.toLowerCase()),o.currentLocale},t.localeData=function(d){if(!d)return a[o.currentLocale];if(d=d.toLowerCase(),!a[d])throw new Error("Unknown locale : "+d);return a[d]},t.reset=function(){for(var d in s)o[d]=s[d]},t.zeroFormat=function(d){o.zeroFormat=typeof d=="string"?d:null},t.nullFormat=function(d){o.nullFormat=typeof d=="string"?d:null},t.defaultFormat=function(d){o.defaultFormat=typeof d=="string"?d:"0.0"},t.register=function(d,c,v){if(c=c.toLowerCase(),this[d+"s"][c])throw new TypeError(c+" "+d+" already registered.");return this[d+"s"][c]=v,v},t.validate=function(d,c){var v,T,b,A,E,y,I,D;if(typeof d!="string"&&(d+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",d)),d=d.trim(),d.match(/^\d+$/))return!0;if(d==="")return!1;try{I=t.localeData(c)}catch{I=t.localeData(t.locale())}return b=I.currency.symbol,E=I.abbreviations,v=I.delimiters.decimal,I.delimiters.thousands==="."?T="\\.":T=I.delimiters.thousands,D=d.match(/^[^\d]+/),D!==null&&(d=d.substr(1),D[0]!==b)||(D=d.match(/[^\d]+$/),D!==null&&(d=d.slice(0,-1),D[0]!==E.thousand&&D[0]!==E.million&&D[0]!==E.billion&&D[0]!==E.trillion))?!1:(y=new RegExp(T+"{2}"),d.match(/[^\d.,]/g)?!1:(A=d.split(v),A.length>2?!1:A.length<2?!!A[0].match(/^\d+.*\d$/)&&!A[0].match(y):A[0].length===1?!!A[0].match(/^\d+$/)&&!A[0].match(y)&&!!A[1].match(/^\d+$/):!!A[0].match(/^\d+.*\d$/)&&!A[0].match(y)&&!!A[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(d,c){var v=this._value,T=d||o.defaultFormat,b,A,E;if(c=c||Math.round,v===0&&o.zeroFormat!==null)A=o.zeroFormat;else if(v===null&&o.nullFormat!==null)A=o.nullFormat;else{for(b in r)if(T.match(r[b].regexps.format)){E=r[b].format;break}E=E||t._.numberToFormat,A=E(v,T,c)}return A},value:function(){return this._value},input:function(){return this._input},set:function(d){return this._value=Number(d),this},add:function(d){var c=n.correctionFactor.call(null,this._value,d);function v(T,b,A,E){return T+Math.round(c*b)}return this._value=n.reduce([this._value,d],v,0)/c,this},subtract:function(d){var c=n.correctionFactor.call(null,this._value,d);function v(T,b,A,E){return T-Math.round(c*b)}return this._value=n.reduce([d],v,Math.round(this._value*c))/c,this},multiply:function(d){function c(v,T,b,A){var E=n.correctionFactor(v,T);return Math.round(v*E)*Math.round(T*E)/Math.round(E*E)}return this._value=n.reduce([this._value,d],c,1),this},divide:function(d){function c(v,T,b,A){var E=n.correctionFactor(v,T);return Math.round(v*E)/Math.round(T*E)}return this._value=n.reduce([this._value,d],c),this},difference:function(d){return Math.abs(t(this._value).subtract(d).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(d){var c=d%10;return~~(d%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(d,c,v){var T=t._.includes(c," BPS")?" ":"",b;return d=d*1e4,c=c.replace(/\s?BPS/,""),b=t._.numberToFormat(d,c,v),t._.includes(b,")")?(b=b.split(""),b.splice(-1,0,T+"BPS"),b=b.join("")):b=b+T+"BPS",b},unformat:function(d){return+(t._.stringToNumber(d)*1e-4).toFixed(15)}})}(),function(){var d={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},v=d.suffixes.concat(c.suffixes.filter(function(b){return d.suffixes.indexOf(b)<0})),T=v.join("|");T="("+T.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(T)},format:function(b,A,E){var y,I=t._.includes(A,"ib")?c:d,D=t._.includes(A," b")||t._.includes(A," ib")?" ":"",O,M,F;for(A=A.replace(/\s?i?b/,""),O=0;O<=I.suffixes.length;O++)if(M=Math.pow(I.base,O),F=Math.pow(I.base,O+1),b===null||b===0||b>=M&&b<F){D+=I.suffixes[O],M>0&&(b=b/M);break}return y=t._.numberToFormat(b,A,E),y+D},unformat:function(b){var A=t._.stringToNumber(b),E,y;if(A){for(E=d.suffixes.length-1;E>=0;E--){if(t._.includes(b,d.suffixes[E])){y=Math.pow(d.base,E);break}if(t._.includes(b,c.suffixes[E])){y=Math.pow(c.base,E);break}}A*=y||1}return A}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(d,c,v){var T=t.locales[t.options.currentLocale],b={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},A,E,y;for(c=c.replace(/\s?\$\s?/,""),A=t._.numberToFormat(d,c,v),d>=0?(b.before=b.before.replace(/[\-\(]/,""),b.after=b.after.replace(/[\-\)]/,"")):d<0&&!t._.includes(b.before,"-")&&!t._.includes(b.before,"(")&&(b.before="-"+b.before),y=0;y<b.before.length;y++)switch(E=b.before[y],E){case"$":A=t._.insert(A,T.currency.symbol,y);break;case" ":A=t._.insert(A," ",y+T.currency.symbol.length-1);break}for(y=b.after.length-1;y>=0;y--)switch(E=b.after[y],E){case"$":A=y===b.after.length-1?A+T.currency.symbol:t._.insert(A,T.currency.symbol,-(b.after.length-(1+y)));break;case" ":A=y===b.after.length-1?A+" ":t._.insert(A," ",-(b.after.length-(1+y)+T.currency.symbol.length-1));break}return A}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(d,c,v){var T,b=typeof d=="number"&&!t._.isNaN(d)?d.toExponential():"0e+0",A=b.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),T=t._.numberToFormat(Number(A[0]),c,v),T+"e"+A[1]},unformat:function(d){var c=t._.includes(d,"e+")?d.split("e+"):d.split("e-"),v=Number(c[0]),T=Number(c[1]);T=t._.includes(d,"e-")?T*=-1:T;function b(A,E,y,I){var D=t._.correctionFactor(A,E),O=A*D*(E*D)/(D*D);return O}return t._.reduce([v,Math.pow(10,T)],b,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(d,c,v){var T=t.locales[t.options.currentLocale],b,A=t._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),A+=T.ordinal(d),b=t._.numberToFormat(d,c,v),b+A}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(d,c,v){var T=t._.includes(c," %")?" ":"",b;return t.options.scalePercentBy100&&(d=d*100),c=c.replace(/\s?\%/,""),b=t._.numberToFormat(d,c,v),t._.includes(b,")")?(b=b.split(""),b.splice(-1,0,T+"%"),b=b.join("")):b=b+T+"%",b},unformat:function(d){var c=t._.stringToNumber(d);return t.options.scalePercentBy100?c*.01:c}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(d,c,v){var T=Math.floor(d/60/60),b=Math.floor((d-T*60*60)/60),A=Math.round(d-T*60*60-b*60);return T+":"+(b<10?"0"+b:b)+":"+(A<10?"0"+A:A)},unformat:function(d){var c=d.split(":"),v=0;return c.length===3?(v=v+Number(c[0])*60*60,v=v+Number(c[1])*60,v=v+Number(c[2])):c.length===2&&(v=v+Number(c[0])*60,v=v+Number(c[1])),Number(v)}})}(),t})})(TN);var Mve=TN.exports;const ca=cl(Mve);function xve(e){let t,n,i,r,a,s,o=go[e[1]]+"",l,d,c;return{c(){t=P("div"),n=P("div"),i=P("input"),r=K(),a=P("label"),s=Le(" "),l=Le(o),w(i,"type","checkbox"),w(i,"id",e[2]),w(a,"for",e[2]),w(t,"class","personal-projection-form-content__column")},m(v,T){ce(v,t,T),m(t,n),m(n,i),i.checked=e[0],m(n,r),m(n,a),m(a,s),m(a,l),d||(c=ct(i,"change",e[4]),d=!0)},p(v,[T]){T&4&&w(i,"id",v[2]),T&1&&(i.checked=v[0]),T&2&&o!==(o=go[v[1]]+"")&&vt(l,o),T&4&&w(a,"for",v[2])},i:ot,o:ot,d(v){v&&_e(t),d=!1,c()}}}function Rve(e,t,n){let{key:i}=t,{visitKey:r=i}=t,{value:a}=t,s;function o(){Td(r)}oa(o),lc(o);function l(){a=this.checked,n(0,a)}return e.$$set=d=>{"key"in d&&n(1,i=d.key),"visitKey"in d&&n(3,r=d.visitKey),"value"in d&&n(0,a=d.value)},e.$$.update=()=>{e.$$.dirty&2&&n(2,s=`personal_projection_parameters[${i}]`)},[a,i,s,r,l]}let ky=class extends Qt{constructor(t){super(),Jt(this,t,Rve,xve,Kt,{key:1,visitKey:3,value:0})}};function $ve(e){let t,n,i=go[e[1]]+"",r;return{c(){t=P("div"),n=P("span"),r=Le(i)},m(a,s){ce(a,t,s),m(t,n),m(n,r)},p(a,s){s&2&&i!==(i=go[a[1]]+"")&&vt(r,i)},d(a){a&&_e(t)}}}function Nve(e){let t,n,i=go[e[1]]+"",r,a,s,o,l,d;return{c(){t=P("div"),n=P("span"),r=Le(i),a=K(),s=P("i"),w(s,"class","fa fa-info-circle ml-1")},m(c,v){ce(c,t,v),m(t,n),m(n,r),m(t,a),m(t,s),l||(d=l_(o=Rm.call(null,t,e[5])),l=!0)},p(c,v){v&2&&i!==(i=go[c[1]]+"")&&vt(r,i),o&&Ga(o.update)&&v&32&&o.update.call(null,c[5])},d(c){c&&_e(t),l=!1,d()}}}function Fve(e){let t,n,i,r,a,s,o,l,d,c;function v(A,E){return E&32&&(r=null),r==null&&(r=!Xn.isNil(A[5])),r?Nve:$ve}let T=v(e,-1),b=T(e);return{c(){t=P("div"),n=P("div"),i=P("label"),b.c(),a=K(),s=P("input"),o=K(),l=P("span"),w(i,"for",e[6]),w(i,"class","col-form-label tpp-form-label"),w(s,"type","string"),w(s,"id",e[6]),w(s,"placeholder",e[4]),w(s,"class","personal-projection-form-validation form-control"),wt(s,"is-invalid",e[3]),wt(s,"is-valid",e[7]),w(l,"class","form-text"),w(n,"class","form-group tpp-form-group"),w(t,"class","personal-projection-form-content__column")},m(A,E){ce(A,t,E),m(t,n),m(n,i),b.m(i,null),m(n,a),m(n,s),Pn(s,e[0]),m(n,o),m(n,l),d||(c=[ct(s,"input",e[9]),ct(s,"blur",e[10])],d=!0)},p(A,[E]){T===(T=v(A,E))&&b?b.p(A,E):(b.d(1),b=T(A),b&&(b.c(),b.m(i,null))),E&64&&w(i,"for",A[6]),E&64&&w(s,"id",A[6]),E&16&&w(s,"placeholder",A[4]),E&1&&Pn(s,A[0]),E&8&&wt(s,"is-invalid",A[3]),E&128&&wt(s,"is-valid",A[7])},i:ot,o:ot,d(A){A&&_e(t),b.d(),d=!1,vi(c)}}}function Lve(e,t,n){let i;Sn(e,jp,E=>n(8,i=E));let{key:r}=t,{visitKey:a=r}=t,{value:s}=t,{hasError:o}=t,{placeholder:l=null}=t,{tooltip:d=null}=t;const{type:c}=pf("ppType");let v,T;function b(){s=this.value,n(0,s)}const A=()=>Td(a);return e.$$set=E=>{"key"in E&&n(1,r=E.key),"visitKey"in E&&n(2,a=E.visitKey),"value"in E&&n(0,s=E.value),"hasError"in E&&n(3,o=E.hasError),"placeholder"in E&&n(4,l=E.placeholder),"tooltip"in E&&n(5,d=E.tooltip)},e.$$.update=()=>{e.$$.dirty&268&&n(7,T=i.has(a)&&!o&&c!=="simulator"),e.$$.dirty&2&&n(6,v=`personal_projection_parameters[${r}]`)},[s,r,a,o,l,d,v,T,i,b,A]}let fv=class extends Qt{constructor(t){super(),Jt(this,t,Lve,Fve,Kt,{key:1,visitKey:2,value:0,hasError:3,placeholder:4,tooltip:5})}};function oI(e,t,n){const i=e.slice();return i[21]=t[n],i[23]=n,i}function lI(e){let t,n;return{c(){t=P("small"),n=Le(e[1]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&2&&vt(n,i[1])},d(i){i&&_e(t)}}}function uI(e){let t,n,i,r=e[23]+1+"",a,s,o=e[21].employer_name+"",l,d,c,v,T,b;function A(){return e[8](e[23])}function E(){return e[9](e[23])}return{c(){t=P("li"),n=P("a"),i=P("div"),a=Le(r),s=Le(`
             `),l=Le(o),d=Le(` 
            `),c=P("span"),v=P("button"),v.innerHTML='<i class="fa fa-remove"></i>',w(i,"class","tab__number-circle"),w(v,"type","button"),w(v,"class","btn btn-custom2 btn-circle-sm float-right"),w(v,"aria-label","Remove Employer Name"),w(n,"class","nav-link"),w(n,"id","section-2-tab-0"),w(n,"role","tab"),w(n,"aria-controls","section-2-pane-0"),w(n,"aria-selected","true"),w(n,"href","#"),wt(n,"active",e[2]===e[23]),w(t,"role","presentation"),w(t,"class","tab__wrapper nav-item")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,a),m(n,s),m(n,l),m(n,d),m(n,c),m(c,v),T||(b=[ct(v,"click",A),ct(n,"click",E)],T=!0)},p(y,I){e=y,I&8&&o!==(o=e[21].employer_name+"")&&vt(l,o),I&4&&wt(n,"active",e[2]===e[23])},d(y){y&&_e(t),T=!1,vi(b)}}}function dI(e){let t,n,i,r;return{c(){t=P("li"),n=P("a"),n.innerHTML=`<span>  
              <span><button type="button" class="btn btn-custom btn-xs" aria-label="Add Employer Name"><span>Add</span> 
                  <i class="fa fa-plus"></i></button></span></span>`,w(n,"class","nav-link"),w(n,"id","section-2-tab-2"),w(n,"role","tab"),w(n,"aria-controls","section-2-pane-2"),w(n,"tabindex","-1"),w(n,"aria-selected","false"),w(n,"href","#"),w(t,"role","presentation"),w(t,"class","tab__wrapper nav-item")},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(n,"click",e[7]),i=!0)},p:ot,d(a){a&&_e(t),i=!1,r()}}}function fI(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we;function Ve(Mt){e[10](Mt)}let Ke={key:`employer_name_${e[2]}`,visitKey:`wages[${e[2]}].employer_name`,tooltip:"Enter the employer name",hasError:io(e[4],e[2],"employer_name")};e[3].wages[e[2]].employer_name!==void 0&&(Ke.value=e[3].wages[e[2]].employer_name),l=new fv({props:Ke}),Oe.push(()=>$e(l,"value",Ve));function yt(Mt){e[11](Mt)}let ht={key:`employer_type_${e[2]}`,visitKey:`wages[${e[2]}].employer_type`,hasError:io(e[4],e[2],"employer_type"),caption:"Select Taxpayer or Spouse",options:e[5]};e[3].wages[e[2]].employer_type!==void 0&&(ht.value=e[3].wages[e[2]].employer_type),v=new um({props:ht}),Oe.push(()=>$e(v,"value",yt));function Je(Mt){e[12](Mt)}let pt={key:`paystub_date_${e[2]}`,visitKey:`wages[${e[2]}].paystub_date`,placeholder:"12/31/1973",hasError:io(e[4],e[2],"paystub_date")};e[3].wages[e[2]].paystub_date!==void 0&&(pt.value=e[3].wages[e[2]].paystub_date),A=new fv({props:pt}),Oe.push(()=>$e(A,"value",Je));function Tt(Mt){e[13](Mt)}let it={key:`age_${e[2]}`,visitKey:`wages[${e[2]}].age`,placeholder:"21",hasError:io(e[4],e[2],"age")};e[3].wages[e[2]].age!==void 0&&(it.value=e[3].wages[e[2]].age),I=new fv({props:it}),Oe.push(()=>$e(I,"value",Tt));function Ge(Mt){e[14](Mt)}let st={key:`business_owned_${e[2]}`,visitKey:`wages[${e[2]}].business_owned`,title:"Business Owned by Taxpayer/Spouse?"};e[3].wages[e[2]].business_owned!==void 0&&(st.value=e[3].wages[e[2]].business_owned),F=new ky({props:st}),Oe.push(()=>$e(F,"value",Ge));function It(Mt){e[15](Mt)}let Ct={key:`covered_by_retirement_plan_${e[2]}`,visitKey:`wages[${e[2]}].covered_by_retirement_plan`,title:"Covered by retirement plan at work"};e[3].wages[e[2]].covered_by_retirement_plan!==void 0&&(Ct.value=e[3].wages[e[2]].covered_by_retirement_plan),H=new ky({props:Ct}),Oe.push(()=>$e(H,"value",It));function bt(Mt){e[16](Mt)}let Rt={key:`wages_${e[2]}`,visitKey:`wages[${e[2]}].wages`,hasError:io(e[4],e[2],"wages"),inputAddon:"$"};e[3].wages[e[2]].wages!==void 0&&(Rt.value=e[3].wages[e[2]].wages),ne=new ns({props:Rt}),Oe.push(()=>$e(ne,"value",bt));function cn(Mt){e[17](Mt)}let nn={key:`federal_income_tax_withheld_${e[2]}`,visitKey:`wages[${e[2]}].federal_income_tax_withheld`,hasError:io(e[4],e[2],"federal_income_tax_withheld"),inputAddon:"$"};e[3].wages[e[2]].federal_income_tax_withheld!==void 0&&(nn.value=e[3].wages[e[2]].federal_income_tax_withheld),Ce=new ns({props:nn}),Oe.push(()=>$e(Ce,"value",cn));function Qe(Mt){e[18](Mt)}let Ft={key:`state_income_tax_withheld_${e[2]}`,visitKey:`wages[${e[2]}].state_income_tax_withheld`,hasError:io(e[4],e[2],"state_income_tax_withheld"),inputAddon:"$"};e[3].wages[e[2]].state_income_tax_withheld!==void 0&&(Ft.value=e[3].wages[e[2]].state_income_tax_withheld),he=new ns({props:Ft}),Oe.push(()=>$e(he,"value",Qe));function Fn(Mt){e[19](Mt)}let He={key:`dependent_care_benefits_${e[2]}`,visitKey:`wages[${e[2]}].dependent_care_benefits`,hasError:io(e[4],e[2],"dependent_care_benefits"),inputAddon:"$"};e[3].wages[e[2]].dependent_care_benefits!==void 0&&(He.value=e[3].wages[e[2]].dependent_care_benefits),We=new ns({props:He}),Oe.push(()=>$e(We,"value",Fn));function Dt(Mt){e[20](Mt)}let Xt={key:`401k_contributions_${e[2]}`,visitKey:`wages[${e[2]}].401k_contributions`,hasError:io(e[4],e[2],"401k_contributions"),inputAddon:"$"};return e[3].wages[e[2]]["401k_contributions"]!==void 0&&(Xt.value=e[3].wages[e[2]]["401k_contributions"]),G=new ns({props:Xt}),Oe.push(()=>$e(G,"value",Dt)),{c(){t=P("div"),n=P("br"),i=K(),r=P("br"),a=K(),s=P("div"),o=P("div"),re(l.$$.fragment),c=K(),re(v.$$.fragment),b=K(),re(A.$$.fragment),y=K(),re(I.$$.fragment),O=K(),M=P("div"),re(F.$$.fragment),L=K(),j=P("div"),re(H.$$.fragment),Q=K(),X=P("div"),te=P("div"),re(ne.$$.fragment),ue=K(),re(Ce.$$.fragment),Y=K(),re(he.$$.fragment),Pe=K(),re(We.$$.fragment),ee=K(),re(G.$$.fragment),Te=K(),De=P("hr"),w(o,"class","personal-projection-form-content__fields"),w(M,"class","personal-projection-form-content__fields"),w(j,"class","personal-projection-form-content__fields"),w(te,"class","personal-projection-form-content__column"),w(X,"class","personal-projection-form-content__fields"),w(t,"id","section-2-pane-0"),w(t,"aria-labelledby","section-2-tab-0"),w(t,"role","tabpanel"),w(t,"aria-hidden","false"),w(t,"class","fade tab tab-collapsed tab-collapsed-expand tab-pane active show")},m(Mt,Xe){ce(Mt,t,Xe),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(s,o),ae(l,o,null),m(o,c),ae(v,o,null),m(o,b),ae(A,o,null),m(o,y),ae(I,o,null),m(s,O),m(s,M),ae(F,M,null),m(s,L),m(s,j),ae(H,j,null),m(s,Q),m(s,X),m(X,te),ae(ne,te,null),m(te,ue),ae(Ce,te,null),m(te,Y),ae(he,te,null),m(te,Pe),ae(We,te,null),m(te,ee),ae(G,te,null),m(t,Te),m(t,De),we=!0},p(Mt,Xe){const Nt={};Xe&4&&(Nt.key=`employer_name_${Mt[2]}`),Xe&4&&(Nt.visitKey=`wages[${Mt[2]}].employer_name`),Xe&20&&(Nt.hasError=io(Mt[4],Mt[2],"employer_name")),!d&&Xe&12&&(d=!0,Nt.value=Mt[3].wages[Mt[2]].employer_name,Ne(()=>d=!1)),l.$set(Nt);const on={};Xe&4&&(on.key=`employer_type_${Mt[2]}`),Xe&4&&(on.visitKey=`wages[${Mt[2]}].employer_type`),Xe&20&&(on.hasError=io(Mt[4],Mt[2],"employer_type")),!T&&Xe&12&&(T=!0,on.value=Mt[3].wages[Mt[2]].employer_type,Ne(()=>T=!1)),v.$set(on);const In={};Xe&4&&(In.key=`paystub_date_${Mt[2]}`),Xe&4&&(In.visitKey=`wages[${Mt[2]}].paystub_date`),Xe&20&&(In.hasError=io(Mt[4],Mt[2],"paystub_date")),!E&&Xe&12&&(E=!0,In.value=Mt[3].wages[Mt[2]].paystub_date,Ne(()=>E=!1)),A.$set(In);const dt={};Xe&4&&(dt.key=`age_${Mt[2]}`),Xe&4&&(dt.visitKey=`wages[${Mt[2]}].age`),Xe&20&&(dt.hasError=io(Mt[4],Mt[2],"age")),!D&&Xe&12&&(D=!0,dt.value=Mt[3].wages[Mt[2]].age,Ne(()=>D=!1)),I.$set(dt);const Zt={};Xe&4&&(Zt.key=`business_owned_${Mt[2]}`),Xe&4&&(Zt.visitKey=`wages[${Mt[2]}].business_owned`),!$&&Xe&12&&($=!0,Zt.value=Mt[3].wages[Mt[2]].business_owned,Ne(()=>$=!1)),F.$set(Zt);const Ln={};Xe&4&&(Ln.key=`covered_by_retirement_plan_${Mt[2]}`),Xe&4&&(Ln.visitKey=`wages[${Mt[2]}].covered_by_retirement_plan`),!V&&Xe&12&&(V=!0,Ln.value=Mt[3].wages[Mt[2]].covered_by_retirement_plan,Ne(()=>V=!1)),H.$set(Ln);const xn={};Xe&4&&(xn.key=`wages_${Mt[2]}`),Xe&4&&(xn.visitKey=`wages[${Mt[2]}].wages`),Xe&20&&(xn.hasError=io(Mt[4],Mt[2],"wages")),!be&&Xe&12&&(be=!0,xn.value=Mt[3].wages[Mt[2]].wages,Ne(()=>be=!1)),ne.$set(xn);const Dn={};Xe&4&&(Dn.key=`federal_income_tax_withheld_${Mt[2]}`),Xe&4&&(Dn.visitKey=`wages[${Mt[2]}].federal_income_tax_withheld`),Xe&20&&(Dn.hasError=io(Mt[4],Mt[2],"federal_income_tax_withheld")),!ie&&Xe&12&&(ie=!0,Dn.value=Mt[3].wages[Mt[2]].federal_income_tax_withheld,Ne(()=>ie=!1)),Ce.$set(Dn);const Un={};Xe&4&&(Un.key=`state_income_tax_withheld_${Mt[2]}`),Xe&4&&(Un.visitKey=`wages[${Mt[2]}].state_income_tax_withheld`),Xe&20&&(Un.hasError=io(Mt[4],Mt[2],"state_income_tax_withheld")),!Me&&Xe&12&&(Me=!0,Un.value=Mt[3].wages[Mt[2]].state_income_tax_withheld,Ne(()=>Me=!1)),he.$set(Un);const qn={};Xe&4&&(qn.key=`dependent_care_benefits_${Mt[2]}`),Xe&4&&(qn.visitKey=`wages[${Mt[2]}].dependent_care_benefits`),Xe&20&&(qn.hasError=io(Mt[4],Mt[2],"dependent_care_benefits")),!qe&&Xe&12&&(qe=!0,qn.value=Mt[3].wages[Mt[2]].dependent_care_benefits,Ne(()=>qe=!1)),We.$set(qn);const ft={};Xe&4&&(ft.key=`401k_contributions_${Mt[2]}`),Xe&4&&(ft.visitKey=`wages[${Mt[2]}].401k_contributions`),Xe&20&&(ft.hasError=io(Mt[4],Mt[2],"401k_contributions")),!me&&Xe&12&&(me=!0,ft.value=Mt[3].wages[Mt[2]]["401k_contributions"],Ne(()=>me=!1)),G.$set(ft)},i(Mt){we||(U(l.$$.fragment,Mt),U(v.$$.fragment,Mt),U(A.$$.fragment,Mt),U(I.$$.fragment,Mt),U(F.$$.fragment,Mt),U(H.$$.fragment,Mt),U(ne.$$.fragment,Mt),U(Ce.$$.fragment,Mt),U(he.$$.fragment,Mt),U(We.$$.fragment,Mt),U(G.$$.fragment,Mt),we=!0)},o(Mt){W(l.$$.fragment,Mt),W(v.$$.fragment,Mt),W(A.$$.fragment,Mt),W(I.$$.fragment,Mt),W(F.$$.fragment,Mt),W(H.$$.fragment,Mt),W(ne.$$.fragment,Mt),W(Ce.$$.fragment,Mt),W(he.$$.fragment,Mt),W(We.$$.fragment,Mt),W(G.$$.fragment,Mt),we=!1},d(Mt){Mt&&_e(t),se(l),se(v),se(A),se(I),se(F),se(H),se(ne),se(Ce),se(he),se(We),se(G)}}}function Hve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function jve(e){let t,n=ca(e[0].fed_inc_primary_job_w2).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","fed_inc_primary_job_w2"),w(t,"class","personal-projection-form-calculation-result-field text-primary personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].fed_inc_primary_job_w2).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Bve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Uve(e){let t,n=ca(e[0].business_salary_taxpayer).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","business_salary_taxpayer"),w(t,"class","personal-projection-form-calculation-result-field text-primary personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].business_salary_taxpayer).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function qve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Wve(e){let t,n=ca(e[0].taxpayer_w2_witholding).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","taxpayer_w2_witholding"),w(t,"class","personal-projection-form-calculation-result-field text-primary personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].taxpayer_w2_witholding).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Vve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function zve(e){let t,n=ca(e[0].taxpayer_state_withholding).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","taxpayer_state_withholding"),w(t,"class","personal-projection-form-calculation-result-field text-primary personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].taxpayer_state_withholding).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Yve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Gve(e){let t,n=ca(e[0].fed_inc_second_job_w2).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","fed_inc_second_job_w2"),w(t,"class","personal-projection-form-calculation-result-field text-danger personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].fed_inc_second_job_w2).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Kve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Xve(e){let t,n=ca(e[0].business_salary_spouse).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","business_salary_spouse"),w(t,"class","personal-projection-form-calculation-result-field text-danger personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].business_salary_spouse).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Qve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function Jve(e){let t,n=ca(e[0].spouse_w2_witholding).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","spouse_w2_witholding"),w(t,"class","personal-projection-form-calculation-result-field text-danger personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].spouse_w2_witholding).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Zve(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function e0e(e){let t,n=ca(e[0].spouse_state_withholding).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","spouse_state_withholding"),w(t,"class","personal-projection-form-calculation-result-field text-danger personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].spouse_state_withholding).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function t0e(e){let t,n,i,r,a=!Xn.isNil(e[1]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt=a&&lI(e),Mt=e[3].wages,Xe=[];for(let kn=0;kn<Mt.length;kn+=1)Xe[kn]=uI(oI(e,Mt,kn));let Nt=e[3].wages.length<8&&dI(e),on=e[3].wages.length>0&&fI(e);function In(kn,Rn){return Rn&1&&($=null),$==null&&($=!!Xn.isNumber(kn[0].fed_inc_primary_job_w2)),$?jve:Hve}let dt=In(e,-1),Zt=dt(e);function Ln(kn,Rn){return Rn&1&&(X=null),X==null&&(X=!!Xn.isNumber(kn[0].business_salary_taxpayer)),X?Uve:Bve}let xn=Ln(e,-1),Dn=xn(e);function Un(kn,Rn){return Rn&1&&(ie=null),ie==null&&(ie=!!Xn.isNumber(kn[0].taxpayer_w2_witholding)),ie?Wve:qve}let qn=Un(e,-1),ft=qn(e);function ni(kn,Rn){return Rn&1&&(qe=null),qe==null&&(qe=!!Xn.isNumber(kn[0].taxpayer_state_withholding)),qe?zve:Vve}let Et=ni(e,-1),un=Et(e);function Ai(kn,Rn){return Rn&1&&(Ke=null),Ke==null&&(Ke=!!Xn.isNumber(kn[0].fed_inc_second_job_w2)),Ke?Gve:Yve}let St=Ai(e,-1),sn=St(e);function ci(kn,Rn){return Rn&1&&(it=null),it==null&&(it=!!Xn.isNumber(kn[0].business_salary_spouse)),it?Xve:Kve}let pi=ci(e,-1),Pi=pi(e);function $i(kn,Rn){return Rn&1&&(Rt=null),Rt==null&&(Rt=!!Xn.isNumber(kn[0].spouse_w2_witholding)),Rt?Jve:Qve}let ji=$i(e,-1),ri=ji(e);function tr(kn,Rn){return Rn&1&&(He=null),He==null&&(He=!!Xn.isNumber(kn[0].spouse_state_withholding)),He?e0e:Zve}let Ei=tr(e,-1),Ti=Ei(e);return{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Wages/W-2s",r=K(),Xt&&Xt.c(),s=K(),o=P("div"),l=K(),d=P("div"),c=P("ul");for(let kn=0;kn<Xe.length;kn+=1)Xe[kn].c();v=K(),Nt&&Nt.c(),T=K(),b=P("div"),on&&on.c(),A=K(),E=P("div"),y=P("div"),I=P("div"),D=P("div"),O=P("label"),O.innerHTML="<span>Taxpayer W-2 Income</span>",M=K(),F=P("div"),Zt.c(),L=K(),j=P("div"),H=P("label"),H.innerHTML="<span>Taxpayer S-Corp Wages</span>",V=K(),Q=P("div"),Dn.c(),te=K(),ne=P("div"),be=P("label"),be.innerHTML="<span>Taxpayer W-2 Withholding</span>",ue=K(),Ce=P("div"),ft.c(),Y=K(),he=P("div"),Me=P("label"),Me.innerHTML="<span>Taxpayer State Withholding</span>",Pe=K(),We=P("div"),un.c(),ee=K(),G=P("div"),me=P("div"),Te=P("div"),De=P("label"),De.innerHTML="<span>Spouse W-2 Income</span>",we=K(),Ve=P("div"),sn.c(),yt=K(),ht=P("div"),Je=P("label"),Je.innerHTML="<span>Spouse S-Corp Wages</span>",pt=K(),Tt=P("div"),Pi.c(),Ge=K(),st=P("div"),It=P("label"),It.innerHTML="<span>Spouse W-2 Withholding</span>",Ct=K(),bt=P("div"),ri.c(),cn=K(),nn=P("div"),Qe=P("label"),Qe.innerHTML="<span>Spouse State Withholding</span>",Ft=K(),Fn=P("div"),Ti.c(),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(c,"role","tablist"),w(c,"class","nav nav-tabs"),w(b,"class","tab-content"),w(d,"id","section-2"),w(O,"id","fed_inc_primary_job_w2"),w(O,"class","col-form-label tpp-form-label text-primary personal-projection-form-calculation-result-field results__row-title"),w(F,"class","input-group"),w(D,"class","form-group tpp-form-group"),w(H,"id","business_salary_taxpayer"),w(H,"class","col-form-label tpp-form-label text-primary personal-projection-form-calculation-result-field results__row-title"),w(Q,"class","input-group"),w(j,"class","form-group tpp-form-group"),w(be,"id","taxpayer_w2_witholding"),w(be,"class","col-form-label tpp-form-label text-primary personal-projection-form-calculation-result-field results__row-title"),w(Ce,"class","input-group"),w(ne,"class","form-group tpp-form-group"),w(Me,"id","taxpayer_state_withholding"),w(Me,"class","col-form-label tpp-form-label text-primary personal-projection-form-calculation-result-field results__row-title"),w(We,"class","input-group"),w(he,"class","form-group tpp-form-group"),w(I,"class","personal-projection-form-content__column"),w(y,"class","personal-projection-form-content__fields"),w(De,"id","fed_inc_second_job_w2"),w(De,"class","col-form-label tpp-form-label text-danger personal-projection-form-calculation-result-field results__row-title"),w(Ve,"class","input-group"),w(Te,"class","form-group tpp-form-group"),w(Je,"id","business_salary_spouse"),w(Je,"class","col-form-label tpp-form-label text-danger personal-projection-form-calculation-result-field results__row-title"),w(Tt,"class","input-group"),w(ht,"class","form-group tpp-form-group"),w(It,"id","spouse_w2_witholding"),w(It,"class","col-form-label tpp-form-label text-danger personal-projection-form-calculation-result-field results__row-title"),w(bt,"class","input-group"),w(st,"class","form-group tpp-form-group"),w(Qe,"id","spouse_state_withholding"),w(Qe,"class","col-form-label tpp-form-label text-danger personal-projection-form-calculation-result-field results__row-title"),w(Fn,"class","input-group"),w(nn,"class","form-group tpp-form-group"),w(me,"class","personal-projection-form-content__column"),w(G,"class","personal-projection-form-content__fields"),w(t,"class","")},m(kn,Rn){ce(kn,t,Rn),m(t,n),m(n,i),m(n,r),Xt&&Xt.m(n,null),m(t,s),m(t,o),m(t,l),m(t,d),m(d,c);for(let ki=0;ki<Xe.length;ki+=1)Xe[ki]&&Xe[ki].m(c,null);m(c,v),Nt&&Nt.m(c,null),m(d,T),m(d,b),on&&on.m(b,null),m(t,A),m(t,E),m(E,y),m(y,I),m(I,D),m(D,O),m(D,M),m(D,F),Zt.m(F,null),m(I,L),m(I,j),m(j,H),m(j,V),m(j,Q),Dn.m(Q,null),m(I,te),m(I,ne),m(ne,be),m(ne,ue),m(ne,Ce),ft.m(Ce,null),m(I,Y),m(I,he),m(he,Me),m(he,Pe),m(he,We),un.m(We,null),m(E,ee),m(E,G),m(G,me),m(me,Te),m(Te,De),m(Te,we),m(Te,Ve),sn.m(Ve,null),m(me,yt),m(me,ht),m(ht,Je),m(ht,pt),m(ht,Tt),Pi.m(Tt,null),m(me,Ge),m(me,st),m(st,It),m(st,Ct),m(st,bt),ri.m(bt,null),m(me,cn),m(me,nn),m(nn,Qe),m(nn,Ft),m(nn,Fn),Ti.m(Fn,null),Dt=!0},p(kn,[Rn]){if(Rn&2&&(a=!Xn.isNil(kn[1])),a?Xt?Xt.p(kn,Rn):(Xt=lI(kn),Xt.c(),Xt.m(n,null)):Xt&&(Xt.d(1),Xt=null),Rn&76){Mt=kn[3].wages;let ki;for(ki=0;ki<Mt.length;ki+=1){const mr=oI(kn,Mt,ki);Xe[ki]?Xe[ki].p(mr,Rn):(Xe[ki]=uI(mr),Xe[ki].c(),Xe[ki].m(c,v))}for(;ki<Xe.length;ki+=1)Xe[ki].d(1);Xe.length=Mt.length}kn[3].wages.length<8?Nt?Nt.p(kn,Rn):(Nt=dI(kn),Nt.c(),Nt.m(c,null)):Nt&&(Nt.d(1),Nt=null),kn[3].wages.length>0?on?(on.p(kn,Rn),Rn&8&&U(on,1)):(on=fI(kn),on.c(),U(on,1),on.m(b,null)):on&&(pn(),W(on,1,1,()=>{on=null}),hn()),dt===(dt=In(kn,Rn))&&Zt?Zt.p(kn,Rn):(Zt.d(1),Zt=dt(kn),Zt&&(Zt.c(),Zt.m(F,null))),xn===(xn=Ln(kn,Rn))&&Dn?Dn.p(kn,Rn):(Dn.d(1),Dn=xn(kn),Dn&&(Dn.c(),Dn.m(Q,null))),qn===(qn=Un(kn,Rn))&&ft?ft.p(kn,Rn):(ft.d(1),ft=qn(kn),ft&&(ft.c(),ft.m(Ce,null))),Et===(Et=ni(kn,Rn))&&un?un.p(kn,Rn):(un.d(1),un=Et(kn),un&&(un.c(),un.m(We,null))),St===(St=Ai(kn,Rn))&&sn?sn.p(kn,Rn):(sn.d(1),sn=St(kn),sn&&(sn.c(),sn.m(Ve,null))),pi===(pi=ci(kn,Rn))&&Pi?Pi.p(kn,Rn):(Pi.d(1),Pi=pi(kn),Pi&&(Pi.c(),Pi.m(Tt,null))),ji===(ji=$i(kn,Rn))&&ri?ri.p(kn,Rn):(ri.d(1),ri=ji(kn),ri&&(ri.c(),ri.m(bt,null))),Ei===(Ei=tr(kn,Rn))&&Ti?Ti.p(kn,Rn):(Ti.d(1),Ti=Ei(kn),Ti&&(Ti.c(),Ti.m(Fn,null)))},i(kn){Dt||(U(on),Dt=!0)},o(kn){W(on),Dt=!1},d(kn){kn&&_e(t),Xt&&Xt.d(),Nn(Xe,kn),Nt&&Nt.d(),on&&on.d(),Zt.d(),Dn.d(),ft.d(),un.d(),sn.d(),Pi.d(),ri.d(),Ti.d()}}}function io(e,t,n){return e.has(`wages[${t}].${n}`)}function n0e(e,t,n){let i,r;Sn(e,hi,j=>n(3,i=j)),Sn(e,__,j=>n(4,r=j));const a=[{value:"TAXPAYER",title:"Taxpayer"},{value:"SPOUSE",title:"Spouse"}];let{serverCalculatedParameters:s}=t,{statusNotice:o=null}=t,l=0;function d(j){hi.update(H=>(n(2,l=0),{...H,wages:H.wages.filter((V,Q)=>Q!=j)}))}function c(){hi.update(j=>{const H=Xn.concat(j.wages,J$());return n(2,l=H.length-1),{...j,wages:H}})}const v=j=>d(j),T=j=>n(2,l=j);function b(j){e.$$.not_equal(i.wages[l].employer_name,j)&&(i.wages[l].employer_name=j,hi.set(i))}function A(j){e.$$.not_equal(i.wages[l].employer_type,j)&&(i.wages[l].employer_type=j,hi.set(i))}function E(j){e.$$.not_equal(i.wages[l].paystub_date,j)&&(i.wages[l].paystub_date=j,hi.set(i))}function y(j){e.$$.not_equal(i.wages[l].age,j)&&(i.wages[l].age=j,hi.set(i))}function I(j){e.$$.not_equal(i.wages[l].business_owned,j)&&(i.wages[l].business_owned=j,hi.set(i))}function D(j){e.$$.not_equal(i.wages[l].covered_by_retirement_plan,j)&&(i.wages[l].covered_by_retirement_plan=j,hi.set(i))}function O(j){e.$$.not_equal(i.wages[l].wages,j)&&(i.wages[l].wages=j,hi.set(i))}function M(j){e.$$.not_equal(i.wages[l].federal_income_tax_withheld,j)&&(i.wages[l].federal_income_tax_withheld=j,hi.set(i))}function F(j){e.$$.not_equal(i.wages[l].state_income_tax_withheld,j)&&(i.wages[l].state_income_tax_withheld=j,hi.set(i))}function $(j){e.$$.not_equal(i.wages[l].dependent_care_benefits,j)&&(i.wages[l].dependent_care_benefits=j,hi.set(i))}function L(j){e.$$.not_equal(i.wages[l]["401k_contributions"],j)&&(i.wages[l]["401k_contributions"]=j,hi.set(i))}return e.$$set=j=>{"serverCalculatedParameters"in j&&n(0,s=j.serverCalculatedParameters),"statusNotice"in j&&n(1,o=j.statusNotice)},[s,o,l,i,r,a,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L]}class i0e extends Qt{constructor(t){super(),Jt(this,t,n0e,t0e,Kt,{serverCalculatedParameters:0,statusNotice:1})}}function cI(e){let t,n,i,r;return{c(){t=P("div"),n=Le(e[3]),w(t,"class","form-control-twin__action")},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(t,"click",e[10]),i=!0)},p(a,s){s&8&&vt(n,a[3])},d(a){a&&_e(t),i=!1,r()}}}function r0e(e){let t,n,i,r,a,s,o,l,d=e[4]&&cI(e);return{c(){t=P("div"),n=P("div"),i=Le(e[1]),r=K(),a=P("input"),s=K(),d&&d.c(),w(n,"class","form-control-twin__type-label"),a.required="",w(a,"placeholder",e[2]),w(a,"type","number"),w(a,"id",e[8]),w(a,"class","personal-projection-form-section-4 personal-projection-form-validation form-control rounded-0"),wt(a,"is-invalid",e[6]),wt(a,"is-valid",e[9]),w(t,"class","form-control-twin")},m(c,v){ce(c,t,v),m(t,n),m(n,i),m(t,r),m(t,a),Pn(a,e[0]),m(t,s),d&&d.m(t,null),o||(l=[ct(a,"input",e[13]),ct(a,"blur",e[14]),ct(a,"input",function(){Ga(e[7])&&e[7].apply(this,arguments)})],o=!0)},p(c,[v]){e=c,v&2&&vt(i,e[1]),v&4&&w(a,"placeholder",e[2]),v&256&&w(a,"id",e[8]),v&1&&Ri(a.value)!==e[0]&&Pn(a,e[0]),v&64&&wt(a,"is-invalid",e[6]),v&512&&wt(a,"is-valid",e[9]),e[4]?d?d.p(e,v):(d=cI(e),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},i:ot,o:ot,d(c){c&&_e(t),d&&d.d(),o=!1,vi(l)}}}function a0e(e,t,n){let i,r;Sn(e,jp,M=>n(12,r=M));const a=Qy(),{type:s}=pf("ppType");let{key:o}=t,{label:l=""}=t,{placeholder:d="0.0"}=t,{actionLabel:c=""}=t,{actionShow:v}=t,{visitKey:T=o}=t,{value:b=0}=t,{hasError:A}=t,{handleChange:E=null}=t,y;function I(){a("click")}function D(){b=Ri(this.value),n(0,b)}const O=()=>Td(T);return e.$$set=M=>{"key"in M&&n(11,o=M.key),"label"in M&&n(1,l=M.label),"placeholder"in M&&n(2,d=M.placeholder),"actionLabel"in M&&n(3,c=M.actionLabel),"actionShow"in M&&n(4,v=M.actionShow),"visitKey"in M&&n(5,T=M.visitKey),"value"in M&&n(0,b=M.value),"hasError"in M&&n(6,A=M.hasError),"handleChange"in M&&n(7,E=M.handleChange)},e.$$.update=()=>{e.$$.dirty&2048&&n(8,y=`personal_projection_parameters[${o}]`),e.$$.dirty&4192&&n(9,i=r.has(T)&&!A&&s!=="simulator")},[b,l,d,c,v,T,A,E,y,i,I,o,r,D,O]}class jv extends Qt{constructor(t){super(),Jt(this,t,a0e,r0e,Kt,{key:11,label:1,placeholder:2,actionLabel:3,actionShow:4,visitKey:5,value:0,hasError:6,handleChange:7})}}function s0e(e){let t,n,i=go[`${e[0]}_taxpayer`]+"",r;return{c(){t=P("div"),n=P("span"),r=Le(i)},m(a,s){ce(a,t,s),m(t,n),m(n,r)},p(a,s){s&1&&i!==(i=go[`${a[0]}_taxpayer`]+"")&&vt(r,i)},d(a){a&&_e(t)}}}function o0e(e){let t,n,i=go[`${e[0]}_taxpayer`]+"",r,a,s,o,l,d;return{c(){t=P("div"),n=P("span"),r=Le(i),a=K(),s=P("i"),w(s,"class","fa fa-info-circle ml-1")},m(c,v){ce(c,t,v),m(t,n),m(n,r),m(t,a),m(t,s),l||(d=l_(o=Rm.call(null,t,e[1])),l=!0)},p(c,v){v&1&&i!==(i=go[`${c[0]}_taxpayer`]+"")&&vt(r,i),o&&Ga(o.update)&&v&2&&o.update.call(null,c[1])},d(c){c&&_e(t),l=!1,d()}}}function l0e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O;function M(Q,X){return X&2&&(r=null),r==null&&(r=!Xn.isNil(Q[1])),r?o0e:s0e}let F=M(e,-1),$=F(e);function L(Q){e[9](Q)}let j={key:`${e[0]}_taxpayer`,hasError:e[5].has(`${e[0]}_taxpayer`),label:"Taxpayer",actionLabel:"Spouse ›",actionShow:!e[4]};e[3][`${e[0]}_taxpayer`]!==void 0&&(j.value=e[3][`${e[0]}_taxpayer`]),v=new jv({props:j}),Oe.push(()=>$e(v,"value",L)),v.$on("click",e[6]);function H(Q){e[10](Q)}let V={key:`${e[0]}_spouse`,hasError:e[5].has(`${e[0]}_spouse`),label:"Spouse",actionLabel:"‹ Hide",actionShow:e[4]&&e[2]};return e[3][`${e[0]}_spouse`]!==void 0&&(V.value=e[3][`${e[0]}_spouse`]),E=new jv({props:V}),Oe.push(()=>$e(E,"value",H)),E.$on("click",e[7]),{c(){t=P("div"),n=P("div"),i=P("label"),$.c(),s=K(),o=P("span"),l=P("div"),l.innerHTML='<span class="input-group-text">$</span>',d=K(),c=P("div"),re(v.$$.fragment),b=K(),A=P("div"),re(E.$$.fragment),I=K(),D=P("span"),w(i,"for",a=`personal_projection_parameters[${e[0]}_taxpayer]`),w(i,"class","col-form-label tpp-form-label"),w(l,"class","input-group-prepend"),w(c,"class","input-group-twin__part"),w(A,"class","input-group-twin__part input-group-twin__part_second"),wt(A,"input-group-twin__part_hidden",!e[4]),w(o,"class","input-group input-group-twin"),w(D,"class","form-text"),w(n,"class","form-group tpp-form-group"),w(t,"class","personal-projection-form-content__column")},m(Q,X){ce(Q,t,X),m(t,n),m(n,i),$.m(i,null),m(n,s),m(n,o),m(o,l),m(o,d),m(o,c),ae(v,c,null),m(o,b),m(o,A),ae(E,A,null),m(n,I),m(n,D),O=!0},p(Q,[X]){F===(F=M(Q,X))&&$?$.p(Q,X):($.d(1),$=F(Q),$&&($.c(),$.m(i,null))),(!O||X&1&&a!==(a=`personal_projection_parameters[${Q[0]}_taxpayer]`))&&w(i,"for",a);const te={};X&1&&(te.key=`${Q[0]}_taxpayer`),X&33&&(te.hasError=Q[5].has(`${Q[0]}_taxpayer`)),X&16&&(te.actionShow=!Q[4]),!T&&X&9&&(T=!0,te.value=Q[3][`${Q[0]}_taxpayer`],Ne(()=>T=!1)),v.$set(te);const ne={};X&1&&(ne.key=`${Q[0]}_spouse`),X&33&&(ne.hasError=Q[5].has(`${Q[0]}_spouse`)),X&20&&(ne.actionShow=Q[4]&&Q[2]),!y&&X&9&&(y=!0,ne.value=Q[3][`${Q[0]}_spouse`],Ne(()=>y=!1)),E.$set(ne),(!O||X&16)&&wt(A,"input-group-twin__part_hidden",!Q[4])},i(Q){O||(U(v.$$.fragment,Q),U(E.$$.fragment,Q),O=!0)},o(Q){W(v.$$.fragment,Q),W(E.$$.fragment,Q),O=!1},d(Q){Q&&_e(t),$.d(),se(v),se(E)}}}function u0e(e,t,n){let i,r,a;Sn(e,hi,E=>n(3,r=E)),Sn(e,__,E=>n(5,a=E));let{key:s}=t,{tooltip:o=null}=t,l,d=!1;function c(E){n(4,l=!0),n(8,d=!0)}function v(E){n(4,l=!1)}function T(){i&&Td(`${s}_spouse`)}oa(T),lc(T);function b(E){e.$$.not_equal(r[`${s}_taxpayer`],E)&&(r[`${s}_taxpayer`]=E,hi.set(r))}function A(E){e.$$.not_equal(r[`${s}_spouse`],E)&&(r[`${s}_spouse`]=E,hi.set(r))}return e.$$set=E=>{"key"in E&&n(0,s=E.key),"tooltip"in E&&n(1,o=E.tooltip)},e.$$.update=()=>{e.$$.dirty&9&&n(2,i=r[`${s}_spouse`]==0),e.$$.dirty&260&&n(4,l=!i||d)},[s,o,i,r,l,a,c,v,d,b,A]}class gr extends Qt{constructor(t){super(),Jt(this,t,u0e,l0e,Kt,{key:0,tooltip:1})}}function _I(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function d0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be=a&&_I(e);return d=new gr({props:{key:"social_security",tooltip:"Enter the portion of Social Security benefits"}}),v=new gr({props:{key:"fed_inc_bank_1_interest"}}),b=new gr({props:{key:"fed_inc_ordinary_dividends"}}),E=new gr({props:{key:"fed_inc_money_market_1_interest"}}),I=new gr({props:{key:"fed_inc_stock_qualified_div"}}),O=new gr({props:{key:"fed_inc_stock_st_div_gains"}}),F=new gr({props:{key:"fed_inc_stock_lt_cap_gains"}}),L=new gr({props:{key:"fed_inc_adj_capital_losses_this_year"}}),H=new gr({props:{key:"fed_inc_stock_60man_cap_gains"}}),Q=new gr({props:{key:"fed_inc_other_income"}}),te=new gr({props:{key:"fed_inc_ca_tax_refund"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Income",r=K(),be&&be.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),c=K(),re(v.$$.fragment),T=K(),re(b.$$.fragment),A=K(),re(E.$$.fragment),y=K(),re(I.$$.fragment),D=K(),re(O.$$.fragment),M=K(),re(F.$$.fragment),$=K(),re(L.$$.fragment),j=K(),re(H.$$.fragment),V=K(),re(Q.$$.fragment),X=K(),re(te.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields"),w(t,"class","")},m(ue,Ce){ce(ue,t,Ce),m(t,n),m(n,i),m(n,r),be&&be.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(l,c),ae(v,l,null),m(l,T),ae(b,l,null),m(l,A),ae(E,l,null),m(l,y),ae(I,l,null),m(l,D),ae(O,l,null),m(l,M),ae(F,l,null),m(l,$),ae(L,l,null),m(l,j),ae(H,l,null),m(l,V),ae(Q,l,null),m(l,X),ae(te,l,null),ne=!0},p(ue,[Ce]){Ce&1&&(a=!Xn.isNil(ue[0])),a?be?be.p(ue,Ce):(be=_I(ue),be.c(),be.m(n,null)):be&&(be.d(1),be=null)},i(ue){ne||(U(d.$$.fragment,ue),U(v.$$.fragment,ue),U(b.$$.fragment,ue),U(E.$$.fragment,ue),U(I.$$.fragment,ue),U(O.$$.fragment,ue),U(F.$$.fragment,ue),U(L.$$.fragment,ue),U(H.$$.fragment,ue),U(Q.$$.fragment,ue),U(te.$$.fragment,ue),ne=!0)},o(ue){W(d.$$.fragment,ue),W(v.$$.fragment,ue),W(b.$$.fragment,ue),W(E.$$.fragment,ue),W(I.$$.fragment,ue),W(O.$$.fragment,ue),W(F.$$.fragment,ue),W(L.$$.fragment,ue),W(H.$$.fragment,ue),W(Q.$$.fragment,ue),W(te.$$.fragment,ue),ne=!1},d(ue){ue&&_e(t),be&&be.d(),se(d),se(v),se(b),se(E),se(I),se(O),se(F),se(L),se(H),se(Q),se(te)}}}function f0e(e,t,n){let{statusNotice:i=null}=t;return e.$$set=r=>{"statusNotice"in r&&n(0,i=r.statusNotice)},[i]}class c0e extends Qt{constructor(t){super(),Jt(this,t,f0e,d0e,Kt,{statusNotice:0})}}function pI(e,t,n){const i=e.slice();return i[29]=t[n],i[31]=n,i}function hI(e){let t,n;return{c(){t=P("small"),n=Le(e[1]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r[0]&2&&vt(n,i[1])},d(i){i&&_e(t)}}}function mI(e){let t,n,i,r=e[31]+1+"",a,s,o=e[29].name+"",l,d,c,v,T,b;function A(){return e[11](e[31])}function E(){return e[12](e[31])}return{c(){t=P("li"),n=P("a"),i=P("div"),a=Le(r),s=Le(`
             `),l=Le(o),d=Le(` 
            `),c=P("span"),v=P("button"),v.innerHTML='<i class="fa fa-remove"></i>',w(i,"class","tab__number-circle"),w(v,"type","button"),w(v,"class","btn btn-custom2 btn-circle-sm float-right"),w(v,"aria-label","Remove Employer Name"),w(n,"class","nav-link"),w(n,"id","section-2-tab-0"),w(n,"role","tab"),w(n,"aria-controls","section-2-pane-0"),w(n,"aria-selected","true"),w(n,"href","#"),wt(n,"active",e[2]===e[31]),w(t,"role","presentation"),w(t,"class","tab__wrapper nav-item")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,a),m(n,s),m(n,l),m(n,d),m(n,c),m(c,v),T||(b=[ct(v,"click",A),ct(n,"click",E)],T=!0)},p(y,I){e=y,I[0]&32&&o!==(o=e[29].name+"")&&vt(l,o),I[0]&4&&wt(n,"active",e[2]===e[31])},d(y){y&&_e(t),T=!1,vi(b)}}}function gI(e){let t,n,i,r;return{c(){t=P("li"),n=P("a"),n.innerHTML=`<span>  
              <span><button type="button" class="btn btn-custom btn-xs" aria-label="Add Rental Real Estate"><span>Add</span> 
                  <i class="fa fa-plus"></i></button></span></span>`,w(n,"class","nav-link"),w(n,"id","section-2-tab-2"),w(n,"role","tab"),w(n,"aria-controls","section-2-pane-2"),w(n,"tabindex","-1"),w(n,"aria-selected","false"),w(n,"href","#"),w(t,"role","presentation"),w(t,"class","tab__wrapper nav-item")},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(n,"click",e[9]),i=!0)},p:ot,d(a){a&&_e(t),i=!1,r()}}}function vI(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft=ca(e[4]).format("$0,0[.]00")+"",Fn,He,Dt,Xt,Mt,Xe,Nt,on,In=ca(e[3]).format("$0,0[.]00")+"",dt,Zt,Ln,xn,Dn,Un,qn,ft,ni=ca(e[6]).format("$0,0[.]00")+"",Et,un,Ai,St,sn,ci;function pi(Ht){e[13](Ht)}let Pi={key:`name_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].name`,tooltip:"Enter the property name",hasError:Ca(e[7],e[2],"name")};e[5].rental_real_estate[e[2]].name!==void 0&&(Pi.value=e[5].rental_real_estate[e[2]].name),l=new fv({props:Pi}),Oe.push(()=>$e(l,"value",pi));function $i(Ht){e[14](Ht)}let ji={key:`income_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].income`,hasError:Ca(e[7],e[2],"income"),inputAddon:"$"};e[5].rental_real_estate[e[2]].income!==void 0&&(ji.value=e[5].rental_real_estate[e[2]].income),v=new ns({props:ji}),Oe.push(()=>$e(v,"value",$i));function ri(Ht){e[15](Ht)}let tr={key:`advertising_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].advertising`,hasError:Ca(e[7],e[2],"advertising"),inputAddon:"$"};e[5].rental_real_estate[e[2]].advertising!==void 0&&(tr.value=e[5].rental_real_estate[e[2]].advertising),E=new ns({props:tr}),Oe.push(()=>$e(E,"value",ri));function Ei(Ht){e[16](Ht)}let Ti={key:`auto_expenses_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].auto_expenses`,hasError:Ca(e[7],e[2],"auto_expenses"),inputAddon:"$"};e[5].rental_real_estate[e[2]].auto_expenses!==void 0&&(Ti.value=e[5].rental_real_estate[e[2]].auto_expenses),D=new ns({props:Ti}),Oe.push(()=>$e(D,"value",Ei));function kn(Ht){e[17](Ht)}let Rn={key:`cleaning_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].cleaning`,hasError:Ca(e[7],e[2],"cleaning"),inputAddon:"$"};e[5].rental_real_estate[e[2]].cleaning!==void 0&&(Rn.value=e[5].rental_real_estate[e[2]].cleaning),F=new ns({props:Rn}),Oe.push(()=>$e(F,"value",kn));function ki(Ht){e[18](Ht)}let mr={key:`commissions_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].commissions`,hasError:Ca(e[7],e[2],"commissions"),inputAddon:"$"};e[5].rental_real_estate[e[2]].commissions!==void 0&&(mr.value=e[5].rental_real_estate[e[2]].commissions),j=new ns({props:mr}),Oe.push(()=>$e(j,"value",ki));function _r(Ht){e[19](Ht)}let Mi={key:`depreciation_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].depreciation`,hasError:Ca(e[7],e[2],"depreciation"),inputAddon:"$"};e[5].rental_real_estate[e[2]].depreciation!==void 0&&(Mi.value=e[5].rental_real_estate[e[2]].depreciation),Q=new ns({props:Mi}),Oe.push(()=>$e(Q,"value",_r));function di(Ht){e[20](Ht)}let Yi={key:`insurance_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].insurance`,hasError:Ca(e[7],e[2],"insurance"),inputAddon:"$"};e[5].rental_real_estate[e[2]].insurance!==void 0&&(Yi.value=e[5].rental_real_estate[e[2]].insurance),ne=new ns({props:Yi}),Oe.push(()=>$e(ne,"value",di));function na(Ht){e[21](Ht)}let Ki={key:`legal_expenses_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].legal_expenses`,hasError:Ca(e[7],e[2],"legal_expenses"),inputAddon:"$"};e[5].rental_real_estate[e[2]].legal_expenses!==void 0&&(Ki.value=e[5].rental_real_estate[e[2]].legal_expenses),Ce=new ns({props:Ki}),Oe.push(()=>$e(Ce,"value",na));function Rr(Ht){e[22](Ht)}let Di={key:`management_fees_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].management_fees`,hasError:Ca(e[7],e[2],"management_fees"),inputAddon:"$"};e[5].rental_real_estate[e[2]].management_fees!==void 0&&(Di.value=e[5].rental_real_estate[e[2]].management_fees),he=new ns({props:Di}),Oe.push(()=>$e(he,"value",Rr));function Wi(Ht){e[23](Ht)}let Bi={key:`mortage_interest_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].mortage_interest`,hasError:Ca(e[7],e[2],"mortage_interest"),inputAddon:"$"};e[5].rental_real_estate[e[2]].mortage_interest!==void 0&&(Bi.value=e[5].rental_real_estate[e[2]].mortage_interest),We=new ns({props:Bi}),Oe.push(()=>$e(We,"value",Wi));function _a(Ht){e[24](Ht)}let xi={key:`repairs_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].repairs`,hasError:Ca(e[7],e[2],"repairs"),inputAddon:"$"};e[5].rental_real_estate[e[2]].repairs!==void 0&&(xi.value=e[5].rental_real_estate[e[2]].repairs),G=new ns({props:xi}),Oe.push(()=>$e(G,"value",_a));function Kr(Ht){e[25](Ht)}let kr={key:`supplies_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].supplies`,hasError:Ca(e[7],e[2],"supplies"),inputAddon:"$"};e[5].rental_real_estate[e[2]].supplies!==void 0&&(kr.value=e[5].rental_real_estate[e[2]].supplies),De=new ns({props:kr}),Oe.push(()=>$e(De,"value",Kr));function Ji(Ht){e[26](Ht)}let ia={key:`taxes_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].taxes`,hasError:Ca(e[7],e[2],"taxes"),inputAddon:"$"};e[5].rental_real_estate[e[2]].taxes!==void 0&&(ia.value=e[5].rental_real_estate[e[2]].taxes),Ke=new ns({props:ia}),Oe.push(()=>$e(Ke,"value",Ji));function la(Ht){e[27](Ht)}let Ir={key:`utilities_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].utilities`,hasError:Ca(e[7],e[2],"utilities"),inputAddon:"$"};e[5].rental_real_estate[e[2]].utilities!==void 0&&(Ir.value=e[5].rental_real_estate[e[2]].utilities),Je=new ns({props:Ir}),Oe.push(()=>$e(Je,"value",la));function Ur(Ht){e[28](Ht)}let qr={key:`other_${e[2]}`,visitKey:`rental_real_estate[${e[2]}].other`,hasError:Ca(e[7],e[2],"other"),inputAddon:"$"};return e[5].rental_real_estate[e[2]].other!==void 0&&(qr.value=e[5].rental_real_estate[e[2]].other),it=new ns({props:qr}),Oe.push(()=>$e(it,"value",Ur)),{c(){t=P("div"),n=P("br"),i=K(),r=P("br"),a=K(),s=P("div"),o=P("div"),re(l.$$.fragment),c=K(),re(v.$$.fragment),b=K(),A=P("div"),re(E.$$.fragment),I=K(),re(D.$$.fragment),M=K(),re(F.$$.fragment),L=K(),re(j.$$.fragment),V=K(),re(Q.$$.fragment),te=K(),re(ne.$$.fragment),ue=K(),re(Ce.$$.fragment),Y=K(),re(he.$$.fragment),Pe=K(),re(We.$$.fragment),ee=K(),re(G.$$.fragment),Te=K(),re(De.$$.fragment),Ve=K(),re(Ke.$$.fragment),ht=K(),re(Je.$$.fragment),Tt=K(),re(it.$$.fragment),st=K(),It=P("div"),Ct=P("div"),bt=P("div"),Rt=P("label"),Rt.innerHTML="<span>Income</span>",cn=K(),nn=P("div"),Qe=P("div"),Fn=Le(Ft),He=K(),Dt=P("div"),Xt=P("div"),Mt=P("label"),Mt.innerHTML="<span>Expenses</span>",Xe=K(),Nt=P("div"),on=P("div"),dt=Le(In),Zt=K(),Ln=P("div"),xn=P("div"),Dn=P("label"),Dn.innerHTML="<span>Total</span>",Un=K(),qn=P("div"),ft=P("div"),Et=Le(ni),un=K(),Ai=P("hr"),St=K(),sn=P("div"),sn.innerHTML="<br/>",w(o,"class","personal-projection-form-content__fields"),w(A,"class","personal-projection-form-content__fields"),w(Rt,"id","current_rre_income"),w(Rt,"class","col-form-label tpp-form-label text-success tpp-form-total"),w(Qe,"aria-labelledby","current_rre_income"),w(Qe,"class","personal-projection-form-calculation-result-field text-success tpp-form-total"),w(nn,"class","input-group"),w(bt,"class","form-group tpp-form-group"),w(Ct,"class","personal-projection-form-content__column"),w(Mt,"id","current_rre_expenses"),w(Mt,"class","col-form-label tpp-form-label text-danger tpp-form-total"),w(on,"aria-labelledby","current_rre_expenses"),w(on,"class","personal-projection-form-calculation-result-field text-danger tpp-form-total"),w(Nt,"class","input-group"),w(Xt,"class","form-group tpp-form-group"),w(Dt,"class","personal-projection-form-content__column"),w(Dn,"id","current_rre_total"),w(Dn,"class","col-form-label tpp-form-label tpp-form-total"),wt(Dn,"text-success",e[6]>=0),wt(Dn,"text-danger",e[6]<0),w(ft,"aria-labelledby","current_rre_total"),w(ft,"class","personal-projection-form-calculation-result-field tpp-form-total"),wt(ft,"text-success",e[6]>=0),wt(ft,"text-danger",e[6]<0),w(qn,"class","input-group"),w(xn,"class","form-group tpp-form-group"),w(Ln,"class","personal-projection-form-content__column"),w(It,"class","personal-projection-form-content__fields"),w(t,"id","section-4-pane-0"),w(t,"aria-labelledby","section-4-tab-0"),w(t,"role","tabpanel"),w(t,"aria-hidden","false"),w(t,"class","fade tab tab-pane active show"),w(sn,"id","section-4-pane-1"),w(sn,"aria-labelledby","section-4-tab-1"),w(sn,"role","tabpanel"),w(sn,"aria-hidden","true"),w(sn,"class","fade tab tab-pane")},m(Ht,et){ce(Ht,t,et),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(s,o),ae(l,o,null),m(o,c),ae(v,o,null),m(s,b),m(s,A),ae(E,A,null),m(A,I),ae(D,A,null),m(A,M),ae(F,A,null),m(A,L),ae(j,A,null),m(A,V),ae(Q,A,null),m(A,te),ae(ne,A,null),m(A,ue),ae(Ce,A,null),m(A,Y),ae(he,A,null),m(A,Pe),ae(We,A,null),m(A,ee),ae(G,A,null),m(A,Te),ae(De,A,null),m(A,Ve),ae(Ke,A,null),m(A,ht),ae(Je,A,null),m(A,Tt),ae(it,A,null),m(s,st),m(s,It),m(It,Ct),m(Ct,bt),m(bt,Rt),m(bt,cn),m(bt,nn),m(nn,Qe),m(Qe,Fn),m(It,He),m(It,Dt),m(Dt,Xt),m(Xt,Mt),m(Xt,Xe),m(Xt,Nt),m(Nt,on),m(on,dt),m(It,Zt),m(It,Ln),m(Ln,xn),m(xn,Dn),m(xn,Un),m(xn,qn),m(qn,ft),m(ft,Et),m(t,un),m(t,Ai),ce(Ht,St,et),ce(Ht,sn,et),ci=!0},p(Ht,et){const ln={};et[0]&4&&(ln.key=`name_${Ht[2]}`),et[0]&4&&(ln.visitKey=`rental_real_estate[${Ht[2]}].name`),et[0]&132&&(ln.hasError=Ca(Ht[7],Ht[2],"name")),!d&&et[0]&36&&(d=!0,ln.value=Ht[5].rental_real_estate[Ht[2]].name,Ne(()=>d=!1)),l.$set(ln);const Vi={};et[0]&4&&(Vi.key=`income_${Ht[2]}`),et[0]&4&&(Vi.visitKey=`rental_real_estate[${Ht[2]}].income`),et[0]&132&&(Vi.hasError=Ca(Ht[7],Ht[2],"income")),!T&&et[0]&36&&(T=!0,Vi.value=Ht[5].rental_real_estate[Ht[2]].income,Ne(()=>T=!1)),v.$set(Vi);const Ar={};et[0]&4&&(Ar.key=`advertising_${Ht[2]}`),et[0]&4&&(Ar.visitKey=`rental_real_estate[${Ht[2]}].advertising`),et[0]&132&&(Ar.hasError=Ca(Ht[7],Ht[2],"advertising")),!y&&et[0]&36&&(y=!0,Ar.value=Ht[5].rental_real_estate[Ht[2]].advertising,Ne(()=>y=!1)),E.$set(Ar);const vr={};et[0]&4&&(vr.key=`auto_expenses_${Ht[2]}`),et[0]&4&&(vr.visitKey=`rental_real_estate[${Ht[2]}].auto_expenses`),et[0]&132&&(vr.hasError=Ca(Ht[7],Ht[2],"auto_expenses")),!O&&et[0]&36&&(O=!0,vr.value=Ht[5].rental_real_estate[Ht[2]].auto_expenses,Ne(()=>O=!1)),D.$set(vr);const ir={};et[0]&4&&(ir.key=`cleaning_${Ht[2]}`),et[0]&4&&(ir.visitKey=`rental_real_estate[${Ht[2]}].cleaning`),et[0]&132&&(ir.hasError=Ca(Ht[7],Ht[2],"cleaning")),!$&&et[0]&36&&($=!0,ir.value=Ht[5].rental_real_estate[Ht[2]].cleaning,Ne(()=>$=!1)),F.$set(ir);const Si={};et[0]&4&&(Si.key=`commissions_${Ht[2]}`),et[0]&4&&(Si.visitKey=`rental_real_estate[${Ht[2]}].commissions`),et[0]&132&&(Si.hasError=Ca(Ht[7],Ht[2],"commissions")),!H&&et[0]&36&&(H=!0,Si.value=Ht[5].rental_real_estate[Ht[2]].commissions,Ne(()=>H=!1)),j.$set(Si);const pr={};et[0]&4&&(pr.key=`depreciation_${Ht[2]}`),et[0]&4&&(pr.visitKey=`rental_real_estate[${Ht[2]}].depreciation`),et[0]&132&&(pr.hasError=Ca(Ht[7],Ht[2],"depreciation")),!X&&et[0]&36&&(X=!0,pr.value=Ht[5].rental_real_estate[Ht[2]].depreciation,Ne(()=>X=!1)),Q.$set(pr);const yi={};et[0]&4&&(yi.key=`insurance_${Ht[2]}`),et[0]&4&&(yi.visitKey=`rental_real_estate[${Ht[2]}].insurance`),et[0]&132&&(yi.hasError=Ca(Ht[7],Ht[2],"insurance")),!be&&et[0]&36&&(be=!0,yi.value=Ht[5].rental_real_estate[Ht[2]].insurance,Ne(()=>be=!1)),ne.$set(yi);const Dr={};et[0]&4&&(Dr.key=`legal_expenses_${Ht[2]}`),et[0]&4&&(Dr.visitKey=`rental_real_estate[${Ht[2]}].legal_expenses`),et[0]&132&&(Dr.hasError=Ca(Ht[7],Ht[2],"legal_expenses")),!ie&&et[0]&36&&(ie=!0,Dr.value=Ht[5].rental_real_estate[Ht[2]].legal_expenses,Ne(()=>ie=!1)),Ce.$set(Dr);const Wr={};et[0]&4&&(Wr.key=`management_fees_${Ht[2]}`),et[0]&4&&(Wr.visitKey=`rental_real_estate[${Ht[2]}].management_fees`),et[0]&132&&(Wr.hasError=Ca(Ht[7],Ht[2],"management_fees")),!Me&&et[0]&36&&(Me=!0,Wr.value=Ht[5].rental_real_estate[Ht[2]].management_fees,Ne(()=>Me=!1)),he.$set(Wr);const Sr={};et[0]&4&&(Sr.key=`mortage_interest_${Ht[2]}`),et[0]&4&&(Sr.visitKey=`rental_real_estate[${Ht[2]}].mortage_interest`),et[0]&132&&(Sr.hasError=Ca(Ht[7],Ht[2],"mortage_interest")),!qe&&et[0]&36&&(qe=!0,Sr.value=Ht[5].rental_real_estate[Ht[2]].mortage_interest,Ne(()=>qe=!1)),We.$set(Sr);const hr={};et[0]&4&&(hr.key=`repairs_${Ht[2]}`),et[0]&4&&(hr.visitKey=`rental_real_estate[${Ht[2]}].repairs`),et[0]&132&&(hr.hasError=Ca(Ht[7],Ht[2],"repairs")),!me&&et[0]&36&&(me=!0,hr.value=Ht[5].rental_real_estate[Ht[2]].repairs,Ne(()=>me=!1)),G.$set(hr);const Vn={};et[0]&4&&(Vn.key=`supplies_${Ht[2]}`),et[0]&4&&(Vn.visitKey=`rental_real_estate[${Ht[2]}].supplies`),et[0]&132&&(Vn.hasError=Ca(Ht[7],Ht[2],"supplies")),!we&&et[0]&36&&(we=!0,Vn.value=Ht[5].rental_real_estate[Ht[2]].supplies,Ne(()=>we=!1)),De.$set(Vn);const dn={};et[0]&4&&(dn.key=`taxes_${Ht[2]}`),et[0]&4&&(dn.visitKey=`rental_real_estate[${Ht[2]}].taxes`),et[0]&132&&(dn.hasError=Ca(Ht[7],Ht[2],"taxes")),!yt&&et[0]&36&&(yt=!0,dn.value=Ht[5].rental_real_estate[Ht[2]].taxes,Ne(()=>yt=!1)),Ke.$set(dn);const wr={};et[0]&4&&(wr.key=`utilities_${Ht[2]}`),et[0]&4&&(wr.visitKey=`rental_real_estate[${Ht[2]}].utilities`),et[0]&132&&(wr.hasError=Ca(Ht[7],Ht[2],"utilities")),!pt&&et[0]&36&&(pt=!0,wr.value=Ht[5].rental_real_estate[Ht[2]].utilities,Ne(()=>pt=!1)),Je.$set(wr);const Bn={};et[0]&4&&(Bn.key=`other_${Ht[2]}`),et[0]&4&&(Bn.visitKey=`rental_real_estate[${Ht[2]}].other`),et[0]&132&&(Bn.hasError=Ca(Ht[7],Ht[2],"other")),!Ge&&et[0]&36&&(Ge=!0,Bn.value=Ht[5].rental_real_estate[Ht[2]].other,Ne(()=>Ge=!1)),it.$set(Bn),(!ci||et[0]&16)&&Ft!==(Ft=ca(Ht[4]).format("$0,0[.]00")+"")&&vt(Fn,Ft),(!ci||et[0]&8)&&In!==(In=ca(Ht[3]).format("$0,0[.]00")+"")&&vt(dt,In),(!ci||et[0]&64)&&wt(Dn,"text-success",Ht[6]>=0),(!ci||et[0]&64)&&wt(Dn,"text-danger",Ht[6]<0),(!ci||et[0]&64)&&ni!==(ni=ca(Ht[6]).format("$0,0[.]00")+"")&&vt(Et,ni),(!ci||et[0]&64)&&wt(ft,"text-success",Ht[6]>=0),(!ci||et[0]&64)&&wt(ft,"text-danger",Ht[6]<0)},i(Ht){ci||(U(l.$$.fragment,Ht),U(v.$$.fragment,Ht),U(E.$$.fragment,Ht),U(D.$$.fragment,Ht),U(F.$$.fragment,Ht),U(j.$$.fragment,Ht),U(Q.$$.fragment,Ht),U(ne.$$.fragment,Ht),U(Ce.$$.fragment,Ht),U(he.$$.fragment,Ht),U(We.$$.fragment,Ht),U(G.$$.fragment,Ht),U(De.$$.fragment,Ht),U(Ke.$$.fragment,Ht),U(Je.$$.fragment,Ht),U(it.$$.fragment,Ht),ci=!0)},o(Ht){W(l.$$.fragment,Ht),W(v.$$.fragment,Ht),W(E.$$.fragment,Ht),W(D.$$.fragment,Ht),W(F.$$.fragment,Ht),W(j.$$.fragment,Ht),W(Q.$$.fragment,Ht),W(ne.$$.fragment,Ht),W(Ce.$$.fragment,Ht),W(he.$$.fragment,Ht),W(We.$$.fragment,Ht),W(G.$$.fragment,Ht),W(De.$$.fragment,Ht),W(Ke.$$.fragment,Ht),W(Je.$$.fragment,Ht),W(it.$$.fragment,Ht),ci=!1},d(Ht){Ht&&_e(t),se(l),se(v),se(E),se(D),se(F),se(j),se(Q),se(ne),se(Ce),se(he),se(We),se(G),se(De),se(Ke),se(Je),se(it),Ht&&_e(St),Ht&&_e(sn)}}}function _0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function p0e(e){let t,n=ca(e[0].rental_real_estate_income).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","rental_real_estate_income"),w(t,"class","personal-projection-form-calculation-result-field text-success personal-projection-form-calculation-result-field results__row-title text-uppercase")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&1&&n!==(n=ca(r[0].rental_real_estate_income).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function h0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function m0e(e){let t,n=ca(e[0].rental_real_estate_expenses).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","rental_real_estate_expenses"),w(t,"class","personal-projection-form-calculation-result-field text-danger personal-projection-form-calculation-result-field results__row-title text-uppercase")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&1&&n!==(n=ca(r[0].rental_real_estate_expenses).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function g0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function v0e(e){let t,n=ca(e[0].rental_real_estate_total).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","rental_real_estate_total"),w(t,"class","personal-projection-form-calculation-result-field text-primary personal-projection-form-calculation-result-field results__row-title text-uppercase"),wt(t,"text-success",e[0].rental_real_estate_total>=0),wt(t,"text-danger",e[0].rental_real_estate_total<0)},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&1&&n!==(n=ca(r[0].rental_real_estate_total).format("$0,0[.]00")+"")&&vt(i,n),a[0]&1&&wt(t,"text-success",r[0].rental_real_estate_total>=0),a[0]&1&&wt(t,"text-danger",r[0].rental_real_estate_total<0)},d(r){r&&_e(t)}}}function b0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function y0e(e){let t,n=ca(e[0].per_rental_income).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"aria-labelledby","per_rental_income"),w(t,"class","personal-projection-form-calculation-result-field text-info personal-projection-form-calculation-result-field results__row-title text-uppercase"),wt(t,"text-success",e[0].per_rental_income>=0),wt(t,"text-danger",e[0].per_rental_income<0)},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&1&&n!==(n=ca(r[0].per_rental_income).format("$0,0[.]00")+"")&&vt(i,n),a[0]&1&&wt(t,"text-success",r[0].per_rental_income>=0),a[0]&1&&wt(t,"text-danger",r[0].per_rental_income<0)},d(r){r&&_e(t)}}}function w0e(e){let t,n,i,r,a=!Xn.isNil(e[1]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke=a&&hI(e);function yt(Dt){e[10](Dt)}let ht={key:"rental_real_estate_professional",title:"I am a rental real estate professional"};e[5].rental_real_estate_professional!==void 0&&(ht.value=e[5].rental_real_estate_professional),d=new ky({props:ht}),Oe.push(()=>$e(d,"value",yt));let Je=e[5].rental_real_estate,pt=[];for(let Dt=0;Dt<Je.length;Dt+=1)pt[Dt]=mI(pI(e,Je,Dt));let Tt=e[5].rental_real_estate.length<8&&gI(e),it=e[5].rental_real_estate.length>0&&vI(e);function Ge(Dt,Xt){return Xt[0]&1&&(H=null),H==null&&(H=!!Xn.isNumber(Dt[0].rental_real_estate_income)),H?p0e:_0e}let st=Ge(e,[-1,-1]),It=st(e);function Ct(Dt,Xt){return Xt[0]&1&&(ue=null),ue==null&&(ue=!!Xn.isNumber(Dt[0].rental_real_estate_expenses)),ue?m0e:h0e}let bt=Ct(e,[-1,-1]),Rt=bt(e);function cn(Dt,Xt){return Xt[0]&1&&(We=null),We==null&&(We=!!Xn.isNumber(Dt[0].rental_real_estate_total)),We?v0e:g0e}let nn=cn(e,[-1,-1]),Qe=nn(e);function Ft(Dt,Xt){return Xt[0]&1&&(we=null),we==null&&(we=!!Xn.isNumber(Dt[0].per_rental_income)),we?y0e:b0e}let Fn=Ft(e,[-1,-1]),He=Fn(e);return{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Rental Real Estate",r=K(),Ke&&Ke.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),v=K(),T=P("div"),b=P("ul");for(let Dt=0;Dt<pt.length;Dt+=1)pt[Dt].c();A=K(),Tt&&Tt.c(),E=K(),y=P("div"),it&&it.c(),I=K(),D=P("div"),O=P("div"),M=P("div"),F=P("div"),$=P("label"),$.innerHTML="<span>Total Income</span>",L=K(),j=P("div"),It.c(),V=K(),Q=P("div"),X=P("div"),te=P("label"),te.innerHTML="<span>Total Expenses</span>",ne=K(),be=P("div"),Rt.c(),Ce=K(),ie=P("div"),Y=P("div"),he=P("label"),he.innerHTML="<span>Grand Total</span>",Me=K(),Pe=P("div"),Qe.c(),qe=K(),ee=P("div"),G=P("div"),me=P("label"),me.innerHTML="<span>Taxable Profit</span>",Te=K(),De=P("div"),He.c(),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields"),w(b,"role","tablist"),w(b,"class","nav nav-tabs"),w(y,"class","tab-content"),w(T,"id","section-4"),w($,"id","rental_real_estate_income"),w($,"class","col-form-label tpp-form-label text-success personal-projection-form-calculation-result-field results__row-title text-uppercase"),w(j,"class","input-group"),w(F,"class","form-group tpp-form-group"),w(M,"class","personal-projection-form-content__column"),w(te,"id","rental_real_estate_expenses"),w(te,"class","col-form-label tpp-form-label text-danger personal-projection-form-calculation-result-field results__row-title text-uppercase"),w(be,"class","input-group"),w(X,"class","form-group tpp-form-group"),w(Q,"class","personal-projection-form-content__column"),w(he,"id","rental_real_estate_total"),w(he,"class","col-form-label tpp-form-label text-primary personal-projection-form-calculation-result-field results__row-title text-uppercase"),w(Pe,"class","input-group"),w(Y,"class","form-group tpp-form-group"),w(ie,"class","personal-projection-form-content__column"),w(me,"id","per_rental_income"),w(me,"class","col-form-label tpp-form-label text-info personal-projection-form-calculation-result-field results__row-title text-uppercase"),w(De,"class","input-group"),w(G,"class","form-group tpp-form-group"),w(ee,"class","personal-projection-form-content__column"),w(O,"class","personal-projection-form-content__fields"),w(t,"class","")},m(Dt,Xt){ce(Dt,t,Xt),m(t,n),m(n,i),m(n,r),Ke&&Ke.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(t,v),m(t,T),m(T,b);for(let Mt=0;Mt<pt.length;Mt+=1)pt[Mt]&&pt[Mt].m(b,null);m(b,A),Tt&&Tt.m(b,null),m(T,E),m(T,y),it&&it.m(y,null),m(t,I),m(t,D),m(D,O),m(O,M),m(M,F),m(F,$),m(F,L),m(F,j),It.m(j,null),m(O,V),m(O,Q),m(Q,X),m(X,te),m(X,ne),m(X,be),Rt.m(be,null),m(O,Ce),m(O,ie),m(ie,Y),m(Y,he),m(Y,Me),m(Y,Pe),Qe.m(Pe,null),m(O,qe),m(O,ee),m(ee,G),m(G,me),m(G,Te),m(G,De),He.m(De,null),Ve=!0},p(Dt,Xt){Xt[0]&2&&(a=!Xn.isNil(Dt[1])),a?Ke?Ke.p(Dt,Xt):(Ke=hI(Dt),Ke.c(),Ke.m(n,null)):Ke&&(Ke.d(1),Ke=null);const Mt={};if(!c&&Xt[0]&32&&(c=!0,Mt.value=Dt[5].rental_real_estate_professional,Ne(()=>c=!1)),d.$set(Mt),Xt[0]&292){Je=Dt[5].rental_real_estate;let Xe;for(Xe=0;Xe<Je.length;Xe+=1){const Nt=pI(Dt,Je,Xe);pt[Xe]?pt[Xe].p(Nt,Xt):(pt[Xe]=mI(Nt),pt[Xe].c(),pt[Xe].m(b,A))}for(;Xe<pt.length;Xe+=1)pt[Xe].d(1);pt.length=Je.length}Dt[5].rental_real_estate.length<8?Tt?Tt.p(Dt,Xt):(Tt=gI(Dt),Tt.c(),Tt.m(b,null)):Tt&&(Tt.d(1),Tt=null),Dt[5].rental_real_estate.length>0?it?(it.p(Dt,Xt),Xt[0]&32&&U(it,1)):(it=vI(Dt),it.c(),U(it,1),it.m(y,null)):it&&(pn(),W(it,1,1,()=>{it=null}),hn()),st===(st=Ge(Dt,Xt))&&It?It.p(Dt,Xt):(It.d(1),It=st(Dt),It&&(It.c(),It.m(j,null))),bt===(bt=Ct(Dt,Xt))&&Rt?Rt.p(Dt,Xt):(Rt.d(1),Rt=bt(Dt),Rt&&(Rt.c(),Rt.m(be,null))),nn===(nn=cn(Dt,Xt))&&Qe?Qe.p(Dt,Xt):(Qe.d(1),Qe=nn(Dt),Qe&&(Qe.c(),Qe.m(Pe,null))),Fn===(Fn=Ft(Dt,Xt))&&He?He.p(Dt,Xt):(He.d(1),He=Fn(Dt),He&&(He.c(),He.m(De,null)))},i(Dt){Ve||(U(d.$$.fragment,Dt),U(it),Ve=!0)},o(Dt){W(d.$$.fragment,Dt),W(it),Ve=!1},d(Dt){Dt&&_e(t),Ke&&Ke.d(),se(d),Nn(pt,Dt),Tt&&Tt.d(),it&&it.d(),It.d(),Rt.d(),Qe.d(),He.d()}}}function Ca(e,t,n){return e.has(`rental_real_estate[${t}].${n}`)}function T0e(e,t,n){let i,r,a,s,o;Sn(e,hi,ue=>n(5,s=ue)),Sn(e,__,ue=>n(7,o=ue));let{serverCalculatedParameters:l}=t,{statusNotice:d=null}=t,c=0;function v(ue){hi.update(Ce=>(n(2,c=0),{...Ce,rental_real_estate:Ce.rental_real_estate.filter((ie,Y)=>Y!=ue)}))}function T(){hi.update(ue=>{const Ce=Xn.concat(ue.rental_real_estate,Z$());return n(2,c=Ce.length-1),{...ue,rental_real_estate:Ce}})}function b(ue){e.$$.not_equal(s.rental_real_estate_professional,ue)&&(s.rental_real_estate_professional=ue,hi.set(s))}const A=ue=>v(ue),E=ue=>n(2,c=ue);function y(ue){e.$$.not_equal(s.rental_real_estate[c].name,ue)&&(s.rental_real_estate[c].name=ue,hi.set(s))}function I(ue){e.$$.not_equal(s.rental_real_estate[c].income,ue)&&(s.rental_real_estate[c].income=ue,hi.set(s))}function D(ue){e.$$.not_equal(s.rental_real_estate[c].advertising,ue)&&(s.rental_real_estate[c].advertising=ue,hi.set(s))}function O(ue){e.$$.not_equal(s.rental_real_estate[c].auto_expenses,ue)&&(s.rental_real_estate[c].auto_expenses=ue,hi.set(s))}function M(ue){e.$$.not_equal(s.rental_real_estate[c].cleaning,ue)&&(s.rental_real_estate[c].cleaning=ue,hi.set(s))}function F(ue){e.$$.not_equal(s.rental_real_estate[c].commissions,ue)&&(s.rental_real_estate[c].commissions=ue,hi.set(s))}function $(ue){e.$$.not_equal(s.rental_real_estate[c].depreciation,ue)&&(s.rental_real_estate[c].depreciation=ue,hi.set(s))}function L(ue){e.$$.not_equal(s.rental_real_estate[c].insurance,ue)&&(s.rental_real_estate[c].insurance=ue,hi.set(s))}function j(ue){e.$$.not_equal(s.rental_real_estate[c].legal_expenses,ue)&&(s.rental_real_estate[c].legal_expenses=ue,hi.set(s))}function H(ue){e.$$.not_equal(s.rental_real_estate[c].management_fees,ue)&&(s.rental_real_estate[c].management_fees=ue,hi.set(s))}function V(ue){e.$$.not_equal(s.rental_real_estate[c].mortage_interest,ue)&&(s.rental_real_estate[c].mortage_interest=ue,hi.set(s))}function Q(ue){e.$$.not_equal(s.rental_real_estate[c].repairs,ue)&&(s.rental_real_estate[c].repairs=ue,hi.set(s))}function X(ue){e.$$.not_equal(s.rental_real_estate[c].supplies,ue)&&(s.rental_real_estate[c].supplies=ue,hi.set(s))}function te(ue){e.$$.not_equal(s.rental_real_estate[c].taxes,ue)&&(s.rental_real_estate[c].taxes=ue,hi.set(s))}function ne(ue){e.$$.not_equal(s.rental_real_estate[c].utilities,ue)&&(s.rental_real_estate[c].utilities=ue,hi.set(s))}function be(ue){e.$$.not_equal(s.rental_real_estate[c].other,ue)&&(s.rental_real_estate[c].other=ue,hi.set(s))}return e.$$set=ue=>{"serverCalculatedParameters"in ue&&n(0,l=ue.serverCalculatedParameters),"statusNotice"in ue&&n(1,d=ue.statusNotice)},e.$$.update=()=>{e.$$.dirty[0]&36&&n(4,i=s.rental_real_estate.length>0?s.rental_real_estate[c].income:0),e.$$.dirty[0]&36&&n(3,r=s.rental_real_estate.length>0?Xn.sum(Xn.at(s.rental_real_estate[c],["advertising","auto_expenses","cleaning","commissions","depreciation","insurance","legal_expenses","management_fees","mortage_interest","repairs","supplies","taxes","utilities","other"])):0),e.$$.dirty[0]&24&&n(6,a=i-r)},[l,d,c,r,i,s,a,o,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be]}class k0e extends Qt{constructor(t){super(),Jt(this,t,T0e,w0e,Kt,{serverCalculatedParameters:0,statusNotice:1},null,[-1,-1])}}function bI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function S0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O=a&&bI(e);return d=new gr({props:{key:"fed_inc_adj_health_insurance_premium"}}),v=new gr({props:{key:"ira_deduction"}}),b=new gr({props:{key:"per_ira_deduction"}}),E=new gr({props:{key:"per_health_savings_acct"}}),I=new gr({props:{key:"other_deductions"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Adjustments",r=K(),O&&O.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),c=K(),re(v.$$.fragment),T=K(),re(b.$$.fragment),A=K(),re(E.$$.fragment),y=K(),re(I.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields"),w(t,"class","")},m(M,F){ce(M,t,F),m(t,n),m(n,i),m(n,r),O&&O.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(l,c),ae(v,l,null),m(l,T),ae(b,l,null),m(l,A),ae(E,l,null),m(l,y),ae(I,l,null),D=!0},p(M,[F]){F&1&&(a=!Xn.isNil(M[0])),a?O?O.p(M,F):(O=bI(M),O.c(),O.m(n,null)):O&&(O.d(1),O=null)},i(M){D||(U(d.$$.fragment,M),U(v.$$.fragment,M),U(b.$$.fragment,M),U(E.$$.fragment,M),U(I.$$.fragment,M),D=!0)},o(M){W(d.$$.fragment,M),W(v.$$.fragment,M),W(b.$$.fragment,M),W(E.$$.fragment,M),W(I.$$.fragment,M),D=!1},d(M){M&&_e(t),O&&O.d(),se(d),se(v),se(b),se(E),se(I)}}}function C0e(e,t,n){let{statusNotice:i=null}=t;return e.$$set=r=>{"statusNotice"in r&&n(0,i=r.statusNotice)},[i]}class P0e extends Qt{constructor(t){super(),Jt(this,t,C0e,S0e,Kt,{statusNotice:0})}}function yI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function E0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be=a&&yI(e);return d=new gr({props:{key:"fed_ded_mortgage_interest"}}),v=new gr({props:{key:"fed_ded_state_income_taxes"}}),b=new gr({props:{key:"fed_ded_local_income_taxes"}}),E=new gr({props:{key:"fed_ded_prior_state_inc_taxes"}}),I=new gr({props:{key:"fed_ded_property_taxes"}}),O=new gr({props:{key:"fed_ded_personal_property_taxes"}}),F=new gr({props:{key:"fed_ded_home_loan_points"}}),L=new gr({props:{key:"fed_ded_medical_and_dental"}}),H=new gr({props:{key:"fed_ded_cash_donations"}}),Q=new gr({props:{key:"fed_ded_noncash_donations"}}),te=new gr({props:{key:"fed_ded_other_deductions"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Deductions",r=K(),be&&be.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),c=K(),re(v.$$.fragment),T=K(),re(b.$$.fragment),A=K(),re(E.$$.fragment),y=K(),re(I.$$.fragment),D=K(),re(O.$$.fragment),M=K(),re(F.$$.fragment),$=K(),re(L.$$.fragment),j=K(),re(H.$$.fragment),V=K(),re(Q.$$.fragment),X=K(),re(te.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields"),w(t,"class","")},m(ue,Ce){ce(ue,t,Ce),m(t,n),m(n,i),m(n,r),be&&be.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(l,c),ae(v,l,null),m(l,T),ae(b,l,null),m(l,A),ae(E,l,null),m(l,y),ae(I,l,null),m(l,D),ae(O,l,null),m(l,M),ae(F,l,null),m(l,$),ae(L,l,null),m(l,j),ae(H,l,null),m(l,V),ae(Q,l,null),m(l,X),ae(te,l,null),ne=!0},p(ue,[Ce]){Ce&1&&(a=!Xn.isNil(ue[0])),a?be?be.p(ue,Ce):(be=yI(ue),be.c(),be.m(n,null)):be&&(be.d(1),be=null)},i(ue){ne||(U(d.$$.fragment,ue),U(v.$$.fragment,ue),U(b.$$.fragment,ue),U(E.$$.fragment,ue),U(I.$$.fragment,ue),U(O.$$.fragment,ue),U(F.$$.fragment,ue),U(L.$$.fragment,ue),U(H.$$.fragment,ue),U(Q.$$.fragment,ue),U(te.$$.fragment,ue),ne=!0)},o(ue){W(d.$$.fragment,ue),W(v.$$.fragment,ue),W(b.$$.fragment,ue),W(E.$$.fragment,ue),W(I.$$.fragment,ue),W(O.$$.fragment,ue),W(F.$$.fragment,ue),W(L.$$.fragment,ue),W(H.$$.fragment,ue),W(Q.$$.fragment,ue),W(te.$$.fragment,ue),ne=!1},d(ue){ue&&_e(t),be&&be.d(),se(d),se(v),se(b),se(E),se(I),se(O),se(F),se(L),se(H),se(Q),se(te)}}}function I0e(e,t,n){let{statusNotice:i=null}=t;return e.$$set=r=>{"statusNotice"in r&&n(0,i=r.statusNotice)},[i]}class A0e extends Qt{constructor(t){super(),Jt(this,t,I0e,E0e,Kt,{statusNotice:0})}}function wI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function D0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E=a&&wI(e);return v=new gr({props:{key:"usr_scorp_business_income"}}),b=new gr({props:{key:"usr_schedule_c_income"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Other Business Income",r=K(),E&&E.c(),s=K(),o=P("div"),o.textContent="Use this fields for businesses you have not connected to Tax Planner PRO",l=K(),d=P("div"),c=P("div"),re(v.$$.fragment),T=K(),re(b.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(o,"class","personal-projection-form-content__section-description"),w(c,"class","personal-projection-form-content__fields"),w(t,"class","")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(n,r),E&&E.m(n,null),m(t,s),m(t,o),m(t,l),m(t,d),m(d,c),ae(v,c,null),m(c,T),ae(b,c,null),A=!0},p(y,[I]){I&1&&(a=!Xn.isNil(y[0])),a?E?E.p(y,I):(E=wI(y),E.c(),E.m(n,null)):E&&(E.d(1),E=null)},i(y){A||(U(v.$$.fragment,y),U(b.$$.fragment,y),A=!0)},o(y){W(v.$$.fragment,y),W(b.$$.fragment,y),A=!1},d(y){y&&_e(t),E&&E.d(),se(v),se(b)}}}function O0e(e,t,n){let{statusNotice:i=null}=t;return e.$$set=r=>{"statusNotice"in r&&n(0,i=r.statusNotice)},[i]}class M0e extends Qt{constructor(t){super(),Jt(this,t,O0e,D0e,Kt,{statusNotice:0})}}function x0e(e){let t,n,i,r,a,s,o,l,d;return{c(){t=P("div"),n=P("span"),i=Le(e[0]),r=K(),a=P("i"),w(a,"class","fa fa-info-circle ml-1"),w(t,"class",s=`${e[2]}`)},m(c,v){ce(c,t,v),m(t,n),m(n,i),m(t,r),m(t,a),l||(d=l_(o=Rm.call(null,t,e[1])),l=!0)},p(c,[v]){v&1&&vt(i,c[0]),v&4&&s!==(s=`${c[2]}`)&&w(t,"class",s),o&&Ga(o.update)&&v&2&&o.update.call(null,c[1])},i:ot,o:ot,d(c){c&&_e(t),l=!1,d()}}}function R0e(e,t,n){let{tooltipLabel:i}=t,{tooltipInfo:r}=t,{tooltipExtraClass:a}=t;return e.$$set=s=>{"tooltipLabel"in s&&n(0,i=s.tooltipLabel),"tooltipInfo"in s&&n(1,r=s.tooltipInfo),"tooltipExtraClass"in s&&n(2,a=s.tooltipExtraClass)},[i,r,a]}class $0e extends Qt{constructor(t){super(),Jt(this,t,R0e,x0e,Kt,{tooltipLabel:0,tooltipInfo:1,tooltipExtraClass:2})}}function N0e(e){let t,n;return{c(){t=P("input"),t.value=n=e[7]?"Loading...":e[6],t.disabled=!0,w(t,"placeholder","0.0"),w(t,"id",e[11]),w(t,"class","personal-projection-form-validation form-control")},m(i,r){ce(i,t,r)},p(i,r){r&192&&n!==(n=i[7]?"Loading...":i[6])&&t.value!==n&&(t.value=n),r&2048&&w(t,"id",i[11])},i:ot,o:ot,d(i){i&&_e(t)}}}function F0e(e){let t,n,i,r,a,s,o,l;function d(b){e[22](b)}let c={key:e[13],hasError:e[12].has(e[13]),label:"Taxpayer",placeholder:e[5],actionLabel:"Spouse ›",actionShow:!e[8]};e[4][e[13]]!==void 0&&(c.value=e[4][e[13]]),n=new jv({props:c}),Oe.push(()=>$e(n,"value",d)),n.$on("click",e[16]);function v(b){e[23](b)}let T={key:e[14],hasError:e[12].has(e[14]),label:"Spouse",actionLabel:"‹ Hide",actionShow:e[8]&&e[3]};return e[4][e[14]]!==void 0&&(T.value=e[4][e[14]]),s=new jv({props:T}),Oe.push(()=>$e(s,"value",v)),s.$on("click",e[17]),{c(){t=P("div"),re(n.$$.fragment),r=K(),a=P("div"),re(s.$$.fragment),w(t,"class","input-group-twin__part"),w(a,"class","input-group-twin__part input-group-twin__part_second"),wt(a,"input-group-twin__part_hidden",!e[8])},m(b,A){ce(b,t,A),ae(n,t,null),ce(b,r,A),ce(b,a,A),ae(s,a,null),l=!0},p(b,A){const E={};A&4096&&(E.hasError=b[12].has(b[13])),A&32&&(E.placeholder=b[5]),A&256&&(E.actionShow=!b[8]),!i&&A&8208&&(i=!0,E.value=b[4][b[13]],Ne(()=>i=!1)),n.$set(E);const y={};A&4096&&(y.hasError=b[12].has(b[14])),A&264&&(y.actionShow=b[8]&&b[3]),!o&&A&16400&&(o=!0,y.value=b[4][b[14]],Ne(()=>o=!1)),s.$set(y),(!l||A&256)&&wt(a,"input-group-twin__part_hidden",!b[8])},i(b){l||(U(n.$$.fragment,b),U(s.$$.fragment,b),l=!0)},o(b){W(n.$$.fragment,b),W(s.$$.fragment,b),l=!1},d(b){b&&_e(t),se(n),b&&_e(r),b&&_e(a),se(s)}}}function L0e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F;r=new $0e({props:{tooltipLabel:e[1],tooltipInfo:e[2],tooltipExtraClass:`tpp-input-label--personal_projection_parameters[${e[0]}]`}});const $=[F0e,N0e],L=[];function j(H,V){return H[9]?0:1}return E=j(e),y=L[E]=$[E](e),{c(){t=P("div"),n=P("div"),i=P("label"),re(r.$$.fragment),a=K(),s=P("small"),o=P("label"),l=P("input"),c=Le(`
        Override`),v=K(),T=P("span"),b=P("div"),b.innerHTML='<span class="input-group-text">$</span>',A=K(),y.c(),I=K(),D=P("span"),w(i,"for",e[11]),w(i,"class","col-form-label tpp-form-label"),w(l,"type","checkbox"),w(l,"id",e[10]),l.checked=e[9],l.disabled=d=e[9]?!1:e[7],w(o,"for",e[10]),w(s,"class","ml-2"),w(b,"class","input-group-prepend"),w(T,"class","input-group input-group-twin"),w(D,"class","form-text"),w(n,"class","form-group tpp-form-group"),w(t,"class","personal-projection-form-content__column")},m(H,V){ce(H,t,V),m(t,n),m(n,i),ae(r,i,null),m(n,a),m(n,s),m(s,o),m(o,l),m(o,c),m(n,v),m(n,T),m(T,b),m(T,A),L[E].m(T,null),m(n,I),m(n,D),O=!0,M||(F=ct(l,"change",e[15]),M=!0)},p(H,[V]){const Q={};V&2&&(Q.tooltipLabel=H[1]),V&4&&(Q.tooltipInfo=H[2]),V&1&&(Q.tooltipExtraClass=`tpp-input-label--personal_projection_parameters[${H[0]}]`),r.$set(Q),(!O||V&2048)&&w(i,"for",H[11]),(!O||V&1024)&&w(l,"id",H[10]),(!O||V&512)&&(l.checked=H[9]),(!O||V&640&&d!==(d=H[9]?!1:H[7]))&&(l.disabled=d),(!O||V&1024)&&w(o,"for",H[10]);let X=E;E=j(H),E===X?L[E].p(H,V):(pn(),W(L[X],1,1,()=>{L[X]=null}),hn(),y=L[E],y?y.p(H,V):(y=L[E]=$[E](H),y.c()),U(y,1),y.m(T,null))},i(H){O||(U(r.$$.fragment,H),U(y),O=!0)},o(H){W(r.$$.fragment,H),W(y),O=!1},d(H){H&&_e(t),se(r),L[E].d(),M=!1,F()}}}function TI(e){return Math.round(1e4*e)/1e4}function H0e(e,t,n){let i,r,a,s,o,l;Sn(e,hi,ne=>n(4,o=ne)),Sn(e,__,ne=>n(12,l=ne));let{key:d}=t,{override_key:c}=t,{override_guard_key:v}=t,{serverCalculatedParameters:T}=t,{tooltipLabel:b}=t,{tooltipInfo:A}=t,E=`${c}_taxpayer`,y=`${v}_taxpayer`,I=`${c}_spouse`,D=`${v}_spouse`,O,M,F=!0;function $(){if(o[y]===0){$s(hi,o[y]=1,o),$s(hi,o[D]=1,o);const ne=T[d];ne&&($s(hi,o[E]=TI(ne),o),$s(hi,o[I]=0,o))}else $s(hi,o[y]=0,o),$s(hi,o[D]=0,o),$s(hi,o[E]=0,o),$s(hi,o[I]=0,o)}let L,j=!1;function H(ne){n(8,L=!0),n(21,j=!0)}function V(ne){n(8,L=!1)}function Q(){Td(y),Td(D),i||Td(E),!(i&&L)&&Td(I)}oa(Q),lc(Q);function X(ne){e.$$.not_equal(o[E],ne)&&(o[E]=ne,hi.set(o))}function te(ne){e.$$.not_equal(o[I],ne)&&(o[I]=ne,hi.set(o))}return e.$$set=ne=>{"key"in ne&&n(18,d=ne.key),"override_key"in ne&&n(0,c=ne.override_key),"override_guard_key"in ne&&n(19,v=ne.override_guard_key),"serverCalculatedParameters"in ne&&n(20,T=ne.serverCalculatedParameters),"tooltipLabel"in ne&&n(1,b=ne.tooltipLabel),"tooltipInfo"in ne&&n(2,A=ne.tooltipInfo)},e.$$.update=()=>{if(e.$$.dirty&16&&n(9,i=o[y]!==0),e.$$.dirty&1310720){const ne=T[d];Xn.isNil(ne)?n(7,F=!0):(n(5,O=TI(ne)),n(6,M=ca(ne).format("0,0[.]0000")),n(7,F=!1))}e.$$.dirty&16&&n(3,s=o[I]==0),e.$$.dirty&2097160&&n(8,L=!s||j)},n(11,r=`personal_projection_parameters[${E}]`),n(10,a=`personal_projection_parameters[${y}]`),[c,b,A,s,o,O,M,F,L,i,a,r,l,E,I,$,H,V,d,v,T,j,X,te]}class ec extends Qt{constructor(t){super(),Jt(this,t,H0e,L0e,Kt,{key:18,override_key:0,override_guard_key:19,serverCalculatedParameters:20,tooltipLabel:1,tooltipInfo:2})}}function kI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function j0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y=a&&kI(e);return d=new gr({props:{key:"fed_tax_previous_year"}}),v=new gr({props:{key:"state_tax_previous_year"}}),b=new gr({props:{key:"fed_tax_owed_other_taxes"}}),E=new gr({props:{key:"fed_tax_owed_prior_year_amt_carryforward"}}),I=new gr({props:{key:"fed_tax_owed_tax_credits",tooltip:"Federal Tax Credits"}}),O=new ec({props:{serverCalculatedParameters:e[1],key:"fed_tax_owed_child_tax_credit",override_key:"fed_tax_owed_child_tax_credit_override",override_guard_key:"fed_tax_owed_child_tax_credit_override_guard",tooltipLabel:"Child Tax Credits",tooltipInfo:"Child tax credit value you can override"}}),F=new ec({props:{serverCalculatedParameters:e[1],key:"res_inc_itemized",override_key:"res_inc_itemized_override",override_guard_key:"res_inc_itemized_override_guard",tooltipLabel:"Itemized Deductions",tooltipInfo:"Itemized deductions value you can override"}}),L=new ec({props:{serverCalculatedParameters:e[1],key:"res_passthrough_deduction",override_key:"res_passthrough_deduction_override",override_guard_key:"res_passthrough_deduction_override_guard",tooltipLabel:"Passthrough Deduction",tooltipInfo:"Passthrough deduction value you can override"}}),H=new ec({props:{serverCalculatedParameters:e[1],key:"res_se_tax",override_key:"res_se_tax_override",override_guard_key:"res_se_tax_override_guard",tooltipLabel:"SE Tax",tooltipInfo:"SE tax value you can override"}}),Q=new ec({props:{serverCalculatedParameters:e[1],key:"res_total_tax",override_key:"res_total_tax_override",override_guard_key:"res_total_tax_override_guard",tooltipLabel:"Total Federal Tax",tooltipInfo:"Total federal tax value you can override"}}),te=new ec({props:{serverCalculatedParameters:e[1],key:"res_state_tax_before_payments",override_key:"res_state_tax_before_payments_override",override_guard_key:"res_state_tax_before_payments_override_guard",tooltipLabel:"Total State Tax",tooltipInfo:"Total state tax value you can override"}}),be=new ec({props:{serverCalculatedParameters:e[1],key:"business_inc_ccorp_fed_tax",override_key:"business_inc_ccorp_fed_tax_override",override_guard_key:"business_inc_ccorp_fed_tax_override_guard",tooltipLabel:"C Corp Federal Tax",tooltipInfo:"C corp federal tax value you can override"}}),Ce=new ec({props:{serverCalculatedParameters:e[1],key:"business_inc_ccorp_state_tax",override_key:"business_inc_ccorp_state_tax_override",override_guard_key:"business_inc_ccorp_state_tax_override_guard",tooltipLabel:"C Corp State Tax",tooltipInfo:"C corp state tax value you can override"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Taxes",r=K(),Y&&Y.c(),s=K(),o=P("div"),l=P("div"),re(d.$$.fragment),c=K(),re(v.$$.fragment),T=K(),re(b.$$.fragment),A=K(),re(E.$$.fragment),y=K(),re(I.$$.fragment),D=K(),re(O.$$.fragment),M=K(),re(F.$$.fragment),$=K(),re(L.$$.fragment),j=K(),re(H.$$.fragment),V=K(),re(Q.$$.fragment),X=K(),re(te.$$.fragment),ne=K(),re(be.$$.fragment),ue=K(),re(Ce.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(l,"class","personal-projection-form-content__fields")},m(he,Me){ce(he,t,Me),m(t,n),m(n,i),m(n,r),Y&&Y.m(n,null),m(t,s),m(t,o),m(o,l),ae(d,l,null),m(l,c),ae(v,l,null),m(l,T),ae(b,l,null),m(l,A),ae(E,l,null),m(l,y),ae(I,l,null),m(l,D),ae(O,l,null),m(l,M),ae(F,l,null),m(l,$),ae(L,l,null),m(l,j),ae(H,l,null),m(l,V),ae(Q,l,null),m(l,X),ae(te,l,null),m(l,ne),ae(be,l,null),m(l,ue),ae(Ce,l,null),ie=!0},p(he,[Me]){Me&1&&(a=!Xn.isNil(he[0])),a?Y?Y.p(he,Me):(Y=kI(he),Y.c(),Y.m(n,null)):Y&&(Y.d(1),Y=null);const Pe={};Me&2&&(Pe.serverCalculatedParameters=he[1]),O.$set(Pe);const We={};Me&2&&(We.serverCalculatedParameters=he[1]),F.$set(We);const qe={};Me&2&&(qe.serverCalculatedParameters=he[1]),L.$set(qe);const ee={};Me&2&&(ee.serverCalculatedParameters=he[1]),H.$set(ee);const G={};Me&2&&(G.serverCalculatedParameters=he[1]),Q.$set(G);const me={};Me&2&&(me.serverCalculatedParameters=he[1]),te.$set(me);const Te={};Me&2&&(Te.serverCalculatedParameters=he[1]),be.$set(Te);const De={};Me&2&&(De.serverCalculatedParameters=he[1]),Ce.$set(De)},i(he){ie||(U(d.$$.fragment,he),U(v.$$.fragment,he),U(b.$$.fragment,he),U(E.$$.fragment,he),U(I.$$.fragment,he),U(O.$$.fragment,he),U(F.$$.fragment,he),U(L.$$.fragment,he),U(H.$$.fragment,he),U(Q.$$.fragment,he),U(te.$$.fragment,he),U(be.$$.fragment,he),U(Ce.$$.fragment,he),ie=!0)},o(he){W(d.$$.fragment,he),W(v.$$.fragment,he),W(b.$$.fragment,he),W(E.$$.fragment,he),W(I.$$.fragment,he),W(O.$$.fragment,he),W(F.$$.fragment,he),W(L.$$.fragment,he),W(H.$$.fragment,he),W(Q.$$.fragment,he),W(te.$$.fragment,he),W(be.$$.fragment,he),W(Ce.$$.fragment,he),ie=!1},d(he){he&&_e(t),Y&&Y.d(),se(d),se(v),se(b),se(E),se(I),se(O),se(F),se(L),se(H),se(Q),se(te),se(be),se(Ce)}}}function B0e(e,t,n){let{statusNotice:i=null}=t,{serverCalculatedParameters:r}=t;return e.$$set=a=>{"statusNotice"in a&&n(0,i=a.statusNotice),"serverCalculatedParameters"in a&&n(1,r=a.serverCalculatedParameters)},[i,r]}class U0e extends Qt{constructor(t){super(),Jt(this,t,B0e,j0e,Kt,{statusNotice:0,serverCalculatedParameters:1})}}function SI(e){let t,n;return{c(){t=P("small"),n=Le(e[0]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function q0e(e){let t,n,i,r,a=!Xn.isNil(e[0]),s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q=a&&SI(e);return c=new gr({props:{key:"fed_est_tax_pay_march"}}),T=new gr({props:{key:"fed_est_tax_pay_june"}}),A=new gr({props:{key:"fed_est_tax_pay_september"}}),y=new gr({props:{key:"fed_est_tax_pay_december"}}),O=new gr({props:{key:"state_estimated_tax_payments_q1"}}),F=new gr({props:{key:"state_estimated_tax_payments_q2"}}),L=new gr({props:{key:"state_estimated_tax_payments_q3"}}),H=new gr({props:{key:"state_estimated_tax_payments_q4"}}),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Payments",r=K(),Q&&Q.c(),s=K(),o=P("div"),l=P("div"),d=P("div"),re(c.$$.fragment),v=K(),re(T.$$.fragment),b=K(),re(A.$$.fragment),E=K(),re(y.$$.fragment),I=K(),D=P("div"),re(O.$$.fragment),M=K(),re(F.$$.fragment),$=K(),re(L.$$.fragment),j=K(),re(H.$$.fragment),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(d,"class","personal-projection-form-content__subsection"),w(D,"class","personal-projection-form-content__subsection"),w(l,"class","personal-projection-form-content__fields"),w(t,"class","")},m(X,te){ce(X,t,te),m(t,n),m(n,i),m(n,r),Q&&Q.m(n,null),m(t,s),m(t,o),m(o,l),m(l,d),ae(c,d,null),m(d,v),ae(T,d,null),m(d,b),ae(A,d,null),m(d,E),ae(y,d,null),m(l,I),m(l,D),ae(O,D,null),m(D,M),ae(F,D,null),m(D,$),ae(L,D,null),m(D,j),ae(H,D,null),V=!0},p(X,[te]){te&1&&(a=!Xn.isNil(X[0])),a?Q?Q.p(X,te):(Q=SI(X),Q.c(),Q.m(n,null)):Q&&(Q.d(1),Q=null)},i(X){V||(U(c.$$.fragment,X),U(T.$$.fragment,X),U(A.$$.fragment,X),U(y.$$.fragment,X),U(O.$$.fragment,X),U(F.$$.fragment,X),U(L.$$.fragment,X),U(H.$$.fragment,X),V=!0)},o(X){W(c.$$.fragment,X),W(T.$$.fragment,X),W(A.$$.fragment,X),W(y.$$.fragment,X),W(O.$$.fragment,X),W(F.$$.fragment,X),W(L.$$.fragment,X),W(H.$$.fragment,X),V=!1},d(X){X&&_e(t),Q&&Q.d(),se(c),se(T),se(A),se(y),se(O),se(F),se(L),se(H)}}}function W0e(e,t,n){let{statusNotice:i=null}=t;return e.$$set=r=>{"statusNotice"in r&&n(0,i=r.statusNotice)},[i]}class V0e extends Qt{constructor(t){super(),Jt(this,t,W0e,q0e,Kt,{statusNotice:0})}}function CI(e,t,n){const i=e.slice();return i[10]=t[n],i[11]=t,i[12]=n,i}function PI(e){let t,n;return{c(){t=P("small"),n=Le(e[1]),w(t,"class","personal-projection-form-content__section-header-status font-weight-light col-lg-3 text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&2&&vt(n,i[1])},d(i){i&&_e(t)}}}function z0e(e){let t,n,i=e[5],r=[];for(let s=0;s<i.length;s+=1)r[s]=EI(CI(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){t=P("div");for(let s=0;s<r.length;s+=1)r[s].c();w(t,"class","personal-projection-form-content__fields")},m(s,o){ce(s,t,o);for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(t,null);n=!0},p(s,o){if(o&44){i=s[5];let l;for(l=0;l<i.length;l+=1){const d=CI(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=EI(d),r[l].c(),U(r[l],1),r[l].m(t,null))}for(pn(),l=i.length;l<r.length;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<i.length;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)W(r[o]);n=!1},d(s){s&&_e(t),Nn(r,s)}}}function Y0e(e){let t,n;return t=new gr({props:{key:e[10]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function G0e(e){let t,n,i;function r(s){e[8](s,e[10])}let a={key:e[10],hasError:e[3].has(e[10]),options:Ume};return e[2][e[10]]!==void 0&&(a.value=e[2][e[10]]),t=new um({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o&8&&(l.hasError=e[3].has(e[10])),!n&&o&36&&(n=!0,l.value=e[2][e[10]],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function K0e(e){let t,n,i;function r(s){e[7](s,e[10])}let a={key:e[10],hasError:e[3].has(e[10]),options:Bme};return e[2][e[10]]!==void 0&&(a.value=e[2][e[10]]),t=new um({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o&8&&(l.hasError=e[3].has(e[10])),!n&&o&36&&(n=!0,l.value=e[2][e[10]],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function X0e(e){let t,n,i;function r(s){e[6](s,e[10])}let a={key:e[10],hasError:e[3].has(e[10])};return e[2][e[10]]!==void 0&&(a.value=e[2][e[10]]),t=new ns({props:a}),Oe.push(()=>$e(t,"value",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){e=s;const l={};o&8&&(l.hasError=e[3].has(e[10])),!n&&o&36&&(n=!0,l.value=e[2][e[10]],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function EI(e){let t,n,i,r;const a=[X0e,K0e,G0e,Y0e],s=[];function o(l,d){return l[10]==="taxpayer_age"?0:l[10]==="state_in_county_code"?1:l[10]==="state_md_county_code"?2:3}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,d){n.p(l,d)},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function Q0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function J0e(e){let t,n=ca(e[0].state_adj_taxable_income_before_adjustments).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"class","personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].state_adj_taxable_income_before_adjustments).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Z0e(e){let t;return{c(){t=P("div"),w(t,"class","personal-projection-form-calculation-result-field__loading")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function e1e(e){let t,n=ca(e[0].state_adj_adjusted_taxable_income).format("$0,0[.]00")+"",i;return{c(){t=P("div"),i=Le(n),w(t,"class","personal-projection-form-calculation-result-field results__row-title")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ca(r[0].state_adj_adjusted_taxable_income).format("$0,0[.]00")+"")&&vt(i,n)},d(r){r&&_e(t)}}}function t1e(e){let t,n,i,r,a=!Xn.isNil(e[1]),s,o,l=!Xn.isNil(e[5]),d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie=a&&PI(e),Y=l&&z0e(e);function he(G,me){return me&1&&(y=null),y==null&&(y=!!Xn.isNumber(G[0].state_adj_taxable_income_before_adjustments)),y?J0e:Q0e}let Me=he(e,-1),Pe=Me(e);O=new gr({props:{key:"state_adj_additions"}}),F=new gr({props:{key:"state_adj_substractions"}}),j=new gr({props:{key:"state_adj_tax_credit",tooltip:"State Tax Credit"}});function We(G,me){return me&1&&(ue=null),ue==null&&(ue=!!Xn.isNumber(G[0].state_adj_adjusted_taxable_income)),ue?e1e:Z0e}let qe=We(e,-1),ee=qe(e);return{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent=`${e[4]||""} State Adjustments`,r=K(),ie&&ie.c(),s=K(),o=P("div"),Y&&Y.c(),d=K(),c=P("div"),v=P("div"),T=P("div"),b=P("label"),b.innerHTML="<span>Taxable Income Before Adjustments</span>",A=K(),E=P("div"),Pe.c(),I=K(),D=P("div"),re(O.$$.fragment),M=K(),re(F.$$.fragment),$=K(),L=P("div"),re(j.$$.fragment),H=K(),V=P("div"),Q=P("div"),X=P("div"),te=P("label"),te.innerHTML="<span>Adjusted Taxable Income</span>",ne=K(),be=P("div"),ee.c(),w(i,"class","personal-projection-form-content__section-name"),w(n,"class","personal-projection-form-content__section-header"),w(b,"class","col-form-label tpp-form-label results__row-title"),w(E,"class","input-group"),w(T,"class","form-group tpp-form-group"),w(v,"class","personal-projection-form-content__column"),w(c,"class","personal-projection-form-content__fields"),w(D,"class","personal-projection-form-content__fields"),w(L,"class","personal-projection-form-content__fields"),w(te,"class","col-form-label tpp-form-label results__row-title"),w(be,"class","input-group"),w(X,"class","form-group tpp-form-group"),w(Q,"class","personal-projection-form-content__column"),w(V,"class","personal-projection-form-content__fields"),w(t,"class","")},m(G,me){ce(G,t,me),m(t,n),m(n,i),m(n,r),ie&&ie.m(n,null),m(t,s),m(t,o),Y&&Y.m(o,null),m(o,d),m(o,c),m(c,v),m(v,T),m(T,b),m(T,A),m(T,E),Pe.m(E,null),m(o,I),m(o,D),ae(O,D,null),m(D,M),ae(F,D,null),m(o,$),m(o,L),ae(j,L,null),m(o,H),m(o,V),m(V,Q),m(Q,X),m(X,te),m(X,ne),m(X,be),ee.m(be,null),Ce=!0},p(G,[me]){me&2&&(a=!Xn.isNil(G[1])),a?ie?ie.p(G,me):(ie=PI(G),ie.c(),ie.m(n,null)):ie&&(ie.d(1),ie=null),l&&Y.p(G,me),Me===(Me=he(G,me))&&Pe?Pe.p(G,me):(Pe.d(1),Pe=Me(G),Pe&&(Pe.c(),Pe.m(E,null))),qe===(qe=We(G,me))&&ee?ee.p(G,me):(ee.d(1),ee=qe(G),ee&&(ee.c(),ee.m(be,null)))},i(G){Ce||(U(Y),U(O.$$.fragment,G),U(F.$$.fragment,G),U(j.$$.fragment,G),Ce=!0)},o(G){W(Y),W(O.$$.fragment,G),W(F.$$.fragment,G),W(j.$$.fragment,G),Ce=!1},d(G){G&&_e(t),ie&&ie.d(),Y&&Y.d(),Pe.d(),se(O),se(F),se(j),ee.d()}}}function n1e(e,t,n){var b;let i,r;Sn(e,hi,A=>n(2,i=A)),Sn(e,__,A=>n(3,r=A));let{serverCalculatedParameters:a}=t,{statusNotice:s=null}=t;const o=i.state_of_residency,l=(b=a2.find(A=>A.value===i.state_of_residency))==null?void 0:b.title,d=qme[o];function c(A,E){e.$$.not_equal(i[E],A)&&(i[E]=A,hi.set(i))}function v(A,E){e.$$.not_equal(i[E],A)&&(i[E]=A,hi.set(i))}function T(A,E){e.$$.not_equal(i[E],A)&&(i[E]=A,hi.set(i))}return e.$$set=A=>{"serverCalculatedParameters"in A&&n(0,a=A.serverCalculatedParameters),"statusNotice"in A&&n(1,s=A.statusNotice)},[a,s,i,r,l,d,c,v,T]}class i1e extends Qt{constructor(t){super(),Jt(this,t,n1e,t1e,Kt,{serverCalculatedParameters:0,statusNotice:1})}}const kN=vo([Vme,Hu],([e,t])=>{let n={Demographics:["type","state_of_residency","fed_par_no_of_dependents_from_0_to_6","fed_par_no_of_dependents_from_6_to_17","fed_par_no_of_dependents_over_17"],Wages:Gn.filter(e,i=>Gn.startsWith(i,"wages[")),Income:["social_security_taxpayer","social_security_spouse","fed_inc_bank_1_interest_taxpayer","fed_inc_ordinary_dividends_taxpayer","fed_inc_money_market_1_interest_taxpayer","fed_inc_stock_qualified_div_taxpayer","fed_inc_stock_st_div_gains_taxpayer","fed_inc_stock_lt_cap_gains_taxpayer","fed_inc_adj_capital_losses_this_year_taxpayer","fed_inc_stock_60man_cap_gains_taxpayer","fed_inc_other_income_taxpayer","fed_inc_bank_1_interest_spouse","fed_inc_ordinary_dividends_spouse","fed_inc_money_market_1_interest_spouse","fed_inc_stock_qualified_div_spouse","fed_inc_stock_st_div_gains_spouse","fed_inc_stock_lt_cap_gains_spouse","fed_inc_adj_capital_losses_this_year_spouse","fed_inc_stock_60man_cap_gains_spouse","fed_inc_other_income_spouse","fed_inc_ca_tax_refund_taxpayer","fed_inc_ca_tax_refund_spouse"],RentalRealEstate:Gn.filter(e,i=>Gn.startsWith(i,"rental_real_estate[")),Adjustments:["fed_inc_adj_health_insurance_premium_taxpayer","ira_deduction_taxpayer","per_ira_deduction_taxpayer","per_health_savings_acct_taxpayer","other_deductions_taxpayer","fed_inc_adj_health_insurance_premium_spouse","ira_deduction_spouse","per_ira_deduction_spouse","per_health_savings_acct_spouse","other_deductions_spouse"],Deductions:["fed_ded_mortgage_interest_taxpayer","fed_ded_state_income_taxes_taxpayer","fed_ded_local_income_taxes_taxpayer","fed_ded_prior_state_inc_taxes_taxpayer","fed_ded_property_taxes_taxpayer","fed_ded_personal_property_taxes_taxpayer","fed_ded_home_loan_points_taxpayer","fed_ded_medical_and_dental_taxpayer","fed_ded_cash_donations_taxpayer","fed_ded_noncash_donations_taxpayer","fed_ded_other_deductions_taxpayer","fed_ded_mortgage_interest_spouse","fed_ded_state_income_taxes_spouse","fed_ded_local_income_taxes_spouse","fed_ded_prior_state_inc_taxes_spouse","fed_ded_property_taxes_spouse","fed_ded_personal_property_taxes_spouse","fed_ded_home_loan_points_spouse","fed_ded_medical_and_dental_spouse","fed_ded_cash_donations_spouse","fed_ded_noncash_donations_spouse","fed_ded_other_deductions_spouse"],OtherBusinessIncome:["usr_scorp_business_income_taxpayer","usr_schedule_c_income_taxpayer","usr_scorp_business_income_spouse","usr_schedule_c_income_spouse"],Taxes:["fed_tax_previous_year_taxpayer","state_tax_previous_year_taxpayer","fed_tax_owed_other_taxes_taxpayer","fed_tax_owed_prior_year_amt_carryforward_taxpayer","fed_tax_owed_tax_credits_taxpayer","fed_tax_owed_child_tax_credit_override_taxpayer","fed_tax_owed_child_tax_credit_override_guard_taxpayer","res_inc_itemized_override_taxpayer","res_inc_itemized_override_guard_taxpayer","res_passthrough_deduction_override_taxpayer","res_passthrough_deduction_override_guard_taxpayer","res_se_tax_override_taxpayer","res_se_tax_override_guard_taxpayer","res_total_tax_override_taxpayer","res_total_tax_override_guard_taxpayer","res_state_tax_before_payments_override_taxpayer","res_state_tax_before_payments_override_guard_taxpayer","business_inc_ccorp_fed_tax_override_taxpayer","business_inc_ccorp_fed_tax_override_guard_taxpayer","business_inc_ccorp_state_tax_override_taxpayer","business_inc_ccorp_state_tax_override_guard_taxpayer","fed_tax_previous_year_spouse","state_tax_previous_year_spouse","fed_tax_owed_other_taxes_spouse","fed_tax_owed_prior_year_amt_carryforward_spouse","fed_tax_owed_tax_credits_spouse","fed_tax_owed_child_tax_credit_override_spouse","fed_tax_owed_child_tax_credit_override_guard_spouse","res_inc_itemized_override_spouse","res_inc_itemized_override_guard_spouse","res_passthrough_deduction_override_spouse","res_passthrough_deduction_override_guard_spouse","res_se_tax_override_spouse","res_se_tax_override_guard_spouse","res_total_tax_override_spouse","res_total_tax_override_guard_spouse","res_state_tax_before_payments_override_spouse","res_state_tax_before_payments_override_guard_spouse","business_inc_ccorp_fed_tax_override_spouse","business_inc_ccorp_fed_tax_override_guard_spouse","business_inc_ccorp_state_tax_override_spouse","business_inc_ccorp_state_tax_override_guard_spouse"],Payments:["fed_est_tax_pay_march_taxpayer","fed_est_tax_pay_june_taxpayer","fed_est_tax_pay_september_taxpayer","fed_est_tax_pay_december_taxpayer","state_estimated_tax_payments_q1_taxpayer","state_estimated_tax_payments_q2_taxpayer","state_estimated_tax_payments_q3_taxpayer","state_estimated_tax_payments_q4_taxpayer","fed_est_tax_pay_march_spouse","fed_est_tax_pay_june_spouse","fed_est_tax_pay_september_spouse","fed_est_tax_pay_december_spouse","state_estimated_tax_payments_q1_spouse","state_estimated_tax_payments_q2_spouse","state_estimated_tax_payments_q3_spouse","state_estimated_tax_payments_q4_spouse"],StateAdjustments:["state_adj_additions_taxpayer","state_adj_substractions_taxpayer","state_adj_tax_credit_taxpayer","state_adj_additions_spouse","state_adj_substractions_spouse","state_adj_tax_credit_spouse"]};return Object.keys(t).length>0&&(n={...n,BusinessIncomeExpense:r1e(t)}),n});function r1e(e){let t=[];return Object.entries(e).forEach(([n,i])=>{Object.keys(Gn.omit(i,"name")).forEach(r=>t.push(`${n}.${r}`))}),t}const dm=ao([{component:Ove,title:"Demographics",componentName:"Demographics"},{component:i0e,title:"Wages/W-2s",componentName:"Wages"},{component:c0e,title:"Income",componentName:"Income"},{component:k0e,title:"Rental Real Estate",componentName:"RentalRealEstate"},{component:P0e,title:"Adjustments",componentName:"Adjustments"},{component:A0e,title:"Deductions",componentName:"Deductions"},{component:M0e,title:"Other Business Income",componentName:"OtherBusinessIncome"},{component:U0e,title:"Taxes",componentName:"Taxes"},{component:V0e,title:"Payments",componentName:"Payments"},{component:i1e,title:"State Adjustments",componentName:"StateAdjustments"}]),SN=vo(dm,e=>Gn.map(e,"componentName")),CN=vo([SN,kN,__,iN],([e,t,n,i])=>new Set(Gn.filter(e,r=>Gn.some(t[r],a=>n.has(a)||i.has(a)))));function II(e,t,n){const i=e.slice();return i[10]=t[n],i[12]=n,i}function a1e(e){let t;return{c(){t=P("i"),w(t,"aria-label","Valid Tab"),w(t,"class","fa fa-check personal-projection-form-navigation__item-valid")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function s1e(e){let t;return{c(){t=P("i"),w(t,"aria-label","Invalid Tab"),w(t,"class","fa fa-times personal-projection-form-navigation__item-invalid")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function AI(e){let t,n,i,r,a,s=e[10].title+"",o,l,d,c;function v(E,y){if(y&10&&(n=null),y&6&&(i=null),n==null&&(n=!!E[3].has(E[10].componentName)),n)return s1e;if(i==null&&(i=!!E[2].has(E[10].componentName)),i)return a1e}let T=v(e,-1),b=T&&T(e);function A(){return e[9](e[12])}return{c(){t=P("div"),b&&b.c(),r=K(),a=P("span"),o=Le(s),l=K(),w(t,"class","personal-projection-form-navigation__item"),wt(t,"personal-projection-form-navigation__item-active",e[0]===e[12])},m(E,y){ce(E,t,y),b&&b.m(t,null),m(t,r),m(t,a),m(a,o),m(t,l),d||(c=ct(t,"click",A),d=!0)},p(E,y){e=E,T!==(T=v(e,y))&&(b&&b.d(1),b=T&&T(e),b&&(b.c(),b.m(t,r))),y&2&&s!==(s=e[10].title+"")&&vt(o,s),y&1&&wt(t,"personal-projection-form-navigation__item-active",e[0]===e[12])},d(E){E&&_e(t),b&&b.d(),d=!1,c()}}}function o1e(e){let t,n=e[1],i=[];for(let r=0;r<n.length;r+=1)i[r]=AI(II(e,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();t=On()},m(r,a){for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(r,a);ce(r,t,a)},p(r,[a]){if(a&15){n=r[1];let s;for(s=0;s<n.length;s+=1){const o=II(r,n,s);i[s]?i[s].p(o,a):(i[s]=AI(o),i[s].c(),i[s].m(t.parentNode,t))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},i:ot,o:ot,d(r){Nn(i,r),r&&_e(t)}}}function l1e(e,t,n){let i,r,a,s,o,l;Sn(e,dm,b=>n(1,r=b)),Sn(e,jp,b=>n(6,a=b)),Sn(e,kN,b=>n(7,s=b)),Sn(e,SN,b=>n(8,o=b)),Sn(e,CN,b=>n(3,l=b));let{currentTab:d}=t,c=new Set([]),v=new Set([]);const T=b=>n(0,d=b);return e.$$set=b=>{"currentTab"in b&&n(0,d=b.currentTab)},e.$$.update=()=>{e.$$.dirty&448&&n(5,i=new Set(Xn.filter(o,b=>Xn.every(s[b],A=>a.has(A))))),e.$$.dirty&19&&n(4,c=new Set([...c,r[d].componentName])),e.$$.dirty&48&&n(2,v=new Set(Xn.intersection([...i],[...c])))},[d,r,v,l,c,i,a,s,o,T]}class u1e extends Qt{constructor(t){super(),Jt(this,t,l1e,o1e,Kt,{currentTab:0})}}function d1e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V;a=new Q$({props:{previousYear:e[0],currentYear:e[1],selectedYear:e[2],strategyUpdateUrl:e[3],strategyAfterUpdateUrl:e[4],csrf:e[8]}});function Q(be){e[11](be)}let X={};e[9]!==void 0&&(X.currentTab=e[9]),v=new u1e({props:X}),Oe.push(()=>$e(v,"currentTab",Q));var te=e[10][e[9]].component;function ne(be){return{props:{serverCalculatedParameters:be[5],statusNotice:be[6]}}}return te&&(y=ha(te,ne(e))),{c(){t=P("div"),n=P("h1"),n.textContent="Personal Projection Data Entry",i=K(),r=P("div"),re(a.$$.fragment),s=K(),o=P("section"),l=P("div"),d=P("div"),c=P("div"),re(v.$$.fragment),b=K(),A=P("div"),E=P("div"),y&&re(y.$$.fragment),I=K(),D=P("form"),O=P("input"),M=K(),F=P("input"),$=K(),L=P("button"),L.textContent="Reset",w(n,"class","personal-projection-form-header"),w(r,"class","personal-projection-form-top-actions breadcrumb-wrapper"),w(t,"class","pageheader"),w(c,"class","personal-projection-form-navigation"),w(d,"class","personal-projection-form__navigation"),w(O,"type","hidden"),w(O,"name","authenticity_token"),O.value=e[8],w(F,"type","hidden"),w(F,"name","_method"),F.value="DELETE",w(L,"class","btn btn-primary btn-trans"),w(L,"type","submit"),w(D,"action",e[7]),w(D,"method","POST"),w(E,"class","personal-projection-form-content"),w(A,"class","personal-projection-form__content"),w(l,"class","personal-projection-form"),w(o,"id","main-content")},m(be,ue){ce(be,t,ue),m(t,n),m(t,i),m(t,r),ae(a,r,null),ce(be,s,ue),ce(be,o,ue),m(o,l),m(l,d),m(d,c),ae(v,c,null),m(l,b),m(l,A),m(A,E),y&&ae(y,E,null),m(E,I),m(E,D),m(D,O),m(D,M),m(D,F),m(D,$),m(D,L),j=!0,H||(V=ct(D,"submit",f1e),H=!0)},p(be,[ue]){const Ce={};ue&1&&(Ce.previousYear=be[0]),ue&2&&(Ce.currentYear=be[1]),ue&4&&(Ce.selectedYear=be[2]),ue&8&&(Ce.strategyUpdateUrl=be[3]),ue&16&&(Ce.strategyAfterUpdateUrl=be[4]),ue&256&&(Ce.csrf=be[8]),a.$set(Ce);const ie={};!T&&ue&512&&(T=!0,ie.currentTab=be[9],Ne(()=>T=!1)),v.$set(ie);const Y={};if(ue&32&&(Y.serverCalculatedParameters=be[5]),ue&64&&(Y.statusNotice=be[6]),ue&1536&&te!==(te=be[10][be[9]].component)){if(y){pn();const he=y;W(he.$$.fragment,1,0,()=>{se(he,1)}),hn()}te?(y=ha(te,ne(be)),re(y.$$.fragment),U(y.$$.fragment,1),ae(y,E,I)):y=null}else te&&y.$set(Y);(!j||ue&256)&&(O.value=be[8]),(!j||ue&128)&&w(D,"action",be[7])},i(be){j||(U(a.$$.fragment,be),U(v.$$.fragment,be),y&&U(y.$$.fragment,be),j=!0)},o(be){W(a.$$.fragment,be),W(v.$$.fragment,be),y&&W(y.$$.fragment,be),j=!1},d(be){be&&_e(t),se(a),be&&_e(s),be&&_e(o),se(v),y&&se(y),H=!1,V()}}}function f1e(e){confirm("This will reset to defaults your current projection. Are you sure you want to proceed?")||e.preventDefault()}function c1e(e,t,n){let i;Sn(e,dm,E=>n(10,i=E));let{previousYear:r}=t,{currentYear:a}=t,{selectedYear:s}=t,{strategyUpdateUrl:o}=t,{strategyAfterUpdateUrl:l}=t,{serverCalculatedParameters:d}=t,{statusNotice:c}=t,{projectionResetUrl:v}=t,{csrf:T}=t,b=0;function A(E){b=E,n(9,b)}return e.$$set=E=>{"previousYear"in E&&n(0,r=E.previousYear),"currentYear"in E&&n(1,a=E.currentYear),"selectedYear"in E&&n(2,s=E.selectedYear),"strategyUpdateUrl"in E&&n(3,o=E.strategyUpdateUrl),"strategyAfterUpdateUrl"in E&&n(4,l=E.strategyAfterUpdateUrl),"serverCalculatedParameters"in E&&n(5,d=E.serverCalculatedParameters),"statusNotice"in E&&n(6,c=E.statusNotice),"projectionResetUrl"in E&&n(7,v=E.projectionResetUrl),"csrf"in E&&n(8,T=E.csrf)},[r,a,s,o,l,d,c,v,T,b,i,A]}class _1e extends Qt{constructor(t){super(),Jt(this,t,c1e,d1e,Kt,{previousYear:0,currentYear:1,selectedYear:2,strategyUpdateUrl:3,strategyAfterUpdateUrl:4,serverCalculatedParameters:5,statusNotice:6,projectionResetUrl:7,csrf:8})}}var Sy={exports:{}};/*!
 * accounting.js v0.4.1
 * Copyright 2014 Open Exchange Rates
 *
 * Freely distributable under the MIT license.
 * Portions of accounting.js are inspired or borrowed from underscore.js
 *
 * Full details and documentation:
 * http://openexchangerates.github.io/accounting.js/
 */(function(e,t){(function(n,i){var r={};r.version="0.4.1",r.settings={currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}};var a=Array.prototype.map,s=Array.isArray,o=Object.prototype.toString;function l(O){return!!(O===""||O&&O.charCodeAt&&O.substr)}function d(O){return s?s(O):o.call(O)==="[object Array]"}function c(O){return O&&o.call(O)==="[object Object]"}function v(O,M){var F;O=O||{},M=M||{};for(F in M)M.hasOwnProperty(F)&&O[F]==null&&(O[F]=M[F]);return O}function T(O,M,F){var $=[],L,j;if(!O)return $;if(a&&O.map===a)return O.map(M,F);for(L=0,j=O.length;L<j;L++)$[L]=M.call(F,O[L],L,O);return $}function b(O,M){return O=Math.round(Math.abs(O)),isNaN(O)?M:O}function A(O){var M=r.settings.currency.format;return typeof O=="function"&&(O=O()),l(O)&&O.match("%v")?{pos:O,neg:O.replace("-","").replace("%v","-%v"),zero:O}:!O||!O.pos||!O.pos.match("%v")?l(M)?r.settings.currency.format={pos:M,neg:M.replace("%v","-%v"),zero:M}:M:O}var E=r.unformat=r.parse=function(O,M){if(d(O))return T(O,function(L){return E(L,M)});if(O=O||0,typeof O=="number")return O;M=M||r.settings.number.decimal;var F=new RegExp("[^0-9-"+M+"]",["g"]),$=parseFloat((""+O).replace(/\((.*)\)/,"-$1").replace(F,"").replace(M,"."));return isNaN($)?0:$},y=r.toFixed=function(O,M){M=b(M,r.settings.number.precision);var F=Math.pow(10,M);return(Math.round(r.unformat(O)*F)/F).toFixed(M)},I=r.formatNumber=r.format=function(O,M,F,$){if(d(O))return T(O,function(X){return I(X,M,F,$)});O=E(O);var L=v(c(M)?M:{precision:M,thousand:F,decimal:$},r.settings.number),j=b(L.precision),H=O<0?"-":"",V=parseInt(y(Math.abs(O||0),j),10)+"",Q=V.length>3?V.length%3:0;return H+(Q?V.substr(0,Q)+L.thousand:"")+V.substr(Q).replace(/(\d{3})(?=\d)/g,"$1"+L.thousand)+(j?L.decimal+y(Math.abs(O),j).split(".")[1]:"")},D=r.formatMoney=function(O,M,F,$,L,j){if(d(O))return T(O,function(X){return D(X,M,F,$,L,j)});O=E(O);var H=v(c(M)?M:{symbol:M,precision:F,thousand:$,decimal:L,format:j},r.settings.currency),V=A(H.format),Q=O>0?V.pos:O<0?V.neg:V.zero;return Q.replace("%s",H.symbol).replace("%v",I(Math.abs(O),b(H.precision),H.thousand,H.decimal))};r.formatColumn=function(O,M,F,$,L,j){if(!O)return[];var H=v(c(M)?M:{symbol:M,precision:F,thousand:$,decimal:L,format:j},r.settings.currency),V=A(H.format),Q=V.pos.indexOf("%s")<V.pos.indexOf("%v"),X=0,te=T(O,function(ne,be){if(d(ne))return r.formatColumn(ne,H);ne=E(ne);var ue=ne>0?V.pos:ne<0?V.neg:V.zero,Ce=ue.replace("%s",H.symbol).replace("%v",I(Math.abs(ne),b(H.precision),H.thousand,H.decimal));return Ce.length>X&&(X=Ce.length),Ce});return T(te,function(ne,be){return l(ne)&&ne.length<X?Q?ne.replace(H.symbol,H.symbol+new Array(X-ne.length+1).join(" ")):new Array(X-ne.length+1).join(" ")+ne:ne})},e.exports&&(t=e.exports=r),t.accounting=r})()})(Sy,Sy.exports);var p1e=Sy.exports;const Er=cl(p1e);function h1e(e){let t,n,i,r,a,s,o;const l=e[4].default,d=fu(l,e,e[3],null);return{c(){t=P("div"),n=P("div"),i=P("h3"),r=Le(e[0]),a=K(),s=P("div"),d&&d.c(),w(i,"class","card-title mb-0"),w(n,"class","card-header"),w(s,"class","card-body svelte-ejtu9c"),w(t,"class",n_(e[1])+" svelte-ejtu9c")},m(c,v){ce(c,t,v),m(t,n),m(n,i),m(i,r),m(t,a),m(t,s),d&&d.m(s,null),o=!0},p(c,[v]){(!o||v&1)&&vt(r,c[0]),d&&d.p&&(!o||v&8)&&cu(d,l,c,c[3],o?pu(l,c[3],v,null):_u(c[3]),null)},i(c){o||(U(d,c),o=!0)},o(c){W(d,c),o=!1},d(c){c&&_e(t),d&&d.d(c)}}}function m1e(e,t,n){let{$$slots:i={},$$scope:r}=t,{title:a}=t,{className:s}=t;const o=`card simulator-dashboard__item-panel mb-3 ${s||""}`;return e.$$set=l=>{"title"in l&&n(0,a=l.title),"className"in l&&n(2,s=l.className),"$$scope"in l&&n(3,r=l.$$scope)},[a,o,s,r,i]}class Jg extends Qt{constructor(t){super(),Jt(this,t,m1e,h1e,Kt,{title:0,className:2})}}function DI(e){let t,n=e[3]>0?"more":"less",i,r,a,s=Er.formatMoney(Math.abs(e[3]),"$",0)+"",o;return{c(){t=P("h3"),i=Le(n),r=Le(` by
            `),a=P("span"),o=Le(s),w(t,"class","difference-text")},m(l,d){ce(l,t,d),m(t,i),m(t,r),m(t,a),m(a,o)},p(l,d){d&8&&n!==(n=l[3]>0?"more":"less")&&vt(i,n),d&8&&s!==(s=Er.formatMoney(Math.abs(l[3]),"$",0)+"")&&vt(o,s)},d(l){l&&_e(t)}}}function g1e(e){let t,n=e[1].currentTaxDue+"",i,r,a=e[3]!==0&&DI(e);return{c(){t=P("div"),i=Le(n),r=K(),a&&a.c(),w(t,"class","simulator-dashboard__tax-due")},m(s,o){ce(s,t,o),m(t,i),m(t,r),a&&a.m(t,null)},p(s,o){o&2&&n!==(n=s[1].currentTaxDue+"")&&vt(i,n),s[3]!==0?a?a.p(s,o):(a=DI(s),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(s){s&&_e(t),a&&a.d()}}}function OI(e){let t,n=e[2]>0?"more":"less",i,r,a,s=Er.formatMoney(Math.abs(e[2]),"$",0)+"",o;return{c(){t=P("h3"),i=Le(n),r=Le(` by
            `),a=P("span"),o=Le(s),w(t,"class","difference-text")},m(l,d){ce(l,t,d),m(t,i),m(t,r),m(t,a),m(a,o)},p(l,d){d&4&&n!==(n=l[2]>0?"more":"less")&&vt(i,n),d&4&&s!==(s=Er.formatMoney(Math.abs(l[2]),"$",0)+"")&&vt(o,s)},d(l){l&&_e(t)}}}function v1e(e){let t,n=e[1].stateTax+"",i,r,a=e[2]!==0&&OI(e);return{c(){t=P("div"),i=Le(n),r=K(),a&&a.c(),w(t,"class","simulator-dashboard__state-tax-due")},m(s,o){ce(s,t,o),m(t,i),m(t,r),a&&a.m(t,null)},p(s,o){o&2&&n!==(n=s[1].stateTax+"")&&vt(i,n),s[2]!==0?a?a.p(s,o):(a=OI(s),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(s){s&&_e(t),a&&a.d()}}}function b1e(e){let t,n,i,r,a,s,o=e[1].wages+"",l,d,c,v,T,b,A=e[1].interestDividends+"",E,y,I,D,O,M,F=e[1].capitalGains+"",$,L,j,H,V,Q,X=e[1].businessIncome+"",te,ne,be,ue,Ce,ie,Y=e[1].rentalIncome+"",he,Me,Pe,We,qe,ee,G=e[1].otherIncome+"",me;return{c(){t=P("table"),n=P("tbody"),i=P("tr"),r=P("td"),r.textContent="Wages:",a=K(),s=P("td"),l=Le(o),d=K(),c=P("tr"),v=P("td"),v.textContent="Interest & Dividends:",T=K(),b=P("td"),E=Le(A),y=K(),I=P("tr"),D=P("td"),D.textContent="Capital Gains:",O=K(),M=P("td"),$=Le(F),L=K(),j=P("tr"),H=P("td"),H.textContent="Business Income:",V=K(),Q=P("td"),te=Le(X),ne=K(),be=P("tr"),ue=P("td"),ue.textContent="Rental Income:",Ce=K(),ie=P("td"),he=Le(Y),Me=K(),Pe=P("tr"),We=P("td"),We.textContent="Other Income:",qe=K(),ee=P("td"),me=Le(G),w(r,"class","simulator-stats__title"),w(s,"class","simulator-stats__value"),w(v,"class","simulator-stats__title"),w(b,"class","simulator-stats__value"),w(D,"class","simulator-stats__title"),w(M,"class","simulator-stats__value"),w(H,"class","simulator-stats__title"),w(Q,"class","simulator-stats__value"),w(ue,"class","simulator-stats__title"),w(ie,"class","simulator-stats__value"),w(We,"class","simulator-stats__title"),w(ee,"class","simulator-stats__value"),w(t,"class","table table-no-first-line-border mb-0")},m(Te,De){ce(Te,t,De),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,l),m(n,d),m(n,c),m(c,v),m(c,T),m(c,b),m(b,E),m(n,y),m(n,I),m(I,D),m(I,O),m(I,M),m(M,$),m(n,L),m(n,j),m(j,H),m(j,V),m(j,Q),m(Q,te),m(n,ne),m(n,be),m(be,ue),m(be,Ce),m(be,ie),m(ie,he),m(n,Me),m(n,Pe),m(Pe,We),m(Pe,qe),m(Pe,ee),m(ee,me)},p(Te,De){De&2&&o!==(o=Te[1].wages+"")&&vt(l,o),De&2&&A!==(A=Te[1].interestDividends+"")&&vt(E,A),De&2&&F!==(F=Te[1].capitalGains+"")&&vt($,F),De&2&&X!==(X=Te[1].businessIncome+"")&&vt(te,X),De&2&&Y!==(Y=Te[1].rentalIncome+"")&&vt(he,Y),De&2&&G!==(G=Te[1].otherIncome+"")&&vt(me,G)},d(Te){Te&&_e(t)}}}function y1e(e){let t,n,i,r,a,s,o=e[1].adjustments+"",l,d,c,v,T,b,A=e[1].itemizedDeductions+"",E,y,I,D,O,M,F=e[1].passthroughDeduction+"",$,L,j,H,V,Q,X=e[1].taxableIncome+"",te,ne,be,ue,Ce,ie,Y=e[1].credits+"",he,Me,Pe,We,qe,ee,G=e[1].paymentsWithholdings+"",me;return{c(){t=P("table"),n=P("tbody"),i=P("tr"),r=P("td"),r.textContent="Adjustments:",a=K(),s=P("td"),l=Le(o),d=K(),c=P("tr"),v=P("td"),v.textContent="Itemized Deductions:",T=K(),b=P("td"),E=Le(A),y=K(),I=P("tr"),D=P("td"),D.textContent="Passthrough Deduction:",O=K(),M=P("td"),$=Le(F),L=K(),j=P("tr"),H=P("td"),H.textContent="Taxable Income:",V=K(),Q=P("td"),te=Le(X),ne=K(),be=P("tr"),ue=P("td"),ue.textContent="Credits:",Ce=K(),ie=P("td"),he=Le(Y),Me=K(),Pe=P("tr"),We=P("td"),We.textContent="Payments & Withholdings:",qe=K(),ee=P("td"),me=Le(G),w(r,"class","simulator-stats__title"),w(s,"class","simulator-stats__value"),w(v,"class","simulator-stats__title"),w(b,"class","simulator-stats__value"),w(D,"class","simulator-stats__title"),w(M,"class","simulator-stats__value"),w(H,"class","simulator-stats__title"),w(Q,"class","simulator-stats__value"),w(ue,"class","simulator-stats__title"),w(ie,"class","simulator-stats__value"),w(We,"class","simulator-stats__title"),w(ee,"class","simulator-stats__value"),w(t,"class","table table-no-first-line-border mb-0")},m(Te,De){ce(Te,t,De),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,l),m(n,d),m(n,c),m(c,v),m(c,T),m(c,b),m(b,E),m(n,y),m(n,I),m(I,D),m(I,O),m(I,M),m(M,$),m(n,L),m(n,j),m(j,H),m(j,V),m(j,Q),m(Q,te),m(n,ne),m(n,be),m(be,ue),m(be,Ce),m(be,ie),m(ie,he),m(n,Me),m(n,Pe),m(Pe,We),m(Pe,qe),m(Pe,ee),m(ee,me)},p(Te,De){De&2&&o!==(o=Te[1].adjustments+"")&&vt(l,o),De&2&&A!==(A=Te[1].itemizedDeductions+"")&&vt(E,A),De&2&&F!==(F=Te[1].passthroughDeduction+"")&&vt($,F),De&2&&X!==(X=Te[1].taxableIncome+"")&&vt(te,X),De&2&&Y!==(Y=Te[1].credits+"")&&vt(he,Y),De&2&&G!==(G=Te[1].paymentsWithholdings+"")&&vt(me,G)},d(Te){Te&&_e(t)}}}function w1e(e){let t,n,i,r,a,s,o,l,d,c,v,T;return i=new Jg({props:{title:"Federal Tax Due",className:"panel-turquoise--red simulator-dashboard__row-item",$$slots:{default:[g1e]},$$scope:{ctx:e}}}),a=new Jg({props:{title:"State Tax Due",className:"panel-turquoise simulator-dashboard__row-item",$$slots:{default:[v1e]},$$scope:{ctx:e}}}),l=new Jg({props:{title:"Income",$$slots:{default:[b1e]},$$scope:{ctx:e}}}),v=new Jg({props:{title:"Deductions & Payments",$$slots:{default:[y1e]},$$scope:{ctx:e}}}),{c(){t=P("div"),n=P("div"),re(i.$$.fragment),r=K(),re(a.$$.fragment),s=K(),o=P("div"),re(l.$$.fragment),d=K(),c=P("div"),re(v.$$.fragment),w(n,"class","simulator-dashboard__row"),w(o,"class","simulator-dashboard__item"),w(c,"class","simulator-dashboard__item"),w(t,"class","row simulator-dashboard"),wt(t,"simulator-dashboard____loading",e[0]!==null)},m(b,A){ce(b,t,A),m(t,n),ae(i,n,null),m(n,r),ae(a,n,null),m(t,s),m(t,o),ae(l,o,null),m(t,d),m(t,c),ae(v,c,null),T=!0},p(b,[A]){const E={};A&266&&(E.$$scope={dirty:A,ctx:b}),i.$set(E);const y={};A&262&&(y.$$scope={dirty:A,ctx:b}),a.$set(y);const I={};A&258&&(I.$$scope={dirty:A,ctx:b}),l.$set(I);const D={};A&258&&(D.$$scope={dirty:A,ctx:b}),v.$set(D),(!T||A&1)&&wt(t,"simulator-dashboard____loading",b[0]!==null)},i(b){T||(U(i.$$.fragment,b),U(a.$$.fragment,b),U(l.$$.fragment,b),U(v.$$.fragment,b),T=!0)},o(b){W(i.$$.fragment,b),W(a.$$.fragment,b),W(l.$$.fragment,b),W(v.$$.fragment,b),T=!1},d(b){b&&_e(t),se(i),se(a),se(l),se(v)}}}function T1e(e,t,n){let i,r,a,{loading:s}=t,{results:o}=t,l,d,c={};return e.$$set=v=>{"loading"in v&&n(0,s=v.loading),"results"in v&&n(4,o=v.results)},e.$$.update=()=>{e.$$.dirty&16&&n(7,i=!Xn.isEqual(o,{})),e.$$.dirty&240&&i&&(n(1,c.currentTaxDue=Er.formatMoney(o.res_federal_tax_remaining,"$",0),c),n(1,c.stateTax=Er.formatMoney(o.res_state_tax,"$",0),c),n(1,c.wages=Er.formatMoney(o.res_wages,"$",0),c),n(1,c.interestDividends=Er.formatMoney(o.res_interest_and_dividents,"$",0),c),n(1,c.capitalGains=Er.formatMoney(o.res_capital_gains,"$",0),c),n(1,c.businessIncome=Er.formatMoney(o.business_income,"$",0),c),n(1,c.rentalIncome=Er.formatMoney(o.res_rental_income,"$",0),c),n(1,c.otherIncome=Er.formatMoney(o.res_other_income,"$",0),c),n(1,c.adjustments=Er.formatMoney(o.res_inc_adjustments,"$",0),c),n(1,c.itemizedDeductions=Er.formatMoney(o.res_inc_itemized,"$",0),c),n(1,c.passthroughDeduction=Er.formatMoney(o.res_passthrough_deduction,"$",0),c),n(1,c.taxableIncome=Er.formatMoney(o.res_taxable_income,"$",0),c),n(1,c.credits=Er.formatMoney(o.fed_tax_owed_tax_credits+o.fed_tax_owed_child_tax_credit,"$",0),c),n(1,c.paymentsWithholdings=Er.formatMoney(o.fed_tax_owed_tax_withheld+o.fed_est_tax_pay_total,"$",0),c),n(5,l=l||o.res_federal_tax_remaining),n(6,d=d||o.res_state_tax)),e.$$.dirty&176&&n(3,r=i?Math.round(o.res_federal_tax_remaining-l):0),e.$$.dirty&208&&n(2,a=i?Math.round(o.res_state_tax-d):0)},[s,c,a,r,o,l,d,i]}class PN extends Qt{constructor(t){super(),Jt(this,t,T1e,w1e,Kt,{loading:0,results:4})}}function MI(e,t,n){const i=e.slice();return i[11]=t[n][0],i[12]=t[n][1],i[14]=n,i}function xI(e){let t,n,i,r=e[14]+1+"",a,s,o=e[12].name+"",l,d,c,v;function T(){return e[7](e[11],e[14])}return{c(){t=P("li"),n=P("a"),i=P("div"),a=Le(r),s=Le(`
             `),l=Le(o),d=K(),w(i,"class","tab__number-circle"),w(n,"role","tab"),w(n,"href","#"),w(n,"class","nav-link"),wt(n,"active",e[0]===e[11]),w(t,"role","presentation"),w(t,"class","nav-item tab__wrapper")},m(b,A){ce(b,t,A),m(t,n),m(n,i),m(i,a),m(n,s),m(n,l),m(t,d),c||(v=ct(n,"click",Hi(T)),c=!0)},p(b,A){e=b,A&17&&wt(n,"active",e[0]===e[11])},d(b){b&&_e(t),c=!1,v()}}}function k1e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j=e[4],H=[];for(let ne=0;ne<j.length;ne+=1)H[ne]=xI(MI(e,j,ne));function V(ne){e[8](ne)}let Q={key:`revenue_${e[1]}`,handleChange:e[5],inputAddon:"$",hasError:Zg(e[3],e[0],"revenue")};e[2][e[0]].revenue!==void 0&&(Q.value=e[2][e[0]].revenue),D=new ns({props:Q}),Oe.push(()=>$e(D,"value",V));function X(ne){e[9](ne)}let te={key:`expense_${e[1]}`,handleChange:e[5],inputAddon:"$",hasError:Zg(e[3],e[0],"expense")};return e[2][e[0]].expense!==void 0&&(te.value=e[2][e[0]].expense),F=new ns({props:te}),Oe.push(()=>$e(F,"value",X)),{c(){t=P("div"),n=P("div"),n.innerHTML='<h2 class="personal-projection-form-content__section-name">Business Income &amp; Expense</h2>',i=K(),r=P("div"),a=K(),s=P("div"),o=P("ul");for(let ne=0;ne<H.length;ne+=1)H[ne].c();l=K(),d=P("div"),c=P("div"),v=P("br"),T=K(),b=P("br"),A=K(),E=P("div"),y=P("div"),I=P("div"),re(D.$$.fragment),M=K(),re(F.$$.fragment),w(n,"class","personal-projection-form-content__section-header"),w(o,"role","tablist"),w(o,"class","nav nav-tabs"),w(I,"class","personal-projection-form-content__column"),w(y,"class","personal-projection-form-content__fields"),w(c,"role","tabpanel"),w(c,"class","fade tab tab-collapsed tab-collapsed-expand tab-pane active show"),w(d,"class","tab-content")},m(ne,be){ce(ne,t,be),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(s,o);for(let ue=0;ue<H.length;ue+=1)H[ue]&&H[ue].m(o,null);m(s,l),m(s,d),m(d,c),m(c,v),m(c,T),m(c,b),m(c,A),m(c,E),m(E,y),m(y,I),ae(D,I,null),m(I,M),ae(F,I,null),L=!0},p(ne,[be]){if(be&81){j=ne[4];let ie;for(ie=0;ie<j.length;ie+=1){const Y=MI(ne,j,ie);H[ie]?H[ie].p(Y,be):(H[ie]=xI(Y),H[ie].c(),H[ie].m(o,null))}for(;ie<H.length;ie+=1)H[ie].d(1);H.length=j.length}const ue={};be&2&&(ue.key=`revenue_${ne[1]}`),be&9&&(ue.hasError=Zg(ne[3],ne[0],"revenue")),!O&&be&5&&(O=!0,ue.value=ne[2][ne[0]].revenue,Ne(()=>O=!1)),D.$set(ue);const Ce={};be&2&&(Ce.key=`expense_${ne[1]}`),be&9&&(Ce.hasError=Zg(ne[3],ne[0],"expense")),!$&&be&5&&($=!0,Ce.value=ne[2][ne[0]].expense,Ne(()=>$=!1)),F.$set(Ce)},i(ne){L||(U(D.$$.fragment,ne),U(F.$$.fragment,ne),L=!0)},o(ne){W(D.$$.fragment,ne),W(F.$$.fragment,ne),L=!1},d(ne){ne&&_e(t),Nn(H,ne),se(D),se(F)}}}function Zg(e,t,n){return e.has(`${t}.${n}`)}function S1e(e,t,n){let i,r,a;Sn(e,hi,A=>n(10,i=A)),Sn(e,Hu,A=>n(2,r=A)),Sn(e,iN,A=>n(3,a=A));let s=Object.entries(r),o=s[0][0],l=0;function d(){const A=r[o].revenue-r[o].expense;$s(hi,i[`${o}_value_override`]=A,i),$s(hi,i[`${o}_value_override_guard`]=1,i)}function c(A,E){n(0,o=A),n(1,l=E)}const v=(A,E)=>c(A,E);function T(A){e.$$.not_equal(r[o].revenue,A)&&(r[o].revenue=A,Hu.set(r))}function b(A){e.$$.not_equal(r[o].expense,A)&&(r[o].expense=A,Hu.set(r))}return[o,l,r,a,s,d,c,v,T,b]}class C1e extends Qt{constructor(t){super(),Jt(this,t,S1e,k1e,Kt,{})}}function RI(e,t,n){const i=e.slice();return i[23]=t[n],i[25]=n,i}function P1e(e){return{c:ot,m:ot,p:ot,i:ot,o:ot,d:ot}}function E1e(e){let t,n,i,r;const a=[A1e,I1e],s=[];function o(l,d){return l[1].length>0?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,d){let c=t;t=o(l),t===c?s[t].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i))},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function I1e(e){let t;return{c(){t=P("div"),t.textContent="No Simulations",w(t,"class","no-simulations svelte-18cpvfe")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function A1e(e){let t,n=[],i=new Map,r,a=e[1];const s=o=>o[23].id;for(let o=0;o<a.length;o+=1){let l=RI(e,a,o),d=s(l);i.set(d,n[o]=$I(d,l))}return{c(){t=P("ul");for(let o=0;o<n.length;o+=1)n[o].c();w(t,"class","list-group svelte-18cpvfe")},m(o,l){ce(o,t,l);for(let d=0;d<n.length;d+=1)n[d]&&n[d].m(t,null);r=!0},p(o,l){l&227&&(a=o[1],pn(),n=o_(n,l,s,1,o,a,i,t,ym,$I,null,RI),hn())},i(o){if(!r){for(let l=0;l<a.length;l+=1)U(n[l]);r=!0}},o(o){for(let l=0;l<n.length;l+=1)W(n[l]);r=!1},d(o){o&&_e(t);for(let l=0;l<n.length;l+=1)n[l].d()}}}function $I(e,t){let n,i,r,a,s;return i=new x$({props:{id:t[23].id,name:t[23].name,lastApplied:t[23].id===t[0].id,handleUpdate:t[7],handleDelete:t[6],handleApply:t[5]}}),{key:e,first:null,c(){n=P("li"),re(i.$$.fragment),r=K(),w(n,"class","list-group-item svelte-18cpvfe"),this.first=n},m(o,l){ce(o,n,l),ae(i,n,null),m(n,r),s=!0},p(o,l){t=o;const d={};l&2&&(d.id=t[23].id),l&2&&(d.name=t[23].name),l&3&&(d.lastApplied=t[23].id===t[0].id),i.$set(d)},i(o){s||(U(i.$$.fragment,o),xa(()=>{s&&(a||(a=Us(n,rs,{},!0)),a.run(1))}),s=!0)},o(o){W(i.$$.fragment,o),a||(a=Us(n,rs,{},!1)),a.run(0),s=!1},d(o){o&&_e(n),se(i),o&&a&&a.end()}}}function D1e(e){let t;return{c(){t=P("div"),t.innerHTML=`<span class="pane-loading-indicator__bounce1"></span> 
        <span class="pane-loading-indicator__bounce2"></span> 
        <span class="pane-loading-indicator__bounce3"></span>`,w(t,"class","no-simulations loading-simulations svelte-18cpvfe")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function O1e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y={ctx:e,current:null,token:null,hasCatch:!1,pending:D1e,then:E1e,catch:P1e,value:22,blocks:[,,,]};return jb(e[8],y),{c(){t=P("div"),n=P("div"),i=P("h2"),i.textContent="Simulations",r=K(),a=P("div"),s=P("input"),o=K(),l=P("button"),d=Le("Save Current Simulation"),v=K(),y.block.c(),w(i,"class","simulator-options-pane__header svelte-18cpvfe"),w(s,"type","string"),w(s,"id","simulated_projection_name"),w(s,"placeholder","Name"),w(s,"class","form-control simulated-pp-name svelte-18cpvfe"),w(l,"class","btn btn-primary"),l.disabled=c=e[3]==="",w(a,"class","simulated-pp-container svelte-18cpvfe"),w(n,"class","simulator-options-pane__section svelte-18cpvfe"),w(t,"class",T=n_(`simulator-options-pane ${e[2]?"simulator-options-pane_visible":""}`)+" svelte-18cpvfe")},m(I,D){ce(I,t,D),m(t,n),m(n,i),m(n,r),m(n,a),m(a,s),Pn(s,e[3]),m(a,o),m(a,l),m(l,d),m(n,v),y.block.m(n,y.anchor=null),y.mount=()=>n,y.anchor=null,b=!0,A||(E=[ct(s,"input",e[15]),ct(l,"click",e[4])],A=!0)},p(I,[D]){e=I,D&8&&Pn(s,e[3]),(!b||D&8&&c!==(c=e[3]===""))&&(l.disabled=c),JM(y,e,D),(!b||D&4&&T!==(T=n_(`simulator-options-pane ${e[2]?"simulator-options-pane_visible":""}`)+" svelte-18cpvfe"))&&w(t,"class",T)},i(I){b||(U(y.block),b=!0)},o(I){for(let D=0;D<3;D+=1){const O=y.blocks[D];W(O)}b=!1},d(I){I&&_e(t),y.block.d(),y.token=null,y=null,A=!1,vi(E)}}}function M1e(e,t,n){let i,r;Sn(e,Hu,H=>n(18,i=H)),Sn(e,sm,H=>n(19,r=H));let{showPane:a}=t,{initialForm:s}=t,{setInitialParams:o}=t,{changedFieldsOfPersonalProjection:l}=t,{businessCompanies:d}=t,{lastAppliedProjection:c}=t,{simulatedProjections:v}=t,{simulatedPPRepository:T}=t,{getChangedFields:b}=t,A={},E={},y="";async function I(){const H=await M(T.create({...l,name:y}));H&&(n(0,c=H.result),n(1,v=[...v,c]),n(3,y=""))}async function D(){const H=await M(T.all());H&&n(1,v=H.result)}async function O(H){const V=await M(T.one(H));if(!V)return;n(0,c=v.find(ne=>ne.id===H));const Q=V.result,X={...s,...Q},te=r2(X);hi.set(te),Hu.update(()=>{let ne=Gn.cloneDeep(d);for(const be of Object.keys(ne))ne[be].revenue=X[`${be}_revenue`]||ne[be].revenue,ne[be].expense=X[`${be}_expense`]||ne[be].expense;return ne}),A=Gn.cloneDeep(r),E=Gn.cloneDeep(i)}async function M(H){No.start();try{return await H}catch(V){if(V.name=="AbortError")return;Gr.error(V.message);return}finally{No.done()}}async function F(H){const V=await M(T.delete(H));V&&V.result==="success"&&(c.id===H&&o(),D())}function $(H,V){const Q=V||b(A,E,r,i);if(!Gn.isEmpty(Q))return M(T.update(H,Q))}const L=D();function j(){y=this.value,n(3,y)}return e.$$set=H=>{"showPane"in H&&n(2,a=H.showPane),"initialForm"in H&&n(9,s=H.initialForm),"setInitialParams"in H&&n(10,o=H.setInitialParams),"changedFieldsOfPersonalProjection"in H&&n(11,l=H.changedFieldsOfPersonalProjection),"businessCompanies"in H&&n(12,d=H.businessCompanies),"lastAppliedProjection"in H&&n(0,c=H.lastAppliedProjection),"simulatedProjections"in H&&n(1,v=H.simulatedProjections),"simulatedPPRepository"in H&&n(13,T=H.simulatedPPRepository),"getChangedFields"in H&&n(14,b=H.getChangedFields)},[c,v,a,y,I,O,F,$,L,s,o,l,d,T,b,j]}class x1e extends Qt{constructor(t){super(),Jt(this,t,M1e,O1e,Kt,{showPane:2,initialForm:9,setInitialParams:10,changedFieldsOfPersonalProjection:11,businessCompanies:12,lastAppliedProjection:0,simulatedProjections:1,simulatedPPRepository:13,getChangedFields:14})}}function R1e(e,{from:t,to:n},i={}){const r=getComputedStyle(e),a=r.transform==="none"?"":r.transform,[s,o]=r.transformOrigin.split(" ").map(parseFloat),l=t.left+t.width*s/n.width-(n.left+s),d=t.top+t.height*o/n.height-(n.top+o),{delay:c=0,duration:v=b=>Math.sqrt(b)*120,easing:T=k7}=i;return{delay:c,duration:Ga(v)?v(Math.sqrt(l*l+d*d)):v,easing:T,css:(b,A)=>{const E=A*l,y=A*d,I=b+A*t.width/n.width,D=b+A*t.height/n.height;return`transform: ${a} translate(${E}px, ${y}px) scale(${I}, ${D});`}}}function NI(e,t,n){const i=e.slice();return i[32]=t[n],i}function FI(e,t,n){const i=e.slice();return i[35]=t[n][0],i[36]=t[n][1],i}function LI(e,t,n){const i=e.slice();return i[39]=t[n],i}function HI(e,t,n){const i=e.slice();return i[42]=t[n][0],i[36]=t[n][1],i}function jI(e,t,n){const i=e.slice();return i[39]=t[n],i}function BI(e,t,n){const i=e.slice();return i[47]=t[n],i}function UI(e,t,n){const i=e.slice();return i[32]=t[n],i[51]=n,i}function qI(e,t,n){const i=e.slice();return i[52]=t[n][0],i[53]=t[n][1],i}function $1e(e){let t,n;return{c(){t=P("div"),t.textContent="You need to have saved simulations to compare against",w(t,"class","no-simulations__notification svelte-sp3zf3")},m(i,r){ce(i,t,r)},p:ot,i(i){n||xa(()=>{n=Ad(t,rs,{duration:300}),n.start()})},o:ot,d(i){i&&_e(t)}}}function N1e(e){let t,n,i,r,a,s,o,l;function d(E,y){return E[1].length>0?L1e:F1e}let c=d(e),v=c(e);const T=[W1e,q1e],b=[];function A(E,y){return E[0].length>0?0:1}return s=A(e),o=b[s]=T[s](e),{c(){t=P("section"),v.c(),n=K(),i=P("div"),r=P("h2"),r.textContent="Simulations",a=K(),o.c(),w(t,"class","comparison-layout__pane svelte-sp3zf3"),w(r,"class","simulations-list__header svelte-sp3zf3"),w(i,"class","simulations-list svelte-sp3zf3")},m(E,y){ce(E,t,y),v.m(t,null),ce(E,n,y),ce(E,i,y),m(i,r),m(i,a),b[s].m(i,null),l=!0},p(E,y){c===(c=d(E))&&v?v.p(E,y):(v.d(1),v=c(E),v&&(v.c(),U(v,1),v.m(t,null)));let I=s;s=A(E),s===I?b[s].p(E,y):(pn(),W(b[I],1,1,()=>{b[I]=null}),hn(),o=b[s],o?o.p(E,y):(o=b[s]=T[s](E),o.c()),U(o,1),o.m(i,null))},i(E){l||(U(v),U(o),l=!0)},o(E){W(o),l=!1},d(E){E&&_e(t),v.d(),E&&_e(n),E&&_e(i),b[s].d()}}}function F1e(e){let t,n,i,r;return{c(){t=P("div"),t.innerHTML=`<div class="dropzone__container svelte-sp3zf3"><div class="dropzone svelte-sp3zf3"><div class="dropzone__message svelte-sp3zf3"><h1>Drop saved simulation here</h1> 
                <p>You can compare one or more simulations by dropping them into comparison area</p></div></div></div>`,w(t,"class","visual svelte-sp3zf3")},m(a,s){ce(a,t,s),i||(r=[ct(t,"dragover",Hi(e[17])),ct(t,"drop",Hi(e[18]))],i=!0)},p:ot,i(a){n||xa(()=>{n=Ad(t,rs,{duration:300}),n.start()})},o:ot,d(a){a&&_e(t),i=!1,vi(r)}}}function L1e(e){let t,n,i,r,a,s,o,l,d,c,v=[],T=new Map,b,A,E,y,I,D,O,M,F,$=Object.entries(e[7]),L=[];for(let ue=0;ue<$.length;ue+=1)L[ue]=WI(qI(e,$,ue));let j=e[1];const H=ue=>ue[32].id;for(let ue=0;ue<j.length;ue+=1){let Ce=UI(e,j,ue),ie=H(Ce);T.set(ie,v[ue]=VI(ie,Ce))}function V(ue,Ce){return ue[2].length>0?j1e:H1e}let Q=V(e),X=Q(e);function te(ue,Ce){return ue[3].length>0?U1e:B1e}let ne=te(e),be=ne(e);return{c(){t=P("div"),n=P("table"),i=P("thead"),r=P("tr"),a=P("th"),a.textContent="Title",s=K(),o=P("th"),l=P("div"),d=P("select");for(let ue=0;ue<L.length;ue+=1)L[ue].c();c=K();for(let ue=0;ue<v.length;ue+=1)v[ue].c();b=K(),A=P("tbody"),E=P("tr"),E.innerHTML='<td class="section-title svelte-sp3zf3" colspan="1000">Values</td>',y=K(),X.c(),I=K(),D=P("tr"),D.innerHTML='<td class="section-title svelte-sp3zf3" colspan="1000">Results</td>',O=K(),be.c(),w(a,"class","svelte-sp3zf3"),w(d,"id","comparedTo"),w(d,"class","compared-to-selector svelte-sp3zf3"),w(l,"class","select-wrapper svelte-sp3zf3"),w(o,"class","svelte-sp3zf3"),w(r,"class","svelte-sp3zf3"),w(E,"class","svelte-sp3zf3"),w(D,"class","svelte-sp3zf3"),w(n,"class","table table-hover styled-table svelte-sp3zf3"),w(t,"class","table-responsive")},m(ue,Ce){ce(ue,t,Ce),m(t,n),m(n,i),m(i,r),m(r,a),m(r,s),m(r,o),m(o,l),m(l,d);for(let ie=0;ie<L.length;ie+=1)L[ie]&&L[ie].m(d,null);m(r,c);for(let ie=0;ie<v.length;ie+=1)v[ie]&&v[ie].m(r,null);m(n,b),m(n,A),m(A,E),m(A,y),X.m(A,null),m(A,I),m(A,D),m(A,O),be.m(A,null),M||(F=ct(d,"change",e[13]),M=!0)},p(ue,Ce){if(Ce[0]&128){$=Object.entries(ue[7]);let ie;for(ie=0;ie<$.length;ie+=1){const Y=qI(ue,$,ie);L[ie]?L[ie].p(Y,Ce):(L[ie]=WI(Y),L[ie].c(),L[ie].m(d,null))}for(;ie<L.length;ie+=1)L[ie].d(1);L.length=$.length}if(Ce[0]&2866){j=ue[1];for(let ie=0;ie<v.length;ie+=1)v[ie].r();v=o_(v,Ce,H,1,ue,j,T,r,S7,VI,null,UI);for(let ie=0;ie<v.length;ie+=1)v[ie].a()}Q===(Q=V(ue))&&X?X.p(ue,Ce):(X.d(1),X=Q(ue),X&&(X.c(),U(X,1),X.m(A,I))),ne===(ne=te(ue))&&be?be.p(ue,Ce):(be.d(1),be=ne(ue),be&&(be.c(),U(be,1),be.m(A,null)))},i(ue){U(X),U(be)},o:ot,d(ue){ue&&_e(t),Nn(L,ue);for(let Ce=0;Ce<v.length;Ce+=1)v[Ce].d();X.d(),be.d(),M=!1,F()}}}function WI(e){let t,n=e[53]+"",i;return{c(){t=P("option"),i=Le(n),t.__value=e[52],t.value=t.__value},m(r,a){ce(r,t,a),m(t,i)},p:ot,d(r){r&&_e(t)}}}function VI(e,t){let n,i,r,a,s,o,l=t[32].name+"",d,c,v,T,b,A,E=ot,y,I;function D(){return t[19](t[51])}function O(){return t[20](t[32])}function M(...F){return t[21](t[32],...F)}return{key:e,first:null,c(){n=P("th"),i=P("div"),r=P("span"),s=K(),o=P("span"),d=Le(l),c=K(),v=P("i"),T=K(),w(r,"id",a=`testing-drag-to-${Xn.kebabCase(t[32].name)}`),w(o,"class","svelte-sp3zf3"),wt(o,"disable-events",t[5]),w(v,"class","fa fa-remove svelte-sp3zf3"),wt(v,"disable-events",t[5]),w(i,"class","svelte-sp3zf3"),w(n,"draggable",b=!t[5]),w(n,"class","simulation-name draggable svelte-sp3zf3"),wt(n,"dragging",t[5]&&t[4].id===t[32].id),this.first=n},m(F,$){ce(F,n,$),m(n,i),m(i,r),m(i,s),m(i,o),m(o,d),m(i,c),m(i,v),m(n,T),y||(I=[ct(v,"click",D),ct(n,"dragstart",O),ct(n,"dragover",Hi(M)),ct(n,"dragend",t[11])],y=!0)},p(F,$){t=F,$[0]&2&&a!==(a=`testing-drag-to-${Xn.kebabCase(t[32].name)}`)&&w(r,"id",a),$[0]&2&&l!==(l=t[32].name+"")&&vt(d,l),$[0]&32&&wt(o,"disable-events",t[5]),$[0]&32&&wt(v,"disable-events",t[5]),$[0]&32&&b!==(b=!t[5])&&w(n,"draggable",b),$[0]&50&&wt(n,"dragging",t[5]&&t[4].id===t[32].id)},r(){A=n.getBoundingClientRect()},f(){C7(n),E()},a(){E(),E=P7(n,A,R1e,{duration:300})},d(F){F&&_e(n),y=!1,vi(I)}}}function H1e(e){let t;return{c(){t=P("tr"),t.innerHTML='<td colspan="1000" class="svelte-sp3zf3"><span>All values are equal</span></td>',w(t,"class","svelte-sp3zf3")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function j1e(e){let t,n=e[2],i=[];for(let r=0;r<n.length;r+=1)i[r]=GI(HI(e,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();t=On()},m(r,a){for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(r,a);ce(r,t,a)},p(r,a){if(a[0]&4164){n=r[2];let s;for(s=0;s<n.length;s+=1){const o=HI(r,n,s);i[s]?(i[s].p(o,a),U(i[s],1)):(i[s]=GI(o),i[s].c(),U(i[s],1),i[s].m(t.parentNode,t))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},i(r){for(let a=0;a<n.length;a+=1)U(i[a])},o:ot,d(r){Nn(i,r),r&&_e(t)}}}function zI(e){let t,n,i,r=e[47]+"",a,s;return{c(){t=P("span"),n=P("wbr"),i=K(),a=Le(r),s=K(),w(t,"class","svelte-sp3zf3")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,a),m(t,s)},p(o,l){l[0]&4&&r!==(r=o[47]+"")&&vt(a,r)},d(o){o&&_e(t)}}}function YI(e){let t,n=(Xn.isNil(e[36][e[39]])?"":e[36][e[39]])+"",i,r;return{c(){t=P("td"),i=Le(n),w(t,"class",r=n_(`changed-field__value ${e[12](e[36][e[39]]||"")}`)+" svelte-sp3zf3")},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s[0]&68&&n!==(n=(Xn.isNil(a[36][a[39]])?"":a[36][a[39]])+"")&&vt(i,n),s[0]&68&&r!==(r=n_(`changed-field__value ${a[12](a[36][a[39]]||"")}`)+" svelte-sp3zf3")&&w(t,"class",r)},d(a){a&&_e(t)}}}function GI(e){let t,n,i,r,a,s=e[42],o=[];for(let c=0;c<s.length;c+=1)o[c]=zI(BI(e,s,c));let l=e[6],d=[];for(let c=0;c<l.length;c+=1)d[c]=YI(jI(e,l,c));return{c(){t=P("tr"),n=P("td");for(let c=0;c<o.length;c+=1)o[c].c();i=K();for(let c=0;c<d.length;c+=1)d[c].c();r=K(),w(n,"class","changed-field__label svelte-sp3zf3"),w(t,"class","svelte-sp3zf3")},m(c,v){ce(c,t,v),m(t,n);for(let T=0;T<o.length;T+=1)o[T]&&o[T].m(n,null);m(t,i);for(let T=0;T<d.length;T+=1)d[T]&&d[T].m(t,null);m(t,r)},p(c,v){if(v[0]&4){s=c[42];let T;for(T=0;T<s.length;T+=1){const b=BI(c,s,T);o[T]?o[T].p(b,v):(o[T]=zI(b),o[T].c(),o[T].m(n,null))}for(;T<o.length;T+=1)o[T].d(1);o.length=s.length}if(v[0]&4164){l=c[6];let T;for(T=0;T<l.length;T+=1){const b=jI(c,l,T);d[T]?d[T].p(b,v):(d[T]=YI(b),d[T].c(),d[T].m(t,r))}for(;T<d.length;T+=1)d[T].d(1);d.length=l.length}},i(c){a||xa(()=>{a=Ad(t,rs,{}),a.start()})},o:ot,d(c){c&&_e(t),Nn(o,c),Nn(d,c)}}}function B1e(e){let t;return{c(){t=P("tr"),t.innerHTML='<td colspan="1000" class="svelte-sp3zf3"><span>All results are equal</span></td>',w(t,"class","svelte-sp3zf3")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function U1e(e){let t,n=e[3],i=[];for(let r=0;r<n.length;r+=1)i[r]=XI(FI(e,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();t=On()},m(r,a){for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(r,a);ce(r,t,a)},p(r,a){if(a[0]&4168){n=r[3];let s;for(s=0;s<n.length;s+=1){const o=FI(r,n,s);i[s]?(i[s].p(o,a),U(i[s],1)):(i[s]=XI(o),i[s].c(),U(i[s],1),i[s].m(t.parentNode,t))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},i(r){for(let a=0;a<n.length;a+=1)U(i[a])},o:ot,d(r){Nn(i,r),r&&_e(t)}}}function KI(e){let t,n=(Xn.isNil(e[36][e[39]])?"":e[36][e[39]])+"",i,r;return{c(){t=P("td"),i=Le(n),w(t,"class",r=n_(`changed-field__value ${e[12](e[36][e[39]]||"")}`)+" svelte-sp3zf3")},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s[0]&72&&n!==(n=(Xn.isNil(a[36][a[39]])?"":a[36][a[39]])+"")&&vt(i,n),s[0]&72&&r!==(r=n_(`changed-field__value ${a[12](a[36][a[39]]||"")}`)+" svelte-sp3zf3")&&w(t,"class",r)},d(a){a&&_e(t)}}}function XI(e){let t,n,i=e[35]+"",r,a,s,o,l=e[6],d=[];for(let c=0;c<l.length;c+=1)d[c]=KI(LI(e,l,c));return{c(){t=P("tr"),n=P("td"),r=Le(i),a=K();for(let c=0;c<d.length;c+=1)d[c].c();s=K(),w(n,"class","svelte-sp3zf3"),w(t,"class","svelte-sp3zf3")},m(c,v){ce(c,t,v),m(t,n),m(n,r),m(t,a);for(let T=0;T<d.length;T+=1)d[T]&&d[T].m(t,null);m(t,s)},p(c,v){if(v[0]&8&&i!==(i=c[35]+"")&&vt(r,i),v[0]&4168){l=c[6];let T;for(T=0;T<l.length;T+=1){const b=LI(c,l,T);d[T]?d[T].p(b,v):(d[T]=KI(b),d[T].c(),d[T].m(t,s))}for(;T<d.length;T+=1)d[T].d(1);d.length=l.length}},i(c){o||xa(()=>{o=Ad(t,rs,{}),o.start()})},o:ot,d(c){c&&_e(t),Nn(d,c)}}}function q1e(e){let t;return{c(){t=P("p"),t.textContent="No simulations left to compare",w(t,"class","simulations-list_blank text-center svelte-sp3zf3")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function W1e(e){let t,n,i=e[0],r=[];for(let s=0;s<i.length;s+=1)r[s]=QI(NI(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){t=P("ul");for(let s=0;s<r.length;s+=1)r[s].c();w(t,"class","list-group")},m(s,o){ce(s,t,o);for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(t,null);n=!0},p(s,o){if(o[0]&3121){i=s[0];let l;for(l=0;l<i.length;l+=1){const d=NI(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=QI(d),r[l].c(),U(r[l],1),r[l].m(t,null))}for(pn(),l=i.length;l<r.length;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<i.length;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)W(r[o]);n=!1},d(s){s&&_e(t),Nn(r,s)}}}function QI(e){let t,n,i=e[32].name+"",r,a,s,o,l,d,c,v;function T(){return e[22](e[32])}return{c(){t=P("li"),n=P("span"),r=Le(i),a=K(),w(t,"id",s=e[32].id),w(t,"draggable",o=!e[5]),w(t,"class","list-group-item draggable svelte-sp3zf3"),wt(t,"dragging",e[5]&&e[4].id===e[32].id)},m(b,A){ce(b,t,A),m(t,n),m(n,r),m(t,a),d=!0,c||(v=[ct(t,"dragstart",T),ct(t,"dragend",e[11])],c=!0)},p(b,A){e=b,(!d||A[0]&1)&&i!==(i=e[32].name+"")&&vt(r,i),(!d||A[0]&1&&s!==(s=e[32].id))&&w(t,"id",s),(!d||A[0]&32&&o!==(o=!e[5]))&&w(t,"draggable",o),(!d||A[0]&49)&&wt(t,"dragging",e[5]&&e[4].id===e[32].id)},i(b){d||(xa(()=>{d&&(l||(l=Us(t,rs,{duration:300},!0)),l.run(1))}),d=!0)},o(b){l||(l=Us(t,rs,{duration:300},!1)),l.run(0),d=!1},d(b){b&&_e(t),b&&l&&l.end(),c=!1,vi(v)}}}function V1e(e){let t,n,i,r;const a=[N1e,$1e],s=[];function o(l,d){return l[0].length>0||l[1].length>0?0:1}return n=o(e),i=s[n]=a[n](e),{c(){t=P("div"),i.c(),w(t,"class","comparison-layout svelte-sp3zf3")},m(l,d){ce(l,t,d),s[n].m(t,null),r=!0},p(l,d){let c=n;n=o(l),n===c?s[n].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),i=s[n],i?i.p(l,d):(i=s[n]=a[n](l),i.c()),U(i,1),i.m(t,null))},i(l){r||(U(i),r=!0)},o(l){W(i),r=!1},d(l){l&&_e(t),s[n].d()}}}function z1e(e,t,n){let i,r,a;Sn(e,sm,Y=>n(25,a=Y));let{simulatedProjections:s}=t,{simulatedPPRepository:o}=t,{initialPersonalProjection:l}=t,d=[],c={},v=[],T=[],b=[],A=null;const E=()=>r!==-1,y=()=>d.length===0,I=Y=>s.some(({id:he})=>he===Y),D={currentSimulation:"Current Simulation",currentProjection:"Current Personal Projection"};let O=a;async function M(){const Y=[{type:"params",payload:O},...d.map(({id:Me})=>({type:"id",payload:{id:Me}}))],he=await o.compare(Y);if(!he)throw new Error("Failed to retrieve data.");n(16,c=he.result),n(6,b=Array.from({length:d.length+1},(Me,Pe)=>Pe))}function F(Y,he){if(!i||A.id===he.id)return;const Me=d.findIndex(({id:We})=>We===he.id),Pe=Y.offsetX<Y.target.offsetWidth/2?Math.max(Me-1,0):Me+1;Pe!==r&&L(r,Pe)}function $(){const Y=v.length;n(1,d=[...d,A]),n(6,b=[...b,Y])}function L(Y,he){d.splice(Y,1);const[Me]=b.splice(Y+1,1);b.splice(he+1,0,Me),d.splice(he,0,A),n(1,d),n(6,b)}function j(Y){b.splice(Y+1,1);const[he]=d.splice(Y,1);I(he.id)||n(0,s=[...s,he]),n(1,d),n(6,b)}function H(Y){n(4,A=Y),y()||$()}async function V(){try{(!E()||I(A.id))&&(No.start(),y()&&n(1,d=[A]),await M(),n(0,s=s.filter(Y=>Y.id!==A.id)))}catch(Y){console.error(`${Y.name}: ${Y.message}`),Gr.error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page."),j(r)}finally{n(4,A=null),No.done()}}function Q(Y){if(xs.isString(Y)){const he=Y.slice(0,1);if(he==="+")return"changed-field__positive-value";if(he==="-")return"changed-field__negative-value"}return""}function X(Y){O=Y.target.value==="currentProjection"?l:a,M()}function te(Y){vv.call(this,e,Y)}function ne(Y){vv.call(this,e,Y)}const be=Y=>j(Y),ue=Y=>n(4,A=Y),Ce=(Y,he)=>F(he,Y),ie=Y=>H(Y);return e.$$set=Y=>{"simulatedProjections"in Y&&n(0,s=Y.simulatedProjections),"simulatedPPRepository"in Y&&n(14,o=Y.simulatedPPRepository),"initialPersonalProjection"in Y&&n(15,l=Y.initialPersonalProjection)},e.$$.update=()=>{if(e.$$.dirty[0]&65548){n(2,v=[]),n(3,T=[]);for(const[Y,he]of p2)Y in c&&n(2,v=[...v,[he,c[Y]]]);for(const[Y,he]of Tve)Y in c&&n(3,T=[...T,[he,c[Y]]])}e.$$.dirty[0]&16&&n(5,i=xs.isObject(A)),e.$$.dirty[0]&50&&(r=i&&d.findIndex(({id:Y})=>Y===A.id))},[s,d,v,T,A,i,b,D,F,j,H,V,Q,X,o,l,c,te,ne,be,ue,Ce,ie]}class Y1e extends Qt{constructor(t){super(),Jt(this,t,z1e,V1e,Kt,{simulatedProjections:0,simulatedPPRepository:14,initialPersonalProjection:15},null,[-1,-1])}}class G1e extends Fo{async create(t){return this.baseQuery(this.baseEndpoint,{method:"POST",headers:this.headers,body:JSON.stringify({simulator_parameters:t})})}async one(t){return this.baseQuery(`${this.baseEndpoint}/${t}`,{method:"GET",headers:this.headers})}async all(){return this.baseQuery(`${this.baseEndpoint}`,{method:"GET",headers:this.headers})}async update(t,n){return this.baseQuery(`${this.baseEndpoint}/${t}`,{method:"PATCH",headers:this.headers,body:JSON.stringify({simulator_parameters:n})})}async delete(t){return this.baseQuery(`${this.baseEndpoint}/${t}`,{method:"DELETE",headers:this.headers})}async compare(t){return this.baseQuery(`${this.baseEndpoint}/compare`,{method:"POST",headers:this.headers,body:JSON.stringify({simulations_data:t})})}}function JI(e,t,n){const i=e.slice();return i[26]=t[n],i}function ZI(e,t,n){const i=e.slice();return i[29]=t[n],i}function eA(e,t,n){const i=e.slice();return i[32]=t[n],i[34]=n,i}function tA(e){let t,n=e[8]?"Hide":"Show",i,r,a,s;return{c(){t=P("button"),i=Le(n),r=Le(" Simulator Options"),w(t,"class","btn btn-sm btn-info mb-0"),w(t,"data-toggle","delayed-tooltip"),w(t,"data-placement","bottom"),w(t,"title","Ctrl + /")},m(o,l){ce(o,t,l),m(t,i),m(t,r),a||(s=ct(t,"click",e[17]),a=!0)},p(o,l){l[0]&256&&n!==(n=o[8]?"Hide":"Show")&&vt(i,n)},d(o){o&&_e(t),a=!1,s()}}}function K1e(e){let t,n,i;return n=new Y1e({props:{simulatedProjections:e[11],simulatedPPRepository:e[14],initialPersonalProjection:e[4]}}),{c(){t=P("div"),re(n.$$.fragment),w(t,"id","comparison"),w(t,"class","tab-pane fade")},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,a){const s={};a[0]&2048&&(s.simulatedProjections=r[11]),a[0]&16&&(s.initialPersonalProjection=r[4]),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function X1e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y=Object.keys(e[9]).length>0,I,D,O,M,F,$,L;r=new PN({props:{loading:e[0],results:e[2],initialFedTax:e[2].res_federal_tax_remaining,initialStateTax:e[2].res_state_tax}});let j=e[12],H=[];for(let ue=0;ue<j.length;ue+=1)H[ue]=iA(eA(e,j,ue));var V=e[12][e[6]].component;function Q(ue){return{props:{serverCalculatedParameters:ue[2]}}}V&&(T=ha(V,Q(e)));let X=y&&rA(e);function te(ue){e[24](ue)}function ne(ue){e[25](ue)}let be={showPane:e[8],initialForm:e[3],simulatedPPRepository:e[14],setInitialParams:e[16],businessCompanies:e[1],changedFieldsOfPersonalProjection:e[5],getChangedFields:e[15]};return e[11]!==void 0&&(be.simulatedProjections=e[11]),e[10]!==void 0&&(be.lastAppliedProjection=e[10]),D=new x1e({props:be}),Oe.push(()=>$e(D,"simulatedProjections",te)),Oe.push(()=>$e(D,"lastAppliedProjection",ne)),{c(){t=P("div"),n=P("div"),i=P("section"),re(r.$$.fragment),a=K(),s=P("div"),o=P("div"),l=P("div");for(let ue=0;ue<H.length;ue+=1)H[ue].c();d=K(),c=P("div"),v=P("div"),T&&re(T.$$.fragment),b=K(),A=P("button"),A.textContent="Reset",E=K(),X&&X.c(),I=K(),re(D.$$.fragment),w(l,"class","personal-projection-form-navigation"),w(o,"class","personal-projection-form__navigation"),w(A,"class","btn btn-primary btn-trans"),w(v,"class","personal-projection-form-content"),w(c,"class","personal-projection-form__content"),w(s,"class","personal-projection-form"),w(i,"id","main-content"),w(i,"class","simulator-layout__simulator_pane svelte-1hbnrli"),w(n,"class","simulator-layout svelte-1hbnrli"),w(t,"id","simulation"),w(t,"class","tab-pane fade show active")},m(ue,Ce){ce(ue,t,Ce),m(t,n),m(n,i),ae(r,i,null),m(i,a),m(i,s),m(s,o),m(o,l);for(let ie=0;ie<H.length;ie+=1)H[ie]&&H[ie].m(l,null);m(s,d),m(s,c),m(c,v),T&&ae(T,v,null),m(v,b),m(v,A),m(i,E),X&&X.m(i,null),m(n,I),ae(D,n,null),F=!0,$||(L=ct(A,"click",e[16]),$=!0)},p(ue,Ce){const ie={};if(Ce[0]&1&&(ie.loading=ue[0]),Ce[0]&4&&(ie.results=ue[2]),Ce[0]&4&&(ie.initialFedTax=ue[2].res_federal_tax_remaining),Ce[0]&4&&(ie.initialStateTax=ue[2].res_state_tax),r.$set(ie),Ce[0]&12352){j=ue[12];let Me;for(Me=0;Me<j.length;Me+=1){const Pe=eA(ue,j,Me);H[Me]?H[Me].p(Pe,Ce):(H[Me]=iA(Pe),H[Me].c(),H[Me].m(l,null))}for(;Me<H.length;Me+=1)H[Me].d(1);H.length=j.length}const Y={};if(Ce[0]&4&&(Y.serverCalculatedParameters=ue[2]),Ce[0]&4160&&V!==(V=ue[12][ue[6]].component)){if(T){pn();const Me=T;W(Me.$$.fragment,1,0,()=>{se(Me,1)}),hn()}V?(T=ha(V,Q(ue)),re(T.$$.fragment),U(T.$$.fragment,1),ae(T,v,b)):T=null}else V&&T.$set(Y);Ce[0]&512&&(y=Object.keys(ue[9]).length>0),y?X?(X.p(ue,Ce),Ce[0]&512&&U(X,1)):(X=rA(ue),X.c(),U(X,1),X.m(i,null)):X&&(pn(),W(X,1,1,()=>{X=null}),hn());const he={};Ce[0]&256&&(he.showPane=ue[8]),Ce[0]&8&&(he.initialForm=ue[3]),Ce[0]&2&&(he.businessCompanies=ue[1]),Ce[0]&32&&(he.changedFieldsOfPersonalProjection=ue[5]),!O&&Ce[0]&2048&&(O=!0,he.simulatedProjections=ue[11],Ne(()=>O=!1)),!M&&Ce[0]&1024&&(M=!0,he.lastAppliedProjection=ue[10],Ne(()=>M=!1)),D.$set(he)},i(ue){F||(U(r.$$.fragment,ue),T&&U(T.$$.fragment,ue),U(X),U(D.$$.fragment,ue),F=!0)},o(ue){W(r.$$.fragment,ue),T&&W(T.$$.fragment,ue),W(X),W(D.$$.fragment,ue),F=!1},d(ue){ue&&_e(t),se(r),Nn(H,ue),T&&se(T),X&&X.d(),se(D),$=!1,L()}}}function nA(e){let t;return{c(){t=P("i"),w(t,"class","fa fa-times personal-projection-form-navigation__item-invalid")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function iA(e){let t,n=e[13].has(e[32].componentName),i,r,a=e[32].title+"",s,o,l,d,c=n&&nA();function v(){return e[23](e[34])}return{c(){t=P("div"),c&&c.c(),i=K(),r=P("span"),s=Le(a),o=K(),w(t,"class","personal-projection-form-navigation__item"),wt(t,"personal-projection-form-navigation__item-active",e[6]===e[34])},m(T,b){ce(T,t,b),c&&c.m(t,null),m(t,i),m(t,r),m(r,s),m(t,o),l||(d=ct(t,"click",v),l=!0)},p(T,b){e=T,b[0]&12288&&(n=e[13].has(e[32].componentName)),n?c||(c=nA(),c.c(),c.m(t,i)):c&&(c.d(1),c=null),b[0]&4096&&a!==(a=e[32].title+"")&&vt(s,a),b[0]&64&&wt(t,"personal-projection-form-navigation__item-active",e[6]===e[34])},d(T){T&&_e(t),c&&c.d(),l=!1,d()}}}function rA(e){let t,n,i,r,a,s,o,l=e[9],d=[];for(let c=0;c<l.length;c+=1)d[c]=sA(JI(e,l,c));return{c(){t=P("div"),n=P("h2"),n.textContent="Changes",i=K(),r=P("div");for(let c=0;c<d.length;c+=1)d[c].c();w(n,"class","svelte-1hbnrli"),w(r,"class","changed-fields-content svelte-1hbnrli"),w(t,"class","changed-fields-container svelte-1hbnrli")},m(c,v){ce(c,t,v),m(t,n),m(t,i),m(t,r);for(let T=0;T<d.length;T+=1)d[T]&&d[T].m(r,null);o=!0},p(c,v){if(v[0]&512){l=c[9];let T;for(T=0;T<l.length;T+=1){const b=JI(c,l,T);d[T]?(d[T].p(b,v),U(d[T],1)):(d[T]=sA(b),d[T].c(),U(d[T],1),d[T].m(r,null))}for(;T<d.length;T+=1)d[T].d(1);d.length=l.length}},i(c){if(!o){for(let v=0;v<l.length;v+=1)U(d[v]);xa(()=>{o&&(a||(a=Us(r,rs,{},!0)),a.run(1))}),xa(()=>{o&&(s||(s=Us(t,rs,{},!0)),s.run(1))}),o=!0}},o(c){a||(a=Us(r,rs,{},!1)),a.run(0),s||(s=Us(t,rs,{},!1)),s.run(0),o=!1},d(c){c&&_e(t),Nn(d,c),c&&a&&a.end(),c&&s&&s.end()}}}function aA(e){let t,n=e[29]+"",i;return{c(){t=P("span"),i=Le(n),w(t,"class","changed-section svelte-1hbnrli")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&512&&n!==(n=r[29]+"")&&vt(i,n)},d(r){r&&_e(t)}}}function sA(e){let t,n,i,r,a=(e[26].initialValue||"0")+"",s,o,l,d=(e[26].changedValue||"0")+"",c,v,T,b=e[26].humanizedField,A=[];for(let E=0;E<b.length;E+=1)A[E]=aA(ZI(e,b,E));return{c(){t=P("div");for(let E=0;E<A.length;E+=1)A[E].c();n=K(),i=P("div"),r=P("span"),s=Le(a),o=K(),l=P("span"),c=Le(d),v=K(),w(r,"class","changed-field__initial-value svelte-1hbnrli"),w(l,"class","changed-field__changed-value svelte-1hbnrli"),w(i,"class","changed-field__values svelte-1hbnrli"),w(t,"class","changed-field svelte-1hbnrli")},m(E,y){ce(E,t,y);for(let I=0;I<A.length;I+=1)A[I]&&A[I].m(t,null);m(t,n),m(t,i),m(i,r),m(r,s),m(i,o),m(i,l),m(l,c),m(t,v)},p(E,y){if(y[0]&512){b=E[26].humanizedField;let I;for(I=0;I<b.length;I+=1){const D=ZI(E,b,I);A[I]?A[I].p(D,y):(A[I]=aA(D),A[I].c(),A[I].m(t,n))}for(;I<A.length;I+=1)A[I].d(1);A.length=b.length}y[0]&512&&a!==(a=(E[26].initialValue||"0")+"")&&vt(s,a),y[0]&512&&d!==(d=(E[26].changedValue||"0")+"")&&vt(c,d)},i(E){T||xa(()=>{T=Ad(t,rs,{duration:300}),T.start()})},o:ot,d(E){E&&_e(t),Nn(A,E)}}}function Q1e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M=e[7]!=="comparison"&&tA(e);const F=[X1e,K1e],$=[];function L(j,H){return j[7]==="simulation"?0:1}return E=L(e),y=$[E]=F[E](e),{c(){t=P("div"),n=P("h1"),n.textContent="Simulator",i=K(),M&&M.c(),r=K(),a=P("div"),s=P("div"),o=P("ul"),l=P("li"),d=P("a"),d.textContent="Simulation",c=K(),v=P("li"),T=P("a"),T.textContent="Comparison",b=K(),A=P("div"),y.c(),w(n,"class","personal-projection-form-header svelte-1hbnrli"),w(t,"class","pageheader svelte-1hbnrli"),w(d,"class","active nav-link"),w(d,"data-toggle","tab"),w(d,"href","#simulation"),w(l,"class","nav-item"),w(T,"class","nav-link"),w(T,"data-toggle","tab"),w(T,"href","#comparison"),w(v,"class","nav-item"),w(o,"class","nav nav-pills"),w(s,"class","card-header tab-modes svelte-1hbnrli"),w(A,"class","tab-content"),w(a,"class","card")},m(j,H){ce(j,t,H),m(t,n),m(t,i),M&&M.m(t,null),ce(j,r,H),ce(j,a,H),m(a,s),m(s,o),m(o,l),m(l,d),m(o,c),m(o,v),m(v,T),m(a,b),m(a,A),$[E].m(A,null),I=!0,D||(O=[ct(d,"click",e[21]),ct(T,"click",e[22])],D=!0)},p(j,H){j[7]!=="comparison"?M?M.p(j,H):(M=tA(j),M.c(),M.m(t,null)):M&&(M.d(1),M=null);let V=E;E=L(j),E===V?$[E].p(j,H):(pn(),W($[V],1,1,()=>{$[V]=null}),hn(),y=$[E],y?y.p(j,H):(y=$[E]=F[E](j),y.c()),U(y,1),y.m(A,null))},i(j){I||(U(y),I=!0)},o(j){W(y),I=!1},d(j){j&&_e(t),M&&M.d(),j&&_e(r),j&&_e(a),$[E].d(),D=!1,vi(O)}}}function Cb(e){let t={};for(const[n,i]of Object.entries(e))t[`${n}_revenue`]=i.revenue,t[`${n}_expense`]=i.expense;return t}function J1e(e,t,n){let i,r,a,s,o;Sn(e,Hu,te=>n(19,r=te)),Sn(e,sm,te=>n(20,a=te)),Sn(e,dm,te=>n(12,s=te)),Sn(e,CN,te=>n(13,o=te));let{requestInFlight:l}=t,{businessCompanies:d}=t,{serverCalculatedParameters:c}=t,{simulated_personal_projections_url:v}=t,{initialForm:T}=t,{initialPersonalProjection:b}=t;const A=new G1e(v);let E=0,y="simulation",I=localStorage.showSimulatorOptions==="true",D=[],O={},M=[];function F(te,ne,be,ue){const Ce=Cb(ne),ie=Cb(ue);return{...Gn.pickBy(be,(Y,he)=>!Gn.isEqual(Y,te[he])),...Gn.pickBy(ie,(Y,he)=>!Gn.isEqual(Y,Ce[he]))}}function $(){Hu.set(Gn.cloneDeep(d));const te=r2(T);hi.set(te),n(10,O={})}function L(){n(8,I=!I),localStorage.showSimulatorOptions=I}oa(()=>{Hu.set(Gn.cloneDeep(d)||{}),Object.keys(r).length>0&&dm.update(te=>[...te,{component:C1e,title:"Business Income & Expense",componentName:"BusinessIncomeExpense"}])}),Zy("ppType",{type:"simulator"});const j=()=>n(7,y="simulation"),H=()=>n(7,y="comparison"),V=te=>n(6,E=te);function Q(te){M=te,n(11,M)}function X(te){O=te,n(10,O)}return e.$$set=te=>{"requestInFlight"in te&&n(0,l=te.requestInFlight),"businessCompanies"in te&&n(1,d=te.businessCompanies),"serverCalculatedParameters"in te&&n(2,c=te.serverCalculatedParameters),"simulated_personal_projections_url"in te&&n(18,v=te.simulated_personal_projections_url),"initialForm"in te&&n(3,T=te.initialForm),"initialPersonalProjection"in te&&n(4,b=te.initialPersonalProjection)},e.$$.update=()=>{if(e.$$.dirty[0]&1572874&&n(5,i=F(T,d,a,r)),e.$$.dirty[0]&42&&i){const te={...T,...Cb(d)};n(9,D=Object.entries(i).filter(([ne])=>nI[ne]).map(([ne,be])=>({humanizedField:nI[ne],initialValue:te[ne],changedValue:be})))}},[l,d,c,T,b,i,E,y,I,D,O,M,s,o,A,F,$,L,v,r,a,j,H,V,Q,X]}class Z1e extends Qt{constructor(t){super(),Jt(this,t,J1e,Q1e,Kt,{requestInFlight:0,businessCompanies:1,serverCalculatedParameters:2,simulated_personal_projections_url:18,initialForm:3,initialPersonalProjection:4},null,[-1,-1])}}function ebe(e){let t,n;return t=new _1e({props:{previousYear:e[6],currentYear:e[5],selectedYear:e[14],strategyUpdateUrl:e[2],strategyAfterUpdateUrl:e[3],serverCalculatedParameters:e[11],statusNotice:e[12],projectionResetUrl:e[1],csrf:e[4]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&64&&(a.previousYear=i[6]),r&32&&(a.currentYear=i[5]),r&4&&(a.strategyUpdateUrl=i[2]),r&8&&(a.strategyAfterUpdateUrl=i[3]),r&2048&&(a.serverCalculatedParameters=i[11]),r&4096&&(a.statusNotice=i[12]),r&2&&(a.projectionResetUrl=i[1]),r&16&&(a.csrf=i[4]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function tbe(e){let t,n;return t=new Z1e({props:{requestInFlight:e[10],serverCalculatedParameters:e[11],businessCompanies:e[8],simulated_personal_projections_url:e[9],initialForm:e[0],initialPersonalProjection:e[13]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1024&&(a.requestInFlight=i[10]),r&2048&&(a.serverCalculatedParameters=i[11]),r&256&&(a.businessCompanies=i[8]),r&512&&(a.simulated_personal_projections_url=i[9]),r&1&&(a.initialForm=i[0]),r&8192&&(a.initialPersonalProjection=i[13]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function nbe(e){let t,n,i,r;const a=[tbe,ebe],s=[];function o(l,d){return l[7]==="simulator"?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,[d]){let c=t;t=o(l),t===c?s[t].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i))},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function ibe(e,t){let n=!1;return e.subscribe(i=>{n?t(i):n=!0})}function rbe(e,t,n){let i;Sn(e,sm,H=>n(18,i=H));let{initial_form_state:r}=t,{personal_projection_result_fields:a}=t,{projection_save_url:s}=t,{projection_reset_url:o}=t,{strategy_update_url:l}=t,{strategy_after_update_url:d}=t,{csrf:c}=t,{current_year:v}=t,{previous_year:T}=t,{previous_year_strategy_selected:b}=t,{projection_type:A}=t,{business_companies:E}=t,{simulated_personal_projections_url:y}=t;const I=b?T:v;let D=null,O={},M=null,F;const $=Gn.debounce(function(H){No.start(),n(10,D=au.ajax({url:s,type:"PUT",data:{personal_projection_parameters:H},success:V=>{n(10,D=null),n(11,O=V.personal_projection_result_fields),n(12,M=`Saved at ${zn().format("h:mm:ss a")}, no unsaved changes`)}}).fail(V=>{D.abort(),n(10,D=null)}).always(()=>{No.done()}))},1500);function L(H){n(11,O={}),n(12,M="Unsaved changes present. Saving..."),Gn.isNil(D)||(console.log("Aborting request in flight"),D.abort(),n(10,D=null)),!Gn.isNil(H)&&$(H)}function j(){window.onbeforeunload=()=>{if(M==="Unsaved changes present. Saving...")return!0}}return oa(()=>{au.ajaxSetup({beforeSend(V){V.setRequestHeader("X-CSRF-Token",c)}});const H=r2(r);hi.set(H),n(13,F=Gn.cloneDeep(i)),n(11,O=a),ibe(sm,L),j()}),Zy("ppType",{type:"default"}),e.$$set=H=>{"initial_form_state"in H&&n(0,r=H.initial_form_state),"personal_projection_result_fields"in H&&n(15,a=H.personal_projection_result_fields),"projection_save_url"in H&&n(16,s=H.projection_save_url),"projection_reset_url"in H&&n(1,o=H.projection_reset_url),"strategy_update_url"in H&&n(2,l=H.strategy_update_url),"strategy_after_update_url"in H&&n(3,d=H.strategy_after_update_url),"csrf"in H&&n(4,c=H.csrf),"current_year"in H&&n(5,v=H.current_year),"previous_year"in H&&n(6,T=H.previous_year),"previous_year_strategy_selected"in H&&n(17,b=H.previous_year_strategy_selected),"projection_type"in H&&n(7,A=H.projection_type),"business_companies"in H&&n(8,E=H.business_companies),"simulated_personal_projections_url"in H&&n(9,y=H.simulated_personal_projections_url)},[r,o,l,d,c,v,T,A,E,y,D,O,M,F,I,a,s,b]}class abe extends Qt{constructor(t){super(),Jt(this,t,rbe,nbe,Kt,{initial_form_state:0,personal_projection_result_fields:15,projection_save_url:16,projection_reset_url:1,strategy_update_url:2,strategy_after_update_url:3,csrf:4,current_year:5,previous_year:6,previous_year_strategy_selected:17,projection_type:7,business_companies:8,simulated_personal_projections_url:9})}}function sbe(e){let t,n,i;return t=new ew({props:{items:e[0],value:e[1],placeholder:"Navigate to a Client",noOptionsMessage:"No Clients",isSearchable:!0,isClearable:!1}}),t.$on("select",e[2]),{c(){n=P("div"),re(t.$$.fragment),cr(n,"display","contents"),cr(n,"--itemIsActiveBG","#27b6af"),cr(n,"--itemHoverBG","#f6f8f8"),cr(n,"--borderFocusColor","#452161")},m(r,a){ce(r,n,a),ae(t,n,null),i=!0},p(r,[a]){const s={};a&1&&(s.items=r[0]),a&2&&(s.value=r[1]),t.$set(s)},i(r){i||(U(t.$$.fragment,r),i=!0)},o(r){W(t.$$.fragment,r),i=!1},d(r){r&&t&&_e(n),se(t,r)}}}function obe(e,t,n){let{clients:i=[]}=t,{selectedClient:r={}}=t;const a=function(s){window.location=s.detail.target};return e.$$set=s=>{"clients"in s&&n(0,i=s.clients),"selectedClient"in s&&n(1,r=s.selectedClient)},[i,r,a]}class lbe extends Qt{constructor(t){super(),Jt(this,t,obe,sbe,Kt,{clients:0,selectedClient:1})}}function ube(e){let t,n,i;return{c(){t=P("button"),t.textContent="Connect to QuickBooks",w(t,"class","btn business-source-connect-btn business-source-connect-btn_qbo start-connection-btn")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",function(){Ga(e[1]())&&e[1]().apply(this,arguments)}),n=!0)},p(r,a){e=r},d(r){r&&_e(t),n=!1,i()}}}function dbe(e){let t,n,i;return{c(){t=P("p"),t.textContent="QuickBooks connection is being established.",n=K(),i=P("div"),i.innerHTML='<div class="progress-bar progress-bar-primary container-full svelte-1imug2v"></div>',w(i,"class","progress progress-striped active")},m(r,a){ce(r,t,a),ce(r,n,a),ce(r,i,a)},p:ot,d(r){r&&_e(t),r&&_e(n),r&&_e(i)}}}function fbe(e){let t;return{c(){t=Le("QuickBooks connection has been successfully established!")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function cbe(e){let t;function n(a,s){return a[0]==="connected"?fbe:a[0]==="connecting"?dbe:ube}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,[s]){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},i:ot,o:ot,d(a){r.d(a),a&&_e(t)}}}function _be(e,t,n){let{state:i}=t,{onConnectionClick:r=()=>{}}=t;return e.$$set=a=>{"state"in a&&n(0,i=a.state),"onConnectionClick"in a&&n(1,r=a.onConnectionClick)},[i,r]}class pbe extends Qt{constructor(t){super(),Jt(this,t,_be,cbe,Kt,{state:0,onConnectionClick:1})}}function hbe(e){let t,n,i;return{c(){t=P("button"),t.textContent="Connect to Xero",w(t,"class","btn business-source-connect-btn business-source-connect-btn_xero start-connection-btn")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",function(){Ga(e[2]())&&e[2]().apply(this,arguments)}),n=!0)},p(r,a){e=r},d(r){r&&_e(t),n=!1,i()}}}function mbe(e){let t;return{c(){t=P("div"),w(t,"class","business-source-connect-error")},m(n,i){ce(n,t,i),t.innerHTML=e[1]},p(n,i){i&2&&(t.innerHTML=n[1])},d(n){n&&_e(t)}}}function gbe(e){let t,n,i;return{c(){t=P("p"),t.textContent="Xero connection is being established.",n=K(),i=P("div"),i.innerHTML='<div class="progress-bar progress-bar-primary container-full svelte-1imug2v"></div>',w(i,"class","progress progress-striped active")},m(r,a){ce(r,t,a),ce(r,n,a),ce(r,i,a)},p:ot,d(r){r&&_e(t),r&&_e(n),r&&_e(i)}}}function vbe(e){let t;return{c(){t=Le("Xero connection has been successfully established!")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function bbe(e){let t,n;function i(s,o){return o&2&&(t=null),s[0]==="connected"?vbe:s[0]==="connecting"?gbe:(t==null&&(t=!Xn.isNil(s[1])),t?mbe:hbe)}let r=i(e,-1),a=r(e);return{c(){a.c(),n=On()},m(s,o){a.m(s,o),ce(s,n,o)},p(s,[o]){r===(r=i(s,o))&&a?a.p(s,o):(a.d(1),a=r(s),a&&(a.c(),a.m(n.parentNode,n)))},i:ot,o:ot,d(s){a.d(s),s&&_e(n)}}}function ybe(e,t,n){let{state:i,linkGrantError:r}=t,{onConnectionClick:a=()=>{}}=t;return e.$$set=s=>{"state"in s&&n(0,i=s.state),"linkGrantError"in s&&n(1,r=s.linkGrantError),"onConnectionClick"in s&&n(2,a=s.onConnectionClick)},[i,r,a]}class wbe extends Qt{constructor(t){super(),Jt(this,t,ybe,bbe,Kt,{state:0,linkGrantError:1,onConnectionClick:2})}}function oA(e,t,n){const i=e.slice();return i[12]=t[n],i}function lA(e){let t,n,i,r=e[12]+"",a,s;return{c(){t=P("div"),n=P("button"),n.textContent="x",i=K(),a=Le(r),s=K(),w(n,"class","close"),w(n,"data-dismiss","alert"),w(t,"class","alert alert-danger fade show")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,a),m(t,s)},p(o,l){l&2&&r!==(r=o[12]+"")&&vt(a,r)},d(o){o&&_e(t)}}}function uA(e){let t,n,i,r;const a=[kbe,Tbe],s=[];function o(l,d){return l[2]==="intuit"?0:l[2]==="xero"?1:-1}return~(t=o(e))&&(n=s[t]=a[t](e)),{c(){n&&n.c(),i=On()},m(l,d){~t&&s[t].m(l,d),ce(l,i,d),r=!0},p(l,d){let c=t;t=o(l),t===c?~t&&s[t].p(l,d):(n&&(pn(),W(s[c],1,1,()=>{s[c]=null}),hn()),~t?(n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i)):n=null)},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){~t&&s[t].d(l),l&&_e(i)}}}function Tbe(e){let t,n;return t=new wbe({props:{state:e[0],linkGrantError:e[3],onConnectionClick:e[4]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.state=i[0]),r&8&&(a.linkGrantError=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function kbe(e){let t,n;return t=new pbe({props:{state:e[0],onConnectionClick:e[4]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.state=i[0]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Sbe(e){let t,n,i,r,a,s,o,l=e[1],d=[];for(let v=0;v<l.length;v+=1)d[v]=lA(oA(e,l,v));let c=e[0].length!==0&&uA(e);return{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title">Connection Management</h3>',i=K(),r=P("div"),a=P("div");for(let v=0;v<d.length;v+=1)d[v].c();s=K(),c&&c.c(),w(n,"class","card-header"),w(a,"class","business-source-connection-pane__errors"),w(r,"class","card-body"),w(t,"class","card")},m(v,T){ce(v,t,T),m(t,n),m(t,i),m(t,r),m(r,a);for(let b=0;b<d.length;b+=1)d[b]&&d[b].m(a,null);m(r,s),c&&c.m(r,null),o=!0},p(v,[T]){if(T&2){l=v[1];let b;for(b=0;b<l.length;b+=1){const A=oA(v,l,b);d[b]?d[b].p(A,T):(d[b]=lA(A),d[b].c(),d[b].m(a,null))}for(;b<d.length;b+=1)d[b].d(1);d.length=l.length}v[0].length!==0?c?(c.p(v,T),T&1&&U(c,1)):(c=uA(v),c.c(),U(c,1),c.m(r,null)):c&&(pn(),W(c,1,1,()=>{c=null}),hn())},i(v){o||(U(c),o=!0)},o(v){W(c),o=!1},d(v){v&&_e(t),Nn(d,v),c&&c.d()}}}function Cbe(e,t,n){let{sourceType:i}=t,{newConnectionPath:r}=t,{checkConnectionPath:a}=t,{csrfToken:s}=t,{state:o=""}=t,{errors:l=[]}=t,d=!1,c;const v={Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":s},T=async(E,y={})=>{try{return await(await fetch(E,{headers:v,...y})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}},b=async()=>{try{const E=await T(a,{method:"GET"});n(3,c=E.link_grant_error),E.connected?(n(0,o="connected"),d&&window.location.reload()):E.errors.length>0?(n(1,l=E.errors),n(0,o="disconnected"),Gn.delay(b,3e3)):(o!=="connecting"&&n(0,o="disconnected"),Gn.delay(b,1e3))}catch{Gn.delay(b,5e3)}},A=()=>{d=!0,n(0,o="connecting"),window.open(r,"_blank").focus()};return oa(()=>{b()}),e.$$set=E=>{"sourceType"in E&&n(2,i=E.sourceType),"newConnectionPath"in E&&n(5,r=E.newConnectionPath),"checkConnectionPath"in E&&n(6,a=E.checkConnectionPath),"csrfToken"in E&&n(7,s=E.csrfToken),"state"in E&&n(0,o=E.state),"errors"in E&&n(1,l=E.errors)},[o,l,i,c,A,r,a,s]}class Pbe extends Qt{constructor(t){super(),Jt(this,t,Cbe,Sbe,Kt,{sourceType:2,newConnectionPath:5,checkConnectionPath:6,csrfToken:7,state:0,errors:1})}}function dA(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j;const H=e[12].default,V=fu(H,e,e[11],null);function Q(be,ue){return be[2]?Ibe:Ebe}let X=Q(e),te=X(e),ne=e[1]&&fA();return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("h5"),s=Le(e[4]),o=K(),l=P("button"),l.innerHTML='<span aria-hidden="true">×</span>',d=K(),c=P("div"),V&&V.c(),v=K(),T=P("div"),b=P("button"),b.textContent="Close",A=K(),E=P("button"),te.c(),M=K(),ne&&ne.c(),F=On(),w(a,"class","modal-title"),w(a,"id",e[7]),w(l,"type","button"),w(l,"class","close"),w(l,"data-dismiss","modal"),w(l,"aria-label","Close"),w(r,"class","modal-header"),w(c,"class","modal-body"),w(b,"type","button"),w(b,"class","btn btn-secondary"),w(b,"data-dismiss","modal"),w(E,"type","button"),w(E,"class","btn btn-primary"),E.disabled=y=e[3]||e[2],w(T,"class","modal-footer"),w(i,"class","modal-content"),w(n,"class","modal-dialog"),w(n,"role","document"),w(t,"class",O="modal fade"+(e[8]&&" show")+" svelte-jwkuch"),w(t,"id",e[6]),w(t,"tabindex","-1"),w(t,"role","dialog"),w(t,"aria-labelledby",e[7]),w(t,"aria-hidden","false")},m(be,ue){ce(be,t,ue),m(t,n),m(n,i),m(i,r),m(r,a),m(a,s),m(r,o),m(r,l),m(i,d),m(i,c),V&&V.m(c,null),m(i,v),m(i,T),m(T,b),m(T,A),m(T,E),te.m(E,null),ce(be,M,ue),ne&&ne.m(be,ue),ce(be,F,ue),$=!0,L||(j=[ct(l,"click",e[13]),ct(b,"click",e[14]),ct(E,"click",e[15])],L=!0)},p(be,ue){e=be,(!$||ue&16)&&vt(s,e[4]),(!$||ue&128)&&w(a,"id",e[7]),V&&V.p&&(!$||ue&2048)&&cu(V,H,e,e[11],$?pu(H,e[11],ue,null):_u(e[11]),null),X===(X=Q(e))&&te?te.p(e,ue):(te.d(1),te=X(e),te&&(te.c(),te.m(E,null))),(!$||ue&12&&y!==(y=e[3]||e[2]))&&(E.disabled=y),(!$||ue&256&&O!==(O="modal fade"+(e[8]&&" show")+" svelte-jwkuch"))&&w(t,"class",O),(!$||ue&64)&&w(t,"id",e[6]),(!$||ue&128)&&w(t,"aria-labelledby",e[7]),e[1]?ne?ue&2&&U(ne,1):(ne=fA(),ne.c(),U(ne,1),ne.m(F.parentNode,F)):ne&&(pn(),W(ne,1,1,()=>{ne=null}),hn())},i(be){$||(U(V,be),xa(()=>{$&&(D&&D.end(1),I=Ad(n,t_,{y:-50,duration:300}),I.start())}),U(ne),$=!0)},o(be){W(V,be),I&&I.invalidate(),D=E7(n,t_,{y:-50,duration:300,easing:I7}),W(ne),$=!1},d(be){be&&_e(t),V&&V.d(be),te.d(),be&&D&&D.end(),be&&_e(M),ne&&ne.d(be),be&&_e(F),L=!1,vi(j)}}}function Ebe(e){let t;return{c(){t=Le(e[5])},m(n,i){ce(n,t,i)},p(n,i){i&32&&vt(t,n[5])},d(n){n&&_e(t)}}}function Ibe(e){let t;return{c(){t=P("div"),t.innerHTML=`<span class="bounce1 svelte-jwkuch"></span> 
                <span class="bounce2 svelte-jwkuch"></span> 
                <span class="bounce3 svelte-jwkuch"></span>`,w(t,"class","spinner svelte-jwkuch")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function fA(e){let t,n,i;return{c(){t=P("div"),w(t,"class","modal-backdrop fade show")},m(r,a){ce(r,t,a),i=!0},i(r){i||(xa(()=>{i&&(n||(n=Us(t,rs,{duration:150},!0)),n.run(1))}),i=!0)},o(r){n||(n=Us(t,rs,{duration:150},!1)),n.run(0),i=!1},d(r){r&&_e(t),r&&n&&n.end()}}}function Abe(e){let t,n,i,r=e[8]&&dA(e);return{c(){t=K(),r&&r.c(),n=On()},m(a,s){ce(a,t,s),r&&r.m(a,s),ce(a,n,s),i=!0},p(a,[s]){a[8]?r?(r.p(a,s),s&256&&U(r,1)):(r=dA(a),r.c(),U(r,1),r.m(n.parentNode,n)):r&&(pn(),W(r,1,1,()=>{r=null}),hn())},i(a){i||(U(r),i=!0)},o(a){W(r),i=!1},d(a){a&&_e(t),r&&r.d(a),a&&_e(n)}}}function Dbe(e,t,n){let i,r=ot,a=()=>(r(),r=Lu(l,F=>n(8,i=F)),l);e.$$.on_destroy.push(()=>r());let{$$slots:s={},$$scope:o}=t,{showStateInStore:l}=t;a();let{showBackdrop:d=!0}=t,{onSave:c}=t,{saving:v=!1}=t,{disabledSaveButton:T=!1}=t,{title:b="Modal title"}=t,{saveButtonTitle:A="Save changes"}=t,{modalId:E="sampleModal"}=t,{modalTitleId:y="sampleModalLabel"}=t;const I=async F=>{F=="save"&&c&&!await c()||l.set(!1)},D=()=>I("close"),O=()=>I("close"),M=()=>I("save");return e.$$set=F=>{"showStateInStore"in F&&a(n(0,l=F.showStateInStore)),"showBackdrop"in F&&n(1,d=F.showBackdrop),"onSave"in F&&n(10,c=F.onSave),"saving"in F&&n(2,v=F.saving),"disabledSaveButton"in F&&n(3,T=F.disabledSaveButton),"title"in F&&n(4,b=F.title),"saveButtonTitle"in F&&n(5,A=F.saveButtonTitle),"modalId"in F&&n(6,E=F.modalId),"modalTitleId"in F&&n(7,y=F.modalTitleId),"$$scope"in F&&n(11,o=F.$$scope)},e.$$.update=()=>{e.$$.dirty&256&&(i?window.document.body.classList.add("modal-open"):window.document.body.classList.remove("modal-open"))},[l,d,v,T,b,A,E,y,i,I,c,o,s,D,O,M]}class Obe extends Qt{constructor(t){super(),Jt(this,t,Dbe,Abe,Kt,{showStateInStore:0,showBackdrop:1,onSave:10,saving:2,disabledSaveButton:3,title:4,saveButtonTitle:5,modalId:6,modalTitleId:7})}}function cA(e){let t,n=e[8].get(e[0])+"",i;return{c(){t=P("small"),i=Le(n),w(t,"class","text-danger")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&257&&n!==(n=r[8].get(r[0])+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Mbe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=e[9]&&cA(e);return{c(){t=P("div"),n=P("label"),i=Le(e[5]),a=K(),s=P("div"),o=P("input"),c=K(),A&&A.c(),w(n,"class",r="col-sm-4 col-form-label string "+(e[6]?"required":"optional")),w(n,"for",e[11]),wt(n,"text-danger",e[9]),w(o,"id",e[11]),w(o,"type","text"),o.value=l=e[10][e[0]],w(o,"class",d="form-control string "+(e[6]?"required":"optional")),o.disabled=e[7],wt(o,"is-invalid",e[9]),w(s,"class","col-sm-8"),w(t,"class",v="row form-group string "+(e[6]?"required":"optional"))},m(E,y){ce(E,t,y),m(t,n),m(n,i),m(t,a),m(t,s),m(s,o),m(s,c),A&&A.m(s,null),T||(b=[ct(o,"input",e[13]),ct(o,"blur",e[14])],T=!0)},p(E,[y]){y&32&&vt(i,E[5]),y&64&&r!==(r="col-sm-4 col-form-label string "+(E[6]?"required":"optional"))&&w(n,"class",r),y&576&&wt(n,"text-danger",E[9]),y&1025&&l!==(l=E[10][E[0]])&&o.value!==l&&(o.value=l),y&64&&d!==(d="form-control string "+(E[6]?"required":"optional"))&&w(o,"class",d),y&128&&(o.disabled=E[7]),y&576&&wt(o,"is-invalid",E[9]),E[9]?A?A.p(E,y):(A=cA(E),A.c(),A.m(s,null)):A&&(A.d(1),A=null),y&64&&v!==(v="row form-group string "+(E[6]?"required":"optional"))&&w(t,"class",v)},i:ot,o:ot,d(E){E&&_e(t),A&&A.d(),T=!1,vi(b)}}}function xbe(e,t,n){let i,r,a=ot,s=()=>(a(),a=Lu(E,j=>n(8,r=j)),E),o,l=ot,d=()=>(l(),l=Lu(y,j=>n(12,o=j)),y),c,v=ot,T=()=>(v(),v=Lu(A,j=>n(10,c=j)),A);e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>l()),e.$$.on_destroy.push(()=>v());let{key:b}=t,{store:A}=t;T();let{validation:E}=t;s();let{visitors:y}=t;d();let{visitField:I}=t,{title:D}=t,{required:O=!1}=t,{disabled:M=!1}=t;const F=Math.random().toString(16).substr(2,8),$=j=>$s(A,c[b]=j.target.value,c),L=()=>I(b);return e.$$set=j=>{"key"in j&&n(0,b=j.key),"store"in j&&T(n(1,A=j.store)),"validation"in j&&s(n(2,E=j.validation)),"visitors"in j&&d(n(3,y=j.visitors)),"visitField"in j&&n(4,I=j.visitField),"title"in j&&n(5,D=j.title),"required"in j&&n(6,O=j.required),"disabled"in j&&n(7,M=j.disabled)},e.$$.update=()=>{e.$$.dirty&4353&&n(9,i=o.has(b)&&r.has(b))},[b,A,E,y,I,D,O,M,r,i,c,F,o,$,L]}let _A=class extends Qt{constructor(t){super(),Jt(this,t,xbe,Mbe,Kt,{key:0,store:1,validation:2,visitors:3,visitField:4,title:5,required:6,disabled:7})}};function pA(e,t,n){const i=e.slice();return i[16]=t[n][0],i[17]=t[n][1],i}function hA(e){let t,n=e[16]+"",i,r,a;return{c(){t=P("option"),i=Le(n),r=K(),t.__value=a=e[17],t.value=t.__value},m(s,o){ce(s,t,o),m(t,i),m(t,r)},p(s,o){o&128&&n!==(n=s[16]+"")&&vt(i,n),o&128&&a!==(a=s[17])&&(t.__value=a,t.value=t.__value)},d(s){s&&_e(t)}}}function mA(e){let t,n=e[9].get(e[0])+"",i;return{c(){t=P("small"),i=Le(n),w(t,"class","text-danger")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&513&&n!==(n=r[9].get(r[0])+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Rbe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=Array.isArray(e[7])?e[7]:Object.entries(e[7]),E=[];for(let I=0;I<A.length;I+=1)E[I]=hA(pA(e,A,I));let y=e[10]&&mA(e);return{c(){t=P("div"),n=P("label"),i=Le(e[5]),a=K(),s=P("div"),o=P("select");for(let I=0;I<E.length;I+=1)E[I].c();c=K(),y&&y.c(),w(n,"class",r="col-sm-4 col-form-label select "+(e[6]?"required":"optional")),w(n,"for",e[12]),wt(n,"text-danger",e[10]),w(o,"id",e[12]),w(o,"class",d="form-control select "+(e[6]?"required":"optional")),o.disabled=e[8],wt(o,"is-invalid",e[10]),w(s,"class","col-sm-8"),w(t,"class",v="row form-group select "+(e[6]?"required":"optional"))},m(I,D){ce(I,t,D),m(t,n),m(n,i),m(t,a),m(t,s),m(s,o);for(let O=0;O<E.length;O+=1)E[O]&&E[O].m(o,null);Es(o,e[11][e[0]]),m(s,c),y&&y.m(s,null),T||(b=[ct(o,"change",e[14]),ct(o,"blur",e[15])],T=!0)},p(I,[D]){if(D&32&&vt(i,I[5]),D&64&&r!==(r="col-sm-4 col-form-label select "+(I[6]?"required":"optional"))&&w(n,"class",r),D&1088&&wt(n,"text-danger",I[10]),D&128){A=Array.isArray(I[7])?I[7]:Object.entries(I[7]);let O;for(O=0;O<A.length;O+=1){const M=pA(I,A,O);E[O]?E[O].p(M,D):(E[O]=hA(M),E[O].c(),E[O].m(o,null))}for(;O<E.length;O+=1)E[O].d(1);E.length=A.length}D&2177&&l!==(l=I[11][I[0]])&&Es(o,I[11][I[0]]),D&64&&d!==(d="form-control select "+(I[6]?"required":"optional"))&&w(o,"class",d),D&256&&(o.disabled=I[8]),D&1088&&wt(o,"is-invalid",I[10]),I[10]?y?y.p(I,D):(y=mA(I),y.c(),y.m(s,null)):y&&(y.d(1),y=null),D&64&&v!==(v="row form-group select "+(I[6]?"required":"optional"))&&w(t,"class",v)},i:ot,o:ot,d(I){I&&_e(t),Nn(E,I),y&&y.d(),T=!1,vi(b)}}}function $be(e,t,n){let i,r,a=ot,s=()=>(a(),a=Lu(E,H=>n(9,r=H)),E),o,l=ot,d=()=>(l(),l=Lu(y,H=>n(13,o=H)),y),c,v=ot,T=()=>(v(),v=Lu(A,H=>n(11,c=H)),A);e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>l()),e.$$.on_destroy.push(()=>v());let{key:b}=t,{store:A}=t;T();let{validation:E}=t;s();let{visitors:y}=t;d();let{visitField:I}=t,{title:D}=t,{required:O=!1}=t,{options:M={}}=t,{disabled:F=!1}=t;const $=Math.random().toString(16).substr(2,8),L=H=>$s(A,c[b]=H.target.value,c),j=()=>I(b);return e.$$set=H=>{"key"in H&&n(0,b=H.key),"store"in H&&T(n(1,A=H.store)),"validation"in H&&s(n(2,E=H.validation)),"visitors"in H&&d(n(3,y=H.visitors)),"visitField"in H&&n(4,I=H.visitField),"title"in H&&n(5,D=H.title),"required"in H&&n(6,O=H.required),"options"in H&&n(7,M=H.options),"disabled"in H&&n(8,F=H.disabled)},e.$$.update=()=>{e.$$.dirty&8705&&n(10,i=o.has(b)&&r.has(b))},[b,A,E,y,I,D,O,M,F,r,i,c,$,o,L,j]}class gA extends Qt{constructor(t){super(),Jt(this,t,$be,Rbe,Kt,{key:0,store:1,validation:2,visitors:3,visitField:4,title:5,required:6,options:7,disabled:8})}}function vA(e){let t,n=e[11].get(e[0])+"",i;return{c(){t=P("small"),i=Le(n),w(t,"class","text-danger")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&2049&&n!==(n=r[11].get(r[0])+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Nbe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A=e[12]&&vA(e);return{c(){t=P("div"),n=P("label"),i=Le(e[5]),a=K(),s=P("div"),o=P("div"),l=P("input"),c=K(),A&&A.c(),w(n,"class",r="col-sm-4 col-form-label string "+(e[6]?"required":"optional")),w(n,"for",e[9]),wt(n,"text-danger",e[12]),w(l,"id",e[9]),w(l,"type","hidden"),w(l,"class",d="form-control string "+(e[6]?"required":"optional")),l.disabled=e[7],wt(l,"is-invalid",e[12]),w(o,"class","input-group date"),w(o,"data-provide","datepicker"),w(o,"data-format",e[8]),w(s,"class","col-sm-8"),w(t,"class",v="row form-group string "+(e[6]?"required":"optional"))},m(E,y){ce(E,t,y),m(t,n),m(n,i),m(t,a),m(t,s),m(s,o),m(o,l),e[16](o),m(s,c),A&&A.m(s,null),T||(b=ct(o,"blur",e[17]),T=!0)},p(E,[y]){y&32&&vt(i,E[5]),y&64&&r!==(r="col-sm-4 col-form-label string "+(E[6]?"required":"optional"))&&w(n,"class",r),y&512&&w(n,"for",E[9]),y&4160&&wt(n,"text-danger",E[12]),y&512&&w(l,"id",E[9]),y&64&&d!==(d="form-control string "+(E[6]?"required":"optional"))&&w(l,"class",d),y&128&&(l.disabled=E[7]),y&4160&&wt(l,"is-invalid",E[12]),y&256&&w(o,"data-format",E[8]),E[12]?A?A.p(E,y):(A=vA(E),A.c(),A.m(s,null)):A&&(A.d(1),A=null),y&64&&v!==(v="row form-group string "+(E[6]?"required":"optional"))&&w(t,"class",v)},i:ot,o:ot,d(E){E&&_e(t),e[16](null),A&&A.d(),T=!1,b()}}}function Fbe(e,t,n){let i,r,a=ot,s=()=>(a(),a=Lu(A,Q=>n(14,r=Q)),A),o,l=ot,d=()=>(l(),l=Lu(E,Q=>n(11,o=Q)),E),c,v=ot,T=()=>(v(),v=Lu(y,Q=>n(15,c=Q)),y);e.$$.on_destroy.push(()=>a()),e.$$.on_destroy.push(()=>l()),e.$$.on_destroy.push(()=>v());let{key:b}=t,{store:A}=t;s();let{validation:E}=t;d();let{visitors:y}=t;T();let{visitField:I}=t,{title:D}=t,{required:O=!1}=t,{disabled:M=!1}=t,{dateFormat:F="yyyy-mm-dd"}=t,{options:$={}}=t,{id:L=Math.random().toString(16).substr(2,8)}=t,j;oa(()=>{const Q=window.$(j);Q.datepicker({language:"en",...$,...F?{format:F}:{}}),Q.on("changeDate",function(){$s(A,r[b]=Q.datepicker("getFormattedDate"),r)})});function H(Q){Oe[Q?"unshift":"push"](()=>{j=Q,n(10,j)})}const V=()=>I(b);return e.$$set=Q=>{"key"in Q&&n(0,b=Q.key),"store"in Q&&s(n(1,A=Q.store)),"validation"in Q&&d(n(2,E=Q.validation)),"visitors"in Q&&T(n(3,y=Q.visitors)),"visitField"in Q&&n(4,I=Q.visitField),"title"in Q&&n(5,D=Q.title),"required"in Q&&n(6,O=Q.required),"disabled"in Q&&n(7,M=Q.disabled),"dateFormat"in Q&&n(8,F=Q.dateFormat),"options"in Q&&n(13,$=Q.options),"id"in Q&&n(9,L=Q.id)},e.$$.update=()=>{e.$$.dirty&17409&&window.$(j).datepicker("update",r[b]),e.$$.dirty&34817&&n(12,i=c.has(b)&&o.has(b))},[b,A,E,y,I,D,O,M,F,L,j,o,i,$,r,c,H,V]}class Lbe extends Qt{constructor(t){super(),Jt(this,t,Fbe,Nbe,Kt,{key:0,store:1,validation:2,visitors:3,visitField:4,title:5,required:6,disabled:7,dateFormat:8,options:13,id:9})}}function Hbe(e){return{name:e.name,businessType:e.business_type,share:e.share,owner:e.owner,startDate:zn(e.start_date,"YYYY-MM-DD").format("MM/DD/YYYY")}}function jbe(e){return{name:e.name,business_type:e.businessType,share:e.share,owner:e.owner,start_date:zn(e.startDate,"MM/DD/YYYY").format("YYYY-MM-DD")}}const Bbe={Taxpayer:"taxpayer",Spouse:"spouse"},Ube={"S Corporation":"s-corporation","C Corporation":"c-corporation",Partnership:"partnership","Sole Proprietorship":"sole-proprietorship"};let EN=Bs().shape({name:Ps().nullable().transform(bA).required("Company Name is required."),businessType:Ps().oneOf(Gn.values(Ube)).when("owner",{is:"spouse",then:e=>e.notOneOf(["sole-proprietorship"],"Sorry, Tax Planner Pro does not support spousal sole proprietorships yet"),otherwise:e=>e.required("Business Type is required.")}),share:At().typeError("Ownership must be a number.").min(0,"Min value 0%.").max(100,"Max value 100%.").nullable().transform(bA).required("Ownership is required."),owner:Ps().oneOf(Gn.values(Bbe)).required("Owner is required."),startDate:Ps().matches(/^([01]?\d)\/([0123]?\d)\/\d\d\d\d$/,"The date must be in US format.").required("Business start date is required.")});const rf=ao({}),ap=vo(rf,e=>{try{return EN.validateSync(e,{abortEarly:!1}),new Map}catch(t){return new Map(t.inner.map(n=>[n.path,n.errors[0]]))}}),qbe=vo(rf,e=>{try{return EN.validateSync(e,{abortEarly:!0}),jbe(e)}catch{return null}}),Xc=ao(new Set([])),xh=e=>Xc.update(t=>new Set([...t,e])),Wbe=()=>{rf.set({name:"",share:100}),Xc.set(new Set([]))},R0=ao(!1);function bA(e,t){return String(t).trim()===""?null:e}function Vbe(e){let t,n,i,r,a,s,o,l,d,c,v,T;return i=new _A({props:{key:"name",store:rf,validation:ap,visitors:Xc,visitField:xh,title:"Name",required:!0,disabled:e[3]}}),a=new gA({props:{key:"businessType",store:rf,validation:ap,visitors:Xc,visitField:xh,title:"Business Type",required:!1,options:e[0],disabled:e[3]}}),o=new _A({props:{key:"share",store:rf,validation:ap,visitors:Xc,visitField:xh,title:"Ownership %",required:!0,disabled:e[3]}}),d=new gA({props:{key:"owner",store:rf,validation:ap,visitors:Xc,visitField:xh,title:"Owner",options:e[1],required:!1,disabled:e[3]}}),v=new Lbe({props:{key:"startDate",store:rf,validation:ap,visitors:Xc,visitField:xh,title:"Start Date",required:!1,disabled:e[3],options:{endDate:"+0d",todayHighlight:!0},dateFormat:"mm/dd/yyyy",id:"wizard_business_setup_start_date"}}),{c(){t=P("div"),n=P("div"),re(i.$$.fragment),r=K(),re(a.$$.fragment),s=K(),re(o.$$.fragment),l=K(),re(d.$$.fragment),c=K(),re(v.$$.fragment),w(n,"class","col-sm-12"),w(t,"class","row")},m(b,A){ce(b,t,A),m(t,n),ae(i,n,null),m(n,r),ae(a,n,null),m(n,s),ae(o,n,null),m(n,l),ae(d,n,null),m(n,c),ae(v,n,null),T=!0},p(b,A){const E={};A&8&&(E.disabled=b[3]),i.$set(E);const y={};A&1&&(y.options=b[0]),A&8&&(y.disabled=b[3]),a.$set(y);const I={};A&8&&(I.disabled=b[3]),o.$set(I);const D={};A&2&&(D.options=b[1]),A&8&&(D.disabled=b[3]),d.$set(D);const O={};A&8&&(O.disabled=b[3]),v.$set(O)},i(b){T||(U(i.$$.fragment,b),U(a.$$.fragment,b),U(o.$$.fragment,b),U(d.$$.fragment,b),U(v.$$.fragment,b),T=!0)},o(b){W(i.$$.fragment,b),W(a.$$.fragment,b),W(o.$$.fragment,b),W(d.$$.fragment,b),W(v.$$.fragment,b),T=!1},d(b){b&&_e(t),se(i),se(a),se(o),se(d),se(v)}}}function zbe(e){let t,n;return t=new Obe({props:{title:"CREATE NEW COMPANY",saveButtonTitle:"Create",modalId:"createCompany",modalTitleId:"createCompanyLabel",showStateInStore:R0,onSave:e[5],saving:e[2],disabledSaveButton:e[4].size!=0,$$slots:{default:[Vbe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,[r]){const a={};r&4&&(a.saving=i[2]),r&16&&(a.disabledSaveButton=i[4].size!=0),r&65547&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Ybe(e,t,n){let i,r;Sn(e,qbe,O=>n(10,i=O)),Sn(e,ap,O=>n(4,r=O));let{businessTypes:a=[]}=t,{ownerTypes:s=[]}=t,{newCompanyPath:o}=t,{createCompanyPath:l}=t,{csrfToken:d}=t,c=!1,v=!0,T;const b={Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":d},A=async(O,M={})=>{try{return await(await fetch(O,{headers:b,...M})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}},E=async()=>{try{const O=await A(o,{method:"GET"});O.success?(rf.set(Hbe(O.success)),n(3,v=!1)):O.error&&Gr.error(O.error.message)}catch(O){Gr.error(O.message)}},y=async()=>{try{const O=await A(l,{method:"POST",body:JSON.stringify(i)});if(O.success)return Gr.success(O.success.message),O.success.redirect;O.error&&Gr.error(O.error.message)}catch(O){Gr.error(O.message)}};oa(()=>{T=R0.subscribe(O=>O&&I())}),Jy(T);const I=()=>{Wbe(),n(3,v=!0),E()},D=async()=>{n(2,c=!0);const O=await y();return n(2,c=!1),O?(Gn.delay(function(M){window.location.href=O},2e3),!0):!1};return e.$$set=O=>{"businessTypes"in O&&n(0,a=O.businessTypes),"ownerTypes"in O&&n(1,s=O.ownerTypes),"newCompanyPath"in O&&n(6,o=O.newCompanyPath),"createCompanyPath"in O&&n(7,l=O.createCompanyPath),"csrfToken"in O&&n(8,d=O.csrfToken)},[a,s,c,v,r,D,o,l,d]}class Gbe extends Qt{constructor(t){super(),Jt(this,t,Ybe,zbe,Kt,{businessTypes:0,ownerTypes:1,newCompanyPath:6,createCompanyPath:7,csrfToken:8})}}function yA(e,t,n){const i=e.slice();return i[5]=t[n],i}function wA(e){let t,n,i,r,a=e[5].name+"",s,o;return{c(){t=P("li"),n=P("a"),i=P("i"),r=K(),s=Le(a),w(i,"class","fa fa-fw fa-users"),w(n,"class","nav-link"),w(n,"href",o=e[2].replace("@",e[5].id)),w(t,"class","nav-item"),wt(t,"active",e[5].id==e[1])},m(l,d){ce(l,t,d),m(t,n),m(n,i),m(n,r),m(n,s)},p(l,d){d&1&&a!==(a=l[5].name+"")&&vt(s,a),d&5&&o!==(o=l[2].replace("@",l[5].id))&&w(n,"href",o),d&3&&wt(t,"active",l[5].id==l[1])},d(l){l&&_e(t)}}}function TA(e){let t,n,i,r;return{c(){t=P("li"),n=P("a"),n.innerHTML=`<i class="fa fa-plus"></i>
        Add Company`,w(n,"class","nav-link"),w(n,"href","#"),w(t,"class","nav-item")},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(n,"click",Hi(e[4])),i=!0)},p:ot,d(a){a&&_e(t),i=!1,r()}}}function Kbe(e){let t,n,i=e[0],r=[];for(let s=0;s<i.length;s+=1)r[s]=wA(yA(e,i,s));let a=e[3]&&TA(e);return{c(){t=P("ul");for(let s=0;s<r.length;s+=1)r[s].c();n=K(),a&&a.c(),w(t,"class","nav nav-pills flex-column")},m(s,o){ce(s,t,o);for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(t,null);m(t,n),a&&a.m(t,null)},p(s,[o]){if(o&7){i=s[0];let l;for(l=0;l<i.length;l+=1){const d=yA(s,i,l);r[l]?r[l].p(d,o):(r[l]=wA(d),r[l].c(),r[l].m(t,n))}for(;l<r.length;l+=1)r[l].d(1);r.length=i.length}s[3]?a?a.p(s,o):(a=TA(s),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i:ot,o:ot,d(s){s&&_e(t),Nn(r,s),a&&a.d()}}}function Xbe(e,t,n){let{companies:i=[]}=t,{active_company:r=""}=t,{client_company_path:a=""}=t,{can_create_company:s=!0}=t;function o(){R0.set(!0)}return e.$$set=l=>{"companies"in l&&n(0,i=l.companies),"active_company"in l&&n(1,r=l.active_company),"client_company_path"in l&&n(2,a=l.client_company_path),"can_create_company"in l&&n(3,s=l.can_create_company)},[i,r,a,s,o]}class Qbe extends Qt{constructor(t){super(),Jt(this,t,Xbe,Kbe,Kt,{companies:0,active_company:1,client_company_path:2,can_create_company:3})}}function kA(e,t,n){const i=e.slice();return i[11]=t[n],i}function Jbe(e){let t;return{c(){t=P("i"),w(t,"class","fa fa-angle-down svelte-d4l06h")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function Zbe(e){let t;return{c(){t=P("i"),w(t,"class","fa fa-angle-up svelte-d4l06h")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function eye(e){let t;return{c(){t=P("i"),w(t,"class","fa fa-spinner svelte-d4l06h")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function SA(e){let t,n,i,r,a,s,o;return{c(){t=P("div"),n=P("div"),i=P("span"),r=K(),a=P("button"),a.innerHTML='<span aria-hidden="true">×</span>',w(i,"class","xero-tenants-list-error__msg"),w(a,"type","button"),w(a,"class","close"),w(a,"data-dismiss","alert"),w(a,"aria-label","Close"),w(n,"class","alert alert-danger xero-tenants-list-error svelte-d4l06h"),w(n,"role","alert"),w(t,"class","errors")},m(l,d){ce(l,t,d),m(t,n),m(n,i),i.innerHTML=e[6],m(n,r),m(n,a),s||(o=ct(a,"click",e[7]),s=!0)},p(l,d){d&64&&(i.innerHTML=l[6])},d(l){l&&_e(t),s=!1,o()}}}function CA(e){let t,n=e[4],i=[];for(let r=0;r<n.length;r+=1)i[r]=PA(kA(e,n,r));return{c(){for(let r=0;r<i.length;r+=1)i[r].c();t=On()},m(r,a){for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(r,a);ce(r,t,a)},p(r,a){if(a&22){n=r[4];let s;for(s=0;s<n.length;s+=1){const o=kA(r,n,s);i[s]?i[s].p(o,a):(i[s]=PA(o),i[s].c(),i[s].m(t.parentNode,t))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},d(r){Nn(i,r),r&&_e(t)}}}function tye(e){let t;return{c(){t=Le("Switch")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function nye(e){let t;return{c(){t=Le("Current")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function PA(e){let t,n,i,r,a,s,o,l,d,c,v=e[11].name+"",T,b,A,E,y,I;function D(F,$){return F[11].current?nye:tye}let O=D(e),M=O(e);return{c(){t=P("form"),n=P("input"),i=K(),r=P("input"),a=K(),s=P("input"),l=K(),d=P("div"),c=P("div"),T=Le(v),b=K(),A=P("button"),M.c(),I=K(),w(n,"type","hidden"),w(n,"name","_method"),n.value="put",w(r,"type","hidden"),w(r,"name","authenticity_token"),r.value=e[2],w(s,"name","tenant_id"),w(s,"type","hidden"),s.value=o=e[11].id,w(c,"class","xero-tenants-list-organization__name"),w(A,"class","btn btn-sm btn-primary btn-block xero-tenants-list-organization__switch-btn svelte-d4l06h"),w(A,"type","submit"),A.disabled=E=e[11].current,w(d,"class",y="xero-tenants-list-organization xero-tenants-list-organization_"+e[11].id+" svelte-d4l06h"),w(t,"action",e[1]),w(t,"method","post")},m(F,$){ce(F,t,$),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(t,l),m(t,d),m(d,c),m(c,T),m(d,b),m(d,A),M.m(A,null),m(t,I)},p(F,$){$&4&&(r.value=F[2]),$&16&&o!==(o=F[11].id)&&(s.value=o),$&16&&v!==(v=F[11].name+"")&&vt(T,v),O!==(O=D(F))&&(M.d(1),M=O(F),M&&(M.c(),M.m(A,null))),$&16&&E!==(E=F[11].current)&&(A.disabled=E),$&16&&y!==(y="xero-tenants-list-organization xero-tenants-list-organization_"+F[11].id+" svelte-d4l06h")&&w(d,"class",y),$&2&&w(t,"action",F[1])},d(F){F&&_e(t),M.d()}}}function iye(e){let t,n,i,r,a,s,o,l,d,c,v,T,b;function A(O,M){if(O[5])return eye;if(O[3])return Zbe;if(!O[3])return Jbe}let E=A(e),y=E&&E(e),I=e[6]&&SA(e),D=e[3]&&e[4]!==void 0&&CA(e);return{c(){t=P("div"),n=P("span"),i=P("b"),i.textContent="Connected to:",r=K(),a=Le(e[0]),s=K(),o=P("button"),y&&y.c(),l=Le(`
    Change organization`),d=K(),c=P("div"),I&&I.c(),v=K(),D&&D.c(),w(n,"class","remote-company-name"),w(o,"class","btn btn-sm btn-light xero-tenants-list__show-btn svelte-d4l06h"),w(c,"class","xero-tenants-list svelte-d4l06h"),w(t,"class","xero-tenant-switch svelte-d4l06h")},m(O,M){ce(O,t,M),m(t,n),m(n,i),m(n,r),m(n,a),m(t,s),m(t,o),y&&y.m(o,null),m(o,l),m(t,d),m(t,c),I&&I.m(c,null),m(c,v),D&&D.m(c,null),T||(b=ct(o,"click",e[8]),T=!0)},p(O,[M]){M&1&&vt(a,O[0]),E!==(E=A(O))&&(y&&y.d(1),y=E&&E(O),y&&(y.c(),y.m(o,l))),O[6]?I?I.p(O,M):(I=SA(O),I.c(),I.m(c,v)):I&&(I.d(1),I=null),O[3]&&O[4]!==void 0?D?D.p(O,M):(D=CA(O),D.c(),D.m(c,null)):D&&(D.d(1),D=null)},i:ot,o:ot,d(O){O&&_e(t),y&&y.d(),I&&I.d(),D&&D.d(),T=!1,b()}}}function rye(e,t,n){let{companyName:i}=t,{availableTenantsPath:r}=t,{changeTenantPath:a}=t,{csrfToken:s}=t,{loadingErrorDefaultMsg:o}=t,l=!1,d,c=!1,v;function T(){n(6,v=void 0)}function b(){if(d!==void 0){n(3,l=!l);return}n(5,c=!0),n(6,v=void 0),fetch(r).then(A=>{const E=A.headers.get("Content-Type");if(E!=null&&E.startsWith("application/json"))return A;throw new Error(`Incorrect response content-type: '${E}'. Should be 'application/json'. Response Status: ${A.status}`)}).then(A=>A.json().then(E=>({data:E,status:A.status}))).then(A=>{const E=A.data,y=A.status;let I=new Error;if(E.hasOwnProperty("error"))throw I.message=E,I;if(!(y>=200&&y<300))throw I.message=`Incorrect response status: ${y}. Should be 200...300`,I;return E}).then(A=>{n(4,d=A.tenants),n(5,c=!1),n(3,l=!0)}).catch(A=>{console.error(A.message),n(5,c=!1),n(6,v=o)})}return e.$$set=A=>{"companyName"in A&&n(0,i=A.companyName),"availableTenantsPath"in A&&n(9,r=A.availableTenantsPath),"changeTenantPath"in A&&n(1,a=A.changeTenantPath),"csrfToken"in A&&n(2,s=A.csrfToken),"loadingErrorDefaultMsg"in A&&n(10,o=A.loadingErrorDefaultMsg)},[i,a,s,l,d,c,v,T,b,r,o]}class aye extends Qt{constructor(t){super(),Jt(this,t,rye,iye,Kt,{companyName:0,availableTenantsPath:9,changeTenantPath:1,csrfToken:2,loadingErrorDefaultMsg:10})}}function EA(e,t,n){const i=e.slice();return i[10]=t[n],i}function IA(e,t,n){const i=e.slice();return i[13]=t[n],i}function AA(e,t,n){const i=e.slice();return i[13]=t[n][0],i[16]=t[n][1],i}function DA(e,t,n){const i=e.slice();return i[19]=t[n],i[21]=n,i}function OA(e,t,n){const i=e.slice();return i[10]=t[n],i}function MA(e,t,n){const i=e.slice();return i[10]=t[n],i[24]=t,i[25]=n,i}function xA(e,t,n){const i=e.slice();return i[26]=t[n],i}function RA(e,t,n){const i=e.slice();return i[10]=t[n],i}function $A(e){let t,n=e[10].company_name+"",i;return{c(){t=P("th"),i=Le(n)},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&2&&n!==(n=r[10].company_name+"")&&vt(i,n)},d(r){r&&_e(t)}}}function NA(e){let t,n=e[26].text+"",i,r;return{c(){t=P("option"),i=Le(n),r=K(),t.__value=e[26].value,t.value=t.__value},m(a,s){ce(a,t,s),m(t,i),m(t,r)},p:ot,d(a){a&&_e(t)}}}function FA(e){let t,n,i,r,a,s=Object.values(e[5]).reverse(),o=[];for(let d=0;d<s.length;d+=1)o[d]=NA(xA(e,s,d));function l(){e[8].call(n,e[10])}return{c(){t=P("td"),n=P("select");for(let d=0;d<o.length;d+=1)o[d].c();i=K(),w(n,"class","form-control"),n.disabled=e[4],e[3][e[10].company_id]===void 0&&xa(l)},m(d,c){ce(d,t,c),m(t,n);for(let v=0;v<o.length;v+=1)o[v]&&o[v].m(n,null);Es(n,e[3][e[10].company_id],!0),m(t,i),r||(a=[ct(n,"change",l),ct(n,"input",e[6])],r=!0)},p(d,c){if(e=d,c&32){s=Object.values(e[5]).reverse();let v;for(v=0;v<s.length;v+=1){const T=xA(e,s,v);o[v]?o[v].p(T,c):(o[v]=NA(T),o[v].c(),o[v].m(n,null))}for(;v<o.length;v+=1)o[v].d(1);o.length=s.length}c&16&&(n.disabled=e[4]),c&42&&Es(n,e[3][e[10].company_id])},d(d){d&&_e(t),Nn(o,d),r=!1,vi(a)}}}function LA(e){let t,n=ho(e[10].taxable_income||0)+"",i;return{c(){t=P("td"),i=Le(n)},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&2&&n!==(n=ho(r[10].taxable_income||0)+"")&&vt(i,n)},d(r){r&&_e(t)}}}function HA(e){let t;return{c(){t=P("div"),t.innerHTML="<small>FICA Tax</small>",w(t,"class","col")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function jA(e){let t;return{c(){t=P("div"),t.innerHTML="<small>Income Tax (Corporate)</small>",w(t,"class","col")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function BA(e){let t,n=ho(e[19].fica_tax)+"",i;return{c(){t=P("div"),i=Le(n),w(t,"class","col")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ho(r[19].fica_tax)+"")&&vt(i,n)},d(r){r&&_e(t)}}}function UA(e){let t,n=ho(e[19].income_tax_corporate)+"",i;return{c(){t=P("div"),i=Le(n),w(t,"class","col")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=ho(r[19].income_tax_corporate)+"")&&vt(i,n)},d(r){r&&_e(t)}}}function qA(e){let t,n,i,r,a=ho(e[19].se_tax)+"",s,o,l,d,c,v=ho(e[19].income_tax)+"",T,b,A,E=ho(e[19].state_tax)+"",y,I,D,O,M=ho(e[19].total_tax)+"",F,$=e[13]==="S Corporation"&&BA(e),L=e[13]==="C Corporation"&&UA(e);return{c(){t=P("td"),n=P("b"),n.textContent=" ",i=K(),r=P("div"),s=Le(a),o=K(),$&&$.c(),l=K(),L&&L.c(),d=K(),c=P("div"),T=Le(v),b=K(),A=P("div"),y=Le(E),I=K(),D=P("div"),O=P("b"),F=Le(M),w(r,"class","col"),w(c,"class","col"),w(A,"class","col"),w(D,"class","col"),w(t,"class","svelte-1p3b8nr"),wt(t,"optimal-business-type",(e[1][e[21]].optimal_combination||[])[0]>=e[19].total_tax),wt(t,"selected-business-type",e[19].misc==="selected_business_type")},m(j,H){ce(j,t,H),m(t,n),m(t,i),m(t,r),m(r,s),m(t,o),$&&$.m(t,null),m(t,l),L&&L.m(t,null),m(t,d),m(t,c),m(c,T),m(t,b),m(t,A),m(A,y),m(t,I),m(t,D),m(D,O),m(O,F)},p(j,H){H&1&&a!==(a=ho(j[19].se_tax)+"")&&vt(s,a),j[13]==="S Corporation"?$?$.p(j,H):($=BA(j),$.c(),$.m(t,l)):$&&($.d(1),$=null),j[13]==="C Corporation"?L?L.p(j,H):(L=UA(j),L.c(),L.m(t,d)):L&&(L.d(1),L=null),H&1&&v!==(v=ho(j[19].income_tax)+"")&&vt(T,v),H&1&&E!==(E=ho(j[19].state_tax)+"")&&vt(y,E),H&1&&M!==(M=ho(j[19].total_tax)+"")&&vt(F,M),H&3&&wt(t,"optimal-business-type",(j[1][j[21]].optimal_combination||[])[0]>=j[19].total_tax),H&1&&wt(t,"selected-business-type",j[19].misc==="selected_business_type")},d(j){j&&_e(t),$&&$.d(),L&&L.d()}}}function WA(e){let t,n,i,r=e[13]+"",a,s,o,l,d,c,v,T,b,A,E,y,I=e[13]==="S Corporation"&&HA(),D=e[13]==="C Corporation"&&jA(),O=e[16],M=[];for(let F=0;F<O.length;F+=1)M[F]=qA(DA(e,O,F));return{c(){t=P("tr"),n=P("td"),i=P("b"),a=Le(r),s=K(),o=P("div"),o.innerHTML="<small>SE Tax</small>",l=K(),I&&I.c(),d=K(),D&&D.c(),c=K(),v=P("div"),v.innerHTML="<small>Income Tax</small>",T=K(),b=P("div"),b.innerHTML="<small>State Tax</small>",A=K(),E=P("div"),E.innerHTML="<small>Total Tax</small>",y=K();for(let F=0;F<M.length;F+=1)M[F].c();w(o,"class","col"),w(v,"class","col"),w(b,"class","col"),w(E,"class","col")},m(F,$){ce(F,t,$),m(t,n),m(n,i),m(i,a),m(n,s),m(n,o),m(n,l),I&&I.m(n,null),m(n,d),D&&D.m(n,null),m(n,c),m(n,v),m(n,T),m(n,b),m(n,A),m(n,E),m(t,y);for(let L=0;L<M.length;L+=1)M[L]&&M[L].m(t,null)},p(F,$){if($&1&&r!==(r=F[13]+"")&&vt(a,r),F[13]==="S Corporation"?I||(I=HA(),I.c(),I.m(n,d)):I&&(I.d(1),I=null),F[13]==="C Corporation"?D||(D=jA(),D.c(),D.m(n,c)):D&&(D.d(1),D=null),$&3){O=F[16];let L;for(L=0;L<O.length;L+=1){const j=DA(F,O,L);M[L]?M[L].p(j,$):(M[L]=qA(j),M[L].c(),M[L].m(t,null))}for(;L<M.length;L+=1)M[L].d(1);M.length=O.length}},d(F){F&&_e(t),I&&I.d(),D&&D.d(),Nn(M,F)}}}function VA(e){let t,n,i=e[13]+"",r;return{c(){t=P("div"),n=P("b"),r=Le(i),w(t,"class","col")},m(a,s){ce(a,t,s),m(t,n),m(n,r)},p(a,s){s&2&&i!==(i=a[13]+"")&&vt(r,i)},d(a){a&&_e(t)}}}function zA(e){let t,n,i=[(e[10].optimal_combination||[])[1]],r=[];for(let a=0;a<1;a+=1)r[a]=VA(IA(e,i,a));return{c(){t=P("td");for(let a=0;a<1;a+=1)r[a].c();n=K()},m(a,s){ce(a,t,s);for(let o=0;o<1;o+=1)r[o]&&r[o].m(t,null);m(t,n)},p(a,s){if(s&2){i=[(a[10].optimal_combination||[])[1]];let o;for(o=0;o<1;o+=1){const l=IA(a,i,o);r[o]?r[o].p(l,s):(r[o]=VA(l),r[o].c(),r[o].m(t,n))}for(;o<1;o+=1)r[o].d(1)}},d(a){a&&_e(t),Nn(r,a)}}}function sye(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe=ho(e[2])+"",ee,G,me=e[1],Te=[];for(let Tt=0;Tt<me.length;Tt+=1)Te[Tt]=$A(RA(e,me,Tt));let De=e[1],we=[];for(let Tt=0;Tt<De.length;Tt+=1)we[Tt]=FA(MA(e,De,Tt));let Ve=e[1],Ke=[];for(let Tt=0;Tt<Ve.length;Tt+=1)Ke[Tt]=LA(OA(e,Ve,Tt));let yt=Object.entries(e[0]),ht=[];for(let Tt=0;Tt<yt.length;Tt+=1)ht[Tt]=WA(AA(e,yt,Tt));let Je=e[1],pt=[];for(let Tt=0;Tt<Je.length;Tt+=1)pt[Tt]=zA(EA(e,Je,Tt));return{c(){t=P("div"),n=P("div"),i=P("div"),i.textContent="Business Entity Options",r=K(),a=P("br"),s=K(),o=P("div"),l=P("span"),d=K(),c=P("span"),v=K(),T=P("span"),A=K(),E=P("table"),y=P("thead"),I=P("tr"),D=P("th"),O=K();for(let Tt=0;Tt<Te.length;Tt+=1)Te[Tt].c();M=K(),F=P("tbody"),$=P("tr"),L=P("td"),L.innerHTML="<b>Distributions to Owners (Applicable to C-corps only)</b>",j=K();for(let Tt=0;Tt<we.length;Tt+=1)we[Tt].c();H=K(),V=P("tr"),Q=P("td"),Q.innerHTML="<b>Taxable Income</b>",X=K();for(let Tt=0;Tt<Ke.length;Tt+=1)Ke[Tt].c();te=K();for(let Tt=0;Tt<ht.length;Tt+=1)ht[Tt].c();ne=K(),be=P("tr"),ue=P("td"),ue.innerHTML="<b>Optimal Combination</b>",Ce=K();for(let Tt=0;Tt<pt.length;Tt+=1)pt[Tt].c();ie=K(),Y=P("tr"),he=P("td"),he.textContent="Total Tax",Me=K(),Pe=P("td"),We=P("b"),ee=Le(qe),w(i,"class","text-center summary"),w(l,"class","company-type__spinner-bounce1 svelte-1p3b8nr"),w(c,"class","company-type__spinner-bounce2 svelte-1p3b8nr"),w(T,"class","company-type__spinner-bounce3 svelte-1p3b8nr"),w(o,"class","company-type__spinner svelte-1p3b8nr"),o.hidden=b=!e[4],w(Pe,"colspan",G=e[1].length),w(E,"class","table table-sm company-type svelte-1p3b8nr"),wt(E,"company-type__blur",e[4]),w(n,"class","col-lg-12 company-type__overflow-x svelte-1p3b8nr"),w(t,"class","row")},m(Tt,it){ce(Tt,t,it),m(t,n),m(n,i),m(n,r),m(n,a),m(n,s),m(n,o),m(o,l),m(o,d),m(o,c),m(o,v),m(o,T),m(n,A),m(n,E),m(E,y),m(y,I),m(I,D),m(I,O);for(let Ge=0;Ge<Te.length;Ge+=1)Te[Ge]&&Te[Ge].m(I,null);m(E,M),m(E,F),m(F,$),m($,L),m($,j);for(let Ge=0;Ge<we.length;Ge+=1)we[Ge]&&we[Ge].m($,null);m(F,H),m(F,V),m(V,Q),m(V,X);for(let Ge=0;Ge<Ke.length;Ge+=1)Ke[Ge]&&Ke[Ge].m(V,null);m(F,te);for(let Ge=0;Ge<ht.length;Ge+=1)ht[Ge]&&ht[Ge].m(F,null);m(F,ne),m(F,be),m(be,ue),m(be,Ce);for(let Ge=0;Ge<pt.length;Ge+=1)pt[Ge]&&pt[Ge].m(be,null);m(F,ie),m(F,Y),m(Y,he),m(Y,Me),m(Y,Pe),m(Pe,We),m(We,ee)},p(Tt,[it]){if(it&16&&b!==(b=!Tt[4])&&(o.hidden=b),it&2){me=Tt[1];let Ge;for(Ge=0;Ge<me.length;Ge+=1){const st=RA(Tt,me,Ge);Te[Ge]?Te[Ge].p(st,it):(Te[Ge]=$A(st),Te[Ge].c(),Te[Ge].m(I,null))}for(;Ge<Te.length;Ge+=1)Te[Ge].d(1);Te.length=me.length}if(it&122){De=Tt[1];let Ge;for(Ge=0;Ge<De.length;Ge+=1){const st=MA(Tt,De,Ge);we[Ge]?we[Ge].p(st,it):(we[Ge]=FA(st),we[Ge].c(),we[Ge].m($,null))}for(;Ge<we.length;Ge+=1)we[Ge].d(1);we.length=De.length}if(it&2){Ve=Tt[1];let Ge;for(Ge=0;Ge<Ve.length;Ge+=1){const st=OA(Tt,Ve,Ge);Ke[Ge]?Ke[Ge].p(st,it):(Ke[Ge]=LA(st),Ke[Ge].c(),Ke[Ge].m(V,null))}for(;Ge<Ke.length;Ge+=1)Ke[Ge].d(1);Ke.length=Ve.length}if(it&3){yt=Object.entries(Tt[0]);let Ge;for(Ge=0;Ge<yt.length;Ge+=1){const st=AA(Tt,yt,Ge);ht[Ge]?ht[Ge].p(st,it):(ht[Ge]=WA(st),ht[Ge].c(),ht[Ge].m(F,ne))}for(;Ge<ht.length;Ge+=1)ht[Ge].d(1);ht.length=yt.length}if(it&2){Je=Tt[1];let Ge;for(Ge=0;Ge<Je.length;Ge+=1){const st=EA(Tt,Je,Ge);pt[Ge]?pt[Ge].p(st,it):(pt[Ge]=zA(st),pt[Ge].c(),pt[Ge].m(be,null))}for(;Ge<pt.length;Ge+=1)pt[Ge].d(1);pt.length=Je.length}it&4&&qe!==(qe=ho(Tt[2])+"")&&vt(ee,qe),it&34&&G!==(G=Tt[1].length)&&w(Pe,"colspan",G),it&16&&wt(E,"company-type__blur",Tt[4])},i:ot,o:ot,d(Tt){Tt&&_e(t),Nn(Te,Tt),Nn(we,Tt),Nn(Ke,Tt),Nn(ht,Tt),Nn(pt,Tt)}}}function ho(e){const t=Math.round(e);return(t<0?`(${ho(-t)})`:(t??"-").toLocaleString("en-US",{style:"currency",currency:"USD"})).replace(".00","")}function oye(e,t,n){let{companyTypeEndpoint:i}=t,{matrix:r}=t,{vector:a}=t,{summary:s}=t,{ownerships:o}=t,l=!0,d=Object.fromEntries(Array.from(Array(101).keys()).map(b=>[b,{text:`${b}%`,value:b}]));const c=new Fo(i),v=Ys.debounce(async()=>{n(4,l=!0);try{const b=await c.baseQuery(c.baseEndpoint,{method:"POST",headers:c.headers,body:JSON.stringify({company_type:{ownerships:o}})});n(0,r=b.matrix),n(1,a=b.vector),n(2,s=b.summary)}catch(b){Gr.error(b.message)}finally{n(4,l=!1)}},1e3);oa(v);function T(b){o[b.company_id]=Cd(this),n(3,o),n(5,d)}return e.$$set=b=>{"companyTypeEndpoint"in b&&n(7,i=b.companyTypeEndpoint),"matrix"in b&&n(0,r=b.matrix),"vector"in b&&n(1,a=b.vector),"summary"in b&&n(2,s=b.summary),"ownerships"in b&&n(3,o=b.ownerships)},[r,a,s,o,l,d,v,i,T]}class lye extends Qt{constructor(t){super(),Jt(this,t,oye,sye,Kt,{companyTypeEndpoint:7,matrix:0,vector:1,summary:2,ownerships:3})}}function YA(e,t,n){const i=e.slice();return i[16]=t[n],i}function GA(e,t,n){const i=e.slice();return i[19]=t[n],i}function KA(e,t,n){const i=e.slice();return i[19]=t[n],i}function XA(e,t,n){const i=e.slice();return i[24]=t[n],i[26]=n,i}function QA(e,t,n){const i=e.slice();return i[27]=t[n],i}function JA(e,t,n){const i=e.slice();return i[30]=t[n],i}function ZA(e){let t,n=e[30]+"",i;return{c(){t=P("th"),i=Le(n),w(t,"class","table-header svelte-hmxc2j")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&1&&n!==(n=r[30]+"")&&vt(i,n)},d(r){r&&_e(t)}}}function eD(e){let t,n=e[27]+"",i;return{c(){t=P("td"),i=Le(n),w(t,"class","svelte-hmxc2j")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&8&&n!==(n=r[27]+"")&&vt(i,n)},d(r){r&&_e(t)}}}function tD(e){let t,n,i=e[24]+"",r,a,s,o=e[3][e[26]],l=[];for(let d=0;d<o.length;d+=1)l[d]=eD(QA(e,o,d));return{c(){t=P("tr"),n=P("td"),r=Le(i),a=K();for(let d=0;d<l.length;d+=1)l[d].c();s=K(),w(n,"class","header svelte-hmxc2j"),w(t,"class","svelte-hmxc2j")},m(d,c){ce(d,t,c),m(t,n),m(n,r),m(t,a);for(let v=0;v<l.length;v+=1)l[v]&&l[v].m(t,null);m(t,s)},p(d,c){if(c[0]&16&&i!==(i=d[24]+"")&&vt(r,i),c[0]&8){o=d[3][d[26]];let v;for(v=0;v<o.length;v+=1){const T=QA(d,o,v);l[v]?l[v].p(T,c):(l[v]=eD(T),l[v].c(),l[v].m(t,s))}for(;v<l.length;v+=1)l[v].d(1);l.length=o.length}},d(d){d&&_e(t),Nn(l,d)}}}function nD(e){let t,n,i=e[5](e[19])+"",r;return{c(){t=P("p"),n=P("b"),r=Le(i)},m(a,s){ce(a,t,s),m(t,n),m(n,r)},p(a,s){s[0]&2&&i!==(i=a[5](a[19])+"")&&vt(r,i)},d(a){a&&_e(t)}}}function uye(e){let t;return{c(){t=P("p"),t.innerHTML="N/A<sup>*</sup>"},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function dye(e){let t,n=e[5](e[19])+"",i;return{c(){t=P("p"),i=Le(n),w(t,"class","negative svelte-hmxc2j"),wt(t,"positive",e[19]>=0)},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a[0]&2&&n!==(n=r[5](r[19])+"")&&vt(i,n),a[0]&2&&wt(t,"positive",r[19]>=0)},d(r){r&&_e(t)}}}function iD(e){let t,n;function i(s,o){return o[0]&2&&(t=null),t==null&&(t=!Gn.isNil(s[19])),t?dye:uye}let r=i(e,[-1,-1]),a=r(e);return{c(){a.c(),n=On()},m(s,o){a.m(s,o),ce(s,n,o)},p(s,o){r===(r=i(s,o))&&a?a.p(s,o):(a.d(1),a=r(s),a&&(a.c(),a.m(n.parentNode,n)))},d(s){a.d(s),s&&_e(n)}}}function rD(e){let t,n,i=Object.values(e[16]),r=[];for(let a=0;a<i.length;a+=1)r[a]=iD(GA(e,i,a));return{c(){t=P("td");for(let a=0;a<r.length;a+=1)r[a].c();n=K(),w(t,"class","no-line svelte-hmxc2j")},m(a,s){ce(a,t,s);for(let o=0;o<r.length;o+=1)r[o]&&r[o].m(t,null);m(t,n)},p(a,s){if(s[0]&34){i=Object.values(a[16]);let o;for(o=0;o<i.length;o+=1){const l=GA(a,i,o);r[o]?r[o].p(l,s):(r[o]=iD(l),r[o].c(),r[o].m(t,n))}for(;o<r.length;o+=1)r[o].d(1);r.length=i.length}},d(a){a&&_e(t),Nn(r,a)}}}function fye(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X=e[0],te=[];for(let he=0;he<X.length;he+=1)te[he]=ZA(JA(e,X,he));let ne=e[4],be=[];for(let he=0;he<ne.length;he+=1)be[he]=tD(XA(e,ne,he));let ue=Object.keys(e[1]),Ce=[];for(let he=0;he<ue.length;he+=1)Ce[he]=nD(KA(e,ue,he));let ie=Object.values(e[1]),Y=[];for(let he=0;he<ie.length;he+=1)Y[he]=rD(YA(e,ie,he));return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("span"),a=K(),s=P("span"),o=K(),l=P("span"),c=K(),v=P("div"),T=P("table"),b=P("thead"),A=P("tr"),E=P("th"),y=K();for(let he=0;he<te.length;he+=1)te[he].c();I=K(),D=P("tbody");for(let he=0;he<be.length;he+=1)be[he].c();O=K(),M=P("tfoot"),F=P("tr"),F.innerHTML=`<td class="svelte-hmxc2j"><b>Tax Savings</b> 
              <small>(Contributions)</small></td> 
            <td colspan="3" class="svelte-hmxc2j"> </td>`,$=K(),L=P("tr"),j=P("td");for(let he=0;he<Ce.length;he+=1)Ce[he].c();H=K();for(let he=0;he<Y.length;he+=1)Y[he].c();V=K(),Q=P("div"),Q.innerHTML="<p><sup>*</sup> N/A means the contribution amount is too high for your situation</p>",w(r,"class","company-type__spinner-bounce1 svelte-hmxc2j"),w(s,"class","company-type__spinner-bounce2 svelte-hmxc2j"),w(l,"class","company-type__spinner-bounce3 svelte-hmxc2j"),w(i,"class","company-type__spinner svelte-hmxc2j"),i.hidden=d=!e[2],w(E,"class","svelte-hmxc2j"),w(A,"class","svelte-hmxc2j"),w(b,"class","svelte-hmxc2j"),w(D,"class","svelte-hmxc2j"),w(F,"class","svelte-hmxc2j"),w(j,"class","no-line svelte-hmxc2j"),w(L,"class","svelte-hmxc2j"),w(M,"class","table-footer svelte-hmxc2j"),w(T,"class","table table-striped flash-table svelte-hmxc2j"),w(Q,"class","summary"),w(v,"class","svelte-hmxc2j"),wt(v,"company-type__blur",e[2]),w(n,"class","col-lg-12 overflow-x__auto"),w(t,"class","col-sm-12 container widget-div svelte-hmxc2j")},m(he,Me){ce(he,t,Me),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(i,o),m(i,l),m(n,c),m(n,v),m(v,T),m(T,b),m(b,A),m(A,E),m(A,y);for(let Pe=0;Pe<te.length;Pe+=1)te[Pe]&&te[Pe].m(A,null);m(T,I),m(T,D);for(let Pe=0;Pe<be.length;Pe+=1)be[Pe]&&be[Pe].m(D,null);m(T,O),m(T,M),m(M,F),m(M,$),m(M,L),m(L,j);for(let Pe=0;Pe<Ce.length;Pe+=1)Ce[Pe]&&Ce[Pe].m(j,null);m(L,H);for(let Pe=0;Pe<Y.length;Pe+=1)Y[Pe]&&Y[Pe].m(L,null);m(v,V),m(v,Q)},p(he,Me){if(Me[0]&4&&d!==(d=!he[2])&&(i.hidden=d),Me[0]&1){X=he[0];let Pe;for(Pe=0;Pe<X.length;Pe+=1){const We=JA(he,X,Pe);te[Pe]?te[Pe].p(We,Me):(te[Pe]=ZA(We),te[Pe].c(),te[Pe].m(A,null))}for(;Pe<te.length;Pe+=1)te[Pe].d(1);te.length=X.length}if(Me[0]&24){ne=he[4];let Pe;for(Pe=0;Pe<ne.length;Pe+=1){const We=XA(he,ne,Pe);be[Pe]?be[Pe].p(We,Me):(be[Pe]=tD(We),be[Pe].c(),be[Pe].m(D,null))}for(;Pe<be.length;Pe+=1)be[Pe].d(1);be.length=ne.length}if(Me[0]&34){ue=Object.keys(he[1]);let Pe;for(Pe=0;Pe<ue.length;Pe+=1){const We=KA(he,ue,Pe);Ce[Pe]?Ce[Pe].p(We,Me):(Ce[Pe]=nD(We),Ce[Pe].c(),Ce[Pe].m(j,null))}for(;Pe<Ce.length;Pe+=1)Ce[Pe].d(1);Ce.length=ue.length}if(Me[0]&34){ie=Object.values(he[1]);let Pe;for(Pe=0;Pe<ie.length;Pe+=1){const We=YA(he,ie,Pe);Y[Pe]?Y[Pe].p(We,Me):(Y[Pe]=rD(We),Y[Pe].c(),Y[Pe].m(L,null))}for(;Pe<Y.length;Pe+=1)Y[Pe].d(1);Y.length=ie.length}Me[0]&4&&wt(v,"company-type__blur",he[2])},i:ot,o:ot,d(he){he&&_e(t),Nn(te,he),Nn(be,he),Nn(Ce,he),Nn(Y,he)}}}function aD(e,t,n){const i=e;return i[e.length-1]=[e[e.length-1],n].join(" "),i[e.length-2]=[e[e.length-2],t].join(" "),i}function cye(e,t,n){let{healthSavingsEndpoint:i}=t,{previousTaxYear:r}=t,{currentTaxYear:a}=t,{colHeaders:s}=t,{rowHeaders:o}=t,{staticBody:l}=t,{contributionLimits:d}=t,{taxSavings:c}=t,v=!0,T=D(d),b=l.concat(T),A=aD(o,r,a);const E=new Fo(i),y=Gn.debounce(async()=>{n(2,v=!0);try{const O=await E.baseQuery(E.baseEndpoint,{method:"POST",headers:E.headers,body:JSON.stringify({healthSavings:{}})});n(6,r=O.previousTaxYear),n(7,a=O.currentTaxYear),n(0,s=O.colHeaders),n(8,o=O.rowHeaders),n(9,l=O.staticBody),n(10,d=O.contributionLimits),n(1,c=O.taxSavings),T=D(d),n(3,b=l.concat(T)),n(4,A=aD(o,r,a))}catch(O){Gr.error(O.message)}finally{n(2,v=!1)}},1e3);function I(O){return Er.formatMoney(O,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}function D(O){return O.map(M=>M.map(F=>Gn.isNil(F)?"None":I(F)))}return oa(y),e.$$set=O=>{"healthSavingsEndpoint"in O&&n(11,i=O.healthSavingsEndpoint),"previousTaxYear"in O&&n(6,r=O.previousTaxYear),"currentTaxYear"in O&&n(7,a=O.currentTaxYear),"colHeaders"in O&&n(0,s=O.colHeaders),"rowHeaders"in O&&n(8,o=O.rowHeaders),"staticBody"in O&&n(9,l=O.staticBody),"contributionLimits"in O&&n(10,d=O.contributionLimits),"taxSavings"in O&&n(1,c=O.taxSavings)},[s,c,v,b,A,I,r,a,o,l,d,i]}class _ye extends Qt{constructor(t){super(),Jt(this,t,cye,fye,Kt,{healthSavingsEndpoint:11,previousTaxYear:6,currentTaxYear:7,colHeaders:0,rowHeaders:8,staticBody:9,contributionLimits:10,taxSavings:1},null,[-1,-1])}}function sD(e,t,n){const i=e.slice();return i[34]=t[n],i}function oD(e,t,n){const i=e.slice();return i[37]=t[n],i[34]=n,i}function lD(e){let t,n,i;return{c(){t=P("div"),n=P("a"),i=P("input"),w(i,"type","button"),w(i,"class","float-right btn btn-primary btn-trans"),i.value="Print",w(n,"href",e[1]),w(n,"target","_blank"),w(t,"class","float-right p-b-sm svelte-131d5p6")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a[0]&2&&w(n,"href",r[1])},d(r){r&&_e(t)}}}function uD(e){let t,n,i=e[34]+1+"",r,a,s,o,l=Gn.capitalize(e[37])+"",d,c,v,T;function b(...A){return e[6](e[37],...A)}return{c(){t=P("div"),n=P("a"),r=Le(i),a=K(),s=P("p"),o=P("small"),d=Le(l),c=K(),w(n,"href",`#step-${e[34]+1}`),w(n,"type","button"),w(n,"class","btn btn-circle svelte-131d5p6"),wt(n,"btn-primary",e[0].currentMonth==e[37]),wt(n,"btn-secondary",e[0].currentMonth!=e[37]),w(s,"class","svelte-131d5p6"),w(t,"class","stepwizard-step col-sm-1 svelte-131d5p6")},m(A,E){ce(A,t,E),m(t,n),m(n,r),m(t,a),m(t,s),m(s,o),m(o,d),m(t,c),v||(T=ct(n,"click",b),v=!0)},p(A,E){e=A,E[0]&9&&wt(n,"btn-primary",e[0].currentMonth==e[37]),E[0]&9&&wt(n,"btn-secondary",e[0].currentMonth!=e[37])},d(A){A&&_e(t),v=!1,T()}}}function dD(e){let t,n=e[34]+"",i;return{c(){t=P("option"),i=Le(n),t.__value=e[34],t.value=t.__value},m(r,a){ce(r,t,a),m(t,i)},p:ot,d(r){r&&_e(t)}}}function pye(e){let t,n,i,r,a,s,o,l=Gn.capitalize(e[0].currentMonth)+"",d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te=e[0].homeOfficeVariables.homeOfficeSqft+"",ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me=e[0].homeOfficeVariables.totalHomeSqft+"",Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt=parseFloat(e[0].homeOfficeVariables.businessUsePercentage.toFixed(2))+"",it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt,on=e[0].fullYearHomeExpenses.rent+"",In,dt,Zt,Ln,xn,Dn,Un,qn,ft,ni,Et,un,Ai,St=e[0].fullYearHomeExpenses.mortgageInterest+"",sn,ci,pi,Pi,$i,ji,ri,tr,Ei,Ti,kn,Rn,ki,mr=e[0].fullYearHomeExpenses.propertyTaxes+"",_r,Mi,di,Yi,na,Ki,Rr,Di,Wi,Bi,_a,xi,Kr,kr=e[0].fullYearHomeExpenses.homeInsurance+"",Ji,ia,la,Ir,Ur,qr,Ht,et,ln,Vi,Ar,vr,ir,Si=e[0].fullYearHomeExpenses.utilitiesAnnual+"",pr,yi,Dr,Wr,Sr,hr,Vn,dn,wr,Bn,ra,_n,Vr,rr=e[0].fullYearHomeExpenses.condoDues+"",Or,Ui,Fr,wi,Ni,ar,sr,Gi,Cr,or,lr,Ka,Lr,nr=e[0].fullYearHomeExpenses.other+"",wa,zr,Ze,tn,Xr,ur,Hr,Xi,dr=po(e[0].fullYearHomeExpenses.totalFullYearHomeExpenses)+"",pa,qt,mn,ai,Ra,aa,ga,Ta=po(e[0].fullYearHomeExpenses.deductiblePortionOfFullYearHomeExpenses)+"",va,$r,ua,an,gi,jr,Ia,Xa,Ha,$a,Ii,br,Aa,Vt,_i,xe,Ue,pe=e[0][e[0].currentMonth].variableHomeExpenses.repairs+"",Ae,at,gt,nt,jt,Yt,Mn,Yn,Wn,ei,Fi,Tr,Yr,yr=e[0][e[0].currentMonth].variableHomeExpenses.clearning+"",ka,fr,Nr,Na,Wa,da,Sa,Br,Ks,Qr,Oi,Fs,Qa,as=e[0][e[0].currentMonth].variableHomeExpenses.lawncare+"",bo,yo,Ts,Ls,wo,Is,Hs,pl,zo,cs,ss,Xs,Qs,Yo=e[0][e[0].currentMonth].variableHomeExpenses.utilitiesMonthly+"",gu,Vu,Ll,Hl,zu,vf,hl,To,_s=po(e[0][e[0].currentMonth].variableHomeExpenses.totalVariableHomeExpenses)+"",vu,bf,ml,Go,yf,ko,So,gl=po(e[0][e[0].currentMonth].variableHomeExpenses.deductiblePortionOfVariableHomeExpenses)+"",fa,Ko,Co,vl,wf,ks,bl,Yu,Gu,Ja,jl,Ku,Bl,As,Tf,Xo,Xu,so=e[0][e[0].currentMonth].officeExpenses.internet+"",$d,yl,Ul,bu,Nd,ql,le,vn,ui,js,Fd,Wl,kf,Qu=e[0][e[0].currentMonth].officeExpenses.cellPhone+"",Sf,Po,Vl,Ju,Zu,ps,wl,Cf,cc,Ss,yu,wu,Tl,ed=e[0][e[0].currentMonth].officeExpenses.landLine+"",Lo,_c,Tu,ku,Pf,zl,td,Ld,Ef,Js,Hd,nd,If,jd=e[0][e[0].currentMonth].officeExpenses.officeSupplies+"",Af,pc,id,Df,m_,Su,Qo,rd,g_,oo,hc,lo,Ho,Yl=e[0][e[0].currentMonth].officeExpenses.printing+"",Of,Cu,Jo,uo,Gl,Kl,Xl,fo,Mf,Zs,xf,Pu,Rf,g=e[0][e[0].currentMonth].officeExpenses.otherCosts+"",C,x,N,B,J,oe,ye,fe,Ie,Fe,je,ut,Pt,Ot,Lt=e[0][e[0].currentMonth].officeExpenses.businessUseAllocation+"",Gt,Cn,ii,si,Li,Qi,Jr,Mr,Zr,ba=po(e[0][e[0].currentMonth].officeExpenses.totalOfficeExpenses)+"",hs,ms,Da,gs,Ql,kl,Sl,$f=po(e[0][e[0].currentMonth].officeExpenses.deductiblePortionOfOfficeExpenses)+"",qp,Bm,Jl,Qn,mc,Cl,ad,Nf,gc,Ff,Ya,sd,v_,Zo,Um,Lf,vc,Eu=e[0][e[0].currentMonth].otherOutOfPocketExpenses.travelCosts+"",od,bc,Iu,yc,wc,Hf,Bd,jo,qm,el,Wp,Tc,Vp,Wt=e[0][e[0].currentMonth].otherOutOfPocketExpenses.parkingTolls+"",jf,b_,Au,kc,Wm,ld,Bf,y_,Vm,tl,w_,Sc,nl,T_=e[0][e[0].currentMonth].otherOutOfPocketExpenses.businessMeals+"",zp,Ud,ud,k_,dd,Uf,qd,Cc,Pl,il,Yp,Pc,qf,Wd=e[0][e[0].currentMonth].otherOutOfPocketExpenses.otherExpenses+"",Ec,Gp,S_,Wf,C_,Kp,P_,Vf,Ic=po(e[0][e[0].currentMonth].otherOutOfPocketExpenses.deductiblePortionOfOtherOutOfPocketExpenses)+"",Xp,qi,Cs,zf,Yf,E_,Qp,I_,Oa,Ac=po(e[0][e[0].currentMonth].totalReimbursement)+"",Dc,Jp,zm,Eo=e[1]&&lD(e),Gf=e[3],qs=[];for(let rn=0;rn<Gf.length;rn+=1)qs[rn]=uD(oD(e,Gf,rn));let Kf=[...Array(101).keys()].reverse(),eo=[];for(let rn=0;rn<Kf.length;rn+=1)eo[rn]=dD(sD(e,Kf,rn));return{c(){t=P("div"),n=P("div"),Eo&&Eo.c(),i=K(),r=P("div"),a=P("div"),s=P("span"),o=P("b"),d=Le(l),c=K(),v=P("div"),T=P("div");for(let rn=0;rn<qs.length;rn+=1)qs[rn].c();b=K(),A=P("table"),E=P("thead"),E.innerHTML=`<tr class="svelte-131d5p6"><th class="svelte-131d5p6">Home Office Variables</th> 
            <th class="svelte-131d5p6"></th></tr>`,y=K(),I=P("tbody"),D=P("tr"),O=P("td"),O.textContent="Square Footage of Home Office",M=K(),F=P("td"),$=P("span"),L=P("div"),L.innerHTML='<span class="input-group-text">SQFT</span>',j=K(),H=P("input"),Q=K(),X=P("span"),ne=Le(te),be=Le(" SQFT"),ue=K(),Ce=P("tr"),ie=P("td"),ie.textContent="Total Home Square Footage",Y=K(),he=P("td"),Me=P("span"),Pe=P("div"),Pe.innerHTML='<span class="input-group-text">SQFT</span>',We=K(),qe=P("input"),ee=K(),G=P("span"),Te=Le(me),De=Le(" SQFT"),we=K(),Ve=P("tfoot"),Ke=P("tr"),yt=P("td"),yt.textContent="Business Use Percentage",ht=K(),Je=P("td"),pt=P("div"),it=Le(Tt),Ge=Le("%"),st=K(),It=P("table"),Ct=P("thead"),Ct.innerHTML=`<tr class="svelte-131d5p6"><th class="svelte-131d5p6">Full Year Home Expenses (Annual)</th> 
            <th class="svelte-131d5p6"></th></tr>`,bt=K(),Rt=P("tbody"),cn=P("tr"),nn=P("td"),nn.textContent="Rent",Qe=K(),Ft=P("td"),Fn=P("span"),He=P("div"),He.innerHTML='<span class="input-group-text">$</span>',Dt=K(),Xt=P("input"),Mt=K(),Xe=P("span"),Nt=Le("$"),In=Le(on),dt=K(),Zt=P("tr"),Ln=P("td"),Ln.textContent="Mortgage Interest",xn=K(),Dn=P("td"),Un=P("span"),qn=P("div"),qn.innerHTML='<span class="input-group-text">$</span>',ft=K(),ni=P("input"),Et=K(),un=P("span"),Ai=Le("$"),sn=Le(St),ci=K(),pi=P("tr"),Pi=P("td"),Pi.textContent="Property Taxes",$i=K(),ji=P("td"),ri=P("span"),tr=P("div"),tr.innerHTML='<span class="input-group-text">$</span>',Ei=K(),Ti=P("input"),kn=K(),Rn=P("span"),ki=Le("$"),_r=Le(mr),Mi=K(),di=P("tr"),Yi=P("td"),Yi.textContent="Home Insurance",na=K(),Ki=P("td"),Rr=P("span"),Di=P("div"),Di.innerHTML='<span class="input-group-text">$</span>',Wi=K(),Bi=P("input"),_a=K(),xi=P("span"),Kr=Le("$"),Ji=Le(kr),ia=K(),la=P("tr"),Ir=P("td"),Ir.textContent="Utilities (annual)",Ur=K(),qr=P("td"),Ht=P("span"),et=P("div"),et.innerHTML='<span class="input-group-text">$</span>',ln=K(),Vi=P("input"),Ar=K(),vr=P("span"),ir=Le("$"),pr=Le(Si),yi=K(),Dr=P("tr"),Wr=P("td"),Wr.textContent="HOA/Condo Dues",Sr=K(),hr=P("td"),Vn=P("span"),dn=P("div"),dn.innerHTML='<span class="input-group-text">$</span>',wr=K(),Bn=P("input"),ra=K(),_n=P("span"),Vr=Le("$"),Or=Le(rr),Ui=K(),Fr=P("tr"),wi=P("td"),wi.textContent="Other",Ni=K(),ar=P("td"),sr=P("span"),Gi=P("div"),Gi.innerHTML='<span class="input-group-text">$</span>',Cr=K(),or=P("input"),lr=K(),Ka=P("span"),Lr=Le("$"),wa=Le(nr),zr=K(),Ze=P("tfoot"),tn=P("tr"),Xr=P("td"),Xr.textContent="Total Full Year Home Expenses",ur=K(),Hr=P("td"),Xi=P("div"),pa=Le(dr),qt=K(),mn=P("tr"),ai=P("td"),ai.textContent="Deductible Portion of Full Year Home Expenses",Ra=K(),aa=P("td"),ga=P("div"),va=Le(Ta),$r=K(),ua=P("table"),an=P("thead"),an.innerHTML=`<tr class="svelte-131d5p6"><th class="svelte-131d5p6">Variable Home Expenses (Monthly)</th> 
            <th class="svelte-131d5p6"></th></tr>`,gi=K(),jr=P("tbody"),Ia=P("tr"),Xa=P("td"),Xa.textContent="Repairs",Ha=K(),$a=P("td"),Ii=P("span"),br=P("div"),br.innerHTML='<span class="input-group-text">$</span>',Aa=K(),Vt=P("input"),_i=K(),xe=P("span"),Ue=Le("$"),Ae=Le(pe),at=K(),gt=P("tr"),nt=P("td"),nt.textContent="Cleaning",jt=K(),Yt=P("td"),Mn=P("span"),Yn=P("div"),Yn.innerHTML='<span class="input-group-text">$</span>',Wn=K(),ei=P("input"),Fi=K(),Tr=P("span"),Yr=Le("$"),ka=Le(yr),fr=K(),Nr=P("tr"),Na=P("td"),Na.textContent="Lawncare",Wa=K(),da=P("td"),Sa=P("span"),Br=P("div"),Br.innerHTML='<span class="input-group-text">$</span>',Ks=K(),Qr=P("input"),Oi=K(),Fs=P("span"),Qa=Le("$"),bo=Le(as),yo=K(),Ts=P("tr"),Ls=P("td"),Ls.textContent="Utilities (monthly)",wo=K(),Is=P("td"),Hs=P("span"),pl=P("div"),pl.innerHTML='<span class="input-group-text">$</span>',zo=K(),cs=P("input"),ss=K(),Xs=P("span"),Qs=Le("$"),gu=Le(Yo),Vu=K(),Ll=P("tfoot"),Hl=P("tr"),zu=P("td"),zu.textContent="Total Variable Home Expenses",vf=K(),hl=P("td"),To=P("div"),vu=Le(_s),bf=K(),ml=P("tr"),Go=P("td"),Go.textContent="Deductible Portion of Variable Home Expenses",yf=K(),ko=P("td"),So=P("div"),fa=Le(gl),Ko=K(),Co=P("table"),vl=P("thead"),vl.innerHTML=`<tr class="svelte-131d5p6"><th class="svelte-131d5p6">Office Expenses (Monthly)</th> 
            <th class="svelte-131d5p6"></th></tr>`,wf=K(),ks=P("tbody"),bl=P("tr"),Yu=P("td"),Yu.textContent="Internet",Gu=K(),Ja=P("td"),jl=P("span"),Ku=P("div"),Ku.innerHTML='<span class="input-group-text">$</span>',Bl=K(),As=P("input"),Tf=K(),Xo=P("span"),Xu=Le("$"),$d=Le(so),yl=K(),Ul=P("tr"),bu=P("td"),bu.textContent="Cell Phone",Nd=K(),ql=P("td"),le=P("span"),vn=P("div"),vn.innerHTML='<span class="input-group-text">$</span>',ui=K(),js=P("input"),Fd=K(),Wl=P("span"),kf=Le("$"),Sf=Le(Qu),Po=K(),Vl=P("tr"),Ju=P("td"),Ju.textContent="Land Line",Zu=K(),ps=P("td"),wl=P("span"),Cf=P("div"),Cf.innerHTML='<span class="input-group-text">$</span>',cc=K(),Ss=P("input"),yu=K(),wu=P("span"),Tl=Le("$"),Lo=Le(ed),_c=K(),Tu=P("tr"),ku=P("td"),ku.textContent="Office Supplies",Pf=K(),zl=P("td"),td=P("span"),Ld=P("div"),Ld.innerHTML='<span class="input-group-text">$</span>',Ef=K(),Js=P("input"),Hd=K(),nd=P("span"),If=Le("$"),Af=Le(jd),pc=K(),id=P("tr"),Df=P("td"),Df.textContent="Printing",m_=K(),Su=P("td"),Qo=P("span"),rd=P("div"),rd.innerHTML='<span class="input-group-text">$</span>',g_=K(),oo=P("input"),hc=K(),lo=P("span"),Ho=Le("$"),Of=Le(Yl),Cu=K(),Jo=P("tr"),uo=P("td"),uo.textContent="Other Costs",Gl=K(),Kl=P("td"),Xl=P("span"),fo=P("div"),fo.innerHTML='<span class="input-group-text">$</span>',Mf=K(),Zs=P("input"),xf=K(),Pu=P("span"),Rf=Le("$"),C=Le(g),x=K(),N=P("tr"),B=P("td"),B.textContent="Business Use Allocation",J=K(),oe=P("td"),ye=P("span"),fe=P("div"),fe.innerHTML='<span class="input-group-text">%</span>',Ie=K(),Fe=P("select"),je=P("option"),je.textContent="-- Percentage --";for(let rn=0;rn<eo.length;rn+=1)eo[rn].c();ut=K(),Pt=P("span"),Ot=P("b"),Gt=Le(Lt),Cn=Le("%"),ii=K(),si=P("tfoot"),Li=P("tr"),Qi=P("td"),Qi.textContent="Total Office Expenses",Jr=K(),Mr=P("td"),Zr=P("div"),hs=Le(ba),ms=K(),Da=P("tr"),gs=P("td"),gs.textContent="Deductible Portion of Office Expenses",Ql=K(),kl=P("td"),Sl=P("div"),qp=Le($f),Bm=K(),Jl=P("table"),Qn=P("thead"),Qn.innerHTML=`<tr class="svelte-131d5p6"><th class="svelte-131d5p6">Other Out of Pocket Expenses (not Paid by Business, Monthly)</th> 
            <th class="svelte-131d5p6"></th></tr>`,mc=K(),Cl=P("tbody"),ad=P("tr"),Nf=P("td"),Nf.textContent="Travel Costs",gc=K(),Ff=P("td"),Ya=P("span"),sd=P("div"),sd.innerHTML='<span class="input-group-text">$</span>',v_=K(),Zo=P("input"),Um=K(),Lf=P("span"),vc=Le("$"),od=Le(Eu),bc=K(),Iu=P("tr"),yc=P("td"),yc.textContent="Parking, Tolls",wc=K(),Hf=P("td"),Bd=P("span"),jo=P("div"),jo.innerHTML='<span class="input-group-text">$</span>',qm=K(),el=P("input"),Wp=K(),Tc=P("span"),Vp=Le("$"),jf=Le(Wt),b_=K(),Au=P("tr"),kc=P("td"),kc.textContent="Business Meals",Wm=K(),ld=P("td"),Bf=P("span"),y_=P("div"),y_.innerHTML='<span class="input-group-text">$</span>',Vm=K(),tl=P("input"),w_=K(),Sc=P("span"),nl=Le("$"),zp=Le(T_),Ud=K(),ud=P("tr"),k_=P("td"),k_.textContent="Other Expenses",dd=K(),Uf=P("td"),qd=P("span"),Cc=P("div"),Cc.innerHTML='<span class="input-group-text">$</span>',Pl=K(),il=P("input"),Yp=K(),Pc=P("span"),qf=Le("$"),Ec=Le(Wd),Gp=K(),S_=P("tfoot"),Wf=P("tr"),C_=P("td"),C_.textContent="Deductible Portion of Out of Pocket Expenses",Kp=K(),P_=P("td"),Vf=P("div"),Xp=Le(Ic),qi=K(),Cs=P("table"),zf=P("thead"),Yf=P("tr"),E_=P("th"),E_.textContent="Total Reimbursement",Qp=K(),I_=P("th"),Oa=P("div"),Dc=Le(Ac),w(s,"class","visible-print header-strong text-center svelte-131d5p6"),w(a,"class","row"),w(T,"class","stepwizard-row setup-panel svelte-131d5p6"),w(v,"class","stepwizard hidden-print svelte-131d5p6"),w(E,"class","header svelte-131d5p6"),w(O,"class","svelte-131d5p6"),w(L,"class","input-group-prepend"),w(H,"id","homeOfficeSqft"),w(H,"class","form-control"),w(H,"type","number"),w(H,"placeholder","0"),w(H,"min","0"),w(H,"max",V=e[0].homeOfficeVariables.totalHomeSqft||0),w($,"class","input-group hidden-print svelte-131d5p6"),w(X,"class","visible-print svelte-131d5p6"),w(F,"class","svelte-131d5p6"),w(D,"class","svelte-131d5p6"),w(ie,"class","svelte-131d5p6"),w(Pe,"class","input-group-prepend"),w(qe,"id","totalHomeSqft"),w(qe,"class","form-control"),w(qe,"type","number"),w(qe,"placeholder","0"),w(qe,"min","0"),w(Me,"class","input-group hidden-print svelte-131d5p6"),w(G,"class","visible-print svelte-131d5p6"),w(he,"class","svelte-131d5p6"),w(Ce,"class","svelte-131d5p6"),w(I,"class","svelte-131d5p6"),w(yt,"class","svelte-131d5p6"),w(pt,"class","text-right home-office-accountable svelte-131d5p6"),wt(pt,"home-office-accountable__blur",e[2]),w(Je,"class","svelte-131d5p6"),w(Ke,"class","svelte-131d5p6"),w(Ve,"class","svelte-131d5p6"),w(A,"class","table table-sm company-type svelte-131d5p6"),w(Ct,"class","header svelte-131d5p6"),w(nn,"class","svelte-131d5p6"),w(He,"class","input-group-prepend"),w(Xt,"id","rent"),w(Xt,"class","form-control"),w(Xt,"type","number"),w(Xt,"placeholder","0.0"),w(Xt,"min","0"),w(Fn,"class","input-group hidden-print svelte-131d5p6"),w(Xe,"class","visible-print svelte-131d5p6"),w(Ft,"class","svelte-131d5p6"),w(cn,"class","svelte-131d5p6"),w(Ln,"class","svelte-131d5p6"),w(qn,"class","input-group-prepend"),w(ni,"id","mortgageInterest"),w(ni,"class","form-control"),w(ni,"type","number"),w(ni,"placeholder","0.0"),w(ni,"min","0"),w(Un,"class","input-group hidden-print svelte-131d5p6"),w(un,"class","visible-print svelte-131d5p6"),w(Dn,"class","svelte-131d5p6"),w(Zt,"class","svelte-131d5p6"),w(Pi,"class","svelte-131d5p6"),w(tr,"class","input-group-prepend"),w(Ti,"id","propertyTaxes"),w(Ti,"class","form-control"),w(Ti,"type","number"),w(Ti,"placeholder","0.0"),w(Ti,"min","0"),w(ri,"class","input-group hidden-print svelte-131d5p6"),w(Rn,"class","visible-print svelte-131d5p6"),w(ji,"class","svelte-131d5p6"),w(pi,"class","svelte-131d5p6"),w(Yi,"class","svelte-131d5p6"),w(Di,"class","input-group-prepend"),w(Bi,"id","homeInsurance"),w(Bi,"class","form-control"),w(Bi,"type","number"),w(Bi,"placeholder","0.0"),w(Bi,"min","0"),w(Rr,"class","input-group hidden-print svelte-131d5p6"),w(xi,"class","visible-print svelte-131d5p6"),w(Ki,"class","svelte-131d5p6"),w(di,"class","svelte-131d5p6"),w(Ir,"class","svelte-131d5p6"),w(et,"class","input-group-prepend"),w(Vi,"id","utilitiesAnnual"),w(Vi,"class","form-control"),w(Vi,"type","number"),w(Vi,"placeholder","0.0"),w(Vi,"min","0"),w(Ht,"class","input-group hidden-print svelte-131d5p6"),w(vr,"class","visible-print svelte-131d5p6"),w(qr,"class","svelte-131d5p6"),w(la,"class","svelte-131d5p6"),w(Wr,"class","svelte-131d5p6"),w(dn,"class","input-group-prepend"),w(Bn,"id","condoDues"),w(Bn,"class","form-control"),w(Bn,"type","number"),w(Bn,"placeholder","0.0"),w(Bn,"min","0"),w(Vn,"class","input-group hidden-print svelte-131d5p6"),w(_n,"class","visible-print svelte-131d5p6"),w(hr,"class","svelte-131d5p6"),w(Dr,"class","svelte-131d5p6"),w(wi,"class","svelte-131d5p6"),w(Gi,"class","input-group-prepend"),w(or,"id","other"),w(or,"class","form-control"),w(or,"type","number"),w(or,"placeholder","0.0"),w(or,"min","0"),w(sr,"class","input-group hidden-print svelte-131d5p6"),w(Ka,"class","visible-print svelte-131d5p6"),w(ar,"class","svelte-131d5p6"),w(Fr,"class","svelte-131d5p6"),w(Rt,"class","svelte-131d5p6"),w(Xr,"class","svelte-131d5p6"),w(Xi,"class","text-right home-office-accountable svelte-131d5p6"),wt(Xi,"home-office-accountable__blur",e[2]),w(Hr,"class","svelte-131d5p6"),w(tn,"class","svelte-131d5p6"),w(ai,"class","svelte-131d5p6"),w(ga,"class","text-right home-office-accountable svelte-131d5p6"),wt(ga,"home-office-accountable__blur",e[2]),w(aa,"class","svelte-131d5p6"),w(mn,"class","svelte-131d5p6"),w(Ze,"class","svelte-131d5p6"),w(It,"class","table table-sm company-type svelte-131d5p6"),w(an,"class","header svelte-131d5p6"),w(Xa,"class","svelte-131d5p6"),w(br,"class","input-group-prepend"),w(Vt,"id","repairs"),w(Vt,"class","form-control"),w(Vt,"type","number"),w(Vt,"placeholder","0.0"),w(Vt,"min","0"),w(Ii,"class","input-group hidden-print svelte-131d5p6"),w(xe,"class","visible-print svelte-131d5p6"),w($a,"class","svelte-131d5p6"),w(Ia,"class","svelte-131d5p6"),w(nt,"class","svelte-131d5p6"),w(Yn,"class","input-group-prepend"),w(ei,"id","clearning"),w(ei,"class","form-control"),w(ei,"type","number"),w(ei,"placeholder","0.0"),w(ei,"min","0"),w(Mn,"class","input-group hidden-print svelte-131d5p6"),w(Tr,"class","visible-print svelte-131d5p6"),w(Yt,"class","svelte-131d5p6"),w(gt,"class","svelte-131d5p6"),w(Na,"class","svelte-131d5p6"),w(Br,"class","input-group-prepend"),w(Qr,"id","lawncare"),w(Qr,"class","form-control"),w(Qr,"type","number"),w(Qr,"placeholder","0.0"),w(Qr,"min","0"),w(Sa,"class","input-group hidden-print svelte-131d5p6"),w(Fs,"class","visible-print svelte-131d5p6"),w(da,"class","svelte-131d5p6"),w(Nr,"class","svelte-131d5p6"),w(Ls,"class","svelte-131d5p6"),w(pl,"class","input-group-prepend"),w(cs,"id","utilitiesMonthly"),w(cs,"class","form-control"),w(cs,"type","number"),w(cs,"placeholder","0.0"),w(cs,"min","0"),w(Hs,"class","input-group hidden-print svelte-131d5p6"),w(Xs,"class","visible-print svelte-131d5p6"),w(Is,"class","svelte-131d5p6"),w(Ts,"class","svelte-131d5p6"),w(jr,"class","svelte-131d5p6"),w(zu,"class","svelte-131d5p6"),w(To,"class","text-right home-office-accountable svelte-131d5p6"),wt(To,"home-office-accountable__blur",e[2]),w(hl,"class","svelte-131d5p6"),w(Hl,"class","svelte-131d5p6"),w(Go,"class","svelte-131d5p6"),w(So,"class","text-right home-office-accountable svelte-131d5p6"),wt(So,"home-office-accountable__blur",e[2]),w(ko,"class","svelte-131d5p6"),w(ml,"class","svelte-131d5p6"),w(Ll,"class","svelte-131d5p6"),w(ua,"class","table table-sm company-type svelte-131d5p6"),w(vl,"class","header svelte-131d5p6"),w(Yu,"class","svelte-131d5p6"),w(Ku,"class","input-group-prepend"),w(As,"id","internet"),w(As,"class","form-control"),w(As,"type","number"),w(As,"placeholder","0.0"),w(As,"min","0"),w(jl,"class","input-group hidden-print svelte-131d5p6"),w(Xo,"class","visible-print svelte-131d5p6"),w(Ja,"class","svelte-131d5p6"),w(bl,"class","svelte-131d5p6"),w(bu,"class","svelte-131d5p6"),w(vn,"class","input-group-prepend"),w(js,"id","cellPhone"),w(js,"class","form-control"),w(js,"type","number"),w(js,"placeholder","0.0"),w(js,"min","0"),w(le,"class","input-group hidden-print svelte-131d5p6"),w(Wl,"class","visible-print svelte-131d5p6"),w(ql,"class","svelte-131d5p6"),w(Ul,"class","svelte-131d5p6"),w(Ju,"class","svelte-131d5p6"),w(Cf,"class","input-group-prepend"),w(Ss,"id","landLine"),w(Ss,"class","form-control"),w(Ss,"type","number"),w(Ss,"placeholder","0.0"),w(Ss,"min","0"),w(wl,"class","input-group hidden-print svelte-131d5p6"),w(wu,"class","visible-print svelte-131d5p6"),w(ps,"class","svelte-131d5p6"),w(Vl,"class","svelte-131d5p6"),w(ku,"class","svelte-131d5p6"),w(Ld,"class","input-group-prepend"),w(Js,"id","officeSupplies"),w(Js,"class","form-control"),w(Js,"type","number"),w(Js,"placeholder","0.0"),w(Js,"min","0"),w(td,"class","input-group hidden-print svelte-131d5p6"),w(nd,"class","visible-print svelte-131d5p6"),w(zl,"class","svelte-131d5p6"),w(Tu,"class","svelte-131d5p6"),w(Df,"class","svelte-131d5p6"),w(rd,"class","input-group-prepend"),w(oo,"id","printing"),w(oo,"class","form-control"),w(oo,"type","number"),w(oo,"placeholder","0.0"),w(oo,"min","0"),w(Qo,"class","input-group hidden-print svelte-131d5p6"),w(lo,"class","visible-print svelte-131d5p6"),w(Su,"class","svelte-131d5p6"),w(id,"class","svelte-131d5p6"),w(uo,"class","svelte-131d5p6"),w(fo,"class","input-group-prepend"),w(Zs,"id","otherCosts"),w(Zs,"class","form-control"),w(Zs,"type","number"),w(Zs,"placeholder","0.0"),w(Zs,"min","0"),w(Xl,"class","input-group hidden-print svelte-131d5p6"),w(Pu,"class","visible-print svelte-131d5p6"),w(Kl,"class","svelte-131d5p6"),w(Jo,"class","svelte-131d5p6"),w(B,"class","svelte-131d5p6"),w(fe,"class","input-group-prepend"),je.disabled="",je.__value="",je.value=je.__value,w(Fe,"id","businessUseAllocation"),w(Fe,"class","form-control"),e[0][e[0].currentMonth].officeExpenses.businessUseAllocation===void 0&&xa(()=>e[26].call(Fe)),w(ye,"class","input-group hidden-print svelte-131d5p6"),w(Pt,"class","visible-print svelte-131d5p6"),w(oe,"class","svelte-131d5p6"),w(N,"class","svelte-131d5p6"),w(ks,"class","svelte-131d5p6"),w(Qi,"class","svelte-131d5p6"),w(Zr,"class","text-right home-office-accountable svelte-131d5p6"),wt(Zr,"home-office-accountable__blur",e[2]),w(Mr,"class","svelte-131d5p6"),w(Li,"class","svelte-131d5p6"),w(gs,"class","svelte-131d5p6"),w(Sl,"class","text-right home-office-accountable svelte-131d5p6"),wt(Sl,"home-office-accountable__blur",e[2]),w(kl,"class","svelte-131d5p6"),w(Da,"class","svelte-131d5p6"),w(si,"class","svelte-131d5p6"),w(Co,"class","table table-sm company-type svelte-131d5p6"),w(Qn,"class","header svelte-131d5p6"),w(Nf,"class","svelte-131d5p6"),w(sd,"class","input-group-prepend"),w(Zo,"id","travelCosts"),w(Zo,"class","form-control"),w(Zo,"type","number"),w(Zo,"placeholder","0.0"),w(Zo,"min","0"),w(Ya,"class","input-group hidden-print svelte-131d5p6"),w(Lf,"class","visible-print svelte-131d5p6"),w(Ff,"class","svelte-131d5p6"),w(ad,"class","svelte-131d5p6"),w(yc,"class","svelte-131d5p6"),w(jo,"class","input-group-prepend"),w(el,"id","parkingTolls"),w(el,"class","form-control"),w(el,"type","number"),w(el,"placeholder","0.0"),w(el,"min","0"),w(Bd,"class","input-group hidden-print svelte-131d5p6"),w(Tc,"class","visible-print svelte-131d5p6"),w(Hf,"class","svelte-131d5p6"),w(Iu,"class","svelte-131d5p6"),w(kc,"class","svelte-131d5p6"),w(y_,"class","input-group-prepend"),w(tl,"id","businessMeals"),w(tl,"class","form-control"),w(tl,"type","number"),w(tl,"placeholder","0.0"),w(tl,"min","0"),w(Bf,"class","input-group hidden-print svelte-131d5p6"),w(Sc,"class","visible-print svelte-131d5p6"),w(ld,"class","svelte-131d5p6"),w(Au,"class","svelte-131d5p6"),w(k_,"class","svelte-131d5p6"),w(Cc,"class","input-group-prepend"),w(il,"id","otherExpenses"),w(il,"class","form-control"),w(il,"type","number"),w(il,"placeholder","0.0"),w(il,"min","0"),w(qd,"class","input-group hidden-print svelte-131d5p6"),w(Pc,"class","visible-print svelte-131d5p6"),w(Uf,"class","svelte-131d5p6"),w(ud,"class","svelte-131d5p6"),w(Cl,"class","svelte-131d5p6"),w(C_,"class","svelte-131d5p6"),w(Vf,"class","text-right svelte-131d5p6"),wt(Vf,"home-office-accountable__blur",e[2]),w(P_,"class","svelte-131d5p6"),w(Wf,"class","svelte-131d5p6"),w(S_,"class","svelte-131d5p6"),w(Jl,"class","table table-sm company-type svelte-131d5p6"),w(E_,"class","svelte-131d5p6"),w(Oa,"class","text-right svelte-131d5p6"),wt(Oa,"home-office-accountable__blur",e[2]),w(I_,"class","svelte-131d5p6"),w(Yf,"class","svelte-131d5p6"),w(zf,"class","header-strong svelte-131d5p6"),w(Cs,"class","table table-sm company-type svelte-131d5p6"),w(r,"class","printable-area"),w(n,"class","col-lg-12 home-office-accountable__overflow-x svelte-131d5p6"),w(t,"class","row")},m(rn,ti){ce(rn,t,ti),m(t,n),Eo&&Eo.m(n,null),m(n,i),m(n,r),m(r,a),m(a,s),m(s,o),m(o,d),m(r,c),m(r,v),m(v,T);for(let ea=0;ea<qs.length;ea+=1)qs[ea]&&qs[ea].m(T,null);m(r,b),m(r,A),m(A,E),m(A,y),m(A,I),m(I,D),m(D,O),m(D,M),m(D,F),m(F,$),m($,L),m($,j),m($,H),Pn(H,e[0].homeOfficeVariables.homeOfficeSqft),m(F,Q),m(F,X),m(X,ne),m(X,be),m(I,ue),m(I,Ce),m(Ce,ie),m(Ce,Y),m(Ce,he),m(he,Me),m(Me,Pe),m(Me,We),m(Me,qe),Pn(qe,e[0].homeOfficeVariables.totalHomeSqft),m(he,ee),m(he,G),m(G,Te),m(G,De),m(A,we),m(A,Ve),m(Ve,Ke),m(Ke,yt),m(Ke,ht),m(Ke,Je),m(Je,pt),m(pt,it),m(pt,Ge),m(r,st),m(r,It),m(It,Ct),m(It,bt),m(It,Rt),m(Rt,cn),m(cn,nn),m(cn,Qe),m(cn,Ft),m(Ft,Fn),m(Fn,He),m(Fn,Dt),m(Fn,Xt),Pn(Xt,e[0].fullYearHomeExpenses.rent),m(Ft,Mt),m(Ft,Xe),m(Xe,Nt),m(Xe,In),m(Rt,dt),m(Rt,Zt),m(Zt,Ln),m(Zt,xn),m(Zt,Dn),m(Dn,Un),m(Un,qn),m(Un,ft),m(Un,ni),Pn(ni,e[0].fullYearHomeExpenses.mortgageInterest),m(Dn,Et),m(Dn,un),m(un,Ai),m(un,sn),m(Rt,ci),m(Rt,pi),m(pi,Pi),m(pi,$i),m(pi,ji),m(ji,ri),m(ri,tr),m(ri,Ei),m(ri,Ti),Pn(Ti,e[0].fullYearHomeExpenses.propertyTaxes),m(ji,kn),m(ji,Rn),m(Rn,ki),m(Rn,_r),m(Rt,Mi),m(Rt,di),m(di,Yi),m(di,na),m(di,Ki),m(Ki,Rr),m(Rr,Di),m(Rr,Wi),m(Rr,Bi),Pn(Bi,e[0].fullYearHomeExpenses.homeInsurance),m(Ki,_a),m(Ki,xi),m(xi,Kr),m(xi,Ji),m(Rt,ia),m(Rt,la),m(la,Ir),m(la,Ur),m(la,qr),m(qr,Ht),m(Ht,et),m(Ht,ln),m(Ht,Vi),Pn(Vi,e[0].fullYearHomeExpenses.utilitiesAnnual),m(qr,Ar),m(qr,vr),m(vr,ir),m(vr,pr),m(Rt,yi),m(Rt,Dr),m(Dr,Wr),m(Dr,Sr),m(Dr,hr),m(hr,Vn),m(Vn,dn),m(Vn,wr),m(Vn,Bn),Pn(Bn,e[0].fullYearHomeExpenses.condoDues),m(hr,ra),m(hr,_n),m(_n,Vr),m(_n,Or),m(Rt,Ui),m(Rt,Fr),m(Fr,wi),m(Fr,Ni),m(Fr,ar),m(ar,sr),m(sr,Gi),m(sr,Cr),m(sr,or),Pn(or,e[0].fullYearHomeExpenses.other),m(ar,lr),m(ar,Ka),m(Ka,Lr),m(Ka,wa),m(It,zr),m(It,Ze),m(Ze,tn),m(tn,Xr),m(tn,ur),m(tn,Hr),m(Hr,Xi),m(Xi,pa),m(Ze,qt),m(Ze,mn),m(mn,ai),m(mn,Ra),m(mn,aa),m(aa,ga),m(ga,va),m(r,$r),m(r,ua),m(ua,an),m(ua,gi),m(ua,jr),m(jr,Ia),m(Ia,Xa),m(Ia,Ha),m(Ia,$a),m($a,Ii),m(Ii,br),m(Ii,Aa),m(Ii,Vt),Pn(Vt,e[0][e[0].currentMonth].variableHomeExpenses.repairs),m($a,_i),m($a,xe),m(xe,Ue),m(xe,Ae),m(jr,at),m(jr,gt),m(gt,nt),m(gt,jt),m(gt,Yt),m(Yt,Mn),m(Mn,Yn),m(Mn,Wn),m(Mn,ei),Pn(ei,e[0][e[0].currentMonth].variableHomeExpenses.clearning),m(Yt,Fi),m(Yt,Tr),m(Tr,Yr),m(Tr,ka),m(jr,fr),m(jr,Nr),m(Nr,Na),m(Nr,Wa),m(Nr,da),m(da,Sa),m(Sa,Br),m(Sa,Ks),m(Sa,Qr),Pn(Qr,e[0][e[0].currentMonth].variableHomeExpenses.lawncare),m(da,Oi),m(da,Fs),m(Fs,Qa),m(Fs,bo),m(jr,yo),m(jr,Ts),m(Ts,Ls),m(Ts,wo),m(Ts,Is),m(Is,Hs),m(Hs,pl),m(Hs,zo),m(Hs,cs),Pn(cs,e[0][e[0].currentMonth].variableHomeExpenses.utilitiesMonthly),m(Is,ss),m(Is,Xs),m(Xs,Qs),m(Xs,gu),m(ua,Vu),m(ua,Ll),m(Ll,Hl),m(Hl,zu),m(Hl,vf),m(Hl,hl),m(hl,To),m(To,vu),m(Ll,bf),m(Ll,ml),m(ml,Go),m(ml,yf),m(ml,ko),m(ko,So),m(So,fa),m(r,Ko),m(r,Co),m(Co,vl),m(Co,wf),m(Co,ks),m(ks,bl),m(bl,Yu),m(bl,Gu),m(bl,Ja),m(Ja,jl),m(jl,Ku),m(jl,Bl),m(jl,As),Pn(As,e[0][e[0].currentMonth].officeExpenses.internet),m(Ja,Tf),m(Ja,Xo),m(Xo,Xu),m(Xo,$d),m(ks,yl),m(ks,Ul),m(Ul,bu),m(Ul,Nd),m(Ul,ql),m(ql,le),m(le,vn),m(le,ui),m(le,js),Pn(js,e[0][e[0].currentMonth].officeExpenses.cellPhone),m(ql,Fd),m(ql,Wl),m(Wl,kf),m(Wl,Sf),m(ks,Po),m(ks,Vl),m(Vl,Ju),m(Vl,Zu),m(Vl,ps),m(ps,wl),m(wl,Cf),m(wl,cc),m(wl,Ss),Pn(Ss,e[0][e[0].currentMonth].officeExpenses.landLine),m(ps,yu),m(ps,wu),m(wu,Tl),m(wu,Lo),m(ks,_c),m(ks,Tu),m(Tu,ku),m(Tu,Pf),m(Tu,zl),m(zl,td),m(td,Ld),m(td,Ef),m(td,Js),Pn(Js,e[0][e[0].currentMonth].officeExpenses.officeSupplies),m(zl,Hd),m(zl,nd),m(nd,If),m(nd,Af),m(ks,pc),m(ks,id),m(id,Df),m(id,m_),m(id,Su),m(Su,Qo),m(Qo,rd),m(Qo,g_),m(Qo,oo),Pn(oo,e[0][e[0].currentMonth].officeExpenses.printing),m(Su,hc),m(Su,lo),m(lo,Ho),m(lo,Of),m(ks,Cu),m(ks,Jo),m(Jo,uo),m(Jo,Gl),m(Jo,Kl),m(Kl,Xl),m(Xl,fo),m(Xl,Mf),m(Xl,Zs),Pn(Zs,e[0][e[0].currentMonth].officeExpenses.otherCosts),m(Kl,xf),m(Kl,Pu),m(Pu,Rf),m(Pu,C),m(ks,x),m(ks,N),m(N,B),m(N,J),m(N,oe),m(oe,ye),m(ye,fe),m(ye,Ie),m(ye,Fe),m(Fe,je);for(let ea=0;ea<eo.length;ea+=1)eo[ea]&&eo[ea].m(Fe,null);Es(Fe,e[0][e[0].currentMonth].officeExpenses.businessUseAllocation,!0),m(oe,ut),m(oe,Pt),m(Pt,Ot),m(Ot,Gt),m(Ot,Cn),m(Co,ii),m(Co,si),m(si,Li),m(Li,Qi),m(Li,Jr),m(Li,Mr),m(Mr,Zr),m(Zr,hs),m(si,ms),m(si,Da),m(Da,gs),m(Da,Ql),m(Da,kl),m(kl,Sl),m(Sl,qp),m(r,Bm),m(r,Jl),m(Jl,Qn),m(Jl,mc),m(Jl,Cl),m(Cl,ad),m(ad,Nf),m(ad,gc),m(ad,Ff),m(Ff,Ya),m(Ya,sd),m(Ya,v_),m(Ya,Zo),Pn(Zo,e[0][e[0].currentMonth].otherOutOfPocketExpenses.travelCosts),m(Ff,Um),m(Ff,Lf),m(Lf,vc),m(Lf,od),m(Cl,bc),m(Cl,Iu),m(Iu,yc),m(Iu,wc),m(Iu,Hf),m(Hf,Bd),m(Bd,jo),m(Bd,qm),m(Bd,el),Pn(el,e[0][e[0].currentMonth].otherOutOfPocketExpenses.parkingTolls),m(Hf,Wp),m(Hf,Tc),m(Tc,Vp),m(Tc,jf),m(Cl,b_),m(Cl,Au),m(Au,kc),m(Au,Wm),m(Au,ld),m(ld,Bf),m(Bf,y_),m(Bf,Vm),m(Bf,tl),Pn(tl,e[0][e[0].currentMonth].otherOutOfPocketExpenses.businessMeals),m(ld,w_),m(ld,Sc),m(Sc,nl),m(Sc,zp),m(Cl,Ud),m(Cl,ud),m(ud,k_),m(ud,dd),m(ud,Uf),m(Uf,qd),m(qd,Cc),m(qd,Pl),m(qd,il),Pn(il,e[0][e[0].currentMonth].otherOutOfPocketExpenses.otherExpenses),m(Uf,Yp),m(Uf,Pc),m(Pc,qf),m(Pc,Ec),m(Jl,Gp),m(Jl,S_),m(S_,Wf),m(Wf,C_),m(Wf,Kp),m(Wf,P_),m(P_,Vf),m(Vf,Xp),m(r,qi),m(r,Cs),m(Cs,zf),m(zf,Yf),m(Yf,E_),m(Yf,Qp),m(Yf,I_),m(I_,Oa),m(Oa,Dc),Jp||(zm=[ct(H,"input",e[7]),ct(H,"change",e[4]),ct(qe,"input",e[8]),ct(qe,"change",e[4]),ct(Xt,"input",e[9]),ct(Xt,"change",e[4]),ct(ni,"input",e[10]),ct(ni,"change",e[4]),ct(Ti,"input",e[11]),ct(Ti,"change",e[4]),ct(Bi,"input",e[12]),ct(Bi,"change",e[4]),ct(Vi,"input",e[13]),ct(Vi,"change",e[4]),ct(Bn,"input",e[14]),ct(Bn,"change",e[4]),ct(or,"input",e[15]),ct(or,"change",e[4]),ct(Vt,"input",e[16]),ct(Vt,"change",e[4]),ct(ei,"input",e[17]),ct(ei,"change",e[4]),ct(Qr,"input",e[18]),ct(Qr,"change",e[4]),ct(cs,"input",e[19]),ct(cs,"change",e[4]),ct(As,"input",e[20]),ct(As,"change",e[4]),ct(js,"input",e[21]),ct(js,"change",e[4]),ct(Ss,"input",e[22]),ct(Ss,"change",e[4]),ct(Js,"input",e[23]),ct(Js,"change",e[4]),ct(oo,"input",e[24]),ct(oo,"change",e[4]),ct(Zs,"input",e[25]),ct(Zs,"change",e[4]),ct(Fe,"change",e[26]),ct(Fe,"blur",e[4]),ct(Zo,"input",e[27]),ct(Zo,"change",e[4]),ct(el,"input",e[28]),ct(el,"change",e[4]),ct(tl,"input",e[29]),ct(tl,"change",e[4]),ct(il,"input",e[30]),ct(il,"change",e[4])],Jp=!0)},p(rn,ti){if(rn[1]?Eo?Eo.p(rn,ti):(Eo=lD(rn),Eo.c(),Eo.m(n,i)):Eo&&(Eo.d(1),Eo=null),ti[0]&1&&l!==(l=Gn.capitalize(rn[0].currentMonth)+"")&&vt(d,l),ti[0]&25){Gf=rn[3];let ea;for(ea=0;ea<Gf.length;ea+=1){const Oc=oD(rn,Gf,ea);qs[ea]?qs[ea].p(Oc,ti):(qs[ea]=uD(Oc),qs[ea].c(),qs[ea].m(T,null))}for(;ea<qs.length;ea+=1)qs[ea].d(1);qs.length=Gf.length}if(ti[0]&1&&V!==(V=rn[0].homeOfficeVariables.totalHomeSqft||0)&&w(H,"max",V),ti[0]&1&&Ri(H.value)!==rn[0].homeOfficeVariables.homeOfficeSqft&&Pn(H,rn[0].homeOfficeVariables.homeOfficeSqft),ti[0]&1&&te!==(te=rn[0].homeOfficeVariables.homeOfficeSqft+"")&&vt(ne,te),ti[0]&1&&Ri(qe.value)!==rn[0].homeOfficeVariables.totalHomeSqft&&Pn(qe,rn[0].homeOfficeVariables.totalHomeSqft),ti[0]&1&&me!==(me=rn[0].homeOfficeVariables.totalHomeSqft+"")&&vt(Te,me),ti[0]&1&&Tt!==(Tt=parseFloat(rn[0].homeOfficeVariables.businessUsePercentage.toFixed(2))+"")&&vt(it,Tt),ti[0]&4&&wt(pt,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ri(Xt.value)!==rn[0].fullYearHomeExpenses.rent&&Pn(Xt,rn[0].fullYearHomeExpenses.rent),ti[0]&1&&on!==(on=rn[0].fullYearHomeExpenses.rent+"")&&vt(In,on),ti[0]&1&&Ri(ni.value)!==rn[0].fullYearHomeExpenses.mortgageInterest&&Pn(ni,rn[0].fullYearHomeExpenses.mortgageInterest),ti[0]&1&&St!==(St=rn[0].fullYearHomeExpenses.mortgageInterest+"")&&vt(sn,St),ti[0]&1&&Ri(Ti.value)!==rn[0].fullYearHomeExpenses.propertyTaxes&&Pn(Ti,rn[0].fullYearHomeExpenses.propertyTaxes),ti[0]&1&&mr!==(mr=rn[0].fullYearHomeExpenses.propertyTaxes+"")&&vt(_r,mr),ti[0]&1&&Ri(Bi.value)!==rn[0].fullYearHomeExpenses.homeInsurance&&Pn(Bi,rn[0].fullYearHomeExpenses.homeInsurance),ti[0]&1&&kr!==(kr=rn[0].fullYearHomeExpenses.homeInsurance+"")&&vt(Ji,kr),ti[0]&1&&Ri(Vi.value)!==rn[0].fullYearHomeExpenses.utilitiesAnnual&&Pn(Vi,rn[0].fullYearHomeExpenses.utilitiesAnnual),ti[0]&1&&Si!==(Si=rn[0].fullYearHomeExpenses.utilitiesAnnual+"")&&vt(pr,Si),ti[0]&1&&Ri(Bn.value)!==rn[0].fullYearHomeExpenses.condoDues&&Pn(Bn,rn[0].fullYearHomeExpenses.condoDues),ti[0]&1&&rr!==(rr=rn[0].fullYearHomeExpenses.condoDues+"")&&vt(Or,rr),ti[0]&1&&Ri(or.value)!==rn[0].fullYearHomeExpenses.other&&Pn(or,rn[0].fullYearHomeExpenses.other),ti[0]&1&&nr!==(nr=rn[0].fullYearHomeExpenses.other+"")&&vt(wa,nr),ti[0]&1&&dr!==(dr=po(rn[0].fullYearHomeExpenses.totalFullYearHomeExpenses)+"")&&vt(pa,dr),ti[0]&4&&wt(Xi,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ta!==(Ta=po(rn[0].fullYearHomeExpenses.deductiblePortionOfFullYearHomeExpenses)+"")&&vt(va,Ta),ti[0]&4&&wt(ga,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ri(Vt.value)!==rn[0][rn[0].currentMonth].variableHomeExpenses.repairs&&Pn(Vt,rn[0][rn[0].currentMonth].variableHomeExpenses.repairs),ti[0]&1&&pe!==(pe=rn[0][rn[0].currentMonth].variableHomeExpenses.repairs+"")&&vt(Ae,pe),ti[0]&1&&Ri(ei.value)!==rn[0][rn[0].currentMonth].variableHomeExpenses.clearning&&Pn(ei,rn[0][rn[0].currentMonth].variableHomeExpenses.clearning),ti[0]&1&&yr!==(yr=rn[0][rn[0].currentMonth].variableHomeExpenses.clearning+"")&&vt(ka,yr),ti[0]&1&&Ri(Qr.value)!==rn[0][rn[0].currentMonth].variableHomeExpenses.lawncare&&Pn(Qr,rn[0][rn[0].currentMonth].variableHomeExpenses.lawncare),ti[0]&1&&as!==(as=rn[0][rn[0].currentMonth].variableHomeExpenses.lawncare+"")&&vt(bo,as),ti[0]&1&&Ri(cs.value)!==rn[0][rn[0].currentMonth].variableHomeExpenses.utilitiesMonthly&&Pn(cs,rn[0][rn[0].currentMonth].variableHomeExpenses.utilitiesMonthly),ti[0]&1&&Yo!==(Yo=rn[0][rn[0].currentMonth].variableHomeExpenses.utilitiesMonthly+"")&&vt(gu,Yo),ti[0]&1&&_s!==(_s=po(rn[0][rn[0].currentMonth].variableHomeExpenses.totalVariableHomeExpenses)+"")&&vt(vu,_s),ti[0]&4&&wt(To,"home-office-accountable__blur",rn[2]),ti[0]&1&&gl!==(gl=po(rn[0][rn[0].currentMonth].variableHomeExpenses.deductiblePortionOfVariableHomeExpenses)+"")&&vt(fa,gl),ti[0]&4&&wt(So,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ri(As.value)!==rn[0][rn[0].currentMonth].officeExpenses.internet&&Pn(As,rn[0][rn[0].currentMonth].officeExpenses.internet),ti[0]&1&&so!==(so=rn[0][rn[0].currentMonth].officeExpenses.internet+"")&&vt($d,so),ti[0]&1&&Ri(js.value)!==rn[0][rn[0].currentMonth].officeExpenses.cellPhone&&Pn(js,rn[0][rn[0].currentMonth].officeExpenses.cellPhone),ti[0]&1&&Qu!==(Qu=rn[0][rn[0].currentMonth].officeExpenses.cellPhone+"")&&vt(Sf,Qu),ti[0]&1&&Ri(Ss.value)!==rn[0][rn[0].currentMonth].officeExpenses.landLine&&Pn(Ss,rn[0][rn[0].currentMonth].officeExpenses.landLine),ti[0]&1&&ed!==(ed=rn[0][rn[0].currentMonth].officeExpenses.landLine+"")&&vt(Lo,ed),ti[0]&1&&Ri(Js.value)!==rn[0][rn[0].currentMonth].officeExpenses.officeSupplies&&Pn(Js,rn[0][rn[0].currentMonth].officeExpenses.officeSupplies),ti[0]&1&&jd!==(jd=rn[0][rn[0].currentMonth].officeExpenses.officeSupplies+"")&&vt(Af,jd),ti[0]&1&&Ri(oo.value)!==rn[0][rn[0].currentMonth].officeExpenses.printing&&Pn(oo,rn[0][rn[0].currentMonth].officeExpenses.printing),ti[0]&1&&Yl!==(Yl=rn[0][rn[0].currentMonth].officeExpenses.printing+"")&&vt(Of,Yl),ti[0]&1&&Ri(Zs.value)!==rn[0][rn[0].currentMonth].officeExpenses.otherCosts&&Pn(Zs,rn[0][rn[0].currentMonth].officeExpenses.otherCosts),ti[0]&1&&g!==(g=rn[0][rn[0].currentMonth].officeExpenses.otherCosts+"")&&vt(C,g),ti&0){Kf=[...Array(101).keys()].reverse();let ea;for(ea=0;ea<Kf.length;ea+=1){const Oc=sD(rn,Kf,ea);eo[ea]?eo[ea].p(Oc,ti):(eo[ea]=dD(Oc),eo[ea].c(),eo[ea].m(Fe,null))}for(;ea<eo.length;ea+=1)eo[ea].d(1);eo.length=Kf.length}ti[0]&1&&Es(Fe,rn[0][rn[0].currentMonth].officeExpenses.businessUseAllocation),ti[0]&1&&Lt!==(Lt=rn[0][rn[0].currentMonth].officeExpenses.businessUseAllocation+"")&&vt(Gt,Lt),ti[0]&1&&ba!==(ba=po(rn[0][rn[0].currentMonth].officeExpenses.totalOfficeExpenses)+"")&&vt(hs,ba),ti[0]&4&&wt(Zr,"home-office-accountable__blur",rn[2]),ti[0]&1&&$f!==($f=po(rn[0][rn[0].currentMonth].officeExpenses.deductiblePortionOfOfficeExpenses)+"")&&vt(qp,$f),ti[0]&4&&wt(Sl,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ri(Zo.value)!==rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.travelCosts&&Pn(Zo,rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.travelCosts),ti[0]&1&&Eu!==(Eu=rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.travelCosts+"")&&vt(od,Eu),ti[0]&1&&Ri(el.value)!==rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.parkingTolls&&Pn(el,rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.parkingTolls),ti[0]&1&&Wt!==(Wt=rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.parkingTolls+"")&&vt(jf,Wt),ti[0]&1&&Ri(tl.value)!==rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.businessMeals&&Pn(tl,rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.businessMeals),ti[0]&1&&T_!==(T_=rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.businessMeals+"")&&vt(zp,T_),ti[0]&1&&Ri(il.value)!==rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.otherExpenses&&Pn(il,rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.otherExpenses),ti[0]&1&&Wd!==(Wd=rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.otherExpenses+"")&&vt(Ec,Wd),ti[0]&1&&Ic!==(Ic=po(rn[0][rn[0].currentMonth].otherOutOfPocketExpenses.deductiblePortionOfOtherOutOfPocketExpenses)+"")&&vt(Xp,Ic),ti[0]&4&&wt(Vf,"home-office-accountable__blur",rn[2]),ti[0]&1&&Ac!==(Ac=po(rn[0][rn[0].currentMonth].totalReimbursement)+"")&&vt(Dc,Ac),ti[0]&4&&wt(Oa,"home-office-accountable__blur",rn[2])},i:ot,o:ot,d(rn){rn&&_e(t),Eo&&Eo.d(),Nn(qs,rn),Nn(eo,rn),Jp=!1,vi(zm)}}}function po(e,t=2){const n=Number(e).toFixed(t);return n<0?`(${po(-n)})`:`$${parseFloat((n??"-").toLocaleString("en-US",{style:"currency",currency:"USD"}))}`}function hye(e,t,n){let{homeOfficeAccountableEndpoint:i}=t,{homeOfficeAccountablePrintEndpoint:r}=t,{pld:a={}}=t;const s=Array.from({length:12},(Me,Pe)=>new Date(null,Pe+1,null).toLocaleDateString("en",{month:"long"}).toLowerCase()),o=s.reduce((Me,Pe)=>({...Me,[Pe]:{variableHomeExpenses:{repairs:0,clearning:0,lawncare:0,utilitiesMonthly:0,totalVariableHomeExpenses:0,deductiblePortionOfVariableHomeExpenses:0},officeExpenses:{internet:0,cellPhone:0,landLine:0,officeSupplies:0,printing:0,otherCosts:0,businessUseAllocation:100,totalOfficeExpenses:0,deductiblePortionOfOfficeExpenses:0},otherOutOfPocketExpenses:{travelCosts:0,parkingTolls:0,businessMeals:0,otherExpenses:0,deductiblePortionOfOtherOutOfPocketExpenses:0},totalReimbursement:0}}),{currentMonth:s[new Date().getMonth()],homeOfficeVariables:{homeOfficeSqft:0,totalHomeSqft:0,businessUsePercentage:0},fullYearHomeExpenses:{rent:0,mortgageInterest:0,propertyTaxes:0,homeInsurance:0,utilitiesAnnual:0,condoDues:0,other:0,totalFullYearHomeExpenses:0,deductiblePortionOfFullYearHomeExpenses:0}});a=Gn.merge(Gn.cloneDeep(o),a);let l=!1;const d=new Fo(i),c=Gn.debounce(async()=>{if(l)return!1;n(2,l=!0);try{const Me=await d.baseQuery(d.baseEndpoint,{method:"POST",headers:d.headers,body:JSON.stringify({home_office_accountable:v(a)})});n(0,a=Me.pld)}catch(Me){Gr.error(Me.message)}finally{n(2,l=!1)}},1e3);function v(Me,Pe=[]){return Object.entries(Me).reduce((We,[qe,ee])=>({...We,[qe]:typeof ee=="object"&&ee!==null?v(ee,[...Pe,qe]):ee==null||Number.isFinite(ee)&&ee<0?Gn.get(o,[...Pe,qe]):ee}),{})}oa(async()=>{await c(),r||(window.print(),window.onfocus=()=>window.close())});const T=(Me,Pe)=>{n(0,a.currentMonth=Me,a),c()};function b(){a.homeOfficeVariables.homeOfficeSqft=Ri(this.value),n(0,a)}function A(){a.homeOfficeVariables.totalHomeSqft=Ri(this.value),n(0,a)}function E(){a.fullYearHomeExpenses.rent=Ri(this.value),n(0,a)}function y(){a.fullYearHomeExpenses.mortgageInterest=Ri(this.value),n(0,a)}function I(){a.fullYearHomeExpenses.propertyTaxes=Ri(this.value),n(0,a)}function D(){a.fullYearHomeExpenses.homeInsurance=Ri(this.value),n(0,a)}function O(){a.fullYearHomeExpenses.utilitiesAnnual=Ri(this.value),n(0,a)}function M(){a.fullYearHomeExpenses.condoDues=Ri(this.value),n(0,a)}function F(){a.fullYearHomeExpenses.other=Ri(this.value),n(0,a)}function $(){a[a.currentMonth].variableHomeExpenses.repairs=Ri(this.value),n(0,a)}function L(){a[a.currentMonth].variableHomeExpenses.clearning=Ri(this.value),n(0,a)}function j(){a[a.currentMonth].variableHomeExpenses.lawncare=Ri(this.value),n(0,a)}function H(){a[a.currentMonth].variableHomeExpenses.utilitiesMonthly=Ri(this.value),n(0,a)}function V(){a[a.currentMonth].officeExpenses.internet=Ri(this.value),n(0,a)}function Q(){a[a.currentMonth].officeExpenses.cellPhone=Ri(this.value),n(0,a)}function X(){a[a.currentMonth].officeExpenses.landLine=Ri(this.value),n(0,a)}function te(){a[a.currentMonth].officeExpenses.officeSupplies=Ri(this.value),n(0,a)}function ne(){a[a.currentMonth].officeExpenses.printing=Ri(this.value),n(0,a)}function be(){a[a.currentMonth].officeExpenses.otherCosts=Ri(this.value),n(0,a)}function ue(){a[a.currentMonth].officeExpenses.businessUseAllocation=Cd(this),n(0,a)}function Ce(){a[a.currentMonth].otherOutOfPocketExpenses.travelCosts=Ri(this.value),n(0,a)}function ie(){a[a.currentMonth].otherOutOfPocketExpenses.parkingTolls=Ri(this.value),n(0,a)}function Y(){a[a.currentMonth].otherOutOfPocketExpenses.businessMeals=Ri(this.value),n(0,a)}function he(){a[a.currentMonth].otherOutOfPocketExpenses.otherExpenses=Ri(this.value),n(0,a)}return e.$$set=Me=>{"homeOfficeAccountableEndpoint"in Me&&n(5,i=Me.homeOfficeAccountableEndpoint),"homeOfficeAccountablePrintEndpoint"in Me&&n(1,r=Me.homeOfficeAccountablePrintEndpoint),"pld"in Me&&n(0,a=Me.pld)},[a,r,l,s,c,i,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he]}class mye extends Qt{constructor(t){super(),Jt(this,t,hye,pye,Kt,{homeOfficeAccountableEndpoint:5,homeOfficeAccountablePrintEndpoint:1,pld:0},null,[-1,-1])}}function IN(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function gye(e){return e.length===1&&(e=vye(e)),{left:function(t,n,i,r){for(i==null&&(i=0),r==null&&(r=t.length);i<r;){var a=i+r>>>1;e(t[a],n)<0?i=a+1:r=a}return i},right:function(t,n,i,r){for(i==null&&(i=0),r==null&&(r=t.length);i<r;){var a=i+r>>>1;e(t[a],n)>0?r=a:i=a+1}return i}}}function vye(e){return function(t,n){return IN(e(t),n)}}var bye=gye(IN),AN=bye.right;function fD(e,t){var n=e.length,i=-1,r,a,s;if(t==null){for(;++i<n;)if((r=e[i])!=null&&r>=r)for(a=s=r;++i<n;)(r=e[i])!=null&&(a>r&&(a=r),s<r&&(s=r))}else for(;++i<n;)if((r=t(e[i],i,e))!=null&&r>=r)for(a=s=r;++i<n;)(r=t(e[i],i,e))!=null&&(a>r&&(a=r),s<r&&(s=r));return[a,s]}function yye(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(r);++i<r;)a[i]=e+i*n;return a}var Cy=Math.sqrt(50),Py=Math.sqrt(10),Ey=Math.sqrt(2);function wye(e,t,n){var i,r=-1,a,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((i=t<e)&&(a=e,e=t,t=a),(o=cv(e,t,n))===0||!isFinite(o))return[];if(o>0)for(e=Math.ceil(e/o),t=Math.floor(t/o),s=new Array(a=Math.ceil(t-e+1));++r<a;)s[r]=(e+r)*o;else for(e=Math.floor(e*o),t=Math.ceil(t*o),s=new Array(a=Math.ceil(e-t+1));++r<a;)s[r]=(e-r)/o;return i&&s.reverse(),s}function cv(e,t,n){var i=(t-e)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,r);return r>=0?(a>=Cy?10:a>=Py?5:a>=Ey?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(a>=Cy?10:a>=Py?5:a>=Ey?2:1)}function Tye(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/r;return a>=Cy?r*=10:a>=Py?r*=5:a>=Ey&&(r*=2),t<e?-r:r}var Pb=Array.prototype.slice;function kye(e){return e}var Eb=1,Ib=2,Iy=3,jh=4,cD=1e-6;function Sye(e){return"translate("+(e+.5)+",0)"}function Cye(e){return"translate(0,"+(e+.5)+")"}function Pye(e){return function(t){return+e(t)}}function Eye(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function Iye(){return!this.__axis}function DN(e,t){var n=[],i=null,r=null,a=6,s=6,o=3,l=e===Eb||e===jh?-1:1,d=e===jh||e===Ib?"x":"y",c=e===Eb||e===Iy?Sye:Cye;function v(T){var b=i??(t.ticks?t.ticks.apply(t,n):t.domain()),A=r??(t.tickFormat?t.tickFormat.apply(t,n):kye),E=Math.max(a,0)+o,y=t.range(),I=+y[0]+.5,D=+y[y.length-1]+.5,O=(t.bandwidth?Eye:Pye)(t.copy()),M=T.selection?T.selection():T,F=M.selectAll(".domain").data([null]),$=M.selectAll(".tick").data(b,t).order(),L=$.exit(),j=$.enter().append("g").attr("class","tick"),H=$.select("line"),V=$.select("text");F=F.merge(F.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(j),H=H.merge(j.append("line").attr("stroke","currentColor").attr(d+"2",l*a)),V=V.merge(j.append("text").attr("fill","currentColor").attr(d,l*E).attr("dy",e===Eb?"0em":e===Iy?"0.71em":"0.32em")),T!==M&&(F=F.transition(T),$=$.transition(T),H=H.transition(T),V=V.transition(T),L=L.transition(T).attr("opacity",cD).attr("transform",function(Q){return isFinite(Q=O(Q))?c(Q):this.getAttribute("transform")}),j.attr("opacity",cD).attr("transform",function(Q){var X=this.parentNode.__axis;return c(X&&isFinite(X=X(Q))?X:O(Q))})),L.remove(),F.attr("d",e===jh||e==Ib?s?"M"+l*s+","+I+"H0.5V"+D+"H"+l*s:"M0.5,"+I+"V"+D:s?"M"+I+","+l*s+"V0.5H"+D+"V"+l*s:"M"+I+",0.5H"+D),$.attr("opacity",1).attr("transform",function(Q){return c(O(Q))}),H.attr(d+"2",l*a),V.attr(d,l*E).text(A),M.filter(Iye).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ib?"start":e===jh?"end":"middle"),M.each(function(){this.__axis=O})}return v.scale=function(T){return arguments.length?(t=T,v):t},v.ticks=function(){return n=Pb.call(arguments),v},v.tickArguments=function(T){return arguments.length?(n=T==null?[]:Pb.call(T),v):n.slice()},v.tickValues=function(T){return arguments.length?(i=T==null?null:Pb.call(T),v):i&&i.slice()},v.tickFormat=function(T){return arguments.length?(r=T,v):r},v.tickSize=function(T){return arguments.length?(a=s=+T,v):a},v.tickSizeInner=function(T){return arguments.length?(a=+T,v):a},v.tickSizeOuter=function(T){return arguments.length?(s=+T,v):s},v.tickPadding=function(T){return arguments.length?(o=+T,v):o},v}function Aye(e){return DN(Iy,e)}function Dye(e){return DN(jh,e)}var Oye={value:function(){}};function ON(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new _v(n)}function _v(e){this._=e}function Mye(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}_v.prototype=ON.prototype={constructor:_v,on:function(e,t){var n=this._,i=Mye(e+"",n),r,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((r=(e=i[a]).type)&&(r=xye(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(r=(e=i[a]).type)n[r]=_D(n[r],e.name,t);else if(t==null)for(r in n)n[r]=_D(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new _v(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,a;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,r=a.length;i<r;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)}};function xye(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function _D(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=Oye,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ay="http://www.w3.org/1999/xhtml";const pD={svg:"http://www.w3.org/2000/svg",xhtml:Ay,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $0(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),pD.hasOwnProperty(t)?{space:pD[t],local:e}:e}function Rye(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ay&&t.documentElement.namespaceURI===Ay?t.createElement(e):t.createElementNS(n,e)}}function $ye(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function MN(e){var t=$0(e);return(t.local?$ye:Rye)(t)}function Nye(){}function h2(e){return e==null?Nye:function(){return this.querySelector(e)}}function Fye(e){typeof e!="function"&&(e=h2(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a=t[r],s=a.length,o=i[r]=new Array(s),l,d,c=0;c<s;++c)(l=a[c])&&(d=e.call(l,l.__data__,c,a))&&("__data__"in l&&(d.__data__=l.__data__),o[c]=d);return new Rl(i,this._parents)}function Lye(){return[]}function xN(e){return e==null?Lye:function(){return this.querySelectorAll(e)}}function Hye(e){typeof e!="function"&&(e=xN(e));for(var t=this._groups,n=t.length,i=[],r=[],a=0;a<n;++a)for(var s=t[a],o=s.length,l,d=0;d<o;++d)(l=s[d])&&(i.push(e.call(l,l.__data__,d,s)),r.push(l));return new Rl(i,r)}function RN(e){return function(){return this.matches(e)}}function jye(e){typeof e!="function"&&(e=RN(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a=t[r],s=a.length,o=i[r]=[],l,d=0;d<s;++d)(l=a[d])&&e.call(l,l.__data__,d,a)&&o.push(l);return new Rl(i,this._parents)}function $N(e){return new Array(e.length)}function Bye(){return new Rl(this._enter||this._groups.map($N),this._parents)}function Bv(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Bv.prototype={constructor:Bv,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 Uye(e){return function(){return e}}var hD="$";function qye(e,t,n,i,r,a){for(var s=0,o,l=t.length,d=a.length;s<d;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):n[s]=new Bv(e,a[s]);for(;s<l;++s)(o=t[s])&&(r[s]=o)}function Wye(e,t,n,i,r,a,s){var o,l,d={},c=t.length,v=a.length,T=new Array(c),b;for(o=0;o<c;++o)(l=t[o])&&(T[o]=b=hD+s.call(l,l.__data__,o,t),b in d?r[o]=l:d[b]=l);for(o=0;o<v;++o)b=hD+s.call(e,a[o],o,a),(l=d[b])?(i[o]=l,l.__data__=a[o],d[b]=null):n[o]=new Bv(e,a[o]);for(o=0;o<c;++o)(l=t[o])&&d[T[o]]===l&&(r[o]=l)}function Vye(e,t){if(!e)return b=new Array(this.size()),d=-1,this.each(function($){b[++d]=$}),b;var n=t?Wye:qye,i=this._parents,r=this._groups;typeof e!="function"&&(e=Uye(e));for(var a=r.length,s=new Array(a),o=new Array(a),l=new Array(a),d=0;d<a;++d){var c=i[d],v=r[d],T=v.length,b=e.call(c,c&&c.__data__,d,i),A=b.length,E=o[d]=new Array(A),y=s[d]=new Array(A),I=l[d]=new Array(T);n(c,v,E,y,I,b,t);for(var D=0,O=0,M,F;D<A;++D)if(M=E[D]){for(D>=O&&(O=D+1);!(F=y[O])&&++O<A;);M._next=F||null}}return s=new Rl(s,i),s._enter=o,s._exit=l,s}function zye(){return new Rl(this._exit||this._groups.map($N),this._parents)}function Yye(e,t,n){var i=this.enter(),r=this,a=this.exit();return i=typeof e=="function"?e(i):i.append(e+""),t!=null&&(r=t(r)),n==null?a.remove():n(a),i&&r?i.merge(r).order():r}function Gye(e){for(var t=this._groups,n=e._groups,i=t.length,r=n.length,a=Math.min(i,r),s=new Array(i),o=0;o<a;++o)for(var l=t[o],d=n[o],c=l.length,v=s[o]=new Array(c),T,b=0;b<c;++b)(T=l[b]||d[b])&&(v[b]=T);for(;o<i;++o)s[o]=t[o];return new Rl(s,this._parents)}function Kye(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],r=i.length-1,a=i[r],s;--r>=0;)(s=i[r])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Xye(e){e||(e=Qye);function t(v,T){return v&&T?e(v.__data__,T.__data__):!v-!T}for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var s=n[a],o=s.length,l=r[a]=new Array(o),d,c=0;c<o;++c)(d=s[c])&&(l[c]=d);l.sort(t)}return new Rl(r,this._parents).order()}function Qye(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jye(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Zye(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function ewe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],r=0,a=i.length;r<a;++r){var s=i[r];if(s)return s}return null}function twe(){var e=0;return this.each(function(){++e}),e}function nwe(){return!this.node()}function iwe(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var r=t[n],a=0,s=r.length,o;a<s;++a)(o=r[a])&&e.call(o,o.__data__,a,r);return this}function rwe(e){return function(){this.removeAttribute(e)}}function awe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function swe(e,t){return function(){this.setAttribute(e,t)}}function owe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function lwe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function uwe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function dwe(e,t){var n=$0(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?awe:rwe:typeof t=="function"?n.local?uwe:lwe:n.local?owe:swe)(n,t))}function NN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fwe(e){return function(){this.style.removeProperty(e)}}function cwe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function _we(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function pwe(e,t,n){return arguments.length>1?this.each((t==null?fwe:typeof t=="function"?_we:cwe)(e,t,n??"")):Cp(this.node(),e)}function Cp(e,t){return e.style.getPropertyValue(t)||NN(e).getComputedStyle(e,null).getPropertyValue(t)}function hwe(e){return function(){delete this[e]}}function mwe(e,t){return function(){this[e]=t}}function gwe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function vwe(e,t){return arguments.length>1?this.each((t==null?hwe:typeof t=="function"?gwe:mwe)(e,t)):this.node()[e]}function FN(e){return e.trim().split(/^|\s+/)}function m2(e){return e.classList||new LN(e)}function LN(e){this._node=e,this._names=FN(e.getAttribute("class")||"")}LN.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 HN(e,t){for(var n=m2(e),i=-1,r=t.length;++i<r;)n.add(t[i])}function jN(e,t){for(var n=m2(e),i=-1,r=t.length;++i<r;)n.remove(t[i])}function bwe(e){return function(){HN(this,e)}}function ywe(e){return function(){jN(this,e)}}function wwe(e,t){return function(){(t.apply(this,arguments)?HN:jN)(this,e)}}function Twe(e,t){var n=FN(e+"");if(arguments.length<2){for(var i=m2(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?wwe:t?bwe:ywe)(n,t))}function kwe(){this.textContent=""}function Swe(e){return function(){this.textContent=e}}function Cwe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Pwe(e){return arguments.length?this.each(e==null?kwe:(typeof e=="function"?Cwe:Swe)(e)):this.node().textContent}function Ewe(){this.innerHTML=""}function Iwe(e){return function(){this.innerHTML=e}}function Awe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Dwe(e){return arguments.length?this.each(e==null?Ewe:(typeof e=="function"?Awe:Iwe)(e)):this.node().innerHTML}function Owe(){this.nextSibling&&this.parentNode.appendChild(this)}function Mwe(){return this.each(Owe)}function xwe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rwe(){return this.each(xwe)}function $we(e){var t=typeof e=="function"?e:MN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Nwe(){return null}function Fwe(e,t){var n=typeof e=="function"?e:MN(e),i=t==null?Nwe:typeof t=="function"?t:h2(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Lwe(){var e=this.parentNode;e&&e.removeChild(this)}function Hwe(){return this.each(Lwe)}function jwe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bwe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Uwe(e){return this.select(e?Bwe:jwe)}function qwe(e){return arguments.length?this.property("__data__",e):this.node().__data__}var BN={};if(typeof document<"u"){var Wwe=document.documentElement;"onmouseenter"in Wwe||(BN={mouseenter:"mouseover",mouseleave:"mouseout"})}function Vwe(e,t,n){return e=UN(e,t,n),function(i){var r=i.relatedTarget;(!r||r!==this&&!(r.compareDocumentPosition(this)&8))&&e.call(this,i)}}function UN(e,t,n){return function(i){try{e.call(this,this.__data__,t,n)}finally{}}}function zwe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Ywe(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,r=t.length,a;n<r;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.capture):t[++i]=a;++i?t.length=i:delete this.__on}}}function Gwe(e,t,n){var i=BN.hasOwnProperty(e.type)?Vwe:UN;return function(r,a,s){var o=this.__on,l,d=i(t,a,s);if(o){for(var c=0,v=o.length;c<v;++c)if((l=o[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=d,l.capture=n),l.value=t;return}}this.addEventListener(e.type,d,n),l={type:e.type,name:e.name,value:t,listener:d,capture:n},o?o.push(l):this.__on=[l]}}function Kwe(e,t,n){var i=zwe(e+""),r,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,d=o.length,c;l<d;++l)for(r=0,c=o[l];r<a;++r)if((s=i[r]).type===c.type&&s.name===c.name)return c.value}return}for(o=t?Gwe:Ywe,n==null&&(n=!1),r=0;r<a;++r)this.each(o(i[r],t,n));return this}function qN(e,t,n){var i=NN(e),r=i.CustomEvent;typeof r=="function"?r=new r(t,n):(r=i.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Xwe(e,t){return function(){return qN(this,e,t)}}function Qwe(e,t){return function(){return qN(this,e,t.apply(this,arguments))}}function Jwe(e,t){return this.each((typeof t=="function"?Qwe:Xwe)(e,t))}var WN=[null];function Rl(e,t){this._groups=e,this._parents=t}function $m(){return new Rl([[document.documentElement]],WN)}Rl.prototype=$m.prototype={constructor:Rl,select:Fye,selectAll:Hye,filter:jye,data:Vye,enter:Bye,exit:zye,join:Yye,merge:Gye,order:Kye,sort:Xye,call:Jye,nodes:Zye,node:ewe,size:twe,empty:nwe,each:iwe,attr:dwe,style:pwe,property:vwe,classed:Twe,text:Pwe,html:Dwe,raise:Mwe,lower:Rwe,append:$we,insert:Fwe,remove:Hwe,clone:Uwe,datum:qwe,on:Kwe,dispatch:Jwe};function Uv(e){return typeof e=="string"?new Rl([[document.querySelector(e)]],[document.documentElement]):new Rl([[e]],WN)}function g2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function VN(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Nm(){}var fm=.7,qv=1/fm,pp="\\s*([+-]?\\d+)\\s*",cm="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sd="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zwe=/^#([0-9a-f]{3,8})$/,e2e=new RegExp("^rgb\\("+[pp,pp,pp]+"\\)$"),t2e=new RegExp("^rgb\\("+[Sd,Sd,Sd]+"\\)$"),n2e=new RegExp("^rgba\\("+[pp,pp,pp,cm]+"\\)$"),i2e=new RegExp("^rgba\\("+[Sd,Sd,Sd,cm]+"\\)$"),r2e=new RegExp("^hsl\\("+[cm,Sd,Sd]+"\\)$"),a2e=new RegExp("^hsla\\("+[cm,Sd,Sd,cm]+"\\)$"),mD={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};g2(Nm,a_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:gD,formatHex:gD,formatHsl:s2e,formatRgb:vD,toString:vD});function gD(){return this.rgb().formatHex()}function s2e(){return zN(this).formatHsl()}function vD(){return this.rgb().formatRgb()}function a_(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zwe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bD(t):n===3?new Ol(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ev(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ev(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=e2e.exec(e))?new Ol(t[1],t[2],t[3],1):(t=t2e.exec(e))?new Ol(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=n2e.exec(e))?ev(t[1],t[2],t[3],t[4]):(t=i2e.exec(e))?ev(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=r2e.exec(e))?TD(t[1],t[2]/100,t[3]/100,1):(t=a2e.exec(e))?TD(t[1],t[2]/100,t[3]/100,t[4]):mD.hasOwnProperty(e)?bD(mD[e]):e==="transparent"?new Ol(NaN,NaN,NaN,0):null}function bD(e){return new Ol(e>>16&255,e>>8&255,e&255,1)}function ev(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ol(e,t,n,i)}function o2e(e){return e instanceof Nm||(e=a_(e)),e?(e=e.rgb(),new Ol(e.r,e.g,e.b,e.opacity)):new Ol}function _m(e,t,n,i){return arguments.length===1?o2e(e):new Ol(e,t,n,i??1)}function Ol(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}g2(Ol,_m,VN(Nm,{brighter:function(e){return e=e==null?qv:Math.pow(qv,e),new Ol(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?fm:Math.pow(fm,e),new Ol(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:yD,formatHex:yD,formatRgb:wD,toString:wD}));function yD(){return"#"+Ab(this.r)+Ab(this.g)+Ab(this.b)}function wD(){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 Ab(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function TD(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wd(e,t,n,i)}function zN(e){if(e instanceof wd)return new wd(e.h,e.s,e.l,e.opacity);if(e instanceof Nm||(e=a_(e)),!e)return new wd;if(e instanceof wd)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,o=a-r,l=(a+r)/2;return o?(t===a?s=(n-i)/o+(n<i)*6:n===a?s=(i-t)/o+2:s=(t-n)/o+4,o/=l<.5?a+r:2-a-r,s*=60):o=l>0&&l<1?0:s,new wd(s,o,l,e.opacity)}function Dy(e,t,n,i){return arguments.length===1?zN(e):new wd(e,t,n,i??1)}function wd(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}g2(wd,Dy,VN(Nm,{brighter:function(e){return e=e==null?qv:Math.pow(qv,e),new wd(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?fm:Math.pow(fm,e),new wd(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,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Ol(Db(e>=240?e-240:e+120,r,i),Db(e,r,i),Db(e<120?e+240:e-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 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 Db(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function N0(e){return function(){return e}}function YN(e,t){return function(n){return e+n*t}}function l2e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function u2e(e,t){var n=t-e;return n?YN(e,n>180||n<-180?n-360*Math.round(n/360):n):N0(isNaN(e)?t:e)}function d2e(e){return(e=+e)==1?Qh:function(t,n){return n-t?l2e(t,n,e):N0(isNaN(t)?n:t)}}function Qh(e,t){var n=t-e;return n?YN(e,n):N0(isNaN(e)?t:e)}const Wv=function e(t){var n=d2e(t);function i(r,a){var s=n((r=_m(r)).r,(a=_m(a)).r),o=n(r.g,a.g),l=n(r.b,a.b),d=Qh(r.opacity,a.opacity);return function(c){return r.r=s(c),r.g=o(c),r.b=l(c),r.opacity=d(c),r+""}}return i.gamma=e,i}(1);function f2e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}}function c2e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _2e(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,r=new Array(i),a=new Array(n),s;for(s=0;s<i;++s)r[s]=v2(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<i;++s)a[s]=r[s](o);return a}}function p2e(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function $u(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function h2e(e,t){var n={},i={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=v2(e[r],t[r]):i[r]=t[r];return function(a){for(r in n)i[r]=n[r](a);return i}}var Oy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ob=new RegExp(Oy.source,"g");function m2e(e){return function(){return e}}function g2e(e){return function(t){return e(t)+""}}function GN(e,t){var n=Oy.lastIndex=Ob.lastIndex=0,i,r,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Oy.exec(e))&&(r=Ob.exec(t));)(a=r.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:$u(i,r)})),n=Ob.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?g2e(l[0].x):m2e(t):(t=l.length,function(d){for(var c=0,v;c<t;++c)o[(v=l[c]).i]=v.x(d);return o.join("")})}function v2(e,t){var n=typeof t,i;return t==null||n==="boolean"?N0(t):(n==="number"?$u:n==="string"?(i=a_(t))?(t=i,Wv):GN:t instanceof a_?Wv:t instanceof Date?p2e:c2e(t)?f2e:Array.isArray(t)?_2e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?h2e:$u)(e,t)}function v2e(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var kD=180/Math.PI,My={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function KN(e,t,n,i,r,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,l/=o),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*kD,skewX:Math.atan(l)*kD,scaleX:s,scaleY:o}}var Rh,Mb,SD,tv;function b2e(e){return e==="none"?My:(Rh||(Rh=document.createElement("DIV"),Mb=document.documentElement,SD=document.defaultView),Rh.style.transform=e,e=SD.getComputedStyle(Mb.appendChild(Rh),null).getPropertyValue("transform"),Mb.removeChild(Rh),e=e.slice(7,-1).split(","),KN(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function y2e(e){return e==null||(tv||(tv=document.createElementNS("http://www.w3.org/2000/svg","g")),tv.setAttribute("transform",e),!(e=tv.transform.baseVal.consolidate()))?My:(e=e.matrix,KN(e.a,e.b,e.c,e.d,e.e,e.f))}function XN(e,t,n,i){function r(d){return d.length?d.pop()+" ":""}function a(d,c,v,T,b,A){if(d!==v||c!==T){var E=b.push("translate(",null,t,null,n);A.push({i:E-4,x:$u(d,v)},{i:E-2,x:$u(c,T)})}else(v||T)&&b.push("translate("+v+t+T+n)}function s(d,c,v,T){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),T.push({i:v.push(r(v)+"rotate(",null,i)-2,x:$u(d,c)})):c&&v.push(r(v)+"rotate("+c+i)}function o(d,c,v,T){d!==c?T.push({i:v.push(r(v)+"skewX(",null,i)-2,x:$u(d,c)}):c&&v.push(r(v)+"skewX("+c+i)}function l(d,c,v,T,b,A){if(d!==v||c!==T){var E=b.push(r(b)+"scale(",null,",",null,")");A.push({i:E-4,x:$u(d,v)},{i:E-2,x:$u(c,T)})}else(v!==1||T!==1)&&b.push(r(b)+"scale("+v+","+T+")")}return function(d,c){var v=[],T=[];return d=e(d),c=e(c),a(d.translateX,d.translateY,c.translateX,c.translateY,v,T),s(d.rotate,c.rotate,v,T),o(d.skewX,c.skewX,v,T),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,v,T),d=c=null,function(b){for(var A=-1,E=T.length,y;++A<E;)v[(y=T[A]).i]=y.x(b);return v.join("")}}}var w2e=XN(b2e,"px, ","px)","deg)"),T2e=XN(y2e,", ",")",")");function k2e(e){return function(t,n){var i=e((t=Dy(t)).h,(n=Dy(n)).h),r=Qh(t.s,n.s),a=Qh(t.l,n.l),s=Qh(t.opacity,n.opacity);return function(o){return t.h=i(o),t.s=r(o),t.l=a(o),t.opacity=s(o),t+""}}}const S2e=k2e(u2e);var Pp=0,Bh=0,$h=0,QN=1e3,Vv,Uh,zv=0,s_=0,F0=0,pm=typeof performance=="object"&&performance.now?performance:Date,JN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function L0(){return s_||(JN(C2e),s_=pm.now()+F0)}function C2e(){s_=0}function Yv(){this._call=this._time=this._next=null}Yv.prototype=ZN.prototype={constructor:Yv,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?L0():+n)+(t==null?0:+t),!this._next&&Uh!==this&&(Uh?Uh._next=this:Vv=this,Uh=this),this._call=e,this._time=n,xy()},stop:function(){this._call&&(this._call=null,this._time=1/0,xy())}};function ZN(e,t,n){var i=new Yv;return i.restart(e,t,n),i}function P2e(){L0(),++Pp;for(var e=Vv,t;e;)(t=s_-e._time)>=0&&e._call.call(null,t),e=e._next;--Pp}function CD(){s_=(zv=pm.now())+F0,Pp=Bh=0;try{P2e()}finally{Pp=0,I2e(),s_=0}}function E2e(){var e=pm.now(),t=e-zv;t>QN&&(F0-=t,zv=e)}function I2e(){for(var e,t=Vv,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Vv=n);Uh=e,xy(i)}function xy(e){if(!Pp){Bh&&(Bh=clearTimeout(Bh));var t=e-s_;t>24?(e<1/0&&(Bh=setTimeout(CD,e-pm.now()-F0)),$h&&($h=clearInterval($h))):($h||(zv=pm.now(),$h=setInterval(E2e,QN)),Pp=1,JN(CD))}}function PD(e,t,n){var i=new Yv;return t=t==null?0:+t,i.restart(function(r){i.stop(),e(r+t)},t,n),i}var A2e=ON("start","end","cancel","interrupt"),D2e=[],e5=0,ED=1,Ry=2,pv=3,ID=4,$y=5,hv=6;function H0(e,t,n,i,r,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;O2e(e,n,{name:t,index:i,group:r,on:A2e,tween:D2e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:e5})}function b2(e,t){var n=Wu(e,t);if(n.state>e5)throw new Error("too late; already scheduled");return n}function gf(e,t){var n=Wu(e,t);if(n.state>pv)throw new Error("too late; already running");return n}function Wu(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function O2e(e,t,n){var i=e.__transition,r;i[t]=n,n.timer=ZN(a,0,n.time);function a(d){n.state=ED,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var c,v,T,b;if(n.state!==ED)return l();for(c in i)if(b=i[c],b.name===n.name){if(b.state===pv)return PD(s);b.state===ID?(b.state=hv,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[c]):+c<t&&(b.state=hv,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[c])}if(PD(function(){n.state===pv&&(n.state=ID,n.timer.restart(o,n.delay,n.time),o(d))}),n.state=Ry,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ry){for(n.state=pv,r=new Array(T=n.tween.length),c=0,v=-1;c<T;++c)(b=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++v]=b);r.length=v+1}}function o(d){for(var c=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(l),n.state=$y,1),v=-1,T=r.length;++v<T;)r[v].call(e,c);n.state===$y&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=hv,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function M2e(e,t){var n=e.__transition,i,r,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((i=n[s]).name!==t){a=!1;continue}r=i.state>Ry&&i.state<$y,i.state=hv,i.timer.stop(),i.on.call(r?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[s]}a&&delete e.__transition}}function x2e(e){return this.each(function(){M2e(this,e)})}function R2e(e,t){var n,i;return function(){var r=gf(this,e),a=r.tween;if(a!==n){i=n=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function $2e(e,t,n){var i,r;if(typeof n!="function")throw new Error;return function(){var a=gf(this,e),s=a.tween;if(s!==i){r=(i=s).slice();for(var o={name:t,value:n},l=0,d=r.length;l<d;++l)if(r[l].name===t){r[l]=o;break}l===d&&r.push(o)}a.tween=r}}function N2e(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Wu(this.node(),n).tween,r=0,a=i.length,s;r<a;++r)if((s=i[r]).name===e)return s.value;return null}return this.each((t==null?R2e:$2e)(n,e,t))}function y2(e,t,n){var i=e._id;return e.each(function(){var r=gf(this,i);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Wu(r,i).value[t]}}function t5(e,t){var n;return(typeof t=="number"?$u:t instanceof a_?Wv:(n=a_(t))?(t=n,Wv):GN)(e,t)}function F2e(e){return function(){this.removeAttribute(e)}}function L2e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function H2e(e,t,n){var i,r=n+"",a;return function(){var s=this.getAttribute(e);return s===r?null:s===i?a:a=t(i=s,n)}}function j2e(e,t,n){var i,r=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===r?null:s===i?a:a=t(i=s,n)}}function B2e(e,t,n){var i,r,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===r?a:(r=l,a=t(i=s,o)))}}function U2e(e,t,n){var i,r,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===r?a:(r=l,a=t(i=s,o)))}}function q2e(e,t){var n=$0(e),i=n==="transform"?T2e:t5;return this.attrTween(e,typeof t=="function"?(n.local?U2e:B2e)(n,i,y2(this,"attr."+e,t)):t==null?(n.local?L2e:F2e)(n):(n.local?j2e:H2e)(n,i,t))}function W2e(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function V2e(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function z2e(e,t){var n,i;function r(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&V2e(e,a)),n}return r._value=t,r}function Y2e(e,t){var n,i;function r(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&W2e(e,a)),n}return r._value=t,r}function G2e(e,t){var n="attr."+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;var i=$0(e);return this.tween(n,(i.local?z2e:Y2e)(i,t))}function K2e(e,t){return function(){b2(this,e).delay=+t.apply(this,arguments)}}function X2e(e,t){return t=+t,function(){b2(this,e).delay=t}}function Q2e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K2e:X2e)(t,e)):Wu(this.node(),t).delay}function J2e(e,t){return function(){gf(this,e).duration=+t.apply(this,arguments)}}function Z2e(e,t){return t=+t,function(){gf(this,e).duration=t}}function eTe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J2e:Z2e)(t,e)):Wu(this.node(),t).duration}function tTe(e,t){if(typeof t!="function")throw new Error;return function(){gf(this,e).ease=t}}function nTe(e){var t=this._id;return arguments.length?this.each(tTe(t,e)):Wu(this.node(),t).ease}function iTe(e){typeof e!="function"&&(e=RN(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a=t[r],s=a.length,o=i[r]=[],l,d=0;d<s;++d)(l=a[d])&&e.call(l,l.__data__,d,a)&&o.push(l);return new _f(i,this._parents,this._name,this._id)}function rTe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,r=n.length,a=Math.min(i,r),s=new Array(i),o=0;o<a;++o)for(var l=t[o],d=n[o],c=l.length,v=s[o]=new Array(c),T,b=0;b<c;++b)(T=l[b]||d[b])&&(v[b]=T);for(;o<i;++o)s[o]=t[o];return new _f(s,this._parents,this._name,this._id)}function aTe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function sTe(e,t,n){var i,r,a=aTe(t)?b2:gf;return function(){var s=a(this,e),o=s.on;o!==i&&(r=(i=o).copy()).on(t,n),s.on=r}}function oTe(e,t){var n=this._id;return arguments.length<2?Wu(this.node(),n).on.on(e):this.each(sTe(n,e,t))}function lTe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function uTe(){return this.on("end.remove",lTe(this._id))}function dTe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=h2(e));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var o=i[s],l=o.length,d=a[s]=new Array(l),c,v,T=0;T<l;++T)(c=o[T])&&(v=e.call(c,c.__data__,T,o))&&("__data__"in c&&(v.__data__=c.__data__),d[T]=v,H0(d[T],t,n,T,d,Wu(c,n)));return new _f(a,this._parents,t,n)}function fTe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xN(e));for(var i=this._groups,r=i.length,a=[],s=[],o=0;o<r;++o)for(var l=i[o],d=l.length,c,v=0;v<d;++v)if(c=l[v]){for(var T=e.call(c,c.__data__,v,l),b,A=Wu(c,n),E=0,y=T.length;E<y;++E)(b=T[E])&&H0(b,t,n,E,T,A);a.push(T),s.push(c)}return new _f(a,s,t,n)}var cTe=$m.prototype.constructor;function _Te(){return new cTe(this._groups,this._parents)}function pTe(e,t){var n,i,r;return function(){var a=Cp(this,e),s=(this.style.removeProperty(e),Cp(this,e));return a===s?null:a===n&&s===i?r:r=t(n=a,i=s)}}function n5(e){return function(){this.style.removeProperty(e)}}function hTe(e,t,n){var i,r=n+"",a;return function(){var s=Cp(this,e);return s===r?null:s===i?a:a=t(i=s,n)}}function mTe(e,t,n){var i,r,a;return function(){var s=Cp(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Cp(this,e))),s===l?null:s===i&&l===r?a:(r=l,a=t(i=s,o))}}function gTe(e,t){var n,i,r,a="style."+t,s="end."+a,o;return function(){var l=gf(this,e),d=l.on,c=l.value[a]==null?o||(o=n5(t)):void 0;(d!==n||r!==c)&&(i=(n=d).copy()).on(s,r=c),l.on=i}}function vTe(e,t,n){var i=(e+="")=="transform"?w2e:t5;return t==null?this.styleTween(e,pTe(e,i)).on("end.style."+e,n5(e)):typeof t=="function"?this.styleTween(e,mTe(e,i,y2(this,"style."+e,t))).each(gTe(this._id,e)):this.styleTween(e,hTe(e,i,t),n).on("end.style."+e,null)}function bTe(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function yTe(e,t,n){var i,r;function a(){var s=t.apply(this,arguments);return s!==r&&(i=(r=s)&&bTe(e,s,n)),i}return a._value=t,a}function wTe(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,yTe(e,t,n??""))}function TTe(e){return function(){this.textContent=e}}function kTe(e){return function(){var t=e(this);this.textContent=t??""}}function STe(e){return this.tween("text",typeof e=="function"?kTe(y2(this,"text",e)):TTe(e==null?"":e+""))}function CTe(e){return function(t){this.textContent=e.call(this,t)}}function PTe(e){var t,n;function i(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&CTe(r)),t}return i._value=e,i}function ETe(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,PTe(e))}function ITe(){for(var e=this._name,t=this._id,n=i5(),i=this._groups,r=i.length,a=0;a<r;++a)for(var s=i[a],o=s.length,l,d=0;d<o;++d)if(l=s[d]){var c=Wu(l,t);H0(l,e,n,d,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _f(i,this._parents,e,n)}function ATe(){var e,t,n=this,i=n._id,r=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--r===0&&a()}};n.each(function(){var d=gf(this,i),c=d.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),d.on=t})})}var DTe=0;function _f(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function i5(){return++DTe}var Z_=$m.prototype;_f.prototype={constructor:_f,select:dTe,selectAll:fTe,filter:iTe,merge:rTe,selection:_Te,transition:ITe,call:Z_.call,nodes:Z_.nodes,node:Z_.node,size:Z_.size,empty:Z_.empty,each:Z_.each,on:oTe,attr:q2e,attrTween:G2e,style:vTe,styleTween:wTe,text:STe,textTween:ETe,remove:uTe,tween:N2e,delay:Q2e,duration:eTe,ease:nTe,end:ATe};function OTe(e){return+e}function MTe(e){return e*e}function xTe(e){return e*(2-e)}function AD(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function RTe(e){return e*e*e}function $Te(e){return--e*e*e+1}function r5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var w2=3,NTe=function e(t){t=+t;function n(i){return Math.pow(i,t)}return n.exponent=e,n}(w2),FTe=function e(t){t=+t;function n(i){return 1-Math.pow(1-i,t)}return n.exponent=e,n}(w2),LTe=function e(t){t=+t;function n(i){return((i*=2)<=1?Math.pow(i,t):2-Math.pow(2-i,t))/2}return n.exponent=e,n}(w2),a5=Math.PI,s5=a5/2;function HTe(e){return+e==1?1:1-Math.cos(e*s5)}function jTe(e){return Math.sin(e*s5)}function BTe(e){return(1-Math.cos(a5*e))/2}function oc(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function UTe(e){return oc(1-+e)}function qTe(e){return 1-oc(e)}function WTe(e){return((e*=2)<=1?oc(1-e):2-oc(e-1))/2}function VTe(e){return 1-Math.sqrt(1-e*e)}function zTe(e){return Math.sqrt(1- --e*e)}function YTe(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Ny=4/11,GTe=6/11,KTe=8/11,XTe=3/4,QTe=9/11,JTe=10/11,ZTe=15/16,eke=21/22,tke=63/64,nv=1/Ny/Ny;function nke(e){return 1-Gv(1-e)}function Gv(e){return(e=+e)<Ny?nv*e*e:e<KTe?nv*(e-=GTe)*e+XTe:e<JTe?nv*(e-=QTe)*e+ZTe:nv*(e-=eke)*e+tke}function ike(e){return((e*=2)<=1?1-Gv(1-e):Gv(e-1)+1)/2}var T2=1.70158,rke=function e(t){t=+t;function n(i){return(i=+i)*i*(t*(i-1)+i)}return n.overshoot=e,n}(T2),ake=function e(t){t=+t;function n(i){return--i*i*((i+1)*t+i)+1}return n.overshoot=e,n}(T2),ske=function e(t){t=+t;function n(i){return((i*=2)<1?i*i*((t+1)*i-t):(i-=2)*i*((t+1)*i+t)+2)/2}return n.overshoot=e,n}(T2),Ep=2*Math.PI,k2=1,S2=.3,oke=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ep);function r(a){return t*oc(- --a)*Math.sin((i-a)/n)}return r.amplitude=function(a){return e(a,n*Ep)},r.period=function(a){return e(t,a)},r}(k2,S2),DD=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ep);function r(a){return 1-t*oc(a=+a)*Math.sin((a+i)/n)}return r.amplitude=function(a){return e(a,n*Ep)},r.period=function(a){return e(t,a)},r}(k2,S2),lke=function e(t,n){var i=Math.asin(1/(t=Math.max(1,t)))*(n/=Ep);function r(a){return((a=a*2-1)<0?t*oc(-a)*Math.sin((i-a)/n):2-t*oc(a)*Math.sin((i+a)/n))/2}return r.amplitude=function(a){return e(a,n*Ep)},r.period=function(a){return e(t,a)},r}(k2,S2),Fy={time:null,delay:0,duration:250,ease:r5};function uke(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return Fy.time=L0(),Fy;return n}function dke(e){var t,n;e instanceof _f?(t=e._id,e=e._name):(t=i5(),(n=Fy).time=L0(),e=e==null?null:e+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var s=i[a],o=s.length,l,d=0;d<o;++d)(l=s[d])&&H0(l,e,t,d,s,n||uke(l,t));return new _f(i,this._parents,e,t)}$m.prototype.interrupt=x2e;$m.prototype.transition=dke;var Ly=Math.PI,Hy=2*Ly,Gc=1e-6,fke=Hy-Gc;function jy(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function C2(){return new jy}jy.prototype=C2.prototype={constructor:jy,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,n,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var a=this._x1,s=this._y1,o=n-e,l=i-t,d=a-e,c=s-t,v=d*d+c*c;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(v>Gc)if(!(Math.abs(c*o-l*d)>Gc)||!r)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var T=n-a,b=i-s,A=o*o+l*l,E=T*T+b*b,y=Math.sqrt(A),I=Math.sqrt(v),D=r*Math.tan((Ly-Math.acos((A+v-E)/(2*y*I)))/2),O=D/I,M=D/y;Math.abs(O-1)>Gc&&(this._+="L"+(e+O*d)+","+(t+O*c)),this._+="A"+r+","+r+",0,0,"+ +(c*T>d*b)+","+(this._x1=e+M*o)+","+(this._y1=t+M*l)}},arc:function(e,t,n,i,r,a){e=+e,t=+t,n=+n,a=!!a;var s=n*Math.cos(i),o=n*Math.sin(i),l=e+s,d=t+o,c=1^a,v=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+d:(Math.abs(this._x1-l)>Gc||Math.abs(this._y1-d)>Gc)&&(this._+="L"+l+","+d),n&&(v<0&&(v=v%Hy+Hy),v>fke?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=d):v>Gc&&(this._+="A"+n+","+n+",0,"+ +(v>=Ly)+","+c+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var tu="$";function Kv(){}Kv.prototype=o5.prototype={constructor:Kv,has:function(e){return tu+e in this},get:function(e){return this[tu+e]},set:function(e,t){return this[tu+e]=t,this},remove:function(e){var t=tu+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===tu&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===tu&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===tu&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===tu&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===tu&&++e;return e},empty:function(){for(var e in this)if(e[0]===tu)return!1;return!0},each:function(e){for(var t in this)t[0]===tu&&e(this[t],t.slice(1),this)}};function o5(e,t){var n=new Kv;if(e instanceof Kv)e.each(function(o,l){n.set(l,o)});else if(Array.isArray(e)){var i=-1,r=e.length,a;if(t==null)for(;++i<r;)n.set(i,e[i]);else for(;++i<r;)n.set(t(a=e[i],i,e),a)}else if(e)for(var s in e)n.set(s,e[s]);return n}function OD(){}var Uc=o5.prototype;OD.prototype={constructor:OD,has:Uc.has,add:function(e){return e+="",this[tu+e]=e,this},remove:Uc.remove,clear:Uc.clear,values:Uc.keys,size:Uc.size,empty:Uc.empty,each:Uc.each};function cke(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Ip(e){return e=Xv(Math.abs(e)),e?e[1]:NaN}function _ke(e,t){return function(n,i){for(var r=n.length,a=[],s=0,o=e[0],l=0;r>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(n.substring(r-=o,r+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function pke(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var hke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qv(e){if(!(t=hke.exec(e)))throw new Error("invalid format: "+e);var t;return new P2({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]})}Qv.prototype=P2.prototype;function P2(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+""}P2.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 mke(e){e:for(var t=e.length,n=1,i=-1,r;n<t;++n)switch(e[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+e[n])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var l5;function gke(e,t){var n=Xv(e,t);if(!n)return e+"";var i=n[0],r=n[1],a=r-(l5=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Xv(e,Math.max(0,t+a-1))[0]}function MD(e,t){var n=Xv(e,t);if(!n)return e+"";var i=n[0],r=n[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")}const xD={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:cke,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 MD(e*100,t)},r:MD,s:gke,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function RD(e){return e}var $D=Array.prototype.map,ND=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vke(e){var t=e.grouping===void 0||e.thousands===void 0?RD:_ke($D.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?RD:pke($D.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(v){v=Qv(v);var T=v.fill,b=v.align,A=v.sign,E=v.symbol,y=v.zero,I=v.width,D=v.comma,O=v.precision,M=v.trim,F=v.type;F==="n"?(D=!0,F="g"):xD[F]||(O===void 0&&(O=12),M=!0,F="g"),(y||T==="0"&&b==="=")&&(y=!0,T="0",b="=");var $=E==="$"?n:E==="#"&&/[boxX]/.test(F)?"0"+F.toLowerCase():"",L=E==="$"?i:/[%p]/.test(F)?s:"",j=xD[F],H=/[defgprs%]/.test(F);O=O===void 0?6:/[gprs]/.test(F)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function V(Q){var X=$,te=L,ne,be,ue;if(F==="c")te=j(Q)+te,Q="";else{Q=+Q;var Ce=Q<0||1/Q<0;if(Q=isNaN(Q)?l:j(Math.abs(Q),O),M&&(Q=mke(Q)),Ce&&+Q==0&&A!=="+"&&(Ce=!1),X=(Ce?A==="("?A:o:A==="-"||A==="("?"":A)+X,te=(F==="s"?ND[8+l5/3]:"")+te+(Ce&&A==="("?")":""),H){for(ne=-1,be=Q.length;++ne<be;)if(ue=Q.charCodeAt(ne),48>ue||ue>57){te=(ue===46?r+Q.slice(ne+1):Q.slice(ne))+te,Q=Q.slice(0,ne);break}}}D&&!y&&(Q=t(Q,1/0));var ie=X.length+Q.length+te.length,Y=ie<I?new Array(I-ie+1).join(T):"";switch(D&&y&&(Q=t(Y+Q,Y.length?I-te.length:1/0),Y=""),b){case"<":Q=X+Q+te+Y;break;case"=":Q=X+Y+Q+te;break;case"^":Q=Y.slice(0,ie=Y.length>>1)+X+Q+te+Y.slice(ie);break;default:Q=Y+X+Q+te;break}return a(Q)}return V.toString=function(){return v+""},V}function c(v,T){var b=d((v=Qv(v),v.type="f",v)),A=Math.max(-8,Math.min(8,Math.floor(Ip(T)/3)))*3,E=Math.pow(10,-A),y=ND[8+A/3];return function(I){return b(E*I)+y}}return{format:d,formatPrefix:c}}var iv,j0,u5;bke({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function bke(e){return iv=vke(e),j0=iv.format,u5=iv.formatPrefix,iv}function yke(e){return Math.max(0,-Ip(Math.abs(e)))}function wke(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ip(t)/3)))*3-Ip(Math.abs(e)))}function Tke(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ip(t)-Ip(e))+1}function Bp(){return Math.random()}(function e(t){function n(i,r){return i=i==null?0:+i,r=r==null?1:+r,arguments.length===1?(r=i,i=0):r-=i,function(){return t()*r+i}}return n.source=e,n})(Bp);const kke=function e(t){function n(i,r){var a,s;return i=i==null?0:+i,r=r==null?1:+r,function(){var o;if(a!=null)o=a,a=null;else do a=t()*2-1,o=t()*2-1,s=a*a+o*o;while(!s||s>1);return i+r*o*Math.sqrt(-2*Math.log(s)/s)}}return n.source=e,n}(Bp);(function e(t){function n(){var i=kke.source(t).apply(this,arguments);return function(){return Math.exp(i())}}return n.source=e,n})(Bp);const Ske=function e(t){function n(i){return function(){for(var r=0,a=0;a<i;++a)r+=t();return r}}return n.source=e,n}(Bp);(function e(t){function n(i){var r=Ske.source(t)(i);return function(){return r()/i}}return n.source=e,n})(Bp);(function e(t){function n(i){return function(){return-Math.log(1-t())/i}}return n.source=e,n})(Bp);function d5(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var f5=Array.prototype,Cke=f5.map,By=f5.slice;function Pke(e){return function(){return e}}function Eke(e){return+e}var FD=[0,1];function lp(e){return e}function Uy(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Pke(isNaN(t)?NaN:.5)}function LD(e){var t=e[0],n=e[e.length-1],i;return t>n&&(i=t,t=n,n=i),function(r){return Math.max(t,Math.min(n,r))}}function Ike(e,t,n){var i=e[0],r=e[1],a=t[0],s=t[1];return r<i?(i=Uy(r,i),a=n(s,a)):(i=Uy(i,r),a=n(a,s)),function(o){return a(i(o))}}function Ake(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=Uy(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var l=AN(e,o,1,i)-1;return a[l](r[l](o))}}function Dke(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Oke(){var e=FD,t=FD,n=v2,i,r,a,s=lp,o,l,d;function c(){return o=Math.min(e.length,t.length)>2?Ake:Ike,l=d=null,v}function v(T){return isNaN(T=+T)?a:(l||(l=o(e.map(i),t,n)))(i(s(T)))}return v.invert=function(T){return s(r((d||(d=o(t,e.map(i),$u)))(T)))},v.domain=function(T){return arguments.length?(e=Cke.call(T,Eke),s===lp||(s=LD(e)),c()):e.slice()},v.range=function(T){return arguments.length?(t=By.call(T),c()):t.slice()},v.rangeRound=function(T){return t=By.call(T),n=v2e,c()},v.clamp=function(T){return arguments.length?(s=T?LD(e):lp,v):s!==lp},v.interpolate=function(T){return arguments.length?(n=T,c()):n},v.unknown=function(T){return arguments.length?(a=T,v):a},function(T,b){return i=T,r=b,c()}}function Mke(e,t){return Oke()(e,t)}function xke(e,t,n,i){var r=Tye(e,t,n),a;switch(i=Qv(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=wke(r,s))&&(i.precision=a),u5(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Tke(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=yke(r))&&(i.precision=a-(i.type==="%")*2);break}}return j0(i)}function c5(e){var t=e.domain;return e.ticks=function(n){var i=t();return wye(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return xke(r[0],r[r.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=t(),r=0,a=i.length-1,s=i[r],o=i[a],l;return o<s&&(l=s,s=o,o=l,l=r,r=a,a=l),l=cv(s,o,n),l>0?(s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l,l=cv(s,o,n)):l<0&&(s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l,l=cv(s,o,n)),l>0?(i[r]=Math.floor(s/l)*l,i[a]=Math.ceil(o/l)*l,t(i)):l<0&&(i[r]=Math.ceil(s*l)/l,i[a]=Math.floor(o*l)/l,t(i)),e},e}function Jv(){var e=Mke(lp,lp);return e.copy=function(){return Dke(e,Jv())},d5.apply(e,arguments),c5(e)}function _5(){var e=0,t=1,n=1,i=[.5],r=[0,1],a;function s(l){return l<=l?r[AN(i,l,0,n)]:a}function o(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],o()):[e,t]},s.range=function(l){return arguments.length?(n=(r=By.call(l)).length-1,o()):r.slice()},s.invertExtent=function(l){var d=r.indexOf(l);return d<0?[NaN,NaN]:d<1?[e,i[0]]:d>=n?[i[n-1],t]:[i[d-1],i[d]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return _5().domain([e,t]).range(r).unknown(a)},d5.apply(c5(s),arguments)}function iu(e){return function(){return e}}var HD=Math.abs,Mo=Math.atan2,qc=Math.cos,Rke=Math.max,xb=Math.min,vd=Math.sin,up=Math.sqrt,xo=1e-12,hm=Math.PI,Zv=hm/2,$ke=2*hm;function Nke(e){return e>1?0:e<-1?hm:Math.acos(e)}function jD(e){return e>=1?Zv:e<=-1?-Zv:Math.asin(e)}function Fke(e){return e.innerRadius}function Lke(e){return e.outerRadius}function Hke(e){return e.startAngle}function jke(e){return e.endAngle}function Bke(e){return e&&e.padAngle}function Uke(e,t,n,i,r,a,s,o){var l=n-e,d=i-t,c=s-r,v=o-a,T=v*l-c*d;if(!(T*T<xo))return T=(c*(t-a)-v*(e-r))/T,[e+T*l,t+T*d]}function rv(e,t,n,i,r,a,s){var o=e-n,l=t-i,d=(s?a:-a)/up(o*o+l*l),c=d*l,v=-d*o,T=e+c,b=t+v,A=n+c,E=i+v,y=(T+A)/2,I=(b+E)/2,D=A-T,O=E-b,M=D*D+O*O,F=r-a,$=T*E-A*b,L=(O<0?-1:1)*up(Rke(0,F*F*M-$*$)),j=($*O-D*L)/M,H=(-$*D-O*L)/M,V=($*O+D*L)/M,Q=(-$*D+O*L)/M,X=j-y,te=H-I,ne=V-y,be=Q-I;return X*X+te*te>ne*ne+be*be&&(j=V,H=Q),{cx:j,cy:H,x01:-c,y01:-v,x11:j*(r/F-1),y11:H*(r/F-1)}}function qke(){var e=Fke,t=Lke,n=iu(0),i=null,r=Hke,a=jke,s=Bke,o=null;function l(){var d,c,v=+e.apply(this,arguments),T=+t.apply(this,arguments),b=r.apply(this,arguments)-Zv,A=a.apply(this,arguments)-Zv,E=HD(A-b),y=A>b;if(o||(o=d=C2()),T<v&&(c=T,T=v,v=c),!(T>xo))o.moveTo(0,0);else if(E>$ke-xo)o.moveTo(T*qc(b),T*vd(b)),o.arc(0,0,T,b,A,!y),v>xo&&(o.moveTo(v*qc(A),v*vd(A)),o.arc(0,0,v,A,b,y));else{var I=b,D=A,O=b,M=A,F=E,$=E,L=s.apply(this,arguments)/2,j=L>xo&&(i?+i.apply(this,arguments):up(v*v+T*T)),H=xb(HD(T-v)/2,+n.apply(this,arguments)),V=H,Q=H,X,te;if(j>xo){var ne=jD(j/v*vd(L)),be=jD(j/T*vd(L));(F-=ne*2)>xo?(ne*=y?1:-1,O+=ne,M-=ne):(F=0,O=M=(b+A)/2),($-=be*2)>xo?(be*=y?1:-1,I+=be,D-=be):($=0,I=D=(b+A)/2)}var ue=T*qc(I),Ce=T*vd(I),ie=v*qc(M),Y=v*vd(M);if(H>xo){var he=T*qc(D),Me=T*vd(D),Pe=v*qc(O),We=v*vd(O),qe;if(E<hm&&(qe=Uke(ue,Ce,Pe,We,he,Me,ie,Y))){var ee=ue-qe[0],G=Ce-qe[1],me=he-qe[0],Te=Me-qe[1],De=1/vd(Nke((ee*me+G*Te)/(up(ee*ee+G*G)*up(me*me+Te*Te)))/2),we=up(qe[0]*qe[0]+qe[1]*qe[1]);V=xb(H,(v-we)/(De-1)),Q=xb(H,(T-we)/(De+1))}}$>xo?Q>xo?(X=rv(Pe,We,ue,Ce,T,Q,y),te=rv(he,Me,ie,Y,T,Q,y),o.moveTo(X.cx+X.x01,X.cy+X.y01),Q<H?o.arc(X.cx,X.cy,Q,Mo(X.y01,X.x01),Mo(te.y01,te.x01),!y):(o.arc(X.cx,X.cy,Q,Mo(X.y01,X.x01),Mo(X.y11,X.x11),!y),o.arc(0,0,T,Mo(X.cy+X.y11,X.cx+X.x11),Mo(te.cy+te.y11,te.cx+te.x11),!y),o.arc(te.cx,te.cy,Q,Mo(te.y11,te.x11),Mo(te.y01,te.x01),!y))):(o.moveTo(ue,Ce),o.arc(0,0,T,I,D,!y)):o.moveTo(ue,Ce),!(v>xo)||!(F>xo)?o.lineTo(ie,Y):V>xo?(X=rv(ie,Y,he,Me,v,-V,y),te=rv(ue,Ce,Pe,We,v,-V,y),o.lineTo(X.cx+X.x01,X.cy+X.y01),V<H?o.arc(X.cx,X.cy,V,Mo(X.y01,X.x01),Mo(te.y01,te.x01),!y):(o.arc(X.cx,X.cy,V,Mo(X.y01,X.x01),Mo(X.y11,X.x11),!y),o.arc(0,0,v,Mo(X.cy+X.y11,X.cx+X.x11),Mo(te.cy+te.y11,te.cx+te.x11),y),o.arc(te.cx,te.cy,V,Mo(te.y11,te.x11),Mo(te.y01,te.x01),!y))):o.arc(0,0,v,M,O,y)}if(o.closePath(),d)return o=null,d+""||null}return l.centroid=function(){var d=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-hm/2;return[qc(c)*d,vd(c)*d]},l.innerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:iu(+d),l):e},l.outerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:iu(+d),l):t},l.cornerRadius=function(d){return arguments.length?(n=typeof d=="function"?d:iu(+d),l):n},l.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:iu(+d),l):i},l.startAngle=function(d){return arguments.length?(r=typeof d=="function"?d:iu(+d),l):r},l.endAngle=function(d){return arguments.length?(a=typeof d=="function"?d:iu(+d),l):a},l.padAngle=function(d){return arguments.length?(s=typeof d=="function"?d:iu(+d),l):s},l.context=function(d){return arguments.length?(o=d??null,l):o},l}function p5(e){this._context=e}p5.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 Wke(e){return new p5(e)}function Vke(e){return e[0]}function zke(e){return e[1]}function h5(){var e=Vke,t=zke,n=iu(!0),i=null,r=Wke,a=null;function s(o){var l,d=o.length,c,v=!1,T;for(i==null&&(a=r(T=C2())),l=0;l<=d;++l)!(l<d&&n(c=o[l],l,o))===v&&((v=!v)?a.lineStart():a.lineEnd()),v&&a.point(+e(c,l,o),+t(c,l,o));if(T)return a=null,T+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:iu(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:iu(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:iu(!!o),s):n},s.curve=function(o){return arguments.length?(r=o,i!=null&&(a=r(i)),s):r},s.context=function(o){return arguments.length?(o==null?i=a=null:a=r(i=o),s):i},s}function BD(e,t,n){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-n),e._x2,e._y2)}function E2(e,t){this._context=e,this._k=(1-t)/6}E2.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:BD(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:BD(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}};(function e(t){function n(i){return new E2(i,t)}return n.tension=function(i){return e(+i)},n})(0);function Yke(e,t,n){var i=e._x1,r=e._y1,a=e._x2,s=e._y2;if(e._l01_a>xo){var o=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);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>xo){var d=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*d+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*d+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,r,a,s,e._x2,e._y2)}function m5(e,t){this._context=e,this._alpha=t}m5.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 n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Yke(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}};const Gke=function e(t){function n(i){return t?new m5(i,t):new E2(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function UD(e){return e<0?-1:1}function qD(e,t,n){var i=e._x1-e._x0,r=t-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),o=(a*r+s*i)/(i+r);return(UD(a)+UD(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function WD(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rb(e,t,n){var i=e._x0,r=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,r+o*t,a-o,s-o*n,a,s)}function e0(e){this._context=e}e0.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:Rb(this,this._t0,WD(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 n=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,Rb(this,WD(this,n=qD(this,e,t)),n);break;default:Rb(this,this._t0,n=qD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};Object.create(e0.prototype).point=function(e,t){e0.prototype.point.call(this,t,e)};function Kke(e){return new e0(e)}function t0(){this._=null}function B0(e){e.U=e.C=e.L=e.R=e.P=e.N=null}t0.prototype={constructor:t0,insert:function(e,t){var n,i,r;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;n=e}else this._?(e=VD(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.R&&(Nh(this,n),e=n,n=e.U),n.C=!1,i.C=!0,Fh(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,e=i):(e===n.L&&(Fh(this,n),e=n,n=e.U),n.C=!1,i.C=!0,Nh(this,i))),n=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,n,i=e.L,r=e.R,a,s;if(i?r?a=VD(r):a=i:a=r,t?t.L===e?t.L=a:t.R=a:this._=a,i&&r?(s=a.C,a.C=e.C,a.L=i,i.U=a,a!==r?(t=a.U,a.U=e.U,e=a.R,t.L=e,a.R=r,r.U=a):(a.U=t,t=a,e=a.R)):(s=e.C,e=a),e&&(e.U=t),!s){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Nh(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Fh(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Nh(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,Fh(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Nh(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Fh(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Nh(e,t){var n=t,i=t.R,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function Fh(e,t){var n=t,i=t.L,r=n.U;r?r.L===n?r.L=i:r.R=i:e._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function VD(e){for(;e.L;)e=e.L;return e}function qh(e,t,n,i){var r=[null,null],a=Ro.push(r)-1;return r.left=e,r.right=t,n&&n0(r,e,t,n),i&&n0(r,t,e,i),Dl[e.index].halfedges.push(a),Dl[t.index].halfedges.push(a),r}function Lh(e,t,n){var i=[t,n];return i.left=e,i}function n0(e,t,n,i){!e[0]&&!e[1]?(e[0]=i,e.left=t,e.right=n):e.left===n?e[1]=i:e[0]=i}function Xke(e,t,n,i,r){var a=e[0],s=e[1],o=a[0],l=a[1],d=s[0],c=s[1],v=0,T=1,b=d-o,A=c-l,E;if(E=t-o,!(!b&&E>0)){if(E/=b,b<0){if(E<v)return;E<T&&(T=E)}else if(b>0){if(E>T)return;E>v&&(v=E)}if(E=i-o,!(!b&&E<0)){if(E/=b,b<0){if(E>T)return;E>v&&(v=E)}else if(b>0){if(E<v)return;E<T&&(T=E)}if(E=n-l,!(!A&&E>0)){if(E/=A,A<0){if(E<v)return;E<T&&(T=E)}else if(A>0){if(E>T)return;E>v&&(v=E)}if(E=r-l,!(!A&&E<0)){if(E/=A,A<0){if(E>T)return;E>v&&(v=E)}else if(A>0){if(E<v)return;E<T&&(T=E)}return!(v>0)&&!(T<1)||(v>0&&(e[0]=[o+v*b,l+v*A]),T<1&&(e[1]=[o+T*b,l+T*A])),!0}}}}}function Qke(e,t,n,i,r){var a=e[1];if(a)return!0;var s=e[0],o=e.left,l=e.right,d=o[0],c=o[1],v=l[0],T=l[1],b=(d+v)/2,A=(c+T)/2,E,y;if(T===c){if(b<t||b>=i)return;if(d>v){if(!s)s=[b,n];else if(s[1]>=r)return;a=[b,r]}else{if(!s)s=[b,r];else if(s[1]<n)return;a=[b,n]}}else if(E=(d-v)/(T-c),y=A-E*b,E<-1||E>1)if(d>v){if(!s)s=[(n-y)/E,n];else if(s[1]>=r)return;a=[(r-y)/E,r]}else{if(!s)s=[(r-y)/E,r];else if(s[1]<n)return;a=[(n-y)/E,n]}else if(c<T){if(!s)s=[t,E*t+y];else if(s[0]>=i)return;a=[i,E*i+y]}else{if(!s)s=[i,E*i+y];else if(s[0]<t)return;a=[t,E*t+y]}return e[0]=s,e[1]=a,!0}function Jke(e,t,n,i){for(var r=Ro.length,a;r--;)(!Qke(a=Ro[r],e,t,n,i)||!Xke(a,e,t,n,i)||!(Math.abs(a[0][0]-a[1][0])>vs||Math.abs(a[0][1]-a[1][1])>vs))&&delete Ro[r]}function Zke(e){return Dl[e.index]={site:e,halfedges:[]}}function eSe(e,t){var n=e.site,i=t.left,r=t.right;return n===r&&(r=i,i=n),r?Math.atan2(r[1]-i[1],r[0]-i[0]):(n===i?(i=t[1],r=t[0]):(i=t[0],r=t[1]),Math.atan2(i[0]-r[0],r[1]-i[1]))}function g5(e,t){return t[+(t.left!==e.site)]}function tSe(e,t){return t[+(t.left===e.site)]}function nSe(){for(var e=0,t=Dl.length,n,i,r,a;e<t;++e)if((n=Dl[e])&&(a=(i=n.halfedges).length)){var s=new Array(a),o=new Array(a);for(r=0;r<a;++r)s[r]=r,o[r]=eSe(n,Ro[i[r]]);for(s.sort(function(l,d){return o[d]-o[l]}),r=0;r<a;++r)o[r]=i[s[r]];for(r=0;r<a;++r)i[r]=o[r]}}function iSe(e,t,n,i){var r=Dl.length,a,s,o,l,d,c,v,T,b,A,E,y,I=!0;for(a=0;a<r;++a)if(s=Dl[a]){for(o=s.site,d=s.halfedges,l=d.length;l--;)Ro[d[l]]||d.splice(l,1);for(l=0,c=d.length;l<c;)A=tSe(s,Ro[d[l]]),E=A[0],y=A[1],v=g5(s,Ro[d[++l%c]]),T=v[0],b=v[1],(Math.abs(E-T)>vs||Math.abs(y-b)>vs)&&(d.splice(l,0,Ro.push(Lh(o,A,Math.abs(E-e)<vs&&i-y>vs?[e,Math.abs(T-e)<vs?b:i]:Math.abs(y-i)<vs&&n-E>vs?[Math.abs(b-i)<vs?T:n,i]:Math.abs(E-n)<vs&&y-t>vs?[n,Math.abs(T-n)<vs?b:t]:Math.abs(y-t)<vs&&E-e>vs?[Math.abs(b-t)<vs?T:e,t]:null))-1),++c);c&&(I=!1)}if(I){var D,O,M,F=1/0;for(a=0,I=null;a<r;++a)(s=Dl[a])&&(o=s.site,D=o[0]-e,O=o[1]-t,M=D*D+O*O,M<F&&(F=M,I=s));if(I){var $=[e,t],L=[e,i],j=[n,i],H=[n,t];I.halfedges.push(Ro.push(Lh(o=I.site,$,L))-1,Ro.push(Lh(o,L,j))-1,Ro.push(Lh(o,j,H))-1,Ro.push(Lh(o,H,$))-1)}}for(a=0;a<r;++a)(s=Dl[a])&&(s.halfedges.length||delete Dl[a])}var v5=[],I2;function rSe(){B0(this),this.x=this.y=this.arc=this.site=this.cy=null}function dp(e){var t=e.P,n=e.N;if(!(!t||!n)){var i=t.site,r=e.site,a=n.site;if(i!==a){var s=r[0],o=r[1],l=i[0]-s,d=i[1]-o,c=a[0]-s,v=a[1]-o,T=2*(l*v-d*c);if(!(T>=-uSe)){var b=l*l+d*d,A=c*c+v*v,E=(v*b-d*A)/T,y=(l*A-c*b)/T,I=v5.pop()||new rSe;I.arc=e,I.site=r,I.x=E+s,I.y=(I.cy=y+o)+Math.sqrt(E*E+y*y),e.circle=I;for(var D=null,O=mm._;O;)if(I.y<O.y||I.y===O.y&&I.x<=O.x)if(O.L)O=O.L;else{D=O.P;break}else if(O.R)O=O.R;else{D=O;break}mm.insert(D,I),D||(I2=I)}}}}function hp(e){var t=e.circle;t&&(t.P||(I2=t.N),mm.remove(t),v5.push(t),B0(t),e.circle=null)}var b5=[];function aSe(){B0(this),this.edge=this.site=this.circle=null}function zD(e){var t=b5.pop()||new aSe;return t.site=e,t}function $b(e){hp(e),mp.remove(e),b5.push(e),B0(e)}function sSe(e){var t=e.circle,n=t.x,i=t.cy,r=[n,i],a=e.P,s=e.N,o=[e];$b(e);for(var l=a;l.circle&&Math.abs(n-l.circle.x)<vs&&Math.abs(i-l.circle.cy)<vs;)a=l.P,o.unshift(l),$b(l),l=a;o.unshift(l),hp(l);for(var d=s;d.circle&&Math.abs(n-d.circle.x)<vs&&Math.abs(i-d.circle.cy)<vs;)s=d.N,o.push(d),$b(d),d=s;o.push(d),hp(d);var c=o.length,v;for(v=1;v<c;++v)d=o[v],l=o[v-1],n0(d.edge,l.site,d.site,r);l=o[0],d=o[c-1],d.edge=qh(l.site,d.site,null,r),dp(l),dp(d)}function oSe(e){for(var t=e[0],n=e[1],i,r,a,s,o=mp._;o;)if(a=y5(o,n)-t,a>vs)o=o.L;else if(s=t-lSe(o,n),s>vs){if(!o.R){i=o;break}o=o.R}else{a>-vs?(i=o.P,r=o):s>-vs?(i=o,r=o.N):i=r=o;break}Zke(e);var l=zD(e);if(mp.insert(i,l),!(!i&&!r)){if(i===r){hp(i),r=zD(i.site),mp.insert(l,r),l.edge=r.edge=qh(i.site,l.site),dp(i),dp(r);return}if(!r){l.edge=qh(i.site,l.site);return}hp(i),hp(r);var d=i.site,c=d[0],v=d[1],T=e[0]-c,b=e[1]-v,A=r.site,E=A[0]-c,y=A[1]-v,I=2*(T*y-b*E),D=T*T+b*b,O=E*E+y*y,M=[(y*D-b*O)/I+c,(T*O-E*D)/I+v];n0(r.edge,d,A,M),l.edge=qh(d,e,null,M),r.edge=qh(e,A,null,M),dp(i),dp(r)}}function y5(e,t){var n=e.site,i=n[0],r=n[1],a=r-t;if(!a)return i;var s=e.P;if(!s)return-1/0;n=s.site;var o=n[0],l=n[1],d=l-t;if(!d)return o;var c=o-i,v=1/a-1/d,T=c/d;return v?(-T+Math.sqrt(T*T-2*v*(c*c/(-2*d)-l+d/2+r-a/2)))/v+i:(i+o)/2}function lSe(e,t){var n=e.N;if(n)return y5(n,t);var i=e.site;return i[1]===t?i[0]:1/0}var vs=1e-6,uSe=1e-12,mp,Dl,mm,Ro;function dSe(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function fSe(e,t){return t[1]-e[1]||t[0]-e[0]}function YD(e,t){var n=e.sort(fSe).pop(),i,r,a;for(Ro=[],Dl=new Array(e.length),mp=new t0,mm=new t0;;)if(a=I2,n&&(!a||n[1]<a.y||n[1]===a.y&&n[0]<a.x))(n[0]!==i||n[1]!==r)&&(oSe(n),i=n[0],r=n[1]),n=e.pop();else if(a)sSe(a.arc);else break;if(nSe(),t){var s=+t[0][0],o=+t[0][1],l=+t[1][0],d=+t[1][1];Jke(s,o,l,d),iSe(s,o,l,d)}this.edges=Ro,this.cells=Dl,mp=mm=Ro=Dl=null}YD.prototype={constructor:YD,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(i){return g5(t,e[i])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,i){if(o=(a=n.halfedges).length)for(var r=n.site,a,s=-1,o,l,d=t[a[o-1]],c=d.left===r?d.right:d.left;++s<o;)l=c,d=t[a[s]],c=d.left===r?d.right:d.left,l&&c&&i<l.index&&i<c.index&&dSe(r,l,c)<0&&e.push([r.data,l.data,c.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,n){for(var i=this,r,a=i._found||0,s=i.cells.length,o;!(o=i.cells[a]);)if(++a>=s)return null;var l=e-o.site[0],d=t-o.site[1],c=l*l+d*d;do o=i.cells[r=a],a=null,o.halfedges.forEach(function(v){var T=i.edges[v],b=T.left;if(!((b===o.site||!b)&&!(b=T.right))){var A=e-b[0],E=t-b[1],y=A*A+E*E;y<c&&(c=y,a=b.index)}});while(a!==null);return i._found=r,n==null||c<=n*n?o.site:null}};function Wh(e,t,n){this.k=e,this.x=t,this.y=n}Wh.prototype={constructor:Wh,scale:function(e){return e===1?this:new Wh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Wh(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+")"}};Wh.prototype;function cSe(e){let t=e[1](e[0])+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,[r]){r&1&&t!==(t=i[1](i[0])+"")&&vt(n,t)},i:ot,o:ot,d(i){i&&_e(n)}}}function _Se(e,t,n){let{value:i}=t;function r(s){return Gn.isNil(s)?"-":typeof s=="string"?s:a(s)}function a(s){return Er.formatMoney(s,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}return e.$$set=s=>{"value"in s&&n(0,i=s.value)},[i,r]}class bi extends Qt{constructor(t){super(),Jt(this,t,_Se,cSe,Kt,{value:0})}}function GD(e){let t,n,i,r,a,s,o,l;const d=[hSe,pSe],c=[];function v(T,b){return b&20&&(r=null),r==null&&(r=!!(!Gn.isNil(T[2])&&T[4])),r?0:1}return a=v(e,-1),s=c[a]=d[a](e),{c(){t=P("td"),n=Le(e[1]),i=Le(": "),s.c(),o=On(),w(t,"class","col-lg-7 col-sm-8 results__row-title")},m(T,b){ce(T,t,b),m(t,n),m(t,i),c[a].m(T,b),ce(T,o,b),l=!0},p(T,b){(!l||b&2)&&vt(n,T[1]);let A=a;a=v(T,b),a===A?c[a].p(T,b):(pn(),W(c[A],1,1,()=>{c[A]=null}),hn(),s=c[a],s?s.p(T,b):(s=c[a]=d[a](T),s.c()),U(s,1),s.m(o.parentNode,o))},i(T){l||(U(s),l=!0)},o(T){W(s),l=!1},d(T){T&&_e(t),c[a].d(T),T&&_e(o)}}}function pSe(e){let t,n,i;return n=new bi({props:{value:e[0]}}),{c(){t=P("td"),re(n.$$.fragment),w(t,"class","col-lg-5 col-sm-4 text-right results__row-value")},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,a){const s={};a&1&&(s.value=r[0]),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function hSe(e){let t,n,i,r,a,s,o,l,d,c,v;return i=new bi({props:{value:e[0]}}),{c(){t=P("td"),n=P("span"),re(i.$$.fragment),r=P("div"),a=P("small"),s=Le(e[3]),l=P("div"),w(l,"class","d-none"),w(t,"class","col-lg-5 col-sm-4 text-right results__row-value")},m(T,b){ce(T,t,b),m(t,n),ae(i,n,null),m(n,r),m(r,a),m(a,s),m(t,l),l.innerHTML=e[2],e[8](l),d=!0,c||(v=l_(o=Rm.call(null,n,e[5])),c=!0)},p(T,b){const A={};b&1&&(A.value=T[0]),i.$set(A),(!d||b&8)&&vt(s,T[3]),o&&Ga(o.update)&&b&32&&o.update.call(null,T[5]),(!d||b&4)&&(l.innerHTML=T[2])},i(T){d||(U(i.$$.fragment,T),d=!0)},o(T){W(i.$$.fragment,T),d=!1},d(T){T&&_e(t),se(i),e[8](null),c=!1,v()}}}function mSe(e){let t,n,i=e[1]&&GD(e);return{c(){t=P("tr"),i&&i.c(),w(t,"class",e[6])},m(r,a){ce(r,t,a),i&&i.m(t,null),n=!0},p(r,[a]){r[1]?i?(i.p(r,a),a&2&&U(i,1)):(i=GD(r),i.c(),U(i,1),i.m(t,null)):i&&(pn(),W(i,1,1,()=>{i=null}),hn()),(!n||a&64)&&w(t,"class",r[6])},i(r){n||(U(i),n=!0)},o(r){W(i),n=!1},d(r){r&&_e(t),i&&i.d()}}}function gSe(e){return`results__row__${e.toLowerCase().replaceAll(" ","-")}`}function vSe(e,t,n){let i,{value:r}=t,{title:a=""}=t,{additionalClasses:s=""}=t,{tooltip:o=null}=t,{priceAdditionalInfo:l=""}=t,{showTooltip:d=!0}=t,c,v=gSe(a);function T(b){Oe[b?"unshift":"push"](()=>{c=b,n(5,c)})}return e.$$set=b=>{"value"in b&&n(0,r=b.value),"title"in b&&n(1,a=b.title),"additionalClasses"in b&&n(7,s=b.additionalClasses),"tooltip"in b&&n(2,o=b.tooltip),"priceAdditionalInfo"in b&&n(3,l=b.priceAdditionalInfo),"showTooltip"in b&&n(4,d=b.showTooltip)},e.$$.update=()=>{e.$$.dirty&128&&n(6,i=`${s} ${v}`)},[r,a,o,l,d,c,i,s,T]}class is extends Qt{constructor(t){super(),Jt(this,t,vSe,mSe,Kt,{value:0,title:1,additionalClasses:7,tooltip:2,priceAdditionalInfo:3,showTooltip:4})}}function KD(e){let t,n;return t=new is({props:{title:"Change in Wages",value:e[0].changeInWages,additionalClasses:"results__row__sub",tooltip:e[2](e[0].changeInWagesByCompanies)}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].changeInWages),r&1&&(a.tooltip=i[2](i[0].changeInWagesByCompanies)),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function XD(e){let t,n;return t=new is({props:{title:"New Wage Income",value:e[0].newWages}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].newWages),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function QD(e){let t,n;return t=new is({props:{title:"Change in Business Income",value:e[0].changeInBusinessIncome,additionalClasses:"results__row__sub",tooltip:e[2](e[0].changeInBusinessIncomeByCompanies)}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].changeInBusinessIncome),r&1&&(a.tooltip=i[2](i[0].changeInBusinessIncomeByCompanies)),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function JD(e){let t,n;return t=new is({props:{title:"Change in Payroll Tax Paid",value:e[0].changeInPayrollTax,additionalClasses:"results__row__sub",tooltip:e[2](e[0].changeInPayrollTaxByCompanies)}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].changeInPayrollTax),r&1&&(a.tooltip=i[2](i[0].changeInPayrollTaxByCompanies)),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function ZD(e){let t,n;return t=new is({props:{title:"New Business Income",value:e[0].newBusinessIncome}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].newBusinessIncome),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function eO(e){let t,n;return t=new is({props:{title:"Rental Income",value:e[0].resRentalIncome}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].resRentalIncome),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function bSe(e){let t,n;return t=new is({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function ySe(e){let t,n;return t=new is({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function tO(e){let t,n;return t=new is({props:{title:"Total State Tax",value:e[0].resStateTaxBeforePayments,additionalClasses:"results__row__total"}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].resStateTaxBeforePayments),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function nO(e){let t,n;return t=new is({props:{title:"Payments & Credits",value:e[0].resPaymentsAndCredits}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&1&&(a.value=i[0].resPaymentsAndCredits),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function wSe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I=!e[3](),D,O,M,F,$,L,j,H=!e[3](),V,Q,X,te,ne,be;i=new is({props:{title:"Wages",value:e[0].resWages}});let ue=e[0].changeInWages!=null&&KD(e),Ce=e[0].newWages!=null&&XD(e);s=new is({props:{title:"Interest & Dividends",value:e[0].resInterestAndDividents}}),o=new is({props:{title:"Capital Gains",value:e[0].resCapitalGains}}),l=new is({props:{title:"Business Income",value:e[0].resBusinessIncome,tooltip:`Only $${e[0].resBusinessIncome*-1} of total $${Math.round(e[0].businessIncomeWithoutEblLimit*-1)} business loss was accounted for due to EBL`,priceAdditionalInfo:"EBL Limited",showTooltip:e[1]}});let ie=e[0].changeInBusinessIncome!=null&&QD(e),Y=e[0].changeInPayrollTax!=null&&JD(e),he=e[0].newBusinessIncome!=null&&ZD(e),Me=!(e[0].resRentalIncome==0&&e[0].rentalRealEstateExpenses==0)&&eO(e);b=new is({props:{title:"Other Income",value:e[0].resOtherIncome}}),A=new is({props:{title:"Total Income",value:e[0].resIncTotal,additionalClasses:"results__row__total"}});let Pe=I&&bSe();O=new is({props:{title:"Adjustments",value:e[0].resIncAdjustments}}),M=new is({props:{title:"Itemized Deductions",value:e[0].resIncItemized}}),F=new is({props:{title:"Passthrough Deduction",value:e[0].resPassthroughDeduction}}),$=new is({props:{title:"Taxable Income",value:e[0].resTaxableIncome,additionalClasses:"results__row__total"}});let We=H&&ySe();Q=new is({props:{title:"Income Tax",value:e[0].resIncomeTax}}),X=new is({props:{title:"SE Tax",value:e[0].resSeTax}}),te=new is({props:{title:"Total Federal Tax",value:e[0].resTotalTax,additionalClasses:"results__row__total"}});let qe=e[0].resStateTaxShouldDisplay&&tO(e),ee=e[0].resPaymentsAndCredits!=null&&nO(e);return{c(){t=P("table"),n=P("tbody"),re(i.$$.fragment),ue&&ue.c(),r=On(),Ce&&Ce.c(),a=On(),re(s.$$.fragment),re(o.$$.fragment),re(l.$$.fragment),ie&&ie.c(),d=On(),Y&&Y.c(),c=On(),he&&he.c(),v=On(),Me&&Me.c(),T=On(),re(b.$$.fragment),re(A.$$.fragment),E=P("table"),y=P("tbody"),Pe&&Pe.c(),D=On(),re(O.$$.fragment),re(M.$$.fragment),re(F.$$.fragment),re($.$$.fragment),L=P("table"),j=P("tbody"),We&&We.c(),V=On(),re(Q.$$.fragment),re(X.$$.fragment),re(te.$$.fragment),qe&&qe.c(),ne=On(),ee&&ee.c(),w(t,"class","summary-block table table-striped"),w(E,"class","summary-block table table-striped"),w(L,"class","summary-block table table-striped")},m(G,me){ce(G,t,me),m(t,n),ae(i,n,null),ue&&ue.m(n,null),m(n,r),Ce&&Ce.m(n,null),m(n,a),ae(s,n,null),ae(o,n,null),ae(l,n,null),ie&&ie.m(n,null),m(n,d),Y&&Y.m(n,null),m(n,c),he&&he.m(n,null),m(n,v),Me&&Me.m(n,null),m(n,T),ae(b,n,null),ae(A,n,null),ce(G,E,me),m(E,y),Pe&&Pe.m(y,null),m(y,D),ae(O,y,null),ae(M,y,null),ae(F,y,null),ae($,y,null),ce(G,L,me),m(L,j),We&&We.m(j,null),m(j,V),ae(Q,j,null),ae(X,j,null),ae(te,j,null),qe&&qe.m(j,null),m(j,ne),ee&&ee.m(j,null),be=!0},p(G,[me]){const Te={};me&1&&(Te.value=G[0].resWages),i.$set(Te),G[0].changeInWages!=null?ue?(ue.p(G,me),me&1&&U(ue,1)):(ue=KD(G),ue.c(),U(ue,1),ue.m(n,r)):ue&&(pn(),W(ue,1,1,()=>{ue=null}),hn()),G[0].newWages!=null?Ce?(Ce.p(G,me),me&1&&U(Ce,1)):(Ce=XD(G),Ce.c(),U(Ce,1),Ce.m(n,a)):Ce&&(pn(),W(Ce,1,1,()=>{Ce=null}),hn());const De={};me&1&&(De.value=G[0].resInterestAndDividents),s.$set(De);const we={};me&1&&(we.value=G[0].resCapitalGains),o.$set(we);const Ve={};me&1&&(Ve.value=G[0].resBusinessIncome),me&1&&(Ve.tooltip=`Only $${G[0].resBusinessIncome*-1} of total $${Math.round(G[0].businessIncomeWithoutEblLimit*-1)} business loss was accounted for due to EBL`),l.$set(Ve),G[0].changeInBusinessIncome!=null?ie?(ie.p(G,me),me&1&&U(ie,1)):(ie=QD(G),ie.c(),U(ie,1),ie.m(n,d)):ie&&(pn(),W(ie,1,1,()=>{ie=null}),hn()),G[0].changeInPayrollTax!=null?Y?(Y.p(G,me),me&1&&U(Y,1)):(Y=JD(G),Y.c(),U(Y,1),Y.m(n,c)):Y&&(pn(),W(Y,1,1,()=>{Y=null}),hn()),G[0].newBusinessIncome!=null?he?(he.p(G,me),me&1&&U(he,1)):(he=ZD(G),he.c(),U(he,1),he.m(n,v)):he&&(pn(),W(he,1,1,()=>{he=null}),hn()),G[0].resRentalIncome==0&&G[0].rentalRealEstateExpenses==0?Me&&(pn(),W(Me,1,1,()=>{Me=null}),hn()):Me?(Me.p(G,me),me&1&&U(Me,1)):(Me=eO(G),Me.c(),U(Me,1),Me.m(n,T));const Ke={};me&1&&(Ke.value=G[0].resOtherIncome),b.$set(Ke);const yt={};me&1&&(yt.value=G[0].resIncTotal),A.$set(yt);const ht={};me&1&&(ht.value=G[0].resIncAdjustments),O.$set(ht);const Je={};me&1&&(Je.value=G[0].resIncItemized),M.$set(Je);const pt={};me&1&&(pt.value=G[0].resPassthroughDeduction),F.$set(pt);const Tt={};me&1&&(Tt.value=G[0].resTaxableIncome),$.$set(Tt);const it={};me&1&&(it.value=G[0].resIncomeTax),Q.$set(it);const Ge={};me&1&&(Ge.value=G[0].resSeTax),X.$set(Ge);const st={};me&1&&(st.value=G[0].resTotalTax),te.$set(st),G[0].resStateTaxShouldDisplay?qe?(qe.p(G,me),me&1&&U(qe,1)):(qe=tO(G),qe.c(),U(qe,1),qe.m(j,ne)):qe&&(pn(),W(qe,1,1,()=>{qe=null}),hn()),G[0].resPaymentsAndCredits!=null?ee?(ee.p(G,me),me&1&&U(ee,1)):(ee=nO(G),ee.c(),U(ee,1),ee.m(j,null)):ee&&(pn(),W(ee,1,1,()=>{ee=null}),hn())},i(G){be||(U(i.$$.fragment,G),U(ue),U(Ce),U(s.$$.fragment,G),U(o.$$.fragment,G),U(l.$$.fragment,G),U(ie),U(Y),U(he),U(Me),U(b.$$.fragment,G),U(A.$$.fragment,G),U(Pe),U(O.$$.fragment,G),U(M.$$.fragment,G),U(F.$$.fragment,G),U($.$$.fragment,G),U(We),U(Q.$$.fragment,G),U(X.$$.fragment,G),U(te.$$.fragment,G),U(qe),U(ee),be=!0)},o(G){W(i.$$.fragment,G),W(ue),W(Ce),W(s.$$.fragment,G),W(o.$$.fragment,G),W(l.$$.fragment,G),W(ie),W(Y),W(he),W(Me),W(b.$$.fragment,G),W(A.$$.fragment,G),W(Pe),W(O.$$.fragment,G),W(M.$$.fragment,G),W(F.$$.fragment,G),W($.$$.fragment,G),W(We),W(Q.$$.fragment,G),W(X.$$.fragment,G),W(te.$$.fragment,G),W(qe),W(ee),be=!1},d(G){G&&_e(t),se(i),ue&&ue.d(),Ce&&Ce.d(),se(s),se(o),se(l),ie&&ie.d(),Y&&Y.d(),he&&he.d(),Me&&Me.d(),se(b),se(A),G&&_e(E),Pe&&Pe.d(),se(O),se(M),se(F),se($),G&&_e(L),We&&We.d(),se(Q),se(X),se(te),qe&&qe.d(),ee&&ee.d()}}}function TSe(e,t,n){let{personalProjection:i}=t,r=i.resBusinessIncome>i.businessIncomeWithoutEblLimit;function a(l){return Object.entries(l).filter(([d,c])=>Array.isArray(c)?c[0]!=0:c!=0).map(([d,c])=>`<b>${Ys.escape(d)}:</b> ${Array.isArray(c)?`${s(c[0])} ${c[1]<0?`- ${s(-c[1])}`:`+ ${s(c[1])}`}`:s(c)}`).join("<br>")}function s(l){return Er.formatMoney(l,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}function o(){return[i.changeInWages!=null,i.newWages!=null,i.changeInBusinessIncome!=null,i.changeInPayrollTax!=null,i.newBusinessIncome!=null,!(i.resRentalIncome==0&&i.rentalRealEstateExpenses==0)].filter(l=>l).length%2===0}return e.$$set=l=>{"personalProjection"in l&&n(0,i=l.personalProjection)},[i,r,a,o]}class w5 extends Qt{constructor(t){super(),Jt(this,t,TSe,wSe,Kt,{personalProjection:0})}}function kSe(e){let t;return{c(){t=Vh("g"),w(t,"class","axis"),w(t,"transform",e[1])},m(n,i){ce(n,t,i),e[9](t)},p(n,[i]){i&2&&w(t,"transform",n[1])},i:ot,o:ot,d(n){n&&_e(t),e[9](null)}}}function SSe(e,t,n){let{width:i}=t,{height:r}=t,{margin:a}=t,{position:s}=t,{scale:o}=t,{label:l=b=>b}=t,{caption:d}=t,c,v;function T(b){Oe[b?"unshift":"push"](()=>{v=b,n(0,v)})}return e.$$set=b=>{"width"in b&&n(2,i=b.width),"height"in b&&n(3,r=b.height),"margin"in b&&n(4,a=b.margin),"position"in b&&n(5,s=b.position),"scale"in b&&n(6,o=b.scale),"label"in b&&n(7,l=b.label),"caption"in b&&n(8,d=b.caption)},e.$$.update=()=>{if(e.$$.dirty&509){Uv(v).selectAll("*").remove();let b,A;switch(s){case"bottom":b=Aye(o).tickSizeOuter(0).tickFormat(l).ticks(5,"f"),n(1,c=`translate(0, ${r-a.bottom})`),A=`translate(${(i+a.left)/2}, 40)`;break;case"left":b=Dye(o).tickSizeOuter(0).tickFormat(l),n(1,c=`translate(${a.left}, 0)`),A=`rotate(-90),translate(-${(r-a.bottom)/2}, -60)`}Uv(v).call(b).append("text").attr("transform",A).attr("fill","black").style("text-anchor","middle").text(d)}},[v,c,i,r,a,s,o,l,d,T]}class iO extends Qt{constructor(t){super(),Jt(this,t,SSe,kSe,Kt,{width:2,height:3,margin:4,position:5,scale:6,label:7,caption:8})}}function rO(e,t,n){const i=e.slice();return i[30]=t[n],i[31]=t,i[32]=n,i}function aO(e,t,n){const i=e.slice();return i[33]=t[n][0],i[34]=t[n][1],i}function sO(e){let t,n,i;return{c(){t=P("div"),n=P("div"),i=P("div"),w(i,"class","planning-description__left"),w(n,"class","card-body"),w(t,"class","card mb-3 flex-align")},m(r,a){ce(r,t,a),m(t,n),m(n,i),i.innerHTML=e[2]},p(r,a){a[0]&4&&(i.innerHTML=r[2])},d(r){r&&_e(t)}}}function oO(e){let t,n,i,r;return{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Concept Resources</h3>',i=K(),r=P("div"),w(n,"class","card-header"),w(r,"class","card-body planning-module-placeholder__calculation-body"),w(t,"class","card mb-3 flex-align planning-module-placeholder")},m(a,s){ce(a,t,s),m(t,n),m(t,i),m(t,r),r.innerHTML=e[3]},p(a,s){s[0]&8&&(r.innerHTML=a[3])},d(a){a&&_e(t)}}}function CSe(e){let t,n,i=Object.entries(e[1].changeInWagesByCompanies),r=[];for(let a=0;a<i.length;a+=1)r[a]=lO(aO(e,i,a));return{c(){t=P("table"),n=P("tbody");for(let a=0;a<r.length;a+=1)r[a].c();w(n,"class","svelte-1yzrn2v"),w(t,"class","table table____no-top-border svelte-1yzrn2v")},m(a,s){ce(a,t,s),m(t,n);for(let o=0;o<r.length;o+=1)r[o]&&r[o].m(n,null)},p(a,s){if(s[0]&65538){i=Object.entries(a[1].changeInWagesByCompanies);let o;for(o=0;o<i.length;o+=1){const l=aO(a,i,o);r[o]?r[o].p(l,s):(r[o]=lO(l),r[o].c(),r[o].m(n,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=i.length}},d(a){a&&_e(t),Nn(r,a)}}}function PSe(e){let t;return{c(){t=P("center"),t.innerHTML="<i>No adjustments required</i>"},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function ESe(e){let t;return{c(){t=P("center"),t.innerHTML="<i>Hold tight, we&#39;re optimizing your taxes...</i>"},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function lO(e){let t,n,i,r=e[33]+"",a,s,o,l,d=e[16](e[34])+"",c,v;return{c(){t=P("tr"),n=P("td"),i=P("b"),a=Le(r),s=Le(`
                        :`),o=K(),l=P("td"),c=Le(d),v=K(),w(n,"class","svelte-1yzrn2v"),w(l,"class","svelte-1yzrn2v"),w(t,"class","svelte-1yzrn2v")},m(T,b){ce(T,t,b),m(t,n),m(n,i),m(i,a),m(n,s),m(t,o),m(t,l),m(l,c),m(t,v)},p(T,b){b[0]&2&&r!==(r=T[33]+"")&&vt(a,r),b[0]&2&&d!==(d=T[16](T[34])+"")&&vt(c,d)},d(T){T&&_e(t)}}}function uO(e){let t,n,i,r,a,s,o,l,d;n=new iO({props:{width:e[7],height:i0,margin:e[14],scale:e[4],position:"bottom",label:e[15],caption:"Total Salaries Adjustment"}}),i=new iO({props:{width:e[7],height:i0,margin:e[14],scale:e[5],position:"left",label:e[15],caption:"Total Tax"}});let c=e[0],v=[];for(let T=0;T<c.length;T+=1)v[T]=dO(rO(e,c,T));return{c(){t=Vh("svg"),re(n.$$.fragment),re(i.$$.fragment),r=Vh("g"),a=Vh("path");for(let T=0;T<v.length;T+=1)v[T].c();o=K(),l=P("div"),w(a,"d",s=e[10](e[0])),w(a,"fill","none"),w(a,"stroke","steelblue"),w(a,"stroke-width","1.5"),w(t,"transform","translate(0, 0)"),w(t,"class","svelte-1yzrn2v"),w(l,"class","tooltip svelte-1yzrn2v"),w(l,"style",e[13]),wt(l,"tooltip__visible",e[12]),wt(l,"tooltip__invisible",!e[12])},m(T,b){ce(T,t,b),ae(n,t,null),ae(i,t,null),m(t,r),m(r,a);for(let A=0;A<v.length;A+=1)v[A]&&v[A].m(t,null);e[25](t),ce(T,o,b),ce(T,l,b),l.innerHTML=e[11],d=!0},p(T,b){const A={};b[0]&128&&(A.width=T[7]),b[0]&16&&(A.scale=T[4]),n.$set(A);const E={};if(b[0]&128&&(E.width=T[7]),b[0]&32&&(E.scale=T[5]),i.$set(E),(!d||b[0]&1025&&s!==(s=T[10](T[0])))&&w(a,"d",s),b[0]&135217){c=T[0];let y;for(y=0;y<c.length;y+=1){const I=rO(T,c,y);v[y]?v[y].p(I,b):(v[y]=dO(I),v[y].c(),v[y].m(t,null))}for(;y<v.length;y+=1)v[y].d(1);v.length=c.length}(!d||b[0]&2048)&&(l.innerHTML=T[11]),(!d||b[0]&8192)&&w(l,"style",T[13]),(!d||b[0]&4096)&&wt(l,"tooltip__visible",T[12]),(!d||b[0]&4096)&&wt(l,"tooltip__invisible",!T[12])},i(T){d||(U(n.$$.fragment,T),U(i.$$.fragment,T),d=!0)},o(T){W(n.$$.fragment,T),W(i.$$.fragment,T),d=!1},d(T){T&&_e(t),se(n),se(i),Nn(v,T),e[25](null),T&&_e(o),T&&_e(l)}}}function dO(e){let t,n,i,r=e[31],a=e[32],s,o;const l=()=>e[21](t,r,a),d=()=>e[21](null,r,a);function c(...v){return e[23](e[30],...v)}return{c(){t=Vh("circle"),w(t,"cx",n=e[4](+e[30].delta)),w(t,"cy",i=e[5](+e[30].tax)),w(t,"r",3),w(t,"fill","white"),w(t,"stroke","rebeccapurple"),w(t,"stroke-width","1.5")},m(v,T){ce(v,t,T),l(),s||(o=[ct(t,"mouseover",e[22]),ct(t,"mousemove",c),ct(t,"mouseleave",e[24])],s=!0)},p(v,T){e=v,T[0]&17&&n!==(n=e[4](+e[30].delta))&&w(t,"cx",n),T[0]&33&&i!==(i=e[5](+e[30].tax))&&w(t,"cy",i),(r!==e[31]||a!==e[32])&&(d(),r=e[31],a=e[32],l())},d(v){v&&_e(t),d(),s=!1,vi(o)}}}function ISe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st=e[2]&&sO(e),It=e[3]&&oO(e);function Ct(nn,Qe){return Qe[0]&2&&(M=null),nn[8]?ESe:(M==null&&(M=!!Ys.isEmpty(nn[1].changeInWagesByCompanies)),M?PSe:CSe)}let bt=Ct(e,[-1,-1]),Rt=bt(e);Pe=new w5({props:{personalProjection:e[1]}});let cn=e[7]&&uO(e);return{c(){t=P("section"),n=P("div"),i=P("div"),st&&st.c(),r=K(),It&&It.c(),a=K(),s=P("div"),o=P("div"),l=P("span"),d=K(),c=P("span"),v=K(),T=P("span"),A=K(),E=P("div"),y=P("div"),y.innerHTML='<h3 class="card-title mb-0">Per Company Payroll Adjustments</h3>',I=K(),D=P("div"),O=P("div"),Rt.c(),F=K(),$=P("div"),L=P("div"),j=P("div"),H=P("span"),V=K(),Q=P("span"),X=K(),te=P("span"),be=K(),ue=P("div"),Ce=P("div"),ie=P("div"),ie.innerHTML='<h3 class="card-title mb-0">Personal Summary</h3>',Y=K(),he=P("div"),Me=P("div"),re(Pe.$$.fragment),We=K(),qe=P("div"),ee=P("div"),G=P("span"),me=K(),Te=P("span"),De=K(),we=P("span"),Ke=K(),yt=P("div"),ht=P("div"),Je=P("div"),Je.innerHTML='<h3 class="card-title mb-0">Federal Tax Due by Wages</h3>',pt=K(),Tt=P("div"),cn&&cn.c(),w(i,"class","col-lg-6 d-flex flex-column flex-grow-1"),w(l,"class","qbid-salary-maximizer__spinner-bounce1 svelte-1yzrn2v"),w(c,"class","qbid-salary-maximizer__spinner-bounce2 svelte-1yzrn2v"),w(T,"class","qbid-salary-maximizer__spinner-bounce3 svelte-1yzrn2v"),w(o,"class","qbid-salary-maximizer__spinner svelte-1yzrn2v"),o.hidden=b=!e[8],w(y,"class","card-header"),w(O,"class","planning-description__right"),w(D,"class","card-body"),w(E,"class","card mb-3 flex-align svelte-1yzrn2v"),wt(E,"qbid-salary-maximizer__blur",e[8]),w(s,"class","col-lg-6 d-flex flex-column flex-grow-1"),w(n,"class","row"),w(H,"class","qbid-salary-maximizer__spinner-bounce1 svelte-1yzrn2v"),w(Q,"class","qbid-salary-maximizer__spinner-bounce2 svelte-1yzrn2v"),w(te,"class","qbid-salary-maximizer__spinner-bounce3 svelte-1yzrn2v"),w(j,"class","qbid-salary-maximizer__spinner svelte-1yzrn2v"),j.hidden=ne=!e[8],w(ie,"class","card-header"),w(Me,"class","js-personal-projection-body"),w(he,"class","card-body d-flex flex-column h-100"),w(Ce,"class","card mb-3 flex-align"),w(ue,"class","svelte-1yzrn2v"),wt(ue,"qbid-salary-maximizer__blur",e[8]),w(L,"class","col-sm-12 col-sm-6 col-lg-6 col-xl-6 d-flex flex-column"),w(G,"class","qbid-salary-maximizer__spinner-bounce1 svelte-1yzrn2v"),w(Te,"class","qbid-salary-maximizer__spinner-bounce2 svelte-1yzrn2v"),w(we,"class","qbid-salary-maximizer__spinner-bounce3 svelte-1yzrn2v"),w(ee,"class","qbid-salary-maximizer__spinner svelte-1yzrn2v"),ee.hidden=Ve=!e[8],w(Je,"class","card-header"),w(Tt,"class","card-body d-flex flex-column h-100 chart svelte-1yzrn2v"),cr(Tt,"--height",i0+20+"px"),xa(()=>e[26].call(Tt)),w(ht,"class","card mb-3 flex-align"),w(yt,"class","svelte-1yzrn2v"),wt(yt,"qbid-salary-maximizer__blur",e[8]),w(qe,"class","col-sm-12 col-sm-6 col-lg-6 col-xl-6 d-flex flex-column"),w($,"class","row"),w(t,"id","main-content")},m(nn,Qe){ce(nn,t,Qe),m(t,n),m(n,i),st&&st.m(i,null),m(i,r),It&&It.m(i,null),m(n,a),m(n,s),m(s,o),m(o,l),m(o,d),m(o,c),m(o,v),m(o,T),m(s,A),m(s,E),m(E,y),m(E,I),m(E,D),m(D,O),Rt.m(O,null),m(t,F),m(t,$),m($,L),m(L,j),m(j,H),m(j,V),m(j,Q),m(j,X),m(j,te),m(L,be),m(L,ue),m(ue,Ce),m(Ce,ie),m(Ce,Y),m(Ce,he),m(he,Me),ae(Pe,Me,null),m($,We),m($,qe),m(qe,ee),m(ee,G),m(ee,me),m(ee,Te),m(ee,De),m(ee,we),m(qe,Ke),m(qe,yt),m(yt,ht),m(ht,Je),m(ht,pt),m(ht,Tt),cn&&cn.m(Tt,null),it=A7(Tt,e[26].bind(Tt)),Ge=!0},p(nn,Qe){nn[2]?st?st.p(nn,Qe):(st=sO(nn),st.c(),st.m(i,r)):st&&(st.d(1),st=null),nn[3]?It?It.p(nn,Qe):(It=oO(nn),It.c(),It.m(i,null)):It&&(It.d(1),It=null),(!Ge||Qe[0]&256&&b!==(b=!nn[8]))&&(o.hidden=b),bt===(bt=Ct(nn,Qe))&&Rt?Rt.p(nn,Qe):(Rt.d(1),Rt=bt(nn),Rt&&(Rt.c(),Rt.m(O,null))),(!Ge||Qe[0]&256)&&wt(E,"qbid-salary-maximizer__blur",nn[8]),(!Ge||Qe[0]&256&&ne!==(ne=!nn[8]))&&(j.hidden=ne);const Ft={};Qe[0]&2&&(Ft.personalProjection=nn[1]),Pe.$set(Ft),(!Ge||Qe[0]&256)&&wt(ue,"qbid-salary-maximizer__blur",nn[8]),(!Ge||Qe[0]&256&&Ve!==(Ve=!nn[8]))&&(ee.hidden=Ve),nn[7]?cn?(cn.p(nn,Qe),Qe[0]&128&&U(cn,1)):(cn=uO(nn),cn.c(),U(cn,1),cn.m(Tt,null)):cn&&(pn(),W(cn,1,1,()=>{cn=null}),hn()),(!Ge||Qe[0]&256)&&wt(yt,"qbid-salary-maximizer__blur",nn[8])},i(nn){Ge||(U(Pe.$$.fragment,nn),U(cn),Ge=!0)},o(nn){W(Pe.$$.fragment,nn),W(cn),Ge=!1},d(nn){nn&&_e(t),st&&st.d(),It&&It.d(),Rt.d(),se(Pe),cn&&cn.d(),it()}}}const i0=440;function ASe(e,t,n){let{qbidSalaryMaximizerEndpoint:i}=t,{personalProjection:r={}}=t,{taxesByDelta:a=[]}=t,{planningDescription:s=null}=t,{conceptResources:o=null}=t,l=!0,d,c,v,T,b,A,E,y,I,D,O;const M={top:5,bottom:60,left:100,right:20},F={bottom:50,left:90};let $=Ce=>H(Ce);const L=new Fo(i),j=Ys.debounce(async()=>{n(8,l=!0);try{const Ce=await L.baseQuery(L.baseEndpoint,{method:"POST",headers:L.headers,body:JSON.stringify({qbid_salary_maximizer:{}})});n(1,r=Ce.personalProjection),n(0,a=Ce.taxesByDelta.map(ie=>({delta:parseFloat(ie.delta),tax:parseFloat(ie.tax)})))}catch(Ce){Gr.error(Ce.message)}finally{n(8,l=!1)}},1e3);function H(Ce){return Er.formatMoney(Ce,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}function V(Ce,ie){n(13,I=`left: ${Ce.offsetX-100}px; top: ${Ce.offsetY+30}px;`),n(11,E=`<b>Change in Wages:</b> ${$(ie.delta)}<br><b>Federal Tax:</b> ${$(ie.tax)}`)}oa(j);function Q(Ce,ie,Y){Oe[Ce?"unshift":"push"](()=>{ie[Y].circle=Ce,n(0,a)})}const X=Ce=>n(12,y=!0),te=(Ce,ie)=>V(ie,Ce),ne=Ce=>n(12,y=!1);function be(Ce){Oe[Ce?"unshift":"push"](()=>{d=Ce,n(9,d)})}function ue(){D=this.clientWidth,n(6,D)}return e.$$set=Ce=>{"qbidSalaryMaximizerEndpoint"in Ce&&n(18,i=Ce.qbidSalaryMaximizerEndpoint),"personalProjection"in Ce&&n(1,r=Ce.personalProjection),"taxesByDelta"in Ce&&n(0,a=Ce.taxesByDelta),"planningDescription"in Ce&&n(2,s=Ce.planningDescription),"conceptResources"in Ce&&n(3,o=Ce.conceptResources)},e.$$.update=()=>{e.$$.dirty[0]&1573105&&(D&&n(7,O=D-30),n(19,c=fD(a,Ce=>+Ce.delta)),n(4,v=Jv().domain(c).range([M.left,O-M.right])),n(20,T=fD(a,Ce=>+Ce.tax)),n(5,b=Jv().domain(T).range([i0-M.bottom,M.top])),n(10,A=h5().x(Ce=>v(+Ce.delta)).y(Ce=>b(+Ce.tax)).curve(Gke.alpha(.5))))},[a,r,s,o,v,b,D,O,l,d,A,E,y,I,F,$,H,V,i,c,T,Q,X,te,ne,be,ue]}class DSe extends Qt{constructor(t){super(),Jt(this,t,ASe,ISe,Kt,{qbidSalaryMaximizerEndpoint:18,personalProjection:1,taxesByDelta:0,planningDescription:2,conceptResources:3},null,[-1,-1])}}function OSe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt,on,In,dt,Zt,Ln,xn,Dn,Un,qn,ft,ni,Et,un,Ai,St,sn,ci,pi,Pi,$i,ji,ri,tr,Ei,Ti,kn,Rn,ki,mr,_r,Mi,di,Yi,na,Ki,Rr,Di,Wi,Bi,_a,xi,Kr,kr,Ji,ia,la,Ir,Ur,qr,Ht,et,ln,Vi,Ar,vr,ir,Si,pr,yi,Dr,Wr,Sr,hr,Vn,dn,wr,Bn,ra,_n,Vr,rr,Or,Ui,Fr,wi,Ni,ar,sr,Gi,Cr,or,lr,Ka,Lr,nr,wa,zr,Ze,tn,Xr,ur,Hr,Xi,dr,pa,qt,mn,ai,Ra,aa,ga,Ta,va,$r,ua,an,gi,jr,Ia,Xa,Ha,$a,Ii,br,Aa;return v=new bi({props:{value:e[0].resWages}}),A=new bi({props:{value:e[1].resWages}}),I=new bi({props:{value:e[2].resWages}}),L=new bi({props:{value:e[0].resInterestAndDividents}}),V=new bi({props:{value:e[1].resInterestAndDividents}}),te=new bi({props:{value:e[2].resInterestAndDividents}}),Y=new bi({props:{value:e[0].resCapitalGains}}),Pe=new bi({props:{value:e[1].resCapitalGains}}),ee=new bi({props:{value:e[2].resCapitalGains}}),Ve=new bi({props:{value:e[0].resBusinessIncome}}),ht=new bi({props:{value:e[1].resBusinessIncome}}),Tt=new bi({props:{value:e[2].resBusinessIncome}}),bt=new bi({props:{value:e[0].resRentalIncome}}),nn=new bi({props:{value:e[1].resRentalIncome}}),Fn=new bi({props:{value:e[2].resRentalIncome}}),Nt=new bi({props:{value:e[0].resOtherIncome}}),dt=new bi({props:{value:e[1].resOtherIncome}}),xn=new bi({props:{value:e[2].resOtherIncome}}),Et=new bi({props:{value:e[0].resIncTotal}}),St=new bi({props:{value:e[1].resIncTotal}}),pi=new bi({props:{value:e[2].resIncTotal}}),Ei=new bi({props:{value:e[0].resIncAdjustments}}),Rn=new bi({props:{value:e[1].resIncAdjustments}}),_r=new bi({props:{value:e[2].resIncAdjustments}}),Rr=new bi({props:{value:e[0].resIncItemized}}),Bi=new bi({props:{value:e[1].resIncItemized}}),Kr=new bi({props:{value:e[2].resIncItemized}}),Ur=new bi({props:{value:e[0].resPassthroughDeduction}}),et=new bi({props:{value:e[1].resPassthroughDeduction}}),Ar=new bi({props:{value:e[2].resPassthroughDeduction}}),Dr=new bi({props:{value:e[0].resTaxableIncome}}),hr=new bi({props:{value:e[1].resTaxableIncome}}),wr=new bi({props:{value:e[2].resTaxableIncome}}),Or=new bi({props:{value:e[0].resIncomeTax}}),wi=new bi({props:{value:e[1].resIncomeTax}}),sr=new bi({props:{value:e[2].resIncomeTax}}),Lr=new bi({props:{value:e[0].resSeTax}}),zr=new bi({props:{value:e[1].resSeTax}}),Xr=new bi({props:{value:e[2].resSeTax}}),qt=new bi({props:{value:e[0].resTotalTax}}),Ra=new bi({props:{value:e[1].resTotalTax}}),Ta=new bi({props:{value:e[2].resTotalTax}}),jr=new bi({props:{value:e[0].resStateTaxBeforePayments}}),Ha=new bi({props:{value:e[1].resStateTaxBeforePayments}}),br=new bi({props:{value:e[2].resStateTaxBeforePayments}}),{c(){t=P("div"),n=P("div"),i=P("table"),r=P("thead"),r.innerHTML=`<tr class="svelte-b870ny"><th class="svelte-b870ny"></th> 
          <th class="table-header svelte-b870ny">Married Filing Joint</th> 
          <th class="table-header svelte-b870ny">Married Filing Separate Taxpayer</th> 
          <th class="table-header svelte-b870ny">Married Filing Separate Spouse</th></tr>`,a=K(),s=P("tbody"),o=P("tr"),l=P("td"),l.textContent="Wages",d=K(),c=P("td"),re(v.$$.fragment),T=K(),b=P("td"),re(A.$$.fragment),E=K(),y=P("td"),re(I.$$.fragment),D=K(),O=P("tr"),M=P("td"),M.textContent="Interest & Dividends",F=K(),$=P("td"),re(L.$$.fragment),j=K(),H=P("td"),re(V.$$.fragment),Q=K(),X=P("td"),re(te.$$.fragment),ne=K(),be=P("tr"),ue=P("td"),ue.textContent="Capital Gains",Ce=K(),ie=P("td"),re(Y.$$.fragment),he=K(),Me=P("td"),re(Pe.$$.fragment),We=K(),qe=P("td"),re(ee.$$.fragment),G=K(),me=P("tr"),Te=P("td"),Te.textContent="Business Income",De=K(),we=P("td"),re(Ve.$$.fragment),Ke=K(),yt=P("td"),re(ht.$$.fragment),Je=K(),pt=P("td"),re(Tt.$$.fragment),it=K(),Ge=P("tr"),st=P("td"),st.textContent="Rental Income",It=K(),Ct=P("td"),re(bt.$$.fragment),Rt=K(),cn=P("td"),re(nn.$$.fragment),Qe=K(),Ft=P("td"),re(Fn.$$.fragment),He=K(),Dt=P("tr"),Xt=P("td"),Xt.textContent="Other Income",Mt=K(),Xe=P("td"),re(Nt.$$.fragment),on=K(),In=P("td"),re(dt.$$.fragment),Zt=K(),Ln=P("td"),re(xn.$$.fragment),Dn=K(),Un=P("tr"),qn=P("td"),qn.textContent="Total Income",ft=K(),ni=P("td"),re(Et.$$.fragment),un=K(),Ai=P("td"),re(St.$$.fragment),sn=K(),ci=P("td"),re(pi.$$.fragment),Pi=K(),$i=P("tr"),ji=P("td"),ji.textContent="Adjustments",ri=K(),tr=P("td"),re(Ei.$$.fragment),Ti=K(),kn=P("td"),re(Rn.$$.fragment),ki=K(),mr=P("td"),re(_r.$$.fragment),Mi=K(),di=P("tr"),Yi=P("td"),Yi.textContent="Itemized Deductions",na=K(),Ki=P("td"),re(Rr.$$.fragment),Di=K(),Wi=P("td"),re(Bi.$$.fragment),_a=K(),xi=P("td"),re(Kr.$$.fragment),kr=K(),Ji=P("tr"),ia=P("td"),ia.textContent="QBI Deduction",la=K(),Ir=P("td"),re(Ur.$$.fragment),qr=K(),Ht=P("td"),re(et.$$.fragment),ln=K(),Vi=P("td"),re(Ar.$$.fragment),vr=K(),ir=P("tr"),Si=P("td"),Si.textContent="Taxable Income",pr=K(),yi=P("td"),re(Dr.$$.fragment),Wr=K(),Sr=P("td"),re(hr.$$.fragment),Vn=K(),dn=P("td"),re(wr.$$.fragment),Bn=K(),ra=P("tr"),_n=P("td"),_n.textContent="Income Tax",Vr=K(),rr=P("td"),re(Or.$$.fragment),Ui=K(),Fr=P("td"),re(wi.$$.fragment),Ni=K(),ar=P("td"),re(sr.$$.fragment),Gi=K(),Cr=P("tr"),or=P("td"),or.textContent="SE Tax",lr=K(),Ka=P("td"),re(Lr.$$.fragment),nr=K(),wa=P("td"),re(zr.$$.fragment),Ze=K(),tn=P("td"),re(Xr.$$.fragment),ur=K(),Hr=P("tr"),Xi=P("td"),Xi.textContent="Total Federal Tax",dr=K(),pa=P("td"),re(qt.$$.fragment),mn=K(),ai=P("td"),re(Ra.$$.fragment),aa=K(),ga=P("td"),re(Ta.$$.fragment),va=K(),$r=P("tr"),ua=P("td"),ua.textContent="Total State Tax",an=K(),gi=P("td"),re(jr.$$.fragment),Ia=K(),Xa=P("td"),re(Ha.$$.fragment),$a=K(),Ii=P("td"),re(br.$$.fragment),w(r,"class","svelte-b870ny"),w(l,"class","header svelte-b870ny"),w(c,"class","value svelte-b870ny"),w(b,"class","value svelte-b870ny"),w(y,"class","value svelte-b870ny"),w(o,"class","svelte-b870ny"),w(M,"class","header svelte-b870ny"),w($,"class","value svelte-b870ny"),w(H,"class","value svelte-b870ny"),w(X,"class","value svelte-b870ny"),w(O,"class","svelte-b870ny"),w(ue,"class","header svelte-b870ny"),w(ie,"class","value svelte-b870ny"),w(Me,"class","value svelte-b870ny"),w(qe,"class","value svelte-b870ny"),w(be,"class","svelte-b870ny"),w(Te,"class","header svelte-b870ny"),w(we,"class","value svelte-b870ny"),w(yt,"class","value svelte-b870ny"),w(pt,"class","value svelte-b870ny"),w(me,"class","svelte-b870ny"),w(st,"class","header svelte-b870ny"),w(Ct,"class","value svelte-b870ny"),w(cn,"class","value svelte-b870ny"),w(Ft,"class","value svelte-b870ny"),w(Ge,"class","svelte-b870ny"),w(Xt,"class","header svelte-b870ny"),w(Xe,"class","value svelte-b870ny"),w(In,"class","value svelte-b870ny"),w(Ln,"class","value svelte-b870ny"),w(Dt,"class","svelte-b870ny"),w(qn,"class","header total svelte-b870ny"),w(ni,"class","value svelte-b870ny"),w(Ai,"class","value svelte-b870ny"),w(ci,"class","value svelte-b870ny"),w(Un,"class","svelte-b870ny"),w(ji,"class","header svelte-b870ny"),w(tr,"class","value svelte-b870ny"),w(kn,"class","value svelte-b870ny"),w(mr,"class","value svelte-b870ny"),w($i,"class","svelte-b870ny"),w(Yi,"class","header svelte-b870ny"),w(Ki,"class","value svelte-b870ny"),w(Wi,"class","value svelte-b870ny"),w(xi,"class","value svelte-b870ny"),w(di,"class","svelte-b870ny"),w(ia,"class","header svelte-b870ny"),w(Ir,"class","value svelte-b870ny"),w(Ht,"class","value svelte-b870ny"),w(Vi,"class","value svelte-b870ny"),w(Ji,"class","svelte-b870ny"),w(Si,"class","header total svelte-b870ny"),w(yi,"class","value svelte-b870ny"),w(Sr,"class","value svelte-b870ny"),w(dn,"class","value svelte-b870ny"),w(ir,"class","svelte-b870ny"),w(_n,"class","header svelte-b870ny"),w(rr,"class","value svelte-b870ny"),w(Fr,"class","value svelte-b870ny"),w(ar,"class","value svelte-b870ny"),w(ra,"class","svelte-b870ny"),w(or,"class","header svelte-b870ny"),w(Ka,"class","value svelte-b870ny"),w(wa,"class","value svelte-b870ny"),w(tn,"class","value svelte-b870ny"),w(Cr,"class","svelte-b870ny"),w(Xi,"class","header svelte-b870ny"),w(pa,"class","value svelte-b870ny"),w(ai,"class","value svelte-b870ny"),w(ga,"class","value svelte-b870ny"),w(Hr,"class","svelte-b870ny"),w(ua,"class","header svelte-b870ny"),w(gi,"class","value svelte-b870ny"),w(Xa,"class","value svelte-b870ny"),w(Ii,"class","value svelte-b870ny"),w($r,"class","svelte-b870ny"),w(s,"class","svelte-b870ny"),w(i,"class","table table-striped flash-table svelte-b870ny"),w(n,"class","col-sm-12 overflow-x__auto"),w(t,"class","col-sm-12 container widget-div svelte-b870ny")},m(Vt,_i){ce(Vt,t,_i),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,o),m(o,l),m(o,d),m(o,c),ae(v,c,null),m(o,T),m(o,b),ae(A,b,null),m(o,E),m(o,y),ae(I,y,null),m(s,D),m(s,O),m(O,M),m(O,F),m(O,$),ae(L,$,null),m(O,j),m(O,H),ae(V,H,null),m(O,Q),m(O,X),ae(te,X,null),m(s,ne),m(s,be),m(be,ue),m(be,Ce),m(be,ie),ae(Y,ie,null),m(be,he),m(be,Me),ae(Pe,Me,null),m(be,We),m(be,qe),ae(ee,qe,null),m(s,G),m(s,me),m(me,Te),m(me,De),m(me,we),ae(Ve,we,null),m(me,Ke),m(me,yt),ae(ht,yt,null),m(me,Je),m(me,pt),ae(Tt,pt,null),m(s,it),m(s,Ge),m(Ge,st),m(Ge,It),m(Ge,Ct),ae(bt,Ct,null),m(Ge,Rt),m(Ge,cn),ae(nn,cn,null),m(Ge,Qe),m(Ge,Ft),ae(Fn,Ft,null),m(s,He),m(s,Dt),m(Dt,Xt),m(Dt,Mt),m(Dt,Xe),ae(Nt,Xe,null),m(Dt,on),m(Dt,In),ae(dt,In,null),m(Dt,Zt),m(Dt,Ln),ae(xn,Ln,null),m(s,Dn),m(s,Un),m(Un,qn),m(Un,ft),m(Un,ni),ae(Et,ni,null),m(Un,un),m(Un,Ai),ae(St,Ai,null),m(Un,sn),m(Un,ci),ae(pi,ci,null),m(s,Pi),m(s,$i),m($i,ji),m($i,ri),m($i,tr),ae(Ei,tr,null),m($i,Ti),m($i,kn),ae(Rn,kn,null),m($i,ki),m($i,mr),ae(_r,mr,null),m(s,Mi),m(s,di),m(di,Yi),m(di,na),m(di,Ki),ae(Rr,Ki,null),m(di,Di),m(di,Wi),ae(Bi,Wi,null),m(di,_a),m(di,xi),ae(Kr,xi,null),m(s,kr),m(s,Ji),m(Ji,ia),m(Ji,la),m(Ji,Ir),ae(Ur,Ir,null),m(Ji,qr),m(Ji,Ht),ae(et,Ht,null),m(Ji,ln),m(Ji,Vi),ae(Ar,Vi,null),m(s,vr),m(s,ir),m(ir,Si),m(ir,pr),m(ir,yi),ae(Dr,yi,null),m(ir,Wr),m(ir,Sr),ae(hr,Sr,null),m(ir,Vn),m(ir,dn),ae(wr,dn,null),m(s,Bn),m(s,ra),m(ra,_n),m(ra,Vr),m(ra,rr),ae(Or,rr,null),m(ra,Ui),m(ra,Fr),ae(wi,Fr,null),m(ra,Ni),m(ra,ar),ae(sr,ar,null),m(s,Gi),m(s,Cr),m(Cr,or),m(Cr,lr),m(Cr,Ka),ae(Lr,Ka,null),m(Cr,nr),m(Cr,wa),ae(zr,wa,null),m(Cr,Ze),m(Cr,tn),ae(Xr,tn,null),m(s,ur),m(s,Hr),m(Hr,Xi),m(Hr,dr),m(Hr,pa),ae(qt,pa,null),m(Hr,mn),m(Hr,ai),ae(Ra,ai,null),m(Hr,aa),m(Hr,ga),ae(Ta,ga,null),m(s,va),m(s,$r),m($r,ua),m($r,an),m($r,gi),ae(jr,gi,null),m($r,Ia),m($r,Xa),ae(Ha,Xa,null),m($r,$a),m($r,Ii),ae(br,Ii,null),Aa=!0},p(Vt,[_i]){const xe={};_i&1&&(xe.value=Vt[0].resWages),v.$set(xe);const Ue={};_i&2&&(Ue.value=Vt[1].resWages),A.$set(Ue);const pe={};_i&4&&(pe.value=Vt[2].resWages),I.$set(pe);const Ae={};_i&1&&(Ae.value=Vt[0].resInterestAndDividents),L.$set(Ae);const at={};_i&2&&(at.value=Vt[1].resInterestAndDividents),V.$set(at);const gt={};_i&4&&(gt.value=Vt[2].resInterestAndDividents),te.$set(gt);const nt={};_i&1&&(nt.value=Vt[0].resCapitalGains),Y.$set(nt);const jt={};_i&2&&(jt.value=Vt[1].resCapitalGains),Pe.$set(jt);const Yt={};_i&4&&(Yt.value=Vt[2].resCapitalGains),ee.$set(Yt);const Mn={};_i&1&&(Mn.value=Vt[0].resBusinessIncome),Ve.$set(Mn);const Yn={};_i&2&&(Yn.value=Vt[1].resBusinessIncome),ht.$set(Yn);const Wn={};_i&4&&(Wn.value=Vt[2].resBusinessIncome),Tt.$set(Wn);const ei={};_i&1&&(ei.value=Vt[0].resRentalIncome),bt.$set(ei);const Fi={};_i&2&&(Fi.value=Vt[1].resRentalIncome),nn.$set(Fi);const Tr={};_i&4&&(Tr.value=Vt[2].resRentalIncome),Fn.$set(Tr);const Yr={};_i&1&&(Yr.value=Vt[0].resOtherIncome),Nt.$set(Yr);const yr={};_i&2&&(yr.value=Vt[1].resOtherIncome),dt.$set(yr);const ka={};_i&4&&(ka.value=Vt[2].resOtherIncome),xn.$set(ka);const fr={};_i&1&&(fr.value=Vt[0].resIncTotal),Et.$set(fr);const Nr={};_i&2&&(Nr.value=Vt[1].resIncTotal),St.$set(Nr);const Na={};_i&4&&(Na.value=Vt[2].resIncTotal),pi.$set(Na);const Wa={};_i&1&&(Wa.value=Vt[0].resIncAdjustments),Ei.$set(Wa);const da={};_i&2&&(da.value=Vt[1].resIncAdjustments),Rn.$set(da);const Sa={};_i&4&&(Sa.value=Vt[2].resIncAdjustments),_r.$set(Sa);const Br={};_i&1&&(Br.value=Vt[0].resIncItemized),Rr.$set(Br);const Ks={};_i&2&&(Ks.value=Vt[1].resIncItemized),Bi.$set(Ks);const Qr={};_i&4&&(Qr.value=Vt[2].resIncItemized),Kr.$set(Qr);const Oi={};_i&1&&(Oi.value=Vt[0].resPassthroughDeduction),Ur.$set(Oi);const Fs={};_i&2&&(Fs.value=Vt[1].resPassthroughDeduction),et.$set(Fs);const Qa={};_i&4&&(Qa.value=Vt[2].resPassthroughDeduction),Ar.$set(Qa);const as={};_i&1&&(as.value=Vt[0].resTaxableIncome),Dr.$set(as);const bo={};_i&2&&(bo.value=Vt[1].resTaxableIncome),hr.$set(bo);const yo={};_i&4&&(yo.value=Vt[2].resTaxableIncome),wr.$set(yo);const Ts={};_i&1&&(Ts.value=Vt[0].resIncomeTax),Or.$set(Ts);const Ls={};_i&2&&(Ls.value=Vt[1].resIncomeTax),wi.$set(Ls);const wo={};_i&4&&(wo.value=Vt[2].resIncomeTax),sr.$set(wo);const Is={};_i&1&&(Is.value=Vt[0].resSeTax),Lr.$set(Is);const Hs={};_i&2&&(Hs.value=Vt[1].resSeTax),zr.$set(Hs);const pl={};_i&4&&(pl.value=Vt[2].resSeTax),Xr.$set(pl);const zo={};_i&1&&(zo.value=Vt[0].resTotalTax),qt.$set(zo);const cs={};_i&2&&(cs.value=Vt[1].resTotalTax),Ra.$set(cs);const ss={};_i&4&&(ss.value=Vt[2].resTotalTax),Ta.$set(ss);const Xs={};_i&1&&(Xs.value=Vt[0].resStateTaxBeforePayments),jr.$set(Xs);const Qs={};_i&2&&(Qs.value=Vt[1].resStateTaxBeforePayments),Ha.$set(Qs);const Yo={};_i&4&&(Yo.value=Vt[2].resStateTaxBeforePayments),br.$set(Yo)},i(Vt){Aa||(U(v.$$.fragment,Vt),U(A.$$.fragment,Vt),U(I.$$.fragment,Vt),U(L.$$.fragment,Vt),U(V.$$.fragment,Vt),U(te.$$.fragment,Vt),U(Y.$$.fragment,Vt),U(Pe.$$.fragment,Vt),U(ee.$$.fragment,Vt),U(Ve.$$.fragment,Vt),U(ht.$$.fragment,Vt),U(Tt.$$.fragment,Vt),U(bt.$$.fragment,Vt),U(nn.$$.fragment,Vt),U(Fn.$$.fragment,Vt),U(Nt.$$.fragment,Vt),U(dt.$$.fragment,Vt),U(xn.$$.fragment,Vt),U(Et.$$.fragment,Vt),U(St.$$.fragment,Vt),U(pi.$$.fragment,Vt),U(Ei.$$.fragment,Vt),U(Rn.$$.fragment,Vt),U(_r.$$.fragment,Vt),U(Rr.$$.fragment,Vt),U(Bi.$$.fragment,Vt),U(Kr.$$.fragment,Vt),U(Ur.$$.fragment,Vt),U(et.$$.fragment,Vt),U(Ar.$$.fragment,Vt),U(Dr.$$.fragment,Vt),U(hr.$$.fragment,Vt),U(wr.$$.fragment,Vt),U(Or.$$.fragment,Vt),U(wi.$$.fragment,Vt),U(sr.$$.fragment,Vt),U(Lr.$$.fragment,Vt),U(zr.$$.fragment,Vt),U(Xr.$$.fragment,Vt),U(qt.$$.fragment,Vt),U(Ra.$$.fragment,Vt),U(Ta.$$.fragment,Vt),U(jr.$$.fragment,Vt),U(Ha.$$.fragment,Vt),U(br.$$.fragment,Vt),Aa=!0)},o(Vt){W(v.$$.fragment,Vt),W(A.$$.fragment,Vt),W(I.$$.fragment,Vt),W(L.$$.fragment,Vt),W(V.$$.fragment,Vt),W(te.$$.fragment,Vt),W(Y.$$.fragment,Vt),W(Pe.$$.fragment,Vt),W(ee.$$.fragment,Vt),W(Ve.$$.fragment,Vt),W(ht.$$.fragment,Vt),W(Tt.$$.fragment,Vt),W(bt.$$.fragment,Vt),W(nn.$$.fragment,Vt),W(Fn.$$.fragment,Vt),W(Nt.$$.fragment,Vt),W(dt.$$.fragment,Vt),W(xn.$$.fragment,Vt),W(Et.$$.fragment,Vt),W(St.$$.fragment,Vt),W(pi.$$.fragment,Vt),W(Ei.$$.fragment,Vt),W(Rn.$$.fragment,Vt),W(_r.$$.fragment,Vt),W(Rr.$$.fragment,Vt),W(Bi.$$.fragment,Vt),W(Kr.$$.fragment,Vt),W(Ur.$$.fragment,Vt),W(et.$$.fragment,Vt),W(Ar.$$.fragment,Vt),W(Dr.$$.fragment,Vt),W(hr.$$.fragment,Vt),W(wr.$$.fragment,Vt),W(Or.$$.fragment,Vt),W(wi.$$.fragment,Vt),W(sr.$$.fragment,Vt),W(Lr.$$.fragment,Vt),W(zr.$$.fragment,Vt),W(Xr.$$.fragment,Vt),W(qt.$$.fragment,Vt),W(Ra.$$.fragment,Vt),W(Ta.$$.fragment,Vt),W(jr.$$.fragment,Vt),W(Ha.$$.fragment,Vt),W(br.$$.fragment,Vt),Aa=!1},d(Vt){Vt&&_e(t),se(v),se(A),se(I),se(L),se(V),se(te),se(Y),se(Pe),se(ee),se(Ve),se(ht),se(Tt),se(bt),se(nn),se(Fn),se(Nt),se(dt),se(xn),se(Et),se(St),se(pi),se(Ei),se(Rn),se(_r),se(Rr),se(Bi),se(Kr),se(Ur),se(et),se(Ar),se(Dr),se(hr),se(wr),se(Or),se(wi),se(sr),se(Lr),se(zr),se(Xr),se(qt),se(Ra),se(Ta),se(jr),se(Ha),se(br)}}}function MSe(e,t,n){let{mfjProjection:i}=t,{mfsTaxpayerProjection:r}=t,{mfsSpouseProjection:a}=t;return e.$$set=s=>{"mfjProjection"in s&&n(0,i=s.mfjProjection),"mfsTaxpayerProjection"in s&&n(1,r=s.mfsTaxpayerProjection),"mfsSpouseProjection"in s&&n(2,a=s.mfsSpouseProjection)},[i,r,a]}class xSe extends Qt{constructor(t){super(),Jt(this,t,MSe,OSe,Kt,{mfjProjection:0,mfsTaxpayerProjection:1,mfsSpouseProjection:2})}}const T5=(e,{min_size:t=10,max_size:n=100}={min_size:10,max_size:100})=>{const i=()=>{e.parentElement&&$Se(e,e.parentElement,t,n)},r=new ResizeObserver(i);return r.observe(e==null?void 0:e.parentElement),{destroy(){r.disconnect()}}};function RSe({clientWidth:e,clientHeight:t,scrollWidth:n,scrollHeight:i}){return n>e||i>t}function $Se(e,t,n,i){let r=n,a=!1,s=n;for(e.style.fontSize=`${s}px`;!a&&r<i;)a=RSe(t),a||(e.style.fontSize=`${r}px`,r++);s=r-2,e.style.fontSize=`${s}px`}function NSe(e){let t,n,i,r;return{c(){t=P("span"),n=Le(e[3]),w(t,"class","total d-block")},m(a,s){ce(a,t,s),m(t,n),i||(r=l_(T5.call(null,t,{max_size:32})),i=!0)},p(a,s){s&8&&vt(n,a[3])},d(a){a&&_e(t),i=!1,r()}}}function FSe(e){let t;return{c(){t=P("div"),t.innerHTML=`<span class="bounce1"></span> 
      <span class="bounce2"></span> 
      <span class="bounce3"></span>`,w(t,"class","planning-children")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function LSe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b;function A(I,D){return I[5]?FSe:NSe}let E=A(e),y=E(e);return{c(){t=P("div"),n=P("span"),i=Le(e[0]),r=K(),a=P("span"),s=Le(e[1]),o=K(),l=P("span"),d=Le(e[2]),c=K(),y.c(),w(n,"class","title d-block"),w(a,"class","total d-block"),w(l,"class","title d-block"),w(t,"class",v="card-body item text-center wow zoomIn "+e[4]+" svelte-wun7bo")},m(I,D){ce(I,t,D),m(t,n),m(n,i),m(t,r),m(t,a),m(a,s),m(t,o),m(t,l),m(l,d),m(t,c),y.m(t,null),T||(b=l_(T5.call(null,a,{max_size:32})),T=!0)},p(I,[D]){D&1&&vt(i,I[0]),D&2&&vt(s,I[1]),D&4&&vt(d,I[2]),E===(E=A(I))&&y?y.p(I,D):(y.d(1),y=E(I),y&&(y.c(),y.m(t,null))),D&16&&v!==(v="card-body item text-center wow zoomIn "+I[4]+" svelte-wun7bo")&&w(t,"class",v)},i:ot,o:ot,d(I){I&&_e(t),y.d(),T=!1,b()}}}function HSe(e,t,n){let{firstTitle:i="Contribute"}=t,{firstTotal:r=""}=t,{secondTitle:a="And save"}=t,{secondTotal:s=""}=t,{containerClasses:o=""}=t,{isLoading:l=!1}=t;return e.$$set=d=>{"firstTitle"in d&&n(0,i=d.firstTitle),"firstTotal"in d&&n(1,r=d.firstTotal),"secondTitle"in d&&n(2,a=d.secondTitle),"secondTotal"in d&&n(3,s=d.secondTotal),"containerClasses"in d&&n(4,o=d.containerClasses),"isLoading"in d&&n(5,l=d.isLoading)},[i,r,a,s,o,l]}class k5 extends Qt{constructor(t){super(),Jt(this,t,HSe,LSe,Kt,{firstTitle:0,firstTotal:1,secondTitle:2,secondTotal:3,containerClasses:4,isLoading:5})}}function jSe(e){let t,n,i,r,a,s,o,l,d,c,v,T;return{c(){t=P("div"),n=P("span"),i=P("button"),i.textContent="-",r=K(),a=Le(e[0]),s=K(),o=P("button"),o.textContent="+",l=K(),d=P("span"),c=Le(e[3]),w(i,"class","btn btn-secondary"),wt(i,"invisible",e[0]<=e[1]),w(o,"class","btn btn-secondary"),wt(o,"invisible",e[0]>=e[2]),w(n,"class","total"),w(d,"class","title"),w(t,"class","card-body")},m(b,A){ce(b,t,A),m(t,n),m(n,i),m(n,r),m(n,a),m(n,s),m(n,o),m(t,l),m(t,d),m(d,c),v||(T=[ct(i,"click",e[6]),ct(o,"click",e[7])],v=!0)},p(b,[A]){A&3&&wt(i,"invisible",b[0]<=b[1]),A&1&&vt(a,b[0]),A&5&&wt(o,"invisible",b[0]>=b[2]),A&8&&vt(c,b[3])},i:ot,o:ot,d(b){b&&_e(t),v=!1,vi(T)}}}function BSe(e,t,n){let{onValueChanged:i}=t,{value:r}=t,{minValue:a}=t,{maxValue:s}=t,{title:o}=t;function l(v){return i(r+v)}const d=()=>l(-1),c=()=>l(1);return e.$$set=v=>{"onValueChanged"in v&&n(5,i=v.onValueChanged),"value"in v&&n(0,r=v.value),"minValue"in v&&n(1,a=v.minValue),"maxValue"in v&&n(2,s=v.maxValue),"title"in v&&n(3,o=v.title)},[r,a,s,o,l,i,d,c]}class USe extends Qt{constructor(t){super(),Jt(this,t,BSe,jSe,Kt,{onValueChanged:5,value:0,minValue:1,maxValue:2,title:3})}}function fO(e,t,n){const i=e.slice();return i[4]=t[n],i[6]=n,i}function cO(e,t){let n,i,r,a;return i=new k5({props:{firstTitle:"If you pay each child per year",firstTotal:Er.formatMoney(t[4].expenses,"$",0),secondTitle:"you will save",secondTotal:Er.formatMoney(t[4].savings,"$",0),containerClasses:`sep--ira__variant-${t[6]+1}`,isLoading:t[1]}}),{key:e,first:null,c(){n=P("div"),re(i.$$.fragment),r=K(),w(n,"class","col-12 d-flex"),this.first=n},m(s,o){ce(s,n,o),ae(i,n,null),m(n,r),a=!0},p(s,o){t=s;const l={};o&1&&(l.firstTotal=Er.formatMoney(t[4].expenses,"$",0)),o&1&&(l.secondTotal=Er.formatMoney(t[4].savings,"$",0)),o&1&&(l.containerClasses=`sep--ira__variant-${t[6]+1}`),o&2&&(l.isLoading=t[1]),i.$set(l)},i(s){a||(U(i.$$.fragment,s),a=!0)},o(s){W(i.$$.fragment,s),a=!1},d(s){s&&_e(n),se(i)}}}function qSe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=[],A=new Map,E;c=new USe({props:{title:"Number of Children",value:e[0].number_of_children,minValue:0,maxValue:8,onValueChanged:e[2]}});let y=e[0].variants;const I=D=>D[4];for(let D=0;D<y.length;D+=1){let O=fO(e,y,D),M=I(O);A.set(M,b[D]=cO(M,O))}return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=P("span"),a.textContent=`${e[3]}`,s=K(),o=P("span"),o.textContent="Current Business Income",l=K(),d=P("div"),re(c.$$.fragment),v=K(),T=P("div");for(let D=0;D<b.length;D+=1)b[D].c();w(a,"class","total"),w(o,"class","title"),w(r,"class","card-body"),w(i,"class","col-lg-6 widget-mini card-solid-default text-center planning-module-placeholder__panel wow animated zoomIn"),w(d,"class","col-lg-6 widget-mini card-solid-default text-center planning-module-placeholder__panel wow animated zoomIn"),w(n,"class","row"),w(T,"class","row mb-3")},m(D,O){ce(D,t,O),m(t,n),m(n,i),m(i,r),m(r,a),m(r,s),m(r,o),m(n,l),m(n,d),ae(c,d,null),m(t,v),m(t,T);for(let M=0;M<b.length;M+=1)b[M]&&b[M].m(T,null);E=!0},p(D,[O]){const M={};O&1&&(M.value=D[0].number_of_children),O&4&&(M.onValueChanged=D[2]),c.$set(M),O&3&&(y=D[0].variants,pn(),b=o_(b,O,I,1,D,y,A,T,ym,cO,null,fO),hn())},i(D){if(!E){U(c.$$.fragment,D);for(let O=0;O<y.length;O+=1)U(b[O]);E=!0}},o(D){W(c.$$.fragment,D);for(let O=0;O<b.length;O+=1)W(b[O]);E=!1},d(D){D&&_e(t),se(c);for(let O=0;O<b.length;O+=1)b[O].d()}}}function WSe(e,t,n){let{model:i}=t,{isLoading:r}=t,{onNumberOfChildrenChanged:a}=t,s=Er.formatMoney(i.business_profits,"$",0);return e.$$set=o=>{"model"in o&&n(0,i=o.model),"isLoading"in o&&n(1,r=o.isLoading),"onNumberOfChildrenChanged"in o&&n(2,a=o.onNumberOfChildrenChanged)},[i,r,a,s]}class VSe extends Qt{constructor(t){super(),Jt(this,t,WSe,qSe,Kt,{model:0,isLoading:1,onNumberOfChildrenChanged:2})}}function zSe(e){let t,n,i;return n=new VSe({props:{model:e[1],isLoading:e[0],onNumberOfChildrenChanged:e[2]}}),{c(){t=P("div"),re(n.$$.fragment)},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,[a]){const s={};a&2&&(s.model=r[1]),a&1&&(s.isLoading=r[0]),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function YSe(e,t,n){let i,{initialNumberOfChildren:r}=t,{initialResults:a}=t,{planningSrc:s}=t,o=r,l=a,d=!1;const c=new Fo(s),v=xs.debounce(async()=>{n(0,d=!0),No.start();try{const b=await c.baseQuery(c.baseEndpoint,{method:"POST",headers:c.headers,body:JSON.stringify({number_of_children:o})});n(7,l=b)}catch(b){if(b.name==="AbortError")return}finally{n(0,d=!1),No.done()}},500);function T(b){n(6,o=b),v()}return e.$$set=b=>{"initialNumberOfChildren"in b&&n(3,r=b.initialNumberOfChildren),"initialResults"in b&&n(4,a=b.initialResults),"planningSrc"in b&&n(5,s=b.planningSrc)},e.$$.update=()=>{e.$$.dirty&192&&n(1,i=Gn({}).extend(l,{number_of_children:o}).value())},[d,i,T,r,a,s,o,l]}class GSe extends Qt{constructor(t){super(),Jt(this,t,YSe,zSe,Kt,{initialNumberOfChildren:3,initialResults:4,planningSrc:5})}}function _O(e,t,n){const i=e.slice();return i[4]=t[n],i}function pO(e,t,n){const i=e.slice();return i[4]=t[n],i}function hO(e,t,n){const i=e.slice();return i[4]=t[n],i}function mO(e,t,n){const i=e.slice();return i[4]=t[n],i}function gO(e,t,n){const i=e.slice();return i[4]=t[n],i}function vO(e,t,n){const i=e.slice();return i[4]=t[n],i}function bO(e,t,n){const i=e.slice();return i[4]=t[n],i}function yO(e,t,n){const i=e.slice();return i[4]=t[n],i}function wO(e,t,n){const i=e.slice();return i[4]=t[n],i[22]=n,i}function KSe(e){let t;return{c(){t=P("th"),t.textContent="Annual Totals",w(t,"class","table-header svelte-5pjt4m")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function XSe(e){let t,n=`${e[22]+1}`,i,r,a=`${Nb(e[22]+1)}`,s,o,l=e[1](e[4].dueDate)+"",d,c,v=e[2](e[4].dueDate)+"",T,b,A=`${Nb(e[2](e[4].dueDate))}`,E,y,I=e[3](e[4].dueDate)+"",D,O;return{c(){t=P("th"),i=Le(n),r=P("sup"),s=Le(a),o=Le(` Quarter
                `),d=Le(l),c=K(),T=Le(v),b=P("sup"),E=Le(A),y=Le(`,
                `),D=Le(I),O=K(),w(t,"class","table-header svelte-5pjt4m")},m(M,F){ce(M,t,F),m(t,i),m(t,r),m(r,s),m(t,o),m(t,d),m(t,c),m(t,T),m(t,b),m(b,E),m(t,y),m(t,D),m(t,O)},p(M,F){F&1&&l!==(l=M[1](M[4].dueDate)+"")&&vt(d,l),F&1&&v!==(v=M[2](M[4].dueDate)+"")&&vt(T,v),F&1&&A!==(A=`${Nb(M[2](M[4].dueDate))}`)&&vt(E,A),F&1&&I!==(I=M[3](M[4].dueDate)+"")&&vt(D,I)},d(M){M&&_e(t)}}}function TO(e){let t;function n(a,s){return a[22]+1<a[0].quarters.length?XSe:KSe}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,s){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},d(a){r.d(a),a&&_e(t)}}}function kO(e){let t,n,i,r;return n=new bi({props:{value:e[4].requiredFederalPayment}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].requiredFederalPayment),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function SO(e){let t,n,i,r;return n=new bi({props:{value:e[4].projectedFederalPayment}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].projectedFederalPayment),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function CO(e){let t,n,i,r;return n=new bi({props:{value:e[4].federalPaymentMade}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].federalPaymentMade),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function PO(e){let t,n,i,r;return n=new bi({props:{value:e[4].federalCumulativeShortfall}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value negative svelte-5pjt4m"),wt(t,"positive",e[4].federalCumulativeShortfall>=0)},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].federalCumulativeShortfall),n.$set(o),(!r||s&1)&&wt(t,"positive",a[4].federalCumulativeShortfall>=0)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function EO(e){let t,n,i,r;return n=new bi({props:{value:e[4].requiredStatePayment}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].requiredStatePayment),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function IO(e){let t,n,i,r;return n=new bi({props:{value:e[4].projectedStatePayment}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].projectedStatePayment),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function AO(e){let t,n,i,r;return n=new bi({props:{value:e[4].statePaymentMade}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value svelte-5pjt4m")},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].statePaymentMade),n.$set(o)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function DO(e){let t,n,i,r;return n=new bi({props:{value:e[4].stateCumulativeShortfall}}),{c(){t=P("td"),re(n.$$.fragment),i=K(),w(t,"class","value negative svelte-5pjt4m"),wt(t,"positive",e[4].stateCumulativeShortfall>=0)},m(a,s){ce(a,t,s),ae(n,t,null),m(t,i),r=!0},p(a,s){const o={};s&1&&(o.value=a[4].stateCumulativeShortfall),n.$set(o),(!r||s&1)&&wt(t,"positive",a[4].stateCumulativeShortfall>=0)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n)}}}function QSe(e){let t,n,i,r,a,s,o=e[0].currentTaxYear+"",l,d,c,v,T,b,A,E,y=e[0].currentTaxYear+"",I,D,O,M=e[0].stateName+"",F,$,L,j,H,V,Q,X,te=e[0].previousTaxYear+"",ne,be,ue,Ce,ie,Y,he,Me,Pe=e[0].previousTaxYear+"",We,qe,ee,G=e[0].stateName+"",me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it=e[0].previousTaxYear+"",Ge,st,It,Ct,bt,Rt,cn,nn,Qe=e[0].previousTaxYear+"",Ft,Fn,He,Dt=e[0].stateName+"",Xt,Mt,Xe,Nt,on,In,dt,Zt,Ln,xn,Dn,Un,qn,ft,ni,Et=e[0].stateName+"",un,Ai,St,sn,ci,pi,Pi,$i,ji,ri,tr,Ei,Ti,kn,Rn,ki,mr,_r,Mi,di,Yi,na,Ki,Rr,Di,Wi,Bi,_a,xi,Kr,kr,Ji,ia,la,Ir,Ur=e[0].stateName+"",qr,Ht,et,ln,Vi,Ar,vr,ir,Si=e[0].stateName+"",pr,yi,Dr,Wr,Sr,hr,Vn,dn,wr,Bn,ra,_n;T=new bi({props:{value:e[0].projectedFederalTaxDue}}),H=new bi({props:{value:e[0].projectedStateTaxDue}}),ie=new bi({props:{value:e[0].previousYearFederalTax}}),Ve=new bi({props:{value:e[0].previousYearStateTax}}),bt=new bi({props:{value:e[0].federalAgi}}),on=new bi({props:{value:e[0].stateAgi}}),Dn=new bi({props:{value:e[0].federalSafeHarbor}}),ci=new bi({props:{value:e[0].stateSafeHarbor}});let Vr=e[0].quarters,rr=[];for(let qt=0;qt<Vr.length;qt+=1)rr[qt]=TO(wO(e,Vr,qt));let Or=e[0].quarters,Ui=[];for(let qt=0;qt<Or.length;qt+=1)Ui[qt]=kO(yO(e,Or,qt));const Fr=qt=>W(Ui[qt],1,1,()=>{Ui[qt]=null});let wi=e[0].quarters,Ni=[];for(let qt=0;qt<wi.length;qt+=1)Ni[qt]=SO(bO(e,wi,qt));const ar=qt=>W(Ni[qt],1,1,()=>{Ni[qt]=null});let sr=e[0].quarters,Gi=[];for(let qt=0;qt<sr.length;qt+=1)Gi[qt]=CO(vO(e,sr,qt));const Cr=qt=>W(Gi[qt],1,1,()=>{Gi[qt]=null});let or=e[0].quarters,lr=[];for(let qt=0;qt<or.length;qt+=1)lr[qt]=PO(gO(e,or,qt));const Ka=qt=>W(lr[qt],1,1,()=>{lr[qt]=null});let Lr=e[0].quarters,nr=[];for(let qt=0;qt<Lr.length;qt+=1)nr[qt]=EO(mO(e,Lr,qt));const wa=qt=>W(nr[qt],1,1,()=>{nr[qt]=null});let zr=e[0].quarters,Ze=[];for(let qt=0;qt<zr.length;qt+=1)Ze[qt]=IO(hO(e,zr,qt));const tn=qt=>W(Ze[qt],1,1,()=>{Ze[qt]=null});let Xr=e[0].quarters,ur=[];for(let qt=0;qt<Xr.length;qt+=1)ur[qt]=AO(pO(e,Xr,qt));const Hr=qt=>W(ur[qt],1,1,()=>{ur[qt]=null});let Xi=e[0].quarters,dr=[];for(let qt=0;qt<Xi.length;qt+=1)dr[qt]=DO(_O(e,Xi,qt));const pa=qt=>W(dr[qt],1,1,()=>{dr[qt]=null});return{c(){t=P("div"),n=P("div"),i=P("table"),r=P("tbody"),a=P("tr"),s=P("td"),l=Le(o),d=Le(" Projected Federal Tax Due"),c=K(),v=P("td"),re(T.$$.fragment),b=K(),A=P("tr"),E=P("td"),I=Le(y),D=Le(` Projected
            `),O=P("em"),F=Le(M),$=Le(`
            Tax Due`),L=K(),j=P("td"),re(H.$$.fragment),V=K(),Q=P("tr"),X=P("td"),ne=Le(te),be=Le(" Federal Tax"),ue=K(),Ce=P("td"),re(ie.$$.fragment),Y=K(),he=P("tr"),Me=P("td"),We=Le(Pe),qe=K(),ee=P("em"),me=Le(G),Te=Le(`
            Tax`),De=K(),we=P("td"),re(Ve.$$.fragment),Ke=K(),yt=P("div"),ht=P("table"),Je=P("tbody"),pt=P("tr"),Tt=P("td"),Ge=Le(it),st=Le(" Federal AGI"),It=K(),Ct=P("td"),re(bt.$$.fragment),Rt=K(),cn=P("tr"),nn=P("td"),Ft=Le(Qe),Fn=K(),He=P("em"),Xt=Le(Dt),Mt=Le(`
            AGI`),Xe=K(),Nt=P("td"),re(on.$$.fragment),In=K(),dt=P("tr"),Zt=P("td"),Zt.textContent="Federal Safe Harbor",Ln=K(),xn=P("td"),re(Dn.$$.fragment),Un=K(),qn=P("tr"),ft=P("td"),ni=P("em"),un=Le(Et),Ai=Le(`
            Safe Harbor`),St=K(),sn=P("td"),re(ci.$$.fragment),pi=K(),Pi=P("div"),$i=P("table"),ji=P("thead"),ri=P("tr"),tr=P("th"),Ei=K();for(let qt=0;qt<rr.length;qt+=1)rr[qt].c();Ti=K(),kn=P("tbody"),Rn=P("tr"),ki=P("td"),ki.textContent="Required Federal Payment",mr=K();for(let qt=0;qt<Ui.length;qt+=1)Ui[qt].c();_r=K(),Mi=P("tr"),di=P("td"),di.textContent="Projected Federal Payment",Yi=K();for(let qt=0;qt<Ni.length;qt+=1)Ni[qt].c();na=K(),Ki=P("tr"),Rr=P("td"),Rr.textContent="Payment Made",Di=K();for(let qt=0;qt<Gi.length;qt+=1)Gi[qt].c();Wi=K(),Bi=P("tr"),_a=P("td"),_a.textContent="Cumulative Shortfall",xi=K();for(let qt=0;qt<lr.length;qt+=1)lr[qt].c();Kr=K(),kr=P("tbody"),Ji=P("tr"),ia=P("td"),la=Le("Required "),Ir=P("em"),qr=Le(Ur),Ht=Le(`
            Payment`),et=K();for(let qt=0;qt<nr.length;qt+=1)nr[qt].c();ln=K(),Vi=P("tr"),Ar=P("td"),vr=Le("Projected "),ir=P("em"),pr=Le(Si),yi=Le(`
            Payment`),Dr=K();for(let qt=0;qt<Ze.length;qt+=1)Ze[qt].c();Wr=K(),Sr=P("tr"),hr=P("td"),hr.textContent="Payment Made",Vn=K();for(let qt=0;qt<ur.length;qt+=1)ur[qt].c();dn=K(),wr=P("tr"),Bn=P("td"),Bn.textContent="Cumulative Shortfall",ra=K();for(let qt=0;qt<dr.length;qt+=1)dr[qt].c();w(s,"class","header svelte-5pjt4m"),w(v,"class","value svelte-5pjt4m"),w(a,"class","svelte-5pjt4m"),w(E,"class","header svelte-5pjt4m"),w(j,"class","value svelte-5pjt4m"),w(A,"class","svelte-5pjt4m"),w(X,"class","header svelte-5pjt4m"),w(Ce,"class","value svelte-5pjt4m"),w(Q,"class","svelte-5pjt4m"),w(Me,"class","header svelte-5pjt4m"),w(we,"class","value svelte-5pjt4m"),w(he,"class","svelte-5pjt4m"),w(r,"class","svelte-5pjt4m"),w(i,"class","table table-striped flash-table svelte-5pjt4m"),w(n,"class","col-12 col-sm-6 overflow-x__auto"),w(Tt,"class","header svelte-5pjt4m"),w(Ct,"class","value svelte-5pjt4m"),w(pt,"class","svelte-5pjt4m"),w(nn,"class","header svelte-5pjt4m"),w(Nt,"class","value svelte-5pjt4m"),w(cn,"class","svelte-5pjt4m"),w(Zt,"class","header svelte-5pjt4m"),w(xn,"class","value svelte-5pjt4m"),w(dt,"class","svelte-5pjt4m"),w(ft,"class","header svelte-5pjt4m"),w(sn,"class","value svelte-5pjt4m"),w(qn,"class","svelte-5pjt4m"),w(Je,"class","svelte-5pjt4m"),w(ht,"class","table table-striped flash-table svelte-5pjt4m"),w(yt,"class","col-12 col-sm-6 overflow-x__auto"),w(tr,"class","svelte-5pjt4m"),w(ri,"class","svelte-5pjt4m"),w(ji,"class","svelte-5pjt4m"),w(ki,"class","header svelte-5pjt4m"),w(Rn,"class","svelte-5pjt4m"),w(di,"class","header svelte-5pjt4m"),w(Mi,"class","svelte-5pjt4m"),w(Rr,"class","header svelte-5pjt4m"),w(Ki,"class","svelte-5pjt4m"),w(_a,"class","header svelte-5pjt4m"),w(Bi,"class","svelte-5pjt4m"),w(kn,"class","no-border svelte-5pjt4m"),w(ia,"class","header svelte-5pjt4m"),w(Ji,"class","svelte-5pjt4m"),w(Ar,"class","header svelte-5pjt4m"),w(Vi,"class","svelte-5pjt4m"),w(hr,"class","header svelte-5pjt4m"),w(Sr,"class","svelte-5pjt4m"),w(Bn,"class","header svelte-5pjt4m"),w(wr,"class","svelte-5pjt4m"),w(kr,"class","separator svelte-5pjt4m"),w($i,"class","table table-striped flash-table svelte-5pjt4m"),w(Pi,"class","col-sm-12 overflow-x__auto"),w(t,"class","col-sm-12 container widget-div svelte-5pjt4m")},m(qt,mn){ce(qt,t,mn),m(t,n),m(n,i),m(i,r),m(r,a),m(a,s),m(s,l),m(s,d),m(a,c),m(a,v),ae(T,v,null),m(r,b),m(r,A),m(A,E),m(E,I),m(E,D),m(E,O),m(O,F),m(E,$),m(A,L),m(A,j),ae(H,j,null),m(r,V),m(r,Q),m(Q,X),m(X,ne),m(X,be),m(Q,ue),m(Q,Ce),ae(ie,Ce,null),m(r,Y),m(r,he),m(he,Me),m(Me,We),m(Me,qe),m(Me,ee),m(ee,me),m(Me,Te),m(he,De),m(he,we),ae(Ve,we,null),m(t,Ke),m(t,yt),m(yt,ht),m(ht,Je),m(Je,pt),m(pt,Tt),m(Tt,Ge),m(Tt,st),m(pt,It),m(pt,Ct),ae(bt,Ct,null),m(Je,Rt),m(Je,cn),m(cn,nn),m(nn,Ft),m(nn,Fn),m(nn,He),m(He,Xt),m(nn,Mt),m(cn,Xe),m(cn,Nt),ae(on,Nt,null),m(Je,In),m(Je,dt),m(dt,Zt),m(dt,Ln),m(dt,xn),ae(Dn,xn,null),m(Je,Un),m(Je,qn),m(qn,ft),m(ft,ni),m(ni,un),m(ft,Ai),m(qn,St),m(qn,sn),ae(ci,sn,null),m(t,pi),m(t,Pi),m(Pi,$i),m($i,ji),m(ji,ri),m(ri,tr),m(ri,Ei);for(let ai=0;ai<rr.length;ai+=1)rr[ai]&&rr[ai].m(ri,null);m($i,Ti),m($i,kn),m(kn,Rn),m(Rn,ki),m(Rn,mr);for(let ai=0;ai<Ui.length;ai+=1)Ui[ai]&&Ui[ai].m(Rn,null);m(kn,_r),m(kn,Mi),m(Mi,di),m(Mi,Yi);for(let ai=0;ai<Ni.length;ai+=1)Ni[ai]&&Ni[ai].m(Mi,null);m(kn,na),m(kn,Ki),m(Ki,Rr),m(Ki,Di);for(let ai=0;ai<Gi.length;ai+=1)Gi[ai]&&Gi[ai].m(Ki,null);m(kn,Wi),m(kn,Bi),m(Bi,_a),m(Bi,xi);for(let ai=0;ai<lr.length;ai+=1)lr[ai]&&lr[ai].m(Bi,null);m($i,Kr),m($i,kr),m(kr,Ji),m(Ji,ia),m(ia,la),m(ia,Ir),m(Ir,qr),m(ia,Ht),m(Ji,et);for(let ai=0;ai<nr.length;ai+=1)nr[ai]&&nr[ai].m(Ji,null);m(kr,ln),m(kr,Vi),m(Vi,Ar),m(Ar,vr),m(Ar,ir),m(ir,pr),m(Ar,yi),m(Vi,Dr);for(let ai=0;ai<Ze.length;ai+=1)Ze[ai]&&Ze[ai].m(Vi,null);m(kr,Wr),m(kr,Sr),m(Sr,hr),m(Sr,Vn);for(let ai=0;ai<ur.length;ai+=1)ur[ai]&&ur[ai].m(Sr,null);m(kr,dn),m(kr,wr),m(wr,Bn),m(wr,ra);for(let ai=0;ai<dr.length;ai+=1)dr[ai]&&dr[ai].m(wr,null);_n=!0},p(qt,[mn]){(!_n||mn&1)&&o!==(o=qt[0].currentTaxYear+"")&&vt(l,o);const ai={};mn&1&&(ai.value=qt[0].projectedFederalTaxDue),T.$set(ai),(!_n||mn&1)&&y!==(y=qt[0].currentTaxYear+"")&&vt(I,y),(!_n||mn&1)&&M!==(M=qt[0].stateName+"")&&vt(F,M);const Ra={};mn&1&&(Ra.value=qt[0].projectedStateTaxDue),H.$set(Ra),(!_n||mn&1)&&te!==(te=qt[0].previousTaxYear+"")&&vt(ne,te);const aa={};mn&1&&(aa.value=qt[0].previousYearFederalTax),ie.$set(aa),(!_n||mn&1)&&Pe!==(Pe=qt[0].previousTaxYear+"")&&vt(We,Pe),(!_n||mn&1)&&G!==(G=qt[0].stateName+"")&&vt(me,G);const ga={};mn&1&&(ga.value=qt[0].previousYearStateTax),Ve.$set(ga),(!_n||mn&1)&&it!==(it=qt[0].previousTaxYear+"")&&vt(Ge,it);const Ta={};mn&1&&(Ta.value=qt[0].federalAgi),bt.$set(Ta),(!_n||mn&1)&&Qe!==(Qe=qt[0].previousTaxYear+"")&&vt(Ft,Qe),(!_n||mn&1)&&Dt!==(Dt=qt[0].stateName+"")&&vt(Xt,Dt);const va={};mn&1&&(va.value=qt[0].stateAgi),on.$set(va);const $r={};mn&1&&($r.value=qt[0].federalSafeHarbor),Dn.$set($r),(!_n||mn&1)&&Et!==(Et=qt[0].stateName+"")&&vt(un,Et);const ua={};if(mn&1&&(ua.value=qt[0].stateSafeHarbor),ci.$set(ua),mn&15){Vr=qt[0].quarters;let an;for(an=0;an<Vr.length;an+=1){const gi=wO(qt,Vr,an);rr[an]?rr[an].p(gi,mn):(rr[an]=TO(gi),rr[an].c(),rr[an].m(ri,null))}for(;an<rr.length;an+=1)rr[an].d(1);rr.length=Vr.length}if(mn&1){Or=qt[0].quarters;let an;for(an=0;an<Or.length;an+=1){const gi=yO(qt,Or,an);Ui[an]?(Ui[an].p(gi,mn),U(Ui[an],1)):(Ui[an]=kO(gi),Ui[an].c(),U(Ui[an],1),Ui[an].m(Rn,null))}for(pn(),an=Or.length;an<Ui.length;an+=1)Fr(an);hn()}if(mn&1){wi=qt[0].quarters;let an;for(an=0;an<wi.length;an+=1){const gi=bO(qt,wi,an);Ni[an]?(Ni[an].p(gi,mn),U(Ni[an],1)):(Ni[an]=SO(gi),Ni[an].c(),U(Ni[an],1),Ni[an].m(Mi,null))}for(pn(),an=wi.length;an<Ni.length;an+=1)ar(an);hn()}if(mn&1){sr=qt[0].quarters;let an;for(an=0;an<sr.length;an+=1){const gi=vO(qt,sr,an);Gi[an]?(Gi[an].p(gi,mn),U(Gi[an],1)):(Gi[an]=CO(gi),Gi[an].c(),U(Gi[an],1),Gi[an].m(Ki,null))}for(pn(),an=sr.length;an<Gi.length;an+=1)Cr(an);hn()}if(mn&1){or=qt[0].quarters;let an;for(an=0;an<or.length;an+=1){const gi=gO(qt,or,an);lr[an]?(lr[an].p(gi,mn),U(lr[an],1)):(lr[an]=PO(gi),lr[an].c(),U(lr[an],1),lr[an].m(Bi,null))}for(pn(),an=or.length;an<lr.length;an+=1)Ka(an);hn()}if((!_n||mn&1)&&Ur!==(Ur=qt[0].stateName+"")&&vt(qr,Ur),mn&1){Lr=qt[0].quarters;let an;for(an=0;an<Lr.length;an+=1){const gi=mO(qt,Lr,an);nr[an]?(nr[an].p(gi,mn),U(nr[an],1)):(nr[an]=EO(gi),nr[an].c(),U(nr[an],1),nr[an].m(Ji,null))}for(pn(),an=Lr.length;an<nr.length;an+=1)wa(an);hn()}if((!_n||mn&1)&&Si!==(Si=qt[0].stateName+"")&&vt(pr,Si),mn&1){zr=qt[0].quarters;let an;for(an=0;an<zr.length;an+=1){const gi=hO(qt,zr,an);Ze[an]?(Ze[an].p(gi,mn),U(Ze[an],1)):(Ze[an]=IO(gi),Ze[an].c(),U(Ze[an],1),Ze[an].m(Vi,null))}for(pn(),an=zr.length;an<Ze.length;an+=1)tn(an);hn()}if(mn&1){Xr=qt[0].quarters;let an;for(an=0;an<Xr.length;an+=1){const gi=pO(qt,Xr,an);ur[an]?(ur[an].p(gi,mn),U(ur[an],1)):(ur[an]=AO(gi),ur[an].c(),U(ur[an],1),ur[an].m(Sr,null))}for(pn(),an=Xr.length;an<ur.length;an+=1)Hr(an);hn()}if(mn&1){Xi=qt[0].quarters;let an;for(an=0;an<Xi.length;an+=1){const gi=_O(qt,Xi,an);dr[an]?(dr[an].p(gi,mn),U(dr[an],1)):(dr[an]=DO(gi),dr[an].c(),U(dr[an],1),dr[an].m(wr,null))}for(pn(),an=Xi.length;an<dr.length;an+=1)pa(an);hn()}},i(qt){if(!_n){U(T.$$.fragment,qt),U(H.$$.fragment,qt),U(ie.$$.fragment,qt),U(Ve.$$.fragment,qt),U(bt.$$.fragment,qt),U(on.$$.fragment,qt),U(Dn.$$.fragment,qt),U(ci.$$.fragment,qt);for(let mn=0;mn<Or.length;mn+=1)U(Ui[mn]);for(let mn=0;mn<wi.length;mn+=1)U(Ni[mn]);for(let mn=0;mn<sr.length;mn+=1)U(Gi[mn]);for(let mn=0;mn<or.length;mn+=1)U(lr[mn]);for(let mn=0;mn<Lr.length;mn+=1)U(nr[mn]);for(let mn=0;mn<zr.length;mn+=1)U(Ze[mn]);for(let mn=0;mn<Xr.length;mn+=1)U(ur[mn]);for(let mn=0;mn<Xi.length;mn+=1)U(dr[mn]);_n=!0}},o(qt){W(T.$$.fragment,qt),W(H.$$.fragment,qt),W(ie.$$.fragment,qt),W(Ve.$$.fragment,qt),W(bt.$$.fragment,qt),W(on.$$.fragment,qt),W(Dn.$$.fragment,qt),W(ci.$$.fragment,qt),Ui=Ui.filter(Boolean);for(let mn=0;mn<Ui.length;mn+=1)W(Ui[mn]);Ni=Ni.filter(Boolean);for(let mn=0;mn<Ni.length;mn+=1)W(Ni[mn]);Gi=Gi.filter(Boolean);for(let mn=0;mn<Gi.length;mn+=1)W(Gi[mn]);lr=lr.filter(Boolean);for(let mn=0;mn<lr.length;mn+=1)W(lr[mn]);nr=nr.filter(Boolean);for(let mn=0;mn<nr.length;mn+=1)W(nr[mn]);Ze=Ze.filter(Boolean);for(let mn=0;mn<Ze.length;mn+=1)W(Ze[mn]);ur=ur.filter(Boolean);for(let mn=0;mn<ur.length;mn+=1)W(ur[mn]);dr=dr.filter(Boolean);for(let mn=0;mn<dr.length;mn+=1)W(dr[mn]);_n=!1},d(qt){qt&&_e(t),se(T),se(H),se(ie),se(Ve),se(bt),se(on),se(Dn),se(ci),Nn(rr,qt),Nn(Ui,qt),Nn(Ni,qt),Nn(Gi,qt),Nn(lr,qt),Nn(nr,qt),Nn(Ze,qt),Nn(ur,qt),Nn(dr,qt)}}}function Nb(e){return["st","nd","rd"][((e+90)%100-10)%10-1]||"th"}function JSe(e,t,n){let{estimatedTaxPayments:i}=t;function r(o){return zn(o,"YYYY-MM-DD").format("MMMM")}function a(o){return zn(o,"YYYY-MM-DD").format("D")}function s(o){return zn(o,"YYYY-MM-DD").format("YYYY")}return e.$$set=o=>{"estimatedTaxPayments"in o&&n(0,i=o.estimatedTaxPayments)},[i,r,a,s]}class ZSe extends Qt{constructor(t){super(),Jt(this,t,JSe,QSe,Kt,{estimatedTaxPayments:0})}}var S5=typeof global=="object"&&global&&global.Object===Object&&global,eCe=typeof self=="object"&&self&&self.Object===Object&&self,fc=S5||eCe||Function("return this")(),r0=fc.Symbol,C5=Object.prototype,tCe=C5.hasOwnProperty,nCe=C5.toString,Hh=r0?r0.toStringTag:void 0;function iCe(e){var t=tCe.call(e,Hh),n=e[Hh];try{e[Hh]=void 0;var i=!0}catch{}var r=nCe.call(e);return i&&(t?e[Hh]=n:delete e[Hh]),r}var rCe=Object.prototype,aCe=rCe.toString;function sCe(e){return aCe.call(e)}var oCe="[object Null]",lCe="[object Undefined]",OO=r0?r0.toStringTag:void 0;function p_(e){return e==null?e===void 0?lCe:oCe:OO&&OO in Object(e)?iCe(e):sCe(e)}function Fm(e){return e!=null&&typeof e=="object"}var uCe="[object Number]";function dCe(e){return typeof e=="number"||Fm(e)&&p_(e)==uCe}function fCe(e,t){for(var n,i=-1,r=e.length;++i<r;){var a=t(e[i]);a!==void 0&&(n=n===void 0?a:n+a)}return n}function P5(e){return e}function cCe(e){return e&&e.length?fCe(e,P5):0}var _Ce=Object.prototype;function E5(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_Ce;return e===n}function pCe(e,t){return function(n){return e(t(n))}}var hCe=pCe(Object.keys,Object),mCe=Object.prototype,gCe=mCe.hasOwnProperty;function vCe(e){if(!E5(e))return hCe(e);var t=[];for(var n in Object(e))gCe.call(e,n)&&n!="constructor"&&t.push(n);return t}function a0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bCe="[object AsyncFunction]",yCe="[object Function]",wCe="[object GeneratorFunction]",TCe="[object Proxy]";function I5(e){if(!a0(e))return!1;var t=p_(e);return t==yCe||t==wCe||t==bCe||t==TCe}var Fb=fc["__core-js_shared__"],MO=function(){var e=/[^.]+$/.exec(Fb&&Fb.keys&&Fb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kCe(e){return!!MO&&MO in e}var SCe=Function.prototype,CCe=SCe.toString;function h_(e){if(e!=null){try{return CCe.call(e)}catch{}try{return e+""}catch{}}return""}var PCe=/[\\^$.*+?()[\]{}|]/g,ECe=/^\[object .+?Constructor\]$/,ICe=Function.prototype,ACe=Object.prototype,DCe=ICe.toString,OCe=ACe.hasOwnProperty,MCe=RegExp("^"+DCe.call(OCe).replace(PCe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xCe(e){if(!a0(e)||kCe(e))return!1;var t=I5(e)?MCe:ECe;return t.test(h_(e))}function RCe(e,t){return e==null?void 0:e[t]}function Lm(e,t){var n=RCe(e,t);return xCe(n)?n:void 0}var qy=Lm(fc,"DataView"),Wy=Lm(fc,"Map"),Vy=Lm(fc,"Promise"),zy=Lm(fc,"Set"),Yy=Lm(fc,"WeakMap"),xO="[object Map]",$Ce="[object Object]",RO="[object Promise]",$O="[object Set]",NO="[object WeakMap]",FO="[object DataView]",NCe=h_(qy),FCe=h_(Wy),LCe=h_(Vy),HCe=h_(zy),jCe=h_(Yy),Kc=p_;(qy&&Kc(new qy(new ArrayBuffer(1)))!=FO||Wy&&Kc(new Wy)!=xO||Vy&&Kc(Vy.resolve())!=RO||zy&&Kc(new zy)!=$O||Yy&&Kc(new Yy)!=NO)&&(Kc=function(e){var t=p_(e),n=t==$Ce?e.constructor:void 0,i=n?h_(n):"";if(i)switch(i){case NCe:return FO;case FCe:return xO;case LCe:return RO;case HCe:return $O;case jCe:return NO}return t});var BCe="[object Arguments]";function LO(e){return Fm(e)&&p_(e)==BCe}var A5=Object.prototype,UCe=A5.hasOwnProperty,qCe=A5.propertyIsEnumerable,WCe=LO(function(){return arguments}())?LO:function(e){return Fm(e)&&UCe.call(e,"callee")&&!qCe.call(e,"callee")},A2=Array.isArray,VCe=9007199254740991;function D5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=VCe}function zCe(e){return e!=null&&D5(e.length)&&!I5(e)}function YCe(){return!1}var O5=typeof of=="object"&&of&&!of.nodeType&&of,HO=O5&&typeof ou=="object"&&ou&&!ou.nodeType&&ou,GCe=HO&&HO.exports===O5,jO=GCe?fc.Buffer:void 0,KCe=jO?jO.isBuffer:void 0,XCe=KCe||YCe,QCe="[object Arguments]",JCe="[object Array]",ZCe="[object Boolean]",ePe="[object Date]",tPe="[object Error]",nPe="[object Function]",iPe="[object Map]",rPe="[object Number]",aPe="[object Object]",sPe="[object RegExp]",oPe="[object Set]",lPe="[object String]",uPe="[object WeakMap]",dPe="[object ArrayBuffer]",fPe="[object DataView]",cPe="[object Float32Array]",_Pe="[object Float64Array]",pPe="[object Int8Array]",hPe="[object Int16Array]",mPe="[object Int32Array]",gPe="[object Uint8Array]",vPe="[object Uint8ClampedArray]",bPe="[object Uint16Array]",yPe="[object Uint32Array]",us={};us[cPe]=us[_Pe]=us[pPe]=us[hPe]=us[mPe]=us[gPe]=us[vPe]=us[bPe]=us[yPe]=!0;us[QCe]=us[JCe]=us[dPe]=us[ZCe]=us[fPe]=us[ePe]=us[tPe]=us[nPe]=us[iPe]=us[rPe]=us[aPe]=us[sPe]=us[oPe]=us[lPe]=us[uPe]=!1;function wPe(e){return Fm(e)&&D5(e.length)&&!!us[p_(e)]}function TPe(e){return function(t){return e(t)}}var M5=typeof of=="object"&&of&&!of.nodeType&&of,Jh=M5&&typeof ou=="object"&&ou&&!ou.nodeType&&ou,kPe=Jh&&Jh.exports===M5,Lb=kPe&&S5.process,BO=function(){try{var e=Jh&&Jh.require&&Jh.require("util").types;return e||Lb&&Lb.binding&&Lb.binding("util")}catch{}}(),UO=BO&&BO.isTypedArray,SPe=UO?TPe(UO):wPe,CPe="[object Map]",PPe="[object Set]",EPe=Object.prototype,IPe=EPe.hasOwnProperty;function D2(e){if(e==null)return!0;if(zCe(e)&&(A2(e)||typeof e=="string"||typeof e.splice=="function"||XCe(e)||SPe(e)||WCe(e)))return!e.length;var t=Kc(e);if(t==CPe||t==PPe)return!e.size;if(E5(e))return!vCe(e).length;for(var n in e)if(IPe.call(e,n))return!1;return!0}function APe(e){return e&&e.length?e[0]:void 0}function x5(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function R5(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}var DPe=/\s/;function OPe(e){for(var t=e.length;t--&&DPe.test(e.charAt(t)););return t}var MPe=/^\s+/;function xPe(e){return e&&e.slice(0,OPe(e)+1).replace(MPe,"")}var RPe="[object Symbol]";function $Pe(e){return typeof e=="symbol"||Fm(e)&&p_(e)==RPe}var qO=NaN,NPe=/^[-+]0x[0-9a-f]+$/i,FPe=/^0b[01]+$/i,LPe=/^0o[0-7]+$/i,HPe=parseInt;function jPe(e){if(typeof e=="number")return e;if($Pe(e))return qO;if(a0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=a0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xPe(e);var n=FPe.test(e);return n||LPe.test(e)?HPe(e.slice(2),n?2:8):NPe.test(e)?qO:+e}var WO=1/0,BPe=17976931348623157e292;function UPe(e){if(!e)return e===0?e:0;if(e=jPe(e),e===WO||e===-WO){var t=e<0?-1:1;return t*BPe}return e===e?e:0}function O2(e){var t=UPe(e),n=t%1;return t===t?n?t-n:t:0}function qPe(e,t,n){var i=e==null?0:e.length;return i?(t=t===void 0?1:O2(t),R5(e,t<0?0:t,i)):[]}function WPe(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function VPe(e){return typeof e=="function"?e:P5}var zPe=9007199254740991,Hb=4294967295,YPe=Math.min;function GPe(e,t){if(e=O2(e),e<1||e>zPe)return[];var n=Hb,i=YPe(e,Hb);t=VPe(t),e-=Hb;for(var r=WPe(i,t);++n<e;)t(n);return r}function KPe(e,t,n){return e&&e.length?(t=t===void 0?1:O2(t),R5(e,0,t<0?0:t)):[]}function s0(e,t){return cCe(KPe(e,t))}function XPe({tickData:e,customSegmentStops:t,min:n,max:i}){if(!A2(t)||D2(t))return e;if(APe(t)!==n)throw new Error(`First value should be equivalent to min value given. Current min value - ${n}`);if(x5(t)!==i)throw new Error(`Last value should be equivalent to max value given. Current min value - ${i}`);const r=t.map((a,s)=>{if(s!==0)return(a-t[s-1])/(i-n)});return qPe(r)}function QPe({heightRatio:e,radius:t}){if(e<0||e>1)throw new Error(`Invalid needleHeightRatio given - ${e}`);return Math.round(t*e)}function JPe({maxSegmentLabelCount:e,segmentCount:t}){const n=parseInt(e,10),i=parseInt(t,10);return dCe(n)&&n>=0&&n<=i?n:i}function ZPe({min:e,max:t,segments:n}){return Jv().range([0,1]).domain([e,t])}function eEe(e,{min:t,max:n,segments:i}){let r=[];if(r=e.ticks(i),(x5(r)!==n||i<r.length)&&r.length>1){const s=(n-t)/i;r=[t],GPe(i,o=>{r.push(t+(o+1)*s)})}return r.length===1&&(r=[t,n]),r}function tEe(e,t){const n=t.labelFormat(e),i=t.currentValuePlaceholderStyle;return t.currentValueText.replace(i,n)}function VO(e){return e*Math.PI/180}function nEe(e,t,n){return`translate(${e+t}, ${e+n})`}function iEe(e){return e.width/2}const La={easeLinear:"easeLinear",easeQuadIn:"easeQuadIn",easeQuadOut:"easeQuadOut",easeQuadInOut:"easeQuadInOut",easeCubicIn:"easeCubicIn",easeCubicOut:"easeCubicOut",easeCubicInOut:"easeCubicInOut",easePolyIn:"easePolyIn",easePolyOut:"easePolyOut",easePolyInOut:"easePolyInOut",easeSinIn:"easeSinIn",easeSinOut:"easeSinOut",easeSinInOut:"easeSinInOut",easeExpIn:"easeExpIn",easeExpOut:"easeExpOut",easeExpInOut:"easeExpInOut",easeCircleIn:"easeCircleIn",easeCircleOut:"easeCircleOut",easeCircleInOut:"easeCircleInOut",easeBounceIn:"easeBounceIn",easeBounceOut:"easeBounceOut",easeBounceInOut:"easeBounceInOut",easeBackIn:"easeBackIn",easeBackOut:"easeBackOut",easeBackInOut:"easeBackInOut",easeElasticIn:"easeElasticIn",easeElasticOut:"easeElasticOut",easeElasticInOut:"easeElasticInOut",easeElastic:"easeElastic"},zO={value:0,minValue:0,maxValue:1e3,forceRender:!1,width:300,height:300,paddingHorizontal:0,paddingVertical:0,fluidWidth:!1,dimensionUnit:"px",segments:5,maxSegmentLabels:-1,customSegmentStops:[],customSegmentLabels:[],needleColor:"steelblue",startColor:"#FF471A",endColor:"#33CC33",segmentColors:[],needleTransition:La.easeQuadInOut,needleTransitionDuration:500,needleHeightRatio:.9,ringWidth:60,textColor:"#666",valueFormat:"",currentValueText:"${value}",currentValuePlaceholderStyle:"${value}",labelFontSize:"14px",valueTextFontSize:"16px",valueTextFontWeight:"bold"},rEe={ringInset:20,pointerWidth:10,pointerTailLength:5,minAngle:-90,maxAngle:90,labelInset:10},aEe=({PROPS:e,parentWidth:t,parentHeight:n})=>{const i={width:e.fluidWidth?t:e.width,height:e.fluidWidth?n:e.height,paddingHorizontal:e.paddingHorizontal,paddingVertical:e.paddingVertical,dimensionUnit:e.dimensionUnit,ringWidth:e.ringWidth,minValue:e.minValue,maxValue:e.maxValue,needleColor:e.needleColor,majorTicks:e.segments,customSegmentStops:e.customSegmentStops,customSegmentLabels:e.customSegmentLabels,maxSegmentLabels:JPe({maxSegmentLabelCount:e.maxSegmentLabels,segmentCount:e.segments}),segmentColors:e.segmentColors,arcColorFn:e.segmentColors.length>0?_5(e.segmentColors):S2e(_m(e.startColor),_m(e.endColor)),needleTransition:e.needleTransition,needleTransitionDuration:e.needleTransitionDuration,needleHeightRatio:e.needleHeightRatio,textColor:e.textColor,labelFormat:j0(e.valueFormat),currentValueText:e.currentValueText,currentValuePlaceholderStyle:e.currentValuePlaceholderStyle,labelFontSize:e.labelFontSize,valueTextFontSize:e.valueTextFontSize,valueTextFontWeight:e.valueTextFontWeight};return Object.assign({},rEe,i)},sEe=(e,t)=>({...e,...t});function oEe(e){switch(e){case La.easeLinear:return OTe;case La.easeQuadIn:return MTe;case La.easeQuadOut:return xTe;case La.easeQuadInOut:return AD;case La.easeCubicIn:return RTe;case La.easeCubicOut:return $Te;case La.easeCubicInOut:return r5;case La.easePolyIn:return NTe;case La.easePolyOut:return FTe;case La.easePolyInOut:return LTe;case La.easeSinIn:return HTe;case La.easeSinOut:return jTe;case La.easeSinInOut:return BTe;case La.easeExpIn:return UTe;case La.easeExpOut:return qTe;case La.easeExpInOut:return WTe;case La.easeCircleIn:return VTe;case La.easeCircleOut:return zTe;case La.easeCircleInOut:return YTe;case La.easeBounceIn:return nke;case La.easeBounceOut:return Gv;case La.easeBounceInOut:return ike;case La.easeBackIn:return rke;case La.easeBackOut:return ake;case La.easeBackInOut:return ske;case La.easeElasticIn:return oke;case La.easeElasticOut:return DD;case La.easeElasticInOut:return lke;case La.easeElastic:return DD;default:return console.warn(`Warning: Invalid needle transition '${e}'. Switching to default transition 'easeQuadInOut'`),AD}}var YO=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function lEe(e,t){return!!(e===t||YO(e)&&YO(t))}function uEe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!lEe(e[n],t[n]))return!1;return!0}function U0(e,t){t===void 0&&(t=uEe);var n,i=[],r,a=!1;function s(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return a&&n===this&&t(o,i)||(r=e.apply(this,o),a=!0,n=this,i=o),r}return s}const M2=U0(cEe),dEe=U0(_Ee),x2=U0(pEe),fEe=U0(hEe);function cEe(e){return ZPe({min:e.minValue,max:e.maxValue,segments:e.maxSegmentLabels})}function _Ee(e){const t=M2(e);let n=eEe(t,{min:e.minValue,max:e.maxValue,segments:e.maxSegmentLabels});return e.customSegmentStops.length>0&&e.maxSegmentLabels!==0&&(n=e.customSegmentStops),n}function pEe(e){const t=yye(e.majorTicks).map(i=>1/e.majorTicks);return XPe({tickData:t,customSegmentStops:e.customSegmentStops,min:e.minValue,max:e.maxValue})}function hEe(e){const t=x2(e),n=e.maxAngle-e.minAngle,i=e.width/2;return qke().innerRadius(i-e.ringWidth-e.ringInset).outerRadius(i-e.ringInset).startAngle((a,s)=>{const o=s0(t,s);return VO(e.minAngle+o*n)}).endAngle((a,s)=>{const o=s0(t,s+1);return VO(e.minAngle+o*n)})}const mEe=({d3_refs:e,newValue:t,config:n})=>{const r=M2(n)(t),a=n.maxAngle-n.minAngle,s=n.minAngle+r*a;e.pointer.transition().duration(n.needleTransitionDuration).ease(oEe(n.needleTransition)).attr("transform",`rotate(${s})`),e.current_value_text.text(tEe(t,n))},gEe=({container:e,config:t})=>{const n=iEe(t),i=nEe(n,t.paddingHorizontal,t.paddingVertical),r=vEe({container:e,config:t});return bEe({config:t,svg:r,centerTx:i}),yEe({config:t,svg:r,centerTx:i,r:n}),{current_value_text:TEe({config:t,svg:r}),pointer:kEe({config:t,svg:r,r:n,centerTx:i})}};function vEe({container:e,config:t}){const n=t.width+2*t.paddingHorizontal,i=t.height+2*t.paddingVertical;return Uv(e).append("svg:svg").attr("class","speedometer").attr("width",`${n}${t.dimensionUnit}`).attr("height",`${i}${t.dimensionUnit}`).style("width",`${n}${t.dimensionUnit}`).style("height",`${i}${t.dimensionUnit}`)}function bEe({config:e,svg:t,centerTx:n}){const i=x2(e),r=fEe(e);t.append("g").attr("class","arc").attr("transform",n).selectAll("path").data(i).enter().append("path").attr("class","speedo-segment").attr("fill",(s,o)=>!D2(e.segmentColors)&&e.segmentColors[o]?e.segmentColors[o]:e.arcColorFn(s*o)).attr("d",r)}function yEe({config:e,svg:t,centerTx:n,r:i}){const r=dEe(e),a=x2(e),s=M2(e),o=e.maxAngle-e.minAngle,{customSegmentLabels:l}=e,d=A2(l)&&!D2(l),c=d&&l.length===a.length;if(d&&!c)throw new Error(`Custom Segment Labels should be an array with length of ${a.length}`);if(d&&c){wEe({config:e,svg:t,centerTx:n,r:i,ticks:r,tickData:a,scale:s,range:o});return}t.append("g").attr("class","label").attr("transform",n).selectAll("text").data(r).enter().append("text").attr("transform",(T,b)=>{const A=e.customSegmentStops.length===0?s(T):s0(a,b);return`rotate(${e.minAngle+A*o}) translate(0, ${e.labelInset-i})`}).text(e.labelFormat).attr("class","segment-value").style("text-anchor","middle").style("font-size",e.labelFontSize).style("font-weight","bold").style("fill",e.textColor)}function wEe({config:e,svg:t,centerTx:n,r:i,ticks:r,tickData:a,scale:s,range:o}){const{customSegmentStops:l,customSegmentLabels:d}=e;function c(y,I){const D=l.length===0?s(y):s0(a,I);return e.minAngle+D*o}const v=d.map((y,I)=>{const D=I,O=I+1,M=r[D],F=c(M,D),$=r[O];return(c($,O)+F)/2}),T=i-e.ringWidth-e.ringInset,b=i-e.ringInset,A=b-(b-T)/2;t.append("g").attr("class","label").attr("transform",n).selectAll("text").data(d).enter().append("text").attr("transform",(y,I)=>{const D=v[I],O=`rotate(${D}) translate(0, ${e.labelInset-i})`,M=`rotate(${D}) translate(0, ${e.labelInset/2-A})`;return y.position==="OUTSIDE"?O:M}).text(y=>y.text||"").attr("class","segment-value").style("text-anchor","middle").style("font-size",y=>y.fontSize||e.labelFontSize).style("font-weight","bold").style("fill",y=>y.color||e.textColor)}function TEe({config:e,svg:t}){const n=(e.width+2*e.paddingHorizontal)/2,i=(e.width+4*e.paddingVertical)/2;return t.append("g").attr("transform",`translate(${n}, ${i})`).append("text").attr("class","current-value").attr("text-anchor","middle").attr("y",23).text(e.currentValue).style("font-size",e.valueTextFontSize).style("font-weight",e.valueTextFontWeight).style("fill",e.textColor)}function kEe({config:e,svg:t,r:n,centerTx:i}){const r=QPe({heightRatio:e.needleHeightRatio,radius:n}),a=[[e.pointerWidth/2,0],[0,-r],[-(e.pointerWidth/2),0],[0,e.pointerTailLength],[e.pointerWidth/2,0]],s=h5().curve(Kke);return t.append("g").data([a]).attr("class","pointer").attr("transform",i).style("fill",e.needleColor).append("path").attr("d",s).attr("transform",`rotate(${e.minAngle})`)}function SEe(e){let t;return{c(){t=P("div"),w(t,"id","speedo-container")},m(n,i){ce(n,t,i),e[2](t)},p:ot,i:ot,o:ot,d(n){n&&_e(t),e[2](null)}}}function CEe(e,t,n){const i=["forceRender"];let r=HS(t,i),{forceRender:a=!1}=t,s=!1,o={},l={},d,c={pointer:!1,current_value_text:!1};function v(){l=Object.assign({},zO,r),o=aEe({PROPS:l,parentWidth:d.parentNode.clientWidth,parentHeight:d.parentNode.clientHeight}),Uv(d).select("svg").remove(),c=gEe({container:d,config:o})}function T(){mEe({d3_refs:c,newValue:l.value||0,config:o})}oa(()=>{v()}),lc(()=>{a&&v(),s?(l=Object.assign({},zO,r),o=sEe(o,{labelFormat:j0(l.valueFormat||""),currentValueText:l.currentValueText||"${value}"})):s=!0,T()});function b(A){Oe[A?"unshift":"push"](()=>{d=A,n(0,d)})}return e.$$set=A=>{t=gv(gv({},t),D7(A)),n(9,r=HS(t,i)),"forceRender"in A&&n(1,a=A.forceRender)},[d,a,b]}class PEe extends Qt{constructor(t){super(),Jt(this,t,CEe,SEe,Kt,{forceRender:1})}}function EEe(e){let t,n,i,r,a,s,o;return a=new PEe({props:{value:e[0].widgets.taxChart.current||0,minValue:e[0].widgets.taxChart.min_bound||-25e3,maxValue:e[0].widgets.taxChart.max_bound||4e4,customSegmentStops:[e[0].widgets.taxChart.min_bound||-25e3,e[0].widgets.taxChart.current||0,e[0].widgets.taxChart.max_bound||4e4],segmentColors:["#1ABC9C","#F0F3F3"],currentValueText:e[1](e[0].widgets.taxChart.current||0),textColor:"#1ABC9C",labelFontSize:"0px",valueTextFontSize:"19px",needleColor:"#1D212A",needleTransitionDuration:3e3,needleTransition:"easeElastic"}}),{c(){t=P("div"),n=P("div"),i=P("div"),i.innerHTML='<h3 class="card-title mb-0">Total Tax Due</h3>',r=P("div"),re(a.$$.fragment),s=P("br"),w(i,"class","card-header"),w(r,"class","total-tax-due card-body svelte-1us2spk"),wt(r,"inactive",e[0].widgets.taxChart.current==null),w(n,"class","card flex-align mb-3"),w(t,"class","col-sm-12 col-sm-6 col-lg-6 col-xl-3 d-flex flex-column")},m(l,d){ce(l,t,d),m(t,n),m(n,i),m(n,r),ae(a,r,null),m(r,s),o=!0},p(l,[d]){const c={};d&1&&(c.value=l[0].widgets.taxChart.current||0),d&1&&(c.minValue=l[0].widgets.taxChart.min_bound||-25e3),d&1&&(c.maxValue=l[0].widgets.taxChart.max_bound||4e4),d&1&&(c.customSegmentStops=[l[0].widgets.taxChart.min_bound||-25e3,l[0].widgets.taxChart.current||0,l[0].widgets.taxChart.max_bound||4e4]),d&1&&(c.currentValueText=l[1](l[0].widgets.taxChart.current||0)),a.$set(c),(!o||d&1)&&wt(r,"inactive",l[0].widgets.taxChart.current==null)},i(l){o||(U(a.$$.fragment,l),o=!0)},o(l){W(a.$$.fragment,l),o=!1},d(l){l&&_e(t),se(a)}}}function IEe(e,t,n){let{dashboard:i}=t;function r(a){return Er.formatMoney(a,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"-%s%v",zero:"%s%v"}})}return e.$$set=a=>{"dashboard"in a&&n(0,i=a.dashboard)},[i,r]}class AEe extends Qt{constructor(t){super(),Jt(this,t,IEe,EEe,Kt,{dashboard:0})}}var $5={exports:{}};const DEe=B7(lW);/*!
 * Chart.js v2.9.4
 * https://www.chartjs.org
 * (c) 2020 Chart.js Contributors
 * Released under the MIT License
 */(function(e,t){(function(n,i){e.exports=i(function(){try{return DEe}catch{}}())})(zs,function(n){n=n&&n.hasOwnProperty("default")?n.default:n;function i(g,C){return C={exports:{}},g(C,C.exports),C.exports}function r(g){return g&&g.default||g}var a={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},s=i(function(g){var C={};for(var x in a)a.hasOwnProperty(x)&&(C[a[x]]=x);var N=g.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var B in N)if(N.hasOwnProperty(B)){if(!("channels"in N[B]))throw new Error("missing channels property: "+B);if(!("labels"in N[B]))throw new Error("missing channel labels property: "+B);if(N[B].labels.length!==N[B].channels)throw new Error("channel and label counts mismatch: "+B);var J=N[B].channels,oe=N[B].labels;delete N[B].channels,delete N[B].labels,Object.defineProperty(N[B],"channels",{value:J}),Object.defineProperty(N[B],"labels",{value:oe})}N.rgb.hsl=function(fe){var Ie=fe[0]/255,Fe=fe[1]/255,je=fe[2]/255,ut=Math.min(Ie,Fe,je),Pt=Math.max(Ie,Fe,je),Ot=Pt-ut,Lt,Gt,Cn;return Pt===ut?Lt=0:Ie===Pt?Lt=(Fe-je)/Ot:Fe===Pt?Lt=2+(je-Ie)/Ot:je===Pt&&(Lt=4+(Ie-Fe)/Ot),Lt=Math.min(Lt*60,360),Lt<0&&(Lt+=360),Cn=(ut+Pt)/2,Pt===ut?Gt=0:Cn<=.5?Gt=Ot/(Pt+ut):Gt=Ot/(2-Pt-ut),[Lt,Gt*100,Cn*100]},N.rgb.hsv=function(fe){var Ie,Fe,je,ut,Pt,Ot=fe[0]/255,Lt=fe[1]/255,Gt=fe[2]/255,Cn=Math.max(Ot,Lt,Gt),ii=Cn-Math.min(Ot,Lt,Gt),si=function(Li){return(Cn-Li)/6/ii+1/2};return ii===0?ut=Pt=0:(Pt=ii/Cn,Ie=si(Ot),Fe=si(Lt),je=si(Gt),Ot===Cn?ut=je-Fe:Lt===Cn?ut=1/3+Ie-je:Gt===Cn&&(ut=2/3+Fe-Ie),ut<0?ut+=1:ut>1&&(ut-=1)),[ut*360,Pt*100,Cn*100]},N.rgb.hwb=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut=N.rgb.hsl(fe)[0],Pt=1/255*Math.min(Ie,Math.min(Fe,je));return je=1-1/255*Math.max(Ie,Math.max(Fe,je)),[ut,Pt*100,je*100]},N.rgb.cmyk=function(fe){var Ie=fe[0]/255,Fe=fe[1]/255,je=fe[2]/255,ut,Pt,Ot,Lt;return Lt=Math.min(1-Ie,1-Fe,1-je),ut=(1-Ie-Lt)/(1-Lt)||0,Pt=(1-Fe-Lt)/(1-Lt)||0,Ot=(1-je-Lt)/(1-Lt)||0,[ut*100,Pt*100,Ot*100,Lt*100]};function ye(fe,Ie){return Math.pow(fe[0]-Ie[0],2)+Math.pow(fe[1]-Ie[1],2)+Math.pow(fe[2]-Ie[2],2)}N.rgb.keyword=function(fe){var Ie=C[fe];if(Ie)return Ie;var Fe=1/0,je;for(var ut in a)if(a.hasOwnProperty(ut)){var Pt=a[ut],Ot=ye(fe,Pt);Ot<Fe&&(Fe=Ot,je=ut)}return je},N.keyword.rgb=function(fe){return a[fe]},N.rgb.xyz=function(fe){var Ie=fe[0]/255,Fe=fe[1]/255,je=fe[2]/255;Ie=Ie>.04045?Math.pow((Ie+.055)/1.055,2.4):Ie/12.92,Fe=Fe>.04045?Math.pow((Fe+.055)/1.055,2.4):Fe/12.92,je=je>.04045?Math.pow((je+.055)/1.055,2.4):je/12.92;var ut=Ie*.4124+Fe*.3576+je*.1805,Pt=Ie*.2126+Fe*.7152+je*.0722,Ot=Ie*.0193+Fe*.1192+je*.9505;return[ut*100,Pt*100,Ot*100]},N.rgb.lab=function(fe){var Ie=N.rgb.xyz(fe),Fe=Ie[0],je=Ie[1],ut=Ie[2],Pt,Ot,Lt;return Fe/=95.047,je/=100,ut/=108.883,Fe=Fe>.008856?Math.pow(Fe,1/3):7.787*Fe+16/116,je=je>.008856?Math.pow(je,1/3):7.787*je+16/116,ut=ut>.008856?Math.pow(ut,1/3):7.787*ut+16/116,Pt=116*je-16,Ot=500*(Fe-je),Lt=200*(je-ut),[Pt,Ot,Lt]},N.hsl.rgb=function(fe){var Ie=fe[0]/360,Fe=fe[1]/100,je=fe[2]/100,ut,Pt,Ot,Lt,Gt;if(Fe===0)return Gt=je*255,[Gt,Gt,Gt];je<.5?Pt=je*(1+Fe):Pt=je+Fe-je*Fe,ut=2*je-Pt,Lt=[0,0,0];for(var Cn=0;Cn<3;Cn++)Ot=Ie+1/3*-(Cn-1),Ot<0&&Ot++,Ot>1&&Ot--,6*Ot<1?Gt=ut+(Pt-ut)*6*Ot:2*Ot<1?Gt=Pt:3*Ot<2?Gt=ut+(Pt-ut)*(2/3-Ot)*6:Gt=ut,Lt[Cn]=Gt*255;return Lt},N.hsl.hsv=function(fe){var Ie=fe[0],Fe=fe[1]/100,je=fe[2]/100,ut=Fe,Pt=Math.max(je,.01),Ot,Lt;return je*=2,Fe*=je<=1?je:2-je,ut*=Pt<=1?Pt:2-Pt,Lt=(je+Fe)/2,Ot=je===0?2*ut/(Pt+ut):2*Fe/(je+Fe),[Ie,Ot*100,Lt*100]},N.hsv.rgb=function(fe){var Ie=fe[0]/60,Fe=fe[1]/100,je=fe[2]/100,ut=Math.floor(Ie)%6,Pt=Ie-Math.floor(Ie),Ot=255*je*(1-Fe),Lt=255*je*(1-Fe*Pt),Gt=255*je*(1-Fe*(1-Pt));switch(je*=255,ut){case 0:return[je,Gt,Ot];case 1:return[Lt,je,Ot];case 2:return[Ot,je,Gt];case 3:return[Ot,Lt,je];case 4:return[Gt,Ot,je];case 5:return[je,Ot,Lt]}},N.hsv.hsl=function(fe){var Ie=fe[0],Fe=fe[1]/100,je=fe[2]/100,ut=Math.max(je,.01),Pt,Ot,Lt;return Lt=(2-Fe)*je,Pt=(2-Fe)*ut,Ot=Fe*ut,Ot/=Pt<=1?Pt:2-Pt,Ot=Ot||0,Lt/=2,[Ie,Ot*100,Lt*100]},N.hwb.rgb=function(fe){var Ie=fe[0]/360,Fe=fe[1]/100,je=fe[2]/100,ut=Fe+je,Pt,Ot,Lt,Gt;ut>1&&(Fe/=ut,je/=ut),Pt=Math.floor(6*Ie),Ot=1-je,Lt=6*Ie-Pt,Pt&1&&(Lt=1-Lt),Gt=Fe+Lt*(Ot-Fe);var Cn,ii,si;switch(Pt){default:case 6:case 0:Cn=Ot,ii=Gt,si=Fe;break;case 1:Cn=Gt,ii=Ot,si=Fe;break;case 2:Cn=Fe,ii=Ot,si=Gt;break;case 3:Cn=Fe,ii=Gt,si=Ot;break;case 4:Cn=Gt,ii=Fe,si=Ot;break;case 5:Cn=Ot,ii=Fe,si=Gt;break}return[Cn*255,ii*255,si*255]},N.cmyk.rgb=function(fe){var Ie=fe[0]/100,Fe=fe[1]/100,je=fe[2]/100,ut=fe[3]/100,Pt,Ot,Lt;return Pt=1-Math.min(1,Ie*(1-ut)+ut),Ot=1-Math.min(1,Fe*(1-ut)+ut),Lt=1-Math.min(1,je*(1-ut)+ut),[Pt*255,Ot*255,Lt*255]},N.xyz.rgb=function(fe){var Ie=fe[0]/100,Fe=fe[1]/100,je=fe[2]/100,ut,Pt,Ot;return ut=Ie*3.2406+Fe*-1.5372+je*-.4986,Pt=Ie*-.9689+Fe*1.8758+je*.0415,Ot=Ie*.0557+Fe*-.204+je*1.057,ut=ut>.0031308?1.055*Math.pow(ut,1/2.4)-.055:ut*12.92,Pt=Pt>.0031308?1.055*Math.pow(Pt,1/2.4)-.055:Pt*12.92,Ot=Ot>.0031308?1.055*Math.pow(Ot,1/2.4)-.055:Ot*12.92,ut=Math.min(Math.max(0,ut),1),Pt=Math.min(Math.max(0,Pt),1),Ot=Math.min(Math.max(0,Ot),1),[ut*255,Pt*255,Ot*255]},N.xyz.lab=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut,Pt,Ot;return Ie/=95.047,Fe/=100,je/=108.883,Ie=Ie>.008856?Math.pow(Ie,1/3):7.787*Ie+16/116,Fe=Fe>.008856?Math.pow(Fe,1/3):7.787*Fe+16/116,je=je>.008856?Math.pow(je,1/3):7.787*je+16/116,ut=116*Fe-16,Pt=500*(Ie-Fe),Ot=200*(Fe-je),[ut,Pt,Ot]},N.lab.xyz=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut,Pt,Ot;Pt=(Ie+16)/116,ut=Fe/500+Pt,Ot=Pt-je/200;var Lt=Math.pow(Pt,3),Gt=Math.pow(ut,3),Cn=Math.pow(Ot,3);return Pt=Lt>.008856?Lt:(Pt-16/116)/7.787,ut=Gt>.008856?Gt:(ut-16/116)/7.787,Ot=Cn>.008856?Cn:(Ot-16/116)/7.787,ut*=95.047,Pt*=100,Ot*=108.883,[ut,Pt,Ot]},N.lab.lch=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut,Pt,Ot;return ut=Math.atan2(je,Fe),Pt=ut*360/2/Math.PI,Pt<0&&(Pt+=360),Ot=Math.sqrt(Fe*Fe+je*je),[Ie,Ot,Pt]},N.lch.lab=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut,Pt,Ot;return Ot=je/360*2*Math.PI,ut=Fe*Math.cos(Ot),Pt=Fe*Math.sin(Ot),[Ie,ut,Pt]},N.rgb.ansi16=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2],ut=1 in arguments?arguments[1]:N.rgb.hsv(fe)[2];if(ut=Math.round(ut/50),ut===0)return 30;var Pt=30+(Math.round(je/255)<<2|Math.round(Fe/255)<<1|Math.round(Ie/255));return ut===2&&(Pt+=60),Pt},N.hsv.ansi16=function(fe){return N.rgb.ansi16(N.hsv.rgb(fe),fe[2])},N.rgb.ansi256=function(fe){var Ie=fe[0],Fe=fe[1],je=fe[2];if(Ie===Fe&&Fe===je)return Ie<8?16:Ie>248?231:Math.round((Ie-8)/247*24)+232;var ut=16+36*Math.round(Ie/255*5)+6*Math.round(Fe/255*5)+Math.round(je/255*5);return ut},N.ansi16.rgb=function(fe){var Ie=fe%10;if(Ie===0||Ie===7)return fe>50&&(Ie+=3.5),Ie=Ie/10.5*255,[Ie,Ie,Ie];var Fe=(~~(fe>50)+1)*.5,je=(Ie&1)*Fe*255,ut=(Ie>>1&1)*Fe*255,Pt=(Ie>>2&1)*Fe*255;return[je,ut,Pt]},N.ansi256.rgb=function(fe){if(fe>=232){var Ie=(fe-232)*10+8;return[Ie,Ie,Ie]}fe-=16;var Fe,je=Math.floor(fe/36)/5*255,ut=Math.floor((Fe=fe%36)/6)/5*255,Pt=Fe%6/5*255;return[je,ut,Pt]},N.rgb.hex=function(fe){var Ie=((Math.round(fe[0])&255)<<16)+((Math.round(fe[1])&255)<<8)+(Math.round(fe[2])&255),Fe=Ie.toString(16).toUpperCase();return"000000".substring(Fe.length)+Fe},N.hex.rgb=function(fe){var Ie=fe.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!Ie)return[0,0,0];var Fe=Ie[0];Ie[0].length===3&&(Fe=Fe.split("").map(function(Lt){return Lt+Lt}).join(""));var je=parseInt(Fe,16),ut=je>>16&255,Pt=je>>8&255,Ot=je&255;return[ut,Pt,Ot]},N.rgb.hcg=function(fe){var Ie=fe[0]/255,Fe=fe[1]/255,je=fe[2]/255,ut=Math.max(Math.max(Ie,Fe),je),Pt=Math.min(Math.min(Ie,Fe),je),Ot=ut-Pt,Lt,Gt;return Ot<1?Lt=Pt/(1-Ot):Lt=0,Ot<=0?Gt=0:ut===Ie?Gt=(Fe-je)/Ot%6:ut===Fe?Gt=2+(je-Ie)/Ot:Gt=4+(Ie-Fe)/Ot+4,Gt/=6,Gt%=1,[Gt*360,Ot*100,Lt*100]},N.hsl.hcg=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=1,ut=0;return Fe<.5?je=2*Ie*Fe:je=2*Ie*(1-Fe),je<1&&(ut=(Fe-.5*je)/(1-je)),[fe[0],je*100,ut*100]},N.hsv.hcg=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=Ie*Fe,ut=0;return je<1&&(ut=(Fe-je)/(1-je)),[fe[0],je*100,ut*100]},N.hcg.rgb=function(fe){var Ie=fe[0]/360,Fe=fe[1]/100,je=fe[2]/100;if(Fe===0)return[je*255,je*255,je*255];var ut=[0,0,0],Pt=Ie%1*6,Ot=Pt%1,Lt=1-Ot,Gt=0;switch(Math.floor(Pt)){case 0:ut[0]=1,ut[1]=Ot,ut[2]=0;break;case 1:ut[0]=Lt,ut[1]=1,ut[2]=0;break;case 2:ut[0]=0,ut[1]=1,ut[2]=Ot;break;case 3:ut[0]=0,ut[1]=Lt,ut[2]=1;break;case 4:ut[0]=Ot,ut[1]=0,ut[2]=1;break;default:ut[0]=1,ut[1]=0,ut[2]=Lt}return Gt=(1-Fe)*je,[(Fe*ut[0]+Gt)*255,(Fe*ut[1]+Gt)*255,(Fe*ut[2]+Gt)*255]},N.hcg.hsv=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=Ie+Fe*(1-Ie),ut=0;return je>0&&(ut=Ie/je),[fe[0],ut*100,je*100]},N.hcg.hsl=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=Fe*(1-Ie)+.5*Ie,ut=0;return je>0&&je<.5?ut=Ie/(2*je):je>=.5&&je<1&&(ut=Ie/(2*(1-je))),[fe[0],ut*100,je*100]},N.hcg.hwb=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=Ie+Fe*(1-Ie);return[fe[0],(je-Ie)*100,(1-je)*100]},N.hwb.hcg=function(fe){var Ie=fe[1]/100,Fe=fe[2]/100,je=1-Fe,ut=je-Ie,Pt=0;return ut<1&&(Pt=(je-ut)/(1-ut)),[fe[0],ut*100,Pt*100]},N.apple.rgb=function(fe){return[fe[0]/65535*255,fe[1]/65535*255,fe[2]/65535*255]},N.rgb.apple=function(fe){return[fe[0]/255*65535,fe[1]/255*65535,fe[2]/255*65535]},N.gray.rgb=function(fe){return[fe[0]/100*255,fe[0]/100*255,fe[0]/100*255]},N.gray.hsl=N.gray.hsv=function(fe){return[0,0,fe[0]]},N.gray.hwb=function(fe){return[0,100,fe[0]]},N.gray.cmyk=function(fe){return[0,0,0,fe[0]]},N.gray.lab=function(fe){return[fe[0],0,0]},N.gray.hex=function(fe){var Ie=Math.round(fe[0]/100*255)&255,Fe=(Ie<<16)+(Ie<<8)+Ie,je=Fe.toString(16).toUpperCase();return"000000".substring(je.length)+je},N.rgb.gray=function(fe){var Ie=(fe[0]+fe[1]+fe[2])/3;return[Ie/255*100]}});s.rgb,s.hsl,s.hsv,s.hwb,s.cmyk,s.xyz,s.lab,s.lch,s.hex,s.keyword,s.ansi16,s.ansi256,s.hcg,s.apple,s.gray;function o(){for(var g={},C=Object.keys(s),x=C.length,N=0;N<x;N++)g[C[N]]={distance:-1,parent:null};return g}function l(g){var C=o(),x=[g];for(C[g].distance=0;x.length;)for(var N=x.pop(),B=Object.keys(s[N]),J=B.length,oe=0;oe<J;oe++){var ye=B[oe],fe=C[ye];fe.distance===-1&&(fe.distance=C[N].distance+1,fe.parent=N,x.unshift(ye))}return C}function d(g,C){return function(x){return C(g(x))}}function c(g,C){for(var x=[C[g].parent,g],N=s[C[g].parent][g],B=C[g].parent;C[B].parent;)x.unshift(C[B].parent),N=d(s[C[B].parent][B],N),B=C[B].parent;return N.conversion=x,N}var v=function(g){for(var C=l(g),x={},N=Object.keys(C),B=N.length,J=0;J<B;J++){var oe=N[J],ye=C[oe];ye.parent!==null&&(x[oe]=c(oe,C))}return x},T={},b=Object.keys(s);function A(g){var C=function(x){return x==null?x:(arguments.length>1&&(x=Array.prototype.slice.call(arguments)),g(x))};return"conversion"in g&&(C.conversion=g.conversion),C}function E(g){var C=function(x){if(x==null)return x;arguments.length>1&&(x=Array.prototype.slice.call(arguments));var N=g(x);if(typeof N=="object")for(var B=N.length,J=0;J<B;J++)N[J]=Math.round(N[J]);return N};return"conversion"in g&&(C.conversion=g.conversion),C}b.forEach(function(g){T[g]={},Object.defineProperty(T[g],"channels",{value:s[g].channels}),Object.defineProperty(T[g],"labels",{value:s[g].labels});var C=v(g),x=Object.keys(C);x.forEach(function(N){var B=C[N];T[g][N]=E(B),T[g][N].raw=A(B)})});var y=T,I={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},D={getRgba:O,getHsla:M,getRgb:$,getHsl:L,getHwb:F,getAlpha:j,hexString:H,rgbString:V,rgbaString:Q,percentString:X,percentaString:te,hslString:ne,hslaString:be,hwbString:ue,keyword:Ce};function O(g){if(g){var C=/^#([a-fA-F0-9]{3,4})$/i,x=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,N=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,B=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,J=/(\w+)/,oe=[0,0,0],ye=1,fe=g.match(C),Ie="";if(fe){fe=fe[1],Ie=fe[3];for(var Fe=0;Fe<oe.length;Fe++)oe[Fe]=parseInt(fe[Fe]+fe[Fe],16);Ie&&(ye=Math.round(parseInt(Ie+Ie,16)/255*100)/100)}else if(fe=g.match(x)){Ie=fe[2],fe=fe[1];for(var Fe=0;Fe<oe.length;Fe++)oe[Fe]=parseInt(fe.slice(Fe*2,Fe*2+2),16);Ie&&(ye=Math.round(parseInt(Ie,16)/255*100)/100)}else if(fe=g.match(N)){for(var Fe=0;Fe<oe.length;Fe++)oe[Fe]=parseInt(fe[Fe+1]);ye=parseFloat(fe[4])}else if(fe=g.match(B)){for(var Fe=0;Fe<oe.length;Fe++)oe[Fe]=Math.round(parseFloat(fe[Fe+1])*2.55);ye=parseFloat(fe[4])}else if(fe=g.match(J)){if(fe[1]=="transparent")return[0,0,0,0];if(oe=I[fe[1]],!oe)return}for(var Fe=0;Fe<oe.length;Fe++)oe[Fe]=ie(oe[Fe],0,255);return!ye&&ye!=0?ye=1:ye=ie(ye,0,1),oe[3]=ye,oe}}function M(g){if(g){var C=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,x=g.match(C);if(x){var N=parseFloat(x[4]),B=ie(parseInt(x[1]),0,360),J=ie(parseFloat(x[2]),0,100),oe=ie(parseFloat(x[3]),0,100),ye=ie(isNaN(N)?1:N,0,1);return[B,J,oe,ye]}}}function F(g){if(g){var C=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,x=g.match(C);if(x){var N=parseFloat(x[4]),B=ie(parseInt(x[1]),0,360),J=ie(parseFloat(x[2]),0,100),oe=ie(parseFloat(x[3]),0,100),ye=ie(isNaN(N)?1:N,0,1);return[B,J,oe,ye]}}}function $(g){var C=O(g);return C&&C.slice(0,3)}function L(g){var C=M(g);return C&&C.slice(0,3)}function j(g){var C=O(g);if(C)return C[3];if(C=M(g))return C[3];if(C=F(g))return C[3]}function H(g,x){var x=x!==void 0&&g.length===3?x:g[3];return"#"+Y(g[0])+Y(g[1])+Y(g[2])+(x>=0&&x<1?Y(Math.round(x*255)):"")}function V(g,C){return C<1||g[3]&&g[3]<1?Q(g,C):"rgb("+g[0]+", "+g[1]+", "+g[2]+")"}function Q(g,C){return C===void 0&&(C=g[3]!==void 0?g[3]:1),"rgba("+g[0]+", "+g[1]+", "+g[2]+", "+C+")"}function X(g,C){if(C<1||g[3]&&g[3]<1)return te(g,C);var x=Math.round(g[0]/255*100),N=Math.round(g[1]/255*100),B=Math.round(g[2]/255*100);return"rgb("+x+"%, "+N+"%, "+B+"%)"}function te(g,C){var x=Math.round(g[0]/255*100),N=Math.round(g[1]/255*100),B=Math.round(g[2]/255*100);return"rgba("+x+"%, "+N+"%, "+B+"%, "+(C||g[3]||1)+")"}function ne(g,C){return C<1||g[3]&&g[3]<1?be(g,C):"hsl("+g[0]+", "+g[1]+"%, "+g[2]+"%)"}function be(g,C){return C===void 0&&(C=g[3]!==void 0?g[3]:1),"hsla("+g[0]+", "+g[1]+"%, "+g[2]+"%, "+C+")"}function ue(g,C){return C===void 0&&(C=g[3]!==void 0?g[3]:1),"hwb("+g[0]+", "+g[1]+"%, "+g[2]+"%"+(C!==void 0&&C!==1?", "+C:"")+")"}function Ce(g){return he[g.slice(0,3)]}function ie(g,C,x){return Math.min(Math.max(C,g),x)}function Y(g){var C=g.toString(16).toUpperCase();return C.length<2?"0"+C:C}var he={};for(var Me in I)he[I[Me]]=Me;var Pe=function(g){if(g instanceof Pe)return g;if(!(this instanceof Pe))return new Pe(g);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var C;typeof g=="string"?(C=D.getRgba(g),C?this.setValues("rgb",C):(C=D.getHsla(g))?this.setValues("hsl",C):(C=D.getHwb(g))&&this.setValues("hwb",C)):typeof g=="object"&&(C=g,C.r!==void 0||C.red!==void 0?this.setValues("rgb",C):C.l!==void 0||C.lightness!==void 0?this.setValues("hsl",C):C.v!==void 0||C.value!==void 0?this.setValues("hsv",C):C.w!==void 0||C.whiteness!==void 0?this.setValues("hwb",C):(C.c!==void 0||C.cyan!==void 0)&&this.setValues("cmyk",C))};Pe.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var g=this.values;return g.alpha!==1?g.hwb.concat([g.alpha]):g.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var g=this.values;return g.rgb.concat([g.alpha])},hslaArray:function(){var g=this.values;return g.hsl.concat([g.alpha])},alpha:function(g){return g===void 0?this.values.alpha:(this.setValues("alpha",g),this)},red:function(g){return this.setChannel("rgb",0,g)},green:function(g){return this.setChannel("rgb",1,g)},blue:function(g){return this.setChannel("rgb",2,g)},hue:function(g){return g&&(g%=360,g=g<0?360+g:g),this.setChannel("hsl",0,g)},saturation:function(g){return this.setChannel("hsl",1,g)},lightness:function(g){return this.setChannel("hsl",2,g)},saturationv:function(g){return this.setChannel("hsv",1,g)},whiteness:function(g){return this.setChannel("hwb",1,g)},blackness:function(g){return this.setChannel("hwb",2,g)},value:function(g){return this.setChannel("hsv",2,g)},cyan:function(g){return this.setChannel("cmyk",0,g)},magenta:function(g){return this.setChannel("cmyk",1,g)},yellow:function(g){return this.setChannel("cmyk",2,g)},black:function(g){return this.setChannel("cmyk",3,g)},hexString:function(){return D.hexString(this.values.rgb)},rgbString:function(){return D.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return D.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return D.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return D.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return D.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return D.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return D.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var g=this.values.rgb;return g[0]<<16|g[1]<<8|g[2]},luminosity:function(){for(var g=this.values.rgb,C=[],x=0;x<g.length;x++){var N=g[x]/255;C[x]=N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4)}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast:function(g){var C=this.luminosity(),x=g.luminosity();return C>x?(C+.05)/(x+.05):(x+.05)/(C+.05)},level:function(g){var C=this.contrast(g);return C>=7.1?"AAA":C>=4.5?"AA":""},dark:function(){var g=this.values.rgb,C=(g[0]*299+g[1]*587+g[2]*114)/1e3;return C<128},light:function(){return!this.dark()},negate:function(){for(var g=[],C=0;C<3;C++)g[C]=255-this.values.rgb[C];return this.setValues("rgb",g),this},lighten:function(g){var C=this.values.hsl;return C[2]+=C[2]*g,this.setValues("hsl",C),this},darken:function(g){var C=this.values.hsl;return C[2]-=C[2]*g,this.setValues("hsl",C),this},saturate:function(g){var C=this.values.hsl;return C[1]+=C[1]*g,this.setValues("hsl",C),this},desaturate:function(g){var C=this.values.hsl;return C[1]-=C[1]*g,this.setValues("hsl",C),this},whiten:function(g){var C=this.values.hwb;return C[1]+=C[1]*g,this.setValues("hwb",C),this},blacken:function(g){var C=this.values.hwb;return C[2]+=C[2]*g,this.setValues("hwb",C),this},greyscale:function(){var g=this.values.rgb,C=g[0]*.3+g[1]*.59+g[2]*.11;return this.setValues("rgb",[C,C,C]),this},clearer:function(g){var C=this.values.alpha;return this.setValues("alpha",C-C*g),this},opaquer:function(g){var C=this.values.alpha;return this.setValues("alpha",C+C*g),this},rotate:function(g){var C=this.values.hsl,x=(C[0]+g)%360;return C[0]=x<0?360+x:x,this.setValues("hsl",C),this},mix:function(g,C){var x=this,N=g,B=C===void 0?.5:C,J=2*B-1,oe=x.alpha()-N.alpha(),ye=((J*oe===-1?J:(J+oe)/(1+J*oe))+1)/2,fe=1-ye;return this.rgb(ye*x.red()+fe*N.red(),ye*x.green()+fe*N.green(),ye*x.blue()+fe*N.blue()).alpha(x.alpha()*B+N.alpha()*(1-B))},toJSON:function(){return this.rgb()},clone:function(){var g=new Pe,C=this.values,x=g.values,N,B;for(var J in C)C.hasOwnProperty(J)&&(N=C[J],B={}.toString.call(N),B==="[object Array]"?x[J]=N.slice(0):B==="[object Number]"?x[J]=N:console.error("unexpected color value:",N));return g}},Pe.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Pe.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Pe.prototype.getValues=function(g){for(var C=this.values,x={},N=0;N<g.length;N++)x[g.charAt(N)]=C[g][N];return C.alpha!==1&&(x.a=C.alpha),x},Pe.prototype.setValues=function(g,C){var x=this.values,N=this.spaces,B=this.maxes,J=1,oe;if(this.valid=!0,g==="alpha")J=C;else if(C.length)x[g]=C.slice(0,g.length),J=C[g.length];else if(C[g.charAt(0)]!==void 0){for(oe=0;oe<g.length;oe++)x[g][oe]=C[g.charAt(oe)];J=C.a}else if(C[N[g][0]]!==void 0){var ye=N[g];for(oe=0;oe<g.length;oe++)x[g][oe]=C[ye[oe]];J=C.alpha}if(x.alpha=Math.max(0,Math.min(1,J===void 0?x.alpha:J)),g==="alpha")return!1;var fe;for(oe=0;oe<g.length;oe++)fe=Math.max(0,Math.min(B[g][oe],x[g][oe])),x[g][oe]=Math.round(fe);for(var Ie in N)Ie!==g&&(x[Ie]=y[g][Ie](x[g]));return!0},Pe.prototype.setSpace=function(g,C){var x=C[0];return x===void 0?this.getValues(g):(typeof x=="number"&&(x=Array.prototype.slice.call(C)),this.setValues(g,x),this)},Pe.prototype.setChannel=function(g,C,x){var N=this.values[g];return x===void 0?N[C]:x===N[C]?this:(N[C]=x,this.setValues(g,N),this)},typeof window<"u"&&(window.Color=Pe);var We=Pe;function qe(g){return["__proto__","prototype","constructor"].indexOf(g)===-1}var ee={noop:function(){},uid:function(){var g=0;return function(){return g++}}(),isNullOrUndef:function(g){return g===null||typeof g>"u"},isArray:function(g){if(Array.isArray&&Array.isArray(g))return!0;var C=Object.prototype.toString.call(g);return C.substr(0,7)==="[object"&&C.substr(-6)==="Array]"},isObject:function(g){return g!==null&&Object.prototype.toString.call(g)==="[object Object]"},isFinite:function(g){return(typeof g=="number"||g instanceof Number)&&isFinite(g)},valueOrDefault:function(g,C){return typeof g>"u"?C:g},valueAtIndexOrDefault:function(g,C,x){return ee.valueOrDefault(ee.isArray(g)?g[C]:g,x)},callback:function(g,C,x){if(g&&typeof g.call=="function")return g.apply(x,C)},each:function(g,C,x,N){var B,J,oe;if(ee.isArray(g))if(J=g.length,N)for(B=J-1;B>=0;B--)C.call(x,g[B],B);else for(B=0;B<J;B++)C.call(x,g[B],B);else if(ee.isObject(g))for(oe=Object.keys(g),J=oe.length,B=0;B<J;B++)C.call(x,g[oe[B]],oe[B])},arrayEquals:function(g,C){var x,N,B,J;if(!g||!C||g.length!==C.length)return!1;for(x=0,N=g.length;x<N;++x)if(B=g[x],J=C[x],B instanceof Array&&J instanceof Array){if(!ee.arrayEquals(B,J))return!1}else if(B!==J)return!1;return!0},clone:function(g){if(ee.isArray(g))return g.map(ee.clone);if(ee.isObject(g)){for(var C=Object.create(g),x=Object.keys(g),N=x.length,B=0;B<N;++B)C[x[B]]=ee.clone(g[x[B]]);return C}return g},_merger:function(g,C,x,N){if(qe(g)){var B=C[g],J=x[g];ee.isObject(B)&&ee.isObject(J)?ee.merge(B,J,N):C[g]=ee.clone(J)}},_mergerIf:function(g,C,x){if(qe(g)){var N=C[g],B=x[g];ee.isObject(N)&&ee.isObject(B)?ee.mergeIf(N,B):C.hasOwnProperty(g)||(C[g]=ee.clone(B))}},merge:function(g,C,x){var N=ee.isArray(C)?C:[C],B=N.length,J,oe,ye,fe,Ie;if(!ee.isObject(g))return g;for(x=x||{},J=x.merger||ee._merger,oe=0;oe<B;++oe)if(C=N[oe],!!ee.isObject(C))for(ye=Object.keys(C),Ie=0,fe=ye.length;Ie<fe;++Ie)J(ye[Ie],g,C,x);return g},mergeIf:function(g,C){return ee.merge(g,C,{merger:ee._mergerIf})},extend:Object.assign||function(g){return ee.merge(g,[].slice.call(arguments,1),{merger:function(C,x,N){x[C]=N[C]}})},inherits:function(g){var C=this,x=g&&g.hasOwnProperty("constructor")?g.constructor:function(){return C.apply(this,arguments)},N=function(){this.constructor=x};return N.prototype=C.prototype,x.prototype=new N,x.extend=ee.inherits,g&&ee.extend(x.prototype,g),x.__super__=C.prototype,x},_deprecated:function(g,C,x,N){C!==void 0&&console.warn(g+': "'+x+'" is deprecated. Please use "'+N+'" instead')}},G=ee;ee.callCallback=ee.callback,ee.indexOf=function(g,C,x){return Array.prototype.indexOf.call(g,C,x)},ee.getValueOrDefault=ee.valueOrDefault,ee.getValueAtIndexOrDefault=ee.valueAtIndexOrDefault;var me={linear:function(g){return g},easeInQuad:function(g){return g*g},easeOutQuad:function(g){return-g*(g-2)},easeInOutQuad:function(g){return(g/=.5)<1?.5*g*g:-.5*(--g*(g-2)-1)},easeInCubic:function(g){return g*g*g},easeOutCubic:function(g){return(g=g-1)*g*g+1},easeInOutCubic:function(g){return(g/=.5)<1?.5*g*g*g:.5*((g-=2)*g*g+2)},easeInQuart:function(g){return g*g*g*g},easeOutQuart:function(g){return-((g=g-1)*g*g*g-1)},easeInOutQuart:function(g){return(g/=.5)<1?.5*g*g*g*g:-.5*((g-=2)*g*g*g-2)},easeInQuint:function(g){return g*g*g*g*g},easeOutQuint:function(g){return(g=g-1)*g*g*g*g+1},easeInOutQuint:function(g){return(g/=.5)<1?.5*g*g*g*g*g:.5*((g-=2)*g*g*g*g+2)},easeInSine:function(g){return-Math.cos(g*(Math.PI/2))+1},easeOutSine:function(g){return Math.sin(g*(Math.PI/2))},easeInOutSine:function(g){return-.5*(Math.cos(Math.PI*g)-1)},easeInExpo:function(g){return g===0?0:Math.pow(2,10*(g-1))},easeOutExpo:function(g){return g===1?1:-Math.pow(2,-10*g)+1},easeInOutExpo:function(g){return g===0?0:g===1?1:(g/=.5)<1?.5*Math.pow(2,10*(g-1)):.5*(-Math.pow(2,-10*--g)+2)},easeInCirc:function(g){return g>=1?g:-(Math.sqrt(1-g*g)-1)},easeOutCirc:function(g){return Math.sqrt(1-(g=g-1)*g)},easeInOutCirc:function(g){return(g/=.5)<1?-.5*(Math.sqrt(1-g*g)-1):.5*(Math.sqrt(1-(g-=2)*g)+1)},easeInElastic:function(g){var C=1.70158,x=0,N=1;return g===0?0:g===1?1:(x||(x=.3),C=x/(2*Math.PI)*Math.asin(1/N),-(N*Math.pow(2,10*(g-=1))*Math.sin((g-C)*(2*Math.PI)/x)))},easeOutElastic:function(g){var C=1.70158,x=0,N=1;return g===0?0:g===1?1:(x||(x=.3),C=x/(2*Math.PI)*Math.asin(1/N),N*Math.pow(2,-10*g)*Math.sin((g-C)*(2*Math.PI)/x)+1)},easeInOutElastic:function(g){var C=1.70158,x=0,N=1;return g===0?0:(g/=.5)===2?1:(x||(x=.45),C=x/(2*Math.PI)*Math.asin(1/N),g<1?-.5*(N*Math.pow(2,10*(g-=1))*Math.sin((g-C)*(2*Math.PI)/x)):N*Math.pow(2,-10*(g-=1))*Math.sin((g-C)*(2*Math.PI)/x)*.5+1)},easeInBack:function(g){var C=1.70158;return g*g*((C+1)*g-C)},easeOutBack:function(g){var C=1.70158;return(g=g-1)*g*((C+1)*g+C)+1},easeInOutBack:function(g){var C=1.70158;return(g/=.5)<1?.5*(g*g*(((C*=1.525)+1)*g-C)):.5*((g-=2)*g*(((C*=1.525)+1)*g+C)+2)},easeInBounce:function(g){return 1-me.easeOutBounce(1-g)},easeOutBounce:function(g){return g<1/2.75?7.5625*g*g:g<2/2.75?7.5625*(g-=1.5/2.75)*g+.75:g<2.5/2.75?7.5625*(g-=2.25/2.75)*g+.9375:7.5625*(g-=2.625/2.75)*g+.984375},easeInOutBounce:function(g){return g<.5?me.easeInBounce(g*2)*.5:me.easeOutBounce(g*2-1)*.5+.5}},Te={effects:me};G.easingEffects=me;var De=Math.PI,we=De/180,Ve=De*2,Ke=De/2,yt=De/4,ht=De*2/3,Je={clear:function(g){g.ctx.clearRect(0,0,g.width,g.height)},roundedRect:function(g,C,x,N,B,J){if(J){var oe=Math.min(J,B/2,N/2),ye=C+oe,fe=x+oe,Ie=C+N-oe,Fe=x+B-oe;g.moveTo(C,fe),ye<Ie&&fe<Fe?(g.arc(ye,fe,oe,-De,-Ke),g.arc(Ie,fe,oe,-Ke,0),g.arc(Ie,Fe,oe,0,Ke),g.arc(ye,Fe,oe,Ke,De)):ye<Ie?(g.moveTo(ye,x),g.arc(Ie,fe,oe,-Ke,Ke),g.arc(ye,fe,oe,Ke,De+Ke)):fe<Fe?(g.arc(ye,fe,oe,-De,0),g.arc(ye,Fe,oe,0,De)):g.arc(ye,fe,oe,-De,De),g.closePath(),g.moveTo(C,x)}else g.rect(C,x,N,B)},drawPoint:function(g,C,x,N,B,J){var oe,ye,fe,Ie,Fe,je=(J||0)*we;if(C&&typeof C=="object"&&(oe=C.toString(),oe==="[object HTMLImageElement]"||oe==="[object HTMLCanvasElement]")){g.save(),g.translate(N,B),g.rotate(je),g.drawImage(C,-C.width/2,-C.height/2,C.width,C.height),g.restore();return}if(!(isNaN(x)||x<=0)){switch(g.beginPath(),C){default:g.arc(N,B,x,0,Ve),g.closePath();break;case"triangle":g.moveTo(N+Math.sin(je)*x,B-Math.cos(je)*x),je+=ht,g.lineTo(N+Math.sin(je)*x,B-Math.cos(je)*x),je+=ht,g.lineTo(N+Math.sin(je)*x,B-Math.cos(je)*x),g.closePath();break;case"rectRounded":Fe=x*.516,Ie=x-Fe,ye=Math.cos(je+yt)*Ie,fe=Math.sin(je+yt)*Ie,g.arc(N-ye,B-fe,Fe,je-De,je-Ke),g.arc(N+fe,B-ye,Fe,je-Ke,je),g.arc(N+ye,B+fe,Fe,je,je+Ke),g.arc(N-fe,B+ye,Fe,je+Ke,je+De),g.closePath();break;case"rect":if(!J){Ie=Math.SQRT1_2*x,g.rect(N-Ie,B-Ie,2*Ie,2*Ie);break}je+=yt;case"rectRot":ye=Math.cos(je)*x,fe=Math.sin(je)*x,g.moveTo(N-ye,B-fe),g.lineTo(N+fe,B-ye),g.lineTo(N+ye,B+fe),g.lineTo(N-fe,B+ye),g.closePath();break;case"crossRot":je+=yt;case"cross":ye=Math.cos(je)*x,fe=Math.sin(je)*x,g.moveTo(N-ye,B-fe),g.lineTo(N+ye,B+fe),g.moveTo(N+fe,B-ye),g.lineTo(N-fe,B+ye);break;case"star":ye=Math.cos(je)*x,fe=Math.sin(je)*x,g.moveTo(N-ye,B-fe),g.lineTo(N+ye,B+fe),g.moveTo(N+fe,B-ye),g.lineTo(N-fe,B+ye),je+=yt,ye=Math.cos(je)*x,fe=Math.sin(je)*x,g.moveTo(N-ye,B-fe),g.lineTo(N+ye,B+fe),g.moveTo(N+fe,B-ye),g.lineTo(N-fe,B+ye);break;case"line":ye=Math.cos(je)*x,fe=Math.sin(je)*x,g.moveTo(N-ye,B-fe),g.lineTo(N+ye,B+fe);break;case"dash":g.moveTo(N,B),g.lineTo(N+Math.cos(je)*x,B+Math.sin(je)*x);break}g.fill(),g.stroke()}},_isPointInArea:function(g,C){var x=1e-6;return g.x>C.left-x&&g.x<C.right+x&&g.y>C.top-x&&g.y<C.bottom+x},clipArea:function(g,C){g.save(),g.beginPath(),g.rect(C.left,C.top,C.right-C.left,C.bottom-C.top),g.clip()},unclipArea:function(g){g.restore()},lineTo:function(g,C,x,N){var B=x.steppedLine;if(B){if(B==="middle"){var J=(C.x+x.x)/2;g.lineTo(J,N?x.y:C.y),g.lineTo(J,N?C.y:x.y)}else B==="after"&&!N||B!=="after"&&N?g.lineTo(C.x,x.y):g.lineTo(x.x,C.y);g.lineTo(x.x,x.y);return}if(!x.tension){g.lineTo(x.x,x.y);return}g.bezierCurveTo(N?C.controlPointPreviousX:C.controlPointNextX,N?C.controlPointPreviousY:C.controlPointNextY,N?x.controlPointNextX:x.controlPointPreviousX,N?x.controlPointNextY:x.controlPointPreviousY,x.x,x.y)}},pt=Je;G.clear=Je.clear,G.drawRoundedRectangle=function(g){g.beginPath(),Je.roundedRect.apply(Je,arguments)};var Tt={_set:function(g,C){return G.merge(this[g]||(this[g]={}),C)}};Tt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var it=Tt,Ge=G.valueOrDefault;function st(g){return!g||G.isNullOrUndef(g.size)||G.isNullOrUndef(g.family)?null:(g.style?g.style+" ":"")+(g.weight?g.weight+" ":"")+g.size+"px "+g.family}var It={toLineHeight:function(g,C){var x=(""+g).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!x||x[1]==="normal")return C*1.2;switch(g=+x[2],x[3]){case"px":return g;case"%":g/=100;break}return C*g},toPadding:function(g){var C,x,N,B;return G.isObject(g)?(C=+g.top||0,x=+g.right||0,N=+g.bottom||0,B=+g.left||0):C=x=N=B=+g||0,{top:C,right:x,bottom:N,left:B,height:C+N,width:B+x}},_parseFont:function(g){var C=it.global,x=Ge(g.fontSize,C.defaultFontSize),N={family:Ge(g.fontFamily,C.defaultFontFamily),lineHeight:G.options.toLineHeight(Ge(g.lineHeight,C.defaultLineHeight),x),size:x,style:Ge(g.fontStyle,C.defaultFontStyle),weight:null,string:""};return N.string=st(N),N},resolve:function(g,C,x,N){var B=!0,J,oe,ye;for(J=0,oe=g.length;J<oe;++J)if(ye=g[J],ye!==void 0&&(C!==void 0&&typeof ye=="function"&&(ye=ye(C),B=!1),x!==void 0&&G.isArray(ye)&&(ye=ye[x],B=!1),ye!==void 0))return N&&!B&&(N.cacheable=!1),ye}},Ct={_factorize:function(g){var C=[],x=Math.sqrt(g),N;for(N=1;N<x;N++)g%N===0&&(C.push(N),C.push(g/N));return x===(x|0)&&C.push(x),C.sort(function(B,J){return B-J}).pop(),C},log10:Math.log10||function(g){var C=Math.log(g)*Math.LOG10E,x=Math.round(C),N=g===Math.pow(10,x);return N?x:C}},bt=Ct;G.log10=Ct.log10;var Rt=function(g,C){return{x:function(x){return g+g+C-x},setWidth:function(x){C=x},textAlign:function(x){return x==="center"?x:x==="right"?"left":"right"},xPlus:function(x,N){return x-N},leftForLtr:function(x,N){return x-N}}},cn=function(){return{x:function(g){return g},setWidth:function(g){},textAlign:function(g){return g},xPlus:function(g,C){return g+C},leftForLtr:function(g,C){return g}}},nn=function(g,C,x){return g?Rt(C,x):cn()},Qe=function(g,C){var x,N;(C==="ltr"||C==="rtl")&&(x=g.canvas.style,N=[x.getPropertyValue("direction"),x.getPropertyPriority("direction")],x.setProperty("direction",C,"important"),g.prevTextDirection=N)},Ft=function(g){var C=g.prevTextDirection;C!==void 0&&(delete g.prevTextDirection,g.canvas.style.setProperty("direction",C[0],C[1]))},Fn={getRtlAdapter:nn,overrideTextDirection:Qe,restoreTextDirection:Ft},He=G,Dt=Te,Xt=pt,Mt=It,Xe=bt,Nt=Fn;He.easing=Dt,He.canvas=Xt,He.options=Mt,He.math=Xe,He.rtl=Nt;function on(g,C,x,N){var B=Object.keys(x),J,oe,ye,fe,Ie,Fe,je,ut,Pt;for(J=0,oe=B.length;J<oe;++J)if(ye=B[J],Fe=x[ye],C.hasOwnProperty(ye)||(C[ye]=Fe),fe=C[ye],!(fe===Fe||ye[0]==="_")){if(g.hasOwnProperty(ye)||(g[ye]=fe),Ie=g[ye],je=typeof Fe,je===typeof Ie){if(je==="string"){if(ut=We(Ie),ut.valid&&(Pt=We(Fe),Pt.valid)){C[ye]=Pt.mix(ut,N).rgbString();continue}}else if(He.isFinite(Ie)&&He.isFinite(Fe)){C[ye]=Ie+(Fe-Ie)*N;continue}}C[ye]=Fe}}var In=function(g){He.extend(this,g),this.initialize.apply(this,arguments)};He.extend(In.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var g=this;return g._view||(g._view=He.extend({},g._model)),g._start={},g},transition:function(g){var C=this,x=C._model,N=C._start,B=C._view;return!x||g===1?(C._view=He.extend({},x),C._start=null,C):(B||(B=C._view={}),N||(N=C._start={}),on(N,B,x,g),C)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return He.isNumber(this._model.x)&&He.isNumber(this._model.y)}}),In.extend=He.inherits;var dt=In,Zt=dt.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Ln=Zt;Object.defineProperty(Zt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Zt.prototype,"chartInstance",{get:function(){return this.chart},set:function(g){this.chart=g}}),it._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:He.noop,onComplete:He.noop}});var xn={animations:[],request:null,addAnimation:function(g,C,x,N){var B=this.animations,J,oe;for(C.chart=g,C.startTime=Date.now(),C.duration=x,N||(g.animating=!0),J=0,oe=B.length;J<oe;++J)if(B[J].chart===g){B[J]=C;return}B.push(C),B.length===1&&this.requestAnimationFrame()},cancelAnimation:function(g){var C=He.findIndex(this.animations,function(x){return x.chart===g});C!==-1&&(this.animations.splice(C,1),g.animating=!1)},requestAnimationFrame:function(){var g=this;g.request===null&&(g.request=He.requestAnimFrame.call(window,function(){g.request=null,g.startDigest()}))},startDigest:function(){var g=this;g.advance(),g.animations.length>0&&g.requestAnimationFrame()},advance:function(){for(var g=this.animations,C,x,N,B,J=0;J<g.length;)C=g[J],x=C.chart,N=C.numSteps,B=Math.floor((Date.now()-C.startTime)/C.duration*N)+1,C.currentStep=Math.min(B,N),He.callback(C.render,[x,C],x),He.callback(C.onAnimationProgress,[C],x),C.currentStep>=N?(He.callback(C.onAnimationComplete,[C],x),x.animating=!1,g.splice(J,1)):++J}},Dn=He.options.resolve,Un=["push","pop","shift","splice","unshift"];function qn(g,C){if(g._chartjs){g._chartjs.listeners.push(C);return}Object.defineProperty(g,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[C]}}),Un.forEach(function(x){var N="onData"+x.charAt(0).toUpperCase()+x.slice(1),B=g[x];Object.defineProperty(g,x,{configurable:!0,enumerable:!1,value:function(){var J=Array.prototype.slice.call(arguments),oe=B.apply(this,J);return He.each(g._chartjs.listeners,function(ye){typeof ye[N]=="function"&&ye[N].apply(ye,J)}),oe}})})}function ft(g,C){var x=g._chartjs;if(x){var N=x.listeners,B=N.indexOf(C);B!==-1&&N.splice(B,1),!(N.length>0)&&(Un.forEach(function(J){delete g[J]}),delete g._chartjs)}}var ni=function(g,C){this.initialize(g,C)};He.extend(ni.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(g,C){var x=this;x.chart=g,x.index=C,x.linkScales(),x.addElements(),x._type=x.getMeta().type},updateIndex:function(g){this.index=g},linkScales:function(){var g=this,C=g.getMeta(),x=g.chart,N=x.scales,B=g.getDataset(),J=x.options.scales;(C.xAxisID===null||!(C.xAxisID in N)||B.xAxisID)&&(C.xAxisID=B.xAxisID||J.xAxes[0].id),(C.yAxisID===null||!(C.yAxisID in N)||B.yAxisID)&&(C.yAxisID=B.yAxisID||J.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(g){return this.chart.scales[g]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ft(this._data,this)},createMetaDataset:function(){var g=this,C=g.datasetElementType;return C&&new C({_chart:g.chart,_datasetIndex:g.index})},createMetaData:function(g){var C=this,x=C.dataElementType;return x&&new x({_chart:C.chart,_datasetIndex:C.index,_index:g})},addElements:function(){var g=this,C=g.getMeta(),x=g.getDataset().data||[],N=C.data,B,J;for(B=0,J=x.length;B<J;++B)N[B]=N[B]||g.createMetaData(B);C.dataset=C.dataset||g.createMetaDataset()},addElementAndReset:function(g){var C=this.createMetaData(g);this.getMeta().data.splice(g,0,C),this.updateElement(C,g,!0)},buildOrUpdateElements:function(){var g=this,C=g.getDataset(),x=C.data||(C.data=[]);g._data!==x&&(g._data&&ft(g._data,g),x&&Object.isExtensible(x)&&qn(x,g),g._data=x),g.resyncElements()},_configure:function(){var g=this;g._config=He.merge(Object.create(null),[g.chart.options.datasets[g._type],g.getDataset()],{merger:function(C,x,N){C!=="_meta"&&C!=="data"&&He._merger(C,x,N)}})},_update:function(g){var C=this;C._configure(),C._cachedDataOpts=null,C.update(g)},update:He.noop,transition:function(g){for(var C=this.getMeta(),x=C.data||[],N=x.length,B=0;B<N;++B)x[B].transition(g);C.dataset&&C.dataset.transition(g)},draw:function(){var g=this.getMeta(),C=g.data||[],x=C.length,N=0;for(g.dataset&&g.dataset.draw();N<x;++N)C[N].draw()},getStyle:function(g){var C=this,x=C.getMeta(),N=x.dataset,B;return C._configure(),N&&g===void 0?B=C._resolveDatasetElementOptions(N||{}):(g=g||0,B=C._resolveDataElementOptions(x.data[g]||{},g)),(B.fill===!1||B.fill===null)&&(B.backgroundColor=B.borderColor),B},_resolveDatasetElementOptions:function(g,C){var x=this,N=x.chart,B=x._config,J=g.custom||{},oe=N.options.elements[x.datasetElementType.prototype._type]||{},ye=x._datasetElementOptions,fe={},Ie,Fe,je,ut,Pt={chart:N,dataset:x.getDataset(),datasetIndex:x.index,hover:C};for(Ie=0,Fe=ye.length;Ie<Fe;++Ie)je=ye[Ie],ut=C?"hover"+je.charAt(0).toUpperCase()+je.slice(1):je,fe[je]=Dn([J[ut],B[ut],oe[ut]],Pt);return fe},_resolveDataElementOptions:function(g,C){var x=this,N=g&&g.custom,B=x._cachedDataOpts;if(B&&!N)return B;var J=x.chart,oe=x._config,ye=J.options.elements[x.dataElementType.prototype._type]||{},fe=x._dataElementOptions,Ie={},Fe={chart:J,dataIndex:C,dataset:x.getDataset(),datasetIndex:x.index},je={cacheable:!N},ut,Pt,Ot,Lt;if(N=N||{},He.isArray(fe))for(Pt=0,Ot=fe.length;Pt<Ot;++Pt)Lt=fe[Pt],Ie[Lt]=Dn([N[Lt],oe[Lt],ye[Lt]],Fe,C,je);else for(ut=Object.keys(fe),Pt=0,Ot=ut.length;Pt<Ot;++Pt)Lt=ut[Pt],Ie[Lt]=Dn([N[Lt],oe[fe[Lt]],oe[Lt],ye[Lt]],Fe,C,je);return je.cacheable&&(x._cachedDataOpts=Object.freeze(Ie)),Ie},removeHoverStyle:function(g){He.merge(g._model,g.$previousStyle||{}),delete g.$previousStyle},setHoverStyle:function(g){var C=this.chart.data.datasets[g._datasetIndex],x=g._index,N=g.custom||{},B=g._model,J=He.getHoverColor;g.$previousStyle={backgroundColor:B.backgroundColor,borderColor:B.borderColor,borderWidth:B.borderWidth},B.backgroundColor=Dn([N.hoverBackgroundColor,C.hoverBackgroundColor,J(B.backgroundColor)],void 0,x),B.borderColor=Dn([N.hoverBorderColor,C.hoverBorderColor,J(B.borderColor)],void 0,x),B.borderWidth=Dn([N.hoverBorderWidth,C.hoverBorderWidth,B.borderWidth],void 0,x)},_removeDatasetHoverStyle:function(){var g=this.getMeta().dataset;g&&this.removeHoverStyle(g)},_setDatasetHoverStyle:function(){var g=this.getMeta().dataset,C={},x,N,B,J,oe,ye;if(g){for(ye=g._model,oe=this._resolveDatasetElementOptions(g,!0),J=Object.keys(oe),x=0,N=J.length;x<N;++x)B=J[x],C[B]=ye[B],ye[B]=oe[B];g.$previousStyle=C}},resyncElements:function(){var g=this,C=g.getMeta(),x=g.getDataset().data,N=C.data.length,B=x.length;B<N?C.data.splice(B,N-B):B>N&&g.insertElements(N,B-N)},insertElements:function(g,C){for(var x=0;x<C;++x)this.addElementAndReset(g+x)},onDataPush:function(){var g=arguments.length;this.insertElements(this.getDataset().data.length-g,g)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(g,C){this.getMeta().data.splice(g,C),this.insertElements(g,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),ni.extend=He.inherits;var Et=ni,un=Math.PI*2;it._set("global",{elements:{arc:{backgroundColor:it.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});function Ai(g,C){var x=C.startAngle,N=C.endAngle,B=C.pixelMargin,J=B/C.outerRadius,oe=C.x,ye=C.y;g.beginPath(),g.arc(oe,ye,C.outerRadius,x-J,N+J),C.innerRadius>B?(J=B/C.innerRadius,g.arc(oe,ye,C.innerRadius-B,N+J,x-J,!0)):g.arc(oe,ye,B,N+Math.PI/2,x-Math.PI/2),g.closePath(),g.clip()}function St(g,C,x,N){var B=x.endAngle,J;for(N&&(x.endAngle=x.startAngle+un,Ai(g,x),x.endAngle=B,x.endAngle===x.startAngle&&x.fullCircles&&(x.endAngle+=un,x.fullCircles--)),g.beginPath(),g.arc(x.x,x.y,x.innerRadius,x.startAngle+un,x.startAngle,!0),J=0;J<x.fullCircles;++J)g.stroke();for(g.beginPath(),g.arc(x.x,x.y,C.outerRadius,x.startAngle,x.startAngle+un),J=0;J<x.fullCircles;++J)g.stroke()}function sn(g,C,x){var N=C.borderAlign==="inner";N?(g.lineWidth=C.borderWidth*2,g.lineJoin="round"):(g.lineWidth=C.borderWidth,g.lineJoin="bevel"),x.fullCircles&&St(g,C,x,N),N&&Ai(g,x),g.beginPath(),g.arc(x.x,x.y,C.outerRadius,x.startAngle,x.endAngle),g.arc(x.x,x.y,x.innerRadius,x.endAngle,x.startAngle,!0),g.closePath(),g.stroke()}var ci=dt.extend({_type:"arc",inLabelRange:function(g){var C=this._view;return C?Math.pow(g-C.x,2)<Math.pow(C.radius+C.hoverRadius,2):!1},inRange:function(g,C){var x=this._view;if(x){for(var N=He.getAngleFromPoint(x,{x:g,y:C}),B=N.angle,J=N.distance,oe=x.startAngle,ye=x.endAngle;ye<oe;)ye+=un;for(;B>ye;)B-=un;for(;B<oe;)B+=un;var fe=B>=oe&&B<=ye,Ie=J>=x.innerRadius&&J<=x.outerRadius;return fe&&Ie}return!1},getCenterPoint:function(){var g=this._view,C=(g.startAngle+g.endAngle)/2,x=(g.innerRadius+g.outerRadius)/2;return{x:g.x+Math.cos(C)*x,y:g.y+Math.sin(C)*x}},getArea:function(){var g=this._view;return Math.PI*((g.endAngle-g.startAngle)/(2*Math.PI))*(Math.pow(g.outerRadius,2)-Math.pow(g.innerRadius,2))},tooltipPosition:function(){var g=this._view,C=g.startAngle+(g.endAngle-g.startAngle)/2,x=(g.outerRadius-g.innerRadius)/2+g.innerRadius;return{x:g.x+Math.cos(C)*x,y:g.y+Math.sin(C)*x}},draw:function(){var g=this._chart.ctx,C=this._view,x=C.borderAlign==="inner"?.33:0,N={x:C.x,y:C.y,innerRadius:C.innerRadius,outerRadius:Math.max(C.outerRadius-x,0),pixelMargin:x,startAngle:C.startAngle,endAngle:C.endAngle,fullCircles:Math.floor(C.circumference/un)},B;if(g.save(),g.fillStyle=C.backgroundColor,g.strokeStyle=C.borderColor,N.fullCircles){for(N.endAngle=N.startAngle+un,g.beginPath(),g.arc(N.x,N.y,N.outerRadius,N.startAngle,N.endAngle),g.arc(N.x,N.y,N.innerRadius,N.endAngle,N.startAngle,!0),g.closePath(),B=0;B<N.fullCircles;++B)g.fill();N.endAngle=N.startAngle+C.circumference%un}g.beginPath(),g.arc(N.x,N.y,N.outerRadius,N.startAngle,N.endAngle),g.arc(N.x,N.y,N.innerRadius,N.endAngle,N.startAngle,!0),g.closePath(),g.fill(),C.borderWidth&&sn(g,C,N),g.restore()}}),pi=He.valueOrDefault,Pi=it.global.defaultColor;it._set("global",{elements:{line:{tension:.4,backgroundColor:Pi,borderWidth:3,borderColor:Pi,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var $i=dt.extend({_type:"line",draw:function(){var g=this,C=g._view,x=g._chart.ctx,N=C.spanGaps,B=g._children.slice(),J=it.global,oe=J.elements.line,ye=-1,fe=g._loop,Ie,Fe,je;if(B.length){if(g._loop){for(Ie=0;Ie<B.length;++Ie)if(Fe=He.previousItem(B,Ie),!B[Ie]._view.skip&&Fe._view.skip){B=B.slice(Ie).concat(B.slice(0,Ie)),fe=N;break}fe&&B.push(B[0])}for(x.save(),x.lineCap=C.borderCapStyle||oe.borderCapStyle,x.setLineDash&&x.setLineDash(C.borderDash||oe.borderDash),x.lineDashOffset=pi(C.borderDashOffset,oe.borderDashOffset),x.lineJoin=C.borderJoinStyle||oe.borderJoinStyle,x.lineWidth=pi(C.borderWidth,oe.borderWidth),x.strokeStyle=C.borderColor||J.defaultColor,x.beginPath(),je=B[0]._view,je.skip||(x.moveTo(je.x,je.y),ye=0),Ie=1;Ie<B.length;++Ie)je=B[Ie]._view,Fe=ye===-1?He.previousItem(B,Ie):B[ye],je.skip||(ye!==Ie-1&&!N||ye===-1?x.moveTo(je.x,je.y):He.canvas.lineTo(x,Fe._view,je),ye=Ie);fe&&x.closePath(),x.stroke(),x.restore()}}}),ji=He.valueOrDefault,ri=it.global.defaultColor;it._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ri,borderColor:ri,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});function tr(g){var C=this._view;return C?Math.abs(g-C.x)<C.radius+C.hitRadius:!1}function Ei(g){var C=this._view;return C?Math.abs(g-C.y)<C.radius+C.hitRadius:!1}var Ti=dt.extend({_type:"point",inRange:function(g,C){var x=this._view;return x?Math.pow(g-x.x,2)+Math.pow(C-x.y,2)<Math.pow(x.hitRadius+x.radius,2):!1},inLabelRange:tr,inXRange:tr,inYRange:Ei,getCenterPoint:function(){var g=this._view;return{x:g.x,y:g.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var g=this._view;return{x:g.x,y:g.y,padding:g.radius+g.borderWidth}},draw:function(g){var C=this._view,x=this._chart.ctx,N=C.pointStyle,B=C.rotation,J=C.radius,oe=C.x,ye=C.y,fe=it.global,Ie=fe.defaultColor;C.skip||(g===void 0||He.canvas._isPointInArea(C,g))&&(x.strokeStyle=C.borderColor||Ie,x.lineWidth=ji(C.borderWidth,fe.elements.point.borderWidth),x.fillStyle=C.backgroundColor||Ie,He.canvas.drawPoint(x,N,J,oe,ye,B))}}),kn=it.global.defaultColor;it._set("global",{elements:{rectangle:{backgroundColor:kn,borderColor:kn,borderSkipped:"bottom",borderWidth:0}}});function Rn(g){return g&&g.width!==void 0}function ki(g){var C,x,N,B,J;return Rn(g)?(J=g.width/2,C=g.x-J,x=g.x+J,N=Math.min(g.y,g.base),B=Math.max(g.y,g.base)):(J=g.height/2,C=Math.min(g.x,g.base),x=Math.max(g.x,g.base),N=g.y-J,B=g.y+J),{left:C,top:N,right:x,bottom:B}}function mr(g,C,x){return g===C?x:g===x?C:g}function _r(g){var C=g.borderSkipped,x={};return C&&(g.horizontal?g.base>g.x&&(C=mr(C,"left","right")):g.base<g.y&&(C=mr(C,"bottom","top")),x[C]=!0),x}function Mi(g,C,x){var N=g.borderWidth,B=_r(g),J,oe,ye,fe;return He.isObject(N)?(J=+N.top||0,oe=+N.right||0,ye=+N.bottom||0,fe=+N.left||0):J=oe=ye=fe=+N||0,{t:B.top||J<0?0:J>x?x:J,r:B.right||oe<0?0:oe>C?C:oe,b:B.bottom||ye<0?0:ye>x?x:ye,l:B.left||fe<0?0:fe>C?C:fe}}function di(g){var C=ki(g),x=C.right-C.left,N=C.bottom-C.top,B=Mi(g,x/2,N/2);return{outer:{x:C.left,y:C.top,w:x,h:N},inner:{x:C.left+B.l,y:C.top+B.t,w:x-B.l-B.r,h:N-B.t-B.b}}}function Yi(g,C,x){var N=C===null,B=x===null,J=!g||N&&B?!1:ki(g);return J&&(N||C>=J.left&&C<=J.right)&&(B||x>=J.top&&x<=J.bottom)}var na=dt.extend({_type:"rectangle",draw:function(){var g=this._chart.ctx,C=this._view,x=di(C),N=x.outer,B=x.inner;g.fillStyle=C.backgroundColor,g.fillRect(N.x,N.y,N.w,N.h),!(N.w===B.w&&N.h===B.h)&&(g.save(),g.beginPath(),g.rect(N.x,N.y,N.w,N.h),g.clip(),g.fillStyle=C.borderColor,g.rect(B.x,B.y,B.w,B.h),g.fill("evenodd"),g.restore())},height:function(){var g=this._view;return g.base-g.y},inRange:function(g,C){return Yi(this._view,g,C)},inLabelRange:function(g,C){var x=this._view;return Rn(x)?Yi(x,g,null):Yi(x,null,C)},inXRange:function(g){return Yi(this._view,g,null)},inYRange:function(g){return Yi(this._view,null,g)},getCenterPoint:function(){var g=this._view,C,x;return Rn(g)?(C=g.x,x=(g.y+g.base)/2):(C=(g.x+g.base)/2,x=g.y),{x:C,y:x}},getArea:function(){var g=this._view;return Rn(g)?g.width*Math.abs(g.y-g.base):g.height*Math.abs(g.x-g.base)},tooltipPosition:function(){var g=this._view;return{x:g.x,y:g.y}}}),Ki={},Rr=ci,Di=$i,Wi=Ti,Bi=na;Ki.Arc=Rr,Ki.Line=Di,Ki.Point=Wi,Ki.Rectangle=Bi;var _a=He._deprecated,xi=He.valueOrDefault;it._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),it._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});function Kr(g,C){var x=g._length,N,B,J,oe;for(J=1,oe=C.length;J<oe;++J)x=Math.min(x,Math.abs(C[J]-C[J-1]));for(J=0,oe=g.getTicks().length;J<oe;++J)B=g.getPixelForTick(J),x=J>0?Math.min(x,Math.abs(B-N)):x,N=B;return x}function kr(g,C,x){var N=x.barThickness,B=C.stackCount,J=C.pixels[g],oe=He.isNullOrUndef(N)?Kr(C.scale,C.pixels):-1,ye,fe;return He.isNullOrUndef(N)?(ye=oe*x.categoryPercentage,fe=x.barPercentage):(ye=N*B,fe=1),{chunk:ye/B,ratio:fe,start:J-ye/2}}function Ji(g,C,x){var N=C.pixels,B=N[g],J=g>0?N[g-1]:null,oe=g<N.length-1?N[g+1]:null,ye=x.categoryPercentage,fe,Ie;return J===null&&(J=B-(oe===null?C.end-C.start:oe-B)),oe===null&&(oe=B+B-J),fe=B-(B-Math.min(J,oe))/2*ye,Ie=Math.abs(oe-J)/2*ye,{chunk:Ie/C.stackCount,ratio:x.barPercentage,start:fe}}var ia=Et.extend({dataElementType:Ki.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var g=this,C,x;Et.prototype.initialize.apply(g,arguments),C=g.getMeta(),C.stack=g.getDataset().stack,C.bar=!0,x=g._getIndexScale().options,_a("bar chart",x.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),_a("bar chart",x.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),_a("bar chart",x.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),_a("bar chart",g._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),_a("bar chart",x.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(g){var C=this,x=C.getMeta().data,N,B;for(C._ruler=C.getRuler(),N=0,B=x.length;N<B;++N)C.updateElement(x[N],N,g)},updateElement:function(g,C,x){var N=this,B=N.getMeta(),J=N.getDataset(),oe=N._resolveDataElementOptions(g,C);g._xScale=N.getScaleForId(B.xAxisID),g._yScale=N.getScaleForId(B.yAxisID),g._datasetIndex=N.index,g._index=C,g._model={backgroundColor:oe.backgroundColor,borderColor:oe.borderColor,borderSkipped:oe.borderSkipped,borderWidth:oe.borderWidth,datasetLabel:J.label,label:N.chart.data.labels[C]},He.isArray(J.data[C])&&(g._model.borderSkipped=null),N._updateElementGeometry(g,C,x,oe),g.pivot()},_updateElementGeometry:function(g,C,x,N){var B=this,J=g._model,oe=B._getValueScale(),ye=oe.getBasePixel(),fe=oe.isHorizontal(),Ie=B._ruler||B.getRuler(),Fe=B.calculateBarValuePixels(B.index,C,N),je=B.calculateBarIndexPixels(B.index,C,Ie,N);J.horizontal=fe,J.base=x?ye:Fe.base,J.x=fe?x?ye:Fe.head:je.center,J.y=fe?je.center:x?ye:Fe.head,J.height=fe?je.size:void 0,J.width=fe?void 0:je.size},_getStacks:function(g){var C=this,x=C._getIndexScale(),N=x._getMatchingVisibleMetas(C._type),B=x.options.stacked,J=N.length,oe=[],ye,fe;for(ye=0;ye<J&&(fe=N[ye],(B===!1||oe.indexOf(fe.stack)===-1||B===void 0&&fe.stack===void 0)&&oe.push(fe.stack),fe.index!==g);++ye);return oe},getStackCount:function(){return this._getStacks().length},getStackIndex:function(g,C){var x=this._getStacks(g),N=C!==void 0?x.indexOf(C):-1;return N===-1?x.length-1:N},getRuler:function(){var g=this,C=g._getIndexScale(),x=[],N,B;for(N=0,B=g.getMeta().data.length;N<B;++N)x.push(C.getPixelForValue(null,N,g.index));return{pixels:x,start:C._startPixel,end:C._endPixel,stackCount:g.getStackCount(),scale:C}},calculateBarValuePixels:function(g,C,x){var N=this,B=N.chart,J=N._getValueScale(),oe=J.isHorizontal(),ye=B.data.datasets,fe=J._getMatchingVisibleMetas(N._type),Ie=J._parseValue(ye[g].data[C]),Fe=x.minBarLength,je=J.options.stacked,ut=N.getMeta().stack,Pt=Ie.start===void 0?0:Ie.max>=0&&Ie.min>=0?Ie.min:Ie.max,Ot=Ie.start===void 0?Ie.end:Ie.max>=0&&Ie.min>=0?Ie.max-Ie.min:Ie.min-Ie.max,Lt=fe.length,Gt,Cn,ii,si,Li,Qi,Jr;if(je||je===void 0&&ut!==void 0)for(Gt=0;Gt<Lt&&(Cn=fe[Gt],Cn.index!==g);++Gt)Cn.stack===ut&&(Jr=J._parseValue(ye[Cn.index].data[C]),ii=Jr.start===void 0?Jr.end:Jr.min>=0&&Jr.max>=0?Jr.max:Jr.min,(Ie.min<0&&ii<0||Ie.max>=0&&ii>0)&&(Pt+=ii));return si=J.getPixelForValue(Pt),Li=J.getPixelForValue(Pt+Ot),Qi=Li-si,Fe!==void 0&&Math.abs(Qi)<Fe&&(Qi=Fe,Ot>=0&&!oe||Ot<0&&oe?Li=si-Fe:Li=si+Fe),{size:Qi,base:si,head:Li,center:Li+Qi/2}},calculateBarIndexPixels:function(g,C,x,N){var B=this,J=N.barThickness==="flex"?Ji(C,x,N):kr(C,x,N),oe=B.getStackIndex(g,B.getMeta().stack),ye=J.start+J.chunk*oe+J.chunk/2,fe=Math.min(xi(N.maxBarThickness,1/0),J.chunk*J.ratio);return{base:ye-fe/2,head:ye+fe/2,center:ye,size:fe}},draw:function(){var g=this,C=g.chart,x=g._getValueScale(),N=g.getMeta().data,B=g.getDataset(),J=N.length,oe=0;for(He.canvas.clipArea(C.ctx,C.chartArea);oe<J;++oe){var ye=x._parseValue(B.data[oe]);!isNaN(ye.min)&&!isNaN(ye.max)&&N[oe].draw()}He.canvas.unclipArea(C.ctx)},_resolveDataElementOptions:function(){var g=this,C=He.extend({},Et.prototype._resolveDataElementOptions.apply(g,arguments)),x=g._getIndexScale().options,N=g._getValueScale().options;return C.barPercentage=xi(x.barPercentage,C.barPercentage),C.barThickness=xi(x.barThickness,C.barThickness),C.categoryPercentage=xi(x.categoryPercentage,C.categoryPercentage),C.maxBarThickness=xi(x.maxBarThickness,C.maxBarThickness),C.minBarLength=xi(N.minBarLength,C.minBarLength),C}}),la=He.valueOrDefault,Ir=He.options.resolve;it._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(g,C){var x=C.datasets[g.datasetIndex].label||"",N=C.datasets[g.datasetIndex].data[g.index];return x+": ("+g.xLabel+", "+g.yLabel+", "+N.r+")"}}}});var Ur=Et.extend({dataElementType:Ki.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(g){var C=this,x=C.getMeta(),N=x.data;He.each(N,function(B,J){C.updateElement(B,J,g)})},updateElement:function(g,C,x){var N=this,B=N.getMeta(),J=g.custom||{},oe=N.getScaleForId(B.xAxisID),ye=N.getScaleForId(B.yAxisID),fe=N._resolveDataElementOptions(g,C),Ie=N.getDataset().data[C],Fe=N.index,je=x?oe.getPixelForDecimal(.5):oe.getPixelForValue(typeof Ie=="object"?Ie:NaN,C,Fe),ut=x?ye.getBasePixel():ye.getPixelForValue(Ie,C,Fe);g._xScale=oe,g._yScale=ye,g._options=fe,g._datasetIndex=Fe,g._index=C,g._model={backgroundColor:fe.backgroundColor,borderColor:fe.borderColor,borderWidth:fe.borderWidth,hitRadius:fe.hitRadius,pointStyle:fe.pointStyle,rotation:fe.rotation,radius:x?0:fe.radius,skip:J.skip||isNaN(je)||isNaN(ut),x:je,y:ut},g.pivot()},setHoverStyle:function(g){var C=g._model,x=g._options,N=He.getHoverColor;g.$previousStyle={backgroundColor:C.backgroundColor,borderColor:C.borderColor,borderWidth:C.borderWidth,radius:C.radius},C.backgroundColor=la(x.hoverBackgroundColor,N(x.backgroundColor)),C.borderColor=la(x.hoverBorderColor,N(x.borderColor)),C.borderWidth=la(x.hoverBorderWidth,x.borderWidth),C.radius=x.radius+x.hoverRadius},_resolveDataElementOptions:function(g,C){var x=this,N=x.chart,B=x.getDataset(),J=g.custom||{},oe=B.data[C]||{},ye=Et.prototype._resolveDataElementOptions.apply(x,arguments),fe={chart:N,dataIndex:C,dataset:B,datasetIndex:x.index};return x._cachedDataOpts===ye&&(ye=He.extend({},ye)),ye.radius=Ir([J.radius,oe.r,x._config.radius,N.options.elements.point.radius],fe,C),ye}}),qr=He.valueOrDefault,Ht=Math.PI,et=Ht*2,ln=Ht/2;it._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(g){var C=document.createElement("ul"),x=g.data,N=x.datasets,B=x.labels,J,oe,ye,fe;if(C.setAttribute("class",g.id+"-legend"),N.length)for(J=0,oe=N[0].data.length;J<oe;++J)ye=C.appendChild(document.createElement("li")),fe=ye.appendChild(document.createElement("span")),fe.style.backgroundColor=N[0].backgroundColor[J],B[J]&&ye.appendChild(document.createTextNode(B[J]));return C.outerHTML},legend:{labels:{generateLabels:function(g){var C=g.data;return C.labels.length&&C.datasets.length?C.labels.map(function(x,N){var B=g.getDatasetMeta(0),J=B.controller.getStyle(N);return{text:x,fillStyle:J.backgroundColor,strokeStyle:J.borderColor,lineWidth:J.borderWidth,hidden:isNaN(C.datasets[0].data[N])||B.data[N].hidden,index:N}}):[]}},onClick:function(g,C){var x=C.index,N=this.chart,B,J,oe;for(B=0,J=(N.data.datasets||[]).length;B<J;++B)oe=N.getDatasetMeta(B),oe.data[x]&&(oe.data[x].hidden=!oe.data[x].hidden);N.update()}},cutoutPercentage:50,rotation:-ln,circumference:et,tooltips:{callbacks:{title:function(){return""},label:function(g,C){var x=C.labels[g.index],N=": "+C.datasets[g.datasetIndex].data[g.index];return He.isArray(x)?(x=x.slice(),x[0]+=N):x+=N,x}}}});var Vi=Et.extend({dataElementType:Ki.Arc,linkScales:He.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(g){for(var C=0,x=0;x<g;++x)this.chart.isDatasetVisible(x)&&++C;return C},update:function(g){var C=this,x=C.chart,N=x.chartArea,B=x.options,J=1,oe=1,ye=0,fe=0,Ie=C.getMeta(),Fe=Ie.data,je=B.cutoutPercentage/100||0,ut=B.circumference,Pt=C._getRingWeight(C.index),Ot,Lt,Gt,Cn;if(ut<et){var ii=B.rotation%et;ii+=ii>=Ht?-et:ii<-Ht?et:0;var si=ii+ut,Li=Math.cos(ii),Qi=Math.sin(ii),Jr=Math.cos(si),Mr=Math.sin(si),Zr=ii<=0&&si>=0||si>=et,ba=ii<=ln&&si>=ln||si>=et+ln,hs=ii===-Ht||si>=Ht,ms=ii<=-ln&&si>=-ln||si>=Ht+ln,Da=hs?-1:Math.min(Li,Li*je,Jr,Jr*je),gs=ms?-1:Math.min(Qi,Qi*je,Mr,Mr*je),Ql=Zr?1:Math.max(Li,Li*je,Jr,Jr*je),kl=ba?1:Math.max(Qi,Qi*je,Mr,Mr*je);J=(Ql-Da)/2,oe=(kl-gs)/2,ye=-(Ql+Da)/2,fe=-(kl+gs)/2}for(Gt=0,Cn=Fe.length;Gt<Cn;++Gt)Fe[Gt]._options=C._resolveDataElementOptions(Fe[Gt],Gt);for(x.borderWidth=C.getMaxBorderWidth(),Ot=(N.right-N.left-x.borderWidth)/J,Lt=(N.bottom-N.top-x.borderWidth)/oe,x.outerRadius=Math.max(Math.min(Ot,Lt)/2,0),x.innerRadius=Math.max(x.outerRadius*je,0),x.radiusLength=(x.outerRadius-x.innerRadius)/(C._getVisibleDatasetWeightTotal()||1),x.offsetX=ye*x.outerRadius,x.offsetY=fe*x.outerRadius,Ie.total=C.calculateTotal(),C.outerRadius=x.outerRadius-x.radiusLength*C._getRingWeightOffset(C.index),C.innerRadius=Math.max(C.outerRadius-x.radiusLength*Pt,0),Gt=0,Cn=Fe.length;Gt<Cn;++Gt)C.updateElement(Fe[Gt],Gt,g)},updateElement:function(g,C,x){var N=this,B=N.chart,J=B.chartArea,oe=B.options,ye=oe.animation,fe=(J.left+J.right)/2,Ie=(J.top+J.bottom)/2,Fe=oe.rotation,je=oe.rotation,ut=N.getDataset(),Pt=x&&ye.animateRotate||g.hidden?0:N.calculateCircumference(ut.data[C])*(oe.circumference/et),Ot=x&&ye.animateScale?0:N.innerRadius,Lt=x&&ye.animateScale?0:N.outerRadius,Gt=g._options||{};He.extend(g,{_datasetIndex:N.index,_index:C,_model:{backgroundColor:Gt.backgroundColor,borderColor:Gt.borderColor,borderWidth:Gt.borderWidth,borderAlign:Gt.borderAlign,x:fe+B.offsetX,y:Ie+B.offsetY,startAngle:Fe,endAngle:je,circumference:Pt,outerRadius:Lt,innerRadius:Ot,label:He.valueAtIndexOrDefault(ut.label,C,B.data.labels[C])}});var Cn=g._model;(!x||!ye.animateRotate)&&(C===0?Cn.startAngle=oe.rotation:Cn.startAngle=N.getMeta().data[C-1]._model.endAngle,Cn.endAngle=Cn.startAngle+Cn.circumference),g.pivot()},calculateTotal:function(){var g=this.getDataset(),C=this.getMeta(),x=0,N;return He.each(C.data,function(B,J){N=g.data[J],!isNaN(N)&&!B.hidden&&(x+=Math.abs(N))}),x},calculateCircumference:function(g){var C=this.getMeta().total;return C>0&&!isNaN(g)?et*(Math.abs(g)/C):0},getMaxBorderWidth:function(g){var C=this,x=0,N=C.chart,B,J,oe,ye,fe,Ie,Fe,je;if(!g){for(B=0,J=N.data.datasets.length;B<J;++B)if(N.isDatasetVisible(B)){oe=N.getDatasetMeta(B),g=oe.data,B!==C.index&&(fe=oe.controller);break}}if(!g)return 0;for(B=0,J=g.length;B<J;++B)ye=g[B],fe?(fe._configure(),Ie=fe._resolveDataElementOptions(ye,B)):Ie=ye._options,Ie.borderAlign!=="inner"&&(Fe=Ie.borderWidth,je=Ie.hoverBorderWidth,x=Fe>x?Fe:x,x=je>x?je:x);return x},setHoverStyle:function(g){var C=g._model,x=g._options,N=He.getHoverColor;g.$previousStyle={backgroundColor:C.backgroundColor,borderColor:C.borderColor,borderWidth:C.borderWidth},C.backgroundColor=qr(x.hoverBackgroundColor,N(x.backgroundColor)),C.borderColor=qr(x.hoverBorderColor,N(x.borderColor)),C.borderWidth=qr(x.hoverBorderWidth,x.borderWidth)},_getRingWeightOffset:function(g){for(var C=0,x=0;x<g;++x)this.chart.isDatasetVisible(x)&&(C+=this._getRingWeight(x));return C},_getRingWeight:function(g){return Math.max(qr(this.chart.data.datasets[g].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});it._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),it._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ar=ia.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),vr=He.valueOrDefault,ir=He.options.resolve,Si=He.canvas._isPointInArea;it._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});function pr(g,C){var x=g&&g.options.ticks||{},N=x.reverse,B=x.min===void 0?C:0,J=x.max===void 0?C:0;return{start:N?J:B,end:N?B:J}}function yi(g,C,x){var N=x/2,B=pr(g,N),J=pr(C,N);return{top:J.end,right:B.end,bottom:J.start,left:B.start}}function Dr(g){var C,x,N,B;return He.isObject(g)?(C=g.top,x=g.right,N=g.bottom,B=g.left):C=x=N=B=g,{top:C,right:x,bottom:N,left:B}}var Wr=Et.extend({datasetElementType:Ki.Line,dataElementType:Ki.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(g){var C=this,x=C.getMeta(),N=x.dataset,B=x.data||[],J=C.chart.options,oe=C._config,ye=C._showLine=vr(oe.showLine,J.showLines),fe,Ie;for(C._xScale=C.getScaleForId(x.xAxisID),C._yScale=C.getScaleForId(x.yAxisID),ye&&(oe.tension!==void 0&&oe.lineTension===void 0&&(oe.lineTension=oe.tension),N._scale=C._yScale,N._datasetIndex=C.index,N._children=B,N._model=C._resolveDatasetElementOptions(N),N.pivot()),fe=0,Ie=B.length;fe<Ie;++fe)C.updateElement(B[fe],fe,g);for(ye&&N._model.tension!==0&&C.updateBezierControlPoints(),fe=0,Ie=B.length;fe<Ie;++fe)B[fe].pivot()},updateElement:function(g,C,x){var N=this,B=N.getMeta(),J=g.custom||{},oe=N.getDataset(),ye=N.index,fe=oe.data[C],Ie=N._xScale,Fe=N._yScale,je=B.dataset._model,ut,Pt,Ot=N._resolveDataElementOptions(g,C);ut=Ie.getPixelForValue(typeof fe=="object"?fe:NaN,C,ye),Pt=x?Fe.getBasePixel():N.calculatePointY(fe,C,ye),g._xScale=Ie,g._yScale=Fe,g._options=Ot,g._datasetIndex=ye,g._index=C,g._model={x:ut,y:Pt,skip:J.skip||isNaN(ut)||isNaN(Pt),radius:Ot.radius,pointStyle:Ot.pointStyle,rotation:Ot.rotation,backgroundColor:Ot.backgroundColor,borderColor:Ot.borderColor,borderWidth:Ot.borderWidth,tension:vr(J.tension,je?je.tension:0),steppedLine:je?je.steppedLine:!1,hitRadius:Ot.hitRadius}},_resolveDatasetElementOptions:function(g){var C=this,x=C._config,N=g.custom||{},B=C.chart.options,J=B.elements.line,oe=Et.prototype._resolveDatasetElementOptions.apply(C,arguments);return oe.spanGaps=vr(x.spanGaps,B.spanGaps),oe.tension=vr(x.lineTension,J.tension),oe.steppedLine=ir([N.steppedLine,x.steppedLine,J.stepped]),oe.clip=Dr(vr(x.clip,yi(C._xScale,C._yScale,oe.borderWidth))),oe},calculatePointY:function(g,C,x){var N=this,B=N.chart,J=N._yScale,oe=0,ye=0,fe,Ie,Fe,je,ut,Pt,Ot;if(J.options.stacked){for(ut=+J.getRightValue(g),Pt=B._getSortedVisibleDatasetMetas(),Ot=Pt.length,fe=0;fe<Ot&&(Fe=Pt[fe],Fe.index!==x);++fe)Ie=B.data.datasets[Fe.index],Fe.type==="line"&&Fe.yAxisID===J.id&&(je=+J.getRightValue(Ie.data[C]),je<0?ye+=je||0:oe+=je||0);return ut<0?J.getPixelForValue(ye+ut):J.getPixelForValue(oe+ut)}return J.getPixelForValue(g)},updateBezierControlPoints:function(){var g=this,C=g.chart,x=g.getMeta(),N=x.dataset._model,B=C.chartArea,J=x.data||[],oe,ye,fe,Ie;N.spanGaps&&(J=J.filter(function(je){return!je._model.skip}));function Fe(je,ut,Pt){return Math.max(Math.min(je,Pt),ut)}if(N.cubicInterpolationMode==="monotone")He.splineCurveMonotone(J);else for(oe=0,ye=J.length;oe<ye;++oe)fe=J[oe]._model,Ie=He.splineCurve(He.previousItem(J,oe)._model,fe,He.nextItem(J,oe)._model,N.tension),fe.controlPointPreviousX=Ie.previous.x,fe.controlPointPreviousY=Ie.previous.y,fe.controlPointNextX=Ie.next.x,fe.controlPointNextY=Ie.next.y;if(C.options.elements.line.capBezierPoints)for(oe=0,ye=J.length;oe<ye;++oe)fe=J[oe]._model,Si(fe,B)&&(oe>0&&Si(J[oe-1]._model,B)&&(fe.controlPointPreviousX=Fe(fe.controlPointPreviousX,B.left,B.right),fe.controlPointPreviousY=Fe(fe.controlPointPreviousY,B.top,B.bottom)),oe<J.length-1&&Si(J[oe+1]._model,B)&&(fe.controlPointNextX=Fe(fe.controlPointNextX,B.left,B.right),fe.controlPointNextY=Fe(fe.controlPointNextY,B.top,B.bottom)))},draw:function(){var g=this,C=g.chart,x=g.getMeta(),N=x.data||[],B=C.chartArea,J=C.canvas,oe=0,ye=N.length,fe;for(g._showLine&&(fe=x.dataset._model.clip,He.canvas.clipArea(C.ctx,{left:fe.left===!1?0:B.left-fe.left,right:fe.right===!1?J.width:B.right+fe.right,top:fe.top===!1?0:B.top-fe.top,bottom:fe.bottom===!1?J.height:B.bottom+fe.bottom}),x.dataset.draw(),He.canvas.unclipArea(C.ctx));oe<ye;++oe)N[oe].draw(B)},setHoverStyle:function(g){var C=g._model,x=g._options,N=He.getHoverColor;g.$previousStyle={backgroundColor:C.backgroundColor,borderColor:C.borderColor,borderWidth:C.borderWidth,radius:C.radius},C.backgroundColor=vr(x.hoverBackgroundColor,N(x.backgroundColor)),C.borderColor=vr(x.hoverBorderColor,N(x.borderColor)),C.borderWidth=vr(x.hoverBorderWidth,x.borderWidth),C.radius=vr(x.hoverRadius,x.radius)}}),Sr=He.options.resolve;it._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(g){var C=document.createElement("ul"),x=g.data,N=x.datasets,B=x.labels,J,oe,ye,fe;if(C.setAttribute("class",g.id+"-legend"),N.length)for(J=0,oe=N[0].data.length;J<oe;++J)ye=C.appendChild(document.createElement("li")),fe=ye.appendChild(document.createElement("span")),fe.style.backgroundColor=N[0].backgroundColor[J],B[J]&&ye.appendChild(document.createTextNode(B[J]));return C.outerHTML},legend:{labels:{generateLabels:function(g){var C=g.data;return C.labels.length&&C.datasets.length?C.labels.map(function(x,N){var B=g.getDatasetMeta(0),J=B.controller.getStyle(N);return{text:x,fillStyle:J.backgroundColor,strokeStyle:J.borderColor,lineWidth:J.borderWidth,hidden:isNaN(C.datasets[0].data[N])||B.data[N].hidden,index:N}}):[]}},onClick:function(g,C){var x=C.index,N=this.chart,B,J,oe;for(B=0,J=(N.data.datasets||[]).length;B<J;++B)oe=N.getDatasetMeta(B),oe.data[x].hidden=!oe.data[x].hidden;N.update()}},tooltips:{callbacks:{title:function(){return""},label:function(g,C){return C.labels[g.index]+": "+g.yLabel}}}});var hr=Et.extend({dataElementType:Ki.Arc,linkScales:He.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(g){var C=this,x=C.getDataset(),N=C.getMeta(),B=C.chart.options.startAngle||0,J=C._starts=[],oe=C._angles=[],ye=N.data,fe,Ie,Fe;for(C._updateRadius(),N.count=C.countVisibleElements(),fe=0,Ie=x.data.length;fe<Ie;fe++)J[fe]=B,Fe=C._computeAngle(fe),oe[fe]=Fe,B+=Fe;for(fe=0,Ie=ye.length;fe<Ie;++fe)ye[fe]._options=C._resolveDataElementOptions(ye[fe],fe),C.updateElement(ye[fe],fe,g)},_updateRadius:function(){var g=this,C=g.chart,x=C.chartArea,N=C.options,B=Math.min(x.right-x.left,x.bottom-x.top);C.outerRadius=Math.max(B/2,0),C.innerRadius=Math.max(N.cutoutPercentage?C.outerRadius/100*N.cutoutPercentage:1,0),C.radiusLength=(C.outerRadius-C.innerRadius)/C.getVisibleDatasetCount(),g.outerRadius=C.outerRadius-C.radiusLength*g.index,g.innerRadius=g.outerRadius-C.radiusLength},updateElement:function(g,C,x){var N=this,B=N.chart,J=N.getDataset(),oe=B.options,ye=oe.animation,fe=B.scale,Ie=B.data.labels,Fe=fe.xCenter,je=fe.yCenter,ut=oe.startAngle,Pt=g.hidden?0:fe.getDistanceFromCenterForValue(J.data[C]),Ot=N._starts[C],Lt=Ot+(g.hidden?0:N._angles[C]),Gt=ye.animateScale?0:fe.getDistanceFromCenterForValue(J.data[C]),Cn=g._options||{};He.extend(g,{_datasetIndex:N.index,_index:C,_scale:fe,_model:{backgroundColor:Cn.backgroundColor,borderColor:Cn.borderColor,borderWidth:Cn.borderWidth,borderAlign:Cn.borderAlign,x:Fe,y:je,innerRadius:0,outerRadius:x?Gt:Pt,startAngle:x&&ye.animateRotate?ut:Ot,endAngle:x&&ye.animateRotate?ut:Lt,label:He.valueAtIndexOrDefault(Ie,C,Ie[C])}}),g.pivot()},countVisibleElements:function(){var g=this.getDataset(),C=this.getMeta(),x=0;return He.each(C.data,function(N,B){!isNaN(g.data[B])&&!N.hidden&&x++}),x},setHoverStyle:function(g){var C=g._model,x=g._options,N=He.getHoverColor,B=He.valueOrDefault;g.$previousStyle={backgroundColor:C.backgroundColor,borderColor:C.borderColor,borderWidth:C.borderWidth},C.backgroundColor=B(x.hoverBackgroundColor,N(x.backgroundColor)),C.borderColor=B(x.hoverBorderColor,N(x.borderColor)),C.borderWidth=B(x.hoverBorderWidth,x.borderWidth)},_computeAngle:function(g){var C=this,x=this.getMeta().count,N=C.getDataset(),B=C.getMeta();if(isNaN(N.data[g])||B.data[g].hidden)return 0;var J={chart:C.chart,dataIndex:g,dataset:N,datasetIndex:C.index};return Sr([C.chart.options.elements.arc.angle,2*Math.PI/x],J,g)}});it._set("pie",He.clone(it.doughnut)),it._set("pie",{cutoutPercentage:0});var Vn=Vi,dn=He.valueOrDefault;it._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var wr=Et.extend({datasetElementType:Ki.Line,dataElementType:Ki.Point,linkScales:He.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(g){var C=this,x=C.getMeta(),N=x.dataset,B=x.data||[],J=C.chart.scale,oe=C._config,ye,fe;for(oe.tension!==void 0&&oe.lineTension===void 0&&(oe.lineTension=oe.tension),N._scale=J,N._datasetIndex=C.index,N._children=B,N._loop=!0,N._model=C._resolveDatasetElementOptions(N),N.pivot(),ye=0,fe=B.length;ye<fe;++ye)C.updateElement(B[ye],ye,g);for(C.updateBezierControlPoints(),ye=0,fe=B.length;ye<fe;++ye)B[ye].pivot()},updateElement:function(g,C,x){var N=this,B=g.custom||{},J=N.getDataset(),oe=N.chart.scale,ye=oe.getPointPositionForValue(C,J.data[C]),fe=N._resolveDataElementOptions(g,C),Ie=N.getMeta().dataset._model,Fe=x?oe.xCenter:ye.x,je=x?oe.yCenter:ye.y;g._scale=oe,g._options=fe,g._datasetIndex=N.index,g._index=C,g._model={x:Fe,y:je,skip:B.skip||isNaN(Fe)||isNaN(je),radius:fe.radius,pointStyle:fe.pointStyle,rotation:fe.rotation,backgroundColor:fe.backgroundColor,borderColor:fe.borderColor,borderWidth:fe.borderWidth,tension:dn(B.tension,Ie?Ie.tension:0),hitRadius:fe.hitRadius}},_resolveDatasetElementOptions:function(){var g=this,C=g._config,x=g.chart.options,N=Et.prototype._resolveDatasetElementOptions.apply(g,arguments);return N.spanGaps=dn(C.spanGaps,x.spanGaps),N.tension=dn(C.lineTension,x.elements.line.tension),N},updateBezierControlPoints:function(){var g=this,C=g.getMeta(),x=g.chart.chartArea,N=C.data||[],B,J,oe,ye;C.dataset._model.spanGaps&&(N=N.filter(function(Ie){return!Ie._model.skip}));function fe(Ie,Fe,je){return Math.max(Math.min(Ie,je),Fe)}for(B=0,J=N.length;B<J;++B)oe=N[B]._model,ye=He.splineCurve(He.previousItem(N,B,!0)._model,oe,He.nextItem(N,B,!0)._model,oe.tension),oe.controlPointPreviousX=fe(ye.previous.x,x.left,x.right),oe.controlPointPreviousY=fe(ye.previous.y,x.top,x.bottom),oe.controlPointNextX=fe(ye.next.x,x.left,x.right),oe.controlPointNextY=fe(ye.next.y,x.top,x.bottom)},setHoverStyle:function(g){var C=g._model,x=g._options,N=He.getHoverColor;g.$previousStyle={backgroundColor:C.backgroundColor,borderColor:C.borderColor,borderWidth:C.borderWidth,radius:C.radius},C.backgroundColor=dn(x.hoverBackgroundColor,N(x.backgroundColor)),C.borderColor=dn(x.hoverBorderColor,N(x.borderColor)),C.borderWidth=dn(x.hoverBorderWidth,x.borderWidth),C.radius=dn(x.hoverRadius,x.radius)}});it._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(g){return"("+g.xLabel+", "+g.yLabel+")"}}}}),it._set("global",{datasets:{scatter:{showLine:!1}}});var Bn=Wr,ra={bar:ia,bubble:Ur,doughnut:Vi,horizontalBar:Ar,line:Wr,polarArea:hr,pie:Vn,radar:wr,scatter:Bn};function _n(g,C){return g.native?{x:g.x,y:g.y}:He.getRelativePosition(g,C)}function Vr(g,C){var x=g._getSortedVisibleDatasetMetas(),N,B,J,oe,ye,fe;for(B=0,oe=x.length;B<oe;++B)for(N=x[B].data,J=0,ye=N.length;J<ye;++J)fe=N[J],fe._view.skip||C(fe)}function rr(g,C){var x=[];return Vr(g,function(N){N.inRange(C.x,C.y)&&x.push(N)}),x}function Or(g,C,x,N){var B=Number.POSITIVE_INFINITY,J=[];return Vr(g,function(oe){if(!(x&&!oe.inRange(C.x,C.y))){var ye=oe.getCenterPoint(),fe=N(C,ye);fe<B?(J=[oe],B=fe):fe===B&&J.push(oe)}}),J}function Ui(g){var C=g.indexOf("x")!==-1,x=g.indexOf("y")!==-1;return function(N,B){var J=C?Math.abs(N.x-B.x):0,oe=x?Math.abs(N.y-B.y):0;return Math.sqrt(Math.pow(J,2)+Math.pow(oe,2))}}function Fr(g,C,x){var N=_n(C,g);x.axis=x.axis||"x";var B=Ui(x.axis),J=x.intersect?rr(g,N):Or(g,N,!1,B),oe=[];return J.length?(g._getSortedVisibleDatasetMetas().forEach(function(ye){var fe=ye.data[J[0]._index];fe&&!fe._view.skip&&oe.push(fe)}),oe):[]}var wi={modes:{single:function(g,C){var x=_n(C,g),N=[];return Vr(g,function(B){if(B.inRange(x.x,x.y))return N.push(B),N}),N.slice(0,1)},label:Fr,index:Fr,dataset:function(g,C,x){var N=_n(C,g);x.axis=x.axis||"xy";var B=Ui(x.axis),J=x.intersect?rr(g,N):Or(g,N,!1,B);return J.length>0&&(J=g.getDatasetMeta(J[0]._datasetIndex).data),J},"x-axis":function(g,C){return Fr(g,C,{intersect:!1})},point:function(g,C){var x=_n(C,g);return rr(g,x)},nearest:function(g,C,x){var N=_n(C,g);x.axis=x.axis||"xy";var B=Ui(x.axis);return Or(g,N,x.intersect,B)},x:function(g,C,x){var N=_n(C,g),B=[],J=!1;return Vr(g,function(oe){oe.inXRange(N.x)&&B.push(oe),oe.inRange(N.x,N.y)&&(J=!0)}),x.intersect&&!J&&(B=[]),B},y:function(g,C,x){var N=_n(C,g),B=[],J=!1;return Vr(g,function(oe){oe.inYRange(N.y)&&B.push(oe),oe.inRange(N.x,N.y)&&(J=!0)}),x.intersect&&!J&&(B=[]),B}}},Ni=He.extend;function ar(g,C){return He.where(g,function(x){return x.pos===C})}function sr(g,C){return g.sort(function(x,N){var B=C?N:x,J=C?x:N;return B.weight===J.weight?B.index-J.index:B.weight-J.weight})}function Gi(g){var C=[],x,N,B;for(x=0,N=(g||[]).length;x<N;++x)B=g[x],C.push({index:x,box:B,pos:B.position,horizontal:B.isHorizontal(),weight:B.weight});return C}function Cr(g,C){var x,N,B;for(x=0,N=g.length;x<N;++x)B=g[x],B.width=B.horizontal?B.box.fullWidth&&C.availableWidth:C.vBoxMaxWidth,B.height=B.horizontal&&C.hBoxMaxHeight}function or(g){var C=Gi(g),x=sr(ar(C,"left"),!0),N=sr(ar(C,"right")),B=sr(ar(C,"top"),!0),J=sr(ar(C,"bottom"));return{leftAndTop:x.concat(B),rightAndBottom:N.concat(J),chartArea:ar(C,"chartArea"),vertical:x.concat(N),horizontal:B.concat(J)}}function lr(g,C,x,N){return Math.max(g[x],C[x])+Math.max(g[N],C[N])}function Ka(g,C,x){var N=x.box,B=g.maxPadding,J,oe;if(x.size&&(g[x.pos]-=x.size),x.size=x.horizontal?N.height:N.width,g[x.pos]+=x.size,N.getPadding){var ye=N.getPadding();B.top=Math.max(B.top,ye.top),B.left=Math.max(B.left,ye.left),B.bottom=Math.max(B.bottom,ye.bottom),B.right=Math.max(B.right,ye.right)}if(J=C.outerWidth-lr(B,g,"left","right"),oe=C.outerHeight-lr(B,g,"top","bottom"),J!==g.w||oe!==g.h){g.w=J,g.h=oe;var fe=x.horizontal?[J,g.w]:[oe,g.h];return fe[0]!==fe[1]&&(!isNaN(fe[0])||!isNaN(fe[1]))}}function Lr(g){var C=g.maxPadding;function x(N){var B=Math.max(C[N]-g[N],0);return g[N]+=B,B}g.y+=x("top"),g.x+=x("left"),x("right"),x("bottom")}function nr(g,C){var x=C.maxPadding;function N(B){var J={left:0,top:0,right:0,bottom:0};return B.forEach(function(oe){J[oe]=Math.max(C[oe],x[oe])}),J}return N(g?["left","right"]:["top","bottom"])}function wa(g,C,x){var N=[],B,J,oe,ye,fe,Ie;for(B=0,J=g.length;B<J;++B)oe=g[B],ye=oe.box,ye.update(oe.width||C.w,oe.height||C.h,nr(oe.horizontal,C)),Ka(C,x,oe)&&(Ie=!0,N.length&&(fe=!0)),ye.fullWidth||N.push(oe);return fe&&wa(N,C,x)||Ie}function zr(g,C,x){var N=x.padding,B=C.x,J=C.y,oe,ye,fe,Ie;for(oe=0,ye=g.length;oe<ye;++oe)fe=g[oe],Ie=fe.box,fe.horizontal?(Ie.left=Ie.fullWidth?N.left:C.left,Ie.right=Ie.fullWidth?x.outerWidth-N.right:C.left+C.w,Ie.top=J,Ie.bottom=J+Ie.height,Ie.width=Ie.right-Ie.left,J=Ie.bottom):(Ie.left=B,Ie.right=B+Ie.width,Ie.top=C.top,Ie.bottom=C.top+C.h,Ie.height=Ie.bottom-Ie.top,B=Ie.right);C.x=B,C.y=J}it._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var Ze={defaults:{},addBox:function(g,C){g.boxes||(g.boxes=[]),C.fullWidth=C.fullWidth||!1,C.position=C.position||"top",C.weight=C.weight||0,C._layers=C._layers||function(){return[{z:0,draw:function(){C.draw.apply(C,arguments)}}]},g.boxes.push(C)},removeBox:function(g,C){var x=g.boxes?g.boxes.indexOf(C):-1;x!==-1&&g.boxes.splice(x,1)},configure:function(g,C,x){for(var N=["fullWidth","position","weight"],B=N.length,J=0,oe;J<B;++J)oe=N[J],x.hasOwnProperty(oe)&&(C[oe]=x[oe])},update:function(g,C,x){if(g){var N=g.options.layout||{},B=He.options.toPadding(N.padding),J=C-B.width,oe=x-B.height,ye=or(g.boxes),fe=ye.vertical,Ie=ye.horizontal,Fe=Object.freeze({outerWidth:C,outerHeight:x,padding:B,availableWidth:J,vBoxMaxWidth:J/2/fe.length,hBoxMaxHeight:oe/2}),je=Ni({maxPadding:Ni({},B),w:J,h:oe,x:B.left,y:B.top},B);Cr(fe.concat(Ie),Fe),wa(fe,je,Fe),wa(Ie,je,Fe)&&wa(fe,je,Fe),Lr(je),zr(ye.leftAndTop,je,Fe),je.x+=je.w,je.y+=je.h,zr(ye.rightAndBottom,je,Fe),g.chartArea={left:je.left,top:je.top,right:je.left+je.w,bottom:je.top+je.h},He.each(ye.chartArea,function(ut){var Pt=ut.box;Ni(Pt,g.chartArea),Pt.update(je.w,je.h)})}}},tn={acquireContext:function(g){return g&&g.canvas&&(g=g.canvas),g&&g.getContext("2d")||null}},Xr=`/*\r
 * DOM element rendering detection\r
 * https://davidwalsh.name/detect-node-insertion\r
 */\r
@keyframes chartjs-render-animation {\r
	from { opacity: 0.99; }\r
	to { opacity: 1; }\r
}\r
\r
.chartjs-render-monitor {\r
	animation: chartjs-render-animation 0.001s;\r
}\r
\r
/*\r
 * DOM element resizing detection\r
 * https://github.com/marcj/css-element-queries\r
 */\r
.chartjs-size-monitor,\r
.chartjs-size-monitor-expand,\r
.chartjs-size-monitor-shrink {\r
	position: absolute;\r
	direction: ltr;\r
	left: 0;\r
	top: 0;\r
	right: 0;\r
	bottom: 0;\r
	overflow: hidden;\r
	pointer-events: none;\r
	visibility: hidden;\r
	z-index: -1;\r
}\r
\r
.chartjs-size-monitor-expand > div {\r
	position: absolute;\r
	width: 1000000px;\r
	height: 1000000px;\r
	left: 0;\r
	top: 0;\r
}\r
\r
.chartjs-size-monitor-shrink > div {\r
	position: absolute;\r
	width: 200%;\r
	height: 200%;\r
	left: 0;\r
	top: 0;\r
}\r
`,ur=Object.freeze({__proto__:null,default:Xr}),Hr=r(ur),Xi="$chartjs",dr="chartjs-",pa=dr+"size-monitor",qt=dr+"render-monitor",mn=dr+"render-animation",ai=["animationstart","webkitAnimationStart"],Ra={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function aa(g,C){var x=He.getStyle(g,C),N=x&&x.match(/^(\d+)(\.\d+)?px$/);return N?Number(N[1]):void 0}function ga(g,C){var x=g.style,N=g.getAttribute("height"),B=g.getAttribute("width");if(g[Xi]={initial:{height:N,width:B,style:{display:x.display,height:x.height,width:x.width}}},x.display=x.display||"block",B===null||B===""){var J=aa(g,"width");J!==void 0&&(g.width=J)}if(N===null||N==="")if(g.style.height==="")g.height=g.width/(C.options.aspectRatio||2);else{var oe=aa(g,"height");J!==void 0&&(g.height=oe)}return g}var Ta=function(){var g=!1;try{var C=Object.defineProperty({},"passive",{get:function(){g=!0}});window.addEventListener("e",null,C)}catch{}return g}(),va=Ta?{passive:!0}:!1;function $r(g,C,x){g.addEventListener(C,x,va)}function ua(g,C,x){g.removeEventListener(C,x,va)}function an(g,C,x,N,B){return{type:g,chart:C,native:B||null,x:x!==void 0?x:null,y:N!==void 0?N:null}}function gi(g,C){var x=Ra[g.type]||g.type,N=He.getRelativePosition(g,C);return an(x,C,N.x,N.y,g)}function jr(g,C){var x=!1,N=[];return function(){N=Array.prototype.slice.call(arguments),C=C||this,x||(x=!0,He.requestAnimFrame.call(window,function(){x=!1,g.apply(C,N)}))}}function Ia(g){var C=document.createElement("div");return C.className=g||"",C}function Xa(g){var C=1e6,x=Ia(pa),N=Ia(pa+"-expand"),B=Ia(pa+"-shrink");N.appendChild(Ia()),B.appendChild(Ia()),x.appendChild(N),x.appendChild(B),x._reset=function(){N.scrollLeft=C,N.scrollTop=C,B.scrollLeft=C,B.scrollTop=C};var J=function(){x._reset(),g()};return $r(N,"scroll",J.bind(N,"expand")),$r(B,"scroll",J.bind(B,"shrink")),x}function Ha(g,C){var x=g[Xi]||(g[Xi]={}),N=x.renderProxy=function(B){B.animationName===mn&&C()};He.each(ai,function(B){$r(g,B,N)}),x.reflow=!!g.offsetParent,g.classList.add(qt)}function $a(g){var C=g[Xi]||{},x=C.renderProxy;x&&(He.each(ai,function(N){ua(g,N,x)}),delete C.renderProxy),g.classList.remove(qt)}function Ii(g,C,x){var N=g[Xi]||(g[Xi]={}),B=N.resizer=Xa(jr(function(){if(N.resizer){var J=x.options.maintainAspectRatio&&g.parentNode,oe=J?J.clientWidth:0;C(an("resize",x)),J&&J.clientWidth<oe&&x.canvas&&C(an("resize",x))}}));Ha(g,function(){if(N.resizer){var J=g.parentNode;J&&J!==B.parentNode&&J.insertBefore(B,J.firstChild),B._reset()}})}function br(g){var C=g[Xi]||{},x=C.resizer;delete C.resizer,$a(g),x&&x.parentNode&&x.parentNode.removeChild(x)}function Aa(g,C){var x=g[Xi]||(g[Xi]={});if(!x.containsStyles){x.containsStyles=!0,C=`/* Chart.js */
`+C;var N=document.createElement("style");N.setAttribute("type","text/css"),N.appendChild(document.createTextNode(C)),g.appendChild(N)}}var Vt={disableCSSInjection:!1,_enabled:typeof window<"u"&&typeof document<"u",_ensureLoaded:function(g){if(!this.disableCSSInjection){var C=g.getRootNode?g.getRootNode():document,x=C.host?C:document.head;Aa(x,Hr)}},acquireContext:function(g,C){typeof g=="string"?g=document.getElementById(g):g.length&&(g=g[0]),g&&g.canvas&&(g=g.canvas);var x=g&&g.getContext&&g.getContext("2d");return x&&x.canvas===g?(this._ensureLoaded(g),ga(g,C),x):null},releaseContext:function(g){var C=g.canvas;if(C[Xi]){var x=C[Xi].initial;["height","width"].forEach(function(N){var B=x[N];He.isNullOrUndef(B)?C.removeAttribute(N):C.setAttribute(N,B)}),He.each(x.style||{},function(N,B){C.style[B]=N}),C.width=C.width,delete C[Xi]}},addEventListener:function(g,C,x){var N=g.canvas;if(C==="resize"){Ii(N,x,g);return}var B=x[Xi]||(x[Xi]={}),J=B.proxies||(B.proxies={}),oe=J[g.id+"_"+C]=function(ye){x(gi(ye,g))};$r(N,C,oe)},removeEventListener:function(g,C,x){var N=g.canvas;if(C==="resize"){br(N);return}var B=x[Xi]||{},J=B.proxies||{},oe=J[g.id+"_"+C];oe&&ua(N,C,oe)}};He.addEvent=$r,He.removeEvent=ua;var _i=Vt._enabled?Vt:tn,xe=He.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},_i);it._set("global",{plugins:{}});var Ue={_plugins:[],_cacheId:0,register:function(g){var C=this._plugins;[].concat(g).forEach(function(x){C.indexOf(x)===-1&&C.push(x)}),this._cacheId++},unregister:function(g){var C=this._plugins;[].concat(g).forEach(function(x){var N=C.indexOf(x);N!==-1&&C.splice(N,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(g,C,x){var N=this.descriptors(g),B=N.length,J,oe,ye,fe,Ie;for(J=0;J<B;++J)if(oe=N[J],ye=oe.plugin,Ie=ye[C],typeof Ie=="function"&&(fe=[g].concat(x||[]),fe.push(oe.options),Ie.apply(ye,fe)===!1))return!1;return!0},descriptors:function(g){var C=g.$plugins||(g.$plugins={});if(C.id===this._cacheId)return C.descriptors;var x=[],N=[],B=g&&g.config||{},J=B.options&&B.options.plugins||{};return this._plugins.concat(B.plugins||[]).forEach(function(oe){var ye=x.indexOf(oe);if(ye===-1){var fe=oe.id,Ie=J[fe];Ie!==!1&&(Ie===!0&&(Ie=He.clone(it.global.plugins[fe])),x.push(oe),N.push({plugin:oe,options:Ie||{}}))}}),C.descriptors=N,C.id=this._cacheId,N},_invalidate:function(g){delete g.$plugins}},pe={constructors:{},defaults:{},registerScaleType:function(g,C,x){this.constructors[g]=C,this.defaults[g]=He.clone(x)},getScaleConstructor:function(g){return this.constructors.hasOwnProperty(g)?this.constructors[g]:void 0},getScaleDefaults:function(g){return this.defaults.hasOwnProperty(g)?He.merge(Object.create(null),[it.scale,this.defaults[g]]):{}},updateScaleDefaults:function(g,C){var x=this;x.defaults.hasOwnProperty(g)&&(x.defaults[g]=He.extend(x.defaults[g],C))},addScalesToLayout:function(g){He.each(g.scales,function(C){C.fullWidth=C.options.fullWidth,C.position=C.options.position,C.weight=C.options.weight,Ze.addBox(g,C)})}},Ae=He.valueOrDefault,at=He.rtl.getRtlAdapter;it._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:He.noop,title:function(g,C){var x="",N=C.labels,B=N?N.length:0;if(g.length>0){var J=g[0];J.label?x=J.label:J.xLabel?x=J.xLabel:B>0&&J.index<B&&(x=N[J.index])}return x},afterTitle:He.noop,beforeBody:He.noop,beforeLabel:He.noop,label:function(g,C){var x=C.datasets[g.datasetIndex].label||"";return x&&(x+=": "),He.isNullOrUndef(g.value)?x+=g.yLabel:x+=g.value,x},labelColor:function(g,C){var x=C.getDatasetMeta(g.datasetIndex),N=x.data[g.index],B=N._view;return{borderColor:B.borderColor,backgroundColor:B.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:He.noop,afterBody:He.noop,beforeFooter:He.noop,footer:He.noop,afterFooter:He.noop}}});var gt={average:function(g){if(!g.length)return!1;var C,x,N=0,B=0,J=0;for(C=0,x=g.length;C<x;++C){var oe=g[C];if(oe&&oe.hasValue()){var ye=oe.tooltipPosition();N+=ye.x,B+=ye.y,++J}}return{x:N/J,y:B/J}},nearest:function(g,C){var x=C.x,N=C.y,B=Number.POSITIVE_INFINITY,J,oe,ye;for(J=0,oe=g.length;J<oe;++J){var fe=g[J];if(fe&&fe.hasValue()){var Ie=fe.getCenterPoint(),Fe=He.distanceBetweenPoints(C,Ie);Fe<B&&(B=Fe,ye=fe)}}if(ye){var je=ye.tooltipPosition();x=je.x,N=je.y}return{x,y:N}}};function nt(g,C){return C&&(He.isArray(C)?Array.prototype.push.apply(g,C):g.push(C)),g}function jt(g){return(typeof g=="string"||g instanceof String)&&g.indexOf(`
`)>-1?g.split(`
`):g}function Yt(g){var C=g._xScale,x=g._yScale||g._scale,N=g._index,B=g._datasetIndex,J=g._chart.getDatasetMeta(B).controller,oe=J._getIndexScale(),ye=J._getValueScale();return{xLabel:C?C.getLabelForIndex(N,B):"",yLabel:x?x.getLabelForIndex(N,B):"",label:oe?""+oe.getLabelForIndex(N,B):"",value:ye?""+ye.getLabelForIndex(N,B):"",index:N,datasetIndex:B,x:g._model.x,y:g._model.y}}function Mn(g){var C=it.global;return{xPadding:g.xPadding,yPadding:g.yPadding,xAlign:g.xAlign,yAlign:g.yAlign,rtl:g.rtl,textDirection:g.textDirection,bodyFontColor:g.bodyFontColor,_bodyFontFamily:Ae(g.bodyFontFamily,C.defaultFontFamily),_bodyFontStyle:Ae(g.bodyFontStyle,C.defaultFontStyle),_bodyAlign:g.bodyAlign,bodyFontSize:Ae(g.bodyFontSize,C.defaultFontSize),bodySpacing:g.bodySpacing,titleFontColor:g.titleFontColor,_titleFontFamily:Ae(g.titleFontFamily,C.defaultFontFamily),_titleFontStyle:Ae(g.titleFontStyle,C.defaultFontStyle),titleFontSize:Ae(g.titleFontSize,C.defaultFontSize),_titleAlign:g.titleAlign,titleSpacing:g.titleSpacing,titleMarginBottom:g.titleMarginBottom,footerFontColor:g.footerFontColor,_footerFontFamily:Ae(g.footerFontFamily,C.defaultFontFamily),_footerFontStyle:Ae(g.footerFontStyle,C.defaultFontStyle),footerFontSize:Ae(g.footerFontSize,C.defaultFontSize),_footerAlign:g.footerAlign,footerSpacing:g.footerSpacing,footerMarginTop:g.footerMarginTop,caretSize:g.caretSize,cornerRadius:g.cornerRadius,backgroundColor:g.backgroundColor,opacity:0,legendColorBackground:g.multiKeyBackground,displayColors:g.displayColors,borderColor:g.borderColor,borderWidth:g.borderWidth}}function Yn(g,C){var x=g._chart.ctx,N=C.yPadding*2,B=0,J=C.body,oe=J.reduce(function(Ot,Lt){return Ot+Lt.before.length+Lt.lines.length+Lt.after.length},0);oe+=C.beforeBody.length+C.afterBody.length;var ye=C.title.length,fe=C.footer.length,Ie=C.titleFontSize,Fe=C.bodyFontSize,je=C.footerFontSize;N+=ye*Ie,N+=ye?(ye-1)*C.titleSpacing:0,N+=ye?C.titleMarginBottom:0,N+=oe*Fe,N+=oe?(oe-1)*C.bodySpacing:0,N+=fe?C.footerMarginTop:0,N+=fe*je,N+=fe?(fe-1)*C.footerSpacing:0;var ut=0,Pt=function(Ot){B=Math.max(B,x.measureText(Ot).width+ut)};return x.font=He.fontString(Ie,C._titleFontStyle,C._titleFontFamily),He.each(C.title,Pt),x.font=He.fontString(Fe,C._bodyFontStyle,C._bodyFontFamily),He.each(C.beforeBody.concat(C.afterBody),Pt),ut=C.displayColors?Fe+2:0,He.each(J,function(Ot){He.each(Ot.before,Pt),He.each(Ot.lines,Pt),He.each(Ot.after,Pt)}),ut=0,x.font=He.fontString(je,C._footerFontStyle,C._footerFontFamily),He.each(C.footer,Pt),B+=2*C.xPadding,{width:B,height:N}}function Wn(g,C){var x=g._model,N=g._chart,B=g._chart.chartArea,J="center",oe="center";x.y<C.height?oe="top":x.y>N.height-C.height&&(oe="bottom");var ye,fe,Ie,Fe,je,ut=(B.left+B.right)/2,Pt=(B.top+B.bottom)/2;oe==="center"?(ye=function(Lt){return Lt<=ut},fe=function(Lt){return Lt>ut}):(ye=function(Lt){return Lt<=C.width/2},fe=function(Lt){return Lt>=N.width-C.width/2}),Ie=function(Lt){return Lt+C.width+x.caretSize+x.caretPadding>N.width},Fe=function(Lt){return Lt-C.width-x.caretSize-x.caretPadding<0},je=function(Lt){return Lt<=Pt?"top":"bottom"},ye(x.x)?(J="left",Ie(x.x)&&(J="center",oe=je(x.y))):fe(x.x)&&(J="right",Fe(x.x)&&(J="center",oe=je(x.y)));var Ot=g._options;return{xAlign:Ot.xAlign?Ot.xAlign:J,yAlign:Ot.yAlign?Ot.yAlign:oe}}function ei(g,C,x,N){var B=g.x,J=g.y,oe=g.caretSize,ye=g.caretPadding,fe=g.cornerRadius,Ie=x.xAlign,Fe=x.yAlign,je=oe+ye,ut=fe+ye;return Ie==="right"?B-=C.width:Ie==="center"&&(B-=C.width/2,B+C.width>N.width&&(B=N.width-C.width),B<0&&(B=0)),Fe==="top"?J+=je:Fe==="bottom"?J-=C.height+je:J-=C.height/2,Fe==="center"?Ie==="left"?B+=je:Ie==="right"&&(B-=je):Ie==="left"?B-=ut:Ie==="right"&&(B+=ut),{x:B,y:J}}function Fi(g,C){return C==="center"?g.x+g.width/2:C==="right"?g.x+g.width-g.xPadding:g.x+g.xPadding}function Tr(g){return nt([],jt(g))}var Yr=dt.extend({initialize:function(){this._model=Mn(this._options),this._lastActive=[]},getTitle:function(){var g=this,C=g._options,x=C.callbacks,N=x.beforeTitle.apply(g,arguments),B=x.title.apply(g,arguments),J=x.afterTitle.apply(g,arguments),oe=[];return oe=nt(oe,jt(N)),oe=nt(oe,jt(B)),oe=nt(oe,jt(J)),oe},getBeforeBody:function(){return Tr(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(g,C){var x=this,N=x._options.callbacks,B=[];return He.each(g,function(J){var oe={before:[],lines:[],after:[]};nt(oe.before,jt(N.beforeLabel.call(x,J,C))),nt(oe.lines,N.label.call(x,J,C)),nt(oe.after,jt(N.afterLabel.call(x,J,C))),B.push(oe)}),B},getAfterBody:function(){return Tr(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var g=this,C=g._options.callbacks,x=C.beforeFooter.apply(g,arguments),N=C.footer.apply(g,arguments),B=C.afterFooter.apply(g,arguments),J=[];return J=nt(J,jt(x)),J=nt(J,jt(N)),J=nt(J,jt(B)),J},update:function(g){var C=this,x=C._options,N=C._model,B=C._model=Mn(x),J=C._active,oe=C._data,ye={xAlign:N.xAlign,yAlign:N.yAlign},fe={x:N.x,y:N.y},Ie={width:N.width,height:N.height},Fe={x:N.caretX,y:N.caretY},je,ut;if(J.length){B.opacity=1;var Pt=[],Ot=[];Fe=gt[x.position].call(C,J,C._eventPosition);var Lt=[];for(je=0,ut=J.length;je<ut;++je)Lt.push(Yt(J[je]));x.filter&&(Lt=Lt.filter(function(Gt){return x.filter(Gt,oe)})),x.itemSort&&(Lt=Lt.sort(function(Gt,Cn){return x.itemSort(Gt,Cn,oe)})),He.each(Lt,function(Gt){Pt.push(x.callbacks.labelColor.call(C,Gt,C._chart)),Ot.push(x.callbacks.labelTextColor.call(C,Gt,C._chart))}),B.title=C.getTitle(Lt,oe),B.beforeBody=C.getBeforeBody(Lt,oe),B.body=C.getBody(Lt,oe),B.afterBody=C.getAfterBody(Lt,oe),B.footer=C.getFooter(Lt,oe),B.x=Fe.x,B.y=Fe.y,B.caretPadding=x.caretPadding,B.labelColors=Pt,B.labelTextColors=Ot,B.dataPoints=Lt,Ie=Yn(this,B),ye=Wn(this,Ie),fe=ei(B,Ie,ye,C._chart)}else B.opacity=0;return B.xAlign=ye.xAlign,B.yAlign=ye.yAlign,B.x=fe.x,B.y=fe.y,B.width=Ie.width,B.height=Ie.height,B.caretX=Fe.x,B.caretY=Fe.y,C._model=B,g&&x.custom&&x.custom.call(C,B),C},drawCaret:function(g,C){var x=this._chart.ctx,N=this._view,B=this.getCaretPosition(g,C,N);x.lineTo(B.x1,B.y1),x.lineTo(B.x2,B.y2),x.lineTo(B.x3,B.y3)},getCaretPosition:function(g,C,x){var N,B,J,oe,ye,fe,Ie=x.caretSize,Fe=x.cornerRadius,je=x.xAlign,ut=x.yAlign,Pt=g.x,Ot=g.y,Lt=C.width,Gt=C.height;if(ut==="center")ye=Ot+Gt/2,je==="left"?(N=Pt,B=N-Ie,J=N,oe=ye+Ie,fe=ye-Ie):(N=Pt+Lt,B=N+Ie,J=N,oe=ye-Ie,fe=ye+Ie);else if(je==="left"?(B=Pt+Fe+Ie,N=B-Ie,J=B+Ie):je==="right"?(B=Pt+Lt-Fe-Ie,N=B-Ie,J=B+Ie):(B=x.caretX,N=B-Ie,J=B+Ie),ut==="top")oe=Ot,ye=oe-Ie,fe=oe;else{oe=Ot+Gt,ye=oe+Ie,fe=oe;var Cn=J;J=N,N=Cn}return{x1:N,x2:B,x3:J,y1:oe,y2:ye,y3:fe}},drawTitle:function(g,C,x){var N=C.title,B=N.length,J,oe,ye;if(B){var fe=at(C.rtl,C.x,C.width);for(g.x=Fi(C,C._titleAlign),x.textAlign=fe.textAlign(C._titleAlign),x.textBaseline="middle",J=C.titleFontSize,oe=C.titleSpacing,x.fillStyle=C.titleFontColor,x.font=He.fontString(J,C._titleFontStyle,C._titleFontFamily),ye=0;ye<B;++ye)x.fillText(N[ye],fe.x(g.x),g.y+J/2),g.y+=J+oe,ye+1===B&&(g.y+=C.titleMarginBottom-oe)}},drawBody:function(g,C,x){var N=C.bodyFontSize,B=C.bodySpacing,J=C._bodyAlign,oe=C.body,ye=C.displayColors,fe=0,Ie=ye?Fi(C,"left"):0,Fe=at(C.rtl,C.x,C.width),je=function(Jr){x.fillText(Jr,Fe.x(g.x+fe),g.y+N/2),g.y+=N+B},ut,Pt,Ot,Lt,Gt,Cn,ii,si,Li=Fe.textAlign(J);for(x.textAlign=J,x.textBaseline="middle",x.font=He.fontString(N,C._bodyFontStyle,C._bodyFontFamily),g.x=Fi(C,Li),x.fillStyle=C.bodyFontColor,He.each(C.beforeBody,je),fe=ye&&Li!=="right"?J==="center"?N/2+1:N+2:0,Gt=0,ii=oe.length;Gt<ii;++Gt){for(ut=oe[Gt],Pt=C.labelTextColors[Gt],Ot=C.labelColors[Gt],x.fillStyle=Pt,He.each(ut.before,je),Lt=ut.lines,Cn=0,si=Lt.length;Cn<si;++Cn){if(ye){var Qi=Fe.x(Ie);x.fillStyle=C.legendColorBackground,x.fillRect(Fe.leftForLtr(Qi,N),g.y,N,N),x.lineWidth=1,x.strokeStyle=Ot.borderColor,x.strokeRect(Fe.leftForLtr(Qi,N),g.y,N,N),x.fillStyle=Ot.backgroundColor,x.fillRect(Fe.leftForLtr(Fe.xPlus(Qi,1),N-2),g.y+1,N-2,N-2),x.fillStyle=Pt}je(Lt[Cn])}He.each(ut.after,je)}fe=0,He.each(C.afterBody,je),g.y-=B},drawFooter:function(g,C,x){var N=C.footer,B=N.length,J,oe;if(B){var ye=at(C.rtl,C.x,C.width);for(g.x=Fi(C,C._footerAlign),g.y+=C.footerMarginTop,x.textAlign=ye.textAlign(C._footerAlign),x.textBaseline="middle",J=C.footerFontSize,x.fillStyle=C.footerFontColor,x.font=He.fontString(J,C._footerFontStyle,C._footerFontFamily),oe=0;oe<B;++oe)x.fillText(N[oe],ye.x(g.x),g.y+J/2),g.y+=J+C.footerSpacing}},drawBackground:function(g,C,x,N){x.fillStyle=C.backgroundColor,x.strokeStyle=C.borderColor,x.lineWidth=C.borderWidth;var B=C.xAlign,J=C.yAlign,oe=g.x,ye=g.y,fe=N.width,Ie=N.height,Fe=C.cornerRadius;x.beginPath(),x.moveTo(oe+Fe,ye),J==="top"&&this.drawCaret(g,N),x.lineTo(oe+fe-Fe,ye),x.quadraticCurveTo(oe+fe,ye,oe+fe,ye+Fe),J==="center"&&B==="right"&&this.drawCaret(g,N),x.lineTo(oe+fe,ye+Ie-Fe),x.quadraticCurveTo(oe+fe,ye+Ie,oe+fe-Fe,ye+Ie),J==="bottom"&&this.drawCaret(g,N),x.lineTo(oe+Fe,ye+Ie),x.quadraticCurveTo(oe,ye+Ie,oe,ye+Ie-Fe),J==="center"&&B==="left"&&this.drawCaret(g,N),x.lineTo(oe,ye+Fe),x.quadraticCurveTo(oe,ye,oe+Fe,ye),x.closePath(),x.fill(),C.borderWidth>0&&x.stroke()},draw:function(){var g=this._chart.ctx,C=this._view;if(C.opacity!==0){var x={width:C.width,height:C.height},N={x:C.x,y:C.y},B=Math.abs(C.opacity<.001)?0:C.opacity,J=C.title.length||C.beforeBody.length||C.body.length||C.afterBody.length||C.footer.length;this._options.enabled&&J&&(g.save(),g.globalAlpha=B,this.drawBackground(N,C,g,x),N.y+=C.yPadding,He.rtl.overrideTextDirection(g,C.textDirection),this.drawTitle(N,C,g),this.drawBody(N,C,g),this.drawFooter(N,C,g),He.rtl.restoreTextDirection(g,C.textDirection),g.restore())}},handleEvent:function(g){var C=this,x=C._options,N=!1;return C._lastActive=C._lastActive||[],g.type==="mouseout"?C._active=[]:(C._active=C._chart.getElementsAtEventForMode(g,x.mode,x),x.reverse&&C._active.reverse()),N=!He.arrayEquals(C._active,C._lastActive),N&&(C._lastActive=C._active,(x.enabled||x.custom)&&(C._eventPosition={x:g.x,y:g.y},C.update(!0),C.pivot())),N}}),yr=gt,ka=Yr;ka.positioners=yr;var fr=He.valueOrDefault;it._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function Nr(){return He.merge(Object.create(null),[].slice.call(arguments),{merger:function(g,C,x,N){if(g==="xAxes"||g==="yAxes"){var B=x[g].length,J,oe,ye;for(C[g]||(C[g]=[]),J=0;J<B;++J)ye=x[g][J],oe=fr(ye.type,g==="xAxes"?"category":"linear"),J>=C[g].length&&C[g].push({}),!C[g][J].type||ye.type&&ye.type!==C[g][J].type?He.merge(C[g][J],[pe.getScaleDefaults(oe),ye]):He.merge(C[g][J],ye)}else He._merger(g,C,x,N)}})}function Na(){return He.merge(Object.create(null),[].slice.call(arguments),{merger:function(g,C,x,N){var B=C[g]||Object.create(null),J=x[g];g==="scales"?C[g]=Nr(B,J):g==="scale"?C[g]=He.merge(B,[pe.getScaleDefaults(J.type),J]):He._merger(g,C,x,N)}})}function Wa(g){g=g||Object.create(null);var C=g.data=g.data||{};return C.datasets=C.datasets||[],C.labels=C.labels||[],g.options=Na(it.global,it[g.type],g.options||{}),g}function da(g){var C=g.options;He.each(g.scales,function(x){Ze.removeBox(g,x)}),C=Na(it.global,it[g.config.type],C),g.options=g.config.options=C,g.ensureScalesHaveIDs(),g.buildOrUpdateScales(),g.tooltip._options=C.tooltips,g.tooltip.initialize()}function Sa(g,C,x){var N,B=function(J){return J.id===N};do N=C+x++;while(He.findIndex(g,B)>=0);return N}function Br(g){return g==="top"||g==="bottom"}function Ks(g,C){return function(x,N){return x[g]===N[g]?x[C]-N[C]:x[g]-N[g]}}var Qr=function(g,C){return this.construct(g,C),this};He.extend(Qr.prototype,{construct:function(g,C){var x=this;C=Wa(C);var N=xe.acquireContext(g,C),B=N&&N.canvas,J=B&&B.height,oe=B&&B.width;if(x.id=He.uid(),x.ctx=N,x.canvas=B,x.config=C,x.width=oe,x.height=J,x.aspectRatio=J?oe/J:null,x.options=C.options,x._bufferedRender=!1,x._layers=[],x.chart=x,x.controller=x,Qr.instances[x.id]=x,Object.defineProperty(x,"data",{get:function(){return x.config.data},set:function(ye){x.config.data=ye}}),!N||!B){console.error("Failed to create chart: can't acquire context from the given item");return}x.initialize(),x.update()},initialize:function(){var g=this;return Ue.notify(g,"beforeInit"),He.retinaScale(g,g.options.devicePixelRatio),g.bindEvents(),g.options.responsive&&g.resize(!0),g.initToolTip(),Ue.notify(g,"afterInit"),g},clear:function(){return He.canvas.clear(this),this},stop:function(){return xn.cancelAnimation(this),this},resize:function(g){var C=this,x=C.options,N=C.canvas,B=x.maintainAspectRatio&&C.aspectRatio||null,J=Math.max(0,Math.floor(He.getMaximumWidth(N))),oe=Math.max(0,Math.floor(B?J/B:He.getMaximumHeight(N)));if(!(C.width===J&&C.height===oe)&&(N.width=C.width=J,N.height=C.height=oe,N.style.width=J+"px",N.style.height=oe+"px",He.retinaScale(C,x.devicePixelRatio),!g)){var ye={width:J,height:oe};Ue.notify(C,"resize",[ye]),x.onResize&&x.onResize(C,ye),C.stop(),C.update({duration:x.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var g=this.options,C=g.scales||{},x=g.scale;He.each(C.xAxes,function(N,B){N.id||(N.id=Sa(C.xAxes,"x-axis-",B))}),He.each(C.yAxes,function(N,B){N.id||(N.id=Sa(C.yAxes,"y-axis-",B))}),x&&(x.id=x.id||"scale")},buildOrUpdateScales:function(){var g=this,C=g.options,x=g.scales||{},N=[],B=Object.keys(x).reduce(function(J,oe){return J[oe]=!1,J},{});C.scales&&(N=N.concat((C.scales.xAxes||[]).map(function(J){return{options:J,dtype:"category",dposition:"bottom"}}),(C.scales.yAxes||[]).map(function(J){return{options:J,dtype:"linear",dposition:"left"}}))),C.scale&&N.push({options:C.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),He.each(N,function(J){var oe=J.options,ye=oe.id,fe=fr(oe.type,J.dtype);Br(oe.position)!==Br(J.dposition)&&(oe.position=J.dposition),B[ye]=!0;var Ie=null;if(ye in x&&x[ye].type===fe)Ie=x[ye],Ie.options=oe,Ie.ctx=g.ctx,Ie.chart=g;else{var Fe=pe.getScaleConstructor(fe);if(!Fe)return;Ie=new Fe({id:ye,type:fe,options:oe,ctx:g.ctx,chart:g}),x[Ie.id]=Ie}Ie.mergeTicksOptions(),J.isDefault&&(g.scale=Ie)}),He.each(B,function(J,oe){J||delete x[oe]}),g.scales=x,pe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var g=this,C=[],x=g.data.datasets,N,B;for(N=0,B=x.length;N<B;N++){var J=x[N],oe=g.getDatasetMeta(N),ye=J.type||g.config.type;if(oe.type&&oe.type!==ye&&(g.destroyDatasetMeta(N),oe=g.getDatasetMeta(N)),oe.type=ye,oe.order=J.order||0,oe.index=N,oe.controller)oe.controller.updateIndex(N),oe.controller.linkScales();else{var fe=ra[oe.type];if(fe===void 0)throw new Error('"'+oe.type+'" is not a chart type.');oe.controller=new fe(g,N),C.push(oe.controller)}}return C},resetElements:function(){var g=this;He.each(g.data.datasets,function(C,x){g.getDatasetMeta(x).controller.reset()},g)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(g){var C=this,x,N;if((!g||typeof g!="object")&&(g={duration:g,lazy:arguments[1]}),da(C),Ue._invalidate(C),Ue.notify(C,"beforeUpdate")!==!1){C.tooltip._data=C.data;var B=C.buildOrUpdateControllers();for(x=0,N=C.data.datasets.length;x<N;x++)C.getDatasetMeta(x).controller.buildOrUpdateElements();C.updateLayout(),C.options.animation&&C.options.animation.duration&&He.each(B,function(J){J.reset()}),C.updateDatasets(),C.tooltip.initialize(),C.lastActive=[],Ue.notify(C,"afterUpdate"),C._layers.sort(Ks("z","_idx")),C._bufferedRender?C._bufferedRequest={duration:g.duration,easing:g.easing,lazy:g.lazy}:C.render(g)}},updateLayout:function(){var g=this;Ue.notify(g,"beforeLayout")!==!1&&(Ze.update(this,this.width,this.height),g._layers=[],He.each(g.boxes,function(C){C._configure&&C._configure(),g._layers.push.apply(g._layers,C._layers())},g),g._layers.forEach(function(C,x){C._idx=x}),Ue.notify(g,"afterScaleUpdate"),Ue.notify(g,"afterLayout"))},updateDatasets:function(){var g=this;if(Ue.notify(g,"beforeDatasetsUpdate")!==!1){for(var C=0,x=g.data.datasets.length;C<x;++C)g.updateDataset(C);Ue.notify(g,"afterDatasetsUpdate")}},updateDataset:function(g){var C=this,x=C.getDatasetMeta(g),N={meta:x,index:g};Ue.notify(C,"beforeDatasetUpdate",[N])!==!1&&(x.controller._update(),Ue.notify(C,"afterDatasetUpdate",[N]))},render:function(g){var C=this;(!g||typeof g!="object")&&(g={duration:g,lazy:arguments[1]});var x=C.options.animation,N=fr(g.duration,x&&x.duration),B=g.lazy;if(Ue.notify(C,"beforeRender")!==!1){var J=function(ye){Ue.notify(C,"afterRender"),He.callback(x&&x.onComplete,[ye],C)};if(x&&N){var oe=new Ln({numSteps:N/16.66,easing:g.easing||x.easing,render:function(ye,fe){var Ie=He.easing.effects[fe.easing],Fe=fe.currentStep,je=Fe/fe.numSteps;ye.draw(Ie(je),je,Fe)},onAnimationProgress:x.onProgress,onAnimationComplete:J});xn.addAnimation(C,oe,N,B)}else C.draw(),J(new Ln({numSteps:0,chart:C}));return C}},draw:function(g){var C=this,x,N;if(C.clear(),He.isNullOrUndef(g)&&(g=1),C.transition(g),!(C.width<=0||C.height<=0)&&Ue.notify(C,"beforeDraw",[g])!==!1){for(N=C._layers,x=0;x<N.length&&N[x].z<=0;++x)N[x].draw(C.chartArea);for(C.drawDatasets(g);x<N.length;++x)N[x].draw(C.chartArea);C._drawTooltip(g),Ue.notify(C,"afterDraw",[g])}},transition:function(g){for(var C=this,x=0,N=(C.data.datasets||[]).length;x<N;++x)C.isDatasetVisible(x)&&C.getDatasetMeta(x).controller.transition(g);C.tooltip.transition(g)},_getSortedDatasetMetas:function(g){var C=this,x=C.data.datasets||[],N=[],B,J;for(B=0,J=x.length;B<J;++B)(!g||C.isDatasetVisible(B))&&N.push(C.getDatasetMeta(B));return N.sort(Ks("order","index")),N},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(g){var C=this,x,N;if(Ue.notify(C,"beforeDatasetsDraw",[g])!==!1){for(x=C._getSortedVisibleDatasetMetas(),N=x.length-1;N>=0;--N)C.drawDataset(x[N],g);Ue.notify(C,"afterDatasetsDraw",[g])}},drawDataset:function(g,C){var x=this,N={meta:g,index:g.index,easingValue:C};Ue.notify(x,"beforeDatasetDraw",[N])!==!1&&(g.controller.draw(C),Ue.notify(x,"afterDatasetDraw",[N]))},_drawTooltip:function(g){var C=this,x=C.tooltip,N={tooltip:x,easingValue:g};Ue.notify(C,"beforeTooltipDraw",[N])!==!1&&(x.draw(),Ue.notify(C,"afterTooltipDraw",[N]))},getElementAtEvent:function(g){return wi.modes.single(this,g)},getElementsAtEvent:function(g){return wi.modes.label(this,g,{intersect:!0})},getElementsAtXAxis:function(g){return wi.modes["x-axis"](this,g,{intersect:!0})},getElementsAtEventForMode:function(g,C,x){var N=wi.modes[C];return typeof N=="function"?N(this,g,x):[]},getDatasetAtEvent:function(g){return wi.modes.dataset(this,g,{intersect:!0})},getDatasetMeta:function(g){var C=this,x=C.data.datasets[g];x._meta||(x._meta={});var N=x._meta[C.id];return N||(N=x._meta[C.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:x.order||0,index:g}),N},getVisibleDatasetCount:function(){for(var g=0,C=0,x=this.data.datasets.length;C<x;++C)this.isDatasetVisible(C)&&g++;return g},isDatasetVisible:function(g){var C=this.getDatasetMeta(g);return typeof C.hidden=="boolean"?!C.hidden:!this.data.datasets[g].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(g){var C=this.id,x=this.data.datasets[g],N=x._meta&&x._meta[C];N&&(N.controller.destroy(),delete x._meta[C])},destroy:function(){var g=this,C=g.canvas,x,N;for(g.stop(),x=0,N=g.data.datasets.length;x<N;++x)g.destroyDatasetMeta(x);C&&(g.unbindEvents(),He.canvas.clear(g),xe.releaseContext(g.ctx),g.canvas=null,g.ctx=null),Ue.notify(g,"destroy"),delete Qr.instances[g.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var g=this;g.tooltip=new ka({_chart:g,_chartInstance:g,_data:g.data,_options:g.options.tooltips},g)},bindEvents:function(){var g=this,C=g._listeners={},x=function(){g.eventHandler.apply(g,arguments)};He.each(g.options.events,function(N){xe.addEventListener(g,N,x),C[N]=x}),g.options.responsive&&(x=function(){g.resize()},xe.addEventListener(g,"resize",x),C.resize=x)},unbindEvents:function(){var g=this,C=g._listeners;C&&(delete g._listeners,He.each(C,function(x,N){xe.removeEventListener(g,N,x)}))},updateHoverStyle:function(g,C,x){var N=x?"set":"remove",B,J,oe;for(J=0,oe=g.length;J<oe;++J)B=g[J],B&&this.getDatasetMeta(B._datasetIndex).controller[N+"HoverStyle"](B);C==="dataset"&&this.getDatasetMeta(g[0]._datasetIndex).controller["_"+N+"DatasetHoverStyle"]()},eventHandler:function(g){var C=this,x=C.tooltip;if(Ue.notify(C,"beforeEvent",[g])!==!1){C._bufferedRender=!0,C._bufferedRequest=null;var N=C.handleEvent(g);x&&(N=x._start?x.handleEvent(g):N|x.handleEvent(g)),Ue.notify(C,"afterEvent",[g]);var B=C._bufferedRequest;return B?C.render(B):N&&!C.animating&&(C.stop(),C.render({duration:C.options.hover.animationDuration,lazy:!0})),C._bufferedRender=!1,C._bufferedRequest=null,C}},handleEvent:function(g){var C=this,x=C.options||{},N=x.hover,B=!1;return C.lastActive=C.lastActive||[],g.type==="mouseout"?C.active=[]:C.active=C.getElementsAtEventForMode(g,N.mode,N),He.callback(x.onHover||x.hover.onHover,[g.native,C.active],C),(g.type==="mouseup"||g.type==="click")&&x.onClick&&x.onClick.call(C,g.native,C.active),C.lastActive.length&&C.updateHoverStyle(C.lastActive,N.mode,!1),C.active.length&&N.mode&&C.updateHoverStyle(C.active,N.mode,!0),B=!He.arrayEquals(C.active,C.lastActive),C.lastActive=C.active,B}}),Qr.instances={};var Oi=Qr;Qr.Controller=Qr,Qr.types={},He.configMerge=Na,He.scaleMerge=Nr;var Fs=function(){He.where=function(N,B){if(He.isArray(N)&&Array.prototype.filter)return N.filter(B);var J=[];return He.each(N,function(oe){B(oe)&&J.push(oe)}),J},He.findIndex=Array.prototype.findIndex?function(N,B,J){return N.findIndex(B,J)}:function(N,B,J){J=J===void 0?N:J;for(var oe=0,ye=N.length;oe<ye;++oe)if(B.call(J,N[oe],oe,N))return oe;return-1},He.findNextWhere=function(N,B,J){He.isNullOrUndef(J)&&(J=-1);for(var oe=J+1;oe<N.length;oe++){var ye=N[oe];if(B(ye))return ye}},He.findPreviousWhere=function(N,B,J){He.isNullOrUndef(J)&&(J=N.length);for(var oe=J-1;oe>=0;oe--){var ye=N[oe];if(B(ye))return ye}},He.isNumber=function(N){return!isNaN(parseFloat(N))&&isFinite(N)},He.almostEquals=function(N,B,J){return Math.abs(N-B)<J},He.almostWhole=function(N,B){var J=Math.round(N);return J-B<=N&&J+B>=N},He.max=function(N){return N.reduce(function(B,J){return isNaN(J)?B:Math.max(B,J)},Number.NEGATIVE_INFINITY)},He.min=function(N){return N.reduce(function(B,J){return isNaN(J)?B:Math.min(B,J)},Number.POSITIVE_INFINITY)},He.sign=Math.sign?function(N){return Math.sign(N)}:function(N){return N=+N,N===0||isNaN(N)?N:N>0?1:-1},He.toRadians=function(N){return N*(Math.PI/180)},He.toDegrees=function(N){return N*(180/Math.PI)},He._decimalPlaces=function(N){if(He.isFinite(N)){for(var B=1,J=0;Math.round(N*B)/B!==N;)B*=10,J++;return J}},He.getAngleFromPoint=function(N,B){var J=B.x-N.x,oe=B.y-N.y,ye=Math.sqrt(J*J+oe*oe),fe=Math.atan2(oe,J);return fe<-.5*Math.PI&&(fe+=2*Math.PI),{angle:fe,distance:ye}},He.distanceBetweenPoints=function(N,B){return Math.sqrt(Math.pow(B.x-N.x,2)+Math.pow(B.y-N.y,2))},He.aliasPixel=function(N){return N%2===0?0:.5},He._alignPixel=function(N,B,J){var oe=N.currentDevicePixelRatio,ye=J/2;return Math.round((B-ye)*oe)/oe+ye},He.splineCurve=function(N,B,J,oe){var ye=N.skip?B:N,fe=B,Ie=J.skip?B:J,Fe=Math.sqrt(Math.pow(fe.x-ye.x,2)+Math.pow(fe.y-ye.y,2)),je=Math.sqrt(Math.pow(Ie.x-fe.x,2)+Math.pow(Ie.y-fe.y,2)),ut=Fe/(Fe+je),Pt=je/(Fe+je);ut=isNaN(ut)?0:ut,Pt=isNaN(Pt)?0:Pt;var Ot=oe*ut,Lt=oe*Pt;return{previous:{x:fe.x-Ot*(Ie.x-ye.x),y:fe.y-Ot*(Ie.y-ye.y)},next:{x:fe.x+Lt*(Ie.x-ye.x),y:fe.y+Lt*(Ie.y-ye.y)}}},He.EPSILON=Number.EPSILON||1e-14,He.splineCurveMonotone=function(N){var B=(N||[]).map(function(Gt){return{model:Gt._model,deltaK:0,mK:0}}),J=B.length,oe,ye,fe,Ie;for(oe=0;oe<J;++oe)if(fe=B[oe],!fe.model.skip){if(ye=oe>0?B[oe-1]:null,Ie=oe<J-1?B[oe+1]:null,Ie&&!Ie.model.skip){var Fe=Ie.model.x-fe.model.x;fe.deltaK=Fe!==0?(Ie.model.y-fe.model.y)/Fe:0}!ye||ye.model.skip?fe.mK=fe.deltaK:!Ie||Ie.model.skip?fe.mK=ye.deltaK:this.sign(ye.deltaK)!==this.sign(fe.deltaK)?fe.mK=0:fe.mK=(ye.deltaK+fe.deltaK)/2}var je,ut,Pt,Ot;for(oe=0;oe<J-1;++oe)if(fe=B[oe],Ie=B[oe+1],!(fe.model.skip||Ie.model.skip)){if(He.almostEquals(fe.deltaK,0,this.EPSILON)){fe.mK=Ie.mK=0;continue}je=fe.mK/fe.deltaK,ut=Ie.mK/fe.deltaK,Ot=Math.pow(je,2)+Math.pow(ut,2),!(Ot<=9)&&(Pt=3/Math.sqrt(Ot),fe.mK=je*Pt*fe.deltaK,Ie.mK=ut*Pt*fe.deltaK)}var Lt;for(oe=0;oe<J;++oe)fe=B[oe],!fe.model.skip&&(ye=oe>0?B[oe-1]:null,Ie=oe<J-1?B[oe+1]:null,ye&&!ye.model.skip&&(Lt=(fe.model.x-ye.model.x)/3,fe.model.controlPointPreviousX=fe.model.x-Lt,fe.model.controlPointPreviousY=fe.model.y-Lt*fe.mK),Ie&&!Ie.model.skip&&(Lt=(Ie.model.x-fe.model.x)/3,fe.model.controlPointNextX=fe.model.x+Lt,fe.model.controlPointNextY=fe.model.y+Lt*fe.mK))},He.nextItem=function(N,B,J){return J?B>=N.length-1?N[0]:N[B+1]:B>=N.length-1?N[N.length-1]:N[B+1]},He.previousItem=function(N,B,J){return J?B<=0?N[N.length-1]:N[B-1]:B<=0?N[0]:N[B-1]},He.niceNum=function(N,B){var J=Math.floor(He.log10(N)),oe=N/Math.pow(10,J),ye;return B?oe<1.5?ye=1:oe<3?ye=2:oe<7?ye=5:ye=10:oe<=1?ye=1:oe<=2?ye=2:oe<=5?ye=5:ye=10,ye*Math.pow(10,J)},He.requestAnimFrame=function(){return typeof window>"u"?function(N){N()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(N){return window.setTimeout(N,1e3/60)}}(),He.getRelativePosition=function(N,B){var J,oe,ye=N.originalEvent||N,fe=N.target||N.srcElement,Ie=fe.getBoundingClientRect(),Fe=ye.touches;Fe&&Fe.length>0?(J=Fe[0].clientX,oe=Fe[0].clientY):(J=ye.clientX,oe=ye.clientY);var je=parseFloat(He.getStyle(fe,"padding-left")),ut=parseFloat(He.getStyle(fe,"padding-top")),Pt=parseFloat(He.getStyle(fe,"padding-right")),Ot=parseFloat(He.getStyle(fe,"padding-bottom")),Lt=Ie.right-Ie.left-je-Pt,Gt=Ie.bottom-Ie.top-ut-Ot;return J=Math.round((J-Ie.left-je)/Lt*fe.width/B.currentDevicePixelRatio),oe=Math.round((oe-Ie.top-ut)/Gt*fe.height/B.currentDevicePixelRatio),{x:J,y:oe}};function g(N,B,J){var oe;return typeof N=="string"?(oe=parseInt(N,10),N.indexOf("%")!==-1&&(oe=oe/100*B.parentNode[J])):oe=N,oe}function C(N){return N!=null&&N!=="none"}function x(N,B,J){var oe=document.defaultView,ye=He._getParentNode(N),fe=oe.getComputedStyle(N)[B],Ie=oe.getComputedStyle(ye)[B],Fe=C(fe),je=C(Ie),ut=Number.POSITIVE_INFINITY;return Fe||je?Math.min(Fe?g(fe,N,J):ut,je?g(Ie,ye,J):ut):"none"}He.getConstraintWidth=function(N){return x(N,"max-width","clientWidth")},He.getConstraintHeight=function(N){return x(N,"max-height","clientHeight")},He._calculatePadding=function(N,B,J){return B=He.getStyle(N,B),B.indexOf("%")>-1?J*parseInt(B,10)/100:parseInt(B,10)},He._getParentNode=function(N){var B=N.parentNode;return B&&B.toString()==="[object ShadowRoot]"&&(B=B.host),B},He.getMaximumWidth=function(N){var B=He._getParentNode(N);if(!B)return N.clientWidth;var J=B.clientWidth,oe=He._calculatePadding(B,"padding-left",J),ye=He._calculatePadding(B,"padding-right",J),fe=J-oe-ye,Ie=He.getConstraintWidth(N);return isNaN(Ie)?fe:Math.min(fe,Ie)},He.getMaximumHeight=function(N){var B=He._getParentNode(N);if(!B)return N.clientHeight;var J=B.clientHeight,oe=He._calculatePadding(B,"padding-top",J),ye=He._calculatePadding(B,"padding-bottom",J),fe=J-oe-ye,Ie=He.getConstraintHeight(N);return isNaN(Ie)?fe:Math.min(fe,Ie)},He.getStyle=function(N,B){return N.currentStyle?N.currentStyle[B]:document.defaultView.getComputedStyle(N,null).getPropertyValue(B)},He.retinaScale=function(N,B){var J=N.currentDevicePixelRatio=B||typeof window<"u"&&window.devicePixelRatio||1;if(J!==1){var oe=N.canvas,ye=N.height,fe=N.width;oe.height=ye*J,oe.width=fe*J,N.ctx.scale(J,J),!oe.style.height&&!oe.style.width&&(oe.style.height=ye+"px",oe.style.width=fe+"px")}},He.fontString=function(N,B,J){return B+" "+N+"px "+J},He.longestText=function(N,B,J,oe){oe=oe||{};var ye=oe.data=oe.data||{},fe=oe.garbageCollect=oe.garbageCollect||[];oe.font!==B&&(ye=oe.data={},fe=oe.garbageCollect=[],oe.font=B),N.font=B;var Ie=0,Fe=J.length,je,ut,Pt,Ot,Lt;for(je=0;je<Fe;je++)if(Ot=J[je],Ot!=null&&He.isArray(Ot)!==!0)Ie=He.measureText(N,ye,fe,Ie,Ot);else if(He.isArray(Ot))for(ut=0,Pt=Ot.length;ut<Pt;ut++)Lt=Ot[ut],Lt!=null&&!He.isArray(Lt)&&(Ie=He.measureText(N,ye,fe,Ie,Lt));var Gt=fe.length/2;if(Gt>J.length){for(je=0;je<Gt;je++)delete ye[fe[je]];fe.splice(0,Gt)}return Ie},He.measureText=function(N,B,J,oe,ye){var fe=B[ye];return fe||(fe=B[ye]=N.measureText(ye).width,J.push(ye)),fe>oe&&(oe=fe),oe},He.numberOfLabelLines=function(N){var B=1;return He.each(N,function(J){He.isArray(J)&&J.length>B&&(B=J.length)}),B},He.color=We?function(N){return N instanceof CanvasGradient&&(N=it.global.defaultColor),We(N)}:function(N){return console.error("Color.js not found!"),N},He.getHoverColor=function(N){return N instanceof CanvasPattern||N instanceof CanvasGradient?N:He.color(N).saturate(.5).darken(.1).rgbString()}};function Qa(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function as(g){this.options=g||{}}He.extend(as.prototype,{formats:Qa,parse:Qa,format:Qa,add:Qa,diff:Qa,startOf:Qa,endOf:Qa,_create:function(g){return g}}),as.override=function(g){He.extend(as.prototype,g)};var bo=as,yo={_date:bo},Ts={formatters:{values:function(g){return He.isArray(g)?g:""+g},linear:function(g,C,x){var N=x.length>3?x[2]-x[1]:x[1]-x[0];Math.abs(N)>1&&g!==Math.floor(g)&&(N=g-Math.floor(g));var B=He.log10(Math.abs(N)),J="";if(g!==0){var oe=Math.max(Math.abs(x[0]),Math.abs(x[x.length-1]));if(oe<1e-4){var ye=He.log10(Math.abs(g)),fe=Math.floor(ye)-Math.floor(B);fe=Math.max(Math.min(fe,20),0),J=g.toExponential(fe)}else{var Ie=-1*Math.floor(B);Ie=Math.max(Math.min(Ie,20),0),J=g.toFixed(Ie)}}else J="0";return J},logarithmic:function(g,C,x){var N=g/Math.pow(10,Math.floor(He.log10(g)));return g===0?"0":N===1||N===2||N===5||C===0||C===x.length-1?g.toExponential():""}}},Ls=He.isArray,wo=He.isNullOrUndef,Is=He.valueOrDefault,Hs=He.valueAtIndexOrDefault;it._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Ts.formatters.values,minor:{},major:{}}});function pl(g,C){for(var x=[],N=g.length/C,B=0,J=g.length;B<J;B+=N)x.push(g[Math.floor(B)]);return x}function zo(g,C,x){var N=g.getTicks().length,B=Math.min(C,N-1),J=g.getPixelForTick(B),oe=g._startPixel,ye=g._endPixel,fe=1e-6,Ie;if(!(x&&(N===1?Ie=Math.max(J-oe,ye-J):C===0?Ie=(g.getPixelForTick(1)-J)/2:Ie=(J-g.getPixelForTick(B-1))/2,J+=B<C?Ie:-Ie,J<oe-fe||J>ye+fe)))return J}function cs(g,C){He.each(g,function(x){var N=x.gc,B=N.length/2,J;if(B>C){for(J=0;J<B;++J)delete x.data[N[J]];N.splice(0,B)}})}function ss(g,C,x,N){var B=x.length,J=[],oe=[],ye=[],fe=0,Ie=0,Fe,je,ut,Pt,Ot,Lt,Gt,Cn,ii,si,Li,Qi,Jr;for(Fe=0;Fe<B;++Fe){if(Pt=x[Fe].label,Ot=x[Fe].major?C.major:C.minor,g.font=Lt=Ot.string,Gt=N[Lt]=N[Lt]||{data:{},gc:[]},Cn=Ot.lineHeight,ii=si=0,!wo(Pt)&&!Ls(Pt))ii=He.measureText(g,Gt.data,Gt.gc,ii,Pt),si=Cn;else if(Ls(Pt))for(je=0,ut=Pt.length;je<ut;++je)Li=Pt[je],!wo(Li)&&!Ls(Li)&&(ii=He.measureText(g,Gt.data,Gt.gc,ii,Li),si+=Cn);J.push(ii),oe.push(si),ye.push(Cn/2),fe=Math.max(ii,fe),Ie=Math.max(si,Ie)}cs(N,B),Qi=J.indexOf(fe),Jr=oe.indexOf(Ie);function Mr(Zr){return{width:J[Zr]||0,height:oe[Zr]||0,offset:ye[Zr]||0}}return{first:Mr(0),last:Mr(B-1),widest:Mr(Qi),highest:Mr(Jr)}}function Xs(g){return g.drawTicks?g.tickMarkLength:0}function Qs(g){var C,x;return g.display?(C=He.options._parseFont(g),x=He.options.toPadding(g.padding),C.lineHeight+x.height):0}function Yo(g,C){return He.extend(He.options._parseFont({fontFamily:Is(C.fontFamily,g.fontFamily),fontSize:Is(C.fontSize,g.fontSize),fontStyle:Is(C.fontStyle,g.fontStyle),lineHeight:Is(C.lineHeight,g.lineHeight)}),{color:He.options.resolve([C.fontColor,g.fontColor,it.global.defaultFontColor])})}function gu(g){var C=Yo(g,g.minor),x=g.major.enabled?Yo(g,g.major):C;return{minor:C,major:x}}function Vu(g){var C=[],x,N,B;for(N=0,B=g.length;N<B;++N)x=g[N],typeof x._index<"u"&&C.push(x);return C}function Ll(g){var C=g.length,x,N;if(C<2)return!1;for(N=g[0],x=1;x<C;++x)if(g[x]-g[x-1]!==N)return!1;return N}function Hl(g,C,x,N){var B=Ll(g),J=(C.length-1)/N,oe,ye,fe,Ie;if(!B)return Math.max(J,1);for(oe=He.math._factorize(B),fe=0,Ie=oe.length-1;fe<Ie;fe++)if(ye=oe[fe],ye>J)return ye;return Math.max(J,1)}function zu(g){var C=[],x,N;for(x=0,N=g.length;x<N;x++)g[x].major&&C.push(x);return C}function vf(g,C,x){var N=0,B=C[0],J,oe;for(x=Math.ceil(x),J=0;J<g.length;J++)oe=g[J],J===B?(oe._index=J,N++,B=C[N*x]):delete oe.label}function hl(g,C,x,N){var B=Is(x,0),J=Math.min(Is(N,g.length),g.length),oe=0,ye,fe,Ie,Fe;for(C=Math.ceil(C),N&&(ye=N-x,C=ye/Math.floor(ye/C)),Fe=B;Fe<0;)oe++,Fe=Math.round(B+oe*C);for(fe=Math.max(B,0);fe<J;fe++)Ie=g[fe],fe===Fe?(Ie._index=fe,oe++,Fe=Math.round(B+oe*C)):delete Ie.label}var To=dt.extend({zeroLineIndex:0,getPadding:function(){var g=this;return{left:g.paddingLeft||0,top:g.paddingTop||0,right:g.paddingRight||0,bottom:g.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var g=this.chart.data;return this.options.labels||(this.isHorizontal()?g.xLabels:g.yLabels)||g.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){He.callback(this.options.beforeUpdate,[this])},update:function(g,C,x){var N=this,B=N.options.ticks,J=B.sampleSize,oe,ye,fe,Ie,Fe;if(N.beforeUpdate(),N.maxWidth=g,N.maxHeight=C,N.margins=He.extend({left:0,right:0,top:0,bottom:0},x),N._ticks=null,N.ticks=null,N._labelSizes=null,N._maxLabelLines=0,N.longestLabelWidth=0,N.longestTextCache=N.longestTextCache||{},N._gridLineItems=null,N._labelItems=null,N.beforeSetDimensions(),N.setDimensions(),N.afterSetDimensions(),N.beforeDataLimits(),N.determineDataLimits(),N.afterDataLimits(),N.beforeBuildTicks(),Ie=N.buildTicks()||[],Ie=N.afterBuildTicks(Ie)||Ie,(!Ie||!Ie.length)&&N.ticks)for(Ie=[],oe=0,ye=N.ticks.length;oe<ye;++oe)Ie.push({value:N.ticks[oe],major:!1});return N._ticks=Ie,Fe=J<Ie.length,fe=N._convertTicksToLabels(Fe?pl(Ie,J):Ie),N._configure(),N.beforeCalculateTickRotation(),N.calculateTickRotation(),N.afterCalculateTickRotation(),N.beforeFit(),N.fit(),N.afterFit(),N._ticksToDraw=B.display&&(B.autoSkip||B.source==="auto")?N._autoSkip(Ie):Ie,Fe&&(fe=N._convertTicksToLabels(N._ticksToDraw)),N.ticks=fe,N.afterUpdate(),N.minSize},_configure:function(){var g=this,C=g.options.ticks.reverse,x,N;g.isHorizontal()?(x=g.left,N=g.right):(x=g.top,N=g.bottom,C=!C),g._startPixel=x,g._endPixel=N,g._reversePixels=C,g._length=N-x},afterUpdate:function(){He.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){He.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var g=this;g.isHorizontal()?(g.width=g.maxWidth,g.left=0,g.right=g.width):(g.height=g.maxHeight,g.top=0,g.bottom=g.height),g.paddingLeft=0,g.paddingTop=0,g.paddingRight=0,g.paddingBottom=0},afterSetDimensions:function(){He.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){He.callback(this.options.beforeDataLimits,[this])},determineDataLimits:He.noop,afterDataLimits:function(){He.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){He.callback(this.options.beforeBuildTicks,[this])},buildTicks:He.noop,afterBuildTicks:function(g){var C=this;return Ls(g)&&g.length?He.callback(C.options.afterBuildTicks,[C,g]):(C.ticks=He.callback(C.options.afterBuildTicks,[C,C.ticks])||C.ticks,g)},beforeTickToLabelConversion:function(){He.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var g=this,C=g.options.ticks;g.ticks=g.ticks.map(C.userCallback||C.callback,this)},afterTickToLabelConversion:function(){He.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){He.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var g=this,C=g.options,x=C.ticks,N=g.getTicks().length,B=x.minRotation||0,J=x.maxRotation,oe=B,ye,fe,Ie,Fe,je,ut,Pt;if(!g._isVisible()||!x.display||B>=J||N<=1||!g.isHorizontal()){g.labelRotation=B;return}ye=g._getLabelSizes(),fe=ye.widest.width,Ie=ye.highest.height-ye.highest.offset,Fe=Math.min(g.maxWidth,g.chart.width-fe),je=C.offset?g.maxWidth/N:Fe/(N-1),fe+6>je&&(je=Fe/(N-(C.offset?.5:1)),ut=g.maxHeight-Xs(C.gridLines)-x.padding-Qs(C.scaleLabel),Pt=Math.sqrt(fe*fe+Ie*Ie),oe=He.toDegrees(Math.min(Math.asin(Math.min((ye.highest.height+6)/je,1)),Math.asin(Math.min(ut/Pt,1))-Math.asin(Ie/Pt))),oe=Math.max(B,Math.min(J,oe))),g.labelRotation=oe},afterCalculateTickRotation:function(){He.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){He.callback(this.options.beforeFit,[this])},fit:function(){var g=this,C=g.minSize={width:0,height:0},x=g.chart,N=g.options,B=N.ticks,J=N.scaleLabel,oe=N.gridLines,ye=g._isVisible(),fe=N.position==="bottom",Ie=g.isHorizontal();if(Ie?C.width=g.maxWidth:ye&&(C.width=Xs(oe)+Qs(J)),Ie?ye&&(C.height=Xs(oe)+Qs(J)):C.height=g.maxHeight,B.display&&ye){var Fe=gu(B),je=g._getLabelSizes(),ut=je.first,Pt=je.last,Ot=je.widest,Lt=je.highest,Gt=Fe.minor.lineHeight*.4,Cn=B.padding;if(Ie){var ii=g.labelRotation!==0,si=He.toRadians(g.labelRotation),Li=Math.cos(si),Qi=Math.sin(si),Jr=Qi*Ot.width+Li*(Lt.height-(ii?Lt.offset:0))+(ii?0:Gt);C.height=Math.min(g.maxHeight,C.height+Jr+Cn);var Mr=g.getPixelForTick(0)-g.left,Zr=g.right-g.getPixelForTick(g.getTicks().length-1),ba,hs;ii?(ba=fe?Li*ut.width+Qi*ut.offset:Qi*(ut.height-ut.offset),hs=fe?Qi*(Pt.height-Pt.offset):Li*Pt.width+Qi*Pt.offset):(ba=ut.width/2,hs=Pt.width/2),g.paddingLeft=Math.max((ba-Mr)*g.width/(g.width-Mr),0)+3,g.paddingRight=Math.max((hs-Zr)*g.width/(g.width-Zr),0)+3}else{var ms=B.mirror?0:Ot.width+Cn+Gt;C.width=Math.min(g.maxWidth,C.width+ms),g.paddingTop=ut.height/2,g.paddingBottom=Pt.height/2}}g.handleMargins(),Ie?(g.width=g._length=x.width-g.margins.left-g.margins.right,g.height=C.height):(g.width=C.width,g.height=g._length=x.height-g.margins.top-g.margins.bottom)},handleMargins:function(){var g=this;g.margins&&(g.margins.left=Math.max(g.paddingLeft,g.margins.left),g.margins.top=Math.max(g.paddingTop,g.margins.top),g.margins.right=Math.max(g.paddingRight,g.margins.right),g.margins.bottom=Math.max(g.paddingBottom,g.margins.bottom))},afterFit:function(){He.callback(this.options.afterFit,[this])},isHorizontal:function(){var g=this.options.position;return g==="top"||g==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(g){if(wo(g))return NaN;if((typeof g=="number"||g instanceof Number)&&!isFinite(g))return NaN;if(g){if(this.isHorizontal()){if(g.x!==void 0)return this.getRightValue(g.x)}else if(g.y!==void 0)return this.getRightValue(g.y)}return g},_convertTicksToLabels:function(g){var C=this,x,N,B;for(C.ticks=g.map(function(J){return J.value}),C.beforeTickToLabelConversion(),x=C.convertTicksToLabels(g)||C.ticks,C.afterTickToLabelConversion(),N=0,B=g.length;N<B;++N)g[N].label=x[N];return x},_getLabelSizes:function(){var g=this,C=g._labelSizes;return C||(g._labelSizes=C=ss(g.ctx,gu(g.options.ticks),g.getTicks(),g.longestTextCache),g.longestLabelWidth=C.widest.width),C},_parseValue:function(g){var C,x,N,B;return Ls(g)?(C=+this.getRightValue(g[0]),x=+this.getRightValue(g[1]),N=Math.min(C,x),B=Math.max(C,x)):(g=+this.getRightValue(g),C=void 0,x=g,N=g,B=g),{min:N,max:B,start:C,end:x}},_getScaleLabel:function(g){var C=this._parseValue(g);return C.start!==void 0?"["+C.start+", "+C.end+"]":+this.getRightValue(g)},getLabelForIndex:He.noop,getPixelForValue:He.noop,getValueForPixel:He.noop,getPixelForTick:function(g){var C=this,x=C.options.offset,N=C._ticks.length,B=1/Math.max(N-(x?0:1),1);return g<0||g>N-1?null:C.getPixelForDecimal(g*B+(x?B/2:0))},getPixelForDecimal:function(g){var C=this;return C._reversePixels&&(g=1-g),C._startPixel+g*C._length},getDecimalForPixel:function(g){var C=(g-this._startPixel)/this._length;return this._reversePixels?1-C:C},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var g=this,C=g.min,x=g.max;return g.beginAtZero?0:C<0&&x<0?x:C>0&&x>0?C:0},_autoSkip:function(g){var C=this,x=C.options.ticks,N=C._length,B=x.maxTicksLimit||N/C._tickSize()+1,J=x.major.enabled?zu(g):[],oe=J.length,ye=J[0],fe=J[oe-1],Ie,Fe,je,ut;if(oe>B)return vf(g,J,oe/B),Vu(g);if(je=Hl(J,g,N,B),oe>0){for(Ie=0,Fe=oe-1;Ie<Fe;Ie++)hl(g,je,J[Ie],J[Ie+1]);return ut=oe>1?(fe-ye)/(oe-1):null,hl(g,je,He.isNullOrUndef(ut)?0:ye-ut,ye),hl(g,je,fe,He.isNullOrUndef(ut)?g.length:fe+ut),Vu(g)}return hl(g,je),Vu(g)},_tickSize:function(){var g=this,C=g.options.ticks,x=He.toRadians(g.labelRotation),N=Math.abs(Math.cos(x)),B=Math.abs(Math.sin(x)),J=g._getLabelSizes(),oe=C.autoSkipPadding||0,ye=J?J.widest.width+oe:0,fe=J?J.highest.height+oe:0;return g.isHorizontal()?fe*N>ye*B?ye/N:fe/B:fe*B<ye*N?fe/N:ye/B},_isVisible:function(){var g=this,C=g.chart,x=g.options.display,N,B,J;if(x!=="auto")return!!x;for(N=0,B=C.data.datasets.length;N<B;++N)if(C.isDatasetVisible(N)&&(J=C.getDatasetMeta(N),J.xAxisID===g.id||J.yAxisID===g.id))return!0;return!1},_computeGridLineItems:function(g){var C=this,x=C.chart,N=C.options,B=N.gridLines,J=N.position,oe=B.offsetGridLines,ye=C.isHorizontal(),fe=C._ticksToDraw,Ie=fe.length+(oe?1:0),Fe=Xs(B),je=[],ut=B.drawBorder?Hs(B.lineWidth,0,0):0,Pt=ut/2,Ot=He._alignPixel,Lt=function($f){return Ot(x,$f,ut)},Gt,Cn,ii,si,Li,Qi,Jr,Mr,Zr,ba,hs,ms,Da,gs,Ql,kl,Sl;for(J==="top"?(Gt=Lt(C.bottom),Jr=C.bottom-Fe,Zr=Gt-Pt,hs=Lt(g.top)+Pt,Da=g.bottom):J==="bottom"?(Gt=Lt(C.top),hs=g.top,Da=Lt(g.bottom)-Pt,Jr=Gt+Pt,Zr=C.top+Fe):J==="left"?(Gt=Lt(C.right),Qi=C.right-Fe,Mr=Gt-Pt,ba=Lt(g.left)+Pt,ms=g.right):(Gt=Lt(C.left),ba=g.left,ms=Lt(g.right)-Pt,Qi=Gt+Pt,Mr=C.left+Fe),Cn=0;Cn<Ie;++Cn)ii=fe[Cn]||{},!(wo(ii.label)&&Cn<fe.length)&&(Cn===C.zeroLineIndex&&N.offset===oe?(gs=B.zeroLineWidth,Ql=B.zeroLineColor,kl=B.zeroLineBorderDash||[],Sl=B.zeroLineBorderDashOffset||0):(gs=Hs(B.lineWidth,Cn,1),Ql=Hs(B.color,Cn,"rgba(0,0,0,0.1)"),kl=B.borderDash||[],Sl=B.borderDashOffset||0),si=zo(C,ii._index||Cn,oe),si!==void 0&&(Li=Ot(x,si,gs),ye?Qi=Mr=ba=ms=Li:Jr=Zr=hs=Da=Li,je.push({tx1:Qi,ty1:Jr,tx2:Mr,ty2:Zr,x1:ba,y1:hs,x2:ms,y2:Da,width:gs,color:Ql,borderDash:kl,borderDashOffset:Sl})));return je.ticksLength=Ie,je.borderValue=Gt,je},_computeLabelItems:function(){var g=this,C=g.options,x=C.ticks,N=C.position,B=x.mirror,J=g.isHorizontal(),oe=g._ticksToDraw,ye=gu(x),fe=x.padding,Ie=Xs(C.gridLines),Fe=-He.toRadians(g.labelRotation),je=[],ut,Pt,Ot,Lt,Gt,Cn,ii,si,Li,Qi,Jr,Mr;for(N==="top"?(Cn=g.bottom-Ie-fe,ii=Fe?"left":"center"):N==="bottom"?(Cn=g.top+Ie+fe,ii=Fe?"right":"center"):N==="left"?(Gt=g.right-(B?0:Ie)-fe,ii=B?"left":"right"):(Gt=g.left+(B?0:Ie)+fe,ii=B?"right":"left"),ut=0,Pt=oe.length;ut<Pt;++ut)Ot=oe[ut],Lt=Ot.label,!wo(Lt)&&(si=g.getPixelForTick(Ot._index||ut)+x.labelOffset,Li=Ot.major?ye.major:ye.minor,Qi=Li.lineHeight,Jr=Ls(Lt)?Lt.length:1,J?(Gt=si,Mr=N==="top"?((Fe?1:.5)-Jr)*Qi:(Fe?0:.5)*Qi):(Cn=si,Mr=(1-Jr)*Qi/2),je.push({x:Gt,y:Cn,rotation:Fe,label:Lt,font:Li,textOffset:Mr,textAlign:ii}));return je},_drawGrid:function(g){var C=this,x=C.options.gridLines;if(x.display){var N=C.ctx,B=C.chart,J=He._alignPixel,oe=x.drawBorder?Hs(x.lineWidth,0,0):0,ye=C._gridLineItems||(C._gridLineItems=C._computeGridLineItems(g)),fe,Ie,Fe,je,ut;for(Fe=0,je=ye.length;Fe<je;++Fe)ut=ye[Fe],fe=ut.width,Ie=ut.color,fe&&Ie&&(N.save(),N.lineWidth=fe,N.strokeStyle=Ie,N.setLineDash&&(N.setLineDash(ut.borderDash),N.lineDashOffset=ut.borderDashOffset),N.beginPath(),x.drawTicks&&(N.moveTo(ut.tx1,ut.ty1),N.lineTo(ut.tx2,ut.ty2)),x.drawOnChartArea&&(N.moveTo(ut.x1,ut.y1),N.lineTo(ut.x2,ut.y2)),N.stroke(),N.restore());if(oe){var Pt=oe,Ot=Hs(x.lineWidth,ye.ticksLength-1,1),Lt=ye.borderValue,Gt,Cn,ii,si;C.isHorizontal()?(Gt=J(B,C.left,Pt)-Pt/2,Cn=J(B,C.right,Ot)+Ot/2,ii=si=Lt):(ii=J(B,C.top,Pt)-Pt/2,si=J(B,C.bottom,Ot)+Ot/2,Gt=Cn=Lt),N.lineWidth=oe,N.strokeStyle=Hs(x.color,0),N.beginPath(),N.moveTo(Gt,ii),N.lineTo(Cn,si),N.stroke()}}},_drawLabels:function(){var g=this,C=g.options.ticks;if(C.display){var x=g.ctx,N=g._labelItems||(g._labelItems=g._computeLabelItems()),B,J,oe,ye,fe,Ie,Fe,je;for(B=0,oe=N.length;B<oe;++B){if(fe=N[B],Ie=fe.font,x.save(),x.translate(fe.x,fe.y),x.rotate(fe.rotation),x.font=Ie.string,x.fillStyle=Ie.color,x.textBaseline="middle",x.textAlign=fe.textAlign,Fe=fe.label,je=fe.textOffset,Ls(Fe))for(J=0,ye=Fe.length;J<ye;++J)x.fillText(""+Fe[J],0,je),je+=Ie.lineHeight;else x.fillText(Fe,0,je);x.restore()}}},_drawTitle:function(){var g=this,C=g.ctx,x=g.options,N=x.scaleLabel;if(N.display){var B=Is(N.fontColor,it.global.defaultFontColor),J=He.options._parseFont(N),oe=He.options.toPadding(N.padding),ye=J.lineHeight/2,fe=x.position,Ie=0,Fe,je;if(g.isHorizontal())Fe=g.left+g.width/2,je=fe==="bottom"?g.bottom-ye-oe.bottom:g.top+ye+oe.top;else{var ut=fe==="left";Fe=ut?g.left+ye+oe.top:g.right-ye-oe.top,je=g.top+g.height/2,Ie=ut?-.5*Math.PI:.5*Math.PI}C.save(),C.translate(Fe,je),C.rotate(Ie),C.textAlign="center",C.textBaseline="middle",C.fillStyle=B,C.font=J.string,C.fillText(N.labelString,0,0),C.restore()}},draw:function(g){var C=this;C._isVisible()&&(C._drawGrid(g),C._drawTitle(),C._drawLabels())},_layers:function(){var g=this,C=g.options,x=C.ticks&&C.ticks.z||0,N=C.gridLines&&C.gridLines.z||0;return!g._isVisible()||x===N||g.draw!==g._draw?[{z:x,draw:function(){g.draw.apply(g,arguments)}}]:[{z:N,draw:function(){g._drawGrid.apply(g,arguments),g._drawTitle.apply(g,arguments)}},{z:x,draw:function(){g._drawLabels.apply(g,arguments)}}]},_getMatchingVisibleMetas:function(g){var C=this,x=C.isHorizontal();return C.chart._getSortedVisibleDatasetMetas().filter(function(N){return(!g||N.type===g)&&(x?N.xAxisID===C.id:N.yAxisID===C.id)})}});To.prototype._draw=To.prototype.draw;var _s=To,vu=He.isNullOrUndef,bf={position:"bottom"},ml=_s.extend({determineDataLimits:function(){var g=this,C=g._getLabels(),x=g.options.ticks,N=x.min,B=x.max,J=0,oe=C.length-1,ye;N!==void 0&&(ye=C.indexOf(N),ye>=0&&(J=ye)),B!==void 0&&(ye=C.indexOf(B),ye>=0&&(oe=ye)),g.minIndex=J,g.maxIndex=oe,g.min=C[J],g.max=C[oe]},buildTicks:function(){var g=this,C=g._getLabels(),x=g.minIndex,N=g.maxIndex;g.ticks=x===0&&N===C.length-1?C:C.slice(x,N+1)},getLabelForIndex:function(g,C){var x=this,N=x.chart;return N.getDatasetMeta(C).controller._getValueScaleId()===x.id?x.getRightValue(N.data.datasets[C].data[g]):x._getLabels()[g]},_configure:function(){var g=this,C=g.options.offset,x=g.ticks;_s.prototype._configure.call(g),g.isHorizontal()||(g._reversePixels=!g._reversePixels),x&&(g._startValue=g.minIndex-(C?.5:0),g._valueRange=Math.max(x.length-(C?0:1),1))},getPixelForValue:function(g,C,x){var N=this,B,J,oe;return!vu(C)&&!vu(x)&&(g=N.chart.data.datasets[x].data[C]),vu(g)||(B=N.isHorizontal()?g.x:g.y),(B!==void 0||g!==void 0&&isNaN(C))&&(J=N._getLabels(),g=He.valueOrDefault(B,g),oe=J.indexOf(g),C=oe!==-1?oe:C,isNaN(C)&&(C=g)),N.getPixelForDecimal((C-N._startValue)/N._valueRange)},getPixelForTick:function(g){var C=this.ticks;return g<0||g>C.length-1?null:this.getPixelForValue(C[g],g+this.minIndex)},getValueForPixel:function(g){var C=this,x=Math.round(C._startValue+C.getDecimalForPixel(g)*C._valueRange);return Math.min(Math.max(x,0),C.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Go=bf;ml._defaults=Go;var yf=He.noop,ko=He.isNullOrUndef;function So(g,C){var x=[],N=1e-14,B=g.stepSize,J=B||1,oe=g.maxTicks-1,ye=g.min,fe=g.max,Ie=g.precision,Fe=C.min,je=C.max,ut=He.niceNum((je-Fe)/oe/J)*J,Pt,Ot,Lt,Gt;if(ut<N&&ko(ye)&&ko(fe))return[Fe,je];Gt=Math.ceil(je/ut)-Math.floor(Fe/ut),Gt>oe&&(ut=He.niceNum(Gt*ut/oe/J)*J),B||ko(Ie)?Pt=Math.pow(10,He._decimalPlaces(ut)):(Pt=Math.pow(10,Ie),ut=Math.ceil(ut*Pt)/Pt),Ot=Math.floor(Fe/ut)*ut,Lt=Math.ceil(je/ut)*ut,B&&(!ko(ye)&&He.almostWhole(ye/ut,ut/1e3)&&(Ot=ye),!ko(fe)&&He.almostWhole(fe/ut,ut/1e3)&&(Lt=fe)),Gt=(Lt-Ot)/ut,He.almostEquals(Gt,Math.round(Gt),ut/1e3)?Gt=Math.round(Gt):Gt=Math.ceil(Gt),Ot=Math.round(Ot*Pt)/Pt,Lt=Math.round(Lt*Pt)/Pt,x.push(ko(ye)?Ot:ye);for(var Cn=1;Cn<Gt;++Cn)x.push(Math.round((Ot+Cn*ut)*Pt)/Pt);return x.push(ko(fe)?Lt:fe),x}var gl=_s.extend({getRightValue:function(g){return typeof g=="string"?+g:_s.prototype.getRightValue.call(this,g)},handleTickRangeOptions:function(){var g=this,C=g.options,x=C.ticks;if(x.beginAtZero){var N=He.sign(g.min),B=He.sign(g.max);N<0&&B<0?g.max=0:N>0&&B>0&&(g.min=0)}var J=x.min!==void 0||x.suggestedMin!==void 0,oe=x.max!==void 0||x.suggestedMax!==void 0;x.min!==void 0?g.min=x.min:x.suggestedMin!==void 0&&(g.min===null?g.min=x.suggestedMin:g.min=Math.min(g.min,x.suggestedMin)),x.max!==void 0?g.max=x.max:x.suggestedMax!==void 0&&(g.max===null?g.max=x.suggestedMax:g.max=Math.max(g.max,x.suggestedMax)),J!==oe&&g.min>=g.max&&(J?g.max=g.min+1:g.min=g.max-1),g.min===g.max&&(g.max++,x.beginAtZero||g.min--)},getTickLimit:function(){var g=this,C=g.options.ticks,x=C.stepSize,N=C.maxTicksLimit,B;return x?B=Math.ceil(g.max/x)-Math.floor(g.min/x)+1:(B=g._computeTickLimit(),N=N||11),N&&(B=Math.min(N,B)),B},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:yf,buildTicks:function(){var g=this,C=g.options,x=C.ticks,N=g.getTickLimit();N=Math.max(2,N);var B={maxTicks:N,min:x.min,max:x.max,precision:x.precision,stepSize:He.valueOrDefault(x.fixedStepSize,x.stepSize)},J=g.ticks=So(B,g);g.handleDirectionalChanges(),g.max=He.max(J),g.min=He.min(J),x.reverse?(J.reverse(),g.start=g.max,g.end=g.min):(g.start=g.min,g.end=g.max)},convertTicksToLabels:function(){var g=this;g.ticksAsNumbers=g.ticks.slice(),g.zeroLineIndex=g.ticks.indexOf(0),_s.prototype.convertTicksToLabels.call(g)},_configure:function(){var g=this,C=g.getTicks(),x=g.min,N=g.max,B;_s.prototype._configure.call(g),g.options.offset&&C.length&&(B=(N-x)/Math.max(C.length-1,1)/2,x-=B,N+=B),g._startValue=x,g._endValue=N,g._valueRange=N-x}}),fa={position:"left",ticks:{callback:Ts.formatters.linear}},Ko=0,Co=1;function vl(g,C,x){var N=[x.type,C===void 0&&x.stack===void 0?x.index:"",x.stack].join(".");return g[N]===void 0&&(g[N]={pos:[],neg:[]}),g[N]}function wf(g,C,x,N){var B=g.options,J=B.stacked,oe=vl(C,J,x),ye=oe.pos,fe=oe.neg,Ie=N.length,Fe,je;for(Fe=0;Fe<Ie;++Fe)je=g._parseValue(N[Fe]),!(isNaN(je.min)||isNaN(je.max)||x.data[Fe].hidden)&&(ye[Fe]=ye[Fe]||0,fe[Fe]=fe[Fe]||0,B.relativePoints?ye[Fe]=100:je.min<0||je.max<0?fe[Fe]+=je.min:ye[Fe]+=je.max)}function ks(g,C,x){var N=x.length,B,J;for(B=0;B<N;++B)J=g._parseValue(x[B]),!(isNaN(J.min)||isNaN(J.max)||C.data[B].hidden)&&(g.min=Math.min(g.min,J.min),g.max=Math.max(g.max,J.max))}var bl=gl.extend({determineDataLimits:function(){var g=this,C=g.options,x=g.chart,N=x.data.datasets,B=g._getMatchingVisibleMetas(),J=C.stacked,oe={},ye=B.length,fe,Ie,Fe,je;if(g.min=Number.POSITIVE_INFINITY,g.max=Number.NEGATIVE_INFINITY,J===void 0)for(fe=0;!J&&fe<ye;++fe)Ie=B[fe],J=Ie.stack!==void 0;for(fe=0;fe<ye;++fe)Ie=B[fe],Fe=N[Ie.index].data,J?wf(g,oe,Ie,Fe):ks(g,Ie,Fe);He.each(oe,function(ut){je=ut.pos.concat(ut.neg),g.min=Math.min(g.min,He.min(je)),g.max=Math.max(g.max,He.max(je))}),g.min=He.isFinite(g.min)&&!isNaN(g.min)?g.min:Ko,g.max=He.isFinite(g.max)&&!isNaN(g.max)?g.max:Co,g.handleTickRangeOptions()},_computeTickLimit:function(){var g=this,C;return g.isHorizontal()?Math.ceil(g.width/40):(C=He.options._parseFont(g.options.ticks),Math.ceil(g.height/C.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(g,C){return this._getScaleLabel(this.chart.data.datasets[C].data[g])},getPixelForValue:function(g){var C=this;return C.getPixelForDecimal((+C.getRightValue(g)-C._startValue)/C._valueRange)},getValueForPixel:function(g){return this._startValue+this.getDecimalForPixel(g)*this._valueRange},getPixelForTick:function(g){var C=this.ticksAsNumbers;return g<0||g>C.length-1?null:this.getPixelForValue(C[g])}}),Yu=fa;bl._defaults=Yu;var Gu=He.valueOrDefault,Ja=He.math.log10;function jl(g,C){var x=[],N=Gu(g.min,Math.pow(10,Math.floor(Ja(C.min)))),B=Math.floor(Ja(C.max)),J=Math.ceil(C.max/Math.pow(10,B)),oe,ye;N===0?(oe=Math.floor(Ja(C.minNotZero)),ye=Math.floor(C.minNotZero/Math.pow(10,oe)),x.push(N),N=ye*Math.pow(10,oe)):(oe=Math.floor(Ja(N)),ye=Math.floor(N/Math.pow(10,oe)));var fe=oe<0?Math.pow(10,Math.abs(oe)):1;do x.push(N),++ye,ye===10&&(ye=1,++oe,fe=oe>=0?1:fe),N=Math.round(ye*Math.pow(10,oe)*fe)/fe;while(oe<B||oe===B&&ye<J);var Ie=Gu(g.max,N);return x.push(Ie),x}var Ku={position:"left",ticks:{callback:Ts.formatters.logarithmic}};function Bl(g,C){return He.isFinite(g)&&g>=0?g:C}var As=_s.extend({determineDataLimits:function(){var g=this,C=g.options,x=g.chart,N=x.data.datasets,B=g.isHorizontal();function J(Gt){return B?Gt.xAxisID===g.id:Gt.yAxisID===g.id}var oe,ye,fe,Ie,Fe,je;g.min=Number.POSITIVE_INFINITY,g.max=Number.NEGATIVE_INFINITY,g.minNotZero=Number.POSITIVE_INFINITY;var ut=C.stacked;if(ut===void 0){for(oe=0;oe<N.length;oe++)if(ye=x.getDatasetMeta(oe),x.isDatasetVisible(oe)&&J(ye)&&ye.stack!==void 0){ut=!0;break}}if(C.stacked||ut){var Pt={};for(oe=0;oe<N.length;oe++){ye=x.getDatasetMeta(oe);var Ot=[ye.type,C.stacked===void 0&&ye.stack===void 0?oe:"",ye.stack].join(".");if(x.isDatasetVisible(oe)&&J(ye))for(Pt[Ot]===void 0&&(Pt[Ot]=[]),Ie=N[oe].data,Fe=0,je=Ie.length;Fe<je;Fe++){var Lt=Pt[Ot];fe=g._parseValue(Ie[Fe]),!(isNaN(fe.min)||isNaN(fe.max)||ye.data[Fe].hidden||fe.min<0||fe.max<0)&&(Lt[Fe]=Lt[Fe]||0,Lt[Fe]+=fe.max)}}He.each(Pt,function(Gt){if(Gt.length>0){var Cn=He.min(Gt),ii=He.max(Gt);g.min=Math.min(g.min,Cn),g.max=Math.max(g.max,ii)}})}else for(oe=0;oe<N.length;oe++)if(ye=x.getDatasetMeta(oe),x.isDatasetVisible(oe)&&J(ye))for(Ie=N[oe].data,Fe=0,je=Ie.length;Fe<je;Fe++)fe=g._parseValue(Ie[Fe]),!(isNaN(fe.min)||isNaN(fe.max)||ye.data[Fe].hidden||fe.min<0||fe.max<0)&&(g.min=Math.min(fe.min,g.min),g.max=Math.max(fe.max,g.max),fe.min!==0&&(g.minNotZero=Math.min(fe.min,g.minNotZero)));g.min=He.isFinite(g.min)?g.min:null,g.max=He.isFinite(g.max)?g.max:null,g.minNotZero=He.isFinite(g.minNotZero)?g.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var g=this,C=g.options.ticks,x=1,N=10;g.min=Bl(C.min,g.min),g.max=Bl(C.max,g.max),g.min===g.max&&(g.min!==0&&g.min!==null?(g.min=Math.pow(10,Math.floor(Ja(g.min))-1),g.max=Math.pow(10,Math.floor(Ja(g.max))+1)):(g.min=x,g.max=N)),g.min===null&&(g.min=Math.pow(10,Math.floor(Ja(g.max))-1)),g.max===null&&(g.max=g.min!==0?Math.pow(10,Math.floor(Ja(g.min))+1):N),g.minNotZero===null&&(g.min>0?g.minNotZero=g.min:g.max<1?g.minNotZero=Math.pow(10,Math.floor(Ja(g.max))):g.minNotZero=x)},buildTicks:function(){var g=this,C=g.options.ticks,x=!g.isHorizontal(),N={min:Bl(C.min),max:Bl(C.max)},B=g.ticks=jl(N,g);g.max=He.max(B),g.min=He.min(B),C.reverse?(x=!x,g.start=g.max,g.end=g.min):(g.start=g.min,g.end=g.max),x&&B.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),_s.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(g,C){return this._getScaleLabel(this.chart.data.datasets[C].data[g])},getPixelForTick:function(g){var C=this.tickValues;return g<0||g>C.length-1?null:this.getPixelForValue(C[g])},_getFirstTickValue:function(g){var C=Math.floor(Ja(g)),x=Math.floor(g/Math.pow(10,C));return x*Math.pow(10,C)},_configure:function(){var g=this,C=g.min,x=0;_s.prototype._configure.call(g),C===0&&(C=g._getFirstTickValue(g.minNotZero),x=Gu(g.options.ticks.fontSize,it.global.defaultFontSize)/g._length),g._startValue=Ja(C),g._valueOffset=x,g._valueRange=(Ja(g.max)-Ja(C))/(1-x)},getPixelForValue:function(g){var C=this,x=0;return g=+C.getRightValue(g),g>C.min&&g>0&&(x=(Ja(g)-C._startValue)/C._valueRange+C._valueOffset),C.getPixelForDecimal(x)},getValueForPixel:function(g){var C=this,x=C.getDecimalForPixel(g);return x===0&&C.min===0?0:Math.pow(10,C._startValue+(x-C._valueOffset)*C._valueRange)}}),Tf=Ku;As._defaults=Tf;var Xo=He.valueOrDefault,Xu=He.valueAtIndexOrDefault,so=He.options.resolve,$d={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Ts.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(g){return g}}};function yl(g){var C=g.ticks;return C.display&&g.display?Xo(C.fontSize,it.global.defaultFontSize)+C.backdropPaddingY*2:0}function Ul(g,C,x){return He.isArray(x)?{w:He.longestText(g,g.font,x),h:x.length*C}:{w:g.measureText(x).width,h:C}}function bu(g,C,x,N,B){return g===N||g===B?{start:C-x/2,end:C+x/2}:g<N||g>B?{start:C-x,end:C}:{start:C,end:C+x}}function Nd(g){var C=He.options._parseFont(g.options.pointLabels),x={l:0,r:g.width,t:0,b:g.height-g.paddingTop},N={},B,J,oe;g.ctx.font=C.string,g._pointLabelSizes=[];var ye=g.chart.data.labels.length;for(B=0;B<ye;B++){oe=g.getPointPosition(B,g.drawingArea+5),J=Ul(g.ctx,C.lineHeight,g.pointLabels[B]),g._pointLabelSizes[B]=J;var fe=g.getIndexAngle(B),Ie=He.toDegrees(fe)%360,Fe=bu(Ie,oe.x,J.w,0,180),je=bu(Ie,oe.y,J.h,90,270);Fe.start<x.l&&(x.l=Fe.start,N.l=fe),Fe.end>x.r&&(x.r=Fe.end,N.r=fe),je.start<x.t&&(x.t=je.start,N.t=fe),je.end>x.b&&(x.b=je.end,N.b=fe)}g.setReductions(g.drawingArea,x,N)}function ql(g){return g===0||g===180?"center":g<180?"left":"right"}function le(g,C,x,N){var B=x.y+N/2,J,oe;if(He.isArray(C))for(J=0,oe=C.length;J<oe;++J)g.fillText(C[J],x.x,B),B+=N;else g.fillText(C,x.x,B)}function vn(g,C,x){g===90||g===270?x.y-=C.h/2:(g>270||g<90)&&(x.y-=C.h)}function ui(g){var C=g.ctx,x=g.options,N=x.pointLabels,B=yl(x),J=g.getDistanceFromCenterForValue(x.ticks.reverse?g.min:g.max),oe=He.options._parseFont(N);C.save(),C.font=oe.string,C.textBaseline="middle";for(var ye=g.chart.data.labels.length-1;ye>=0;ye--){var fe=ye===0?B/2:0,Ie=g.getPointPosition(ye,J+fe+5),Fe=Xu(N.fontColor,ye,it.global.defaultFontColor);C.fillStyle=Fe;var je=g.getIndexAngle(ye),ut=He.toDegrees(je);C.textAlign=ql(ut),vn(ut,g._pointLabelSizes[ye],Ie),le(C,g.pointLabels[ye],Ie,oe.lineHeight)}C.restore()}function js(g,C,x,N){var B=g.ctx,J=C.circular,oe=g.chart.data.labels.length,ye=Xu(C.color,N-1),fe=Xu(C.lineWidth,N-1),Ie;if(!(!J&&!oe||!ye||!fe)){if(B.save(),B.strokeStyle=ye,B.lineWidth=fe,B.setLineDash&&(B.setLineDash(C.borderDash||[]),B.lineDashOffset=C.borderDashOffset||0),B.beginPath(),J)B.arc(g.xCenter,g.yCenter,x,0,Math.PI*2);else{Ie=g.getPointPosition(0,x),B.moveTo(Ie.x,Ie.y);for(var Fe=1;Fe<oe;Fe++)Ie=g.getPointPosition(Fe,x),B.lineTo(Ie.x,Ie.y)}B.closePath(),B.stroke(),B.restore()}}function Fd(g){return He.isNumber(g)?g:0}var Wl=gl.extend({setDimensions:function(){var g=this;g.width=g.maxWidth,g.height=g.maxHeight,g.paddingTop=yl(g.options)/2,g.xCenter=Math.floor(g.width/2),g.yCenter=Math.floor((g.height-g.paddingTop)/2),g.drawingArea=Math.min(g.height-g.paddingTop,g.width)/2},determineDataLimits:function(){var g=this,C=g.chart,x=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY;He.each(C.data.datasets,function(B,J){if(C.isDatasetVisible(J)){var oe=C.getDatasetMeta(J);He.each(B.data,function(ye,fe){var Ie=+g.getRightValue(ye);isNaN(Ie)||oe.data[fe].hidden||(x=Math.min(Ie,x),N=Math.max(Ie,N))})}}),g.min=x===Number.POSITIVE_INFINITY?0:x,g.max=N===Number.NEGATIVE_INFINITY?0:N,g.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/yl(this.options))},convertTicksToLabels:function(){var g=this;gl.prototype.convertTicksToLabels.call(g),g.pointLabels=g.chart.data.labels.map(function(){var C=He.callback(g.options.pointLabels.callback,arguments,g);return C||C===0?C:""})},getLabelForIndex:function(g,C){return+this.getRightValue(this.chart.data.datasets[C].data[g])},fit:function(){var g=this,C=g.options;C.display&&C.pointLabels.display?Nd(g):g.setCenterPoint(0,0,0,0)},setReductions:function(g,C,x){var N=this,B=C.l/Math.sin(x.l),J=Math.max(C.r-N.width,0)/Math.sin(x.r),oe=-C.t/Math.cos(x.t),ye=-Math.max(C.b-(N.height-N.paddingTop),0)/Math.cos(x.b);B=Fd(B),J=Fd(J),oe=Fd(oe),ye=Fd(ye),N.drawingArea=Math.min(Math.floor(g-(B+J)/2),Math.floor(g-(oe+ye)/2)),N.setCenterPoint(B,J,oe,ye)},setCenterPoint:function(g,C,x,N){var B=this,J=B.width-C-B.drawingArea,oe=g+B.drawingArea,ye=x+B.drawingArea,fe=B.height-B.paddingTop-N-B.drawingArea;B.xCenter=Math.floor((oe+J)/2+B.left),B.yCenter=Math.floor((ye+fe)/2+B.top+B.paddingTop)},getIndexAngle:function(g){var C=this.chart,x=360/C.data.labels.length,N=C.options||{},B=N.startAngle||0,J=(g*x+B)%360;return(J<0?J+360:J)*Math.PI*2/360},getDistanceFromCenterForValue:function(g){var C=this;if(He.isNullOrUndef(g))return NaN;var x=C.drawingArea/(C.max-C.min);return C.options.ticks.reverse?(C.max-g)*x:(g-C.min)*x},getPointPosition:function(g,C){var x=this,N=x.getIndexAngle(g)-Math.PI/2;return{x:Math.cos(N)*C+x.xCenter,y:Math.sin(N)*C+x.yCenter}},getPointPositionForValue:function(g,C){return this.getPointPosition(g,this.getDistanceFromCenterForValue(C))},getBasePosition:function(g){var C=this,x=C.min,N=C.max;return C.getPointPositionForValue(g||0,C.beginAtZero?0:x<0&&N<0?N:x>0&&N>0?x:0)},_drawGrid:function(){var g=this,C=g.ctx,x=g.options,N=x.gridLines,B=x.angleLines,J=Xo(B.lineWidth,N.lineWidth),oe=Xo(B.color,N.color),ye,fe,Ie;if(x.pointLabels.display&&ui(g),N.display&&He.each(g.ticks,function(Fe,je){je!==0&&(fe=g.getDistanceFromCenterForValue(g.ticksAsNumbers[je]),js(g,N,fe,je))}),B.display&&J&&oe){for(C.save(),C.lineWidth=J,C.strokeStyle=oe,C.setLineDash&&(C.setLineDash(so([B.borderDash,N.borderDash,[]])),C.lineDashOffset=so([B.borderDashOffset,N.borderDashOffset,0])),ye=g.chart.data.labels.length-1;ye>=0;ye--)fe=g.getDistanceFromCenterForValue(x.ticks.reverse?g.min:g.max),Ie=g.getPointPosition(ye,fe),C.beginPath(),C.moveTo(g.xCenter,g.yCenter),C.lineTo(Ie.x,Ie.y),C.stroke();C.restore()}},_drawLabels:function(){var g=this,C=g.ctx,x=g.options,N=x.ticks;if(N.display){var B=g.getIndexAngle(0),J=He.options._parseFont(N),oe=Xo(N.fontColor,it.global.defaultFontColor),ye,fe;C.save(),C.font=J.string,C.translate(g.xCenter,g.yCenter),C.rotate(B),C.textAlign="center",C.textBaseline="middle",He.each(g.ticks,function(Ie,Fe){Fe===0&&!N.reverse||(ye=g.getDistanceFromCenterForValue(g.ticksAsNumbers[Fe]),N.showLabelBackdrop&&(fe=C.measureText(Ie).width,C.fillStyle=N.backdropColor,C.fillRect(-fe/2-N.backdropPaddingX,-ye-J.size/2-N.backdropPaddingY,fe+N.backdropPaddingX*2,J.size+N.backdropPaddingY*2)),C.fillStyle=oe,C.fillText(Ie,0,-ye))}),C.restore()}},_drawTitle:He.noop}),kf=$d;Wl._defaults=kf;var Qu=He._deprecated,Sf=He.options.resolve,Po=He.valueOrDefault,Vl=Number.MIN_SAFE_INTEGER||-9007199254740991,Ju=Number.MAX_SAFE_INTEGER||9007199254740991,Zu={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ps=Object.keys(Zu);function wl(g,C){return g-C}function Cf(g){var C={},x=[],N,B,J;for(N=0,B=g.length;N<B;++N)J=g[N],C[J]||(C[J]=!0,x.push(J));return x}function cc(g){return He.valueOrDefault(g.time.min,g.ticks.min)}function Ss(g){return He.valueOrDefault(g.time.max,g.ticks.max)}function yu(g,C,x,N){if(N==="linear"||!g.length)return[{time:C,pos:0},{time:x,pos:1}];var B=[],J=[C],oe,ye,fe,Ie,Fe;for(oe=0,ye=g.length;oe<ye;++oe)Ie=g[oe],Ie>C&&Ie<x&&J.push(Ie);for(J.push(x),oe=0,ye=J.length;oe<ye;++oe)Fe=J[oe+1],fe=J[oe-1],Ie=J[oe],(fe===void 0||Fe===void 0||Math.round((Fe+fe)/2)!==Ie)&&B.push({time:Ie,pos:oe/(ye-1)});return B}function wu(g,C,x){for(var N=0,B=g.length-1,J,oe,ye;N>=0&&N<=B;)if(J=N+B>>1,oe=g[J-1]||null,ye=g[J],oe)if(ye[C]<x)N=J+1;else if(oe[C]>x)B=J-1;else return{lo:oe,hi:ye};else return{lo:null,hi:ye};return{lo:ye,hi:null}}function Tl(g,C,x,N){var B=wu(g,C,x),J=B.lo?B.hi?B.lo:g[g.length-2]:g[0],oe=B.lo?B.hi?B.hi:g[g.length-1]:g[1],ye=oe[C]-J[C],fe=ye?(x-J[C])/ye:0,Ie=(oe[N]-J[N])*fe;return J[N]+Ie}function ed(g,C){var x=g._adapter,N=g.options.time,B=N.parser,J=B||N.format,oe=C;return typeof B=="function"&&(oe=B(oe)),He.isFinite(oe)||(oe=typeof J=="string"?x.parse(oe,J):x.parse(oe)),oe!==null?+oe:(!B&&typeof J=="function"&&(oe=J(C),He.isFinite(oe)||(oe=x.parse(oe))),oe)}function Lo(g,C){if(He.isNullOrUndef(C))return null;var x=g.options.time,N=ed(g,g.getRightValue(C));return N===null||x.round&&(N=+g._adapter.startOf(N,x.round)),N}function _c(g,C,x,N){var B=ps.length,J,oe,ye;for(J=ps.indexOf(g);J<B-1;++J)if(oe=Zu[ps[J]],ye=oe.steps?oe.steps:Ju,oe.common&&Math.ceil((x-C)/(ye*oe.size))<=N)return ps[J];return ps[B-1]}function Tu(g,C,x,N,B){var J,oe;for(J=ps.length-1;J>=ps.indexOf(x);J--)if(oe=ps[J],Zu[oe].common&&g._adapter.diff(B,N,oe)>=C-1)return oe;return ps[x?ps.indexOf(x):0]}function ku(g){for(var C=ps.indexOf(g)+1,x=ps.length;C<x;++C)if(Zu[ps[C]].common)return ps[C]}function Pf(g,C,x,N){var B=g._adapter,J=g.options,oe=J.time,ye=oe.unit||_c(oe.minUnit,C,x,N),fe=Sf([oe.stepSize,oe.unitStepSize,1]),Ie=ye==="week"?oe.isoWeekday:!1,Fe=C,je=[],ut;if(Ie&&(Fe=+B.startOf(Fe,"isoWeek",Ie)),Fe=+B.startOf(Fe,Ie?"day":ye),B.diff(x,C,ye)>1e5*fe)throw C+" and "+x+" are too far apart with stepSize of "+fe+" "+ye;for(ut=Fe;ut<x;ut=+B.add(ut,fe,ye))je.push(ut);return(ut===x||J.bounds==="ticks")&&je.push(ut),je}function zl(g,C,x,N,B){var J=0,oe=0,ye,fe;return B.offset&&C.length&&(ye=Tl(g,"time",C[0],"pos"),C.length===1?J=1-ye:J=(Tl(g,"time",C[1],"pos")-ye)/2,fe=Tl(g,"time",C[C.length-1],"pos"),C.length===1?oe=fe:oe=(fe-Tl(g,"time",C[C.length-2],"pos"))/2),{start:J,end:oe,factor:1/(J+1+oe)}}function td(g,C,x,N){var B=g._adapter,J=+B.startOf(C[0].value,N),oe=C[C.length-1].value,ye,fe;for(ye=J;ye<=oe;ye=+B.add(ye,1,N))fe=x[ye],fe>=0&&(C[fe].major=!0);return C}function Ld(g,C,x){var N=[],B={},J=C.length,oe,ye;for(oe=0;oe<J;++oe)ye=C[oe],B[ye]=oe,N.push({value:ye,major:!1});return J===0||!x?N:td(g,N,B,x)}var Ef={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},Js=_s.extend({initialize:function(){this.mergeTicksOptions(),_s.prototype.initialize.call(this)},update:function(){var g=this,C=g.options,x=C.time||(C.time={}),N=g._adapter=new yo._date(C.adapters.date);return Qu("time scale",x.format,"time.format","time.parser"),Qu("time scale",x.min,"time.min","ticks.min"),Qu("time scale",x.max,"time.max","ticks.max"),He.mergeIf(x.displayFormats,N.formats()),_s.prototype.update.apply(g,arguments)},getRightValue:function(g){return g&&g.t!==void 0&&(g=g.t),_s.prototype.getRightValue.call(this,g)},determineDataLimits:function(){var g=this,C=g.chart,x=g._adapter,N=g.options,B=N.time.unit||"day",J=Ju,oe=Vl,ye=[],fe=[],Ie=[],Fe,je,ut,Pt,Ot,Lt,Gt,Cn=g._getLabels();for(Fe=0,ut=Cn.length;Fe<ut;++Fe)Ie.push(Lo(g,Cn[Fe]));for(Fe=0,ut=(C.data.datasets||[]).length;Fe<ut;++Fe)if(C.isDatasetVisible(Fe))if(Ot=C.data.datasets[Fe].data,He.isObject(Ot[0]))for(fe[Fe]=[],je=0,Pt=Ot.length;je<Pt;++je)Lt=Lo(g,Ot[je]),ye.push(Lt),fe[Fe][je]=Lt;else fe[Fe]=Ie.slice(0),Gt||(ye=ye.concat(Ie),Gt=!0);else fe[Fe]=[];Ie.length&&(J=Math.min(J,Ie[0]),oe=Math.max(oe,Ie[Ie.length-1])),ye.length&&(ye=ut>1?Cf(ye).sort(wl):ye.sort(wl),J=Math.min(J,ye[0]),oe=Math.max(oe,ye[ye.length-1])),J=Lo(g,cc(N))||J,oe=Lo(g,Ss(N))||oe,J=J===Ju?+x.startOf(Date.now(),B):J,oe=oe===Vl?+x.endOf(Date.now(),B)+1:oe,g.min=Math.min(J,oe),g.max=Math.max(J+1,oe),g._table=[],g._timestamps={data:ye,datasets:fe,labels:Ie}},buildTicks:function(){var g=this,C=g.min,x=g.max,N=g.options,B=N.ticks,J=N.time,oe=g._timestamps,ye=[],fe=g.getLabelCapacity(C),Ie=B.source,Fe=N.distribution,je,ut,Pt;for(Ie==="data"||Ie==="auto"&&Fe==="series"?oe=oe.data:Ie==="labels"?oe=oe.labels:oe=Pf(g,C,x,fe),N.bounds==="ticks"&&oe.length&&(C=oe[0],x=oe[oe.length-1]),C=Lo(g,cc(N))||C,x=Lo(g,Ss(N))||x,je=0,ut=oe.length;je<ut;++je)Pt=oe[je],Pt>=C&&Pt<=x&&ye.push(Pt);return g.min=C,g.max=x,g._unit=J.unit||(B.autoSkip?_c(J.minUnit,g.min,g.max,fe):Tu(g,ye.length,J.minUnit,g.min,g.max)),g._majorUnit=!B.major.enabled||g._unit==="year"?void 0:ku(g._unit),g._table=yu(g._timestamps.data,C,x,Fe),g._offsets=zl(g._table,ye,C,x,N),B.reverse&&ye.reverse(),Ld(g,ye,g._majorUnit)},getLabelForIndex:function(g,C){var x=this,N=x._adapter,B=x.chart.data,J=x.options.time,oe=B.labels&&g<B.labels.length?B.labels[g]:"",ye=B.datasets[C].data[g];return He.isObject(ye)&&(oe=x.getRightValue(ye)),J.tooltipFormat?N.format(ed(x,oe),J.tooltipFormat):typeof oe=="string"?oe:N.format(ed(x,oe),J.displayFormats.datetime)},tickFormatFunction:function(g,C,x,N){var B=this,J=B._adapter,oe=B.options,ye=oe.time.displayFormats,fe=ye[B._unit],Ie=B._majorUnit,Fe=ye[Ie],je=x[C],ut=oe.ticks,Pt=Ie&&Fe&&je&&je.major,Ot=J.format(g,N||(Pt?Fe:fe)),Lt=Pt?ut.major:ut.minor,Gt=Sf([Lt.callback,Lt.userCallback,ut.callback,ut.userCallback]);return Gt?Gt(Ot,C,x):Ot},convertTicksToLabels:function(g){var C=[],x,N;for(x=0,N=g.length;x<N;++x)C.push(this.tickFormatFunction(g[x].value,x,g));return C},getPixelForOffset:function(g){var C=this,x=C._offsets,N=Tl(C._table,"time",g,"pos");return C.getPixelForDecimal((x.start+N)*x.factor)},getPixelForValue:function(g,C,x){var N=this,B=null;if(C!==void 0&&x!==void 0&&(B=N._timestamps.datasets[x][C]),B===null&&(B=Lo(N,g)),B!==null)return N.getPixelForOffset(B)},getPixelForTick:function(g){var C=this.getTicks();return g>=0&&g<C.length?this.getPixelForOffset(C[g].value):null},getValueForPixel:function(g){var C=this,x=C._offsets,N=C.getDecimalForPixel(g)/x.factor-x.end,B=Tl(C._table,"pos",N,"time");return C._adapter._create(B)},_getLabelSize:function(g){var C=this,x=C.options.ticks,N=C.ctx.measureText(g).width,B=He.toRadians(C.isHorizontal()?x.maxRotation:x.minRotation),J=Math.cos(B),oe=Math.sin(B),ye=Po(x.fontSize,it.global.defaultFontSize);return{w:N*J+ye*oe,h:N*oe+ye*J}},getLabelWidth:function(g){return this._getLabelSize(g).w},getLabelCapacity:function(g){var C=this,x=C.options.time,N=x.displayFormats,B=N[x.unit]||N.millisecond,J=C.tickFormatFunction(g,0,Ld(C,[g],C._majorUnit),B),oe=C._getLabelSize(J),ye=Math.floor(C.isHorizontal()?C.width/oe.w:C.height/oe.h);return C.options.offset&&ye--,ye>0?ye:1}}),Hd=Ef;Js._defaults=Hd;var nd={category:ml,linear:bl,logarithmic:As,radialLinear:Wl,time:Js},If={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};yo._date.override(typeof n=="function"?{_id:"moment",formats:function(){return If},parse:function(g,C){return typeof g=="string"&&typeof C=="string"?g=n(g,C):g instanceof n||(g=n(g)),g.isValid()?g.valueOf():null},format:function(g,C){return n(g).format(C)},add:function(g,C,x){return n(g).add(C,x).valueOf()},diff:function(g,C,x){return n(g).diff(n(C),x)},startOf:function(g,C,x){return g=n(g),C==="isoWeek"?g.isoWeekday(x).valueOf():g.startOf(C).valueOf()},endOf:function(g,C){return n(g).endOf(C).valueOf()},_create:function(g){return n(g)}}:{}),it._set("global",{plugins:{filler:{propagate:!0}}});var jd={dataset:function(g){var C=g.fill,x=g.chart,N=x.getDatasetMeta(C),B=N&&x.isDatasetVisible(C),J=B&&N.dataset._children||[],oe=J.length||0;return oe?function(ye,fe){return fe<oe&&J[fe]._view||null}:null},boundary:function(g){var C=g.boundary,x=C?C.x:null,N=C?C.y:null;return He.isArray(C)?function(B,J){return C[J]}:function(B){return{x:x===null?B.x:x,y:N===null?B.y:N}}}};function Af(g,C,x){var N=g._model||{},B=N.fill,J;if(B===void 0&&(B=!!N.backgroundColor),B===!1||B===null)return!1;if(B===!0)return"origin";if(J=parseFloat(B,10),isFinite(J)&&Math.floor(J)===J)return(B[0]==="-"||B[0]==="+")&&(J=C+J),J===C||J<0||J>=x?!1:J;switch(B){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return B;default:return!1}}function pc(g){var C=g.el._model||{},x=g.el._scale||{},N=g.fill,B=null,J;if(isFinite(N))return null;if(N==="start"?B=C.scaleBottom===void 0?x.bottom:C.scaleBottom:N==="end"?B=C.scaleTop===void 0?x.top:C.scaleTop:C.scaleZero!==void 0?B=C.scaleZero:x.getBasePixel&&(B=x.getBasePixel()),B!=null){if(B.x!==void 0&&B.y!==void 0)return B;if(He.isFinite(B))return J=x.isHorizontal(),{x:J?B:null,y:J?null:B}}return null}function id(g){var C=g.el._scale,x=C.options,N=C.chart.data.labels.length,B=g.fill,J=[],oe,ye,fe,Ie,Fe;if(!N)return null;for(oe=x.ticks.reverse?C.max:C.min,ye=x.ticks.reverse?C.min:C.max,fe=C.getPointPositionForValue(0,oe),Ie=0;Ie<N;++Ie)Fe=B==="start"||B==="end"?C.getPointPositionForValue(Ie,B==="start"?oe:ye):C.getBasePosition(Ie),x.gridLines.circular&&(Fe.cx=fe.x,Fe.cy=fe.y,Fe.angle=C.getIndexAngle(Ie)-Math.PI/2),J.push(Fe);return J}function Df(g){var C=g.el._scale||{};return C.getPointPositionForValue?id(g):pc(g)}function m_(g,C,x){var N=g[C],B=N.fill,J=[C],oe;if(!x)return B;for(;B!==!1&&J.indexOf(B)===-1;){if(!isFinite(B))return B;if(oe=g[B],!oe)return!1;if(oe.visible)return B;J.push(B),B=oe.fill}return!1}function Su(g){var C=g.fill,x="dataset";return C===!1?null:(isFinite(C)||(x="boundary"),jd[x](g))}function Qo(g){return g&&!g.skip}function rd(g,C,x,N,B){var J,oe,ye,fe;if(!(!N||!B)){for(g.moveTo(C[0].x,C[0].y),J=1;J<N;++J)He.canvas.lineTo(g,C[J-1],C[J]);if(x[0].angle!==void 0){for(oe=x[0].cx,ye=x[0].cy,fe=Math.sqrt(Math.pow(x[0].x-oe,2)+Math.pow(x[0].y-ye,2)),J=B-1;J>0;--J)g.arc(oe,ye,fe,x[J].angle,x[J-1].angle,!0);return}for(g.lineTo(x[B-1].x,x[B-1].y),J=B-1;J>0;--J)He.canvas.lineTo(g,x[J],x[J-1],!0)}}function g_(g,C,x,N,B,J){var oe=C.length,ye=N.spanGaps,fe=[],Ie=[],Fe=0,je=0,ut,Pt,Ot,Lt,Gt,Cn,ii,si;for(g.beginPath(),ut=0,Pt=oe;ut<Pt;++ut)Ot=ut%oe,Lt=C[Ot]._view,Gt=x(Lt,Ot,N),Cn=Qo(Lt),ii=Qo(Gt),J&&si===void 0&&Cn&&(si=ut+1,Pt=oe+si),Cn&&ii?(Fe=fe.push(Lt),je=Ie.push(Gt)):Fe&&je&&(ye?(Cn&&fe.push(Lt),ii&&Ie.push(Gt)):(rd(g,fe,Ie,Fe,je),Fe=je=0,fe=[],Ie=[]));rd(g,fe,Ie,Fe,je),g.closePath(),g.fillStyle=B,g.fill()}var oo={id:"filler",afterDatasetsUpdate:function(g,C){var x=(g.data.datasets||[]).length,N=C.propagate,B=[],J,oe,ye,fe;for(oe=0;oe<x;++oe)J=g.getDatasetMeta(oe),ye=J.dataset,fe=null,ye&&ye._model&&ye instanceof Ki.Line&&(fe={visible:g.isDatasetVisible(oe),fill:Af(ye,oe,x),chart:g,el:ye}),J.$filler=fe,B.push(fe);for(oe=0;oe<x;++oe)fe=B[oe],fe&&(fe.fill=m_(B,oe,N),fe.boundary=Df(fe),fe.mapper=Su(fe))},beforeDatasetsDraw:function(g){var C=g._getSortedVisibleDatasetMetas(),x=g.ctx,N,B,J,oe,ye,fe,Ie;for(B=C.length-1;B>=0;--B)N=C[B].$filler,!(!N||!N.visible)&&(J=N.el,oe=J._view,ye=J._children||[],fe=N.mapper,Ie=oe.backgroundColor||it.global.defaultColor,fe&&Ie&&ye.length&&(He.canvas.clipArea(x,g.chartArea),g_(x,ye,fe,oe,Ie,J._loop),He.canvas.unclipArea(x)))}},hc=He.rtl.getRtlAdapter,lo=He.noop,Ho=He.valueOrDefault;it._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(g,C){var x=C.datasetIndex,N=this.chart,B=N.getDatasetMeta(x);B.hidden=B.hidden===null?!N.data.datasets[x].hidden:null,N.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(g){var C=g.data.datasets,x=g.options.legend||{},N=x.labels&&x.labels.usePointStyle;return g._getSortedDatasetMetas().map(function(B){var J=B.controller.getStyle(N?0:void 0);return{text:C[B.index].label,fillStyle:J.backgroundColor,hidden:!g.isDatasetVisible(B.index),lineCap:J.borderCapStyle,lineDash:J.borderDash,lineDashOffset:J.borderDashOffset,lineJoin:J.borderJoinStyle,lineWidth:J.borderWidth,strokeStyle:J.borderColor,pointStyle:J.pointStyle,rotation:J.rotation,datasetIndex:B.index}},this)}}},legendCallback:function(g){var C=document.createElement("ul"),x=g.data.datasets,N,B,J,oe;for(C.setAttribute("class",g.id+"-legend"),N=0,B=x.length;N<B;N++)J=C.appendChild(document.createElement("li")),oe=J.appendChild(document.createElement("span")),oe.style.backgroundColor=x[N].backgroundColor,x[N].label&&J.appendChild(document.createTextNode(x[N].label));return C.outerHTML}});function Yl(g,C){return g.usePointStyle&&g.boxWidth>C?C:g.boxWidth}var Of=dt.extend({initialize:function(g){var C=this;He.extend(C,g),C.legendHitBoxes=[],C._hoveredItem=null,C.doughnutMode=!1},beforeUpdate:lo,update:function(g,C,x){var N=this;return N.beforeUpdate(),N.maxWidth=g,N.maxHeight=C,N.margins=x,N.beforeSetDimensions(),N.setDimensions(),N.afterSetDimensions(),N.beforeBuildLabels(),N.buildLabels(),N.afterBuildLabels(),N.beforeFit(),N.fit(),N.afterFit(),N.afterUpdate(),N.minSize},afterUpdate:lo,beforeSetDimensions:lo,setDimensions:function(){var g=this;g.isHorizontal()?(g.width=g.maxWidth,g.left=0,g.right=g.width):(g.height=g.maxHeight,g.top=0,g.bottom=g.height),g.paddingLeft=0,g.paddingTop=0,g.paddingRight=0,g.paddingBottom=0,g.minSize={width:0,height:0}},afterSetDimensions:lo,beforeBuildLabels:lo,buildLabels:function(){var g=this,C=g.options.labels||{},x=He.callback(C.generateLabels,[g.chart],g)||[];C.filter&&(x=x.filter(function(N){return C.filter(N,g.chart.data)})),g.options.reverse&&x.reverse(),g.legendItems=x},afterBuildLabels:lo,beforeFit:lo,fit:function(){var g=this,C=g.options,x=C.labels,N=C.display,B=g.ctx,J=He.options._parseFont(x),oe=J.size,ye=g.legendHitBoxes=[],fe=g.minSize,Ie=g.isHorizontal();if(Ie?(fe.width=g.maxWidth,fe.height=N?10:0):(fe.width=N?10:0,fe.height=g.maxHeight),!N){g.width=fe.width=g.height=fe.height=0;return}if(B.font=J.string,Ie){var Fe=g.lineWidths=[0],je=0;B.textAlign="left",B.textBaseline="middle",He.each(g.legendItems,function(ii,si){var Li=Yl(x,oe),Qi=Li+oe/2+B.measureText(ii.text).width;(si===0||Fe[Fe.length-1]+Qi+2*x.padding>fe.width)&&(je+=oe+x.padding,Fe[Fe.length-(si>0?0:1)]=0),ye[si]={left:0,top:0,width:Qi,height:oe},Fe[Fe.length-1]+=Qi+x.padding}),fe.height+=je}else{var ut=x.padding,Pt=g.columnWidths=[],Ot=g.columnHeights=[],Lt=x.padding,Gt=0,Cn=0;He.each(g.legendItems,function(ii,si){var Li=Yl(x,oe),Qi=Li+oe/2+B.measureText(ii.text).width;si>0&&Cn+oe+2*ut>fe.height&&(Lt+=Gt+x.padding,Pt.push(Gt),Ot.push(Cn),Gt=0,Cn=0),Gt=Math.max(Gt,Qi),Cn+=oe+ut,ye[si]={left:0,top:0,width:Qi,height:oe}}),Lt+=Gt,Pt.push(Gt),Ot.push(Cn),fe.width+=Lt}g.width=fe.width,g.height=fe.height},afterFit:lo,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var g=this,C=g.options,x=C.labels,N=it.global,B=N.defaultColor,J=N.elements.line,oe=g.height,ye=g.columnHeights,fe=g.width,Ie=g.lineWidths;if(C.display){var Fe=hc(C.rtl,g.left,g.minSize.width),je=g.ctx,ut=Ho(x.fontColor,N.defaultFontColor),Pt=He.options._parseFont(x),Ot=Pt.size,Lt;je.textAlign=Fe.textAlign("left"),je.textBaseline="middle",je.lineWidth=.5,je.strokeStyle=ut,je.fillStyle=ut,je.font=Pt.string;var Gt=Yl(x,Ot),Cn=g.legendHitBoxes,ii=function(Mr,Zr,ba){if(!(isNaN(Gt)||Gt<=0)){je.save();var hs=Ho(ba.lineWidth,J.borderWidth);if(je.fillStyle=Ho(ba.fillStyle,B),je.lineCap=Ho(ba.lineCap,J.borderCapStyle),je.lineDashOffset=Ho(ba.lineDashOffset,J.borderDashOffset),je.lineJoin=Ho(ba.lineJoin,J.borderJoinStyle),je.lineWidth=hs,je.strokeStyle=Ho(ba.strokeStyle,B),je.setLineDash&&je.setLineDash(Ho(ba.lineDash,J.borderDash)),x&&x.usePointStyle){var ms=Gt*Math.SQRT2/2,Da=Fe.xPlus(Mr,Gt/2),gs=Zr+Ot/2;He.canvas.drawPoint(je,ba.pointStyle,ms,Da,gs,ba.rotation)}else je.fillRect(Fe.leftForLtr(Mr,Gt),Zr,Gt,Ot),hs!==0&&je.strokeRect(Fe.leftForLtr(Mr,Gt),Zr,Gt,Ot);je.restore()}},si=function(Mr,Zr,ba,hs){var ms=Ot/2,Da=Fe.xPlus(Mr,Gt+ms),gs=Zr+ms;je.fillText(ba.text,Da,gs),ba.hidden&&(je.beginPath(),je.lineWidth=2,je.moveTo(Da,gs),je.lineTo(Fe.xPlus(Da,hs),gs),je.stroke())},Li=function(Mr,Zr){switch(C.align){case"start":return x.padding;case"end":return Mr-Zr;default:return(Mr-Zr+x.padding)/2}},Qi=g.isHorizontal();Qi?Lt={x:g.left+Li(fe,Ie[0]),y:g.top+x.padding,line:0}:Lt={x:g.left+x.padding,y:g.top+Li(oe,ye[0]),line:0},He.rtl.overrideTextDirection(g.ctx,C.textDirection);var Jr=Ot+x.padding;He.each(g.legendItems,function(Mr,Zr){var ba=je.measureText(Mr.text).width,hs=Gt+Ot/2+ba,ms=Lt.x,Da=Lt.y;Fe.setWidth(g.minSize.width),Qi?Zr>0&&ms+hs+x.padding>g.left+g.minSize.width&&(Da=Lt.y+=Jr,Lt.line++,ms=Lt.x=g.left+Li(fe,Ie[Lt.line])):Zr>0&&Da+Jr>g.top+g.minSize.height&&(ms=Lt.x=ms+g.columnWidths[Lt.line]+x.padding,Lt.line++,Da=Lt.y=g.top+Li(oe,ye[Lt.line]));var gs=Fe.x(ms);ii(gs,Da,Mr),Cn[Zr].left=Fe.leftForLtr(gs,Cn[Zr].width),Cn[Zr].top=Da,si(gs,Da,Mr,ba),Qi?Lt.x+=hs+x.padding:Lt.y+=Jr}),He.rtl.restoreTextDirection(g.ctx,C.textDirection)}},_getLegendItemAt:function(g,C){var x=this,N,B,J;if(g>=x.left&&g<=x.right&&C>=x.top&&C<=x.bottom){for(J=x.legendHitBoxes,N=0;N<J.length;++N)if(B=J[N],g>=B.left&&g<=B.left+B.width&&C>=B.top&&C<=B.top+B.height)return x.legendItems[N]}return null},handleEvent:function(g){var C=this,x=C.options,N=g.type==="mouseup"?"click":g.type,B;if(N==="mousemove"){if(!x.onHover&&!x.onLeave)return}else if(N==="click"){if(!x.onClick)return}else return;B=C._getLegendItemAt(g.x,g.y),N==="click"?B&&x.onClick&&x.onClick.call(C,g.native,B):(x.onLeave&&B!==C._hoveredItem&&(C._hoveredItem&&x.onLeave.call(C,g.native,C._hoveredItem),C._hoveredItem=B),x.onHover&&B&&x.onHover.call(C,g.native,B))}});function Cu(g,C){var x=new Of({ctx:g.ctx,options:C,chart:g});Ze.configure(g,x,C),Ze.addBox(g,x),g.legend=x}var Jo={id:"legend",_element:Of,beforeInit:function(g){var C=g.options.legend;C&&Cu(g,C)},beforeUpdate:function(g){var C=g.options.legend,x=g.legend;C?(He.mergeIf(C,it.global.legend),x?(Ze.configure(g,x,C),x.options=C):Cu(g,C)):x&&(Ze.removeBox(g,x),delete g.legend)},afterEvent:function(g,C){var x=g.legend;x&&x.handleEvent(C)}},uo=He.noop;it._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Gl=dt.extend({initialize:function(g){var C=this;He.extend(C,g),C.legendHitBoxes=[]},beforeUpdate:uo,update:function(g,C,x){var N=this;return N.beforeUpdate(),N.maxWidth=g,N.maxHeight=C,N.margins=x,N.beforeSetDimensions(),N.setDimensions(),N.afterSetDimensions(),N.beforeBuildLabels(),N.buildLabels(),N.afterBuildLabels(),N.beforeFit(),N.fit(),N.afterFit(),N.afterUpdate(),N.minSize},afterUpdate:uo,beforeSetDimensions:uo,setDimensions:function(){var g=this;g.isHorizontal()?(g.width=g.maxWidth,g.left=0,g.right=g.width):(g.height=g.maxHeight,g.top=0,g.bottom=g.height),g.paddingLeft=0,g.paddingTop=0,g.paddingRight=0,g.paddingBottom=0,g.minSize={width:0,height:0}},afterSetDimensions:uo,beforeBuildLabels:uo,buildLabels:uo,afterBuildLabels:uo,beforeFit:uo,fit:function(){var g=this,C=g.options,x=g.minSize={},N=g.isHorizontal(),B,J;if(!C.display){g.width=x.width=g.height=x.height=0;return}B=He.isArray(C.text)?C.text.length:1,J=B*He.options._parseFont(C).lineHeight+C.padding*2,g.width=x.width=N?g.maxWidth:J,g.height=x.height=N?J:g.maxHeight},afterFit:uo,isHorizontal:function(){var g=this.options.position;return g==="top"||g==="bottom"},draw:function(){var g=this,C=g.ctx,x=g.options;if(x.display){var N=He.options._parseFont(x),B=N.lineHeight,J=B/2+x.padding,oe=0,ye=g.top,fe=g.left,Ie=g.bottom,Fe=g.right,je,ut,Pt;C.fillStyle=He.valueOrDefault(x.fontColor,it.global.defaultFontColor),C.font=N.string,g.isHorizontal()?(ut=fe+(Fe-fe)/2,Pt=ye+J,je=Fe-fe):(ut=x.position==="left"?fe+J:Fe-J,Pt=ye+(Ie-ye)/2,je=Ie-ye,oe=Math.PI*(x.position==="left"?-.5:.5)),C.save(),C.translate(ut,Pt),C.rotate(oe),C.textAlign="center",C.textBaseline="middle";var Ot=x.text;if(He.isArray(Ot))for(var Lt=0,Gt=0;Gt<Ot.length;++Gt)C.fillText(Ot[Gt],0,Lt,je),Lt+=B;else C.fillText(Ot,0,0,je);C.restore()}}});function Kl(g,C){var x=new Gl({ctx:g.ctx,options:C,chart:g});Ze.configure(g,x,C),Ze.addBox(g,x),g.titleBlock=x}var Xl={id:"title",_element:Gl,beforeInit:function(g){var C=g.options.title;C&&Kl(g,C)},beforeUpdate:function(g){var C=g.options.title,x=g.titleBlock;C?(He.mergeIf(C,it.global.title),x?(Ze.configure(g,x,C),x.options=C):Kl(g,C)):x&&(Ze.removeBox(g,x),delete g.titleBlock)}},fo={},Mf=oo,Zs=Jo,xf=Xl;fo.filler=Mf,fo.legend=Zs,fo.title=xf,Oi.helpers=He,Fs(),Oi._adapters=yo,Oi.Animation=Ln,Oi.animationService=xn,Oi.controllers=ra,Oi.DatasetController=Et,Oi.defaults=it,Oi.Element=dt,Oi.elements=Ki,Oi.Interaction=wi,Oi.layouts=Ze,Oi.platform=xe,Oi.plugins=Ue,Oi.Scale=_s,Oi.scaleService=pe,Oi.Ticks=Ts,Oi.Tooltip=ka,Oi.helpers.each(nd,function(g,C){Oi.scaleService.registerScaleType(C,g,g._defaults)});for(var Pu in fo)fo.hasOwnProperty(Pu)&&Oi.plugins.register(fo[Pu]);Oi.platform.initialize();var Rf=Oi;return typeof window<"u"&&(window.Chart=Oi),Oi.Chart=Oi,Oi.Legend=fo.legend._element,Oi.Title=fo.title._element,Oi.pluginService=Oi.plugins,Oi.PluginBase=Oi.Element.extend({}),Oi.canvasHelpers=Oi.helpers.canvas,Oi.layoutService=Oi.layouts,Oi.LinearScaleBase=gl,Oi.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(g){Oi[g]=function(C,x){return new Oi(C,Oi.helpers.merge(x||{},{type:g.charAt(0).toLowerCase()+g.slice(1)}))}}),Rf})})($5);var OEe=$5.exports;const o0=cl(OEe);function GO(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E;return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("h3"),r.textContent="Income by Month",a=K(),s=P("a"),o=P("span"),d=K(),c=P("div"),v=K(),T=P("div"),b=P("canvas"),w(r,"class","card-title mb-0 float-left"),w(o,"class","fa fa-refresh refresh-btn__icon"),wt(o,"refresh-btn__icon-animation",e[1]),s.hidden=l=!e[0].widgets.incomeChart.active,w(s,"title","Sync Now"),w(s,"class","card-title mb-0 btn refresh-btn js-income-chart__refresh-btn float-right"),w(c,"class","clearfix"),w(i,"class","card-header"),w(b,"class","js-income-chart__chart"),w(T,"class","card-body aligned-panels__panel js-income-chart svelte-bte5ky"),wt(T,"inactive",!e[0].widgets.incomeChart.active),w(n,"class","card flex-align mb-3"),w(t,"class","col-sm-12 col-sm-6 col-lg-6 col-xl-3 d-flex flex-column")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,o),m(i,d),m(i,c),m(n,v),m(n,T),m(T,b),e[10](b),A||(E=ct(s,"click",e[3]),A=!0)},p(y,I){I&2&&wt(o,"refresh-btn__icon-animation",y[1]),I&1&&l!==(l=!y[0].widgets.incomeChart.active)&&(s.hidden=l),I&1&&wt(T,"inactive",!y[0].widgets.incomeChart.active)},d(y){y&&_e(t),e[10](null),A=!1,E()}}}function MEe(e){let t,n=e[0]&&GO(e);return{c(){n&&n.c(),t=On()},m(i,r){n&&n.m(i,r),ce(i,t,r)},p(i,[r]){i[0]?n?n.p(i,r):(n=GO(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:ot,o:ot,d(i){n&&n.d(i),i&&_e(t)}}}function xEe(e,t,n){let i,{dashboard:r}=t,{currentCompanyId:a}=t,{syncCompany:s}=t,{refreshDashboard:o}=t,l,d,c,v;const T=Ys.debounce(async()=>{n(1,l=!0),s&&o&&i&&(await s(i.forceSyncPath),await o()),n(1,l=!1)},400);function b(E,y){const I=o0.helpers.color,D={labels:E.months,datasets:[{backgroundColor:I("#452161").alpha(.5).rgbString(),borderColor:"rgba(255,255,255,0.8)",hoverBackgroundColor:"rgba(26,188,156,1)",hoverBorderColor:"rgba(255,255,255,0.8)",borderWidth:1,data:E.values}]};return new o0(y,{type:"bar",data:D,options:{maintainAspectRatio:!1,responsive:!1,aspectRatio:1,scales:{yAxes:[{ticks:{beginAtZero:E.values.some(function(O){return O<0})}}]},legend:!1,tooltips:{mode:"single",callbacks:{label(O,M){const F=O.index,$=Er.formatMoney(M.datasets[0].data[F],"$",0);return`${M.labels[F]} ${$}`},title:()=>{}}}}})}oa(async E=>{d&&n(8,c=d.getContext("2d"))});function A(E){Oe[E?"unshift":"push"](()=>{d=E,n(2,d)})}return e.$$set=E=>{"dashboard"in E&&n(4,r=E.dashboard),"currentCompanyId"in E&&n(5,a=E.currentCompanyId),"syncCompany"in E&&n(6,s=E.syncCompany),"refreshDashboard"in E&&n(7,o=E.refreshDashboard)},e.$$.update=()=>{e.$$.dirty&48&&n(0,i=r.companies.find(E=>E.id===a)),e.$$.dirty&769&&i&&c&&(v&&v.destroy(),n(9,v=b(i.widgets.incomeChart,c)))},[i,l,d,T,r,a,s,o,c,v,A]}class REe extends Qt{constructor(t){super(),Jt(this,t,xEe,MEe,Kt,{dashboard:4,currentCompanyId:5,syncCompany:6,refreshDashboard:7})}}function KO(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E;return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("h3"),r.textContent="Business Expenses by Destination",a=K(),s=P("a"),o=P("span"),d=K(),c=P("div"),v=K(),T=P("div"),b=P("canvas"),w(r,"class","card-title mb-0 float-left"),w(o,"class","fa fa-refresh refresh-btn__icon"),wt(o,"refresh-btn__icon-animation",e[1]),s.hidden=l=!e[0].widgets.businessExpenseDestinationsPie.active,w(s,"title","Sync Now"),w(s,"class","card-title mb-0 btn refresh-btn js-business-source-chart__refresh-btn float-right"),w(c,"class","clearfix"),w(i,"class","card-header"),w(T,"class","card-body aligned-panels__panel js-business-source-chart source-chart svelte-bte5ky"),wt(T,"inactive",!e[0].widgets.businessExpenseDestinationsPie.active),w(n,"class","card flex-align mb-3"),w(t,"class","col-sm-12 col-md-6 col-lg-6 col-xl-3 d-flex flex-column")},m(y,I){ce(y,t,I),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,o),m(i,d),m(i,c),m(n,v),m(n,T),m(T,b),e[10](b),A||(E=ct(s,"click",e[3]),A=!0)},p(y,I){I&2&&wt(o,"refresh-btn__icon-animation",y[1]),I&1&&l!==(l=!y[0].widgets.businessExpenseDestinationsPie.active)&&(s.hidden=l),I&1&&wt(T,"inactive",!y[0].widgets.businessExpenseDestinationsPie.active)},d(y){y&&_e(t),e[10](null),A=!1,E()}}}function $Ee(e){let t,n=e[0]&&KO(e);return{c(){n&&n.c(),t=On()},m(i,r){n&&n.m(i,r),ce(i,t,r)},p(i,[r]){i[0]?n?n.p(i,r):(n=KO(i),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},i:ot,o:ot,d(i){n&&n.d(i),i&&_e(t)}}}function NEe(e,t,n){let i,{dashboard:r}=t,{currentCompanyId:a}=t,{syncCompany:s}=t,{refreshDashboard:o}=t,l,d,c,v;const T=Ys.debounce(async()=>{n(1,l=!0),s&&o&&i&&(await s(i.forceSyncPath),await o()),n(1,l=!1)},400);function b(E,y,I){const D=["#CFEADD","#E4B470","#EFADC8","#C6E9A3","#B0CBE6","#BEBE97","#C6B8BA","#EAAAA0","#8EDDB2","#DDE480","#88D9DA","#D7BFE5","#B7C277","#B7D3B6","#ECD1A8","#ECDCDC","#27B6AF","#556B8D","#EDCE8C","#1F7BB6","#909AA0"];let O=[],M=[];const F=y.entries;for(const L in F){const j=F[L];O.push(L),M.push(j)}const $={type:E,data:{datasets:[{data:M,backgroundColor:D}],labels:O},options:{maintainAspectRatio:!1,responsive:!1,aspectRatio:1,legend:{position:"bottom",onClick:()=>{},labels:{boxWidth:20,fontSize:11,padding:5}},tooltips:{mode:"single",callbacks:{label(L,j){const H=L.index,V=Er.formatMoney(j.datasets[0].data[H],"$",0);return`${j.labels[H]} ${V}`}}}}};return new o0(I,$)}oa(async E=>{d&&n(8,c=d.getContext("2d"))});function A(E){Oe[E?"unshift":"push"](()=>{d=E,n(2,d)})}return e.$$set=E=>{"dashboard"in E&&n(4,r=E.dashboard),"currentCompanyId"in E&&n(5,a=E.currentCompanyId),"syncCompany"in E&&n(6,s=E.syncCompany),"refreshDashboard"in E&&n(7,o=E.refreshDashboard)},e.$$.update=()=>{e.$$.dirty&48&&n(0,i=r.companies.find(E=>E.id===a)),e.$$.dirty&769&&i&&c&&(v&&v.destroy(),n(9,v=b("pie",i.widgets.businessExpenseDestinationsPie,c)))},[i,l,d,T,r,a,s,o,c,v,A]}class FEe extends Qt{constructor(t){super(),Jt(this,t,NEe,$Ee,Kt,{dashboard:4,currentCompanyId:5,syncCompany:6,refreshDashboard:7})}}function LEe(e){let t,n,i,r,a;return{c(){t=P("div"),n=P("div"),i=P("div"),i.innerHTML='<h3 class="card-title mb-0">Personal Income by Source</h3>',r=P("div"),a=P("canvas"),w(i,"class","card-header"),w(r,"class","card-body aligned-panels__panel js-personal-source-chart source-chart svelte-bte5ky"),wt(r,"inactive",!e[0].widgets.personalIncomeSourceDoughnut.active),w(n,"class","card flex-align mb-3"),w(t,"class","col-sm-12 col-sm-6 col-lg-6 col-xl-3 d-flex flex-column")},m(s,o){ce(s,t,o),m(t,n),m(n,i),m(n,r),m(r,a),e[2](a)},p(s,[o]){o&1&&wt(r,"inactive",!s[0].widgets.personalIncomeSourceDoughnut.active)},i:ot,o:ot,d(s){s&&_e(t),e[2](null)}}}function HEe(e,t,n){let{dashboard:i}=t,r;function a(o,l,d){const c=["#CFEADD","#E4B470","#EFADC8","#C6E9A3","#B0CBE6","#BEBE97","#C6B8BA","#EAAAA0","#8EDDB2","#DDE480","#88D9DA","#D7BFE5","#B7C277","#B7D3B6","#ECD1A8","#ECDCDC","#27B6AF","#556B8D","#EDCE8C","#1F7BB6","#909AA0"];let v=[],T=[];const b=l.entries;for(const E in b){const y=b[E];v.push(E),T.push(y)}const A={type:o,data:{datasets:[{data:T,backgroundColor:c}],labels:v},options:{maintainAspectRatio:!1,responsive:!1,aspectRatio:1,legend:{position:"bottom",onClick:()=>{},labels:{boxWidth:20,fontSize:11,padding:5}},tooltips:{mode:"single",callbacks:{label(E,y){const I=E.index,D=Er.formatMoney(y.datasets[0].data[I],"$",0);return`${y.labels[I]} ${D}`}}}}};return new o0(d,A)}oa(async o=>{a("doughnut",i.widgets.personalIncomeSourceDoughnut,r.getContext("2d"))});function s(o){Oe[o?"unshift":"push"](()=>{r=o,n(1,r)})}return e.$$set=o=>{"dashboard"in o&&n(0,i=o.dashboard)},[i,r,s]}class jEe extends Qt{constructor(t){super(),Jt(this,t,HEe,LEe,Kt,{dashboard:0})}}function BEe(e){let t,n;return t=new is({props:{value:e[0],title:e[1],additionalClasses:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,[r]){const a={};r&1&&(a.value=i[0]),r&2&&(a.title=i[1]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function UEe(e,t,n){let{value:i}=t,{title:r}=t,{additionalClasses:a=""}=t,s=`results__row__total ${a}`;return e.$$set=o=>{"value"in o&&n(0,i=o.value),"title"in o&&n(1,r=o.title),"additionalClasses"in o&&n(3,a=o.additionalClasses)},[i,r,s,a]}class l0 extends Qt{constructor(t){super(),Jt(this,t,UEe,BEe,Kt,{value:0,title:1,additionalClasses:3})}}function qEe(e){let t,n,i,r;function a(v,T){return typeof v[0]=="number"&&v[0]<0?zEe:VEe}let s=a(e),o=s(e);function l(v,T){return typeof v[0]=="number"&&v[0]<0?GEe:YEe}let d=l(e),c=d(e);return{c(){t=P("div"),n=P("div"),o.c(),i=K(),r=P("div"),c.c(),w(n,"class","span total text-center"),w(r,"class","span title text-center"),w(t,"class","card-body")},m(v,T){ce(v,t,T),m(t,n),o.m(n,null),m(t,i),m(t,r),c.m(r,null)},p(v,T){s===(s=a(v))&&o?o.p(v,T):(o.d(1),o=s(v),o&&(o.c(),o.m(n,null))),d===(d=l(v))&&c?c.p(v,T):(c.d(1),c=d(v),c&&(c.c(),c.m(r,null)))},d(v){v&&_e(t),o.d(),c.d()}}}function WEe(e){let t,n,i,r;function a(v,T){return typeof v[0]=="number"&&v[0]<0?XEe:KEe}let s=a(e),o=s(e);function l(v,T){return v[0]==="Some"?JEe:QEe}let d=l(e),c=d(e);return{c(){t=P("div"),n=P("div"),o.c(),i=K(),r=P("div"),c.c(),w(n,"class","span total text-center"),w(r,"class","span title text-center"),w(t,"class","card-body")},m(v,T){ce(v,t,T),m(t,n),o.m(n,null),m(t,i),m(t,r),c.m(r,null)},p(v,T){s===(s=a(v))&&o?o.p(v,T):(o.d(1),o=s(v),o&&(o.c(),o.m(n,null))),d===(d=l(v))&&c?c.p(v,T):(c.d(1),c=d(v),c&&(c.c(),c.m(r,null)))},d(v){v&&_e(t),o.d(),c.d()}}}function VEe(e){let t=e[3](e[0])+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&1&&t!==(t=i[3](i[0])+"")&&vt(n,t)},d(i){i&&_e(n)}}}function zEe(e){let t=e[3](-e[0])+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&1&&t!==(t=i[3](-i[0])+"")&&vt(n,t)},d(i){i&&_e(n)}}}function YEe(e){let t=`${e[2]} Tax Due`,n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&4&&t!==(t=`${i[2]} Tax Due`)&&vt(n,t)},d(i){i&&_e(n)}}}function GEe(e){let t=`${e[2]} Tax Refund`,n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&4&&t!==(t=`${i[2]} Tax Refund`)&&vt(n,t)},d(i){i&&_e(n)}}}function KEe(e){let t=e[3](e[0])+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&1&&t!==(t=i[3](i[0])+"")&&vt(n,t)},d(i){i&&_e(n)}}}function XEe(e){let t=e[3](-e[0])+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&1&&t!==(t=i[3](-i[0])+"")&&vt(n,t)},d(i){i&&_e(n)}}}function QEe(e){let t=`${e[2]} Tax Due`,n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&4&&t!==(t=`${i[2]} Tax Due`)&&vt(n,t)},d(i){i&&_e(n)}}}function JEe(e){let t=`${e[2]} Tax Refund`,n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r&4&&t!==(t=`${i[2]} Tax Refund`)&&vt(n,t)},d(i){i&&_e(n)}}}function ZEe(e){let t,n;function i(s,o){return s[1]?WEe:qEe}let r=i(e),a=r(e);return{c(){t=P("div"),a.c(),w(t,"class",n="widget-mini results__total flex-grow-1 "+(e[0]>0&&"card-solid-danger"||e[0]<=0&&"card-solid-success"||e[0]==="Some"&&"card-solid-success"||"card-solid-danger"))},m(s,o){ce(s,t,o),a.m(t,null)},p(s,[o]){r===(r=i(s))&&a?a.p(s,o):(a.d(1),a=r(s),a&&(a.c(),a.m(t,null))),o&1&&n!==(n="widget-mini results__total flex-grow-1 "+(s[0]>0&&"card-solid-danger"||s[0]<=0&&"card-solid-success"||s[0]==="Some"&&"card-solid-success"||"card-solid-danger"))&&w(t,"class",n)},i:ot,o:ot,d(s){s&&_e(t),a.d()}}}function e3e(e,t,n){let{amount:i}=t,{ranged:r}=t,{type:a}=t;function s(l){return typeof l=="string"?l:o(l)}function o(l){return Er.formatMoney(l,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}return e.$$set=l=>{"amount"in l&&n(0,i=l.amount),"ranged"in l&&n(1,r=l.ranged),"type"in l&&n(2,a=l.type)},[i,r,a,s]}class R2 extends Qt{constructor(t){super(),Jt(this,t,e3e,ZEe,Kt,{amount:0,ranged:1,type:2})}}function XO(e){let t,n,i;return n=new R2({props:{amount:e[1],type:"State Franchise"}}),{c(){t=P("div"),re(n.$$.fragment),w(t,"class","flex-grow-1"),w(t,"id","state_franchise_tax")},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,a){const s={};a&2&&(s.amount=r[1]),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function t3e(e){let t,n,i,r=e[2](e[0])+"",a,s,o,l,d=typeof e[1]<"u"&&XO(e);return{c(){t=P("div"),n=P("div"),i=P("span"),a=Le(r),s=P("span"),s.textContent="Taxable Income",d&&d.c(),o=On(),w(i,"class","total text-center"),w(s,"class","title text-center"),w(n,"class","card-body"),w(t,"class","widget-mini results__total card-solid-default flex-grow-1")},m(c,v){ce(c,t,v),m(t,n),m(n,i),m(i,a),m(n,s),d&&d.m(c,v),ce(c,o,v),l=!0},p(c,[v]){(!l||v&1)&&r!==(r=c[2](c[0])+"")&&vt(a,r),typeof c[1]<"u"?d?(d.p(c,v),v&2&&U(d,1)):(d=XO(c),d.c(),U(d,1),d.m(o.parentNode,o)):d&&(pn(),W(d,1,1,()=>{d=null}),hn())},i(c){l||(U(d),l=!0)},o(c){W(d),l=!1},d(c){c&&_e(t),d&&d.d(c),c&&_e(o)}}}function n3e(e,t,n){let{taxableIncomeSent:i}=t,{stateFranchiseTax:r}=t;function a(o){return typeof o=="string"?o:s(o)}function s(o){return Er.formatMoney(o,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"%s(%v)",zero:"%s%v"}})}return e.$$set=o=>{"taxableIncomeSent"in o&&n(0,i=o.taxableIncomeSent),"stateFranchiseTax"in o&&n(1,r=o.stateFranchiseTax)},[i,r,a]}class N5 extends Qt{constructor(t){super(),Jt(this,t,n3e,t3e,Kt,{taxableIncomeSent:0,stateFranchiseTax:1})}}function QO(e){let t,n;return t=new R2({props:{amount:e[1],type:"State",ranged:e[3]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&2&&(a.amount=i[1]),r&8&&(a.ranged=i[3]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function i3e(e){let t,n,i,r;const a=e[5].default,s=fu(a,e,e[4],null);i=new R2({props:{amount:e[0],type:"Federal",ranged:e[3]}});let o=e[2]&&QO(e);return{c(){t=P("div"),s&&s.c(),n=P("div"),re(i.$$.fragment),o&&o.c(),w(t,"class","flex-align__wrap"),w(n,"class","d-flex"),cr(n,"flex-align","wrap")},m(l,d){ce(l,t,d),s&&s.m(t,null),ce(l,n,d),ae(i,n,null),o&&o.m(n,null),r=!0},p(l,[d]){s&&s.p&&(!r||d&16)&&cu(s,a,l,l[4],r?pu(a,l[4],d,null):_u(l[4]),null);const c={};d&1&&(c.amount=l[0]),d&8&&(c.ranged=l[3]),i.$set(c),l[2]?o?(o.p(l,d),d&4&&U(o,1)):(o=QO(l),o.c(),U(o,1),o.m(n,null)):o&&(pn(),W(o,1,1,()=>{o=null}),hn())},i(l){r||(U(s,l),U(i.$$.fragment,l),U(o),r=!0)},o(l){W(s,l),W(i.$$.fragment,l),W(o),r=!1},d(l){l&&_e(t),s&&s.d(l),l&&_e(n),se(i),o&&o.d()}}}function r3e(e,t,n){let{$$slots:i={},$$scope:r}=t,{federalTax:a}=t,{stateTax:s}=t,{showStateTax:o}=t,{ranged:l}=t;return e.$$set=d=>{"federalTax"in d&&n(0,a=d.federalTax),"stateTax"in d&&n(1,s=d.stateTax),"showStateTax"in d&&n(2,o=d.showStateTax),"ranged"in d&&n(3,l=d.ranged),"$$scope"in d&&n(4,r=d.$$scope)},[a,s,o,l,r,i]}class F5 extends Qt{constructor(t){super(),Jt(this,t,r3e,i3e,Kt,{federalTax:0,stateTax:1,showStateTax:2,ranged:3})}}function JO(e,t,n){const i=e.slice();return i[8]=t[n],i}function ZO(e,t,n){const i=e.slice();return i[8]=t[n],i}function e4(e,t,n){const i=e.slice();return i[13]=t[n],i}function a3e(e){let t,n,i,r,a,s,o,l;function d(I,D){return I[4].businessProjection?l3e:o3e}let c=d(e),v=c(e),T=e[0].companies,b=[];for(let I=0;I<T.length;I+=1)b[I]=t4(e4(e,T,I));const A=[c3e,f3e],E=[];function y(I,D){return I[4].businessProjection?0:I[2]?-1:1}return~(s=y(e))&&(o=E[s]=A[s](e)),{c(){t=P("div"),n=P("h3"),n.textContent="Business Summary",i=P("div"),v.c(),r=P("div");for(let I=0;I<b.length;I+=1)b[I].c();a=P("div"),o&&o.c(),w(n,"class","card-title mb-0"),w(i,"class","actions float-right"),w(t,"class","card-header bg-primary"),w(r,"class","business-projection business-projection__flex"),w(a,"class","card-body clearfix d-flex flex-column h-100 p-3")},m(I,D){ce(I,t,D),m(t,n),m(t,i),v.m(i,null),ce(I,r,D);for(let O=0;O<b.length;O+=1)b[O]&&b[O].m(r,null);ce(I,a,D),~s&&E[s].m(a,null),l=!0},p(I,D){if(c===(c=d(I))&&v?v.p(I,D):(v.d(1),v=c(I),v&&(v.c(),v.m(i,null))),D&11){T=I[0].companies;let M;for(M=0;M<T.length;M+=1){const F=e4(I,T,M);b[M]?b[M].p(F,D):(b[M]=t4(F),b[M].c(),b[M].m(r,null))}for(;M<b.length;M+=1)b[M].d(1);b.length=T.length}let O=s;s=y(I),s===O?~s&&E[s].p(I,D):(o&&(pn(),W(E[O],1,1,()=>{E[O]=null}),hn()),~s?(o=E[s],o?o.p(I,D):(o=E[s]=A[s](I),o.c()),U(o,1),o.m(a,null)):o=null)},i(I){l||(U(o),l=!0)},o(I){W(o),l=!1},d(I){I&&_e(t),v.d(),I&&_e(r),Nn(b,I),I&&_e(a),~s&&E[s].d()}}}function s3e(e){let t,n,i,r,a,s;return{c(){t=P("div"),t.innerHTML='<h3 class="card-title mb-0">Business Summary</h3>',n=P("div"),i=Le("No Businesses Owned"),r=P("a"),r.textContent="CREATE",w(t,"class","business-projection-no-business card-header bg-danger-light"),w(r,"class","btn btn-primary btn-trans btn-sm"),w(r,"href","#"),w(n,"class","business-projection-no-business__info")},m(o,l){ce(o,t,l),ce(o,n,l),m(n,i),m(n,r),a||(s=ct(r,"click",Hi(e[6])),a=!0)},p:ot,i:ot,o:ot,d(o){o&&_e(t),o&&_e(n),a=!1,s()}}}function o3e(e){let t,n,i;return{c(){t=P("a"),n=Le("CONNECT"),w(t,"class","btn btn-primary btn-trans btn-sm"),w(t,"href",i=e[4].connectPath)},m(r,a){ce(r,t,a),m(t,n)},p(r,a){a&16&&i!==(i=r[4].connectPath)&&w(t,"href",i)},d(r){r&&_e(t)}}}function l3e(e){let t,n,i;return{c(){t=P("a"),n=Le("EDIT"),w(t,"class","btn btn-primary btn-sm"),w(t,"href",i=e[4].editPath)},m(r,a){ce(r,t,a),m(t,n)},p(r,a){a&16&&i!==(i=r[4].editPath)&&w(t,"href",i)},d(r){r&&_e(t)}}}function u3e(e){let t,n=e[13].name+"",i,r,a;function s(){return e[7](e[13])}return{c(){t=P("div"),i=Le(n),w(t,"class","business-projection__link")},m(o,l){ce(o,t,l),m(t,i),r||(a=ct(t,"click",s),r=!0)},p(o,l){e=o,l&1&&n!==(n=e[13].name+"")&&vt(i,n)},d(o){o&&_e(t),r=!1,a()}}}function d3e(e){let t,n=e[13].name+"",i;return{c(){t=P("span"),i=Le(n),w(t,"class","business-projection__link business-projection__link__active")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&1&&n!==(n=r[13].name+"")&&vt(i,n)},d(r){r&&_e(t)}}}function t4(e){let t;function n(a,s){return a[13].id==a[3]?d3e:u3e}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,s){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},d(a){r.d(a),a&&_e(t)}}}function f3e(e){let t,n,i,r,a,s;return{c(){t=P("i"),n=Le(`To see business income summary please
`),i=P("a"),r=P("u"),r.textContent="connect",s=Le(" Business Source."),w(i,"href",a=e[4].connectPath),w(t,"class","text-center")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(i,r),m(t,s)},p(o,l){l&16&&a!==(a=o[4].connectPath)&&w(i,"href",a)},i:ot,o:ot,d(o){o&&_e(t)}}}function c3e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D=e[4].businessProjection.incomeEntries,O=[];for(let ne=0;ne<D.length;ne+=1)O[ne]=n4(ZO(e,D,ne));const M=ne=>W(O[ne],1,1,()=>{O[ne]=null});a=new l0({props:{title:"Total Income",value:e[4].businessProjection.totalIncome.federalFinalProjection}});let F=e[4].businessProjection.expenseEntries,$=[];for(let ne=0;ne<F.length;ne+=1)$[ne]=i4(JO(e,F,ne));const L=ne=>W($[ne],1,1,()=>{$[ne]=null});d=new l0({props:{title:"Total Expense",value:e[4].businessProjection.totalExpenses.federalFinalProjection}});const j=[p3e,_3e],H=[];function V(ne,be){return ne[4].businessProjection.isCCorp?0:1}T=V(e),b=H[T]=j[T](e);const Q=[m3e,h3e],X=[];function te(ne,be){return ne[4].businessProjection.isCCorp&&ne[4].personalProjection?0:1}return A=te(e),E=X[A]=Q[A](e),{c(){t=P("div"),n=P("table"),i=P("tbody");for(let ne=0;ne<O.length;ne+=1)O[ne].c();r=On(),re(a.$$.fragment),s=P("table"),o=P("tbody");for(let ne=0;ne<$.length;ne+=1)$[ne].c();l=On(),re(d.$$.fragment),c=P("table"),v=P("tbody"),b.c(),E.c(),y=On(),w(n,"class","summary-block table table-striped"),w(s,"class","summary-block table table-striped"),w(c,"class","summary-block table table-striped"),w(t,"class","business-projection-body")},m(ne,be){ce(ne,t,be),m(t,n),m(n,i);for(let ue=0;ue<O.length;ue+=1)O[ue]&&O[ue].m(i,null);m(i,r),ae(a,i,null),m(t,s),m(s,o);for(let ue=0;ue<$.length;ue+=1)$[ue]&&$[ue].m(o,null);m(o,l),ae(d,o,null),m(t,c),m(c,v),H[T].m(v,null),X[A].m(ne,be),ce(ne,y,be),I=!0},p(ne,be){if(be&16){D=ne[4].businessProjection.incomeEntries;let he;for(he=0;he<D.length;he+=1){const Me=ZO(ne,D,he);O[he]?(O[he].p(Me,be),U(O[he],1)):(O[he]=n4(Me),O[he].c(),U(O[he],1),O[he].m(i,r))}for(pn(),he=D.length;he<O.length;he+=1)M(he);hn()}const ue={};if(be&16&&(ue.value=ne[4].businessProjection.totalIncome.federalFinalProjection),a.$set(ue),be&16){F=ne[4].businessProjection.expenseEntries;let he;for(he=0;he<F.length;he+=1){const Me=JO(ne,F,he);$[he]?($[he].p(Me,be),U($[he],1)):($[he]=i4(Me),$[he].c(),U($[he],1),$[he].m(o,l))}for(pn(),he=F.length;he<$.length;he+=1)L(he);hn()}const Ce={};be&16&&(Ce.value=ne[4].businessProjection.totalExpenses.federalFinalProjection),d.$set(Ce);let ie=T;T=V(ne),T===ie?H[T].p(ne,be):(pn(),W(H[ie],1,1,()=>{H[ie]=null}),hn(),b=H[T],b?b.p(ne,be):(b=H[T]=j[T](ne),b.c()),U(b,1),b.m(v,null));let Y=A;A=te(ne),A===Y?X[A].p(ne,be):(pn(),W(X[Y],1,1,()=>{X[Y]=null}),hn(),E=X[A],E?E.p(ne,be):(E=X[A]=Q[A](ne),E.c()),U(E,1),E.m(y.parentNode,y))},i(ne){if(!I){for(let be=0;be<D.length;be+=1)U(O[be]);U(a.$$.fragment,ne);for(let be=0;be<F.length;be+=1)U($[be]);U(d.$$.fragment,ne),U(b),U(E),I=!0}},o(ne){O=O.filter(Boolean);for(let be=0;be<O.length;be+=1)W(O[be]);W(a.$$.fragment,ne),$=$.filter(Boolean);for(let be=0;be<$.length;be+=1)W($[be]);W(d.$$.fragment,ne),W(b),W(E),I=!1},d(ne){ne&&_e(t),Nn(O,ne),se(a),Nn($,ne),se(d),H[T].d(),X[A].d(ne),ne&&_e(y)}}}function n4(e){let t,n;return t=new is({props:{title:e[8].name,value:e[8].federalFinalProjection}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.title=i[8].name),r&16&&(a.value=i[8].federalFinalProjection),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function i4(e){let t,n;return t=new is({props:{title:e[8].name,value:e[8].federalFinalProjection}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.title=i[8].name),r&16&&(a.value=i[8].federalFinalProjection),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function _3e(e){let t,n;return t=new l0({props:{title:"Ownership",value:e[5](e[4].businessProjection.businessSharePercent)}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.value=i[5](i[4].businessProjection.businessSharePercent)),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function p3e(e){let t,n;return t=new l0({props:{title:"Distribution",value:e[5](e[4].businessProjection.businessSharePercent)}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.value=i[5](i[4].businessProjection.businessSharePercent)),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function h3e(e){let t,n,i;return n=new N5({props:{taxableIncomeSent:e[4].personalProjection.taxableIncomeSent,stateFranchiseTax:e[4].stateFranchiseTax}}),{c(){t=P("div"),re(n.$$.fragment),w(t,"class","flex-align__wrap")},m(r,a){ce(r,t,a),ae(n,t,null),i=!0},p(r,a){const s={};a&16&&(s.taxableIncomeSent=r[4].personalProjection.taxableIncomeSent),a&16&&(s.stateFranchiseTax=r[4].stateFranchiseTax),n.$set(s)},i(r){i||(U(n.$$.fragment,r),i=!0)},o(r){W(n.$$.fragment,r),i=!1},d(r){r&&_e(t),se(n)}}}function m3e(e){let t,n;return t=new F5({props:{federalTax:e[4].personalProjection.cCorpFedTax,stateTax:e[4].personalProjection.cCorpStateTax,showStateTax:!!e[4].personalProjection.cCorpStateTax,ranged:!e[0].hasProSubscription,$$slots:{default:[g3e]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.federalTax=i[4].personalProjection.cCorpFedTax),r&16&&(a.stateTax=i[4].personalProjection.cCorpStateTax),r&16&&(a.showStateTax=!!i[4].personalProjection.cCorpStateTax),r&1&&(a.ranged=!i[0].hasProSubscription),r&65552&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function g3e(e){let t,n;return t=new N5({props:{taxableIncomeSent:e[4].personalProjection.taxableIncomeSent,stateFranchiseTax:e[4].stateFranchiseTax}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.taxableIncomeSent=i[4].personalProjection.taxableIncomeSent),r&16&&(a.stateFranchiseTax=i[4].stateFranchiseTax),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function v3e(e){let t,n,i,r;const a=[s3e,a3e],s=[];function o(l,d){return l[2]?0:1}return n=o(e),i=s[n]=a[n](e),{c(){t=P("div"),i.c(),w(t,"class","card flex-align mb-3")},m(l,d){ce(l,t,d),s[n].m(t,null),r=!0},p(l,[d]){let c=n;n=o(l),n===c?s[n].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),i=s[n],i?i.p(l,d):(i=s[n]=a[n](l),i.c()),U(i,1),i.m(t,null))},i(l){r||(U(i),r=!0)},o(l){W(i),r=!1},d(l){l&&_e(t),s[n].d()}}}function b3e(e,t,n){let i,{dashboard:r}=t,{selectCompany:a}=t,{userHasNoBusiness:s}=t,{currentCompanyId:o}=t;function l(v){return Er.formatMoney(v,{symbol:"%",precision:1,format:{pos:"%v%s",neg:"(%v)%s",zero:"%v%s"}})}function d(){R0.set(!0)}const c=v=>{a(v.id)};return e.$$set=v=>{"dashboard"in v&&n(0,r=v.dashboard),"selectCompany"in v&&n(1,a=v.selectCompany),"userHasNoBusiness"in v&&n(2,s=v.userHasNoBusiness),"currentCompanyId"in v&&n(3,o=v.currentCompanyId)},e.$$.update=()=>{e.$$.dirty&9&&n(4,i=r.companies.find(v=>v.id===o))},[r,a,s,o,i,l,d,c]}class y3e extends Qt{constructor(t){super(),Jt(this,t,b3e,v3e,Kt,{dashboard:0,selectCompany:1,userHasNoBusiness:2,currentCompanyId:3})}}function r4(e){let t;function n(a,s){return a[0].personalProjection?T3e:w3e}let i=n(e),r=i(e);return{c(){t=P("div"),r.c(),w(t,"class","actions float-right")},m(a,s){ce(a,t,s),r.m(t,null)},p(a,s){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t,null)))},d(a){a&&_e(t),r.d()}}}function w3e(e){let t,n,i;return{c(){t=P("a"),n=Le("FILL IN"),w(t,"class","btn btn-primary btn-trans btn-sm"),w(t,"href",i=e[0].personalProjectionPath)},m(r,a){ce(r,t,a),m(t,n)},p(r,a){a&1&&i!==(i=r[0].personalProjectionPath)&&w(t,"href",i)},d(r){r&&_e(t)}}}function T3e(e){let t,n,i;return{c(){t=P("a"),n=Le("EDIT"),w(t,"class","btn btn-primary btn-sm"),w(t,"href",i=e[0].personalProjectionPath)},m(r,a){ce(r,t,a),m(t,n)},p(r,a){a&1&&i!==(i=r[0].personalProjectionPath)&&w(t,"href",i)},d(r){r&&_e(t)}}}function k3e(e){let t,n,i,r,a,s;return{c(){t=P("i"),n=Le("Please"),i=P("a"),r=Le("fill in the personal projection details"),s=Le("."),w(i,"href",a=e[0].personalProjectionPath)},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(i,r),m(t,s)},p(o,l){l&1&&a!==(a=o[0].personalProjectionPath)&&w(i,"href",a)},i:ot,o:ot,d(o){o&&_e(t)}}}function S3e(e){let t,n,i,r;return n=new w5({props:{personalProjection:e[0].personalProjection}}),i=new F5({props:{federalTax:e[0].personalProjection.resFederalTaxRemaining,stateTax:e[0].personalProjection.resStateTax,showStateTax:e[0].personalProjection.resStateTaxShouldDisplay,ranged:!e[0].hasProSubscription}}),{c(){t=P("div"),re(n.$$.fragment),re(i.$$.fragment),w(t,"class","js-personal-projection-body")},m(a,s){ce(a,t,s),ae(n,t,null),ae(i,a,s),r=!0},p(a,s){const o={};s&1&&(o.personalProjection=a[0].personalProjection),n.$set(o);const l={};s&1&&(l.federalTax=a[0].personalProjection.resFederalTaxRemaining),s&1&&(l.stateTax=a[0].personalProjection.resStateTax),s&1&&(l.showStateTax=a[0].personalProjection.resStateTaxShouldDisplay),s&1&&(l.ranged=!a[0].hasProSubscription),i.$set(l)},i(a){r||(U(n.$$.fragment,a),U(i.$$.fragment,a),r=!0)},o(a){W(n.$$.fragment,a),W(i.$$.fragment,a),r=!1},d(a){a&&_e(t),se(n),se(i,a)}}}function C3e(e){let t,n,i,r,a,s,o,l=e[0].hasBasicSubscription&&r4(e);const d=[S3e,k3e],c=[];function v(T,b){return T[0].personalProjection?0:1}return a=v(e),s=c[a]=d[a](e),{c(){t=P("div"),n=P("div"),i=P("h3"),i.textContent="Personal Summary",l&&l.c(),r=P("div"),s.c(),w(i,"class","card-title mb-0"),w(n,"class","card-header"),wt(n,"bg-primary",e[0].hasBasicSubscription),wt(n,"bg-danger",!e[0].hasBasicSubscription),w(r,"class","card-body d-flex flex-column h-100 p-3"),w(t,"class","card flex-align mb-3")},m(T,b){ce(T,t,b),m(t,n),m(n,i),l&&l.m(n,null),m(t,r),c[a].m(r,null),o=!0},p(T,[b]){T[0].hasBasicSubscription?l?l.p(T,b):(l=r4(T),l.c(),l.m(n,null)):l&&(l.d(1),l=null),(!o||b&1)&&wt(n,"bg-primary",T[0].hasBasicSubscription),(!o||b&1)&&wt(n,"bg-danger",!T[0].hasBasicSubscription);let A=a;a=v(T),a===A?c[a].p(T,b):(pn(),W(c[A],1,1,()=>{c[A]=null}),hn(),s=c[a],s?s.p(T,b):(s=c[a]=d[a](T),s.c()),U(s,1),s.m(r,null))},i(T){o||(U(s),o=!0)},o(T){W(s),o=!1},d(T){T&&_e(t),l&&l.d(),c[a].d()}}}function P3e(e,t,n){let{dashboard:i}=t;return e.$$set=r=>{"dashboard"in r&&n(0,i=r.dashboard)},[i]}class E3e extends Qt{constructor(t){super(),Jt(this,t,P3e,C3e,Kt,{dashboard:0})}}function I3e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E;return r=new AEe({props:{dashboard:e[0]}}),a=new REe({props:{dashboard:e[0],currentCompanyId:e[1],syncCompany:e[4],refreshDashboard:e[5]}}),l=new FEe({props:{dashboard:e[0],currentCompanyId:e[1],syncCompany:e[4],refreshDashboard:e[5]}}),d=new jEe({props:{dashboard:e[0]}}),T=new y3e({props:{dashboard:e[0],selectCompany:e[3],currentCompanyId:e[1],userHasNoBusiness:e[2]}}),A=new E3e({props:{dashboard:e[0]}}),{c(){t=P("div"),n=P("div"),i=P("div"),re(r.$$.fragment),re(a.$$.fragment),s=P("div"),o=P("div"),re(l.$$.fragment),re(d.$$.fragment),c=P("div"),v=P("div"),re(T.$$.fragment),b=P("div"),re(A.$$.fragment),w(i,"class","row grid-flex__columns-chart"),w(n,"class","col-12 col-sm-6 col-lg-6 col-xl-6"),w(o,"class","row grid-flex__columns-chart"),w(s,"class","col-12 col-sm-6 col-lg-6 col-xl-6"),w(t,"class","row grid-flex__chart"),w(v,"class","col-12 col-sm-6 col-lg-6 col-xl-6 d-flex flex-column"),w(b,"class","col-12 col-sm-6 col-lg-6 col-xl-6 d-flex flex-column"),w(c,"class","row dashboard")},m(y,I){ce(y,t,I),m(t,n),m(n,i),ae(r,i,null),ae(a,i,null),m(t,s),m(s,o),ae(l,o,null),ae(d,o,null),ce(y,c,I),m(c,v),ae(T,v,null),m(c,b),ae(A,b,null),E=!0},p(y,[I]){const D={};I&1&&(D.dashboard=y[0]),r.$set(D);const O={};I&1&&(O.dashboard=y[0]),I&2&&(O.currentCompanyId=y[1]),a.$set(O);const M={};I&1&&(M.dashboard=y[0]),I&2&&(M.currentCompanyId=y[1]),l.$set(M);const F={};I&1&&(F.dashboard=y[0]),d.$set(F);const $={};I&1&&($.dashboard=y[0]),I&2&&($.currentCompanyId=y[1]),I&4&&($.userHasNoBusiness=y[2]),T.$set($);const L={};I&1&&(L.dashboard=y[0]),A.$set(L)},i(y){E||(U(r.$$.fragment,y),U(a.$$.fragment,y),U(l.$$.fragment,y),U(d.$$.fragment,y),U(T.$$.fragment,y),U(A.$$.fragment,y),E=!0)},o(y){W(r.$$.fragment,y),W(a.$$.fragment,y),W(l.$$.fragment,y),W(d.$$.fragment,y),W(T.$$.fragment,y),W(A.$$.fragment,y),E=!1},d(y){y&&_e(t),se(r),se(a),se(l),se(d),y&&_e(c),se(T),se(A)}}}function A3e(e,t,n){let{dashboard:i}=t,{currentCompanyId:r}=t,{userHasNoBusiness:a}=t,{dataPath:s}=t;const o=v=>n(1,r=v),l=async v=>{const T=new Fo(v);try{const b=await T.baseQuery(T.baseEndpoint,{method:"POST",headers:T.headers,body:JSON.stringify({})});Gr.success(b.success)}catch(b){Gr.error(b.message)}},d=new Fo(s),c=async()=>{try{const v=await d.baseQuery(d.baseEndpoint,{method:"GET",headers:d.headers});n(0,i=v)}catch(v){Gr.error(v.message)}};return e.$$set=v=>{"dashboard"in v&&n(0,i=v.dashboard),"currentCompanyId"in v&&n(1,r=v.currentCompanyId),"userHasNoBusiness"in v&&n(2,a=v.userHasNoBusiness),"dataPath"in v&&n(6,s=v.dataPath)},[i,r,a,o,l,c,s]}class D3e extends Qt{constructor(t){super(),Jt(this,t,A3e,I3e,Kt,{dashboard:0,currentCompanyId:1,userHasNoBusiness:2,dataPath:6})}}function O3e(e){let t,n,i,r,a,s;return{c(){t=P("div"),n=P("div"),n.innerHTML='<i class="fa fa-thumbs-o-up"></i>',i=K(),r=P("div"),r.innerHTML=`<span class="planning-tile-button__label">Rejected</span> 
      <i class="planning-tile-button__icon fa fa-thumbs-o-down"></i>`,w(n,"class","planning-tile-button planning-tile-button_yes"),w(r,"class","planning-tile-button planning-tile-button_no")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,r),a||(s=[ct(n,"click",Hi(e[2])),ct(r,"click",Hi(e[5]))],a=!0)},p:ot,d(o){o&&_e(t),a=!1,vi(s)}}}function M3e(e){let t,n,i,r,a,s;return{c(){t=P("div"),n=P("div"),n.innerHTML=`<span class="planning-tile-button__label">Accepted</span> 
      <i class="planning-tile-button__icon fa fa-thumbs-o-up"></i>`,i=K(),r=P("div"),r.innerHTML='<i class="fa fa-thumbs-o-down"></i>',w(n,"class","planning-tile-button planning-tile-button_yes"),w(r,"class","planning-tile-button planning-tile-button_no")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,r),a||(s=[ct(n,"click",Hi(e[4])),ct(r,"click",Hi(e[1]))],a=!0)},p:ot,d(o){o&&_e(t),a=!1,vi(s)}}}function x3e(e){let t;function n(a,s){if(a[0]==="completed")return M3e;if(a[0]==="declined")return O3e}let i=n(e),r=i&&i(e);return{c(){r&&r.c(),t=On()},m(a,s){r&&r.m(a,s),ce(a,t,s)},p(a,[s]){i===(i=n(a))&&r?r.p(a,s):(r&&r.d(1),r=i&&i(a),r&&(r.c(),r.m(t.parentNode,t)))},i:ot,o:ot,d(a){r&&r.d(a),a&&_e(t)}}}function R3e(e,t,n){let{status:i}=t,{onChangeState:r}=t;function a(){r("declined")}function s(){r("completed")}function o(d){vv.call(this,e,d)}function l(d){vv.call(this,e,d)}return e.$$set=d=>{"status"in d&&n(0,i=d.status),"onChangeState"in d&&n(3,r=d.onChangeState)},[i,a,s,r,o,l]}class $3e extends Qt{constructor(t){super(),Jt(this,t,R3e,x3e,Kt,{status:0,onChangeState:3})}}function N3e(e){let t,n,i,r=e[0].title+"",a,s,o,l,d,c;return d=new $3e({props:{status:e[0].status,onChangeState:e[3]}}),{c(){t=P("a"),n=P("div"),i=P("div"),a=Le(r),s=K(),o=P("div"),o.textContent=`${e[2]}`,l=K(),re(d.$$.fragment),w(i,"class","planning-tile__title"),w(o,"class","planning-tile__value"),w(n,"class","planning-tile planning-tile____module"),wt(n,"planning-tile____completed",e[0].status==="completed"),wt(n,"planning-tile____declined",e[0].status==="declined"),w(t,"class","col-12 col-sm-4 col-lg-3"),w(t,"href",e[1])},m(v,T){ce(v,t,T),m(t,n),m(n,i),m(i,a),m(n,s),m(n,o),m(n,l),ae(d,n,null),c=!0},p(v,[T]){(!c||T&1)&&r!==(r=v[0].title+"")&&vt(a,r);const b={};T&1&&(b.status=v[0].status),d.$set(b),(!c||T&1)&&wt(n,"planning-tile____completed",v[0].status==="completed"),(!c||T&1)&&wt(n,"planning-tile____declined",v[0].status==="declined")},i(v){c||(U(d.$$.fragment,v),c=!0)},o(v){W(d.$$.fragment,v),c=!1},d(v){v&&_e(t),se(d)}}}function F3e(e,t,n){let{module:i}=t,{handleChangeState:r}=t,{planningModulePathBase:a}=t,s=a.replace(":planning_module:",i.id),o=Er.formatMoney(i.amount,"$",0);function l(d){return r(i.id,d)}return e.$$set=d=>{"module"in d&&n(0,i=d.module),"handleChangeState"in d&&n(4,r=d.handleChangeState),"planningModulePathBase"in d&&n(5,a=d.planningModulePathBase)},[i,s,o,l,r,a]}class L3e extends Qt{constructor(t){super(),Jt(this,t,F3e,N3e,Kt,{module:0,handleChangeState:4,planningModulePathBase:5})}}function H3e(e){let t;return{c(){t=P("div"),t.innerHTML=`<div class="planning-tile planning-tile____loading"><div class="planning-tile__spinner"><span class="bounce1"></span> 
      <span class="bounce2"></span> 
      <span class="bounce3"></span></div></div>`,w(t,"class","col-sm-12 col-sm-4 col-lg-3")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}class j3e extends Qt{constructor(t){super(),Jt(this,t,null,H3e,Kt,{})}}function a4(e,t,n){const i=e.slice();return i[5]=t[n],i}function B3e(e){let t,n;return t=new L3e({props:{module:e[5],handleChangeState:e[3],planningModulePathBase:e[4]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.module=i[5]),r&8&&(a.handleChangeState=i[3]),r&16&&(a.planningModulePathBase=i[4]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function U3e(e){let t,n;return t=new j3e({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function s4(e){let t,n,i,r,a;const s=[U3e,B3e],o=[];function l(d,c){return c&4&&(t=null),t==null&&(t=!!Xn.isNil(d[5].amount)),t?0:1}return n=l(e,-1),i=o[n]=s[n](e),{c(){i.c(),r=On()},m(d,c){o[n].m(d,c),ce(d,r,c),a=!0},p(d,c){let v=n;n=l(d,c),n===v?o[n].p(d,c):(pn(),W(o[v],1,1,()=>{o[v]=null}),hn(),i=o[n],i?i.p(d,c):(i=o[n]=s[n](d),i.c()),U(i,1),i.m(r.parentNode,r))},i(d){a||(U(i),a=!0)},o(d){W(i),a=!1},d(d){o[n].d(d),d&&_e(r)}}}function q3e(e){let t,n,i,r=e[2],a=[];for(let o=0;o<r.length;o+=1)a[o]=s4(a4(e,r,o));const s=o=>W(a[o],1,1,()=>{a[o]=null});return{c(){t=P("div"),n=P("div");for(let o=0;o<a.length;o+=1)a[o].c();w(n,"class","row"),w(t,"id",e[0]),w(t,"class","tab-pane fade active"),wt(t,"active",e[1]),wt(t,"show",e[1])},m(o,l){ce(o,t,l),m(t,n);for(let d=0;d<a.length;d+=1)a[d]&&a[d].m(n,null);i=!0},p(o,[l]){if(l&28){r=o[2];let d;for(d=0;d<r.length;d+=1){const c=a4(o,r,d);a[d]?(a[d].p(c,l),U(a[d],1)):(a[d]=s4(c),a[d].c(),U(a[d],1),a[d].m(n,null))}for(pn(),d=r.length;d<a.length;d+=1)s(d);hn()}(!i||l&1)&&w(t,"id",o[0]),(!i||l&2)&&wt(t,"active",o[1]),(!i||l&2)&&wt(t,"show",o[1])},i(o){if(!i){for(let l=0;l<r.length;l+=1)U(a[l]);i=!0}},o(o){a=a.filter(Boolean);for(let l=0;l<a.length;l+=1)W(a[l]);i=!1},d(o){o&&_e(t),Nn(a,o)}}}function W3e(e,t,n){let{id:i}=t,{active:r}=t,{modules:a}=t,{handleChangeState:s}=t,{planningModulePathBase:o}=t;return e.$$set=l=>{"id"in l&&n(0,i=l.id),"active"in l&&n(1,r=l.active),"modules"in l&&n(2,a=l.modules),"handleChangeState"in l&&n(3,s=l.handleChangeState),"planningModulePathBase"in l&&n(4,o=l.planningModulePathBase)},[i,r,a,s,o]}class L5 extends Qt{constructor(t){super(),Jt(this,t,W3e,q3e,Kt,{id:0,active:1,modules:2,handleChangeState:3,planningModulePathBase:4})}}class V3e{constructor(t,n,i){this.modulesPath=t,this.completeModulePathBase=n,this.declineModulePathBase=i,this.controller=new AbortController}async _makeFetchRequest(t,n,i={}){try{const r=O7(),a=`${t}?task_id=${encodeURIComponent(n)}`,s=await fetch(a,{...i,headers:r,signal:this.controller.signal});if(!s.ok)throw new Error("Network response was not ok.");return s}catch(r){r.name==="AbortError"?console.log("Fetch aborted"):console.error("There was a problem with the fetch operation:",r.message)}}loadModules(t){return this._makeFetchRequest(this.modulesPath,t)}completeModule(t,n){const i=this.completeModulePathBase.replace(":module:",t);return this._makeFetchRequest(i,n,{method:"POST"})}declineModule(t,n){const i=this.declineModulePathBase.replace(":module:",t);return this._makeFetchRequest(i,n,{method:"POST"})}}class z3e{constructor(t){this.taskId=t,window.$("#planning-modals").on("click",".js-planning-module-feedback",n=>{n.preventDefault();const i=window.$(n.currentTarget).closest(".modal-content").find("form");this._submitFormWithQueryParam(i)})}_submitFormWithQueryParam(t){const n=t.attr("action"),i=t.attr("method")||"POST",r=t.serialize();window.$.ajax({url:`${n}?task_id=${encodeURIComponent(this.taskId)}`,type:i,data:r})}getModalId(t,n){const r={completed:"complete",declined:"decline"}[n];return`#${t}_${r}_modal`}hasModal(t,n){return window.$(this.getModalId(t,n)).length>0}presentModal(t,n){window.$(this.getModalId(t,n)).modal("show")}}function o4(e){let t;return{c(){t=P("li"),t.innerHTML='<a class="nav-link active" data-toggle="tab" href="#planners">Strategies</a>',w(t,"class","nav-item")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function l4(e){let t;return{c(){t=P("li"),t.innerHTML='<a class="nav-link" data-toggle="tab" href="#concepts">Concepts</a>',w(t,"class","nav-item"),wt(t,"active",!e[4])},m(n,i){ce(n,t,i)},p(n,i){i&16&&wt(t,"active",!n[4])},d(n){n&&_e(t)}}}function u4(e){let t,n;return t=new L5({props:{id:"planners",active:!0,modules:e[2],handleChangeState:e[5],planningModulePathBase:e[0]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.modules=i[2]),r&1&&(a.planningModulePathBase=i[0]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function d4(e){let t,n;return t=new L5({props:{id:"concepts",active:!e[4],modules:e[1],handleChangeState:e[5],planningModulePathBase:e[0]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&16&&(a.active=!i[4]),r&2&&(a.modules=i[1]),r&1&&(a.planningModulePathBase=i[0]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function Y3e(e){let t,n,i,r,a,s,o,l,d,c=e[4]&&o4(),v=e[3]&&l4(e),T=e[4]&&u4(e),b=e[3]&&d4(e);return{c(){t=P("div"),n=P("div"),i=P("ul"),c&&c.c(),r=K(),v&&v.c(),a=K(),s=P("div"),o=P("div"),T&&T.c(),l=K(),b&&b.c(),w(i,"class","nav nav-pills"),w(n,"class","card-header"),w(o,"class","tab-content"),w(s,"class","card-body"),w(t,"class","card")},m(A,E){ce(A,t,E),m(t,n),m(n,i),c&&c.m(i,null),m(i,r),v&&v.m(i,null),m(t,a),m(t,s),m(s,o),T&&T.m(o,null),m(o,l),b&&b.m(o,null),d=!0},p(A,[E]){A[4]?c||(c=o4(),c.c(),c.m(i,r)):c&&(c.d(1),c=null),A[3]?v?v.p(A,E):(v=l4(A),v.c(),v.m(i,null)):v&&(v.d(1),v=null),A[4]?T?(T.p(A,E),E&16&&U(T,1)):(T=u4(A),T.c(),U(T,1),T.m(o,l)):T&&(pn(),W(T,1,1,()=>{T=null}),hn()),A[3]?b?(b.p(A,E),E&8&&U(b,1)):(b=d4(A),b.c(),U(b,1),b.m(o,null)):b&&(pn(),W(b,1,1,()=>{b=null}),hn())},i(A){d||(U(T),U(b),d=!0)},o(A){W(T),W(b),d=!1},d(A){A&&_e(t),c&&c.d(),v&&v.d(),T&&T.d(),b&&b.d()}}}function G3e(e,t,n){let i,r,a,s,{modules:o=[]}=t,{modulesPath:l}=t,{completeModulePathBase:d}=t,{declineModulePathBase:c}=t,{planningModulePathBase:v}=t;const T=M7();let b=new V3e(l,d,c),A=new z3e(T);function E(M,F){A.hasModal(M,F)?A.presentModal(M,F):y(M,F)}function y(M,F){switch(F){case"declined":b.declineModule(M,T);break;case"completed":b.completeModule(M,T);break;default:alert(`Undefined new state ${F}`)}}function I(M){for(let F=0;F<o.length;F++)if(o[F].id===M.id){n(6,o[F]={...o[F],...M},o);break}}let D=nx.createConsumer(),O;return oa(()=>{O=D.subscriptions.create({channel:"PlanningModulesChannel",task_id:T},{received:M=>I(M),connected:()=>b.loadModules(T)})}),Jy(()=>{O&&D.subscriptions.remove(O)}),e.$$set=M=>{"modules"in M&&n(6,o=M.modules),"modulesPath"in M&&n(7,l=M.modulesPath),"completeModulePathBase"in M&&n(8,d=M.completeModulePathBase),"declineModulePathBase"in M&&n(9,c=M.declineModulePathBase),"planningModulePathBase"in M&&n(0,v=M.planningModulePathBase)},e.$$.update=()=>{e.$$.dirty&64&&n(2,i=o.filter(M=>M.type==="planner")),e.$$.dirty&64&&n(1,r=o.filter(M=>M.type==="concept")),e.$$.dirty&4&&n(4,a=i.length>0),e.$$.dirty&2&&n(3,s=r.length>0)},[v,r,i,s,a,E,o,l,d,c]}class K3e extends Qt{constructor(t){super(),Jt(this,t,G3e,Y3e,Kt,{modules:6,modulesPath:7,completeModulePathBase:8,declineModulePathBase:9,planningModulePathBase:0})}}function X3e(e){let t,n,i,r,a,s,o,l,d,c,v,T=e[4]&&f4(e);return{c(){t=P("div"),n=P("span"),i=P("span"),i.textContent="Delay my summary emails for",r=K(),a=P("div"),s=P("input"),o=K(),l=P("span"),l.textContent=`${e[9]()}`,d=K(),T&&T.c(),w(i,"class","delay-input__summary"),w(s,"class","string required form-control"),w(s,"type","text"),s.value=e[0],w(s,"name","news_settings[delay]"),w(s,"id","news_settings_delay"),w(a,"class","col-sm-2 string required news_settings_delay"),w(l,"class","delay-input__days"),w(n,"class","delay-input input-group col-12"),w(t,"class","row")},m(b,A){ce(b,t,A),m(t,n),m(n,i),m(n,r),m(n,a),m(a,s),m(n,o),m(n,l),m(n,d),T&&T.m(n,null),c||(v=ct(s,"change",e[6]),c=!0)},p(b,A){A&1&&s.value!==b[0]&&(s.value=b[0]),b[4]?T?T.p(b,A):(T=f4(b),T.c(),T.m(n,null)):T&&(T.d(1),T=null)},d(b){b&&_e(t),T&&T.d(),c=!1,v()}}}function f4(e){let t,n=e[2].delay[0]+"",i;return{c(){t=P("span"),i=Le(n),w(t,"class","form-text error")},m(r,a){ce(r,t,a),m(t,i)},p(r,a){a&4&&n!==(n=r[2].delay[0]+"")&&vt(i,n)},d(r){r&&_e(t)}}}function Q3e(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q=e[8](),X,te,ne,be,ue,Ce,ie,Y=Q&&X3e(e);return{c(){t=P("form"),n=P("input"),i=K(),r=P("input"),a=K(),s=P("input"),o=K(),l=P("div"),d=P("div"),c=P("label"),v=P("label"),T=P("input"),b=Le(`
           Never`),A=K(),E=P("div"),y=P("label"),I=P("label"),D=P("input"),O=Le(`
           Monthly`),M=K(),F=P("div"),$=P("label"),L=P("label"),j=P("input"),H=Le(`
           Quarterly`),V=K(),Y&&Y.c(),X=K(),te=P("div"),ne=P("div"),be=P("div"),ue=P("input"),w(n,"name","utf8"),w(n,"type","hidden"),n.value="✓",w(r,"type","hidden"),w(r,"name","_method"),r.value="patch",w(s,"type","hidden"),w(s,"name","authenticity_token"),s.value=e[3],w(T,"type","radio"),T.value="never",T.checked=e[7]("never"),w(T,"name","news_settings[frequency]"),w(T,"id","news_settings_frequency_never"),w(v,"for","news_settings_frequency_never"),w(c,"for","news_settings_frequency_never"),w(d,"class","col-sm-4 form-group"),w(D,"type","radio"),D.value="monthly",D.checked=e[7]("monthly"),w(D,"name","news_settings[frequency]"),w(D,"id","news_settings_frequency_monthly"),w(I,"for","news_settings_frequency_monthly"),w(y,"for","news_settings_frequency_monthly"),w(E,"class","col-sm-4 form-group"),w(j,"type","radio"),j.value="quarterly",j.checked=e[7]("quarterly"),w(j,"name","news_settings[frequency]"),w(j,"id","news_settings_frequency_quarterly"),w(L,"for","news_settings_frequency_quarterly"),w($,"for","news_settings_frequency_quarterly"),w(F,"class","col-sm-4 form-group"),w(l,"class","row"),w(ue,"type","submit"),w(ue,"name","commit"),ue.value="Save Settings",w(ue,"class","btn btn-primary"),wt(ue,"is-invalid",e[4]),w(be,"class","float-right"),w(ne,"class","col-12"),w(te,"class","row"),t.noValidate="novalidate",w(t,"class","simple_form new_news_settings"),w(t,"id","new_news_settings"),w(t,"action",e[1]),w(t,"accept-charset","UTF-8"),w(t,"method","post")},m(he,Me){ce(he,t,Me),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),m(t,o),m(t,l),m(l,d),m(d,c),m(c,v),m(v,T),m(v,b),m(l,A),m(l,E),m(E,y),m(y,I),m(I,D),m(I,O),m(l,M),m(l,F),m(F,$),m($,L),m(L,j),m(L,H),m(t,V),Y&&Y.m(t,null),m(t,X),m(t,te),m(te,ne),m(ne,be),m(be,ue),Ce||(ie=[ct(T,"change",e[5]),ct(D,"change",e[5]),ct(j,"change",e[5])],Ce=!0)},p(he,[Me]){Me&8&&(s.value=he[3]),Q&&Y.p(he,Me),Me&16&&wt(ue,"is-invalid",he[4]),Me&2&&w(t,"action",he[1])},i:ot,o:ot,d(he){he&&_e(t),Y&&Y.d(),Ce=!1,vi(ie)}}}function J3e(e,t,n){let i,{frequency:r}=t,{delay:a}=t,{actionUrl:s}=t,{errors:o}=t,{authenticityToken:l}=t;a=a.toString();function d(A){return n(10,r=A.target.value)}function c(A){return n(0,a=A.target.value)}function v(A){return A===r}function T(){return r!=="never"}function b(){return a==="1"?"day":"days"}return e.$$set=A=>{"frequency"in A&&n(10,r=A.frequency),"delay"in A&&n(0,a=A.delay),"actionUrl"in A&&n(1,s=A.actionUrl),"errors"in A&&n(2,o=A.errors),"authenticityToken"in A&&n(3,l=A.authenticityToken)},e.$$.update=()=>{e.$$.dirty&4&&n(4,i=o.delay&&o.delay.length>0)},[a,s,o,l,i,d,c,v,T,b,r]}class Z3e extends Qt{constructor(t){super(),Jt(this,t,J3e,Q3e,Kt,{frequency:10,delay:0,actionUrl:1,errors:2,authenticityToken:3})}}function c4(e){let t;return{c(){t=P("p"),t.textContent="The code has expired. Please, request a new one by clicking 'Proceed'.",cr(t,"color","red"),cr(t,"padding-bottom","5px")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function eIe(e){let t,n;return{c(){t=P("a"),n=Le("Send new code"),w(t,"class","btn btn-success"),w(t,"data-method","delete"),w(t,"href",e[4])},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&16&&w(t,"href",i[4])},d(i){i&&_e(t)}}}function tIe(e){let t,n,i,r;return{c(){t=P("div"),n=Le("Send new code ("),i=Le(e[0]),r=Le(" seconds)"),w(t,"class","btn btn-success"),cr(t,"background","#efefef"),cr(t,"color","#333333"),cr(t,"cursor","wait")},m(a,s){ce(a,t,s),m(t,n),m(t,i),m(t,r)},p(a,s){s&1&&vt(i,a[0])},d(a){a&&_e(t)}}}function nIe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M=e[1]<=0&&c4();function F(j,H){return j[0]>0?tIe:eIe}let $=F(e),L=$(e);return{c(){t=P("form"),n=P("input"),i=K(),r=P("input"),a=K(),s=P("p"),o=K(),l=P("div"),d=P("label"),d.textContent="Code",c=K(),v=P("input"),T=K(),M&&M.c(),b=K(),A=P("div"),E=P("input"),y=K(),L.c(),I=K(),D=P("a"),O=Le("Cancel"),w(n,"type","hidden"),w(n,"name","_method"),n.value="patch",w(r,"type","hidden"),w(r,"name","authenticity_token"),r.value=e[2],w(d,"class","col-form-label"),w(d,"for","code"),w(v,"class","form-control"),w(v,"type","text"),w(v,"name","code"),w(v,"id","code"),v.value=e[5],w(l,"class","form-group"),w(E,"type","submit"),w(E,"name","commit"),E.value="Proceed",w(E,"class","btn btn-success"),w(D,"class","btn btn-warning"),w(D,"data-method","delete"),w(D,"href",e[6]),cr(D,"background","#efefef"),cr(D,"color","#333333"),w(A,"class","form-group"),cr(A,"display","flex"),cr(A,"gap","5px"),w(t,"action",e[4]),w(t,"method","post")},m(j,H){ce(j,t,H),m(t,n),m(t,i),m(t,r),m(t,a),m(t,s),s.innerHTML=e[3],m(t,o),m(t,l),m(l,d),m(l,c),m(l,v),m(t,T),M&&M.m(t,null),m(t,b),m(t,A),m(A,E),m(A,y),L.m(A,null),m(A,I),m(A,D),m(D,O)},p(j,[H]){H&4&&(r.value=j[2]),H&8&&(s.innerHTML=j[3]),H&32&&v.value!==j[5]&&(v.value=j[5]),j[1]<=0?M||(M=c4(),M.c(),M.m(t,b)):M&&(M.d(1),M=null),$===($=F(j))&&L?L.p(j,H):(L.d(1),L=$(j),L&&(L.c(),L.m(A,I))),H&64&&w(D,"href",j[6]),H&16&&w(t,"action",j[4])},i:ot,o:ot,d(j){j&&_e(t),M&&M.d(),L.d()}}}function iIe(e,t,n){let{authenticityToken:i}=t,{description:r}=t,{smsConfirmationsPath:a}=t,{smsCode:s}=t,{cancelPath:o}=t,{secondsTillNewCode:l}=t,{secondsTillCodeExpiration:d}=t;return oa(()=>{let c=setInterval(()=>{if(l<=0){clearInterval(c);return}n(0,l-=1)},1e3),v=setInterval(()=>{if(d<=0){clearInterval(v);return}n(1,d-=1)},1e3)}),e.$$set=c=>{"authenticityToken"in c&&n(2,i=c.authenticityToken),"description"in c&&n(3,r=c.description),"smsConfirmationsPath"in c&&n(4,a=c.smsConfirmationsPath),"smsCode"in c&&n(5,s=c.smsCode),"cancelPath"in c&&n(6,o=c.cancelPath),"secondsTillNewCode"in c&&n(0,l=c.secondsTillNewCode),"secondsTillCodeExpiration"in c&&n(1,d=c.secondsTillCodeExpiration)},[l,d,i,r,a,s,o]}class rIe extends Qt{constructor(t){super(),Jt(this,t,iIe,nIe,Kt,{authenticityToken:2,description:3,smsConfirmationsPath:4,smsCode:5,cancelPath:6,secondsTillNewCode:0,secondsTillCodeExpiration:1})}}function _4(e){return{...e,businessStart:zn(e.businessStart,"YYYY-MM-DD").format("MM/DD/YYYY")}}function aIe(e){return{...e,businessStart:zn(e.businessStart,"MM/DD/YYYY").format("YYYY-MM-DD")}}function sIe(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}const H5={No:0,Yes:1},$2={Taxpayer:"taxpayer",Spouse:"spouse"},N2={"S Corporation":"s-corporation","C Corporation":"c-corporation",Partnership:"partnership","Sole Proprietorship":"sole-proprietorship"},F2={Alaska:"AK",Alabama:"AL",Arkansas:"AR","American Samoa":"AS",Arizona:"AZ",California:"CA",Colorado:"CO",Connecticut:"CT","District of Columbia":"DC",Delaware:"DE",Florida:"FL",Georgia:"GA",Guam:"GU",Hawaii:"HI",Iowa:"IA",Idaho:"ID",Illinois:"IL",Indiana:"IN",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Massachusetts:"MA",Maryland:"MD",Maine:"ME",Michigan:"MI",Minnesota:"MN",Missouri:"MO","Northern Mariana Islands":"MP",Mississippi:"MS",Montana:"MT","North Carolina":"NC","North Dakota":"ND",Nebraska:"NE","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM",Nevada:"NV","New York":"NY",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Puerto Rico":"PR","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Virginia:"VA","Virgin Islands":"VI",Vermont:"VT",Washington:"WA",Wisconsin:"WI","West Virginia":"WV",Wyoming:"WY"};let j5=Bs().shape({id:Ps().required(),companyName:Ps().required("Company Name is required."),businessType:Ps().oneOf(Gn.values(N2)).when("owner",{is:"spouse",then:e=>e.notOneOf(["sole-proprietorship"],"Sorry, Tax Planner Pro does not support spousal sole proprietorships yet"),otherwise:e=>e.required("Business Type is required.")}),businessSharePercent:At().min(0,"Min value 0%.").max(100,"Max value 100%.").nullable().transform(Wc),owner:Ps().oneOf(Gn.values($2)).required("Owner is required."),businessStart:Ps().matches(/^([01]?\d)\/([0123]?\d)\/\d\d\d\d$/,"The date must be in US format.").nullable(),payroll:At().min(0,"Enter not negative value please.").nullable().transform(Wc),fixedAssets:At().min(0,"Enter not negative value please.").nullable().transform(Wc),isSpecified:At().oneOf([0,1]).required("Specified Service Business is required."),rentalRealEstate:Nv().required("Rental Real Estate is required."),businessState:Ps().oneOf(Gn.values(F2)).required("Business State is required."),incomeEntries:yp().of(Bs().shape({id:Ps().required(),projection:At().required(),federalOverride:At().nullable().transform(Wc),stateOverride:At().nullable().transform(Wc)})),expenseEntries:yp().of(Bs().shape({id:Ps().required(),projection:At().required(),federalOverride:At().nullable().transform(Wc),stateOverride:At().nullable().transform(Wc)})),totalIncome:Bs().shape({actual:At().nullable(),projection:At().nullable(),federalFinalProjection:At().nullable(),stateFinalProjection:At().nullable()}),totalExpenses:Bs().shape({actual:At().nullable(),projection:At().nullable(),federalFinalProjection:At().nullable(),stateFinalProjection:At().nullable()}),allowableDeductions:Bs().shape({actual:At().nullable(),projection:At().nullable(),federalFinalProjection:At().nullable(),stateFinalProjection:At().nullable()}),netIncome:Bs().shape({actual:At().nullable(),projection:At().nullable(),federalFinalProjection:At().nullable(),stateFinalProjection:At().nullable()}),taxableIncome:Bs().shape({actual:At().nullable(),projection:At().nullable(),federalFinalProjection:At().nullable(),stateFinalProjection:At().nullable()})});const Ns=ao({incomeEntries:[],expenseEntries:[],totalIncome:{},totalExpenses:{},allowableDeductions:{},netIncome:{},taxableIncome:{}}),Hm=vo(Ns,e=>{try{return j5.validateSync(e,{abortEarly:!1}),new Map}catch(t){return new Map(t.inner.map(n=>[sIe(n.path),n.errors[0]]))}}),p4=vo(Ns,e=>{try{return j5.validateSync(e,{abortEarly:!0}),aIe(e)}catch{return null}}),Up=ao(new Set([])),jm=e=>Up.update(t=>new Set([...t,e]));function Wc(e,t){return String(t).trim()===""?null:e}function oIe(e){let t,n;return{c(){t=P("a"),n=Le(e[1]),w(t,"href",e[0]),w(t,"class","tpp-tabs__link")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&2&&vt(n,i[1]),r&1&&w(t,"href",i[0])},d(i){i&&_e(t)}}}function lIe(e){let t,n,i,r,a,s,o=e[3]&&h4();return{c(){t=P("a"),o&&o.c(),n=K(),i=Le(e[1]),w(t,"href",e[0]),w(t,"class",r="tpp-tabs__link "+(e[2]?"tpp-tabs__link_active":"")+" "+(e[3]?"tpp-tabs__link_disabled":""))},m(l,d){ce(l,t,d),o&&o.m(t,null),m(t,n),m(t,i),a||(s=ct(t,"click",Hi(function(){Ga(e[4])&&e[4].apply(this,arguments)})),a=!0)},p(l,d){e=l,e[3]?o||(o=h4(),o.c(),o.m(t,n)):o&&(o.d(1),o=null),d&2&&vt(i,e[1]),d&1&&w(t,"href",e[0]),d&12&&r!==(r="tpp-tabs__link "+(e[2]?"tpp-tabs__link_active":"")+" "+(e[3]?"tpp-tabs__link_disabled":""))&&w(t,"class",r)},d(l){l&&_e(t),o&&o.d(),a=!1,s()}}}function h4(e){let t;return{c(){t=P("i"),w(t,"class","tpp-tabs__link-icon fa fa-lock")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function uIe(e){let t,n;function i(s,o){return o&1&&(t=null),t==null&&(t=!!s[0].startsWith("#")),t?lIe:oIe}let r=i(e,-1),a=r(e);return{c(){a.c(),n=On()},m(s,o){a.m(s,o),ce(s,n,o)},p(s,[o]){r===(r=i(s,o))&&a?a.p(s,o):(a.d(1),a=r(s),a&&(a.c(),a.m(n.parentNode,n)))},i:ot,o:ot,d(s){a.d(s),s&&_e(n)}}}function dIe(e,t,n){let{href:i}=t,{title:r}=t,{isActive:a=!1}=t,{isDisabled:s=!1}=t,{onClick:o}=t;return e.$$set=l=>{"href"in l&&n(0,i=l.href),"title"in l&&n(1,r=l.title),"isActive"in l&&n(2,a=l.isActive),"isDisabled"in l&&n(3,s=l.isDisabled),"onClick"in l&&n(4,o=l.onClick)},[i,r,a,s,o]}class fIe extends Qt{constructor(t){super(),Jt(this,t,dIe,uIe,Kt,{href:0,title:1,isActive:2,isDisabled:3,onClick:4})}}function m4(e,t,n){const i=e.slice();return i[8]=t[n].href,i[9]=t[n].title,i[10]=t[n].isDisabled,i}function g4(e,t){let n,i,r;function a(){return t[6](t[9])}return i=new fIe({props:{href:t[8],title:t[9],isActive:t[0]===t[9],isDisabled:t[10],onClick:a}}),{key:e,first:null,c(){n=On(),re(i.$$.fragment),this.first=n},m(s,o){ce(s,n,o),ae(i,s,o),r=!0},p(s,o){t=s;const l={};o&1&&(l.isActive=t[0]===t[9]),i.$set(l)},i(s){r||(U(i.$$.fragment,s),r=!0)},o(s){W(i.$$.fragment,s),r=!1},d(s){s&&_e(n),se(i,s)}}}function cIe(e){let t,n=[],i=new Map,r,a=e[1];const s=o=>o[9];for(let o=0;o<a.length;o+=1){let l=m4(e,a,o),d=s(l);i.set(d,n[o]=g4(d,l))}return{c(){t=P("nav");for(let o=0;o<n.length;o+=1)n[o].c();w(t,"class","tpp-tabs")},m(o,l){ce(o,t,l);for(let d=0;d<n.length;d+=1)n[d]&&n[d].m(t,null);r=!0},p(o,[l]){l&7&&(a=o[1],pn(),n=o_(n,l,s,1,o,a,i,t,ym,g4,null,m4),hn())},i(o){if(!r){for(let l=0;l<a.length;l+=1)U(n[l]);r=!0}},o(o){for(let l=0;l<n.length;l+=1)W(n[l]);r=!1},d(o){o&&_e(t);for(let l=0;l<n.length;l+=1)n[l].d()}}}function _Ie(e,t,n){let{companyConnectionPath:i}=t,{companyData:r}=t,{sourceType:a}=t,{activeTab:s}=t,l=(v=>{let T=[{href:i,title:"Connection"},{href:"#business-data",title:"Business Data",isDisabled:!r.hasBusinessProjection}];return v==="handy"&&T.push({href:"#income-and-expenses",title:"Income And Expenses",isDisabled:!r.hasBusinessProjection}),T})(a);const d=v=>{n(0,s=v)},c=v=>d(v);return e.$$set=v=>{"companyConnectionPath"in v&&n(3,i=v.companyConnectionPath),"companyData"in v&&n(4,r=v.companyData),"sourceType"in v&&n(5,a=v.sourceType),"activeTab"in v&&n(0,s=v.activeTab)},[s,l,d,i,r,a,c]}class pIe extends Qt{constructor(t){super(),Jt(this,t,_Ie,cIe,Kt,{companyConnectionPath:3,companyData:4,sourceType:5,activeTab:0})}}function v4(e){let t,n,i;return{c(){t=P("label"),n=P("div"),i=Le(e[3]),wt(n,"text-danger",e[5]),w(t,"for",e[6]),w(t,"class","col-form-label tpp-form-label")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&8&&vt(i,r[3]),a&32&&wt(n,"text-danger",r[5]),a&64&&w(t,"for",r[6])},d(r){r&&_e(t)}}}function hIe(e){let t,n,i,r,a,s=e[3]&&v4(e);return{c(){t=P("div"),s&&s.c(),n=K(),i=P("input"),w(i,"id",e[6]),w(i,"data-testid",e[6]),w(i,"type","text"),w(i,"placeholder",e[2]),w(i,"class","form-control string optional"),wt(i,"is-invalid",e[5]),wt(i,"is-valid",e[4])},m(o,l){ce(o,t,l),s&&s.m(t,null),m(t,n),m(t,i),Pn(i,e[7][e[1]]),r||(a=[ct(i,"blur",e[11]),ct(i,"input",e[12])],r=!0)},p(o,[l]){o[3]?s?s.p(o,l):(s=v4(o),s.c(),s.m(t,n)):s&&(s.d(1),s=null),l&64&&w(i,"id",o[6]),l&64&&w(i,"data-testid",o[6]),l&4&&w(i,"placeholder",o[2]),l&130&&i.value!==o[7][o[1]]&&Pn(i,o[7][o[1]]),l&32&&wt(i,"is-invalid",o[5]),l&16&&wt(i,"is-valid",o[4])},i:ot,o:ot,d(o){o&&_e(t),s&&s.d(),r=!1,vi(a)}}}function mIe(e,t,n){let i,r,a,s,o,l,d;Sn(e,Hm,y=>n(9,o=y)),Sn(e,Up,y=>n(10,l=y)),Sn(e,Ns,y=>n(7,d=y));let{key:c}=t,{storeKey:v=Xn.camelCase(c)}=t,{placeholder:T=null}=t,{tooltip:b=null}=t;const A=()=>jm(c);function E(){d[v]=this.value,Ns.set(d)}return e.$$set=y=>{"key"in y&&n(0,c=y.key),"storeKey"in y&&n(1,v=y.storeKey),"placeholder"in y&&n(2,T=y.placeholder),"tooltip"in y&&n(8,b=y.tooltip)},e.$$.update=()=>{e.$$.dirty&1&&n(6,i=`business-projection-${c}`),e.$$.dirty&513&&n(5,r=o.has(c)),e.$$.dirty&1537&&n(4,a=l.has(c)&&!o.has(c)),e.$$.dirty&769&&n(3,s=o.get(c)||b)},[c,v,T,s,a,r,i,d,b,o,l,A,E]}class B5 extends Qt{constructor(t){super(),Jt(this,t,mIe,hIe,Kt,{key:0,storeKey:1,placeholder:2,tooltip:8})}}function b4(e){let t,n,i;return{c(){t=P("label"),n=P("div"),i=Le(e[3]),wt(n,"text-danger",e[5]),w(t,"for",e[6]),w(t,"class","col-form-label tpp-form-label")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&8&&vt(i,r[3]),a&32&&wt(n,"text-danger",r[5]),a&64&&w(t,"for",r[6])},d(r){r&&_e(t)}}}function gIe(e){let t,n,i,r,a,s=e[3]&&b4(e);return{c(){t=P("div"),s&&s.c(),n=K(),i=P("input"),w(i,"id",e[6]),w(i,"data-testid",e[6]),w(i,"type","number"),w(i,"placeholder",e[2]),i.value=e[7],w(i,"class","form-control string optional"),wt(i,"is-invalid",e[5]),wt(i,"is-valid",e[4])},m(o,l){ce(o,t,l),s&&s.m(t,null),m(t,n),m(t,i),r||(a=[ct(i,"input",function(){Ga(e[1])&&e[1].apply(this,arguments)}),ct(i,"blur",e[14])],r=!0)},p(o,[l]){e=o,e[3]?s?s.p(e,l):(s=b4(e),s.c(),s.m(t,n)):s&&(s.d(1),s=null),l&64&&w(i,"id",e[6]),l&64&&w(i,"data-testid",e[6]),l&4&&w(i,"placeholder",e[2]),l&128&&i.value!==e[7]&&(i.value=e[7]),l&32&&wt(i,"is-invalid",e[5]),l&16&&wt(i,"is-valid",e[4])},i:ot,o:ot,d(o){o&&_e(t),s&&s.d(),r=!1,vi(a)}}}function vIe(e,t,n){let i,r,a,s,o,l,d,c;Sn(e,Hm,D=>n(11,l=D)),Sn(e,Up,D=>n(12,d=D)),Sn(e,Ns,D=>n(13,c=D));let{key:v}=t,{storeKey:T=Xn.camelCase(v)}=t,{getter:b=()=>c[T]}=t,{setter:A=D=>$s(Ns,c[T]=D.target.value,c)}=t,{placeholder:E=null}=t,{tooltip:y=null}=t;const I=()=>jm(v);return e.$$set=D=>{"key"in D&&n(0,v=D.key),"storeKey"in D&&n(8,T=D.storeKey),"getter"in D&&n(9,b=D.getter),"setter"in D&&n(1,A=D.setter),"placeholder"in D&&n(2,E=D.placeholder),"tooltip"in D&&n(10,y=D.tooltip)},e.$$.update=()=>{e.$$.dirty&8960&&n(7,i=b&&!Xn.isNil(b())?b():c[T]),e.$$.dirty&1&&n(6,r=`business-projection-${v}`),e.$$.dirty&2049&&n(5,a=l.has(v)),e.$$.dirty&6145&&n(4,s=d.has(v)&&!l.has(v)),e.$$.dirty&3073&&n(3,o=l.get(v)||y)},[v,A,E,o,s,a,r,i,T,b,y,l,d,c,I]}let Id=class extends Qt{constructor(t){super(),Jt(this,t,vIe,gIe,Kt,{key:0,storeKey:8,getter:9,setter:1,placeholder:2,tooltip:10})}};function y4(e){let t,n,i;return{c(){t=P("label"),n=P("div"),i=Le(e[6]),wt(n,"text-danger",e[8]),w(t,"for",e[9]),w(t,"class","col-form-label tpp-form-label")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&64&&vt(i,r[6]),a&256&&wt(n,"text-danger",r[8]),a&512&&w(t,"for",r[9])},d(r){r&&_e(t)}}}function bIe(e){let t,n,i,r,a,s,o,l,d,c=e[6]&&y4(e);return{c(){t=P("div"),n=P("div"),c&&c.c(),i=K(),r=P("div"),a=P("input"),s=K(),o=P("div"),o.innerHTML='<span class="input-group-text border-left-0 rounded-right"><i class="fa fa-calendar"></i></span>',w(a,"id",e[9]),w(a,"data-testid",e[9]),w(a,"class","form-control"),w(a,"placeholder",e[2]),wt(a,"is-invalid",e[8]),wt(a,"is-valid",e[7]),w(o,"class","input-group-prepend"),w(r,"class","input-group date"),w(r,"data-provide","datepicker"),w(r,"data-format",e[3]),w(n,"class","col-sm-12"),w(t,"class","row")},m(v,T){ce(v,t,T),m(t,n),c&&c.m(n,null),m(n,i),m(n,r),m(r,a),Pn(a,e[5][e[1]]),m(r,s),m(r,o),e[15](r),l||(d=[ct(a,"blur",e[13]),ct(a,"input",e[14])],l=!0)},p(v,[T]){v[6]?c?c.p(v,T):(c=y4(v),c.c(),c.m(n,i)):c&&(c.d(1),c=null),T&512&&w(a,"id",v[9]),T&512&&w(a,"data-testid",v[9]),T&4&&w(a,"placeholder",v[2]),T&34&&a.value!==v[5][v[1]]&&Pn(a,v[5][v[1]]),T&256&&wt(a,"is-invalid",v[8]),T&128&&wt(a,"is-valid",v[7]),T&8&&w(r,"data-format",v[3])},i:ot,o:ot,d(v){v&&_e(t),c&&c.d(),e[15](null),l=!1,vi(d)}}}function yIe(e,t,n){let i,r,a,s,o,l,d;Sn(e,Ns,O=>n(5,o=O)),Sn(e,Hm,O=>n(11,l=O)),Sn(e,Up,O=>n(12,d=O));let{key:c}=t,{storeKey:v=Xn.camelCase(c)}=t,{placeholder:T=null}=t,{tooltip:b=null}=t,{dateFormat:A="mm/dd/yyyy"}=t,E;oa(()=>{const O=window.$(E);O.datepicker({autoclose:!0,language:"en",...A?{format:A}:{}}),O.on("changeDate",function(){$s(Ns,o[v]=O.datepicker("getFormattedDate"),o)})});const y=()=>jm(c);function I(){o[v]=this.value,Ns.set(o)}function D(O){Oe[O?"unshift":"push"](()=>{E=O,n(4,E)})}return e.$$set=O=>{"key"in O&&n(0,c=O.key),"storeKey"in O&&n(1,v=O.storeKey),"placeholder"in O&&n(2,T=O.placeholder),"tooltip"in O&&n(10,b=O.tooltip),"dateFormat"in O&&n(3,A=O.dateFormat)},e.$$.update=()=>{e.$$.dirty&50&&window.$(E).datepicker("update",o[v]),e.$$.dirty&1&&n(9,i=`business-projection-${c}`),e.$$.dirty&2049&&n(8,r=l.has(c)),e.$$.dirty&6145&&n(7,a=d.has(c)&&!l.has(c)),e.$$.dirty&3073&&n(6,s=l.get(c)||b)},[c,v,T,A,E,o,s,a,r,i,b,l,d,y,I,D]}class U5 extends Qt{constructor(t){super(),Jt(this,t,yIe,bIe,Kt,{key:0,storeKey:1,placeholder:2,tooltip:10,dateFormat:3})}}function w4(e,t,n){const i=e.slice();return i[15]=t[n][0],i[16]=t[n][1],i}function T4(e){let t,n,i;return{c(){t=P("label"),n=P("div"),i=Le(e[5]),wt(n,"text-danger",e[7]),w(t,"for",e[8]),w(t,"class","col-form-label tpp-form-label")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&32&&vt(i,r[5]),a&128&&wt(n,"text-danger",r[7]),a&256&&w(t,"for",r[8])},d(r){r&&_e(t)}}}function k4(e){let t,n,i,r;return{c(){t=P("option"),n=Le("-- "),i=Le(e[3]),r=Le(" --"),t.disabled="",t.__value="",t.value=t.__value},m(a,s){ce(a,t,s),m(t,n),m(t,i),m(t,r)},p(a,s){s&8&&vt(i,a[3])},d(a){a&&_e(t)}}}function S4(e){let t,n=e[15]+"",i,r;return{c(){t=P("option"),i=Le(n),t.__value=r=e[16],t.value=t.__value},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s&4&&n!==(n=a[15]+"")&&vt(i,n),s&4&&r!==(r=a[16])&&(t.__value=r,t.value=t.__value)},d(a){a&&_e(t)}}}function wIe(e){let t,n,i,r,a,s,o,l=e[5]&&T4(e),d=e[3]&&k4(e),c=Object.entries(e[2]),v=[];for(let T=0;T<c.length;T+=1)v[T]=S4(w4(e,c,T));return{c(){t=P("div"),l&&l.c(),n=K(),i=P("select"),d&&d.c(),r=On();for(let T=0;T<v.length;T+=1)v[T].c();a=P("span"),w(a,"class","form-text"),i.disabled=e[4],w(i,"id",e[8]),w(i,"data-testid",e[8]),w(i,"class","form-control select"),e[9][e[1]]===void 0&&xa(()=>e[14].call(i)),wt(i,"is-invalid",e[7]),wt(i,"is-valid",e[6])},m(T,b){ce(T,t,b),l&&l.m(t,null),m(t,n),m(t,i),d&&d.m(i,null),m(i,r);for(let A=0;A<v.length;A+=1)v[A]&&v[A].m(i,null);m(i,a),Es(i,e[9][e[1]],!0),s||(o=[ct(i,"blur",e[13]),ct(i,"change",e[14])],s=!0)},p(T,[b]){if(T[5]?l?l.p(T,b):(l=T4(T),l.c(),l.m(t,n)):l&&(l.d(1),l=null),T[3]?d?d.p(T,b):(d=k4(T),d.c(),d.m(i,r)):d&&(d.d(1),d=null),b&4){c=Object.entries(T[2]);let A;for(A=0;A<c.length;A+=1){const E=w4(T,c,A);v[A]?v[A].p(E,b):(v[A]=S4(E),v[A].c(),v[A].m(i,a))}for(;A<v.length;A+=1)v[A].d(1);v.length=c.length}b&16&&(i.disabled=T[4]),b&256&&w(i,"id",T[8]),b&256&&w(i,"data-testid",T[8]),b&518&&Es(i,T[9][T[1]]),b&128&&wt(i,"is-invalid",T[7]),b&64&&wt(i,"is-valid",T[6])},i:ot,o:ot,d(T){T&&_e(t),l&&l.d(),d&&d.d(),Nn(v,T),s=!1,vi(o)}}}function TIe(e,t,n){let i,r,a,s,o,l,d;Sn(e,Hm,D=>n(11,o=D)),Sn(e,Up,D=>n(12,l=D)),Sn(e,Ns,D=>n(9,d=D));let{key:c}=t,{storeKey:v=Xn.camelCase(c)}=t,{options:T=[]}=t,{caption:b=null}=t,{tooltip:A=null}=t,{selectDisabled:E=!1}=t;const y=()=>jm(c);function I(){d[v]=Cd(this),Ns.set(d),n(2,T)}return e.$$set=D=>{"key"in D&&n(0,c=D.key),"storeKey"in D&&n(1,v=D.storeKey),"options"in D&&n(2,T=D.options),"caption"in D&&n(3,b=D.caption),"tooltip"in D&&n(10,A=D.tooltip),"selectDisabled"in D&&n(4,E=D.selectDisabled)},e.$$.update=()=>{e.$$.dirty&1&&n(8,i=`business-projection-${c}`),e.$$.dirty&2049&&n(7,r=o.has(c)),e.$$.dirty&6145&&n(6,a=l.has(c)&&!o.has(c)),e.$$.dirty&3073&&n(5,s=o.get(c)||A)},[c,v,T,b,E,s,a,r,i,d,A,o,l,y,I]}class sc extends Qt{constructor(t){super(),Jt(this,t,TIe,wIe,Kt,{key:0,storeKey:1,options:2,caption:3,tooltip:10,selectDisabled:4})}}function C4(e){let t,n,i;return{c(){t=P("label"),n=P("div"),i=Le(e[2]),wt(n,"text-danger",e[4]),w(t,"for",e[5]),w(t,"class","col-form-label tpp-form-label")},m(r,a){ce(r,t,a),m(t,n),m(n,i)},p(r,a){a&4&&vt(i,r[2]),a&16&&wt(n,"text-danger",r[4]),a&32&&w(t,"for",r[5])},d(r){r&&_e(t)}}}function kIe(e){let t,n,i,r,a,s=e[2]&&C4(e);return{c(){t=P("div"),s&&s.c(),n=K(),i=P("input"),w(i,"id",e[5]),w(i,"data-testid",e[5]),w(i,"type","checkbox"),wt(i,"is-invalid",e[4]),wt(i,"is-valid",e[3])},m(o,l){ce(o,t,l),s&&s.m(t,null),m(t,n),m(t,i),i.checked=e[6][e[1]],r||(a=[ct(i,"blur",e[10]),ct(i,"change",e[11])],r=!0)},p(o,[l]){o[2]?s?s.p(o,l):(s=C4(o),s.c(),s.m(t,n)):s&&(s.d(1),s=null),l&32&&w(i,"id",o[5]),l&32&&w(i,"data-testid",o[5]),l&66&&(i.checked=o[6][o[1]]),l&16&&wt(i,"is-invalid",o[4]),l&8&&wt(i,"is-valid",o[3])},i:ot,o:ot,d(o){o&&_e(t),s&&s.d(),r=!1,vi(a)}}}function SIe(e,t,n){let i,r,a,s,o,l,d;Sn(e,Hm,E=>n(8,o=E)),Sn(e,Up,E=>n(9,l=E)),Sn(e,Ns,E=>n(6,d=E));let{key:c}=t,{storeKey:v=Xn.camelCase(c)}=t,{tooltip:T=null}=t;const b=()=>jm(c);function A(){d[v]=this.checked,Ns.set(d)}return e.$$set=E=>{"key"in E&&n(0,c=E.key),"storeKey"in E&&n(1,v=E.storeKey),"tooltip"in E&&n(7,T=E.tooltip)},e.$$.update=()=>{e.$$.dirty&1&&n(5,i=`business-projection-${c}`),e.$$.dirty&257&&n(4,r=o.has(c)),e.$$.dirty&769&&n(3,a=l.has(c)&&!o.has(c)),e.$$.dirty&385&&n(2,s=o.get(c)||T)},[c,v,s,a,r,i,d,T,o,l,b,A]}class q5 extends Qt{constructor(t){super(),Jt(this,t,SIe,kIe,Kt,{key:0,storeKey:1,tooltip:7})}}function CIe(e){let t;return{c(){t=Le("Ownership, %:")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function PIe(e){let t;return{c(){t=Le("Dividends Distribution, %:")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function P4(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j;return a=new Id({props:{key:"payroll",placeholder:"0"}}),v=new Id({props:{key:"fixed-assets",placeholder:"0"}}),I=new sc({props:{key:"is-specified",options:H5}}),L=new q5({props:{key:"rental-real-estate"}}),{c(){t=P("tr"),n=P("td"),n.textContent="Payroll:",i=K(),r=P("td"),re(a.$$.fragment),s=K(),o=P("tr"),l=P("td"),l.textContent="Fixed Assets:",d=K(),c=P("td"),re(v.$$.fragment),T=K(),b=P("tr"),A=P("td"),A.textContent="Specified Service Business:",E=K(),y=P("td"),re(I.$$.fragment),D=K(),O=P("tr"),M=P("td"),M.textContent="Rental Real Estate Business:",F=K(),$=P("td"),re(L.$$.fragment),w(n,"class","projection-row__title"),w(t,"class","projection-row"),w(l,"class","projection-row__title"),w(o,"class","projection-row"),w(A,"class","projection-row__title"),w(b,"class","projection-row"),w(M,"class","projection-row__title"),w(O,"class","projection-row")},m(H,V){ce(H,t,V),m(t,n),m(t,i),m(t,r),ae(a,r,null),ce(H,s,V),ce(H,o,V),m(o,l),m(o,d),m(o,c),ae(v,c,null),ce(H,T,V),ce(H,b,V),m(b,A),m(b,E),m(b,y),ae(I,y,null),ce(H,D,V),ce(H,O,V),m(O,M),m(O,F),m(O,$),ae(L,$,null),j=!0},p:ot,i(H){j||(U(a.$$.fragment,H),U(v.$$.fragment,H),U(I.$$.fragment,H),U(L.$$.fragment,H),j=!0)},o(H){W(a.$$.fragment,H),W(v.$$.fragment,H),W(I.$$.fragment,H),W(L.$$.fragment,H),j=!1},d(H){H&&_e(t),se(a),H&&_e(s),H&&_e(o),se(v),H&&_e(T),H&&_e(b),se(I),H&&_e(D),H&&_e(O),se(L)}}}function EIe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we;function Ve(Je,pt){return Je[1].isCCorp?PIe:CIe}let Ke=Ve(e),yt=Ke(e);o=new Id({props:{key:"business-share-percent",placeholder:"100"}}),b=new sc({props:{key:"owner",options:$2}}),O=new B5({props:{key:"company-name"}}),H=new sc({props:{key:"business-type",options:N2}}),be=new sc({props:{selectDisabled:!0,key:"business-state",options:F2}}),G=new U5({props:{key:"business-start"}});let ht=!e[1].isCCorp&&P4();return{c(){t=P("table"),n=P("tbody"),i=P("tr"),r=P("td"),yt.c(),a=K(),s=P("td"),re(o.$$.fragment),l=K(),d=P("tr"),c=P("td"),c.textContent="Owner:",v=K(),T=P("td"),re(b.$$.fragment),A=K(),E=P("tr"),y=P("td"),y.textContent="Company Name:",I=K(),D=P("td"),re(O.$$.fragment),M=K(),F=P("tr"),$=P("td"),$.textContent="Business Type:",L=K(),j=P("td"),re(H.$$.fragment),V=K(),Q=P("tr"),X=P("td"),X.textContent="State:",te=K(),ne=P("td"),re(be.$$.fragment),ue=K(),Ce=P("small"),ie=Le("* For now, the state can only be changed for the entire "),Y=P("a"),he=Le("personal projection"),Me=K(),Pe=P("tr"),We=P("td"),We.textContent="Business Start:",qe=K(),ee=P("td"),re(G.$$.fragment),me=K(),ht&&ht.c(),Te=K(),De=P("tr"),De.innerHTML=`<td></td> 
      <td><small>* Enter total amounts for this year</small></td>`,w(r,"class","projection-row__title"),w(i,"class","projection-row"),w(c,"class","projection-row__title"),w(d,"class","projection-row"),w(y,"class","projection-row__title"),w(E,"class","projection-row"),w($,"class","projection-row__title"),w(F,"class","projection-row"),w(X,"class","projection-row__title"),w(Y,"href",e[0]),w(Y,"class","svelte-a6mivw"),w(Q,"class","projection-row"),w(We,"class","projection-row__title"),w(Pe,"class","projection-row"),w(t,"class","table business-projection-form")},m(Je,pt){ce(Je,t,pt),m(t,n),m(n,i),m(i,r),yt.m(r,null),m(i,a),m(i,s),ae(o,s,null),m(n,l),m(n,d),m(d,c),m(d,v),m(d,T),ae(b,T,null),m(n,A),m(n,E),m(E,y),m(E,I),m(E,D),ae(O,D,null),m(n,M),m(n,F),m(F,$),m(F,L),m(F,j),ae(H,j,null),m(n,V),m(n,Q),m(Q,X),m(Q,te),m(Q,ne),ae(be,ne,null),m(ne,ue),m(ne,Ce),m(Ce,ie),m(Ce,Y),m(Y,he),m(n,Me),m(n,Pe),m(Pe,We),m(Pe,qe),m(Pe,ee),ae(G,ee,null),m(n,me),ht&&ht.m(n,null),m(n,Te),m(n,De),we=!0},p(Je,[pt]){Ke!==(Ke=Ve(Je))&&(yt.d(1),yt=Ke(Je),yt&&(yt.c(),yt.m(r,null))),(!we||pt&1)&&w(Y,"href",Je[0]),Je[1].isCCorp?ht&&(pn(),W(ht,1,1,()=>{ht=null}),hn()):ht?(ht.p(Je,pt),pt&2&&U(ht,1)):(ht=P4(),ht.c(),U(ht,1),ht.m(n,Te))},i(Je){we||(U(o.$$.fragment,Je),U(b.$$.fragment,Je),U(O.$$.fragment,Je),U(H.$$.fragment,Je),U(be.$$.fragment,Je),U(G.$$.fragment,Je),U(ht),we=!0)},o(Je){W(o.$$.fragment,Je),W(b.$$.fragment,Je),W(O.$$.fragment,Je),W(H.$$.fragment,Je),W(be.$$.fragment,Je),W(G.$$.fragment,Je),W(ht),we=!1},d(Je){Je&&_e(t),yt.d(),se(o),se(b),se(O),se(H),se(be),se(G),ht&&ht.d()}}}function IIe(e,t,n){let i;Sn(e,Ns,a=>n(1,i=a));let{personalProjectionPath:r}=t;return e.$$set=a=>{"personalProjectionPath"in a&&n(0,r=a.personalProjectionPath)},[r,i]}class AIe extends Qt{constructor(t){super(),Jt(this,t,IIe,EIe,Kt,{personalProjectionPath:0})}}function E4(e,t,n){const i=e.slice();return i[14]=t[n],i[15]=t,i[16]=n,i}function I4(e,t,n){const i=e.slice();return i[14]=t[n],i[17]=t,i[16]=n,i}function A4(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$;return a=new Id({props:{key:"payroll",placeholder:"0"}}),c=new Id({props:{key:"fixed-assets",placeholder:"0"}}),y=new sc({props:{key:"is-specified",options:H5}}),F=new q5({props:{key:"rental-real-estate"}}),{c(){t=P("tr"),n=P("td"),n.textContent="Payroll:",i=K(),r=P("td"),re(a.$$.fragment),s=K(),o=P("td"),o.textContent="Fixed Assets:",l=K(),d=P("td"),re(c.$$.fragment),v=K(),T=P("tr"),b=P("td"),b.textContent="Specified Service Business:",A=K(),E=P("td"),re(y.$$.fragment),I=K(),D=P("td"),D.textContent="Rental Real Estate Business:",O=K(),M=P("td"),re(F.$$.fragment),w(n,"class","projection-row__title"),w(o,"class","projection-row__title"),w(t,"class","projection-row__settings"),w(b,"class","projection-row__title"),w(D,"class","projection-row__title"),w(T,"class","projection-row__settings")},m(L,j){ce(L,t,j),m(t,n),m(t,i),m(t,r),ae(a,r,null),m(t,s),m(t,o),m(t,l),m(t,d),ae(c,d,null),ce(L,v,j),ce(L,T,j),m(T,b),m(T,A),m(T,E),ae(y,E,null),m(T,I),m(T,D),m(T,O),m(T,M),ae(F,M,null),$=!0},p:ot,i(L){$||(U(a.$$.fragment,L),U(c.$$.fragment,L),U(y.$$.fragment,L),U(F.$$.fragment,L),$=!0)},o(L){W(a.$$.fragment,L),W(c.$$.fragment,L),W(y.$$.fragment,L),W(F.$$.fragment,L),$=!1},d(L){L&&_e(t),se(a),se(c),L&&_e(v),L&&_e(T),se(y),se(F)}}}function D4(e){let t,n,i=e[14].name+"",r,a,s,o,l=(e[14].actual!=null?e[5](e[14].actual):"")+"",d,c,v,T=(e[14].projection!=null?e[5](e[14].projection):"")+"",b,A,E,y,I,D,O,M;function F(){return e[6](e[14])}function $(...H){return e[7](e[14],e[17],e[16],...H)}y=new Id({props:{key:"income-entries-"+e[16]+"-federal-override",getter:F,setter:$,placeholder:e[5](e[14].projection)}});function L(){return e[8](e[14])}function j(...H){return e[9](e[14],e[17],e[16],...H)}return O=new Id({props:{key:"income-entries-"+e[16]+"-state-override",getter:L,setter:j,placeholder:e[5](e[14].projection)}}),{c(){t=P("tr"),n=P("td"),r=Le(i),a=Le(": "),s=K(),o=P("td"),d=Le(l),c=K(),v=P("td"),b=Le(T),A=K(),E=P("td"),re(y.$$.fragment),I=K(),D=P("td"),re(O.$$.fragment),w(n,"class","projection-row__title"),w(t,"class","projection-row")},m(H,V){ce(H,t,V),m(t,n),m(n,r),m(n,a),m(t,s),m(t,o),m(o,d),m(t,c),m(t,v),m(v,b),m(t,A),m(t,E),ae(y,E,null),m(t,I),m(t,D),ae(O,D,null),M=!0},p(H,V){e=H,(!M||V&4)&&i!==(i=e[14].name+"")&&vt(r,i),(!M||V&4)&&l!==(l=(e[14].actual!=null?e[5](e[14].actual):"")+"")&&vt(d,l),(!M||V&4)&&T!==(T=(e[14].projection!=null?e[5](e[14].projection):"")+"")&&vt(b,T);const Q={};V&4&&(Q.getter=F),V&4&&(Q.setter=$),V&4&&(Q.placeholder=e[5](e[14].projection)),y.$set(Q);const X={};V&4&&(X.getter=L),V&4&&(X.setter=j),V&4&&(X.placeholder=e[5](e[14].projection)),O.$set(X)},i(H){M||(U(y.$$.fragment,H),U(O.$$.fragment,H),M=!0)},o(H){W(y.$$.fragment,H),W(O.$$.fragment,H),M=!1},d(H){H&&_e(t),se(y),se(O)}}}function O4(e){let t,n,i=e[14].name+"",r,a,s,o,l=(e[14].actual!=null?e[5](e[14].actual*-1):"")+"",d,c,v,T=(e[14].projection!=null?e[5](e[14].projection*-1):"")+"",b,A,E,y,I,D,O,M;function F(){return e[10](e[14])}function $(...H){return e[11](e[14],e[15],e[16],...H)}y=new Id({props:{key:"expense-entries-"+e[16]+"-federal-override",getter:F,setter:$,placeholder:e[5](e[14].projection*-1)}});function L(){return e[12](e[14])}function j(...H){return e[13](e[14],e[15],e[16],...H)}return O=new Id({props:{key:"expense-entries-"+e[16]+"-state-override",getter:L,setter:j,placeholder:e[5](e[14].projection*-1)}}),{c(){t=P("tr"),n=P("td"),r=Le(i),a=Le(": "),s=K(),o=P("td"),d=Le(l),c=K(),v=P("td"),b=Le(T),A=K(),E=P("td"),re(y.$$.fragment),I=K(),D=P("td"),re(O.$$.fragment),w(n,"class","projection-row__title"),w(t,"class","projection-row")},m(H,V){ce(H,t,V),m(t,n),m(n,r),m(n,a),m(t,s),m(t,o),m(o,d),m(t,c),m(t,v),m(v,b),m(t,A),m(t,E),ae(y,E,null),m(t,I),m(t,D),ae(O,D,null),M=!0},p(H,V){e=H,(!M||V&4)&&i!==(i=e[14].name+"")&&vt(r,i),(!M||V&4)&&l!==(l=(e[14].actual!=null?e[5](e[14].actual*-1):"")+"")&&vt(d,l),(!M||V&4)&&T!==(T=(e[14].projection!=null?e[5](e[14].projection*-1):"")+"")&&vt(b,T);const Q={};V&4&&(Q.getter=F),V&4&&(Q.setter=$),V&4&&(Q.placeholder=e[5](e[14].projection*-1)),y.$set(Q);const X={};V&4&&(X.getter=L),V&4&&(X.setter=j),V&4&&(X.placeholder=e[5](e[14].projection*-1)),O.$set(X)},i(H){M||(U(y.$$.fragment,H),U(O.$$.fragment,H),M=!0)},o(H){W(y.$$.fragment,H),W(O.$$.fragment,H),M=!1},d(H){H&&_e(t),se(y),se(O)}}}function DIe(e){let t;return{c(){t=Le("Ownership, %:")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function OIe(e){let t;return{c(){t=Le("Dividends Distribution, %:")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function MIe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne,be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je=new Date(new Date(e[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"",pt,Tt,it,Ge,st=new Date(new Date(e[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"",It,Ct,bt,Rt,cn,nn=new Date(new Date(e[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"",Qe,Ft,Fn,He,Dt,Xt,Mt,Xe,Nt=(e[2].totalIncome.actual!=null?e[5](e[2].totalIncome.actual):"")+"",on,In,dt,Zt=(e[2].totalIncome.projection!=null?e[5](e[2].totalIncome.projection):"")+"",Ln,xn,Dn,Un=(e[2].totalIncome.federalFinalProjection!=null?e[5](e[2].totalIncome.federalFinalProjection):"")+"",qn,ft,ni,Et=(e[2].totalIncome.stateFinalProjection!=null?e[5](e[2].totalIncome.stateFinalProjection):"")+"",un,Ai,St,sn,ci,pi,Pi,$i,ji,ri=(e[2].totalExpenses.actual!=null?e[5](e[2].totalExpenses.actual*-1):"")+"",tr,Ei,Ti,kn=(e[2].totalExpenses.projection!=null?e[5](e[2].totalExpenses.projection*-1):"")+"",Rn,ki,mr,_r=(e[2].totalExpenses.federalFinalProjection!=null?e[5](e[2].totalExpenses.federalFinalProjection*-1):"")+"",Mi,di,Yi,na=(e[2].totalExpenses.stateFinalProjection!=null?e[5](e[2].totalExpenses.stateFinalProjection*-1):"")+"",Ki,Rr,Di,Wi,Bi,_a,xi=(e[2].allowableDeductions.actual!=null?e[5](e[2].allowableDeductions.actual*-1):"")+"",Kr,kr,Ji,ia=(e[2].allowableDeductions.projection!=null?e[5](e[2].allowableDeductions.projection*-1):"")+"",la,Ir,Ur,qr=(e[2].allowableDeductions.federalFinalProjection!=null?e[5](e[2].allowableDeductions.federalFinalProjection*-1):"")+"",Ht,et,ln,Vi=(e[2].allowableDeductions.stateFinalProjection!=null?e[5](e[2].allowableDeductions.stateFinalProjection*-1):"")+"",Ar,vr,ir,Si,pr,yi,Dr,Wr,Sr=(e[2].netIncome.actual!=null?e[5](e[2].netIncome.actual):"")+"",hr,Vn,dn,wr=(e[2].netIncome.projection!=null?e[5](e[2].netIncome.projection):"")+"",Bn,ra,_n,Vr=(e[2].netIncome.federalFinalProjection!=null?e[5](e[2].netIncome.federalFinalProjection):"")+"",rr,Or,Ui,Fr=(e[2].netIncome.stateFinalProjection!=null?e[5](e[2].netIncome.stateFinalProjection):"")+"",wi,Ni,ar,sr,Gi,Cr,or=(e[2].taxableIncome.actual!=null?e[5](e[2].taxableIncome.actual):"")+"",lr,Ka,Lr,nr=(e[2].taxableIncome.projection!=null?e[5](e[2].taxableIncome.projection):"")+"",wa,zr,Ze,tn=(e[2].taxableIncome.federalFinalProjection!=null?e[5](e[2].taxableIncome.federalFinalProjection):"")+"",Xr,ur,Hr,Xi=(e[2].taxableIncome.stateFinalProjection!=null?e[5](e[2].taxableIncome.stateFinalProjection):"")+"",dr,pa,qt,mn,ai,Ra,aa,ga,Ta,va=e[2].businessSharePercent+"",$r,ua,an,gi=e[2].businessSharePercent+"",jr,Ia,Xa,Ha=e[2].businessSharePercent+"",$a,Ii;o=new sc({props:{key:"owner",options:$2}}),T=new B5({props:{key:"company-name"}}),D=new sc({props:{key:"business-type",options:N2}}),L=new U5({props:{key:"business-start"}});let br=!e[2].isCCorp&&A4();ne=new sc({props:{selectDisabled:!0,key:"business-state",options:F2}});let Aa=e[2].incomeEntries,Vt=[];for(let nt=0;nt<Aa.length;nt+=1)Vt[nt]=D4(I4(e,Aa,nt));const _i=nt=>W(Vt[nt],1,1,()=>{Vt[nt]=null});let xe=e[2].expenseEntries,Ue=[];for(let nt=0;nt<xe.length;nt+=1)Ue[nt]=O4(E4(e,xe,nt));const pe=nt=>W(Ue[nt],1,1,()=>{Ue[nt]=null});function Ae(nt,jt){return nt[2].isCCorp?OIe:DIe}let at=Ae(e),gt=at(e);return aa=new Id({props:{key:"business-share-percent",placeholder:"100"}}),{c(){t=P("table"),n=P("tbody"),i=P("tr"),r=P("td"),r.textContent="Owner:",a=K(),s=P("td"),re(o.$$.fragment),l=K(),d=P("td"),d.textContent="Company Name:",c=K(),v=P("td"),re(T.$$.fragment),b=K(),A=P("tr"),E=P("td"),E.textContent="Business Type:",y=K(),I=P("td"),re(D.$$.fragment),O=K(),M=P("td"),M.textContent="Business Start:",F=K(),$=P("td"),re(L.$$.fragment),j=K(),br&&br.c(),H=K(),V=P("tr"),Q=P("td"),Q.textContent="State:",X=K(),te=P("td"),re(ne.$$.fragment),be=K(),ue=P("small"),Ce=Le("* For now, the state can only be changed for the entire "),ie=P("a"),Y=Le("personal projection"),he=K(),Me=P("tr"),Pe=P("th"),Pe.innerHTML='<h1 class="projection-row__header">Income</h1>',We=K(),qe=P("th"),ee=Le("In "),G=Le(e[0]),me=Le(" ("),Te=Le(e[4]),De=Le(" - "),we=Le(e[3]),Ve=Le(" data is considered)"),Ke=K(),yt=P("th"),ht=Le("Projected Amounts for "),pt=Le(Je),Tt=K(),it=P("th"),Ge=Le("Override Projected Amounts for "),It=Le(st),Ct=Le(" (Federal)"),bt=K(),Rt=P("th"),cn=Le("Override Projected Amounts for "),Qe=Le(nn),Ft=Le(" (State)"),Fn=K();for(let nt=0;nt<Vt.length;nt+=1)Vt[nt].c();He=K(),Dt=P("tr"),Xt=P("td"),Xt.textContent="Total Income: ",Mt=K(),Xe=P("td"),on=Le(Nt),In=K(),dt=P("td"),Ln=Le(Zt),xn=K(),Dn=P("td"),qn=Le(Un),ft=K(),ni=P("td"),un=Le(Et),Ai=K(),St=P("tr"),St.innerHTML='<td class="project-row__no-line-before" colspan="4"><h1 class="projection-row__header">Deductions</h1></td>',sn=K();for(let nt=0;nt<Ue.length;nt+=1)Ue[nt].c();ci=K(),pi=P("tr"),Pi=P("td"),Pi.textContent="Total Deductions: ",$i=K(),ji=P("td"),tr=Le(ri),Ei=K(),Ti=P("td"),Rn=Le(kn),ki=K(),mr=P("td"),Mi=Le(_r),di=K(),Yi=P("td"),Ki=Le(na),Rr=K(),Di=P("tr"),Wi=P("td"),Wi.textContent="Allowable Deductions: ",Bi=K(),_a=P("td"),Kr=Le(xi),kr=K(),Ji=P("td"),la=Le(ia),Ir=K(),Ur=P("td"),Ht=Le(qr),et=K(),ln=P("td"),Ar=Le(Vi),vr=K(),ir=P("tr"),ir.innerHTML='<td class="project-row__no-line-before" colspan="4"><h1 class="projection-row__header">Net Income Summary</h1></td>',Si=K(),pr=P("tr"),yi=P("td"),yi.textContent="Net Income: ",Dr=K(),Wr=P("td"),hr=Le(Sr),Vn=K(),dn=P("td"),Bn=Le(wr),ra=K(),_n=P("td"),rr=Le(Vr),Or=K(),Ui=P("td"),wi=Le(Fr),Ni=K(),ar=P("tr"),sr=P("td"),sr.textContent="Taxable Income: ",Gi=K(),Cr=P("td"),lr=Le(or),Ka=K(),Lr=P("td"),wa=Le(nr),zr=K(),Ze=P("td"),Xr=Le(tn),ur=K(),Hr=P("td"),dr=Le(Xi),pa=K(),qt=P("tr"),mn=P("td"),gt.c(),ai=K(),Ra=P("td"),re(aa.$$.fragment),ga=K(),Ta=P("td"),$r=Le(va),ua=K(),an=P("td"),jr=Le(gi),Ia=K(),Xa=P("td"),$a=Le(Ha),w(r,"class","projection-row__title"),w(d,"class","projection-row__title"),w(i,"class","projection-row__settings"),w(E,"class","projection-row__title"),w(M,"class","projection-row__title"),w(A,"class","projection-row__settings"),w(Q,"class","projection-row__title"),w(ie,"href",e[1]),w(ie,"class","svelte-vht913"),w(V,"class","projection-row__settings"),w(Pe,"class","project-row__no-line-before"),w(qe,"class","form-inline project-row__no-line-before"),w(yt,"class","project-row__no-line-before"),w(it,"class","project-row__no-line-before"),w(Rt,"class","project-row__no-line-before"),w(Me,"class","projection-row projection-row__calc"),w(Xt,"class","projection-row__title"),w(Dt,"class","projection-row projection-row__total projection-row__total-income"),w(St,"class","projection-row"),w(Pi,"class","projection-row__title"),w(pi,"class","projection-row projection-row__total projection-row__total-deductions"),w(Wi,"class","projection-row__title"),w(Di,"class","projection-row projection-row__total projection-row__allowable-deductions"),w(ir,"class","projection-row"),w(yi,"class","projection-row__title"),w(pr,"class","projection-row projection-row__total projection-row__net-income"),w(sr,"class","projection-row__title"),w(ar,"class","projection-row projection-row__total projection-row__taxable-income"),w(mn,"class","projection-row__title"),w(qt,"class","projection-row"),w(t,"class","table business-projection-form")},m(nt,jt){ce(nt,t,jt),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),ae(o,s,null),m(i,l),m(i,d),m(i,c),m(i,v),ae(T,v,null),m(n,b),m(n,A),m(A,E),m(A,y),m(A,I),ae(D,I,null),m(A,O),m(A,M),m(A,F),m(A,$),ae(L,$,null),m(n,j),br&&br.m(n,null),m(n,H),m(n,V),m(V,Q),m(V,X),m(V,te),ae(ne,te,null),m(te,be),m(te,ue),m(ue,Ce),m(ue,ie),m(ie,Y),m(n,he),m(n,Me),m(Me,Pe),m(Me,We),m(Me,qe),m(qe,ee),m(qe,G),m(qe,me),m(qe,Te),m(qe,De),m(qe,we),m(qe,Ve),m(Me,Ke),m(Me,yt),m(yt,ht),m(yt,pt),m(Me,Tt),m(Me,it),m(it,Ge),m(it,It),m(it,Ct),m(Me,bt),m(Me,Rt),m(Rt,cn),m(Rt,Qe),m(Rt,Ft),m(n,Fn);for(let Yt=0;Yt<Vt.length;Yt+=1)Vt[Yt]&&Vt[Yt].m(n,null);m(n,He),m(n,Dt),m(Dt,Xt),m(Dt,Mt),m(Dt,Xe),m(Xe,on),m(Dt,In),m(Dt,dt),m(dt,Ln),m(Dt,xn),m(Dt,Dn),m(Dn,qn),m(Dt,ft),m(Dt,ni),m(ni,un),m(n,Ai),m(n,St),m(n,sn);for(let Yt=0;Yt<Ue.length;Yt+=1)Ue[Yt]&&Ue[Yt].m(n,null);m(n,ci),m(n,pi),m(pi,Pi),m(pi,$i),m(pi,ji),m(ji,tr),m(pi,Ei),m(pi,Ti),m(Ti,Rn),m(pi,ki),m(pi,mr),m(mr,Mi),m(pi,di),m(pi,Yi),m(Yi,Ki),m(n,Rr),m(n,Di),m(Di,Wi),m(Di,Bi),m(Di,_a),m(_a,Kr),m(Di,kr),m(Di,Ji),m(Ji,la),m(Di,Ir),m(Di,Ur),m(Ur,Ht),m(Di,et),m(Di,ln),m(ln,Ar),m(n,vr),m(n,ir),m(n,Si),m(n,pr),m(pr,yi),m(pr,Dr),m(pr,Wr),m(Wr,hr),m(pr,Vn),m(pr,dn),m(dn,Bn),m(pr,ra),m(pr,_n),m(_n,rr),m(pr,Or),m(pr,Ui),m(Ui,wi),m(n,Ni),m(n,ar),m(ar,sr),m(ar,Gi),m(ar,Cr),m(Cr,lr),m(ar,Ka),m(ar,Lr),m(Lr,wa),m(ar,zr),m(ar,Ze),m(Ze,Xr),m(ar,ur),m(ar,Hr),m(Hr,dr),m(n,pa),m(n,qt),m(qt,mn),gt.m(mn,null),m(qt,ai),m(qt,Ra),ae(aa,Ra,null),m(qt,ga),m(qt,Ta),m(Ta,$r),m(qt,ua),m(qt,an),m(an,jr),m(qt,Ia),m(qt,Xa),m(Xa,$a),Ii=!0},p(nt,[jt]){if(nt[2].isCCorp?br&&(pn(),W(br,1,1,()=>{br=null}),hn()):br?(br.p(nt,jt),jt&4&&U(br,1)):(br=A4(),br.c(),U(br,1),br.m(n,H)),(!Ii||jt&2)&&w(ie,"href",nt[1]),(!Ii||jt&1)&&vt(G,nt[0]),(!Ii||jt&16)&&vt(Te,nt[4]),(!Ii||jt&8)&&vt(we,nt[3]),(!Ii||jt&8)&&Je!==(Je=new Date(new Date(nt[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"")&&vt(pt,Je),(!Ii||jt&8)&&st!==(st=new Date(new Date(nt[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"")&&vt(It,st),(!Ii||jt&8)&&nn!==(nn=new Date(new Date(nt[3]).getFullYear(),11,31).toLocaleDateString("en-US")+"")&&vt(Qe,nn),jt&36){Aa=nt[2].incomeEntries;let Yt;for(Yt=0;Yt<Aa.length;Yt+=1){const Mn=I4(nt,Aa,Yt);Vt[Yt]?(Vt[Yt].p(Mn,jt),U(Vt[Yt],1)):(Vt[Yt]=D4(Mn),Vt[Yt].c(),U(Vt[Yt],1),Vt[Yt].m(n,He))}for(pn(),Yt=Aa.length;Yt<Vt.length;Yt+=1)_i(Yt);hn()}if((!Ii||jt&4)&&Nt!==(Nt=(nt[2].totalIncome.actual!=null?nt[5](nt[2].totalIncome.actual):"")+"")&&vt(on,Nt),(!Ii||jt&4)&&Zt!==(Zt=(nt[2].totalIncome.projection!=null?nt[5](nt[2].totalIncome.projection):"")+"")&&vt(Ln,Zt),(!Ii||jt&4)&&Un!==(Un=(nt[2].totalIncome.federalFinalProjection!=null?nt[5](nt[2].totalIncome.federalFinalProjection):"")+"")&&vt(qn,Un),(!Ii||jt&4)&&Et!==(Et=(nt[2].totalIncome.stateFinalProjection!=null?nt[5](nt[2].totalIncome.stateFinalProjection):"")+"")&&vt(un,Et),jt&36){xe=nt[2].expenseEntries;let Yt;for(Yt=0;Yt<xe.length;Yt+=1){const Mn=E4(nt,xe,Yt);Ue[Yt]?(Ue[Yt].p(Mn,jt),U(Ue[Yt],1)):(Ue[Yt]=O4(Mn),Ue[Yt].c(),U(Ue[Yt],1),Ue[Yt].m(n,ci))}for(pn(),Yt=xe.length;Yt<Ue.length;Yt+=1)pe(Yt);hn()}(!Ii||jt&4)&&ri!==(ri=(nt[2].totalExpenses.actual!=null?nt[5](nt[2].totalExpenses.actual*-1):"")+"")&&vt(tr,ri),(!Ii||jt&4)&&kn!==(kn=(nt[2].totalExpenses.projection!=null?nt[5](nt[2].totalExpenses.projection*-1):"")+"")&&vt(Rn,kn),(!Ii||jt&4)&&_r!==(_r=(nt[2].totalExpenses.federalFinalProjection!=null?nt[5](nt[2].totalExpenses.federalFinalProjection*-1):"")+"")&&vt(Mi,_r),(!Ii||jt&4)&&na!==(na=(nt[2].totalExpenses.stateFinalProjection!=null?nt[5](nt[2].totalExpenses.stateFinalProjection*-1):"")+"")&&vt(Ki,na),(!Ii||jt&4)&&xi!==(xi=(nt[2].allowableDeductions.actual!=null?nt[5](nt[2].allowableDeductions.actual*-1):"")+"")&&vt(Kr,xi),(!Ii||jt&4)&&ia!==(ia=(nt[2].allowableDeductions.projection!=null?nt[5](nt[2].allowableDeductions.projection*-1):"")+"")&&vt(la,ia),(!Ii||jt&4)&&qr!==(qr=(nt[2].allowableDeductions.federalFinalProjection!=null?nt[5](nt[2].allowableDeductions.federalFinalProjection*-1):"")+"")&&vt(Ht,qr),(!Ii||jt&4)&&Vi!==(Vi=(nt[2].allowableDeductions.stateFinalProjection!=null?nt[5](nt[2].allowableDeductions.stateFinalProjection*-1):"")+"")&&vt(Ar,Vi),(!Ii||jt&4)&&Sr!==(Sr=(nt[2].netIncome.actual!=null?nt[5](nt[2].netIncome.actual):"")+"")&&vt(hr,Sr),(!Ii||jt&4)&&wr!==(wr=(nt[2].netIncome.projection!=null?nt[5](nt[2].netIncome.projection):"")+"")&&vt(Bn,wr),(!Ii||jt&4)&&Vr!==(Vr=(nt[2].netIncome.federalFinalProjection!=null?nt[5](nt[2].netIncome.federalFinalProjection):"")+"")&&vt(rr,Vr),(!Ii||jt&4)&&Fr!==(Fr=(nt[2].netIncome.stateFinalProjection!=null?nt[5](nt[2].netIncome.stateFinalProjection):"")+"")&&vt(wi,Fr),(!Ii||jt&4)&&or!==(or=(nt[2].taxableIncome.actual!=null?nt[5](nt[2].taxableIncome.actual):"")+"")&&vt(lr,or),(!Ii||jt&4)&&nr!==(nr=(nt[2].taxableIncome.projection!=null?nt[5](nt[2].taxableIncome.projection):"")+"")&&vt(wa,nr),(!Ii||jt&4)&&tn!==(tn=(nt[2].taxableIncome.federalFinalProjection!=null?nt[5](nt[2].taxableIncome.federalFinalProjection):"")+"")&&vt(Xr,tn),(!Ii||jt&4)&&Xi!==(Xi=(nt[2].taxableIncome.stateFinalProjection!=null?nt[5](nt[2].taxableIncome.stateFinalProjection):"")+"")&&vt(dr,Xi),at!==(at=Ae(nt))&&(gt.d(1),gt=at(nt),gt&&(gt.c(),gt.m(mn,null))),(!Ii||jt&4)&&va!==(va=nt[2].businessSharePercent+"")&&vt($r,va),(!Ii||jt&4)&&gi!==(gi=nt[2].businessSharePercent+"")&&vt(jr,gi),(!Ii||jt&4)&&Ha!==(Ha=nt[2].businessSharePercent+"")&&vt($a,Ha)},i(nt){if(!Ii){U(o.$$.fragment,nt),U(T.$$.fragment,nt),U(D.$$.fragment,nt),U(L.$$.fragment,nt),U(br),U(ne.$$.fragment,nt);for(let jt=0;jt<Aa.length;jt+=1)U(Vt[jt]);for(let jt=0;jt<xe.length;jt+=1)U(Ue[jt]);U(aa.$$.fragment,nt),Ii=!0}},o(nt){W(o.$$.fragment,nt),W(T.$$.fragment,nt),W(D.$$.fragment,nt),W(L.$$.fragment,nt),W(br),W(ne.$$.fragment,nt),Vt=Vt.filter(Boolean);for(let jt=0;jt<Vt.length;jt+=1)W(Vt[jt]);Ue=Ue.filter(Boolean);for(let jt=0;jt<Ue.length;jt+=1)W(Ue[jt]);W(aa.$$.fragment,nt),Ii=!1},d(nt){nt&&_e(t),se(o),se(T),se(D),se(L),br&&br.d(),se(ne),Nn(Vt,nt),Nn(Ue,nt),gt.d(),se(aa)}}}function xIe(e,t,n){let i,r,a;Sn(e,Ns,I=>n(2,a=I));let{sourceTitle:s="QuickBooks"}=t,{personalProjectionPath:o}=t;function l(I){return Er.formatMoney(I,{symbol:"$",precision:0,format:{pos:"%s%v",neg:"(%s%v)",zero:"%s%v"}})}const d=I=>I.federalOverride,c=(I,D,O,M)=>$s(Ns,D[O].federalOverride=M.target.value,a),v=I=>I.stateOverride,T=(I,D,O,M)=>$s(Ns,D[O].stateOverride=M.target.value,a),b=I=>I.federalOverride,A=(I,D,O,M)=>$s(Ns,D[O].federalOverride=M.target.value,a),E=I=>I.stateOverride,y=(I,D,O,M)=>$s(Ns,D[O].stateOverride=M.target.value,a);return e.$$set=I=>{"sourceTitle"in I&&n(0,s=I.sourceTitle),"personalProjectionPath"in I&&n(1,o=I.personalProjectionPath)},e.$$.update=()=>{e.$$.dirty&4&&n(4,i=zn(a.startDate).format("l")),e.$$.dirty&4&&n(3,r=zn(a.endDate).format("l"))},[s,o,a,r,i,l,d,c,v,T,b,A,E,y]}class RIe extends Qt{constructor(t){super(),Jt(this,t,xIe,MIe,Kt,{sourceTitle:0,personalProjectionPath:1})}}function $Ie(e){let t;return{c(){t=Le(" ")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function NIe(e){let t,n;return{c(){t=P("div"),n=Le(e[0]),w(t,"class","font-weight-light text-right text-muted")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&1&&vt(n,i[0])},d(i){i&&_e(t)}}}function FIe(e){let t,n;return t=new RIe({props:{sourceTitle:e[1].toUpperCase(),personalProjectionPath:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&2&&(a.sourceTitle=i[1].toUpperCase()),r&4&&(a.personalProjectionPath=i[2]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function LIe(e){let t,n;return t=new AIe({props:{personalProjectionPath:e[2]}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r&4&&(a.personalProjectionPath=i[2]),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function HIe(e){let t,n,i,r,a,s,o,l;function d(E,y){return y&1&&(i=null),i==null&&(i=!Xn.isNil(E[0])),i?NIe:$Ie}let c=d(e,-1),v=c(e);const T=[LIe,FIe],b=[];function A(E,y){return E[1]=="handy"?0:1}return s=A(e),o=b[s]=T[s](e),{c(){t=P("div"),n=P("div"),v.c(),r=K(),a=P("div"),o.c(),w(n,"class","business-projection-form-content__status"),w(a,"class","table-responsive col-lg-12"),w(t,"class","card-body")},m(E,y){ce(E,t,y),m(t,n),v.m(n,null),m(t,r),m(t,a),b[s].m(a,null),l=!0},p(E,[y]){c===(c=d(E,y))&&v?v.p(E,y):(v.d(1),v=c(E),v&&(v.c(),v.m(n,null)));let I=s;s=A(E),s===I?b[s].p(E,y):(pn(),W(b[I],1,1,()=>{b[I]=null}),hn(),o=b[s],o?o.p(E,y):(o=b[s]=T[s](E),o.c()),U(o,1),o.m(a,null))},i(E){l||(U(o),l=!0)},o(E){W(o),l=!1},d(E){E&&_e(t),v.d(),b[s].d()}}}function jIe(e,t,n){let{statusNotice:i}=t,{sourceType:r}=t,{personalProjectionPath:a}=t;return e.$$set=s=>{"statusNotice"in s&&n(0,i=s.statusNotice),"sourceType"in s&&n(1,r=s.sourceType),"personalProjectionPath"in s&&n(2,a=s.personalProjectionPath)},[i,r,a]}class BIe extends Qt{constructor(t){super(),Jt(this,t,jIe,HIe,Kt,{statusNotice:0,sourceType:1,personalProjectionPath:2})}}bme(Bs,"uniqueProperty",function(e,t){return this.test("unique",t,function(n){if(!n||!n[e])return!0;if(this.parent.filter(i=>i!==n).some(i=>i[e]===n[e]))throw this.createError({path:`${this.path}.${e}`,message:t});return!0})});const UIe=yp().of(Bs().shape({name:Ps().trim().required("Field is empty"),federalValue:At().typeError("Field is empty or not a number").required("Field is empty"),stateValue:At().typeError("Field is empty or not a number").required("Field is empty"),errorMessages:Bs().default(()=>({name:"",federalValue:"",stateValue:""}))}).uniqueProperty("name","Name is not unique")),qIe=e=>{try{e.forEach(t=>{t.errorMessages={name:"",federalValue:"",stateValue:""}}),UIe.validateSync(e,{abortEarly:!1})}catch(t){t.inner.forEach(n=>{const[i,r]=n.path.split(".");Xn.set(e,`${i}.errorMessages.${r}`,n.message)})}finally{return e}};function WIe(e){let t,n,i;return{c(){t=P("input"),w(t,"class","form-control svelte-x1gxj0"),w(t,"name",e[0]),w(t,"type","number"),w(t,"placeholder","0.0"),t.value=e[2],wt(t,"input-error",e[1])},m(r,a){ce(r,t,a),n||(i=ct(t,"input",e[5]),n=!0)},p(r,[a]){a&1&&w(t,"name",r[0]),a&4&&t.value!==r[2]&&(t.value=r[2]),a&2&&wt(t,"input-error",r[1])},i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function VIe(e,t,n){let{name:i}=t,{hasError:r}=t,{value:a}=t,{onInput:s}=t;function o(d){d=d===""?"":parseFloat(d),s(d)}const l=d=>o(d.target.value);return e.$$set=d=>{"name"in d&&n(0,i=d.name),"hasError"in d&&n(1,r=d.hasError),"value"in d&&n(2,a=d.value),"onInput"in d&&n(4,s=d.onInput)},[i,r,a,o,s,l]}class M4 extends Qt{constructor(t){super(),Jt(this,t,VIe,WIe,Kt,{name:0,hasError:1,value:2,onInput:4})}}function x4(e,t,n){const i=e.slice();return i[14]=t[n],i[15]=t,i[16]=n,i}function R4(e){let t,n,i,r,a,s,o=e[14].errorMessages.name+"",l,d,c,v,T,b,A,E,y,I,D=e[14].errorMessages.federalValue+"",O,M,F,$,L,j,H,V,Q,X,te=e[14].errorMessages.stateValue+"",ne,be,ue,Ce,ie,Y,he,Me;function Pe(){e[5].call(r,e[15],e[16])}function We(...G){return e[6](e[16],...G)}E=new M4({props:{name:`federal-${e[16]}`,hasError:eu(e[14].errorMessages.federalValue),value:e[14].federalValue,onInput:We}});function qe(...G){return e[7](e[16],...G)}V=new M4({props:{name:`state-${e[16]}`,hasError:eu(e[14].errorMessages.stateValue),value:e[14].stateValue,onInput:qe}});function ee(){return e[8](e[14],e[15],e[16])}return{c(){t=P("tr"),n=P("td"),i=P("div"),r=P("input"),a=K(),s=P("div"),l=Le(o),d=K(),c=P("td"),v=P("div"),T=P("span"),b=P("div"),b.innerHTML='<span class="input-group-text">$</span>',A=K(),re(E.$$.fragment),y=K(),I=P("div"),O=Le(D),M=K(),F=P("td"),$=P("div"),L=P("span"),j=P("div"),j.innerHTML='<span class="input-group-text">$</span>',H=K(),re(V.$$.fragment),Q=K(),X=P("div"),ne=Le(te),be=K(),ue=P("button"),Ce=K(),w(r,"class","form-control svelte-1p6pdqe"),w(r,"name",`name-${e[16]}`),w(r,"placeholder","Manual Entry Input"),wt(r,"input-error",eu(e[14].errorMessages.name)),w(s,"class","error-message svelte-1p6pdqe"),w(s,"name",`name-error-${e[16]}`),wt(s,"active",eu(e[14].errorMessages.name)),w(i,"class","input-container svelte-1p6pdqe"),w(n,"class","svelte-1p6pdqe"),w(b,"class","input-group-prepend"),w(T,"class","input-group svelte-1p6pdqe"),w(I,"class","error-message svelte-1p6pdqe"),w(I,"name",`federal-error-${e[16]}`),wt(I,"active",eu(e[14].errorMessages.federalValue)),w(v,"class","input-container svelte-1p6pdqe"),w(c,"class","svelte-1p6pdqe"),w(j,"class","input-group-prepend"),w(L,"class","input-group svelte-1p6pdqe"),w(X,"class","error-message svelte-1p6pdqe"),w(X,"name",`state-error-${e[16]}`),wt(X,"active",eu(e[14].errorMessages.stateValue)),w($,"class","input-container svelte-1p6pdqe"),w(ue,"class","fa fa-remove delete-button svelte-1p6pdqe"),wt(ue,"hidden-button",e[0].length-1===e[16]),w(F,"class","svelte-1p6pdqe"),w(t,"class","svelte-1p6pdqe")},m(G,me){ce(G,t,me),m(t,n),m(n,i),m(i,r),Pn(r,e[14].name),m(i,a),m(i,s),m(s,l),m(t,d),m(t,c),m(c,v),m(v,T),m(T,b),m(T,A),ae(E,T,null),m(v,y),m(v,I),m(I,O),m(t,M),m(t,F),m(F,$),m($,L),m(L,j),m(L,H),ae(V,L,null),m($,Q),m($,X),m(X,ne),m(F,be),m(F,ue),m(t,Ce),Y=!0,he||(Me=[ct(r,"input",Pe),ct(ue,"click",Hi(ee))],he=!0)},p(G,me){e=G,me&1&&r.value!==e[14].name&&Pn(r,e[14].name),(!Y||me&1)&&wt(r,"input-error",eu(e[14].errorMessages.name)),(!Y||me&1)&&o!==(o=e[14].errorMessages.name+"")&&vt(l,o),(!Y||me&1)&&wt(s,"active",eu(e[14].errorMessages.name));const Te={};me&1&&(Te.hasError=eu(e[14].errorMessages.federalValue)),me&1&&(Te.value=e[14].federalValue),E.$set(Te),(!Y||me&1)&&D!==(D=e[14].errorMessages.federalValue+"")&&vt(O,D),(!Y||me&1)&&wt(I,"active",eu(e[14].errorMessages.federalValue));const De={};me&1&&(De.hasError=eu(e[14].errorMessages.stateValue)),me&1&&(De.value=e[14].stateValue),V.$set(De),(!Y||me&1)&&te!==(te=e[14].errorMessages.stateValue+"")&&vt(ne,te),(!Y||me&1)&&wt(X,"active",eu(e[14].errorMessages.stateValue)),(!Y||me&1)&&wt(ue,"hidden-button",e[0].length-1===e[16])},i(G){Y||(U(E.$$.fragment,G),U(V.$$.fragment,G),ie||xa(()=>{ie=Ad(t,rs,{duration:300}),ie.start()}),Y=!0)},o(G){W(E.$$.fragment,G),W(V.$$.fragment,G),Y=!1},d(G){G&&_e(t),se(E),se(V),he=!1,vi(Me)}}}function zIe(e){let t,n,i=e[0],r=[];for(let s=0;s<i.length;s+=1)r[s]=R4(x4(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<r.length;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,[o]){if(o&7){i=s[0];let l;for(l=0;l<i.length;l+=1){const d=x4(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=R4(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=i.length;l<r.length;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<i.length;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function YIe(e){return e.filter(t=>!t.toDelete)}function GIe(e){return!e.slice(0,-1).some(t=>Object.values(t.errorMessages).some(n=>n!==""))}function KIe(){return{name:"",stateValue:0,federalValue:0,toDelete:!1,errorMessages:{name:"",federalValue:"",stateValue:""}}}function eu(e){return e!==""}function XIe(e,t,n){let{entries:i}=t,{valid:r}=t,a=s(i);function s(I){return I.map(D=>({...D,toDelete:!1,errorMessages:{name:"",federalValue:"",stateValue:""}}))}function o(I){return I.map(D=>Xn.omit(D,["toDelete","errorMessages"])).slice(0,-1)}function l(I){return I.name!==""&&d(I.stateValue)&&d(I.federalValue)}function d(I){return I!==""&&Xn.isNumber(I)&&!isNaN(I)}function c(I){const D=qIe(I.slice(0,-1));return I.length?[...D,I[I.length-1]]:D}function v(I,D){a[I].stateValue===a[I].federalValue&&n(0,a[I].stateValue=D,a),n(0,a[I].federalValue=D,a)}function T(I,D){n(0,a[I].stateValue=D,a)}function b(I,D){I[D].name=this.value,n(0,a)}const A=(I,D)=>v(I,D),E=(I,D)=>T(I,D),y=(I,D,O)=>n(0,D[O].toDelete=!0,a);return e.$$set=I=>{"entries"in I&&n(3,i=I.entries),"valid"in I&&n(4,r=I.valid)},e.$$.update=()=>{e.$$.dirty&1&&(n(0,a=YIe(a)),n(0,a=c(a)),(a.length===0||l(a[a.length-1]))&&n(0,a=[...a,KIe()]),n(4,r=GIe(a))),e.$$.dirty&1&&n(3,i=o(a))},[a,v,T,i,r,b,A,E,y]}class $4 extends Qt{constructor(t){super(),Jt(this,t,XIe,zIe,Kt,{entries:3,valid:4})}}function N4(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M;function F(Q){e[7](Q)}function $(Q){e[8](Q)}let L={};e[0].incomes!==void 0&&(L.entries=e[0].incomes),e[1]!==void 0&&(L.valid=e[1]),d=new $4({props:L}),Oe.push(()=>$e(d,"entries",F)),Oe.push(()=>$e(d,"valid",$));function j(Q){e[9](Q)}function H(Q){e[10](Q)}let V={};return e[0].expenses!==void 0&&(V.entries=e[0].expenses),e[2]!==void 0&&(V.valid=e[2]),y=new $4({props:V}),Oe.push(()=>$e(y,"entries",j)),Oe.push(()=>$e(y,"valid",H)),{c(){t=P("section"),n=P("div"),i=P("table"),r=P("thead"),r.innerHTML=`<tr class="svelte-4kqas1"><th class="svelte-4kqas1">Title</th> 
            <th class="svelte-4kqas1">Federal</th> 
            <th class="svelte-4kqas1">State</th></tr>`,a=K(),s=P("tbody"),o=P("tr"),o.innerHTML='<td class="section-title svelte-4kqas1" colspan="3">Income</td>',l=K(),re(d.$$.fragment),T=K(),b=P("tbody"),A=P("tr"),A.innerHTML='<td class="section-title svelte-4kqas1" colspan="3">Expenses</td>',E=K(),re(y.$$.fragment),w(o,"class","svelte-4kqas1"),w(s,"id","income"),w(s,"class","svelte-4kqas1"),w(A,"class","svelte-4kqas1"),w(b,"id","expenses"),w(b,"class","svelte-4kqas1"),w(i,"class","table styled-table svelte-4kqas1"),w(n,"class","table-responsive")},m(Q,X){ce(Q,t,X),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),m(s,o),m(s,l),ae(d,s,null),m(i,T),m(i,b),m(b,A),m(b,E),ae(y,b,null),M=!0},p(Q,X){const te={};!c&&X&1&&(c=!0,te.entries=Q[0].incomes,Ne(()=>c=!1)),!v&&X&2&&(v=!0,te.valid=Q[1],Ne(()=>v=!1)),d.$set(te);const ne={};!I&&X&1&&(I=!0,ne.entries=Q[0].expenses,Ne(()=>I=!1)),!D&&X&4&&(D=!0,ne.valid=Q[2],Ne(()=>D=!1)),y.$set(ne)},i(Q){M||(U(d.$$.fragment,Q),U(y.$$.fragment,Q),O||xa(()=>{O=Ad(t,rs,{duration:300}),O.start()}),M=!0)},o(Q){W(d.$$.fragment,Q),W(y.$$.fragment,Q),M=!1},d(Q){Q&&_e(t),se(d),se(y)}}}function QIe(e){let t,n,i=e[0]!==null&&N4(e);return{c(){i&&i.c(),t=On()},m(r,a){i&&i.m(r,a),ce(r,t,a),n=!0},p(r,[a]){r[0]!==null?i?(i.p(r,a),a&1&&U(i,1)):(i=N4(r),i.c(),U(i,1),i.m(t.parentNode,t)):i&&(pn(),W(i,1,1,()=>{i=null}),hn())},i(r){n||(U(i),n=!0)},o(r){W(i),n=!1},d(r){i&&i.d(r),r&&_e(t)}}}function JIe(e,t,n){let{handyProjectionEntriesPath:i}=t,{updateHandyProjectionEntriesPath:r}=t,{request:a}=t,s=null,o=null,l=!1,d=!1;async function c(I,D={}){No.start();try{const O=await a(I,D);return O.error?(Gr.error(O.error),null):O}catch(O){return console.error(O.message),Gr.error("We apologize for any inconvenience, but something went wrong. Please try again, and if the problem persists, reach out to our support team."),null}finally{No.done()}}const v=Xn.debounce(async I=>{const D=await c(r,{method:"PUT",body:JSON.stringify(I)});D&&(I=D)},1500);async function T(){const I=await c(i,{method:"GET"});I&&(n(0,s={incomes:Xn.sortBy(I.incomes,["name"]),expenses:Xn.sortBy(I.expenses,["name"])}),n(6,o=Xn.cloneDeep(s)))}oa(()=>{T()});function b(I){e.$$.not_equal(s.incomes,I)&&(s.incomes=I,n(0,s))}function A(I){l=I,n(1,l)}function E(I){e.$$.not_equal(s.expenses,I)&&(s.expenses=I,n(0,s))}function y(I){d=I,n(2,d)}return e.$$set=I=>{"handyProjectionEntriesPath"in I&&n(3,i=I.handyProjectionEntriesPath),"updateHandyProjectionEntriesPath"in I&&n(4,r=I.updateHandyProjectionEntriesPath),"request"in I&&n(5,a=I.request)},e.$$.update=()=>{e.$$.dirty&71&&!Xn.isEqual(s,o)&&l&&d&&v(Xn.cloneDeep(s))},[s,l,d,i,r,a,o,b,A,E,y]}class ZIe extends Qt{constructor(t){super(),Jt(this,t,JIe,QIe,Kt,{handyProjectionEntriesPath:3,updateHandyProjectionEntriesPath:4,request:5})}}const{window:eAe}=bm;function tAe(e){let t,n,i,r,a;return{c(){t=P("div"),t.innerHTML='<h3 class="card-title">Connection Management</h3>',n=K(),i=P("div"),r=P("a"),a=Le("Please, connect Business Data Source at the Sync page first"),w(t,"class","card-header"),w(r,"href",e[2]),w(r,"class","btn btn-primary btn-lg"),w(i,"class","card-body")},m(s,o){ce(s,t,o),ce(s,n,o),ce(s,i,o),m(i,r),m(r,a)},p(s,o){o&4&&w(r,"href",s[2])},i:ot,o:ot,d(s){s&&_e(t),s&&_e(n),s&&_e(i)}}}function nAe(e){let t,n,i;const r=[e[4][e[3]].props];var a=e[4][e[3]].component;function s(o){let l={};for(let d=0;d<r.length;d+=1)l=gv(l,r[d]);return{props:l}}return a&&(t=ha(a,s())),{c(){t&&re(t.$$.fragment),n=On()},m(o,l){t&&ae(t,o,l),ce(o,n,l),i=!0},p(o,l){const d=l&24?ZM(r,[ex(o[4][o[3]].props)]):{};if(l&8&&a!==(a=o[4][o[3]].component)){if(t){pn();const c=t;W(c.$$.fragment,1,0,()=>{se(c,1)}),hn()}a?(t=ha(a,s()),re(t.$$.fragment),U(t.$$.fragment,1),ae(t,n.parentNode,n)):t=null}else a&&t.$set(d)},i(o){i||(t&&U(t.$$.fragment,o),i=!0)},o(o){t&&W(t.$$.fragment,o),i=!1},d(o){o&&_e(n),t&&se(t,o)}}}function iAe(e){let t,n,i=e[0].name+"",r,a,s,o,l,d,c,v,T,b,A,E,y,I;function D(L){e[10](L)}let O={companyConnectionPath:e[2],companyData:e[0],sourceType:e[1]};e[3]!==void 0&&(O.activeTab=e[3]),s=new pIe({props:O}),Oe.push(()=>$e(s,"activeTab",D));const M=[nAe,tAe],F=[];function $(L,j){return L[0].hasBusinessProjection?0:1}return b=$(e),A=F[b]=M[b](e),{c(){t=P("div"),n=P("h1"),r=Le(i),a=K(),re(s.$$.fragment),l=K(),d=P("section"),c=P("div"),v=P("div"),T=P("div"),A.c(),w(t,"class","pageheader"),w(T,"class","card"),w(v,"class","col-lg-12"),w(c,"class","row"),w(d,"id","main-content")},m(L,j){ce(L,t,j),m(t,n),m(n,r),ce(L,a,j),ae(s,L,j),ce(L,l,j),ce(L,d,j),m(d,c),m(c,v),m(v,T),F[b].m(T,null),E=!0,y||(I=ct(eAe,"hashchange",function(){Ga(e[3])&&e[3].apply(this,arguments)}),y=!0)},p(L,[j]){e=L,(!E||j&1)&&i!==(i=e[0].name+"")&&vt(r,i);const H={};j&4&&(H.companyConnectionPath=e[2]),j&1&&(H.companyData=e[0]),j&2&&(H.sourceType=e[1]),!o&&j&8&&(o=!0,H.activeTab=e[3],Ne(()=>o=!1)),s.$set(H);let V=b;b=$(e),b===V?F[b].p(e,j):(pn(),W(F[V],1,1,()=>{F[V]=null}),hn(),A=F[b],A?A.p(e,j):(A=F[b]=M[b](e),A.c()),U(A,1),A.m(T,null))},i(L){E||(U(s.$$.fragment,L),U(A),E=!0)},o(L){W(s.$$.fragment,L),W(A),E=!1},d(L){L&&_e(t),L&&_e(a),se(s,L),L&&_e(l),L&&_e(d),F[b].d(),y=!1,I()}}}function rAe(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function F4(e,t){let n=!1;return e.subscribe(i=>{n?t(i):n=!0})}function aAe(e,t,n){let{businessProjectionData:i}=t,{sourceType:r}=t,{companyData:a}=t,{companyConnectionPath:s}=t,{savePath:o}=t,{personalProjectionPath:l}=t,{handyProjectionEntriesPath:d}=t,{updateHandyProjectionEntriesPath:c}=t,v=null,T=null,b="Business Data";const A={Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":window.$('meta[name="csrf-token"]').attr("content")},E=async(M,F={})=>{try{return await(await fetch(M,{headers:A,...F})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}};let y={"Business Data":{component:BIe,props:{statusNotice:T,sourceType:r,personalProjectionPath:l}},"Income And Expenses":{component:ZIe,props:{handyProjectionEntriesPath:d,updateHandyProjectionEntriesPath:c,request:E}}};const I=Gn.debounce(async M=>{if(M){T="Unsaved changes present. Saving...",No.start();try{const F=await E(o,{method:"PUT",body:JSON.stringify(M)});F.error?Gr.error(F.error):(n(0,a=F.company_data),Gn.isFunction(v)&&v(),Ns.set(_4(F.business_projection_data)),v=F4(p4,I),T=`Saved at ${zn().format("h:mm:ss a")}, no unsaved changes`)}catch(F){console.log(F),Gr.error("We apologize for any inconvenience, but something went wrong. Please try again, and if the problem persists, reach out to our support team.")}No.done()}},1500);function D(){window.onbeforeunload=()=>{if(T==="Unsaved changes present. Saving...")return!0}}oa(()=>{n(3,b=rAe(window.location.hash.substring(1))||"Business Data"),Ns.set(_4(i)),v=F4(p4,I),D()});function O(M){b=M,n(3,b)}return e.$$set=M=>{"businessProjectionData"in M&&n(5,i=M.businessProjectionData),"sourceType"in M&&n(1,r=M.sourceType),"companyData"in M&&n(0,a=M.companyData),"companyConnectionPath"in M&&n(2,s=M.companyConnectionPath),"savePath"in M&&n(6,o=M.savePath),"personalProjectionPath"in M&&n(7,l=M.personalProjectionPath),"handyProjectionEntriesPath"in M&&n(8,d=M.handyProjectionEntriesPath),"updateHandyProjectionEntriesPath"in M&&n(9,c=M.updateHandyProjectionEntriesPath)},[a,r,s,b,y,i,o,l,d,c,O]}class sAe extends Qt{constructor(t){super(),Jt(this,t,aAe,iAe,Kt,{businessProjectionData:5,sourceType:1,companyData:0,companyConnectionPath:2,savePath:6,personalProjectionPath:7,handyProjectionEntriesPath:8,updateHandyProjectionEntriesPath:9})}}var L4=W5;function W5(){var e=[].slice.call(arguments),t=!1;typeof e[0]=="boolean"&&(t=e.shift());var n=e[0];if(H4(n))throw new Error("extendee must be an object");for(var i=e.slice(1),r=i.length,a=0;a<r;a++){var s=i[a];for(var o in s)if(Object.prototype.hasOwnProperty.call(s,o)){var l=s[o];if(t&&oAe(l)){var d=Array.isArray(l)?[]:{};n[o]=W5(!0,Object.prototype.hasOwnProperty.call(n,o)&&!H4(n[o])?n[o]:d,l)}else n[o]=l}}return n}function oAe(e){return Array.isArray(e)||{}.toString.call(e)=="[object Object]"}function H4(e){return!e||typeof e!="object"&&typeof e!="function"}function lAe(e){return e&&e.__esModule?e.default:e}class j4{on(t,n){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(n),this}emit(t,...n){this._callbacks=this._callbacks||{};let i=this._callbacks[t];if(i)for(let r of i)r.apply(this,n);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+t,{args:n})),this}makeEvent(t,n){let i={bubbles:!0,cancelable:!0,detail:n};if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),r}off(t,n){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;let i=this._callbacks[t];if(!i)return this;if(arguments.length===1)return delete this._callbacks[t],this;for(let r=0;r<i.length;r++)if(i[r]===n){i.splice(r,1);break}return this}}var V5={};V5=`<div class="dz-preview dz-file-preview">
  <div class="dz-image"><img data-dz-thumbnail=""></div>
  <div class="dz-details">
    <div class="dz-size"><span data-dz-size=""></span></div>
    <div class="dz-filename"><span data-dz-name=""></span></div>
  </div>
  <div class="dz-progress">
    <span class="dz-upload" data-dz-uploadprogress=""></span>
  </div>
  <div class="dz-error-message"><span data-dz-errormessage=""></span></div>
  <div class="dz-success-mark">
    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">
      <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>
    </svg>
  </div>
  <div class="dz-error-mark">
    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">
      <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>
    </svg>
  </div>
</div>
`;let uAe={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept(e,t){return t()},chunksUploaded:function(e,t){t()},binaryBody:!1,fallback(){let e;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let n of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(n.className)){e=n,n.className="dz-message";break}e||(e=Zn.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));let t=e.getElementsByTagName("span")[0];return t&&(t.textContent!=null?t.textContent=this.options.dictFallbackMessage:t.innerText!=null&&(t.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(e,t,n,i){let r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},a=e.width/e.height;t==null&&n==null?(t=r.srcWidth,n=r.srcHeight):t==null?t=n*a:n==null&&(n=t/a),t=Math.min(t,r.srcWidth),n=Math.min(n,r.srcHeight);let s=t/n;if(r.srcWidth>t||r.srcHeight>n)if(i==="crop")a>s?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/s);else if(i==="contain")a>s?n=t/a:t=n*a;else throw new Error(`Unknown resizeMethod '${i}'`);return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:lAe(V5),drop(e){return this.element.classList.remove("dz-drag-hover")},dragstart(e){},dragend(e){return this.element.classList.remove("dz-drag-hover")},dragenter(e){return this.element.classList.add("dz-drag-hover")},dragover(e){return this.element.classList.add("dz-drag-hover")},dragleave(e){return this.element.classList.remove("dz-drag-hover")},paste(e){},reset(){return this.element.classList.remove("dz-started")},addedfile(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){e.previewElement=Zn.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var t of e.previewElement.querySelectorAll("[data-dz-name]"))t.textContent=e.name;for(t of e.previewElement.querySelectorAll("[data-dz-size]"))t.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=Zn.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),e.previewElement.appendChild(e._removeLink));let n=i=>(i.preventDefault(),i.stopPropagation(),e.status===Zn.UPLOADING?Zn.confirm(this.options.dictCancelUploadConfirmation,()=>this.removeFile(e)):this.options.dictRemoveFileConfirmation?Zn.confirm(this.options.dictRemoveFileConfirmation,()=>this.removeFile(e)):this.removeFile(e));for(let i of e.previewElement.querySelectorAll("[data-dz-remove]"))i.addEventListener("click",n)}},removedfile(e){return e.previewElement!=null&&e.previewElement.parentNode!=null&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(let n of e.previewElement.querySelectorAll("[data-dz-thumbnail]"))n.alt=e.name,n.src=t;return setTimeout(()=>e.previewElement.classList.add("dz-image-preview"),1)}},error(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),typeof t!="string"&&t.error&&(t=t.error);for(let n of e.previewElement.querySelectorAll("[data-dz-errormessage]"))n.textContent=t}},errormultiple(){},processing(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(e,t,n){if(e.previewElement)for(let i of e.previewElement.querySelectorAll("[data-dz-uploadprogress]"))i.nodeName==="PROGRESS"?i.value=t:i.style.width=`${t}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple(){},canceled(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple(){},complete(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};var dAe=uAe;class Zn extends j4{static initClass(){this.prototype.Emitter=j4,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter(t=>t.accepted).map(t=>t)}getRejectedFiles(){return this.files.filter(t=>!t.accepted).map(t=>t)}getFilesWithStatus(t){return this.files.filter(n=>n.status===t).map(n=>n)}getQueuedFiles(){return this.getFilesWithStatus(Zn.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(Zn.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(Zn.ADDED)}getActiveFiles(){return this.files.filter(t=>t.status===Zn.UPLOADING||t.status===Zn.QUEUED).map(t=>t)}init(){if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(Zn.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let i=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(this.options.maxFiles===null||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",this.options.acceptedFiles!==null&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),this.options.capture!==null&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",Zn.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",()=>{let{files:r}=this.hiddenFileInput;if(r.length)for(let a of r)this.addFile(a);this.emit("addedfiles",r),i()})};i()}this.URL=window.URL!==null?window.URL:window.webkitURL;for(let i of this.events)this.on(i,this.options[i]);this.on("uploadprogress",()=>this.updateTotalUploadProgress()),this.on("removedfile",()=>this.updateTotalUploadProgress()),this.on("canceled",i=>this.emit("complete",i)),this.on("complete",i=>{if(this.getAddedFiles().length===0&&this.getUploadingFiles().length===0&&this.getQueuedFiles().length===0)return setTimeout(()=>this.emit("queuecomplete"),0)});const t=function(i){if(i.dataTransfer.types){for(var r=0;r<i.dataTransfer.types.length;r++)if(i.dataTransfer.types[r]==="Files")return!0}return!1};let n=function(i){if(t(i))return i.stopPropagation(),i.preventDefault?i.preventDefault():i.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:i=>this.emit("dragstart",i),dragenter:i=>(n(i),this.emit("dragenter",i)),dragover:i=>{let r;try{r=i.dataTransfer.effectAllowed}catch{}return i.dataTransfer.dropEffect=r==="move"||r==="linkMove"?"move":"copy",n(i),this.emit("dragover",i)},dragleave:i=>this.emit("dragleave",i),drop:i=>(n(i),this.drop(i)),dragend:i=>this.emit("dragend",i)}}],this.clickableElements.forEach(i=>this.listeners.push({element:i,events:{click:r=>((i!==this.element||r.target===this.element||Zn.elementInside(r.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}})),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,Zn.instances.splice(Zn.instances.indexOf(this),1)}updateTotalUploadProgress(){let t,n=0,i=0;if(this.getActiveFiles().length){for(let a of this.getActiveFiles())n+=a.upload.bytesSent,i+=a.upload.total;t=100*n/i}else t=100;return this.emit("totaluploadprogress",t,i,n)}_getParamName(t){return typeof this.options.paramName=="function"?this.options.paramName(t):`${this.options.paramName}${this.options.uploadMultiple?`[${t}]`:""}`}_renameFile(t){return typeof this.options.renameFile!="function"?t.name:this.options.renameFile(t)}getFallbackForm(){let t,n;if(t=this.getExistingFallback())return t;let i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+=`<p>${this.options.dictFallbackText}</p>`),i+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let r=Zn.createElement(i);return this.element.tagName!=="FORM"?(n=Zn.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`),n.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),n??r}getExistingFallback(){let t=function(i){for(let r of i)if(/(^| )fallback($| )/.test(r.className))return r};for(let i of["div","form"]){var n;if(n=t(this.element.getElementsByTagName(i)))return n}}setupEventListeners(){return this.listeners.map(t=>(()=>{let n=[];for(let i in t.events){let r=t.events[i];n.push(t.element.addEventListener(i,r,!1))}return n})())}removeEventListeners(){return this.listeners.map(t=>(()=>{let n=[];for(let i in t.events){let r=t.events[i];n.push(t.element.removeEventListener(i,r,!1))}return n})())}disable(){return this.clickableElements.forEach(t=>t.classList.remove("dz-clickable")),this.removeEventListeners(),this.disabled=!0,this.files.map(t=>this.cancelUpload(t))}enable(){return delete this.disabled,this.clickableElements.forEach(t=>t.classList.add("dz-clickable")),this.setupEventListeners()}filesize(t){let n=0,i="b";if(t>0){let r=["tb","gb","mb","kb","b"];for(let a=0;a<r.length;a++){let s=r[a],o=Math.pow(this.options.filesizeBase,4-a)/10;if(t>=o){n=t/Math.pow(this.options.filesizeBase,4-a),i=s;break}}n=Math.round(10*n)/10}return`<strong>${n}</strong> ${this.options.dictFileSizeUnits[i]}`}_updateMaxFilesReachedClass(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(t){if(!t.dataTransfer)return;this.emit("drop",t);let n=[];for(let i=0;i<t.dataTransfer.files.length;i++)n[i]=t.dataTransfer.files[i];if(n.length){let{items:i}=t.dataTransfer;i&&i.length&&i[0].webkitGetAsEntry!=null?this._addFilesFromItems(i):this.handleFiles(n)}this.emit("addedfiles",n)}paste(t){if(hAe(t!=null?t.clipboardData:void 0,i=>i.items)==null)return;this.emit("paste",t);let{items:n}=t.clipboardData;if(n.length)return this._addFilesFromItems(n)}handleFiles(t){for(let n of t)this.addFile(n)}_addFilesFromItems(t){return(()=>{let n=[];for(let r of t){var i;r.webkitGetAsEntry!=null&&(i=r.webkitGetAsEntry())?i.isFile?n.push(this.addFile(r.getAsFile())):i.isDirectory?n.push(this._addFilesFromDirectory(i,i.name)):n.push(void 0):r.getAsFile!=null&&(r.kind==null||r.kind==="file")?n.push(this.addFile(r.getAsFile())):n.push(void 0)}return n})()}_addFilesFromDirectory(t,n){let i=t.createReader(),r=s=>mAe(console,"log",o=>o.log(s));var a=()=>i.readEntries(s=>{if(s.length>0){for(let o of s)o.isFile?o.file(l=>{if(!(this.options.ignoreHiddenFiles&&l.name.substring(0,1)==="."))return l.fullPath=`${n}/${l.name}`,this.addFile(l)}):o.isDirectory&&this._addFilesFromDirectory(o,`${n}/${o.name}`);a()}return null},r);return a()}accept(t,n){this.options.maxFilesize&&t.size>this.options.maxFilesize*1048576?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):Zn.isValidFile(t,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,n):n(this.options.dictInvalidFileType)}addFile(t){t.upload={uuid:Zn.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=Zn.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,n=>{n?(t.accepted=!1,this._errorProcessing([t],n)):(t.accepted=!0,this.options.autoQueue&&this.enqueueFile(t)),this._updateMaxFilesReachedClass()})}enqueueFiles(t){for(let n of t)this.enqueueFile(n);return null}enqueueFile(t){if(t.status===Zn.ADDED&&t.accepted===!0){if(t.status=Zn.QUEUED,this.options.autoProcessQueue)return setTimeout(()=>this.processQueue(),0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}_enqueueThumbnail(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=this.options.maxThumbnailFilesize*1048576)return this._thumbnailQueue.push(t),setTimeout(()=>this._processThumbnailQueue(),0)}_processThumbnailQueue(){if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;let t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,n=>(this.emit("thumbnail",t,n),this._processingThumbnail=!1,this._processThumbnailQueue()))}removeFile(t){if(t.status===Zn.UPLOADING&&this.cancelUpload(t),this.files=fAe(this.files,t),this.emit("removedfile",t),this.files.length===0)return this.emit("reset")}removeAllFiles(t){t==null&&(t=!1);for(let n of this.files.slice())(n.status!==Zn.UPLOADING||t)&&this.removeFile(n);return null}resizeImage(t,n,i,r,a){return this.createThumbnail(t,n,i,r,!0,(s,o)=>{if(o==null)return a(t);{let{resizeMimeType:l}=this.options;l==null&&(l=t.type);let d=o.toDataURL(l,this.options.resizeQuality);return(l==="image/jpeg"||l==="image/jpg")&&(d=z5.restore(t.dataURL,d)),a(Zn.dataURItoBlob(d))}})}createThumbnail(t,n,i,r,a,s){let o=new FileReader;o.onload=()=>{if(t.dataURL=o.result,t.type==="image/svg+xml"){s!=null&&s(o.result);return}this.createThumbnailFromUrl(t,n,i,r,a,s)},o.readAsDataURL(t)}displayExistingFile(t,n,i,r,a=!0){if(this.emit("addedfile",t),this.emit("complete",t),!a)this.emit("thumbnail",t,n),i&&i();else{let s=o=>{this.emit("thumbnail",t,o),i&&i()};t.dataURL=n,this.createThumbnailFromUrl(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,s,r)}}createThumbnailFromUrl(t,n,i,r,a,s,o){let l=document.createElement("img");return o&&(l.crossOrigin=o),a=getComputedStyle(document.body).imageOrientation=="from-image"?!1:a,l.onload=()=>{let d=c=>c(1);return typeof EXIF<"u"&&EXIF!==null&&a&&(d=c=>EXIF.getData(l,function(){return c(EXIF.getTag(this,"Orientation"))})),d(c=>{t.width=l.width,t.height=l.height;let v=this.options.resize.call(this,t,n,i,r),T=document.createElement("canvas"),b=T.getContext("2d");switch(T.width=v.trgWidth,T.height=v.trgHeight,c>4&&(T.width=v.trgHeight,T.height=v.trgWidth),c){case 2:b.translate(T.width,0),b.scale(-1,1);break;case 3:b.translate(T.width,T.height),b.rotate(Math.PI);break;case 4:b.translate(0,T.height),b.scale(1,-1);break;case 5:b.rotate(.5*Math.PI),b.scale(1,-1);break;case 6:b.rotate(.5*Math.PI),b.translate(0,-T.width);break;case 7:b.rotate(.5*Math.PI),b.translate(T.height,-T.width),b.scale(-1,1);break;case 8:b.rotate(-.5*Math.PI),b.translate(-T.height,0);break}pAe(b,l,v.srcX!=null?v.srcX:0,v.srcY!=null?v.srcY:0,v.srcWidth,v.srcHeight,v.trgX!=null?v.trgX:0,v.trgY!=null?v.trgY:0,v.trgWidth,v.trgHeight);let A=T.toDataURL("image/png");if(s!=null)return s(A,T)})},s!=null&&(l.onerror=s),l.src=t.dataURL}processQueue(){let{parallelUploads:t}=this.options,n=this.getUploadingFiles().length,i=n;if(n>=t)return;let r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,t-n));for(;i<t;){if(!r.length)return;this.processFile(r.shift()),i++}}}processFile(t){return this.processFiles([t])}processFiles(t){for(let n of t)n.processing=!0,n.status=Zn.UPLOADING,this.emit("processing",n);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}_getFilesWithXhr(t){return this.files.filter(n=>n.xhr===t).map(n=>n)}cancelUpload(t){if(t.status===Zn.UPLOADING){let n=this._getFilesWithXhr(t.xhr);for(let i of n)i.status=Zn.CANCELED;typeof t.xhr<"u"&&t.xhr.abort();for(let i of n)this.emit("canceled",i);this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else(t.status===Zn.ADDED||t.status===Zn.QUEUED)&&(t.status=Zn.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(t,...n){return typeof t=="function"?t.apply(this,n):t}uploadFile(t){return this.uploadFiles([t])}uploadFiles(t){this._transformFiles(t,n=>{if(this.options.chunking){let i=n[0];t[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||i.size>this.options.chunkSize),t[0].upload.totalChunkCount=Math.ceil(i.size/this.options.chunkSize)}if(t[0].upload.chunked){let i=t[0],r=n[0];i.upload.chunks=[];let a=()=>{let s=0;for(;i.upload.chunks[s]!==void 0;)s++;if(s>=i.upload.totalChunkCount)return;let o=s*this.options.chunkSize,l=Math.min(o+this.options.chunkSize,r.size),d={name:this._getParamName(0),data:r.webkitSlice?r.webkitSlice(o,l):r.slice(o,l),filename:i.upload.filename,chunkIndex:s};i.upload.chunks[s]={file:i,index:s,dataBlock:d,status:Zn.UPLOADING,progress:0,retries:0},this._uploadData(t,[d])};if(i.upload.finishedChunkUpload=(s,o)=>{let l=!0;s.status=Zn.SUCCESS,s.dataBlock=null,s.response=s.xhr.responseText,s.responseHeaders=s.xhr.getAllResponseHeaders(),s.xhr=null;for(let d=0;d<i.upload.totalChunkCount;d++){if(i.upload.chunks[d]===void 0)return a();i.upload.chunks[d].status!==Zn.SUCCESS&&(l=!1)}l&&this.options.chunksUploaded(i,()=>{this._finished(t,o,null)})},this.options.parallelChunkUploads)for(let s=0;s<i.upload.totalChunkCount;s++)a();else a()}else{let i=[];for(let r=0;r<t.length;r++)i[r]={name:this._getParamName(r),data:n[r],filename:t[r].upload.filename};this._uploadData(t,i)}})}_getChunk(t,n){for(let i=0;i<t.upload.totalChunkCount;i++)if(t.upload.chunks[i]!==void 0&&t.upload.chunks[i].xhr===n)return t.upload.chunks[i]}_uploadData(t,n){let i=new XMLHttpRequest;for(let d of t)d.xhr=i;t[0].upload.chunked&&(t[0].upload.chunks[n[0].chunkIndex].xhr=i);let r=this.resolveOption(this.options.method,t,n),a=this.resolveOption(this.options.url,t,n);i.open(r,a,!0),this.resolveOption(this.options.timeout,t)&&(i.timeout=this.resolveOption(this.options.timeout,t)),i.withCredentials=!!this.options.withCredentials,i.onload=d=>{this._finishedUploading(t,i,d)},i.ontimeout=()=>{this._handleUploadError(t,i,`Request timedout after ${this.options.timeout/1e3} seconds`)},i.onerror=()=>{this._handleUploadError(t,i)};let o=i.upload!=null?i.upload:i;o.onprogress=d=>this._updateFilesUploadProgress(t,i,d);let l=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(l["Content-Type"]=t[0].type),this.options.headers&&L4(l,this.options.headers);for(let d in l){let c=l[d];c&&i.setRequestHeader(d,c)}if(this.options.binaryBody){for(let d of t)this.emit("sending",d,i);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i),this.submitRequest(i,null,t)}else{let d=new FormData;if(this.options.params){let c=this.options.params;typeof c=="function"&&(c=c.call(this,t,i,t[0].upload.chunked?this._getChunk(t[0],i):null));for(let v in c){let T=c[v];if(Array.isArray(T))for(let b=0;b<T.length;b++)d.append(v,T[b]);else d.append(v,T)}}for(let c of t)this.emit("sending",c,i,d);this.options.uploadMultiple&&this.emit("sendingmultiple",t,i,d),this._addFormElementData(d);for(let c=0;c<n.length;c++){let v=n[c];d.append(v.name,v.data,v.filename)}this.submitRequest(i,d,t)}}_transformFiles(t,n){let i=[],r=0;for(let a=0;a<t.length;a++)this.options.transformFile.call(this,t[a],s=>{i[a]=s,++r===t.length&&n(i)})}_addFormElementData(t){if(this.element.tagName==="FORM")for(let n of this.element.querySelectorAll("input, textarea, select, button")){let i=n.getAttribute("name"),r=n.getAttribute("type");if(r&&(r=r.toLowerCase()),!(typeof i>"u"||i===null))if(n.tagName==="SELECT"&&n.hasAttribute("multiple"))for(let a of n.options)a.selected&&t.append(i,a.value);else(!r||r!=="checkbox"&&r!=="radio"||n.checked)&&t.append(i,n.value)}}_updateFilesUploadProgress(t,n,i){if(t[0].upload.chunked){let r=t[0],a=this._getChunk(r,n);i?(a.progress=100*i.loaded/i.total,a.total=i.total,a.bytesSent=i.loaded):(a.progress=100,a.bytesSent=a.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(let s=0;s<r.upload.totalChunkCount;s++)r.upload.chunks[s]&&typeof r.upload.chunks[s].progress<"u"&&(r.upload.progress+=r.upload.chunks[s].progress,r.upload.total+=r.upload.chunks[s].total,r.upload.bytesSent+=r.upload.chunks[s].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else for(let r of t)r.upload.total&&r.upload.bytesSent&&r.upload.bytesSent==r.upload.total||(i?(r.upload.progress=100*i.loaded/i.total,r.upload.total=i.total,r.upload.bytesSent=i.loaded):(r.upload.progress=100,r.upload.bytesSent=r.upload.total),this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent))}_finishedUploading(t,n,i){let r;if(t[0].status!==Zn.CANCELED&&n.readyState===4){if(n.responseType!=="arraybuffer"&&n.responseType!=="blob"&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(a){i=a,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t,n),200<=n.status&&n.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],n),r):this._finished(t,r,i):this._handleUploadError(t,n,r)}}_handleUploadError(t,n,i){if(t[0].status!==Zn.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){let r=this._getChunk(t[0],n);if(r.retries++<this.options.retryChunksLimit){this._uploadData(t,[r.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(t,i||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}submitRequest(t,n,i){if(t.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}if(this.options.binaryBody)if(i[0].upload.chunked){const r=this._getChunk(i[0],t);t.send(r.dataBlock.data)}else t.send(i[0]);else t.send(n)}_finished(t,n,i){for(let r of t)r.status=Zn.SUCCESS,this.emit("success",r,n,i),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,n,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(t,n,i){for(let r of t)r.status=Zn.ERROR,this.emit("error",r,n,i),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,n,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})}constructor(t,n){super();let i,r;if(this.element=t,this.clickableElements=[],this.listeners=[],this.files=[],typeof this.element=="string"&&(this.element=document.querySelector(this.element)),!this.element||this.element.nodeType==null)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");Zn.instances.push(this),this.element.dropzone=this;let a=(r=Zn.optionsForElement(this.element))!=null?r:{};if(this.options=L4(!0,{},dAe,a,n??{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!Zn.isBrowserSupported())return this.options.fallback.call(this);if(this.options.url==null&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.renameFilename!=null&&(this.options.renameFile=s=>this.options.renameFilename.call(this,s.name,s)),typeof this.options.method=="string"&&(this.options.method=this.options.method.toUpperCase()),(i=this.getExistingFallback())&&i.parentNode&&i.parentNode.removeChild(i),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=Zn.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=Zn.getElements(this.options.clickable,"clickable")),this.init()}}Zn.initClass();Zn.options={};Zn.optionsForElement=function(e){if(e.getAttribute("id"))return Zn.options[cAe(e.getAttribute("id"))]};Zn.instances=[];Zn.forElement=function(e){if(typeof e=="string"&&(e=document.querySelector(e)),(e!=null?e.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone};Zn.discover=function(){let e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];let t=n=>(()=>{let i=[];for(let r of n)/(^| )dropzone($| )/.test(r.className)?i.push(e.push(r)):i.push(void 0);return i})();t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return(()=>{let t=[];for(let n of e)Zn.optionsForElement(n)!==!1?t.push(new Zn(n)):t.push(void 0);return t})()};Zn.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i];Zn.isBrowserSupported=function(){let e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))e=!1;else{Zn.blacklistedBrowsers!==void 0&&(Zn.blockedBrowsers=Zn.blacklistedBrowsers);for(let t of Zn.blockedBrowsers)if(t.test(navigator.userAgent)){e=!1;continue}}else e=!1;return e};Zn.dataURItoBlob=function(e){let t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(t.length),r=new Uint8Array(i);for(let a=0,s=t.length,o=0<=s;o?a<=s:a>=s;o?a++:a--)r[a]=t.charCodeAt(a);return new Blob([i],{type:n})};const fAe=(e,t)=>e.filter(n=>n!==t).map(n=>n),cAe=e=>e.replace(/[\-_](\w)/g,t=>t.charAt(1).toUpperCase());Zn.createElement=function(e){let t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]};Zn.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1};Zn.getElement=function(e,t){let n;if(typeof e=="string"?n=document.querySelector(e):e.nodeType!=null&&(n=e),n==null)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector or a plain HTML element.`);return n};Zn.getElements=function(e,t){let n,i;if(e instanceof Array){i=[];try{for(n of e)i.push(this.getElement(n,t))}catch{i=null}}else if(typeof e=="string"){i=[];for(n of document.querySelectorAll(e))i.push(n)}else e.nodeType!=null&&(i=[e]);if(i==null||!i.length)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return i};Zn.confirm=function(e,t,n){if(window.confirm(e))return t();if(n!=null)return n()};Zn.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");let n=e.type,i=n.replace(/\/.*$/,"");for(let r of t)if(r=r.trim(),r.charAt(0)==="."){if(e.name.toLowerCase().indexOf(r.toLowerCase(),e.name.length-r.length)!==-1)return!0}else if(/\/\*$/.test(r)){if(i===r.replace(/\/.*$/,""))return!0}else if(n===r)return!0;return!1};typeof Jc<"u"&&Jc!==null&&(Jc.fn.dropzone=function(e){return this.each(function(){return new Zn(this,e)})});Zn.ADDED="added";Zn.QUEUED="queued";Zn.ACCEPTED=Zn.QUEUED;Zn.UPLOADING="uploading";Zn.PROCESSING=Zn.UPLOADING;Zn.CANCELED="canceled";Zn.ERROR="error";Zn.SUCCESS="success";let _Ae=function(e){e.naturalWidth;let t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;let i=n.getContext("2d");i.drawImage(e,0,0);let{data:r}=i.getImageData(1,0,1,t),a=0,s=t,o=t;for(;o>a;)r[(o-1)*4+3]===0?s=o:a=o,o=s+a>>1;let l=o/t;return l===0?1:l};var pAe=function(e,t,n,i,r,a,s,o,l,d){let c=_Ae(t);return e.drawImage(t,n,i,r,a,s,o,l,d/c)};class z5{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(t){let n="",i,r,a="",s,o,l,d="",c=0;for(;i=t[c++],r=t[c++],a=t[c++],s=i>>2,o=(i&3)<<4|r>>4,l=(r&15)<<2|a>>6,d=a&63,isNaN(r)?l=d=64:isNaN(a)&&(d=64),n=n+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(d),i=r=a="",s=o=l=d="",c<t.length;);return n}static restore(t,n){if(!t.match("data:image/jpeg;base64,"))return n;let i=this.decode64(t.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(i),a=this.exifManipulation(n,r);return`data:image/jpeg;base64,${this.encode64(a)}`}static exifManipulation(t,n){let i=this.getExifArray(n),r=this.insertExif(t,i);return new Uint8Array(r)}static getExifArray(t){let n,i=0;for(;i<t.length;){if(n=t[i],n[0]===255&n[1]===225)return n;i++}return[]}static insertExif(t,n){let i=t.replace("data:image/jpeg;base64,",""),r=this.decode64(i),a=r.indexOf(255,3),s=r.slice(0,a),o=r.slice(a),l=s;return l=l.concat(n),l=l.concat(o),l}static slice2Segments(t){let n=0,i=[];for(;;){var r;if(t[n]===255&t[n+1]===218)break;if(t[n]===255&t[n+1]===216)n+=2;else{r=t[n+2]*256+t[n+3];let a=n+r+2,s=t.slice(n,a);i.push(s),n=a}if(n>t.length)break}return i}static decode64(t){let n,i,r="",a,s,o,l="",d=0,c=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn(`There were invalid base64 characters in the input text.
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
Expect errors in decoding.`),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");a=this.KEY_STR.indexOf(t.charAt(d++)),s=this.KEY_STR.indexOf(t.charAt(d++)),o=this.KEY_STR.indexOf(t.charAt(d++)),l=this.KEY_STR.indexOf(t.charAt(d++)),n=a<<2|s>>4,i=(s&15)<<4|o>>2,r=(o&3)<<6|l,c.push(n),o!==64&&c.push(i),l!==64&&c.push(r),n=i=r="",a=s=o=l="",d<t.length;);return c}}z5.initClass();function hAe(e,t){return typeof e<"u"&&e!==null?t(e):void 0}function mAe(e,t,n){if(typeof e<"u"&&e!==null&&typeof e[t]=="function")return n(e,t)}function gAe(e){let t,n,i,r,a,s;return{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),a=K(),s=P("div"),s.innerHTML='<div class="col-lg-12" style="padding-top: 30px">Drop a file here or click to upload</div>',w(r,"class","col-lg-8 order-md-2"),w(i,"class","row justify-content-center"),w(s,"class","row"),w(n,"class","vault-upload"),w(n,"id","vault-upload"),cr(t,"display","none")},m(o,l){ce(o,t,l),m(t,n),m(n,i),m(i,r),r.innerHTML=e[0],m(n,a),m(n,s)},p(o,[l]){l&1&&(r.innerHTML=o[0])},i:ot,o:ot,d(o){o&&_e(t)}}}function vAe(e,t,n){let{csrfToken:i}=t,{uploadPath:r}=t,{cloudImageSvg:a}=t;return oa(async()=>{Zn.options.newVaultDoc={paramName:"vault_doc[document]",uploadMultiple:!1,dictDefaultMessage:document.querySelector("#vault-upload").innerHTML,dictFallbackMessage:"",init(){this.on("complete",function(s){window.location.reload()})}},Zn.discover()}),e.$$set=s=>{"csrfToken"in s&&n(1,i=s.csrfToken),"uploadPath"in s&&n(2,r=s.uploadPath),"cloudImageSvg"in s&&n(0,a=s.cloudImageSvg)},[a,i,r]}class bAe extends Qt{constructor(t){super(),Jt(this,t,vAe,gAe,Kt,{csrfToken:1,uploadPath:2,cloudImageSvg:0})}}function B4(e,t,n){const i=e.slice();return i[13]=t[n],i}function U4(e,t,n){const i=e.slice();return i[16]=t[n],i}function q4(e){let t,n=e[16]+"",i,r;return{c(){t=P("option"),i=Le(n),r=Le(` per page
    `),t.__value=e[16],t.value=t.__value},m(a,s){ce(a,t,s),m(t,i),m(t,r)},p:ot,d(a){a&&_e(t)}}}function W4(e){let t,n,i,r,a,s;return{c(){t=P("li"),n=P("a"),n.textContent="First",i=K(),r=P("li"),r.innerHTML='<span class="text-muted">…</span>',w(n,"class","page-link"),w(n,"href","/#"),w(t,"class","page-item"),wt(t,"active",e[1]==1),w(r,"class","page-item")},m(o,l){ce(o,t,l),m(t,n),ce(o,i,l),ce(o,r,l),a||(s=ct(n,"click",Hi(e[10])),a=!0)},p(o,l){l&2&&wt(t,"active",o[1]==1)},d(o){o&&_e(t),o&&_e(i),o&&_e(r),a=!1,s()}}}function V4(e){let t,n,i=e[13]+"",r,a,s;function o(){return e[11](e[13])}return{c(){t=P("li"),n=P("a"),r=Le(i),w(n,"class","page-link"),w(n,"href","/#"),w(t,"class","page-item"),wt(t,"active",e[1]==e[13])},m(l,d){ce(l,t,d),m(t,n),m(n,r),a||(s=ct(n,"click",Hi(o)),a=!0)},p(l,d){e=l,d&24&&i!==(i=e[13]+"")&&vt(r,i),d&90&&wt(t,"active",e[1]==e[13])},d(l){l&&_e(t),a=!1,s()}}}function z4(e){let t,n,i,r,a,s;return{c(){t=P("li"),t.innerHTML='<span class="text-muted">…</span>',n=K(),i=P("li"),r=P("a"),r.textContent="Last",w(t,"class","page-item"),w(r,"class","page-link"),w(r,"href","/#"),w(i,"class","page-item"),wt(i,"active",e[1]==e[2])},m(o,l){ce(o,t,l),ce(o,n,l),ce(o,i,l),m(i,r),a||(s=ct(r,"click",Hi(e[12])),a=!0)},p(o,l){l&6&&wt(i,"active",o[1]==o[2])},d(o){o&&_e(t),o&&_e(n),o&&_e(i),a=!1,s()}}}function yAe(e){let t,n,i,r,a,s,o,l=e[5],d=[];for(let A=0;A<l.length;A+=1)d[A]=q4(U4(e,l,A));let c=e[4]>1&&W4(e),v=e[6](e[4],e[3]),T=[];for(let A=0;A<v.length;A+=1)T[A]=V4(B4(e,v,A));let b=e[3]<e[2]&&z4(e);return{c(){t=P("select");for(let A=0;A<d.length;A+=1)d[A].c();n=K(),i=P("ul"),c&&c.c(),r=K();for(let A=0;A<T.length;A+=1)T[A].c();a=K(),b&&b.c(),w(t,"class","form-control per-page-selector svelte-1xk165w"),e[0]===void 0&&xa(()=>e[9].call(t)),w(i,"class","pagination smaller-margins svelte-1xk165w")},m(A,E){ce(A,t,E);for(let y=0;y<d.length;y+=1)d[y]&&d[y].m(t,null);Es(t,e[0],!0),ce(A,n,E),ce(A,i,E),c&&c.m(i,null),m(i,r);for(let y=0;y<T.length;y+=1)T[y]&&T[y].m(i,null);m(i,a),b&&b.m(i,null),s||(o=ct(t,"change",e[9]),s=!0)},p(A,[E]){if(E&32){l=A[5];let y;for(y=0;y<l.length;y+=1){const I=U4(A,l,y);d[y]?d[y].p(I,E):(d[y]=q4(I),d[y].c(),d[y].m(t,null))}for(;y<d.length;y+=1)d[y].d(1);d.length=l.length}if(E&33&&Es(t,A[0]),A[4]>1?c?c.p(A,E):(c=W4(A),c.c(),c.m(i,r)):c&&(c.d(1),c=null),E&218){v=A[6](A[4],A[3]);let y;for(y=0;y<v.length;y+=1){const I=B4(A,v,y);T[y]?T[y].p(I,E):(T[y]=V4(I),T[y].c(),T[y].m(i,a))}for(;y<T.length;y+=1)T[y].d(1);T.length=v.length}A[3]<A[2]?b?b.p(A,E):(b=z4(A),b.c(),b.m(i,null)):b&&(b.d(1),b=null)},i:ot,o:ot,d(A){A&&_e(t),Nn(d,A),A&&_e(n),A&&_e(i),c&&c.d(),Nn(T,A),b&&b.d(),s=!1,o()}}}function wAe(e,t,n){let i,r;const a=[10,25,50,100];let{currentPage:s}=t,{adjustedCurrentPage:o}=t,{totalPages:l}=t,{perPage:d}=t;function c(y,I){return[...Array(I-y+1).keys()].map(D=>D+y)}function v(y){n(8,s=y)}function T(){d=Cd(this),n(0,d),n(5,a)}const b=()=>v(1),A=y=>v(y),E=()=>v(l);return e.$$set=y=>{"currentPage"in y&&n(8,s=y.currentPage),"adjustedCurrentPage"in y&&n(1,o=y.adjustedCurrentPage),"totalPages"in y&&n(2,l=y.totalPages),"perPage"in y&&n(0,d=y.perPage)},e.$$.update=()=>{e.$$.dirty&2&&n(4,i=Math.max(1,o-3)),e.$$.dirty&6&&n(3,r=Math.min(l,o+3))},[d,o,l,r,i,a,c,v,s,T,b,A,E]}class Gy extends Qt{constructor(t){super(),Jt(this,t,wAe,yAe,Kt,{currentPage:8,adjustedCurrentPage:1,totalPages:2,perPage:0})}}function TAe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A;return{c(){t=P("h2"),t.textContent="Edit User",n=K(),i=P("label"),i.textContent="Email:",r=K(),a=P("input"),s=K(),o=P("div"),l=P("button"),d=Le("Save"),v=K(),T=P("button"),T.textContent="Cancel",w(t,"class","svelte-lbgv2o"),w(i,"for","user_email"),w(i,"class","svelte-lbgv2o"),w(a,"id","user_email"),w(a,"class","form-control svelte-lbgv2o"),w(a,"type","email"),w(l,"class","btn btn-success"),l.disabled=c=e[0]===e[1],w(T,"class","btn btn-secondary"),w(o,"class","buttons svelte-lbgv2o")},m(E,y){ce(E,t,y),ce(E,n,y),ce(E,i,y),ce(E,r,y),ce(E,a,y),Pn(a,e[1]),ce(E,s,y),ce(E,o,y),m(o,l),m(l,d),m(o,v),m(o,T),b||(A=[ct(a,"input",e[6]),ct(a,"keydown",e[7]),ct(l,"click",Hi(e[3])),ct(T,"click",Hi(e[2]))],b=!0)},p(E,[y]){y&2&&a.value!==E[1]&&Pn(a,E[1]),y&3&&c!==(c=E[0]===E[1])&&(l.disabled=c)},i:ot,o:ot,d(E){E&&_e(t),E&&_e(n),E&&_e(i),E&&_e(r),E&&_e(a),E&&_e(s),E&&_e(o),b=!1,vi(A)}}}function kAe(e,t,n){let{onCancel:i=()=>{}}=t,{onSave:r=()=>{}}=t,{userEmail:a}=t,s=a;function o(){i()}function l(){r(s)}oa(()=>{document.body.style.position="initial"});function d(){s=this.value,n(1,s)}const c=v=>v.code==="Enter"&&l();return e.$$set=v=>{"onCancel"in v&&n(4,i=v.onCancel),"onSave"in v&&n(5,r=v.onSave),"userEmail"in v&&n(0,a=v.userEmail)},e.$$.update=()=>{e.$$.dirty&2},[a,s,o,l,i,r,d,c]}class Y5 extends Qt{constructor(t){super(),Jt(this,t,kAe,TAe,Kt,{onCancel:4,onSave:5,userEmail:0})}}function SAe(e){let t,n,i;return{c(){t=P("button"),t.textContent="Edit",w(t,"class","btn btn-sm btn-success svelte-1uj64d0")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",e[0]),n=!0)},p:ot,i:ot,o:ot,d(r){r&&_e(t),n=!1,i()}}}function CAe(e,t,n){const{open:i,close:r}=pf("simple-modal");let{user:a}=t,{updateEmailOnServer:s}=t;const o=()=>{r()},l=c=>{s(a.id,c),r()},d=()=>{i(Y5,{userEmail:a.email,onSave:l,onCancel:o},{styleWindow:{width:"35%",height:"80%"},closeButton:!1,closeOnEsc:!1,closeOnOuterClick:!1,transitionWindow:t_,transitionWindowProps:{y:-100,duration:500}})};return e.$$set=c=>{"user"in c&&n(1,a=c.user),"updateEmailOnServer"in c&&n(2,s=c.updateEmailOnServer)},[d,a,s]}class G5 extends Qt{constructor(t){super(),Jt(this,t,CAe,SAe,Kt,{user:1,updateEmailOnServer:2})}}function Y4(e,t,n){const i=e.slice();return i[64]=t[n],i[65]=t,i[66]=n,i}function G4(e,t,n){const i=e.slice();return i[67]=t[n],i}function K4(e,t,n){const i=e.slice();return i[70]=t[n],i}function X4(e,t,n){const i=e.slice();return i[73]=t[n],i}function Q4(e){let t,n,i,r,a=e[73].message+"",s,o,l;function d(){return e[37](e[73])}return{c(){t=P("div"),n=P("button"),n.textContent="x",i=K(),r=new tx(!1),w(n,"class","close"),r.a=null,w(t,"class",s="alert animated fadeIn "+(e[73].style?e[73].style:"alert-info")+" svelte-133go5l")},m(c,v){ce(c,t,v),m(t,n),m(t,i),r.m(a,t),o||(l=ct(n,"click",d),o=!0)},p(c,v){e=c,v[0]&512&&a!==(a=e[73].message+"")&&r.p(a),v[0]&512&&s!==(s="alert animated fadeIn "+(e[73].style?e[73].style:"alert-info")+" svelte-133go5l")&&w(t,"class",s)},d(c){c&&_e(t),o=!1,l()}}}function PAe(e){let t;return{c(){t=P("tr"),t.innerHTML='<td colspan="5"><i>No users</i></td>'},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function EAe(e){let t,n,i=e[10],r=[];for(let s=0;s<i.length;s+=1)r[s]=eM(G4(e,i,s));const a=s=>W(r[s],1,1,()=>{r[s]=null});return{c(){for(let s=0;s<r.length;s+=1)r[s].c();t=On()},m(s,o){for(let l=0;l<r.length;l+=1)r[l]&&r[l].m(s,o);ce(s,t,o),n=!0},p(s,o){if(o[0]&1047648){i=s[10];let l;for(l=0;l<i.length;l+=1){const d=G4(s,i,l);r[l]?(r[l].p(d,o),U(r[l],1)):(r[l]=eM(d),r[l].c(),U(r[l],1),r[l].m(t.parentNode,t))}for(pn(),l=i.length;l<r.length;l+=1)a(l);hn()}},i(s){if(!n){for(let o=0;o<i.length;o+=1)U(r[o]);n=!0}},o(s){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)W(r[o]);n=!1},d(s){Nn(r,s),s&&_e(t)}}}function J4(e){let t,n;return t=new am({props:{$$slots:{default:[IAe]},$$scope:{ctx:e}}}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p(i,r){const a={};r[0]&1024|r[2]&16384&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function IAe(e){let t,n,i;return t=new G5({props:{user:e[67],updateEmailOnServer:e[11]}}),{c(){re(t.$$.fragment),n=K()},m(r,a){ae(t,r,a),ce(r,n,a),i=!0},p(r,a){const s={};a[0]&1024&&(s.user=r[67]),t.$set(s)},i(r){i||(U(t.$$.fragment,r),i=!0)},o(r){W(t.$$.fragment,r),i=!1},d(r){se(t,r),r&&_e(n)}}}function Z4(e){let t;return{c(){t=P("div")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function AAe(e){let t,n,i;function r(){return e[42](e[67])}return{c(){t=P("a"),t.textContent="Change",w(t,"href","/#")},m(a,s){ce(a,t,s),n||(i=ct(t,"click",Hi(r)),n=!0)},p(a,s){e=a},d(a){a&&_e(t),n=!1,i()}}}function DAe(e){let t,n,i,r,a,s,o,l,d,c;return{c(){t=P("div"),n=P("input"),i=K(),r=P("a"),r.innerHTML="<small>Generate Random</small>",a=K(),s=P("button"),s.textContent="Save",o=Le(`
              or
              `),l=P("a"),l.textContent="Cancel",w(n,"class","form-control"),w(r,"href","/#"),w(t,"class","form-group"),w(s,"class","btn btn-success"),w(l,"href","/#")},m(v,T){ce(v,t,T),m(t,n),Pn(n,e[6]),m(t,i),m(t,r),ce(v,a,T),ce(v,s,T),ce(v,o,T),ce(v,l,T),d||(c=[ct(n,"input",e[41]),ct(r,"click",Hi(e[19])),ct(s,"click",Hi(e[14])),ct(l,"click",Hi(e[15]))],d=!0)},p(v,T){T[0]&64&&n.value!==v[6]&&Pn(n,v[6])},d(v){v&&_e(t),v&&_e(a),v&&_e(s),v&&_e(o),v&&_e(l),d=!1,vi(c)}}}function OAe(e){let t,n,i;return{c(){t=P("div"),t.innerHTML=`<i class="fa fa-check" aria-hidden="true"></i>
                  Lifetime RTP`,n=K(),i=P("div"),i.textContent="Click to reactivate",w(i,"class","small")},m(r,a){ce(r,t,a),ce(r,n,a),ce(r,i,a)},d(r){r&&_e(t),r&&_e(n),r&&_e(i)}}}function MAe(e){let t;return{c(){t=Le("Make Lifetime RTP")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function xAe(e){let t,n,i;function r(){return e[46](e[67])}return{c(){t=P("button"),t.innerHTML='<i class="fa fa-check"> Activate</i>',w(t,"class","btn btn-warning btn-sm")},m(a,s){ce(a,t,s),n||(i=ct(t,"click",r),n=!0)},p(a,s){e=a},d(a){a&&_e(t),n=!1,i()}}}function RAe(e){let t,n,i;function r(){return e[45](e[67])}return{c(){t=P("button"),t.innerHTML='<i class="fa fa-ban"> Ban</i>',w(t,"class","btn btn-danger btn-sm")},m(a,s){ce(a,t,s),n||(i=ct(t,"click",r),n=!0)},p(a,s){e=a},d(a){a&&_e(t),n=!1,i()}}}function eM(e){let t,n,i,r=e[67].email+"",a,s,o,l,d,c,v=e[67].subscription+"",T,b,A,E,y,I,D,O,M,F,$,L,j=[],H=[];for(let Pe=0;Pe<j.length;Pe+=1)H[Pe]=Z4(K4(e,j,Pe));let V=null;j.length||(V=J4(e));function Q(Pe,We){return Pe[67].id===Pe[5]?DAe:AAe}let X=Q(e),te=X(e);function ne(){return e[43](e[67])}function be(Pe,We){return Pe[67].can_turn_rtp?MAe:OAe}let ue=be(e),Ce=ue(e);function ie(){return e[44](e[67])}function Y(Pe,We){return Pe[67].active?RAe:xAe}let he=Y(e),Me=he(e);return{c(){t=P("tr"),n=P("td"),i=P("span"),a=Le(r),s=K();for(let Pe=0;Pe<H.length;Pe+=1)H[Pe].c();V&&V.c(),o=K(),l=P("td"),te.c(),d=K(),c=P("td"),T=Le(v),b=K(),A=P("td"),E=P("button"),E.innerHTML=`<i class="fa fa-user"> </i>
              Ghost In`,y=K(),I=P("td"),D=P("button"),Ce.c(),O=K(),M=P("td"),Me.c(),F=K(),w(E,"class","btn btn-success btn-sm"),w(D,"class","btn btn-success btn-sm")},m(Pe,We){ce(Pe,t,We),m(t,n),m(n,i),m(i,a),m(n,s);for(let qe=0;qe<H.length;qe+=1)H[qe]&&H[qe].m(n,null);V&&V.m(n,null),m(t,o),m(t,l),te.m(l,null),m(t,d),m(t,c),m(c,T),m(t,b),m(t,A),m(A,E),m(t,y),m(t,I),m(I,D),Ce.m(D,null),m(t,O),m(t,M),Me.m(M,null),m(t,F),$||(L=[ct(E,"click",ne),ct(D,"click",ie)],$=!0)},p(Pe,We){if(e=Pe,r!==(r=e[67].email+"")&&vt(a,r),We[0]&3072){j=[];let qe;for(qe=0;qe<j.length;qe+=1){const ee=K4(e,j,qe);H[qe]?H[qe].p(ee,We):(H[qe]=Z4(),H[qe].c(),H[qe].m(n,null))}for(;qe<H.length;qe+=1)H[qe].d(1);H.length=j.length,!j.length&&V?V.p(e,We):j.length?V&&(pn(),W(V,1,1,()=>{V=null}),hn()):(V=J4(e),V.c(),U(V,1),V.m(n,null))}X===(X=Q(e))&&te?te.p(e,We):(te.d(1),te=X(e),te&&(te.c(),te.m(l,null))),v!==(v=e[67].subscription+"")&&vt(T,v),ue!==(ue=be(e))&&(Ce.d(1),Ce=ue(e),Ce&&(Ce.c(),Ce.m(D,null))),he===(he=Y(e))&&Me?Me.p(e,We):(Me.d(1),Me=he(e),Me&&(Me.c(),Me.m(M,null)))},i:ot,o:ot,d(Pe){Pe&&_e(t),Nn(H,Pe),V&&V.d(),te.d(),Ce.d(),Me.d(),$=!1,vi(L)}}}function tM(e){let t,n,i,r,a=e[8],s=[];for(let o=0;o<a.length;o+=1)s[o]=nM(Y4(e,a,o));return{c(){t=P("table"),n=P("thead"),n.innerHTML=`<th></th> 
      <th></th> 
      <th></th> 
      <th></th> 
      <th></th> 
      <th></th>`,i=K(),r=P("tbody");for(let o=0;o<s.length;o+=1)s[o].c();w(t,"id","new-user-list"),w(t,"class","table table-striped user-table svelte-133go5l")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,r);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(r,null)},p(o,l){if(l[0]&5243136){a=o[8];let d;for(d=0;d<a.length;d+=1){const c=Y4(o,a,d);s[d]?s[d].p(c,l):(s[d]=nM(c),s[d].c(),s[d].m(r,null))}for(;d<s.length;d+=1)s[d].d(1);s.length=a.length}},d(o){o&&_e(t),Nn(s,o)}}}function nM(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne;function be(){e[49].call(i,e[65],e[66])}function ue(){e[50].call(s,e[65],e[66])}function Ce(){e[51].call(c,e[65],e[66])}function ie(){e[52].call(y,e[65],e[66])}function Y(){return e[53](e[64])}function he(){return e[54](e[64])}return{c(){t=P("tr"),n=P("td"),i=P("input"),r=K(),a=P("td"),s=P("input"),o=K(),l=P("td"),d=P("label"),c=P("input"),v=K(),T=P("span"),T.textContent=" RTP Lifetime",b=K(),A=P("td"),E=P("label"),y=P("input"),I=K(),D=P("span"),D.textContent=" Active",O=K(),M=P("td"),F=P("button"),$=P("i"),$.textContent=" Accept",j=Le(`
             
            `),H=P("button"),H.innerHTML='<i class="fa fa-trash-o"></i>',V=K(),Q=P("td"),X=K(),w(i,"class","form-control string required"),w(i,"type","text"),w(i,"placeholder","Email"),w(n,"class","col-md-2"),w(s,"class","form-control string email optional"),w(s,"type","password"),w(s,"placeholder","Password"),w(a,"class","col-md-2"),w(c,"id","user_lifetime_rtp"),w(c,"type","checkbox"),w(T,"data-toggle","popover-hover"),w(T,"data-content","RTP Lifetime"),w(d,"for","user_lifetime_rtp"),w(l,"class","col-md-2"),w(y,"id","user_active"),w(y,"type","checkbox"),w(D,"data-toggle","popover-hover"),w(D,"data-content","Active"),w(E,"for","user_active"),w(A,"class","col-md-2"),w($,"class","fa fa-check-square-o"),w(F,"class","btn btn-sm btn-success"),F.disabled=L=!e[64].email,w(H,"class","btn btn-sm btn-danger"),w(M,"class","text-right")},m(Me,Pe){ce(Me,t,Pe),m(t,n),m(n,i),Pn(i,e[64].email),m(t,r),m(t,a),m(a,s),Pn(s,e[64].password),m(t,o),m(t,l),m(l,d),m(d,c),c.checked=e[64].pro,m(d,v),m(d,T),m(t,b),m(t,A),m(A,E),m(E,y),y.checked=e[64].active,m(E,I),m(E,D),m(t,O),m(t,M),m(M,F),m(F,$),m(M,j),m(M,H),m(t,V),m(t,Q),m(t,X),te||(ne=[ct(i,"input",be),ct(s,"input",ue),ct(c,"change",Ce),ct(y,"change",ie),ct(F,"click",Y),ct(H,"click",he)],te=!0)},p(Me,Pe){e=Me,Pe[0]&256&&i.value!==e[64].email&&Pn(i,e[64].email),Pe[0]&256&&s.value!==e[64].password&&Pn(s,e[64].password),Pe[0]&256&&(c.checked=e[64].pro),Pe[0]&256&&(y.checked=e[64].active),Pe[0]&256&&L!==(L=!e[64].email)&&(F.disabled=L)},d(Me){Me&&_e(t),te=!1,vi(ne)}}}function iM(e){let t,n,i,r,a,s,o;return{c(){t=P("button"),n=P("i"),n.textContent=" Accept All",r=K(),a=P("button"),a.innerHTML='<i class="fa fa-trash-o"> Clear New</i>',w(n,"class","fa fa-check-square-o"),w(t,"class","btn btn-success add-client-btn"),t.disabled=i=!e[8].some(aM),w(a,"class","btn btn-danger add-client-btn")},m(l,d){ce(l,t,d),m(t,n),ce(l,r,d),ce(l,a,d),s||(o=[ct(t,"click",e[56]),ct(a,"click",e[57])],s=!0)},p(l,d){d[0]&256&&i!==(i=!l[8].some(aM))&&(t.disabled=i)},d(l){l&&_e(t),l&&_e(r),l&&_e(a),s=!1,vi(o)}}}function $Ae(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H,V,Q,X,te=e[9],ne=[];for(let G=0;G<te.length;G+=1)ne[G]=Q4(X4(e,te,G));function be(G){e[39](G)}function ue(G){e[40](G)}let Ce={adjustedCurrentPage:e[3],totalPages:e[4]};e[2]!==void 0&&(Ce.perPage=e[2]),e[0]!==void 0&&(Ce.currentPage=e[0]),o=new Gy({props:Ce}),Oe.push(()=>$e(o,"perPage",be)),Oe.push(()=>$e(o,"currentPage",ue));const ie=[EAe,PAe],Y=[];function he(G,me){return G[10]&&G[10].length>0?0:1}E=he(e),y=Y[E]=ie[E](e);function Me(G){e[47](G)}function Pe(G){e[48](G)}let We={adjustedCurrentPage:e[3],totalPages:e[4]};e[2]!==void 0&&(We.perPage=e[2]),e[0]!==void 0&&(We.currentPage=e[0]),D=new Gy({props:We}),Oe.push(()=>$e(D,"perPage",Me)),Oe.push(()=>$e(D,"currentPage",Pe));let qe=e[8].length>0&&tM(e),ee=e[8].length>0&&iM(e);return{c(){for(let G=0;G<ne.length;G+=1)ne[G].c();t=K(),n=P("div"),i=P("span"),r=K(),a=P("input"),s=K(),re(o.$$.fragment),c=K(),v=P("table"),T=P("tbody"),b=P("tr"),b.innerHTML=`<th>Email</th> 
      <th>New Password</th> 
      <th>Subscription</th> 
      <th></th> 
      <th></th> 
      <th></th>`,A=K(),y.c(),I=K(),re(D.$$.fragment),F=K(),qe&&qe.c(),$=K(),L=P("div"),j=P("button"),j.innerHTML='<i class="fa fa-plus-square-o"> Add New User</i>',H=K(),ee&&ee.c(),w(i,"class","fa fa-search form-control-feedback"),cr(i,"top","0px"),cr(i,"right","1px"),w(a,"type","text"),w(a,"class","form-control"),w(a,"placeholder","Search"),w(n,"class","form-group has-feedback"),w(v,"id","user-list"),w(v,"class","table table-striped user-table svelte-133go5l"),wt(v,"busy",e[7]),w(j,"class","btn btn-primary add-client-btn")},m(G,me){for(let Te=0;Te<ne.length;Te+=1)ne[Te]&&ne[Te].m(G,me);ce(G,t,me),ce(G,n,me),m(n,i),m(n,r),m(n,a),Pn(a,e[1]),ce(G,s,me),ae(o,G,me),ce(G,c,me),ce(G,v,me),m(v,T),m(T,b),m(T,A),Y[E].m(T,null),ce(G,I,me),ae(D,G,me),ce(G,F,me),qe&&qe.m(G,me),ce(G,$,me),ce(G,L,me),m(L,j),m(L,H),ee&&ee.m(L,null),V=!0,Q||(X=[ct(a,"input",e[38]),ct(j,"click",e[55])],Q=!0)},p(G,me){if(me[0]&33554944){te=G[9];let Ve;for(Ve=0;Ve<te.length;Ve+=1){const Ke=X4(G,te,Ve);ne[Ve]?ne[Ve].p(Ke,me):(ne[Ve]=Q4(Ke),ne[Ve].c(),ne[Ve].m(t.parentNode,t))}for(;Ve<ne.length;Ve+=1)ne[Ve].d(1);ne.length=te.length}me[0]&2&&a.value!==G[1]&&Pn(a,G[1]);const Te={};me[0]&8&&(Te.adjustedCurrentPage=G[3]),me[0]&16&&(Te.totalPages=G[4]),!l&&me[0]&4&&(l=!0,Te.perPage=G[2],Ne(()=>l=!1)),!d&&me[0]&1&&(d=!0,Te.currentPage=G[0],Ne(()=>d=!1)),o.$set(Te);let De=E;E=he(G),E===De?Y[E].p(G,me):(pn(),W(Y[De],1,1,()=>{Y[De]=null}),hn(),y=Y[E],y?y.p(G,me):(y=Y[E]=ie[E](G),y.c()),U(y,1),y.m(T,null)),(!V||me[0]&128)&&wt(v,"busy",G[7]);const we={};me[0]&8&&(we.adjustedCurrentPage=G[3]),me[0]&16&&(we.totalPages=G[4]),!O&&me[0]&4&&(O=!0,we.perPage=G[2],Ne(()=>O=!1)),!M&&me[0]&1&&(M=!0,we.currentPage=G[0],Ne(()=>M=!1)),D.$set(we),G[8].length>0?qe?qe.p(G,me):(qe=tM(G),qe.c(),qe.m($.parentNode,$)):qe&&(qe.d(1),qe=null),G[8].length>0?ee?ee.p(G,me):(ee=iM(G),ee.c(),ee.m(L,null)):ee&&(ee.d(1),ee=null)},i(G){V||(U(o.$$.fragment,G),U(y),U(D.$$.fragment,G),V=!0)},o(G){W(o.$$.fragment,G),W(y),W(D.$$.fragment,G),V=!1},d(G){Nn(ne,G),G&&_e(t),G&&_e(n),G&&_e(s),se(o,G),G&&_e(c),G&&_e(v),Y[E].d(),G&&_e(I),se(D,G),G&&_e(F),qe&&qe.d(G),G&&_e($),G&&_e(L),ee&&ee.d(),Q=!1,vi(X)}}}function rM(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const aM=e=>e.email;function NAe(e,t,n){let i,r,a,s,o,{users:l}=t,{updatePasswordPath:d}=t,{updateEmailPath:c}=t,{ghostInPath:v}=t,{turnProPath:T}=t,{usersPath:b}=t,{newUserPath:A}=t,{activateUserPath:E}=t,{deactivateUserPath:y}=t,I=null,D="",O=!1,M=1,F="",$=10,L=[],j=[];const H={Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":window.$('meta[name="csrf-token"]').attr("content")},V=async(Dt,Xt={})=>{try{return await(await fetch(Dt,{headers:H,...Xt})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}},Q=async(Dt,Xt)=>{n(7,O=!0);try{const Mt=await V(d.replace("@",Dt),{method:"POST",body:JSON.stringify({new_password:Xt})});Mt.success&&(We(),Te(Mt.success)),Mt.error&&Te(Mt.error,"alert-danger")}catch(Mt){Te(Mt.message,"alert-danger")}n(7,O=!1)},X=async(Dt,Xt)=>{n(7,O=!0);try{const Mt=await V(c.replace("@",Dt),{method:"PATCH",body:JSON.stringify({email:Xt})});Mt.success&&(We(),Te(Mt.success)),Mt.error&&Te(Mt.error,"alert-danger")}catch(Mt){Te(Mt.message,"alert-danger")}n(7,O=!1)},te=async Dt=>{try{const Xt=await V(T.replace("@",Dt),{method:"POST",body:JSON.stringify({})});Xt.success&&(We(),Te(Xt.success)),Xt.error&&Te(Xt.error,"alert-danger")}catch(Xt){Te(Xt.message,"alert-danger")}};function ne(Dt){n(5,I=Dt),n(6,D="")}function be(){Q(I,D),n(5,I=null),n(6,D=""),n(26,l)}function ue(){n(5,I=null),n(6,D="")}function Ce(Dt){window.open(v.replace("@",Dt))}const ie=async(Dt,Xt)=>{try{const Mt=await V(Dt.replace("@",Xt),{method:"POST",body:JSON.stringify({})});Mt.success&&(We(),Te(Mt.success)),Mt.error&&Te(Mt.error,"alert-danger")}catch(Mt){Te(Mt.message,"alert-danger")}},Y=async Dt=>{await ie(E,Dt)},he=async Dt=>{await ie(y,Dt)};function Me(){n(6,D=Math.random().toString(36).slice(2))}const Pe=async Dt=>{const Xt=L.find(Mt=>Mt.uuid===Dt);try{const Mt=await V(b,{method:"POST",body:JSON.stringify({email:Xt.email,password:Xt.password,pro:!!Xt.pro,active:!!Xt.active})});Mt.success&&(We(),ee(Dt),Te(Mt.success)),Mt.error&&Te(Mt.error,"alert-danger")}catch(Mt){Te(Mt.message,"alert-danger")}},We=async()=>{const Dt=await V(b,{method:"GET"});n(26,l=Dt)},qe=async()=>{try{const Dt=await V(A,{method:"GET"});Dt.error?Te(Dt.error,"alert-danger"):n(8,L=[...L,{uuid:rM(),email:null,password:null,pro:null,active:!0}])}catch(Dt){Te(Dt.message,"alert-danger")}};function ee(Dt){n(8,L=L.filter(Xt=>Xt.uuid!=Dt))}const G=async()=>{L.forEach(Dt=>Dt.email&&Pe(Dt.uuid))};function me(){n(8,L=[])}function Te(Dt,Xt="alert-info"){n(9,j=[...j,{uuid:rM(),message:Dt,style:Xt}])}function De(Dt){n(9,j=j.filter(Xt=>Xt.uuid!==Dt))}const we=Dt=>De(Dt.uuid);function Ve(){F=this.value,n(1,F)}function Ke(Dt){$=Dt,n(2,$)}function yt(Dt){M=Dt,n(0,M)}function ht(){D=this.value,n(6,D)}const Je=Dt=>ne(Dt.id),pt=Dt=>Ce(Dt.id),Tt=Dt=>te(Dt.id),it=Dt=>he(Dt.id),Ge=Dt=>Y(Dt.id);function st(Dt){$=Dt,n(2,$)}function It(Dt){M=Dt,n(0,M)}function Ct(Dt,Xt){Dt[Xt].email=this.value,n(8,L)}function bt(Dt,Xt){Dt[Xt].password=this.value,n(8,L)}function Rt(Dt,Xt){Dt[Xt].pro=this.checked,n(8,L)}function cn(Dt,Xt){Dt[Xt].active=this.checked,n(8,L)}const nn=Dt=>Pe(Dt.uuid),Qe=Dt=>ee(Dt.uuid),Ft=()=>qe(),Fn=()=>G(),He=()=>me();return e.$$set=Dt=>{"users"in Dt&&n(26,l=Dt.users),"updatePasswordPath"in Dt&&n(27,d=Dt.updatePasswordPath),"updateEmailPath"in Dt&&n(28,c=Dt.updateEmailPath),"ghostInPath"in Dt&&n(29,v=Dt.ghostInPath),"turnProPath"in Dt&&n(30,T=Dt.turnProPath),"usersPath"in Dt&&n(31,b=Dt.usersPath),"newUserPath"in Dt&&n(32,A=Dt.newUserPath),"activateUserPath"in Dt&&n(33,E=Dt.activateUserPath),"deactivateUserPath"in Dt&&n(34,y=Dt.deactivateUserPath)},e.$$.update=()=>{e.$$.dirty[0]&2&&n(36,i=F.toLowerCase()),e.$$.dirty[0]&67108864|e.$$.dirty[1]&32&&n(35,r=l.filter(function(Dt){return Dt.email.toLowerCase().includes(i)})),e.$$.dirty[0]&4|e.$$.dirty[1]&16&&n(4,a=Math.ceil(r.length/$)),e.$$.dirty[0]&17&&n(3,s=Math.min(M,a)),e.$$.dirty[0]&12|e.$$.dirty[1]&16&&n(10,o=r.slice((s-1)*$,s*$))},[M,F,$,s,a,I,D,O,L,j,o,X,te,ne,be,ue,Ce,Y,he,Me,Pe,qe,ee,G,me,De,l,d,c,v,T,b,A,E,y,r,i,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge,st,It,Ct,bt,Rt,cn,nn,Qe,Ft,Fn,He]}class FAe extends Qt{constructor(t){super(),Jt(this,t,NAe,$Ae,Kt,{users:26,updatePasswordPath:27,updateEmailPath:28,ghostInPath:29,turnProPath:30,usersPath:31,newUserPath:32,activateUserPath:33,deactivateUserPath:34},null,[-1,-1,-1])}}function sM(e,t,n){const i=e.slice();return i[14]=t[n],i}function LAe(e){let t,n;const i=e[7].default,r=fu(i,e,e[6],null);return{c(){t=P("div"),r&&r.c(),w(t,"class","pagination-line__row svelte-fwcv5y")},m(a,s){ce(a,t,s),r&&r.m(t,null),n=!0},p(a,s){r&&r.p&&(!n||s&64)&&cu(r,i,a,a[6],n?pu(i,a[6],s,null):_u(a[6]),null)},i(a){n||(U(r,a),n=!0)},o(a){W(r,a),n=!1},d(a){a&&_e(t),r&&r.d(a)}}}function oM(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=e[4]>1&&lM(e),A=e[4]>2&&uM(),E=xs.range(e[4],e[3]+1),y=[];for(let O=0;O<E.length;O+=1)y[O]=dM(sM(e,E,O));let I=e[3]<e[1]-1&&fM(),D=e[3]<e[1]&&cM(e);return{c(){t=P("div"),n=P("ul"),i=P("li"),i.innerHTML='<span class="page-link pagination-button svelte-fwcv5y">«</span>',r=K(),b&&b.c(),a=K(),A&&A.c(),s=K();for(let O=0;O<y.length;O+=1)y[O].c();o=K(),I&&I.c(),l=K(),D&&D.c(),d=K(),c=P("li"),c.innerHTML='<span class="page-link pagination-button svelte-fwcv5y">»</span>',w(i,"class","page-item svelte-fwcv5y"),wt(i,"disabled",e[0]<=1),w(c,"class","page-item svelte-fwcv5y"),wt(c,"disabled",e[2]===e[1]),w(n,"class","pagination pagination-sm pagination-line__list justify-content-end svelte-fwcv5y"),w(t,"class","pagination-line__row svelte-fwcv5y")},m(O,M){ce(O,t,M),m(t,n),m(n,i),m(n,r),b&&b.m(n,null),m(n,a),A&&A.m(n,null),m(n,s);for(let F=0;F<y.length;F+=1)y[F]&&y[F].m(n,null);m(n,o),I&&I.m(n,null),m(n,l),D&&D.m(n,null),m(n,d),m(n,c),v||(T=[ct(i,"click",Hi(e[8])),ct(c,"click",Hi(e[12]))],v=!0)},p(O,M){if(M&1&&wt(i,"disabled",O[0]<=1),O[4]>1?b?b.p(O,M):(b=lM(O),b.c(),b.m(n,a)):b&&(b.d(1),b=null),O[4]>2?A||(A=uM(),A.c(),A.m(n,s)):A&&(A.d(1),A=null),M&29){E=xs.range(O[4],O[3]+1);let F;for(F=0;F<E.length;F+=1){const $=sM(O,E,F);y[F]?y[F].p($,M):(y[F]=dM($),y[F].c(),y[F].m(n,o))}for(;F<y.length;F+=1)y[F].d(1);y.length=E.length}O[3]<O[1]-1?I||(I=fM(),I.c(),I.m(n,l)):I&&(I.d(1),I=null),O[3]<O[1]?D?D.p(O,M):(D=cM(O),D.c(),D.m(n,d)):D&&(D.d(1),D=null),M&6&&wt(c,"disabled",O[2]===O[1])},d(O){O&&_e(t),b&&b.d(),A&&A.d(),Nn(y,O),I&&I.d(),D&&D.d(),v=!1,vi(T)}}}function lM(e){let t,n,i,r;return{c(){t=P("li"),n=P("span"),n.textContent="1",w(n,"class","page-link pagination-button svelte-fwcv5y"),w(t,"class","page-item svelte-fwcv5y"),wt(t,"active",e[2]===1)},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(n,"click",Hi(e[9])),i=!0)},p(a,s){s&4&&wt(t,"active",a[2]===1)},d(a){a&&_e(t),i=!1,r()}}}function uM(e){let t;return{c(){t=P("li"),t.innerHTML='<span class="page-link text-muted">…</span>',w(t,"class","page-item disabled svelte-fwcv5y")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function dM(e){let t,n,i=e[14]+"",r,a,s;function o(){return e[10](e[14])}return{c(){t=P("li"),n=P("span"),r=Le(i),w(n,"class","page-link pagination-button svelte-fwcv5y"),w(t,"class","page-item svelte-fwcv5y"),wt(t,"active",e[14]===e[2])},m(l,d){ce(l,t,d),m(t,n),m(n,r),a||(s=ct(t,"click",Hi(o)),a=!0)},p(l,d){e=l,d&24&&i!==(i=e[14]+"")&&vt(r,i),d&28&&wt(t,"active",e[14]===e[2])},d(l){l&&_e(t),a=!1,s()}}}function fM(e){let t;return{c(){t=P("li"),t.innerHTML='<span class="page-link text-muted">…</span>',w(t,"class","page-item disabled svelte-fwcv5y")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function cM(e){let t,n,i,r,a;return{c(){t=P("li"),n=P("span"),i=Le(e[1]),w(n,"class","page-link pagination-button svelte-fwcv5y"),w(t,"class","page-item svelte-fwcv5y"),wt(t,"active",e[2]===e[1])},m(s,o){ce(s,t,o),m(t,n),m(n,i),r||(a=ct(n,"click",Hi(e[11])),r=!0)},p(s,o){o&2&&vt(i,s[1]),o&6&&wt(t,"active",s[2]===s[1])},d(s){s&&_e(t),r=!1,a()}}}function HAe(e){let t,n,i,r=e[5]&&LAe(e),a=e[1]>1&&oM(e);return{c(){t=P("div"),r&&r.c(),n=K(),a&&a.c(),w(t,"class","pagination-line svelte-fwcv5y")},m(s,o){ce(s,t,o),r&&r.m(t,null),m(t,n),a&&a.m(t,null),i=!0},p(s,[o]){s[5]&&r.p(s,o),s[1]>1?a?a.p(s,o):(a=oM(s),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(s){i||(U(r),i=!0)},o(s){W(r),i=!1},d(s){s&&_e(t),r&&r.d(),a&&a.d()}}}function jAe(e,t,n){let i,r,a,{$$slots:s={},$$scope:o}=t;const l=QM(s);let{page:d}=t,{totalPages:c}=t,v=l.default;const T=()=>n(0,d=d-1),b=()=>n(0,d=1),A=I=>n(0,d=I),E=()=>n(0,d=c),y=()=>n(0,d=d+1);return e.$$set=I=>{"page"in I&&n(0,d=I.page),"totalPages"in I&&n(1,c=I.totalPages),"$$scope"in I&&n(6,o=I.$$scope)},e.$$.update=()=>{e.$$.dirty&3&&n(2,i=Math.min(d,c)),e.$$.dirty&4&&n(4,r=Math.max(1,i-2)),e.$$.dirty&6&&n(3,a=Math.min(c,i+2))},[d,c,i,a,r,v,o,s,T,b,A,E,y]}class L2 extends Qt{constructor(t){super(),Jt(this,t,jAe,HAe,Kt,{page:0,totalPages:1})}}function BAe(e){let t,n,i,r,a,s;return{c(){t=P("div"),n=P("span"),i=K(),r=P("input"),w(n,"class","fa fa-search form-control-feedback"),cr(n,"top","0px"),cr(n,"right","1px"),w(r,"type","text"),w(r,"class","form-control"),w(r,"placeholder","Search"),w(t,"class","form-group has-feedback")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,r),Pn(r,e[0]),a||(s=ct(r,"input",e[1]),a=!0)},p(o,[l]){l&1&&r.value!==o[0]&&Pn(r,o[0])},i:ot,o:ot,d(o){o&&_e(t),a=!1,s()}}}function UAe(e,t,n){let{query:i}=t;function r(){i=this.value,n(0,i)}return e.$$set=a=>{"query"in a&&n(0,i=a.query)},[i,r]}class K5 extends Qt{constructor(t){super(),Jt(this,t,UAe,BAe,Kt,{query:0})}}function qAe(e){let t,n,i,r,a;return{c(){t=P("a"),n=P("i"),i=Le(`
   `),r=Le(e[2]),w(n,"class","fa fa-user"),w(t,"href",e[0]),w(t,"class",a=`btn ${e[1]} btn-sm btn-primary summary-info__btn`),w(t,"target","_blank")},m(s,o){ce(s,t,o),m(t,n),m(t,i),m(t,r)},p(s,[o]){o&4&&vt(r,s[2]),o&1&&w(t,"href",s[0]),o&2&&a!==(a=`btn ${s[1]} btn-sm btn-primary summary-info__btn`)&&w(t,"class",a)},i:ot,o:ot,d(s){s&&_e(t)}}}function WAe(e,t,n){let{redirectUrl:i}=t,{className:r}=t,{caption:a}=t;return e.$$set=s=>{"redirectUrl"in s&&n(0,i=s.redirectUrl),"className"in s&&n(1,r=s.className),"caption"in s&&n(2,a=s.caption)},[i,r,a]}class gm extends Qt{constructor(t){super(),Jt(this,t,WAe,qAe,Kt,{redirectUrl:0,className:1,caption:2})}}function _M(e,t,n){const i=e.slice();return i[4]=t[n].name,i[5]=t[n].title,i[6]=t[n].sortable,i}function VAe(e){let t,n=e[5]+"",i;return{c(){t=P("th"),i=Le(n),w(t,"class","svelte-1vx6trn")},m(r,a){ce(r,t,a),m(t,i)},p:ot,d(r){r&&_e(t)}}}function zAe(e){let t,n,i,r,a,s;function o(v,T){return T&1&&(i=null),i==null&&(i=!!v[0].startsWith(v[4])),i?GAe:YAe}let l=o(e,-1),d=l(e);function c(){return e[3](e[4])}return{c(){t=P("th"),n=P("span"),d.c(),r=K(),w(n,"class","sortable svelte-1vx6trn"),w(t,"name",e[4]),w(t,"class","svelte-1vx6trn")},m(v,T){ce(v,t,T),m(t,n),d.m(n,null),m(t,r),a||(s=ct(t,"click",Hi(c)),a=!0)},p(v,T){e=v,l===(l=o(e,T))&&d?d.p(e,T):(d.d(1),d=l(e),d&&(d.c(),d.m(n,null)))},d(v){v&&_e(t),d.d(),a=!1,s()}}}function YAe(e){let t=e[5]+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p:ot,d(i){i&&_e(n)}}}function GAe(e){let t=e[5]+"",n,i,r=e[0].endsWith("asc")?"↑":"↓",a;return{c(){n=Le(t),i=Le(" "),a=Le(r)},m(s,o){ce(s,n,o),ce(s,i,o),ce(s,a,o)},p(s,o){o&1&&r!==(r=s[0].endsWith("asc")?"↑":"↓")&&vt(a,r)},d(s){s&&_e(n),s&&_e(i),s&&_e(a)}}}function pM(e){let t;function n(a,s){return a[6]?zAe:VAe}let r=n(e)(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,s){r.p(a,s)},d(a){r.d(a),a&&_e(t)}}}function KAe(e){let t,n=e[1],i=[];for(let r=0;r<n.length;r+=1)i[r]=pM(_M(e,n,r));return{c(){t=P("thead");for(let r=0;r<i.length;r+=1)i[r].c();w(t,"class","svelte-1vx6trn")},m(r,a){ce(r,t,a);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(t,null)},p(r,[a]){if(a&7){n=r[1];let s;for(s=0;s<n.length;s+=1){const o=_M(r,n,s);i[s]?i[s].p(o,a):(i[s]=pM(o),i[s].c(),i[s].m(t,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=n.length}},i:ot,o:ot,d(r){r&&_e(t),Nn(i,r)}}}function XAe(e,t,n){let{sort:i="name_asc"}=t,r=[{title:"Name",name:"name",sortable:!0},{title:"",sortable:!1},{title:"Total tax",sortable:!1},{title:"W/H & Payments",sortable:!1},{title:"Tax Due",sortable:!1},{title:"Last Activity",name:"last_activity_at",sortable:!0}];function a(o){let l="asc";i.startsWith(o)&&(l=i.endsWith("asc")?"desc":"asc"),n(0,i=`${o}_${l}`)}const s=o=>a(o);return e.$$set=o=>{"sort"in o&&n(0,i=o.sort)},[i,r,a,s]}class QAe extends Qt{constructor(t){super(),Jt(this,t,XAe,KAe,Kt,{sort:0})}}function hM(e,t,n){const i=e.slice();return i[2]=t[n],i}function mM(e,t,n){const i=e.slice();return i[5]=t[n],i}function gM(e,t,n){const i=e.slice();return i[5]=t[n],i}function vM(e){let t;return{c(){t=P("div"),w(t,"class","fake-client-detail__cell shimmer-head svelte-ga67nq"),cr(t,"max-width",e[5]+"%")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function bM(e){let t;return{c(){t=P("div"),w(t,"class","fake-client-detail__cell shimmer-data svelte-ga67nq"),cr(t,"max-width",e[5]+"%")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function yM(e){let t,n,i,r,a=e[0],s=[];for(let o=0;o<a.length;o+=1)s[o]=bM(mM(e,a,o));return{c(){t=P("tr"),n=P("td"),i=P("div");for(let o=0;o<s.length;o+=1)s[o].c();r=K(),w(i,"class","fake-client-detail svelte-ga67nq"),w(n,"colspan","7"),w(n,"class","table-cell-loader svelte-ga67nq")},m(o,l){ce(o,t,l),m(t,n),m(n,i);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(i,null);m(t,r)},p(o,l){if(l&1){a=o[0];let d;for(d=0;d<a.length;d+=1){const c=mM(o,a,d);s[d]?s[d].p(c,l):(s[d]=bM(c),s[d].c(),s[d].m(i,null))}for(;d<s.length;d+=1)s[d].d(1);s.length=a.length}},d(o){o&&_e(t),Nn(s,o)}}}function JAe(e){let t,n,i,r,a,s,o=e[0],l=[];for(let v=0;v<o.length;v+=1)l[v]=vM(gM(e,o,v));let d=e[1],c=[];for(let v=0;v<d.length;v+=1)c[v]=yM(hM(e,d,v));return{c(){t=P("table"),n=P("thead"),i=P("th"),r=P("div");for(let v=0;v<l.length;v+=1)l[v].c();a=K(),s=P("tbody");for(let v=0;v<c.length;v+=1)c[v].c();w(r,"class","fake-client-detail svelte-ga67nq"),w(i,"class","p-0 border-top-0 svelte-ga67nq"),w(i,"colspan","7"),w(t,"id","client-list"),w(t,"class","table")},m(v,T){ce(v,t,T),m(t,n),m(n,i),m(i,r);for(let b=0;b<l.length;b+=1)l[b]&&l[b].m(r,null);m(t,a),m(t,s);for(let b=0;b<c.length;b+=1)c[b]&&c[b].m(s,null)},p(v,[T]){if(T&1){o=v[0];let b;for(b=0;b<o.length;b+=1){const A=gM(v,o,b);l[b]?l[b].p(A,T):(l[b]=vM(A),l[b].c(),l[b].m(r,null))}for(;b<l.length;b+=1)l[b].d(1);l.length=o.length}if(T&1){d=v[1];let b;for(b=0;b<d.length;b+=1){const A=hM(v,d,b);c[b]?c[b].p(A,T):(c[b]=yM(A),c[b].c(),c[b].m(s,null))}for(;b<c.length;b+=1)c[b].d(1);c.length=d.length}},i:ot,o:ot,d(v){v&&_e(t),Nn(l,v),Nn(c,v)}}}function ZAe(e){const t=[10,40,5,5,5,10,25],n=Xn.times(10);return[t,n]}class eDe extends Qt{constructor(t){super(),Jt(this,t,ZAe,JAe,Kt,{})}}function tDe(e,t){t===void 0&&(t={});var n=t.selector,i=x7(t,["selector"]);return new YM(function(r){var a=new AbortController,s=a.signal,o=!0,l=i.signal;if(l)if(l.aborted)a.abort();else{var d=function(){s.aborted||a.abort()};l.addEventListener("abort",d),r.add(function(){return l.removeEventListener("abort",d)})}var c=jS(jS({},i),{signal:s}),v=function(T){o=!1,r.error(T)};return fetch(e,c).then(function(T){n?vm(n(T)).subscribe(Zh(r,void 0,function(){o=!1,r.complete()},v)):(o=!1,r.next(T),r.complete())}).catch(v),function(){o&&a.abort()}})}function wM(e,t,n){const i=e.slice();return i[53]=t[n],i[54]=t,i[55]=n,i}function TM(e,t,n){const i=e.slice();return i[56]=t[n],i}function kM(e,t,n){const i=e.slice();return i[59]=t[n],i}function SM(e,t,n){const i=e.slice();return i[62]=t[n],i}function CM(e){let t,n,i,r,a=e[62].message+"",s,o,l;function d(){return e[29](e[62])}return{c(){t=P("div"),n=P("button"),n.textContent="x",i=K(),r=new tx(!1),w(n,"class","close"),r.a=null,w(t,"class",s="alert animated fadeIn "+(e[62].style?e[62].style:"alert-info")+" svelte-1p8d4oq")},m(c,v){ce(c,t,v),m(t,n),m(t,i),r.m(a,t),o||(l=ct(n,"click",d),o=!0)},p(c,v){e=c,v[0]&16&&a!==(a=e[62].message+"")&&r.p(a),v[0]&16&&s!==(s="alert animated fadeIn "+(e[62].style?e[62].style:"alert-info")+" svelte-1p8d4oq")&&w(t,"class",s)},d(c){c&&_e(t),o=!1,l()}}}function nDe(e){let t,n,i;function r(s){e[30](s)}let a={};return e[7]!==void 0&&(a.query=e[7]),t=new K5({props:a}),Oe.push(()=>$e(t,"query",r)),{c(){re(t.$$.fragment)},m(s,o){ae(t,s,o),i=!0},p(s,o){const l={};!n&&o[0]&128&&(n=!0,l.query=s[7],Ne(()=>n=!1)),t.$set(l)},i(s){i||(U(t.$$.fragment,s),i=!0)},o(s){W(t.$$.fragment,s),i=!1},d(s){se(t,s)}}}function iDe(e){let t;return{c(){t=P("h2"),t.textContent="No clients here",w(t,"class","text-center")},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function rDe(e){let t,n,i,r,a,s,o,l,d;function c(I){e[32](I)}let v={};e[9]!==void 0&&(v.sort=e[9]),n=new QAe({props:v}),Oe.push(()=>$e(n,"sort",c));let T=e[8],b=[];for(let I=0;I<T.length;I+=1)b[I]=IM(TM(e,T,I));const A=I=>W(b[I],1,1,()=>{b[I]=null});function E(I){e[34](I)}let y={totalPages:e[6]};return e[5]!==void 0&&(y.page=e[5]),o=new L2({props:y}),Oe.push(()=>$e(o,"page",E)),{c(){t=P("table"),re(n.$$.fragment),r=K(),a=P("tbody");for(let I=0;I<b.length;I+=1)b[I].c();s=K(),re(o.$$.fragment),w(a,"class","border-top-2 svelte-1p8d4oq"),w(t,"id","client-list"),w(t,"class","table table-striped svelte-1p8d4oq"),wt(t,"client-list_loading",e[2])},m(I,D){ce(I,t,D),ae(n,t,null),m(t,r),m(t,a);for(let O=0;O<b.length;O+=1)b[O]&&b[O].m(a,null);ce(I,s,D),ae(o,I,D),d=!0},p(I,D){const O={};if(!i&&D[0]&512&&(i=!0,O.sort=I[9],Ne(()=>i=!1)),n.$set(O),D[0]&25231617){T=I[8];let F;for(F=0;F<T.length;F+=1){const $=TM(I,T,F);b[F]?(b[F].p($,D),U(b[F],1)):(b[F]=IM($),b[F].c(),U(b[F],1),b[F].m(a,null))}for(pn(),F=T.length;F<b.length;F+=1)A(F);hn()}(!d||D[0]&4)&&wt(t,"client-list_loading",I[2]);const M={};D[0]&64&&(M.totalPages=I[6]),!l&&D[0]&32&&(l=!0,M.page=I[5],Ne(()=>l=!1)),o.$set(M)},i(I){if(!d){U(n.$$.fragment,I);for(let D=0;D<T.length;D+=1)U(b[D]);U(o.$$.fragment,I),d=!0}},o(I){W(n.$$.fragment,I),b=b.filter(Boolean);for(let D=0;D<b.length;D+=1)W(b[D]);W(o.$$.fragment,I),d=!1},d(I){I&&_e(t),se(n),Nn(b,I),I&&_e(s),se(o,I)}}}function aDe(e){let t,n;return t=new eDe({}),{c(){re(t.$$.fragment)},m(i,r){ae(t,i,r),n=!0},p:ot,i(i){n||(U(t.$$.fragment,i),n=!0)},o(i){W(t.$$.fragment,i),n=!1},d(i){se(t,i)}}}function sDe(e){let t,n=e[56].name+"",i,r;return{c(){t=P("a"),i=Le(n),w(t,"href",r="/accountant/clients/"+e[56].id)},m(a,s){ce(a,t,s),m(t,i)},p(a,s){s[0]&256&&n!==(n=a[56].name+"")&&vt(i,n),s[0]&256&&r!==(r="/accountant/clients/"+a[56].id)&&w(t,"href",r)},d(a){a&&_e(t)}}}function oDe(e){let t,n,i=e[56].name+"",r,a,s,o,l;return{c(){t=P("span"),n=P("a"),r=Le(i),s=Le(`
                           
                          `),o=P("i"),w(n,"href",a="/accountant/clients/"+e[56].id),w(o,"class","fa fa-sticky-note-o fa-xs"),w(t,"data-toggle","popover-hover"),w(t,"data-content",l=e[56].notes)},m(d,c){ce(d,t,c),m(t,n),m(n,r),m(t,s),m(t,o)},p(d,c){c[0]&256&&i!==(i=d[56].name+"")&&vt(r,i),c[0]&256&&a!==(a="/accountant/clients/"+d[56].id)&&w(n,"href",a),c[0]&256&&l!==(l=d[56].notes)&&w(t,"data-content",l)},d(d){d&&_e(t)}}}function lDe(e){let t;return{c(){t=P("td"),w(t,"colspan","5"),w(t,"class","svelte-1p8d4oq")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function uDe(e){let t,n,i,r,a,s,o=ep(e[56].client_detail.total_federal_tax)+"",l,d,c,v=ep(e[56].client_detail.with_holding_and_payments)+"",T,b,A,E=ep(e[56].client_detail.federal_tax_due)+"",y,I,D,O=e[56].client_detail.connections,M=[];for(let H=0;H<O.length;H+=1)M[H]=PM(kM(e,O,H));function F(H,V){return V[0]&256&&(i=null),V[0]&256&&(r=null),i==null&&(i=H[24](H[56].client_detail.connections)==="all"),i?cDe:(r==null&&(r=H[24](H[56].client_detail.connections)==="some"),r?fDe:dDe)}let $=F(e,[-1,-1,-1]),L=$(e),j=e[56].client_detail.last_activity&&EM(e);return{c(){t=P("td");for(let H=0;H<M.length;H+=1)M[H].c();n=K(),L.c(),a=K(),s=P("td"),l=Le(o),d=K(),c=P("td"),T=Le(v),b=K(),A=P("td"),y=Le(E),I=K(),D=P("td"),j&&j.c(),w(t,"class","svelte-1p8d4oq"),w(s,"class","svelte-1p8d4oq"),w(c,"class","svelte-1p8d4oq"),w(A,"class","svelte-1p8d4oq"),w(D,"class","svelte-1p8d4oq")},m(H,V){ce(H,t,V);for(let Q=0;Q<M.length;Q+=1)M[Q]&&M[Q].m(t,null);m(t,n),L.m(t,null),ce(H,a,V),ce(H,s,V),m(s,l),ce(H,d,V),ce(H,c,V),m(c,T),ce(H,b,V),ce(H,A,V),m(A,y),ce(H,I,V),ce(H,D,V),j&&j.m(D,null)},p(H,V){if(V[0]&8388864){O=H[56].client_detail.connections;let Q;for(Q=0;Q<O.length;Q+=1){const X=kM(H,O,Q);M[Q]?M[Q].p(X,V):(M[Q]=PM(X),M[Q].c(),M[Q].m(t,n))}for(;Q<M.length;Q+=1)M[Q].d(1);M.length=O.length}$!==($=F(H,V))&&(L.d(1),L=$(H),L&&(L.c(),L.m(t,null))),V[0]&256&&o!==(o=ep(H[56].client_detail.total_federal_tax)+"")&&vt(l,o),V[0]&256&&v!==(v=ep(H[56].client_detail.with_holding_and_payments)+"")&&vt(T,v),V[0]&256&&E!==(E=ep(H[56].client_detail.federal_tax_due)+"")&&vt(y,E),H[56].client_detail.last_activity?j?j.p(H,V):(j=EM(H),j.c(),j.m(D,null)):j&&(j.d(1),j=null)},d(H){H&&_e(t),Nn(M,H),L.d(),H&&_e(a),H&&_e(s),H&&_e(d),H&&_e(c),H&&_e(b),H&&_e(A),H&&_e(I),H&&_e(D),j&&j.d()}}}function PM(e){let t,n,i;return{c(){t=P("img"),Bb(t.src,n=e[23](e[59]))||w(t,"src",n),w(t,"class","connection-logo svelte-1p8d4oq"),w(t,"title",i=`${e[59].company_name}: ${e[59].is_connected?"Connected":"Disconnected"}`),wt(t,"connection-logo____dimmed",!e[59].is_connected)},m(r,a){ce(r,t,a)},p(r,a){a[0]&256&&!Bb(t.src,n=r[23](r[59]))&&w(t,"src",n),a[0]&256&&i!==(i=`${r[59].company_name}: ${r[59].is_connected?"Connected":"Disconnected"}`)&&w(t,"title",i),a[0]&256&&wt(t,"connection-logo____dimmed",!r[59].is_connected)},d(r){r&&_e(t)}}}function dDe(e){let t;return{c(){t=P("div"),t.textContent="All Disconnected",w(t,"class","badge badge-danger")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function fDe(e){let t;return{c(){t=P("div"),t.textContent="Some Disconnected",w(t,"class","badge badge-warning")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function cDe(e){let t;return{c(){t=P("div"),t.textContent="All Connected",w(t,"class","badge badge-success badge-success_qbo")},m(n,i){ce(n,t,i)},d(n){n&&_e(t)}}}function EM(e){let t=new Intl.DateTimeFormat("en-US").format(Date.parse(e[56].client_detail.last_activity))+"",n;return{c(){n=Le(t)},m(i,r){ce(i,n,r)},p(i,r){r[0]&256&&t!==(t=new Intl.DateTimeFormat("en-US").format(Date.parse(i[56].client_detail.last_activity))+"")&&vt(n,t)},d(i){i&&_e(n)}}}function IM(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D;function O(V,Q){return Q[0]&256&&(i=null),i==null&&(i=!!(V[56].notes&&V[56].notes.trim().length>0)),i?oDe:sDe}let M=O(e,[-1,-1,-1]),F=M(e);function $(V,Q){return V[56].client_detail?uDe:lDe}let L=$(e),j=L(e);T=new gm({props:{redirectUrl:e[0].replace(":client_id:",e[56].id),caption:"Client Portal"}});function H(){return e[33](e[56])}return{c(){t=P("tr"),n=P("td"),F.c(),r=K(),j.c(),a=K(),s=P("td"),o=P("a"),l=P("i"),d=Le(`
                          Summary`),v=K(),re(T.$$.fragment),b=K(),A=P("button"),A.innerHTML='<i class="fa fa-trash-o"></i>',E=K(),w(n,"class","svelte-1p8d4oq"),w(l,"class","fa fa-fw fa-tachometer"),w(o,"href",c="/accountant/clients/"+e[56].id),w(o,"class","btn btn-sm btn-primary summary-info__btn"),w(A,"class","btn btn-sm btn-danger summary-info__btn"),w(s,"class","text-right svelte-1p8d4oq"),w(t,"class","svelte-1p8d4oq")},m(V,Q){ce(V,t,Q),m(t,n),F.m(n,null),m(t,r),j.m(t,null),m(t,a),m(t,s),m(s,o),m(o,l),m(o,d),m(s,v),ae(T,s,null),m(s,b),m(s,A),m(t,E),y=!0,I||(D=ct(A,"click",H),I=!0)},p(V,Q){e=V,M===(M=O(e,Q))&&F?F.p(e,Q):(F.d(1),F=M(e),F&&(F.c(),F.m(n,null))),L===(L=$(e))&&j?j.p(e,Q):(j.d(1),j=L(e),j&&(j.c(),j.m(t,a))),(!y||Q[0]&256&&c!==(c="/accountant/clients/"+e[56].id))&&w(o,"href",c);const X={};Q[0]&257&&(X.redirectUrl=e[0].replace(":client_id:",e[56].id)),T.$set(X)},i(V){y||(U(T.$$.fragment,V),y=!0)},o(V){W(T.$$.fragment,V),y=!1},d(V){V&&_e(t),F.d(),j.d(),se(T),I=!1,D()}}}function AM(e){let t,n,i,r,a=e[3],s=[];for(let o=0;o<a.length;o+=1)s[o]=DM(wM(e,a,o));return{c(){t=P("table"),n=P("thead"),n.innerHTML=`<th class="svelte-1p8d4oq"></th> 
                <th class="svelte-1p8d4oq"></th> 
                <th class="svelte-1p8d4oq"></th> 
                <th class="svelte-1p8d4oq"></th> 
                <th class="svelte-1p8d4oq"></th>`,i=K(),r=P("tbody");for(let o=0;o<s.length;o+=1)s[o].c();w(r,"class","new-clients-body svelte-1p8d4oq"),w(t,"id","new-client-list"),w(t,"class","table table-striped mt-4 border-top-0 svelte-1p8d4oq")},m(o,l){ce(o,t,l),m(t,n),m(t,i),m(t,r);for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(r,null)},p(o,l){if(l[0]&655368){a=o[3];let d;for(d=0;d<a.length;d+=1){const c=wM(o,a,d);s[d]?s[d].p(c,l):(s[d]=DM(c),s[d].c(),s[d].m(r,null))}for(;d<s.length;d+=1)s[d].d(1);s.length=a.length}},d(o){o&&_e(t),Nn(s,o)}}}function DM(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M,F,$,L,j,H;function V(){e[35].call(i,e[54],e[55])}function Q(){e[36].call(s,e[54],e[55])}function X(){e[37].call(d,e[54],e[55])}function te(){e[38].call(b,e[54],e[55])}function ne(){return e[39](e[53])}function be(){return e[40](e[53])}return{c(){t=P("tr"),n=P("td"),i=P("input"),r=K(),a=P("td"),s=P("input"),o=K(),l=P("td"),d=P("textarea"),c=K(),v=P("td"),T=P("div"),b=P("input"),A=K(),E=P("label"),E.innerHTML='<span data-toggle="popover-hover" data-content="Send a copy of summary email to me"> Email copy</span>',y=K(),I=P("td"),D=P("button"),O=P("i"),O.textContent=" Accept",F=Le(`
                       
                      `),$=P("button"),$.innerHTML='<i class="fa fa-trash-o"></i>',L=K(),w(i,"class","form-control string required"),w(i,"type","text"),w(i,"placeholder","Name"),w(n,"class","col-md-2 svelte-1p8d4oq"),w(s,"class","form-control string email optional"),w(s,"type","email"),w(s,"placeholder","Email"),w(a,"class","col-md-2 svelte-1p8d4oq"),w(d,"class","form-control text optional"),w(d,"rows","1"),w(d,"placeholder","Notes"),w(l,"class","col-md-4 svelte-1p8d4oq"),w(b,"id","client_summary_email_admin_copy"),w(b,"type","checkbox"),w(E,"class","form-check-label"),w(E,"for","client_summary_email_admin_copy"),w(T,"class","form-check"),w(v,"class","col-md-2 svelte-1p8d4oq"),w(O,"class","fa fa-check-square-o"),w(D,"class","btn btn-sm btn-success"),D.disabled=M=!e[53].newName,w($,"class","btn btn-sm btn-danger"),w(I,"class","text-right svelte-1p8d4oq"),w(t,"class","svelte-1p8d4oq")},m(ue,Ce){ce(ue,t,Ce),m(t,n),m(n,i),Pn(i,e[53].newName),m(t,r),m(t,a),m(a,s),Pn(s,e[53].newEmail),m(t,o),m(t,l),m(l,d),Pn(d,e[53].newNotes),m(t,c),m(t,v),m(v,T),m(T,b),b.checked=e[53].newSendCopyCheckbox,m(T,A),m(T,E),m(t,y),m(t,I),m(I,D),m(D,O),m(I,F),m(I,$),m(t,L),j||(H=[ct(i,"input",V),ct(s,"input",Q),ct(d,"input",X),ct(b,"change",te),ct(D,"click",ne),ct($,"click",be)],j=!0)},p(ue,Ce){e=ue,Ce[0]&8&&i.value!==e[53].newName&&Pn(i,e[53].newName),Ce[0]&8&&s.value!==e[53].newEmail&&Pn(s,e[53].newEmail),Ce[0]&8&&Pn(d,e[53].newNotes),Ce[0]&8&&(b.checked=e[53].newSendCopyCheckbox),Ce[0]&8&&M!==(M=!e[53].newName)&&(D.disabled=M)},d(ue){ue&&_e(t),j=!1,vi(H)}}}function OM(e){let t,n,i;return{c(){t=P("button"),t.innerHTML=`<i class="fa fa-plus-square-o"> </i>
                Add New Client`,w(t,"class","btn btn-primary add-client-btn")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",e[41]),n=!0)},p:ot,d(r){r&&_e(t),n=!1,i()}}}function MM(e){let t,n,i,r,a,s,o;return{c(){t=P("button"),n=P("i"),n.textContent=" Accept All",r=K(),a=P("button"),a.innerHTML='<i class="fa fa-trash-o"> Clear New</i>',w(n,"class","fa fa-check-square-o"),w(t,"class","btn btn-success add-client-btn"),t.disabled=i=!e[3].some(RM),w(a,"class","btn btn-danger add-client-btn")},m(l,d){ce(l,t,d),m(t,n),ce(l,r,d),ce(l,a,d),s||(o=[ct(t,"click",e[42]),ct(a,"click",e[43])],s=!0)},p(l,d){d[0]&8&&i!==(i=!l[3].some(RM))&&(t.disabled=i)},d(l){l&&_e(t),l&&_e(r),l&&_e(a),s=!1,vi(o)}}}function _De(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O=e[4],M=[];for(let te=0;te<O.length;te+=1)M[te]=CM(SM(e,O,te));function F(te){e[31](te)}let $={totalPages:e[6],$$slots:{default:[nDe]},$$scope:{ctx:e}};e[5]!==void 0&&($.page=e[5]),d=new L2({props:$}),Oe.push(()=>$e(d,"page",F));const L=[aDe,rDe,iDe],j=[];function H(te,ne){return te[2]&&te[8].length<1?0:te[8]&&te[8].length>0?1:2}T=H(e),b=j[T]=L[T](e);let V=e[3].length>0&&AM(e),Q=(e[1]||!e[1]&&e[8].length+e[3].length<1)&&OM(e),X=e[3].length>0&&e[1]&&MM(e);return{c(){for(let te=0;te<M.length;te+=1)M[te].c();t=K(),n=P("div"),n.innerHTML="<h1>Client List</h1>",i=K(),r=P("section"),a=P("div"),s=P("div"),o=P("div"),l=P("div"),re(d.$$.fragment),v=K(),b.c(),A=K(),V&&V.c(),E=K(),y=P("div"),Q&&Q.c(),I=K(),X&&X.c(),w(n,"id","nprogressBar"),w(n,"class","pageheader"),w(l,"class","card-body"),w(o,"class","card"),w(s,"class","col-lg-12"),w(a,"class","row"),w(r,"id","main-content")},m(te,ne){for(let be=0;be<M.length;be+=1)M[be]&&M[be].m(te,ne);ce(te,t,ne),ce(te,n,ne),ce(te,i,ne),ce(te,r,ne),m(r,a),m(a,s),m(s,o),m(o,l),ae(d,l,null),m(l,v),j[T].m(l,null),m(l,A),V&&V.m(l,null),m(l,E),m(l,y),Q&&Q.m(y,null),m(y,I),X&&X.m(y,null),D=!0},p(te,ne){if(ne[0]&4194320){O=te[4];let Ce;for(Ce=0;Ce<O.length;Ce+=1){const ie=SM(te,O,Ce);M[Ce]?M[Ce].p(ie,ne):(M[Ce]=CM(ie),M[Ce].c(),M[Ce].m(t.parentNode,t))}for(;Ce<M.length;Ce+=1)M[Ce].d(1);M.length=O.length}const be={};ne[0]&64&&(be.totalPages=te[6]),ne[0]&128|ne[2]&8&&(be.$$scope={dirty:ne,ctx:te}),!c&&ne[0]&32&&(c=!0,be.page=te[5],Ne(()=>c=!1)),d.$set(be);let ue=T;T=H(te),T===ue?j[T].p(te,ne):(pn(),W(j[ue],1,1,()=>{j[ue]=null}),hn(),b=j[T],b?b.p(te,ne):(b=j[T]=L[T](te),b.c()),U(b,1),b.m(l,A)),te[3].length>0?V?V.p(te,ne):(V=AM(te),V.c(),V.m(l,E)):V&&(V.d(1),V=null),te[1]||!te[1]&&te[8].length+te[3].length<1?Q?Q.p(te,ne):(Q=OM(te),Q.c(),Q.m(y,I)):Q&&(Q.d(1),Q=null),te[3].length>0&&te[1]?X?X.p(te,ne):(X=MM(te),X.c(),X.m(y,null)):X&&(X.d(1),X=null)},i(te){D||(U(d.$$.fragment,te),U(b),D=!0)},o(te){W(d.$$.fragment,te),W(b),D=!1},d(te){Nn(M,te),te&&_e(t),te&&_e(n),te&&_e(i),te&&_e(r),se(d),j[T].d(),V&&V.d(),Q&&Q.d(),X&&X.d()}}}function xM(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function ep(e){if(e){let t=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2});return(e>=0?t.format(e):`(${t.format(-e)})`).replace(".00","")}else return"-"}const RM=e=>e.newName;function pDe(e,t,n){let i,r,a,s,o,l,{clientsPath:d}=t,{clientPath:c}=t,{newClientPath:v}=t,{clientGhostInPathBase:T}=t,{logos:b}=t,{hasSubscription:A}=t;const E={clients_with_details:[],page:0,total_pages:0};function y(st){let It=new $7(st);return It.set=It.next,It}let I=y({}),D=y("");Sn(e,D,st=>n(7,s=st));let O=y(1);Sn(e,O,st=>n(5,r=st));let M=y("name_asc");Sn(e,M,st=>n(9,l=st));function F(st){return US(US(O,D.pipe(N7(st)),M).pipe(Y7(Gn.isEqual)),I).pipe(tp(Gn.head))}function $(st,It,Ct){const bt=new URLSearchParams({page:st,q:It,sort:Ct});return tDe(`${d}?${bt}`).pipe(BS(Rt=>Rt.ok?Rt.json():(Gr.error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page."),qS({error:!0,message:`Error ${Rt.statusText}`}))),ax(Rt=>qS({error:!0,message:Rt.message})))}let L=F(500).pipe(BS(([st,It,Ct])=>$(st,It,Ct)),R7(),K7(E)),j=z7(F(0).pipe(tp(st=>!0)),L.pipe(tp(st=>!1)));Sn(e,j,st=>n(2,i=st));let H=L.pipe(tp(st=>st.clients_with_details));Sn(e,H,st=>n(8,o=st));let V=L.pipe(tp(st=>st.total_pages));Sn(e,V,st=>n(6,a=st));let Q=[],X=[];const te={Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":window.$('meta[name="csrf-token"]').attr("content")},ne=async(st,It={})=>{try{return await(await fetch(st,{headers:te,...It})).json()}catch{throw new Error("Something went wrong. If the error persists, please do not hesitate to reach out for support using the chat button at the bottom right corner of the page.")}},be=async st=>{if(confirm("Once deleted the data cannot be recovered. Are you sure?")==!0)try{const It=await ne(c.replace("@",st),{method:"DELETE"});It.success&&(I.next({}),Me(It.success)),It.error&&Me(It.error,"alert-danger")}catch(It){Me(It.message,"alert-danger")}},ue=async st=>{const It=Q.find(bt=>bt.uuid===st),Ct={name:It.newName,email:It.newEmail,notes:It.newNotes,summary_email_admin_copy:!!It.newSendCopyCheckbox};try{const{success:bt,error:Rt}=await ne(d,{method:"POST",body:JSON.stringify(Ct)});bt&&(I.next({}),ie(st),Me(bt)),Rt&&Me(Rt,"alert-danger")}catch(bt){Me(bt.message,"alert-danger")}},Ce=async()=>{try{const st=await ne(v,{method:"GET"});st.error?Me(st.error,"alert-danger"):n(3,Q=[...Q,{uuid:xM(),newName:null,newEmail:null,newNotes:null,newSendCopyCheckbox:null}])}catch(st){Me(st.message,"alert-danger")}};function ie(st){n(3,Q=Q.filter(It=>It.uuid!=st))}const Y=async()=>{Q.forEach(st=>st.newName&&ue(st.uuid))};function he(){n(3,Q=[])}function Me(st,It="alert-info"){n(4,X=[...X,{uuid:xM(),message:st,style:It}])}function Pe(st){n(4,X=X.filter(It=>It.uuid!==st))}function We(st){const It=b[st.data_source_type];return It??b.unknown}function qe(st){return Gn.every(st,It=>!It.is_connected)||st.length===0?"none":Gn.every(st,It=>It.is_connected)?"all":"some"}oa(()=>{F7()}),lc(()=>{au('[data-toggle="popover-hover"]').popover({trigger:"hover",animation:!1})});const ee=st=>Pe(st.uuid);function G(st){s=st,D.set(s)}function me(st){r=st,O.set(r)}function Te(st){l=st,M.set(l)}const De=st=>be(st.id);function we(st){r=st,O.set(r)}function Ve(st,It){st[It].newName=this.value,n(3,Q)}function Ke(st,It){st[It].newEmail=this.value,n(3,Q)}function yt(st,It){st[It].newNotes=this.value,n(3,Q)}function ht(st,It){st[It].newSendCopyCheckbox=this.checked,n(3,Q)}const Je=st=>ue(st.uuid),pt=st=>ie(st.uuid),Tt=()=>Ce(),it=()=>Y(),Ge=()=>he();return e.$$set=st=>{"clientsPath"in st&&n(25,d=st.clientsPath),"clientPath"in st&&n(26,c=st.clientPath),"newClientPath"in st&&n(27,v=st.newClientPath),"clientGhostInPathBase"in st&&n(0,T=st.clientGhostInPathBase),"logos"in st&&n(28,b=st.logos),"hasSubscription"in st&&n(1,A=st.hasSubscription)},e.$$.update=()=>{e.$$.dirty[0]&4&&(i?No.start():No.done())},[T,A,i,Q,X,r,a,s,o,l,D,O,M,j,H,V,be,ue,Ce,ie,Y,he,Pe,We,qe,d,c,v,b,ee,G,me,Te,De,we,Ve,Ke,yt,ht,Je,pt,Tt,it,Ge]}class hDe extends Qt{constructor(t){super(),Jt(this,t,pDe,_De,Kt,{clientsPath:25,clientPath:26,newClientPath:27,clientGhostInPathBase:0,logos:28,hasSubscription:1},null,[-1,-1,-1])}}function mDe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D,O,M;return{c(){t=P("div"),n=P("h1"),n.innerHTML=`<b>Welcome
      <br/>
      Back !</b>`,i=K(),r=P("div"),a=P("form"),s=P("input"),o=K(),l=P("input"),d=K(),c=P("input"),v=K(),T=P("a"),b=Le("Forgot your password?"),A=K(),E=P("button"),E.textContent="Log in",y=K(),I=P("a"),D=Le("Sign up"),w(s,"type","hidden"),w(s,"name","authenticity_token"),s.value=e[2],w(l,"class","devise-form__input"),w(l,"name","accountant[email]"),w(l,"type","email"),w(l,"placeholder","Email Address"),w(c,"class","devise-form__input"),w(c,"name","accountant[password]"),w(c,"type","password"),w(c,"placeholder","Password"),w(T,"class","devise-form__action-link devise-form__mt-1"),w(T,"href",e[1]),w(E,"type","submit"),w(E,"class","devise-form__button devise-form__sign-in"),w(I,"href",e[3]),w(I,"class","devise-form__button devise-form__register-button"),w(a,"id","new_user"),w(a,"class","devise-form__container"),a.noValidate=!0,w(a,"action",e[0]),w(a,"method","post"),w(r,"class","devise-form")},m(F,$){ce(F,t,$),m(t,n),m(t,i),m(t,r),m(r,a),m(a,s),m(a,o),m(a,l),Pn(l,e[4]),m(a,d),m(a,c),Pn(c,e[5]),m(a,v),m(a,T),m(T,b),m(a,A),m(a,E),m(a,y),m(a,I),m(I,D),O||(M=[ct(l,"input",e[6]),ct(c,"input",e[7])],O=!0)},p(F,[$]){$&4&&(s.value=F[2]),$&16&&l.value!==F[4]&&Pn(l,F[4]),$&32&&c.value!==F[5]&&Pn(c,F[5]),$&2&&w(T,"href",F[1]),$&8&&w(I,"href",F[3]),$&1&&w(a,"action",F[0])},i:ot,o:ot,d(F){F&&_e(t),O=!1,vi(M)}}}function gDe(e,t,n){let i="",r="",{loginPath:a=""}=t,{passRecoveryPath:s=""}=t,{authenticityToken:o=""}=t,{registrationPath:l=""}=t;function d(){i=this.value,n(4,i)}function c(){r=this.value,n(5,r)}return e.$$set=v=>{"loginPath"in v&&n(0,a=v.loginPath),"passRecoveryPath"in v&&n(1,s=v.passRecoveryPath),"authenticityToken"in v&&n(2,o=v.authenticityToken),"registrationPath"in v&&n(3,l=v.registrationPath)},[a,s,o,l,i,r,d,c]}class vDe extends Qt{constructor(t){super(),Jt(this,t,gDe,mDe,Kt,{loginPath:0,passRecoveryPath:1,authenticityToken:2,registrationPath:3})}}function bDe(e){let t,n,i,r,a,s,o;function l(v,T){return v[0]?TDe:wDe}let d=l(e),c=d(e);return{c(){t=P("div"),n=P("div"),c.c(),i=K(),r=P("div"),a=P("button"),a.textContent="Edit",w(n,"class","content-container svelte-103pu2o"),w(a,"class","btn btn-primary"),w(r,"class","buttons svelte-103pu2o")},m(v,T){ce(v,t,T),m(t,n),c.m(n,null),m(t,i),m(t,r),m(r,a),s||(o=ct(a,"click",e[8]),s=!0)},p(v,T){d===(d=l(v))&&c?c.p(v,T):(c.d(1),c=d(v),c&&(c.c(),c.m(n,null)))},d(v){v&&_e(t),c.d(),s=!1,o()}}}function yDe(e){let t,n,i,r,a,s,o,l,d;return{c(){t=P("form"),n=P("div"),i=K(),r=P("div"),a=P("button"),a.textContent="Save",s=K(),o=P("button"),o.textContent="Cancel",w(a,"class","btn btn-success"),w(o,"class","btn btn-secondary"),w(r,"class","buttons svelte-103pu2o")},m(c,v){ce(c,t,v),m(t,n),e[6](n),m(t,i),m(t,r),m(r,a),m(r,s),m(r,o),l||(d=[ct(o,"click",e[7]),ct(t,"submit",Hi(e[3]))],l=!0)},p:ot,d(c){c&&_e(t),e[6](null),l=!1,vi(d)}}}function wDe(e){let t;return{c(){t=P("div"),t.textContent="There is no login page info yet.",w(t,"class","content-missing svelte-103pu2o")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function TDe(e){let t;return{c(){t=P("div"),w(t,"class","content svelte-103pu2o")},m(n,i){ce(n,t,i),t.innerHTML=e[0]},p(n,i){i&1&&(t.innerHTML=n[0])},d(n){n&&_e(t)}}}function kDe(e){let t;function n(a,s){return a[2]?yDe:bDe}let i=n(e),r=i(e);return{c(){r.c(),t=On()},m(a,s){r.m(a,s),ce(a,t,s)},p(a,[s]){i===(i=n(a))&&r?r.p(a,s):(r.d(1),r=i(a),r&&(r.c(),r.m(t.parentNode,t)))},i:ot,o:ot,d(a){r.d(a),a&&_e(t)}}}function SDe(e,t,n){let{content:i}=t,{csrf:r}=t,{updateLoginPagePath:a}=t,s,o,l=!1;function d(){let b=s.firstChild.innerHTML;i===b||b===""?n(2,l=!1):au.ajax({type:"PATCH",beforeSend(A){A.setRequestHeader("X-CSRF-Token",r)},url:a,data:{login_page:{content:b}}}).done(function(A){n(0,i=A.content),n(2,l=!1),Gr.success("Successfully updated Login Page info.")}).fail(function(){Gr.error("Failed to update Login Page info. Please try again.")})}lc(()=>{if(l){o=new L7(s,{modules:{toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike","blockquote"],["link"],[{list:"ordered"},{list:"bullet"}],["clean"]]},placeholder:"Type something...",theme:"snow"});const b=o.clipboard.convert(i);o.setContents(b,"silent")}});function c(b){Oe[b?"unshift":"push"](()=>{s=b,n(1,s)})}const v=()=>n(2,l=!1),T=()=>n(2,l=!0);return e.$$set=b=>{"content"in b&&n(0,i=b.content),"csrf"in b&&n(4,r=b.csrf),"updateLoginPagePath"in b&&n(5,a=b.updateLoginPagePath)},[i,s,l,d,r,a,c,v,T]}class CDe extends Qt{constructor(t){super(),Jt(this,t,SDe,kDe,Kt,{content:0,csrf:4,updateLoginPagePath:5})}}function PDe(e){let t,n,i,r;return{c(){t=P("p"),t.innerHTML=`You&#39;ll be charged after the trial period ends<br/> 
                <span>You can cancel trial any time in your profile during the trial period</span>`,n=K(),i=P("a"),r=Le("Try for 3 days"),w(t,"class","plan__trial--details svelte-bltr7h"),w(i,"href",e[4]),w(i,"data-method","post"),w(i,"class","btn btn-success plan-trial-button svelte-bltr7h")},m(a,s){ce(a,t,s),ce(a,n,s),ce(a,i,s),m(i,r)},p(a,s){s&16&&w(i,"href",a[4])},d(a){a&&_e(t),a&&_e(n),a&&_e(i)}}}function EDe(e){let t,n,i;return{c(){t=P("a"),n=Le("Get Bookkeeper Plan"),w(t,"data-method","post"),w(t,"href",i=e[3].replace(":plan:","bookkeeper")),w(t,"class","btn btn-primary plan-subscribe-button svelte-bltr7h")},m(r,a){ce(r,t,a),m(t,n)},p(r,a){a&8&&i!==(i=r[3].replace(":plan:","bookkeeper"))&&w(t,"href",i)},d(r){r&&_e(t)}}}function IDe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E=Er.formatMoney(e[0],{precision:0})+"",y,I,D,O,M,F,$,L,j,H,V,Q,X,te,ne=Er.formatMoney(e[1],{precision:0})+"",be,ue,Ce,ie,Y,he,Me,Pe,We,qe,ee,G,me,Te,De,we,Ve,Ke=Er.formatMoney(e[2],{precision:0})+"",yt,ht,Je,pt,Tt;function it(It,Ct){return It[5]?EDe:PDe}let Ge=it(e),st=Ge(e);return{c(){t=P("section"),n=P("div"),i=P("div"),r=P("div"),a=P("div"),s=P("div"),o=P("h5"),o.textContent="Bookkeeper",l=K(),d=P("h6"),d.textContent="1 year",c=K(),v=P("ul"),v.innerHTML=`<li class="plan-features__entry svelte-bltr7h">Up to 25 Clients</li> 
              <li class="plan-features__entry svelte-bltr7h">Access for 1 year</li> 
              <li class="plan-features__entry svelte-bltr7h">Business Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Personal Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Tax Plan Simulator</li> 
              <li class="plan-features__entry svelte-bltr7h">Basic Reports</li> 
              <li class="plan-features__entry svelte-bltr7h">Chat Support</li>`,T=K(),b=P("p"),A=Le("One time fee of "),y=Le(E),I=K(),st.c(),D=K(),O=P("div"),M=P("div"),F=P("div"),$=P("h5"),$.textContent="Tax CPA",L=K(),j=P("h6"),j.textContent="1 year",H=K(),V=P("ul"),V.innerHTML=`<li class="plan-features__entry svelte-bltr7h">Unlimited Clients</li> 
              <li class="plan-features__entry svelte-bltr7h">Access for 1 year</li> 
              <li class="plan-features__entry svelte-bltr7h">Business Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Personal Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Tax Plan Simulator</li> 
              <li class="plan-features__entry svelte-bltr7h">Tax Strategy Module</li> 
              <li class="plan-features__entry svelte-bltr7h">Advanced Reports</li> 
              <li class="plan-features__entry svelte-bltr7h">Priority Chat Support</li>`,Q=K(),X=P("p"),te=Le("One time fee of "),be=Le(ne),ue=K(),Ce=P("a"),ie=Le("Get Tax CPA Plan"),he=K(),Me=P("div"),Pe=P("div"),We=P("div"),qe=P("h5"),qe.textContent="Lifetime Tax CPA",ee=K(),G=P("h6"),G.textContent="Lifetime",me=K(),Te=P("ul"),Te.innerHTML=`<li class="plan-features__entry svelte-bltr7h">Unlimited Clients</li> 
              <li class="plan-features__entry svelte-bltr7h">Lifetime access</li> 
              <li class="plan-features__entry svelte-bltr7h">Business Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Personal Projections</li> 
              <li class="plan-features__entry svelte-bltr7h">Tax Plan Simulator</li> 
              <li class="plan-features__entry svelte-bltr7h">Tax Strategy Module</li> 
              <li class="plan-features__entry svelte-bltr7h">Advanced Reports</li> 
              <li class="plan-features__entry svelte-bltr7h">Priority Chat Support</li>`,De=K(),we=P("p"),Ve=Le("One time fee of "),yt=Le(Ke),ht=K(),Je=P("a"),pt=Le("Get Lifetime Tax CPA Plan"),w(o,"class","card-title plan__title svelte-bltr7h"),w(d,"class","card-subtitle mb-2 text-muted plan__subtitle svelte-bltr7h"),w(v,"class","list-unstyled plan__features svelte-bltr7h"),w(b,"class","card-text plan__fee svelte-bltr7h"),w(s,"class","card-body svelte-bltr7h"),w(a,"class","card text-center plan plan-bookkeeper svelte-bltr7h"),w(r,"class","col-md-12 col-lg-4 mb-3"),w($,"class","card-title plan__title svelte-bltr7h"),w(j,"class","card-subtitle mb-2 text-muted plan__subtitle svelte-bltr7h"),w(V,"class","list-unstyled plan__features svelte-bltr7h"),w(X,"class","card-text plan__fee svelte-bltr7h"),w(Ce,"data-method","post"),w(Ce,"href",Y=e[3].replace(":plan:","basic")),w(Ce,"class","btn btn-primary plan-subscribe-button svelte-bltr7h"),w(F,"class","card-body svelte-bltr7h"),w(M,"class","card text-center plan plan-basic svelte-bltr7h"),w(O,"class","col-md-12 col-lg-4 mb-3"),w(qe,"class","card-title plan__title svelte-bltr7h"),w(G,"class","card-subtitle mb-2 text-muted plan__subtitle svelte-bltr7h"),w(Te,"class","list-unstyled plan__features svelte-bltr7h"),w(we,"class","card-text plan__fee svelte-bltr7h"),w(Je,"data-method","post"),w(Je,"href",Tt=e[3].replace(":plan:","pro")),w(Je,"class","btn btn-primary plan-subscribe-button svelte-bltr7h"),w(We,"class","card-body svelte-bltr7h"),w(Pe,"class","card text-center plan plan-pro svelte-bltr7h"),w(Me,"class","col-md-12 col-lg-4 mb-3"),w(i,"class","row justify-content-center mb-4"),w(n,"class","plan-container svelte-bltr7h"),w(t,"id","main-content")},m(It,Ct){ce(It,t,Ct),m(t,n),m(n,i),m(i,r),m(r,a),m(a,s),m(s,o),m(s,l),m(s,d),m(s,c),m(s,v),m(s,T),m(s,b),m(b,A),m(b,y),m(s,I),st.m(s,null),m(i,D),m(i,O),m(O,M),m(M,F),m(F,$),m(F,L),m(F,j),m(F,H),m(F,V),m(F,Q),m(F,X),m(X,te),m(X,be),m(F,ue),m(F,Ce),m(Ce,ie),m(i,he),m(i,Me),m(Me,Pe),m(Pe,We),m(We,qe),m(We,ee),m(We,G),m(We,me),m(We,Te),m(We,De),m(We,we),m(we,Ve),m(we,yt),m(We,ht),m(We,Je),m(Je,pt)},p(It,[Ct]){Ct&1&&E!==(E=Er.formatMoney(It[0],{precision:0})+"")&&vt(y,E),Ge===(Ge=it(It))&&st?st.p(It,Ct):(st.d(1),st=Ge(It),st&&(st.c(),st.m(s,null))),Ct&2&&ne!==(ne=Er.formatMoney(It[1],{precision:0})+"")&&vt(be,ne),Ct&8&&Y!==(Y=It[3].replace(":plan:","basic"))&&w(Ce,"href",Y),Ct&4&&Ke!==(Ke=Er.formatMoney(It[2],{precision:0})+"")&&vt(yt,Ke),Ct&8&&Tt!==(Tt=It[3].replace(":plan:","pro"))&&w(Je,"href",Tt)},i:ot,o:ot,d(It){It&&_e(t),st.d()}}}function ADe(e,t,n){let{bookkeeperPrice:i}=t,{basicPrice:r}=t,{proPrice:a}=t,{purchasePathBase:s}=t,{trialPath:o}=t,{trialUsed:l}=t;return e.$$set=d=>{"bookkeeperPrice"in d&&n(0,i=d.bookkeeperPrice),"basicPrice"in d&&n(1,r=d.basicPrice),"proPrice"in d&&n(2,a=d.proPrice),"purchasePathBase"in d&&n(3,s=d.purchasePathBase),"trialPath"in d&&n(4,o=d.trialPath),"trialUsed"in d&&n(5,l=d.trialUsed)},[i,r,a,s,o,l]}class DDe extends Qt{constructor(t){super(),Jt(this,t,ADe,IDe,Kt,{bookkeeperPrice:0,basicPrice:1,proPrice:2,purchasePathBase:3,trialPath:4,trialUsed:5})}}var Ky={exports:{}};/*!
	autosize 4.0.4
	license: MIT
	http://www.jacklmoore.com/autosize
*/(function(e,t){(function(n,i){i(e,t)})(zs,function(n,i){var r=typeof Map=="function"?new Map:function(){var c=[],v=[];return{has:function(b){return c.indexOf(b)>-1},get:function(b){return v[c.indexOf(b)]},set:function(b,A){c.indexOf(b)===-1&&(c.push(b),v.push(A))},delete:function(b){var A=c.indexOf(b);A>-1&&(c.splice(A,1),v.splice(A,1))}}}(),a=function(v){return new Event(v,{bubbles:!0})};try{new Event("test")}catch{a=function(T){var b=document.createEvent("Event");return b.initEvent(T,!0,!1),b}}function s(c){if(!c||!c.nodeName||c.nodeName!=="TEXTAREA"||r.has(c))return;var v=null,T=null,b=null;function A(){var F=window.getComputedStyle(c,null);F.resize==="vertical"?c.style.resize="none":F.resize==="both"&&(c.style.resize="horizontal"),F.boxSizing==="content-box"?v=-(parseFloat(F.paddingTop)+parseFloat(F.paddingBottom)):v=parseFloat(F.borderTopWidth)+parseFloat(F.borderBottomWidth),isNaN(v)&&(v=0),D()}function E(F){{var $=c.style.width;c.style.width="0px",c.offsetWidth,c.style.width=$}c.style.overflowY=F}function y(F){for(var $=[];F&&F.parentNode&&F.parentNode instanceof Element;)F.parentNode.scrollTop&&$.push({node:F.parentNode,scrollTop:F.parentNode.scrollTop}),F=F.parentNode;return $}function I(){if(c.scrollHeight!==0){var F=y(c),$=document.documentElement&&document.documentElement.scrollTop;c.style.height="",c.style.height=c.scrollHeight+v+"px",T=c.clientWidth,F.forEach(function(L){L.node.scrollTop=L.scrollTop}),$&&(document.documentElement.scrollTop=$)}}function D(){I();var F=Math.round(parseFloat(c.style.height)),$=window.getComputedStyle(c,null),L=$.boxSizing==="content-box"?Math.round(parseFloat($.height)):c.offsetHeight;if(L<F?$.overflowY==="hidden"&&(E("scroll"),I(),L=$.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight):$.overflowY!=="hidden"&&(E("hidden"),I(),L=$.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(c,null).height)):c.offsetHeight),b!==L){b=L;var j=a("autosize:resized");try{c.dispatchEvent(j)}catch{}}}var O=function(){c.clientWidth!==T&&D()},M=(function(F){window.removeEventListener("resize",O,!1),c.removeEventListener("input",D,!1),c.removeEventListener("keyup",D,!1),c.removeEventListener("autosize:destroy",M,!1),c.removeEventListener("autosize:update",D,!1),Object.keys(F).forEach(function($){c.style[$]=F[$]}),r.delete(c)}).bind(c,{height:c.style.height,resize:c.style.resize,overflowY:c.style.overflowY,overflowX:c.style.overflowX,wordWrap:c.style.wordWrap});c.addEventListener("autosize:destroy",M,!1),"onpropertychange"in c&&"oninput"in c&&c.addEventListener("keyup",D,!1),window.addEventListener("resize",O,!1),c.addEventListener("input",D,!1),c.addEventListener("autosize:update",D,!1),c.style.overflowX="hidden",c.style.wordWrap="break-word",r.set(c,{destroy:M,update:D}),A()}function o(c){var v=r.get(c);v&&v.destroy()}function l(c){var v=r.get(c);v&&v.update()}var d=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(d=function(v){return v},d.destroy=function(c){return c},d.update=function(c){return c}):(d=function(v,T){return v&&Array.prototype.forEach.call(v.length?v:[v],function(b){return s(b)}),v},d.destroy=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],o),c},d.update=function(c){return c&&Array.prototype.forEach.call(c.length?c:[c],l),c}),i.default=d,n.exports=i.default})})(Ky,Ky.exports);var ODe=Ky.exports;const MDe=cl(ODe);function xDe(e){let t,n,i,r,a,s,o,l;return{c(){t=P("div"),n=P("label"),i=Le(e[1]),r=K(),a=P("div"),s=P("textarea"),w(n,"class","string col-sm-6 col-form-label"),w(n,"for",e[7]),w(s,"class","string form-control fixed-height svelte-xy4s8i"),s.required=e[5],w(s,"id",e[7]),w(s,"name",e[7]),s.readOnly=e[4],wt(s,"form-control-dirty",e[3]!==e[0]&&e[2]),wt(s,"is-invalid",!e[2]),w(a,"class","col-sm-12"),w(t,"class","row string form-group")},m(d,c){ce(d,t,c),m(t,n),m(n,i),m(t,r),m(t,a),m(a,s),e[8](s),Pn(s,e[0]),o||(l=ct(s,"input",e[9]),o=!0)},p(d,[c]){c&2&&vt(i,d[1]),c&32&&(s.required=d[5]),c&16&&(s.readOnly=d[4]),c&1&&Pn(s,d[0]),c&13&&wt(s,"form-control-dirty",d[3]!==d[0]&&d[2]),c&4&&wt(s,"is-invalid",!d[2])},i:ot,o:ot,d(d){d&&_e(t),e[8](null),o=!1,l()}}}function RDe(e,t,n){let{title:i}=t,{value:r}=t,{isValid:a=!0}=t,{serverValue:s}=t,{readOnly:o}=t,{required:l}=t,d=Ys.uniqueId("input"),c;oa(()=>{MDe(c)});function v(b){Oe[b?"unshift":"push"](()=>{c=b,n(6,c)})}function T(){r=this.value,n(0,r)}return e.$$set=b=>{"title"in b&&n(1,i=b.title),"value"in b&&n(0,r=b.value),"isValid"in b&&n(2,a=b.isValid),"serverValue"in b&&n(3,s=b.serverValue),"readOnly"in b&&n(4,o=b.readOnly),"required"in b&&n(5,l=b.required)},[r,i,a,s,o,l,c,d,v,T]}class X5 extends Qt{constructor(t){super(),Jt(this,t,RDe,xDe,Kt,{title:1,value:0,isValid:2,serverValue:3,readOnly:4,required:5})}}function $De(e){let t,n,i,r,a,s,o;return{c(){t=P("div"),n=P("label"),i=P("input"),r=K(),a=Le(e[1]),w(i,"type","checkbox"),i.required=!0,w(i,"id",e[6]),w(i,"name",e[6]),i.readOnly=e[2],wt(i,"form-control-dirty",e[3]!==e[0]&&e[5]),wt(i,"required",e[4]),wt(i,"has-error",!e[5]),w(n,"for",e[6]),w(t,"class","checkbox")},m(l,d){ce(l,t,d),m(t,n),m(n,i),i.checked=e[0],m(n,r),m(n,a),s||(o=ct(i,"change",e[7]),s=!0)},p(l,[d]){d&4&&(i.readOnly=l[2]),d&1&&(i.checked=l[0]),d&41&&wt(i,"form-control-dirty",l[3]!==l[0]&&l[5]),d&16&&wt(i,"required",l[4]),d&32&&wt(i,"has-error",!l[5]),d&2&&vt(a,l[1])},i:ot,o:ot,d(l){l&&_e(t),s=!1,o()}}}function NDe(e,t,n){let{title:i}=t,{value:r}=t,{readOnly:a}=t,{serverValue:s}=t,{required:o}=t,{isValid:l=!0}=t,d=Ys.uniqueId("input");function c(){r=this.checked,n(0,r)}return e.$$set=v=>{"title"in v&&n(1,i=v.title),"value"in v&&n(0,r=v.value),"readOnly"in v&&n(2,a=v.readOnly),"serverValue"in v&&n(3,s=v.serverValue),"required"in v&&n(4,o=v.required),"isValid"in v&&n(5,l=v.isValid)},[r,i,a,s,o,l,d,c]}class Q5 extends Qt{constructor(t){super(),Jt(this,t,NDe,$De,Kt,{title:1,value:0,readOnly:2,serverValue:3,required:4,isValid:5})}}function u0(e,t){return e.length==0?[]:e.slice(1).reduce((n,i)=>n.concat([t,i]),[e[0]]).join("")}function FDe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E=e[6]&&e[6].length>0&&$M(e);function y(M){e[14](M)}let I={title:"Notes",serverValue:e[2]};e[0]!==void 0&&(I.value=e[0]),i=new X5({props:I}),Oe.push(()=>$e(i,"value",y));function D(M){e[15](M)}let O={title:"Send a copy of summary email to me",serverValue:e[3]};return e[1]!==void 0&&(O.value=e[1]),s=new Q5({props:O}),Oe.push(()=>$e(s,"value",D)),{c(){t=P("div"),E&&E.c(),n=K(),re(i.$$.fragment),a=K(),re(s.$$.fragment),l=K(),d=P("button"),c=Le("Update Additions"),w(d,"class","btn btn-primary"),d.disabled=v=!e[8],w(t,"class","client-additions-form"),wt(t,"client-additions____in-progress",e[5])},m(M,F){ce(M,t,F),E&&E.m(t,null),m(t,n),ae(i,t,null),m(t,a),ae(s,t,null),m(t,l),m(t,d),m(d,c),T=!0,b||(A=ct(d,"click",e[9]),b=!0)},p(M,F){M[6]&&M[6].length>0?E?E.p(M,F):(E=$M(M),E.c(),E.m(t,n)):E&&(E.d(1),E=null);const $={};F&4&&($.serverValue=M[2]),!r&&F&1&&(r=!0,$.value=M[0],Ne(()=>r=!1)),i.$set($);const L={};F&8&&(L.serverValue=M[3]),!o&&F&2&&(o=!0,L.value=M[1],Ne(()=>o=!1)),s.$set(L),(!T||F&256&&v!==(v=!M[8]))&&(d.disabled=v),(!T||F&32)&&wt(t,"client-additions____in-progress",M[5])},i(M){T||(U(i.$$.fragment,M),U(s.$$.fragment,M),T=!0)},o(M){W(i.$$.fragment,M),W(s.$$.fragment,M),T=!1},d(M){M&&_e(t),E&&E.d(),se(i),se(s),b=!1,A()}}}function LDe(e){let t,n,i=u0(e[10]()," ")+"",r,a,s,o,l;return{c(){t=P("div"),n=P("p"),r=K(),a=P("p"),s=P("button"),s.textContent="OK, Got It",w(s,"href","#"),w(s,"class","btn btn-primary")},m(d,c){ce(d,t,c),m(t,n),n.innerHTML=i,m(t,r),m(t,a),m(a,s),o||(l=ct(s,"click",function(){Ga(e[7])&&e[7].apply(this,arguments)}),o=!0)},p(d,c){e=d},i:ot,o:ot,d(d){d&&_e(t),o=!1,l()}}}function $M(e){let t,n;return{c(){t=P("p"),n=Le(e[6]),w(t,"class","error")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&64&&vt(n,i[6])},d(i){i&&_e(t)}}}function HDe(e){let t,n,i,r;const a=[LDe,FDe],s=[];function o(l,d){return l[4]?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,[d]){let c=t;t=o(l),t===c?s[t].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i))},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function jDe(e,t,n){let i,r,a,{newNotes:s}=t,{currentNotes:o}=t,{newSummaryEmailAdminCopy:l}=t,{currentSummaryEmailAdminCopy:d}=t,{additionsChangeSubmitted:c}=t,{changeAdditionsInProgress:v}=t,{error:T}=t,{onSubmitChange:b}=t,{onResetControl:A}=t;function E(){b()}function y(){let O=s.trim().length==0,M=[];return O?(M.push('<span key="email">You have cleared the notes</span>'),r&&M.push(`<span key="summaryEmailAdminCopy">and you will ${l?"":"not"} receive a copy of summary emails</span>`)):(i&&M.push(`<span key="notes">You have changed the notes to: <b>${s}</b></span>`),r&&M.push(`<span key="summaryEmailAdminCopy">${M.length>0?" and you":"You"} <b>will ${l?"":"not"}</b> receive a copy of summary emails</span>`)),M}function I(O){s=O,n(0,s)}function D(O){l=O,n(1,l)}return e.$$set=O=>{"newNotes"in O&&n(0,s=O.newNotes),"currentNotes"in O&&n(2,o=O.currentNotes),"newSummaryEmailAdminCopy"in O&&n(1,l=O.newSummaryEmailAdminCopy),"currentSummaryEmailAdminCopy"in O&&n(3,d=O.currentSummaryEmailAdminCopy),"additionsChangeSubmitted"in O&&n(4,c=O.additionsChangeSubmitted),"changeAdditionsInProgress"in O&&n(5,v=O.changeAdditionsInProgress),"error"in O&&n(6,T=O.error),"onSubmitChange"in O&&n(11,b=O.onSubmitChange),"onResetControl"in O&&n(7,A=O.onResetControl)},e.$$.update=()=>{e.$$.dirty&5&&n(13,i=s!==o),e.$$.dirty&10&&n(12,r=l!==d),e.$$.dirty&12288&&n(8,a=i||r)},[s,l,o,d,c,v,T,A,a,E,y,b,r,i,I,D]}class J5 extends Qt{constructor(t){super(),Jt(this,t,jDe,HDe,Kt,{newNotes:0,currentNotes:2,newSummaryEmailAdminCopy:1,currentSummaryEmailAdminCopy:3,additionsChangeSubmitted:4,changeAdditionsInProgress:5,error:6,onSubmitChange:11,onResetControl:7})}}function BDe(e){let t,n,i,r,a,s,o,l,d,c;function v(A){e[12](A)}function T(A){e[13](A)}let b={currentNotes:e[1],currentSummaryEmailAdminCopy:e[3],additionsChangeSubmitted:e[4],changeAdditionsInProgress:e[5],error:e[6],onSubmitChange:e[8],onResetControl:e[7]};return e[0]!==void 0&&(b.newNotes=e[0]),e[2]!==void 0&&(b.newSummaryEmailAdminCopy=e[2]),o=new J5({props:b}),Oe.push(()=>$e(o,"newNotes",v)),Oe.push(()=>$e(o,"newSummaryEmailAdminCopy",T)),{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Additional Information</h3>',i=K(),r=P("div"),a=P("div"),s=P("div"),re(o.$$.fragment),w(n,"class","card-header"),w(s,"class","col-lg-12"),w(a,"class","row"),w(r,"class","card-body"),w(t,"class","card mb-3")},m(A,E){ce(A,t,E),m(t,n),m(t,i),m(t,r),m(r,a),m(a,s),ae(o,s,null),c=!0},p(A,[E]){const y={};E&2&&(y.currentNotes=A[1]),E&8&&(y.currentSummaryEmailAdminCopy=A[3]),E&16&&(y.additionsChangeSubmitted=A[4]),E&32&&(y.changeAdditionsInProgress=A[5]),E&64&&(y.error=A[6]),!l&&E&1&&(l=!0,y.newNotes=A[0],Ne(()=>l=!1)),!d&&E&4&&(d=!0,y.newSummaryEmailAdminCopy=A[2],Ne(()=>d=!1)),o.$set(y)},i(A){c||(U(o.$$.fragment,A),c=!0)},o(A){W(o.$$.fragment,A),c=!1},d(A){A&&_e(t),se(o)}}}function UDe(e,t,n){let{clientAdditions:i}=t,{csrfToken:r}=t,{updateAdditionsSrc:a}=t,s=i.notes,o=i.notes,l=i.summary_email_admin_copy,d=i.summary_email_admin_copy,c=!1,v=!1,T="";function b(){n(4,c=!1),n(5,v=!1),n(1,o=s),n(3,d=l),n(6,T="")}function A(){n(5,v=!0),au.ajax({url:a,method:"PATCH",data:{notes:s,summary_email_admin_copy:l},dataType:"JSON",headers:{"X-CSRF-Token":r},success:I=>{I.notes==null&&n(0,s=""),I.summary_email_admin_copy==null&&n(2,l=!1),n(4,c=!0)},error:I=>I.status==422?n(6,T=I.responseJSON.error):n(6,T="Fatal error"),complete:()=>n(5,v=!1)})}function E(I){s=I,n(0,s)}function y(I){l=I,n(2,l)}return e.$$set=I=>{"clientAdditions"in I&&n(9,i=I.clientAdditions),"csrfToken"in I&&n(10,r=I.csrfToken),"updateAdditionsSrc"in I&&n(11,a=I.updateAdditionsSrc)},[s,o,l,d,c,v,T,b,A,i,r,a,E,y]}class Z5 extends Qt{constructor(t){super(),Jt(this,t,UDe,BDe,Kt,{clientAdditions:9,csrfToken:10,updateAdditionsSrc:11})}}function NM(e,t,n){const i=e.slice();return i[9]=t[n][0],i[10]=t[n][1],i}function FM(e){let t,n;return{c(){t=P("p"),n=Le(e[1]),w(t,"class","error")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&2&&vt(n,i[1])},d(i){i&&_e(t)}}}function qDe(e){let t;return{c(){t=P("span"),t.textContent="You don't have access to planning modules on this plan"},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function WDe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b=Ys.sortBy(Object.entries(e[3]),HM),A=[];for(let E=0;E<b.length;E+=1)A[E]=LM(NM(e,b,E));return{c(){t=P("div"),n=P("button"),n.textContent="Enable All",i=K(),r=P("button"),r.textContent="Disable All",a=K(),s=P("span"),s.textContent="Planner Modules:  ",o=K(),l=P("div");for(let E=0;E<A.length;E+=1)A[E].c();d=K(),c=P("div"),c.innerHTML=`<small>Enable planners to be visible in client portal. Disable planners to hide from client portal. Disabled
        planners will not calculate in the report or be visible while ghosting in.</small>`,w(n,"class","btn btn-success projection-settings-form__button"),w(n,"type","submit"),w(r,"class","btn btn-danger projection-settings-form__button"),w(r,"type","submit"),w(l,"class","projection-settings-form__planners"),w(c,"class","projection-settings-form__info")},m(E,y){ce(E,t,y),m(t,n),m(t,i),m(t,r),ce(E,a,y),ce(E,s,y),ce(E,o,y),ce(E,l,y);for(let I=0;I<A.length;I+=1)A[I]&&A[I].m(l,null);ce(E,d,y),ce(E,c,y),v||(T=[ct(n,"click",e[7]),ct(r,"click",e[8])],v=!0)},p(E,y){if(y&56){b=Ys.sortBy(Object.entries(E[3]),HM);let I;for(I=0;I<b.length;I+=1){const D=NM(E,b,I);A[I]?A[I].p(D,y):(A[I]=LM(D),A[I].c(),A[I].m(l,null))}for(;I<A.length;I+=1)A[I].d(1);A.length=b.length}},d(E){E&&_e(t),E&&_e(a),E&&_e(s),E&&_e(o),E&&_e(l),Nn(A,E),E&&_e(d),E&&_e(c),v=!1,vi(T)}}}function LM(e){let t,n,i,r,a,s,o,l,d=e[5][e[9]]+"",c,v,T,b,A;return{c(){t=P("div"),n=P("label"),i=P("input"),l=K(),c=Le(d),v=K(),w(i,"id",r=e[9]),w(i,"key",a=e[9]),w(i,"name",s=e[9]),w(i,"type","checkbox"),i.checked=o=e[10],w(n,"class","checkbox projection-settings-form__checkbox"),w(t,"class","checkbox projection-settings-form__checkbox"),w(t,"key",T=e[9])},m(E,y){ce(E,t,y),m(t,n),m(n,i),m(n,l),m(n,c),m(t,v),b||(A=ct(i,"change",function(){Ga(e[4])&&e[4].apply(this,arguments)}),b=!0)},p(E,y){e=E,y&8&&r!==(r=e[9])&&w(i,"id",r),y&8&&a!==(a=e[9])&&w(i,"key",a),y&8&&s!==(s=e[9])&&w(i,"name",s),y&8&&o!==(o=e[10])&&(i.checked=o),y&8&&d!==(d=e[5][e[9]]+"")&&vt(c,d),y&8&&T!==(T=e[9])&&w(t,"key",T)},d(E){E&&_e(t),b=!1,A()}}}function VDe(e){let t,n,i=e[1]&&e[1].length>0&&FM(e);function r(o,l){return o[6]?WDe:qDe}let s=r(e)(e);return{c(){t=P("div"),i&&i.c(),n=K(),s.c(),w(t,"class","projection-settings-form"),wt(t,"projection-settings-form____in-progress",e[0])},m(o,l){ce(o,t,l),i&&i.m(t,null),m(t,n),s.m(t,null)},p(o,[l]){o[1]&&o[1].length>0?i?i.p(o,l):(i=FM(o),i.c(),i.m(t,n)):i&&(i.d(1),i=null),s.p(o,l),l&1&&wt(t,"projection-settings-form____in-progress",o[0])},i:ot,o:ot,d(o){o&&_e(t),i&&i.d(),s.d()}}}const HM=e=>e[0];function zDe(e,t,n){const i={qbid_salary_maximizer_enabled:"QBID Salary Maximizer",auto_lease_enabled:"Auto Lease",charity_enabled:"Charity",children_employment_enabled:"Children Employment",company_type_enabled:"Company Type",deductions_missing_enabled:"Missing Deductions",defined_benefit_enabled:"Defined Benefit",estimated_tax_payments_enabled:"Estimated Tax Payments",expense_acceleration_enabled:"Expense Acceleration",health_savings_enabled:"Health Savings",home_office_accountable_enabled:"Home Office Accountable",home_rental_enabled:"14 Day Home Rental",income_deferment_enabled:"Income Deferment",mfj_mfs_enabled:"Married Filing Joint vs Married Filing Separate",plan401k_enabled:"401K",scorp_election_enabled:"S Corporation Election",section179_enabled:"Section 179 Expense",sep_ira_enabled:"SEP IRA",traditional_roth_ira_enabled:"Traditional & Roth IRA"};let{changeSettingsInProgress:r}=t,{error:a}=t,{toggleAllTo:s}=t,{localPlannersAccess:o}=t,{onSettingsChange:l}=t,d=Object.entries(o).length>0;const c=()=>s(!0),v=()=>s(!1);return e.$$set=T=>{"changeSettingsInProgress"in T&&n(0,r=T.changeSettingsInProgress),"error"in T&&n(1,a=T.error),"toggleAllTo"in T&&n(2,s=T.toggleAllTo),"localPlannersAccess"in T&&n(3,o=T.localPlannersAccess),"onSettingsChange"in T&&n(4,l=T.onSettingsChange)},[r,a,s,o,l,i,d,c,v]}class eF extends Qt{constructor(t){super(),Jt(this,t,zDe,VDe,Kt,{changeSettingsInProgress:0,error:1,toggleAllTo:2,localPlannersAccess:3,onSettingsChange:4})}}function YDe(e){let t;return{c(){t=Le(e[1])},m(n,i){ce(n,t,i)},p(n,i){i&2&&vt(t,n[1])},d(n){n&&_e(t)}}}function GDe(e){let t,n,i;return{c(){t=P("i"),n=K(),i=Le(e[3]),w(t,"class","fa fa-spinner fa-spin summary-info__btn-spinner")},m(r,a){ce(r,t,a),ce(r,n,a),ce(r,i,a)},p(r,a){a&8&&vt(i,r[3])},d(r){r&&_e(t),r&&_e(n),r&&_e(i)}}}function KDe(e){let t,n,i,r,a;function s(d,c){return d[0]?GDe:YDe}let o=s(e),l=o(e);return{c(){t=P("a"),l.c(),w(t,"href",e[4]),w(t,"target","_blank"),w(t,"disabled",n=e[0]||null),w(t,"class",i=`btn summary-info__btn-animated btn-sm ${e[2]}`),wt(t,"summary-info__btn-visible-spinner",!!e[0]),wt(t,"summary-info__btn-hidden-spinner",!e[0])},m(d,c){ce(d,t,c),l.m(t,null),r||(a=ct(t,"click",e[5]),r=!0)},p(d,[c]){o===(o=s(d))&&l?l.p(d,c):(l.d(1),l=o(d),l&&(l.c(),l.m(t,null))),c&16&&w(t,"href",d[4]),c&1&&n!==(n=d[0]||null)&&w(t,"disabled",n),c&4&&i!==(i=`btn summary-info__btn-animated btn-sm ${d[2]}`)&&w(t,"class",i),c&5&&wt(t,"summary-info__btn-visible-spinner",!!d[0]),c&5&&wt(t,"summary-info__btn-hidden-spinner",!d[0])},i:ot,o:ot,d(d){d&&_e(t),l.d(),r=!1,a()}}}function XDe(e,t,n){let{caption:i}=t,{className:r}=t,{handleConnection:a}=t,{inProcessCaption:s}=t,{inProcess:o}=t,{url:l}=t;function d(){a(),n(0,o=!o)}return e.$$set=c=>{"caption"in c&&n(1,i=c.caption),"className"in c&&n(2,r=c.className),"handleConnection"in c&&n(6,a=c.handleConnection),"inProcessCaption"in c&&n(3,s=c.inProcessCaption),"inProcess"in c&&n(0,o=c.inProcess),"url"in c&&n(4,l=c.url)},[o,i,r,s,l,d,a]}class H2 extends Qt{constructor(t){super(),Jt(this,t,XDe,KDe,Kt,{caption:1,className:2,handleConnection:6,inProcessCaption:3,inProcess:0,url:4})}}function jM(e,t,n){const i=e.slice();return i[16]=t[n],i[18]=n,i}function QDe(e){let t;return{c(){t=P("h3"),t.textContent="User has no companies"},m(n,i){ce(n,t,i)},p:ot,i:ot,o:ot,d(n){n&&_e(t)}}}function JDe(e){let t=[],n=new Map,i,r,a=e[0];const s=o=>o[18];for(let o=0;o<a.length;o+=1){let l=jM(e,a,o),d=s(l);n.set(d,t[o]=qM(d,l))}return{c(){for(let o=0;o<t.length;o+=1)t[o].c();i=On()},m(o,l){for(let d=0;d<t.length;d+=1)t[d]&&t[d].m(o,l);ce(o,i,l),r=!0},p(o,l){l&127&&(a=o[0],pn(),t=o_(t,l,s,1,o,a,n,i.parentNode,ym,qM,i,jM),hn())},i(o){if(!r){for(let l=0;l<a.length;l+=1)U(t[l]);r=!0}},o(o){for(let l=0;l<t.length;l+=1)W(t[l]);r=!1},d(o){for(let l=0;l<t.length;l+=1)t[l].d(o);o&&_e(i)}}}function BM(e){let t,n,i,r,a,s=e[3]&&UM(e);const o=[eOe,ZDe],l=[];function d(c,v){return c[16].is_connected?0:1}return i=d(e),r=l[i]=o[i](e),{c(){t=P("div"),s&&s.c(),n=K(),r.c(),w(t,"class","btn-group")},m(c,v){ce(c,t,v),s&&s.m(t,null),m(t,n),l[i].m(t,null),a=!0},p(c,v){c[3]?s?s.p(c,v):(s=UM(c),s.c(),s.m(t,n)):s&&(s.d(1),s=null);let T=i;i=d(c),i===T?l[i].p(c,v):(pn(),W(l[T],1,1,()=>{l[T]=null}),hn(),r=l[i],r?r.p(c,v):(r=l[i]=o[i](c),r.c()),U(r,1),r.m(t,null))},i(c){a||(U(r),a=!0)},o(c){W(r),a=!1},d(c){c&&_e(t),s&&s.d(),l[i].d()}}}function UM(e){let t,n,i;return{c(){t=P("button"),t.innerHTML='<span class="glyphicon glyphicon-remove"></span>',w(t,"type","button"),w(t,"class","btn btn-danger btn-sm btn-cancel svelte-18kub85")},m(r,a){ce(r,t,a),n||(i=ct(t,"click",e[4]),n=!0)},p:ot,d(r){r&&_e(t),n=!1,i()}}}function ZDe(e){let t,n,i;function r(){return e[11](e[16])}function a(o){e[12](o)}let s={className:"btn-success",caption:"Connect",url:e[1].replace(":company_id:",e[16].id),inProcessCaption:"Connecting...",handleConnection:r};return e[3]!==void 0&&(s.inProcess=e[3]),t=new H2({props:s}),Oe.push(()=>$e(t,"inProcess",a)),{c(){re(t.$$.fragment)},m(o,l){ae(t,o,l),i=!0},p(o,l){e=o;const d={};l&3&&(d.url=e[1].replace(":company_id:",e[16].id)),l&1&&(d.handleConnection=r),!n&&l&8&&(n=!0,d.inProcess=e[3],Ne(()=>n=!1)),t.$set(d)},i(o){i||(U(t.$$.fragment,o),i=!0)},o(o){W(t.$$.fragment,o),i=!1},d(o){se(t,o)}}}function eOe(e){let t,n,i;function r(){return e[9](e[16])}function a(o){e[10](o)}let s={className:"btn-danger",caption:"Disconnect",url:e[2].replace(":company_id:",e[16].id),inProcessCaption:"Disconnecting...",handleConnection:r};return e[3]!==void 0&&(s.inProcess=e[3]),t=new H2({props:s}),Oe.push(()=>$e(t,"inProcess",a)),{c(){re(t.$$.fragment)},m(o,l){ae(t,o,l),i=!0},p(o,l){e=o;const d={};l&5&&(d.url=e[2].replace(":company_id:",e[16].id)),l&1&&(d.handleConnection=r),!n&&l&8&&(n=!0,d.inProcess=e[3],Ne(()=>n=!1)),t.$set(d)},i(o){i||(U(t.$$.fragment,o),i=!0)},o(o){W(t.$$.fragment,o),i=!1},d(o){se(t,o)}}}function qM(e,t){let n,i,r,a=["intuit","xero"].includes(t[16].data_source_type),s,o,l;i=new gm({props:{redirectUrl:t[16].redirect_url,caption:t[16].name}});let d=a&&BM(t);return{key:e,first:null,c(){n=P("div"),re(i.$$.fragment),r=K(),d&&d.c(),s=Le(`
               
            `),w(n,"class","btn-group"),w(n,"role","group"),w(n,"aria-label",o=t[16].name),this.first=n},m(c,v){ce(c,n,v),ae(i,n,null),m(n,r),d&&d.m(n,null),m(n,s),l=!0},p(c,v){t=c;const T={};v&1&&(T.redirectUrl=t[16].redirect_url),v&1&&(T.caption=t[16].name),i.$set(T),v&1&&(a=["intuit","xero"].includes(t[16].data_source_type)),a?d?(d.p(t,v),v&1&&U(d,1)):(d=BM(t),d.c(),U(d,1),d.m(n,s)):d&&(pn(),W(d,1,1,()=>{d=null}),hn()),(!l||v&1&&o!==(o=t[16].name))&&w(n,"aria-label",o)},i(c){l||(U(i.$$.fragment,c),U(d),l=!0)},o(c){W(i.$$.fragment,c),W(d),l=!1},d(c){c&&_e(n),se(i),d&&d.d()}}}function tOe(e){let t,n,i,r,a,s,o,l,d;const c=[JDe,QDe],v=[];function T(b,A){return b[0].length>0?0:1}return o=T(e),l=v[o]=c[o](e),{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Business Data</h3>',i=K(),r=P("div"),a=P("div"),s=P("div"),l.c(),w(n,"class","card-header"),w(s,"class","col-lg-12"),w(a,"class","row"),w(r,"class","card-body"),w(t,"class","card mb-3")},m(b,A){ce(b,t,A),m(t,n),m(t,i),m(t,r),m(r,a),m(a,s),v[o].m(s,null),d=!0},p(b,[A]){let E=o;o=T(b),o===E?v[o].p(b,A):(pn(),W(v[E],1,1,()=>{v[E]=null}),hn(),l=v[o],l?l.p(b,A):(l=v[o]=c[o](b),l.c()),U(l,1),l.m(s,null))},i(b){d||(U(l),d=!0)},o(b){W(l),d=!1},d(b){b&&_e(t),v[o].d()}}}function nOe(e){return new Promise(t=>setTimeout(t,e))}function iOe(e,t,n){if(!e||!e.client_page_params||!e.client_page_params.companies)return!1;let i=e.client_page_params.companies.find(r=>r.id===t);return i?i.is_connected===n:!1}function rOe(e,t,n){let{companies:i}=t,{clientSrc:r}=t,{companyConnectUrlBase:a}=t,{companyDisconnectUrlBase:s}=t,{server:o}=t,l=!1,d=!1;function c(){d=!0}function v(){return Jc.get(r)}async function T(O,M){let F=null;for(let $=0;$<300&&(F=await v(),!(iOe(F,O,M)||d));$++)await nOe(1e3);F&&n(7,o=F.client_page_params),d=!1,n(3,l=!l)}function b(O){T(O,!0)}function A(O){T(O,!1)}const E=O=>A(O.id);function y(O){l=O,n(3,l)}const I=O=>b(O.id);function D(O){l=O,n(3,l)}return e.$$set=O=>{"companies"in O&&n(0,i=O.companies),"clientSrc"in O&&n(8,r=O.clientSrc),"companyConnectUrlBase"in O&&n(1,a=O.companyConnectUrlBase),"companyDisconnectUrlBase"in O&&n(2,s=O.companyDisconnectUrlBase),"server"in O&&n(7,o=O.server)},[i,a,s,l,c,b,A,o,r,E,y,I,D]}class tF extends Qt{constructor(t){super(),Jt(this,t,rOe,tOe,Kt,{companies:0,clientSrc:8,companyConnectUrlBase:1,companyDisconnectUrlBase:2,server:7})}}function WM(e){let t,n;return{c(){t=P("small"),n=Le(e[2]),w(t,"class","form-text text-danger col-sm-3")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&4&&vt(n,i[2])},d(i){i&&_e(t)}}}function aOe(e){let t,n,i,r,a,s,o,l,d,c=e[2]&&WM(e);return{c(){t=P("div"),n=P("label"),i=Le(e[1]),r=K(),c&&c.c(),a=K(),s=P("div"),o=P("input"),w(n,"class","string col-form-label"),w(n,"for",e[8]),wt(n,"col-sm-3",!!e[2]),wt(n,"col-sm-6",!e[2]),o.required=e[5],w(o,"class","string form-control"),w(o,"type","text"),w(o,"id",e[8]),w(o,"name",e[8]),o.readOnly=e[3],wt(o,"form-control-dirty",e[4]!==e[0]&&e[6]),wt(o,"is-invalid",!e[6]),w(s,"class","col-sm-6"),w(t,"class","row string form-group"),wt(t,"has-feedback",!!e[2])},m(v,T){ce(v,t,T),m(t,n),m(n,i),m(t,r),c&&c.m(t,null),m(t,a),m(t,s),m(s,o),Pn(o,e[0]),l||(d=[ct(o,"input",e[9]),ct(o,"input",function(){Ga(e[7])&&e[7].apply(this,arguments)})],l=!0)},p(v,[T]){e=v,T&2&&vt(i,e[1]),T&4&&wt(n,"col-sm-3",!!e[2]),T&4&&wt(n,"col-sm-6",!e[2]),e[2]?c?c.p(e,T):(c=WM(e),c.c(),c.m(t,a)):c&&(c.d(1),c=null),T&32&&(o.required=e[5]),T&8&&(o.readOnly=e[3]),T&1&&o.value!==e[0]&&Pn(o,e[0]),T&81&&wt(o,"form-control-dirty",e[4]!==e[0]&&e[6]),T&64&&wt(o,"is-invalid",!e[6]),T&4&&wt(t,"has-feedback",!!e[2])},i:ot,o:ot,d(v){v&&_e(t),c&&c.d(),l=!1,vi(d)}}}function sOe(e,t,n){let{title:i}=t,{value:r}=t,{feedback:a}=t,{readOnly:s}=t,{serverValue:o}=t,{required:l}=t,{isValid:d=!0}=t,{onInput:c}=t,v=Ys.uniqueId("input");function T(){r=this.value,n(0,r)}return e.$$set=b=>{"title"in b&&n(1,i=b.title),"value"in b&&n(0,r=b.value),"feedback"in b&&n(2,a=b.feedback),"readOnly"in b&&n(3,s=b.readOnly),"serverValue"in b&&n(4,o=b.serverValue),"required"in b&&n(5,l=b.required),"isValid"in b&&n(6,d=b.isValid),"onInput"in b&&n(7,c=b.onInput)},[r,i,a,s,o,l,d,c,v,T]}class mv extends Qt{constructor(t){super(),Jt(this,t,sOe,aOe,Kt,{title:1,value:0,feedback:2,readOnly:3,serverValue:4,required:5,isValid:6,onInput:7})}}const oOe=Bs().shape({name:Ps().trim().required()}),lOe=e=>{try{return oOe.validateSync(e,{abortEarly:!1}),new Set}catch(t){return new Set(t.inner.map(n=>n.path))}};function uOe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D=e[5]&&(typeof e[5]=="string"||e[5]instanceof String)&&e[5].length>0&&VM(e);function O(H){e[18](H)}let M={title:"Name",serverValue:e[7],required:!0,feedback:e[11],onInput:e[14],isValid:!e[10].has("name")&&!(e[11]&&e[11].length>0)};e[2]!==void 0&&(M.value=e[2]),i=new mv({props:M}),Oe.push(()=>$e(i,"value",O));function F(H){e[19](H)}let $={title:"Email",serverValue:e[6]};e[1]!==void 0&&($.value=e[1]),s=new mv({props:$}),Oe.push(()=>$e(s,"value",F));function L(H){e[20](H)}let j={title:"New Password",serverValue:""};return e[0]!==void 0&&(j.value=e[0]),d=new mv({props:j}),Oe.push(()=>$e(d,"value",L)),{c(){t=P("div"),D&&D.c(),n=K(),re(i.$$.fragment),a=K(),re(s.$$.fragment),l=K(),re(d.$$.fragment),v=K(),T=P("button"),b=Le("Update Credentials"),w(T,"class","btn btn-primary"),T.disabled=A=!e[12],w(t,"class","credential-changer-form svelte-1tprr0s"),wt(t,"credential-changer____in-progress",e[4])},m(H,V){ce(H,t,V),D&&D.m(t,null),m(t,n),ae(i,t,null),m(t,a),ae(s,t,null),m(t,l),ae(d,t,null),m(t,v),m(t,T),m(T,b),E=!0,y||(I=ct(T,"click",Hi(function(){Ga(e[8])&&e[8].apply(this,arguments)})),y=!0)},p(H,V){e=H,e[5]&&(typeof e[5]=="string"||e[5]instanceof String)&&e[5].length>0?D?D.p(e,V):(D=VM(e),D.c(),D.m(t,n)):D&&(D.d(1),D=null);const Q={};V&128&&(Q.serverValue=e[7]),V&2048&&(Q.feedback=e[11]),V&3072&&(Q.isValid=!e[10].has("name")&&!(e[11]&&e[11].length>0)),!r&&V&4&&(r=!0,Q.value=e[2],Ne(()=>r=!1)),i.$set(Q);const X={};V&64&&(X.serverValue=e[6]),!o&&V&2&&(o=!0,X.value=e[1],Ne(()=>o=!1)),s.$set(X);const te={};!c&&V&1&&(c=!0,te.value=e[0],Ne(()=>c=!1)),d.$set(te),(!E||V&4096&&A!==(A=!e[12]))&&(T.disabled=A),(!E||V&16)&&wt(t,"credential-changer____in-progress",e[4])},i(H){E||(U(i.$$.fragment,H),U(s.$$.fragment,H),U(d.$$.fragment,H),E=!0)},o(H){W(i.$$.fragment,H),W(s.$$.fragment,H),W(d.$$.fragment,H),E=!1},d(H){H&&_e(t),D&&D.d(),se(i),se(s),se(d),y=!1,I()}}}function dOe(e){let t,n,i=u0(e[13]()," ")+"",r,a,s,o,l;return{c(){t=P("div"),n=P("p"),r=K(),a=P("p"),s=P("button"),s.textContent="OK, Got It",w(s,"class","btn btn-primary")},m(d,c){ce(d,t,c),m(t,n),n.innerHTML=i,m(t,r),m(t,a),m(a,s),o||(l=ct(s,"click",function(){Ga(e[9])&&e[9].apply(this,arguments)}),o=!0)},p(d,c){e=d},i:ot,o:ot,d(d){d&&_e(t),o=!1,l()}}}function VM(e){let t,n;return{c(){t=P("p"),n=Le(e[5]),w(t,"class","error")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&32&&vt(n,i[5])},d(i){i&&_e(t)}}}function fOe(e){let t,n,i,r;const a=[dOe,uOe],s=[];function o(l,d){return l[3]?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),i=On()},m(l,d){s[t].m(l,d),ce(l,i,d),r=!0},p(l,[d]){let c=t;t=o(l),t===c?s[t].p(l,d):(pn(),W(s[c],1,1,()=>{s[c]=null}),hn(),n=s[t],n?n.p(l,d):(n=s[t]=a[t](l),n.c()),U(n,1),n.m(i.parentNode,i))},i(l){r||(U(n),r=!0)},o(l){W(n),r=!1},d(l){s[t].d(l),l&&_e(i)}}}function cOe(e,t,n){let i,r,a,s,o,{newPassword:l}=t,{credentialChangeSubmitted:d}=t,{changeCredentialsInProgress:c}=t,{newEmail:v}=t,{newName:T}=t,{error:b}=t,{currentEmail:A}=t,{currentName:E}=t,{onSubmitChange:y}=t,{onResetControl:I}=t,D=new Set;function O(){let j=v.trim().length==0,H=[];if(j)H.push('<span key="email">You have cleared the email</span>'),i&&H.push(`<span key="password">and changed the password to: <b>${l}</b></span>`),a&&H.push(`<span key="name">and changed the name to: <b>${T}</b></span>`);else{H.push('<span key="prefix">You have changed</span>');let V=[];i&&V.push(`<span key="password">the password to: <b>${l}</b></span>`),r&&V.push(`<span key="email">the email to: <b>${v}</b></span>`),a&&V.push(`<span key="name">the name to: <b>${T}</b></span>`),H.push(u0(V," and "))}return H}function M(){n(10,D=lOe({name:T}))}function F(j){T=j,n(2,T)}function $(j){v=j,n(1,v)}function L(j){l=j,n(0,l)}return e.$$set=j=>{"newPassword"in j&&n(0,l=j.newPassword),"credentialChangeSubmitted"in j&&n(3,d=j.credentialChangeSubmitted),"changeCredentialsInProgress"in j&&n(4,c=j.changeCredentialsInProgress),"newEmail"in j&&n(1,v=j.newEmail),"newName"in j&&n(2,T=j.newName),"error"in j&&n(5,b=j.error),"currentEmail"in j&&n(6,A=j.currentEmail),"currentName"in j&&n(7,E=j.currentName),"onSubmitChange"in j&&n(8,y=j.onSubmitChange),"onResetControl"in j&&n(9,I=j.onResetControl)},e.$$.update=()=>{e.$$.dirty&1&&n(17,i=l.length>0),e.$$.dirty&66&&n(16,r=v!=A),e.$$.dirty&132&&n(15,a=T!=E&&T.trim().length>0),e.$$.dirty&229376&&n(12,s=i||r||a),e.$$.dirty&32&&n(11,o=b&&typeof b=="object"&&b.name&&Array.isArray(b.name)&&u0(b.name," and "))},[l,v,T,d,c,b,A,E,y,I,D,o,s,O,M,a,r,i,F,$,L]}class nF extends Qt{constructor(t){super(),Jt(this,t,cOe,fOe,Kt,{newPassword:0,credentialChangeSubmitted:3,changeCredentialsInProgress:4,newEmail:1,newName:2,error:5,currentEmail:6,currentName:7,onSubmitChange:8,onResetControl:9})}}function _Oe(e){let t;return{c(){t=P("span"),t.innerHTML=`Loading summary information
    <br/> 
    <div class="tsp-loading"><span class="bounce1"></span> 
      <span class="bounce2"></span> 
      <span class="bounce3"></span></div>`},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function pOe(e){let t,n,i,r,a,s,o=e[0].last_activity_at+"",l,d,c,v,T,b,A,E=e[2](e[0].total_tax)+"",y,I,D,O,M,F,$,L=e[2](e[0].withholding_and_payment)+"",j,H,V,Q,X,te,ne,be=e[2](e[0].net_tax_due)+"",ue,Ce,ie,Y,he,Me,Pe,We=e[2](e[0].tax_savings_potential)+"",qe;return{c(){t=P("div"),n=P("span"),i=Le(`User Last Activity
      `),r=P("br"),a=K(),s=P("b"),l=Le(o),d=K(),c=P("span"),v=Le(`Total Tax
      `),T=P("br"),b=K(),A=P("b"),y=Le(E),I=K(),D=P("span"),O=Le(`Withholding & Payments
      `),M=P("br"),F=K(),$=P("b"),j=Le(L),H=K(),V=P("span"),Q=Le(`Net Tax Due
      `),X=P("br"),te=K(),ne=P("b"),ue=Le(be),Ce=K(),ie=P("span"),Y=Le(`Tax Savings Potential
      `),he=P("br"),Me=K(),Pe=P("b"),qe=Le(We),w(s,"class","tax-savings-potential"),w(n,"class","summary-info__item"),w(A,"class","tax-savings-potential"),w(c,"class","summary-info__item"),w($,"class","tax-savings-potential"),w(D,"class","summary-info__item"),w(ne,"class","tax-savings-potential"),w(V,"class","summary-info__item"),w(Pe,"class","tax-savings-potential"),w(ie,"class","summary-info__item")},m(ee,G){ce(ee,t,G),m(t,n),m(n,i),m(n,r),m(n,a),m(n,s),m(s,l),m(t,d),m(t,c),m(c,v),m(c,T),m(c,b),m(c,A),m(A,y),m(t,I),m(t,D),m(D,O),m(D,M),m(D,F),m(D,$),m($,j),m(t,H),m(t,V),m(V,Q),m(V,X),m(V,te),m(V,ne),m(ne,ue),m(t,Ce),m(t,ie),m(ie,Y),m(ie,he),m(ie,Me),m(ie,Pe),m(Pe,qe)},p(ee,G){G&1&&o!==(o=ee[0].last_activity_at+"")&&vt(l,o),G&1&&E!==(E=ee[2](ee[0].total_tax)+"")&&vt(y,E),G&1&&L!==(L=ee[2](ee[0].withholding_and_payment)+"")&&vt(j,L),G&1&&be!==(be=ee[2](ee[0].net_tax_due)+"")&&vt(ue,be),G&1&&We!==(We=ee[2](ee[0].tax_savings_potential)+"")&&vt(qe,We)},d(ee){ee&&_e(t)}}}function hOe(e){let t;function n(a,s){if(a[0].tax_savings_potential!=null)return pOe;if(a[1])return _Oe}let i=n(e),r=i&&i(e);return{c(){r&&r.c(),t=On()},m(a,s){r&&r.m(a,s),ce(a,t,s)},p(a,[s]){i===(i=n(a))&&r?r.p(a,s):(r&&r.d(1),r=i&&i(a),r&&(r.c(),r.m(t.parentNode,t)))},i:ot,o:ot,d(a){r&&r.d(a),a&&_e(t)}}}function mOe(e,t,n){let{info:i}=t,{hasLinkedCompany:r}=t;function a(s){return Er.formatMoney(s,"$",0)}return e.$$set=s=>{"info"in s&&n(0,i=s.info),"hasLinkedCompany"in s&&n(1,r=s.hasLinkedCompany)},[i,r,a]}class iF extends Qt{constructor(t){super(),Jt(this,t,mOe,hOe,Kt,{info:0,hasLinkedCompany:1})}}function gOe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b;return o=new iF({props:{info:e[0],hasLinkedCompany:e[1]}}),c=new gm({props:{redirectUrl:e[3],className:"float-right",caption:"Client Portal"}}),T=new gm({props:{redirectUrl:e[2],caption:"Personal Data Entry",className:"float-right"}}),{c(){t=P("div"),n=P("div"),i=P("div"),r=P("div"),r.innerHTML='<h1 class="client-page__block-header-title">Settings</h1>',a=K(),s=P("div"),re(o.$$.fragment),l=K(),d=P("div"),re(c.$$.fragment),v=K(),re(T.$$.fragment),w(r,"class","col-md-12 col-lg-2"),w(s,"class","col-md-12 col-lg-6 text-center"),w(d,"class","col-md-12 col-lg-4 text-right"),w(i,"class","row client-page-header"),w(n,"class","pageheader")},m(A,E){ce(A,t,E),m(t,n),m(n,i),m(i,r),m(i,a),m(i,s),ae(o,s,null),m(i,l),m(i,d),ae(c,d,null),m(d,v),ae(T,d,null),b=!0},p(A,[E]){const y={};E&1&&(y.info=A[0]),E&2&&(y.hasLinkedCompany=A[1]),o.$set(y);const I={};E&8&&(I.redirectUrl=A[3]),c.$set(I);const D={};E&4&&(D.redirectUrl=A[2]),T.$set(D)},i(A){b||(U(o.$$.fragment,A),U(c.$$.fragment,A),U(T.$$.fragment,A),b=!0)},o(A){W(o.$$.fragment,A),W(c.$$.fragment,A),W(T.$$.fragment,A),b=!1},d(A){A&&_e(t),se(o),se(c),se(T)}}}function vOe(e,t,n){let{summaryInfo:i}=t,{hasLinkedCompany:r}=t,{calculationGhostInUrl:a}=t,{clientPortalGhostInUrl:s}=t;return e.$$set=o=>{"summaryInfo"in o&&n(0,i=o.summaryInfo),"hasLinkedCompany"in o&&n(1,r=o.hasLinkedCompany),"calculationGhostInUrl"in o&&n(2,a=o.calculationGhostInUrl),"clientPortalGhostInUrl"in o&&n(3,s=o.clientPortalGhostInUrl)},[i,r,a,s]}class rF extends Qt{constructor(t){super(),Jt(this,t,vOe,gOe,Kt,{summaryInfo:0,hasLinkedCompany:1,calculationGhostInUrl:2,clientPortalGhostInUrl:3})}}function bOe(e){let t,n,i,r,a,s,o,l,d,c,v;function T(y){e[13](y)}function b(y){e[14](y)}function A(y){e[15](y)}let E={credentialChangeSubmitted:e[1],changeCredentialsInProgress:e[6],error:e[7],currentEmail:e[3],currentName:e[5],onSubmitChange:e[9],onResetControl:e[8]};return e[0]!==void 0&&(E.newPassword=e[0]),e[2]!==void 0&&(E.newEmail=e[2]),e[4]!==void 0&&(E.newName=e[4]),o=new nF({props:E}),Oe.push(()=>$e(o,"newPassword",T)),Oe.push(()=>$e(o,"newEmail",b)),Oe.push(()=>$e(o,"newName",A)),{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Client Credentials</h3>',i=K(),r=P("div"),a=P("div"),s=P("div"),re(o.$$.fragment),w(n,"class","card-header"),w(s,"class","col-lg-12"),w(a,"class","row"),w(r,"class","card-body"),w(t,"class","card mb-3")},m(y,I){ce(y,t,I),m(t,n),m(t,i),m(t,r),m(r,a),m(a,s),ae(o,s,null),v=!0},p(y,[I]){const D={};I&2&&(D.credentialChangeSubmitted=y[1]),I&64&&(D.changeCredentialsInProgress=y[6]),I&128&&(D.error=y[7]),I&8&&(D.currentEmail=y[3]),I&32&&(D.currentName=y[5]),!l&&I&1&&(l=!0,D.newPassword=y[0],Ne(()=>l=!1)),!d&&I&4&&(d=!0,D.newEmail=y[2],Ne(()=>d=!1)),!c&&I&16&&(c=!0,D.newName=y[4],Ne(()=>c=!1)),o.$set(D)},i(y){v||(U(o.$$.fragment,y),v=!0)},o(y){W(o.$$.fragment,y),v=!1},d(y){y&&_e(t),se(o)}}}function yOe(e,t,n){let{clientCredentials:i}=t,{updateCredentialsSrc:r}=t,{csrfToken:a}=t,s="",o=!1,l=i.email||"",d=i.email||"",c=i.name||"",v=i.name||"",T=!1,b="";function A(){n(0,s=""),n(1,o=!1),n(6,T=!1),n(3,d=l),n(5,v=c),n(7,b="")}function E(){n(6,T=!0),au.ajax({url:r,method:"PATCH",data:{password:s,email:l,name:c},dataType:"JSON",headers:{"X-CSRF-Token":a},success:O=>{O.email==null&&n(2,l=""),n(1,o=!0)},error:O=>O.status==422?n(7,b=O.responseJSON.error):n(7,b="Fatal error"),complete:()=>n(6,T=!1)})}function y(O){s=O,n(0,s)}function I(O){l=O,n(2,l)}function D(O){c=O,n(4,c)}return e.$$set=O=>{"clientCredentials"in O&&n(10,i=O.clientCredentials),"updateCredentialsSrc"in O&&n(11,r=O.updateCredentialsSrc),"csrfToken"in O&&n(12,a=O.csrfToken)},[s,o,l,d,c,v,T,b,A,E,i,r,a,y,I,D]}class aF extends Qt{constructor(t){super(),Jt(this,t,yOe,bOe,Kt,{clientCredentials:10,updateCredentialsSrc:11,csrfToken:12})}}function wOe(e){let t,n,i,r,a,s,o,l,d;function c(T){e[9](T)}let v={plannersAccess:e[1],changeSettingsInProgress:e[2],error:e[3],onSettingsChange:e[4],toggleAllTo:e[5]};return e[0]!==void 0&&(v.localPlannersAccess=e[0]),o=new eF({props:v}),Oe.push(()=>$e(o,"localPlannersAccess",c)),{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Client Projection Settings</h3>',i=K(),r=P("div"),a=P("div"),s=P("div"),re(o.$$.fragment),w(n,"class","card-header"),w(s,"class","col-lg-12"),w(a,"class","row"),w(r,"class","card-body"),w(t,"class","card mb-3")},m(T,b){ce(T,t,b),m(t,n),m(t,i),m(t,r),m(r,a),m(a,s),ae(o,s,null),d=!0},p(T,[b]){const A={};b&2&&(A.plannersAccess=T[1]),b&4&&(A.changeSettingsInProgress=T[2]),b&8&&(A.error=T[3]),!l&&b&1&&(l=!0,A.localPlannersAccess=T[0],Ne(()=>l=!1)),o.$set(A)},i(T){d||(U(o.$$.fragment,T),d=!0)},o(T){W(o.$$.fragment,T),d=!1},d(T){T&&_e(t),se(o)}}}function TOe(e,t,n){let{clientSettings:i}=t,{csrfToken:r}=t,{updateProjectionSettingsSrc:a}=t,s=i.planners_access,o=i.planners_access,l=!1,d="";const c=Ys.debounce(v,500);function v(){n(2,l=!0),au.ajax({url:a,method:"PATCH",data:{planners_access:s},dataType:"JSON",headers:{"X-CSRF-Token":r},success:E=>{n(1,o=s),n(3,d="")},error:E=>{n(0,s=o),E.status==422?n(3,d=E.responseJSON.error):n(3,d="Fatal error")},complete:()=>n(2,l=!1)})}function T(E){const y=E.target,I=y.type==="checkbox"?y.checked:y.value,D=y.name;n(0,s={...s,[D]:I}),c()}function b(E){n(0,s=Ys.mapObject(s,()=>E)),c()}function A(E){s=E,n(0,s)}return e.$$set=E=>{"clientSettings"in E&&n(6,i=E.clientSettings),"csrfToken"in E&&n(7,r=E.csrfToken),"updateProjectionSettingsSrc"in E&&n(8,a=E.updateProjectionSettingsSrc)},[s,o,l,d,T,b,i,r,a,A]}class sF extends Qt{constructor(t){super(),Jt(this,t,TOe,wOe,Kt,{clientSettings:6,csrfToken:7,updateProjectionSettingsSrc:8})}}function zM(e){let t,n;return{c(){t=P("p"),n=Le(e[2]),w(t,"class","error")},m(i,r){ce(i,t,r),m(t,n)},p(i,r){r&4&&vt(n,i[2])},d(i){i&&_e(t)}}}function kOe(e){let t;return{c(){t=Le("The client doesn't have a phone number associated with their account")},m(n,i){ce(n,t,i)},p:ot,d(n){n&&_e(t)}}}function SOe(e){let t,n,i,r;return{c(){t=P("button"),n=Le("Remove Phone Number"),w(t,"class","btn btn-danger"),t.disabled=e[1]},m(a,s){ce(a,t,s),m(t,n),i||(r=ct(t,"click",e[3]),i=!0)},p(a,s){s&2&&(t.disabled=a[1])},d(a){a&&_e(t),i=!1,r()}}}function COe(e){let t,n,i,r,a,s=e[2].length>0&&zM(e);function o(c,v){return c[0]?SOe:kOe}let l=o(e),d=l(e);return{c(){t=P("div"),n=P("div"),n.innerHTML='<h3 class="card-title mb-0">Phone number</h3>',i=K(),r=P("div"),s&&s.c(),a=K(),d.c(),w(n,"class","card-header"),w(r,"class","card-body"),w(t,"class","card remove-phone__form mb-3 svelte-thmtat"),wt(t,"remove-phone--in-progress",e[1])},m(c,v){ce(c,t,v),m(t,n),m(t,i),m(t,r),s&&s.m(r,null),m(r,a),d.m(r,null)},p(c,[v]){c[2].length>0?s?s.p(c,v):(s=zM(c),s.c(),s.m(r,a)):s&&(s.d(1),s=null),l===(l=o(c))&&d?d.p(c,v):(d.d(1),d=l(c),d&&(d.c(),d.m(r,null))),v&2&&wt(t,"remove-phone--in-progress",c[1])},i:ot,o:ot,d(c){c&&_e(t),s&&s.d(),d.d()}}}function POe(e,t,n){let{removePhoneNumberSrc:i}=t,{csrfToken:r}=t,{hasPhoneNumber:a}=t,s=!1,o="";function l(){if(!confirm("Once removed, the phone number will be no longer prompted until the client configures it again. This may make client's account less secure. Do you want to proceed?"))return!1;n(1,s=!0),au.ajax({url:i,method:"PATCH",headers:{"X-CSRF-Token":r},success:()=>{n(0,a=!1),n(2,o="")},error:d=>{d.status===422?n(2,o=d.responseJSON.error):n(2,o="Fatal error")},complete:()=>n(1,s=!1)})}return e.$$set=d=>{"removePhoneNumberSrc"in d&&n(4,i=d.removePhoneNumberSrc),"csrfToken"in d&&n(5,r=d.csrfToken),"hasPhoneNumber"in d&&n(0,a=d.hasPhoneNumber)},[a,s,o,l,i,r]}class EOe extends Qt{constructor(t){super(),Jt(this,t,POe,COe,Kt,{removePhoneNumberSrc:4,csrfToken:5,hasPhoneNumber:0})}}function IOe(e){let t,n,i,r,a,s,o,l,d,c,v,T,b,A,E,y,I,D;n=new rF({props:{summaryInfo:e[13],hasLinkedCompany:e[14].has_linked_company,calculationGhostInUrl:e[7],clientPortalGhostInUrl:e[8]}}),o=new aF({props:{clientCredentials:e[4],updateCredentialsSrc:e[0],csrfToken:e[11]}}),d=new Z5({props:{clientAdditions:e[6],updateAdditionsSrc:e[1],csrfToken:e[11]}}),v=new EOe({props:{removePhoneNumberSrc:e[3],csrfToken:e[11],hasPhoneNumber:e[14].has_phone_number}}),A=new sF({props:{clientSettings:e[5],updateProjectionSettingsSrc:e[2],csrfToken:e[11]}});function O(F){e[17](F)}let M={companies:e[14].companies,clientSrc:e[12],companyConnectUrlBase:e[9],companyDisconnectUrlBase:e[10]};return e[14]!==void 0&&(M.server=e[14]),y=new tF({props:M}),Oe.push(()=>$e(y,"server",O)),{c(){t=P("div"),re(n.$$.fragment),i=K(),r=P("section"),a=P("div"),s=P("div"),re(o.$$.fragment),l=K(),re(d.$$.fragment),c=K(),re(v.$$.fragment),T=K(),b=P("div"),re(A.$$.fragment),E=K(),re(y.$$.fragment),w(s,"class","col-12 col-lg-6"),w(b,"class","col-12 col-lg-6"),w(a,"class","row"),w(r,"id","main-content")},m(F,$){ce(F,t,$),ae(n,t,null),m(t,i),m(t,r),m(r,a),m(a,s),ae(o,s,null),m(s,l),ae(d,s,null),m(s,c),ae(v,s,null),m(a,T),m(a,b),ae(A,b,null),m(b,E),ae(y,b,null),D=!0},p(F,[$]){const L={};$&8192&&(L.summaryInfo=F[13]),$&16384&&(L.hasLinkedCompany=F[14].has_linked_company),$&128&&(L.calculationGhostInUrl=F[7]),$&256&&(L.clientPortalGhostInUrl=F[8]),n.$set(L);const j={};$&16&&(j.clientCredentials=F[4]),$&1&&(j.updateCredentialsSrc=F[0]),$&2048&&(j.csrfToken=F[11]),o.$set(j);const H={};$&64&&(H.clientAdditions=F[6]),$&2&&(H.updateAdditionsSrc=F[1]),$&2048&&(H.csrfToken=F[11]),d.$set(H);const V={};$&8&&(V.removePhoneNumberSrc=F[3]),$&2048&&(V.csrfToken=F[11]),$&16384&&(V.hasPhoneNumber=F[14].has_phone_number),v.$set(V);const Q={};$&32&&(Q.clientSettings=F[5]),$&4&&(Q.updateProjectionSettingsSrc=F[2]),$&2048&&(Q.csrfToken=F[11]),A.$set(Q);const X={};$&16384&&(X.companies=F[14].companies),$&4096&&(X.clientSrc=F[12]),$&512&&(X.companyConnectUrlBase=F[9]),$&1024&&(X.companyDisconnectUrlBase=F[10]),!I&&$&16384&&(I=!0,X.server=F[14],Ne(()=>I=!1)),y.$set(X)},i(F){D||(U(n.$$.fragment,F),U(o.$$.fragment,F),U(d.$$.fragment,F),U(v.$$.fragment,F),U(A.$$.fragment,F),U(y.$$.fragment,F),D=!0)},o(F){W(n.$$.fragment,F),W(o.$$.fragment,F),W(d.$$.fragment,F),W(v.$$.fragment,F),W(A.$$.fragment,F),W(y.$$.fragment,F),D=!1},d(F){F&&_e(t),se(n),se(o),se(d),se(v),se(A),se(y)}}}function AOe(e,t,n){let{updateCredentialsSrc:i}=t,{updateAdditionsSrc:r}=t,{updateProjectionSettingsSrc:a}=t,{removePhoneNumberSrc:s}=t,{summaryInfoSrc:o}=t,{initial:l}=t,{clientCredentials:d}=t,{clientSettings:c}=t,{clientAdditions:v}=t,{calculationGhostInUrl:T}=t,{clientPortalGhostInUrl:b}=t,{companyConnectUrlBase:A}=t,{companyDisconnectUrlBase:E}=t,{csrfToken:y}=t,{clientSrc:I}=t,D={tax_savings_potential:null},O=l;const M=function(){let $=null,L=Ys.debounce(()=>{$=Jc.get(o,j=>{n(13,D=j)}).fail(()=>{$.abort()})},1e3);return function(){return $&&$.abort(),L()}}();oa(()=>{O.has_linked_company&&M()});function F($){O=$,n(14,O)}return e.$$set=$=>{"updateCredentialsSrc"in $&&n(0,i=$.updateCredentialsSrc),"updateAdditionsSrc"in $&&n(1,r=$.updateAdditionsSrc),"updateProjectionSettingsSrc"in $&&n(2,a=$.updateProjectionSettingsSrc),"removePhoneNumberSrc"in $&&n(3,s=$.removePhoneNumberSrc),"summaryInfoSrc"in $&&n(15,o=$.summaryInfoSrc),"initial"in $&&n(16,l=$.initial),"clientCredentials"in $&&n(4,d=$.clientCredentials),"clientSettings"in $&&n(5,c=$.clientSettings),"clientAdditions"in $&&n(6,v=$.clientAdditions),"calculationGhostInUrl"in $&&n(7,T=$.calculationGhostInUrl),"clientPortalGhostInUrl"in $&&n(8,b=$.clientPortalGhostInUrl),"companyConnectUrlBase"in $&&n(9,A=$.companyConnectUrlBase),"companyDisconnectUrlBase"in $&&n(10,E=$.companyDisconnectUrlBase),"csrfToken"in $&&n(11,y=$.csrfToken),"clientSrc"in $&&n(12,I=$.clientSrc)},[i,r,a,s,d,c,v,T,b,A,E,y,I,D,O,o,l,F]}class DOe extends Qt{constructor(t){super(),Jt(this,t,AOe,IOe,Kt,{updateCredentialsSrc:0,updateAdditionsSrc:1,updateProjectionSettingsSrc:2,removePhoneNumberSrc:3,summaryInfoSrc:15,initial:16,clientCredentials:4,clientSettings:5,clientAdditions:6,calculationGhostInUrl:7,clientPortalGhostInUrl:8,companyConnectUrlBase:9,companyDisconnectUrlBase:10,csrfToken:11,clientSrc:12})}}window.WOW=new Q7;window.WOW.init();window.$.ajaxSetup({headers:{"X-CSRF-TOKEN":Jc('meta[name="csrf-token"]').attr("content")}});U7.setup({Report:Upe,Login:Xpe,SMSLogin:nhe,PersonalProjection:abe,SimulatorDashboard:PN,AutoLease:$me,PlanningCompanyType:lye,PlanningHealthSavings:_ye,PlanningHomeOfficeAccountable:mye,PlanningQBIDSalaryMaximizer:DSe,PlanningVariants:k5,PlanningMfjMfs:xSe,PlanningEstimatedTaxPayments:ZSe,Dashboard:D3e,BusinessProjection:sAe,ClientSelect:lbe,CompanyConnection:Pbe,CreateCompany:Gbe,CompaniesInLeftSideBar:Qbe,XeroTenantSwitch:aye,PlanningChildrenEmploymentContainer:GSe,ModuleTilesContainer:K3e,SummaryEmailForm:Z3e,SmsConfirmation:rIe,YearSwitch:Q$,VaultDocsUpload:bAe,UtcDateTimeToLocal:H7,AdminUserList:FAe,AdminUserListPagination:Gy,ClientList:hDe,Pagination:L2,SearchBox:K5,AccountantLogin:vDe,LoginPageManagement:CDe,ModalContent:G5,Subscription:DDe,UserEditDialog:Y5,ClientAdditionsContainer:Z5,ClientSettings:eF,ClientCompaniesContainer:tF,CheckboxInput:Q5,CredentialsChanger:nF,ClientPage:DOe,ClientSummaryInfo:iF,GhostInBtn:gm,ClientSettingsContainer:sF,ClientAdditions:J5,TextArea:X5,ClientPageHeaderContainer:rF,CredentialsChangerContainer:aF,ConnectBtn:H2,TextInput:mv})});export default OOe();
//# sourceMappingURL=application-lhEPANKh.js.map
