vpn.email
Version:
vpn.email client
2 lines • 59.3 kB
JavaScript
!function(){!function(e){var n=this||(0,eval)("this"),t=n.document,a=n.navigator,r=n.jQuery,i=n.JSON;!function(e){"function"==typeof define&&define.amd?define(["exports","require"],e):e("object"==typeof exports&&"object"==typeof module?module.exports||exports:n.ko={})}(function(o,u){function c(e,n){return(null===e||typeof e in v)&&e===n}function s(n,t){var a;return function(){a||(a=b.a.setTimeout(function(){a=e,n()},t))}}function f(e,n){var t;return function(){clearTimeout(t),t=b.a.setTimeout(e,n)}}function l(e,n){n&&n!==g?"beforeChange"===n?this.Kb(e):this.Ha(e,n):this.Lb(e)}function d(e,n){null!==n&&n.k&&n.k()}function p(e,n){var t=this.Hc,a=t[x];a.R||(this.lb&&this.Ma[n]?(t.Pb(n,e,this.Ma[n]),this.Ma[n]=null,--this.lb):a.r[n]||t.Pb(n,e,a.s?{ia:e}:t.uc(e)))}function h(e,n,t,a){b.d[e]={init:function(e,r,i,o,u){var c,s;return b.m(function(){var i=b.a.c(r()),o=!t!=!i,f=!s;(f||n||o!==c)&&(f&&b.va.Aa()&&(s=b.a.ua(b.f.childNodes(e),!0)),o?(f||b.f.da(e,b.a.ua(s)),b.eb(a?a(u,i):u,e)):b.f.xa(e),c=o)},null,{i:e}),{controlsDescendantBindings:!0}}},b.h.ta[e]=!1,b.f.Z[e]=!0}var b="undefined"!=typeof o?o:{};b.b=function(e,n){for(var t=e.split("."),a=b,r=0;r<t.length-1;r++)a=a[t[r]];a[t[t.length-1]]=n},b.G=function(e,n,t){e[n]=t},b.version="3.4.0",b.b("version",b.version),b.options={deferUpdates:!1,useOnlyNativeEvents:!1},b.a=function(){function o(e,n){for(var t in e)e.hasOwnProperty(t)&&n(t,e[t])}function u(e,n){if(n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function c(e,n){return e.__proto__=n,e}function s(e,n,t,a){var r=e[n].match(g)||[];b.a.q(t.match(g),function(e){b.a.pa(r,e,a)}),e[n]=r.join(" ")}var f={__proto__:[]}instanceof Array,l="function"==typeof Symbol,d={},p={};d[a&&/Firefox\/2/i.test(a.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],d.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(d,function(e,n){if(n.length)for(var t=0,a=n.length;t<a;t++)p[n[t]]=e});var h={propertychange:!0},v=t&&function(){for(var n=3,a=t.createElement("div"),r=a.getElementsByTagName("i");a.innerHTML="<!--[if gt IE "+ ++n+"]><i></i><![endif]-->",r[0];);return 4<n?n:e}(),g=/\S+/g;return{cc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],q:function(e,n){for(var t=0,a=e.length;t<a;t++)n(e[t],t)},o:function(e,n){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,n);for(var t=0,a=e.length;t<a;t++)if(e[t]===n)return t;return-1},Sb:function(e,n,t){for(var a=0,r=e.length;a<r;a++)if(n.call(t,e[a],a))return e[a];return null},La:function(e,n){var t=b.a.o(e,n);0<t?e.splice(t,1):0===t&&e.shift()},Tb:function(e){e=e||[];for(var n=[],t=0,a=e.length;t<a;t++)0>b.a.o(n,e[t])&&n.push(e[t]);return n},fb:function(e,n){e=e||[];for(var t=[],a=0,r=e.length;a<r;a++)t.push(n(e[a],a));return t},Ka:function(e,n){e=e||[];for(var t=[],a=0,r=e.length;a<r;a++)n(e[a],a)&&t.push(e[a]);return t},ra:function(e,n){if(n instanceof Array)e.push.apply(e,n);else for(var t=0,a=n.length;t<a;t++)e.push(n[t]);return e},pa:function(e,n,t){var a=b.a.o(b.a.zb(e),n);0>a?t&&e.push(n):t||e.splice(a,1)},ka:f,extend:u,Xa:c,Ya:f?c:u,D:o,Ca:function(e,n){if(!e)return e;var t,a={};for(t in e)e.hasOwnProperty(t)&&(a[t]=n(e[t],t,e));return a},ob:function(e){for(;e.firstChild;)b.removeNode(e.firstChild)},jc:function(e){e=b.a.V(e);for(var n=(e[0]&&e[0].ownerDocument||t).createElement("div"),a=0,r=e.length;a<r;a++)n.appendChild(b.$(e[a]));return n},ua:function(e,n){for(var t=0,a=e.length,r=[];t<a;t++){var i=e[t].cloneNode(!0);r.push(n?b.$(i):i)}return r},da:function(e,n){if(b.a.ob(e),n)for(var t=0,a=n.length;t<a;t++)e.appendChild(n[t])},qc:function(e,n){var t=e.nodeType?[e]:e;if(0<t.length){for(var a=t[0],r=a.parentNode,i=0,o=n.length;i<o;i++)r.insertBefore(n[i],a);for(i=0,o=t.length;i<o;i++)b.removeNode(t[i])}},za:function(e,n){if(e.length){for(n=8===n.nodeType&&n.parentNode||n;e.length&&e[0].parentNode!==n;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==n;)e.length--;if(1<e.length){var t=e[0],a=e[e.length-1];for(e.length=0;t!==a;)e.push(t),t=t.nextSibling;e.push(a)}}return e},sc:function(e,n){7>v?e.setAttribute("selected",n):e.selected=n},$a:function(n){return null===n||n===e?"":n.trim?n.trim():n.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},nd:function(e,n){return e=e||"",!(n.length>e.length)&&e.substring(0,n.length)===n},Mc:function(e,n){if(e===n)return!0;if(11===e.nodeType)return!1;if(n.contains)return n.contains(3===e.nodeType?e.parentNode:e);if(n.compareDocumentPosition)return 16==(16&n.compareDocumentPosition(e));for(;e&&e!=n;)e=e.parentNode;return!!e},nb:function(e){return b.a.Mc(e,e.ownerDocument.documentElement)},Qb:function(e){return!!b.a.Sb(e,b.a.nb)},A:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Wb:function(e){return b.onError?function(){try{return e.apply(this,arguments)}catch(e){throw b.onError&&b.onError(e),e}}:e},setTimeout:function(e,n){return setTimeout(b.a.Wb(e),n)},$b:function(e){setTimeout(function(){throw b.onError&&b.onError(e),e},0)},p:function(e,n,t){var a=b.a.Wb(t);if(t=v&&h[n],b.options.useOnlyNativeEvents||t||!r)if(t||"function"!=typeof e.addEventListener){if("undefined"==typeof e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var i=function(n){a.call(e,n)},o="on"+n;e.attachEvent(o,i),b.a.F.oa(e,function(){e.detachEvent(o,i)})}else e.addEventListener(n,a,!1);else r(e).bind(n,a)},Da:function(e,a){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var i;if("input"===b.a.A(e)&&e.type&&"click"==a.toLowerCase()?(i=e.type,i="checkbox"==i||"radio"==i):i=!1,b.options.useOnlyNativeEvents||!r||i)if("function"==typeof t.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");i=t.createEvent(p[a]||"HTMLEvents"),i.initEvent(a,!0,!0,n,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(i)}else if(i&&e.click)e.click();else{if("undefined"==typeof e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+a)}else r(e).trigger(a)},c:function(e){return b.H(e)?e():e},zb:function(e){return b.H(e)?e.t():e},bb:function(e,n,t){var a;n&&("object"==typeof e.classList?(a=e.classList[t?"add":"remove"],b.a.q(n.match(g),function(n){a.call(e.classList,n)})):"string"==typeof e.className.baseVal?s(e.className,"baseVal",n,t):s(e,"className",n,t))},Za:function(n,t){var a=b.a.c(t);null!==a&&a!==e||(a="");var r=b.f.firstChild(n);!r||3!=r.nodeType||b.f.nextSibling(r)?b.f.da(n,[n.ownerDocument.createTextNode(a)]):r.data=a,b.a.Rc(n)},rc:function(e,n){if(e.name=n,7>=v)try{e.mergeAttributes(t.createElement("<input name='"+e.name+"'/>"),!1)}catch(e){}},Rc:function(e){9<=v&&(e=1==e.nodeType?e:e.parentNode,e.style&&(e.style.zoom=e.style.zoom))},Nc:function(e){if(v){var n=e.style.width;e.style.width=0,e.style.width=n}},hd:function(e,n){e=b.a.c(e),n=b.a.c(n);for(var t=[],a=e;a<=n;a++)t.push(a);return t},V:function(e){for(var n=[],t=0,a=e.length;t<a;t++)n.push(e[t]);return n},Yb:function(e){return l?Symbol(e):e},rd:6===v,sd:7===v,C:v,ec:function(e,n){for(var t=b.a.V(e.getElementsByTagName("input")).concat(b.a.V(e.getElementsByTagName("textarea"))),a="string"==typeof n?function(e){return e.name===n}:function(e){return n.test(e.name)},r=[],i=t.length-1;0<=i;i--)a(t[i])&&r.push(t[i]);return r},ed:function(e){return"string"==typeof e&&(e=b.a.$a(e))?i&&i.parse?i.parse(e):new Function("return "+e)():null},Eb:function(e,n,t){if(!i||!i.stringify)throw 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 i.stringify(b.a.c(e),n,t)},fd:function(e,n,a){a=a||{};var r=a.params||{},i=a.includeFields||this.cc,u=e;if("object"==typeof e&&"form"===b.a.A(e))for(var u=e.action,c=i.length-1;0<=c;c--)for(var s=b.a.ec(e,i[c]),f=s.length-1;0<=f;f--)r[s[f].name]=s[f].value;n=b.a.c(n);var l=t.createElement("form");l.style.display="none",l.action=u,l.method="post";for(var d in n)e=t.createElement("input"),e.type="hidden",e.name=d,e.value=b.a.Eb(b.a.c(n[d])),l.appendChild(e);o(r,function(e,n){var a=t.createElement("input");a.type="hidden",a.name=e,a.value=n,l.appendChild(a)}),t.body.appendChild(l),a.submitter?a.submitter(l):l.submit(),setTimeout(function(){l.parentNode.removeChild(l)},0)}}}(),b.b("utils",b.a),b.b("utils.arrayForEach",b.a.q),b.b("utils.arrayFirst",b.a.Sb),b.b("utils.arrayFilter",b.a.Ka),b.b("utils.arrayGetDistinctValues",b.a.Tb),b.b("utils.arrayIndexOf",b.a.o),b.b("utils.arrayMap",b.a.fb),b.b("utils.arrayPushAll",b.a.ra),b.b("utils.arrayRemoveItem",b.a.La),b.b("utils.extend",b.a.extend),b.b("utils.fieldsIncludedWithJsonPost",b.a.cc),b.b("utils.getFormFields",b.a.ec),b.b("utils.peekObservable",b.a.zb),b.b("utils.postJson",b.a.fd),b.b("utils.parseJson",b.a.ed),b.b("utils.registerEventHandler",b.a.p),b.b("utils.stringifyJson",b.a.Eb),b.b("utils.range",b.a.hd),b.b("utils.toggleDomNodeCssClass",b.a.bb),b.b("utils.triggerEvent",b.a.Da),b.b("utils.unwrapObservable",b.a.c),b.b("utils.objectForEach",b.a.D),b.b("utils.addOrRemoveItem",b.a.pa),b.b("utils.setTextContent",b.a.Za),b.b("unwrap",b.a.c),Function.prototype.bind||(Function.prototype.bind=function(e){var n=this;if(1===arguments.length)return function(){return n.apply(e,arguments)};var t=Array.prototype.slice.call(arguments,1);return function(){var a=t.slice(0);return a.push.apply(a,arguments),n.apply(e,a)}}),b.a.e=new function(){function n(n,i){var o=n[a];if(!o||"null"===o||!r[o]){if(!i)return e;o=n[a]="ko"+t++,r[o]={}}return r[o]}var t=0,a="__ko__"+(new Date).getTime(),r={};return{get:function(t,a){var r=n(t,!1);return r===e?e:r[a]},set:function(t,a,r){r===e&&n(t,!1)===e||(n(t,!0)[a]=r)},clear:function(e){var n=e[a];return!!n&&(delete r[n],e[a]=null,!0)},I:function(){return t++ +a}}},b.b("utils.domData",b.a.e),b.b("utils.domData.clear",b.a.e.clear),b.a.F=new function(){function n(n,t){var r=b.a.e.get(n,a);return r===e&&t&&(r=[],b.a.e.set(n,a,r)),r}function t(e){var a=n(e,!1);if(a)for(var a=a.slice(0),r=0;r<a.length;r++)a[r](e);if(b.a.e.clear(e),b.a.F.cleanExternalData(e),o[e.nodeType])for(a=e.firstChild;e=a;)a=e.nextSibling,8===e.nodeType&&t(e)}var a=b.a.e.I(),i={1:!0,8:!0,9:!0},o={1:!0,9:!0};return{oa:function(e,t){if("function"!=typeof t)throw Error("Callback must be a function");n(e,!0).push(t)},pc:function(t,r){var i=n(t,!1);i&&(b.a.La(i,r),0==i.length&&b.a.e.set(t,a,e))},$:function(e){if(i[e.nodeType]&&(t(e),o[e.nodeType])){var n=[];b.a.ra(n,e.getElementsByTagName("*"));for(var a=0,r=n.length;a<r;a++)t(n[a])}return e},removeNode:function(e){b.$(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){r&&"function"==typeof r.cleanData&&r.cleanData([e])}}},b.$=b.a.F.$,b.removeNode=b.a.F.removeNode,b.b("cleanNode",b.$),b.b("removeNode",b.removeNode),b.b("utils.domNodeDisposal",b.a.F),b.b("utils.domNodeDisposal.addDisposeCallback",b.a.F.oa),b.b("utils.domNodeDisposal.removeDisposeCallback",b.a.F.pc),function(){var a=[0,"",""],i=[1,"<table>","</table>"],o=[3,"<table><tbody><tr>","</tr></tbody></table>"],u=[1,"<select multiple='multiple'>","</select>"],c={thead:i,tbody:i,tfoot:i,tr:[2,"<table><tbody>","</tbody></table>"],td:o,th:o,option:u,optgroup:u},s=8>=b.a.C;b.a.ma=function(e,i){var o;if(r){if(r.parseHTML)o=r.parseHTML(e,i)||[];else if((o=r.clean([e],i))&&o[0]){for(var u=o[0];u.parentNode&&11!==u.parentNode.nodeType;)u=u.parentNode;u.parentNode&&u.parentNode.removeChild(u)}}else{(o=i)||(o=t);var f,u=o.parentWindow||o.defaultView||n,l=b.a.$a(e).toLowerCase(),d=o.createElement("div");for(f=(l=l.match(/^<([a-z]+)[ >]/))&&c[l[1]]||a,l=f[0],f="ignored<div>"+f[1]+e+f[2]+"</div>","function"==typeof u.innerShiv?d.appendChild(u.innerShiv(f)):(s&&o.appendChild(d),d.innerHTML=f,s&&d.parentNode.removeChild(d));l--;)d=d.lastChild;o=b.a.V(d.lastChild.childNodes)}return o},b.a.Cb=function(n,t){if(b.a.ob(n),t=b.a.c(t),null!==t&&t!==e)if("string"!=typeof t&&(t=t.toString()),r)r(n).html(t);else for(var a=b.a.ma(t,n.ownerDocument),i=0;i<a.length;i++)n.appendChild(a[i])}}(),b.b("utils.parseHtmlFragment",b.a.ma),b.b("utils.setHtml",b.a.Cb),b.M=function(){function n(e,t){if(e)if(8==e.nodeType){var a=b.M.lc(e.nodeValue);null!=a&&t.push({Lc:e,cd:a})}else if(1==e.nodeType)for(var a=0,r=e.childNodes,i=r.length;a<i;a++)n(r[a],t)}var t={};return{wb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var n=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[n]=e,"<!--[ko_memo:"+n+"]-->"},xc:function(n,a){var r=t[n];if(r===e)throw Error("Couldn't find any memo with ID "+n+". Perhaps it's already been unmemoized.");try{return r.apply(null,a||[]),!0}finally{delete t[n]}},yc:function(e,t){var a=[];n(e,a);for(var r=0,i=a.length;r<i;r++){var o=a[r].Lc,u=[o];t&&b.a.ra(u,t),b.M.xc(a[r].cd,u),o.nodeValue="",o.parentNode&&o.parentNode.removeChild(o)}},lc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),b.b("memoization",b.M),b.b("memoization.memoize",b.M.wb),b.b("memoization.unmemoize",b.M.xc),b.b("memoization.parseMemoText",b.M.lc),b.b("memoization.unmemoizeDomNodeAndDescendants",b.M.yc),b.Y=function(){function e(){if(i)for(var e,n=i,t=0;u<i;)if(e=r[u++]){if(u>n){if(5e3<=++t){u=i,b.a.$b(Error("'Too much recursion' after processing "+t+" task groups."));break}n=i}try{e()}catch(e){b.a.$b(e)}}}function a(){e(),u=i=r.length=0}var r=[],i=0,o=1,u=0;return{scheduler:n.MutationObserver?function(e){var n=t.createElement("div");return new MutationObserver(e).observe(n,{attributes:!0}),function(){n.classList.toggle("foo")}}(a):t&&"onreadystatechange"in t.createElement("script")?function(e){var n=t.createElement("script");n.onreadystatechange=function(){n.onreadystatechange=null,t.documentElement.removeChild(n),n=null,e()},t.documentElement.appendChild(n)}:function(e){setTimeout(e,0)},Wa:function(e){return i||b.Y.scheduler(a),r[i++]=e,o++},cancel:function(e){e-=o-i,e>=u&&e<i&&(r[e]=null)},resetForTesting:function(){var e=i-u;return u=i=r.length=0,e},md:e}}(),b.b("tasks",b.Y),b.b("tasks.schedule",b.Y.Wa),b.b("tasks.runEarly",b.Y.md),b.ya={throttle:function(e,n){e.throttleEvaluation=n;var t=null;return b.B({read:e,write:function(a){clearTimeout(t),t=b.a.setTimeout(function(){e(a)},n)}})},rateLimit:function(e,n){var t,a,r;"number"==typeof n?t=n:(t=n.timeout,a=n.method),e.cb=!1,r="notifyWhenChangesStop"==a?f:s,e.Ta(function(e){return r(e,t)})},deferred:function(n,t){if(!0!==t)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");n.cb||(n.cb=!0,n.Ta(function(t){var a;return function(){b.Y.cancel(a),a=b.Y.Wa(t),n.notifySubscribers(e,"dirty")}}))},notify:function(e,n){e.equalityComparer="always"==n?null:c}};var v={undefined:1,boolean:1,number:1,string:1};b.b("extenders",b.ya),b.vc=function(e,n,t){this.ia=e,this.gb=n,this.Kc=t,this.R=!1,b.G(this,"dispose",this.k)},b.vc.prototype.k=function(){this.R=!0,this.Kc()},b.J=function(){b.a.Ya(this,m),m.rb(this)};var g="change",m={rb:function(e){e.K={},e.Nb=1},X:function(e,n,t){var a=this;t=t||g;var r=new b.vc(a,n?e.bind(n):e,function(){b.a.La(a.K[t],r),a.Ia&&a.Ia(t)});return a.sa&&a.sa(t),a.K[t]||(a.K[t]=[]),a.K[t].push(r),r},notifySubscribers:function(e,n){if(n=n||g,n===g&&this.zc(),this.Pa(n))try{b.l.Ub();for(var t,a=this.K[n].slice(0),r=0;t=a[r];++r)t.R||t.gb(e)}finally{b.l.end()}},Na:function(){return this.Nb},Uc:function(e){return this.Na()!==e},zc:function(){++this.Nb},Ta:function(e){var n,t,a,r=this,i=b.H(r);r.Ha||(r.Ha=r.notifySubscribers,r.notifySubscribers=l);var o=e(function(){r.Mb=!1,i&&a===r&&(a=r()),n=!1,r.tb(t,a)&&r.Ha(t=a)});r.Lb=function(e){r.Mb=n=!0,a=e,o()},r.Kb=function(e){n||(t=e,r.Ha(e,"beforeChange"))}},Pa:function(e){return this.K[e]&&this.K[e].length},Sc:function(e){if(e)return this.K[e]&&this.K[e].length||0;var n=0;return b.a.D(this.K,function(e,t){"dirty"!==e&&(n+=t.length)}),n},tb:function(e,n){return!this.equalityComparer||!this.equalityComparer(e,n)},extend:function(e){var n=this;return e&&b.a.D(e,function(e,t){var a=b.ya[e];"function"==typeof a&&(n=a(n,t)||n)}),n}};b.G(m,"subscribe",m.X),b.G(m,"extend",m.extend),b.G(m,"getSubscriptionsCount",m.Sc),b.a.ka&&b.a.Xa(m,Function.prototype),b.J.fn=m,b.hc=function(e){return null!=e&&"function"==typeof e.X&&"function"==typeof e.notifySubscribers},b.b("subscribable",b.J),b.b("isSubscribable",b.hc),b.va=b.l=function(){function e(e){a.push(t),t=e}function n(){t=a.pop()}var t,a=[],r=0;return{Ub:e,end:n,oc:function(e){if(t){if(!b.hc(e))throw Error("Only subscribable things can act as dependencies");t.gb.call(t.Gc,e,e.Cc||(e.Cc=++r))}},w:function(t,a,r){try{return e(),t.apply(a,r||[])}finally{n()}},Aa:function(){if(t)return t.m.Aa()},Sa:function(){if(t)return t.Sa}}}(),b.b("computedContext",b.va),b.b("computedContext.getDependenciesCount",b.va.Aa),b.b("computedContext.isInitial",b.va.Sa),b.b("ignoreDependencies",b.qd=b.l.w);var y=b.a.Yb("_latestValue");b.N=function(e){function n(){return 0<arguments.length?(n.tb(n[y],arguments[0])&&(n.ga(),n[y]=arguments[0],n.fa()),this):(b.l.oc(n),n[y])}return n[y]=e,b.a.ka||b.a.extend(n,b.J.fn),b.J.fn.rb(n),b.a.Ya(n,w),b.options.deferUpdates&&b.ya.deferred(n,!0),n};var w={equalityComparer:c,t:function(){return this[y]},fa:function(){this.notifySubscribers(this[y])},ga:function(){this.notifySubscribers(this[y],"beforeChange")}};b.a.ka&&b.a.Xa(w,b.J.fn);var k=b.N.gd="__ko_proto__";w[k]=b.N,b.Oa=function(n,t){return null!==n&&n!==e&&n[k]!==e&&(n[k]===t||b.Oa(n[k],t))},b.H=function(e){return b.Oa(e,b.N)},b.Ba=function(e){return!!("function"==typeof e&&e[k]===b.N||"function"==typeof e&&e[k]===b.B&&e.Vc)},b.b("observable",b.N),b.b("isObservable",b.H),b.b("isWriteableObservable",b.Ba),b.b("isWritableObservable",b.Ba),b.b("observable.fn",w),b.G(w,"peek",w.t),b.G(w,"valueHasMutated",w.fa),b.G(w,"valueWillMutate",w.ga),b.la=function(e){if(e=e||[],"object"!=typeof e||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=b.N(e),b.a.Ya(e,b.la.fn),e.extend({trackArrayChanges:!0})},b.la.fn={remove:function(e){for(var n=this.t(),t=[],a="function"!=typeof e||b.H(e)?function(n){return n===e}:e,r=0;r<n.length;r++){var i=n[r];a(i)&&(0===t.length&&this.ga(),t.push(i),n.splice(r,1),r--)}return t.length&&this.fa(),t},removeAll:function(n){if(n===e){var t=this.t(),a=t.slice(0);return this.ga(),t.splice(0,t.length),this.fa(),a}return n?this.remove(function(e){return 0<=b.a.o(n,e)}):[]},destroy:function(e){var n=this.t(),t="function"!=typeof e||b.H(e)?function(n){return n===e}:e;this.ga();for(var a=n.length-1;0<=a;a--)t(n[a])&&(n[a]._destroy=!0);this.fa()},destroyAll:function(n){return n===e?this.destroy(function(){return!0}):n?this.destroy(function(e){return 0<=b.a.o(n,e)}):[]},indexOf:function(e){var n=this();return b.a.o(n,e)},replace:function(e,n){var t=this.indexOf(e);0<=t&&(this.ga(),this.t()[t]=n,this.fa())}},b.a.ka&&b.a.Xa(b.la.fn,b.N.fn),b.a.q("pop push reverse shift sort splice unshift".split(" "),function(e){b.la.fn[e]=function(){var n=this.t();this.ga(),this.Vb(n,e,arguments);var t=n[e].apply(n,arguments);return this.fa(),t===n?this:t}}),b.a.q(["slice"],function(e){b.la.fn[e]=function(){var n=this();return n[e].apply(n,arguments)}}),b.b("observableArray",b.la),b.ya.trackArrayChanges=function(e,n){function t(){if(!r){r=!0;var n=e.notifySubscribers;e.notifySubscribers=function(e,t){return t&&t!==g||++o,n.apply(this,arguments)};var t=[].concat(e.t()||[]);i=null,a=e.X(function(n){if(n=[].concat(n||[]),e.Pa("arrayChange")){var a;(!i||1<o)&&(i=b.a.ib(t,n,e.hb)),a=i}t=n,i=null,o=0,a&&a.length&&e.notifySubscribers(a,"arrayChange")})}}if(e.hb={},n&&"object"==typeof n&&b.a.extend(e.hb,n),e.hb.sparse=!0,!e.Vb){var a,r=!1,i=null,o=0,u=e.sa,c=e.Ia;e.sa=function(n){u&&u.call(e,n),"arrayChange"===n&&t()},e.Ia=function(n){c&&c.call(e,n),"arrayChange"!==n||e.Pa("arrayChange")||(a.k(),r=!1)},e.Vb=function(e,n,t){function a(e,n,t){return u[u.length]={status:e,value:n,index:t}}if(r&&!o){var u=[],c=e.length,s=t.length,f=0;switch(n){case"push":f=c;case"unshift":for(n=0;n<s;n++)a("added",t[n],f+n);break;case"pop":f=c-1;case"shift":c&&a("deleted",e[f],f);break;case"splice":n=Math.min(Math.max(0,0>t[0]?c+t[0]:t[0]),c);for(var c=1===s?c:Math.min(n+(t[1]||0),c),s=n+s-2,f=Math.max(c,s),l=[],d=[],p=2;n<f;++n,++p)n<c&&d.push(a("deleted",e[n],n)),n<s&&l.push(a("added",t[p],n));b.a.dc(d,l);break;default:return}i=u}}}};var x=b.a.Yb("_state");b.m=b.B=function(n,t,a){function r(){if(0<arguments.length){if("function"!=typeof i)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return i.apply(o.pb,arguments),this}return b.l.oc(r),(o.S||o.s&&r.Qa())&&r.aa(),o.T}if("object"==typeof n?a=n:(a=a||{},n&&(a.read=n)),"function"!=typeof a.read)throw Error("Pass a function that returns the value of the ko.computed");var i=a.write,o={T:e,S:!0,Ra:!1,Fb:!1,R:!1,Va:!1,s:!1,jd:a.read,pb:t||a.owner,i:a.disposeWhenNodeIsRemoved||a.i||null,wa:a.disposeWhen||a.wa,mb:null,r:{},L:0,bc:null};return r[x]=o,r.Vc="function"==typeof i,b.a.ka||b.a.extend(r,b.J.fn),b.J.fn.rb(r),b.a.Ya(r,E),a.pure?(o.Va=!0,o.s=!0,b.a.extend(r,T)):a.deferEvaluation&&b.a.extend(r,C),b.options.deferUpdates&&b.ya.deferred(r,!0),o.i&&(o.Fb=!0,o.i.nodeType||(o.i=null)),o.s||a.deferEvaluation||r.aa(),o.i&&r.ba()&&b.a.F.oa(o.i,o.mb=function(){r.k()}),r};var E={equalityComparer:c,Aa:function(){return this[x].L},Pb:function(e,n,t){if(this[x].Va&&n===this)throw Error("A 'pure' computed must not be called recursively");this[x].r[e]=t,t.Ga=this[x].L++,t.na=n.Na()},Qa:function(){var e,n,t=this[x].r;for(e in t)if(t.hasOwnProperty(e)&&(n=t[e],n.ia.Uc(n.na)))return!0},bd:function(){this.Fa&&!this[x].Ra&&this.Fa()},ba:function(){return this[x].S||0<this[x].L},ld:function(){this.Mb||this.ac()},uc:function(e){if(e.cb&&!this[x].i){var n=e.X(this.bd,this,"dirty"),t=e.X(this.ld,this);return{ia:e,k:function(){n.k(),t.k()}}}return e.X(this.ac,this)},ac:function(){var e=this,n=e.throttleEvaluation;n&&0<=n?(clearTimeout(this[x].bc),this[x].bc=b.a.setTimeout(function(){e.aa(!0)},n)):e.Fa?e.Fa():e.aa(!0)},aa:function(e){var n=this[x],t=n.wa;if(!n.Ra&&!n.R){if(n.i&&!b.a.nb(n.i)||t&&t()){if(!n.Fb)return void this.k()}else n.Fb=!1;n.Ra=!0;try{this.Qc(e)}finally{n.Ra=!1}n.L||this.k()}},Qc:function(n){var t=this[x],a=t.Va?e:!t.L,r={Hc:this,Ma:t.r,lb:t.L};b.l.Ub({Gc:r,gb:p,m:this,Sa:a}),t.r={},t.L=0,r=this.Pc(t,r),this.tb(t.T,r)&&(t.s||this.notifySubscribers(t.T,"beforeChange"),t.T=r,t.s?this.zc():n&&this.notifySubscribers(t.T)),a&&this.notifySubscribers(t.T,"awake")},Pc:function(e,n){try{var t=e.jd;return e.pb?t.call(e.pb):t()}finally{b.l.end(),n.lb&&!e.s&&b.a.D(n.Ma,d),e.S=!1}},t:function(){var e=this[x];return(e.S&&!e.L||e.s&&this.Qa())&&this.aa(),e.T},Ta:function(e){b.J.fn.Ta.call(this,e),this.Fa=function(){this.Kb(this[x].T),this[x].S=!0,this.Lb(this)}},k:function(){var e=this[x];!e.s&&e.r&&b.a.D(e.r,function(e,n){n.k&&n.k()}),e.i&&e.mb&&b.a.F.pc(e.i,e.mb),e.r=null,e.L=0,e.R=!0,e.S=!1,e.s=!1,e.i=null}},T={sa:function(e){var n=this,t=n[x];if(!t.R&&t.s&&"change"==e){if(t.s=!1,t.S||n.Qa())t.r=null,t.L=0,t.S=!0,n.aa();else{var a=[];b.a.D(t.r,function(e,n){a[n.Ga]=e}),b.a.q(a,function(e,a){var r=t.r[e],i=n.uc(r.ia);i.Ga=a,i.na=r.na,t.r[e]=i})}t.R||n.notifySubscribers(t.T,"awake")}},Ia:function(n){var t=this[x];t.R||"change"!=n||this.Pa("change")||(b.a.D(t.r,function(e,n){n.k&&(t.r[e]={ia:n.ia,Ga:n.Ga,na:n.na},n.k())}),t.s=!0,this.notifySubscribers(e,"asleep"))},Na:function(){var e=this[x];return e.s&&(e.S||this.Qa())&&this.aa(),b.J.fn.Na.call(this)}},C={sa:function(e){"change"!=e&&"beforeChange"!=e||this.t()}};b.a.ka&&b.a.Xa(E,b.J.fn);var N=b.N.gd;b.m[N]=b.N,E[N]=b.m,b.Xc=function(e){return b.Oa(e,b.m)},b.Yc=function(e){return b.Oa(e,b.m)&&e[x]&&e[x].Va},b.b("computed",b.m),b.b("dependentObservable",b.m),b.b("isComputed",b.Xc),b.b("isPureComputed",b.Yc),b.b("computed.fn",E),b.G(E,"peek",E.t),b.G(E,"dispose",E.k),b.G(E,"isActive",E.ba),b.G(E,"getDependenciesCount",E.Aa),b.nc=function(e,n){return"function"==typeof e?b.m(e,n,{pure:!0}):(e=b.a.extend({},e),e.pure=!0,b.m(e,n))},b.b("pureComputed",b.nc),function(){function n(r,i,o){if(o=o||new a,r=i(r),"object"!=typeof r||null===r||r===e||r instanceof RegExp||r instanceof Date||r instanceof String||r instanceof Number||r instanceof Boolean)return r;var u=r instanceof Array?[]:{};return o.save(r,u),t(r,function(t){var a=i(r[t]);switch(typeof a){case"boolean":case"number":case"string":case"function":u[t]=a;break;case"object":case"undefined":var c=o.get(a);u[t]=c!==e?c:n(a,i,o)}}),u}function t(e,n){if(e instanceof Array){for(var t=0;t<e.length;t++)n(t);"function"==typeof e.toJSON&&n("toJSON")}else for(t in e)n(t)}function a(){this.keys=[],this.Ib=[]}b.wc=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return n(e,function(e){for(var n=0;b.H(e)&&10>n;n++)e=e();return e})},b.toJSON=function(e,n,t){return e=b.wc(e),b.a.Eb(e,n,t)},a.prototype={save:function(e,n){var t=b.a.o(this.keys,e);0<=t?this.Ib[t]=n:(this.keys.push(e),this.Ib.push(n))},get:function(n){return n=b.a.o(this.keys,n),0<=n?this.Ib[n]:e}}}(),b.b("toJS",b.wc),b.b("toJSON",b.toJSON),function(){b.j={u:function(n){switch(b.a.A(n)){case"option":return!0===n.__ko__hasDomDataOptionValue__?b.a.e.get(n,b.d.options.xb):7>=b.a.C?n.getAttributeNode("value")&&n.getAttributeNode("value").specified?n.value:n.text:n.value;case"select":return 0<=n.selectedIndex?b.j.u(n.options[n.selectedIndex]):e;default:return n.value}},ha:function(n,t,a){switch(b.a.A(n)){case"option":switch(typeof t){case"string":b.a.e.set(n,b.d.options.xb,e),"__ko__hasDomDataOptionValue__"in n&&delete n.__ko__hasDomDataOptionValue__,n.value=t;break;default:b.a.e.set(n,b.d.options.xb,t),n.__ko__hasDomDataOptionValue__=!0,n.value="number"==typeof t?t:""}break;case"select":""!==t&&null!==t||(t=e);for(var r,i=-1,o=0,u=n.options.length;o<u;++o)if(r=b.j.u(n.options[o]),r==t||""==r&&t===e){i=o;break}(a||0<=i||t===e&&1<n.size)&&(n.selectedIndex=i);break;default:null!==t&&t!==e||(t=""),n.value=t}}}}(),b.b("selectExtensions",b.j),b.b("selectExtensions.readValue",b.j.u),b.b("selectExtensions.writeValue",b.j.ha),b.h=function(){function e(e){e=b.a.$a(e),123===e.charCodeAt(0)&&(e=e.slice(1,-1));var n,t=[],o=e.match(a),u=[],c=0;if(o){o.push(",");for(var s,f=0;s=o[f];++f){var l=s.charCodeAt(0);if(44===l){if(0>=c){t.push(n&&u.length?{key:n,value:u.join("")}:{unknown:n||u.join("")}),n=c=0,u=[];continue}}else if(58===l){if(!c&&!n&&1===u.length){n=u.pop();continue}}else 47===l&&f&&1<s.length?(l=o[f-1].match(r))&&!i[l[0]]&&(e=e.substr(e.indexOf(s)+1),o=e.match(a),o.push(","),f=-1,s="/"):40===l||123===l||91===l?++c:41===l||125===l||93===l?--c:n||u.length||34!==l&&39!==l||(s=s.slice(1,-1));u.push(s)}}return t}var n=["true","false","null","undefined"],t=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,a=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),r=/[\])"'A-Za-z0-9_$]+$/,i={in:1,return:1,typeof:1},o={};return{ta:[],ea:o,yb:e,Ua:function(a,r){function i(e,a){var r;if(!f){var l=b.getBindingHandler(e);if(l&&l.preprocess&&!(a=l.preprocess(a,e,i)))return;(l=o[e])&&(r=a,0<=b.a.o(n,r)?r=!1:(l=r.match(t),r=null!==l&&(l[1]?"Object("+l[1]+")"+l[2]:r)),l=r),l&&c.push("'"+e+"':function(_z){"+r+"=_z}")}s&&(a="function(){return "+a+" }"),u.push("'"+e+"':"+a)}r=r||{};var u=[],c=[],s=r.valueAccessors,f=r.bindingParams,l="string"==typeof a?e(a):a;return b.a.q(l,function(e){i(e.key||e.unknown,e.value)}),c.length&&i("_ko_property_writers","{"+c.join(",")+" }"),u.join(",")},ad:function(e,n){for(var t=0;t<e.length;t++)if(e[t].key==n)return!0;return!1},Ea:function(e,n,t,a,r){e&&b.H(e)?!b.Ba(e)||r&&e.t()===a||e(a):(e=n.get("_ko_property_writers"))&&e[t]&&e[t](a)}}}(),b.b("expressionRewriting",b.h),b.b("expressionRewriting.bindingRewriteValidators",b.h.ta),b.b("expressionRewriting.parseObjectLiteral",b.h.yb),b.b("expressionRewriting.preProcessBindings",b.h.Ua),b.b("expressionRewriting._twoWayBindings",b.h.ea),b.b("jsonExpressionRewriting",b.h),b.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",b.h.Ua),function(){function e(e){return 8==e.nodeType&&o.test(i?e.text:e.nodeValue)}function n(e){return 8==e.nodeType&&u.test(i?e.text:e.nodeValue)}function a(t,a){for(var r=t,i=1,o=[];r=r.nextSibling;){if(n(r)&&(i--,0===i))return o;o.push(r),e(r)&&i++}if(!a)throw Error("Cannot find closing comment tag to match: "+t.nodeValue);return null}function r(e,n){var t=a(e,n);return t?0<t.length?t[t.length-1].nextSibling:e.nextSibling:null}var i=t&&"<!--test-->"===t.createComment("test").text,o=i?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,u=i?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,c={ul:!0,ol:!0};b.f={Z:{},childNodes:function(n){return e(n)?a(n):n.childNodes},xa:function(n){if(e(n)){n=b.f.childNodes(n);for(var t=0,a=n.length;t<a;t++)b.removeNode(n[t])}else b.a.ob(n)},da:function(n,t){if(e(n)){b.f.xa(n);for(var a=n.nextSibling,r=0,i=t.length;r<i;r++)a.parentNode.insertBefore(t[r],a)}else b.a.da(n,t)},mc:function(n,t){e(n)?n.parentNode.insertBefore(t,n.nextSibling):n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t)},gc:function(n,t,a){a?e(n)?n.parentNode.insertBefore(t,a.nextSibling):a.nextSibling?n.insertBefore(t,a.nextSibling):n.appendChild(t):b.f.mc(n,t)},firstChild:function(t){return e(t)?!t.nextSibling||n(t.nextSibling)?null:t.nextSibling:t.firstChild},nextSibling:function(t){return e(t)&&(t=r(t)),t.nextSibling&&n(t.nextSibling)?null:t.nextSibling},Tc:e,pd:function(e){return(e=(i?e.text:e.nodeValue).match(o))?e[1]:null},kc:function(t){if(c[b.a.A(t)]){var a=t.firstChild;if(a)do if(1===a.nodeType){var i;i=a.firstChild;var o=null;if(i)do if(o)o.push(i);else if(e(i)){var u=r(i,!0);u?i=u:o=[i]}else n(i)&&(o=[i]);while(i=i.nextSibling);if(i=o)for(o=a.nextSibling,u=0;u<i.length;u++)o?t.insertBefore(i[u],o):t.appendChild(i[u])}while(a=a.nextSibling)}}}}(),b.b("virtualElements",b.f),b.b("virtualElements.allowedBindings",b.f.Z),b.b("virtualElements.emptyNode",b.f.xa),b.b("virtualElements.insertAfter",b.f.gc),b.b("virtualElements.prepend",b.f.mc),b.b("virtualElements.setDomNodeChildren",b.f.da),function(){b.Q=function(){this.Fc={}},b.a.extend(b.Q.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||b.g.getComponentNameForNode(e);case 8:return b.f.Tc(e);default:return!1}},getBindings:function(e,n){var t=this.getBindingsString(e,n),t=t?this.parseBindingsString(t,n,e):null;return b.g.Ob(t,e,n,!1)},getBindingAccessors:function(e,n){var t=this.getBindingsString(e,n),t=t?this.parseBindingsString(t,n,e,{valueAccessors:!0}):null;return b.g.Ob(t,e,n,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return b.f.pd(e);default:return null}},parseBindingsString:function(e,n,t,a){try{var r,i=this.Fc,o=e+(a&&a.valueAccessors||"");if(!(r=i[o])){var u,c="with($context){with($data||{}){return{"+b.h.Ua(e,a)+"}}}";u=new Function("$context","$element",c),r=i[o]=u}return r(n,t)}catch(n){throw n.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+n.message,n}}}),b.Q.instance=new b.Q}(),b.b("bindingProvider",b.Q),function(){function t(e){return function(){return e}}function a(e){return e()}function i(e){return b.a.Ca(b.l.w(e),function(n,t){return function(){return e()[t]}})}function o(e,n,a){return"function"==typeof e?i(e.bind(null,n,a)):b.a.Ca(e,t)}function u(e,n){return i(this.getBindings.bind(this,e,n))}function c(e,n,t){var a,r=b.f.firstChild(n),i=b.Q.instance,o=i.preprocessNode;if(o){for(;a=r;)r=b.f.nextSibling(a),o.call(i,a);r=b.f.firstChild(n)}for(;a=r;)r=b.f.nextSibling(a),s(e,a,t);
}function s(e,n,t){var a=!0,r=1===n.nodeType;r&&b.f.kc(n),(r&&t||b.Q.instance.nodeHasBindings(n))&&(a=l(n,null,e,t).shouldBindDescendants),a&&!p[b.a.A(n)]&&c(e,n,!r)}function f(e){var n=[],t={},a=[];return b.a.D(e,function r(i){if(!t[i]){var o=b.getBindingHandler(i);o&&(o.after&&(a.push(i),b.a.q(o.after,function(n){if(e[n]){if(-1!==b.a.o(a,n))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+a.join(", "));r(n)}}),a.length--),n.push({key:i,fc:o})),t[i]=!0}}),n}function l(n,t,r,i){var o=b.a.e.get(n,h);if(!t){if(o)throw Error("You cannot apply bindings multiple times to the same element.");b.a.e.set(n,h,!0)}!o&&i&&b.tc(n,r);var c;if(t&&"function"!=typeof t)c=t;else{var s=b.Q.instance,l=s.getBindingAccessors||u,d=b.B(function(){return(c=t?t(r,n):l.call(s,n,r))&&r.P&&r.P(),c},null,{i:n});c&&d.ba()||(d=null)}var p;if(c){var v=d?function(e){return function(){return a(d()[e])}}:function(e){return c[e]},g=function(){return b.a.Ca(d?d():c,a)};g.get=function(e){return c[e]&&a(v(e))},g.has=function(e){return e in c},i=f(c),b.a.q(i,function(t){var a=t.fc.init,i=t.fc.update,o=t.key;if(8===n.nodeType&&!b.f.Z[o])throw Error("The binding '"+o+"' cannot be used with virtual elements");try{"function"==typeof a&&b.l.w(function(){var t=a(n,v(o),g,r.$data,r);if(t&&t.controlsDescendantBindings){if(p!==e)throw Error("Multiple bindings ("+p+" and "+o+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");p=o}}),"function"==typeof i&&b.B(function(){i(n,v(o),g,r.$data,r)},null,{i:n})}catch(e){throw e.message='Unable to process binding "'+o+": "+c[o]+'"\nMessage: '+e.message,e}})}return{shouldBindDescendants:p===e}}function d(e){return e&&e instanceof b.U?e:new b.U(e)}b.d={};var p={script:!0,textarea:!0,template:!0};b.getBindingHandler=function(e){return b.d[e]},b.U=function(n,t,a,r){var i,o=this,u="function"==typeof n&&!b.H(n),c=b.B(function(){var e=u?n():n,i=b.a.c(e);return t?(t.P&&t.P(),b.a.extend(o,t),c&&(o.P=c)):(o.$parents=[],o.$root=i,o.ko=b),o.$rawData=e,o.$data=i,a&&(o[a]=i),r&&r(o,t,i),o.$data},null,{wa:function(){return i&&!b.a.Qb(i)},i:!0});c.ba()&&(o.P=c,c.equalityComparer=null,i=[],c.Ac=function(n){i.push(n),b.a.F.oa(n,function(n){b.a.La(i,n),i.length||(c.k(),o.P=c=e)})})},b.U.prototype.createChildContext=function(e,n,t){return new b.U(e,this,n,function(e,n){e.$parentContext=n,e.$parent=n.$data,e.$parents=(n.$parents||[]).slice(0),e.$parents.unshift(e.$parent),t&&t(e)})},b.U.prototype.extend=function(e){return new b.U(this.P||this.$data,this,null,function(n,t){n.$rawData=t.$rawData,b.a.extend(n,"function"==typeof e?e():e)})};var h=b.a.e.I(),v=b.a.e.I();b.tc=function(e,n){return 2!=arguments.length?b.a.e.get(e,v):(b.a.e.set(e,v,n),void(n.P&&n.P.Ac(e)))},b.Ja=function(e,n,t){return 1===e.nodeType&&b.f.kc(e),l(e,n,d(t),!0)},b.Dc=function(e,n,t){return t=d(t),b.Ja(e,o(n,t,e),t)},b.eb=function(e,n){1!==n.nodeType&&8!==n.nodeType||c(d(e),n,!0)},b.Rb=function(e,t){if(!r&&n.jQuery&&(r=n.jQuery),t&&1!==t.nodeType&&8!==t.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");t=t||n.document.body,s(d(e),t,!0)},b.kb=function(n){switch(n.nodeType){case 1:case 8:var t=b.tc(n);if(t)return t;if(n.parentNode)return b.kb(n.parentNode)}return e},b.Jc=function(n){return(n=b.kb(n))?n.$data:e},b.b("bindingHandlers",b.d),b.b("applyBindings",b.Rb),b.b("applyBindingsToDescendants",b.eb),b.b("applyBindingAccessorsToNode",b.Ja),b.b("applyBindingsToNode",b.Dc),b.b("contextFor",b.kb),b.b("dataFor",b.Jc)}(),function(e){function n(n,a){var o,u=r.hasOwnProperty(n)?r[n]:e;u?u.X(a):(u=r[n]=new b.J,u.X(a),t(n,function(e,t){var a=!(!t||!t.synchronous);i[n]={definition:e,Zc:a},delete r[n],o||a?u.notifySubscribers(e):b.Y.Wa(function(){u.notifySubscribers(e)})}),o=!0)}function t(e,n){a("getConfig",[e],function(t){t?a("loadComponent",[e,t],function(e){n(e,t)}):n(null,null)})}function a(n,t,r,i){i||(i=b.g.loaders.slice(0));var o=i.shift();if(o){var u=o[n];if(u){var c=!1;if(u.apply(o,t.concat(function(e){c?r(null):null!==e?r(e):a(n,t,r,i)}))!==e&&(c=!0,!o.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else a(n,t,r,i)}else r(null)}var r={},i={};b.g={get:function(t,a){var r=i.hasOwnProperty(t)?i[t]:e;r?r.Zc?b.l.w(function(){a(r.definition)}):b.Y.Wa(function(){a(r.definition)}):n(t,a)},Xb:function(e){delete i[e]},Jb:a},b.g.loaders=[],b.b("components",b.g),b.b("components.get",b.g.get),b.b("components.clearCachedDefinition",b.g.Xb)}(),function(){function e(e,n,t,a){function r(){0===--u&&a(i)}var i={},u=2,c=t.template;t=t.viewModel,c?o(n,c,function(n){b.g.Jb("loadTemplate",[e,n],function(e){i.template=e,r()})}):r(),t?o(n,t,function(n){b.g.Jb("loadViewModel",[e,n],function(e){i[f]=e,r()})}):r()}function a(e,n,t){if("function"==typeof n)t(function(e){return new n(e)});else if("function"==typeof n[f])t(n[f]);else if("instance"in n){var r=n.instance;t(function(){return r})}else"viewModel"in n?a(e,n.viewModel,t):e("Unknown viewModel value: "+n)}function r(e){switch(b.a.A(e)){case"script":return b.a.ma(e.text);case"textarea":return b.a.ma(e.value);case"template":if(i(e.content))return b.a.ua(e.content.childNodes)}return b.a.ua(e.childNodes)}function i(e){return n.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function o(e,t,a){"string"==typeof t.require?u||n.require?(u||n.require)([t.require],a):e("Uses require, but no AMD loader is present"):a(t)}function c(e){return function(n){throw Error("Component '"+e+"': "+n)}}var s={};b.g.register=function(e,n){if(!n)throw Error("Invalid configuration for "+e);if(b.g.ub(e))throw Error("Component "+e+" is already registered");s[e]=n},b.g.ub=function(e){return s.hasOwnProperty(e)},b.g.od=function(e){delete s[e],b.g.Xb(e)},b.g.Zb={getConfig:function(e,n){n(s.hasOwnProperty(e)?s[e]:null)},loadComponent:function(n,t,a){var r=c(n);o(r,t,function(t){e(n,r,t,a)})},loadTemplate:function(e,a,o){if(e=c(e),"string"==typeof a)o(b.a.ma(a));else if(a instanceof Array)o(a);else if(i(a))o(b.a.V(a.childNodes));else if(a.element)if(a=a.element,n.HTMLElement?a instanceof HTMLElement:a&&a.tagName&&1===a.nodeType)o(r(a));else if("string"==typeof a){var u=t.getElementById(a);u?o(r(u)):e("Cannot find element with ID "+a)}else e("Unknown element type: "+a);else e("Unknown template value: "+a)},loadViewModel:function(e,n,t){a(c(e),n,t)}};var f="createViewModel";b.b("components.register",b.g.register),b.b("components.isRegistered",b.g.ub),b.b("components.unregister",b.g.od),b.b("components.defaultLoader",b.g.Zb),b.g.loaders.push(b.g.Zb),b.g.Bc=s}(),function(){function e(e,t){var a=e.getAttribute("params");if(a){var a=n.parseBindingsString(a,t,e,{valueAccessors:!0,bindingParams:!0}),a=b.a.Ca(a,function(n){return b.m(n,null,{i:e})}),r=b.a.Ca(a,function(n){var t=n.t();return n.ba()?b.m({read:function(){return b.a.c(n())},write:b.Ba(t)&&function(e){n()(e)},i:e}):t});return r.hasOwnProperty("$raw")||(r.$raw=a),r}return{$raw:{}}}b.g.getComponentNameForNode=function(e){var n=b.a.A(e);if(b.g.ub(n)&&(-1!=n.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=b.a.C&&e.tagName===n))return n},b.g.Ob=function(n,t,a,r){if(1===t.nodeType){var i=b.g.getComponentNameForNode(t);if(i){if(n=n||{},n.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var o={name:i,params:e(t,a)};n.component=r?function(){return o}:o}}return n};var n=new b.Q;9>b.a.C&&(b.g.register=function(e){return function(n){return t.createElement(n),e.apply(this,arguments)}}(b.g.register),t.createDocumentFragment=function(e){return function(){var n,t=e(),a=b.g.Bc;for(n in a)a.hasOwnProperty(n)&&t.createElement(n);return t}}(t.createDocumentFragment))}(),function(e){function n(e,n,t){if(n=n.template,!n)throw Error("Component '"+e+"' has no template");e=b.a.ua(n),b.f.da(t,e)}function t(e,n,t,a){var r=e.createViewModel;return r?r.call(e,a,{element:n,templateNodes:t}):a}var a=0;b.d.component={init:function(r,i,o,u,c){function s(){var e=f&&f.dispose;"function"==typeof e&&e.call(f),l=f=null}var f,l,d=b.a.V(b.f.childNodes(r));return b.a.F.oa(r,s),b.m(function(){var o,u,p=b.a.c(i());if("string"==typeof p?o=p:(o=b.a.c(p.name),u=b.a.c(p.params)),!o)throw Error("No component name specified");var h=l=++a;b.g.get(o,function(a){if(l===h){if(s(),!a)throw Error("Unknown component '"+o+"'");n(o,a,r);var i=t(a,r,d,u);a=c.createChildContext(i,e,function(e){e.$component=i,e.$componentTemplateNodes=d}),f=i,b.eb(a,r)}})},null,{i:r}),{controlsDescendantBindings:!0}}},b.f.Z.component=!0}();var S={class:"className",for:"htmlFor"};b.d.attr={update:function(n,t){var a=b.a.c(t())||{};b.a.D(a,function(t,a){a=b.a.c(a);var r=!1===a||null===a||a===e;r&&n.removeAttribute(t),8>=b.a.C&&t in S?(t=S[t],r?n.removeAttribute(t):n[t]=a):r||n.setAttribute(t,a.toString()),"name"===t&&b.a.rc(n,r?"":a.toString())})}},function(){b.d.checked={after:["value","attr"],init:function(n,t,a){function r(){var e=n.checked,r=p?o():e;if(!b.va.Sa()&&(!c||e)){var i=b.l.w(t);if(f){var u=l?i.t():i;d!==r?(e&&(b.a.pa(u,r,!0),b.a.pa(u,d,!1)),d=r):b.a.pa(u,r,e),l&&b.Ba(i)&&i(u)}else b.h.Ea(i,a,"checked",r,!0)}}function i(){var e=b.a.c(t());n.checked=f?0<=b.a.o(e,o()):u?e:o()===e}var o=b.nc(function(){return a.has("checkedValue")?b.a.c(a.get("checkedValue")):a.has("value")?b.a.c(a.get("value")):n.value}),u="checkbox"==n.type,c="radio"==n.type;if(u||c){var s=t(),f=u&&b.a.c(s)instanceof Array,l=!(f&&s.push&&s.splice),d=f?o():e,p=c||f;c&&!n.name&&b.d.uniqueName.init(n,function(){return!0}),b.m(r,null,{i:n}),b.a.p(n,"click",r),b.m(i,null,{i:n}),s=e}}},b.h.ea.checked=!0,b.d.checkedValue={update:function(e,n){e.value=b.a.c(n())}}}(),b.d.css={update:function(e,n){var t=b.a.c(n());null!==t&&"object"==typeof t?b.a.D(t,function(n,t){t=b.a.c(t),b.a.bb(e,n,t)}):(t=b.a.$a(String(t||"")),b.a.bb(e,e.__ko__cssValue,!1),e.__ko__cssValue=t,b.a.bb(e,t,!0))}},b.d.enable={update:function(e,n){var t=b.a.c(n());t&&e.disabled?e.removeAttribute("disabled"):t||e.disabled||(e.disabled=!0)}},b.d.disable={update:function(e,n){b.d.enable.update(e,function(){return!b.a.c(n())})}},b.d.event={init:function(e,n,t,a,r){var i=n()||{};b.a.D(i,function(i){"string"==typeof i&&b.a.p(e,i,function(e){var o,u=n()[i];if(u){try{var c=b.a.V(arguments);a=r.$data,c.unshift(a),o=u.apply(a,c)}finally{!0!==o&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===t.get(i+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},b.d.foreach={ic:function(e){return function(){var n=e(),t=b.a.zb(n);return t&&"number"!=typeof t.length?(b.a.c(n),{foreach:t.data,as:t.as,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,beforeMove:t.beforeMove,afterMove:t.afterMove,templateEngine:b.W.sb}):{foreach:n,templateEngine:b.W.sb}}},init:function(e,n){return b.d.template.init(e,b.d.foreach.ic(n))},update:function(e,n,t,a,r){return b.d.template.update(e,b.d.foreach.ic(n),t,a,r)}},b.h.ta.foreach=!1,b.f.Z.foreach=!0,b.d.hasfocus={init:function(e,n,t){function a(a){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var i;try{i=r.activeElement}catch(e){i=r.body}a=i===e}r=n(),b.h.Ea(r,t,"hasfocus",a,!0),e.__ko_hasfocusLastValue=a,e.__ko_hasfocusUpdating=!1}var r=a.bind(null,!0),i=a.bind(null,!1);b.a.p(e,"focus",r),b.a.p(e,"focusin",r),b.a.p(e,"blur",i),b.a.p(e,"focusout",i)},update:function(e,n){var t=!!b.a.c(n());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===t||(t?e.focus():e.blur(),!t&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),b.l.w(b.a.Da,null,[e,t?"focusin":"focusout"]))}},b.h.ea.hasfocus=!0,b.d.hasFocus=b.d.hasfocus,b.h.ea.hasFocus=!0,b.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,n){b.a.Cb(e,n())}},h("if"),h("ifnot",!1,!0),h("with",!0,!1,function(e,n){return e.createChildContext(n)});var _={};b.d.options={init:function(e){if("select"!==b.a.A(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(n,t,a){function r(){return b.a.Ka(n.options,function(e){return e.selected})}function i(e,n,t){var a=typeof n;return"function"==a?n(e):"string"==a?e[n]:t}function o(e,t){if(h&&f)b.j.ha(n,b.a.c(a.get("value")),!0);else if(p.length){var r=0<=b.a.o(p,b.j.u(t[0]));b.a.sc(t[0],r),h&&!r&&b.l.w(b.a.Da,null,[n,"change"])}}var u=n.multiple,c=0!=n.length&&u?n.scrollTop:null,s=b.a.c(t()),f=a.get("valueAllowUnset")&&a.has("value"),l=a.get("optionsIncludeDestroyed");t={};var d,p=[];f||(u?p=b.a.fb(r(),b.j.u):0<=n.selectedIndex&&p.push(b.j.u(n.options[n.selectedIndex]))),s&&("undefined"==typeof s.length&&(s=[s]),d=b.a.Ka(s,function(n){return l||n===e||null===n||!b.a.c(n._destroy)}),a.has("optionsCaption")&&(s=b.a.c(a.get("optionsCaption")),null!==s&&s!==e&&d.unshift(_)));var h=!1;t.beforeRemove=function(e){n.removeChild(e)},s=o,a.has("optionsAfterRender")&&"function"==typeof a.get("optionsAfterRender")&&(s=function(n,t){o(0,t),b.l.w(a.get("optionsAfterRender"),null,[t[0],n!==_?n:e])}),b.a.Bb(n,d,function(t,r,o){return o.length&&(p=!f&&o[0].selected?[b.j.u(o[0])]:[],h=!0),r=n.ownerDocument.createElement("option"),t===_?(b.a.Za(r,a.get("optionsCaption")),b.j.ha(r,e)):(o=i(t,a.get("optionsValue"),t),b.j.ha(r,b.a.c(o)),t=i(t,a.get("optionsText"),o),b.a.Za(r,t)),[r]},t,s),b.l.w(function(){f?b.j.ha(n,b.a.c(a.get("value")),!0):(u?p.length&&r().length<p.length:p.length&&0<=n.selectedIndex?b.j.u(n.options[n.selectedIndex])!==p[0]:p.length||0<=n.selectedIndex)&&b.a.Da(n,"change")}),b.a.Nc(n),c&&20<Math.abs(c-n.scrollTop)&&(n.scrollTop=c)}},b.d.options.xb=b.a.e.I(),b.d.selectedOptions={after:["options","foreach"],init:function(e,n,t){b.a.p(e,"change",function(){var a=n(),r=[];b.a.q(e.getElementsByTagName("option"),function(e){e.selected&&r.push(b.j.u(e))}),b.h.Ea(a,t,"selectedOptions",r)})},update:function(e,n){if("select"!=b.a.A(e))throw Error("values binding applies only to SELECT elements");var t=b.a.c(n()),a=e.scrollTop;t&&"number"==typeof t.length&&b.a.q(e.getElementsByTagName("option"),function(e){var n=0<=b.a.o(t,b.j.u(e));e.selected!=n&&b.a.sc(e,n)}),e.scrollTop=a}},b.h.ea.selectedOptions=!0,b.d.style={update:function(n,t){var a=b.a.c(t()||{});b.a.D(a,function(t,a){a=b.a.c(a),null!==a&&a!==e&&!1!==a||(a=""),n.style[t]=a})}},b.d.submit={init:function(e,n,t,a,r){if("function"!=typeof n())throw Error("The value for a submit binding must be a function");b.a.p(e,"submit",function(t){var a,i=n();try{a=i.call(r.$data,e)}finally{!0!==a&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}})}},b.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,n){b.a.Za(e,n())}},b.f.Z.text=!0,function(){if(n&&n.navigator)var t=function(e){if(e)return parseFloat(e[1])},a=n.opera&&n.opera.version&&parseInt(n.opera.version()),r=n.navigator.userAgent,i=t(r.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),o=t(r.match(/Firefox\/([^ ]*)/));if(10>b.a.C)var u=b.a.e.I(),c=b.a.e.I(),s=function(e){var n=this.activeElement;(n=n&&b.a.e.get(n,c))&&n(e)},f=function(e,n){var t=e.ownerDocument;b.a.e.get(t,u)||(b.a.e.set(t,u,!0),b.a.p(t,"selectionchange",s)),b.a.e.set(e,c,n)};b.d.textInput={init:function(n,t,r){function u(e,t){b.a.p(n,e,t)}function c(){var a=b.a.c(t());null!==a&&a!==e||(a=""),p!==e&&a===p?b.a.setTimeout(c,4):n.value!==a&&(h=a,n.value=a)}function s(){d||(p=n.value,d=b.a.setTimeout(l,4))}function l(){clearTimeout(d),p=d=e;var a=n.value;h!==a&&(h=a,b.h.Ea(t(),r,"textInput",a))}var d,p,h=n.value,v=9==b.a.C?s:l;10>b.a.C?(u("propertychange",function(e){"value"===e.propertyName&&v(e)}),8==b.a.C&&(u("keyup",l),u("keydown",l)),8<=b.a.C&&(f(n,v),u("dragend",s))):(u("input",l),5>i&&"textarea"===b.a.A(n)?(u("keydown",s),u("paste",s),u("cut",s)):11>a?u("keydown",s):4>o&&(u("DOMAutoComplete",l),u("dragdrop",l),u("drop",l))),u("change",l),b.m(c,null,{i:n})}},b.h.ea.textInput=!0,b.d.textinput={preprocess:function(e,n,t){t("textInput",e)}}}(),b.d.uniqueName={init:function(e,n){if(n()){var t="ko_unique_"+ ++b.d.uniqueName.Ic;b.a.rc(e,t)}}},b.d.uniqueName.Ic=0,b.d.value={after:["options","foreach"],init:function(e,n,t){if("input"!=e.tagName.toLowerCase()||"checkbox"!=e.type&&"radio"!=e.type){var a=["change"],r=t.get("valueUpdate"),i=!1,o=null;r&&("string"==typeof r&&(r=[r]),b.a.ra(a,r),a=b.a.Tb(a));var u=function(){o=null,i=!1;var a=n(),r=b.j.u(e);b.h.Ea(a,t,"value",r)};!b.a.C||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=b.a.o(a,"propertychange")||(b.a.p(e,"propertychange",function(){i=!0}),b.a.p(e,"focus",function(){i=!1}),b.a.p(e,"blur",function(){i&&u()})),b.a.q(a,function(n){var t=u;b.a.nd(n,"after")&&(t=function(){o=b.j.u(e),b.a.setTimeout(u,0)},n=n.substring(5)),b.a.p(e,n,t)});var c=function(){var a=b.a.c(n()),r=b.j.u(e);if(null!==o&&a===o)b.a.setTimeout(c,0);else if(a!==r)if("select"===b.a.A(e)){var i=t.get("valueAllowUnset"),r=function(){b.j.ha(e,a,i)};r(),i||a===b.j.u(e)?b.a.setTimeout(r,0):b.l.w(b.a.Da,null,[e,"change"])}else b.j.ha(e,a)};b.m(c,null,{i:e})}else b.Ja(e,{checkedValue:n})},update:function(){}},b.h.ea.value=!0,b.d.visible={update:function(e,n){var t=b.a.c(n()),a="none"!=e.style.display;t&&!a?e.style.display="":!t&&a&&(e.style.display="none")}},function(e){b.d[e]={init:function(n,t,a,r,i){return b.d.event.init.call(this,n,function(){var n={};return n[e]=t(),n},a,r,i)}}}("click"),b.O=function(){},b.O.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},b.O.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},b.O.prototype.makeTemplateSource=function(e,n){if("string"==typeof e){n=n||t;var a=n.getElementById(e);if(!a)throw Error("Cannot find template with ID "+e);return new b.v.n(a)}if(1==e.nodeType||8==e.nodeType)return new b.v.qa(e);throw Error("Unkn