/*!
 * Knockout JavaScript library v3.5.1-sm
 * (c) The Knockout.js team - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */

(A=>{function E(a,c){return null===a||da[typeof a]?a===c:!1}function D(a,c){var e;return()=>{e||(e=b.a.setTimeout(()=>{e=0;a()},c))}}function G(a,c){var e;return()=>{clearTimeout(e);e=b.a.setTimeout(a,c)}}function R(a,c){null!==c&&c.m&&c.m()}function V(a,c){var e=this.cc,g=e[B];g.aa||(this.Sa&&this.za[c]?(e.sb(c,a,this.za[c]),this.za[c]=null,--this.Sa):g.u[c]||e.sb(c,a,g.v?{U:a}:e.Tb(a)),a.ka&&a.Yb())}var S=A.document,W={},b="undefined"!==typeof W?W:{};b.o=(a,c)=>{a=a.split(".");for(var e=b,g=0;g<
a.length-1;g++)e=e[a[g]];e[a[a.length-1]]=c};b.$=(a,c,e)=>{a[c]=e};b.o("version","3.5.1-sm");b.a={extend:(a,c)=>{c&&Object.entries(c).forEach(e=>a[e[0]]=e[1]);return a},O:(a,c)=>a&&Object.entries(a).forEach(e=>c(e[0],e[1])),Cc:(a,c,e)=>{if(!a)return a;var g={};Object.entries(a).forEach(k=>g[k[0]]=c.call(e,k[1],k[0],a));return g},Wa:a=>[...a.childNodes].forEach(c=>b.removeNode(c)),Mb:a=>{var c=[...a],e=(c[0]&&c[0].ownerDocument||S).createElement("div");a.forEach(g=>e.append(b.fa(g)));return e},ya:(a,
c)=>Array.prototype.map.call(a,c?e=>b.fa(e.cloneNode(!0)):e=>e.cloneNode(!0)),ua:(a,c)=>{b.a.Wa(a);c&&a.append(...c)},Aa:(a,c)=>{if(a.length){for(c=8===c.nodeType&&c.parentNode||c;a.length&&a[0].parentNode!==c;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==c;)a.length--;if(1<a.length){c=a[0];var e=a[a.length-1];for(a.length=0;c!==e;)a.push(c),c=c.nextSibling;a.push(e)}}return a},Sb:a=>null==a?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,""),zc:(a,c)=>{a=a||"";return c.length>
a.length?!1:a.substring(0,c.length)===c},fc:(a,c)=>c.contains(1!==a.nodeType?a.parentNode:a),Va:a=>b.a.fc(a,a.ownerDocument.documentElement),zb:a=>b.onError?function(){try{return a.apply(this,arguments)}catch(c){throw b.onError&&b.onError(c),c;}}:a,setTimeout:(a,c)=>setTimeout(b.a.zb(a),c),Db:a=>setTimeout(()=>{b.onError&&b.onError(a);throw a;},0),I:(a,c,e)=>a.addEventListener(c,b.a.zb(e),!1),Vb:(a,c)=>{if(!a||!a.nodeType)throw Error("element must be a DOM node when calling triggerEvent");a.dispatchEvent(new Event(c))},
g:a=>b.L(a)?a():a,fb:(a,c)=>a.textContent=b.a.g(c)||""};b.o("utils",b.a);b.o("unwrap",b.a.g);(()=>{let a=0,c="__ko__"+Date.now(),e=new WeakMap;b.a.f={get:(g,k)=>(e.get(g)||{})[k],set:(g,k,t)=>{if(e.has(g))e.get(g)[k]=t;else{let d={};d[k]=t;e.set(g,d)}return t},Ya:function(g,k,t){return this.get(g,k)||this.set(g,k,t)},clear:g=>e.delete(g),W:()=>a++ +c}})();b.a.K=(()=>{var a=b.a.f.W(),c={1:1,8:1,9:1},e={1:1,9:1};const g=(d,f)=>{var h=b.a.f.get(d,a);f&&!h&&(h=new Set,b.a.f.set(d,a,h));return h},k=d=>
{var f=g(d);f&&(new Set(f)).forEach(h=>h(d));b.a.f.clear(d);e[d.nodeType]&&t(d.childNodes,!0)},t=(d,f)=>{for(var h=[],p,r=0;r<d.length;r++)if(!f||8===d[r].nodeType)if(k(h[h.length]=p=d[r]),d[r]!==p)for(;r--&&!h.includes(d[r]););};return{na:(d,f)=>{if("function"!=typeof f)throw Error("Callback must be a function");g(d,1).add(f)},eb:(d,f)=>{var h=g(d);h&&(h.delete(f),h.size||b.a.f.set(d,a,null))},fa:d=>{b.j.G(()=>{c[d.nodeType]&&(k(d),e[d.nodeType]&&t(d.getElementsByTagName("*")))});return d},removeNode:d=>
{b.fa(d);d.parentNode&&d.parentNode.removeChild(d)}}})();b.fa=b.a.K.fa;b.removeNode=b.a.K.removeNode;b.o("utils.domNodeDisposal",b.a.K);b.o("utils.domNodeDisposal.addDisposeCallback",b.a.K.na);b.Ub=(()=>{function a(){if(e)for(var d=e,f=0,h;k<e;)if(h=c[k++]){if(k>d){if(5E3<=++f){k=e;b.a.Db(Error("'Too much recursion' after processing "+f+" task groups."));break}d=e}try{h()}catch(p){b.a.Db(p)}}k=e=c.length=0}var c=[],e=0,g=1,k=0,t=(d=>{var f=S.createElement("div");(new MutationObserver(d)).observe(f,
{attributes:!0});return()=>f.classList.toggle("foo")})(a);return{Qb:d=>{e||t(a);c[e++]=d;return g++},cancel:d=>{d-=g-e;d>=k&&d<e&&(c[d]=null)}}})();b.Xa={debounce:(a,c)=>a.Ha(e=>G(e,c)),rateLimit:(a,c)=>{if("number"==typeof c)var e=c;else{e=c.timeout;var g=c.method}var k="function"==typeof g?g:D;a.Ha(t=>k(t,e,c))},notify:(a,c)=>{a.equalityComparer="always"==c?null:E}};var da={undefined:1,"boolean":1,number:1,string:1};b.o("extenders",b.Xa);class ea{constructor(a,c,e){this.U=a;this.lb=c;this.pa=e;
this.Na=!1;this.C=this.X=null;b.$(this,"dispose",this.m);b.$(this,"disposeWhenNodeIsRemoved",this.i)}m(){this.Na||(this.C&&b.a.K.eb(this.X,this.C),this.Na=!0,this.pa(),this.U=this.lb=this.pa=this.X=this.C=null)}i(a){this.X=a;b.a.K.na(a,this.C=this.m.bind(this))}}b.S=function(){Object.setPrototypeOf(this,N);N.Ea(this)};var N={Ea:a=>{a.T=new Map;a.T.set("change",new Set);a.rb=1},subscribe:function(a,c,e){var g=this;e=e||"change";var k=new ea(g,c?a.bind(c):a,()=>{g.T.get(e).delete(k);g.wa&&g.wa(e)});
g.oa&&g.oa(e);g.T.has(e)||g.T.set(e,new Set);g.T.get(e).add(k);return k},notifySubscribers:function(a,c){c=c||"change";"change"===c&&this.Ka();if(this.sa(c)){c="change"===c&&this.Wb||new Set(this.T.get(c));try{b.j.wb(),c.forEach(e=>{e.Na||e.lb(a)})}finally{b.j.end()}}},Ca:function(){return this.rb},lc:function(a){return this.Ca()!==a},Ka:function(){++this.rb},Ha:function(a){var c=this,e=b.L(c),g,k,t,d,f;c.va||(c.va=c.notifySubscribers,c.notifySubscribers=function(p,r){r&&"change"!==r?"beforeChange"===
r?this.ob(p):this.va(p,r):this.pb(p)});var h=a(()=>{c.ka=!1;e&&d===c&&(d=c.mb?c.mb():c());var p=k||f&&c.Ga(t,d);f=k=g=!1;p&&c.va(t=d)});c.pb=(p,r)=>{r&&c.ka||(f=!r);c.Wb=new Set(c.T.get("change"));c.ka=g=!0;d=p;h()};c.ob=p=>{g||(t=p,c.va(p,"beforeChange"))};c.qb=()=>{f=!0};c.Yb=()=>{c.Ga(t,c.H(!0))&&(k=!0)}},sa:function(a){return(this.T.get(a)||[]).size},Ga:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},toString:()=>"[object Object]",extend:function(a){var c=this;a&&b.a.O(a,
(e,g)=>{e=b.Xa[e];"function"==typeof e&&(c=e(c,g)||c)});return c}};b.$(N,"init",N.Ea);b.$(N,"subscribe",N.subscribe);b.$(N,"extend",N.extend);Object.setPrototypeOf(N,Function.prototype);b.S.fn=N;b.oc=a=>null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers;(()=>{var a=[],c,e=0;b.j={wb:g=>{a.push(c);c=g},end:()=>c=a.pop(),Pb:g=>{if(c){if(!b.oc(g))throw Error("Only subscribable things can act as dependencies");c.$b.call(c.ac,g,g.Xb||(g.Xb=++e))}},G:(g,k,t)=>{try{return a.push(c),
c=void 0,g.apply(k,t||[])}finally{c=a.pop()}},Ba:()=>c&&c.l.Ba(),$a:()=>c&&c.$a,l:()=>c&&c.l}})();const L=Symbol("_latestValue");b.ca=a=>{function c(){if(0<arguments.length)return c.Ga(c[L],arguments[0])&&(c.jb(),c[L]=arguments[0],c.La()),this;b.j.Pb(c);return c[L]}c[L]=a;Object.defineProperty(c,"length",{get:()=>null==c[L]?void 0:c[L].length});b.S.fn.Ea(c);Object.setPrototypeOf(c,P);return c};var P={toJSON:function(){let a=this[L];return a&&a.toJSON?a.toJSON():a},equalityComparer:E,H:function(){return this[L]},
La:function(){this.notifySubscribers(this[L],"spectate");this.notifySubscribers(this[L])},jb:function(){this.notifySubscribers(this[L],"beforeChange")}};Object.setPrototypeOf(P,b.S.fn);var Q=b.ca.C="__ko_proto__";P[Q]=b.ca;b.L=a=>{if((a="function"==typeof a&&a[Q])&&a!==P[Q]&&a!==b.l.fn[Q])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!a};b.qc=a=>"function"==typeof a&&(a[Q]===P[Q]||a[Q]===b.l.fn[Q]&&a.mc);b.o("observable",b.ca);b.o("isObservable",
b.L);b.o("observable.fn",P);b.$(P,"valueHasMutated",P.La);b.ia=a=>{a=a||[];if("object"!=typeof a||!("length"in a))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");a=b.ca(a);Object.setPrototypeOf(a,b.ia.fn);return a.extend({trackArrayChanges:!0})};b.ia.fn={remove:function(a){for(var c=this.H(),e=!1,g="function"!=typeof a||b.L(a)?d=>d===a:a,k=c.length;k--;){var t=c[k];if(g(t)){if(c[k]!==t)throw Error("Array modified during remove; cannot remove item");
e||this.jb();e=!0;c.splice(k,1)}}e&&this.La()}};Object.setPrototypeOf(b.ia.fn,b.ca.fn);Object.getOwnPropertyNames(Array.prototype).forEach(a=>{"function"===typeof Array.prototype[a]&&"constructor"!=a&&("copyWithin fill pop push reverse shift sort splice unshift".split(" ").includes(a)?b.ia.fn[a]=function(...c){var e=this.H();this.jb();this.yb(e,a,c);c=e[a](...c);this.La();return c===e?this:c}:b.ia.fn[a]=function(...c){return this()[a](...c)})});b.Jb=a=>b.L(a)&&"function"==typeof a.remove&&"function"==
typeof a.push;b.o("observableArray",b.ia);b.o("isObservableArray",b.Jb);b.Xa.trackArrayChanges=(a,c)=>{function e(){function q(){if(f){var l=[].concat(a.H()||[]);if(a.sa("arrayChange")){if(!k||1<f)k=b.a.Ab(h,l,a.Qa);var n=k}h=l;k=null;f=0;n&&n.length&&a.notifySubscribers(n,"arrayChange")}}g?q():(g=!0,d=a.subscribe(()=>++f,null,"spectate"),h=[].concat(a.H()||[]),k=null,t=a.subscribe(q))}a.Qa={};c&&"object"==typeof c&&b.a.extend(a.Qa,c);a.Qa.sparse=!0;if(!a.yb){var g=!1,k=null,t,d,f=0,h,p=a.oa,r=a.wa;
a.oa=q=>{p&&p.call(a,q);"arrayChange"===q&&e()};a.wa=q=>{r&&r.call(a,q);"arrayChange"!==q||a.sa("arrayChange")||(t&&t.m(),d&&d.m(),d=t=null,g=!1,h=void 0)};a.yb=(q,l,n)=>{function m(J,y,H){return u[u.length]={status:J,value:y,index:H}}if(g&&!f){var u=[],w=q.length,v=n.length,x=0;switch(l){case "push":x=w;case "unshift":for(l=0;l<v;l++)m("added",n[l],x+l);break;case "pop":x=w-1;case "shift":w&&m("deleted",q[x],x);break;case "splice":l=Math.min(Math.max(0,0>n[0]?w+n[0]:n[0]),w);w=1===v?w:Math.min(l+
(n[1]||0),w);v=l+v-2;x=Math.max(w,v);for(var z=[],C=[],M=2;l<x;++l,++M)l<w&&C.push(m("deleted",q[l],l)),l<v&&z.push(m("added",n[M],l));b.a.Gb(C,z);break;default:return}k=u}}}};var B=Symbol("_state");b.l=(a,c)=>{function e(){if(0<arguments.length){if("function"!==typeof g)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");g(...arguments);return this}k.aa||b.j.Pb(e);(k.V||k.v&&e.ta())&&e.R();return k.M}
"object"===typeof a?c=a:(c=c||{},a&&(c.read=a));if("function"!=typeof c.read)throw Error("Pass a function that returns the value of the ko.computed");var g=c.write,k={M:void 0,ba:!0,V:!0,Fa:!1,hb:!1,aa:!1,cb:!1,v:!1,Ob:c.read,i:c.disposeWhenNodeIsRemoved||c.i||null,qa:c.disposeWhen||c.qa,Ua:null,u:{},J:0,Fb:null};e[B]=k;e.mc="function"===typeof g;b.S.fn.Ea(e);Object.setPrototypeOf(e,T);c.pure?(k.cb=!0,k.v=!0,b.a.extend(e,fa)):c.deferEvaluation&&b.a.extend(e,ha);k.i&&(k.hb=!0,k.i.nodeType||(k.i=null));
k.v||c.deferEvaluation||e.R();k.i&&e.ha()&&b.a.K.na(k.i,k.Ua=()=>{e.m()});return e};var T={equalityComparer:E,Ba:function(){return this[B].J},jc:function(){var a=[];b.a.O(this[B].u,(c,e)=>a[e.la]=e.U);return a},Za:function(a){if(!this[B].J)return!1;var c=this.jc();return c.includes(a)||!!c.find(e=>e.Za&&e.Za(a))},sb:function(a,c,e){if(this[B].cb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[B].u[a]=e;e.la=this[B].J++;e.ma=c.Ca()},ta:function(){var a,c=this[B].u;for(a in c)if(Object.prototype.hasOwnProperty.call(c,
a)){var e=c[a];if(this.ja&&e.U.ka||e.U.lc(e.ma))return!0}},Bc:function(){this.ja&&!this[B].Fa&&this.ja(!1)},ha:function(){var a=this[B];return a.V||0<a.J},Dc:function(){this.ka?this[B].V&&(this[B].ba=!0):this.Eb()},Tb:function(a){return a.subscribe(this.Eb,this)},Eb:function(){var a=this,c=a.throttleEvaluation;c&&0<=c?(clearTimeout(this[B].Fb),this[B].Fb=b.a.setTimeout(()=>a.R(!0),c)):a.ja?a.ja(!0):a.R(!0)},R:function(a){var c=this[B],e=c.qa,g=!1;if(!c.Fa&&!c.aa){if(c.i&&!b.a.Va(c.i)||e&&e()){if(!c.hb){this.m();
return}}else c.hb=!1;c.Fa=!0;try{g=this.hc(a)}finally{c.Fa=!1}return g}},hc:function(a){var c=this[B],e=c.cb?void 0:!c.J;var g={cc:this,za:c.u,Sa:c.J};b.j.wb({ac:g,$b:V,l:this,$a:e});c.u={};c.J=0;a:{try{var k=c.Ob();break a}finally{b.j.end(),g.Sa&&!c.v&&b.a.O(g.za,R),c.ba=c.V=!1}k=void 0}c.J?g=this.Ga(c.M,k):(this.m(),g=!0);g&&(c.v?this.Ka():this.notifySubscribers(c.M,"beforeChange"),c.M=k,this.notifySubscribers(c.M,"spectate"),!c.v&&a&&this.notifySubscribers(c.M),this.qb&&this.qb());e&&this.notifySubscribers(c.M,
"awake");return g},H:function(a){var c=this[B];(c.V&&(a||!c.J)||c.v&&this.ta())&&this.R();return c.M},Ha:function(a){b.S.fn.Ha.call(this,a);this.mb=function(){this[B].v||(this[B].ba?this.R():this[B].V=!1);return this[B].M};this.ja=function(c){this.ob(this[B].M);this[B].V=!0;c&&(this[B].ba=!0);this.pb(this,!c)}},m:function(){var a=this[B];!a.v&&a.u&&b.a.O(a.u,(c,e)=>e.m&&e.m());a.i&&a.Ua&&b.a.K.eb(a.i,a.Ua);a.u=void 0;a.J=0;a.aa=!0;a.ba=!1;a.V=!1;a.v=!1;a.i=void 0;a.qa=void 0;a.Ob=void 0}},fa={oa:function(a){var c=
this,e=c[B];if(!e.aa&&e.v&&"change"==a){e.v=!1;if(e.ba||c.ta())e.u=null,e.J=0,c.R()&&c.Ka();else{var g=[];b.a.O(e.u,(k,t)=>g[t.la]=k);g.forEach((k,t)=>{var d=e.u[k],f=c.Tb(d.U);f.la=t;f.ma=d.ma;e.u[k]=f});c.ta()&&c.R()&&c.Ka()}e.aa||c.notifySubscribers(e.M,"awake")}},wa:function(a){var c=this[B];c.aa||"change"!=a||this.sa("change")||(b.a.O(c.u,(e,g)=>{g.m&&(c.u[e]={U:g.U,la:g.la,ma:g.ma},g.m())}),c.v=!0,this.notifySubscribers(void 0,"asleep"))},Ca:function(){var a=this[B];a.v&&(a.ba||this.ta())&&
this.R();return b.S.fn.Ca.call(this)}},ha={oa:function(a){"change"!=a&&"beforeChange"!=a||this.H()}};Object.setPrototypeOf(T,b.S.fn);T[b.ca.C]=b.l;b.o("computed",b.l);b.o("computed.fn",T);b.$(T,"dispose",T.m);b.vc=a=>{if("function"===typeof a)return b.l(a,{pure:!0});a=b.a.extend({},a);a.pure=!0;return b.l(a)};(()=>{b.A={P:a=>{switch(a.nodeName){case "OPTION":return!0===a.__ko__hasDomDataOptionValue__?b.a.f.get(a,b.b.options.bb):a.value;case "SELECT":return 0<=a.selectedIndex?b.A.P(a.options[a.selectedIndex]):
void 0;default:return a.value}},Ma:(a,c,e)=>{switch(a.nodeName){case "OPTION":"string"===typeof c?(b.a.f.set(a,b.b.options.bb,void 0),delete a.__ko__hasDomDataOptionValue__,a.value=c):(b.a.f.set(a,b.b.options.bb,c),a.__ko__hasDomDataOptionValue__=!0,a.value="number"===typeof c?c:"");break;case "SELECT":for(var g=-1,k=""===c||null==c,t=0,d=a.options.length,f;t<d;++t)if(f=b.A.P(a.options[t]),f==c||""===f&&k){g=t;break}if(e||0<=g||k&&1<a.size)a.selectedIndex=g;break;default:a.value=null==c?"":c}}}})();
b.F=(()=>{function a(f){f=b.a.Sb(f);123===f.charCodeAt(0)&&(f=f.slice(1,-1));f+="\n,";var h=[],p=f.match(g),r=[],q=0;if(1<p.length){for(var l=0,n;n=p[l++];){var m=n.charCodeAt(0);if(44===m){if(0>=q){h.push(u&&r.length?{key:u,value:r.join("")}:{unknown:u||r.join("")});var u=q=0;r=[];continue}}else if(58===m){if(!q&&!u&&1===r.length){u=r.pop();continue}}else if(47===m&&1<n.length&&(47===n.charCodeAt(1)||42===n.charCodeAt(1)))continue;else 47===m&&l&&1<n.length?(m=p[l-1].match(k))&&!t[m[0]]&&(f=f.substr(f.indexOf(n)+
1),p=f.match(g),l=-1,n="/"):40===m||123===m||91===m?++q:41===m||125===m||93===m?--q:u||r.length||34!==m&&39!==m||(n=n.slice(1,-1));r.push(n)}if(0<q)throw Error("Unbalanced parentheses, braces, or brackets");}return h}var c=["true","false","null","undefined"],e=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,g=/"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|`(?:\\.|[^`])*`|\/\*(?:[^*]|\*+[^*/])*\*+\/|\/\/.*\n|\/(?:\\.|[^/])+\/w*|[^\s:,/][^,"'`{}()/:[\]]*[^\s,"'`{}()/:[\]]|[^\s]/g,k=/[\])"'A-Za-z0-9_$]+$/,
t={"in":1,"return":1,"typeof":1},d=new Set;return{Pa:[],ib:d,tc:a,uc:function(f,h){function p(m,u){if(!n){var w=b.b[m];if(w&&w.preprocess&&!(u=w.preprocess(u,m,p)))return;if(w=d.has(m)){var v=u;c.includes(v)?v=!1:(w=v.match(e),v=null===w?!1:w[1]?"Object("+w[1]+")"+w[2]:v);w=v}w&&q.push("'"+m+"':function(_z){"+v+"=_z}")}l&&(u="function(){return "+u+" }");r.push("'"+m+"':"+u)}h=h||{};var r=[],q=[],l=h.valueAccessors,n=h.bindingParams;("string"===typeof f?a(f):f).forEach(m=>p(m.key||m.unknown,m.value));
q.length&&p("_ko_property_writers","{"+q.join(",")+" }");return r.join(",")},rc:(f,h)=>-1<f.findIndex(p=>p.key==h),kb:(f,h,p,r,q)=>{if(f&&b.L(f))!b.qc(f)||q&&f.H()===r||f(r);else if((f=h.get("_ko_property_writers"))&&f[p])f[p](r)}}})();(()=>{function a(d){return 8==d.nodeType&&g.test(d.nodeValue)}function c(d){return 8==d.nodeType&&k.test(d.nodeValue)}function e(d,f){for(var h=d,p=1,r=[];h=h.nextSibling;){if(c(h)&&(b.a.f.set(h,t,!0),!--p))return r;r.push(h);a(h)&&++p}if(!f)throw Error("Cannot find closing comment tag to match: "+
d.nodeValue);return null}var g=/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=/^\s*\/ko\s*$/,t="__ko_matchedEndComment__";b.h={da:{},childNodes:d=>a(d)?e(d):d.childNodes,ra:d=>{a(d)?(d=e(d))&&[...d].forEach(f=>b.removeNode(f)):b.a.Wa(d)},ua:(d,f)=>{a(d)?(b.h.ra(d),d.after(...f)):b.a.ua(d,f)},prepend:(d,f)=>{a(d)?d.nextSibling.before(f):d.prepend(f)},Ib:(d,f,h)=>{h?h.after(f):b.h.prepend(d,f)},firstChild:d=>{if(a(d))return d=d.nextSibling,!d||c(d)?null:d;let f=d.firstChild;if(f&&c(f))throw Error("Found invalid end comment, as the first child of "+
d);return f},nextSibling:d=>{if(a(d)){var f=e(d,void 0);d=f?(f.length?f[f.length-1]:d).nextSibling:null}if((f=d.nextSibling)&&c(f)){if(c(f)&&!b.a.f.get(f,t))throw Error("Found end comment without a matching opening comment, as child of "+d);return null}return f},kc:a,Ac:d=>(d=d.nodeValue.match(g))?d[1]:null}})();(()=>{const a=new Map;b.xb=new class{sc(c){switch(c.nodeType){case 1:return null!=c.getAttribute("data-bind");case 8:return b.h.kc(c);default:return!1}}ic(c,e){a:{switch(c.nodeType){case 1:var g=
c.getAttribute("data-bind");break a;case 8:g=b.h.Ac(c);break a}g=null}if(g)try{let t={valueAccessors:!0},d=a.get(g);if(!d){var k="with($context){with($data||{}){return{"+b.F.uc(g,t)+"}}}";d=new Function("$context","$element",k);a.set(g,d)}return d(e,c)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+g+"\nMessage: "+t.message,t;}return null}}})();(()=>{function a(l){var n=(l=b.a.f.get(l,r))&&l.D;n&&(l.D=null,n.Nb())}function c(l,n){for(var m,u=b.h.firstChild(n);m=u;)u=b.h.nextSibling(m),
e(l,m);b.c.notify(n,b.c.B)}function e(l,n){var m=l;if(1===n.nodeType||b.xb.sc(n))m=k(n,null,l).bindingContextForDescendants;m&&n.matches&&!n.matches("SCRIPT,TEXTAREA,TEMPLATE")&&c(m,n)}function g(l){var n=[],m={},u=[];b.a.O(l,function x(v){if(!m[v]){var z=b.b[v];z&&(z.after&&(u.push(v),z.after.forEach(C=>{if(l[C]){if(u.includes(C))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+u.join(", "));x(C)}}),u.length--),n.push({key:v,Hb:z}));m[v]=!0}});return n}
function k(l,n,m){var u=b.a.f.Ya(l,r,{}),w=u.Zb;if(!n){if(w)throw Error("You cannot apply bindings multiple times to the same element.");u.Zb=!0}w||(u.context=m);u.ab||(u.ab={});if(n&&"function"!==typeof n)var v=n;else{var x=b.l(()=>{if(v=n?n(m,l):b.xb.ic(l,m)){if(m[d])m[d]();if(m[h])m[h]()}return v},{i:l});v&&x.ha()||(x=null)}var z=m,C;if(v){var M=x?y=>()=>x()[y]():y=>v[y],J={get:y=>v[y]&&M(y)(),has:y=>y in v};b.c.B in v&&b.c.subscribe(l,b.c.B,()=>{var y=v[b.c.B]();if(y){var H=b.h.childNodes(l);
H.length&&y(H,b.Cb(H[0]))}});b.c.Z in v&&(z=b.c.gb(l,m),b.c.subscribe(l,b.c.Z,()=>{var y=v[b.c.Z]();y&&b.h.firstChild(l)&&y(l)}));g(v).forEach(y=>{var H=y.Hb.init,K=y.Hb.update,F=y.key;if(8===l.nodeType&&!b.h.da[F])throw Error("The binding '"+F+"' cannot be used with virtual elements");try{"function"==typeof H&&b.j.G(()=>{var I=H(l,M(F),J,z.$data,z);if(I&&I.controlsDescendantBindings){if(void 0!==C)throw Error("Multiple bindings ("+C+" and "+F+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
C=F}}),"function"==typeof K&&b.l(()=>K(l,M(F),J,z.$data,z),{i:l})}catch(I){throw I.message='Unable to process binding "'+F+": "+v[F]+'"\nMessage: '+I.message,I;}})}u=void 0===C;return{shouldBindDescendants:u,bindingContextForDescendants:u&&z}}function t(l,n){return l&&l instanceof b.Y?l:new b.Y(l,void 0,void 0,n)}var d=Symbol("_subscribable"),f=Symbol("_ancestorBindingInfo"),h=Symbol("_dataDependency");b.b={};var p={};b.Y=class{constructor(l,n,m,u,w){function v(){var H=M?C():C,K=b.a.g(H);n?(b.a.extend(x,
n),f in n&&(x[f]=n[f])):(x.$parents=[],x.$root=K,x.ko=b);x[d]=y;z?K=x.$data:(x.$rawData=H,x.$data=K);m&&(x[m]=K);u&&u(x,n,K);if(n&&n[d]&&!b.j.l().Za(n[d]))n[d]();J&&(x[h]=J);return x.$data}var x=this,z=l===p,C=z?void 0:l,M="function"==typeof C&&!b.L(C),J=w&&w.dataDependency;if(w&&w.exportDependencies)v();else{var y=b.vc(v);y.H();y.ha()?y.equalityComparer=null:x[d]=void 0}}["createChildContext"](l,n,m,u){!u&&n&&"object"==typeof n&&(u=n,n=u.as,m=u.extend);if(n&&u&&u.noChildContext){var w="function"==
typeof l&&!b.L(l);return new b.Y(p,this,null,v=>{m&&m(v);v[n]=w?l():l},u)}return new b.Y(l,this,n,(v,x)=>{v.$parentContext=x;v.$parent=x.$data;v.$parents=(x.$parents||[]).slice(0);v.$parents.unshift(v.$parent);m&&m(v)},u)}["extend"](l,n){return new b.Y(p,this,null,m=>b.a.extend(m,"function"==typeof l?l(m):l),n)}};var r=b.a.f.W();class q{constructor(l,n,m){this.C=l;this.pa=n;this.xa=new Set;this.B=!1;n.D||b.a.K.na(l,a);m&&m.D&&(m.D.xa.add(l),this.X=m)}Nb(){this.X&&this.X.D&&this.X.D.ec(this.C)}ec(l){this.xa.delete(l);
!this.xa.size&&this.B&&this.Bb()}Bb(){this.B=!0;this.pa.D&&!this.xa.size&&(this.pa.D=null,b.a.K.eb(this.C,a),b.c.notify(this.C,b.c.Z),this.Nb())}}b.c={B:"childrenComplete",Z:"descendantsComplete",subscribe:(l,n,m,u,w)=>{var v=b.a.f.Ya(l,r,{});v.ga||(v.ga=new b.S);w&&w.notifyImmediately&&v.ab[n]&&b.j.G(m,u,[l]);return v.ga.subscribe(m,u,n)},notify:(l,n)=>{var m=b.a.f.get(l,r);if(m&&(m.ab[n]=!0,m.ga&&m.ga.notifySubscribers(l,n),n==b.c.B))if(m.D)m.D.Bb();else if(void 0===m.D&&m.ga&&m.ga.sa(b.c.Z))throw Error("descendantsComplete event not supported for bindings on this node");
},gb:(l,n)=>{var m=b.a.f.Ya(l,r,{});m.D||(m.D=new q(l,m,n[f]));return n[f]==m?n:n.extend(u=>{u[f]=m})}};b.yc=l=>(l=b.a.f.get(l,r))&&l.context;b.tb=(l,n,m)=>k(l,n,t(m));b.vb=(l,n)=>{1!==n.nodeType&&8!==n.nodeType||c(t(l),n)};b.ub=function(l,n,m){if(2>arguments.length){if(n=S.body,!n)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");
e(t(l,m),n)};b.Cb=l=>(l=l&&[1,8].includes(l.nodeType)&&b.yc(l))?l.$data:void 0;b.o("bindingHandlers",b.b);b.o("applyBindings",b.ub);b.o("applyBindingAccessorsToNode",b.tb);b.o("dataFor",b.Cb)})();(()=>{function a(d,f){return Object.prototype.hasOwnProperty.call(d,f)?d[f]:void 0}function c(d,f){var h=a(k,d);if(h)h.subscribe(f);else{h=k[d]=new b.S;h.subscribe(f);e(d,(r,q)=>{q=!(!q||!q.synchronous);t[d]={definition:r,pc:q};delete k[d];p||q?h.notifySubscribers(r):b.Ub.Qb(()=>h.notifySubscribers(r))});
var p=!0}}function e(d,f){g("getConfig",[d],h=>{h?g("loadComponent",[d,h],p=>f(p,h)):f(null,null)})}function g(d,f,h,p){p||(p=b.s.loaders.slice(0));var r=p.shift();if(r){var q=r[d];if(q){var l=!1;if(void 0!==q.apply(r,f.concat(function(n){l?h(null):null!==n?h(n):g(d,f,h,p)}))&&(l=!0,!r.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else g(d,f,h,p)}else h(null)}var k={},t={};b.s={get:(d,f)=>{var h=a(t,
d);h?h.pc?b.j.G(()=>f(h.definition)):b.Ub.Qb(()=>f(h.definition)):c(d,f)},bc:d=>delete t[d],nb:g};b.s.loaders=[];b.o("components",b.s)})();(()=>{function a(d,f,h,p){var r={},q=2;f=h.template;h=h.viewModel;f?b.s.nb("loadTemplate",[d,f],l=>{r.template=l;0===--q&&p(r)}):0===--q&&p(r);h?b.s.nb("loadViewModel",[d,h],l=>{r[t]=l;0===--q&&p(r)}):0===--q&&p(r)}function c(d,f,h){if("function"===typeof f)h(r=>new f(r));else if("function"===typeof f[t])h(f[t]);else if("instance"in f){var p=f.instance;h(()=>p)}else"viewModel"in
f?c(d,f.viewModel,h):d("Unknown viewModel value: "+f)}function e(d){if(d.matches("TEMPLATE")&&d.content instanceof DocumentFragment)return b.a.ya(d.content.childNodes);throw"Template Source Element not a <template>";}function g(d){return f=>{throw Error("Component '"+d+"': "+f);}}var k={};b.s.register=(d,f)=>{if(!f)throw Error("Invalid configuration for "+d);if(b.s.Kb(d))throw Error("Component "+d+" is already registered");k[d]=f};b.s.Kb=d=>Object.prototype.hasOwnProperty.call(k,d);b.s.unregister=
d=>{delete k[d];b.s.bc(d)};b.s.dc={getConfig:(d,f)=>{d=b.s.Kb(d)?k[d]:null;f(d)},loadComponent:(d,f,h)=>{var p=g(d);a(d,p,f,h)},loadTemplate:(d,f,h)=>{d=g(d);if(f instanceof Array)h(f);else if(f instanceof DocumentFragment)h([...f.childNodes]);else if(f.element)if(f=f.element,f instanceof HTMLElement)h(e(f));else if("string"===typeof f){var p=S.getElementById(f);p?h(e(p)):d("Cannot find element with ID "+f)}else d("Unknown element type: "+f);else d("Unknown template value: "+f)},loadViewModel:(d,
f,h)=>c(g(d),f,h)};var t="createViewModel";b.o("components.register",b.s.register);b.s.loaders.push(b.s.dc)})();(()=>{function a(g,k,t){k=k.template;if(!k)throw Error("Component '"+g+"' has no template");g=b.a.ya(k);b.h.ua(t,g)}function c(g,k,t){var d=g.createViewModel;return d?d.call(g,k,t):k}var e=0;b.b.component={init:(g,k,t,d,f)=>{var h,p,r,q=()=>{var n=h&&h.dispose;"function"===typeof n&&n.call(h);r&&r.m();p=h=r=null},l=[...b.h.childNodes(g)];b.h.ra(g);b.a.K.na(g,q);b.l(()=>{var n=b.a.g(k());
if("string"===typeof n)var m=n;else{m=b.a.g(n.name);var u=b.a.g(n.params)}if(!m)throw Error("No component name specified");var w=b.c.gb(g,f),v=p=++e;b.s.get(m,x=>{if(p===v){q();if(!x)throw Error("Unknown component '"+m+"'");a(m,x,g);var z=c(x,u,{element:g,templateNodes:l});x=w.createChildContext(z,{extend:C=>{C.$component=z;C.$componentTemplateNodes=l}});z&&z.koDescendantsComplete&&(r=b.c.subscribe(g,b.c.Z,z.koDescendantsComplete,z));h=z;b.vb(x,g)}})},{i:g});return{controlsDescendantBindings:!0}}};
b.h.da.component=!0})();b.b.attr={update:(a,c)=>{c=b.a.g(c())||{};b.a.O(c,function(e,g){g=b.a.g(g);var k=e.indexOf(":");k="lookupNamespaceURI"in a&&0<k&&a.lookupNamespaceURI(e.substr(0,k));var t=!1===g||null===g||void 0===g;t?k?a.removeAttributeNS(k,e):a.removeAttribute(e):g=g.toString();t||(k?a.setAttributeNS(k,e,g):a.setAttribute(e,g));"name"===e&&(a.name=t?"":g)})}};var X=(a,c,e)=>{c&&c.split(/\s+/).forEach(g=>a.classList.toggle(g,e))};b.b.css={update:(a,c)=>{c=b.a.g(c());null!==c&&"object"==typeof c?
b.a.O(c,(e,g)=>{g=b.a.g(g);X(a,e,!!g)}):(c=b.a.Sb(c),X(a,a.__ko__cssValue,!1),a.__ko__cssValue=c,X(a,c,!0))}};b.b.enable={update:(a,c)=>{(c=b.a.g(c()))&&a.disabled?a.removeAttribute("disabled"):c||a.disabled||(a.disabled=!0)}};b.b.disable={update:(a,c)=>b.b.enable.update(a,()=>!b.a.g(c()))};b.b.event={init:(a,c,e,g,k)=>{e=c()||{};b.a.O(e,t=>{"string"==typeof t&&b.a.I(a,t,function(d){var f=c()[t];if(f)try{g=k.$data;var h=f.apply(g,[g,...arguments])}finally{!0!==h&&d.preventDefault()}})})}};b.b.foreach=
{Lb:a=>()=>{var c=a(),e=b.L(c)?c.H():c;if(!e||"number"==typeof e.length)return{foreach:c};b.a.g(c);return{foreach:e.data,as:e.as,noChildContext:e.noChildContext,includeDestroyed:e.includeDestroyed,afterAdd:e.afterAdd,beforeRemove:e.beforeRemove,afterRender:e.afterRender,beforeMove:e.beforeMove,afterMove:e.afterMove}},init:(a,c)=>b.b.template.init(a,b.b.foreach.Lb(c)),update:(a,c,e,g,k)=>b.b.template.update(a,b.b.foreach.Lb(c),e,g,k)};b.F.Pa.foreach=!1;b.h.da.foreach=!0;b.b.hasfocus={init:(a,c,e)=>
{var g=t=>{a.__ko_hasfocusUpdating=!0;t=a.ownerDocument.activeElement===a;var d=c();b.F.kb(d,e,"hasfocus",t,!0);a.__ko_hasfocusLastValue=t;a.__ko_hasfocusUpdating=!1},k=g.bind(null,!0);g=g.bind(null,!1);b.a.I(a,"focus",k);b.a.I(a,"focusin",k);b.a.I(a,"blur",g);b.a.I(a,"focusout",g);a.__ko_hasfocusLastValue=!1},update:(a,c)=>{c=!!b.a.g(c());a.__ko_hasfocusUpdating||a.__ko_hasfocusLastValue===c||(c?a.focus():a.blur())}};b.F.ib.add("hasfocus");b.b.html={init:()=>({controlsDescendantBindings:!0}),update:(a,
c)=>{b.a.Wa(a);c=b.a.g(c());if(null!=c){const e=S.createElement("template");e.innerHTML="string"!=typeof c?c.toString():c;a.appendChild(e.content)}}};(function(){function a(c,e,g){b.b[c]={init:(k,t,d,f,h)=>{var p,r,q={};if(e){f=d.get("as");var l=d.get("noChildContext");var n=!(f&&l);q={as:f,noChildContext:l,exportDependencies:n}}var m=d.has(b.c.Z);b.l(()=>{var u=b.a.g(t()),w=!g!==!u,v=!r;if(n||w!==p){m&&(h=b.c.gb(k,h));if(w){if(!e||n)q.dataDependency=b.j.l();var x=e?h.createChildContext("function"==
typeof u?u:t,q):b.j.Ba()?h.extend(null,q):h}v&&b.j.Ba()&&(r=b.a.ya(b.h.childNodes(k),!0));w?(v||b.h.ua(k,b.a.ya(r)),b.vb(x,k)):(b.h.ra(k),b.c.notify(k,b.c.B));p=w}},{i:k});return{controlsDescendantBindings:!0}}};b.F.Pa[c]=!1;b.h.da[c]=!0}a("if");a("ifnot",!1,!0);a("with",!0)})();var Y={};b.b.options={init:a=>{if(!a.matches("SELECT"))throw Error("options binding applies only to SELECT elements");for(;0<a.length;)a.remove(0);return{controlsDescendantBindings:!0}},update:(a,c,e)=>{function g(){return Array.from(a.options).filter(m=>
m.selected)}function k(m,u,w){var v=typeof u;return"function"==v?u(m):"string"==v?m[u]:w}function t(m,u){l&&p?b.c.notify(a,b.c.B):r.length&&(m=r.includes(b.A.P(u[0])),u[0].selected=m,l&&!m&&b.j.G(b.a.Vb,null,[a,"change"]))}var d=a.multiple,f=0!=a.length&&d?a.scrollTop:null,h=b.a.g(c()),p=e.get("valueAllowUnset")&&e.has("value");c={};var r=[];p||(d?r=g().map(b.A.P):0<=a.selectedIndex&&r.push(b.A.P(a.options[a.selectedIndex])));if(h){"undefined"==typeof h.length&&(h=[h]);var q=h.filter(m=>m||null==
m);e.has("optionsCaption")&&(h=b.a.g(e.get("optionsCaption")),null!==h&&void 0!==h&&q.unshift(Y))}var l=!1;c.beforeRemove=m=>a.removeChild(m);h=t;e.has("optionsAfterRender")&&"function"==typeof e.get("optionsAfterRender")&&(h=(m,u)=>{t(m,u);b.j.G(e.get("optionsAfterRender"),null,[u[0],m!==Y?m:void 0])});b.a.Rb(a,q,function(m,u,w){w.length&&(r=!p&&w[0].selected?[b.A.P(w[0])]:[],l=!0);u=a.ownerDocument.createElement("option");m===Y?(b.a.fb(u,e.get("optionsCaption")),b.A.Ma(u,void 0)):(w=k(m,e.get("optionsValue"),
m),b.A.Ma(u,b.a.g(w)),m=k(m,e.get("optionsText"),w),b.a.fb(u,m));return[u]},c,h);if(!p){var n;d?n=r.length&&g().length<r.length:n=r.length&&0<=a.selectedIndex?b.A.P(a.options[a.selectedIndex])!==r[0]:r.length||0<=a.selectedIndex;n&&b.j.G(b.a.Vb,null,[a,"change"])}(p||b.j.$a())&&b.c.notify(a,b.c.B);f&&20<Math.abs(f-a.scrollTop)&&(a.scrollTop=f)}};b.b.options.bb=b.a.f.W();b.b.style={update:(a,c)=>{c=b.a.g(c()||{});b.a.O(c,(e,g)=>{g=b.a.g(g);if(null===g||void 0===g||!1===g)g="";if(/^--/.test(e))a.style.setProperty(e,
g);else{e=e.replace(/-(\w)/g,(t,d)=>d.toUpperCase());var k=a.style[e];a.style[e]=g;g===k||a.style[e]!=k||isNaN(g)||(a.style[e]=g+"px")}})}};b.b.submit={init:(a,c,e,g,k)=>{if("function"!=typeof c())throw Error("The value for a submit binding must be a function");b.a.I(a,"submit",t=>{var d=c();try{var f=d.call(k.$data,a)}finally{!0!==f&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}})}};b.b.text={init:()=>({controlsDescendantBindings:!0}),update:(a,c)=>{8===a.nodeType&&(a.text||a.after(a.text=
S.createTextNode("")),a=a.text);b.a.fb(a,c())}};b.h.da.text=!0;b.b.textInput={init:(a,c,e)=>{var g=a.value,k,t,d=()=>{clearTimeout(k);t=k=void 0;var h=a.value;g!==h&&(g=h,b.F.kb(c(),e,"textInput",h))},f=()=>{var h=b.a.g(c());if(null===h||void 0===h)h="";void 0!==t&&h===t?b.a.setTimeout(f,4):a.value!==h&&(a.value=h,g=a.value)};b.a.I(a,"input",d);b.a.I(a,"change",d);b.a.I(a,"blur",d);b.l(f,{i:a})}};b.F.ib.add("textInput");b.b.textinput={preprocess:(a,c,e)=>e("textInput",a)};b.b.value={init:(a,c,e)=>
{var g=a.matches("SELECT"),k=a.matches("INPUT");if(!k||"checkbox"!=a.type&&"radio"!=a.type){var t=new Set,d=e.get("valueUpdate"),f=null;d&&("string"==typeof d?t.add(d):d.forEach(q=>t.add(q)),t.delete("change"));var h=()=>{f=null;var q=c(),l=b.A.P(a);b.F.kb(q,e,"value",l)};t.forEach(q=>{var l=h;b.a.zc(q,"after")&&(l=()=>{f=b.A.P(a);b.a.setTimeout(h,0)},q=q.substring(5));b.a.I(a,q,l)});var p=k&&"file"==a.type?()=>{var q=b.a.g(c());null===q||void 0===q||""===q?a.value="":b.j.G(h)}:()=>{var q=b.a.g(c()),
l=b.A.P(a);if(null!==f&&q===f)b.a.setTimeout(p,0);else if(q!==l||void 0===l)g?(l=e.get("valueAllowUnset"),b.A.Ma(a,q,l),l||q===b.A.P(a)||b.j.G(h)):b.A.Ma(a,q)};if(g){var r;b.c.subscribe(a,b.c.B,()=>{r?e.get("valueAllowUnset")?p():h():(b.a.I(a,"change",h),r=b.l(p,{i:a}))},null,{notifyImmediately:!0})}else b.a.I(a,"change",h),b.l(p,{i:a})}else b.tb(a,{checkedValue:c})},update:()=>{}};b.F.ib.add("value");b.b.visible={update:(a,c)=>{c=b.a.g(c());var e="none"!=a.style.display;c&&!e?a.style.display="":
e&&!c&&(a.style.display="none")}};b.b.hidden={update:(a,c)=>a.hidden=!!b.a.g(c())};(function(a){b.b[a]={init:function(c,e,g,k,t){return b.b.event.init.call(this,c,()=>({[a]:e()}),g,k,t)}}})("click");(()=>{let a=b.a.f.W();class c{constructor(g){this.Ta=g}Ia(...g){let k=this.Ta;if(!g.length)return b.a.f.get(k,a)||(11===this.C?k.content:1===this.C?k:void 0);b.a.f.set(k,a,g[0])}}class e extends c{constructor(g){super(g);g&&(this.C=g.matches("TEMPLATE")&&g.content?g.content.nodeType:1)}}b.Ja={Ta:e,Oa:c}})();
(()=>{function a(d,f){if(d.length){var h=d[0],p=h.parentNode;g(h,d[d.length-1],r=>{1!==r.nodeType&&8!==r.nodeType||b.ub(f,r)});b.a.Aa(d,p)}}function c(d,f,h,p,r){r=r||{};var q=(d&&(d.nodeType?d:0<d.length?d[0]:null)||h||{}).ownerDocument;if("string"==typeof h){q=q||S;q=q.getElementById(h);if(!q)throw Error("Cannot find template with ID "+h);h=new b.Ja.Ta(q)}else if([1,8].includes(h.nodeType))h=new b.Ja.Oa(h);else throw Error("Unknown template type: "+h);h=(h=h.Ia?h.Ia():null)?[...h.cloneNode(!0).childNodes]:
null;if("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)throw Error("Template engine must return an array of DOM nodes");q=!1;switch(f){case "replaceChildren":b.h.ua(d,h);q=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+f);}q&&(a(h,p),r.afterRender&&b.j.G(r.afterRender,null,[h,p[r.as||"$data"]]),"replaceChildren"==f&&b.c.notify(d,b.c.B));return h}function e(d,f,h){return b.L(d)?d():"function"===typeof d?d(f,h):d}var g=(d,f,h)=>{var p;for(f=
b.h.nextSibling(f);d&&(p=d)!==f;)d=b.h.nextSibling(p),h(p,d)};b.wc=function(d,f,h,p){h=h||{};var r=r||"replaceChildren";if(p){var q=p.nodeType?p:0<p.length?p[0]:null;return b.l(()=>{var l=f&&f instanceof b.Y?f:new b.Y(f,null,null,null,{exportDependencies:!0}),n=e(d,l.$data,l);c(p,r,n,l,h)},{qa:()=>!q||!b.a.Va(q),i:q})}console.log("no targetNodeOrNodeArray")};b.xc=(d,f,h,p,r)=>{function q(x,z){b.j.G(b.a.Rb,null,[p,x,m,h,u,z]);b.c.notify(p,b.c.B)}var l,n=h.as,m=(x,z)=>{l=r.createChildContext(x,{as:n,
noChildContext:h.noChildContext,extend:C=>{C.$index=z;n&&(C[n+"Index"]=z)}});x=e(d,x,l);return c(p,"ignoreTargetNode",x,l,h)},u=(x,z)=>{a(z,l);h.afterRender&&h.afterRender(z,x);l=null},w=!1===h.includeDestroyed;if(w||h.beforeRemove||!b.Jb(f))return b.l(()=>{var x=b.a.g(f)||[];"undefined"==typeof x.length&&(x=[x]);w&&(x=x.filter(z=>z||null==z));q(x)},{i:p});q(f.H());var v=f.subscribe(x=>{q(f(),x)},null,"arrayChange");v.i(p);return v};var k=b.a.f.W(),t=b.a.f.W();b.b.template={init:(d,f)=>{f=b.a.g(f());
if("string"==typeof f||"name"in f)b.h.ra(d);else if("nodes"in f){f=f.nodes||[];if(b.L(f))throw Error('The "nodes" option must be a plain, non-observable array.');let h=f[0]&&f[0].parentNode;h&&b.a.f.get(h,t)||(h=b.a.Mb(f),b.a.f.set(h,t,!0));(new b.Ja.Oa(d)).Ia(h)}else if(f=b.h.childNodes(d),0<f.length)f=b.a.Mb(f),(new b.Ja.Oa(d)).Ia(f);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:(d,f,h,p,r)=>{var q=f();f=b.a.g(q);
h=!0;p=null;"string"==typeof f?f={}:(q="name"in f?f.name:d,"if"in f&&(h=b.a.g(f["if"])),h&&"ifnot"in f&&(h=!b.a.g(f.ifnot)),h&&!q&&(h=!1));"foreach"in f?p=b.xc(q,h&&f.foreach||[],f,d,r):h?(h=r,"data"in f&&(h=r.createChildContext(f.data,{as:f.as,noChildContext:f.noChildContext,exportDependencies:!0})),p=b.wc(q,h,f,d)):b.h.ra(d);r=p;(f=b.a.f.get(d,k))&&"function"==typeof f.m&&f.m();b.a.f.set(d,k,!r||r.ha&&!r.ha()?void 0:r)}};b.F.Pa.template=d=>{d=b.F.tc(d);return 1==d.length&&d[0].unknown||b.F.rc(d,
"name")?null:"This template engine does not support anonymous templates nested within its templates"};b.h.da.template=!0})();b.a.Gb=(a,c,e)=>{if(a.length&&c.length){var g,k,t,d,f;for(g=k=0;(!e||g<e)&&(d=a[k]);++k){for(t=0;f=c[t];++t)if(d.value===f.value){d.moved=f.index;f.moved=d.index;c.splice(t,1);g=t=0;break}g+=t}}};b.a.Ab=(()=>{function a(c,e,g,k,t){var d=Math.min,f=Math.max,h=[],p,r=c.length,q,l=e.length,n=l-r||1,m=r+l+1,u;for(p=0;p<=r;p++){var w=u;h.push(u=[]);var v=d(l,p+n);for(q=f(0,p-1);q<=
v;q++)u[q]=q?p?c[p-1]===e[q-1]?w[q-1]:d(w[q]||m,u[q-1]||m)+1:q+1:p+1}d=[];f=[];n=[];p=r;for(q=l;p||q;)l=h[p][q]-1,q&&l===h[p][q-1]?f.push(d[d.length]={status:g,value:e[--q],index:q}):p&&l===h[p-1][q]?n.push(d[d.length]={status:k,value:c[--p],index:p}):(--q,--p,t.sparse||d.push({status:"retained",value:e[q]}));b.a.Gb(n,f,!t.dontLimitMoves&&10*r);return d.reverse()}return function(c,e,g){g="boolean"===typeof g?{dontLimitMoves:g}:g||{};c=c||[];e=e||[];return c.length<e.length?a(c,e,"added","deleted",
g):a(e,c,"deleted","added",g)}})();(()=>{function a(g,k,t,d,f){var h=[],p=b.l(()=>{var r=k(t,f,b.a.Aa(h,g))||[];if(0<h.length){var q=h.nodeType?[h]:h;if(0<q.length){var l=q[0],n=l.parentNode,m;var u=0;for(m=r.length;u<m;u++)n.insertBefore(r[u],l);u=0;for(m=q.length;u<m;u++)b.removeNode(q[u])}d&&b.j.G(d,null,[t,r,f])}h.length=0;h.push(...r)},{i:g,qa:()=>!!h.find(b.a.Va)});return{N:h,Ra:p.ha()?p:void 0}}var c=b.a.f.W(),e=b.a.f.W();b.a.Rb=(g,k,t,d,f,h)=>{function p(F){y={ea:F,Da:b.ca(w++)};m.push(y);
n||M.push(y)}function r(F){y=l[F];w!==y.Da.H()&&C.push(y);y.Da(w++);b.a.Aa(y.N,g);m.push(y)}function q(F,I){if(F)for(var O=0,U=I.length;O<U;O++)I[O].N.forEach(ia=>F(ia,O,I[O].ea))}k=k||[];"undefined"==typeof k.length&&(k=[k]);d=d||{};var l=b.a.f.get(g,c),n=!l,m=[],u=0,w=0,v=[],x=[],z=[],C=[],M=[],J=0;if(n)k.forEach(p);else{if(!h||l&&l._countWaitingForRemove)h=Array.prototype.map.call(l,F=>F.ea),h=b.a.Ab(h,k,{dontLimitMoves:d.dontLimitMoves,sparse:!0});for(let F=0,I,O,U;I=h[F];F++)switch(O=I.moved,
U=I.index,I.status){case "deleted":for(;u<U;)r(u++);if(void 0===O){var y=l[u];y.Ra&&(y.Ra.m(),y.Ra=void 0);b.a.Aa(y.N,g).length&&(d.beforeRemove&&(m.push(y),J++,y.ea===e?y=null:z.push(y)),y&&v.push.apply(v,y.N))}u++;break;case "added":for(;w<U;)r(u++);void 0!==O?(x.push(m.length),r(O)):p(I.value)}for(;w<k.length;)r(u++);m._countWaitingForRemove=J}b.a.f.set(g,c,m);q(d.beforeMove,C);v.forEach(d.beforeRemove?b.fa:b.removeNode);var H,K;J=g.ownerDocument.activeElement;if(x.length)for(;void 0!=(k=x.shift());){y=
m[k];for(H=void 0;k;)if((K=m[--k].N)&&K.length){H=K[K.length-1];break}for(u=0;v=y.N[u];H=v,u++)b.h.Ib(g,v,H)}for(k=0;y=m[k];k++){y.N||b.a.extend(y,a(g,t,y.ea,f,y.Da));for(u=0;v=y.N[u];H=v,u++)b.h.Ib(g,v,H);!y.nc&&f&&(f(y.ea,y.N,y.Da),y.nc=!0,H=y.N[y.N.length-1])}J&&g.ownerDocument.activeElement!=J&&J.focus();q(d.beforeRemove,z);for(k=0;k<z.length;++k)z[k].ea=e;q(d.afterMove,C);q(d.afterAdd,M)}})();A.ko=W})(this);
