diff --git a/vendors/knockout/build/output/knockout-latest.debug.js b/vendors/knockout/build/output/knockout-latest.debug.js index 2e1431309..fbd14a3d6 100644 --- a/vendors/knockout/build/output/knockout-latest.debug.js +++ b/vendors/knockout/build/output/knockout-latest.debug.js @@ -546,32 +546,37 @@ function applyExtenders(requestedExtenders) { ko.exportSymbol('extenders', ko.extenders); -ko.subscription = function (target, callback, disposeCallback) { - this._target = target; - this._callback = callback; - this._disposeCallback = disposeCallback; - this._isDisposed = false; - this._node = null; - this._domNodeDisposalCallback = null; - ko.exportProperty(this, 'dispose', this.dispose); - ko.exportProperty(this, 'disposeWhenNodeIsRemoved', this.disposeWhenNodeIsRemoved); -}; -ko.subscription.prototype.dispose = function () { - var self = this; - if (!self._isDisposed) { - if (self._domNodeDisposalCallback) { - ko.utils.domNodeDisposal.removeDisposeCallback(self._node, self._domNodeDisposalCallback); - } - self._isDisposed = true; - self._disposeCallback(); - - self._target = self._callback = self._disposeCallback = self._node = self._domNodeDisposalCallback = null; +class koSubscription +{ + constructor (target, callback, disposeCallback) { + this._target = target; + this._callback = callback; + this._disposeCallback = disposeCallback; + this._isDisposed = false; + this._node = null; + this._domNodeDisposalCallback = null; + ko.exportProperty(this, 'dispose', this.dispose); + ko.exportProperty(this, 'disposeWhenNodeIsRemoved', this.disposeWhenNodeIsRemoved); } -}; -ko.subscription.prototype.disposeWhenNodeIsRemoved = function (node) { - this._node = node; - ko.utils.domNodeDisposal.addDisposeCallback(node, this._domNodeDisposalCallback = this.dispose.bind(this)); -}; + + dispose() { + var self = this; + if (!self._isDisposed) { + if (self._domNodeDisposalCallback) { + ko.utils.domNodeDisposal.removeDisposeCallback(self._node, self._domNodeDisposalCallback); + } + self._isDisposed = true; + self._disposeCallback(); + + self._target = self._callback = self._disposeCallback = self._node = self._domNodeDisposalCallback = null; + } + } + + disposeWhenNodeIsRemoved(node) { + this._node = node; + ko.utils.domNodeDisposal.addDisposeCallback(node, this._domNodeDisposalCallback = this.dispose.bind(this)); + } +} ko.subscribable = function () { Object.setPrototypeOf(this, ko_subscribable_fn); @@ -592,7 +597,7 @@ var ko_subscribable_fn = { event = event || defaultEvent; var boundCallback = callbackTarget ? callback.bind(callbackTarget) : callback; - var subscription = new ko.subscription(self, boundCallback, () => { + var subscription = new koSubscription(self, boundCallback, () => { ko.utils.arrayRemoveItem(self._subscriptions[event], subscription); if (self.afterSubscriptionRemove) self.afterSubscriptionRemove(event); @@ -617,7 +622,8 @@ var ko_subscribable_fn = { var subs = event === defaultEvent && this._changeSubscriptions || this._subscriptions[event].slice(0); try { ko.dependencyDetection.begin(); // Begin suppressing dependency detection (by setting the top frame to undefined) - for (var i = 0, subscription; subscription = subs[i]; ++i) { + var i = 0, subscription; + while ((subscription = subs[i++])) { // In case a subscription was disposed during the arrayForEach cycle, check // for isDisposed on each subscription before invoking its callback if (!subscription._isDisposed) @@ -706,17 +712,6 @@ var ko_subscribable_fn = { return this._subscriptions[event] && this._subscriptions[event].length; }, - getSubscriptionsCount: function (event) { - if (event) { - return this._subscriptions[event] && this._subscriptions[event].length || 0; - } - var total = 0; - ko.utils.objectForEach(this._subscriptions, (eventName, subscriptions) => - total += subscriptions.length - ); - return total; - }, - isDifferent: function(oldValue, newValue) { return !this['equalityComparer'] || !this['equalityComparer'](oldValue, newValue); }, @@ -729,7 +724,6 @@ var ko_subscribable_fn = { ko.exportProperty(ko_subscribable_fn, 'init', ko_subscribable_fn.init); ko.exportProperty(ko_subscribable_fn, 'subscribe', ko_subscribable_fn.subscribe); ko.exportProperty(ko_subscribable_fn, 'extend', ko_subscribable_fn.extend); -ko.exportProperty(ko_subscribable_fn, 'getSubscriptionsCount', ko_subscribable_fn.getSubscriptionsCount); // For browsers that support proto assignment, we overwrite the prototype of each // observable instance. Since observables are functions, we need Function.prototype @@ -745,16 +739,14 @@ ko.isSubscribable = instance => ko.computedContext = ko.dependencyDetection = (() => { var outerFrames = [], currentFrame, - lastId = 0; + lastId = 0, - function begin(options) { - outerFrames.push(currentFrame); - currentFrame = options; - } + begin = options => { + outerFrames.push(currentFrame); + currentFrame = options; + }, - function end() { - currentFrame = outerFrames.pop(); - } + end = () => currentFrame = outerFrames.pop(); return { begin: begin, @@ -765,7 +757,8 @@ ko.computedContext = ko.dependencyDetection = (() => { if (currentFrame) { if (!ko.isSubscribable(subscribable)) throw new Error("Only subscribable things can act as dependencies"); - currentFrame.callback.call(currentFrame.callbackTarget, subscribable, subscribable._id || (subscribable._id = ++lastId)); + currentFrame.callback.call(currentFrame.callbackTarget, subscribable, + subscribable._id || (subscribable._id = ++lastId)); } }, @@ -779,23 +772,19 @@ ko.computedContext = ko.dependencyDetection = (() => { }, getDependenciesCount: () => { - if (currentFrame) - return currentFrame.computed.getDependenciesCount(); + return currentFrame && currentFrame.computed.getDependenciesCount(); }, getDependencies: () => { - if (currentFrame) - return currentFrame.computed.getDependencies(); + return currentFrame && currentFrame.computed.getDependencies(); }, isInitial: () => { - if (currentFrame) - return currentFrame.isInitial; + return currentFrame && currentFrame.isInitial; }, computed: () => { - if (currentFrame) - return currentFrame.computed; + return currentFrame && currentFrame.computed; } }; })(); @@ -888,7 +877,8 @@ ko.observableArray['fn'] = { var underlyingArray = this.peek(); var removedValues = []; var predicate = typeof valueOrPredicate == "function" && !ko.isObservable(valueOrPredicate) ? valueOrPredicate : function (value) { return value === valueOrPredicate; }; - for (var i = 0; i < underlyingArray.length; i++) { + var i = underlyingArray.length; + while (i--) { var value = underlyingArray[i]; if (predicate(value)) { if (removedValues.length === 0) { @@ -899,7 +889,6 @@ ko.observableArray['fn'] = { } removedValues.push(value); underlyingArray.splice(i, 1); - i--; } } if (removedValues.length) { @@ -922,10 +911,6 @@ ko.observableArray['fn'] = { if (!arrayOfValues) return []; return this['remove'](value => arrayOfValues.includes(value)); - }, - - 'indexOf': function (item) { - return this().indexOf(item); } }; @@ -933,29 +918,31 @@ ko.observableArray['fn'] = { // inheritance chain is created manually in the ko.observableArray constructor Object.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']); -// Populate ko.observableArray.fn with read/write functions from native arrays -// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array -// because we'll eval them without causing subscriptions, so ko.computed output could end up getting stale -["pop", "push", "reverse", "shift", "sort", "splice", "unshift"].forEach(methodName => { - ko.observableArray['fn'][methodName] = function () { - // Use "peek" to avoid creating a subscription in any computed that we're executing in the context of - // (for consistency with mutating regular observables) - var underlyingArray = this.peek(); - this.valueWillMutate(); - this.cacheDiffForKnownOperation(underlyingArray, methodName, arguments); - var methodCallResult = underlyingArray[methodName].apply(underlyingArray, arguments); - this.valueHasMutated(); - // The native sort and reverse methods return a reference to the array, but it makes more sense to return the observable array instead. - return methodCallResult === underlyingArray ? this : methodCallResult; - }; -}); - -// Populate ko.observableArray.fn with read-only functions from native arrays -["slice"].forEach(methodName => { - ko.observableArray['fn'][methodName] = function () { - var underlyingArray = this(); - return underlyingArray[methodName].apply(underlyingArray, arguments); - }; +// Populate ko.observableArray.fn with native arrays functions +Object.getOwnPropertyNames(Array.prototype).forEach(methodName => { + if (typeof Array.prototype[methodName] === 'function') { + if (["pop", "push", "reverse", "shift", "sort", "splice", "unshift"].includes(methodName)) { + // Mutator methods + // Important: Do not add any additional functions here that may reasonably be used to *read* data from the array + // because we'll eval them without causing subscriptions, so ko.computed output could end up getting stale + ko.observableArray['fn'][methodName] = function (...args) { + // Use "peek" to avoid creating a subscription in any computed that we're executing in the context of + // (for consistency with mutating regular observables) + var underlyingArray = this.peek(); + this.valueWillMutate(); + this.cacheDiffForKnownOperation(underlyingArray, methodName, args); + var methodCallResult = underlyingArray[methodName](...args); + this.valueHasMutated(); + // The native sort and reverse methods return a reference to the array, but it makes more sense to return the observable array instead. + return methodCallResult === underlyingArray ? this : methodCallResult; + }; + } else { + // Accessor and Iteration methods + ko.observableArray['fn'][methodName] = function (...args) { + return this()[methodName](...args); + }; + } + } }); ko.isObservableArray = instance => { diff --git a/vendors/knockout/build/output/knockout-latest.js b/vendors/knockout/build/output/knockout-latest.js index 83f043b07..7f834bd96 100644 --- a/vendors/knockout/build/output/knockout-latest.js +++ b/vendors/knockout/build/output/knockout-latest.js @@ -4,86 +4,85 @@ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ -(C=>{function G(b,c){return null===b||typeof b in ha?b===c:!1}function F(b,c){var e;return()=>{e||(e=a.a.setTimeout(()=>{e=void 0;b()},c))}}function I(b,c){var e;return()=>{clearTimeout(e);e=a.a.setTimeout(b,c)}}function T(b,c){null!==c&&c.o&&c.o()}function X(b,c){var e=this.tc,g=e[D];g.ca||(this.ab&&this.Ha[c]?(e.Hb(c,b,this.Ha[c]),this.Ha[c]=null,--this.ab):g.u[c]||e.Hb(c,b,g.v?{X:b}:e.hc(b)),b.ma&&b.lc())}var U=C.document,Z={},a="undefined"!==typeof Z?Z:{};a.l=(b,c)=>{b=b.split(".");for(var e= -a,g=0;g{b[c]=e};a.version="3.5.1-sm";a.l("version",a.version);a.a={Da:(b,c)=>{c=b.indexOf(c);0{c&&Object.entries(c).forEach(e=>b[e[0]]=e[1]);return b},J:(b,c)=>b&&Object.entries(b).forEach(e=>c(e[0],e[1])),nb:(b,c,e)=>{if(!b)return b;var g={};Object.entries(b).forEach(k=>g[k[0]]=c.call(e,k[1],k[0],b));return g},eb:b=>{for(;b.firstChild;)a.removeNode(b.firstChild)},lb:b=>{var c=[...b],e=(c[0]&& -c[0].ownerDocument||U).createElement("div");b.forEach(g=>e.append(a.ha(g)));return e},Fa:(b,c)=>Array.prototype.map.call(b,c?e=>a.ha(e.cloneNode(!0)):e=>e.cloneNode(!0)),xa:(b,c)=>{a.a.eb(b);c&&b.append(...c)},ua:(b,c)=>{if(b.length){for(c=8===c.nodeType&&c.parentNode||c;b.length&&b[0].parentNode!==c;)b.splice(0,1);for(;1null==b?"": -b.trim?b.trim():b.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,""),Pc:(b,c)=>{b=b||"";return c.length>b.length?!1:b.substring(0,c.length)===c},wc:(b,c)=>c.contains(1!==b.nodeType?b.parentNode:b),cb:b=>a.a.wc(b,b.ownerDocument.documentElement),Nb:b=>a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b,setTimeout:(b,c)=>setTimeout(a.a.Nb(b),c),Rb:b=>setTimeout(()=>{a.onError&&a.onError(b);throw b;},0),K:(b,c,e)=>{b.addEventListener(c,a.a.Nb(e),!1)},ic:(b, -c)=>{if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");b.dispatchEvent(new Event(c))},g:b=>a.O(b)?b():b,rb:(b,c)=>b.textContent=a.a.g(c)||""};a.l("utils",a.a);a.l("unwrap",a.a.g);a.a.b=new function(){var b=0,c="__ko__"+Date.now(),e=(g,k)=>{var m=g[c];!m&&k&&(m=g[c]={});return m};return{get:(g,k)=>(g=e(g,!1))&&g[k],set:(g,k,m)=>{(g=e(g,void 0!==m))&&(g[k]=m)},hb:(g,k,m)=>{g=e(g,!0);return g[k]||(g[k]=m)},clear:g=>g[c]?(delete g[c],!0):!1,V:()=>b++ +c}};a.a.N=new function(){function b(d, -f){var h=a.a.b.get(d,g);void 0===h&&f&&(h=[],a.a.b.set(d,g,h));return h}function c(d){var f=b(d,!1);if(f){f=f.slice(0);for(var h=0;h{if("function"!=typeof f)throw Error("Callback must be a function");b(d,!0).push(f)},qb:(d,f)=> -{var h=b(d,!1);h&&(a.a.Da(h,f),0==h.length&&a.a.b.set(d,g,void 0))},ha:d=>{a.m.H(()=>{k[d.nodeType]&&(c(d),m[d.nodeType]&&e(d.getElementsByTagName("*")))});return d},removeNode:d=>{a.ha(d);d.parentNode&&d.parentNode.removeChild(d)}}};a.ha=a.a.N.ha;a.removeNode=a.a.N.removeNode;a.l("utils.domNodeDisposal",a.a.N);a.l("utils.domNodeDisposal.addDisposeCallback",a.a.N.pa);(()=>{var b=[0,"",""],c=[1,"","
"],e=[3,"","
"],g=[1,""],k={thead:c,tbody:c,tfoot:c,tr:[2,"","
"],td:e,th:e,option:g,optgroup:g};a.a.Pa=(m,d)=>{d||(d=U);var f=a.a.tb(m).toLowerCase();d=d.createElement("div");f=(f=f.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&k[f[1]]||b;var h=f[0];for(d.innerHTML="
"+f[1]+m+f[2]+"
";h--;)d=d.lastChild;return[...d.lastChild.childNodes]};a.a.Ic=(m,d)=>{m=a.a.Pa(m,d);return m.length&&m[0].parentElement||a.a.lb(m)};a.a.fc=(m,d)=>{a.a.eb(m);d=a.a.g(d);if(null!==d&&void 0!== -d){"string"!=typeof d&&(d=d.toString());d=a.a.Pa(d,m.ownerDocument);for(var f=0;f{function b(){if(e)for(var d=e,f=0,h;kd){if(5E3<=++f){k=e;a.a.Rb(Error("'Too much recursion' after processing "+f+" task groups."));break}d=e}try{h()}catch(n){a.a.Rb(n)}}k=e=c.length=0}var c=[],e=0,g=1,k=0,m=(d=>{var f=U.createElement("div");(new MutationObserver(d)).observe(f,{attributes:!0});return()=>f.classList.toggle("foo")})(b);return{dc:d=> -{e||m(b);c[e++]=d;return g++},cancel:d=>{d-=g-e;d>=k&&d{b.throttleEvaluation=c;var e=null;return a.i({read:b,write:g=>{clearTimeout(e);e=a.a.setTimeout(()=>b(g),c)}})},rateLimit:(b,c)=>{if("number"==typeof c)var e=c;else{e=c.timeout;var g=c.method}var k="function"==typeof g?g:"notifyWhenChangesStop"==g?I:F;b.kb(m=>k(m,e,c))},notify:(b,c)=>{b.equalityComparer="always"==c?null:G}};var ha={undefined:1,"boolean":1,number:1,string:1};a.l("extenders", -a.fb);a.ub=function(b,c,e){this.X=b;this.zb=c;this.Ab=e;this.Ua=!1;this.Aa=this.Va=null;a.Y(this,"dispose",this.o);a.Y(this,"disposeWhenNodeIsRemoved",this.j)};a.ub.prototype.o=function(){this.Ua||(this.Aa&&a.a.N.qb(this.Va,this.Aa),this.Ua=!0,this.Ab(),this.X=this.zb=this.Ab=this.Va=this.Aa=null)};a.ub.prototype.j=function(b){this.Va=b;a.a.N.pa(b,this.Aa=this.o.bind(this))};a.W=function(){Object.setPrototypeOf(this,M);M.Ma(this)};var M={Ma:b=>{b.L={change:[]};b.Gb=1},subscribe:function(b,c,e){var g= -this;e=e||"change";var k=new a.ub(g,c?b.bind(c):b,()=>{a.a.Da(g.L[e],k);g.Ca&&g.Ca(e)});g.qa&&g.qa(e);g.L[e]||(g.L[e]=[]);g.L[e].push(k);return k},notifySubscribers:function(b,c){c=c||"change";"change"===c&&this.Ra();if(this.va(c)){c="change"===c&&this.jc||this.L[c].slice(0);try{a.m.Kb();for(var e=0,g;g=c[e];++e)g.Ua||g.zb(b)}finally{a.m.end()}}},Ka:function(){return this.Gb},Bc:function(b){return this.Ka()!==b},Ra:function(){++this.Gb},kb:function(b){var c=this,e=a.O(c),g,k,m,d,f;c.Ba||(c.Ba=c.notifySubscribers, -c.notifySubscribers=function(n,r){r&&"change"!==r?"beforeChange"===r?this.Db(n):this.Ba(n,r):this.Eb(n)});var h=b(()=>{c.ma=!1;e&&d===c&&(d=c.Bb?c.Bb():c());var n=k||f&&c.Oa(m,d);f=k=g=!1;n&&c.Ba(m=d)});c.Eb=(n,r)=>{r&&c.ma||(f=!r);c.jc=c.L.change.slice(0);c.ma=g=!0;d=n;h()};c.Db=n=>{g||(m=n,c.Ba(n,"beforeChange"))};c.Fb=()=>{f=!0};c.lc=()=>{c.Oa(m,c.I(!0))&&(k=!0)}},va:function(b){return this.L[b]&&this.L[b].length},zc:function(b){if(b)return this.L[b]&&this.L[b].length||0;var c=0;a.a.J(this.L,(e, -g)=>c+=g.length);return c},Oa:function(b,c){return!this.equalityComparer||!this.equalityComparer(b,c)},toString:()=>"[object Object]",extend:function(b){var c=this;b&&a.a.J(b,(e,g)=>{e=a.fb[e];"function"==typeof e&&(c=e(c,g)||c)});return c}};a.Y(M,"init",M.Ma);a.Y(M,"subscribe",M.subscribe);a.Y(M,"extend",M.extend);a.Y(M,"getSubscriptionsCount",M.zc);Object.setPrototypeOf(M,Function.prototype);a.W.fn=M;a.Dc=b=>null!=b&&"function"==typeof b.subscribe&&"function"==typeof b.notifySubscribers;a.ra=a.m= -(()=>{function b(m){e.push(g);g=m}function c(){g=e.pop()}var e=[],g,k=0;return{Kb:b,end:c,cc:m=>{if(g){if(!a.Dc(m))throw Error("Only subscribable things can act as dependencies");g.qc.call(g.rc,m,m.kc||(m.kc=++k))}},H:(m,d,f)=>{try{return b(),m.apply(d,f||[])}finally{c()}},Ja:()=>{if(g)return g.i.Ja()},gb:()=>{if(g)return g.i.gb()},jb:()=>{if(g)return g.jb},i:()=>{if(g)return g.i}}})();var P=Symbol("_latestValue");a.ea=b=>{function c(){if(0{if((b="function"==typeof b&&b[R])&&b!==Q[R]&& -b!==a.i.fn[R])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b};a.Fc=b=>"function"==typeof b&&(b[R]===Q[R]||b[R]===a.i.fn[R]&&b.Wb);a.l("observable",a.ea);a.l("isObservable",a.O);a.l("observable.fn",Q);a.Y(Q,"valueHasMutated",Q.za);a.ka=b=>{b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.ea(b);Object.setPrototypeOf(b,a.ka.fn); -return b.extend({trackArrayChanges:!0})};a.ka.fn={remove:function(b){for(var c=this.I(),e=[],g="function"!=typeof b||a.O(b)?function(d){return d===b}:b,k=0;kb.includes(g)): -[]},indexOf:function(b){return this().indexOf(b)}};Object.setPrototypeOf(a.ka.fn,a.ea.fn);"pop push reverse shift sort splice unshift".split(" ").forEach(b=>{a.ka.fn[b]=function(){var c=this.I();this.Sa();this.Mb(c,b,arguments);var e=c[b].apply(c,arguments);this.za();return e===c?this:e}});["slice"].forEach(b=>{a.ka.fn[b]=function(){var c=this();return c[b].apply(c,arguments)}});a.Yb=b=>a.O(b)&&"function"==typeof b.remove&&"function"==typeof b.push;a.l("observableArray",a.ka);a.l("isObservableArray", -a.Yb);a.fb.trackArrayChanges=(b,c)=>{function e(){function p(){if(f){var u=[].concat(b.I()||[]);if(b.va("arrayChange")){if(!k||1++f,null,"spectate"),h=[].concat(b.I()||[]),k=null,m=b.subscribe(p))}b.Za={};c&&"object"==typeof c&&a.a.extend(b.Za,c);b.Za.sparse=!0;if(!b.Mb){var g=!1,k=null,m,d,f=0,h,n=b.qa,r=b.Ca;b.qa=p=>{n&&n.call(b,p);"arrayChange"===p&&e()};b.Ca=p=>{r&&r.call(b, -p);"arrayChange"!==p||b.va("arrayChange")||(m&&m.o(),d&&d.o(),d=m=null,g=!1,h=void 0)};b.Mb=(p,u,x)=>{function v(J,z,K){return l[l.length]={status:J,value:z,index:K}}if(g&&!f){var l=[],q=p.length,t=x.length,w=0;switch(u){case "push":w=q;case "unshift":for(u=0;ux[0]?q+x[0]:x[0]),q);q=1===t?q:Math.min(u+(x[1]||0),q);t=u+t-2;w=Math.max(q,t);for(var A=[],y=[],E=2;ub[e.na]=e.X);return b},ib:function(b){if(!this[D].M)return!1;var c=this.gb();return c.includes(b)?!0:!!c.find(e=>e.ib&&e.ib(b))},Hb:function(b,c,e){if(this[D].pb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[D].u[b]=e;e.na=this[D].M++;e.oa=c.Ka()},wa:function(){var b,c=this[D].u;for(b in c)if(Object.prototype.hasOwnProperty.call(c, -b)){var e=c[b];if(this.la&&e.X.ma||e.X.Bc(e.oa))return!0}},Sc:function(){this.la&&!this[D].Na&&this.la(!1)},ja:function(){var b=this[D];return b.Z||0b.U(!0),c)):b.la?b.la(!0):b.U(!0)},U:function(b){var c=this[D],e=c.sa,g=!1;if(!c.Na&&!c.ca){if(c.j&&!a.a.cb(c.j)||e&&e()){if(!c.vb){this.o(); -return}}else c.vb=!1;c.Na=!0;try{g=this.yc(b)}finally{c.Na=!1}return g}},yc:function(b){var c=this[D],e=c.pb?void 0:!c.M;var g={tc:this,Ha:c.u,ab:c.M};a.m.Kb({rc:g,qc:X,i:this,jb:e});c.u={};c.M=0;var k=this.xc(c,g);c.M?g=this.Oa(c.P,k):(this.o(),g=!0);g&&(c.v?this.Ra():this.notifySubscribers(c.P,"beforeChange"),c.P=k,this.notifySubscribers(c.P,"spectate"),!c.v&&b&&this.notifySubscribers(c.P),this.Fb&&this.Fb());e&&this.notifySubscribers(c.P,"awake");return g},xc:(b,c)=>{try{var e=b.bc;return b.Ia? -e.call(b.Ia):e()}finally{a.m.end(),c.ab&&!b.v&&a.a.J(c.Ha,T),b.da=b.Z=!1}},I:function(b){var c=this[D];(c.Z&&(b||!c.M)||c.v&&this.wa())&&this.U();return c.P},kb:function(b){a.W.fn.kb.call(this,b);this.Bb=function(){this[D].v||(this[D].da?this.U():this[D].Z=!1);return this[D].P};this.la=function(c){this.Db(this[D].P);this[D].Z=!0;c&&(this[D].da=!0);this.Eb(this,!c)}},o:function(){var b=this[D];!b.v&&b.u&&a.a.J(b.u,(c,e)=>e.o&&e.o());b.j&&b.bb&&a.a.N.qb(b.j,b.bb);b.u=void 0;b.M=0;b.ca=!0;b.da=!1;b.Z= -!1;b.v=!1;b.j=void 0;b.sa=void 0;b.bc=void 0;this.Wb||(b.Ia=void 0)}},ia={qa:function(b){var c=this,e=c[D];if(!e.ca&&e.v&&"change"==b){e.v=!1;if(e.da||c.wa())e.u=null,e.M=0,c.U()&&c.Ra();else{var g=[];a.a.J(e.u,(k,m)=>g[m.na]=k);g.forEach((k,m)=>{var d=e.u[k],f=c.hc(d.X);f.na=m;f.oa=d.oa;e.u[k]=f});c.wa()&&c.U()&&c.Ra()}e.ca||c.notifySubscribers(e.P,"awake")}},Ca:function(b){var c=this[D];c.ca||"change"!=b||this.va("change")||(a.a.J(c.u,(e,g)=>{g.o&&(c.u[e]={X:g.X,na:g.na,oa:g.oa},g.o())}),c.v=!0, -this.notifySubscribers(void 0,"asleep"))},Ka:function(){var b=this[D];b.v&&(b.da||this.wa())&&this.U();return a.W.fn.Ka.call(this)}},ja={qa:function(b){"change"!=b&&"beforeChange"!=b||this.I()}};Object.setPrototypeOf(V,a.W.fn);V[a.ea.mc]=a.i;a.l("computed",a.i);a.l("computed.fn",V);a.Y(V,"dispose",V.o);a.Lc=b=>{if("function"===typeof b)return a.i(b,void 0,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.i(b,void 0)};(()=>{a.A={S:b=>{switch(b.nodeName){case "OPTION":return!0===b.__ko__hasDomDataOptionValue__? -a.a.b.get(b,a.c.options.ob):b.value;case "SELECT":return 0<=b.selectedIndex?a.A.S(b.options[b.selectedIndex]):void 0;default:return b.value}},Ta:(b,c,e)=>{switch(b.nodeName){case "OPTION":"string"===typeof c?(a.a.b.set(b,a.c.options.ob,void 0),delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.b.set(b,a.c.options.ob,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:"");break;case "SELECT":if(""===c||null===c)c=void 0;for(var g=-1,k=0,m=b.options.length,d;k{function b(f){f=a.a.tb(f);123===f.charCodeAt(0)&&(f=f.slice(1,-1));f+="\n,";var h=[],n=f.match(g),r=[],p=0;if(1=p){h.push(l&&r.length?{key:l,value:r.join("")}:{unknown:l||r.join("")});var l=p=0;r=[];continue}}else if(58===v){if(!p&&!l&&1===r.length){l=r.pop();continue}}else if(47=== -v&&1n(v.key||v.unknown,v.value));p.length&&n("_ko_property_writers","{"+p.join(",")+" }");return r.join(",")},Gc:(f,h)=>{for(var n=0;n{if(f&&a.O(f))!a.Fc(f)||p&&f.I()===r||f(r);else if((f=h.get("_ko_property_writers"))&&f[n])f[n](r)}}})();(()=>{function b(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,n=1,r=[];h=h.nextSibling;){if(c(h)&& -(a.a.b.set(h,m,!0),n--,0===n))return r;r.push(h);b(h)&&n++}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*$/,m="__ko_matchedEndComment__";a.h={fa:{},childNodes:d=>b(d)?e(d):d.childNodes,ta:d=>{if(b(d)){d=e(d);for(var f=0,h=d.length;f{if(b(d)){a.h.ta(d);d=d.nextSibling;for(var h=0,n=f.length;h{if(b(d)){var h=d.nextSibling;d=d.parentNode}else h=d.firstChild;d.insertBefore(f,h)},Xb:(d,f,h)=>{h?(h=h.nextSibling,b(d)&&(d=d.parentNode),d.insertBefore(f,h)):a.h.prepend(d,f)},firstChild:d=>{if(b(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(b(d)){var f=e(d,void 0);d=f?0(d=d.nodeValue.match(g))?d[1]:null}})();(function(){a.aa=function(){this.pc={}};a.a.extend(a.aa.prototype,{nodeHasBindings:b=>{switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind");case 8:return a.h.Ac(b);default:return!1}},getBindings:function(b,c){var e=this.getBindingsString(b,c);return e?this.parseBindingsString(e, -c,b):null},getBindingAccessors:function(b,c){var e=this.getBindingsString(b,c);return e?this.parseBindingsString(e,c,b,{valueAccessors:!0}):null},getBindingsString:b=>{switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.h.Qc(b)}return null},parseBindingsString:function(b,c,e,g){try{var k=this.pc,m=b+(g&&g.valueAccessors||""),d;if(!(d=k[m])){var f="with($context){with($data||{}){return{"+a.G.Kc(b,g)+"}}}";var h=new Function("$context","$element",f);d=k[m]=h}return d(c,e)}catch(n){throw n.message= -"Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+n.message,n;}}});a.aa.instance=new a.aa})();(()=>{function b(l){var q=(l=a.a.b.get(l,v))&&l.F;q&&(l.F=null,q.ac())}function c(l,q,t){this.node=l;this.Lb=q;this.Ea=[];this.B=!1;q.F||a.a.N.pa(l,b);t&&t.F&&(t.F.Ea.push(l),this.Wa=t)}function e(l){return a.a.nb(a.m.H(l),(q,t)=>()=>l()[t])}function g(l,q,t){return"function"===typeof l?e(l.bind(null,q,t)):a.a.nb(l,w=>()=>w)}function k(l,q){return e(this.getBindings.bind(this,l,q))}function m(l, -q){var t=a.h.firstChild(q);if(t){var w,A=a.aa.instance,y=A.preprocessNode;if(y){for(;w=t;)t=a.h.nextSibling(w),y.call(A,w);t=a.h.firstChild(q)}for(;w=t;)t=a.h.nextSibling(w),d(l,w)}a.f.notify(q,a.f.B)}function d(l,q){var t=l;if(1===q.nodeType||a.aa.instance.nodeHasBindings(q))t=h(q,null,l).bindingContextForDescendants;t&&q.matches&&!q.matches("SCRIPT,TEXTAREA,TEMPLATE")&&m(t,q)}function f(l){var q=[],t={},w=[];a.a.J(l,function E(y){if(!t[y]){var J=a.getBindingHandler(y);J&&(J.after&&(w.push(y),J.after.forEach(z=> -{if(l[z]){if(w.includes(z))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+w.join(", "));E(z)}}),w.length--),q.push({key:y,Vb:J}));t[y]=!0}});return q}function h(l,q,t){var w=a.a.b.hb(l,v,{}),A=w.nc;if(!q){if(A)throw Error("You cannot apply bindings multiple times to the same element.");w.nc=!0}A||(w.context=t);w.mb||(w.mb={});if(q&&"function"!==typeof q)var y=q;else{var E=a.aa.instance,J=E.getBindingAccessors||k,z=a.i(()=>{if(y=q?q(t,l):J.call(E,l,t)){if(t[r])t[r](); -if(t[u])t[u]()}return y},null,{j:l});y&&z.ja()||(z=null)}var K=t,N;if(y){var H=z?B=>()=>z()[B]():B=>y[B];function L(){return a.a.nb(z?z():y,B=>B())}L.get=B=>y[B]&&H(B)();L.has=B=>B in y;a.f.B in y&&a.f.subscribe(l,a.f.B,()=>{var B=y[a.f.B]();if(B){var O=a.h.childNodes(l);O.length&&B(O,a.Qb(O[0]))}});a.f.ba in y&&(K=a.f.sb(l,t),a.f.subscribe(l,a.f.ba,()=>{var B=y[a.f.ba]();B&&a.h.firstChild(l)&&B(l)}));f(y).forEach(B=>{var O=B.Vb.init,Y=B.Vb.update,S=B.key;if(8===l.nodeType&&!a.h.fa[S])throw Error("The binding '"+ -S+"' cannot be used with virtual elements");try{"function"==typeof O&&a.m.H(()=>{var W=O(l,H(S),L,K.$data,K);if(W&&W.controlsDescendantBindings){if(void 0!==N)throw Error("Multiple bindings ("+N+" and "+S+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");N=S}}),"function"==typeof Y&&a.i(()=>Y(l,H(S),L,K.$data,K),null,{j:l})}catch(W){throw W.message='Unable to process binding "'+S+": "+y[S]+'"\nMessage: '+W.message,W;}})}w= -void 0===N;return{shouldBindDescendants:w,bindingContextForDescendants:w&&K}}function n(l,q){return l&&l instanceof a.T?l:new a.T(l,void 0,void 0,q)}var r=Symbol("_subscribable"),p=Symbol("_ancestorBindingInfo"),u=Symbol("_dataDependency");a.c={};a.getBindingHandler=l=>a.c[l];var x={};a.T=function(l,q,t,w,A){function y(){var L=K?z():z,B=a.a.g(L);q?(a.a.extend(E,q),p in q&&(E[p]=q[p])):(E.$parents=[],E.$root=B,E.ko=a);E[r]=H;J?B=E.$data:(E.$rawData=L,E.$data=B);t&&(E[t]=B);w&&w(E,q,B);if(q&&q[r]&& -!a.ra.i().ib(q[r]))q[r]();N&&(E[u]=N);return E.$data}var E=this,J=l===x,z=J?void 0:l,K="function"==typeof z&&!a.O(z),N=A&&A.dataDependency;if(A&&A.exportDependencies)y();else{var H=a.Lc(y);H.I();H.ja()?H.equalityComparer=null:E[r]=void 0}};a.T.prototype.createChildContext=function(l,q,t,w){!w&&q&&"object"==typeof q&&(w=q,q=w.as,t=w.extend);if(q&&w&&w.noChildContext){var A="function"==typeof l&&!a.O(l);return new a.T(x,this,null,y=>{t&&t(y);y[q]=A?l():l},w)}return new a.T(l,this,q,(y,E)=>{y.$parentContext= -E;y.$parent=E.$data;y.$parents=(E.$parents||[]).slice(0);y.$parents.unshift(y.$parent);t&&t(y)},w)};a.T.prototype.extend=function(l,q){return new a.T(x,this,null,t=>a.a.extend(t,"function"==typeof l?l(t):l),q)};var v=a.a.b.V();c.prototype.ac=function(){this.Wa&&this.Wa.F&&this.Wa.F.vc(this.node)};c.prototype.vc=function(l){a.a.Da(this.Ea,l);!this.Ea.length&&this.B&&this.Pb()};c.prototype.Pb=function(){this.B=!0;this.Lb.F&&!this.Ea.length&&(this.Lb.F=null,a.a.N.qb(this.node,b),a.f.notify(this.node, -a.f.ba),this.ac())};a.f={B:"childrenComplete",ba:"descendantsComplete",subscribe:(l,q,t,w,A)=>{var y=a.a.b.hb(l,v,{});y.ia||(y.ia=new a.W);A&&A.notifyImmediately&&y.mb[q]&&a.m.H(t,w,[l]);return y.ia.subscribe(t,w,q)},notify:(l,q)=>{var t=a.a.b.get(l,v);if(t&&(t.mb[q]=!0,t.ia&&t.ia.notifySubscribers(l,q),q==a.f.B))if(t.F)t.F.Pb();else if(void 0===t.F&&t.ia&&t.ia.va(a.f.ba))throw Error("descendantsComplete event not supported for bindings on this node");},sb:(l,q)=>{var t=a.a.b.hb(l,v,{});t.F||(t.F= -new c(l,t,q[p]));return q[p]==t?q:q.extend(w=>{w[p]=t})}};a.Oc=l=>(l=a.a.b.get(l,v))&&l.context;a.Xa=(l,q,t)=>h(l,q,n(t));a.Rc=(l,q,t)=>{t=n(t);return a.Xa(l,g(q,t,l),t)};a.Jb=(l,q)=>{1!==q.nodeType&&8!==q.nodeType||m(n(l),q)};a.Ib=function(l,q,t){if(2>arguments.length){if(q=U.body,!q)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!q||1!==q.nodeType&&8!==q.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"); -d(n(l,t),q)};a.Qb=l=>(l=l&&[1,8].includes(l.nodeType)&&a.Oc(l))?l.$data:void 0;a.l("bindingHandlers",a.c);a.l("applyBindings",a.Ib);a.l("applyBindingAccessorsToNode",a.Xa);a.l("dataFor",a.Qb)})();(()=>{function b(d,f){return Object.prototype.hasOwnProperty.call(d,f)?d[f]:void 0}function c(d,f){var h=b(k,d);if(h)h.subscribe(f);else{h=k[d]=new a.W;h.subscribe(f);e(d,(r,p)=>{p=!(!p||!p.synchronous);m[d]={definition:r,Ec:p};delete k[d];n||p?h.notifySubscribers(r):a.wb.dc(()=>h.notifySubscribers(r))}); -var n=!0}}function e(d,f){g("getConfig",[d],h=>{h?g("loadComponent",[d,h],n=>f(n,h)):f(null,null)})}function g(d,f,h,n){n||(n=a.s.loaders.slice(0));var r=n.shift();if(r){var p=r[d];if(p){var u=!1;if(void 0!==p.apply(r,f.concat(function(x){u?h(null):null!==x?h(x):g(d,f,h,n)}))&&(u=!0,!r.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else g(d,f,h,n)}else h(null)}var k={},m={};a.s={get:(d,f)=>{var h=b(m, -d);h?h.Ec?a.m.H(()=>f(h.definition)):a.wb.dc(()=>f(h.definition)):c(d,f)},sc:d=>delete m[d],Cb:g};a.s.loaders=[];a.l("components",a.s)})();(()=>{function b(d,f,h,n){var r={},p=2;f=h.template;h=h.viewModel;f?a.s.Cb("loadTemplate",[d,f],u=>{r.template=u;0===--p&&n(r)}):0===--p&&n(r);h?a.s.Cb("loadViewModel",[d,h],u=>{r[m]=u;0===--p&&n(r)}):0===--p&&n(r)}function c(d,f,h){if("function"===typeof f)h(r=>new f(r));else if("function"===typeof f[m])h(f[m]);else if("instance"in f){var n=f.instance;h(()=>n)}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 a.a.Fa(d.content.childNodes);throw"Template Source Element not a