Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed issues #209 and #143 (IE9 not updating text) and rebuilt

  • Loading branch information...
commit eef5fd394bc9e99f150a451c23c147234accaa52 1 parent ff6cb2d
Steven Sanderson SteveSanderson authored
19 build/output/knockout-latest.debug.js
@@ -308,6 +308,19 @@ ko.utils = new (function () {
308 308 return dummyContainer.innerHTML;
309 309 },
310 310
  311 + setTextContent: function(element, textContent) {
  312 + var value = ko.utils.unwrapObservable(textContent);
  313 + if ((value === null) || (value === undefined))
  314 + value = "";
  315 + typeof element.innerText == "string" ? element.innerText = value
  316 + : element.textContent = value;
  317 +
  318 + if (ieVersion) {
  319 + // Believe it or not, this actually fixes an IE9 rendering bug. Insane. https://github.com/SteveSanderson/knockout/issues/209
  320 + element.innerHTML = element.innerHTML;
  321 + }
  322 + },
  323 +
311 324 range: function (min, max) {
312 325 min = ko.utils.unwrapObservable(min);
313 326 max = ko.utils.unwrapObservable(max);
@@ -2173,11 +2186,7 @@ ko.bindingHandlers['selectedOptions'] = {
2173 2186
2174 2187 ko.bindingHandlers['text'] = {
2175 2188 'update': function (element, valueAccessor) {
2176   - var value = ko.utils.unwrapObservable(valueAccessor());
2177   - if ((value === null) || (value === undefined))
2178   - value = "";
2179   - typeof element.innerText == "string" ? element.innerText = value
2180   - : element.textContent = value;
  2189 + ko.utils.setTextContent(element, valueAccessor());
2181 2190 }
2182 2191 };
2183 2192
161 build/output/knockout-latest.js
@@ -3,96 +3,97 @@
3 3 // License: MIT (http://www.opensource.org/licenses/mit-license.php)
4 4
5 5 (function(window,undefined){
6   -function b(a){throw a;}var l=void 0,m=!0,o=null,p=!1,r=window.ko={};r.b=function(a,c){for(var d=a.split("."),e=window,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};r.l=function(a,c,d){a[c]=d};
7   -r.a=new function(){function a(a,e){if("INPUT"!=a.tagName||!a.type)return p;if("click"!=e.toLowerCase())return p;var c=a.type.toLowerCase();return"checkbox"==c||"radio"==c}var c=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},e={};d[/Firefox\/2/i.test(navigator.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave".split(",");for(var f in d){var h=d[f];if(h.length)for(var g=0,i=h.length;g<i;g++)e[h[g]]=
8   -f}var j=function(){for(var a=3,e=document.createElement("div"),c=e.getElementsByTagName("i");e.innerHTML="<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",c[0];);return 4<a?a:l}();return{Ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],n:function(a,e){for(var c=0,f=a.length;c<f;c++)e(a[c])},k:function(a,e){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,e);for(var c=0,f=a.length;c<f;c++)if(a[c]===e)return c;return-1},Wa:function(a,e,c){for(var f=0,d=
9   -a.length;f<d;f++)if(e.call(c,a[f]))return a[f];return o},ca:function(a,e){var c=r.a.k(a,e);0<=c&&a.splice(c,1)},za:function(a){for(var a=a||[],e=[],c=0,f=a.length;c<f;c++)0>r.a.k(e,a[c])&&e.push(a[c]);return e},ba:function(a,e){for(var a=a||[],c=[],f=0,d=a.length;f<d;f++)c.push(e(a[f]));return c},aa:function(a,e){for(var a=a||[],c=[],f=0,d=a.length;f<d;f++)e(a[f])&&c.push(a[f]);return c},J:function(a,e){for(var c=0,f=e.length;c<f;c++)a.push(e[c]);return a},extend:function(a,e){for(var c in e)e.hasOwnProperty(c)&&
10   -(a[c]=e[c]);return a},V:function(a){for(;a.firstChild;)r.removeNode(a.firstChild)},pa:function(a,e){r.a.V(a);e&&r.a.n(e,function(e){a.appendChild(e)})},Ka:function(a,e){var c=a.nodeType?[a]:a;if(0<c.length){for(var f=c[0],d=f.parentNode,h=0,g=e.length;h<g;h++)d.insertBefore(e[h],f);h=0;for(g=c.length;h<g;h++)r.removeNode(c[h])}},Ma:function(a,e){0<=navigator.userAgent.indexOf("MSIE 6")?a.setAttribute("selected",e):a.selected=e},w:function(a){return(a||"").replace(c,"")},Db:function(a,e){for(var c=
11   -[],f=(a||"").split(e),d=0,h=f.length;d<h;d++){var g=r.a.w(f[d]);""!==g&&c.push(g)}return c},Cb:function(a,e){a=a||"";return e.length>a.length?p:a.substring(0,e.length)===e},hb:function(a){for(var e=Array.prototype.slice.call(arguments,1),c="return ("+a+")",f=0;f<e.length;f++)e[f]&&"object"==typeof e[f]&&(c="with(sc["+f+"]) { "+c+" } ");return(new Function("sc",c))(e)},fb:function(a,e){if(e.compareDocumentPosition)return 16==(e.compareDocumentPosition(a)&16);for(;a!=o;){if(a==e)return m;a=a.parentNode}return p},
12   -ga:function(a){return r.a.fb(a,document)},s:function(e,c,f){if("undefined"!=typeof jQuery){if(a(e,c))var d=f,f=function(a,e){var c=this.checked;if(e)this.checked=e.Ya!==m;d.call(this,a);this.checked=c};jQuery(e).bind(c,f)}else"function"==typeof e.addEventListener?e.addEventListener(c,f,p):"undefined"!=typeof e.attachEvent?e.attachEvent("on"+c,function(a){f.call(e,a)}):b(Error("Browser doesn't support addEventListener or attachEvent"))},ta:function(c,f){(!c||!c.nodeType)&&b(Error("element must be a DOM node when calling triggerEvent"));
13   -if("undefined"!=typeof jQuery){var d=[];a(c,f)&&d.push({Ya:c.checked});jQuery(c).trigger(f,d)}else if("function"==typeof document.createEvent)"function"==typeof c.dispatchEvent?(d=document.createEvent(e[f]||"HTMLEvents"),d.initEvent(f,m,m,window,0,0,0,0,0,p,p,p,p,0,c),c.dispatchEvent(d)):b(Error("The supplied element doesn't support dispatchEvent"));else if("undefined"!=typeof c.fireEvent){if("click"==f&&"INPUT"==c.tagName&&("checkbox"==c.type.toLowerCase()||"radio"==c.type.toLowerCase()))c.checked=
14   -c.checked!==m;c.fireEvent("on"+f)}else b(Error("Browser doesn't support triggering events"))},d:function(a){return r.W(a)?a():a},eb:function(a,e){return 0<=r.a.k((a.className||"").split(/\s+/),e)},Qa:function(a,e,c){var f=r.a.eb(a,e);if(c&&!f)a.className=(a.className||"")+" "+e;else if(f&&!c){for(var c=(a.className||"").split(/\s+/),f="",d=0;d<c.length;d++)c[d]!=e&&(f+=c[d]+" ");a.className=r.a.w(f)}},outerHTML:function(a){if(j===l){var e=a.outerHTML;if("string"==typeof e)return e}e=window.document.createElement("div");
15   -e.appendChild(a.cloneNode(m));return e.innerHTML},yb:function(a,e){for(var a=r.a.d(a),e=r.a.d(e),c=[],f=a;f<=e;f++)c.push(f);return c},ka:function(a){for(var e=[],c=0,f=a.length;c<f;c++)e.push(a[c]);return e},ob:6===j,pb:7===j,Da:function(a,e){for(var c=r.a.ka(a.getElementsByTagName("INPUT")).concat(r.a.ka(a.getElementsByTagName("TEXTAREA"))),f="string"==typeof e?function(a){return a.name===e}:function(a){return e.test(a.name)},d=[],h=c.length-1;0<=h;h--)f(c[h])&&d.push(c[h]);return d},vb:function(a){return"string"==
16   -typeof a&&(a=r.a.w(a))?window.JSON&&window.JSON.parse?window.JSON.parse(a):(new Function("return "+a))():o},ra:function(a){("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&b(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));return JSON.stringify(r.a.d(a))},wb:function(a,e,c){var c=c||{},f=c.params||{},d=c.includeFields||this.Ca,
17   -h=a;if("object"==typeof a&&"FORM"==a.tagName)for(var h=a.action,g=d.length-1;0<=g;g--)for(var j=r.a.Da(a,d[g]),i=j.length-1;0<=i;i--)f[j[i].name]=j[i].value;var e=r.a.d(e),u=document.createElement("FORM");u.style.display="none";u.action=h;u.method="post";for(var y in e)a=document.createElement("INPUT"),a.name=y,a.value=r.a.ra(r.a.d(e[y])),u.appendChild(a);for(y in f)a=document.createElement("INPUT"),a.name=y,a.value=f[y],u.appendChild(a);document.body.appendChild(u);c.submitter?c.submitter(u):u.submit();
18   -setTimeout(function(){u.parentNode.removeChild(u)},0)}}};r.b("ko.utils",r.a);r.b("ko.utils.arrayForEach",r.a.n);r.b("ko.utils.arrayFirst",r.a.Wa);r.b("ko.utils.arrayFilter",r.a.aa);r.b("ko.utils.arrayGetDistinctValues",r.a.za);r.b("ko.utils.arrayIndexOf",r.a.k);r.b("ko.utils.arrayMap",r.a.ba);r.b("ko.utils.arrayPushAll",r.a.J);r.b("ko.utils.arrayRemoveItem",r.a.ca);r.b("ko.utils.extend",r.a.extend);r.b("ko.utils.fieldsIncludedWithJsonPost",r.a.Ca);r.b("ko.utils.getFormFields",r.a.Da);
19   -r.b("ko.utils.postJson",r.a.wb);r.b("ko.utils.parseJson",r.a.vb);r.b("ko.utils.registerEventHandler",r.a.s);r.b("ko.utils.stringifyJson",r.a.ra);r.b("ko.utils.range",r.a.yb);r.b("ko.utils.toggleDomNodeCssClass",r.a.Qa);r.b("ko.utils.triggerEvent",r.a.ta);r.b("ko.utils.unwrapObservable",r.a.d);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this,d=Array.prototype.slice.call(arguments),a=d.shift();return function(){return c.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});
20   -r.a.e=new function(){var a=0,c="__ko__"+(new Date).getTime(),d={};return{get:function(a,c){var d=r.a.e.getAll(a,p);return d===l?l:d[c]},set:function(a,c,d){d===l&&r.a.e.getAll(a,p)===l||(r.a.e.getAll(a,m)[c]=d)},getAll:function(e,f){var h=e[c];if(!(h&&"null"!==h)){if(!f)return;h=e[c]="ko"+a++;d[h]={}}return d[h]},clear:function(a){var f=a[c];f&&(delete d[f],a[c]=o)}}};r.b("ko.utils.domData",r.a.e);r.b("ko.utils.domData.clear",r.a.e.clear);
21   -r.a.z=new function(){function a(a,c){var h=r.a.e.get(a,d);h===l&&c&&(h=[],r.a.e.set(a,d,h));return h}function c(e){var c=a(e,p);if(c)for(var c=c.slice(0),d=0;d<c.length;d++)c[d](e);r.a.e.clear(e);"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&jQuery.cleanData([e])}var d="__ko_domNodeDisposal__"+(new Date).getTime();return{wa:function(e,c){"function"!=typeof c&&b(Error("Callback must be a function"));a(e,m).push(c)},Ja:function(e,c){var h=a(e,p);h&&(r.a.ca(h,c),0==h.length&&r.a.e.set(e,
22   -d,l))},F:function(a){if(!(1!=a.nodeType&&9!=a.nodeType)){c(a);var f=[];r.a.J(f,a.getElementsByTagName("*"));for(var a=0,d=f.length;a<d;a++)c(f[a])}},removeNode:function(a){r.F(a);a.parentNode&&a.parentNode.removeChild(a)}}};r.F=r.a.z.F;r.removeNode=r.a.z.removeNode;r.b("ko.cleanNode",r.F);r.b("ko.removeNode",r.removeNode);r.b("ko.utils.domNodeDisposal",r.a.z);r.b("ko.utils.domNodeDisposal.addDisposeCallback",r.a.z.wa);r.b("ko.utils.domNodeDisposal.removeDisposeCallback",r.a.z.Ja);
23   -r.a.na=function(a){var c;if("undefined"!=typeof jQuery)c=jQuery.clean([a]);else{var d=r.a.w(a).toLowerCase();c=document.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];a="ignored<div>"+d[1]+a+d[2]+"</div>";for("function"==typeof window.innerShiv?c.appendChild(window.innerShiv(a)):c.innerHTML=a;d[0]--;)c=c.lastChild;
24   -c=r.a.ka(c.lastChild.childNodes)}return c};r.a.Z=function(a,c){r.a.V(a);if(c!==o&&c!==l)if("string"!=typeof c&&(c=c.toString()),"undefined"!=typeof jQuery)jQuery(a).html(c);else for(var d=r.a.na(c),e=0;e<d.length;e++)a.appendChild(d[e])};r.b("ko.utils.parseHtmlFragment",r.a.na);r.b("ko.utils.setHtml",r.a.Z);
25   -r.r=function(){function a(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function c(a,f){if(a)if(8==a.nodeType){var d=r.r.Ha(a.nodeValue);d!=o&&f.push({cb:a,tb:d})}else if(1==a.nodeType)for(var d=0,g=a.childNodes,i=g.length;d<i;d++)c(g[d],f)}var d={};return{la:function(e){"function"!=typeof e&&b(Error("You can only pass a function to ko.memoization.memoize()"));var c=a()+a();d[c]=e;return"<\!--[ko_memo:"+c+"]--\>"},Ra:function(a,c){var h=d[a];h===l&&b(Error("Couldn't find any memo with ID "+
26   -a+". Perhaps it's already been unmemoized."));try{return h.apply(o,c||[]),m}finally{delete d[a]}},Sa:function(a,f){var d=[];c(a,d);for(var g=0,i=d.length;g<i;g++){var j=d[g].cb,k=[j];f&&r.a.J(k,f);r.r.Ra(d[g].tb,k);j.nodeValue="";j.parentNode&&j.parentNode.removeChild(j)}},Ha:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:o}}}();r.b("ko.memoization",r.r);r.b("ko.memoization.memoize",r.r.la);r.b("ko.memoization.unmemoize",r.r.Ra);r.b("ko.memoization.parseMemoText",r.r.Ha);
27   -r.b("ko.memoization.unmemoizeDomNodeAndDescendants",r.r.Sa);r.Ba={throttle:function(a,c){a.throttleEvaluation=c;var d=o;return r.i({read:a,write:function(e){clearTimeout(d);d=setTimeout(function(){a(e)},c)}})}};r.b("ko.extenders",r.Ba);r.Oa=function(a,c){this.da=a;this.bb=c;r.l(this,"dispose",this.v)};r.Oa.prototype.v=function(){this.nb=m;this.bb()};
  6 +function c(a){throw a;}var l=void 0,m=!0,o=null,p=!1,r=window.ko={};r.b=function(a,b){for(var d=a.split("."),e=window,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=b};r.l=function(a,b,d){a[b]=d};
  7 +r.a=new function(){function a(a,e){if("INPUT"!=a.tagName||!a.type)return p;if("click"!=e.toLowerCase())return p;var b=a.type.toLowerCase();return"checkbox"==b||"radio"==b}var b=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},e={};d[/Firefox\/2/i.test(navigator.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave".split(",");for(var f in d){var h=d[f];if(h.length)for(var g=0,i=h.length;g<i;g++)e[h[g]]=
  8 +f}var j=function(){for(var a=3,e=document.createElement("div"),b=e.getElementsByTagName("i");e.innerHTML="<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",b[0];);return 4<a?a:l}();return{Ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],n:function(a,e){for(var b=0,f=a.length;b<f;b++)e(a[b])},k:function(a,e){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,e);for(var b=0,f=a.length;b<f;b++)if(a[b]===e)return b;return-1},Wa:function(a,e,b){for(var f=0,d=
  9 +a.length;f<d;f++)if(e.call(b,a[f]))return a[f];return o},ca:function(a,e){var b=r.a.k(a,e);0<=b&&a.splice(b,1)},za:function(a){for(var a=a||[],e=[],b=0,f=a.length;b<f;b++)0>r.a.k(e,a[b])&&e.push(a[b]);return e},ba:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;f<d;f++)b.push(e(a[f]));return b},aa:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;f<d;f++)e(a[f])&&b.push(a[f]);return b},J:function(a,e){for(var b=0,f=e.length;b<f;b++)a.push(e[b]);return a},extend:function(a,e){for(var b in e)e.hasOwnProperty(b)&&
  10 +(a[b]=e[b]);return a},V:function(a){for(;a.firstChild;)r.removeNode(a.firstChild)},pa:function(a,e){r.a.V(a);e&&r.a.n(e,function(e){a.appendChild(e)})},Ka:function(a,e){var b=a.nodeType?[a]:a;if(0<b.length){for(var f=b[0],d=f.parentNode,h=0,g=e.length;h<g;h++)d.insertBefore(e[h],f);h=0;for(g=b.length;h<g;h++)r.removeNode(b[h])}},Ma:function(a,e){0<=navigator.userAgent.indexOf("MSIE 6")?a.setAttribute("selected",e):a.selected=e},w:function(a){return(a||"").replace(b,"")},Eb:function(a,e){for(var b=
  11 +[],f=(a||"").split(e),d=0,h=f.length;d<h;d++){var g=r.a.w(f[d]);""!==g&&b.push(g)}return b},Db:function(a,e){a=a||"";return e.length>a.length?p:a.substring(0,e.length)===e},hb:function(a){for(var e=Array.prototype.slice.call(arguments,1),b="return ("+a+")",f=0;f<e.length;f++)e[f]&&"object"==typeof e[f]&&(b="with(sc["+f+"]) { "+b+" } ");return(new Function("sc",b))(e)},fb:function(a,e){if(e.compareDocumentPosition)return 16==(e.compareDocumentPosition(a)&16);for(;a!=o;){if(a==e)return m;a=a.parentNode}return p},
  12 +ga:function(a){return r.a.fb(a,document)},s:function(e,b,f){if("undefined"!=typeof jQuery){if(a(e,b))var d=f,f=function(a,e){var b=this.checked;if(e)this.checked=e.Ya!==m;d.call(this,a);this.checked=b};jQuery(e).bind(b,f)}else"function"==typeof e.addEventListener?e.addEventListener(b,f,p):"undefined"!=typeof e.attachEvent?e.attachEvent("on"+b,function(a){f.call(e,a)}):c(Error("Browser doesn't support addEventListener or attachEvent"))},ta:function(b,f){(!b||!b.nodeType)&&c(Error("element must be a DOM node when calling triggerEvent"));
  13 +if("undefined"!=typeof jQuery){var d=[];a(b,f)&&d.push({Ya:b.checked});jQuery(b).trigger(f,d)}else if("function"==typeof document.createEvent)"function"==typeof b.dispatchEvent?(d=document.createEvent(e[f]||"HTMLEvents"),d.initEvent(f,m,m,window,0,0,0,0,0,p,p,p,p,0,b),b.dispatchEvent(d)):c(Error("The supplied element doesn't support dispatchEvent"));else if("undefined"!=typeof b.fireEvent){if("click"==f&&"INPUT"==b.tagName&&("checkbox"==b.type.toLowerCase()||"radio"==b.type.toLowerCase()))b.checked=
  14 +b.checked!==m;b.fireEvent("on"+f)}else c(Error("Browser doesn't support triggering events"))},d:function(a){return r.W(a)?a():a},eb:function(a,e){return 0<=r.a.k((a.className||"").split(/\s+/),e)},Qa:function(a,e,b){var f=r.a.eb(a,e);if(b&&!f)a.className=(a.className||"")+" "+e;else if(f&&!b){for(var b=(a.className||"").split(/\s+/),f="",d=0;d<b.length;d++)b[d]!=e&&(f+=b[d]+" ");a.className=r.a.w(f)}},outerHTML:function(a){if(j===l){var e=a.outerHTML;if("string"==typeof e)return e}e=window.document.createElement("div");
  15 +e.appendChild(a.cloneNode(m));return e.innerHTML},Bb:function(a,e){var b=r.a.d(e);if(b===o||b===l)b="";"string"==typeof a.innerText?a.innerText=b:a.textContent=b;if(j)a.innerHTML=a.innerHTML},yb:function(a,e){for(var a=r.a.d(a),e=r.a.d(e),b=[],f=a;f<=e;f++)b.push(f);return b},ka:function(a){for(var e=[],b=0,f=a.length;b<f;b++)e.push(a[b]);return e},ob:6===j,pb:7===j,Da:function(a,e){for(var b=r.a.ka(a.getElementsByTagName("INPUT")).concat(r.a.ka(a.getElementsByTagName("TEXTAREA"))),f="string"==typeof e?
  16 +function(a){return a.name===e}:function(a){return e.test(a.name)},d=[],h=b.length-1;0<=h;h--)f(b[h])&&d.push(b[h]);return d},vb:function(a){return"string"==typeof a&&(a=r.a.w(a))?window.JSON&&window.JSON.parse?window.JSON.parse(a):(new Function("return "+a))():o},ra:function(a){("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&c(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));
  17 +return JSON.stringify(r.a.d(a))},wb:function(a,e,b){var b=b||{},f=b.params||{},d=b.includeFields||this.Ca,h=a;if("object"==typeof a&&"FORM"==a.tagName)for(var h=a.action,g=d.length-1;0<=g;g--)for(var j=r.a.Da(a,d[g]),i=j.length-1;0<=i;i--)f[j[i].name]=j[i].value;var e=r.a.d(e),u=document.createElement("FORM");u.style.display="none";u.action=h;u.method="post";for(var y in e)a=document.createElement("INPUT"),a.name=y,a.value=r.a.ra(r.a.d(e[y])),u.appendChild(a);for(y in f)a=document.createElement("INPUT"),
  18 +a.name=y,a.value=f[y],u.appendChild(a);document.body.appendChild(u);b.submitter?b.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}};r.b("ko.utils",r.a);r.b("ko.utils.arrayForEach",r.a.n);r.b("ko.utils.arrayFirst",r.a.Wa);r.b("ko.utils.arrayFilter",r.a.aa);r.b("ko.utils.arrayGetDistinctValues",r.a.za);r.b("ko.utils.arrayIndexOf",r.a.k);r.b("ko.utils.arrayMap",r.a.ba);r.b("ko.utils.arrayPushAll",r.a.J);r.b("ko.utils.arrayRemoveItem",r.a.ca);r.b("ko.utils.extend",r.a.extend);
  19 +r.b("ko.utils.fieldsIncludedWithJsonPost",r.a.Ca);r.b("ko.utils.getFormFields",r.a.Da);r.b("ko.utils.postJson",r.a.wb);r.b("ko.utils.parseJson",r.a.vb);r.b("ko.utils.registerEventHandler",r.a.s);r.b("ko.utils.stringifyJson",r.a.ra);r.b("ko.utils.range",r.a.yb);r.b("ko.utils.toggleDomNodeCssClass",r.a.Qa);r.b("ko.utils.triggerEvent",r.a.ta);r.b("ko.utils.unwrapObservable",r.a.d);
  20 +Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=Array.prototype.slice.call(arguments),a=d.shift();return function(){return b.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});
  21 +r.a.e=new function(){var a=0,b="__ko__"+(new Date).getTime(),d={};return{get:function(a,b){var d=r.a.e.getAll(a,p);return d===l?l:d[b]},set:function(a,b,d){d===l&&r.a.e.getAll(a,p)===l||(r.a.e.getAll(a,m)[b]=d)},getAll:function(e,f){var h=e[b];if(!(h&&"null"!==h)){if(!f)return;h=e[b]="ko"+a++;d[h]={}}return d[h]},clear:function(a){var f=a[b];f&&(delete d[f],a[b]=o)}}};r.b("ko.utils.domData",r.a.e);r.b("ko.utils.domData.clear",r.a.e.clear);
  22 +r.a.z=new function(){function a(a,b){var h=r.a.e.get(a,d);h===l&&b&&(h=[],r.a.e.set(a,d,h));return h}function b(e){var b=a(e,p);if(b)for(var b=b.slice(0),d=0;d<b.length;d++)b[d](e);r.a.e.clear(e);"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&jQuery.cleanData([e])}var d="__ko_domNodeDisposal__"+(new Date).getTime();return{wa:function(e,b){"function"!=typeof b&&c(Error("Callback must be a function"));a(e,m).push(b)},Ja:function(e,b){var h=a(e,p);h&&(r.a.ca(h,b),0==h.length&&r.a.e.set(e,
  23 +d,l))},F:function(a){if(!(1!=a.nodeType&&9!=a.nodeType)){b(a);var f=[];r.a.J(f,a.getElementsByTagName("*"));for(var a=0,d=f.length;a<d;a++)b(f[a])}},removeNode:function(a){r.F(a);a.parentNode&&a.parentNode.removeChild(a)}}};r.F=r.a.z.F;r.removeNode=r.a.z.removeNode;r.b("ko.cleanNode",r.F);r.b("ko.removeNode",r.removeNode);r.b("ko.utils.domNodeDisposal",r.a.z);r.b("ko.utils.domNodeDisposal.addDisposeCallback",r.a.z.wa);r.b("ko.utils.domNodeDisposal.removeDisposeCallback",r.a.z.Ja);
  24 +r.a.na=function(a){var b;if("undefined"!=typeof jQuery)b=jQuery.clean([a]);else{var d=r.a.w(a).toLowerCase();b=document.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];a="ignored<div>"+d[1]+a+d[2]+"</div>";for("function"==typeof window.innerShiv?b.appendChild(window.innerShiv(a)):b.innerHTML=a;d[0]--;)b=b.lastChild;
  25 +b=r.a.ka(b.lastChild.childNodes)}return b};r.a.Z=function(a,b){r.a.V(a);if(b!==o&&b!==l)if("string"!=typeof b&&(b=b.toString()),"undefined"!=typeof jQuery)jQuery(a).html(b);else for(var d=r.a.na(b),e=0;e<d.length;e++)a.appendChild(d[e])};r.b("ko.utils.parseHtmlFragment",r.a.na);r.b("ko.utils.setHtml",r.a.Z);
  26 +r.r=function(){function a(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function b(a,f){if(a)if(8==a.nodeType){var d=r.r.Ha(a.nodeValue);d!=o&&f.push({cb:a,tb:d})}else if(1==a.nodeType)for(var d=0,g=a.childNodes,i=g.length;d<i;d++)b(g[d],f)}var d={};return{la:function(e){"function"!=typeof e&&c(Error("You can only pass a function to ko.memoization.memoize()"));var b=a()+a();d[b]=e;return"<\!--[ko_memo:"+b+"]--\>"},Ra:function(a,b){var h=d[a];h===l&&c(Error("Couldn't find any memo with ID "+
  27 +a+". Perhaps it's already been unmemoized."));try{return h.apply(o,b||[]),m}finally{delete d[a]}},Sa:function(a,f){var d=[];b(a,d);for(var g=0,i=d.length;g<i;g++){var j=d[g].cb,k=[j];f&&r.a.J(k,f);r.r.Ra(d[g].tb,k);j.nodeValue="";j.parentNode&&j.parentNode.removeChild(j)}},Ha:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:o}}}();r.b("ko.memoization",r.r);r.b("ko.memoization.memoize",r.r.la);r.b("ko.memoization.unmemoize",r.r.Ra);r.b("ko.memoization.parseMemoText",r.r.Ha);
  28 +r.b("ko.memoization.unmemoizeDomNodeAndDescendants",r.r.Sa);r.Ba={throttle:function(a,b){a.throttleEvaluation=b;var d=o;return r.i({read:a,write:function(e){clearTimeout(d);d=setTimeout(function(){a(e)},b)}})}};r.b("ko.extenders",r.Ba);r.Oa=function(a,b){this.da=a;this.bb=b;r.l(this,"dispose",this.v)};r.Oa.prototype.v=function(){this.nb=m;this.bb()};
28 29 r.S=function(){this.u={};r.a.extend(this,r.S.fn);r.l(this,"subscribe",this.sa);r.l(this,"extend",this.extend);r.l(this,"notifySubscribers",this.N);r.l(this,"getSubscriptionsCount",this.kb)};
29   -r.S.fn={sa:function(a,c,d){var d=d||"change",a=c?a.bind(c):a,e=new r.Oa(a,function(){r.a.ca(this.u[d],e)}.bind(this));this.u[d]||(this.u[d]=[]);this.u[d].push(e);return e},N:function(a,c){c=c||"change";this.u[c]&&r.a.n(this.u[c].slice(0),function(c){c&&c.nb!==m&&c.da(a)})},kb:function(){var a=0,c;for(c in this.u)this.u.hasOwnProperty(c)&&(a+=this.u[c].length);return a},extend:function(a){var c=this;if(a)for(var d in a){var e=r.Ba[d];"function"==typeof e&&(c=e(c,a[d]))}return c}};
30   -r.Fa=function(a){return"function"==typeof a.sa&&"function"==typeof a.N};r.b("ko.subscribable",r.S);r.b("ko.isSubscribable",r.Fa);r.U=function(){var a=[];return{Xa:function(c){a.push({da:c,Aa:[]})},end:function(){a.pop()},Ia:function(c){r.Fa(c)||b("Only subscribable things can act as dependencies");if(0<a.length){var d=a[a.length-1];0<=r.a.k(d.Aa,c)||(d.Aa.push(c),d.da(c))}}}}();var B={undefined:m,"boolean":m,number:m,string:m};
31   -r.A=function(a){function c(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.H(),d=arguments[0],c.G();return this}r.U.Ia(c);return d}var d=a;r.S.call(c);c.G=function(){c.N(d)};c.H=function(){c.N(d,"beforeChange")};r.a.extend(c,r.A.fn);r.l(c,"valueHasMutated",c.G);r.l(c,"valueWillMutate",c.H);return c};r.A.fn={B:r.A,equalityComparer:function(a,c){return a===o||typeof a in B?a===c:p}};r.W=function(a){return a===o||a===l||a.B===l?p:a.B===r.A?m:r.W(a.B)};
  30 +r.S.fn={sa:function(a,b,d){var d=d||"change",a=b?a.bind(b):a,e=new r.Oa(a,function(){r.a.ca(this.u[d],e)}.bind(this));this.u[d]||(this.u[d]=[]);this.u[d].push(e);return e},N:function(a,b){b=b||"change";this.u[b]&&r.a.n(this.u[b].slice(0),function(b){b&&b.nb!==m&&b.da(a)})},kb:function(){var a=0,b;for(b in this.u)this.u.hasOwnProperty(b)&&(a+=this.u[b].length);return a},extend:function(a){var b=this;if(a)for(var d in a){var e=r.Ba[d];"function"==typeof e&&(b=e(b,a[d]))}return b}};
  31 +r.Fa=function(a){return"function"==typeof a.sa&&"function"==typeof a.N};r.b("ko.subscribable",r.S);r.b("ko.isSubscribable",r.Fa);r.U=function(){var a=[];return{Xa:function(b){a.push({da:b,Aa:[]})},end:function(){a.pop()},Ia:function(b){r.Fa(b)||c("Only subscribable things can act as dependencies");if(0<a.length){var d=a[a.length-1];0<=r.a.k(d.Aa,b)||(d.Aa.push(b),d.da(b))}}}}();var B={undefined:m,"boolean":m,number:m,string:m};
  32 +r.A=function(a){function b(){if(0<arguments.length){if(!b.equalityComparer||!b.equalityComparer(d,arguments[0]))b.H(),d=arguments[0],b.G();return this}r.U.Ia(b);return d}var d=a;r.S.call(b);b.G=function(){b.N(d)};b.H=function(){b.N(d,"beforeChange")};r.a.extend(b,r.A.fn);r.l(b,"valueHasMutated",b.G);r.l(b,"valueWillMutate",b.H);return b};r.A.fn={B:r.A,equalityComparer:function(a,b){return a===o||typeof a in B?a===b:p}};r.W=function(a){return a===o||a===l||a.B===l?p:a.B===r.A?m:r.W(a.B)};
32 33 r.Q=function(a){return"function"==typeof a&&a.B===r.A?m:"function"==typeof a&&a.B===r.i&&a.lb?m:p};r.b("ko.observable",r.A);r.b("ko.isObservable",r.W);r.b("ko.isWriteableObservable",r.Q);
33   -r.R=function(a){0==arguments.length&&(a=[]);a!==o&&a!==l&&!("length"in a)&&b(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var c=new r.A(a);r.a.extend(c,r.R.fn);r.l(c,"remove",c.remove);r.l(c,"removeAll",c.zb);r.l(c,"destroy",c.fa);r.l(c,"destroyAll",c.ab);r.l(c,"indexOf",c.indexOf);r.l(c,"replace",c.replace);return c};
34   -r.R.fn={remove:function(a){for(var c=this(),d=[],e="function"==typeof a?a:function(c){return c===a},f=0;f<c.length;f++){var h=c[f];e(h)&&(0===d.length&&this.H(),d.push(h),c.splice(f,1),f--)}d.length&&this.G();return d},zb:function(a){if(a===l){var c=this(),d=c.slice(0);this.H();c.splice(0,c.length);this.G();return d}return!a?[]:this.remove(function(c){return 0<=r.a.k(a,c)})},fa:function(a){var c=this(),d="function"==typeof a?a:function(c){return c===a};this.H();for(var e=c.length-1;0<=e;e--)d(c[e])&&
35   -(c[e]._destroy=m);this.G()},ab:function(a){return a===l?this.fa(function(){return m}):!a?[]:this.fa(function(c){return 0<=r.a.k(a,c)})},indexOf:function(a){var c=this();return r.a.k(c,a)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.H(),this()[d]=c,this.G())}};r.a.n("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){r.R.fn[a]=function(){var c=this();this.H();c=c[a].apply(c,arguments);this.G();return c}});
36   -r.a.n(["slice"],function(a){r.R.fn[a]=function(){var c=this();return c[a].apply(c,arguments)}});r.b("ko.observableArray",r.R);function C(a,c){a&&"object"==typeof a?c=a:(c=c||{},c.read=a||c.read);"function"!=typeof c.read&&b("Pass a function that returns the value of the dependentObservable");return c}
37   -r.i=function(a,c,d){function e(){r.a.n(q,function(a){a.v()});q=[]}function f(){var a=g.throttleEvaluation;a&&0<=a?(clearTimeout(v),v=setTimeout(h,a)):h()}function h(){if(j&&"function"==typeof d.disposeWhen&&d.disposeWhen())g.v();else{try{e();r.U.Xa(function(a){q.push(a.sa(f))});var a=d.read.call(d.owner||c);g.N(i,"beforeChange");i=a}finally{r.U.end()}g.N(i);j=m}}function g(){if(0<arguments.length)"function"===typeof d.write?d.write.apply(d.owner||c,arguments):b("Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
  34 +r.R=function(a){0==arguments.length&&(a=[]);a!==o&&a!==l&&!("length"in a)&&c(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var b=new r.A(a);r.a.extend(b,r.R.fn);r.l(b,"remove",b.remove);r.l(b,"removeAll",b.zb);r.l(b,"destroy",b.fa);r.l(b,"destroyAll",b.ab);r.l(b,"indexOf",b.indexOf);r.l(b,"replace",b.replace);return b};
  35 +r.R.fn={remove:function(a){for(var b=this(),d=[],e="function"==typeof a?a:function(b){return b===a},f=0;f<b.length;f++){var h=b[f];e(h)&&(0===d.length&&this.H(),d.push(h),b.splice(f,1),f--)}d.length&&this.G();return d},zb:function(a){if(a===l){var b=this(),d=b.slice(0);this.H();b.splice(0,b.length);this.G();return d}return!a?[]:this.remove(function(b){return 0<=r.a.k(a,b)})},fa:function(a){var b=this(),d="function"==typeof a?a:function(b){return b===a};this.H();for(var e=b.length-1;0<=e;e--)d(b[e])&&
  36 +(b[e]._destroy=m);this.G()},ab:function(a){return a===l?this.fa(function(){return m}):!a?[]:this.fa(function(b){return 0<=r.a.k(a,b)})},indexOf:function(a){var b=this();return r.a.k(b,a)},replace:function(a,b){var d=this.indexOf(a);0<=d&&(this.H(),this()[d]=b,this.G())}};r.a.n("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){r.R.fn[a]=function(){var b=this();this.H();b=b[a].apply(b,arguments);this.G();return b}});
  37 +r.a.n(["slice"],function(a){r.R.fn[a]=function(){var b=this();return b[a].apply(b,arguments)}});r.b("ko.observableArray",r.R);function C(a,b){a&&"object"==typeof a?b=a:(b=b||{},b.read=a||b.read);"function"!=typeof b.read&&c("Pass a function that returns the value of the dependentObservable");return b}
  38 +r.i=function(a,b,d){function e(){r.a.n(q,function(a){a.v()});q=[]}function f(){var a=g.throttleEvaluation;a&&0<=a?(clearTimeout(v),v=setTimeout(h,a)):h()}function h(){if(j&&"function"==typeof d.disposeWhen&&d.disposeWhen())g.v();else{try{e();r.U.Xa(function(a){q.push(a.sa(f))});var a=d.read.call(d.owner||b);g.N(i,"beforeChange");i=a}finally{r.U.end()}g.N(i);j=m}}function g(){if(0<arguments.length)"function"===typeof d.write?d.write.apply(d.owner||b,arguments):c("Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
38 39 else return j||h(),r.U.Ia(g),i}var i,j=p,d=C(a,d),k="object"==typeof d.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:o,n=o;if(k){n=function(){g.v()};r.a.z.wa(k,n);var t=d.disposeWhen;d.disposeWhen=function(){return!r.a.ga(k)||"function"==typeof t&&t()}}var q=[],v=o;g.jb=function(){return q.length};g.lb="function"===typeof d.write;g.v=function(){k&&r.a.z.Ja(k,n);e()};r.S.call(g);r.a.extend(g,r.i.fn);d.deferEvaluation!==m&&h();r.l(g,"dispose",g.v);r.l(g,"getDependenciesCount",g.jb);return g};
39 40 r.i.fn={B:r.i};r.i.B=r.A;r.b("ko.dependentObservable",r.i);r.b("ko.computed",r.i);
40   -(function(){function a(e,f,h){h=h||new d;e=f(e);if(!("object"==typeof e&&e!==o&&e!==l&&!(e instanceof Date)))return e;var g=e instanceof Array?[]:{};h.save(e,g);c(e,function(c){var d=f(e[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[c]=d;break;case "object":case "undefined":var k=h.get(d);g[c]=k!==l?k:a(d,f,h)}});return g}function c(a,c){if(a instanceof Array)for(var d=0;d<a.length;d++)c(d);else for(d in a)c(d)}function d(){var a=[],c=[];this.save=function(d,g){var i=
41   -r.a.k(a,d);0<=i?c[i]=g:(a.push(d),c.push(g))};this.get=function(d){d=r.a.k(a,d);return 0<=d?c[d]:l}}r.Pa=function(c){0==arguments.length&&b(Error("When calling ko.toJS, pass the object you want to convert."));return a(c,function(a){for(var c=0;r.W(a)&&10>c;c++)a=a();return a})};r.toJSON=function(a){a=r.Pa(a);return r.a.ra(a)}})();r.b("ko.toJS",r.Pa);r.b("ko.toJSON",r.toJSON);
42   -r.h={q:function(a){return"OPTION"==a.tagName?a.__ko__hasDomDataOptionValue__===m?r.a.e.get(a,r.c.options.ma):a.getAttribute("value"):"SELECT"==a.tagName?0<=a.selectedIndex?r.h.q(a.options[a.selectedIndex]):l:a.value},T:function(a,c){if("OPTION"==a.tagName)switch(typeof c){case "string":case "number":r.a.e.set(a,r.c.options.ma,l);"__ko__hasDomDataOptionValue__"in a&&delete a.__ko__hasDomDataOptionValue__;a.value=c;break;default:r.a.e.set(a,r.c.options.ma,c),a.__ko__hasDomDataOptionValue__=m,a.value=
43   -""}else if("SELECT"==a.tagName)for(var d=a.options.length-1;0<=d;d--){if(r.h.q(a.options[d])==c){a.selectedIndex=d;break}}else{if(c===o||c===l)c="";a.value=c}}};r.b("ko.selectExtensions",r.h);r.b("ko.selectExtensions.readValue",r.h.q);r.b("ko.selectExtensions.writeValue",r.h.T);
44   -r.j=function(){function a(a,e){for(var d=o;a!=d;)d=a,a=a.replace(c,function(a,c){return e[c]});return a}var c=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,e=["true","false"];return{D:[],Y:function(c){var e=r.a.w(c);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-1));for(var c=[],d=o,i,j=0;j<e.length;j++){var k=e.charAt(j);if(d===o)switch(k){case '"':case "'":case "/":d=j,i=k}else if(k==i&&"\\"!==e.charAt(j-1)){k=e.substring(d,j+
45   -1);c.push(k);var n="@ko_token_"+(c.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j=j-(k.length-n.length),d=o}}i=d=o;for(var t=0,q=o,j=0;j<e.length;j++){k=e.charAt(j);if(d===o)switch(k){case "{":d=j;q=k;i="}";break;case "(":d=j;q=k;i=")";break;case "[":d=j,q=k,i="]"}k===q?t++:k===i&&(t--,0===t&&(k=e.substring(d,j+1),c.push(k),n="@ko_token_"+(c.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j-=k.length-n.length,d=o))}i=[];e=e.split(",");d=0;for(j=e.length;d<j;d++)t=e[d],q=t.indexOf(":"),
46   -0<q&&q<t.length-1?(k=t.substring(q+1),i.push({key:a(t.substring(0,q),c),value:a(k,c)})):i.push({unknown:a(t,c)});return i},ia:function(a){for(var c="string"===typeof a?r.j.Y(a):a,g=[],a=[],i,j=0;i=c[j];j++)if(0<g.length&&g.push(","),i.key){var k;a:{k=i.key;var n=r.a.w(k);switch(n.length&&n.charAt(0)){case "'":case '"':break a;default:k="'"+n+"'"}}i=i.value;g.push(k);g.push(":");g.push(i);n=r.a.w(i);if(0<=r.a.k(e,r.a.w(n).toLowerCase())?0:n.match(d)!==o)0<a.length&&a.push(", "),a.push(k+" : function(__ko_value) { "+
47   -i+" = __ko_value; }")}else i.unknown&&g.push(i.unknown);c=g.join("");0<a.length&&(c=c+", '_ko_property_writers' : { "+a.join("")+" } ");return c},rb:function(a,c){for(var e=0;e<a.length;e++)if(r.a.w(a[e].key)==c)return m;return p}}}();r.b("ko.jsonExpressionRewriting",r.j);r.b("ko.jsonExpressionRewriting.bindingRewriteValidators",r.j.D);r.b("ko.jsonExpressionRewriting.parseObjectLiteral",r.j.Y);r.b("ko.jsonExpressionRewriting.insertPropertyAccessorsIntoJson",r.j.ia);
48   -(function(){function a(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(h)}function c(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(g)}function d(e,d){for(var f=e,g=1,h=[];f=f.nextSibling;){if(c(f)&&(g--,0===g))return h;h.push(f);a(f)&&g++}d||b(Error("Cannot find closing comment tag to match: "+e.nodeValue));return o}function e(a,c){var e=d(a,c);return e?0<e.length?e[e.length-1].nextSibling:a.nextSibling:o}var f="<\!--test--\>"===document.createComment("test").text,h=f?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
49   -/^\s*ko\s+(.*\:.*)\s*$/,g=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,i={ul:m,ol:m};r.f={C:{},childNodes:function(c){return a(c)?d(c):c.childNodes},ha:function(c){if(a(c))for(var c=r.f.childNodes(c),e=0,d=c.length;e<d;e++)r.removeNode(c[e]);else r.a.V(c)},pa:function(c,e){if(a(c)){r.f.ha(c);for(var d=c.nextSibling,f=0,g=e.length;f<g;f++)d.parentNode.insertBefore(e[f],d)}else r.a.pa(c,e)},xb:function(c,e){a(c)?c.parentNode.insertBefore(e,c.nextSibling):c.firstChild?c.insertBefore(e,c.firstChild):c.appendChild(e)},
50   -mb:function(c,e,d){a(c)?c.parentNode.insertBefore(e,d.nextSibling):d.nextSibling?c.insertBefore(e,d.nextSibling):c.appendChild(e)},nextSibling:function(d){return a(d)?e(d).nextSibling:d.nextSibling&&c(d.nextSibling)?l:d.nextSibling},ua:function(c){return(c=a(c))?c[1]:o},ib:function(a){if(r.f.ua(a)){var c;c=r.f.childNodes(a);for(var e=[],d=0,f=c.length;d<f;d++)r.a.z.F(c[d]),e.push(r.a.outerHTML(c[d]));c=String.prototype.concat.apply("",e);r.f.ha(a);(new r.m.I(a)).text(c)}},Ga:function(d){if(i[d.tagName.toLowerCase()]){var f=
51   -d.firstChild;if(f){do if(1===f.nodeType){var g;g=f.firstChild;var h=o;if(g){do if(h)h.push(g);else if(a(g)){var q=e(g,m);q?g=q:h=[g]}else c(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h){h=f.nextSibling;for(q=0;q<g.length;q++)h?d.insertBefore(g[q],h):d.appendChild(g[q])}}while(f=f.nextSibling)}}}}})();r.L=function(){};
52   -r.a.extend(r.L.prototype,{nodeHasBindings:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind")!=o;case 8:return r.f.ua(a)!=o;default:return p}},getBindings:function(a,c){var d=this.getBindingsString(a,c);return d?this.parseBindingsString(d,c):o},getBindingsString:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind");case 8:return r.f.ua(a);default:return o}},parseBindingsString:function(a,c){try{var d=c.$data,e=" { "+r.j.ia(a)+" } ";return r.a.hb(e,d===o?window:
53   -d,c)}catch(f){b(Error("Unable to parse bindings.\nMessage: "+f+";\nBindings value: "+a))}}});r.L.instance=new r.L;r.b("ko.bindingProvider",r.L);
54   -(function(){function a(a,d){for(var h,g=d.childNodes[0];h=g;)g=r.f.nextSibling(h),c(a,h,p)}function c(c,f,h){var g=m,i=1==f.nodeType;i&&r.f.Ga(f);if(i&&h||r.L.instance.nodeHasBindings(f))g=d(f,o,c,h).Bb;i&&g&&a(c,f)}function d(a,c,d,g){function i(a){return function(){return n[a]}}function j(){return n}var k=0;r.f.ib(a);var n,t;new r.i(function(){var q=d&&d instanceof r.K?d:new r.K(r.a.d(d)),v=q.$data;g&&r.Na(a,q);if(n=("function"==typeof c?c():c)||r.L.instance.getBindings(a,q)){if(0===k){k=1;for(var s in n){var w=
55   -r.c[s];w&&8===a.nodeType&&!r.f.C[s]&&b(Error("The binding '"+s+"' cannot be used with virtual elements"));if(w&&"function"==typeof w.init&&(w=(0,w.init)(a,i(s),j,v,q))&&w.controlsDescendantBindings)t!==l&&b(Error("Multiple bindings ("+t+" and "+s+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),t=s}k=2}if(2===k)for(s in n)(w=r.c[s])&&"function"==typeof w.update&&(0,w.update)(a,i(s),j,v,q)}},o,{disposeWhenNodeIsRemoved:a});
56   -return{Bb:t===l}}r.c={};r.K=function(a,c){this.$data=a;c?(this.$parent=c.$data,this.$parents=(c.$parents||[]).slice(0),this.$parents.unshift(this.$parent),this.$root=c.$root):(this.$parents=[],this.$root=a)};r.K.prototype.createChildContext=function(a){return new r.K(a,this)};r.Na=function(a,c){if(2==arguments.length)r.a.e.set(a,"__ko_bindingContext__",c);else return r.a.e.get(a,"__ko_bindingContext__")};r.ya=function(a,c,h){1===a.nodeType&&r.f.Ga(a);return d(a,c,h,m)};r.Ta=function(c,d){1===d.nodeType&&
57   -a(c,d)};r.xa=function(a,d){d&&1!==d.nodeType&&8!==d.nodeType&&b(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));d=d||window.document.body;c(a,d,m)};r.ea=function(a){switch(a.nodeType){case 1:case 8:var c=r.Na(a);if(c)return c;if(a.parentNode)return r.ea(a.parentNode)}};r.$a=function(a){return(a=r.ea(a))?a.$data:l};r.b("ko.bindingHandlers",r.c);r.b("ko.applyBindings",r.xa);r.b("ko.applyBindingsToDescendants",r.Ta);r.b("ko.applyBindingsToNode",
58   -r.ya);r.b("ko.contextFor",r.ea);r.b("ko.dataFor",r.$a)})();r.a.n(["click"],function(a){r.c[a]={init:function(c,d,e,f){return r.c.event.init.call(this,c,function(){var c={};c[a]=d();return c},e,f)}}});
59   -r.c.event={init:function(a,c,d,e){var f=c()||{},h;for(h in f)(function(){var f=h;"string"==typeof f&&r.a.s(a,f,function(a){var h,k=c()[f];if(k){var n=d();try{h=k.apply(e,arguments)}finally{if(h!==m)a.preventDefault?a.preventDefault():a.returnValue=p}if(n[f+"Bubble"]===p)a.cancelBubble=m,a.stopPropagation&&a.stopPropagation()}})})()}};
60   -r.c.submit={init:function(a,c,d,e){"function"!=typeof c()&&b(Error("The value for a submit binding must be a function to invoke on submit"));r.a.s(a,"submit",function(d){var h,g=c();try{h=g.call(e,a)}finally{if(h!==m)d.preventDefault?d.preventDefault():d.returnValue=p}})}};r.c.visible={update:function(a,c){var d=r.a.d(c()),e="none"!=a.style.display;if(d&&!e)a.style.display="";else if(!d&&e)a.style.display="none"}};
61   -r.c.enable={update:function(a,c){var d=r.a.d(c());if(d&&a.disabled)a.removeAttribute("disabled");else if(!d&&!a.disabled)a.disabled=m}};r.c.disable={update:function(a,c){r.c.enable.update(a,function(){return!r.a.d(c())})}};function D(a,c,d){d&&c!==r.h.q(a)&&r.h.T(a,c);c!==r.h.q(a)&&r.a.ta(a,"change")}
62   -r.c.value={init:function(a,c,d){var e=["change"],f=d().valueUpdate;f&&("string"==typeof f&&(f=[f]),r.a.J(e,f),e=r.a.za(e));r.a.n(e,function(e){var f=p;r.a.Cb(e,"after")&&(f=m,e=e.substring(5));var i=f?function(a){setTimeout(a,0)}:function(a){a()};r.a.s(a,e,function(){i(function(){var e=c(),f=r.h.q(a);r.Q(e)?e(f):(e=d(),e._ko_property_writers&&e._ko_property_writers.value&&e._ko_property_writers.value(f))})})})},update:function(a,c){var d=r.a.d(c()),e=r.h.q(a),f=d!=e;0===d&&0!==e&&"0"!==e&&(f=m);f&&
  41 +(function(){function a(e,f,h){h=h||new d;e=f(e);if(!("object"==typeof e&&e!==o&&e!==l&&!(e instanceof Date)))return e;var g=e instanceof Array?[]:{};h.save(e,g);b(e,function(b){var d=f(e[b]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[b]=d;break;case "object":case "undefined":var k=h.get(d);g[b]=k!==l?k:a(d,f,h)}});return g}function b(a,b){if(a instanceof Array)for(var d=0;d<a.length;d++)b(d);else for(d in a)b(d)}function d(){var a=[],b=[];this.save=function(d,g){var i=
  42 +r.a.k(a,d);0<=i?b[i]=g:(a.push(d),b.push(g))};this.get=function(d){d=r.a.k(a,d);return 0<=d?b[d]:l}}r.Pa=function(b){0==arguments.length&&c(Error("When calling ko.toJS, pass the object you want to convert."));return a(b,function(a){for(var b=0;r.W(a)&&10>b;b++)a=a();return a})};r.toJSON=function(a){a=r.Pa(a);return r.a.ra(a)}})();r.b("ko.toJS",r.Pa);r.b("ko.toJSON",r.toJSON);
  43 +r.h={q:function(a){return"OPTION"==a.tagName?a.__ko__hasDomDataOptionValue__===m?r.a.e.get(a,r.c.options.ma):a.getAttribute("value"):"SELECT"==a.tagName?0<=a.selectedIndex?r.h.q(a.options[a.selectedIndex]):l:a.value},T:function(a,b){if("OPTION"==a.tagName)switch(typeof b){case "string":case "number":r.a.e.set(a,r.c.options.ma,l);"__ko__hasDomDataOptionValue__"in a&&delete a.__ko__hasDomDataOptionValue__;a.value=b;break;default:r.a.e.set(a,r.c.options.ma,b),a.__ko__hasDomDataOptionValue__=m,a.value=
  44 +""}else if("SELECT"==a.tagName)for(var d=a.options.length-1;0<=d;d--){if(r.h.q(a.options[d])==b){a.selectedIndex=d;break}}else{if(b===o||b===l)b="";a.value=b}}};r.b("ko.selectExtensions",r.h);r.b("ko.selectExtensions.readValue",r.h.q);r.b("ko.selectExtensions.writeValue",r.h.T);
  45 +r.j=function(){function a(a,e){for(var d=o;a!=d;)d=a,a=a.replace(b,function(a,b){return e[b]});return a}var b=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,e=["true","false"];return{D:[],Y:function(b){var e=r.a.w(b);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-1));for(var b=[],d=o,i,j=0;j<e.length;j++){var k=e.charAt(j);if(d===o)switch(k){case '"':case "'":case "/":d=j,i=k}else if(k==i&&"\\"!==e.charAt(j-1)){k=e.substring(d,j+
  46 +1);b.push(k);var n="@ko_token_"+(b.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j=j-(k.length-n.length),d=o}}i=d=o;for(var t=0,q=o,j=0;j<e.length;j++){k=e.charAt(j);if(d===o)switch(k){case "{":d=j;q=k;i="}";break;case "(":d=j;q=k;i=")";break;case "[":d=j,q=k,i="]"}k===q?t++:k===i&&(t--,0===t&&(k=e.substring(d,j+1),b.push(k),n="@ko_token_"+(b.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j-=k.length-n.length,d=o))}i=[];e=e.split(",");d=0;for(j=e.length;d<j;d++)t=e[d],q=t.indexOf(":"),
  47 +0<q&&q<t.length-1?(k=t.substring(q+1),i.push({key:a(t.substring(0,q),b),value:a(k,b)})):i.push({unknown:a(t,b)});return i},ia:function(a){for(var b="string"===typeof a?r.j.Y(a):a,g=[],a=[],i,j=0;i=b[j];j++)if(0<g.length&&g.push(","),i.key){var k;a:{k=i.key;var n=r.a.w(k);switch(n.length&&n.charAt(0)){case "'":case '"':break a;default:k="'"+n+"'"}}i=i.value;g.push(k);g.push(":");g.push(i);n=r.a.w(i);if(0<=r.a.k(e,r.a.w(n).toLowerCase())?0:n.match(d)!==o)0<a.length&&a.push(", "),a.push(k+" : function(__ko_value) { "+
  48 +i+" = __ko_value; }")}else i.unknown&&g.push(i.unknown);b=g.join("");0<a.length&&(b=b+", '_ko_property_writers' : { "+a.join("")+" } ");return b},rb:function(a,b){for(var e=0;e<a.length;e++)if(r.a.w(a[e].key)==b)return m;return p}}}();r.b("ko.jsonExpressionRewriting",r.j);r.b("ko.jsonExpressionRewriting.bindingRewriteValidators",r.j.D);r.b("ko.jsonExpressionRewriting.parseObjectLiteral",r.j.Y);r.b("ko.jsonExpressionRewriting.insertPropertyAccessorsIntoJson",r.j.ia);
  49 +(function(){function a(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(h)}function b(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(g)}function d(e,d){for(var f=e,g=1,h=[];f=f.nextSibling;){if(b(f)&&(g--,0===g))return h;h.push(f);a(f)&&g++}d||c(Error("Cannot find closing comment tag to match: "+e.nodeValue));return o}function e(a,b){var e=d(a,b);return e?0<e.length?e[e.length-1].nextSibling:a.nextSibling:o}var f="<\!--test--\>"===document.createComment("test").text,h=f?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
  50 +/^\s*ko\s+(.*\:.*)\s*$/,g=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,i={ul:m,ol:m};r.f={C:{},childNodes:function(b){return a(b)?d(b):b.childNodes},ha:function(b){if(a(b))for(var b=r.f.childNodes(b),e=0,d=b.length;e<d;e++)r.removeNode(b[e]);else r.a.V(b)},pa:function(b,e){if(a(b)){r.f.ha(b);for(var d=b.nextSibling,f=0,g=e.length;f<g;f++)d.parentNode.insertBefore(e[f],d)}else r.a.pa(b,e)},xb:function(b,e){a(b)?b.parentNode.insertBefore(e,b.nextSibling):b.firstChild?b.insertBefore(e,b.firstChild):b.appendChild(e)},
  51 +mb:function(b,e,d){a(b)?b.parentNode.insertBefore(e,d.nextSibling):d.nextSibling?b.insertBefore(e,d.nextSibling):b.appendChild(e)},nextSibling:function(d){return a(d)?e(d).nextSibling:d.nextSibling&&b(d.nextSibling)?l:d.nextSibling},ua:function(b){return(b=a(b))?b[1]:o},ib:function(a){if(r.f.ua(a)){var b;b=r.f.childNodes(a);for(var e=[],d=0,f=b.length;d<f;d++)r.a.z.F(b[d]),e.push(r.a.outerHTML(b[d]));b=String.prototype.concat.apply("",e);r.f.ha(a);(new r.m.I(a)).text(b)}},Ga:function(d){if(i[d.tagName.toLowerCase()]){var f=
  52 +d.firstChild;if(f){do if(1===f.nodeType){var g;g=f.firstChild;var h=o;if(g){do if(h)h.push(g);else if(a(g)){var q=e(g,m);q?g=q:h=[g]}else b(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h){h=f.nextSibling;for(q=0;q<g.length;q++)h?d.insertBefore(g[q],h):d.appendChild(g[q])}}while(f=f.nextSibling)}}}}})();r.L=function(){};
  53 +r.a.extend(r.L.prototype,{nodeHasBindings:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind")!=o;case 8:return r.f.ua(a)!=o;default:return p}},getBindings:function(a,b){var d=this.getBindingsString(a,b);return d?this.parseBindingsString(d,b):o},getBindingsString:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind");case 8:return r.f.ua(a);default:return o}},parseBindingsString:function(a,b){try{var d=b.$data,e=" { "+r.j.ia(a)+" } ";return r.a.hb(e,d===o?window:
  54 +d,b)}catch(f){c(Error("Unable to parse bindings.\nMessage: "+f+";\nBindings value: "+a))}}});r.L.instance=new r.L;r.b("ko.bindingProvider",r.L);
  55 +(function(){function a(a,d){for(var h,g=d.childNodes[0];h=g;)g=r.f.nextSibling(h),b(a,h,p)}function b(b,f,h){var g=m,i=1==f.nodeType;i&&r.f.Ga(f);if(i&&h||r.L.instance.nodeHasBindings(f))g=d(f,o,b,h).Cb;i&&g&&a(b,f)}function d(a,b,d,g){function i(a){return function(){return n[a]}}function j(){return n}var k=0;r.f.ib(a);var n,t;new r.i(function(){var q=d&&d instanceof r.K?d:new r.K(r.a.d(d)),v=q.$data;g&&r.Na(a,q);if(n=("function"==typeof b?b():b)||r.L.instance.getBindings(a,q)){if(0===k){k=1;for(var s in n){var w=
  56 +r.c[s];w&&8===a.nodeType&&!r.f.C[s]&&c(Error("The binding '"+s+"' cannot be used with virtual elements"));if(w&&"function"==typeof w.init&&(w=(0,w.init)(a,i(s),j,v,q))&&w.controlsDescendantBindings)t!==l&&c(Error("Multiple bindings ("+t+" and "+s+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),t=s}k=2}if(2===k)for(s in n)(w=r.c[s])&&"function"==typeof w.update&&(0,w.update)(a,i(s),j,v,q)}},o,{disposeWhenNodeIsRemoved:a});
  57 +return{Cb:t===l}}r.c={};r.K=function(a,b){this.$data=a;b?(this.$parent=b.$data,this.$parents=(b.$parents||[]).slice(0),this.$parents.unshift(this.$parent),this.$root=b.$root):(this.$parents=[],this.$root=a)};r.K.prototype.createChildContext=function(a){return new r.K(a,this)};r.Na=function(a,b){if(2==arguments.length)r.a.e.set(a,"__ko_bindingContext__",b);else return r.a.e.get(a,"__ko_bindingContext__")};r.ya=function(a,b,h){1===a.nodeType&&r.f.Ga(a);return d(a,b,h,m)};r.Ta=function(b,d){1===d.nodeType&&
  58 +a(b,d)};r.xa=function(a,d){d&&1!==d.nodeType&&8!==d.nodeType&&c(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));d=d||window.document.body;b(a,d,m)};r.ea=function(a){switch(a.nodeType){case 1:case 8:var b=r.Na(a);if(b)return b;if(a.parentNode)return r.ea(a.parentNode)}};r.$a=function(a){return(a=r.ea(a))?a.$data:l};r.b("ko.bindingHandlers",r.c);r.b("ko.applyBindings",r.xa);r.b("ko.applyBindingsToDescendants",r.Ta);r.b("ko.applyBindingsToNode",
  59 +r.ya);r.b("ko.contextFor",r.ea);r.b("ko.dataFor",r.$a)})();r.a.n(["click"],function(a){r.c[a]={init:function(b,d,e,f){return r.c.event.init.call(this,b,function(){var b={};b[a]=d();return b},e,f)}}});
  60 +r.c.event={init:function(a,b,d,e){var f=b()||{},h;for(h in f)(function(){var f=h;"string"==typeof f&&r.a.s(a,f,function(a){var h,k=b()[f];if(k){var n=d();try{h=k.apply(e,arguments)}finally{if(h!==m)a.preventDefault?a.preventDefault():a.returnValue=p}if(n[f+"Bubble"]===p)a.cancelBubble=m,a.stopPropagation&&a.stopPropagation()}})})()}};
  61 +r.c.submit={init:function(a,b,d,e){"function"!=typeof b()&&c(Error("The value for a submit binding must be a function to invoke on submit"));r.a.s(a,"submit",function(d){var h,g=b();try{h=g.call(e,a)}finally{if(h!==m)d.preventDefault?d.preventDefault():d.returnValue=p}})}};r.c.visible={update:function(a,b){var d=r.a.d(b()),e="none"!=a.style.display;if(d&&!e)a.style.display="";else if(!d&&e)a.style.display="none"}};
  62 +r.c.enable={update:function(a,b){var d=r.a.d(b());if(d&&a.disabled)a.removeAttribute("disabled");else if(!d&&!a.disabled)a.disabled=m}};r.c.disable={update:function(a,b){r.c.enable.update(a,function(){return!r.a.d(b())})}};function D(a,b,d){d&&b!==r.h.q(a)&&r.h.T(a,b);b!==r.h.q(a)&&r.a.ta(a,"change")}
  63 +r.c.value={init:function(a,b,d){var e=["change"],f=d().valueUpdate;f&&("string"==typeof f&&(f=[f]),r.a.J(e,f),e=r.a.za(e));r.a.n(e,function(e){var f=p;r.a.Db(e,"after")&&(f=m,e=e.substring(5));var i=f?function(a){setTimeout(a,0)}:function(a){a()};r.a.s(a,e,function(){i(function(){var e=b(),f=r.h.q(a);r.Q(e)?e(f):(e=d(),e._ko_property_writers&&e._ko_property_writers.value&&e._ko_property_writers.value(f))})})})},update:function(a,b){var d=r.a.d(b()),e=r.h.q(a),f=d!=e;0===d&&0!==e&&"0"!==e&&(f=m);f&&
63 64 (e=function(){r.h.T(a,d)},e(),"SELECT"==a.tagName&&setTimeout(e,0));"SELECT"==a.tagName&&0<a.length&&D(a,d,p)}};
64   -r.c.options={update:function(a,c,d){"SELECT"!=a.tagName&&b(Error("options binding applies only to SELECT elements"));for(var e=0==a.length,f=r.a.ba(r.a.aa(a.childNodes,function(a){return a.tagName&&"OPTION"==a.tagName&&a.selected}),function(a){return r.h.q(a)||a.innerText||a.textContent}),h=a.scrollTop,g=r.a.d(c());0<a.length;)r.F(a.options[0]),a.remove(0);if(g){d=d();"number"!=typeof g.length&&(g=[g]);if(d.optionsCaption){var i=document.createElement("OPTION");r.a.Z(i,d.optionsCaption);r.h.T(i,l);
65   -a.appendChild(i)}for(var c=0,j=g.length;c<j;c++){var i=document.createElement("OPTION"),k="string"==typeof d.optionsValue?g[c][d.optionsValue]:g[c],k=r.a.d(k);r.h.T(i,k);var n=d.optionsText,k="function"==typeof n?n(g[c]):"string"==typeof n?g[c][n]:k;if(k===o||k===l)k="";k=r.a.d(k).toString();"string"==typeof i.innerText?i.innerText=k:i.textContent=k;a.appendChild(i)}g=a.getElementsByTagName("OPTION");c=i=0;for(j=g.length;c<j;c++)0<=r.a.k(f,r.h.q(g[c]))&&(r.a.Ma(g[c],m),i++);if(h)a.scrollTop=h;e&&
  65 +r.c.options={update:function(a,b,d){"SELECT"!=a.tagName&&c(Error("options binding applies only to SELECT elements"));for(var e=0==a.length,f=r.a.ba(r.a.aa(a.childNodes,function(a){return a.tagName&&"OPTION"==a.tagName&&a.selected}),function(a){return r.h.q(a)||a.innerText||a.textContent}),h=a.scrollTop,g=r.a.d(b());0<a.length;)r.F(a.options[0]),a.remove(0);if(g){d=d();"number"!=typeof g.length&&(g=[g]);if(d.optionsCaption){var i=document.createElement("OPTION");r.a.Z(i,d.optionsCaption);r.h.T(i,l);
  66 +a.appendChild(i)}for(var b=0,j=g.length;b<j;b++){var i=document.createElement("OPTION"),k="string"==typeof d.optionsValue?g[b][d.optionsValue]:g[b],k=r.a.d(k);r.h.T(i,k);var n=d.optionsText,k="function"==typeof n?n(g[b]):"string"==typeof n?g[b][n]:k;if(k===o||k===l)k="";k=r.a.d(k).toString();"string"==typeof i.innerText?i.innerText=k:i.textContent=k;a.appendChild(i)}g=a.getElementsByTagName("OPTION");b=i=0;for(j=g.length;b<j;b++)0<=r.a.k(f,r.h.q(g[b]))&&(r.a.Ma(g[b],m),i++);if(h)a.scrollTop=h;e&&
66 67 "value"in d&&D(a,r.a.d(d.value),m)}}};r.c.options.ma="__ko.bindingHandlers.options.optionValueDomData__";
67   -r.c.selectedOptions={Ea:function(a){for(var c=[],a=a.childNodes,d=0,e=a.length;d<e;d++){var f=a[d];"OPTION"==f.tagName&&f.selected&&c.push(r.h.q(f))}return c},init:function(a,c,d){r.a.s(a,"change",function(){var a=c();r.Q(a)?a(r.c.selectedOptions.Ea(this)):(a=d(),a._ko_property_writers&&a._ko_property_writers.value&&a._ko_property_writers.value(r.c.selectedOptions.Ea(this)))})},update:function(a,c){"SELECT"!=a.tagName&&b(Error("values binding applies only to SELECT elements"));var d=r.a.d(c());if(d&&
68   -"number"==typeof d.length)for(var e=a.childNodes,f=0,h=e.length;f<h;f++){var g=e[f];"OPTION"==g.tagName&&r.a.Ma(g,0<=r.a.k(d,r.h.q(g)))}}};r.c.text={update:function(a,c){var d=r.a.d(c());if(d===o||d===l)d="";"string"==typeof a.innerText?a.innerText=d:a.textContent=d}};r.c.html={init:function(){return{controlsDescendantBindings:m}},update:function(a,c){var d=r.a.d(c());r.a.Z(a,d)}};r.c.css={update:function(a,c){var d=r.a.d(c()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);r.a.Qa(a,e,f)}}};
69   -r.c.style={update:function(a,c){var d=r.a.d(c()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);a.style[e]=f||""}}};r.c.uniqueName={init:function(a,c){if(c())a.name="ko_unique_"+ ++r.c.uniqueName.Za,(r.a.ob||r.a.pb)&&a.mergeAttributes(document.createElement("<input name='"+a.name+"'/>"),p)}};r.c.uniqueName.Za=0;
70   -r.c.checked={init:function(a,c,d){r.a.s(a,"click",function(){var e;if("checkbox"==a.type)e=a.checked;else if("radio"==a.type&&a.checked)e=a.value;else return;var f=c();"checkbox"==a.type&&r.a.d(f)instanceof Array?(e=r.a.k(r.a.d(f),a.value),a.checked&&0>e?f.push(a.value):!a.checked&&0<=e&&f.splice(e,1)):r.Q(f)?f()!==e&&f(e):(f=d(),f._ko_property_writers&&f._ko_property_writers.checked&&f._ko_property_writers.checked(e))});"radio"==a.type&&!a.name&&r.c.uniqueName.init(a,function(){return m})},update:function(a,
71   -c){var d=r.a.d(c());if("checkbox"==a.type)a.checked=d instanceof Array?0<=r.a.k(d,a.value):d;else if("radio"==a.type)a.checked=a.value==d}};r.c.attr={update:function(a,c){var d=r.a.d(c())||{},e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);f===p||f===o||f===l?a.removeAttribute(e):a.setAttribute(e,f.toString())}}};
72   -r.c.hasfocus={init:function(a,c,d){function e(a){var e=c();a!=r.a.d(e)&&(r.Q(e)?e(a):(e=d(),e._ko_property_writers&&e._ko_property_writers.hasfocus&&e._ko_property_writers.hasfocus(a)))}r.a.s(a,"focus",function(){e(m)});r.a.s(a,"focusin",function(){e(m)});r.a.s(a,"blur",function(){e(p)});r.a.s(a,"focusout",function(){e(p)})},update:function(a,c){var d=r.a.d(c());d?a.focus():a.blur();r.a.ta(a,d?"focusin":"focusout")}};
73   -r.c["with"]={o:function(a){return function(){var c=a();return{"if":c,data:c,templateEngine:r.p.M}}},init:function(a,c){return r.c.template.init(a,r.c["with"].o(c))},update:function(a,c,d,e,f){return r.c.template.update(a,r.c["with"].o(c),d,e,f)}};r.j.D["with"]=p;r.f.C["with"]=m;r.c["if"]={o:function(a){return function(){return{"if":a(),templateEngine:r.p.M}}},init:function(a,c){return r.c.template.init(a,r.c["if"].o(c))},update:function(a,c,d,e,f){return r.c.template.update(a,r.c["if"].o(c),d,e,f)}};
74   -r.j.D["if"]=p;r.f.C["if"]=m;r.c.ifnot={o:function(a){return function(){return{ifnot:a(),templateEngine:r.p.M}}},init:function(a,c){return r.c.template.init(a,r.c.ifnot.o(c))},update:function(a,c,d,e,f){return r.c.template.update(a,r.c.ifnot.o(c),d,e,f)}};r.j.D.ifnot=p;r.f.C.ifnot=m;
75   -r.c.foreach={o:function(a){return function(){var c=r.a.d(a());return!c||"number"==typeof c.length?{foreach:c,templateEngine:r.p.M}:{foreach:c.data,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,templateEngine:r.p.M}}},init:function(a,c){return r.c.template.init(a,r.c.foreach.o(c))},update:function(a,c,d,e,f){return r.c.template.update(a,r.c.foreach.o(c),d,e,f)}};r.j.D.foreach=p;r.f.C.foreach=m;r.b("ko.allowedVirtualElementBindings",r.f.C);
76   -r.t=function(){};r.t.prototype.renderTemplateSource=function(){b("Override renderTemplateSource in your ko.templateEngine subclass")};r.t.prototype.createJavaScriptEvaluatorBlock=function(){b("Override createJavaScriptEvaluatorBlock in your ko.templateEngine subclass")};
77   -r.t.prototype.makeTemplateSource=function(a){if("string"==typeof a){var c=document.getElementById(a);c||b(Error("Cannot find template with ID "+a));return new r.m.g(c)}if(1==a.nodeType||8==a.nodeType)return new r.m.I(a);b(Error("Unrecognised template type: "+a))};r.t.prototype.renderTemplate=function(a,c,d){return this.renderTemplateSource(this.makeTemplateSource(a),c,d)};r.t.prototype.isTemplateRewritten=function(a){return this.allowTemplateRewriting===p?m:this.X&&this.X[a]?m:this.makeTemplateSource(a).data("isRewritten")};
78   -r.t.prototype.rewriteTemplate=function(a,c){var d=this.makeTemplateSource(a),e=c(d.text());d.text(e);d.data("isRewritten",m);if("string"==typeof a)this.X=this.X||{},this.X[a]=m};r.b("ko.templateEngine",r.t);
79   -r.$=function(){function a(a,c,d){for(var a=r.j.Y(a),g=r.j.D,i=0;i<a.length;i++){var j=a[i].key;if(g.hasOwnProperty(j)){var k=g[j];"function"===typeof k?(j=k(a[i].value))&&b(Error(j)):k||b(Error("This template engine does not support the '"+j+"' binding within its templates"))}}a="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+r.j.ia(a)+" } })() })";return d.createJavaScriptEvaluatorBlock(a)+c}var c=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,
80   -d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{gb:function(a,c){c.isTemplateRewritten(a)||c.rewriteTemplate(a,function(a){return r.$.ub(a,c)})},ub:function(e,f){return e.replace(c,function(c,d,e,j,k,n,t){return a(t,d,f)}).replace(d,function(c,d){return a(d,"<\!-- ko --\>",f)})},Ua:function(a){return r.r.la(function(c,d){c.nextSibling&&r.ya(c.nextSibling,a,d)})}}}();r.b("ko.templateRewriting",r.$);r.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",r.$.Ua);r.m={};r.m.g=function(a){this.g=a};
  68 +r.c.selectedOptions={Ea:function(a){for(var b=[],a=a.childNodes,d=0,e=a.length;d<e;d++){var f=a[d];"OPTION"==f.tagName&&f.selected&&b.push(r.h.q(f))}return b},init:function(a,b,d){r.a.s(a,"change",function(){var a=b();r.Q(a)?a(r.c.selectedOptions.Ea(this)):(a=d(),a._ko_property_writers&&a._ko_property_writers.value&&a._ko_property_writers.value(r.c.selectedOptions.Ea(this)))})},update:function(a,b){"SELECT"!=a.tagName&&c(Error("values binding applies only to SELECT elements"));var d=r.a.d(b());if(d&&
  69 +"number"==typeof d.length)for(var e=a.childNodes,f=0,h=e.length;f<h;f++){var g=e[f];"OPTION"==g.tagName&&r.a.Ma(g,0<=r.a.k(d,r.h.q(g)))}}};r.c.text={update:function(a,b){r.a.Bb(a,b())}};r.c.html={init:function(){return{controlsDescendantBindings:m}},update:function(a,b){var d=r.a.d(b());r.a.Z(a,d)}};r.c.css={update:function(a,b){var d=r.a.d(b()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);r.a.Qa(a,e,f)}}};
  70 +r.c.style={update:function(a,b){var d=r.a.d(b()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);a.style[e]=f||""}}};r.c.uniqueName={init:function(a,b){if(b())a.name="ko_unique_"+ ++r.c.uniqueName.Za,(r.a.ob||r.a.pb)&&a.mergeAttributes(document.createElement("<input name='"+a.name+"'/>"),p)}};r.c.uniqueName.Za=0;
  71 +r.c.checked={init:function(a,b,d){r.a.s(a,"click",function(){var e;if("checkbox"==a.type)e=a.checked;else if("radio"==a.type&&a.checked)e=a.value;else return;var f=b();"checkbox"==a.type&&r.a.d(f)instanceof Array?(e=r.a.k(r.a.d(f),a.value),a.checked&&0>e?f.push(a.value):!a.checked&&0<=e&&f.splice(e,1)):r.Q(f)?f()!==e&&f(e):(f=d(),f._ko_property_writers&&f._ko_property_writers.checked&&f._ko_property_writers.checked(e))});"radio"==a.type&&!a.name&&r.c.uniqueName.init(a,function(){return m})},update:function(a,
  72 +b){var d=r.a.d(b());if("checkbox"==a.type)a.checked=d instanceof Array?0<=r.a.k(d,a.value):d;else if("radio"==a.type)a.checked=a.value==d}};r.c.attr={update:function(a,b){var d=r.a.d(b())||{},e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);f===p||f===o||f===l?a.removeAttribute(e):a.setAttribute(e,f.toString())}}};
  73 +r.c.hasfocus={init:function(a,b,d){function e(a){var e=b();a!=r.a.d(e)&&(r.Q(e)?e(a):(e=d(),e._ko_property_writers&&e._ko_property_writers.hasfocus&&e._ko_property_writers.hasfocus(a)))}r.a.s(a,"focus",function(){e(m)});r.a.s(a,"focusin",function(){e(m)});r.a.s(a,"blur",function(){e(p)});r.a.s(a,"focusout",function(){e(p)})},update:function(a,b){var d=r.a.d(b());d?a.focus():a.blur();r.a.ta(a,d?"focusin":"focusout")}};
  74 +r.c["with"]={o:function(a){return function(){var b=a();return{"if":b,data:b,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["with"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["with"].o(b),d,e,f)}};r.j.D["with"]=p;r.f.C["with"]=m;r.c["if"]={o:function(a){return function(){return{"if":a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["if"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["if"].o(b),d,e,f)}};
  75 +r.j.D["if"]=p;r.f.C["if"]=m;r.c.ifnot={o:function(a){return function(){return{ifnot:a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.ifnot.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.ifnot.o(b),d,e,f)}};r.j.D.ifnot=p;r.f.C.ifnot=m;
  76 +r.c.foreach={o:function(a){return function(){var b=r.a.d(a());return!b||"number"==typeof b.length?{foreach:b,templateEngine:r.p.M}:{foreach:b.data,includeDestroyed:b.includeDestroyed,afterAdd:b.afterAdd,beforeRemove:b.beforeRemove,afterRender:b.afterRender,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.foreach.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.foreach.o(b),d,e,f)}};r.j.D.foreach=p;r.f.C.foreach=m;r.b("ko.allowedVirtualElementBindings",r.f.C);
  77 +r.t=function(){};r.t.prototype.renderTemplateSource=function(){c("Override renderTemplateSource in your ko.templateEngine subclass")};r.t.prototype.createJavaScriptEvaluatorBlock=function(){c("Override createJavaScriptEvaluatorBlock in your ko.templateEngine subclass")};
  78 +r.t.prototype.makeTemplateSource=function(a){if("string"==typeof a){var b=document.getElementById(a);b||c(Error("Cannot find template with ID "+a));return new r.m.g(b)}if(1==a.nodeType||8==a.nodeType)return new r.m.I(a);c(Error("Unrecognised template type: "+a))};r.t.prototype.renderTemplate=function(a,b,d){return this.renderTemplateSource(this.makeTemplateSource(a),b,d)};r.t.prototype.isTemplateRewritten=function(a){return this.allowTemplateRewriting===p?m:this.X&&this.X[a]?m:this.makeTemplateSource(a).data("isRewritten")};
  79 +r.t.prototype.rewriteTemplate=function(a,b){var d=this.makeTemplateSource(a),e=b(d.text());d.text(e);d.data("isRewritten",m);if("string"==typeof a)this.X=this.X||{},this.X[a]=m};r.b("ko.templateEngine",r.t);
  80 +r.$=function(){function a(a,b,d){for(var a=r.j.Y(a),g=r.j.D,i=0;i<a.length;i++){var j=a[i].key;if(g.hasOwnProperty(j)){var k=g[j];"function"===typeof k?(j=k(a[i].value))&&c(Error(j)):k||c(Error("This template engine does not support the '"+j+"' binding within its templates"))}}a="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+r.j.ia(a)+" } })() })";return d.createJavaScriptEvaluatorBlock(a)+b}var b=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,
  81 +d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{gb:function(a,b){b.isTemplateRewritten(a)||b.rewriteTemplate(a,function(a){return r.$.ub(a,b)})},ub:function(e,f){return e.replace(b,function(b,e,d,j,k,n,t){return a(t,e,f)}).replace(d,function(b,e){return a(e,"<\!-- ko --\>",f)})},Ua:function(a){return r.r.la(function(b,d){b.nextSibling&&r.ya(b.nextSibling,a,d)})}}}();r.b("ko.templateRewriting",r.$);r.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",r.$.Ua);r.m={};r.m.g=function(a){this.g=a};
81 82 r.m.g.prototype.text=function(){if(0==arguments.length)return"script"==this.g.tagName.toLowerCase()?this.g.text:this.g.innerHTML;var a=arguments[0];"script"==this.g.tagName.toLowerCase()?this.g.text=a:r.a.Z(this.g,a)};r.m.g.prototype.data=function(a){if(1===arguments.length)return r.a.e.get(this.g,"templateSourceData_"+a);r.a.e.set(this.g,"templateSourceData_"+a,arguments[1])};r.m.I=function(a){this.g=a};r.m.I.prototype=new r.m.g;
82 83 r.m.I.prototype.text=function(){if(0==arguments.length)return r.a.e.get(this.g,"__ko_anon_template__");r.a.e.set(this.g,"__ko_anon_template__",arguments[0])};r.b("ko.templateSources",r.m);r.b("ko.templateSources.domElement",r.m.g);r.b("ko.templateSources.anonymousTemplate",r.m.I);
83   -(function(){function a(a,c,d){for(var g=0;node=a[g];g++)node.parentNode===c&&(1===node.nodeType||8===node.nodeType)&&d(node)}function c(a,c,h,g,i){var i=i||{},j=i.templateEngine||d;r.$.gb(h,j);h=j.renderTemplate(h,g,i);("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)&&b("Template engine must return an array of DOM nodes");j=p;switch(c){case "replaceChildren":r.f.pa(a,h);j=m;break;case "replaceNode":r.a.Ka(a,h);j=m;break;case "ignoreTargetNode":break;default:b(Error("Unknown renderMode: "+
84   -c))}j&&(r.va(h,g),i.afterRender&&i.afterRender(h,g.$data));return h}var d;r.qa=function(a){a!=l&&!(a instanceof r.t)&&b("templateEngine must inherit from ko.templateEngine");d=a};r.va=function(c,d){var h=r.a.J([],c),g=0<c.length?c[0].parentNode:o;a(h,g,function(a){r.xa(d,a)});a(h,g,function(a){r.r.Sa(a,[d])})};r.oa=function(a,f,h,g,i){h=h||{};(h.templateEngine||d)==l&&b("Set a template engine before calling renderTemplate");i=i||"replaceChildren";if(g){var j=g.nodeType?g:0<g.length?g[0]:o;return new r.i(function(){var d=
85   -f&&f instanceof r.K?f:new r.K(r.a.d(f)),n="function"==typeof a?a(d.$data):a,d=c(g,i,n,d,h);"replaceNode"==i&&(g=d,j=g.nodeType?g:0<g.length?g[0]:o)},o,{disposeWhen:function(){return!j||!r.a.ga(j)},disposeWhenNodeIsRemoved:j&&"replaceNode"==i?j.parentNode:j})}return r.r.la(function(c){r.oa(a,f,h,c,"replaceNode")})};r.Ab=function(a,d,h,g,i){function j(a,c){var d=k(a);r.va(c,d);h.afterRender&&h.afterRender(c,d.$data)}function k(a){return i.createChildContext(r.a.d(a))}return new r.i(function(){var i=
86   -r.a.d(d)||[];"undefined"==typeof i.length&&(i=[i]);i=r.a.aa(i,function(a){return h.includeDestroyed||a===l||a===o||!r.a.d(a._destroy)});r.a.La(g,i,function(d){var f="function"==typeof a?a(d):a;return c(o,"ignoreTargetNode",f,k(d),h)},h,j)},o,{disposeWhenNodeIsRemoved:g})};r.c.template={init:function(a,c){var d=r.a.d(c());"string"!=typeof d&&!d.name&&1==a.nodeType&&((new r.m.I(a)).text(a.innerHTML),r.a.V(a));return{controlsDescendantBindings:m}},update:function(a,c,d,g,i){c=r.a.d(c());g=m;"string"==
87   -typeof c?d=c:(d=c.name,"if"in c&&(g=g&&r.a.d(c["if"])),"ifnot"in c&&(g=g&&!r.a.d(c.ifnot)));var j=o;"undefined"!=typeof c.foreach?j=r.Ab(d||a,g&&c.foreach||[],c,a,i):g?(i="object"==typeof c&&"data"in c?i.createChildContext(r.a.d(c.data)):i,j=r.oa(d||a,i,c,a)):r.f.ha(a);i=j;(c=r.a.e.get(a,"__ko__templateSubscriptionDomDataKey__"))&&"function"==typeof c.v&&c.v();r.a.e.set(a,"__ko__templateSubscriptionDomDataKey__",i)}};r.j.D.template=function(a){a=r.j.Y(a);return 1==a.length&&a[0].unknown?o:r.j.rb(a,
  84 +(function(){function a(a,b,d){for(var g=0;node=a[g];g++)node.parentNode===b&&(1===node.nodeType||8===node.nodeType)&&d(node)}function b(a,b,h,g,i){var i=i||{},j=i.templateEngine||d;r.$.gb(h,j);h=j.renderTemplate(h,g,i);("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)&&c("Template engine must return an array of DOM nodes");j=p;switch(b){case "replaceChildren":r.f.pa(a,h);j=m;break;case "replaceNode":r.a.Ka(a,h);j=m;break;case "ignoreTargetNode":break;default:c(Error("Unknown renderMode: "+
  85 +b))}j&&(r.va(h,g),i.afterRender&&i.afterRender(h,g.$data));return h}var d;r.qa=function(a){a!=l&&!(a instanceof r.t)&&c("templateEngine must inherit from ko.templateEngine");d=a};r.va=function(b,d){var h=r.a.J([],b),g=0<b.length?b[0].parentNode:o;a(h,g,function(a){r.xa(d,a)});a(h,g,function(a){r.r.Sa(a,[d])})};r.oa=function(a,f,h,g,i){h=h||{};(h.templateEngine||d)==l&&c("Set a template engine before calling renderTemplate");i=i||"replaceChildren";if(g){var j=g.nodeType?g:0<g.length?g[0]:o;return new r.i(function(){var d=
  86 +f&&f instanceof r.K?f:new r.K(r.a.d(f)),n="function"==typeof a?a(d.$data):a,d=b(g,i,n,d,h);"replaceNode"==i&&(g=d,j=g.nodeType?g:0<g.length?g[0]:o)},o,{disposeWhen:function(){return!j||!r.a.ga(j)},disposeWhenNodeIsRemoved:j&&"replaceNode"==i?j.parentNode:j})}return r.r.la(function(b){r.oa(a,f,h,b,"replaceNode")})};r.Ab=function(a,d,h,g,i){function j(a,b){var d=k(a);r.va(b,d);h.afterRender&&h.afterRender(b,d.$data)}function k(a){return i.createChildContext(r.a.d(a))}return new r.i(function(){var i=
  87 +r.a.d(d)||[];"undefined"==typeof i.length&&(i=[i]);i=r.a.aa(i,function(a){return h.includeDestroyed||a===l||a===o||!r.a.d(a._destroy)});r.a.La(g,i,function(d){var f="function"==typeof a?a(d):a;return b(o,"ignoreTargetNode",f,k(d),h)},h,j)},o,{disposeWhenNodeIsRemoved:g})};r.c.template={init:function(a,b){var d=r.a.d(b());"string"!=typeof d&&!d.name&&1==a.nodeType&&((new r.m.I(a)).text(a.innerHTML),r.a.V(a));return{controlsDescendantBindings:m}},update:function(a,b,d,g,i){b=r.a.d(b());g=m;"string"==
  88 +typeof b?d=b:(d=b.name,"if"in b&&(g=g&&r.a.d(b["if"])),"ifnot"in b&&(g=g&&!r.a.d(b.ifnot)));var j=o;"undefined"!=typeof b.foreach?j=r.Ab(d||a,g&&b.foreach||[],b,a,i):g?(i="object"==typeof b&&"data"in b?i.createChildContext(r.a.d(b.data)):i,j=r.oa(d||a,i,b,a)):r.f.ha(a);i=j;(b=r.a.e.get(a,"__ko__templateSubscriptionDomDataKey__"))&&"function"==typeof b.v&&b.v();r.a.e.set(a,"__ko__templateSubscriptionDomDataKey__",i)}};r.j.D.template=function(a){a=r.j.Y(a);return 1==a.length&&a[0].unknown?o:r.j.rb(a,
88 89 "name")?o:"This template engine does not support anonymous templates nested within its templates"};r.f.C.template=m})();r.b("ko.setTemplateEngine",r.qa);r.b("ko.renderTemplate",r.oa);
89   -r.a.O=function(a,c,d){if(d===l)return r.a.O(a,c,1)||r.a.O(a,c,10)||r.a.O(a,c,Number.MAX_VALUE);for(var a=a||[],c=c||[],e=a,f=c,h=[],g=0;g<=f.length;g++)h[g]=[];for(var g=0,i=Math.min(e.length,d);g<=i;g++)h[0][g]=g;g=1;for(i=Math.min(f.length,d);g<=i;g++)h[g][0]=g;for(var i=e.length,j,k=f.length,g=1;g<=i;g++){j=Math.max(1,g-d);for(var n=Math.min(k,g+d);j<=n;j++)h[j][g]=e[g-1]===f[j-1]?h[j-1][g-1]:Math.min(h[j-1][g]===l?Number.MAX_VALUE:h[j-1][g]+1,h[j][g-1]===l?Number.MAX_VALUE:h[j][g-1]+1)}d=a.length;
90   -e=c.length;f=[];g=h[e][d];if(g===l)h=o;else{for(;0<d||0<e;){i=h[e][d];k=0<e?h[e-1][d]:g+1;n=0<d?h[e][d-1]:g+1;j=0<e&&0<d?h[e-1][d-1]:g+1;if(k===l||k<i-1)k=g+1;if(n===l||n<i-1)n=g+1;j<i-1&&(j=g+1);k<=n&&k<j?(f.push({status:"added",value:c[e-1]}),e--):(n<k&&n<j?f.push({status:"deleted",value:a[d-1]}):(f.push({status:"retained",value:a[d-1]}),e--),d--)}h=f.reverse()}return h};r.b("ko.utils.compareArrays",r.a.O);
91   -(function(){function a(a){if(2<a.length){for(var c=a[0],f=a[a.length-1],h=[c];c!==f;){c=c.nextSibling;if(!c)return;h.push(c)}Array.prototype.splice.apply(a,[0,a.length].concat(h))}}function c(c,e,f,h){var g=[],c=r.i(function(){var c=e(f)||[];0<g.length&&(a(g),r.a.Ka(g,c),h&&h(f,c));g.splice(0,g.length);r.a.J(g,c)},o,{disposeWhenNodeIsRemoved:c,disposeWhen:function(){return 0==g.length||!r.a.ga(g[0])}});return{sb:g,i:c}}r.a.La=function(d,e,f,h,g){for(var e=e||[],h=h||{},i=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===
92   -l,j=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],k=r.a.ba(j,function(a){return a.Va}),n=r.a.O(k,e),e=[],t=0,q=[],k=[],v=o,s=0,w=n.length;s<w;s++)switch(n[s].status){case "retained":var x=j[t];e.push(x);0<x.P.length&&(v=x.P[x.P.length-1]);t++;break;case "deleted":j[t].i.v();a(j[t].P);r.a.n(j[t].P,function(a){q.push({element:a,index:s,value:n[s].value});v=a});t++;break;case "added":var x=n[s].value,z=c(d,f,x,g),u=z.sb;e.push({Va:n[s].value,P:u,i:z.i});for(var z=0,y=u.length;z<
  90 +r.a.O=function(a,b,d){if(d===l)return r.a.O(a,b,1)||r.a.O(a,b,10)||r.a.O(a,b,Number.MAX_VALUE);for(var a=a||[],b=b||[],e=a,f=b,h=[],g=0;g<=f.length;g++)h[g]=[];for(var g=0,i=Math.min(e.length,d);g<=i;g++)h[0][g]=g;g=1;for(i=Math.min(f.length,d);g<=i;g++)h[g][0]=g;for(var i=e.length,j,k=f.length,g=1;g<=i;g++){j=Math.max(1,g-d);for(var n=Math.min(k,g+d);j<=n;j++)h[j][g]=e[g-1]===f[j-1]?h[j-1][g-1]:Math.min(h[j-1][g]===l?Number.MAX_VALUE:h[j-1][g]+1,h[j][g-1]===l?Number.MAX_VALUE:h[j][g-1]+1)}d=a.length;
  91 +e=b.length;f=[];g=h[e][d];if(g===l)h=o;else{for(;0<d||0<e;){i=h[e][d];k=0<e?h[e-1][d]:g+1;n=0<d?h[e][d-1]:g+1;j=0<e&&0<d?h[e-1][d-1]:g+1;if(k===l||k<i-1)k=g+1;if(n===l||n<i-1)n=g+1;j<i-1&&(j=g+1);k<=n&&k<j?(f.push({status:"added",value:b[e-1]}),e--):(n<k&&n<j?f.push({status:"deleted",value:a[d-1]}):(f.push({status:"retained",value:a[d-1]}),e--),d--)}h=f.reverse()}return h};r.b("ko.utils.compareArrays",r.a.O);
  92 +(function(){function a(a){if(2<a.length){for(var b=a[0],f=a[a.length-1],h=[b];b!==f;){b=b.nextSibling;if(!b)return;h.push(b)}Array.prototype.splice.apply(a,[0,a.length].concat(h))}}function b(b,e,f,h){var g=[],b=r.i(function(){var b=e(f)||[];0<g.length&&(a(g),r.a.Ka(g,b),h&&h(f,b));g.splice(0,g.length);r.a.J(g,b)},o,{disposeWhenNodeIsRemoved:b,disposeWhen:function(){return 0==g.length||!r.a.ga(g[0])}});return{sb:g,i:b}}r.a.La=function(d,e,f,h,g){for(var e=e||[],h=h||{},i=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===
  93 +l,j=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],k=r.a.ba(j,function(a){return a.Va}),n=r.a.O(k,e),e=[],t=0,q=[],k=[],v=o,s=0,w=n.length;s<w;s++)switch(n[s].status){case "retained":var x=j[t];e.push(x);0<x.P.length&&(v=x.P[x.P.length-1]);t++;break;case "deleted":j[t].i.v();a(j[t].P);r.a.n(j[t].P,function(a){q.push({element:a,index:s,value:n[s].value});v=a});t++;break;case "added":var x=n[s].value,z=b(d,f,x,g),u=z.sb;e.push({Va:n[s].value,P:u,i:z.i});for(var z=0,y=u.length;z<
93 94 y;z++){var A=u[z];k.push({element:A,index:s,value:n[s].value});v==o?r.f.xb(d,A):r.f.mb(d,A,v);v=A}g&&g(x,u)}r.a.n(q,function(a){r.F(a.element)});f=p;if(!i){if(h.afterAdd)for(s=0;s<k.length;s++)h.afterAdd(k[s].element,k[s].index,k[s].value);if(h.beforeRemove){for(s=0;s<q.length;s++)h.beforeRemove(q[s].element,q[s].index,q[s].value);f=m}}f||r.a.n(q,function(a){r.removeNode(a.element)});r.a.e.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",e)}})();
94 95 r.b("ko.utils.setDomNodeChildrenFromArrayMapping",r.a.La);r.p=function(){this.allowTemplateRewriting=p};r.p.prototype=new r.t;r.p.prototype.renderTemplateSource=function(a){a=a.text();return r.a.na(a)};r.p.M=new r.p;r.qa(r.p.M);r.b("ko.nativeTemplateEngine",r.p);
95   -(function(){r.ja=function(){var a=this.qb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(d,e,f){f=f||{};2>a&&b(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var h=d.data("precompiled");h||(h=d.text()||"",h=jQuery.template(o,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),d.data("precompiled",h));
96   -d=[e.$data];e=jQuery.extend({koBindingContext:e},f.templateOptions);e=jQuery.tmpl(h,d,e);e.appendTo(document.createElement("div"));jQuery.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,c){document.write("<script type='text/html' id='"+a+"'>"+c+"<\/script>")};if(0<a)jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "}};r.ja.prototype=new r.t;
  96 +(function(){r.ja=function(){var a=this.qb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(d,e,f){f=f||{};2>a&&c(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var h=d.data("precompiled");h||(h=d.text()||"",h=jQuery.template(o,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),d.data("precompiled",h));
  97 +d=[e.$data];e=jQuery.extend({koBindingContext:e},f.templateOptions);e=jQuery.tmpl(h,d,e);e.appendTo(document.createElement("div"));jQuery.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){document.write("<script type='text/html' id='"+a+"'>"+b+"<\/script>")};if(0<a)jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "}};r.ja.prototype=new r.t;
97 98 var a=new r.ja;0<a.qb&&r.qa(a);r.b("ko.jqueryTmplTemplateEngine",r.ja)})();
98 99 })(window);
6 src/binding/defaultBindings.js
@@ -306,11 +306,7 @@ ko.bindingHandlers['selectedOptions'] = {
306 306
307 307 ko.bindingHandlers['text'] = {
308 308 'update': function (element, valueAccessor) {
309   - var value = ko.utils.unwrapObservable(valueAccessor());
310   - if ((value === null) || (value === undefined))
311   - value = "";
312   - typeof element.innerText == "string" ? element.innerText = value
313   - : element.textContent = value;
  309 + ko.utils.setTextContent(element, valueAccessor());
314 310 }
315 311 };
316 312
13 src/utils.js
@@ -292,6 +292,19 @@ ko.utils = new (function () {
292 292 return dummyContainer.innerHTML;
293 293 },
294 294
  295 + setTextContent: function(element, textContent) {
  296 + var value = ko.utils.unwrapObservable(textContent);
  297 + if ((value === null) || (value === undefined))
  298 + value = "";
  299 + typeof element.innerText == "string" ? element.innerText = value
  300 + : element.textContent = value;
  301 +
  302 + if (ieVersion) {
  303 + // Believe it or not, this actually fixes an IE9 rendering bug. Insane. https://github.com/SteveSanderson/knockout/issues/209
  304 + element.innerHTML = element.innerHTML;
  305 + }
  306 + },
  307 +
295 308 range: function (min, max) {
296 309 min = ko.utils.unwrapObservable(min);
297 310 max = ko.utils.unwrapObservable(max);

0 comments on commit eef5fd3

Please sign in to comment.
Something went wrong with that request. Please try again.