diff --git a/vendors/knockout/build/output/knockout-latest.debug.js b/vendors/knockout/build/output/knockout-latest.debug.js index d08a196d5..c06acdeb0 100644 --- a/vendors/knockout/build/output/knockout-latest.debug.js +++ b/vendors/knockout/build/output/knockout-latest.debug.js @@ -215,24 +215,25 @@ ko.utils.domData = new (function () { }; })(); -ko.utils.domNodeDisposal = new (function () { +ko.utils.domNodeDisposal = (() => { var domDataKey = ko.utils.domData.nextKey(); var cleanableNodeTypes = { 1: true, 8: true, 9: true }; // Element, Comment, Document var cleanableNodeTypesWithDescendants = { 1: true, 9: true }; // Element, Document - function getDisposeCallbacksCollection(node, createIfNotFound) { + const getDisposeCallbacksCollection = (node, createIfNotFound) => { var allDisposeCallbacks = ko.utils.domData.get(node, domDataKey); if ((allDisposeCallbacks === undefined) && createIfNotFound) { allDisposeCallbacks = []; ko.utils.domData.set(node, domDataKey, allDisposeCallbacks); } return allDisposeCallbacks; - } - function destroyCallbacksCollection(node) { - ko.utils.domData.set(node, domDataKey, undefined); - } + }, - function cleanSingleNode(node) { + destroyCallbacksCollection = node => { + ko.utils.domData.set(node, domDataKey, undefined); + }, + + cleanSingleNode = node => { // Run all the dispose callbacks var callbacks = getDisposeCallbacksCollection(node, false); if (callbacks) { @@ -246,12 +247,11 @@ ko.utils.domNodeDisposal = new (function () { // Clear any immediate-child comment nodes, as these wouldn't have been found by // node.getElementsByTagName("*") in cleanNode() (comment nodes aren't elements) - if (cleanableNodeTypesWithDescendants[node.nodeType]) { - cleanNodesInList(node.childNodes, true/*onlyComments*/); - } - } + cleanableNodeTypesWithDescendants[node.nodeType] + && cleanNodesInList(node.childNodes, true/*onlyComments*/); + }, - function cleanNodesInList(nodeList, onlyComments) { + cleanNodesInList = (nodeList, onlyComments) => { var cleanedNodes = [], lastCleanedNode; for (var i = 0; i < nodeList.length; i++) { if (!onlyComments || nodeList[i].nodeType === 8) { @@ -261,7 +261,7 @@ ko.utils.domNodeDisposal = new (function () { } } } - } + }; return { addDisposeCallback : (node, callback) => { @@ -274,8 +274,7 @@ ko.utils.domNodeDisposal = new (function () { var callbacksCollection = getDisposeCallbacksCollection(node, false); if (callbacksCollection) { ko.utils.arrayRemoveItem(callbacksCollection, callback); - if (callbacksCollection.length == 0) - destroyCallbacksCollection(node); + callbacksCollection.length || destroyCallbacksCollection(node); } }, @@ -286,9 +285,8 @@ ko.utils.domNodeDisposal = new (function () { cleanSingleNode(node); // ... then its descendants, where applicable - if (cleanableNodeTypesWithDescendants[node.nodeType]) { - cleanNodesInList(node.getElementsByTagName("*")); - } + cleanableNodeTypesWithDescendants[node.nodeType] + && cleanNodesInList(node.getElementsByTagName("*")); } }); @@ -297,8 +295,7 @@ ko.utils.domNodeDisposal = new (function () { removeNode : node => { ko.cleanNode(node); - if (node.parentNode) - node.parentNode.removeChild(node); + node.parentNode && node.parentNode.removeChild(node); } }; })(); @@ -454,6 +451,7 @@ class koSubscription } disposeWhenNodeIsRemoved(node) { + // MutationObserver ? this._node = node; ko.utils.domNodeDisposal.addDisposeCallback(node, this._domNodeDisposalCallback = this.dispose.bind(this)); } @@ -990,7 +988,7 @@ ko.extenders['trackArrayChanges'] = (target, options) => { }; var computedState = Symbol('_state'); -ko.computed = function (evaluatorFunctionOrOptions, options) { +ko.computed = (evaluatorFunctionOrOptions, options) => { if (typeof evaluatorFunctionOrOptions === "object") { // Single-parameter syntax - everything is on this "options" param options = evaluatorFunctionOrOptions; @@ -1061,11 +1059,6 @@ ko.computed = function (evaluatorFunctionOrOptions, options) { ko.utils.extend(computedObservable, deferEvaluationOverrides); } - if (DEBUG) { - // #1731 - Aid debugging by exposing the computed's options - computedObservable["_options"] = options; - } - if (state.disposeWhenNodeIsRemoved) { // Since this computed is associated with a DOM node, and we don't want to dispose the computed // until the DOM node is *removed* from the document (as opposed to never having been in the document), @@ -1089,7 +1082,7 @@ ko.computed = function (evaluatorFunctionOrOptions, options) { // Attach a DOM node disposal callback so that the computed will be proactively disposed as soon as the node is // removed using ko.removeNode. But skip if isActive is false (there will never be any dependencies to dispose). if (state.disposeWhenNodeIsRemoved && computedObservable.isActive()) { - ko.utils.domNodeDisposal.addDisposeCallback(state.disposeWhenNodeIsRemoved, state.domNodeDisposalCallback = function () { + ko.utils.domNodeDisposal.addDisposeCallback(state.disposeWhenNodeIsRemoved, state.domNodeDisposalCallback = () => { computedObservable.dispose(); }); } @@ -1126,6 +1119,26 @@ function computedBeginDependencyDetectionCallback(subscribable, id) { } } +function evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyDetectionContext) { + // This function is really part of the evaluateImmediate_CallReadWithDependencyDetection logic. + // You'd never call it from anywhere else. Factoring it out means that evaluateImmediate_CallReadWithDependencyDetection + // can be independent of try/finally blocks, which contributes to saving about 40% off the CPU + // overhead of computed evaluation (on V8 at least). + + try { + return state.readFunction(); + } finally { + ko.dependencyDetection.end(); + + // For each subscription no longer being used, remove it from the active subscriptions list and dispose it + if (dependencyDetectionContext.disposalCount && !state.isSleeping) { + ko.utils.objectForEach(dependencyDetectionContext.disposalCandidates, computedDisposeDependencyCallback); + } + + state.isStale = state.isDirty = false; + } +} + var computedFn = { "equalityComparer": valuesArePrimitiveAndEqual, getDependenciesCount: function () { @@ -1274,7 +1287,7 @@ var computedFn = { state.dependencyTracking = {}; state.dependenciesCount = 0; - var newValue = this.evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyDetectionContext); + var newValue = evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyDetectionContext); if (!state.dependenciesCount) { computedObservable.dispose(); @@ -1291,7 +1304,6 @@ var computedFn = { } state.latestValue = newValue; - if (DEBUG) computedObservable._latestValue = newValue; computedObservable["notifySubscribers"](state.latestValue, "spectate"); @@ -1309,25 +1321,6 @@ var computedFn = { return changed; }, - evaluateImmediate_CallReadThenEndDependencyDetection: (state, dependencyDetectionContext) => { - // This function is really part of the evaluateImmediate_CallReadWithDependencyDetection logic. - // You'd never call it from anywhere else. Factoring it out means that evaluateImmediate_CallReadWithDependencyDetection - // can be independent of try/finally blocks, which contributes to saving about 40% off the CPU - // overhead of computed evaluation (on V8 at least). - - try { - return state.readFunction(); - } finally { - ko.dependencyDetection.end(); - - // For each subscription no longer being used, remove it from the active subscriptions list and dispose it - if (dependencyDetectionContext.disposalCount && !state.isSleeping) { - ko.utils.objectForEach(dependencyDetectionContext.disposalCandidates, computedDisposeDependencyCallback); - } - - state.isStale = state.isDirty = false; - } - }, peek: function (evaluate) { // By default, peek won't re-evaluate, except while the computed is sleeping or to get the initial value when "deferEvaluation" is set. // Pass in true to evaluate if needed. @@ -3386,7 +3379,6 @@ ko.bindingHandlers['textInput'] = { var elementValue = element.value; if (previousElementValue !== elementValue) { // Provide a way for tests to know exactly which event was processed - if (DEBUG && event) element['_ko_textInputProcessedEvent'] = event.type; previousElementValue = elementValue; ko.expressionRewriting.writeValueToProperty(valueAccessor(), allBindings, 'textInput', elementValue); } @@ -3399,8 +3391,7 @@ ko.bindingHandlers['textInput'] = { // updates that are from the previous state of the element, usually due to techniques // such as rateLimit. Such updates, if not ignored, can cause keystrokes to be lost. elementValueBeforeEvent = element.value; - var handler = DEBUG ? updateModel.bind(element, {type: event.type}) : updateModel; - timeoutHandle = ko.utils.setTimeout(handler, 4); + timeoutHandle = ko.utils.setTimeout(updateModel, 4); } }; @@ -3427,18 +3418,7 @@ ko.bindingHandlers['textInput'] = { var onEvent = (event, handler) => ko.utils.registerEventHandler(element, event, handler); - if (DEBUG && ko.bindingHandlers['textInput']['_forceUpdateOn']) { - // Provide a way for tests to specify exactly which events are bound - ko.bindingHandlers['textInput']['_forceUpdateOn'].forEach(eventName => { - if (eventName.slice(0,5) == 'after') { - onEvent(eventName.slice(5), deferUpdateModel); - } else { - onEvent(eventName, updateModel); - } - }); - } else { - onEvent('input', updateModel); - } + onEvent('input', updateModel); // Bind to the change event so that we can catch programmatic updates of the value that fire this event. onEvent('change', updateModel); diff --git a/vendors/knockout/build/output/knockout-latest.js b/vendors/knockout/build/output/knockout-latest.js index feb14080b..7f9f8641b 100644 --- a/vendors/knockout/build/output/knockout-latest.js +++ b/vendors/knockout/build/output/knockout-latest.js @@ -4,80 +4,80 @@ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ -(C=>{function F(a,c){return null===a||da[typeof a]?a===c:!1}function E(a,c){var e;return()=>{e||(e=b.a.setTimeout(()=>{e=0;a()},c))}}function J(a,c){var e;return()=>{clearTimeout(e);e=b.a.setTimeout(a,c)}}function S(a,c){null!==c&&c.o&&c.o()}function V(a,c){var e=this.hc,h=e[D];h.$||(this.Ua&&this.ya[c]?(e.wb(c,a,this.ya[c]),this.ya[c]=null,--this.Ua):h.u[c]||e.wb(c,a,h.v?{V:a}:e.Yb(a)),a.ja&&a.bc())}var T=C.document,W={},b="undefined"!==typeof W?W:{};b.m=(a,c)=>{a=a.split(".");for(var e=b,h=0;h< -a.length-1;h++)e=e[a[h]];e[a[a.length-1]]=c};b.Z=(a,c,e)=>{a[c]=e};b.version="3.5.1-sm";b.m("version",b.version);b.a={va:(a,c)=>{c=a.indexOf(c);0{c&&Object.entries(c).forEach(e=>a[e[0]]=e[1]);return a},N:(a,c)=>a&&Object.entries(a).forEach(e=>c(e[0],e[1])),eb:(a,c,e)=>{if(!a)return a;var h={};Object.entries(a).forEach(k=>h[k[0]]=c.call(e,k[1],k[0],a));return h},Ya:a=>{for(;a.firstChild;)b.removeNode(a.firstChild)},Rb:a=>{var c=[...a],e=(c[0]&&c[0].ownerDocument|| -T).createElement("div");a.forEach(h=>e.append(b.ea(h)));return e},xa:(a,c)=>Array.prototype.map.call(a,c?e=>b.ea(e.cloneNode(!0)):e=>e.cloneNode(!0)),sa:(a,c)=>{b.a.Ya(a);c&&a.append(...c)},za:(a,c)=>{if(a.length){for(c=8===c.nodeType&&c.parentNode||c;a.length&&a[0].parentNode!==c;)a.splice(0,1);for(;1null==a?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, -""),Ec:(a,c)=>{a=a||"";return c.length>a.length?!1:a.substring(0,c.length)===c},kc:(a,c)=>c.contains(1!==a.nodeType?a.parentNode:a),Xa:a=>b.a.kc(a,a.ownerDocument.documentElement),Eb: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.Eb(a),c),Ib:a=>setTimeout(()=>{b.onError&&b.onError(a);throw a;},0),H:(a,c,e)=>{a.addEventListener(c,b.a.Eb(e),!1)},Zb:(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.K(a)?a():a,ib:(a,c)=>a.textContent=b.a.g(c)||""};b.m("utils",b.a);b.m("unwrap",b.a.g);b.a.f=new function(){let a=0,c="__ko__"+Date.now(),e=new WeakMap;return{get:(h,k)=>(e.get(h)||{})[k],set:(h,k,t)=>{if(e.has(h))e.get(h)[k]=t;else{let d={};d[k]=t;e.set(h,d)}return t},$a:function(h,k,t){return this.get(h,k)||this.set(h,k,t)},clear:h=>e.delete(h),X:()=>a++ +c}};b.a.J=new function(){function a(d,f){var g=b.a.f.get(d,h);void 0===g&&f&&(g=[],b.a.f.set(d,h,g));return g} -function c(d){var f=a(d,!1);if(f){f=f.slice(0);for(var g=0;g{if("function"!=typeof f)throw Error("Callback must be a function");a(d,!0).push(f)},hb:(d,f)=>{var g=a(d,!1);g&&(b.a.va(g,f),0==g.length&&b.a.f.set(d,h,void 0))},ea:d=> -{b.i.D(()=>{k[d.nodeType]&&(c(d),t[d.nodeType]&&e(d.getElementsByTagName("*")))});return d},removeNode:d=>{b.ea(d);d.parentNode&&d.parentNode.removeChild(d)}}};b.ea=b.a.J.ea;b.removeNode=b.a.J.removeNode;b.m("utils.domNodeDisposal",b.a.J);b.m("utils.domNodeDisposal.addDisposeCallback",b.a.J.ma);b.lb=(()=>{function a(){if(e)for(var d=e,f=0,g;kd){if(5E3<=++f){k=e;b.a.Ib(Error("'Too much recursion' after processing "+f+" task groups."));break}d=e}try{g()}catch(n){b.a.Ib(n)}}k=e= -c.length=0}var c=[],e=0,h=1,k=0,t=(d=>{var f=T.createElement("div");(new MutationObserver(d)).observe(f,{attributes:!0});return()=>f.classList.toggle("foo")})(a);return{Vb:d=>{e||t(a);c[e++]=d;return h++},cancel:d=>{d-=h-e;d>=k&&da.Ga(e=>J(e,c)),rateLimit:(a,c)=>{if("number"==typeof c)var e=c;else{e=c.timeout;var h=c.method}var k="function"==typeof h?h:E;a.Ga(t=>k(t,e,c))},notify:(a,c)=>{a.equalityComparer="always"==c?null:F}};var da={undefined:1, -"boolean":1,number:1,string:1};b.m("extenders",b.Za);class ea{constructor(a,c,e){this.V=a;this.pb=c;this.Cb=e;this.Ma=!1;this.P=this.Qa=null;b.Z(this,"dispose",this.o);b.Z(this,"disposeWhenNodeIsRemoved",this.j)}o(){this.Ma||(this.P&&b.a.J.hb(this.Qa,this.P),this.Ma=!0,this.Cb(),this.V=this.pb=this.Cb=this.Qa=this.P=null)}j(a){this.Qa=a;b.a.J.ma(a,this.P=this.o.bind(this))}}b.T=function(){Object.setPrototypeOf(this,P);P.Da(this)};var P={Da:a=>{a.U={change:[]};a.vb=1},subscribe:function(a,c,e){var h= -this;e=e||"change";var k=new ea(h,c?a.bind(c):a,()=>{b.a.va(h.U[e],k);h.ua&&h.ua(e)});h.na&&h.na(e);h.U[e]||(h.U[e]=[]);h.U[e].push(k);return k},notifySubscribers:function(a,c){c=c||"change";"change"===c&&this.Ja();if(this.qa(c)){c="change"===c&&this.$b||this.U[c].slice(0);try{b.i.zb();for(var e=0,h;h=c[e++];)h.Ma||h.pb(a)}finally{b.i.end()}}},Ba:function(){return this.vb},qc:function(a){return this.Ba()!==a},Ja:function(){++this.vb},Ga:function(a){var c=this,e=b.K(c),h,k,t,d,f;c.ta||(c.ta=c.notifySubscribers, -c.notifySubscribers=function(n,p){p&&"change"!==p?"beforeChange"===p?this.sb(n):this.ta(n,p):this.tb(n)});var g=a(()=>{c.ja=!1;e&&d===c&&(d=c.qb?c.qb():c());var n=k||f&&c.Fa(t,d);f=k=h=!1;n&&c.ta(t=d)});c.tb=(n,p)=>{p&&c.ja||(f=!p);c.$b=c.U.change.slice(0);c.ja=h=!0;d=n;g()};c.sb=n=>{h||(t=n,c.ta(n,"beforeChange"))};c.ub=()=>{f=!0};c.bc=()=>{c.Fa(t,c.G(!0))&&(k=!0)}},qa:function(a){return this.U[a]&&this.U[a].length},Fa:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},toString:()=> -"[object Object]",extend:function(a){var c=this;a&&b.a.N(a,(e,h)=>{e=b.Za[e];"function"==typeof e&&(c=e(c,h)||c)});return c}};b.Z(P,"init",P.Da);b.Z(P,"subscribe",P.subscribe);b.Z(P,"extend",P.extend);Object.setPrototypeOf(P,Function.prototype);b.T.fn=P;b.tc=a=>null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers;b.i=(()=>{var a=[],c,e=0;return{zb:h=>{a.push(c);c=h},end:()=>c=a.pop(),Ub:h=>{if(c){if(!b.tc(h))throw Error("Only subscribable things can act as dependencies"); -c.dc.call(c.ec,h,h.ac||(h.ac=++e))}},D:(h,k,t)=>{try{return a.push(c),c=void 0,h.apply(k,t||[])}finally{c=a.pop()}},Aa:()=>c&&c.l.Aa(),bb:()=>c&&c.bb,l:()=>c&&c.l}})();const O=Symbol("_latestValue");b.ba=a=>{function c(){if(0null==c[O]?void 0:c[O].length});b.T.fn.Da(c);Object.setPrototypeOf(c,Q);return c};var Q={toJSON:function(){let a=this[O]; -return a&&a.toJSON?a.toJSON():a},equalityComparer:F,G:function(){return this[O]},Ka:function(){this.notifySubscribers(this[O],"spectate");this.notifySubscribers(this[O])},nb:function(){this.notifySubscribers(this[O],"beforeChange")}};Object.setPrototypeOf(Q,b.T.fn);var R=b.ba.P="__ko_proto__";Q[R]=b.ba;b.K=a=>{if((a="function"==typeof a&&a[R])&&a!==Q[R]&&a!==b.l.fn[R])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!a};b.vc=a=>"function"== -typeof a&&(a[R]===Q[R]||a[R]===b.l.fn[R]&&a.rc);b.m("observable",b.ba);b.m("isObservable",b.K);b.m("observable.fn",Q);b.Z(Q,"valueHasMutated",Q.Ka);b.ha=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.ba(a);Object.setPrototypeOf(a,b.ha.fn);return a.extend({trackArrayChanges:!0})};b.ha.fn={remove:function(a){for(var c=this.G(),e=[],h="function"!=typeof a||b.K(a)?function(d){return d=== -a}:a,k=c.length;k--;){var t=c[k];if(h(t)){0===e.length&&this.nb();if(c[k]!==t)throw Error("Array modified during remove; cannot remove item");e.push(t);c.splice(k,1)}}e.length&&this.Ka();return e}};Object.setPrototypeOf(b.ha.fn,b.ba.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.ha.fn[a]=function(...c){var e=this.G();this.nb();this.Db(e,a,c); -c=e[a](...c);this.Ka();return c===e?this:c}:b.ha.fn[a]=function(...c){return this()[a](...c)})});b.Ob=a=>b.K(a)&&"function"==typeof a.remove&&"function"==typeof a.push;b.m("observableArray",b.ha);b.m("isObservableArray",b.Ob);b.Za.trackArrayChanges=(a,c)=>{function e(){function q(){if(f){var u=[].concat(a.G()||[]);if(a.qa("arrayChange")){if(!k||1++f,null,"spectate"),g=[].concat(a.G()|| -[]),k=null,t=a.subscribe(q))}a.Sa={};c&&"object"==typeof c&&b.a.extend(a.Sa,c);a.Sa.sparse=!0;if(!a.Db){var h=!1,k=null,t,d,f=0,g,n=a.na,p=a.ua;a.na=q=>{n&&n.call(a,q);"arrayChange"===q&&e()};a.ua=q=>{p&&p.call(a,q);"arrayChange"!==q||a.qa("arrayChange")||(t&&t.o(),d&&d.o(),d=t=null,h=!1,g=void 0)};a.Db=(q,u,x)=>{function l(G,z,M){return m[m.length]={status:G,value:z,index:M}}if(h&&!f){var m=[],r=q.length,v=x.length,y=0;switch(u){case "push":y=r;case "unshift":for(u=0;ux[0]?r+x[0]:x[0]),r);r=1===v?r:Math.min(u+(x[1]||0),r);v=u+v-2;y=Math.max(r,v);for(var w=[],A=[],I=2;ua[e.ka]=e.V);return a},ab:function(a){if(!this[D].I)return!1;var c=this.oc();return c.includes(a)?!0:!!c.find(e=>e.ab&&e.ab(a))},wb:function(a,c,e){if(this[D].gb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[D].u[a]=e; -e.ka=this[D].I++;e.la=c.Ba()},ra:function(){var a,c=this[D].u;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var e=c[a];if(this.ia&&e.V.ja||e.V.qc(e.la))return!0}},Hc:function(){this.ia&&!this[D].Ea&&this.ia(!1)},ga:function(){var a=this[D];return a.W||0a.S(!0),c)): -a.ia?a.ia(!0):a.S(!0)},S:function(a){var c=this[D],e=c.oa,h=!1;if(!c.Ea&&!c.$){if(c.j&&!b.a.Xa(c.j)||e&&e()){if(!c.kb){this.o();return}}else c.kb=!1;c.Ea=!0;try{h=this.mc(a)}finally{c.Ea=!1}return h}},mc:function(a){var c=this[D],e=c.gb?void 0:!c.I;var h={hc:this,ya:c.u,Ua:c.I};b.i.zb({ec:h,dc:V,l:this,bb:e});c.u={};c.I=0;var k=this.lc(c,h);c.I?h=this.Fa(c.L,k):(this.o(),h=!0);h&&(c.v?this.Ja():this.notifySubscribers(c.L,"beforeChange"),c.L=k,this.notifySubscribers(c.L,"spectate"),!c.v&&a&&this.notifySubscribers(c.L), -this.ub&&this.ub());e&&this.notifySubscribers(c.L,"awake");return h},lc:(a,c)=>{try{return a.Tb()}finally{b.i.end(),c.Ua&&!a.v&&b.a.N(c.ya,S),a.aa=a.W=!1}},G:function(a){var c=this[D];(c.W&&(a||!c.I)||c.v&&this.ra())&&this.S();return c.L},Ga:function(a){b.T.fn.Ga.call(this,a);this.qb=function(){this[D].v||(this[D].aa?this.S():this[D].W=!1);return this[D].L};this.ia=function(c){this.sb(this[D].L);this[D].W=!0;c&&(this[D].aa=!0);this.tb(this,!c)}},o:function(){var a=this[D];!a.v&&a.u&&b.a.N(a.u,(c, -e)=>e.o&&e.o());a.j&&a.Wa&&b.a.J.hb(a.j,a.Wa);a.u=void 0;a.I=0;a.$=!0;a.aa=!1;a.W=!1;a.v=!1;a.j=void 0;a.oa=void 0;a.Tb=void 0}},fa={na:function(a){var c=this,e=c[D];if(!e.$&&e.v&&"change"==a){e.v=!1;if(e.aa||c.ra())e.u=null,e.I=0,c.S()&&c.Ja();else{var h=[];b.a.N(e.u,(k,t)=>h[t.ka]=k);h.forEach((k,t)=>{var d=e.u[k],f=c.Yb(d.V);f.ka=t;f.la=d.la;e.u[k]=f});c.ra()&&c.S()&&c.Ja()}e.$||c.notifySubscribers(e.L,"awake")}},ua:function(a){var c=this[D];c.$||"change"!=a||this.qa("change")||(b.a.N(c.u,(e,h)=> -{h.o&&(c.u[e]={V:h.V,ka:h.ka,la:h.la},h.o())}),c.v=!0,this.notifySubscribers(void 0,"asleep"))},Ba:function(){var a=this[D];a.v&&(a.aa||this.ra())&&this.S();return b.T.fn.Ba.call(this)}},ha={na:function(a){"change"!=a&&"beforeChange"!=a||this.G()}};Object.setPrototypeOf(U,b.T.fn);U[b.ba.P]=b.l;b.m("computed",b.l);b.m("computed.fn",U);b.Z(U,"dispose",U.o);b.Ac=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={O:a=>{switch(a.nodeName){case "OPTION":return!0=== -a.__ko__hasDomDataOptionValue__?b.a.f.get(a,b.b.options.fb):a.value;case "SELECT":return 0<=a.selectedIndex?b.A.O(a.options[a.selectedIndex]):void 0;default:return a.value}},La:(a,c,e)=>{switch(a.nodeName){case "OPTION":"string"===typeof c?(b.a.f.set(a,b.b.options.fb,void 0),delete a.__ko__hasDomDataOptionValue__,a.value=c):(b.a.f.set(a,b.b.options.fb,c),a.__ko__hasDomDataOptionValue__=!0,a.value="number"===typeof c?c:"");break;case "SELECT":for(var h=-1,k=""===c||null==c,t=0,d=a.options.length,f;t< -d;++t)if(f=b.A.O(a.options[t]),f==c||""===f&&k){h=t;break}if(e||0<=h||k&&1{function a(f){f=b.a.Xb(f);123===f.charCodeAt(0)&&(f=f.slice(1,-1));f+="\n,";var g=[],n=f.match(h),p=[],q=0;if(1=q){g.push(m&&p.length?{key:m,value:p.join("")}:{unknown:m||p.join("")});var m=q=0;p=[];continue}}else if(58===l){if(!q&&!m&&1===p.length){m=p.pop();continue}}else if(47=== -l&&1n(l.key||l.unknown,l.value));q.length&&n("_ko_property_writers","{"+q.join(",")+" }");return p.join(",")},wc:(f,g)=>-1n.key==g),ob:(f,g,n,p,q)=>{if(f&&b.K(f))!b.vc(f)||q&&f.G()===p||f(p);else if((f=g.get("_ko_property_writers"))&&f[n])f[n](p)}}})();(()=>{function a(d){return 8==d.nodeType&&h.test(d.nodeValue)}function c(d){return 8==d.nodeType&&k.test(d.nodeValue)}function e(d,f){for(var g=d,n=1,p=[];g=g.nextSibling;){if(c(g)&&(b.a.f.set(g,t,!0),n--,0=== -n))return p;p.push(g);a(g)&&n++}if(!f)throw Error("Cannot find closing comment tag to match: "+d.nodeValue);return null}var h=/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=/^\s*\/ko\s*$/,t="__ko_matchedEndComment__";b.h={ca:{},childNodes:d=>a(d)?e(d):d.childNodes,pa:d=>{if(a(d)){d=e(d);for(var f=0,g=d.length;f{if(a(d)){b.h.pa(d);d=d.nextSibling;for(var g=0,n=f.length;g{if(a(d)){var g=d.nextSibling; -d=d.parentNode}else g=d.firstChild;d.insertBefore(f,g)},Nb:(d,f,g)=>{g?(g=g.nextSibling,a(d)&&(d=d.parentNode),d.insertBefore(f,g)):b.h.prepend(d,f)},firstChild:d=>{if(a(d))return!d.nextSibling||c(d.nextSibling)?null:d.nextSibling;if(d.firstChild&&c(d.firstChild))throw Error("Found invalid end comment, as the first child of "+d);return d.firstChild},nextSibling:d=>{if(a(d)){var f=e(d,void 0);d=f?0(d=d.nodeValue.match(h))?d[1]:null}})();(()=>{const a={};b.Bb=new class{xc(c){switch(c.nodeType){case 1:return null!=c.getAttribute("data-bind");case 8:return b.h.pc(c);default:return!1}}nc(c,e){a:{switch(c.nodeType){case 1:var h=c.getAttribute("data-bind");break a;case 8:h=b.h.Fc(c);break a}h=null}if(h){var k={valueAccessors:!0};try{var t=h+(k&& -k.valueAccessors||""),d;if(!(d=a[t])){var f="with($context){with($data||{}){return{"+b.F.zc(h,k)+"}}}";var g=new Function("$context","$element",f);d=a[t]=g}var n=d(e,c)}catch(p){throw p.message="Unable to parse bindings.\nBindings value: "+h+"\nMessage: "+p.message,p;}}else n=null;return n}}})();(()=>{function a(l){var m=(l=b.a.f.get(l,x))&&l.C;m&&(l.C=null,m.Sb())}function c(l,m,r){this.node=l;this.Ab=m;this.wa=[];this.B=!1;m.C||b.a.J.ma(l,a);r&&r.C&&(r.C.wa.push(l),this.Na=r)}function e(l){return b.a.eb(b.i.D(l), -(m,r)=>()=>l()[r])}function h(l,m,r){return"function"===typeof l?e(l.bind(null,m,r)):b.a.eb(l,v=>()=>v)}function k(l,m){var r=b.h.firstChild(m);if(r)for(var v;v=r;)r=b.h.nextSibling(v),t(l,v);b.c.notify(m,b.c.B)}function t(l,m){var r=l;if(1===m.nodeType||b.Bb.xc(m))r=f(m,null,l).bindingContextForDescendants;r&&m.matches&&!m.matches("SCRIPT,TEXTAREA,TEMPLATE")&&k(r,m)}function d(l){var m=[],r={},v=[];b.a.N(l,function A(w){if(!r[w]){var I=b.getBindingHandler(w);I&&(I.after&&(v.push(w),I.after.forEach(G=> -{if(l[G]){if(v.includes(G))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+v.join(", "));A(G)}}),v.length--),m.push({key:w,Mb:I}));r[w]=!0}});return m}function f(l,m,r){var v=b.a.f.$a(l,x,{}),y=v.cc;if(!m){if(y)throw Error("You cannot apply bindings multiple times to the same element.");v.cc=!0}y||(v.context=r);v.cb||(v.cb={});if(m&&"function"!==typeof m)var w=m;else{var A=b.l(()=>{if(w=m?m(r,l):b.Bb.nc(l,r)){if(r[n])r[n]();if(r[q])r[q]()}return w},{j:l}); -w&&A.ga()||(A=null)}var I=r,G;if(w){var z=A?B=>()=>A()[B]():B=>w[B];function M(){return b.a.eb(A?A():w,B=>B())}M.get=B=>w[B]&&z(B)();M.has=B=>B in w;b.c.B in w&&b.c.subscribe(l,b.c.B,()=>{var B=w[b.c.B]();if(B){var H=b.h.childNodes(l);H.length&&B(H,b.Hb(H[0]))}});b.c.Y in w&&(I=b.c.jb(l,r),b.c.subscribe(l,b.c.Y,()=>{var B=w[b.c.Y]();B&&b.h.firstChild(l)&&B(l)}));d(w).forEach(B=>{var H=B.Mb.init,L=B.Mb.update,K=B.key;if(8===l.nodeType&&!b.h.ca[K])throw Error("The binding '"+K+"' cannot be used with virtual elements"); -try{"function"==typeof H&&b.i.D(()=>{var N=H(l,z(K),M,I.$data,I);if(N&&N.controlsDescendantBindings){if(void 0!==G)throw Error("Multiple bindings ("+G+" and "+K+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");G=K}}),"function"==typeof L&&b.l(()=>L(l,z(K),M,I.$data,I),{j:l})}catch(N){throw N.message='Unable to process binding "'+K+": "+w[K]+'"\nMessage: '+N.message,N;}})}v=void 0===G;return{shouldBindDescendants:v,bindingContextForDescendants:v&& -I}}function g(l,m){return l&&l instanceof b.R?l:new b.R(l,void 0,void 0,m)}var n=Symbol("_subscribable"),p=Symbol("_ancestorBindingInfo"),q=Symbol("_dataDependency");b.b={};b.getBindingHandler=l=>b.b[l];var u={};b.R=function(l,m,r,v,y){function w(){var H=z?G():G,L=b.a.g(H);m?(b.a.extend(A,m),p in m&&(A[p]=m[p])):(A.$parents=[],A.$root=L,A.ko=b);A[n]=B;I?L=A.$data:(A.$rawData=H,A.$data=L);r&&(A[r]=L);v&&v(A,m,L);if(m&&m[n]&&!b.i.l().ab(m[n]))m[n]();M&&(A[q]=M);return A.$data}var A=this,I=l===u,G=I? -void 0:l,z="function"==typeof G&&!b.K(G),M=y&&y.dataDependency;if(y&&y.exportDependencies)w();else{var B=b.Ac(w);B.G();B.ga()?B.equalityComparer=null:A[n]=void 0}};b.R.prototype.createChildContext=function(l,m,r,v){!v&&m&&"object"==typeof m&&(v=m,m=v.as,r=v.extend);if(m&&v&&v.noChildContext){var y="function"==typeof l&&!b.K(l);return new b.R(u,this,null,w=>{r&&r(w);w[m]=y?l():l},v)}return new b.R(l,this,m,(w,A)=>{w.$parentContext=A;w.$parent=A.$data;w.$parents=(A.$parents||[]).slice(0);w.$parents.unshift(w.$parent); -r&&r(w)},v)};b.R.prototype.extend=function(l,m){return new b.R(u,this,null,r=>b.a.extend(r,"function"==typeof l?l(r):l),m)};var x=b.a.f.X();c.prototype.Sb=function(){this.Na&&this.Na.C&&this.Na.C.jc(this.node)};c.prototype.jc=function(l){b.a.va(this.wa,l);!this.wa.length&&this.B&&this.Gb()};c.prototype.Gb=function(){this.B=!0;this.Ab.C&&!this.wa.length&&(this.Ab.C=null,b.a.J.hb(this.node,a),b.c.notify(this.node,b.c.Y),this.Sb())};b.c={B:"childrenComplete",Y:"descendantsComplete",subscribe:(l,m,r, -v,y)=>{var w=b.a.f.$a(l,x,{});w.fa||(w.fa=new b.T);y&&y.notifyImmediately&&w.cb[m]&&b.i.D(r,v,[l]);return w.fa.subscribe(r,v,m)},notify:(l,m)=>{var r=b.a.f.get(l,x);if(r&&(r.cb[m]=!0,r.fa&&r.fa.notifySubscribers(l,m),m==b.c.B))if(r.C)r.C.Gb();else if(void 0===r.C&&r.fa&&r.fa.qa(b.c.Y))throw Error("descendantsComplete event not supported for bindings on this node");},jb:(l,m)=>{var r=b.a.f.$a(l,x,{});r.C||(r.C=new c(l,r,m[p]));return m[p]==r?m:m.extend(v=>{v[p]=r})}};b.Dc=l=>(l=b.a.f.get(l,x))&&l.context; -b.Pa=(l,m,r)=>f(l,m,g(r));b.Gc=(l,m,r)=>{r=g(r);return b.Pa(l,h(m,r,l),r)};b.yb=(l,m)=>{1!==m.nodeType&&8!==m.nodeType||k(g(l),m)};b.xb=function(l,m,r){if(2>arguments.length){if(m=T.body,!m)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!m||1!==m.nodeType&&8!==m.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");t(g(l,r),m)};b.Hb=l=>(l=l&&[1,8].includes(l.nodeType)&&b.Dc(l))? -l.$data:void 0;b.m("bindingHandlers",b.b);b.m("applyBindings",b.xb);b.m("applyBindingAccessorsToNode",b.Pa);b.m("dataFor",b.Hb)})();(()=>{function a(d,f){return Object.prototype.hasOwnProperty.call(d,f)?d[f]:void 0}function c(d,f){var g=a(k,d);if(g)g.subscribe(f);else{g=k[d]=new b.T;g.subscribe(f);e(d,(p,q)=>{q=!(!q||!q.synchronous);t[d]={definition:p,uc:q};delete k[d];n||q?g.notifySubscribers(p):b.lb.Vb(()=>g.notifySubscribers(p))});var n=!0}}function e(d,f){h("getConfig",[d],g=>{g?h("loadComponent", -[d,g],n=>f(n,g)):f(null,null)})}function h(d,f,g,n){n||(n=b.s.loaders.slice(0));var p=n.shift();if(p){var q=p[d];if(q){var u=!1;if(void 0!==q.apply(p,f.concat(function(x){u?g(null):null!==x?g(x):h(d,f,g,n)}))&&(u=!0,!p.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else h(d,f,g,n)}else g(null)}var k={},t={};b.s={get:(d,f)=>{var g=a(t,d);g?g.uc?b.i.D(()=>f(g.definition)):b.lb.Vb(()=>f(g.definition)):c(d, -f)},fc:d=>delete t[d],rb:h};b.s.loaders=[];b.m("components",b.s)})();(()=>{function a(d,f,g,n){var p={},q=2;f=g.template;g=g.viewModel;f?b.s.rb("loadTemplate",[d,f],u=>{p.template=u;0===--q&&n(p)}):0===--q&&n(p);g?b.s.rb("loadViewModel",[d,g],u=>{p[t]=u;0===--q&&n(p)}):0===--q&&n(p)}function c(d,f,g){if("function"===typeof f)g(p=>new f(p));else if("function"===typeof f[t])g(f[t]);else if("instance"in f){var n=f.instance;g(()=>n)}else"viewModel"in f?c(d,f.viewModel,g):d("Unknown viewModel value: "+ -f)}function e(d){if(d.matches("TEMPLATE")&&d.content instanceof DocumentFragment)return b.a.xa(d.content.childNodes);throw"Template Source Element not a