@tko/build.knockout 4.0.0-beta1.0 → 4.0.0-beta1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.min.js +2 -2
- package/dist/common.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/browser.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.0-beta1.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.2 IIFE
|
|
2
2
|
var ko=(()=>{var Jr=Object.defineProperty;var lo=Object.getOwnPropertyDescriptor;var co=Object.getOwnPropertyNames;var fo=Object.prototype.hasOwnProperty;var ot=(t,e)=>{for(var r in e)Jr(t,r,{get:e[r],enumerable:!0})},po=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of co(e))!fo.call(t,i)&&i!==r&&Jr(t,i,{get:()=>e[i],enumerable:!(n=lo(e,i))||n.enumerable});return t};var ho=t=>po(Jr({},"__esModule",{value:!0}),t);var ia={};ot(ia,{default:()=>na});var{isArray:Vt}=Array;function k(t,e,r){arguments.length>2&&(e=e.bind(r));for(let n=0,i=t.length;n<i;++n)e(t[n],n,t)}function W(t,e){return(Vt(t)?t:[...t]).indexOf(e)}function hr(t,e,r){return(Vt(t)?t:[...t]).find(e,r)}function ut(t=[],e,r){return arguments.length>2&&(e=e.bind(r)),t===null?[]:Array.from(t,e)}function at(t,e){var r=W(t,e);r>0?t.splice(r,1):r===0&&t.shift()}function oi(t=[]){let e=new Set;return t===null?[]:(Vt(t)?t:[...t]).filter(r=>e.has(r)?!1:e.add(r))}function We(t,e,r){return arguments.length>2&&(e=e.bind(r)),t===null?[]:(Vt(t)?t:[...t]).filter(e)}function lt(t,e){if(Vt(e))t.push.apply(t,e);else for(var r=0,n=e.length;r<n;r++)t.push(e[r]);return t}function Oe(t,e,r){var n=W(typeof t.peek=="function"?t.peek():t,e);n<0?r&&t.push(e):r||t.splice(n,1)}function le(t){return Array.from(t)}function ui(t,e){t=typeof t=="function"?t():t,e=typeof e=="function"?e():e;for(var r=[],n=t;n<=e;n++)r.push(n);return r}function Gr(t,e,r){if(t.length&&e.length){var n,i,s,o,u;for(n=i=0;(!r||n<r)&&(o=t[i]);++i){for(s=0;u=e[s];++s)if(o.value===u.value){o.moved=u.index,u.moved=o.index,e.splice(s,1),n=s=0;break}n+=s}}}var ni="added",ii="deleted";function ct(t,e,r){return r=typeof r=="boolean"?{dontLimitMoves:r}:r||{},t=t||[],e=e||[],t.length<e.length?si(t,e,ni,ii,r):si(e,t,ii,ni,r)}function si(t,e,r,n,i){var s=Math.min,o=Math.max,u=[],a,l=t.length,d,m=e.length,g=m-l||1,p=l+m+1,A,x,h,N;for(a=0;a<=l;a++)for(x=A,u.push(A=[]),h=s(m,a+g),N=o(0,a-1),d=N;d<=h;d++)if(!d)A[d]=a+1;else if(!a)A[d]=d+1;else if(t[a-1]===e[d-1])A[d]=x[d-1];else{var P=x[d]||p,b=A[d-1]||p;A[d]=s(P,b)+1}var w=[],M,U=[],V=[];for(a=l,d=m;a||d;)M=u[a][d]-1,d&&M===u[a][d-1]?U.push(w[w.length]={status:r,value:e[--d],index:d}):a&&M===u[a-1][d]?V.push(w[w.length]={status:n,value:t[--a],index:a}):(--d,--a,i.sparse||w.push({status:"retained",value:e[d]}));return Gr(V,U,!i.dontLimitMoves&&l*10),w.reverse()}var mr={deferUpdates:!1,useOnlyNativeEvents:!1,protoProperty:"__ko_proto__",defaultBindingAttribute:"data-bind",allowVirtualElements:!0,bindingGlobals:Object.create(null),bindingProviderInstance:null,createChildContextWithAs:!1,jQuery:globalThis.jQuery,Promise:globalThis.Promise,taskScheduler:null,debug:!1,global:globalThis,document:globalThis.document,filters:{},includeDestroyed:!1,foreachHidesDestroyed:!1,onError:function(t){throw t},set:function(t,e){mr[t]=e},getBindingHandler(){},cleanExternalData(){}};Object.defineProperty(mr,"$",{get:function(){return mr.jQuery}});var c=mr;function Yr(t){return c.onError?(...e)=>{try{return t(...e)}catch(r){c.onError(r)}}:t}function zr(t){ce(function(){throw t},0)}function ce(t,e){return setTimeout(Yr(t),e)}function gr(t,e){var r;return function(...n){r||(r=ce(function(){r=void 0,t(...n)},e))}}function vr(t,e){var r;return function(...n){clearTimeout(r),r=ce(()=>t(...n),e)}}var R=c.document&&function(){for(var t=3,e=c.document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++t+"]><i></i><![endif]-->",r[0];);if(!t){let n=window.navigator.userAgent;return ua.match(/MSIE ([^ ]+)/)||ua.match(/rv:([^ )]+)/)}return t>4?t:void 0}();function Y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Rt(t){return t===null?!1:typeof t=="object"||typeof t=="function"}function $(t,e){if(e)for(var r in e)Y(e,r)&&(t[r]=e[r]);return t}function I(t,e){for(var r in t)Y(t,r)&&e(r,t[r])}function ge(t,e,r){if(!t)return t;arguments.length>2&&(e=e.bind(r));var n={};for(var i in t)Y(t,i)&&(n[i]=e(t[i],i,t));return n}function Xr(t,e){return Y(t,e)?t[e]:void 0}function Zr(t,e){if(e||(e=[]),!t||typeof t!="object"||t.constructor!==Object||e.indexOf(t)!==-1)return t;e.push(t);var r={};for(var n in t)Y(t,n)&&(r[n]=Zr(t[n],e));return r}function ai(t){let e=new Set;return JSON.stringify(t,(r,n)=>e.has(n)?"...":(typeof n=="object"&&e.add(n),n))}function en(t){return Rt(t)&&typeof t.then=="function"}function mo(){try{return Object.defineProperty(function(){},"length",{}),!0}catch(t){return!1}}var go=mo();function br(t,e){go&&Object.defineProperty(t,"length",e)}function Ue(t){return t==null?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function li(t,e){return t=t||"",e.length>t.length?!1:t.substring(0,e.length)===e}function ci(t){return typeof t=="string"&&(t=Ue(t),t)?JSON&&JSON.parse?JSON.parse(t):new Function("return "+t)():null}var vo=typeof Symbol=="function";function z(t){return vo?Symbol(t):t}var tn=/\S+/g;function dt(t,e,r){var n;!e||(typeof t.classList=="object"?(n=t.classList[r?"add":"remove"],k(e.match(tn),function(i){n.call(t.classList,i)})):typeof t.className.baseVal=="string"?di(t.className,"baseVal",e,r):di(t,"className",e,r))}function di(t,e,r,n){var i=t[e].match(tn)||[];k(r.match(tn),function(s){Oe(i,s,n)}),t[e]=i.join(" ")}var J=c.global&&c.global.jQuery;function rn(t,e){if(t===e)return!0;if(t.nodeType===11)return!1;if(e.contains)return e.contains(t.nodeType!==1?t.parentNode:t);if(e.compareDocumentPosition)return(e.compareDocumentPosition(t)&16)==16;for(;t&&t!=e;)t=t.parentNode;return!!t}function Mt(t){return rn(t,t.ownerDocument.documentElement)}function fi(t){return!!hr(t,Mt)}function O(t){return t&&t.tagName&&t.tagName.toLowerCase()}function pi(t){return window.HTMLElement?t instanceof HTMLElement:t&&t.tagName&&t.nodeType===1}function nn(t){return window.DocumentFragment?t instanceof DocumentFragment:t&&t.nodeType===11}var y={};ot(y,{clear:()=>on,get:()=>Qe,getOrSet:()=>Eo,nextKey:()=>Lt,set:()=>xe});var bo=new Date().getTime(),$t=`__ko__${bo}`,yr=Symbol("Knockout data"),Ar,hi=0,yo={getDataForNode(t,e){let r=t[yr];return!r&&e&&(r=t[yr]={}),r},clear(t){return t[yr]?(delete t[yr],!0):!1}},Ao={getDataforNode(t,e){let r=t[$t];if(!(r&&r!=="null"&&Ar[r])){if(!e)return;r=t[$t]="ko"+hi++,Ar[r]={}}return Ar[r]},clear(t){let e=t[$t];return e?(delete Ar[e],t[$t]=null,!0):!1}},{getDataForNode:sn,clear:on}=R?Ao:yo;function Lt(){return hi+++$t}function Qe(t,e){let r=sn(t,!1);return r&&r[e]}function xe(t,e,r){var n=sn(t,r!==void 0);n&&(n[e]=r)}function Eo(t,e,r){let n=sn(t,!0);return n[e]||(n[e]=r)}var un=Lt(),Co={1:!0,8:!0,9:!0},mi={1:!0,9:!0};function an(t,e){var r=Qe(t,un);return r===void 0&&e&&(r=[],xe(t,un,r)),r}function xo(t){xe(t,un,void 0)}function gi(t){var e=an(t,!1);if(e){e=e.slice(0);for(let r=0;r<e.length;r++)e[r](t)}on(t);for(let r=0,n=ft.length;r<n;++r)ft[r](t);c.cleanExternalData&&c.cleanExternalData(t),mi[t.nodeType]&&vi(t.childNodes,!0)}function vi(t,e){let r=[],n;for(var i=0;i<t.length;i++)if((!e||t[i].nodeType===8)&&(gi(r[r.length]=n=t[i]),t[i]!==n))for(;i--&&W(r,t[i])===-1;);}function de(t,e){if(typeof e!="function")throw new Error("Callback must be a function");an(t,!0).push(e)}function pt(t,e){var r=an(t,!1);r&&(at(r,e),r.length===0&&xo(t))}function X(t){return Co[t.nodeType]&&(gi(t),mi[t.nodeType]&&vi(t.getElementsByTagName("*"))),t}function ve(t){X(t),t.parentNode&&t.parentNode.removeChild(t)}var ft=[];function bi(t){ft.push(t)}function yi(t){let e=ft.indexOf(t);e>=0&&ft.splice(e,1)}function Do(t){var e=J?J.cleanData:null;e&&e([t])}ft.push(Do);var cn={},Ai={},Fo=c.global.navigator&&/Firefox\/2/i.test(c.global.navigator.userAgent)?"KeyboardEvent":"UIEvents";cn[Fo]=["keyup","keydown","keypress"];cn.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];I(cn,function(t,e){if(e.length)for(var r=0,n=e.length;r<n;r++)Ai[e[r]]=t});function Bo(t,e){if(O(t)!=="input"||!t.type||e.toLowerCase()!="click")return!1;var r=t.type;return r=="checkbox"||r=="radio"}var wo={propertychange:!0},ln;function Q(t,e,r,n=!1){let i=Yr(r),s=R&&wo[e],o=Boolean(n);if(!c.useOnlyNativeEvents&&!s&&!o&&J)ln||(ln=typeof J(t).on=="function"?"on":"bind"),J(t)[ln](e,i);else if(!s&&typeof t.addEventListener=="function")t.addEventListener(e,i,n);else if(typeof t.attachEvent!="undefined"){let u=function(l){i.call(t,l)},a="on"+e;t.attachEvent(a,u),de(t,function(){t.detachEvent(a,u)})}else throw new Error("Browser doesn't support addEventListener or attachEvent")}function Ke(t,e){if(!(t&&t.nodeType))throw new Error("element must be a DOM node when calling triggerEvent");var r=Bo(t,e);if(!c.useOnlyNativeEvents&&J&&!r)J(t).trigger(e);else if(typeof document.createEvent=="function")if(typeof t.dispatchEvent=="function"){var n=Ai[e]||"HTMLEvents",i=document.createEvent(n);i.initEvent(e,!0,!0,c.global,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(i)}else throw new Error("The supplied element doesn't support dispatchEvent");else if(r&&t.click)t.click();else if(typeof t.fireEvent!="undefined")t.fireEvent("on"+e);else throw new Error("Browser doesn't support triggering events")}function Ht(t){for(var e=le(t),r=e[0]&&e[0].ownerDocument||document,n=r.createElement("div"),i=0,s=e.length;i<s;i++)n.appendChild(X(e[i]));return n}function De(t,e){for(var r=0,n=t.length,i=[];r<n;r++){var s=t[r].cloneNode(!0);i.push(e?X(s):s)}return i}function Ei(t,e){if(jt(t),e)for(var r=0,n=e.length;r<n;r++)t.appendChild(e[r])}function Er(t,e){var r=t.nodeType?[t]:t;if(r.length>0){for(var n=r[0],i=n.parentNode,s=0,o=e.length;s<o;s++)i.insertBefore(e[s],n);for(s=0,o=r.length;s<o;s++)ve(r[s])}}function Cr(t,e){if(t.name=e,R<=7)try{t.mergeAttributes(document.createElement("<input name='"+t.name+"'/>"),!1)}catch(r){}}function jt(t){for(;t.firstChild;)ve(t.firstChild)}function qe(t,e){if(t.length){for(e=e.nodeType===8&&e.parentNode||e;t.length&&t[0].parentNode!==e;)t.splice(0,1);for(;t.length>1&&t[t.length-1].parentNode!==e;)t.length--;if(t.length>1){var r=t[0],n=t[t.length-1];for(t.length=0;r!==n;)t.push(r),r=r.nextSibling;t.push(n)}}return t}function xr(t,e){R<7?t.setAttribute("selected",e):t.selected=e}function Ci(t){if(R>=9){var e=t.nodeType==1?t:t.parentNode;e.style&&(e.style.zoom=e.style.zoom)}}function xi(t){if(R){var e=t.style.width;t.style.width=0,t.style.width=e}}var v={};ot(v,{allowedBindings:()=>_o,childNodes:()=>wi,emptyNode:()=>Dr,endCommentRegex:()=>Di,firstChild:()=>Br,getVirtualChildren:()=>fn,hasBindingValue:()=>ko,insertAfter:()=>Io,isEndComment:()=>Pe,isStartComment:()=>ie,lastChild:()=>Oo,nextSibling:()=>wr,normaliseVirtualElementDomStructure:()=>Ro,prepend:()=>Si,previousSibling:()=>Po,setDomNodeChildren:()=>Fr,startCommentRegex:()=>dn,virtualNodeBindingValue:()=>Vo});var Wt=c.document&&c.document.createComment("test").text==="<!--test-->",dn=Wt?/^<!--\s*ko(?:\s+([\s\S]+))?\s*-->$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,Di=Wt?/^<!--\s*\/ko\s*-->$/:/^\s*\/ko\s*$/,So={ul:!0,ol:!0};function ie(t){return t.nodeType==8&&dn.test(Wt?t.text:t.nodeValue)}function Pe(t){return t.nodeType==8&&Di.test(Wt?t.text:t.nodeValue)}function No(t){return Pe(t)&&!Qe(t,Fi)}var Fi="__ko_matchedEndComment__";function fn(t,e){for(var r=t,n=1,i=[];r=r.nextSibling;){if(Pe(r)&&(xe(r,Fi,!0),n--,n===0))return i;i.push(r),ie(r)&&n++}if(!e)throw new Error("Cannot find closing comment tag to match: "+t.nodeValue);return null}function Bi(t,e){var r=fn(t,e);return r?r.length>0?r[r.length-1].nextSibling:t.nextSibling:null}function To(t){var e=t.firstChild,r=null;if(e)do if(r)r.push(e);else if(ie(e)){var n=Bi(e,!0);n?e=n:r=[e]}else Pe(e)&&(r=[e]);while(e=e.nextSibling);return r}var _o={},ko=ie;function wi(t){return ie(t)?fn(t):t.childNodes}function Dr(t){if(!ie(t))jt(t);else for(var e=wi(t),r=0,n=e.length;r<n;r++)ve(e[r])}function Fr(t,e){if(!ie(t))Ei(t,e);else{Dr(t);let i=t.nextSibling,s=i.parentNode;for(var r=0,n=e.length;r<n;++r)s.insertBefore(e[r],i)}}function Si(t,e){ie(t)?t.parentNode.insertBefore(e,t.nextSibling):t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Io(t,e,r){r?ie(t)?t.parentNode.insertBefore(e,r.nextSibling):r.nextSibling?t.insertBefore(e,r.nextSibling):t.appendChild(e):Si(t,e)}function Br(t){if(!ie(t)){if(t.firstChild&&Pe(t.firstChild))throw new Error("Found invalid end comment, as the first child of "+t.outerHTML);return t.firstChild}return!t.nextSibling||Pe(t.nextSibling)?null:t.nextSibling}function Oo(t){let e=Br(t),r;do r=e;while(e=wr(e));return r}function wr(t){if(ie(t)&&(t=Bi(t)),t.nextSibling&&Pe(t.nextSibling)){if(No(t.nextSibling))throw Error("Found end comment without a matching opening comment, as next sibling of "+t.outerHTML);return null}else return t.nextSibling}function Po(t){var e=0;do if(t.nodeType===8)if(ie(t)){if(--e===0)return t}else Pe(t)&&e++;else if(e===0)return t;while(t=t.previousSibling)}function Vo(t){var e=(Wt?t.text:t.nodeValue).match(dn);return e?e[1]:null}function Ro(t){if(!!So[O(t)]){var e=t.firstChild;if(e)do if(e.nodeType===1){var r=To(e);if(r)for(var n=e.nextSibling,i=0;i<r.length;i++)n?t.insertBefore(r[i],n):t.appendChild(r[i])}while(e=e.nextSibling)}}var Mo=[0,"",""],Ut=[1,"<table>","</table>"],$o=[2,"<table><tbody>","</tbody></table>"],Lo=[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],Ni=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ti=[1,"<select multiple='multiple'>","</select>"],Ho=[1,"<fieldset>","</fieldset>"],jo=[1,"<map>","</map>"],Wo=[1,"<object>","</object>"],Uo={area:jo,col:Lo,colgroup:Ut,caption:Ut,legend:Ho,thead:Ut,tbody:Ut,tfoot:Ut,tr:$o,td:Ni,th:Ni,option:Ti,optgroup:Ti,param:Wo},_i=c.document&&"content"in c.document.createElement("template");function Qo(t){let e=t.match(/^(?:<!--.*?-->\s*?)*?<([a-z]+)[\s>]/);return e&&Uo[e[1]]||Mo}function Ko(t,e){e||(e=document);var r=e.parentWindow||e.defaultView||window,n=Ue(t).toLowerCase(),i=e.createElement("div"),s=Qo(n),o=s[0],u="ignored<div>"+s[1]+t+s[2]+"</div>";for(typeof r.innerShiv=="function"?i.appendChild(r.innerShiv(u)):i.innerHTML=u;o--;)i=i.lastChild;return le(i.lastChild.childNodes)}function qo(t,e){e||(e=document);var r=e.createElement("template");return r.innerHTML=t,le(r.content.childNodes)}function Jo(t,e){if(J.parseHTML)return J.parseHTML(t,e)||[];var r=J.clean([t],e);if(r&&r[0]){for(var n=r[0];n.parentNode&&n.parentNode.nodeType!==11;)n=n.parentNode;n.parentNode&&n.parentNode.removeChild(n)}return r}function be(t,e){return _i?qo(t,e):J?Jo(t,e):Ko(t,e)}function ki(t,e){let r=be(t,e);return r.length&&r[0].parentElement||Ht(r)}function ht(t,e){if(jt(t),typeof e=="function"&&(e=e()),e!=null)if(typeof e!="string"&&(e=e.toString()),J&&!_i)J(t).html(e);else{var r=be(e,t.ownerDocument);if(t.nodeType===8)e===null?Dr(t):Fr(t,r);else for(var n=0;n<r.length;n++)t.appendChild(r[n])}}function Je(t,e){var r=typeof e=="function"?e():e;r==null&&(r="");var n=Br(t);!n||n.nodeType!=3||wr(n)?Fr(t,[t.ownerDocument.createTextNode(r)]):n.data=r,Ci(t)}var Sr=Symbol("Knockout selectExtensions hasDomDataProperty"),T={optionValueDomDataKey:Lt(),readValue:function(t){switch(O(t)){case"option":return t[Sr]===!0?Qe(t,T.optionValueDomDataKey):t.value;case"select":return t.selectedIndex>=0?T.readValue(t.options[t.selectedIndex]):void 0;default:return t.value}},writeValue:function(t,e,r){switch(O(t)){case"option":typeof e=="string"?(xe(t,T.optionValueDomDataKey,void 0),Sr in t&&delete t[Sr],t.value=e):(xe(t,T.optionValueDomDataKey,e),t[Sr]=!0,t.value=typeof e=="number"?e:"");break;case"select":(e===""||e===null)&&(e=void 0);var n=-1;for(let i=0,s=t.options.length,o;i<s;++i){o=T.readValue(t.options[i]);let u=o===e,a=o===""&&e===void 0,l=typeof e=="number"&&Number(o)===e;if(u||a||l){n=i;break}}(r||n>=0||e===void 0&&t.size>1)&&(t.selectedIndex=n);break;default:e==null&&(e=""),t.value=e;break}}};var Ge={};ot(Ge,{memoize:()=>Yo,parseMemoText:()=>Vi,unmemoize:()=>Pi,unmemoizeDomNodeAndDescendants:()=>zo});var pn={};function Ii(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function Go(){return Ii()+Ii()}function Oi(t,e){if(!!t){if(t.nodeType==8){var r=Vi(t.nodeValue);r!=null&&e.push({domNode:t,memoId:r})}else if(t.nodeType==1)for(var n=0,i=t.childNodes,s=i.length;n<s;n++)Oi(i[n],e)}}function Yo(t){if(typeof t!="function")throw new Error("You can only pass a function to memoization.memoize()");var e=Go();return pn[e]=t,"<!--[ko_memo:"+e+"]-->"}function Pi(t,e){var r=pn[t];if(r===void 0)throw new Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return r.apply(null,e||[]),!0}finally{delete pn[t]}}function zo(t,e){var r=[];Oi(t,r);for(var n=0,i=r.length;n<i;n++){var s=r[n].domNode,o=[s];e&<(o,e),Pi(r[n].memoId,o),s.nodeValue="",s.parentNode&&s.parentNode.removeChild(s)}}function Vi(t){var e=t.match(/^\[ko_memo\:(.*?)\]$/);return e?e[1]:null}var ye={};ot(ye,{cancel:()=>eu,resetForTesting:()=>tu,runEarly:()=>Mi,schedule:()=>Zo});var Qt=[],se=0,Ri=1,Ve=0,Fe=c.global;Fe&&Fe.MutationObserver&&!(Fe.navigator&&Fe.navigator.standalone)?c.taskScheduler=function(t){var e=Fe.document.createElement("div");return new Fe.MutationObserver(t).observe(e,{attributes:!0}),function(){e.classList.toggle("foo")}}($i):Fe&&Fe.document&&"onreadystatechange"in Fe.document.createElement("script")?c.taskScheduler=function(t){var e=document.createElement("script");e.onreadystatechange=function(){e.onreadystatechange=null,document.documentElement.removeChild(e),e=null,t()},document.documentElement.appendChild(e)}:c.taskScheduler=function(t){setTimeout(t,0)};function Mi(){if(se){for(var t=se,e=0,r;Ve<se;)if(r=Qt[Ve++]){if(Ve>t){if(++e>=5e3){Ve=se,zr(Error("'Too much recursion' after processing "+e+" task groups."));break}t=se}try{r()}catch(n){zr(n)}}}}function $i(){Mi(),Ve=se=Qt.length=0}function Xo(){c.taskScheduler($i)}function Zo(t){return se||Xo(),Qt[se++]=t,Ri++}function eu(t){var e=t-(Ri-se);e>=Ve&&e<se&&(Qt[e]=null)}function tu(){var t=se-Ve;return Ve=se=Qt.length=0,t}var C={};ot(C,{begin:()=>Nr,end:()=>Tr,getDependencies:()=>ou,getDependenciesCount:()=>su,ignore:()=>iu,ignoreDependencies:()=>iu,isInitial:()=>uu,registerDependency:()=>mn});var hn=Symbol("Knockout Subscribable");function mt(t){return t&&t[hn]||!1}var Li=[],oe,ru=0;function nu(){return++ru}function Nr(t){Li.push(oe),oe=t}function Tr(){oe=Li.pop()}function mn(t){if(oe){if(!mt(t))throw new Error("Only subscribable things can act as dependencies");oe.callback.call(oe.callbackTarget,t,t._id||(t._id=nu()))}}function iu(t,e,r){try{return Nr(),t.apply(e,r||[])}finally{Tr()}}function su(){if(oe)return oe.computed.getDependenciesCount()}function ou(){if(oe)return oe.computed.getDependencies()}function uu(){if(oe)return oe.isInitial}function Kt(t){t._deferUpdates||(t._deferUpdates=!0,t.limit(function(e){let r,n=!1;return function(){if(!n){ye.cancel(r),r=ye.schedule(e);try{n=!0,t.notifySubscribers(void 0,"dirty")}finally{n=!1}}}}))}var qt=class{constructor(e,r,n){this._target=e,this._callback=r.next,this._disposeCallback=n,this._isDisposed=!1,this._domNodeDisposalCallback=null}dispose(){this._domNodeDisposalCallback&&pt(this._node,this._domNodeDisposalCallback),this._isDisposed=!0,this._disposeCallback()}disposeWhenNodeIsRemoved(e){this._node=e,de(e,this._domNodeDisposalCallback=this.dispose.bind(this))}unsubscribe(){this.dispose()}get closed(){return this._isDisposed}};var au={undefined:1,boolean:1,number:1,string:1};function gt(t,e){var r=t===null||typeof t in au;return r?t===e:!1}function gn(t){var e=this;return t&&I(t,function(r,n){var i=Ae[r];typeof i=="function"?e=i(e,n)||e:c.onError(new Error("Extender not found: "+r))}),e}function lu(t,e){t.equalityComparer=e=="always"?null:gt}function cu(t,e){if(e!==!0)throw new Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");Kt(t)}function du(t,e){var r,n,i;typeof e=="number"?r=e:(r=e.timeout,n=e.method),t._deferUpdates=!1,i=n==="notifyWhenChangesStop"?vr:gr,t.limit(function(s){return i(s,r)})}var Ae={notify:lu,deferred:cu,rateLimit:du};var Z=Symbol("Knockout latest value");Symbol.observable||(Symbol.observable=Symbol.for("@tko/Symbol.observable"));function K(){Object.setPrototypeOf(this,_r),_r.init(this)}var Be="change",_r={[hn]:!0,[Symbol.observable](){return this},init(t){t._subscriptions={change:[]},t._versionNumber=1},subscribe(t,e,r){let n=typeof t=="object"&&t.next;r=r||Be;let i=n?t:{next:e?t.bind(e):t},s=new qt(this,i,()=>{at(this._subscriptions[r],s),this.afterSubscriptionRemove&&this.afterSubscriptionRemove(r)});return this.beforeSubscriptionAdd&&this.beforeSubscriptionAdd(r),this._subscriptions[r]||(this._subscriptions[r]=[]),this._subscriptions[r].push(s),n&&Z in this&&i.next(this[Z]),s},notifySubscribers(t,e){if(e=e||Be,e===Be&&this.updateVersion(),this.hasSubscriptionsForEvent(e)){let r=e===Be&&this._changeSubscriptions||[...this._subscriptions[e]];try{Nr();for(let n=0,i;i=r[n];++n)i._isDisposed||i._callback(t)}finally{Tr()}}},getVersion(){return this._versionNumber},hasChanged(t){return this.getVersion()!==t},updateVersion(){++this._versionNumber},hasSubscriptionsForEvent(t){return this._subscriptions[t]&&this._subscriptions[t].length},getSubscriptionsCount(t){if(t)return this._subscriptions[t]&&this._subscriptions[t].length||0;var e=0;return I(this._subscriptions,function(r,n){r!=="dirty"&&(e+=n.length)}),e},isDifferent(t,e){return!this.equalityComparer||!this.equalityComparer(t,e)},once(t){let e=this.subscribe(r=>{e.dispose(),t(r)})},when(t,e){let r=this.peek(),n=arguments.length>1,i=typeof t=="function"?t:s=>s===t;return i(r)?c.Promise.resolve(n?e:r):new c.Promise((s,o)=>{let u=this.subscribe(a=>{i(a)&&(u.dispose(),s(n?e:a))})})},yet(t,...e){let r=typeof t=="function"?t:i=>i===t,n=i=>!r(i);return this.when(n,...e)},next(){return new Promise(t=>this.once(t))},toString(){return"[object Object]"},extend:gn};Object.setPrototypeOf(_r,Function.prototype);K.fn=_r;function F(t){function e(){return arguments.length>0?(e.isDifferent(e[Z],arguments[0])&&(e.valueWillMutate(),e[Z]=arguments[0],e.valueHasMutated()),this):(mn(e),e[Z])}return br(e,{value:void 0}),e[Z]=t,K.fn.init(e),Object.setPrototypeOf(e,F.fn),c.deferUpdates&&Kt(e),e}F.fn={equalityComparer:gt,peek(){return this[Z]},valueHasMutated(){this.notifySubscribers(this[Z],"spectate"),this.notifySubscribers(this[Z])},valueWillMutate(){this.notifySubscribers(this[Z],"beforeChange")},modify(t,e=!0){return this(t(e?this.peek():this()))},isWriteable:!0};function fu(t,e){!e||e===Be?this._limitChange(t):e==="beforeChange"?this._limitBeforeChange(t):this._origNotifySubscribers(t,e)}K.fn.limit=function(e){var r=this,n=S(r),i="beforeChange",s,o,u,a,l;r._origNotifySubscribers||(r._origNotifySubscribers=r.notifySubscribers,r.notifySubscribers=fu);var d=e(function(){r._notificationIsPending=!1,n&&a===r&&(a=r._evalIfChanged?r._evalIfChanged():r());let m=o||l&&r.isDifferent(u,a);r._notifyNextChange=l=s=!1,m&&r._origNotifySubscribers(u=a)});Object.assign(r,{_limitChange(m,g){(!g||!r._notificationIsPending)&&(l=!g),r._changeSubscriptions=[...r._subscriptions[Be]],r._notificationIsPending=s=!0,a=m,d()},_limitBeforeChange(m){s||(u=m,r._origNotifySubscribers(m,i))},_notifyNextChangeIfValueIsDifferent(){r.isDifferent(u,r.peek(!0))&&(o=!0)},_recordUpdate(){l=!0}})};Object.setPrototypeOf(F.fn,K.fn);var Hi=F.protoProperty=c.protoProperty;F.fn[Hi]=F;F.observablePrototypes=new Set([F]);function S(t){let e=typeof t=="function"&&t[Hi];if(e&&!F.observablePrototypes.has(e))throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e}function f(t){return S(t)?t():t}function vt(t){return S(t)?t.peek():t}function te(t){return S(t)&&t.isWriteable}var bt="arrayChange";function Ye(t,e){if(t.compareArrayOptions={},e&&typeof e=="object"&&$(t.compareArrayOptions,e),t.compareArrayOptions.sparse=!0,t.cacheDiffForKnownOperation)return;let r=!1,n=null,i,s=0,o,u=t.beforeSubscriptionAdd,a=t.afterSubscriptionRemove;t.beforeSubscriptionAdd=function(m){u&&u.call(t,m),m===bt&&l()},t.afterSubscriptionRemove=function(m){a&&a.call(t,m),m===bt&&!t.hasSubscriptionsForEvent(bt)&&(o&&(t.notifySubscribers=o,o=void 0),i&&i.dispose(),i=null,r=!1)};function l(){if(!r){r=!0,o=t.notifySubscribers,t.notifySubscribers=function(g,p){return(!p||p===Be)&&++s,o.apply(this,arguments)};var m=[].concat(t.peek()===void 0?[]:t.peek());n=null,i=t.subscribe(function(g){let p;g=[].concat(g||[]),t.hasSubscriptionsForEvent(bt)&&(p=d(m,g)),m=g,n=null,s=0,p&&p.length&&t.notifySubscribers(p,bt)})}}function d(m,g){return(!n||s>1)&&(n=Ye.compareArrays(m,g,t.compareArrayOptions)),n}t.cacheDiffForKnownOperation=function(m,g,p){if(!r||s)return;var A=[],x=m.length,h=p.length,N=0;function P(L,Ie,pr){return A[A.length]={status:L,value:Ie,index:pr}}switch(g){case"push":N=x;case"unshift":for(let L=0;L<h;L++)P("added",p[L],N+L);break;case"pop":N=x-1;case"shift":x&&P("deleted",m[N],N);break;case"splice":var b=Math.min(Math.max(0,p[0]<0?x+p[0]:p[0]),x),w=h===1?x:Math.min(b+(p[1]||0),x),M=b+h-2,U=Math.max(w,M),V=[],ne=[];for(let L=b,Ie=2;L<U;++L,++Ie)L<w&&ne.push(P("deleted",m[L],L)),L<M&&V.push(P("added",p[Ie],L));Gr(ne,V);break;default:return}n=A}}Ye.compareArrays=ct;Ae.trackArrayChanges=Ye;function fe(t){if(t=t||[],typeof t!="object"||!("length"in t))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");var e=F(t);return Object.setPrototypeOf(e,fe.fn),Ye(e),br(e,{get:()=>e().length}),e}function Jt(t){return S(t)&&typeof t.remove=="function"&&typeof t.push=="function"}fe.fn={remove(t){for(var e=this.peek(),r=[],n=typeof t=="function"&&!S(t)?t:function(o){return o===t},i=0;i<e.length;i++){var s=e[i];if(n(s)){if(r.length===0&&this.valueWillMutate(),e[i]!==s)throw Error("Array modified during remove; cannot remove item");r.push(s),e.splice(i,1),i--}}return r.length&&this.valueHasMutated(),r},removeAll(t){if(t===void 0){var e=this.peek(),r=e.slice(0);return this.valueWillMutate(),e.splice(0,e.length),this.valueHasMutated(),r}return t?this.remove(function(n){return W(t,n)>=0}):[]},destroy(t){var e=this.peek(),r=typeof t=="function"&&!S(t)?t:function(s){return s===t};this.valueWillMutate();for(var n=e.length-1;n>=0;n--){var i=e[n];r(i)&&(i._destroy=!0)}this.valueHasMutated()},destroyAll(t){return t===void 0?this.destroy(function(){return!0}):t?this.destroy(function(e){return W(t,e)>=0}):[]},indexOf(t){return W(this(),t)},replace(t,e){var r=this.indexOf(t);r>=0&&(this.valueWillMutate(),this.peek()[r]=e,this.valueHasMutated())},sorted(t){return[...this()].sort(t)},reversed(){return[...this()].reverse()},[Symbol.iterator]:function*(){yield*this()}};Object.setPrototypeOf(fe.fn,F.fn);k(["pop","push","reverse","shift","sort","splice","unshift"],function(t){fe.fn[t]=function(){var e=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(e,t,arguments);var r=e[t].apply(e,arguments);return this.valueHasMutated(),r===e?this:r}});k(["slice"],function(t){fe.fn[t]=function(){var e=this();return e[t].apply(e,arguments)}});fe.trackArrayChanges=Ye;var pu=10;function yt(t){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return ji(t,function(e){for(var r=0;S(e)&&r<pu;r++)e=e();return e})}function vn(t,e,r){var n=yt(t);return JSON.stringify(n,e,r)}function ji(t,e,r=new Map){t=e(t);var n=typeof t=="object"&&t!==null&&t!==void 0&&!(t instanceof RegExp)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof Number)&&!(t instanceof Boolean);if(!n)return t;var i=t instanceof Array?[]:{};return r.set(t,i),hu(t,function(s){var o=e(t[s]);switch(typeof o){case"boolean":case"number":case"string":case"function":i[s]=o;break;case"object":case"undefined":var u=r.get(o);i[s]=u!==void 0?u:ji(o,e,r);break}}),i}function hu(t,e){if(t instanceof Array){for(var r=0;r<t.length;r++)e(r);typeof t.toJSON=="function"&&e("toJSON")}else for(var n in t)e(n)}function bn(){}function mu(t,e){for(;typeof e=="function";)e=e();return e}var E={"@":mu,"#":(t,e)=>()=>f(e),"=>":bn,"!":function(e,r){return!r},"!!":function(e,r){return!!r},"++":function(e,r){return++r},"--":function(e,r){return--r},"*":function(e,r){return e*r},"/":function(e,r){return e/r},"%":function(e,r){return e%r},"+":function(e,r){return e+r},"-":function(e,r){return(e||0)-(r||0)},"&-":function(e,r){return-1*r},"<":function(e,r){return e<r},"<=":function(e,r){return e<=r},">":function(e,r){return e>r},">=":function(e,r){return e>=r},"==":function(e,r){return e===r},"!=":function(e,r){return e!==r},"===":function(e,r){return e===r},"!==":function(e,r){return e!==r},"&":function(e,r){return e&r},"^":function(e,r){return e^r},"|":function(e,r){return e|r},"&&":function(e,r){return e&&r},"||":function(e,r){return e||r},".":function(e,r){return e[r]},"[":function(e,r){return e[r]},",":function(e,r){return r},call:function(e,r){return e.apply(null,r)}};E["@"].precedence=21;E["#"].precedence=21;E["."].precedence=19;E["["].precedence=19;E["!"].precedence=16;E["!!"].precedence=16;E["++"].precedence=16;E["--"].precedence=16;E["&-"].precedence=16;E["%"].precedence=14;E["*"].precedence=14;E["/"].precedence=14;E["+"].precedence=13;E["-"].precedence=13;E["|"].precedence=12;E["^"].precedence=11;E["&"].precedence=10;E["<"].precedence=11;E["<="].precedence=11;E[">"].precedence=11;E[">="].precedence=11;E["=="].precedence=10;E["!="].precedence=10;E["==="].precedence=10;E["!=="].precedence=10;E["&&"].precedence=6;E["||"].precedence=5;E["&&"].earlyOut=t=>!t;E["||"].earlyOut=t=>t;E[","].precedence=2;E.call.precedence=1;E["=>"].precedence=1;var Wi=Symbol("Node - Is Expression Or Identifier"),D=class{constructor(e,r,n){this.lhs=e,this.op=r,this.rhs=n}static get operators(){return E}get_leaf_value(e,r,n,i){return typeof e=="function"?f(e()):typeof e!="object"||e===null?e:e[D.isExpressionOrIdentifierSymbol]?f(e.get_value(void 0,r,n,i)):e}get_value(e,r,n,s){var s=this;if(s.op===bn)return(...l)=>{let d=r;return s.lhs&&(d=s.lhs.extendContext(r,l)),s.get_leaf_value(s.rhs,d,n,s)};let o=s.get_leaf_value(s.lhs,r,n,s),u=s.op.earlyOut;if(u&&u(o))return o;let a=s.get_leaf_value(s.rhs,r,n,s);return s.op(o,a,r,n)}static get isExpressionOrIdentifierSymbol(){return Wi}get[Wi](){return!0}static value_of(e,r,n,i){return e&&e[D.isExpressionOrIdentifierSymbol]?e.get_value(e,r,n,i):e}static create_root(e,r=!1){let n=[],i=[];for(let s=0;s<e.length;s+=2){n.push(e[s]);let o=e[s+1],u=(o==null?void 0:o.precedence)||0;for(;i.length&&u<=i[i.length-1].precedence;){let a=n.pop(),l=n.pop();n.push(new D(l,i.pop(),a))}i.push(o)}if(n.length!==1)throw new Error(`unexpected nodes remain in shunting yard output stack: ${n}`);return n[0]}};E["?"]=function(e,r,n,i,s){return D.value_of(e?r.yes:r.no,n,i,s)};E["?"].precedence=4;var Re=class{constructor(e){this.nodes=e,this.root=D.create_root(e)}get_value(e,r,n,i){return this.root||(this.root=D.create_root(this.nodes)),this.root.get_value(e,r,n,i)}};Re.prototype[D.isExpressionOrIdentifierSymbol]=!0;var Ee=class{constructor(e,r){this.parser=e,this.args=r}get_value(e,r,n,i){for(var s=[],o=0,u=this.args.length;o<u;++o)s.push(D.value_of(this.args[o],r,n,i));return s}get[D.isExpressionOrIdentifierSymbol](){return!0}};var Ui=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Qi=/[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;var H=class{constructor(e,r,n){this.token=r,this.dereferences=n,this.parser=e}dereference(e,r,n,i){let s,o=this.dereferences||[],u=r.$data||{},a,l,d;for(l=0,d=o.length;l<d;++l)if(s=D.value_of(o[l],r,n,i),typeof e=="function"&&o[l]instanceof Ee)e=e.apply(a||u,s),a=e;else{if(e==null)throw new Error(`dereference of null value in ${JSON.stringify(this,null,2)} context: ${JSON.stringify(r,null,2)}`);a=e,e=D.value_of(e[s],r,n,i)}return typeof e=="function"&&d>0&&a!==e&&!Y(a,s)?e.bind(a):e}get_value(e,r,n,i){let s=e&&!(e instanceof H)?D.value_of(e,r,n,i)[this.token]:r.lookup(this.token,n,i);return this.dereference(s,r,n,i)}assign(e,r,n){te(e[r])?e[r](n):S(e[r])||(e[r]=n)}set_value(e,r,n){let i=r.$data||{},s=this.dereferences||[],o=this.token,u,a,l;if(Rt(i)&&o in i)l=i;else if(o in r)l=r;else if(o in n)l=n;else throw new Error("Identifier::set_value -- The property '"+o+"' does not exist on the $data, $context, or globals.");if(a=s.length,a===0){this.assign(l,o,e);return}for(l=l[o],u=0;u<a-1;++u)o=s[u],o instanceof Ee?l=l():l=l[D.value_of(o)];if(s[u]===!0)throw new Error("Cannot assign a value to a function.");s[u]&&this.assign(l,D.value_of(s[u]),e)}static is_valid_start_char(e){return Ui.test(e)}static is_valid_continue_char(e){return Qi.test(e)}get[D.isExpressionOrIdentifierSymbol](){return!0}};var ze=class{constructor(e,r){r instanceof Re&&(r=r.root);try{this.names=ze.nodeTreeToNames(r)}catch(n){e.error(n)}}extendContext(e,r){if(this.names){let n={};return this.names.forEach((i,s)=>{n[i]=r[s]}),e.extend(n)}else return e}get[D.isExpressionOrIdentifierSymbol](){return!0}static nodeTreeToNames(e){let r=[];for(;e;)if(e instanceof H)r.push(e.token),e=null;else if(this.isCommaNode(e))r.push(e.rhs.token),e=e.lhs;else throw new Error(`only simple identifiers allowed in lambda parameter list but found ${JSON.stringify(e,null,2)}`);return r.reverse(),r}static isCommaNode(e){return e instanceof D&&e.op===E[","]&&e.rhs instanceof H}};var At=class{constructor(e,r){Object.assign(this,{yes:e,no:r})}get_value(){return this}get[D.isExpressionOrIdentifierSymbol](){return!0}};var Ki={"'":"'",'"':'"',"`":"`","\\":"\\","/":"/",$:"$",b:"\b",f:"\f",n:`
|
|
3
3
|
`,r:"\r",t:" "},Me=class{white(){for(var e=this.ch;e&&e<=" ";)e=this.next();return this.comment(e)}comment(e){if(e!=="/")return e;var r=this.at,n=this.lookahead();if(n==="/"){for(;e&&(e=this.next(),!(e===`
|
|
4
4
|
`||e==="\r")););e=this.next()}else if(n==="*"){for(;e;)if(e=this.next(),e==="*"&&this.lookahead()==="/"){this.next();break}return e||this.error("Unclosed comment, starting at character "+r),this.next(),this.white()}return e}next(e){return e&&e!==this.ch&&this.error("Expected '"+e+"' but got '"+this.ch+"'"),this.ch=this.text.charAt(this.at),this.at+=1,this.ch}lookahead(){return this.text[this.at]}error(e){if(e instanceof Error)throw e;let[r,n]=e.name?[e.name,e.message]:[e,""],i=`
|
|
@@ -12,5 +12,5 @@ Message: `+(e.message?e.message:e)):e=t.errorCaptured;try{$(e,t)}catch(n){t.stac
|
|
|
12
12
|
\u{1F94A} Knockout warning: components for custom elements must be lowercase and contain a dash. To ignore this warning, add to the 'config' of .register(componentName, config):
|
|
13
13
|
|
|
14
14
|
ignoreCustomElementWarning: true
|
|
15
|
-
`),tt[t]=e}function On(t){return Y(tt,t)}function ks(t){delete tt[t],he.clearCachedDefinition(t)}var Pn={getConfig:function(t,e){var r=Y(tt,t)?tt[t]:null;e(r)},loadComponent:function(t,e,r){var n=_n(t);In(n,e,function(i){Lu(t,n,i,r)})},loadTemplate:function(t,e,r){Hu(_n(t),e,r)},loadViewModel:function(t,e,r){Is(_n(t),e,r)}},kn="createViewModel";function Lu(t,e,r,n){var i={},s=2,o=function(){--s===0&&n(i)},u=r.template,a=r.viewModel;u?In(e,u,function(l){he._getFirstResultFromLoaders("loadTemplate",[t,l],function(d){i.template=d,o()})}):o(),a?In(e,a,function(l){he._getFirstResultFromLoaders("loadViewModel",[t,l],function(d){i[kn]=d,o()})}):o()}function Hu(t,e,r){if(typeof e=="string")r(be(e));else if(e instanceof Array)r(e);else if(nn(e))r(le(e.childNodes));else if(e.element){var n=e.element;if(pi(n))r(_s(n));else if(typeof n=="string"){var i=document.getElementById(n);i?r(_s(i)):t("Cannot find element with ID "+n)}else t("Unknown element type: "+n)}else e.elementName?r(e):t("Unknown template value: "+e)}function Is(t,e,r){if(e[$r])r((...i)=>e[$r](...i));else if(typeof e=="function")r(function(i){return new e(i)});else if(typeof e[kn]=="function")r(e[kn]);else if("instance"in e){var n=e.instance;r(function(){return n})}else"viewModel"in e?Is(t,e.viewModel,r):t("Unknown viewModel value: "+e)}function _s(t){switch(O(t)){case"script":return be(t.text);case"textarea":return be(t.value);case"template":if(nn(t.content))return De(t.content.childNodes)}return De(t.childNodes)}function In(t,e,r){typeof e.require=="string"?window.amdRequire||window.require?(window.amdRequire||window.require)([e.require],r):t("Uses require, but no AMD loader is present"):r(e)}function _n(t){return function(e){throw new Error("Component '"+t+"': "+e)}}he.loaders.push(Pn);var Hr=class extends G{static get customElementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}static get template(){if(!("template"in this.prototype))return{element:this.element}}static get element(){throw new Error("[ComponentABC] `element` must be overloaded.")}static get sync(){return!0}static[$r](e,r){return new this(e,r)}static register(e=this.customElementName){let r=this,{template:n}=this,i=this.sync;Lr(e,{viewModel:r,template:n,synchronous:i})}};var rt={ComponentABC:Hr,get:he.get,clearCachedDefinition:he.clearCachedDefinition,register:Lr,isRegistered:On,unregister:ks,defaultLoader:Pn,_allRegisteredComponents:tt,get loaders(){return he.loaders},set loaders(t){he.loaders=t}};var Tt=class extends q{get FOR_NODE_TYPES(){return[1]}preprocessNode(e){if(e.tagName==="SLOT"){let r=e.parentNode,n=e.getAttribute("name")||"",i=document.createComment(`ko slot: "${n}"`),s=document.createComment("/ko");return r.insertBefore(i,e),r.insertBefore(s,e),r.removeChild(e),[i,s]}}nodeHasBindings(e){return Boolean(this.getComponentNameForNode(e))}getBindingAccessors(e,r){let n=this.getComponentNameForNode(e);return n?{component:()=>({name:n,params:this.getComponentParams(e,r)})}:void 0}getComponentNameForNode(e){if(e.nodeType!==e.ELEMENT_NODE)return;let r=O(e);if(rt.isRegistered(r)){let n=r.includes("-"),i=""+e=="[object HTMLUnknownElement]";if(n||i)return r}}getComponentParams(e,r){let n=new Me(e,r,this.globals),i=(e.getAttribute("params")||"").trim(),s=n.parse(i,r,e);if(!s||Object.keys(s).length===0)return{$raw:{}};let o=ge(s,a=>B(a,null,{disposeWhenNodeIsRemoved:e})),u=ge(o,a=>this.makeParamValue(e,a));return Object.assign({$raw:o},u)}makeParamValue(e,r){let n=r.peek();if(!r.isActive())return n;let i=te(n);return B({read:()=>f(r()),write:i?s=>r()(s):null,disposeWhenNodeIsRemoved:e})}};var _t=class extends q{get FOR_NODE_TYPES(){return[1]}get PREFIX(){return"ko-"}getBindingAttributesList(e){return e.hasAttributes()?Array.from(e.attributes).filter(r=>r.name.startsWith(this.PREFIX)):[]}nodeHasBindings(e){return this.getBindingAttributesList(e).length>0}getBindingAccessors(e,r){return Object.assign({},...this.handlersFromAttributes(e,r))}*handlersFromAttributes(e,r){for(let n of this.getBindingAttributesList(e))yield{[n.name.substr(this.PREFIX.length)]:()=>this.getValue(n.value,r,e)}}getValue(e,r,n){if(!e)return;let i=r.$data;switch(e){case"$element":return n;case"$context":return r;case"this":case"$data":return r.$data}if(i instanceof Object&&e in i)return i[e];if(e in r)return r[e];if(e in this.globals)return this.globals[e];throw new Error(`The variable '${e} not found.`)}};var kt=class extends q{get FOR_NODE_TYPES(){return this.nodeTypes}constructor(e={}){super(e);let r=e.providers||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],r.forEach(n=>this.addProvider(n))}setGlobals(e){[this,...this.providers].forEach(r=>r.globals=e)}addProvider(e){this.providers.push(e),e.bindingHandlers=this.bindingHandlers,e.globals=this.globals;let r=this.nodeTypeMap;for(let n of e.FOR_NODE_TYPES)r[n]||(r[n]=[]),r[n].push(e);this.nodeTypes=Object.keys(this.nodeTypeMap).map(n=>parseInt(n,10))}providersFor(e){return this.nodeTypeMap[e.nodeType]||[]}nodeHasBindings(e){return this.providersFor(e).some(r=>r.nodeHasBindings(e))}preprocessNode(e){for(let r of this.providersFor(e)){let n=r.preprocessNode(e);if(n)return n}}*enumerateProviderBindings(e,r){for(let n of this.providersFor(e)){let i=n.getBindingAccessors(e,r);if(!!i&&(yield*Object.entries(i||{}),n.preemptive))return}}getBindingAccessors(e,r){let n={};for(let[i,s]of this.enumerateProviderBindings(e,r)){if(i in n)throw new Error(`The binding "${i}" is duplicated by multiple providers`);n[i]=s}return n}};var Os={update:function(t,e,r){var n=f(e())||{};I(n,function(i,s){s=f(s);var o=i.indexOf(":"),u=o>0&&t.lookupNamespaceURI(i.substr(0,o));let a=s===!1||s===null||s===void 0;a?u?t.removeAttributeNS(u,i):t.removeAttribute(i):(s=s.toString(),u?t.setAttributeNS(u,i,s):t.setAttribute(i,s)),i==="name"&&Cr(t,a?"":s)})}};var Ps={after:["value","attr"],init:function(t,e,r){var n=we(function(){if(r.has("checkedValue"))return f(r.get("checkedValue"));if(m)return r.has("value")?f(r.get("value")):t.value});function i(){var p=t.checked,A=n();if(!C.isInitial()&&!(!p&&(u||C.getDependenciesCount()))){var x=C.ignore(e);if(l){var h=d?x.peek():x,N=g;g=A,N!==A?(p&&(Oe(h,A,!0),Oe(h,N,!1)),g=A):Oe(h,A,p),d&&te(x)&&x(h)}else o&&(A===void 0?A=p:p||(A=void 0)),e(A,{onlyIfChanged:!0})}}function s(){var p=p=f(e()),A=n();l?(t.checked=W(p,A)>=0,g=A):o&&A===void 0?t.checked=!!p:t.checked=n()===p}var o=t.type=="checkbox",u=t.type=="radio";if(!(!o&&!u)){var a=e(),l=o&&f(a)instanceof Array,d=!(l&&a.push&&a.splice),m=u||l,g=l?n():void 0;B(i,null,{disposeWhenNodeIsRemoved:t}),Q(t,"click",i),B(s,null,{disposeWhenNodeIsRemoved:t}),a=void 0}}},Vs={update:function(t,e){t.value=f(e())}};function Ms(t){return{init:function(e,r,n,i,s){var o=function(){var u={};return u[t]=r(),u};jr.init.call(this,e,o,n,i,s)}}}function Rs(t){return typeof t=="function"?{handler:t}:t||{}}var jr={init:function(t,e,r,n,i){var s=e()||{};I(s,function(o,u){let{passive:a,capture:l,once:d,debounce:m,throttle:g}=Rs(u),p=(l||a||d)&&{capture:l,passive:a,once:d},A=(x,...h)=>{var N;let{handler:P,passive:b,bubble:w,preventDefault:M}=Rs(e()[o]);try{if(P){let V=i.$data,ne=[V,x,...h];N=P.apply(V,ne)}}finally{M!==void 0?f(M)&&x.preventDefault():N!==!0&&(b||x.preventDefault())}let U=r.get(o+"Bubble")!==!1;(w===!1||!U)&&(x.cancelBubble=!0,x.stopPropagation&&x.stopPropagation())};m&&(A=vr(A,m)),g&&(A=gr(A,g)),Q(t,o,A,p||!1)})}},$s={init:jr.init,preprocess:function(t,e,r){r(e.replace("on.",""),"=>"+t)}};var Ls=Ms("click");var rr={aliases:["class"],update:function(t,e){var r=f(e());r!==null&&typeof r=="object"?I(r,function(n,i){i=f(i),dt(t,n,i)}):(r=Ue(String(r||"")),dt(t,t[rr.classesWrittenByBindingKey],!1),t[rr.classesWrittenByBindingKey]=r,dt(t,r,!0))},classesWrittenByBindingKey:z("__ko__cssValue")};var nr=class extends ee{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var Vn={update:function(t,e){var r=f(e());r&&t.disabled?t.removeAttribute("disabled"):!r&&!t.disabled&&(t.disabled=!0)}},Hs={update:function(t,e){Vn.update(t,function(){return!f(e())})}};var Rn=z("__ko_hasfocusUpdating"),Mn=z("__ko_hasfocusLastValue"),$n={init:function(t,e){var r=function(s){t[Rn]=!0;var o=t.ownerDocument;if("activeElement"in o){var u;try{u=o.activeElement}catch(a){u=o.body}s=u===t}e(s,{onlyIfChanged:!0}),t[Mn]=s,t[Rn]=!1},n=r.bind(null,!0),i=r.bind(null,!1);Q(t,"focus",n),Q(t,"focusin",n),Q(t,"blur",i),Q(t,"focusout",i)},update:function(t,e){var r=!!f(e());!t[Rn]&&t[Mn]!==r&&(r?t.focus():t.blur(),!r&&t[Mn]&&t.ownerDocument.body.focus(),C.ignore(Ke,null,[t,r?"focusin":"focusout"]))}};var js={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){ht(t,e())},allowVirtualElements:!0};var Ws={init:function(t,e,r,n,i){var s=i.extend(e);return ue(s,t),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Ln={},Us={init:function(t){if(O(t)!=="select")throw new Error("options binding applies only to SELECT elements");for(;t.length>0;)t.remove(0);return{controlsDescendantBindings:!0}},update:function(t,e,r){function n(){return We(t.options,function(b){return b.selected})}var i=t.length==0,s=t.multiple,o=!i&&s?t.scrollTop:null,u=f(e()),a=r.get("valueAllowUnset")&&r.has("value"),l=r.get("optionsIncludeDestroyed"),d={},m,g,p=[];a||(s?p=ut(n(),T.readValue):t.selectedIndex>=0&&p.push(T.readValue(t.options[t.selectedIndex]))),u&&(typeof u.length=="undefined"&&(u=[u]),g=We(u,function(b){return l||b===void 0||b===null||!f(b._destroy)}),r.has("optionsCaption")&&(m=f(r.get("optionsCaption")),m!=null&&g.unshift(Ln)));function A(b,w,M){var U=typeof w;return U==="function"?w(b):U=="string"?b[w]:M}var x=!1;function h(b,w,M){M.length&&(p=!a&&M[0].selected?[T.readValue(M[0])]:[],x=!0);var U=t.ownerDocument.createElement("option");if(b===Ln)Je(U,r.get("optionsCaption")),T.writeValue(U,void 0);else{var V=A(b,r.get("optionsValue"),b);T.writeValue(U,f(V));var ne=A(b,r.get("optionsText"),V);Je(U,ne)}return[U]}d.beforeRemove=function(b){t.removeChild(b)};function N(b,w){if(x&&a)T.writeValue(t,f(r.get("value")),!0);else if(p.length){var M=W(p,T.readValue(w[0]))>=0;xr(w[0],M),x&&!M&&C.ignore(Ke,null,[t,"change"])}}var P=N;r.has("optionsAfterRender")&&typeof r.get("optionsAfterRender")=="function"&&(P=function(b,w){N(b,w),C.ignore(r.get("optionsAfterRender"),null,[w[0],b!==Ln?b:void 0])}),Bt(t,g,h,d,P),C.ignore(function(){if(a)T.writeValue(t,f(r.get("value")),!0);else{var b;s?b=p.length&&n().length<p.length:b=p.length&&t.selectedIndex>=0?T.readValue(t.options[t.selectedIndex])!==p[0]:p.length||t.selectedIndex>=0,b&&Ke(t,"change")}}),xi(t),o&&Math.abs(o-t.scrollTop)>20&&(t.scrollTop=o)}};var Qs={after:["options","foreach"],init:function(t,e,r){Q(t,"change",function(){var n=e(),i=[];k(t.getElementsByTagName("option"),function(s){s.selected&&i.push(T.readValue(s))}),e(i)})},update:function(t,e){if(O(t)!="select")throw new Error("values binding applies only to SELECT elements");var r=f(e()),n=t.scrollTop;r&&typeof r.length=="number"&&k(t.getElementsByTagName("option"),function(i){var s=W(r,T.readValue(i))>=0;i.selected!=s&&xr(i,s)}),t.scrollTop=n}};var{jQueryInstance:Ks}=c,qs={update:function(t,e){var r=f(e()||{});I(r,function(n,i){if(i=f(i),(i==null||i===!1)&&(i=""),Ks)Ks(t).css(n,i);else{n=n.replace(/-(\w)/g,(o,u)=>u.toUpperCase());let s=t.style[n];t.style[n]=i,i!==s&&t.style[n]===s&&!isNaN(i)&&(t.style[n]=i+"px")}})}};var Js={init:function(t,e,r,n,i){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");Q(t,"submit",function(s){var o,u=e();try{o=u.call(i.$data,t)}finally{o!==!0&&(s.preventDefault?s.preventDefault():s.returnValue=!1)}})}};var Gs={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){Je(t,e())},allowVirtualElements:!0};var Ys,Hn,jn,nt=class extends ee{get aliases(){return"textinput"}constructor(...e){super(...e),this.previousElementValue=this.$element.value,c.debug&&this.constructor._forceUpdateOn&&k(this.constructor._forceUpdateOn,r=>{r.slice(0,5)==="after"?this.addEventListener(r.slice(5),"deferUpdateModel"):this.addEventListener(r,"updateModel")});for(let r of this.eventsIndicatingSyncValueChange())this.addEventListener(r,"updateModel");for(let r of this.eventsIndicatingDeferValueChange())this.addEventListener(r,"deferUpdateModel");this.computed("updateView")}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(e){let r=this.$element;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let n=r.value;this.previousElementValue!==n&&(c.debug&&e&&(r._ko_textInputProcessedEvent=e.type),this.previousElementValue=n,this.value=n)}deferUpdateModel(e){let r=this.$element;if(!this.timeoutHandle){this.elementValueBeforeEvent=r.value;let n=c.debug?this.updateModel.bind(this,{type:e.type}):this.updateModel;this.timeoutHandle=ce(n,4)}}updateView(){let e=f(this.value);e==null&&(e=""),this.elementValueBeforeEvent!==void 0&&e===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$element.value!==e&&(this.previousElementValue=e,this.$element.value=e,this.previousElementValue=this.$element.value)}},sr=class extends nt{constructor(...e){super(...e),R<11&&this.addEventListener("propertychange",r=>r.propertyName==="value"&&this.updateModel(r)),R>=8&&R<10&&(this.watchForSelectionChangeEvent(),this.addEventListener("dragend","deferUpdateModel"))}eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingValueChange(),"keypress"]}selectionChangeHandler(e){let r=this.activeElement,n=r&&y.get(r,selectionChangeHandlerName);n&&n(e)}watchForSelectionChangeEvent(e,r){let n=e.ownerDocument;y.get(n,selectionChangeRegisteredName)||(y.set(n,selectionChangeRegisteredName,!0),Q(n,"selectionchange",this.selectionChangeHandler.bind(n))),y.set(e,selectionChangeHandlerName,handler)}},Wn=class extends sr{updateModel(...e){this.deferUpdateModel(...e)}},Un=class extends sr{eventsIndicatingValueChange(){return[...super.eventsIndicatingValueChange(),"keyup","keydown"]}},Qn=class extends nt{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},Kn=class extends nt{eventsIndicatingDeferValueChange(){return["keydown"]}},qn=class extends nt{eventsIndicatingValueChange(){return[...super.eventsIndicatingSyncValueChange(),"DOMAutoComplete","dragdrop","drop"]}},ir=c.global;if(ir.navigator){let t=n=>n&&parseFloat(n[1]),e=ir.navigator.userAgent,r=e.match(/Chrome\/([^ ]+)/);Ys=ir.opera&&ir.opera.version&&parseInt(ir.opera.version()),Hn=t(e.match(/Version\/([^ ]+) Safari/)),jn=t(e.match(/Firefox\/([^ ]*)/))}var Jn=R===8?Un:R===9?Wn:R?sr:Hn&&Hn<5?Qn:Ys<11?Kn:jn&&jn<4?qn:nt;var Gn={init:function(t,e){if(e()){var r="ko_unique_"+ ++Gn.currentIndex;Cr(t,r)}},currentIndex:0};var Wr=class extends ee{static get after(){return["options","foreach","template"]}constructor(...e){if(super(...e),this.isCheckboxOrRadio){Xt(this.$element,{checkedValue:this.valueAccessor});return}this.propertyChangedFired=!1,this.elementValueBeforeEvent=null,this.ieAutoCompleteHackNeeded&&(this.addEventListener("propertyChange",()=>this.propertyChangedFired=!0),this.addEventListener("focus",()=>this.propertyChangedFired=!1),this.addEventListener("blur",()=>this.propertyChangeFired&&this.valueUpdateHandler())),k(this.eventsToCatch,r=>this.registerEvent(r)),this.isInput&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}get eventsToCatch(){let e=this.allBindings.get("valueUpdate"),r=typeof e=="string"?[e]:e||[];return[...new Set(["change",...r])]}get isInput(){return O(this.$element)==="input"}get isCheckboxOrRadio(){let e=this.$element;return this.isInput&&(e.type=="checkbox"||e.type=="radio")}get ieAutoCompleteHackNeeded(){return R&&isInputElement&&this.$element.type=="text"&&this.$element.autocomplete!="off"&&(!this.$element.form||this.$element.form.autocomplete!="off")}valueUpdateHandler(){this.elementValueBeforeEvent=null,this.propertyChangedFired=!1,this.value=T.readValue(this.$element)}registerEvent(e){var r=this.valueUpdateHandler.bind(this);li(e,"after")&&(r=()=>{this.elementValueBeforeEvent=T.readValue(this.$element),ce(this.valueUpdateHandler.bind(this),0)},e=e.substring(5)),this.addEventListener(e,r)}updateFromModelForFile(){var e=f(this.value);e==null||e===""?this.$element.value="":C.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let e=this.$element;var r=f(this.value),n=T.readValue(e);if(this.elementValueBeforeEvent!==null&&r===this.elementValueBeforeEvent){ce(this.updateFromModel.bind(this),0);return}if(!(r===n&&n!==void 0))if(O(e)==="select"){let i=this.allBindings.get("valueAllowUnset");T.writeValue(e,r,i),!i&&r!==T.readValue(e)&&C.ignore(this.valueUpdateHandler,this)}else T.writeValue(e,r)}};var Yn={update:function(t,e){var r=f(e()),n=t.style.display!=="none";r&&!n?t.style.display="":!r&&n&&(t.style.display="none")}},zs={update:function(t,e){Yn.update.call(this,t,()=>!f(e()))}};var Xs={init:function(t,e,r,n,i){var s=i.createChildContext(e);return ue(s,t),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Zs={attr:Os,checked:Ps,checkedValue:Vs,click:Ls,css:rr,class:rr,descendantsComplete:nr,enable:Vn,event:jr,disable:Hs,hasfocus:$n,hasFocus:$n,hidden:zs,html:js,let:Ws,on:$s,options:Us,selectedOptions:Qs,style:qs,submit:Js,text:Gs,textInput:Jn,textinput:Jn,uniqueName:Gn,using:Xs,value:Wr,visible:Yn};var ju=(t,e,r)=>new Promise((n,i)=>{var s=a=>{try{u(r.next(a))}catch(l){i(l)}},o=a=>{try{u(r.throw(a))}catch(l){i(l)}},u=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,o);u((r=r.apply(t,e)).next())}),it=class extends re{constructor(e){super(e),this.hasElse=this.detectElse(this.$element);let r=this.completesElseChain=F();y.set(this.$element,"conditional",{elseChainSatisfied:r})}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(C.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}render(){let e=!this.ifElseNodes,{shouldDisplay:r}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},r){let n=e&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,n)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):v.emptyNode(this.$element)}renderAndApplyBindings(e,r){return ju(this,null,function*(){r||v.setDomNodeChildren(this.$element,De(e));let n=yield ue(this.bindingContext,this.$element);this.completeBinding(n)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(e){return e.nodeType===8&&e.nodeValue.trim().toLowerCase()==="else"}detectElse(e){for(var r=v.childNodes(e),n=0,i=r.length;n<i;++n)if(this.isElseNode(r[n]))return!0;return!1}cloneIfElseNodes(e,r){let n=v.childNodes(e),i=[],s=[],o=i;for(var u=0,a=n.length;u<a;++u)r&&this.isElseNode(n[u])?(o=s,r=!1):o.push(X(n[u].cloneNode(!0)));return{ifNodes:i,elseNodes:s}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var st=class extends it{constructor(...e){super(...e),this.ifCondition=this.computed(()=>!!f(this.value)),this.computed("render")}shouldDisplayIf(){return this.ifCondition()}get bindingContext(){return this.ifCondition.isActive()?this.$context.extend(()=>(this.ifCondition(),null)):this.$context}renderStatus(){let e=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(e=!1,this.completesElseChain(!0)):this.completesElseChain(e),{shouldDisplay:e}}},or=class extends st{shouldDisplayIf(){return!super.shouldDisplayIf()}};var Ur=class extends it{constructor(...e){super(...e),this.asOption=this.allBindings.get("as");let r=this.asOption&&!c.createChildContextWithAs?()=>Boolean(f(this.value)):()=>f(this.value);this.conditional=this.computed(r),this.computed("render")}get bindingContext(){return this.asOption?c.createChildContextWithAs?this.$context.createChildContext(this.value,this.asOption):this.$context.extend({[this.asOption]:this.value}):this.$context.createChildContext(this.valueAccessor)}renderStatus(){return{shouldDisplay:Boolean(this.conditional())}}};var ur=class extends st{shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),f(this._elseChain.elseChainSatisfied)}readElseChain(){let e=this.$element;do e=e.previousSibling;while(e&&e.nodeType!==1&&e.nodeType!==8);return e?(e.nodeType===8&&(e=v.previousSibling(e)),y.get(e,"conditional")||{}):!1}};var eo={if:st,with:Ur,ifnot:or,unless:or,else:ur,elseif:ur};var Wu=9007199254740991;function Uu(t){return!!t&&typeof t=="object"&&t.constructor===Object}var Qu=c.document&&typeof c.document.createDocumentFragment=="function";function Ku(t){var e=document.createElement("div"),r;return t.content?r=t.content:t.tagName==="SCRIPT"?(r=document.createElement("div"),r.innerHTML=t.text):r=t,k(v.childNodes(r),function(n){n&&e.insertBefore(n.cloneNode(!0),null)}),e}function qu(t,e){return{status:"added",value:t,index:e}}var ar=z("_ko_ffe_pending_delete_index"),Te=class extends re{constructor(e){super(e);let r={};Uu(this.value)&&Object.assign(r,this.value),this.as=r.as||this.allBindings.get("as"),this.data=r.data||(f(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=v.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=Ku(r.templateNode||(r.name?document.getElementById(r.name).cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(i=>{this[i]=r[i]||this.allBindings.get(i)}),this.changeQueue=[],this.firstLastNodesList=[],this.indexesToDelete=[],this.rendering_queued=!1,this.pendingDeletes=[],this.isNotEmpty=F(Boolean(f(this.data).length)),y.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),v.emptyNode(this.$element);let n=f(this.data);n&&n.map?this.onArrayChange(n.map(qu),!0):this.completeBinding(),S(this.data)&&(this.data.indexOf||(this.data=this.data.extend({trackArrayChanges:!0})),this.changeSubs=this.data.subscribe(this.onArrayChange,this,"arrayChange"))}dispose(){this.changeSubs&&this.changeSubs.dispose(),this.flushPendingDeletes()}onArrayChange(e,r){for(var n={added:[],deleted:[]},i=0,s=e.length;i<s;i++){if(n.added.length&&e[i].status==="added"){var o=n.added[n.added.length-1],u=o.isBatch?o.index+o.values.length-1:o.index;if(u+1===e[i].index){o.isBatch||(o={isBatch:!0,status:"added",index:o.index,values:[o.value]},n.added.splice(n.added.length-1,1,o)),o.values.push(e[i].value);continue}}n[e[i].status].push(e[i])}n.deleted.length>0&&(this.changeQueue.push.apply(this.changeQueue,n.deleted),this.changeQueue.push({status:"clearDeletedIndexes"})),this.changeQueue.push.apply(this.changeQueue,n.added),this.changeQueue.length>0&&!this.rendering_queued&&(this.rendering_queued=!0,r?this.processQueue():Te.animateFrame.call(window,()=>this.processQueue()))}startQueueFlush(){typeof this.beforeQueueFlush=="function"&&this.beforeQueueFlush(this.changeQueue)}endQueueFlush(){typeof this.afterQueueFlush=="function"&&this.afterQueueFlush(this.changeQueue)}processQueue(){var e=!f(this.data).length,r=Wu;this.startQueueFlush(),k(this.changeQueue,n=>{typeof n.index=="number"&&(r=Math.min(r,n.index)),this[n.status](n)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(r),this.endQueueFlush(),this.changeQueue=[],e!==!this.isNotEmpty()&&this.isNotEmpty(!e)}_first$indexRequest(e){this.$indexHasBeenRequested=!0;for(let r=0,n=this.firstLastNodesList.length;r<n;++r){let i=this.getContextStartingFrom(this.firstLastNodesList[r].first);i&&(i.$index=F(r))}return e.$index()}_contextExtensions(e){return Object.assign(e,{$list:this.data}),this.$indexHasBeenRequested?e.$index=e.$index||F():Object.defineProperty(e,"$index",{value:()=>this._first$indexRequest(e),configurable:!0,writable:!0}),e}createContextGenerator(e){let r=this.$context;return e?n=>this._contextExtensions(r.extend({[e]:n})):n=>r.createChildContext(n,null,i=>this._contextExtensions(i))}updateFirstLastNodesList(e,r){let n=r[0],i=r[r.length-1];this.firstLastNodesList.splice(e,0,{first:n,last:i})}added(e){var r=e.index,n=e.isBatch?e.values:[e.value],i=this.getLastNodeBeforeIndex(r);let s=[],o=[];for(var u,a=0,l=n.length;a<l;++a){var d=this.getPendingDeleteFor(n[a]);if(d&&d.nodesets.length)u=d.nodesets.pop(),this.updateFirstLastNodesList(r+a,u);else{var m=this.templateNode.cloneNode(!0);u=v.childNodes(m),this.updateFirstLastNodesList(r+a,u);let g=ue(this.generateContext(n[a]),m);o.push(g)}s.push(...u)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(s,i),foreachInstance:this}):this.insertAllAfter(s,i),this.completeBinding(Promise.all(o))}getNodesForIndex(e){let r=[],n=this.firstLastNodesList[e].first,i=this.firstLastNodesList[e].last;for(r.push(n);n&&n!==i;)n=n.nextSibling,r.push(n);return r}getLastNodeBeforeIndex(e){return e<1||e-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[e-1].last}activeChildElement(e){var r=document.activeElement;if(rn(r,e))return r}insertAllAfter(e,r){let n,i,s,o=null,u=this.$element;if(e.nodeType===void 0&&e.length===void 0)throw new Error("Expected a single node or a node array");if(e.nodeType!==void 0)return o=this.activeChildElement(e),v.insertAfter(u,e,r),[e];if(e.length===1)o=this.activeChildElement(e[0]),v.insertAfter(u,e[0],r);else if(Qu){for(n=document.createDocumentFragment(),s=0,i=e.length;s!==i;++s)o=o||this.activeChildElement(e[s]),n.appendChild(e[s]);v.insertAfter(u,n,r)}else for(s=e.length-1;s>=0;--s){o=o||this.activeChildElement(e[s]);var a=e[s];if(!a)break;v.insertAfter(u,a,r)}return o&&o.focus(),e}shouldDelayDeletion(e){return e&&(typeof e=="object"||typeof e=="function")}getPendingDeleteFor(e){var r=e&&e[ar];return r===void 0?null:this.pendingDeletes[r]}getOrCreatePendingDeleteFor(e){var r=this.getPendingDeleteFor(e);return r||(r={data:e,nodesets:[]},e[ar]=this.pendingDeletes.length,this.pendingDeletes.push(r),r)}deleted(e){this.shouldDelayDeletion(e.value)?this.getOrCreatePendingDeleteFor(e.value).nodesets.push(this.getNodesForIndex(e.index)):this.removeNodes(this.getNodesForIndex(e.index)),this.indexesToDelete.push(e.index)}removeNodes(e){if(!e.length)return;function r(){for(var i=e[0].parentNode,s=e.length-1;s>=0;--s)X(e[s]),i.removeChild(e[s])}if(this.beforeRemove){var n=this.beforeRemove({nodesToRemove:e,foreachInstance:this})||{};typeof n.then=="function"&&n.then(r,c.onError)}else r()}flushPendingDeletes(){for(let r=0,n=this.pendingDeletes.length;r!==n;++r){for(var e=this.pendingDeletes[r];e.nodesets.length;)this.removeNodes(e.nodesets.pop());e.data&&e.data[ar]!==void 0&&delete e.data[ar]}this.pendingDeletes=[]}clearDeletedIndexes(){for(let e=this.indexesToDelete.length-1;e>=0;--e)this.firstLastNodesList.splice(this.indexesToDelete[e],1);this.indexesToDelete=[]}updateIndexes(e){let r;for(let n=e,i=this.firstLastNodesList.length;n<i;++n)r=this.getContextStartingFrom(this.firstLastNodesList[n].first),r&&r.$index(n)}getContextStartingFrom(e){let r;for(;e;){if(r=Ne(e),r)return r;e=e.nextSibling}}static setSync(e){let r=c.global;e?Te.animateFrame=function(n){n()}:Te.animateFrame=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(n){return r.setTimeout(n,1e3/60)}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}static get ForEach(){return this}static get PENDING_DELETE_INDEX_SYM(){return ar}};var to={foreach:Te};Te.setSync(!1);var me=Symbol("Knockout native bindings"),je=class extends q{get FOR_NODE_TYPES(){return[1,3]}get preemptive(){return!0}nodeHasBindings(e){return e[me]?Object.keys(e[me]||{}).some(r=>r.startsWith("ko-")):!1}preprocessNode(e){return e[me]?e:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,r]){let n=e.replace(/^ko-/,""),i=S(r)?r:()=>r;return{[n]:i}}getBindingAccessors(e){let r=Object.entries(e[me]||{}).filter(this.onlyBindings);return r.length?Object.assign({},...r.map(this.valueAsAccessor)):null}static addValueToNode(e,r,n){let i=e[me]||(e[me]={});i[r]=n}static getNodeValues(e){return e[me]}};var Ju=25,Gu=1e3,Xn=[],zn=null;function ro(t){Xn.push(t),no()}function no(){!zn&&Xn.length&&(zn=setTimeout(Yu,Ju))}function Yu(){zn=null;let t=Xn.splice(0,Gu);for(let e of t)X(e);no()}var It=Symbol("Knockout - Original JSX"),Qr={svg:"http://www.w3.org/2000/svg",html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function io(t){return t&&typeof t[Symbol.iterator]=="function"}var _e=class extends G{constructor(e,r,n=null,i,s){super();let o=r.nodeType===8,u=this.getParentTarget(r);if(S(e))if(e.extend({trackArrayChanges:!0}),this.subscribe(e,this.observableArrayChange,"arrayChange"),n)this.adoptedInsertBefore=!0;else{let d=o?r.nextSibling:null;n=this.createComment("O"),u.insertBefore(n,d)}o&&!n&&(n=r.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(n||r),Object.assign(this,{insertBefore:n,noInitialBinding:s,parentNode:r,parentNodeTarget:u,xmlns:i,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let a=f(e);(Ct(e)||a!=null)&&this.observableArrayChange(this.createInitialAdditions(a)),this.noInitialBinding=!1}getParentTarget(e){return"content"in e?e.content:e.nodeType===8?e.parentNode:e}remove(){this.dispose()}dispose(){super.dispose();let e=this.insertBefore;e&&this.parentNodeTarget===e.parentNode&&!this.adoptedInsertBefore&&this.parentNodeTarget.removeChild(e),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let n of this.subscriptionsForNode.values())n.forEach(i=>i.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(e){let r="added";return typeof possibleIteratable=="object"&&posibleIterable!==null&&Symbol.iterator in e&&(e=[...e]),Array.isArray(e)?e.map((n,i)=>({index:i,status:r,value:n})):[{status:r,index:0,value:e}]}observableArrayChange(e){let r=[],n=[];for(let i in e){let s=e[i];s.status==="added"?r.push([s.index,s.value]):n.unshift([s.index,s.value])}n.forEach(i=>this.delChange(...i)),r.forEach(i=>this.addChange(...i))}addChange(e,r){this.nodeArrayOrObservableAtIndex.splice(e,0,this.injectNode(r,this.lastNodeFor(e)))}injectNode(e,r){let n;if(S(e)){let{parentNode:i,xmlns:s}=this;n=[new _e(e,i,r,s,this.noInitialBinding)]}else if(typeof e!="string"&&io(e)){n=[];for(let i of e)n.unshift(this.injectNode(i,r))}else{let i=Ne(this.parentNode),s="content"in this.parentNode,o=i&&!s&&!this.noInitialBinding;Array.isArray(e)?n=e.map(u=>this.anyToNode(u)):n=[this.anyToNode(e)];for(let u of n)this.parentNodeTarget.insertBefore(u,r),o&&this.canApplyBindings(u)&&Ft(i,u)}return n}canApplyBindings(e){return e.nodeType===1||e.nodeType===8}delChange(e){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[e]),this.nodeArrayOrObservableAtIndex.splice(e,1)}getSubscriptionsForNode(e){if(!this.subscriptionsForNode.has(e)){let r=[];return this.subscriptionsForNode.set(e,r),r}return this.subscriptionsForNode.get(e)}isJsx(e){return typeof e.elementName=="string"&&"children"in e&&"attributes"in e}anyToNode(e){if(en(e))return this.futureJsxNode(e);switch(typeof e){case"object":if(e instanceof Error)return this.createComment(e.toString());if(e===null)return this.createComment(String(e));if(e instanceof Node)return this.cloneJSXorMoveNode(e);if(Symbol.iterator in e)return e;break;case"function":return this.anyToNode(e());case"undefined":case"symbol":return this.createComment(String(e));case"string":return this.createTextNode(e);case"boolean":case"number":case"bigint":default:return this.createTextNode(String(e))}return this.isJsx(e)?this.jsxToNode(e):this.createComment(ai(e))}createComment(e){let r=document.createComment(e);return r[me]=!0,r}createTextNode(e){let r=document.createTextNode(e);return r[me]=!0,r}cloneJSXorMoveNode(e){return It in e?this.jsxToNode(e[It]):e}jsxToNode(e){let r=e.attributes.xmlns||Qr[e.elementName]||this.xmlns,n=document.createElementNS(r||Qr.html,e.elementName);return n[It]=e,S(e.attributes)&&this.getSubscriptionsForNode(n).push(e.attributes.subscribe(s=>{this.updateAttributes(n,f(s))})),this.updateAttributes(n,f(e.attributes)),this.addDisposable(new _e(e.children,n,null,r,this.noInitialBinding)),n}futureJsxNode(e){let r=F();e.then(r).catch(i=>r(i instanceof Error?i:Error(i)));let n=new _e(r,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(n),n.insertBefore}updateAttributes(e,r){let n=this.getSubscriptionsForNode(e),i=new Set([...e.attributes].map(s=>s.name));for(let[s,o]of Object.entries(r||{}))i.delete(s),S(o)&&n.push(o.subscribe(u=>this.setNodeAttribute(e,s,o))),this.setNodeAttribute(e,s,o);for(let s of i)this.setNodeAttribute(e,s,void 0)}getNamespaceOfAttribute(e){let[r,...n]=e.split(":");return r==="xmlns"||n.length&&Qr[r]?Qr[r]:null}setNodeAttribute(e,r,n){let i=f(n);if(je.addValueToNode(e,r,n),i===void 0)e.removeAttributeNS(null,r);else if(en(n))Promise.resolve(n).then(s=>this.setNodeAttribute(e,r,s));else{let s=this.getNamespaceOfAttribute(r);e.setAttributeNS(s,r,String(i))}}lastNodeFor(e){let r=this.nodeArrayOrObservableAtIndex[e]||[],[n]=r.slice(-1),i=n instanceof _e?n.insertBefore:n||this.insertBefore;return i&&i.parentNode?i:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:e}=this;for(;e.length;)this.removeNodeArrayOrObservable(e.pop())}removeNodeArrayOrObservable(e){for(let r of e){if(r instanceof _e){r.dispose();continue}let n=r;delete n[It],this.detachAndDispose(n);let i=this.subscriptionsForNode.get(n);i&&(i.forEach(s=>s.dispose()),this.subscriptionsForNode.delete(n))}}detachAndDispose(e){if(io(e))for(let r of e)this.detachAndDispose(r);else e.remove();ro(e)}},lr=_e;function Zn(t){if(S(t))return!0;let e=f(t);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function ei(t){return t[It]}var zu=Symbol("JSX Fragment");var Xu=0,cr=class extends Ze{constructor(e){super(e),this.originalChildNodes=le(v.childNodes(this.$element)),this.computed("computeApplyComponent")}cloneTemplateIntoElement(e,r,n){if(!r)throw new Error("Component '"+e+"' has no template");if(Zn(r))v.emptyNode(n),this.addDisposable(new lr(r,n,null,void 0,!0));else{let i=De(r);v.setDomNodeChildren(n,i)}}createViewModel(e,r,n,i){let s=e.createViewModel;return s?s.call(e,i,{element:r,templateNodes:n}):i}makeTemplateSlotNodes(e){return Object.assign({},...this.genSlotsByName(e))}*genSlotsByName(e){for(let r of e){if(r.nodeType!==1)continue;let n=r.getAttribute("slot");!n||(yield{[n]:r})}}computeApplyComponent(){let e=f(this.value),r,n;if(typeof e=="string"?r=e:(r=f(e.name),n=je.getNodeValues(this.$element)||f(e.params)),this.latestComponentName=r,!r)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++Xu,rt.get(r,i=>this.applyComponentDefinition(r,n,i))}makeChildBindingContext(e){let r=n=>Object.assign(n,{$component:e,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(e,void 0,r)}applyComponentDefinition(e,r,n){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==e)return;this.cleanUpState();let i=this.$element;if(!n)throw new Error("Unknown component '"+e+"'");n.template&&this.cloneTemplateIntoElement(e,n.template,i);let s=this.createViewModel(n,i,this.originalChildNodes,r);this.childBindingContext=this.makeChildBindingContext(s);let o=s&&s.template;if(!o&&!n.template)throw new Error("Component '"+e+"' has no template");n.template||this.cloneTemplateIntoElement(e,o,i),s instanceof G&&s.anchorTo(this.$element),this.currentViewModel=s;let u=this.onBindingComplete.bind(this,s);this.applyBindingsToDescendants(this.childBindingContext,u)}onBindingComplete(e,r){e&&e.koDescendantsComplete&&e.koDescendantsComplete(this.$element),this.completeBinding(r)}cleanUpState(){let e=this.currentViewModel,r=e&&e.dispose;typeof r=="function"&&r.call(e),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var dr=class extends Ze{constructor(...e){super(...e);let r=this.getSlot(this.value),n=Ne(r),i=this.$context.extend({$slotContext:n,$slotData:n&&n.$data});this.replaceSlotWithNode(this.$element,r),this.applyBindingsToDescendants(i)}replaceSlotWithNode(e,r){let n=this.cloneNodeFromOriginal(r);v.emptyNode(e),this.addDisposable(new lr(n,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let r=ei(e);return r?r.children:"content"in e?[...document.importNode(e.content,!0).childNodes]:(Array.isArray(e)?e:[e]).map(i=>i.cloneNode(!0))}getSlot(e){let{$componentTemplateSlotNodes:r}=this.$context;return e?r[e]:r[""]||[...this.$context.$componentTemplateNodes].filter(n=>!n.getAttribute||!n.getAttribute("slot"))}static get allowVirtualElements(){return!0}};var so={component:cr,slot:dr};var Kr=String.prototype,ke={};ke.uppercase=function(t){return Kr.toUpperCase.call(f(t))};ke.lowercase=function(t){return Kr.toLowerCase.call(f(t))};ke.default=function(t,e){return t=f(t),typeof t=="function"?t:typeof t=="string"?Kr.trim.call(t)===""?e:t:t==null||t.length==0?e:t};ke.replace=function(t,e,r){return Kr.replace.call(f(t),e,r)};ke.fit=function(t,e,r,n){if(t=f(t),e&&(""+t).length>e)switch(r=""+(r||"..."),e=e-r.length,t=""+t,n){case"left":return r+t.slice(-e);case"middle":var i=Math.ceil(e/2);return t.substr(0,i)+r+t.slice(i-e);default:return t.substr(0,e)+r}else return t};ke.json=function(t,e,r){return JSON.stringify(yt(t),r,e)};ke.number=function(t){return(+f(t)).toLocaleString()};var Zu=/\bfunction\s*\(([^)]*)\)\s*\{\s*(?:(return\s)?([^}]+?)[;\s]*)?\}/g;function fr(t){return t.replace(Zu,(e,r,n,i)=>{i&&!n&&(i+=" && undefined");let s=`(${r.trim()}) => ${i}`;return fr.silent||console.log(`Knockout: Replace "${e}" with "${s}"`),s})}var oo=new Nt,ea={preProcessBindings:t=>oo.preProcessBindings(t)},ta=new Zt({filters:ke,provider:new kt({providers:[new Tt,oo,new St,new _t]}),bindings:[Zs,Ns,eo,so,{each:to.foreach}],options:{bindingGlobals:c.global,bindingStringPreparsers:[fr]}}),ra="4.0.0-beta1.0",na=ta.create({version:ra,components:rt,Component:rt.ComponentABC,expressionRewriting:ea});return ho(ia);})();
|
|
15
|
+
`),tt[t]=e}function On(t){return Y(tt,t)}function ks(t){delete tt[t],he.clearCachedDefinition(t)}var Pn={getConfig:function(t,e){var r=Y(tt,t)?tt[t]:null;e(r)},loadComponent:function(t,e,r){var n=_n(t);In(n,e,function(i){Lu(t,n,i,r)})},loadTemplate:function(t,e,r){Hu(_n(t),e,r)},loadViewModel:function(t,e,r){Is(_n(t),e,r)}},kn="createViewModel";function Lu(t,e,r,n){var i={},s=2,o=function(){--s===0&&n(i)},u=r.template,a=r.viewModel;u?In(e,u,function(l){he._getFirstResultFromLoaders("loadTemplate",[t,l],function(d){i.template=d,o()})}):o(),a?In(e,a,function(l){he._getFirstResultFromLoaders("loadViewModel",[t,l],function(d){i[kn]=d,o()})}):o()}function Hu(t,e,r){if(typeof e=="string")r(be(e));else if(e instanceof Array)r(e);else if(nn(e))r(le(e.childNodes));else if(e.element){var n=e.element;if(pi(n))r(_s(n));else if(typeof n=="string"){var i=document.getElementById(n);i?r(_s(i)):t("Cannot find element with ID "+n)}else t("Unknown element type: "+n)}else e.elementName?r(e):t("Unknown template value: "+e)}function Is(t,e,r){if(e[$r])r((...i)=>e[$r](...i));else if(typeof e=="function")r(function(i){return new e(i)});else if(typeof e[kn]=="function")r(e[kn]);else if("instance"in e){var n=e.instance;r(function(){return n})}else"viewModel"in e?Is(t,e.viewModel,r):t("Unknown viewModel value: "+e)}function _s(t){switch(O(t)){case"script":return be(t.text);case"textarea":return be(t.value);case"template":if(nn(t.content))return De(t.content.childNodes)}return De(t.childNodes)}function In(t,e,r){typeof e.require=="string"?window.amdRequire||window.require?(window.amdRequire||window.require)([e.require],r):t("Uses require, but no AMD loader is present"):r(e)}function _n(t){return function(e){throw new Error("Component '"+t+"': "+e)}}he.loaders.push(Pn);var Hr=class extends G{static get customElementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}static get template(){if(!("template"in this.prototype))return{element:this.element}}static get element(){throw new Error("[ComponentABC] `element` must be overloaded.")}static get sync(){return!0}static[$r](e,r){return new this(e,r)}static register(e=this.customElementName){let r=this,{template:n}=this,i=this.sync;Lr(e,{viewModel:r,template:n,synchronous:i})}};var rt={ComponentABC:Hr,get:he.get,clearCachedDefinition:he.clearCachedDefinition,register:Lr,isRegistered:On,unregister:ks,defaultLoader:Pn,_allRegisteredComponents:tt,get loaders(){return he.loaders},set loaders(t){he.loaders=t}};var Tt=class extends q{get FOR_NODE_TYPES(){return[1]}preprocessNode(e){if(e.tagName==="SLOT"){let r=e.parentNode,n=e.getAttribute("name")||"",i=document.createComment(`ko slot: "${n}"`),s=document.createComment("/ko");return r.insertBefore(i,e),r.insertBefore(s,e),r.removeChild(e),[i,s]}}nodeHasBindings(e){return Boolean(this.getComponentNameForNode(e))}getBindingAccessors(e,r){let n=this.getComponentNameForNode(e);return n?{component:()=>({name:n,params:this.getComponentParams(e,r)})}:void 0}getComponentNameForNode(e){if(e.nodeType!==e.ELEMENT_NODE)return;let r=O(e);if(rt.isRegistered(r)){let n=r.includes("-"),i=""+e=="[object HTMLUnknownElement]";if(n||i)return r}}getComponentParams(e,r){let n=new Me(e,r,this.globals),i=(e.getAttribute("params")||"").trim(),s=n.parse(i,r,e);if(!s||Object.keys(s).length===0)return{$raw:{}};let o=ge(s,a=>B(a,null,{disposeWhenNodeIsRemoved:e})),u=ge(o,a=>this.makeParamValue(e,a));return Object.assign({$raw:o},u)}makeParamValue(e,r){let n=r.peek();if(!r.isActive())return n;let i=te(n);return B({read:()=>f(r()),write:i?s=>r()(s):null,disposeWhenNodeIsRemoved:e})}};var _t=class extends q{get FOR_NODE_TYPES(){return[1]}get PREFIX(){return"ko-"}getBindingAttributesList(e){return e.hasAttributes()?Array.from(e.attributes).filter(r=>r.name.startsWith(this.PREFIX)):[]}nodeHasBindings(e){return this.getBindingAttributesList(e).length>0}getBindingAccessors(e,r){return Object.assign({},...this.handlersFromAttributes(e,r))}*handlersFromAttributes(e,r){for(let n of this.getBindingAttributesList(e))yield{[n.name.substr(this.PREFIX.length)]:()=>this.getValue(n.value,r,e)}}getValue(e,r,n){if(!e)return;let i=r.$data;switch(e){case"$element":return n;case"$context":return r;case"this":case"$data":return r.$data}if(i instanceof Object&&e in i)return i[e];if(e in r)return r[e];if(e in this.globals)return this.globals[e];throw new Error(`The variable '${e} not found.`)}};var kt=class extends q{get FOR_NODE_TYPES(){return this.nodeTypes}constructor(e={}){super(e);let r=e.providers||[];this.nodeTypeMap={},this.nodeTypes=[],this.providers=[],r.forEach(n=>this.addProvider(n))}setGlobals(e){[this,...this.providers].forEach(r=>r.globals=e)}addProvider(e){this.providers.push(e),e.bindingHandlers=this.bindingHandlers,e.globals=this.globals;let r=this.nodeTypeMap;for(let n of e.FOR_NODE_TYPES)r[n]||(r[n]=[]),r[n].push(e);this.nodeTypes=Object.keys(this.nodeTypeMap).map(n=>parseInt(n,10))}providersFor(e){return this.nodeTypeMap[e.nodeType]||[]}nodeHasBindings(e){return this.providersFor(e).some(r=>r.nodeHasBindings(e))}preprocessNode(e){for(let r of this.providersFor(e)){let n=r.preprocessNode(e);if(n)return n}}*enumerateProviderBindings(e,r){for(let n of this.providersFor(e)){let i=n.getBindingAccessors(e,r);if(!!i&&(yield*Object.entries(i||{}),n.preemptive))return}}getBindingAccessors(e,r){let n={};for(let[i,s]of this.enumerateProviderBindings(e,r)){if(i in n)throw new Error(`The binding "${i}" is duplicated by multiple providers`);n[i]=s}return n}};var Os={update:function(t,e,r){var n=f(e())||{};I(n,function(i,s){s=f(s);var o=i.indexOf(":"),u=o>0&&t.lookupNamespaceURI(i.substr(0,o));let a=s===!1||s===null||s===void 0;a?u?t.removeAttributeNS(u,i):t.removeAttribute(i):(s=s.toString(),u?t.setAttributeNS(u,i,s):t.setAttribute(i,s)),i==="name"&&Cr(t,a?"":s)})}};var Ps={after:["value","attr"],init:function(t,e,r){var n=we(function(){if(r.has("checkedValue"))return f(r.get("checkedValue"));if(m)return r.has("value")?f(r.get("value")):t.value});function i(){var p=t.checked,A=n();if(!C.isInitial()&&!(!p&&(u||C.getDependenciesCount()))){var x=C.ignore(e);if(l){var h=d?x.peek():x,N=g;g=A,N!==A?(p&&(Oe(h,A,!0),Oe(h,N,!1)),g=A):Oe(h,A,p),d&&te(x)&&x(h)}else o&&(A===void 0?A=p:p||(A=void 0)),e(A,{onlyIfChanged:!0})}}function s(){var p=p=f(e()),A=n();l?(t.checked=W(p,A)>=0,g=A):o&&A===void 0?t.checked=!!p:t.checked=n()===p}var o=t.type=="checkbox",u=t.type=="radio";if(!(!o&&!u)){var a=e(),l=o&&f(a)instanceof Array,d=!(l&&a.push&&a.splice),m=u||l,g=l?n():void 0;B(i,null,{disposeWhenNodeIsRemoved:t}),Q(t,"click",i),B(s,null,{disposeWhenNodeIsRemoved:t}),a=void 0}}},Vs={update:function(t,e){t.value=f(e())}};function Ms(t){return{init:function(e,r,n,i,s){var o=function(){var u={};return u[t]=r(),u};jr.init.call(this,e,o,n,i,s)}}}function Rs(t){return typeof t=="function"?{handler:t}:t||{}}var jr={init:function(t,e,r,n,i){var s=e()||{};I(s,function(o,u){let{passive:a,capture:l,once:d,debounce:m,throttle:g}=Rs(u),p=(l||a||d)&&{capture:l,passive:a,once:d},A=(x,...h)=>{var N;let{handler:P,passive:b,bubble:w,preventDefault:M}=Rs(e()[o]);try{if(P){let V=i.$data,ne=[V,x,...h];N=P.apply(V,ne)}}finally{M!==void 0?f(M)&&x.preventDefault():N!==!0&&(b||x.preventDefault())}let U=r.get(o+"Bubble")!==!1;(w===!1||!U)&&(x.cancelBubble=!0,x.stopPropagation&&x.stopPropagation())};m&&(A=vr(A,m)),g&&(A=gr(A,g)),Q(t,o,A,p||!1)})}},$s={init:jr.init,preprocess:function(t,e,r){r(e.replace("on.",""),"=>"+t)}};var Ls=Ms("click");var rr={aliases:["class"],update:function(t,e){var r=f(e());r!==null&&typeof r=="object"?I(r,function(n,i){i=f(i),dt(t,n,i)}):(r=Ue(String(r||"")),dt(t,t[rr.classesWrittenByBindingKey],!1),t[rr.classesWrittenByBindingKey]=r,dt(t,r,!0))},classesWrittenByBindingKey:z("__ko__cssValue")};var nr=class extends ee{onDescendantsComplete(){typeof this.value=="function"&&this.value(this.$element)}static get allowVirtualElements(){return!0}};var Vn={update:function(t,e){var r=f(e());r&&t.disabled?t.removeAttribute("disabled"):!r&&!t.disabled&&(t.disabled=!0)}},Hs={update:function(t,e){Vn.update(t,function(){return!f(e())})}};var Rn=z("__ko_hasfocusUpdating"),Mn=z("__ko_hasfocusLastValue"),$n={init:function(t,e){var r=function(s){t[Rn]=!0;var o=t.ownerDocument;if("activeElement"in o){var u;try{u=o.activeElement}catch(a){u=o.body}s=u===t}e(s,{onlyIfChanged:!0}),t[Mn]=s,t[Rn]=!1},n=r.bind(null,!0),i=r.bind(null,!1);Q(t,"focus",n),Q(t,"focusin",n),Q(t,"blur",i),Q(t,"focusout",i)},update:function(t,e){var r=!!f(e());!t[Rn]&&t[Mn]!==r&&(r?t.focus():t.blur(),!r&&t[Mn]&&t.ownerDocument.body.focus(),C.ignore(Ke,null,[t,r?"focusin":"focusout"]))}};var js={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){ht(t,e())},allowVirtualElements:!0};var Ws={init:function(t,e,r,n,i){var s=i.extend(e);return ue(s,t),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Ln={},Us={init:function(t){if(O(t)!=="select")throw new Error("options binding applies only to SELECT elements");for(;t.length>0;)t.remove(0);return{controlsDescendantBindings:!0}},update:function(t,e,r){function n(){return We(t.options,function(b){return b.selected})}var i=t.length==0,s=t.multiple,o=!i&&s?t.scrollTop:null,u=f(e()),a=r.get("valueAllowUnset")&&r.has("value"),l=r.get("optionsIncludeDestroyed"),d={},m,g,p=[];a||(s?p=ut(n(),T.readValue):t.selectedIndex>=0&&p.push(T.readValue(t.options[t.selectedIndex]))),u&&(typeof u.length=="undefined"&&(u=[u]),g=We(u,function(b){return l||b===void 0||b===null||!f(b._destroy)}),r.has("optionsCaption")&&(m=f(r.get("optionsCaption")),m!=null&&g.unshift(Ln)));function A(b,w,M){var U=typeof w;return U==="function"?w(b):U=="string"?b[w]:M}var x=!1;function h(b,w,M){M.length&&(p=!a&&M[0].selected?[T.readValue(M[0])]:[],x=!0);var U=t.ownerDocument.createElement("option");if(b===Ln)Je(U,r.get("optionsCaption")),T.writeValue(U,void 0);else{var V=A(b,r.get("optionsValue"),b);T.writeValue(U,f(V));var ne=A(b,r.get("optionsText"),V);Je(U,ne)}return[U]}d.beforeRemove=function(b){t.removeChild(b)};function N(b,w){if(x&&a)T.writeValue(t,f(r.get("value")),!0);else if(p.length){var M=W(p,T.readValue(w[0]))>=0;xr(w[0],M),x&&!M&&C.ignore(Ke,null,[t,"change"])}}var P=N;r.has("optionsAfterRender")&&typeof r.get("optionsAfterRender")=="function"&&(P=function(b,w){N(b,w),C.ignore(r.get("optionsAfterRender"),null,[w[0],b!==Ln?b:void 0])}),Bt(t,g,h,d,P),C.ignore(function(){if(a)T.writeValue(t,f(r.get("value")),!0);else{var b;s?b=p.length&&n().length<p.length:b=p.length&&t.selectedIndex>=0?T.readValue(t.options[t.selectedIndex])!==p[0]:p.length||t.selectedIndex>=0,b&&Ke(t,"change")}}),xi(t),o&&Math.abs(o-t.scrollTop)>20&&(t.scrollTop=o)}};var Qs={after:["options","foreach"],init:function(t,e,r){Q(t,"change",function(){var n=e(),i=[];k(t.getElementsByTagName("option"),function(s){s.selected&&i.push(T.readValue(s))}),e(i)})},update:function(t,e){if(O(t)!="select")throw new Error("values binding applies only to SELECT elements");var r=f(e()),n=t.scrollTop;r&&typeof r.length=="number"&&k(t.getElementsByTagName("option"),function(i){var s=W(r,T.readValue(i))>=0;i.selected!=s&&xr(i,s)}),t.scrollTop=n}};var{jQueryInstance:Ks}=c,qs={update:function(t,e){var r=f(e()||{});I(r,function(n,i){if(i=f(i),(i==null||i===!1)&&(i=""),Ks)Ks(t).css(n,i);else{n=n.replace(/-(\w)/g,(o,u)=>u.toUpperCase());let s=t.style[n];t.style[n]=i,i!==s&&t.style[n]===s&&!isNaN(i)&&(t.style[n]=i+"px")}})}};var Js={init:function(t,e,r,n,i){if(typeof e()!="function")throw new Error("The value for a submit binding must be a function");Q(t,"submit",function(s){var o,u=e();try{o=u.call(i.$data,t)}finally{o!==!0&&(s.preventDefault?s.preventDefault():s.returnValue=!1)}})}};var Gs={init:function(){return{controlsDescendantBindings:!0}},update:function(t,e){Je(t,e())},allowVirtualElements:!0};var Ys,Hn,jn,nt=class extends ee{get aliases(){return"textinput"}constructor(...e){super(...e),this.previousElementValue=this.$element.value,c.debug&&this.constructor._forceUpdateOn&&k(this.constructor._forceUpdateOn,r=>{r.slice(0,5)==="after"?this.addEventListener(r.slice(5),"deferUpdateModel"):this.addEventListener(r,"updateModel")});for(let r of this.eventsIndicatingSyncValueChange())this.addEventListener(r,"updateModel");for(let r of this.eventsIndicatingDeferValueChange())this.addEventListener(r,"deferUpdateModel");this.computed("updateView")}eventsIndicatingSyncValueChange(){return["input","change","blur"]}eventsIndicatingDeferValueChange(){return[]}updateModel(e){let r=this.$element;clearTimeout(this.timeoutHandle),this.elementValueBeforeEvent=this.timeoutHandle=void 0;let n=r.value;this.previousElementValue!==n&&(c.debug&&e&&(r._ko_textInputProcessedEvent=e.type),this.previousElementValue=n,this.value=n)}deferUpdateModel(e){let r=this.$element;if(!this.timeoutHandle){this.elementValueBeforeEvent=r.value;let n=c.debug?this.updateModel.bind(this,{type:e.type}):this.updateModel;this.timeoutHandle=ce(n,4)}}updateView(){let e=f(this.value);e==null&&(e=""),this.elementValueBeforeEvent!==void 0&&e===this.elementValueBeforeEvent?setTimeout(this.updateView.bind(this),4):this.$element.value!==e&&(this.previousElementValue=e,this.$element.value=e,this.previousElementValue=this.$element.value)}},sr=class extends nt{constructor(...e){super(...e),R<11&&this.addEventListener("propertychange",r=>r.propertyName==="value"&&this.updateModel(r)),R>=8&&R<10&&(this.watchForSelectionChangeEvent(),this.addEventListener("dragend","deferUpdateModel"))}eventsIndicatingSyncValueChange(){return[...super.eventsIndicatingValueChange(),"keypress"]}selectionChangeHandler(e){let r=this.activeElement,n=r&&y.get(r,selectionChangeHandlerName);n&&n(e)}watchForSelectionChangeEvent(e,r){let n=e.ownerDocument;y.get(n,selectionChangeRegisteredName)||(y.set(n,selectionChangeRegisteredName,!0),Q(n,"selectionchange",this.selectionChangeHandler.bind(n))),y.set(e,selectionChangeHandlerName,handler)}},Wn=class extends sr{updateModel(...e){this.deferUpdateModel(...e)}},Un=class extends sr{eventsIndicatingValueChange(){return[...super.eventsIndicatingValueChange(),"keyup","keydown"]}},Qn=class extends nt{eventsIndicatingDeferValueChange(){return["keydown","paste","cut"]}},Kn=class extends nt{eventsIndicatingDeferValueChange(){return["keydown"]}},qn=class extends nt{eventsIndicatingValueChange(){return[...super.eventsIndicatingSyncValueChange(),"DOMAutoComplete","dragdrop","drop"]}},ir=c.global;if(ir.navigator){let t=n=>n&&parseFloat(n[1]),e=ir.navigator.userAgent,r=e.match(/Chrome\/([^ ]+)/);Ys=ir.opera&&ir.opera.version&&parseInt(ir.opera.version()),Hn=t(e.match(/Version\/([^ ]+) Safari/)),jn=t(e.match(/Firefox\/([^ ]*)/))}var Jn=R===8?Un:R===9?Wn:R?sr:Hn&&Hn<5?Qn:Ys<11?Kn:jn&&jn<4?qn:nt;var Gn={init:function(t,e){if(e()){var r="ko_unique_"+ ++Gn.currentIndex;Cr(t,r)}},currentIndex:0};var Wr=class extends ee{static get after(){return["options","foreach","template"]}constructor(...e){if(super(...e),this.isCheckboxOrRadio){Xt(this.$element,{checkedValue:this.valueAccessor});return}this.propertyChangedFired=!1,this.elementValueBeforeEvent=null,this.ieAutoCompleteHackNeeded&&(this.addEventListener("propertyChange",()=>this.propertyChangedFired=!0),this.addEventListener("focus",()=>this.propertyChangedFired=!1),this.addEventListener("blur",()=>this.propertyChangeFired&&this.valueUpdateHandler())),k(this.eventsToCatch,r=>this.registerEvent(r)),this.isInput&&this.$element.type==="file"?this.updateFromModel=this.updateFromModelForFile:this.updateFromModel=this.updateFromModelForValue,this.computed("updateFromModel")}get eventsToCatch(){let e=this.allBindings.get("valueUpdate"),r=typeof e=="string"?[e]:e||[];return[...new Set(["change",...r])]}get isInput(){return O(this.$element)==="input"}get isCheckboxOrRadio(){let e=this.$element;return this.isInput&&(e.type=="checkbox"||e.type=="radio")}get ieAutoCompleteHackNeeded(){return R&&isInputElement&&this.$element.type=="text"&&this.$element.autocomplete!="off"&&(!this.$element.form||this.$element.form.autocomplete!="off")}valueUpdateHandler(){this.elementValueBeforeEvent=null,this.propertyChangedFired=!1,this.value=T.readValue(this.$element)}registerEvent(e){var r=this.valueUpdateHandler.bind(this);li(e,"after")&&(r=()=>{this.elementValueBeforeEvent=T.readValue(this.$element),ce(this.valueUpdateHandler.bind(this),0)},e=e.substring(5)),this.addEventListener(e,r)}updateFromModelForFile(){var e=f(this.value);e==null||e===""?this.$element.value="":C.ignore(this.valueUpdateHandler,this)}updateFromModelForValue(){let e=this.$element;var r=f(this.value),n=T.readValue(e);if(this.elementValueBeforeEvent!==null&&r===this.elementValueBeforeEvent){ce(this.updateFromModel.bind(this),0);return}if(!(r===n&&n!==void 0))if(O(e)==="select"){let i=this.allBindings.get("valueAllowUnset");T.writeValue(e,r,i),!i&&r!==T.readValue(e)&&C.ignore(this.valueUpdateHandler,this)}else T.writeValue(e,r)}};var Yn={update:function(t,e){var r=f(e()),n=t.style.display!=="none";r&&!n?t.style.display="":!r&&n&&(t.style.display="none")}},zs={update:function(t,e){Yn.update.call(this,t,()=>!f(e()))}};var Xs={init:function(t,e,r,n,i){var s=i.createChildContext(e);return ue(s,t),{controlsDescendantBindings:!0}},allowVirtualElements:!0};var Zs={attr:Os,checked:Ps,checkedValue:Vs,click:Ls,css:rr,class:rr,descendantsComplete:nr,enable:Vn,event:jr,disable:Hs,hasfocus:$n,hasFocus:$n,hidden:zs,html:js,let:Ws,on:$s,options:Us,selectedOptions:Qs,style:qs,submit:Js,text:Gs,textInput:Jn,textinput:Jn,uniqueName:Gn,using:Xs,value:Wr,visible:Yn};var ju=(t,e,r)=>new Promise((n,i)=>{var s=a=>{try{u(r.next(a))}catch(l){i(l)}},o=a=>{try{u(r.throw(a))}catch(l){i(l)}},u=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,o);u((r=r.apply(t,e)).next())}),it=class extends re{constructor(e){super(e),this.hasElse=this.detectElse(this.$element);let r=this.completesElseChain=F();y.set(this.$element,"conditional",{elseChainSatisfied:r})}getIfElseNodes(){if(this.ifElseNodes)return this.ifElseNodes;if(C.getDependenciesCount()||this.hasElse)return this.cloneIfElseNodes(this.$element,this.hasElse)}render(){let e=!this.ifElseNodes,{shouldDisplay:r}=this.renderStatus();if(this.ifElseNodes=this.getIfElseNodes()||{},r){let n=e&&!this.hasElse;this.renderAndApplyBindings(this.ifElseNodes.ifNodes,n)}else this.hasElse?this.renderAndApplyBindings(this.ifElseNodes.elseNodes):v.emptyNode(this.$element)}renderAndApplyBindings(e,r){return ju(this,null,function*(){r||v.setDomNodeChildren(this.$element,De(e));let n=yield ue(this.bindingContext,this.$element);this.completeBinding(n)})}get elseChainIsAlreadySatisfied(){return!1}isElseNode(e){return e.nodeType===8&&e.nodeValue.trim().toLowerCase()==="else"}detectElse(e){for(var r=v.childNodes(e),n=0,i=r.length;n<i;++n)if(this.isElseNode(r[n]))return!0;return!1}cloneIfElseNodes(e,r){let n=v.childNodes(e),i=[],s=[],o=i;for(var u=0,a=n.length;u<a;++u)r&&this.isElseNode(n[u])?(o=s,r=!1):o.push(X(n[u].cloneNode(!0)));return{ifNodes:i,elseNodes:s}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var st=class extends it{constructor(...e){super(...e),this.ifCondition=this.computed(()=>!!f(this.value)),this.computed("render")}shouldDisplayIf(){return this.ifCondition()}get bindingContext(){return this.ifCondition.isActive()?this.$context.extend(()=>(this.ifCondition(),null)):this.$context}renderStatus(){let e=this.shouldDisplayIf();return this.elseChainIsAlreadySatisfied?(e=!1,this.completesElseChain(!0)):this.completesElseChain(e),{shouldDisplay:e}}},or=class extends st{shouldDisplayIf(){return!super.shouldDisplayIf()}};var Ur=class extends it{constructor(...e){super(...e),this.asOption=this.allBindings.get("as");let r=this.asOption&&!c.createChildContextWithAs?()=>Boolean(f(this.value)):()=>f(this.value);this.conditional=this.computed(r),this.computed("render")}get bindingContext(){return this.asOption?c.createChildContextWithAs?this.$context.createChildContext(this.value,this.asOption):this.$context.extend({[this.asOption]:this.value}):this.$context.createChildContext(this.valueAccessor)}renderStatus(){return{shouldDisplay:Boolean(this.conditional())}}};var ur=class extends st{shouldDisplayIf(){return super.shouldDisplayIf()||this.value===void 0}get elseChainIsAlreadySatisfied(){return this._elseChain||(this._elseChain=this.readElseChain()),f(this._elseChain.elseChainSatisfied)}readElseChain(){let e=this.$element;do e=e.previousSibling;while(e&&e.nodeType!==1&&e.nodeType!==8);return e?(e.nodeType===8&&(e=v.previousSibling(e)),y.get(e,"conditional")||{}):!1}};var eo={if:st,with:Ur,ifnot:or,unless:or,else:ur,elseif:ur};var Wu=9007199254740991;function Uu(t){return!!t&&typeof t=="object"&&t.constructor===Object}var Qu=c.document&&typeof c.document.createDocumentFragment=="function";function Ku(t){var e=document.createElement("div"),r;return t.content?r=t.content:t.tagName==="SCRIPT"?(r=document.createElement("div"),r.innerHTML=t.text):r=t,k(v.childNodes(r),function(n){n&&e.insertBefore(n.cloneNode(!0),null)}),e}function qu(t,e){return{status:"added",value:t,index:e}}var ar=z("_ko_ffe_pending_delete_index"),Te=class extends re{constructor(e){super(e);let r={};Uu(this.value)&&Object.assign(r,this.value),this.as=r.as||this.allBindings.get("as"),this.data=r.data||(f(this.$context.$rawData)===this.value?this.$context.$rawData:this.value),this.container=v.isStartComment(this.$element)?this.$element.parentNode:this.$element,this.generateContext=this.createContextGenerator(this.as),this.$indexHasBeenRequested=!1,this.templateNode=Ku(r.templateNode||(r.name?document.getElementById(r.name).cloneNode(!0):this.$element)),["afterAdd","beforeRemove","afterQueueFlush","beforeQueueFlush"].forEach(i=>{this[i]=r[i]||this.allBindings.get(i)}),this.changeQueue=[],this.firstLastNodesList=[],this.indexesToDelete=[],this.rendering_queued=!1,this.pendingDeletes=[],this.isNotEmpty=F(Boolean(f(this.data).length)),y.set(this.$element,"conditional",{elseChainSatisfied:this.isNotEmpty}),v.emptyNode(this.$element);let n=f(this.data);n&&n.map?this.onArrayChange(n.map(qu),!0):this.completeBinding(),S(this.data)&&(this.data.indexOf||(this.data=this.data.extend({trackArrayChanges:!0})),this.changeSubs=this.data.subscribe(this.onArrayChange,this,"arrayChange"))}dispose(){this.changeSubs&&this.changeSubs.dispose(),this.flushPendingDeletes()}onArrayChange(e,r){for(var n={added:[],deleted:[]},i=0,s=e.length;i<s;i++){if(n.added.length&&e[i].status==="added"){var o=n.added[n.added.length-1],u=o.isBatch?o.index+o.values.length-1:o.index;if(u+1===e[i].index){o.isBatch||(o={isBatch:!0,status:"added",index:o.index,values:[o.value]},n.added.splice(n.added.length-1,1,o)),o.values.push(e[i].value);continue}}n[e[i].status].push(e[i])}n.deleted.length>0&&(this.changeQueue.push.apply(this.changeQueue,n.deleted),this.changeQueue.push({status:"clearDeletedIndexes"})),this.changeQueue.push.apply(this.changeQueue,n.added),this.changeQueue.length>0&&!this.rendering_queued&&(this.rendering_queued=!0,r?this.processQueue():Te.animateFrame.call(window,()=>this.processQueue()))}startQueueFlush(){typeof this.beforeQueueFlush=="function"&&this.beforeQueueFlush(this.changeQueue)}endQueueFlush(){typeof this.afterQueueFlush=="function"&&this.afterQueueFlush(this.changeQueue)}processQueue(){var e=!f(this.data).length,r=Wu;this.startQueueFlush(),k(this.changeQueue,n=>{typeof n.index=="number"&&(r=Math.min(r,n.index)),this[n.status](n)}),this.flushPendingDeletes(),this.rendering_queued=!1,this.$indexHasBeenRequested&&this.updateIndexes(r),this.endQueueFlush(),this.changeQueue=[],e!==!this.isNotEmpty()&&this.isNotEmpty(!e)}_first$indexRequest(e){this.$indexHasBeenRequested=!0;for(let r=0,n=this.firstLastNodesList.length;r<n;++r){let i=this.getContextStartingFrom(this.firstLastNodesList[r].first);i&&(i.$index=F(r))}return e.$index()}_contextExtensions(e){return Object.assign(e,{$list:this.data}),this.$indexHasBeenRequested?e.$index=e.$index||F():Object.defineProperty(e,"$index",{value:()=>this._first$indexRequest(e),configurable:!0,writable:!0}),e}createContextGenerator(e){let r=this.$context;return e?n=>this._contextExtensions(r.extend({[e]:n})):n=>r.createChildContext(n,null,i=>this._contextExtensions(i))}updateFirstLastNodesList(e,r){let n=r[0],i=r[r.length-1];this.firstLastNodesList.splice(e,0,{first:n,last:i})}added(e){var r=e.index,n=e.isBatch?e.values:[e.value],i=this.getLastNodeBeforeIndex(r);let s=[],o=[];for(var u,a=0,l=n.length;a<l;++a){var d=this.getPendingDeleteFor(n[a]);if(d&&d.nodesets.length)u=d.nodesets.pop(),this.updateFirstLastNodesList(r+a,u);else{var m=this.templateNode.cloneNode(!0);u=v.childNodes(m),this.updateFirstLastNodesList(r+a,u);let g=ue(this.generateContext(n[a]),m);o.push(g)}s.push(...u)}typeof this.afterAdd=="function"?this.afterAdd({nodeOrArrayInserted:this.insertAllAfter(s,i),foreachInstance:this}):this.insertAllAfter(s,i),this.completeBinding(Promise.all(o))}getNodesForIndex(e){let r=[],n=this.firstLastNodesList[e].first,i=this.firstLastNodesList[e].last;for(r.push(n);n&&n!==i;)n=n.nextSibling,r.push(n);return r}getLastNodeBeforeIndex(e){return e<1||e-1>=this.firstLastNodesList.length?null:this.firstLastNodesList[e-1].last}activeChildElement(e){var r=document.activeElement;if(rn(r,e))return r}insertAllAfter(e,r){let n,i,s,o=null,u=this.$element;if(e.nodeType===void 0&&e.length===void 0)throw new Error("Expected a single node or a node array");if(e.nodeType!==void 0)return o=this.activeChildElement(e),v.insertAfter(u,e,r),[e];if(e.length===1)o=this.activeChildElement(e[0]),v.insertAfter(u,e[0],r);else if(Qu){for(n=document.createDocumentFragment(),s=0,i=e.length;s!==i;++s)o=o||this.activeChildElement(e[s]),n.appendChild(e[s]);v.insertAfter(u,n,r)}else for(s=e.length-1;s>=0;--s){o=o||this.activeChildElement(e[s]);var a=e[s];if(!a)break;v.insertAfter(u,a,r)}return o&&o.focus(),e}shouldDelayDeletion(e){return e&&(typeof e=="object"||typeof e=="function")}getPendingDeleteFor(e){var r=e&&e[ar];return r===void 0?null:this.pendingDeletes[r]}getOrCreatePendingDeleteFor(e){var r=this.getPendingDeleteFor(e);return r||(r={data:e,nodesets:[]},e[ar]=this.pendingDeletes.length,this.pendingDeletes.push(r),r)}deleted(e){this.shouldDelayDeletion(e.value)?this.getOrCreatePendingDeleteFor(e.value).nodesets.push(this.getNodesForIndex(e.index)):this.removeNodes(this.getNodesForIndex(e.index)),this.indexesToDelete.push(e.index)}removeNodes(e){if(!e.length)return;function r(){for(var i=e[0].parentNode,s=e.length-1;s>=0;--s)X(e[s]),i.removeChild(e[s])}if(this.beforeRemove){var n=this.beforeRemove({nodesToRemove:e,foreachInstance:this})||{};typeof n.then=="function"&&n.then(r,c.onError)}else r()}flushPendingDeletes(){for(let r=0,n=this.pendingDeletes.length;r!==n;++r){for(var e=this.pendingDeletes[r];e.nodesets.length;)this.removeNodes(e.nodesets.pop());e.data&&e.data[ar]!==void 0&&delete e.data[ar]}this.pendingDeletes=[]}clearDeletedIndexes(){for(let e=this.indexesToDelete.length-1;e>=0;--e)this.firstLastNodesList.splice(this.indexesToDelete[e],1);this.indexesToDelete=[]}updateIndexes(e){let r;for(let n=e,i=this.firstLastNodesList.length;n<i;++n)r=this.getContextStartingFrom(this.firstLastNodesList[n].first),r&&r.$index(n)}getContextStartingFrom(e){let r;for(;e;){if(r=Ne(e),r)return r;e=e.nextSibling}}static setSync(e){let r=c.global;e?Te.animateFrame=function(n){n()}:Te.animateFrame=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(n){return r.setTimeout(n,1e3/60)}}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}static get ForEach(){return this}static get PENDING_DELETE_INDEX_SYM(){return ar}};var to={foreach:Te};Te.setSync(!1);var me=Symbol("Knockout native bindings"),je=class extends q{get FOR_NODE_TYPES(){return[1,3]}get preemptive(){return!0}nodeHasBindings(e){return e[me]?Object.keys(e[me]||{}).some(r=>r.startsWith("ko-")):!1}preprocessNode(e){return e[me]?e:null}onlyBindings([e]){return e.startsWith("ko-")}valueAsAccessor([e,r]){let n=e.replace(/^ko-/,""),i=S(r)?r:()=>r;return{[n]:i}}getBindingAccessors(e){let r=Object.entries(e[me]||{}).filter(this.onlyBindings);return r.length?Object.assign({},...r.map(this.valueAsAccessor)):null}static addValueToNode(e,r,n){let i=e[me]||(e[me]={});i[r]=n}static getNodeValues(e){return e[me]}};var Ju=25,Gu=1e3,Xn=[],zn=null;function ro(t){Xn.push(t),no()}function no(){!zn&&Xn.length&&(zn=setTimeout(Yu,Ju))}function Yu(){zn=null;let t=Xn.splice(0,Gu);for(let e of t)X(e);no()}var It=Symbol("Knockout - Original JSX"),Qr={svg:"http://www.w3.org/2000/svg",html:"http://www.w3.org/1999/xhtml",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function io(t){return t&&typeof t[Symbol.iterator]=="function"}var _e=class extends G{constructor(e,r,n=null,i,s){super();let o=r.nodeType===8,u=this.getParentTarget(r);if(S(e))if(e.extend({trackArrayChanges:!0}),this.subscribe(e,this.observableArrayChange,"arrayChange"),n)this.adoptedInsertBefore=!0;else{let d=o?r.nextSibling:null;n=this.createComment("O"),u.insertBefore(n,d)}o&&!n&&(n=r.nextSibling,this.adoptedInsertBefore=!0),this.anchorTo(n||r),Object.assign(this,{insertBefore:n,noInitialBinding:s,parentNode:r,parentNodeTarget:u,xmlns:i,nodeArrayOrObservableAtIndex:[],subscriptionsForNode:new Map});let a=f(e);(Ct(e)||a!=null)&&this.observableArrayChange(this.createInitialAdditions(a)),this.noInitialBinding=!1}getParentTarget(e){return"content"in e?e.content:e.nodeType===8?e.parentNode:e}remove(){this.dispose()}dispose(){super.dispose();let e=this.insertBefore;e&&this.parentNodeTarget===e.parentNode&&!this.adoptedInsertBefore&&this.parentNodeTarget.removeChild(e),this.removeAllPriorNodes(),Object.assign(this,{parentNode:null,parentNodeTarget:null,insertBefore:null,nodeArrayOrObservableAtIndex:[]});for(let n of this.subscriptionsForNode.values())n.forEach(i=>i.dispose());this.subscriptionsForNode.clear()}createInitialAdditions(e){let r="added";return typeof possibleIteratable=="object"&&posibleIterable!==null&&Symbol.iterator in e&&(e=[...e]),Array.isArray(e)?e.map((n,i)=>({index:i,status:r,value:n})):[{status:r,index:0,value:e}]}observableArrayChange(e){let r=[],n=[];for(let i in e){let s=e[i];s.status==="added"?r.push([s.index,s.value]):n.unshift([s.index,s.value])}n.forEach(i=>this.delChange(...i)),r.forEach(i=>this.addChange(...i))}addChange(e,r){this.nodeArrayOrObservableAtIndex.splice(e,0,this.injectNode(r,this.lastNodeFor(e)))}injectNode(e,r){let n;if(S(e)){let{parentNode:i,xmlns:s}=this;n=[new _e(e,i,r,s,this.noInitialBinding)]}else if(typeof e!="string"&&io(e)){n=[];for(let i of e)n.unshift(this.injectNode(i,r))}else{let i=Ne(this.parentNode),s="content"in this.parentNode,o=i&&!s&&!this.noInitialBinding;Array.isArray(e)?n=e.map(u=>this.anyToNode(u)):n=[this.anyToNode(e)];for(let u of n)this.parentNodeTarget.insertBefore(u,r),o&&this.canApplyBindings(u)&&Ft(i,u)}return n}canApplyBindings(e){return e.nodeType===1||e.nodeType===8}delChange(e){this.removeNodeArrayOrObservable(this.nodeArrayOrObservableAtIndex[e]),this.nodeArrayOrObservableAtIndex.splice(e,1)}getSubscriptionsForNode(e){if(!this.subscriptionsForNode.has(e)){let r=[];return this.subscriptionsForNode.set(e,r),r}return this.subscriptionsForNode.get(e)}isJsx(e){return typeof e.elementName=="string"&&"children"in e&&"attributes"in e}anyToNode(e){if(en(e))return this.futureJsxNode(e);switch(typeof e){case"object":if(e instanceof Error)return this.createComment(e.toString());if(e===null)return this.createComment(String(e));if(e instanceof Node)return this.cloneJSXorMoveNode(e);if(Symbol.iterator in e)return e;break;case"function":return this.anyToNode(e());case"undefined":case"symbol":return this.createComment(String(e));case"string":return this.createTextNode(e);case"boolean":case"number":case"bigint":default:return this.createTextNode(String(e))}return this.isJsx(e)?this.jsxToNode(e):this.createComment(ai(e))}createComment(e){let r=document.createComment(e);return r[me]=!0,r}createTextNode(e){let r=document.createTextNode(e);return r[me]=!0,r}cloneJSXorMoveNode(e){return It in e?this.jsxToNode(e[It]):e}jsxToNode(e){let r=e.attributes.xmlns||Qr[e.elementName]||this.xmlns,n=document.createElementNS(r||Qr.html,e.elementName);return n[It]=e,S(e.attributes)&&this.getSubscriptionsForNode(n).push(e.attributes.subscribe(s=>{this.updateAttributes(n,f(s))})),this.updateAttributes(n,f(e.attributes)),this.addDisposable(new _e(e.children,n,null,r,this.noInitialBinding)),n}futureJsxNode(e){let r=F();e.then(r).catch(i=>r(i instanceof Error?i:Error(i)));let n=new _e(r,this.parentNode,null,this.xmlns,this.noInitialBinding);return this.addDisposable(n),n.insertBefore}updateAttributes(e,r){let n=this.getSubscriptionsForNode(e),i=new Set([...e.attributes].map(s=>s.name));for(let[s,o]of Object.entries(r||{}))i.delete(s),S(o)&&n.push(o.subscribe(u=>this.setNodeAttribute(e,s,o))),this.setNodeAttribute(e,s,o);for(let s of i)this.setNodeAttribute(e,s,void 0)}getNamespaceOfAttribute(e){let[r,...n]=e.split(":");return r==="xmlns"||n.length&&Qr[r]?Qr[r]:null}setNodeAttribute(e,r,n){let i=f(n);if(je.addValueToNode(e,r,n),i===void 0)e.removeAttributeNS(null,r);else if(en(n))Promise.resolve(n).then(s=>this.setNodeAttribute(e,r,s));else{let s=this.getNamespaceOfAttribute(r);e.setAttributeNS(s,r,String(i))}}lastNodeFor(e){let r=this.nodeArrayOrObservableAtIndex[e]||[],[n]=r.slice(-1),i=n instanceof _e?n.insertBefore:n||this.insertBefore;return i&&i.parentNode?i:null}removeAllPriorNodes(){let{nodeArrayOrObservableAtIndex:e}=this;for(;e.length;)this.removeNodeArrayOrObservable(e.pop())}removeNodeArrayOrObservable(e){for(let r of e){if(r instanceof _e){r.dispose();continue}let n=r;delete n[It],this.detachAndDispose(n);let i=this.subscriptionsForNode.get(n);i&&(i.forEach(s=>s.dispose()),this.subscriptionsForNode.delete(n))}}detachAndDispose(e){if(io(e))for(let r of e)this.detachAndDispose(r);else e.remove();ro(e)}},lr=_e;function Zn(t){if(S(t))return!0;let e=f(t);return e?e.elementName?!0:!(!Array.isArray(e)||!e.length||e[0]instanceof window.Node):!1}function ei(t){return t[It]}var zu=Symbol("JSX Fragment");var Xu=0,cr=class extends Ze{constructor(e){super(e),this.originalChildNodes=le(v.childNodes(this.$element)),this.computed("computeApplyComponent")}cloneTemplateIntoElement(e,r,n){if(!r)throw new Error("Component '"+e+"' has no template");if(Zn(r))v.emptyNode(n),this.addDisposable(new lr(r,n,null,void 0,!0));else{let i=De(r);v.setDomNodeChildren(n,i)}}createViewModel(e,r,n,i){let s=e.createViewModel;return s?s.call(e,i,{element:r,templateNodes:n}):i}makeTemplateSlotNodes(e){return Object.assign({},...this.genSlotsByName(e))}*genSlotsByName(e){for(let r of e){if(r.nodeType!==1)continue;let n=r.getAttribute("slot");!n||(yield{[n]:r})}}computeApplyComponent(){let e=f(this.value),r,n;if(typeof e=="string"?r=e:(r=f(e.name),n=je.getNodeValues(this.$element)||f(e.params)),this.latestComponentName=r,!r)throw new Error("No component name specified");this.loadingOperationId=this.currentLoadingOperationId=++Xu,rt.get(r,i=>this.applyComponentDefinition(r,n,i))}makeChildBindingContext(e){let r=n=>Object.assign(n,{$component:e,$componentTemplateNodes:this.originalChildNodes,$componentTemplateSlotNodes:this.makeTemplateSlotNodes(this.originalChildNodes)});return this.$context.createChildContext(e,void 0,r)}applyComponentDefinition(e,r,n){if(this.currentLoadingOperationId!==this.loadingOperationId||this.latestComponentName!==e)return;this.cleanUpState();let i=this.$element;if(!n)throw new Error("Unknown component '"+e+"'");n.template&&this.cloneTemplateIntoElement(e,n.template,i);let s=this.createViewModel(n,i,this.originalChildNodes,r);this.childBindingContext=this.makeChildBindingContext(s);let o=s&&s.template;if(!o&&!n.template)throw new Error("Component '"+e+"' has no template");n.template||this.cloneTemplateIntoElement(e,o,i),s instanceof G&&s.anchorTo(this.$element),this.currentViewModel=s;let u=this.onBindingComplete.bind(this,s);this.applyBindingsToDescendants(this.childBindingContext,u)}onBindingComplete(e,r){e&&e.koDescendantsComplete&&e.koDescendantsComplete(this.$element),this.completeBinding(r)}cleanUpState(){let e=this.currentViewModel,r=e&&e.dispose;typeof r=="function"&&r.call(e),this.currentViewModel=null,this.currentLoadingOperationId=null}dispose(){this.cleanUpState(),super.dispose()}get controlsDescendants(){return!0}static get allowVirtualElements(){return!0}};var dr=class extends Ze{constructor(...e){super(...e);let r=this.getSlot(this.value),n=Ne(r),i=this.$context.extend({$slotContext:n,$slotData:n&&n.$data});this.replaceSlotWithNode(this.$element,r),this.applyBindingsToDescendants(i)}replaceSlotWithNode(e,r){let n=this.cloneNodeFromOriginal(r);v.emptyNode(e),this.addDisposable(new lr(n,e,void 0,void 0,!0))}cloneNodeFromOriginal(e){if(!e)return[];let r=ei(e);return r?r.children:"content"in e?[...document.importNode(e.content,!0).childNodes]:(Array.isArray(e)?e:[e]).map(i=>i.cloneNode(!0))}getSlot(e){let{$componentTemplateSlotNodes:r}=this.$context;return e?r[e]:r[""]||[...this.$context.$componentTemplateNodes].filter(n=>!n.getAttribute||!n.getAttribute("slot"))}static get allowVirtualElements(){return!0}};var so={component:cr,slot:dr};var Kr=String.prototype,ke={};ke.uppercase=function(t){return Kr.toUpperCase.call(f(t))};ke.lowercase=function(t){return Kr.toLowerCase.call(f(t))};ke.default=function(t,e){return t=f(t),typeof t=="function"?t:typeof t=="string"?Kr.trim.call(t)===""?e:t:t==null||t.length==0?e:t};ke.replace=function(t,e,r){return Kr.replace.call(f(t),e,r)};ke.fit=function(t,e,r,n){if(t=f(t),e&&(""+t).length>e)switch(r=""+(r||"..."),e=e-r.length,t=""+t,n){case"left":return r+t.slice(-e);case"middle":var i=Math.ceil(e/2);return t.substr(0,i)+r+t.slice(i-e);default:return t.substr(0,e)+r}else return t};ke.json=function(t,e,r){return JSON.stringify(yt(t),r,e)};ke.number=function(t){return(+f(t)).toLocaleString()};var Zu=/\bfunction\s*\(([^)]*)\)\s*\{\s*(?:(return\s)?([^}]+?)[;\s]*)?\}/g;function fr(t){return t.replace(Zu,(e,r,n,i)=>{i&&!n&&(i+=" && undefined");let s=`(${r.trim()}) => ${i}`;return fr.silent||console.log(`Knockout: Replace "${e}" with "${s}"`),s})}var oo=new Nt,ea={preProcessBindings:t=>oo.preProcessBindings(t)},ta=new Zt({filters:ke,provider:new kt({providers:[new Tt,oo,new St,new _t]}),bindings:[Zs,Ns,eo,so,{each:to.foreach}],options:{bindingGlobals:c.global,bindingStringPreparsers:[fr]}}),ra="4.0.0-beta1.2",na=ta.create({version:ra,components:rt,Component:rt.ComponentABC,expressionRewriting:ea});return ho(ia);})();
|
|
16
16
|
(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global).ko = ko.default
|
package/dist/common.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.0-beta1.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.2 ESM
|
|
2
2
|
module.exports = require("./index").default;
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.0-beta1.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.2 CommonJS
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -7879,7 +7879,7 @@ var builder = new Builder({
|
|
|
7879
7879
|
bindingStringPreparsers: [functionRewrite]
|
|
7880
7880
|
}
|
|
7881
7881
|
});
|
|
7882
|
-
var version = "4.0.0-beta1.
|
|
7882
|
+
var version = "4.0.0-beta1.2";
|
|
7883
7883
|
var src_default = builder.create({
|
|
7884
7884
|
version,
|
|
7885
7885
|
components: dist_default,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.0-beta1.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.2 ESM
|
|
2
2
|
import { Builder } from "@tko/builder";
|
|
3
3
|
import { VirtualProvider } from "@tko/provider.virtual";
|
|
4
4
|
import { DataBindProvider } from "@tko/provider.databind";
|
|
@@ -40,7 +40,7 @@ const builder = new Builder({
|
|
|
40
40
|
bindingStringPreparsers: [functionRewrite]
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
const version = "4.0.0-beta1.
|
|
43
|
+
const version = "4.0.0-beta1.2";
|
|
44
44
|
export default builder.create({
|
|
45
45
|
version,
|
|
46
46
|
components,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @tko/build.knockout 🥊 4.0.0-beta1.
|
|
1
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.2 MJS
|
|
2
2
|
import { Builder } from "@tko/builder";
|
|
3
3
|
import { VirtualProvider } from "@tko/provider.virtual";
|
|
4
4
|
import { DataBindProvider } from "@tko/provider.databind";
|
|
@@ -40,7 +40,7 @@ const builder = new Builder({
|
|
|
40
40
|
bindingStringPreparsers: [functionRewrite]
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
const version = "4.0.0-beta1.
|
|
43
|
+
const version = "4.0.0-beta1.2";
|
|
44
44
|
export default builder.create({
|
|
45
45
|
version,
|
|
46
46
|
components,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.0-beta1.
|
|
2
|
+
"version": "4.0.0-beta1.2",
|
|
3
3
|
"name": "@tko/build.knockout",
|
|
4
4
|
"description": "Knockout makes it easier to create rich, responsive UIs with JavaScript",
|
|
5
5
|
"homepage": "https://tko.io",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
},
|
|
71
71
|
"./helpers/*": "./helpers/*"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "13c815606b51efef73ce40a056677f0fd7e3f1af"
|
|
74
74
|
}
|