Cleanup KnockoutJS

This commit is contained in:
djmaze 2021-09-28 14:40:24 +02:00
parent 4c7ce61bc0
commit 4142526ba6
9 changed files with 121 additions and 279 deletions

View file

@ -13,31 +13,9 @@ module.exports = function(grunt) {
' * License: <%= pkg.licenses[0].type %> (<%= pkg.licenses[0].url %>)\n' +
' */\n\n',
checktrailingspaces: {
main: {
src: [
"**/*.{js,html,css,bat,ps1,sh}",
"!build/output/**",
"!node_modules/**"
],
filter: 'isFile'
}
},
build: {
debug: './build/output/knockout-latest.debug.js',
min: './build/output/knockout-latest.js'
},
dist: {
debug: './dist/knockout.debug.js',
min: './dist/knockout.js'
},
test: {
phantomjs: 'spec/runner.phantom.js',
node: 'spec/runner.node.js'
},
testtypes: {
global: "spec/types/global",
module: "spec/types/module"
}
});
@ -52,25 +30,6 @@ module.exports = function(grunt) {
return !this.errorCount;
});
var trailingSpaceRegex = /[ ]$/;
grunt.registerMultiTask('checktrailingspaces', 'checktrailingspaces', function() {
var matches = [];
this.files[0].src.forEach(function(filepath) {
var content = grunt.file.read(filepath),
lines = content.split(/\r*\n/);
lines.forEach(function(line, index) {
if (trailingSpaceRegex.test(line)) {
matches.push([filepath, (index+1), line].join(':'));
}
});
});
if (matches.length) {
grunt.log.error("The following files have trailing spaces that need to be cleaned up:");
grunt.log.writeln(matches.join('\n'));
return false;
}
});
function getReferencedSources(sourceReferencesFilename) {
// Returns the array of filenames referenced by a file like source-references.js
var result;
@ -134,65 +93,6 @@ module.exports = function(grunt) {
return !this.errorCount;
});
grunt.registerMultiTask('test', 'Run tests', function () {
/*
var done = this.async();
grunt.util.spawn({ cmd: this.target, args: [this.data] },
function (error, result, code) {
if (code === 127) {
// not found
grunt.verbose.error(result.stderr);
// ignore this error
done(true);
} else {
grunt.log.writeln(result.stdout);
if (error)
grunt.log.error(result.stderr);
done(!error);
}
}
);
*/
});
grunt.registerMultiTask('testtypes', 'Run types tests', function () {
/*
var done = this.async(),
target = this.target;
grunt.util.spawn({ cmd: "tsc", args: ["-p", this.data] },
function (error, result, code) {
grunt.log.writeln(result.stdout);
if (error)
grunt.log.error(result.stderr);
else
grunt.log.ok("Knockout TypeScript " + target + " types validated!");
done(!error);
}
);
*/
});
grunt.registerTask('dist', function() {
var version = grunt.config('pkg.version'),
buildConfig = grunt.config('build'),
distConfig = grunt.config('dist');
grunt.file.copy(buildConfig.debug, distConfig.debug);
grunt.file.copy(buildConfig.min, distConfig.min);
console.log('To publish, run:');
console.log(' git add bower.json');
console.log(' git add -f ' + distConfig.debug);
console.log(' git add -f ' + distConfig.min);
console.log(' git checkout head');
console.log(' git commit -m \'Version ' + version + ' for distribution\'');
console.log(' git tag -a v' + version + ' -m \'Add tag v' + version + '\'');
console.log(' git checkout master');
console.log(' git push origin --tags');
});
// Default task.
grunt.registerTask('default', ['clean', 'checktrailingspaces', 'build', 'test', 'testtypes']);
grunt.registerTask('default', ['clean', 'build']);
};

View file

@ -2,6 +2,4 @@
// (0, eval)('this') is a robust way of getting a reference to the global object
// For details, see http://stackoverflow.com/questions/14119988/return-this-0-evalthis/14120023#14120023
var document = window['document'],
navigator = window['navigator'],
JSON = window["JSON"],
koExports = {};

View file

@ -8,8 +8,6 @@
// (0, eval)('this') is a robust way of getting a reference to the global object
// For details, see http://stackoverflow.com/questions/14119988/return-this-0-evalthis/14120023#14120023
var document = window['document'],
navigator = window['navigator'],
JSON = window["JSON"],
koExports = {};
// Internally, all KO objects are attached to koExports (even the non-exported ones whose names will be minified by the closure compiler).
// In the future, the following "ko" variable may be made distinct from "koExports" so that private objects are not externally reachable.
@ -55,7 +53,7 @@ ko.utils = {
var templateDocument = (nodesArray[0] && nodesArray[0].ownerDocument) || document;
var container = templateDocument.createElement('div');
nodes.forEach(node => container.append(ko.cleanNode(node)));
nodesArray.forEach(node => container.append(ko.cleanNode(node)));
return container;
},
@ -97,7 +95,7 @@ ko.utils = {
// Rule [B]
while (continuousNodeArray.length > 1
&& continuousNodeArray[continuousNodeArray.length - 1].parentNode !== parentNode)
continuousNodeArray.length--;
--continuousNodeArray.length;
// Rule [C]
if (continuousNodeArray.length > 1) {
@ -119,39 +117,11 @@ ko.utils = {
string.trim() :
string.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, ''),
stringStartsWith: (string, startsWith) => {
string = string || "";
if (startsWith.length > string.length)
return false;
return string.substring(0, startsWith.length) === startsWith;
},
domNodeIsContainedBy: (node, containedByNode) =>
containedByNode.contains(node.nodeType !== 1 ? node.parentNode : node),
domNodeIsAttachedToDocument: node => ko.utils.domNodeIsContainedBy(node, node.ownerDocument.documentElement),
catchFunctionErrors: delegate => {
return ko['onError'] ? function () {
try {
return delegate.apply(this, arguments);
} catch (e) {
ko['onError'] && ko['onError'](e);
throw e;
}
} : delegate;
},
setTimeout: (handler, timeout) => setTimeout(ko.utils.catchFunctionErrors(handler), timeout),
deferError: error => setTimeout(() => {
ko['onError'] && ko['onError'](error);
throw error;
}, 0),
registerEventHandler: (element, eventType, handler) =>
element.addEventListener(eventType, ko.utils.catchFunctionErrors(handler), false),
triggerEvent: (element, eventType) => {
if (!(element && element.nodeType))
throw new Error("element must be a DOM node when calling triggerEvent");
@ -306,7 +276,9 @@ ko.tasks = (() => {
if (nextIndexToProcess > mark) {
if (++countMarks >= 5000) {
nextIndexToProcess = taskQueueLength; // skip all tasks remaining in the queue since any of them could be causing the recursion
ko.utils.deferError(Error("'Too much recursion' after processing " + countMarks + " task groups."));
setTimeout(() => {
throw Error(`'Too much recursion' after processing ${countMarks} task groups.`)
}, 0)
break;
}
mark = taskQueueLength;
@ -314,7 +286,7 @@ ko.tasks = (() => {
try {
task();
} catch (ex) {
ko.utils.deferError(ex);
setTimeout(() => { throw ex }, 0);
}
}
}
@ -381,7 +353,7 @@ function throttle(callback, timeout) {
var timeoutInstance;
return () => {
if (!timeoutInstance) {
timeoutInstance = ko.utils.setTimeout(() => {
timeoutInstance = setTimeout(() => {
timeoutInstance = 0;
callback();
}, timeout);
@ -393,7 +365,7 @@ function debounce(callback, timeout) {
var timeoutInstance;
return () => {
clearTimeout(timeoutInstance);
timeoutInstance = ko.utils.setTimeout(callback, timeout);
timeoutInstance = setTimeout(callback, timeout);
};
}
@ -915,7 +887,7 @@ ko.extenders['trackArrayChanges'] = (target, options) => {
case 'push':
offset = arrayLength;
case 'unshift':
for (var index = 0; index < argsLength; index++) {
for (let index = 0; index < argsLength; index++) {
pushDiff('added', args[index], offset + index);
}
break;
@ -936,7 +908,7 @@ ko.extenders['trackArrayChanges'] = (target, options) => {
endAddIndex = startIndex + argsLength - 2,
endIndex = Math.max(endDeleteIndex, endAddIndex),
additions = [], deletions = [];
for (var index = startIndex, argsIndex = 2; index < endIndex; ++index, ++argsIndex) {
for (let index = startIndex, argsIndex = 2; index < endIndex; ++index, ++argsIndex) {
if (index < endDeleteIndex)
deletions.push(pushDiff('deleted', rawArray[index], index));
if (index < endAddIndex)
@ -1169,7 +1141,7 @@ var computedFn = {
throttleEvaluationTimeout = computedObservable['throttleEvaluation'];
if (throttleEvaluationTimeout && throttleEvaluationTimeout >= 0) {
clearTimeout(this[computedState].evaluationTimeoutInstance);
this[computedState].evaluationTimeoutInstance = ko.utils.setTimeout(() =>
this[computedState].evaluationTimeoutInstance = setTimeout(() =>
computedObservable.evaluateImmediate(true /*notifyChange*/)
, throttleEvaluationTimeout);
} else if (computedObservable._evalDelayed) {
@ -2098,24 +2070,6 @@ ko.expressionRewriting = (() => {
}
};
// Given a function that returns bindings, create and return a new object that contains
// binding value-accessors functions. Each accessor function calls the original function
// so that it always gets the latest value and all dependencies are captured. This is used
// by ko.applyBindingsToNode and getBindingsAndMakeAccessors.
function makeAccessorsFromFunction(callback) {
return ko.utils.objectMap(ko.dependencyDetection.ignore(callback), (value, key) =>
() => callback()[key]
);
}
// Given a bindings function or object, create and return a new object that contains
// binding value-accessors functions. This is used by ko.applyBindingsToNode.
function makeBindingAccessors(bindings, context, node) {
return (typeof bindings === 'function')
? makeAccessorsFromFunction(bindings.bind(null, context, node))
: ko.utils.objectMap(bindings, value => () => value);
}
function validateThatBindingIsAllowedForVirtualElements(bindingName) {
var validator = ko.virtualElements.allowedBindings[bindingName];
if (!validator)
@ -2773,9 +2727,8 @@ ko.expressionRewriting = (() => {
}
})();
var attrHtmlToJavaScriptMap = { 'class': 'className', 'for': 'htmlFor' };
ko.bindingHandlers['attr'] = {
'update': (element, valueAccessor, allBindings) => {
'update': (element, valueAccessor) => {
var value = ko.utils.unwrapObservable(valueAccessor()) || {};
ko.utils.objectForEach(value, function(attrName, attrValue) {
attrValue = ko.utils.unwrapObservable(attrValue);
@ -2787,7 +2740,7 @@ ko.bindingHandlers['attr'] = {
// To cover cases like "attr: { checked:someProp }", we want to remove the attribute entirely
// when someProp is a "no value"-like value (strictly null, false, or undefined)
// (because the absence of the "checked" attr is how to mark an element as not checked, etc.)
var toRemove = (attrValue === false) || (attrValue === null) || (attrValue === undefined);
var toRemove = (attrValue === false) || (attrValue == null);
if (toRemove) {
namespace ? element.removeAttributeNS(namespace, attrName) : element.removeAttribute(attrName);
} else {
@ -2867,7 +2820,7 @@ ko.bindingHandlers['event'] = {
var eventsToHandle = valueAccessor() || {};
ko.utils.objectForEach(eventsToHandle, eventName => {
if (typeof eventName == "string") {
ko.utils.registerEventHandler(element, eventName, function (event) {
element.addEventListener(eventName, function (event) {
var handlerReturnValue;
var handlerFunction = valueAccessor()[eventName];
if (!handlerFunction)
@ -2942,10 +2895,13 @@ ko.bindingHandlers['hasfocus'] = {
var handleElementFocusIn = handleElementFocusChange.bind(null, true);
var handleElementFocusOut = handleElementFocusChange.bind(null, false);
ko.utils.registerEventHandler(element, "focus", handleElementFocusIn);
ko.utils.registerEventHandler(element, "focusin", handleElementFocusIn);
ko.utils.registerEventHandler(element, "blur", handleElementFocusOut);
ko.utils.registerEventHandler(element, "focusout", handleElementFocusOut);
var registerEventHandler = (event, handler) =>
element.addEventListener(event, handler);
registerEventHandler("focus", handleElementFocusIn);
registerEventHandler("focusin", handleElementFocusIn);
registerEventHandler("blur", handleElementFocusOut);
registerEventHandler("focusout", handleElementFocusOut);
// Assume element is not focused (prevents "blur" being called initially)
element[hasfocusLastValue] = false;
@ -2984,10 +2940,10 @@ ko.bindingHandlers['html'] = {
function makeWithIfBinding(bindingKey, isWith, isNot) {
ko.bindingHandlers[bindingKey] = {
'init': (element, valueAccessor, allBindings, viewModel, bindingContext) => {
var didDisplayOnLastUpdate, savedNodes, contextOptions = {}, needAsyncContext;
var savedNodes, contextOptions = {}, needAsyncContext;
if (isWith) {
var as = allBindings.get('as'), noChildContext = false;
var as = allBindings.get('as');
contextOptions = { 'as': as, 'exportDependencies': true };
}
@ -3032,8 +2988,6 @@ function makeWithIfBinding(bindingKey, isWith, isNot) {
ko.bindingEvent.notify(element, ko.bindingEvent.childrenComplete);
}
didDisplayOnLastUpdate = shouldDisplay;
}, { disposeWhenNodeIsRemoved: element });
return { 'controlsDescendantBindings': true };
@ -3210,7 +3164,7 @@ ko.bindingHandlers['style'] = {
ko.utils.objectForEach(value, (styleName, styleValue) => {
styleValue = ko.utils.unwrapObservable(styleValue);
if (styleValue === null || styleValue === undefined || styleValue === false) {
if (styleValue == null || styleValue === false) {
// Empty string removes the value, whereas null/undefined have no effect
styleValue = "";
}
@ -3235,7 +3189,7 @@ ko.bindingHandlers['submit'] = {
'init': (element, valueAccessor, allBindings, viewModel, bindingContext) => {
if (typeof valueAccessor() != "function")
throw new Error("The value for a submit binding must be a function");
ko.utils.registerEventHandler(element, "submit", event => {
element.addEventListener("submit", event => {
var handlerReturnValue;
var value = valueAccessor();
try { handlerReturnValue = value.call(bindingContext['$data'], element); }
@ -3284,26 +3238,15 @@ ko.bindingHandlers['textInput'] = {
}
};
var deferUpdateModel = event => {
if (!timeoutHandle) {
// The elementValueBeforeEvent variable is set *only* during the brief gap between an
// event firing and the updateModel function running. This allows us to ignore model
// 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;
timeoutHandle = ko.utils.setTimeout(updateModel, 4);
}
};
var updateView = () => {
var modelValue = ko.utils.unwrapObservable(valueAccessor());
if (modelValue === null || modelValue === undefined) {
if (modelValue == null) {
modelValue = '';
}
if (elementValueBeforeEvent !== undefined && modelValue === elementValueBeforeEvent) {
ko.utils.setTimeout(updateView, 4);
setTimeout(updateView, 4);
return;
}
@ -3316,7 +3259,7 @@ ko.bindingHandlers['textInput'] = {
};
var onEvent = (event, handler) =>
ko.utils.registerEventHandler(element, event, handler);
element.addEventListener(event, handler);
onEvent('input', updateModel);
@ -3350,6 +3293,8 @@ ko.bindingHandlers['value'] = {
var eventsToCatch = new Set;
var requestedEventsToCatch = allBindings.get("valueUpdate");
var elementValueBeforeEvent = null;
var registerEventHandler = (event, handler) =>
element.addEventListener(event, handler);
if (requestedEventsToCatch) {
// Allow both individual event names, and arrays of event names
@ -3373,7 +3318,7 @@ ko.bindingHandlers['value'] = {
// This is useful, for example, to catch "keydown" events after the browser has updated the control
// (otherwise, ko.selectExtensions.readValue(this) will receive the control's value *before* the key event)
var handler = valueUpdateHandler;
if (ko.utils.stringStartsWith(eventName, "after")) {
if ((eventName||'').startsWith("after")) {
handler = () => {
// The elementValueBeforeEvent variable is non-null *only* during the brief gap between
// a keyX event firing and the valueUpdateHandler running, which is scheduled to happen
@ -3383,11 +3328,11 @@ ko.bindingHandlers['value'] = {
// techniques like rateLimit can trigger model changes at critical moments that will
// override the user's inputs, causing keystrokes to be lost.
elementValueBeforeEvent = ko.selectExtensions.readValue(element);
ko.utils.setTimeout(valueUpdateHandler, 0);
setTimeout(valueUpdateHandler, 0);
};
eventName = eventName.substring("after".length);
eventName = eventName.substring(5);
}
ko.utils.registerEventHandler(element, eventName, handler);
registerEventHandler(eventName, handler);
});
var updateFromModel;
@ -3396,7 +3341,7 @@ ko.bindingHandlers['value'] = {
// For file input elements, can only write the empty string
updateFromModel = () => {
var newValue = ko.utils.unwrapObservable(valueAccessor());
if (newValue === null || newValue === undefined || newValue === "") {
if (newValue == null || newValue === "") {
element.value = "";
} else {
ko.dependencyDetection.ignore(valueUpdateHandler); // reset the model to match the element
@ -3408,7 +3353,7 @@ ko.bindingHandlers['value'] = {
var elementValue = ko.selectExtensions.readValue(element);
if (elementValueBeforeEvent !== null && newValue === elementValueBeforeEvent) {
ko.utils.setTimeout(updateFromModel, 0);
setTimeout(updateFromModel, 0);
return;
}
@ -3434,7 +3379,7 @@ ko.bindingHandlers['value'] = {
var updateFromModelComputed;
ko.bindingEvent.subscribe(element, ko.bindingEvent.childrenComplete, () => {
if (!updateFromModelComputed) {
ko.utils.registerEventHandler(element, "change", valueUpdateHandler);
registerEventHandler("change", valueUpdateHandler);
updateFromModelComputed = ko.computed(updateFromModel, { disposeWhenNodeIsRemoved: element });
} else if (allBindings.get('valueAllowUnset')) {
updateFromModel();
@ -3443,7 +3388,7 @@ ko.bindingHandlers['value'] = {
}
}, null, { 'notifyImmediately': true });
} else {
ko.utils.registerEventHandler(element, "change", valueUpdateHandler);
registerEventHandler("change", valueUpdateHandler);
ko.computed(updateFromModel, { disposeWhenNodeIsRemoved: element });
}
},
@ -3587,8 +3532,7 @@ makeEventHandlerShortcut('click');
: null;
}
function executeTemplate(targetNodeOrNodeArray, renderMode, template, bindingContext, options) {
options = options || {};
function executeTemplate(targetNodeOrNodeArray, renderMode, template, bindingContext) {
var firstTargetNode = targetNodeOrNodeArray && getFirstNodeFromPossibleArray(targetNodeOrNodeArray);
var templateDocument = (firstTargetNode || template || {}).ownerDocument;

View file

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

View file

@ -11,7 +11,7 @@ ko.bindingHandlers['attr'] = {
// To cover cases like "attr: { checked:someProp }", we want to remove the attribute entirely
// when someProp is a "no value"-like value (strictly null, false, or undefined)
// (because the absence of the "checked" attr is how to mark an element as not checked, etc.)
var toRemove = (attrValue === false) || (attrValue === null) || (attrValue === undefined);
var toRemove = (attrValue === false) || (attrValue == null);
if (toRemove) {
namespace ? element.removeAttributeNS(namespace, attrName) : element.removeAttribute(attrName);
} else {

View file

@ -4,7 +4,7 @@ ko.bindingHandlers['style'] = {
ko.utils.objectForEach(value, (styleName, styleValue) => {
styleValue = ko.utils.unwrapObservable(styleValue);
if (styleValue === null || styleValue === undefined || styleValue === false) {
if (styleValue == null || styleValue === false) {
// Empty string removes the value, whereas null/undefined have no effect
styleValue = "";
}

View file

@ -20,7 +20,7 @@ ko.bindingHandlers['textInput'] = {
var updateView = () => {
var modelValue = ko.utils.unwrapObservable(valueAccessor());
if (modelValue === null || modelValue === undefined) {
if (modelValue == null) {
modelValue = '';
}

View file

@ -60,7 +60,7 @@ ko.bindingHandlers['value'] = {
// For file input elements, can only write the empty string
updateFromModel = () => {
var newValue = ko.utils.unwrapObservable(valueAccessor());
if (newValue === null || newValue === undefined || newValue === "") {
if (newValue == null || newValue === "") {
element.value = "";
} else {
ko.dependencyDetection.ignore(valueUpdateHandler); // reset the model to match the element

View file

@ -24,8 +24,9 @@ ko.tasks = (() => {
if (nextIndexToProcess > mark) {
if (++countMarks >= 5000) {
nextIndexToProcess = taskQueueLength; // skip all tasks remaining in the queue since any of them could be causing the recursion
setTimeout(() =>
throw Error(`'Too much recursion' after processing ${countMarks} task groups.`), 0)
setTimeout(() => {
throw Error(`'Too much recursion' after processing ${countMarks} task groups.`)
}, 0)
break;
}
mark = taskQueueLength;
@ -33,7 +34,7 @@ ko.tasks = (() => {
try {
task();
} catch (ex) {
setTimeout(() => throw ex, 0);
setTimeout(() => { throw ex }, 0);
}
}
}