diff --git a/src/Framework/Framework/Resources/Scripts/knockout-latest.debug.js b/src/Framework/Framework/Resources/Scripts/knockout-latest.debug.js index 598b57082..d8d3b4629 100644 --- a/src/Framework/Framework/Resources/Scripts/knockout-latest.debug.js +++ b/src/Framework/Framework/Resources/Scripts/knockout-latest.debug.js @@ -1873,7 +1873,6 @@ ko.utils.arrayForEach(["pop", "push", "reverse", "shift", "sort", "splice", "uns // (for consistency with mutating regular observables) var underlyingArray = this.peek(); this.valueWillMutate(); - this.cacheDiffForKnownOperation(underlyingArray, methodName, arguments); var methodCallResult = underlyingArray[methodName].apply(underlyingArray, arguments); applyObservableValidatorIfExists.call(this, underlyingArray); @@ -1901,6 +1900,7 @@ ko.isObservableArray = function (instance) { ko.exportSymbol('observableArray', ko.observableArray); ko.exportSymbol('isObservableArray', ko.isObservableArray); var arrayChangeEventName = 'arrayChange'; +var appliedTrackChangesSymbol = Symbol() ko.extenders['trackArrayChanges'] = function(target, options) { // Use the provided options--each call to trackArrayChanges overwrites the previously set options target.compareArrayOptions = {}; @@ -1910,9 +1910,10 @@ ko.extenders['trackArrayChanges'] = function(target, options) { target.compareArrayOptions['sparse'] = true; // Only modify the target observable once - if (target.cacheDiffForKnownOperation) { + if (target[appliedTrackChangesSymbol]) { return; } + target[appliedTrackChangesSymbol] = true; var trackingChanges = false, cachedDiff = null, changeSubscription, @@ -2003,60 +2004,6 @@ ko.extenders['trackArrayChanges'] = function(target, options) { return cachedDiff; } - - target.cacheDiffForKnownOperation = function(rawArray, operationName, args) { - // Only run if we're currently tracking changes for this observable array - // and there aren't any pending deferred notifications. - if (!trackingChanges || pendingChanges) { - return; - } - var diff = [], - arrayLength = rawArray.length, - argsLength = args.length, - offset = 0; - - function pushDiff(status, value, index) { - return diff[diff.length] = { 'status': status, 'value': value, 'index': index }; - } - switch (operationName) { - case 'push': - offset = arrayLength; - case 'unshift': - for (var index = 0; index < argsLength; index++) { - pushDiff('added', args[index], offset + index); - } - break; - - case 'pop': - offset = arrayLength - 1; - case 'shift': - if (arrayLength) { - pushDiff('deleted', rawArray[offset], offset); - } - break; - - case 'splice': - // Negative start index means 'from end of array'. After that we clamp to [0...arrayLength]. - // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice - var startIndex = Math.min(Math.max(0, args[0] < 0 ? arrayLength + args[0] : args[0]), arrayLength), - endDeleteIndex = argsLength === 1 ? arrayLength : Math.min(startIndex + (args[1] || 0), arrayLength), - endAddIndex = startIndex + argsLength - 2, - endIndex = Math.max(endDeleteIndex, endAddIndex), - additions = [], deletions = []; - for (var index = startIndex, argsIndex = 2; index < endIndex; ++index, ++argsIndex) { - if (index < endDeleteIndex) - deletions.push(pushDiff('deleted', rawArray[index], index)); - if (index < endAddIndex) - additions.push(pushDiff('added', args[argsIndex], index)); - } - ko.utils.findMovesInArrayComparison(deletions, additions); - break; - - default: - return; - } - cachedDiff = diff; - }; }; var computedState = ko.utils.createSymbolOrString('_state'); diff --git a/src/Framework/Framework/Resources/Scripts/knockout-latest.js b/src/Framework/Framework/Resources/Scripts/knockout-latest.js index 4e5185134..cf8b392cf 100644 --- a/src/Framework/Framework/Resources/Scripts/knockout-latest.js +++ b/src/Framework/Framework/Resources/Scripts/knockout-latest.js @@ -4,139 +4,138 @@ * License: MIT (http://www.opensource.org/licenses/mit-license.php) */ -(function() {(function(p){var A=this||(0,eval)("this"),x=A.document,T=A.navigator,v=A.jQuery,I=A.JSON;v||"undefined"===typeof jQuery||(v=jQuery);(function(p){"function"===typeof define&&define.amd?define(["exports","require"],p):"object"===typeof exports&&"object"===typeof module?p(module.exports||exports):p(A.ko={})})(function(U,V){function N(a,c){return null===a||typeof a in Z?a===c:!1}function aa(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=p;b()},c))}}function ba(b,c){var d;return function(){clearTimeout(d); -d=a.a.setTimeout(b,c)}}function ca(a,c){c&&"change"!==c?"beforeChange"===c?this.rc(a):this.hb(a,c):this.sc(a)}function J(a){if(this[P]){var c=this[P].call(this,a).newValue;c!==a&&(this[H]=c)}}function da(a,c){null!==c&&c.u&&c.u()}function ea(a,c){var d=this.sd,e=d[r];e.ua||(this.Sb&&this.nb[c]?(d.wc(c,a,this.nb[c]),this.nb[c]=null,--this.Sb):e.I[c]||d.wc(c,a,e.K?{da:a}:d.bd(a)),a.Ka&&a.jd())}var a="undefined"!==typeof U?U:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;fa.a.A(c,b)&&c.push(b)});return c},Ob:function(a,b,c){var d=[];if(a)for(var e=0,l=a.length;el?d&&b.push(c):d||b.splice(l,1)},Da:g,extend:c,setPrototypeOf:d,Cb:g?d:c,P:b,Ha:function(a,b,c){if(!a)return a;var d={},e;for(e in a)f.call(a,e)&&(d[e]=b.call(c,a[e],e,a));return d},Vb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},$b:function(b){b=a.a.ma(b);for(var c=(b[0]&&b[0].ownerDocument||x).createElement("div"),d=0,e=b.length;dq?a.setAttribute("selected",b):a.selected=b},Fb:function(a){return null===a||a===p?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Xd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},xd:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)& -16);for(;a&&a!=b;)a=a.parentNode;return!!a},Ub:function(b){return a.a.xd(b,b.ownerDocument.documentElement)},md:function(b){return!!a.a.Nb(b,a.a.Ub)},R:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Cc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Cc(b),c)},Ic:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},C:function(b,c,d){var e=a.a.Cc(d); -d=l[c];if(!a.options.useOnlyNativeEvents&&!d&&v)y||(y="function"==typeof v(b).on?"on":"bind"),v(b)[y](c,e);else if(!d&&"function"==typeof b.addEventListener)b.addEventListener(c,e,!1);else if("undefined"!=typeof b.attachEvent){var k=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,k);a.a.L.Ba(b,function(){b.detachEvent(f,k)})}},Hb:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.R(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type, -d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof x.createEvent)if("function"==typeof b.dispatchEvent)d=x.createEvent(k[c]||"HTMLEvents"),d.initEvent(c,!0,!0,A,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.J(b)? -b():b},$d:function(b){return a.J(b)?b:a.ia(b)},wb:function(b){return a.J(b)?b.v():b},Gb:function(b,c,d){var l;c&&("object"===typeof b.classList?(l=b.classList[d?"add":"remove"],a.a.F(c.match(n),function(a){l.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Db:function(b,c){var d=a.a.c(c);if(null===d||d===p)d="";var e=a.h.firstChild(b);!e||3!=e.nodeType||a.h.nextSibling(e)?a.h.xa(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Cd(b)}, -$c:function(a,b){a.name=b;if(7>=q)try{var c=a.name.replace(/[&<>'"]/g,function(a){return"&#"+a.charCodeAt(0)+";"});a.mergeAttributes(x.createElement(""),!1)}catch(d){}},Cd:function(a){9<=q&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},yd:function(a){if(q){var b=a.style.width;a.style.width=0;a.style.width=b}},Rd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},ma:function(a){for(var b=[],c=0,d=a.length;cl?d&&b.push(c):d||b.splice(l,1)},Da:g,extend:c,setPrototypeOf:d,Cb:g?d:c,P:b,Ha:function(a,b,c){if(!a)return a;var d={},e;for(e in a)f.call(a,e)&&(d[e]=b.call(c,a[e],e,a));return d},Vb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},$b:function(b){b=a.a.ma(b);for(var c=(b[0]&&b[0].ownerDocument||y).createElement("div"),d=0,e=b.length;dp?a.setAttribute("selected",b):a.selected=b},Fb:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Wd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},vd:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)& +16);for(;a&&a!=b;)a=a.parentNode;return!!a},Ub:function(b){return a.a.vd(b,b.ownerDocument.documentElement)},kd:function(b){return!!a.a.Nb(b,a.a.Ub)},R:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Bc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Bc(b),c)},Hc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},C:function(b,c,d){var e=a.a.Bc(d); +d=l[c];if(!a.options.useOnlyNativeEvents&&!d&&v)x||(x="function"==typeof v(b).on?"on":"bind"),v(b)[x](c,e);else if(!d&&"function"==typeof b.addEventListener)b.addEventListener(c,e,!1);else if("undefined"!=typeof b.attachEvent){var k=function(a){e.call(b,a)},f="on"+c;b.attachEvent(f,k);a.a.L.Ba(b,function(){b.detachEvent(f,k)})}},Hb:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.R(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type, +d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof y.createEvent)if("function"==typeof b.dispatchEvent)d=y.createEvent(k[c]||"HTMLEvents"),d.initEvent(c,!0,!0,A,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.J(b)? +b():b},Zd:function(b){return a.J(b)?b:a.ia(b)},wb:function(b){return a.J(b)?b.v():b},Gb:function(b,c,d){var l;c&&("object"===typeof b.classList?(l=b.classList[d?"add":"remove"],a.a.F(c.match(q),function(a){l.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Db:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.h.firstChild(b);!e||3!=e.nodeType||a.h.nextSibling(e)?a.h.xa(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Bd(b)}, +Yc:function(a,b){a.name=b;if(7>=p)try{var c=a.name.replace(/[&<>'"]/g,function(a){return"&#"+a.charCodeAt(0)+";"});a.mergeAttributes(y.createElement(""),!1)}catch(d){}},Bd:function(a){9<=p&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},wd:function(a){if(p){var b=a.style.width;a.style.width=0;a.style.width=b}},Qd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},ma:function(a){for(var b=[],c=0,d=a.length;c",""],d=[3,"","
"],e=[1,""],f={thead:c,tbody:c,tfoot:c,tr:[2,"","
"],td:d,th:d,option:e,optgroup:e},g=8>=a.a.W;a.a.wa=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var l=e[0];l.parentNode&&11!==l.parentNode.nodeType;)l=l.parentNode; -l.parentNode&&l.parentNode.removeChild(l)}}else{(e=d)||(e=x);var l=e.parentWindow||e.defaultView||A,q=a.a.Fb(c).toLowerCase(),n=e.createElement("div"),y;y=(q=q.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&f[q[1]]||b;q=y[0];y="ignored
"+y[1]+c+y[2]+"
";"function"==typeof l.innerShiv?n.appendChild(l.innerShiv(y)):(g&&e.body.appendChild(n),n.innerHTML=y,g&&n.parentNode.removeChild(n));for(;q--;)n=n.lastChild;e=a.a.ma(n.lastChild.childNodes)}return e};a.a.Od=function(b,c){var d=a.a.wa(b, -c);return d.length&&d[0].parentElement||a.a.$b(d)};a.a.hc=function(b,c){a.a.Vb(b);c=a.a.c(c);if(null!==c&&c!==p)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.wa(c,b.ownerDocument),e=0;eb){if(5E3<= -++c){h=f;a.a.Ic(Error("'Too much recursion' after processing "+c+" task groups."));break}b=f}try{d()}catch(g){a.a.Ic(g)}}}function c(){b();h=f=e.length=0}var d,e=[],f=0,g=1,h=0;A.MutationObserver?d=function(a){var b=x.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):d=x&&"onreadystatechange"in x.createElement("script")?function(a){var b=x.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;x.documentElement.removeChild(b); -b=null;a()};x.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,Bb:function(b){f||a.oa.scheduler(c);e[f++]=b;return g++},cancel:function(a){a=a-(g-f);a>=h&&a]/))&&f[p[1]]||b;p=x[0];x="ignored
"+x[1]+c+x[2]+"
";"function"==typeof l.innerShiv?q.appendChild(l.innerShiv(x)):(g&&e.body.appendChild(q),q.innerHTML=x,g&&q.parentNode.removeChild(q));for(;p--;)q=q.lastChild;e=a.a.ma(q.lastChild.childNodes)}return e};a.a.Nd=function(b,c){var d=a.a.wa(b, +c);return d.length&&d[0].parentElement||a.a.$b(d)};a.a.hc=function(b,c){a.a.Vb(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.wa(c,b.ownerDocument),e=0;eb){if(5E3<= +++c){h=f;a.a.Hc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=f}try{d()}catch(p){a.a.Hc(p)}}}function c(){b();h=f=e.length=0}var d,e=[],f=0,g=1,h=0;A.MutationObserver?d=function(a){var b=y.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):d=y&&"onreadystatechange"in y.createElement("script")?function(a){var b=y.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;y.documentElement.removeChild(b); +b=null;a()};y.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,Bb:function(b){f||a.oa.scheduler(c);e[f++]=b;return g++},cancel:function(a){a=a-(g-f);a>=h&&ad[0]?q+d[0]:d[0]),q);for(var q=1===g?q:Math.min(c+(d[1]||0),q),g=c+g-2,h=Math.max(q,g),W=[],X=[],p=2;cc;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.cd(b);return a.a.jc(b,c,d)};d.prototype={constructor:d,save:function(b,c){var d=a.a.A(this.keys,b);0<=d?this.values[d]=c:(this.keys.push(b),this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:p}}})();a.b("toJS",a.cd);a.b("toJSON",a.toJSON);a.Zd=function(b,c,d){function e(c){var e=a.zb(b,d).extend({na:"always"}),h=e.subscribe(function(a){a&&(h.u(),c(a))});e.notifySubscribers(e.v()); -return h}return"function"!==typeof Promise||c?e(c.bind(d)):new Promise(e)};a.b("when",a.Zd);(function(){a.w={N:function(b){switch(a.a.R(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.g.get(b,a.f.options.bc):7>=a.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.w.N(b.options[b.selectedIndex]):p;default:return b.value}},eb:function(b,c,d){switch(a.a.R(b)){case "option":"string"===typeof c?(a.a.g.set(b, -a.f.options.bc,p),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.g.set(b,a.f.options.bc,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:"");break;case "select":if(""===c||null===c)c=p;for(var e=-1,f=0,g=b.options.length,h;f=h){c.push(q&&n.length?{key:q,value:n.join("")}:{unknown:q||n.join("")});q=h=0;n=[];continue}}else if(58===u){if(!h&&!q&&1===n.length){q=n.pop();continue}}else if(47===u&&1c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.ad(b);return a.a.jc(b,c,d)};d.prototype={constructor:d,save:function(b,c){var d=a.a.A(this.keys,b);0<=d?this.values[d]=c:(this.keys.push(b),this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:n}}})();a.b("toJS",a.ad);a.b("toJSON",a.toJSON);a.Yd=function(b,c,d){function e(c){var e=a.zb(b,d).extend({na:"always"}),h=e.subscribe(function(a){a&&(h.u(),c(a))});e.notifySubscribers(e.v()); +return h}return"function"!==typeof Promise||c?e(c.bind(d)):new Promise(e)};a.b("when",a.Yd);(function(){a.w={N:function(b){switch(a.a.R(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.g.get(b,a.f.options.bc):7>=a.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.w.N(b.options[b.selectedIndex]):n;default:return b.value}},eb:function(b,c,d){switch(a.a.R(b)){case "option":"string"===typeof c?(a.a.g.set(b, +a.f.options.bc,n),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.g.set(b,a.f.options.bc,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:"");break;case "select":if(""===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,h;f=h){c.push(p&&q.length?{key:p,value:q.join("")}:{unknown:p||q.join("")});p=h=0;q=[];continue}}else if(58===u){if(!h&&!p&&1===q.length){p=q.pop();continue}}else if(47===u&&1arguments.length){if(b=x.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?"); -}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");k(n(a,c),b)};a.Fc=function(b){return!b||1!==b.nodeType&&8!==b.nodeType?p:a.Wd(b)};a.Gc=function(b){return(b=a.Fc(b))?b.$data:p};a.b("bindingHandlers",a.f);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.Eb);a.b("applyBindings",a.xc);a.b("applyBindingsToDescendants",a.Pa); -a.b("applyBindingAccessorsToNode",a.jb);a.b("applyBindingsToNode",a.nd);a.b("contextFor",a.Fc);a.b("dataFor",a.Gc)})();(function(b){function c(c,e){var k=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,l;k?k.subscribe(e):(k=f[c]=new a.T,k.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Id:e};delete f[c];l||e?k.notifySubscribers(b):a.oa.Bb(function(){k.notifySubscribers(b)})}),l=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a, -c)}):b(null,null)})}function e(c,d,f,l){l||(l=a.j.loaders.slice(0));var g=l.shift();if(g){var n=g[c];if(n){var y=!1;if(n.apply(g,d.concat(function(a){y?f(null):null!==a?f(a):e(c,d,f,l)}))!==b&&(y=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,l)}else f(null)}var f={},g={};a.j={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;f?f.Id?a.s.B(function(){e(f.definition)}): -a.oa.Bb(function(){e(f.definition)}):c(d,e)},Dc:function(a){delete g[a]},qc:e};a.j.loaders=[];a.b("components",a.j);a.b("components.get",a.j.get);a.b("components.clearCachedDefinition",a.j.Dc)})();(function(){function b(b,c,d,e){function g(){0===--w&&e(h)}var h={},w=2,u=d.template;d=d.viewModel;u?f(c,u,function(c){a.j.qc("loadTemplate",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.j.qc("loadViewModel",[b,c],function(a){h[m]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)}); +d=a.h.firstChild(c)}for(;e=d;)d=a.h.nextSibling(e),k(b,e)}a.i.na(c,a.i.H)}function k(b,c){var d=b,e=1===c.nodeType;e&&a.h.Sc(c);if(e||a.ga.instance.nodeHasBindings(c))d=p(c,null,b).bindingContextForDescendants;d&&!u[a.a.R(c)]&&m(d,c)}function l(b){var c=[],d={},e=[];a.a.P(b,function ea(f){if(!d[f]){var k=a.getBindingHandler(f);k&&(k.after&&(e.push(f),a.a.F(k.after,function(c){if(b[c]){if(-1!==a.a.A(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", ")); +ea(c)}}),e.length--),c.push({key:f,Mc:k}));d[f]=!0}});return c}function p(b,c,d){var f=a.a.g.Wb(b,C,{}),k=f.hd;if(!c){if(k)throw Error("You cannot apply bindings multiple times to the same element.");f.hd=!0}k||(f.context=d);f.ac||(f.ac={});var g;if(c&&"function"!==typeof c)g=c;else{var p=a.ga.instance,q=p.getBindingAccessors||h,m=a.$(function(){if(g=c?c(d,b):q.call(p,b,d)){if(d[x])d[x]();if(d[w])d[w]()}return g},null,{l:b});g&&m.ka()||(m=null)}var u=d,t;if(g){var K=function(){return a.a.Ha(m?m(): +g,e)},r=m?function(a){return function(){return e(m()[a])}}:function(a){return g[a]};K.get=function(a){return g[a]&&e(r(a))};K.has=function(a){return a in g};a.i.H in g&&a.i.subscribe(b,a.i.H,function(){var c=(0,g[a.i.H])();if(c){var d=a.h.childNodes(b);d.length&&c(d,a.Fc(d[0]))}});a.i.sa in g&&(u=a.i.Eb(b,d),a.i.subscribe(b,a.i.sa,function(){var c=(0,g[a.i.sa])();c&&a.h.firstChild(b)&&c(b)}));f=l(g);a.a.F(f,function(c){var d=c.Mc.init,e=c.Mc.update,f=c.key;if(8===b.nodeType&&!a.h.ea[f])throw Error("The binding '"+ +f+"' cannot be used with virtual elements");try{"function"==typeof d&&a.s.B(function(){var a=d(b,r(f),K,u.$data,u);if(a&&a.controlsDescendantBindings){if(t!==n)throw Error("Multiple bindings ("+t+" and "+f+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");t=f}}),"function"==typeof e&&a.$(function(){e(b,r(f),K,u.$data,u)},null,{l:b})}catch(k){throw k.message='Unable to process binding "'+f+": "+g[f]+'"\nMessage: '+k.message, +k;}})}f=t===n;return{shouldBindDescendants:f,bindingContextForDescendants:f&&u}}function q(b,c){return b&&b instanceof a.fa?b:new a.fa(b,n,n,c)}var x=a.a.qa("_subscribable"),t=a.a.qa("_ancestorBindingInfo"),w=a.a.qa("_dataDependency");a.f={};var u={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.f[b]};var K={};a.fa=function(b,c,d,e,f){function k(){var b=p?h():h,f=a.a.c(b);c?(a.a.extend(l,c),t in c&&(l[t]=c[t])):(l.$parents=[],l.$root=f,l.ko=a);l[x]=q;g?f=l.$data:(l.$rawData= +b,l.$data=f);d&&(l[d]=f);e&&e(l,c,f);if(c&&c[x]&&!a.S.o().Xb(c[x]))c[x]();m&&(l[w]=m);return l.$data}var l=this,g=b===K,h=g?n:b,p="function"==typeof h&&!a.J(h),q,m=f&&f.dataDependency;f&&f.exportDependencies?k():(q=a.zb(k),q.v(),q.ka()?q.equalityComparer=null:l[x]=n)};a.fa.prototype.createChildContext=function(b,c,d,e){!e&&c&&"object"==typeof c&&(e=c,c=e.as,d=e.extend);if(c&&e&&e.noChildContext){var f="function"==typeof b&&!a.J(b);return new a.fa(K,this,null,function(a){d&&d(a);a[c]=f?b():b},e)}return new a.fa(b, +this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)},e)};a.fa.prototype.extend=function(b,c){return new a.fa(K,this,null,function(c){a.a.extend(c,"function"==typeof b?b(c):b)},c)};var C=a.a.g.Z();c.prototype.Tc=function(){this.Mb&&this.Mb.O&&this.Mb.O.sd(this.node)};c.prototype.sd=function(b){a.a.Qa(this.lb,b);!this.lb.length&&this.H&&this.Dc()};c.prototype.Dc=function(){this.H=!0;this.Ac.O&&!this.lb.length&&(this.Ac.O= +null,a.a.L.Ab(this.node,b),a.i.na(this.node,a.i.sa),this.Tc())};a.i={H:"childrenComplete",sa:"descendantsComplete",subscribe:function(b,c,d,e,f){var k=a.a.g.Wb(b,C,{});k.Ga||(k.Ga=new a.T);f&&f.notifyImmediately&&k.ac[c]&&a.s.B(d,e,[b]);return k.Ga.subscribe(d,e,c)},na:function(b,c){var d=a.a.g.get(b,C);if(d&&(d.ac[c]=!0,d.Ga&&d.Ga.notifySubscribers(b,c),c==a.i.H))if(d.O)d.O.Dc();else if(d.O===n&&d.Ga&&d.Ga.Xa(a.i.sa))throw Error("descendantsComplete event not supported for bindings on this node"); +},Eb:function(b,d){var e=a.a.g.Wb(b,C,{});e.O||(e.O=new c(b,e,d[t]));return d[t]==e?d:d.extend(function(a){a[t]=e})}};a.Vd=function(b){return(b=a.a.g.get(b,C))&&b.context};a.jb=function(b,c,d){1===b.nodeType&&a.h.Sc(b);return p(b,c,q(d))};a.ld=function(b,c,d){d=q(d);return a.jb(b,g(c,d,b),d)};a.Pa=function(a,b){1!==b.nodeType&&8!==b.nodeType||m(q(a),b)};a.xc=function(a,b,c){!v&&A.jQuery&&(v=A.jQuery);if(2>arguments.length){if(b=y.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?"); +}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");k(q(a,c),b)};a.Ec=function(b){return!b||1!==b.nodeType&&8!==b.nodeType?n:a.Vd(b)};a.Fc=function(b){return(b=a.Ec(b))?b.$data:n};a.b("bindingHandlers",a.f);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.Eb);a.b("applyBindings",a.xc);a.b("applyBindingsToDescendants",a.Pa); +a.b("applyBindingAccessorsToNode",a.jb);a.b("applyBindingsToNode",a.ld);a.b("contextFor",a.Ec);a.b("dataFor",a.Fc)})();(function(b){function c(c,e){var k=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,l;k?k.subscribe(e):(k=f[c]=new a.T,k.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Hd:e};delete f[c];l||e?k.notifySubscribers(b):a.oa.Bb(function(){k.notifySubscribers(b)})}),l=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a, +c)}):b(null,null)})}function e(c,d,f,l){l||(l=a.j.loaders.slice(0));var g=l.shift();if(g){var q=g[c];if(q){var x=!1;if(q.apply(g,d.concat(function(a){x?f(null):null!==a?f(a):e(c,d,f,l)}))!==b&&(x=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,l)}else f(null)}var f={},g={};a.j={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;f?f.Hd?a.s.B(function(){e(f.definition)}): +a.oa.Bb(function(){e(f.definition)}):c(d,e)},Cc:function(a){delete g[a]},qc:e};a.j.loaders=[];a.b("components",a.j);a.b("components.get",a.j.get);a.b("components.clearCachedDefinition",a.j.Cc)})();(function(){function b(b,c,d,e){function g(){0===--w&&e(h)}var h={},w=2,u=d.template;d=d.viewModel;u?f(c,u,function(c){a.j.qc("loadTemplate",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.j.qc("loadViewModel",[b,c],function(a){h[m]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)}); else if("function"===typeof b[m])d(b[m]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.R(b)){case "script":return a.a.wa(b.text);case "textarea":return a.a.wa(b.value);case "template":if(e(b.content))return a.a.Ea(b.content.childNodes)}return a.a.Ea(b.childNodes)}function e(a){return A.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require? -V||A.require?(V||A.require)([b.require],function(a){a&&"object"===typeof a&&a.ae&&a["default"]&&(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var h={};a.j.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.j.ub(b))throw Error("Component "+b+" is already registered");h[b]=c};a.j.ub=function(a){return Object.prototype.hasOwnProperty.call(h,a)};a.j.unregister=function(b){delete h[b]; -a.j.Dc(b)};a.j.Hc={getConfig:function(b,c){c(a.j.ub(b)?h[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.wa(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.ma(c.childNodes));else if(c.element)if(c=c.element,A.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var h=x.getElementById(c);h?f(d(h)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+ -c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var m="createViewModel";a.b("components.register",a.j.register);a.b("components.isRegistered",a.j.ub);a.b("components.unregister",a.j.unregister);a.b("components.defaultLoader",a.j.Hc);a.j.loaders.push(a.j.Hc);a.j.fd=h})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ha(f,function(c){return a.o(c,null,{l:b})}),g=a.a.Ha(f, +V||A.require?(V||A.require)([b.require],function(a){a&&"object"===typeof a&&a.$d&&a["default"]&&(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var h={};a.j.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.j.ub(b))throw Error("Component "+b+" is already registered");h[b]=c};a.j.ub=function(a){return Object.prototype.hasOwnProperty.call(h,a)};a.j.unregister=function(b){delete h[b]; +a.j.Cc(b)};a.j.Gc={getConfig:function(b,c){c(a.j.ub(b)?h[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.wa(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.ma(c.childNodes));else if(c.element)if(c=c.element,A.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var h=y.getElementById(c);h?f(d(h)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+ +c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var m="createViewModel";a.b("components.register",a.j.register);a.b("components.isRegistered",a.j.ub);a.b("components.unregister",a.j.unregister);a.b("components.defaultLoader",a.j.Gc);a.j.loaders.push(a.j.Gc);a.j.dd=h})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ha(f,function(c){return a.o(c,null,{l:b})}),g=a.a.Ha(f, function(c){var e=c.v();return c.ka()?a.o({read:function(){return a.a.c(c())},write:a.$a(e)&&function(a){c()(a)},l:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.j.getComponentNameForNode=function(b){var c=a.a.R(b);if(a.j.ub(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.W&&b.tagName===c))return c};a.j.vc=function(c,e,f,g){if(1===e.nodeType){var h=a.j.getComponentNameForNode(e);if(h){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component'); -var m={name:h,params:b(e,f)};c.component=g?function(){return m}:m}}return c};var c=new a.ga;9>a.a.W&&(a.j.register=function(a){return function(b){return a.apply(this,arguments)}}(a.j.register),x.createDocumentFragment=function(b){return function(){var c=b(),f=a.j.fd,g;for(g in f);return c}}(x.createDocumentFragment))})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.Ea(c);a.h.xa(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a, -b,c):b}var d=0;a.f.component={init:function(e,f,g,h,m){function k(){var a=l&&l.dispose;"function"===typeof a&&a.call(l);n&&n.u();q=l=n=null}var l,q,n,y=a.a.ma(a.h.childNodes(e));a.h.Fa(e);a.a.L.Ba(e,k);a.o(function(){var g=a.a.c(f()),h,u;"string"===typeof g?h=g:(h=a.a.c(g.name),u=a.a.c(g.params));if(!h)throw Error("No component name specified");var p=a.i.Eb(e,m),C=q=++d;a.j.get(h,function(d){if(q===C){k();if(!d)throw Error("Unknown component '"+h+"'");b(h,d,e);var f=c(d,u,{element:e,templateNodes:y}); -d=p.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=y}});f&&f.koDescendantsComplete&&(n=a.i.subscribe(e,a.i.sa,f.koDescendantsComplete,f));l=f;a.Pa(d,e)}})},null,{l:e});return{controlsDescendantBindings:!0}}};a.h.ea.component=!0})();var Y={"class":"className","for":"htmlFor"};a.f.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.P(d,function(c,d){d=a.a.c(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0=a.a.W&&c in Y?(c=Y[c],h?b.removeAttribute(c):b[c]=d):h||(g?b.setAttributeNS(g,c,d):b.setAttribute(c,d));"name"===c&&a.a.$c(b,h?"":d)})}};(function(){a.f.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=g();if(!a.S.Za()&&(e||!l&&!a.S.ta())){var q=a.s.B(c);if(n){var t=y?q.v():q,r=w;w=f;r!==f?e&&(a.a.Oa(t,f,!0,h,m),a.a.Oa(t,r,!1,h,m)):a.a.Oa(t,f,e,h,m);y&&a.$a(q)&&q(t)}else k&&(f===p?f=e:e|| -(f=p)),a.m.fb(q,d,"checked",f,!0)}}function f(){var d=a.a.c(c()),e=g();n?(b.checked=0<=a.a.A(d,e,h,m),w=e):b.checked=k&&e===p?!!d:m?m(g())===m(d):g()===d}var g=a.zb(function(){if(d.has("checkedValue"))return a.a.c(d.get("checkedValue"));if(t)return d.has("value")?a.a.c(d.get("value")):b.value}),h=d.has("checkedArrayContainsObservables")&&d.get("checkedArrayContainsObservables"),m=d.get("checkedValueComparer"),k="checkbox"==b.type,l="radio"==b.type;if(k||l){var q=c(),n=k&&a.a.c(q)instanceof Array, -y=!(n&&q.push&&q.splice),t=l||n,w=n?g():p;l&&!b.name&&a.f.uniqueName.init(b,function(){return!0});a.o(e,null,{l:b});a.a.C(b,"click",e);a.o(f,null,{l:b});q=p}}};a.m.ya.checked=!0;a.f.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.f["class"]={update:function(b,c){var d=a.a.Fb(a.a.c(c()));a.a.Gb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.Gb(b,d,!0)}};a.f.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.P(d,function(c,d){d=a.a.c(d);a.a.Gb(b,c,d)}):a.f["class"].update(b, -c)}};a.f.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.f.disable={update:function(b,c){a.f.enable.update(b,function(){return!a.a.c(c())})}};a.f.event={init:function(b,c,d,e,f){var g=c()||{};a.a.P(g,function(g){"string"==typeof g&&a.a.C(b,g,function(b){var k,l=c()[g];if(l){try{var q=a.a.ma(arguments);e=f.$data;q.unshift(e);k=l.apply(e,q)}finally{!0!==k&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+ -"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.f.foreach={Tc:function(b){return function(){var c=b(),d=a.a.wb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.ba.Na};a.a.c(c);return{foreach:d.data,separatorTemplate:d.separatorTemplate,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.ba.Na}}}, -init:function(b,c){return a.f.template.init(b,a.f.foreach.Tc(c))},update:function(b,c,d,e,f){return a.f.template.update(b,a.f.foreach.Tc(c),d,e,f)}};a.m.Sa.foreach=!1;a.h.ea.foreach=!0;a.f.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var k;try{k=f.activeElement}catch(g){k=f.body}e=k===b}f=c();a.m.fb(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.C(b,"focus", +var m={name:h,params:b(e,f)};c.component=g?function(){return m}:m}}return c};var c=new a.ga;9>a.a.W&&(a.j.register=function(a){return function(b){return a.apply(this,arguments)}}(a.j.register),y.createDocumentFragment=function(b){return function(){var c=b(),f=a.j.dd,g;for(g in f);return c}}(y.createDocumentFragment))})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.Ea(c);a.h.xa(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a, +b,c):b}var d=0;a.f.component={init:function(e,f,g,h,m){function k(){var a=l&&l.dispose;"function"===typeof a&&a.call(l);q&&q.u();p=l=q=null}var l,p,q,x=a.a.ma(a.h.childNodes(e));a.h.Fa(e);a.a.L.Ba(e,k);a.o(function(){var g=a.a.c(f()),h,u;"string"===typeof g?h=g:(h=a.a.c(g.name),u=a.a.c(g.params));if(!h)throw Error("No component name specified");var n=a.i.Eb(e,m),C=p=++d;a.j.get(h,function(d){if(p===C){k();if(!d)throw Error("Unknown component '"+h+"'");b(h,d,e);var f=c(d,u,{element:e,templateNodes:x}); +d=n.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=x}});f&&f.koDescendantsComplete&&(q=a.i.subscribe(e,a.i.sa,f.koDescendantsComplete,f));l=f;a.Pa(d,e)}})},null,{l:e});return{controlsDescendantBindings:!0}}};a.h.ea.component=!0})();var X={"class":"className","for":"htmlFor"};a.f.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.P(d,function(c,d){d=a.a.c(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0=a.a.W&&c in X?(c=X[c],h?b.removeAttribute(c):b[c]=d):h||(g?b.setAttributeNS(g,c,d):b.setAttribute(c,d));"name"===c&&a.a.Yc(b,h?"":d)})}};(function(){a.f.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=g();if(!a.S.Za()&&(e||!l&&!a.S.ta())){var p=a.s.B(c);if(q){var t=x?p.v():p,r=w;w=f;r!==f?e&&(a.a.Oa(t,f,!0,h,m),a.a.Oa(t,r,!1,h,m)):a.a.Oa(t,f,e,h,m);x&&a.$a(p)&&p(t)}else k&&(f===n?f=e:e|| +(f=n)),a.m.fb(p,d,"checked",f,!0)}}function f(){var d=a.a.c(c()),e=g();q?(b.checked=0<=a.a.A(d,e,h,m),w=e):b.checked=k&&e===n?!!d:m?m(g())===m(d):g()===d}var g=a.zb(function(){if(d.has("checkedValue"))return a.a.c(d.get("checkedValue"));if(t)return d.has("value")?a.a.c(d.get("value")):b.value}),h=d.has("checkedArrayContainsObservables")&&d.get("checkedArrayContainsObservables"),m=d.get("checkedValueComparer"),k="checkbox"==b.type,l="radio"==b.type;if(k||l){var p=c(),q=k&&a.a.c(p)instanceof Array, +x=!(q&&p.push&&p.splice),t=l||q,w=q?g():n;l&&!b.name&&a.f.uniqueName.init(b,function(){return!0});a.o(e,null,{l:b});a.a.C(b,"click",e);a.o(f,null,{l:b});p=n}}};a.m.ya.checked=!0;a.f.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.f["class"]={update:function(b,c){var d=a.a.Fb(a.a.c(c()));a.a.Gb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.Gb(b,d,!0)}};a.f.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.P(d,function(c,d){d=a.a.c(d);a.a.Gb(b,c,d)}):a.f["class"].update(b, +c)}};a.f.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.f.disable={update:function(b,c){a.f.enable.update(b,function(){return!a.a.c(c())})}};a.f.event={init:function(b,c,d,e,f){var g=c()||{};a.a.P(g,function(g){"string"==typeof g&&a.a.C(b,g,function(b){var k,l=c()[g];if(l){try{var p=a.a.ma(arguments);e=f.$data;p.unshift(e);k=l.apply(e,p)}finally{!0!==k&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+ +"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.f.foreach={Rc:function(b){return function(){var c=b(),d=a.a.wb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.ba.Na};a.a.c(c);return{foreach:d.data,separatorTemplate:d.separatorTemplate,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.ba.Na}}}, +init:function(b,c){return a.f.template.init(b,a.f.foreach.Rc(c))},update:function(b,c,d,e,f){return a.f.template.update(b,a.f.foreach.Rc(c),d,e,f)}};a.m.Sa.foreach=!1;a.h.ea.foreach=!0;a.f.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var k;try{k=f.activeElement}catch(g){k=f.body}e=k===b}f=c();a.m.fb(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.C(b,"focus", f);a.a.C(b,"focusin",f);a.a.C(b,"blur",g);a.a.C(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.s.B(a.a.Hb,null,[b,d?"focusin":"focusout"]))}};a.m.ya.hasfocus=!0;a.f.hasFocus=a.f.hasfocus;a.m.ya.hasFocus="hasfocus";a.f.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.hc(b,c())}};(function(){function b(b, -d,e){a.f[b]={init:function(b,c,h,m,k){var l,q,n={},y,t,w;if(d){m=h.get("as");var u=h.get("noChildContext");w=!(m&&u);n={as:m,noChildContext:u,exportDependencies:w}}t=(y="render"==h.get("completeOn"))||h.has(a.i.sa);a.o(function(){var h=a.a.c(c()),m=d?null!=h:!e!==!h,u=!q,p;if(w||m!==l){t&&(k=a.i.Eb(b,k));if(m){if(!d||w)n.dataDependency=a.S.o();p=d?k.createChildContext("function"==typeof h?h:c,n):a.S.ta()?k.extend(null,n):k}u&&a.S.ta()&&(q=a.a.Ea(a.h.childNodes(b),!0));m?(u||a.h.xa(b,a.a.Ea(q)),a.Pa(p, -b)):(a.h.Fa(b),y||a.i.na(b,a.i.H));l=m}},null,{l:b});return{controlsDescendantBindings:!0}}};a.m.Sa[b]=!1;a.h.ea[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.f.let={init:function(b,c,d,e,f){c=f.extend(c);a.Pa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.let=!0;var S={};a.f.options={init:function(b){if("select"!==a.a.R(b))throw Error("options binding applies only to SELECT elements");for(;0g)var m=a.a.g.Z(),k=a.a.g.Z(),l=function(b){var c=this.activeElement;(c=c&&a.a.g.get(c,k))&&c(b)},q=function(b,c){var d=b.ownerDocument;a.a.g.get(d,m)||(a.a.g.set(d,m,!0),a.a.C(d,"selectionchange",l));a.a.g.set(b,k,c)};a.f.textInput= -{init:function(b,c,k){function l(c,d){a.a.C(b,c,d)}function m(){var d=a.a.c(c());if(null===d||d===p)d="";A!==p&&d===A?a.a.setTimeout(m,4):b.value!==d&&(z=!0,b.value=d,z=!1,v=b.value)}function r(){x||(A=b.value,x=a.a.setTimeout(C,4))}function C(){clearTimeout(x);A=x=p;var d=b.value;v!==d&&(v=d,a.m.fb(c(),k,"textInput",d))}var v=b.value,x,A,Q=9==a.a.W?r:C,z=!1;g&&l("keypress",C);11>g&&l("propertychange",function(a){z||"value"!==a.propertyName||Q(a)});8==g&&(l("keyup",C),l("keydown",C));q&&(q(b,Q),l("dragend", -r));(!g||9<=g)&&l("input",Q);5>e&&"textarea"===a.a.R(b)?(l("keydown",r),l("paste",r),l("cut",r)):11>d?l("keydown",r):4>f?(l("DOMAutoComplete",C),l("dragdrop",C),l("drop",C)):h&&"number"===b.type&&l("keydown",r);l("change",C);l("blur",C);a.o(m,null,{l:b})}};a.m.ya.textInput=!0;a.f.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.f.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.f.uniqueName.ud;a.a.$c(b,d)}}};a.f.uniqueName.ud=0;a.f.using={init:function(b,c,d,e,f){var g; +A.opera&&A.opera.version&&parseInt(A.opera.version()))||(h=b(c.match(/Edge\/([^ ]+)$/)))||b(c.match(/Chrome\/([^ ]+)/))||(e=b(c.match(/Version\/([^ ]+) Safari/)))||(f=b(c.match(/Firefox\/([^ ]+)/)))||(g=a.a.W||b(c.match(/MSIE ([^ ]+)/)))||(g=b(c.match(/rv:([^ )]+)/)))}if(8<=g&&10>g)var m=a.a.g.Z(),k=a.a.g.Z(),l=function(b){var c=this.activeElement;(c=c&&a.a.g.get(c,k))&&c(b)},p=function(b,c){var d=b.ownerDocument;a.a.g.get(d,m)||(a.a.g.set(d,m,!0),a.a.C(d,"selectionchange",l));a.a.g.set(b,k,c)};a.f.textInput= +{init:function(b,c,k){function l(c,d){a.a.C(b,c,d)}function m(){var d=a.a.c(c());if(null===d||d===n)d="";A!==n&&d===A?a.a.setTimeout(m,4):b.value!==d&&(z=!0,b.value=d,z=!1,v=b.value)}function r(){y||(A=b.value,y=a.a.setTimeout(C,4))}function C(){clearTimeout(y);A=y=n;var d=b.value;v!==d&&(v=d,a.m.fb(c(),k,"textInput",d))}var v=b.value,y,A,Q=9==a.a.W?r:C,z=!1;g&&l("keypress",C);11>g&&l("propertychange",function(a){z||"value"!==a.propertyName||Q(a)});8==g&&(l("keyup",C),l("keydown",C));p&&(p(b,Q),l("dragend", +r));(!g||9<=g)&&l("input",Q);5>e&&"textarea"===a.a.R(b)?(l("keydown",r),l("paste",r),l("cut",r)):11>d?l("keydown",r):4>f?(l("DOMAutoComplete",C),l("dragdrop",C),l("drop",C)):h&&"number"===b.type&&l("keydown",r);l("change",C);l("blur",C);a.o(m,null,{l:b})}};a.m.ya.textInput=!0;a.f.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.f.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.f.uniqueName.rd;a.a.Yc(b,d)}}};a.f.uniqueName.rd=0;a.f.using={init:function(b,c,d,e,f){var g; d.has("as")&&(g={as:d.get("as"),noChildContext:d.get("noChildContext")});c=f.createChildContext(c,g);a.Pa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.using=!0;a.f.value={init:function(b,c,d){var e=a.a.R(b),f="input"==e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var g=[],h=d.get("valueUpdate"),m=!1,k=null;h&&("string"==typeof h?g=[h]:g=a.a.yc(h),a.a.Qa(g,"change"));var l=function(){a.ra.fc(function(){k=null;m=!1;var e=c(),f=a.w.N(b);a.m.fb(e,d,"value",f)})};!a.a.W||!f||"text"!=b.type||"off"== -b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.A(g,"propertychange")||(a.a.C(b,"propertychange",function(){m=!0}),a.a.C(b,"focus",function(){m=!1}),a.a.C(b,"blur",function(){m&&l()}));a.a.F(g,function(c){var d=l;a.a.Xd(c,"after")&&(d=function(){k=a.w.N(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.C(b,c,d)});var q;q=f&&"file"==b.type?function(){var d=a.a.c(c());null===d||d===p||""===d?b.value="":a.s.B(l)}:function(){var f=a.a.c(c()),g=a.w.N(b);if(null!==k&&f===k)a.a.setTimeout(q,0);else if(f!== -g||g===p)if("select"===e){var h=d.get("valueAllowUnset");a.ra.fc(function(){a.w.eb(b,f,h);h||f===a.w.N(b)||a.s.B(l)})}else a.w.eb(b,f)};if("select"===e){var n;a.a.C(b,"change",function(){n&&l()});a.i.subscribe(b,a.i.H,function(){n?d.get("valueAllowUnset")?q():l():n=a.o(q,null,{l:b})},null,{notifyImmediately:!0})}else a.a.C(b,"change",l),a.o(q,null,{l:b})}else a.jb(b,{checkedValue:c})},update:function(){}};a.m.ya.value=!0;a.f.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display; +b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.A(g,"propertychange")||(a.a.C(b,"propertychange",function(){m=!0}),a.a.C(b,"focus",function(){m=!1}),a.a.C(b,"blur",function(){m&&l()}));a.a.F(g,function(c){var d=l;a.a.Wd(c,"after")&&(d=function(){k=a.w.N(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.C(b,c,d)});var p;p=f&&"file"==b.type?function(){var d=a.a.c(c());null===d||d===n||""===d?b.value="":a.s.B(l)}:function(){var f=a.a.c(c()),g=a.w.N(b);if(null!==k&&f===k)a.a.setTimeout(p,0);else if(f!== +g||g===n)if("select"===e){var h=d.get("valueAllowUnset");a.ra.fc(function(){a.w.eb(b,f,h);h||f===a.w.N(b)||a.s.B(l)})}else a.w.eb(b,f)};if("select"===e){var q;a.a.C(b,"change",function(){q&&l()});a.i.subscribe(b,a.i.H,function(){q?d.get("valueAllowUnset")?p():l():q=a.o(p,null,{l:b})},null,{notifyImmediately:!0})}else a.a.C(b,"change",l),a.o(p,null,{l:b})}else a.jb(b,{checkedValue:c})},update:function(){}};a.m.ya.value=!0;a.f.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display; d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.f.hidden={update:function(b,c){a.f.visible.update(b,function(){return!a.a.c(c())})}};(function(b){a.f[b]={init:function(c,d,e,f,g){return a.f.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.ca=function(){};a.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock"); -};a.ca.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||x;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.D.G(d)}if(1==b.nodeType||8==b.nodeType)return new a.D.ja(b);throw Error("Unknown template type: "+b);};a.ca.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.ca.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a, -c).data("isRewritten")};a.ca.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.ca);a.mc=function(){function b(b,c,d,h){b=a.m.cc(b);for(var m=a.m.Sa,k=0;k]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{zd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.mc.Nd(b,c)},d)},Nd:function(a,f){return a.replace(c, -function(a,c,d,e,l){return b(l,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},od:function(b,c){return a.aa.Zb(function(d,h){var m=d.nextSibling;m&&m.nodeName.toLowerCase()===c&&a.jb(m,b,h)})}}}();a.b("__tr_ambtns",a.mc.od);(function(){a.D={};a.D.G=function(b){if(this.G=b){var c=a.a.R(b);this.bb="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.D.G.prototype.text=function(){var b=1===this.bb?"text":2===this.bb?"value":"innerHTML"; -if(0==arguments.length)return this.G[b];var c=arguments[0];"innerHTML"===b?a.a.hc(this.G,c):this.G[b]=c};var b=a.a.g.Z()+"_";a.D.G.prototype.data=function(c){if(1===arguments.length)return a.a.g.get(this.G,b+c);a.a.g.set(this.G,b+c,arguments[1])};var c=a.a.g.Z();a.D.G.prototype.nodes=function(){var b=this.G;if(0==arguments.length){var e=a.a.g.get(b,c)||{},f=e.mb||(3===this.bb?b.content:4===this.bb?b:p);if(!f||e.ld){var g=this.text();g&&g!==e.cb&&(f=a.a.Od(g,b.ownerDocument),a.a.g.set(b,c,{mb:f,cb:g, -ld:!0}))}return f}e=arguments[0];this.bb!==p&&this.text("");a.a.g.set(b,c,{mb:e})};a.D.ja=function(a){this.G=a};a.D.ja.prototype=new a.D.G;a.D.ja.prototype.constructor=a.D.ja;a.D.ja.prototype.text=function(){if(0==arguments.length){var b=a.a.g.get(this.G,c)||{};b.cb===p&&b.mb&&(b.cb=b.mb.innerHTML);return b.cb}a.a.g.set(this.G,c,{cb:arguments[0]})};a.b("templateSources",a.D);a.b("templateSources.domElement",a.D.G);a.b("templateSources.anonymousTemplate",a.D.ja)})();(function(){function b(b,c,d){var e; -for(c=a.h.nextSibling(c);b&&(e=b)!==c;)b=a.h.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ga.instance,m=h.preprocessNode;if(m){b(e,f,function(a,b){var c=a.previousSibling,d=m.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Va(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.xc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.aa.ed(b,[d])});a.a.Va(c,g)}}function d(a){return a.nodeType? -a:0]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.mc.Md(b,c)},d)},Md:function(a,f){return a.replace(c, +function(a,c,d,e,l){return b(l,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},md:function(b,c){return a.aa.Zb(function(d,h){var m=d.nextSibling;m&&m.nodeName.toLowerCase()===c&&a.jb(m,b,h)})}}}();a.b("__tr_ambtns",a.mc.md);(function(){a.D={};a.D.G=function(b){if(this.G=b){var c=a.a.R(b);this.bb="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.D.G.prototype.text=function(){var b=1===this.bb?"text":2===this.bb?"value":"innerHTML"; +if(0==arguments.length)return this.G[b];var c=arguments[0];"innerHTML"===b?a.a.hc(this.G,c):this.G[b]=c};var b=a.a.g.Z()+"_";a.D.G.prototype.data=function(c){if(1===arguments.length)return a.a.g.get(this.G,b+c);a.a.g.set(this.G,b+c,arguments[1])};var c=a.a.g.Z();a.D.G.prototype.nodes=function(){var b=this.G;if(0==arguments.length){var e=a.a.g.get(b,c)||{},f=e.mb||(3===this.bb?b.content:4===this.bb?b:n);if(!f||e.jd){var g=this.text();g&&g!==e.cb&&(f=a.a.Nd(g,b.ownerDocument),a.a.g.set(b,c,{mb:f,cb:g, +jd:!0}))}return f}e=arguments[0];this.bb!==n&&this.text("");a.a.g.set(b,c,{mb:e})};a.D.ja=function(a){this.G=a};a.D.ja.prototype=new a.D.G;a.D.ja.prototype.constructor=a.D.ja;a.D.ja.prototype.text=function(){if(0==arguments.length){var b=a.a.g.get(this.G,c)||{};b.cb===n&&b.mb&&(b.cb=b.mb.innerHTML);return b.cb}a.a.g.set(this.G,c,{cb:arguments[0]})};a.b("templateSources",a.D);a.b("templateSources.domElement",a.D.G);a.b("templateSources.anonymousTemplate",a.D.ja)})();(function(){function b(b,c,d){var e; +for(c=a.h.nextSibling(c);b&&(e=b)!==c;)b=a.h.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ga.instance,m=h.preprocessNode;if(m){b(e,f,function(a,b){var c=a.previousSibling,d=m.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Va(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.xc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.aa.cd(b,[d])});a.a.Va(c,g)}}function d(a){return a.nodeType? +a:0a.a.W?0:b.nodes)?b.nodes():null)return a.a.ma(c.cloneNode(!0).childNodes); -b=b.text();return a.a.wa(b,e)};a.ba.Na=new a.ba;a.ic(a.ba.Na);a.b("nativeTemplateEngine",a.ba);(function(){a.ab=function(){var a=this.Jd=function(){if(!v||!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||x;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=v.template(null,"{{ko_with $item.koBindingContext}}"+ -h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(h,b,e);e.appendTo(g.createElement("div"));v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){x.write("