Files
2026-06-17 22:43:38 +01:00

33 lines
1.3 MiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Skipped minification because the original files appears to be already minified.
* Original file: /npm/vanilla-jsoneditor@0.19.0/index.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var e,t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,A,P,T,R,N,I,D,z,L,B,q,F,V,W,H,U,J,K,G,Q,Y,X,Z,ee,te,ne,re,ie,oe,ae,se,ce,le,ue,fe,de,he,ve,pe,me,ge,ye,be,we,ke,xe,je,Se,Ce,$e,_e,Oe,Me,Ee,Ae,Pe,Te,Re,Ne,Ie,De,ze,Le,Be,qe,Fe,Ve,We,He,Ue,Je,Ke,Ge,Qe,Ye,Xe,Ze,et,tt,nt,rt,it,ot,at,st,ct,lt,ut,ft,dt,ht,vt,pt,mt,gt,yt,bt,wt,kt,xt,jt,St,Ct,$t,_t,Ot,Mt,Et,At,Pt,Tt,Rt,Nt,It,Dt,zt,Lt,Bt,qt,Ft,Vt,Wt,Ht,Ut,Jt,Kt,Gt,Qt,Yt,Xt,Zt,en,tn,nn,rn,on,an,sn,cn,ln,un,fn,dn,hn,vn,pn,mn,gn,yn,bn,wn,kn,xn,jn,Sn,Cn,$n,_n,On,Mn,En,An,Pn,Tn,Rn,Nn,In,Dn,zn,Ln,Bn,qn,Fn,Vn,Wn,Hn,Un,Jn,Kn,Gn,Qn,Yn,Xn,Zn,er,tr,nr,rr,ir,or,ar,sr,cr,lr,ur,fr,dr,hr,vr,pr,mr,gr,yr,br,wr,kr,xr,jr,Sr,Cr,$r,_r,Or,Mr,Er,Ar,Pr,Tr,Rr,Nr,Ir,Dr,zr,Lr,Br,qr,Fr,Vr,Wr,Hr,Ur,Jr,Kr,Gr,Qr,Yr,Xr,Zr,ei,ti,ni,ri,ii,oi,ai,si,ci,li,ui,fi,di,hi=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],vi=["mainAxis","crossAxis","limiter"];function pi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function mi(){return mi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Pi(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mi.apply(this,arguments)}function gi(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=qi(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function bi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new E(r||[]);return i(a,"_invoke",{value:$(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="suspendedYield",v="executing",p="completed",m={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(A([])));x&&x!==n&&r.call(x,a)&&(w=x);var j=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Wi(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function $(t,n,r){var i=d;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var l=f(t,n,r);if("normal"===l.type){if(i=r.done?p:h,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=p,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Wi(t)+" is not iterable")}return y.prototype=b,i(j,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(j),e},t.awrap=function(e){return{__await:e}},S(C.prototype),l(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function wi(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function ki(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){wi(o,r,i,a,s,"next",e)}function s(e){wi(o,r,i,a,s,"throw",e)}a(void 0)}))}}function xi(e,t){return Si(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||qi(e,t)||ji()}function ji(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Si(e){if(Array.isArray(e))return e}function Ci(e){var t="function"==typeof Map?new Map:void 0;return Ci=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return $i(e,arguments,Pi(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Oi(n,e)},Ci(e)}function $i(e,t,n){return $i=Ai()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Oi(i,n.prototype),i},$i.apply(null,arguments)}function _i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oi(e,t)}function Oi(e,t){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oi(e,t)}function Mi(e){var t=Ai();return function(){var n,r=Pi(e);if(t){var i=Pi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ei(e)}(this,n)}}function Ei(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Pi(e){return Pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pi(e)}function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ti(Object(n),!0).forEach((function(t){zi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ni(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ii(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Li(r.key),r)}}function Di(e,t,n){return t&&Ii(e.prototype,t),n&&Ii(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zi(e,t,n){return(t=Li(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Li(e){var t=function(e,t){if("object"!==Wi(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Wi(t)?t:String(t)}function Bi(e){return function(e){if(Array.isArray(e))return Vi(e)}(e)||Fi(e)||qi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qi(e,t){if(e){if("string"==typeof e)return Vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vi(e,t):void 0}}function Fi(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e){return Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wi(e)}function Hi(){}var Ui=function(e){return e};function Ji(e,t){for(var n in t)e[n]=t[n];return e}function Ki(e){return e()}function Gi(){return Object.create(null)}function Qi(e){e.forEach(Ki)}function Yi(e){return"function"==typeof e}function Xi(e,t){return e!=e?t==t:e!==t||e&&"object"===Wi(e)||"function"==typeof e}function Zi(e,t){return e!=e?t==t:e!==t}function eo(e,t,n,r){if(e){var i=to(e,t,n,r);return e[0](i)}}function to(e,t,n,r){return e[1]&&r?Ji(n.ctx.slice(),e[1](r(t))):n.ctx}function no(e,t,n,r){if(e[2]&&r){var i=e[2](r(n));if(void 0===t.dirty)return i;if("object"===Wi(i)){for(var o=[],a=Math.max(t.dirty.length,i.length),s=0;s<a;s+=1)o[s]=t.dirty[s]|i[s];return o}return t.dirty|i}return t.dirty}function ro(e,t,n,r,i,o){if(i){var a=to(t,n,r,o);e.p(a,i)}}function io(e){if(e.ctx.length>32){for(var t=[],n=e.ctx.length/32,r=0;r<n;r++)t[r]=-1;return t}return-1}function oo(e){var t={};for(var n in e)"$"!==n[0]&&(t[n]=e[n]);return t}function ao(e,t){var n={};for(var r in t=new Set(t),e)t.has(r)||"$"===r[0]||(n[r]=e[r]);return n}function so(e){return null==e?"":e}function co(e){return e&&Yi(e.destroy)?e.destroy:Hi}var lo="undefined"!=typeof window,uo=lo?function(){return window.performance.now()}:function(){return Date.now()},fo=lo?function(e){return requestAnimationFrame(e)}:Hi,ho=new Set;function vo(e){ho.forEach((function(t){t.c(e)||(ho.delete(t),t.f())})),0!==ho.size&&fo(vo)}var po="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function mo(e,t){e.appendChild(t)}function go(e,t,n){var r=yo(e);if(!r.getElementById(t)){var i=So("style");i.id=t,i.textContent=n,wo(r,i)}}function yo(e){if(!e)return document;var t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function bo(e){var t=So("style");return t.textContent="/* empty */",wo(yo(e),t),t.sheet}function wo(e,t){return mo(e.head||e,t),t.sheet}function ko(e,t,n){e.insertBefore(t,n||null)}function xo(e){e.parentNode&&e.parentNode.removeChild(e)}function jo(e,t){for(var n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function So(e){return document.createElement(e)}function Co(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function $o(e){return document.createTextNode(e)}function _o(){return $o(" ")}function Oo(){return $o("")}function Mo(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function Eo(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Ao(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function Po(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}var To=["width","height"];function Ro(e,t){var n=Object.getOwnPropertyDescriptors(e.__proto__);for(var r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set&&-1===To.indexOf(r)?e[r]=t[r]:Po(e,r,t[r])}function No(e,t){for(var n in t)Po(e,n,t[n])}function Io(e,t){t=""+t,e.data!==t&&(e.data=t)}function Do(e,t){e.value=null==t?"":t}function zo(e,t,n,r){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function Lo(e,t,n){for(var r=0;r<e.options.length;r+=1){var i=e.options[r];if(i.__value===t)return void(i.selected=!0)}n&&void 0===t||(e.selectedIndex=-1)}function Bo(e,t,n){e.classList.toggle(t,!!n)}function qo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.bubbles,i=void 0!==r&&r,o=n.cancelable;return new CustomEvent(e,{detail:t,bubbles:i,cancelable:void 0!==o&&o})}function Fo(e,t){return new e(t)}var Vo,Wo=new Map,Ho=0;function Uo(e,t,n,r,i,o,a){for(var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,c=16.666/r,l="{\n",u=0;u<=1;u+=c){var f=t+(n-t)*o(u);l+=100*u+"%{".concat(a(f,1-f),"}\n")}var d=l+"100% {".concat(a(n,1-n),"}\n}"),h="__svelte_".concat(function(e){for(var t=5381,n=e.length;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d),"_").concat(s),v=yo(e),p=Wo.get(v)||function(e,t){var n={stylesheet:bo(t),rules:{}};return Wo.set(e,n),n}(v,e),m=p.stylesheet,g=p.rules;g[h]||(g[h]=!0,m.insertRule("@keyframes ".concat(h," ").concat(d),m.cssRules.length));var y=e.style.animation||"";return e.style.animation="".concat(y?"".concat(y,", "):"").concat(h," ").concat(r,"ms linear ").concat(i,"ms 1 both"),Ho+=1,h}function Jo(e,t){var n=(e.style.animation||"").split(", "),r=n.filter(t?function(e){return e.indexOf(t)<0}:function(e){return-1===e.indexOf("__svelte")}),i=n.length-r.length;i&&(e.style.animation=r.join(", "),(Ho-=i)||fo((function(){Ho||(Wo.forEach((function(e){var t=e.stylesheet.ownerNode;t&&xo(t)})),Wo.clear())})))}function Ko(e){Vo=e}function Go(){if(!Vo)throw new Error("Function called outside component initialization");return Vo}function Qo(e){Go().$$.on_mount.push(e)}function Yo(e){Go().$$.on_destroy.push(e)}function Xo(){var e=Go();return function(t,n){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,i=void 0!==r&&r,o=e.$$.callbacks[t];if(o){var a=qo(t,n,{cancelable:i});return o.slice().forEach((function(t){t.call(e,a)})),!a.defaultPrevented}return!0}}function Zo(e,t){return Go().$$.context.set(e,t),t}function ea(e){return Go().$$.context.get(e)}function ta(e,t){var n=this,r=e.$$.callbacks[t.type];r&&r.slice().forEach((function(e){return e.call(n,t)}))}var na=[],ra=[],ia=[],oa=[],aa=Promise.resolve(),sa=!1;function ca(){sa||(sa=!0,aa.then(pa))}function la(){return ca(),aa}function ua(e){ia.push(e)}function fa(e){oa.push(e)}var da,ha=new Set,va=0;function pa(){if(0===va){var e=Vo;do{try{for(;va<na.length;){var t=na[va];va++,Ko(t),ma(t.$$)}}catch(e){throw na.length=0,va=0,e}for(Ko(null),na.length=0,va=0;ra.length;)ra.pop()();for(var n=0;n<ia.length;n+=1){var r=ia[n];ha.has(r)||(ha.add(r),r())}ia.length=0}while(na.length);for(;oa.length;)oa.pop()();sa=!1,ha.clear(),Ko(e)}}function ma(e){if(null!==e.fragment){e.update(),Qi(e.before_update);var t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ua)}}function ga(e,t,n){e.dispatchEvent(qo("".concat(t?"intro":"outro").concat(n)))}var ya,ba=new Set;function wa(){ya={r:0,c:[],p:ya}}function ka(){ya.r||Qi(ya.c),ya=ya.p}function xa(e,t){e&&e.i&&(ba.delete(e),e.i(t))}function ja(e,t,n,r){if(e&&e.o){if(ba.has(e))return;ba.add(e),ya.c.push((function(){ba.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}var Sa={duration:0};function Ca(e,t,n,r){var i,o=t(e,n,{direction:"both"}),a=r?0:1,s=null,c=null,l=null;function u(){l&&Jo(e,l)}function f(e,t){var n=e.b-a;return t*=Math.abs(n),{a:a,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function d(t){var n,r=o||Sa,d=r.delay,h=void 0===d?0:d,v=r.duration,p=void 0===v?300:v,m=r.easing,g=void 0===m?Ui:m,y=r.tick,b=void 0===y?Hi:y,w=r.css,k={start:uo()+h,b:t};t||(k.group=ya,ya.r+=1),"inert"in e&&(t?void 0!==i&&(e.inert=i):(i=e.inert,e.inert=!0)),s||c?c=k:(w&&(u(),l=Uo(e,a,t,p,h,g,w)),t&&b(0,1),s=f(k,p),ua((function(){return ga(e,t,"start")})),n=function(t){if(c&&t>c.start&&(s=f(c,p),c=null,ga(e,s.b,"start"),w&&(u(),l=Uo(e,a,s.b,s.duration,0,g,o.css))),s)if(t>=s.end)b(a=s.b,1-a),ga(e,s.b,"end"),c||(s.b?u():--s.group.r||Qi(s.group.c)),s=null;else if(t>=s.start){var n=t-s.start;a=s.a+s.d*g(n/s.duration),b(a,1-a)}return!(!s&&!c)},0===ho.size&&fo(vo),new Promise((function(e){ho.add({c:n,f:e})})))}return{run:function(e){Yi(o)?(da||(da=Promise.resolve()).then((function(){da=null})),da).then((function(){o=o({direction:e?"in":"out"}),d(e)})):d(e)},end:function(){u(),s=c=null}}}function $a(e){return void 0!==(null==e?void 0:e.length)?e:Array.from(e)}function _a(e,t){e.d(1),t.delete(e.key)}function Oa(e,t){ja(e,1,1,(function(){t.delete(e.key)}))}function Ma(e,t,n,r,i,o,a,s,c,l,u,f){for(var d=e.length,h=o.length,v=d,p={};v--;)p[e[v].key]=v;var m=[],g=new Map,y=new Map,b=[];v=h;for(var w=function(){var e=f(i,o,v),s=n(e),c=a.get(s);c?r&&b.push((function(){return c.p(e,t)})):(c=l(s,e)).c(),g.set(s,m[v]=c),s in p&&y.set(s,Math.abs(v-p[s]))};v--;)w();var k=new Set,x=new Set;function j(e){xa(e,1),e.m(s,u),a.set(e.key,e),u=e.first,h--}for(;d&&h;){var S=m[h-1],C=e[d-1],$=S.key,_=C.key;S===C?(u=S.first,d--,h--):g.has(_)?!a.has($)||k.has($)?j(S):x.has(_)?d--:y.get($)>y.get(_)?(x.add($),j(S)):(k.add(_),d--):(c(C,a),d--)}for(;d--;){var O=e[d];g.has(O.key)||c(O,a)}for(;h;)j(m[h-1]);return Qi(b),m}function Ea(e,t){for(var n={},r={},i={$$scope:1},o=e.length;o--;){var a=e[o],s=t[o];if(s){for(var c in a)c in s||(r[c]=1);for(var l in s)i[l]||(n[l]=s[l],i[l]=1);e[o]=s}else for(var u in a)i[u]=1}for(var f in r)f in n||(n[f]=void 0);return n}function Aa(e){return"object"===Wi(e)&&null!==e?e:{}}function Pa(e,t,n){var r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Ta(e){e&&e.c()}function Ra(e,t,n){var r=e.$$,i=r.fragment,o=r.after_update;i&&i.m(t,n),ua((function(){var t,n=e.$$.on_mount.map(Ki).filter(Yi);e.$$.on_destroy?(t=e.$$.on_destroy).push.apply(t,Bi(n)):Qi(n);e.$$.on_mount=[]})),o.forEach(ua)}function Na(e,t){var n,r,i,o=e.$$;null!==o.fragment&&(n=o.after_update,r=[],i=[],ia.forEach((function(e){return-1===n.indexOf(e)?r.push(e):i.push(e)})),i.forEach((function(e){return e()})),ia=r,Qi(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function Ia(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],c=Vo;Ko(e);var l=e.$$={fragment:null,ctx:[],props:o,update:Hi,not_equal:i,bound:Gi(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Gi(),dirty:s,skip_bound:!1,root:t.target||c.$$.root};a&&a(l.root);var u=!1;if(l.ctx=n?n(e,t.props||{},(function(t,n){var r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=r)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](r),u&&function(e,t){-1===e.$$.dirty[0]&&(na.push(e),ca(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),u=!0,Qi(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){var f=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(f),f.forEach(xo)}else l.fragment&&l.fragment.c();t.intro&&xa(e.$$.fragment),Ra(e,t.target,t.anchor),pa()}Ko(c)}var Da=function(){function e(){Ni(this,e),zi(this,"$$",void 0),zi(this,"$$set",void 0)}return Di(e,[{key:"$destroy",value:function(){Na(this,1),this.$destroy=Hi}},{key:"$on",value:function(e,t){if(!Yi(t))return Hi;var n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}}},{key:"$set",value:function(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}]),e}();function za(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t=function(e){try{if("undefined"!=typeof window&&void 0!==window.localStorage)return window.localStorage[e]}catch(e){}}("debug");return null!=t&&t.endsWith("*")?e.startsWith(t.slice(0,-1)):e===t}(e);if(!t)return La;var n=function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Ba[Math.abs(t)%Ba.length]}(e);return function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];(t=console).log.apply(t,["%c".concat(e),"color:".concat(n)].concat(i))}}function La(){}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");var Ba=["#0000CC","#0099FF","#009400","#8dd200","#CCCC00","#CC9933","#ae04e7","#ff35d7","#FF3333","#FF6600","#FF9933","#FFCC33"];function qa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.delay,r=void 0===n?0:n,i=t.duration,o=void 0===i?400:i,a=t.easing,s=void 0===a?Ui:a,c=+getComputedStyle(e).opacity;return{delay:r,duration:o,easing:s,css:function(e){return"opacity: ".concat(e*c)}}}var Fa=po.window;function Va(e){go(e,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function Wa(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b=e[1].closeButton&&Ha(e),w=e[2];return w&&(a=Fo(w,{})),{c:function(){t=So("div"),n=So("div"),r=So("div"),b&&b.c(),i=_o(),o=So("div"),a&&Ta(a.$$.fragment),Po(o,"class",s=so(e[1].classContent)+" svelte-n7cvum"),Po(o,"style",e[9]),Bo(o,"content",!e[0]),Po(r,"class",c=so(e[1].classWindow)+" svelte-n7cvum"),Po(r,"role","dialog"),Po(r,"aria-modal","true"),Po(r,"aria-label",l=e[1].ariaLabelledBy?null:e[1].ariaLabel||null),Po(r,"aria-labelledby",u=e[1].ariaLabelledBy||null),Po(r,"style",e[8]),Bo(r,"window",!e[0]),Po(n,"class",d=so(e[1].classWindowWrap)+" svelte-n7cvum"),Po(n,"style",e[7]),Bo(n,"wrap",!e[0]),Po(t,"aria-hidden","true"),Po(t,"id",h=e[1].id),Po(t,"class",v=so(e[1].classBg)+" svelte-n7cvum"),Po(t,"style",e[6]),Bo(t,"bg",!e[0])},m:function(s,c){ko(s,t,c),mo(t,n),mo(n,r),b&&b.m(r,null),mo(r,i),mo(r,o),a&&Ra(a,o,null),e[50](r),e[51](n),e[52](t),m=!0,g||(y=[Mo(r,"introstart",(function(){Yi(e[13])&&e[13].apply(this,arguments)})),Mo(r,"outrostart",(function(){Yi(e[14])&&e[14].apply(this,arguments)})),Mo(r,"introend",(function(){Yi(e[15])&&e[15].apply(this,arguments)})),Mo(r,"outroend",(function(){Yi(e[16])&&e[16].apply(this,arguments)})),Mo(t,"mousedown",e[20]),Mo(t,"mouseup",e[21])],g=!0)},p:function(f,p){if((e=f)[1].closeButton?b?(b.p(e,p),2&p[0]&&xa(b,1)):((b=Ha(e)).c(),xa(b,1),b.m(r,i)):b&&(wa(),ja(b,1,1,(function(){b=null})),ka()),4&p[0]&&w!==(w=e[2])){if(a){wa();var g=a;ja(g.$$.fragment,1,0,(function(){Na(g,1)})),ka()}w?(Ta((a=Fo(w,{})).$$.fragment),xa(a.$$.fragment,1),Ra(a,o,null)):a=null}(!m||2&p[0]&&s!==(s=so(e[1].classContent)+" svelte-n7cvum"))&&Po(o,"class",s),(!m||512&p[0])&&Po(o,"style",e[9]),(!m||3&p[0])&&Bo(o,"content",!e[0]),(!m||2&p[0]&&c!==(c=so(e[1].classWindow)+" svelte-n7cvum"))&&Po(r,"class",c),(!m||2&p[0]&&l!==(l=e[1].ariaLabelledBy?null:e[1].ariaLabel||null))&&Po(r,"aria-label",l),(!m||2&p[0]&&u!==(u=e[1].ariaLabelledBy||null))&&Po(r,"aria-labelledby",u),(!m||256&p[0])&&Po(r,"style",e[8]),(!m||3&p[0])&&Bo(r,"window",!e[0]),(!m||2&p[0]&&d!==(d=so(e[1].classWindowWrap)+" svelte-n7cvum"))&&Po(n,"class",d),(!m||128&p[0])&&Po(n,"style",e[7]),(!m||3&p[0])&&Bo(n,"wrap",!e[0]),(!m||2&p[0]&&h!==(h=e[1].id))&&Po(t,"id",h),(!m||2&p[0]&&v!==(v=so(e[1].classBg)+" svelte-n7cvum"))&&Po(t,"class",v),(!m||64&p[0])&&Po(t,"style",e[6]),(!m||3&p[0])&&Bo(t,"bg",!e[0])},i:function(n){m||(xa(b),a&&xa(a.$$.fragment,n),n&&ua((function(){m&&(f||(f=Ca(r,e[12],e[1].transitionWindowProps,!0)),f.run(1))})),n&&ua((function(){m&&(p||(p=Ca(t,e[11],e[1].transitionBgProps,!0)),p.run(1))})),m=!0)},o:function(n){ja(b),a&&ja(a.$$.fragment,n),n&&(f||(f=Ca(r,e[12],e[1].transitionWindowProps,!1)),f.run(0)),n&&(p||(p=Ca(t,e[11],e[1].transitionBgProps,!1)),p.run(0)),m=!1},d:function(n){n&&xo(t),b&&b.d(),a&&Na(a),e[50](null),n&&f&&f.end(),e[51](null),e[52](null),n&&p&&p.end(),g=!1,Qi(y)}}}function Ha(e){var t,n,r,i,o,a=[Ja,Ua],s=[];function c(e,n){return 2&n[0]&&(t=null),null==t&&(t=!!e[17](e[1].closeButton)),t?0:1}return n=c(e,[-1,-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),i=Oo()},m:function(e,t){s[n].m(e,t),ko(e,i,t),o=!0},p:function(e,t){var o=n;(n=c(e,t))===o?s[n].p(e,t):(wa(),ja(s[o],1,1,(function(){s[o]=null})),ka(),(r=s[n])?r.p(e,t):(r=s[n]=a[n](e)).c(),xa(r,1),r.m(i.parentNode,i))},i:function(e){o||(xa(r),o=!0)},o:function(e){ja(r),o=!1},d:function(e){e&&xo(i),s[n].d(e)}}}function Ua(e){var t,n,r,i;return{c:function(){Po(t=So("button"),"class",n=so(e[1].classCloseButton)+" svelte-n7cvum"),Po(t,"aria-label","Close modal"),Po(t,"style",e[10]),Po(t,"type","button"),Bo(t,"close",!e[0])},m:function(n,o){ko(n,t,o),r||(i=Mo(t,"click",e[18]),r=!0)},p:function(e,r){2&r[0]&&n!==(n=so(e[1].classCloseButton)+" svelte-n7cvum")&&Po(t,"class",n),1024&r[0]&&Po(t,"style",e[10]),3&r[0]&&Bo(t,"close",!e[0])},i:Hi,o:Hi,d:function(e){e&&xo(t),r=!1,i()}}}function Ja(e){var t,n,r,i=e[1].closeButton;function o(e,t){return{props:{onClose:e[18]}}}return i&&(t=Fo(i,o(e))),{c:function(){t&&Ta(t.$$.fragment),n=Oo()},m:function(e,i){t&&Ra(t,e,i),ko(e,n,i),r=!0},p:function(e,r){if(2&r[0]&&i!==(i=e[1].closeButton)){if(t){wa();var a=t;ja(a.$$.fragment,1,0,(function(){Na(a,1)})),ka()}i?(Ta((t=Fo(i,o(e))).$$.fragment),xa(t.$$.fragment,1),Ra(t,n.parentNode,n)):t=null}},i:function(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o:function(e){t&&ja(t.$$.fragment,e),r=!1},d:function(e){e&&xo(n),t&&Na(t,e)}}}function Ka(e){var t,n,r,i,o=e[2]&&Wa(e),a=e[49].default,s=eo(a,e,e[48],null);return{c:function(){o&&o.c(),t=_o(),s&&s.c()},m:function(a,c){o&&o.m(a,c),ko(a,t,c),s&&s.m(a,c),n=!0,r||(i=Mo(Fa,"keydown",e[19]),r=!0)},p:function(e,r){e[2]?o?(o.p(e,r),4&r[0]&&xa(o,1)):((o=Wa(e)).c(),xa(o,1),o.m(t.parentNode,t)):o&&(wa(),ja(o,1,1,(function(){o=null})),ka()),s&&s.p&&(!n||131072&r[1])&&ro(s,a,e,e[48],n?no(a,e[48],r,null):io(e[48]),null)},i:function(e){n||(xa(o),xa(s,e),n=!0)},o:function(e){ja(o),ja(s,e),n=!1},d:function(e){e&&xo(t),o&&o.d(e),s&&s.d(e),r=!1,i()}}}function Ga(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){return new e(Ri(Ri({},n),{},{props:Ri(Ri({},t),n.props)}))}}function Qa(e,t,n){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y=t.$$slots,b=void 0===y?{}:y,w=t.$$scope,k=Xo(),x=Zo,j=t.isTabbable,S=void 0===j?function(e){return e.tabIndex>=0&&!e.hidden&&!e.disabled&&"none"!==e.style.display&&"hidden"!==e.type&&Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}:j,C=t.show,$=void 0===C?null:C,_=t.id,O=void 0===_?null:_,M=t.key,E=void 0===M?"simple-modal":M,A=t.ariaLabel,P=void 0===A?null:A,T=t.ariaLabelledBy,R=void 0===T?null:T,N=t.closeButton,I=void 0===N||N,D=t.closeOnEsc,z=void 0===D||D,L=t.closeOnOuterClick,B=void 0===L||L,q=t.styleBg,F=void 0===q?{}:q,V=t.styleWindowWrap,W=void 0===V?{}:V,H=t.styleWindow,U=void 0===H?{}:H,J=t.styleContent,K=void 0===J?{}:J,G=t.styleCloseButton,Q=void 0===G?{}:G,Y=t.classBg,X=void 0===Y?null:Y,Z=t.classWindowWrap,ee=void 0===Z?null:Z,te=t.classWindow,ne=void 0===te?null:te,re=t.classContent,ie=void 0===re?null:re,oe=t.classCloseButton,ae=void 0===oe?null:oe,se=t.unstyled,ce=void 0!==se&&se,le=t.setContext,ue=void 0===le?x:le,fe=t.transitionBg,de=void 0===fe?qa:fe,he=t.transitionBgProps,ve=void 0===he?{duration:250}:he,pe=t.transitionWindow,me=void 0===pe?de:pe,ge=t.transitionWindowProps,ye=void 0===ge?ve:ge,be=t.disableFocusTrap,we=void 0!==be&&be,ke={id:O,ariaLabel:P,ariaLabelledBy:R,closeButton:I,closeOnEsc:z,closeOnOuterClick:B,styleBg:F,styleWindowWrap:W,styleWindow:U,styleContent:K,styleCloseButton:Q,classBg:X,classWindowWrap:ee,classWindow:ne,classContent:ie,classCloseButton:ae,transitionBg:de,transitionBgProps:ve,transitionWindow:me,transitionWindowProps:ye,disableFocusTrap:we,isTabbable:S,unstyled:ce},xe=Ri({},ke),je=null,Se=function(e){return e?Object.keys(e).reduce((function(t,n){return"".concat(t,"; ").concat(function(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}(n),": ").concat(e[n])}),""):""},Ce=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},$e=function(){},_e=$e,Oe=$e,Me=$e,Ee=$e,Ae=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n(2,je=Ga(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),n(1,xe=Ri(Ri({},ke),t)),n(6,s=Se(Object.assign({},{width:window.innerWidth,height:window.innerHeight},xe.styleBg))),n(7,c=Se(xe.styleWindowWrap)),n(8,l=Se(xe.styleWindow)),n(9,u=Se(xe.styleContent)),n(10,f=Se(xe.styleCloseButton)),n(11,d=xe.transitionBg),n(12,h=xe.transitionWindow),Te(),n(13,_e=function(e){r.onOpen&&r.onOpen(e),k("open"),k("opening")}),n(14,Oe=function(e){r.onClose&&r.onClose(e),k("close"),k("closing")}),n(15,Me=function(e){r.onOpened&&r.onOpened(e),k("opened")}),n(16,Ee=function(e){r.onClosed&&r.onClosed(e),k("closed")})},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};je&&(n(14,Oe=e.onClose||Oe),n(16,Ee=e.onClosed||Ee),n(2,je=null),Re())},Te=function(){a=window.scrollY,v=document.body.style.position,p=document.body.style.overflow,m=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(a,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},Re=function(){document.body.style.position=v||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=m||"",window.scrollTo({top:a,left:0,behavior:"instant"})};ue(E,{open:Ae,close:Pe});var Ne=!1;return Yo((function(){Ne&&Pe()})),Qo((function(){n(47,Ne=!0)})),e.$$set=function(e){"isTabbable"in e&&n(22,S=e.isTabbable),"show"in e&&n(23,$=e.show),"id"in e&&n(24,O=e.id),"key"in e&&n(25,E=e.key),"ariaLabel"in e&&n(26,P=e.ariaLabel),"ariaLabelledBy"in e&&n(27,R=e.ariaLabelledBy),"closeButton"in e&&n(28,I=e.closeButton),"closeOnEsc"in e&&n(29,z=e.closeOnEsc),"closeOnOuterClick"in e&&n(30,B=e.closeOnOuterClick),"styleBg"in e&&n(31,F=e.styleBg),"styleWindowWrap"in e&&n(32,W=e.styleWindowWrap),"styleWindow"in e&&n(33,U=e.styleWindow),"styleContent"in e&&n(34,K=e.styleContent),"styleCloseButton"in e&&n(35,Q=e.styleCloseButton),"classBg"in e&&n(36,X=e.classBg),"classWindowWrap"in e&&n(37,ee=e.classWindowWrap),"classWindow"in e&&n(38,ne=e.classWindow),"classContent"in e&&n(39,ie=e.classContent),"classCloseButton"in e&&n(40,ae=e.classCloseButton),"unstyled"in e&&n(0,ce=e.unstyled),"setContext"in e&&n(41,ue=e.setContext),"transitionBg"in e&&n(42,de=e.transitionBg),"transitionBgProps"in e&&n(43,ve=e.transitionBgProps),"transitionWindow"in e&&n(44,me=e.transitionWindow),"transitionWindowProps"in e&&n(45,ye=e.transitionWindowProps),"disableFocusTrap"in e&&n(46,we=e.disableFocusTrap),"$$scope"in e&&n(48,w=e.$$scope)},e.$$.update=function(){8388608&e.$$.dirty[0]|65536&e.$$.dirty[1]&&Ne&&(Ce($)?Ae($):Pe())},[ce,xe,je,r,i,o,s,c,l,u,f,d,h,_e,Oe,Me,Ee,Ce,Pe,function(e){if(xe.closeOnEsc&&je&&"Escape"===e.key&&(e.preventDefault(),Pe()),je&&"Tab"===e.key&&!xe.disableFocusTrap){var t=o.querySelectorAll("*"),n=Array.from(t).filter(xe.isTabbable).sort((function(e,t){return e.tabIndex-t.tabIndex})),r=n.indexOf(document.activeElement);-1===r&&e.shiftKey&&(r=0),r+=n.length+(e.shiftKey?-1:1),n[r%=n.length].focus(),e.preventDefault()}},function(e){!xe.closeOnOuterClick||e.target!==r&&e.target!==i||(g=e.target)},function(e){xe.closeOnOuterClick&&e.target===g&&(e.preventDefault(),Pe())},S,$,O,E,P,R,I,z,B,F,W,U,K,Q,X,ee,ne,ie,ae,ue,de,ve,me,ye,we,Ne,w,b,function(e){ra[e?"unshift":"push"]((function(){n(5,o=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(4,i=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(3,r=e)}))}]}var Ya,Xa,Za,es,ts,ns,rs,is=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Qa,Ka,Xi,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},Va,[-1,-1,-1]),r}return Di(n)}();!function(e){e.text="text",e.tree="tree",e.table="table"}(Ya||(Ya={})),function(e){e.after="after",e.inside="inside",e.key="key",e.value="value",e.multi="multi",e.text="text"}(Xa||(Xa={})),function(e){e.after="after",e.key="key",e.value="value",e.inside="inside"}(Za||(Za={})),function(e){e.info="info",e.warning="warning",e.error="error"}(es||(es={})),function(e){e.key="key",e.value="value"}(ts||(ts={})),function(e){e.asc="asc",e.desc="desc"}(ns||(ns={})),function(e){e.no="no",e.self="self",e.nextInside="nextInside"}(rs||(rs={}));var os=50,as=200,ss=400,cs=1200,ls=1e3,us=100,fs=100,ds=2e4,hs=[{start:0,end:us}],vs=104857600,ps=1048576,ms=10485760,gs=10240,ys={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-container"},bs=Ri(Ri({},ys),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),ws=Ri(Ri({},ys),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),ks=Ri(Ri({},ys),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),xs="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",js="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",Ss="hover-insert-inside",Cs="hover-insert-after",$s="hover-collection",_s="valid",Os="repairable",Ms=336,Es=260,As=zi(zi({},ns.asc,"ascending"),ns.desc,"descending"),Ps=0;function Ts(){return++Ps}function Rs(e){return Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rs(e)}function Ns(e){return Array.isArray(e)}function Is(e){return null!==e&&"object"===Rs(e)&&e.constructor===Object}function Ds(e){return!(!e||"object"!==Rs(e))&&"add"===e.op}function zs(e){return!(!e||"object"!==Rs(e))&&"remove"===e.op}function Ls(e){return!(!e||"object"!==Rs(e))&&"replace"===e.op}function Bs(e){return!(!e||"object"!==Rs(e))&&"copy"===e.op}function qs(e){return!(!e||"object"!==Rs(e))&&"move"===e.op}function Fs(e){return Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fs(e)}function Vs(e,t){return e===t}function Ws(e){return e.slice(0,e.length-1)}function Hs(e){return"object"===Fs(e)&&null!==e}function Us(e){return Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Us(e)}function Js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ks(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Us(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Us(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gs(e){if(Ns(e)){var t=e.slice();return Object.getOwnPropertySymbols(e).forEach((function(n){t[n]=e[n]})),t}if(Is(e)){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Js(Object(n),!0).forEach((function(t){Ks(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return Object.getOwnPropertySymbols(e).forEach((function(t){n[t]=e[t]})),n}return e}function Qs(e,t,n){if(e[t]===n)return e;var r=Gs(e);return r[t]=n,r}function Ys(e,t){for(var n=e,r=0;r<t.length;)n=Is(n)?n[t[r]]:Ns(n)?n[parseInt(t[r])]:void 0,r++;return n}function Xs(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(0===t.length)return n;var i=t[0],o=Xs(e?e[i]:void 0,t.slice(1),n,r);if(Is(e)||Ns(e))return Qs(e,i,o);if(r){var a=Zs.test(i)?[]:{};return a[i]=o,a}throw new Error("Path does not exist")}var Zs=/^\d+$/;function ec(e,t,n){if(0===t.length)return n(e);if(!Hs(e))throw new Error("Path doesn't exist");var r=t[0];return Qs(e,r,ec(e[r],t.slice(1),n))}function tc(e,t){if(0===t.length)return e;if(!Hs(e))throw new Error("Path does not exist");if(1===t.length){var n=t[0];if(n in e){var r=Gs(e);return Ns(r)&&r.splice(parseInt(n),1),Is(r)&&delete r[n],r}return e}var i=t[0];return Qs(e,i,tc(e[i],t.slice(1)))}function nc(e,t,n){var r=t.slice(0,t.length-1),i=t[t.length-1];return ec(e,r,(function(e){if(!Array.isArray(e))throw new TypeError("Array expected at path "+JSON.stringify(r));var t=Gs(e);return t.splice(parseInt(i),0,n),t}))}function rc(e,t){return void 0!==e&&(0===t.length||null!==e&&rc(e[t[0]],t.slice(1)))}function ic(e){var t=e.split("/");return t.shift(),t.map((function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function oc(e){return e.map(ac).join("")}function ac(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}function sc(e,t){return e+ac(t)}function cc(e,t){return e.startsWith(t)&&(e.length===t.length||"/"===e[t.length])}function lc(e,t,n){for(var r=e,i=0;i<t.length;i++){gc(t[i]);var o=t[i];if(n&&n.before){var a=n.before(r,o);if(void 0!==a){if(void 0!==a.document&&(r=a.document),void 0!==a.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"');void 0!==a.operation&&(o=a.operation)}}var s=r,c=yc(r,o.path);if("add"===o.op)r=dc(r,c,o.value);else if("remove"===o.op)r=fc(r,c);else if("replace"===o.op)r=uc(r,c,o.value);else if("copy"===o.op)r=hc(r,c,bc(o.from));else if("move"===o.op)r=vc(r,c,bc(o.from));else{if("test"!==o.op)throw new Error("Unknown JSONPatch operation "+JSON.stringify(o));pc(r,c,o.value)}if(n&&n.after){var l=n.after(r,o,s);void 0!==l&&(r=l)}}return r}function uc(e,t,n){return Xs(e,t,n)}function fc(e,t){return tc(e,t)}function dc(e,t,n){return mc(e,t)?nc(e,t,n):Xs(e,t,n)}function hc(e,t,n){var r=Ys(e,n);return mc(e,t)?nc(e,t,r):Xs(e,t,Ys(e,n))}function vc(e,t,n){var r=Ys(e,n),i=tc(e,n);return mc(i,t)?nc(i,t,r):Xs(i,t,r)}function pc(e,t,n){if(void 0===n)throw new Error('Test failed: no value provided (path: "'.concat(oc(t),'")'));if(!rc(e,t))throw new Error('Test failed: path not found (path: "'.concat(oc(t),'")'));var r,i,o=Ys(e,t);if(r=o,i=n,JSON.stringify(r)!==JSON.stringify(i))throw new Error('Test failed, value differs (path: "'.concat(oc(t),'")'))}function mc(e,t){if(0===t.length)return!1;var n=Ys(e,Ws(t));return Array.isArray(n)}function gc(e){if(!["add","remove","replace","copy","move","test"].includes(e.op))throw new Error("Unknown JSONPatch op "+JSON.stringify(e.op));if("string"!=typeof e.path)throw new Error('Required property "path" missing or not a string in operation '+JSON.stringify(e));if(("copy"===e.op||"move"===e.op)&&"string"!=typeof e.from)throw new Error('Required property "from" missing or not a string in operation '+JSON.stringify(e))}function yc(e,t){return function(e,t){if("-"!==function(e){return e[e.length-1]}(t))return t;var n=Ws(t),r=Ys(e,n);return n.concat(r.length)}(e,ic(t))}function bc(e){return ic(e)}function wc(e){return function(e){if(Array.isArray(e))return kc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return kc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kc(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xc(e,t,n){var r=[];return lc(e,t,{before:function(e,t){var i,o,a=yc(e,t.path);if("add"===t.op)i=Cc(e,a);else if("remove"===t.op)i=Sc(e,a);else if("replace"===t.op)i=jc(e,a);else if("copy"===t.op)i=function(e,t){return Cc(e,t)}(e,a);else if("move"===t.op)i=function(e,t,n){if(t.length<n.length&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vs;if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(!n(e[r],t[r]))return!1;return!0}(n,t))return[{op:"replace",path:oc(t),value:e}];var r={op:"move",from:oc(t),path:oc(n)};return!mc(e,t)&&rc(e,t)?[r].concat(wc(Sc(e,t))):[r]}(e,a,bc(t.from));else{if("test"!==t.op)throw new Error("Unknown JSONPatch operation "+JSON.stringify(t));i=[]}if(n&&n.before){var s=n.before(e,t,i);if(s&&s.revertOperations&&(i=s.revertOperations),s&&s.document&&(o=s.document),s&&s.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"')}if(r=i.concat(r),void 0!==o)return{document:o}}}),r}function jc(e,t){return[{op:"replace",path:oc(t),value:Ys(e,t)}]}function Sc(e,t){return[{op:"add",path:oc(t),value:Ys(e,t)}]}function Cc(e,t){return mc(e,t)||!rc(e,t)?[{op:"remove",path:oc(t)}]:jc(e,t)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _c={},Oc={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},Mc="a".charCodeAt();_c.parse=function(e,t,n){var r={},i=0,o=0,a=0,s=n&&n.bigint&&"undefined"!=typeof BigInt;return{data:c("",!0),pointers:r};function c(t,n){var r;l(),m(t,"value");var i=d();switch(i){case"t":f("rue"),r=!0;break;case"f":f("alse"),r=!1;break;case"n":f("ull"),r=null;break;case'"':r=u();break;case"[":r=function(e){l();var t=[],n=0;if("]"==d())return t;h();for(;;){var r=e+"/"+n;t.push(c(r)),l();var i=d();if("]"==i)break;","!=i&&w(),l(),n++}return t}(t);break;case"{":r=function(e){l();var t={};if("}"==d())return t;h();for(;;){var n=y();'"'!=d()&&w();var r=u(),i=e+"/"+qc(r);g(i,"key",n),m(i,"keyEnd"),l(),":"!=d()&&w(),l(),t[r]=c(i),l();var o=d();if("}"==o)break;","!=o&&w(),l()}return t}(t);break;default:h(),"-0123456789".indexOf(i)>=0?r=function(){var t="",n=!0;"-"==e[a]&&(t+=d());t+="0"==e[a]?d():p(),"."==e[a]&&(t+=d()+p(),n=!1);"e"!=e[a]&&"E"!=e[a]||(t+=d(),"+"!=e[a]&&"-"!=e[a]||(t+=d()),t+=p(),n=!1);var r=+t;return s&&n&&(r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER)?BigInt(t):r}():b()}return m(t,"valueEnd"),l(),n&&a<e.length&&b(),r}function l(){e:for(;a<e.length;){switch(e[a]){case" ":o++;break;case"\t":o+=4;break;case"\r":o=0;break;case"\n":o=0,i++;break;default:break e}a++}}function u(){for(var e,t="";'"'!=(e=d());)"\\"==e?(e=d())in Oc?t+=Oc[e]:"u"==e?t+=v():w():t+=e;return t}function f(e){for(var t=0;t<e.length;t++)d()!==e[t]&&w()}function d(){k();var t=e[a];return a++,o++,t}function h(){a--,o--}function v(){for(var e=4,t=0;e--;){t<<=4;var n=d().toLowerCase();n>="a"&&n<="f"?t+=n.charCodeAt()-Mc+10:n>="0"&&n<="9"?t+=+n:w()}return String.fromCharCode(t)}function p(){for(var t="";e[a]>="0"&&e[a]<="9";)t+=d();if(t.length)return t;k(),b()}function m(e,t){g(e,t,y())}function g(e,t,n){r[e]=r[e]||{},r[e][t]=n}function y(){return{line:i,column:o,pos:a}}function b(){throw new SyntaxError("Unexpected token "+e[a]+" in JSON at position "+a)}function w(){h(),b()}function k(){if(a>=e.length)throw new SyntaxError("Unexpected end of JSON input")}},_c.stringify=function(e,t,n){if(Ac(e)){var r,i,o=0,a="object"==Wi(n)?n.space:n;switch(Wi(a)){case"number":var s=a>10?10:a<0?0:Math.floor(a);a=s&&y(s," "),r=s,i=s;break;case"string":a=a.slice(0,10),r=0,i=0;for(var c=0;c<a.length;c++){switch(a[c]){case" ":i++;break;case"\t":i+=4;break;case"\r":i=0;break;case"\n":i=0,o++;break;default:throw new Error("whitespace characters not allowed in JSON")}r++}break;default:a=void 0}var l="",u={},f=0,d=0,h=0,v=n&&n.es6&&"function"==typeof Map;return function e(t,n,r){switch(g(r,"value"),Wi(t)){case"number":case"bigint":case"boolean":p(""+t);break;case"string":p(zc(t));break;case"object":null===t?p("null"):"function"==typeof t.toJSON?p(zc(t.toJSON())):Array.isArray(t)?i():v?t.constructor.BYTES_PER_ELEMENT?i():t instanceof Map?s():t instanceof Set?s(!0):o():o()}function i(){if(t.length){p("[");for(var i=n+1,o=0;o<t.length;o++){o&&p(","),m(i);var a=Ac(t[o])?t[o]:null;e(a,i,r+"/"+o)}m(n),p("]")}else p("[]")}function o(){var i=Object.keys(t);if(i.length){p("{");for(var o=n+1,s=0;s<i.length;s++){var c=i[s],l=t[c];if(Ac(l)){s&&p(",");var u=r+"/"+qc(c);m(o),g(u,"key"),p(zc(c)),g(u,"keyEnd"),p(":"),a&&p(" "),e(l,o,u)}}m(n),p("}")}else p("{}")}function s(i){if(t.size){p("{");for(var o=n+1,s=!0,c=t.entries(),l=c.next();!l.done;){var u=l.value,f=u[0],d=!!i||u[1];if(Ac(d)){s||p(","),s=!1;var h=r+"/"+qc(f);m(o),g(h,"key"),p(zc(f)),g(h,"keyEnd"),p(":"),a&&p(" "),e(d,o,h)}l=c.next()}m(n),p("}")}else p("{}")}g(r,"valueEnd")}(e,0,""),{json:l,pointers:u}}function p(e){d+=e.length,h+=e.length,l+=e}function m(e){if(a){for(l+="\n"+y(e,a),f++,d=0;e--;)o?(f+=o,d=i):d+=i,h+=r;h+=1}}function g(e,t){u[e]=u[e]||{},u[e][t]={line:f,column:d,pos:h}}function y(e,t){return Array(e+1).join(t)}};var Ec=["number","bigint","boolean","string","object"];function Ac(e){return Ec.indexOf(Wi(e))>=0}var Pc=/"|\\/g,Tc=/[\b]/g,Rc=/\f/g,Nc=/\n/g,Ic=/\r/g,Dc=/\t/g;function zc(e){return'"'+(e=e.replace(Pc,"\\$&").replace(Rc,"\\f").replace(Tc,"\\b").replace(Nc,"\\n").replace(Ic,"\\r").replace(Dc,"\\t"))+'"'}var Lc=/~/g,Bc=/\//g;function qc(e){return e.replace(Lc,"~0").replace(Bc,"~1")}var Fc=function(e){_i(n,Ci(Error));var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this,e+" at position "+r)).position=r,i}return Di(n)}(),Vc=92,Wc=47,Hc=42,Uc=123,Jc=125,Kc=91,Gc=93,Qc=40,Yc=41,Xc=32,Zc=10,el=9,tl=13,nl=8,rl=12,il=34,ol=43,al=45,sl=39,cl=48,ll=57,ul=44,fl=46,dl=58,hl=59,vl=65,pl=97,ml=69,gl=101,yl=70,bl=102,wl=160,kl=8192,xl=8202,jl=8239,Sl=8287,Cl=12288,$l=8220,_l=8221,Ol=8216,Ml=8217,El=96,Al=180;function Pl(e){return e>=cl&&e<=ll||e>=vl&&e<=yl||e>=pl&&e<=bl}function Tl(e){return e>=cl&&e<=ll}function Rl(e){return e>=32&&e<=1114111}function Nl(e){return Il.test(e)||e&&Fl(e.charCodeAt(0))}var Il=/^[,:[\]{}()\n+]$/;function Dl(e){return zl.test(e)||e&&Fl(e.charCodeAt(0))}var zl=/^[[{\w-]$/;function Ll(e){return e===Zc||e===tl||e===el||e===nl||e===rl}function Bl(e){return e===Xc||e===Zc||e===el||e===tl}function ql(e){return e===wl||e>=kl&&e<=xl||e===jl||e===Sl||e===Cl}function Fl(e){return Vl(e)||Hl(e)}function Vl(e){return e===il||e===$l||e===_l}function Wl(e){return e===il}function Hl(e){return e===sl||e===Ol||e===Ml||e===El||e===Al}function Ul(e){return e===sl}function Jl(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.lastIndexOf(t);return-1!==r?e.substring(0,r)+(n?"":e.substring(r+1)):e}function Kl(e,t){var n=e.length;if(!Bl(e.charCodeAt(n-1)))return e+t;for(;Bl(e.charCodeAt(n-1));)n--;return e.substring(0,n)+t+e.substring(n)}function Gl(e,t,n){return e.substring(0,t)+e.substring(t+n)}var Ql={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Yl={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Xl(e){var t=0,n="";i()||function(){throw new Fc("Unexpected end of json string",e.length)}();var r=c(ul);for(r&&o(),Dl(e[t])&&function(e){return/[,\n][ \t\r]*$/.test(e)}(n)?(r||(n=Kl(n,",")),function(){var e=!0,t=!0;for(;t;){if(e)e=!1;else c(ul)||(n=Kl(n,","));t=i()}t||(n=Jl(n,","));n="[\n".concat(n,"\n]")}()):r&&(n=Jl(n,","));e.charCodeAt(t)===Jc||e.charCodeAt(t)===Gc;)t++,o();if(t>=e.length)return n;function i(){o();var r=function(){if(e.charCodeAt(t)===Uc){n+="{",t++,o();for(var r=!0;t<e.length&&e.charCodeAt(t)!==Jc;){if(r?(!0,r=!1):(c(ul)||(n=Kl(n,",")),o()),!(u()||d())){e.charCodeAt(t)===Jc||e.charCodeAt(t)===Uc||e.charCodeAt(t)===Gc||e.charCodeAt(t)===Kc||void 0===e[t]?n=Jl(n,","):m();break}o();var a=c(dl),s=t>=e.length;a||(Dl(e[t])||s?n=Kl(n,":"):g()),i()||(a||s?n+="null":g())}return e.charCodeAt(t)===Jc?(n+="}",t++):n=Kl(n,"}"),!0}return!1}()||function(){if(e.charCodeAt(t)===Kc){n+="[",t++,o();for(var r=!0;t<e.length&&e.charCodeAt(t)!==Gc;){if(r)r=!1;else c(ul)||(n=Kl(n,","));if(!i()){n=Jl(n,",");break}}return e.charCodeAt(t)===Gc?(n+="]",t++):n=Kl(n,"]"),!0}return!1}()||u()||function(){var r=t;if(e.charCodeAt(t)===al&&(t++,v(r)))return!0;for(;Tl(e.charCodeAt(t));)t++;if(e.charCodeAt(t)===fl){if(t++,v(r))return!0;for(;Tl(e.charCodeAt(t));)t++}if(e.charCodeAt(t)===gl||e.charCodeAt(t)===ml){if(t++,e.charCodeAt(t)!==al&&e.charCodeAt(t)!==ol||t++,v(r))return!0;for(;Tl(e.charCodeAt(t));)t++}if(t>r){var i=e.slice(r,t),o=/^0\d/.test(i);return n+=o?'"'.concat(i,'"'):i,!0}return!1}()||f("true","true")||f("false","false")||f("null","null")||f("True","true")||f("False","false")||f("None","null")||d();return o(),r}function o(){var e=t,n=a();do{(n=s())&&(n=a())}while(n);return t>e}function a(){for(var r,i="";(r=Bl(e.charCodeAt(t)))||ql(e.charCodeAt(t));)i+=r?e[t]:" ",t++;return i.length>0&&(n+=i,!0)}function s(){if(e.charCodeAt(t)===Wc&&e.charCodeAt(t+1)===Hc){for(;t<e.length&&!Zl(e,t);)t++;return t+=2,!0}if(e.charCodeAt(t)===Wc&&e.charCodeAt(t+1)===Wc){for(;t<e.length&&e.charCodeAt(t)!==Zc;)t++;return!0}return!1}function c(r){return e.charCodeAt(t)===r&&(n+=e[t],t++,!0)}function l(){return function(n){return e.charCodeAt(t)===n&&(t++,!0)}(Vc)}function u(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=e.charCodeAt(t)===Vc;if(i&&(t++,i=!0),Fl(e.charCodeAt(t))){var a=Wl(e.charCodeAt(t))?Wl:Ul(e.charCodeAt(t))?Ul:Hl(e.charCodeAt(t))?Hl:Vl,s=t,c=n;n+='"',t++;for(var f=r?function(t){return Nl(e[t])}:function(t){return a(e.charCodeAt(t))};t<e.length&&!f(t);){if(e.charCodeAt(t)===Vc){var d=e.charAt(t+1);if(void 0!==Yl[d])n+=e.slice(t,t+2),t+=2;else if("u"===d){for(var h=2;h<6&&Pl(e.charCodeAt(t+h));)h++;6===h?(n+=e.slice(t,t+6),t+=6):h<6&&t+h>=e.length?t=e.length:y(t)}else n+=d,t+=2}else{var v=e.charAt(t),m=e.charCodeAt(t);m===il&&e.charCodeAt(t-1)!==Vc?(n+="\\"+v,t++):Ll(m)?(n+=Ql[v],t++):(Rl(m)||p(v),n+=v,t++)}i&&l()}var g=Fl(e.charCodeAt(t)),b=g&&(t+1>=e.length||Nl(function(e,t){for(var n=t;Bl(e.charCodeAt(n));)n++;return e.charAt(n)}(e,t+1)));return b||r?(g?(n+='"',t++):n=Kl(n,'"'),function(){var r=!1;o();for(;e.charCodeAt(t)===ol;){r=!0,t++,o();var i=(n=Jl(n,'"',!0)).length;u(),n=Gl(n,i,1)}}(),!0):(t=s,n=c,u(!0))}return!1}function f(r,i){return e.slice(t,t+r.length)===r&&(n+=i,t+=r.length,!0)}function d(){for(var r=t;t<e.length&&!Nl(e[t]);)t++;if(t>r){if(e.charCodeAt(t)===Qc)return t++,i(),e.charCodeAt(t)===Yc&&(t++,e.charCodeAt(t)===hl&&t++),!0;for(;Bl(e.charCodeAt(t-1))&&t>0;)t--;var o=e.slice(r,t);return n+="undefined"===o?"null":JSON.stringify(o),e.charCodeAt(t)===il&&t++,!0}}function h(n){if(!Tl(e.charCodeAt(t))){var r=e.slice(n,t);throw new Fc("Invalid number '".concat(r,"', expecting a digit ").concat(e[t]?"but got '".concat(e[t],"'"):"but reached end of input"),t)}}function v(r){return t>=e.length?(n+=e.slice(r,t)+"0",!0):(h(r),!1)}function p(e){throw new Fc("Invalid character "+JSON.stringify(e),t)}function m(){throw new Fc("Object key expected",t)}function g(){throw new Fc("Colon expected",t)}function y(t){var n=e.slice(t,t+6);throw new Fc('Invalid unicode character "'.concat(n,'"'),t)}!function(){throw new Fc("Unexpected character "+JSON.stringify(e[t]),t)}()}function Zl(e,t){return"*"===e[t]&&"/"===e[t+1]}function eu(e){return parseInt(e,10)}function tu(e){return nu.test(e)}var nu=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ru(e){return"object"===Wi(e)&&null!==e&&"Object"===e.constructor.name}function iu(e){return"object"===Wi(e)&&null!==e&&("Object"===e.constructor.name||"Array"===e.constructor.name)}function ou(e){if("number"==typeof e)return e>9466848e5&&isFinite(e)&&Math.floor(e)===e&&!isNaN(new Date(e).valueOf());if("bigint"==typeof e)return ou(Number(e));try{var t=e?e.valueOf():e;if(t!==e)return ou(t)}catch(e){return!1}return!1}function au(e){var t=window.document.createElement("div");t.style.color=e;var n=t.style.color;return""!==n?n.replace(/\s+/g,"").toLowerCase():null}function su(e,t){if("number"==typeof e||"string"==typeof e||"boolean"==typeof e||void 0===e)return Wi(e);if("bigint"==typeof e)return"number";if(null===e)return"null";if(Array.isArray(e))return"array";if(ru(e))return"object";var n=t.stringify(e);return n&&tu(n)?"number":"true"===n||"false"===n?"boolean":"null"===n?"null":"unknown"}var cu=/^https?:\/\/\S+$/;function lu(e){return"string"==typeof e&&cu.test(e)}function uu(e,t){if(""===e)return"";var n=e.trim();return"null"===n?null:"true"===n||"false"!==n&&(tu(n)?t.parse(n):e)}function fu(e){return du.test(e)}var du=/^-?[0-9]+$/,hu="object"==("undefined"==typeof global?"undefined":Wi(global))&&global&&global.Object===Object&&global,vu="object"==("undefined"==typeof self?"undefined":Wi(self))&&self&&self.Object===Object&&self,pu=hu||vu||Function("return this")(),mu=pu.Symbol,gu=Object.prototype,yu=gu.hasOwnProperty,bu=gu.toString,wu=mu?mu.toStringTag:void 0;var ku=Object.prototype.toString;var xu="[object Null]",ju="[object Undefined]",Su=mu?mu.toStringTag:void 0;function Cu(e){return null==e?void 0===e?ju:xu:Su&&Su in Object(e)?function(e){var t=yu.call(e,wu),n=e[wu];try{e[wu]=void 0;var r=!0}catch(e){}var i=bu.call(e);return r&&(t?e[wu]=n:delete e[wu]),i}(e):function(e){return ku.call(e)}(e)}function $u(e){return null!=e&&"object"==Wi(e)}var _u="[object Symbol]";function Ou(e){return"symbol"==Wi(e)||$u(e)&&Cu(e)==_u}var Mu=NaN;function Eu(e){return"number"==typeof e?e:Ou(e)?Mu:+e}function Au(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Pu=Array.isArray,Tu=1/0,Ru=mu?mu.prototype:void 0,Nu=Ru?Ru.toString:void 0;function Iu(e){if("string"==typeof e)return e;if(Pu(e))return Au(e,Iu)+"";if(Ou(e))return Nu?Nu.call(e):"";var t=e+"";return"0"==t&&1/e==-Tu?"-0":t}function Du(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Iu(n),r=Iu(r)):(n=Eu(n),r=Eu(r)),i=e(n,r)}return i}}var zu=Du((function(e,t){return e+t}),0),Lu=/\s/;function Bu(e){for(var t=e.length;t--&&Lu.test(e.charAt(t)););return t}var qu=/^\s+/;function Fu(e){return e?e.slice(0,Bu(e)+1).replace(qu,""):e}function Vu(e){var t=Wi(e);return null!=e&&("object"==t||"function"==t)}var Wu=NaN,Hu=/^[-+]0x[0-9a-f]+$/i,Uu=/^0b[01]+$/i,Ju=/^0o[0-7]+$/i,Ku=parseInt;function Gu(e){if("number"==typeof e)return e;if(Ou(e))return Wu;if(Vu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Vu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Fu(e);var n=Uu.test(e);return n||Ju.test(e)?Ku(e.slice(2),n?2:8):Hu.test(e)?Wu:+e}var Qu=1/0,Yu=17976931348623157e292;function Xu(e){return e?(e=Gu(e))===Qu||e===-Qu?(e<0?-1:1)*Yu:e==e?e:0:0===e?e:0}function Zu(e){var t=Xu(e),n=t%1;return t==t?n?t-n:t:0}function ef(e,t){if("function"!=typeof t)throw new TypeError("Expected a function");return e=Zu(e),function(){if(--e<1)return t.apply(this,arguments)}}function tf(e){return e}var nf="[object AsyncFunction]",rf="[object Function]",of="[object GeneratorFunction]",af="[object Proxy]";function sf(e){if(!Vu(e))return!1;var t=Cu(e);return t==rf||t==of||t==nf||t==af}var cf,lf=pu["__core-js_shared__"],uf=(cf=/[^.]+$/.exec(lf&&lf.keys&&lf.keys.IE_PROTO||""))?"Symbol(src)_1."+cf:"";var ff=Function.prototype.toString;function df(e){if(null!=e){try{return ff.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var hf=/^\[object .+?Constructor\]$/,vf=Function.prototype,pf=Object.prototype,mf=vf.toString,gf=pf.hasOwnProperty,yf=RegExp("^"+mf.call(gf).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bf(e){return!(!Vu(e)||function(e){return!!uf&&uf in e}(e))&&(sf(e)?yf:hf).test(df(e))}function wf(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return bf(n)?n:void 0}var kf=wf(pu,"WeakMap"),xf=kf&&new kf,jf=xf?function(e,t){return xf.set(e,t),e}:tf,Sf=jf,Cf=Object.create,$f=function(){function e(){}return function(t){if(!Vu(t))return{};if(Cf)return Cf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),_f=$f;function Of(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_f(e.prototype),r=e.apply(n,t);return Vu(r)?r:n}}var Mf=1;function Ef(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Af=Math.max;function Pf(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,c=t.length,l=Af(o-a,0),u=Array(c+l),f=!r;++s<c;)u[s]=t[s];for(;++i<a;)(f||i<o)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}var Tf=Math.max;function Rf(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,c=-1,l=t.length,u=Tf(o-s,0),f=Array(u+l),d=!r;++i<u;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++a<s;)(d||i<o)&&(f[h+n[a]]=e[i++]);return f}function Nf(){}var If=4294967295;function Df(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=If,this.__views__=[]}function zf(){}Df.prototype=_f(Nf.prototype),Df.prototype.constructor=Df;var Lf=xf?function(e){return xf.get(e)}:zf,Bf=Lf,qf={},Ff=Object.prototype.hasOwnProperty;function Vf(e){for(var t=e.name+"",n=qf[t],r=Ff.call(qf,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Wf(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Hf(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Uf(e){if(e instanceof Df)return e.clone();var t=new Wf(e.__wrapped__,e.__chain__);return t.__actions__=Hf(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Wf.prototype=_f(Nf.prototype),Wf.prototype.constructor=Wf;var Jf=Object.prototype.hasOwnProperty;function Kf(e){if($u(e)&&!Pu(e)&&!(e instanceof Df)){if(e instanceof Wf)return e;if(Jf.call(e,"__wrapped__"))return Uf(e)}return new Wf(e)}function Gf(e){var t=Vf(e),n=Kf[t];if("function"!=typeof n||!(t in Df.prototype))return!1;if(e===n)return!0;var r=Bf(n);return!!r&&e===r[0]}Kf.prototype=Nf.prototype,Kf.prototype.constructor=Kf;var Qf=Date.now;function Yf(e){var t=0,n=0;return function(){var r=Qf(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Xf=Yf(Sf),Zf=/\{\n\/\* \[wrapped with (.+)\] \*/,ed=/,? & /;var td=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function nd(e){return function(){return e}}var rd=function(){try{var e=wf(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),id=rd,od=id?function(e,t){return id(e,"toString",{configurable:!0,enumerable:!1,value:nd(t),writable:!0})}:tf,ad=Yf(od);function sd(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function cd(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function ld(e){return e!=e}function ud(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):cd(e,ld,n)}function fd(e,t){return!!(null==e?0:e.length)&&ud(e,t,0)>-1}var dd=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function hd(e,t,n){var r=t+"";return ad(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(td,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return sd(dd,(function(n){var r="_."+n[0];t&n[1]&&!fd(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Zf);return t?t[1].split(ed):[]}(r),n)))}var vd=1,pd=2,md=4,gd=8,yd=32,bd=64;function wd(e,t,n,r,i,o,a,s,c,l){var u=t&gd;t|=u?yd:bd,(t&=~(u?bd:yd))&md||(t&=~(vd|pd));var f=[e,t,i,u?o:void 0,u?a:void 0,u?void 0:o,u?void 0:a,s,c,l],d=n.apply(void 0,f);return Gf(e)&&Xf(d,f),d.placeholder=r,hd(d,e,t)}function kd(e){return e.placeholder}var xd=9007199254740991,jd=/^(?:0|[1-9]\d*)$/;function Sd(e,t){var n=Wi(e);return!!(t=null==t?xd:t)&&("number"==n||"symbol"!=n&&jd.test(e))&&e>-1&&e%1==0&&e<t}var Cd=Math.min;var $d="__lodash_placeholder__";function _d(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==$d||(e[n]=$d,o[i++]=n)}return o}var Od=1,Md=2,Ed=8,Ad=16,Pd=128,Td=512;function Rd(e,t,n,r,i,o,a,s,c,l){var u=t&Pd,f=t&Od,d=t&Md,h=t&(Ed|Ad),v=t&Td,p=d?void 0:Of(e);return function m(){for(var g=arguments.length,y=Array(g),b=g;b--;)y[b]=arguments[b];if(h)var w=kd(m),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(y,w);if(r&&(y=Pf(y,r,i,h)),o&&(y=Rf(y,o,a,h)),g-=k,h&&g<l){var x=_d(y,w);return wd(e,t,Rd,m.placeholder,n,y,x,s,c,l-g)}var j=f?n:this,S=d?j[e]:e;return g=y.length,s?y=function(e,t){for(var n=e.length,r=Cd(t.length,n),i=Hf(e);r--;){var o=t[r];e[r]=Sd(o,n)?i[o]:void 0}return e}(y,s):v&&g>1&&y.reverse(),u&&c<g&&(y.length=c),this&&this!==pu&&this instanceof m&&(S=p||Of(S)),S.apply(j,y)}}var Nd=1;var Id="__lodash_placeholder__",Dd=1,zd=2,Ld=4,Bd=8,qd=128,Fd=256,Vd=Math.min;var Wd="Expected a function",Hd=1,Ud=2,Jd=8,Kd=16,Gd=32,Qd=64,Yd=Math.max;function Xd(e,t,n,r,i,o,a,s){var c=t&Ud;if(!c&&"function"!=typeof e)throw new TypeError(Wd);var l=r?r.length:0;if(l||(t&=~(Gd|Qd),r=i=void 0),a=void 0===a?a:Yd(Zu(a),0),s=void 0===s?s:Zu(s),l-=i?i.length:0,t&Qd){var u=r,f=i;r=i=void 0}var d=c?void 0:Bf(e),h=[e,t,n,r,i,u,f,o,a,s];if(d&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(Dd|zd|qd),a=r==qd&&n==Bd||r==qd&&n==Fd&&e[7].length<=t[8]||r==(qd|Fd)&&t[7].length<=t[8]&&n==Bd;if(!o&&!a)return e;r&Dd&&(e[2]=t[2],i|=n&Dd?0:Ld);var s=t[3];if(s){var c=e[3];e[3]=c?Pf(c,s,t[4]):s,e[4]=c?_d(e[3],Id):t[4]}(s=t[5])&&(c=e[5],e[5]=c?Rf(c,s,t[6]):s,e[6]=c?_d(e[5],Id):t[6]),(s=t[7])&&(e[7]=s),r&qd&&(e[8]=null==e[8]?t[8]:Vd(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(h,d),e=h[0],t=h[1],n=h[2],r=h[3],i=h[4],!(s=h[9]=void 0===h[9]?c?0:e.length:Yd(h[9]-l,0))&&t&(Jd|Kd)&&(t&=~(Jd|Kd)),t&&t!=Hd)v=t==Jd||t==Kd?function(e,t,n){var r=Of(e);return function i(){for(var o=arguments.length,a=Array(o),s=o,c=kd(i);s--;)a[s]=arguments[s];var l=o<3&&a[0]!==c&&a[o-1]!==c?[]:_d(a,c);return(o-=l.length)<n?wd(e,t,Rd,i.placeholder,void 0,a,l,void 0,void 0,n-o):Ef(this&&this!==pu&&this instanceof i?r:e,this,a)}}(e,t,s):t!=Gd&&t!=(Hd|Gd)||i.length?Rd.apply(void 0,h):function(e,t,n,r){var i=t&Nd,o=Of(e);return function t(){for(var a=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),f=this&&this!==pu&&this instanceof t?o:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++a];return Ef(f,i?n:this,u)}}(e,t,n,r);else var v=function(e,t,n){var r=t&Mf,i=Of(e);return function t(){return(this&&this!==pu&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return hd((d?Sf:Xf)(v,h),e,t)}var Zd=128;function eh(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,Xd(e,Zd,void 0,void 0,void 0,void 0,t)}function th(e,t,n){"__proto__"==t&&id?id(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function nh(e,t){return e===t||e!=e&&t!=t}var rh=Object.prototype.hasOwnProperty;function ih(e,t,n){var r=e[t];rh.call(e,t)&&nh(r,n)&&(void 0!==n||t in e)||th(e,t,n)}function oh(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?th(n,s,c):ih(n,s,c)}return n}var ah=Math.max;function sh(e,t,n){return t=ah(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=ah(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),Ef(e,this,s)}}function ch(e,t){return ad(sh(e,t,tf),e+"")}var lh=9007199254740991;function uh(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=lh}function fh(e){return null!=e&&uh(e.length)&&!sf(e)}function dh(e,t,n){if(!Vu(n))return!1;var r=Wi(t);return!!("number"==r?fh(n)&&Sd(t,n.length):"string"==r&&t in n)&&nh(n[t],e)}function hh(e){return ch((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&dh(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))}var vh=Object.prototype;function ph(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||vh)}function mh(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function gh(e){return $u(e)&&"[object Arguments]"==Cu(e)}var yh=Object.prototype,bh=yh.hasOwnProperty,wh=yh.propertyIsEnumerable,kh=gh(function(){return arguments}())?gh:function(e){return $u(e)&&bh.call(e,"callee")&&!wh.call(e,"callee")};function xh(){return!1}var jh="object"==("undefined"==typeof exports?"undefined":Wi(exports))&&exports&&!exports.nodeType&&exports,Sh=jh&&"object"==("undefined"==typeof module?"undefined":Wi(module))&&module&&!module.nodeType&&module,Ch=Sh&&Sh.exports===jh?pu.Buffer:void 0,$h=(Ch?Ch.isBuffer:void 0)||xh,_h={};function Oh(e){return function(t){return e(t)}}_h["[object Float32Array]"]=_h["[object Float64Array]"]=_h["[object Int8Array]"]=_h["[object Int16Array]"]=_h["[object Int32Array]"]=_h["[object Uint8Array]"]=_h["[object Uint8ClampedArray]"]=_h["[object Uint16Array]"]=_h["[object Uint32Array]"]=!0,_h["[object Arguments]"]=_h["[object Array]"]=_h["[object ArrayBuffer]"]=_h["[object Boolean]"]=_h["[object DataView]"]=_h["[object Date]"]=_h["[object Error]"]=_h["[object Function]"]=_h["[object Map]"]=_h["[object Number]"]=_h["[object Object]"]=_h["[object RegExp]"]=_h["[object Set]"]=_h["[object String]"]=_h["[object WeakMap]"]=!1;var Mh="object"==("undefined"==typeof exports?"undefined":Wi(exports))&&exports&&!exports.nodeType&&exports,Eh=Mh&&"object"==("undefined"==typeof module?"undefined":Wi(module))&&module&&!module.nodeType&&module,Ah=Eh&&Eh.exports===Mh&&hu.process,Ph=function(){try{var e=Eh&&Eh.require&&Eh.require("util").types;return e||Ah&&Ah.binding&&Ah.binding("util")}catch(e){}}(),Th=Ph,Rh=Th&&Th.isTypedArray,Nh=Rh?Oh(Rh):function(e){return $u(e)&&uh(e.length)&&!!_h[Cu(e)]},Ih=Object.prototype.hasOwnProperty;function Dh(e,t){var n=Pu(e),r=!n&&kh(e),i=!n&&!r&&$h(e),o=!n&&!r&&!i&&Nh(e),a=n||r||i||o,s=a?mh(e.length,String):[],c=s.length;for(var l in e)!t&&!Ih.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Sd(l,c))||s.push(l);return s}function zh(e,t){return function(n){return e(t(n))}}var Lh=zh(Object.keys,Object),Bh=Object.prototype.hasOwnProperty;function qh(e){if(!ph(e))return Lh(e);var t=[];for(var n in Object(e))Bh.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fh(e){return fh(e)?Dh(e):qh(e)}var Vh=Object.prototype.hasOwnProperty,Wh=hh((function(e,t){if(ph(t)||fh(t))oh(t,Fh(t),e);else for(var n in t)Vh.call(t,n)&&ih(e,n,t[n])})),Hh=Wh;var Uh=Object.prototype.hasOwnProperty;function Jh(e){if(!Vu(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ph(e),n=[];for(var r in e)("constructor"!=r||!t&&Uh.call(e,r))&&n.push(r);return n}function Kh(e){return fh(e)?Dh(e,!0):Jh(e)}var Gh=hh((function(e,t){oh(t,Kh(t),e)})),Qh=Gh,Yh=hh((function(e,t,n,r){oh(t,Kh(t),e,r)})),Xh=Yh,Zh=hh((function(e,t,n,r){oh(t,Fh(t),e,r)})),ev=Zh,tv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nv=/^\w*$/;function rv(e,t){if(Pu(e))return!1;var n=Wi(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ou(e))||(nv.test(e)||!tv.test(e)||null!=t&&e in Object(t))}var iv=wf(Object,"create");var ov=Object.prototype.hasOwnProperty;var av=Object.prototype.hasOwnProperty;function sv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function cv(e,t){for(var n=e.length;n--;)if(nh(e[n][0],t))return n;return-1}sv.prototype.clear=function(){this.__data__=iv?iv(null):{},this.size=0},sv.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},sv.prototype.get=function(e){var t=this.__data__;if(iv){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ov.call(t,e)?t[e]:void 0},sv.prototype.has=function(e){var t=this.__data__;return iv?void 0!==t[e]:av.call(t,e)},sv.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iv&&void 0===t?"__lodash_hash_undefined__":t,this};var lv=Array.prototype.splice;function uv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uv.prototype.clear=function(){this.__data__=[],this.size=0},uv.prototype.delete=function(e){var t=this.__data__,n=cv(t,e);return!(n<0)&&(n==t.length-1?t.pop():lv.call(t,n,1),--this.size,!0)},uv.prototype.get=function(e){var t=this.__data__,n=cv(t,e);return n<0?void 0:t[n][1]},uv.prototype.has=function(e){return cv(this.__data__,e)>-1},uv.prototype.set=function(e,t){var n=this.__data__,r=cv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var fv=wf(pu,"Map");function dv(e,t){var n=e.__data__;return function(e){var t=Wi(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function hv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hv.prototype.clear=function(){this.size=0,this.__data__={hash:new sv,map:new(fv||uv),string:new sv}},hv.prototype.delete=function(e){var t=dv(this,e).delete(e);return this.size-=t?1:0,t},hv.prototype.get=function(e){return dv(this,e).get(e)},hv.prototype.has=function(e){return dv(this,e).has(e)},hv.prototype.set=function(e,t){var n=dv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var vv="Expected a function";function pv(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(vv);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(pv.Cache||hv),n}pv.Cache=hv;var mv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gv=/\\(\\)?/g,yv=function(e){var t=pv(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(mv,(function(e,n,r,i){t.push(r?i.replace(gv,"$1"):n||e)})),t})),bv=yv;function wv(e){return null==e?"":Iu(e)}function kv(e,t){return Pu(e)?e:rv(e,t)?[e]:bv(wv(e))}var xv=1/0;function jv(e){if("string"==typeof e||Ou(e))return e;var t=e+"";return"0"==t&&1/e==-xv?"-0":t}function Sv(e,t){for(var n=0,r=(t=kv(t,e)).length;null!=e&&n<r;)e=e[jv(t[n++])];return n&&n==r?e:void 0}function Cv(e,t,n){var r=null==e?void 0:Sv(e,t);return void 0===r?n:r}function $v(e,t){for(var n=-1,r=t.length,i=Array(r),o=null==e;++n<r;)i[n]=o?void 0:Cv(e,t[n]);return i}function _v(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ov=mu?mu.isConcatSpreadable:void 0;function Mv(e){return Pu(e)||kh(e)||!!(Ov&&e&&e[Ov])}function Ev(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Mv),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Ev(s,t-1,n,r,i):_v(i,s):r||(i[i.length]=s)}return i}function Av(e){return(null==e?0:e.length)?Ev(e,1):[]}function Pv(e){return ad(sh(e,void 0,Av),e+"")}var Tv=Pv($v),Rv=zh(Object.getPrototypeOf,Object),Nv="[object Object]",Iv=Function.prototype,Dv=Object.prototype,zv=Iv.toString,Lv=Dv.hasOwnProperty,Bv=zv.call(Object);function qv(e){if(!$u(e)||Cu(e)!=Nv)return!1;var t=Rv(e);if(null===t)return!0;var n=Lv.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&zv.call(n)==Bv}var Fv="[object DOMException]",Vv="[object Error]";function Wv(e){if(!$u(e))return!1;var t=Cu(e);return t==Vv||t==Fv||"string"==typeof e.message&&"string"==typeof e.name&&!qv(e)}var Hv=ch((function(e,t){try{return Ef(e,void 0,t)}catch(e){return Wv(e)?e:new Error(e)}})),Uv=Hv,Jv="Expected a function";function Kv(e,t){var n;if("function"!=typeof t)throw new TypeError(Jv);return e=Zu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Gv=ch((function(e,t,n){var r=1;if(n.length){var i=_d(n,kd(Gv));r|=32}return Xd(e,r,t,n,i)}));Gv.placeholder={};var Qv=Gv,Yv=Pv((function(e,t){return sd(t,(function(t){t=jv(t),th(e,t,Qv(e[t],e))})),e})),Xv=Yv,Zv=ch((function(e,t,n){var r=3;if(n.length){var i=_d(n,kd(Zv));r|=32}return Xd(t,r,e,n,i)}));Zv.placeholder={};var ep=Zv;function tp(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function np(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:tp(e,t,n)}var rp=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function ip(e){return rp.test(e)}var op="\\ud800-\\udfff",ap="["+op+"]",sp="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cp="\\ud83c[\\udffb-\\udfff]",lp="[^"+op+"]",up="(?:\\ud83c[\\udde6-\\uddff]){2}",fp="[\\ud800-\\udbff][\\udc00-\\udfff]",dp="(?:"+sp+"|"+cp+")"+"?",hp="[\\ufe0e\\ufe0f]?",vp=hp+dp+("(?:\\u200d(?:"+[lp,up,fp].join("|")+")"+hp+dp+")*"),pp="(?:"+[lp+sp+"?",sp,up,fp,ap].join("|")+")",mp=RegExp(cp+"(?="+cp+")|"+pp+vp,"g");function gp(e){return ip(e)?function(e){return e.match(mp)||[]}(e):function(e){return e.split("")}(e)}function yp(e){return function(t){var n=ip(t=wv(t))?gp(t):void 0,r=n?n[0]:t.charAt(0),i=n?np(n,1).join(""):t.slice(1);return r[e]()+i}}var bp=yp("toUpperCase");function wp(e){return bp(wv(e).toLowerCase())}function kp(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function xp(e){return function(t){return null==e?void 0:e[t]}}var jp=xp({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Sp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function $p(e){return(e=wv(e))&&e.replace(Sp,jp).replace(Cp,"")}var _p=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Op=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Mp="\\ud800-\\udfff",Ep="\\u2700-\\u27bf",Ap="a-z\\xdf-\\xf6\\xf8-\\xff",Pp="A-Z\\xc0-\\xd6\\xd8-\\xde",Tp="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rp="["+Tp+"]",Np="\\d+",Ip="["+Ep+"]",Dp="["+Ap+"]",zp="[^"+Mp+Tp+Np+Ep+Ap+Pp+"]",Lp="(?:\\ud83c[\\udde6-\\uddff]){2}",Bp="[\\ud800-\\udbff][\\udc00-\\udfff]",qp="["+Pp+"]",Fp="(?:"+Dp+"|"+zp+")",Vp="(?:"+qp+"|"+zp+")",Wp="(?:['](?:d|ll|m|re|s|t|ve))?",Hp="(?:['](?:D|LL|M|RE|S|T|VE))?",Up="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Jp="[\\ufe0e\\ufe0f]?",Kp=Jp+Up+("(?:\\u200d(?:"+["[^"+Mp+"]",Lp,Bp].join("|")+")"+Jp+Up+")*"),Gp="(?:"+[Ip,Lp,Bp].join("|")+")"+Kp,Qp=RegExp([qp+"?"+Dp+"+"+Wp+"(?="+[Rp,qp,"$"].join("|")+")",Vp+"+"+Hp+"(?="+[Rp,qp+Fp,"$"].join("|")+")",qp+"?"+Fp+"+"+Wp,qp+"+"+Hp,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Np,Gp].join("|"),"g");function Yp(e,t,n){return e=wv(e),void 0===(t=n?void 0:t)?function(e){return Op.test(e)}(e)?function(e){return e.match(Qp)||[]}(e):function(e){return e.match(_p)||[]}(e):e.match(t)||[]}var Xp=RegExp("[']","g");function Zp(e){return function(t){return kp(Yp($p(t).replace(Xp,"")),e,"")}}var em=Zp((function(e,t,n){return t=t.toLowerCase(),e+(n?wp(t):t)})),tm=em;function nm(){if(!arguments.length)return[];var e=arguments[0];return Pu(e)?e:[e]}var rm=pu.isFinite,im=Math.min;function om(e){var t=Math[e];return function(e,n){if(e=Gu(e),(n=null==n?0:im(Zu(n),292))&&rm(e)){var r=(wv(e)+"e").split("e");return+((r=(wv(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var am=om("ceil");function sm(e){var t=Kf(e);return t.__chain__=!0,t}var cm=Math.ceil,lm=Math.max;function um(e,t,n){t=(n?dh(e,t,n):void 0===t)?1:lm(Zu(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Array(cm(r/t));i<r;)a[o++]=tp(e,i,i+=t);return a}function fm(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function dm(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Gu(n))==n?n:0),void 0!==t&&(t=(t=Gu(t))==t?t:0),fm(Gu(e),t,n)}function hm(e){var t=this.__data__=new uv(e);this.size=t.size}function vm(e,t){return e&&oh(t,Fh(t),e)}hm.prototype.clear=function(){this.__data__=new uv,this.size=0},hm.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},hm.prototype.get=function(e){return this.__data__.get(e)},hm.prototype.has=function(e){return this.__data__.has(e)},hm.prototype.set=function(e,t){var n=this.__data__;if(n instanceof uv){var r=n.__data__;if(!fv||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new hv(r)}return n.set(e,t),this.size=n.size,this};var pm="object"==("undefined"==typeof exports?"undefined":Wi(exports))&&exports&&!exports.nodeType&&exports,mm=pm&&"object"==("undefined"==typeof module?"undefined":Wi(module))&&module&&!module.nodeType&&module,gm=mm&&mm.exports===pm?pu.Buffer:void 0,ym=gm?gm.allocUnsafe:void 0;function bm(e,t){if(t)return e.slice();var n=e.length,r=ym?ym(n):new e.constructor(n);return e.copy(r),r}function wm(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function km(){return[]}var xm=Object.prototype.propertyIsEnumerable,jm=Object.getOwnPropertySymbols,Sm=jm?function(e){return null==e?[]:(e=Object(e),wm(jm(e),(function(t){return xm.call(e,t)})))}:km,Cm=Sm;var $m=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)_v(t,Cm(e)),e=Rv(e);return t}:km,_m=$m;function Om(e,t,n){var r=t(e);return Pu(e)?r:_v(r,n(e))}function Mm(e){return Om(e,Fh,Cm)}function Em(e){return Om(e,Kh,_m)}var Am=wf(pu,"DataView"),Pm=wf(pu,"Promise"),Tm=wf(pu,"Set"),Rm="[object Map]",Nm="[object Promise]",Im="[object Set]",Dm="[object WeakMap]",zm="[object DataView]",Lm=df(Am),Bm=df(fv),qm=df(Pm),Fm=df(Tm),Vm=df(kf),Wm=Cu;(Am&&Wm(new Am(new ArrayBuffer(1)))!=zm||fv&&Wm(new fv)!=Rm||Pm&&Wm(Pm.resolve())!=Nm||Tm&&Wm(new Tm)!=Im||kf&&Wm(new kf)!=Dm)&&(Wm=function(e){var t=Cu(e),n="[object Object]"==t?e.constructor:void 0,r=n?df(n):"";if(r)switch(r){case Lm:return zm;case Bm:return Rm;case qm:return Nm;case Fm:return Im;case Vm:return Dm}return t});var Hm=Wm,Um=Object.prototype.hasOwnProperty;var Jm=pu.Uint8Array;function Km(e){var t=new e.constructor(e.byteLength);return new Jm(t).set(new Jm(e)),t}var Gm=/\w*$/;var Qm=mu?mu.prototype:void 0,Ym=Qm?Qm.valueOf:void 0;function Xm(e,t){var n=t?Km(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Zm="[object Boolean]",eg="[object Date]",tg="[object Map]",ng="[object Number]",rg="[object RegExp]",ig="[object Set]",og="[object String]",ag="[object Symbol]",sg="[object ArrayBuffer]",cg="[object DataView]",lg="[object Float32Array]",ug="[object Float64Array]",fg="[object Int8Array]",dg="[object Int16Array]",hg="[object Int32Array]",vg="[object Uint8Array]",pg="[object Uint8ClampedArray]",mg="[object Uint16Array]",gg="[object Uint32Array]";function yg(e,t,n){var r,i=e.constructor;switch(t){case sg:return Km(e);case Zm:case eg:return new i(+e);case cg:return function(e,t){var n=t?Km(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case lg:case ug:case fg:case dg:case hg:case vg:case pg:case mg:case gg:return Xm(e,n);case tg:return new i;case ng:case og:return new i(e);case rg:return function(e){var t=new e.constructor(e.source,Gm.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ig:return new i;case ag:return r=e,Ym?Object(Ym.call(r)):{}}}function bg(e){return"function"!=typeof e.constructor||ph(e)?{}:_f(Rv(e))}var wg=Th&&Th.isMap,kg=wg?Oh(wg):function(e){return $u(e)&&"[object Map]"==Hm(e)};var xg=Th&&Th.isSet,jg=xg?Oh(xg):function(e){return $u(e)&&"[object Set]"==Hm(e)},Sg=1,Cg=2,$g=4,_g="[object Arguments]",Og="[object Function]",Mg="[object GeneratorFunction]",Eg="[object Object]",Ag={};function Pg(e,t,n,r,i,o){var a,s=t&Sg,c=t&Cg,l=t&$g;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Vu(e))return e;var u=Pu(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Um.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Hf(e,a)}else{var f=Hm(e),d=f==Og||f==Mg;if($h(e))return bm(e,s);if(f==Eg||f==_g||d&&!i){if(a=c||d?{}:bg(e),!s)return c?function(e,t){return oh(e,_m(e),t)}(e,function(e,t){return e&&oh(t,Kh(t),e)}(a,e)):function(e,t){return oh(e,Cm(e),t)}(e,vm(a,e))}else{if(!Ag[f])return i?e:{};a=yg(e,f,s)}}o||(o=new hm);var h=o.get(e);if(h)return h;o.set(e,a),jg(e)?e.forEach((function(r){a.add(Pg(r,t,n,r,e,o))})):kg(e)&&e.forEach((function(r,i){a.set(i,Pg(r,t,n,i,e,o))}));var v=u?void 0:(l?c?Em:Mm:c?Kh:Fh)(e);return sd(v||e,(function(r,i){v&&(r=e[i=r]),ih(a,i,Pg(r,t,n,i,e,o))})),a}Ag[_g]=Ag["[object Array]"]=Ag["[object ArrayBuffer]"]=Ag["[object DataView]"]=Ag["[object Boolean]"]=Ag["[object Date]"]=Ag["[object Float32Array]"]=Ag["[object Float64Array]"]=Ag["[object Int8Array]"]=Ag["[object Int16Array]"]=Ag["[object Int32Array]"]=Ag["[object Map]"]=Ag["[object Number]"]=Ag[Eg]=Ag["[object RegExp]"]=Ag["[object Set]"]=Ag["[object String]"]=Ag["[object Symbol]"]=Ag["[object Uint8Array]"]=Ag["[object Uint8ClampedArray]"]=Ag["[object Uint16Array]"]=Ag["[object Uint32Array]"]=!0,Ag["[object Error]"]=Ag[Og]=Ag["[object WeakMap]"]=!1;function Tg(e){return Pg(e,4)}function Rg(e){return Pg(e,5)}var Ng=1,Ig=4;function Dg(e,t){return Pg(e,Ng|Ig,t="function"==typeof t?t:void 0)}function zg(e,t){return Pg(e,4,t="function"==typeof t?t:void 0)}function Lg(){return new Wf(this.value(),this.__chain__)}function Bg(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function qg(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return _v(Pu(n)?Hf(n):[n],Ev(t,1))}function Fg(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new hv;++t<n;)this.add(e[t])}function Vg(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Wg(e,t){return e.has(t)}Fg.prototype.add=Fg.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Fg.prototype.has=function(e){return this.__data__.has(e)};var Hg=1,Ug=2;function Jg(e,t,n,r,i,o){var a=n&Hg,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=n&Ug?new Fg:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var v=e[f],p=t[f];if(r)var m=a?r(p,v,f,t,e,o):r(v,p,f,e,t,o);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Vg(t,(function(e,t){if(!Wg(h,t)&&(v===e||i(v,e,n,r,o)))return h.push(t)}))){d=!1;break}}else if(v!==p&&!i(v,p,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function Kg(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Gg(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Qg=1,Yg=2,Xg="[object Boolean]",Zg="[object Date]",ey="[object Error]",ty="[object Map]",ny="[object Number]",ry="[object RegExp]",iy="[object Set]",oy="[object String]",ay="[object Symbol]",sy="[object ArrayBuffer]",cy="[object DataView]",ly=mu?mu.prototype:void 0,uy=ly?ly.valueOf:void 0;var fy=1,dy=Object.prototype.hasOwnProperty;var hy=1,vy="[object Arguments]",py="[object Array]",my="[object Object]",gy=Object.prototype.hasOwnProperty;function yy(e,t,n,r,i,o){var a=Pu(e),s=Pu(t),c=a?py:Hm(e),l=s?py:Hm(t),u=(c=c==vy?my:c)==my,f=(l=l==vy?my:l)==my,d=c==l;if(d&&$h(e)){if(!$h(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new hm),a||Nh(e)?Jg(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case cy:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sy:return!(e.byteLength!=t.byteLength||!o(new Jm(e),new Jm(t)));case Xg:case Zg:case ny:return nh(+e,+t);case ey:return e.name==t.name&&e.message==t.message;case ry:case oy:return e==t+"";case ty:var s=Kg;case iy:var c=r&Qg;if(s||(s=Gg),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=Yg,a.set(e,t);var u=Jg(s(e),s(t),r,i,o,a);return a.delete(e),u;case ay:if(uy)return uy.call(e)==uy.call(t)}return!1}(e,t,c,n,r,i,o);if(!(n&hy)){var h=u&&gy.call(e,"__wrapped__"),v=f&&gy.call(t,"__wrapped__");if(h||v){var p=h?e.value():e,m=v?t.value():t;return o||(o=new hm),i(p,m,n,r,o)}}return!!d&&(o||(o=new hm),function(e,t,n,r,i,o){var a=n&fy,s=Mm(e),c=s.length;if(c!=Mm(t).length&&!a)return!1;for(var l=c;l--;){var u=s[l];if(!(a?u in t:dy.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var h=!0;o.set(e,t),o.set(t,e);for(var v=a;++l<c;){var p=e[u=s[l]],m=t[u];if(r)var g=a?r(m,p,u,t,e,o):r(p,m,u,e,t,o);if(!(void 0===g?p===m||i(p,m,n,r,o):g)){h=!1;break}v||(v="constructor"==u)}if(h&&!v){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,n,r,i,o))}function by(e,t,n,r,i){return e===t||(null==e||null==t||!$u(e)&&!$u(t)?e!=e&&t!=t:yy(e,t,n,r,by,i))}var wy=1,ky=2;function xy(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var c=(s=n[i])[0],l=e[c],u=s[1];if(a&&s[2]){if(void 0===l&&!(c in e))return!1}else{var f=new hm;if(r)var d=r(l,u,c,e,t,f);if(!(void 0===d?by(u,l,wy|ky,r,f):d))return!1}}return!0}function jy(e){return e==e&&!Vu(e)}function Sy(e){for(var t=Fh(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,jy(i)]}return t}function Cy(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function $y(e){var t=Sy(e);return 1==t.length&&t[0][2]?Cy(t[0][0],t[0][1]):function(n){return n===e||xy(n,e,t)}}function _y(e,t){return null!=e&&t in Object(e)}function Oy(e,t,n){for(var r=-1,i=(t=kv(t,e)).length,o=!1;++r<i;){var a=jv(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&uh(i)&&Sd(a,i)&&(Pu(e)||kh(e))}function My(e,t){return null!=e&&Oy(e,t,_y)}var Ey=1,Ay=2;function Py(e,t){return rv(e)&&jy(t)?Cy(jv(e),t):function(n){var r=Cv(n,e);return void 0===r&&r===t?My(n,e):by(t,r,Ey|Ay)}}function Ty(e){return function(t){return null==t?void 0:t[e]}}function Ry(e){return rv(e)?Ty(jv(e)):function(e){return function(t){return Sv(t,e)}}(e)}function Ny(e){return"function"==typeof e?e:null==e?tf:"object"==Wi(e)?Pu(e)?Py(e[0],e[1]):$y(e):Ry(e)}function Iy(e){var t=null==e?0:e.length,n=Ny;return e=t?Au(e,(function(e){if("function"!=typeof e[1])throw new TypeError("Expected a function");return[n(e[0]),e[1]]})):[],ch((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ef(i[0],this,n))return Ef(i[1],this,n)}}))}function Dy(e,t,n){var r=n.length;if(null==e)return!r;for(e=Object(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function zy(e){return function(e){var t=Fh(e);return function(n){return Dy(n,e,t)}}(Pg(e,1))}function Ly(e,t){return null==t||Dy(e,t,Fh(t))}function By(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function qy(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}var Fy=qy();function Vy(e,t){return e&&Fy(e,t,Fh)}function Wy(e,t){return function(n,r){if(null==n)return n;if(!fh(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}var Hy=Wy(Vy);function Uy(e,t,n,r){return Hy(e,(function(e,i,o){t(r,e,n(e),o)})),r}function Jy(e,t){return function(n,r){var i=Pu(n)?By:Uy,o=t?t():{};return i(n,e,Ny(r),o)}}var Ky=Object.prototype.hasOwnProperty,Gy=Jy((function(e,t,n){Ky.call(e,n)?++e[n]:th(e,n,1)})),Qy=Gy;function Yy(e,t){var n=_f(e);return null==t?n:vm(n,t)}function Xy(e,t,n){var r=Xd(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Xy.placeholder,r}Xy.placeholder={};function Zy(e,t,n){var r=Xd(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Zy.placeholder,r}Zy.placeholder={};var eb=function(){return pu.Date.now()},tb="Expected a function",nb=Math.max,rb=Math.min;function ib(e,t,n){var r,i,o,a,s,c,l=0,u=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError(tb);function h(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function v(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-l>=o}function p(){var e=eb();if(v(e))return m(e);s=setTimeout(p,function(e){var n=t-(e-c);return f?rb(n,o-(e-l)):n}(e))}function m(e){return s=void 0,d&&r?h(e):(r=i=void 0,a)}function g(){var e=eb(),n=v(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(p,t),u?h(e):a}(c);if(f)return clearTimeout(s),s=setTimeout(p,t),h(c)}return void 0===s&&(s=setTimeout(p,t)),a}return t=Gu(t)||0,Vu(n)&&(u=!!n.leading,o=(f="maxWait"in n)?nb(Gu(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},g.flush=function(){return void 0===s?a:m(eb())},g}function ob(e,t){return null==e||e!=e?t:e}var ab=Object.prototype,sb=ab.hasOwnProperty,cb=ch((function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&dh(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Kh(o),s=-1,c=a.length;++s<c;){var l=a[s],u=e[l];(void 0===u||nh(u,ab[l])&&!sb.call(e,l))&&(e[l]=o[l])}return e})),lb=cb;function ub(e,t,n){(void 0!==n&&!nh(e[t],n)||void 0===n&&!(t in e))&&th(e,t,n)}function fb(e){return $u(e)&&fh(e)}function db(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function hb(e){return oh(e,Kh(e))}function vb(e,t,n,r,i){e!==t&&Fy(t,(function(o,a){if(i||(i=new hm),Vu(o))!function(e,t,n,r,i,o,a){var s=db(e,n),c=db(t,n),l=a.get(c);if(l)ub(e,n,l);else{var u=o?o(s,c,n+"",e,t,a):void 0,f=void 0===u;if(f){var d=Pu(c),h=!d&&$h(c),v=!d&&!h&&Nh(c);u=c,d||h||v?Pu(s)?u=s:fb(s)?u=Hf(s):h?(f=!1,u=bm(c,!0)):v?(f=!1,u=Xm(c,!0)):u=[]:qv(c)||kh(c)?(u=s,kh(s)?u=hb(s):Vu(s)&&!sf(s)||(u=bg(c))):f=!1}f&&(a.set(c,u),i(u,c,r,o,a),a.delete(c)),ub(e,n,u)}}(e,t,a,n,vb,r,i);else{var s=r?r(db(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),ub(e,a,s)}}),Kh)}function pb(e,t,n,r,i,o){return Vu(e)&&Vu(t)&&(o.set(t,e),vb(e,t,void 0,pb,o),o.delete(t)),e}var mb=hh((function(e,t,n,r){vb(e,t,n,r)})),gb=mb,yb=ch((function(e){return e.push(void 0,pb),Ef(gb,void 0,e)}));function bb(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}var wb=ch((function(e,t){return bb(e,1,t)})),kb=wb,xb=ch((function(e,t,n){return bb(e,Gu(t)||0,n)})),jb=xb;function Sb(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Cb=200;function $b(e,t,n,r){var i=-1,o=fd,a=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=Au(t,Oh(n))),r?(o=Sb,a=!1):t.length>=Cb&&(o=Wg,a=!1,t=new Fg(t));e:for(;++i<s;){var u=e[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,a&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;c.push(u)}else o(t,f,r)||c.push(u)}return c}var _b=ch((function(e,t){return fb(e)?$b(e,Ev(t,1,fb,!0)):[]})),Ob=_b;function Mb(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Eb=ch((function(e,t){var n=Mb(t);return fb(n)&&(n=void 0),fb(e)?$b(e,Ev(t,1,fb,!0),Ny(n)):[]})),Ab=Eb,Pb=ch((function(e,t){var n=Mb(t);return fb(n)&&(n=void 0),fb(e)?$b(e,Ev(t,1,fb,!0),void 0,n):[]})),Tb=Pb,Rb=Du((function(e,t){return e/t}),1);function Nb(e,t,n){var r=null==e?0:e.length;return r?tp(e,(t=n||void 0===t?1:Zu(t))<0?0:t,r):[]}function Ib(e,t,n){var r=null==e?0:e.length;return r?tp(e,0,(t=r-(t=n||void 0===t?1:Zu(t)))<0?0:t):[]}function Db(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?tp(e,r?0:o,r?o+1:i):tp(e,r?o+1:0,r?i:o)}function zb(e,t){return e&&e.length?Db(e,Ny(t),!0,!0):[]}function Lb(e,t){return e&&e.length?Db(e,Ny(t),!0):[]}function Bb(e){return"function"==typeof e?e:tf}function qb(e,t){return(Pu(e)?sd:Hy)(e,Bb(t))}function Fb(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}var Vb=qy(!0);function Wb(e,t){return e&&Vb(e,t,Fh)}var Hb=Wy(Wb,!0);function Ub(e,t){return(Pu(e)?Fb:Hb)(e,Bb(t))}function Jb(e,t,n){e=wv(e),t=Iu(t);var r=e.length,i=n=void 0===n?r:fm(Zu(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t}function Kb(e){return function(t){var n=Hm(t);return"[object Map]"==n?Kg(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Au(t,(function(t){return[t,e[t]]}))}(t,e(t))}}var Gb=Kb(Fh),Qb=Kb(Kh),Yb=xp({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),Xb=/[&<>"']/g,Zb=RegExp(Xb.source);function ew(e){return(e=wv(e))&&Zb.test(e)?e.replace(Xb,Yb):e}var tw=/[\\^$.*+?()[\]{}|]/g,nw=RegExp(tw.source);function rw(e){return(e=wv(e))&&nw.test(e)?e.replace(tw,"\\$&"):e}function iw(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ow(e,t){var n=!0;return Hy(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function aw(e,t,n){var r=Pu(e)?iw:ow;return n&&dh(e,t,n)&&(t=void 0),r(e,Ny(t))}var sw=4294967295;function cw(e){return e?fm(Zu(e),0,sw):0}function lw(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&dh(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=Zu(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:Zu(r))<0&&(r+=i),r=n>r?0:cw(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]}function uw(e,t){var n=[];return Hy(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function fw(e,t){return(Pu(e)?wm:uw)(e,Ny(t))}function dw(e){return function(t,n,r){var i=Object(t);if(!fh(t)){var o=Ny(n);t=Fh(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}var hw=Math.max;function vw(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Zu(n);return i<0&&(i=hw(r+i,0)),cd(e,Ny(t),i)}var pw=dw(vw);function mw(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function gw(e,t){return mw(e,Ny(t),Vy)}var yw=Math.max,bw=Math.min;function ww(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=Zu(n),i=n<0?yw(r+i,0):bw(i,r-1)),cd(e,Ny(t),i,!0)}var kw=dw(ww);function xw(e,t){return mw(e,Ny(t),Wb)}function jw(e){return e&&e.length?e[0]:void 0}function Sw(e,t){var n=-1,r=fh(e)?Array(e.length):[];return Hy(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Cw(e,t){return(Pu(e)?Au:Sw)(e,Ny(t))}function $w(e,t){return Ev(Cw(e,t),1)}function _w(e,t){return Ev(Cw(e,t),Infinity)}function Ow(e,t,n){return n=void 0===n?1:Zu(n),Ev(Cw(e,t),n)}function Mw(e){return(null==e?0:e.length)?Ev(e,Infinity):[]}function Ew(e,t){return(null==e?0:e.length)?Ev(e,t=void 0===t?1:Zu(t)):[]}function Aw(e){return Xd(e,512)}var Pw=om("floor");function Tw(e){return Pv((function(t){var n=t.length,r=n,i=Wf.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new TypeError("Expected a function");if(i&&!a&&"wrapper"==Vf(o))var a=new Wf([],!0)}for(r=a?r:n;++r<n;){var s=Vf(o=t[r]),c="wrapper"==s?Bf(o):void 0;a=c&&Gf(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Vf(c[0])].apply(a,c[3]):1==o.length&&Gf(o)?a[s]():a.thru(o)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&Pu(r))return a.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}var Rw=Tw(),Nw=Tw(!0);function Iw(e,t){return null==e?e:Fy(e,Bb(t),Kh)}function Dw(e,t){return null==e?e:Vb(e,Bb(t),Kh)}function zw(e,t){return e&&Vy(e,Bb(t))}function Lw(e,t){return e&&Wb(e,Bb(t))}function Bw(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function qw(e,t){return wm(t,(function(t){return sf(e[t])}))}function Fw(e){return null==e?[]:qw(e,Fh(e))}function Vw(e){return null==e?[]:qw(e,Kh(e))}var Ww=Object.prototype.hasOwnProperty,Hw=Jy((function(e,t,n){Ww.call(e,n)?e[n].push(t):th(e,n,[t])})),Uw=Hw;function Jw(e,t){return e>t}function Kw(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Gu(t),n=Gu(n)),e(t,n)}}var Gw=Kw(Jw),Qw=Kw((function(e,t){return e>=t})),Yw=Object.prototype.hasOwnProperty;function Xw(e,t){return null!=e&&Yw.call(e,t)}function Zw(e,t){return null!=e&&Oy(e,t,Xw)}var ek=Math.max,tk=Math.min;function nk(e,t,n){return t=Xu(t),void 0===n?(n=t,t=0):n=Xu(n),function(e,t,n){return e>=tk(t,n)&&e<ek(t,n)}(e=Gu(e),t,n)}var rk="[object String]";function ik(e){return"string"==typeof e||!Pu(e)&&$u(e)&&Cu(e)==rk}function ok(e,t){return Au(t,(function(t){return e[t]}))}function ak(e){return null==e?[]:ok(e,Fh(e))}var sk=Math.max;function ck(e,t,n,r){e=fh(e)?e:ak(e),n=n&&!r?Zu(n):0;var i=e.length;return n<0&&(n=sk(i+n,0)),ik(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ud(e,t,n)>-1}var lk=Math.max;function uk(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Zu(n);return i<0&&(i=lk(r+i,0)),ud(e,t,i)}function fk(e){return(null==e?0:e.length)?tp(e,0,-1):[]}var dk=Math.min;function hk(e,t,n){for(var r=n?Sb:fd,i=e[0].length,o=e.length,a=o,s=Array(o),c=1/0,l=[];a--;){var u=e[a];a&&t&&(u=Au(u,Oh(t))),c=dk(u.length,c),s[a]=!n&&(t||i>=120&&u.length>=120)?new Fg(a&&u):void 0}u=e[0];var f=-1,d=s[0];e:for(;++f<i&&l.length<c;){var h=u[f],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Wg(d,v):r(l,v,n))){for(a=o;--a;){var p=s[a];if(!(p?Wg(p,v):r(e[a],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function vk(e){return fb(e)?e:[]}var pk=ch((function(e){var t=Au(e,vk);return t.length&&t[0]===e[0]?hk(t):[]})),mk=ch((function(e){var t=Mb(e),n=Au(e,vk);return t===Mb(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?hk(n,Ny(t)):[]})),gk=mk,yk=ch((function(e){var t=Mb(e),n=Au(e,vk);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?hk(n,void 0,t):[]}));function bk(e,t){return function(n,r){return function(e,t,n,r){return Vy(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}var wk=Object.prototype.toString,kk=bk((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=wk.call(t)),e[t]=n}),nd(tf)),xk=kk,jk=Object.prototype,Sk=jk.hasOwnProperty,Ck=jk.toString,$k=bk((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ck.call(t)),Sk.call(e,t)?e[t].push(n):e[t]=[n]}),Ny),_k=$k;function Ok(e,t){return t.length<2?e:Sv(e,tp(t,0,-1))}function Mk(e,t,n){var r=null==(e=Ok(e,t=kv(t,e)))?e:e[jv(Mb(t))];return null==r?void 0:Ef(r,e,n)}var Ek=ch(Mk),Ak=ch((function(e,t,n){var r=-1,i="function"==typeof t,o=fh(e)?Array(e.length):[];return Hy(e,(function(e){o[++r]=i?Ef(t,e,n):Mk(e,t,n)})),o})),Pk=Ak;var Tk=Th&&Th.isArrayBuffer,Rk=Tk?Oh(Tk):function(e){return $u(e)&&"[object ArrayBuffer]"==Cu(e)};function Nk(e){return!0===e||!1===e||$u(e)&&"[object Boolean]"==Cu(e)}var Ik=Th&&Th.isDate,Dk=Ik?Oh(Ik):function(e){return $u(e)&&"[object Date]"==Cu(e)};function zk(e){return $u(e)&&1===e.nodeType&&!qv(e)}var Lk="[object Map]",Bk="[object Set]",qk=Object.prototype.hasOwnProperty;function Fk(e){if(null==e)return!0;if(fh(e)&&(Pu(e)||"string"==typeof e||"function"==typeof e.splice||$h(e)||Nh(e)||kh(e)))return!e.length;var t=Hm(e);if(t==Lk||t==Bk)return!e.size;if(ph(e))return!qh(e).length;for(var n in e)if(qk.call(e,n))return!1;return!0}function Vk(e,t){return by(e,t)}function Wk(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?by(e,t,void 0,n):!!r}var Hk=pu.isFinite;function Uk(e){return"number"==typeof e&&Hk(e)}function Jk(e){return"number"==typeof e&&e==Zu(e)}function Kk(e,t){return e===t||xy(e,t,Sy(t))}function Gk(e,t,n){return n="function"==typeof n?n:void 0,xy(e,t,Sy(t),n)}var Qk="[object Number]";function Yk(e){return"number"==typeof e||$u(e)&&Cu(e)==Qk}function Xk(e){return Yk(e)&&e!=+e}var Zk=lf?sf:xh;function ex(e){if(Zk(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return bf(e)}function tx(e){return null==e}function nx(e){return null===e}var rx=Th&&Th.isRegExp,ix=rx?Oh(rx):function(e){return $u(e)&&"[object RegExp]"==Cu(e)},ox=9007199254740991;function ax(e){return Jk(e)&&e>=-9007199254740991&&e<=ox}function sx(e){return void 0===e}function cx(e){return $u(e)&&"[object WeakMap]"==Hm(e)}function lx(e){return $u(e)&&"[object WeakSet]"==Cu(e)}function ux(e){return Ny("function"==typeof e?e:Pg(e,1))}var fx=Array.prototype.join;function dx(e,t){return null==e?"":fx.call(e,t)}var hx=Zp((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),vx=hx,px=Jy((function(e,t,n){th(e,n,t)})),mx=px;var gx=Math.max,yx=Math.min;function bx(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=Zu(n))<0?gx(r+i,0):yx(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):cd(e,ld,i,!0)}var wx=Zp((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),kx=wx,xx=yp("toLowerCase");function jx(e,t){return e<t}var Sx=Kw(jx),Cx=Kw((function(e,t){return e<=t}));function $x(e,t){var n={};return t=Ny(t),Vy(e,(function(e,r,i){th(n,t(e,r,i),e)})),n}function _x(e,t){var n={};return t=Ny(t),Vy(e,(function(e,r,i){th(n,r,t(e,r,i))})),n}function Ox(e){return $y(Pg(e,1))}function Mx(e,t){return Py(e,Pg(t,1))}function Ex(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(void 0===s?a==a&&!Ou(a):n(a,s)))var s=a,c=o}return c}function Ax(e){return e&&e.length?Ex(e,tf,Jw):void 0}function Px(e,t){return e&&e.length?Ex(e,Ny(t),Jw):void 0}function Tx(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}var Rx=NaN;function Nx(e,t){var n=null==e?0:e.length;return n?Tx(e,t)/n:Rx}function Ix(e){return Nx(e,tf)}function Dx(e,t){return Nx(e,Ny(t))}var zx=hh((function(e,t,n){vb(e,t,n)})),Lx=zx,Bx=ch((function(e,t){return function(n){return Mk(n,e,t)}})),qx=Bx,Fx=ch((function(e,t){return function(n){return Mk(e,n,t)}})),Vx=Fx;function Wx(e){return e&&e.length?Ex(e,tf,jx):void 0}function Hx(e,t){return e&&e.length?Ex(e,Ny(t),jx):void 0}function Ux(e,t,n){var r=Fh(t),i=qw(t,r),o=!(Vu(n)&&"chain"in n&&!n.chain),a=sf(e);return sd(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Hf(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,_v([this.value()],arguments))})})),e}var Jx=Du((function(e,t){return e*t}),1),Kx="Expected a function";function Gx(e){if("function"!=typeof e)throw new TypeError(Kx);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Qx="[object Map]",Yx="[object Set]",Xx=mu?mu.iterator:void 0;function Zx(e){if(!e)return[];if(fh(e))return ik(e)?gp(e):Hf(e);if(Xx&&e[Xx])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xx]());var t=Hm(e);return(t==Qx?Kg:t==Yx?Gg:ak)(e)}function ej(){void 0===this.__values__&&(this.__values__=Zx(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function tj(e,t){var n=e.length;if(n)return Sd(t+=t<0?n:0,n)?e[t]:void 0}function nj(e,t){return e&&e.length?tj(e,Zu(t)):void 0}function rj(e){return e=Zu(e),ch((function(t){return tj(t,e)}))}function ij(e,t){return null==(e=Ok(e,t=kv(t,e)))||delete e[jv(Mb(t))]}function oj(e){return qv(e)?void 0:e}var aj=Pv((function(e,t){var n={};if(null==e)return n;var r=!1;t=Au(t,(function(t){return t=kv(t,e),r||(r=t.length>1),t})),oh(e,Em(e),n),r&&(n=Pg(n,7,oj));for(var i=t.length;i--;)ij(n,t[i]);return n})),sj=aj;function cj(e,t,n,r){if(!Vu(e))return e;for(var i=-1,o=(t=kv(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var c=jv(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var u=s[c];void 0===(l=r?r(u,c,s):void 0)&&(l=Vu(u)?u:Sd(t[i+1])?[]:{})}ih(s,c,l),s=s[c]}return e}function lj(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Sv(e,a);n(s,a)&&cj(o,kv(a,e),s)}return o}function uj(e,t){if(null==e)return{};var n=Au(Em(e),(function(e){return[e]}));return t=Ny(t),lj(e,n,(function(e,n){return t(e,n[0])}))}function fj(e,t){return uj(e,Gx(Ny(t)))}function dj(e){return Kv(2,e)}function hj(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ou(e),a=void 0!==t,s=null===t,c=t==t,l=Ou(t);if(!s&&!l&&!o&&e>t||o&&a&&c&&!s&&!l||r&&a&&c||!n&&c||!i)return 1;if(!r&&!o&&!l&&e<t||l&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!c)return-1}return 0}function vj(e,t,n){t=t.length?Au(t,(function(e){return Pu(e)?function(t){return Sv(t,1===e.length?e[0]:e)}:e})):[tf];var r=-1;t=Au(t,Oh(Ny));var i=Sw(e,(function(e,n,i){var o=Au(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var c=hj(i[r],o[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function pj(e,t,n,r){return null==e?[]:(Pu(t)||(t=null==t?[]:[t]),Pu(n=r?void 0:n)||(n=null==n?[]:[n]),vj(e,t,n))}function mj(e){return Pv((function(t){return t=Au(t,Oh(Ny)),ch((function(n){var r=this;return e(t,(function(e){return Ef(e,r,n)}))}))}))}var gj=mj(Au),yj=ch,bj=Math.min,wj=yj((function(e,t){var n=(t=1==t.length&&Pu(t[0])?Au(t[0],Oh(Ny)):Au(Ev(t,1),Oh(Ny))).length;return ch((function(r){for(var i=-1,o=bj(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ef(e,this,r)}))})),kj=wj,xj=mj(iw),jj=mj(Vg),Sj=9007199254740991,Cj=Math.floor;function $j(e,t){var n="";if(!e||t<1||t>Sj)return n;do{t%2&&(n+=e),(t=Cj(t/2))&&(e+=e)}while(t);return n}var _j=Ty("length"),Oj="\\ud800-\\udfff",Mj="["+Oj+"]",Ej="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Aj="\\ud83c[\\udffb-\\udfff]",Pj="[^"+Oj+"]",Tj="(?:\\ud83c[\\udde6-\\uddff]){2}",Rj="[\\ud800-\\udbff][\\udc00-\\udfff]",Nj="(?:"+Ej+"|"+Aj+")"+"?",Ij="[\\ufe0e\\ufe0f]?",Dj=Ij+Nj+("(?:\\u200d(?:"+[Pj,Tj,Rj].join("|")+")"+Ij+Nj+")*"),zj="(?:"+[Pj+Ej+"?",Ej,Tj,Rj,Mj].join("|")+")",Lj=RegExp(Aj+"(?="+Aj+")|"+zj+Dj,"g");function Bj(e){return ip(e)?function(e){for(var t=Lj.lastIndex=0;Lj.test(e);)++t;return t}(e):_j(e)}var qj=Math.ceil;function Fj(e,t){var n=(t=void 0===t?" ":Iu(t)).length;if(n<2)return n?$j(t,e):t;var r=$j(t,qj(e/Bj(t)));return ip(t)?np(gp(r),0,e).join(""):r.slice(0,e)}var Vj=Math.ceil,Wj=Math.floor;function Hj(e,t,n){e=wv(e);var r=(t=Zu(t))?Bj(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Fj(Wj(i),n)+e+Fj(Vj(i),n)}function Uj(e,t,n){e=wv(e);var r=(t=Zu(t))?Bj(e):0;return t&&r<t?e+Fj(t-r,n):e}function Jj(e,t,n){e=wv(e);var r=(t=Zu(t))?Bj(e):0;return t&&r<t?Fj(t-r,n)+e:e}var Kj=/^\s+/,Gj=pu.parseInt;function Qj(e,t,n){return n||null==t?t=0:t&&(t=+t),Gj(wv(e).replace(Kj,""),t||0)}var Yj=ch((function(e,t){return Xd(e,32,void 0,t,_d(t,kd(Yj)))}));Yj.placeholder={};var Xj=Yj,Zj=ch((function(e,t){return Xd(e,64,void 0,t,_d(t,kd(Zj)))}));Zj.placeholder={};var eS=Zj,tS=Jy((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),nS=tS;var rS=Pv((function(e,t){return null==e?{}:function(e,t){return lj(e,t,(function(t,n){return My(e,n)}))}(e,t)})),iS=rS;function oS(e){for(var t,n=this;n instanceof Nf;){var r=Uf(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function aS(e){return function(t){return null==e?void 0:Sv(e,t)}}function sS(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}var cS=Array.prototype.splice;function lS(e,t,n,r){var i=r?sS:ud,o=-1,a=t.length,s=e;for(e===t&&(t=Hf(t)),n&&(s=Au(e,Oh(n)));++o<a;)for(var c=0,l=t[o],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&cS.call(s,c,1),cS.call(e,c,1);return e}function uS(e,t){return e&&e.length&&t&&t.length?lS(e,t):e}var fS=ch(uS);function dS(e,t,n){return e&&e.length&&t&&t.length?lS(e,t,Ny(n)):e}function hS(e,t,n){return e&&e.length&&t&&t.length?lS(e,t,void 0,n):e}var vS=Array.prototype.splice;function pS(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Sd(i)?vS.call(e,i,1):ij(e,i)}}return e}var mS=Pv((function(e,t){var n=null==e?0:e.length,r=$v(e,t);return pS(e,Au(t,(function(e){return Sd(e,n)?+e:e})).sort(hj)),r})),gS=mS,yS=Math.floor,bS=Math.random;function wS(e,t){return e+yS(bS()*(t-e+1))}var kS=parseFloat,xS=Math.min,jS=Math.random;function SS(e,t,n){if(n&&"boolean"!=typeof n&&dh(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Xu(e),void 0===t?(t=e,e=0):t=Xu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=jS();return xS(e+i*(t-e+kS("1e-"+((i+"").length-1))),t)}return wS(e,t)}var CS=Math.ceil,$S=Math.max;function _S(e){return function(t,n,r){return r&&"number"!=typeof r&&dh(t,n,r)&&(n=r=void 0),t=Xu(t),void 0===n?(n=t,t=0):n=Xu(n),function(e,t,n,r){for(var i=-1,o=$S(CS((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:Xu(r),e)}}var OS=_S(),MS=_S(!0),ES=Pv((function(e,t){return Xd(e,256,void 0,void 0,void 0,t)})),AS=ES;function PS(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function TS(e,t,n){var r=Pu(e)?kp:PS,i=arguments.length<3;return r(e,Ny(t),n,i,Hy)}function RS(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function NS(e,t,n){var r=Pu(e)?RS:PS,i=arguments.length<3;return r(e,Ny(t),n,i,Hb)}function IS(e,t){return(Pu(e)?wm:uw)(e,Gx(Ny(t)))}function DS(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Ny(t);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return pS(e,i),n}function zS(e,t,n){return t=(n?dh(e,t,n):void 0===t)?1:Zu(t),$j(wv(e),t)}function LS(){var e=arguments,t=wv(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function BS(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return ch(e,t=void 0===t?t:Zu(t))}function qS(e,t,n){var r=-1,i=(t=kv(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[jv(t[r])];void 0===o&&(r=i,o=n),e=sf(o)?o.call(e):o}return e}var FS=Array.prototype.reverse;function VS(e){return null==e?e:FS.call(e)}var WS=om("round");function HS(e){var t=e.length;return t?e[wS(0,t-1)]:void 0}function US(e){return HS(ak(e))}function JS(e){return(Pu(e)?HS:US)(e)}function KS(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=wS(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}function GS(e,t){return KS(Hf(e),fm(t,0,e.length))}function QS(e,t){var n=ak(e);return KS(n,fm(t,0,n.length))}function YS(e,t,n){return t=(n?dh(e,t,n):void 0===t)?1:Zu(t),(Pu(e)?GS:QS)(e,t)}function XS(e,t,n){return null==e?e:cj(e,t,n)}function ZS(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:cj(e,t,n,r)}function eC(e){return KS(Hf(e))}function tC(e){return KS(ak(e))}function nC(e){return(Pu(e)?eC:tC)(e)}function rC(e){if(null==e)return 0;if(fh(e))return ik(e)?Bj(e):e.length;var t=Hm(e);return"[object Map]"==t||"[object Set]"==t?e.size:qh(e).length}function iC(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&dh(e,t,n)?(t=0,n=r):(t=null==t?0:Zu(t),n=void 0===n?r:Zu(n)),tp(e,t,n)):[]}var oC=Zp((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),aC=oC;function sC(e,t){var n;return Hy(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function cC(e,t,n){var r=Pu(e)?Vg:sC;return n&&dh(e,t,n)&&(t=void 0),r(e,Ny(t))}var lC=ch((function(e,t){if(null==e)return[];var n=t.length;return n>1&&dh(e,t[0],t[1])?t=[]:n>2&&dh(t[0],t[1],t[2])&&(t=[t[0]]),vj(e,Ev(t,1),[])})),uC=lC,fC=4294967294,dC=Math.floor,hC=Math.min;function vC(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,s=null===t,c=Ou(t),l=void 0===t;i<o;){var u=dC((i+o)/2),f=n(e[u]),d=void 0!==f,h=null===f,v=f==f,p=Ou(f);if(a)var m=r||v;else m=l?v&&(r||d):s?v&&d&&(r||!h):c?v&&d&&!h&&(r||!p):!h&&!p&&(r?f<=t:f<t);m?i=u+1:o=u}return hC(o,fC)}var pC=2147483647;function mC(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=pC){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!Ou(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return vC(e,t,tf,n)}function gC(e,t){return mC(e,t)}function yC(e,t,n){return vC(e,t,Ny(n))}function bC(e,t){var n=null==e?0:e.length;if(n){var r=mC(e,t);if(r<n&&nh(e[r],t))return r}return-1}function wC(e,t){return mC(e,t,!0)}function kC(e,t,n){return vC(e,t,Ny(n),!0)}function xC(e,t){if(null==e?0:e.length){var n=mC(e,t,!0)-1;if(nh(e[n],t))return n}return-1}function jC(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!nh(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function SC(e){return e&&e.length?jC(e):[]}function CC(e,t){return e&&e.length?jC(e,Ny(t)):[]}function $C(e,t,n){return n&&"number"!=typeof n&&dh(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=wv(e))&&("string"==typeof t||null!=t&&!ix(t))&&!(t=Iu(t))&&ip(e)?np(gp(e),0,n):e.split(t,n):[]}var _C=Math.max;function OC(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:_C(Zu(t),0),ch((function(n){var r=n[t],i=np(n,0,t);return r&&_v(i,r),Ef(e,this,i)}))}var MC=Zp((function(e,t,n){return e+(n?" ":"")+bp(t)})),EC=MC;function AC(e,t,n){return e=wv(e),n=null==n?0:fm(Zu(n),0,e.length),t=Iu(t),e.slice(n,n+t.length)==t}function PC(){return{}}function TC(){return""}function RC(){return!0}var NC=Du((function(e,t){return e-t}),0);function IC(e){return e&&e.length?Tx(e,tf):0}function DC(e,t){return e&&e.length?Tx(e,Ny(t)):0}function zC(e){var t=null==e?0:e.length;return t?tp(e,1,t):[]}function LC(e,t,n){return e&&e.length?tp(e,0,(t=n||void 0===t?1:Zu(t))<0?0:t):[]}function BC(e,t,n){var r=null==e?0:e.length;return r?tp(e,(t=r-(t=n||void 0===t?1:Zu(t)))<0?0:t,r):[]}function qC(e,t){return e&&e.length?Db(e,Ny(t),!1,!0):[]}function FC(e,t){return e&&e.length?Db(e,Ny(t)):[]}function VC(e,t){return t(e),e}var WC=Object.prototype,HC=WC.hasOwnProperty;function UC(e,t,n,r){return void 0===e||nh(e,WC[n])&&!HC.call(r,n)?t:e}var JC={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function KC(e){return"\\"+JC[e]}var GC=/<%=([\s\S]+?)%>/g,QC={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:GC,variable:"",imports:{_:{escape:ew}}},YC=/\b__p \+= '';/g,XC=/\b(__p \+=) '' \+/g,ZC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,e$=/[()=,{}\[\]\/\s]/,t$=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,n$=/($^)/,r$=/['\n\r\u2028\u2029\\]/g,i$=Object.prototype.hasOwnProperty;function o$(e,t,n){var r=QC.imports._.templateSettings||QC;n&&dh(e,t,n)&&(t=void 0),e=wv(e),t=Xh({},t,r,UC);var i,o,a=Xh({},t.imports,r.imports,UC),s=Fh(a),c=ok(a,s),l=0,u=t.interpolate||n$,f="__p += '",d=RegExp((t.escape||n$).source+"|"+u.source+"|"+(u===GC?t$:n$).source+"|"+(t.evaluate||n$).source+"|$","g"),h=i$.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(d,(function(t,n,r,a,s,c){return r||(r=a),f+=e.slice(l,c).replace(r$,KC),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(o=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var v=i$.call(t,"variable")&&t.variable;if(v){if(e$.test(v))throw new Error("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(YC,""):f).replace(XC,"$1").replace(ZC,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var p=Uv((function(){return Function(s,h+"return "+f).apply(void 0,c)}));if(p.source=f,Wv(p))throw p;return p}var a$="Expected a function";function s$(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(a$);return Vu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ib(e,t,{leading:r,maxWait:t,trailing:i})}function c$(e,t){return t(e)}var l$=9007199254740991,u$=4294967295,f$=Math.min;function d$(e,t){if((e=Zu(e))<1||e>l$)return[];var n=u$,r=f$(e,u$);t=Bb(t),e-=u$;for(var i=mh(r,t);++n<e;)t(n);return i}function h$(){return this}function v$(e,t){var n=e;return n instanceof Df&&(n=n.value()),kp(t,(function(e,t){return t.func.apply(t.thisArg,_v([e],t.args))}),n)}function p$(){return v$(this.__wrapped__,this.__actions__)}function m$(e){return wv(e).toLowerCase()}function g$(e){return Pu(e)?Au(e,jv):Ou(e)?[e]:Hf(bv(wv(e)))}var y$=9007199254740991;function b$(e){return e?fm(Zu(e),-9007199254740991,y$):0===e?e:0}function w$(e){return wv(e).toUpperCase()}function k$(e,t,n){var r=Pu(e),i=r||$h(e)||Nh(e);if(t=Ny(t),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Vu(e)&&sf(o)?_f(Rv(e)):{}}return(i?sd:Vy)(e,(function(e,r,i){return t(n,e,r,i)})),n}function x$(e,t){for(var n=e.length;n--&&ud(t,e[n],0)>-1;);return n}function j$(e,t){for(var n=-1,r=e.length;++n<r&&ud(t,e[n],0)>-1;);return n}function S$(e,t,n){if((e=wv(e))&&(n||void 0===t))return Fu(e);if(!e||!(t=Iu(t)))return e;var r=gp(e),i=gp(t);return np(r,j$(r,i),x$(r,i)+1).join("")}function C$(e,t,n){if((e=wv(e))&&(n||void 0===t))return e.slice(0,Bu(e)+1);if(!e||!(t=Iu(t)))return e;var r=gp(e);return np(r,0,x$(r,gp(t))+1).join("")}var $$=/^\s+/;function _$(e,t,n){if((e=wv(e))&&(n||void 0===t))return e.replace($$,"");if(!e||!(t=Iu(t)))return e;var r=gp(e);return np(r,j$(r,gp(t))).join("")}var O$=/\w*$/;function M$(e,t){var n=30,r="...";if(Vu(t)){var i="separator"in t?t.separator:i;n="length"in t?Zu(t.length):n,r="omission"in t?Iu(t.omission):r}var o=(e=wv(e)).length;if(ip(e)){var a=gp(e);o=a.length}if(n>=o)return e;var s=n-Bj(r);if(s<1)return r;var c=a?np(a,0,s).join(""):e.slice(0,s);if(void 0===i)return c+r;if(a&&(s+=c.length-s),ix(i)){if(e.slice(s).search(i)){var l,u=c;for(i.global||(i=RegExp(i.source,wv(O$.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var f=l.index;c=c.slice(0,void 0===f?s:f)}}else if(e.indexOf(Iu(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r}function E$(e){return eh(e,1)}var A$=xp({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),P$=/&(?:amp|lt|gt|quot|#39);/g,T$=RegExp(P$.source);function R$(e){return(e=wv(e))&&T$.test(e)?e.replace(P$,A$):e}var N$=Tm&&1/Gg(new Tm([,-0]))[1]==1/0?function(e){return new Tm(e)}:zf,I$=N$,D$=200;function z$(e,t,n){var r=-1,i=fd,o=e.length,a=!0,s=[],c=s;if(n)a=!1,i=Sb;else if(o>=D$){var l=t?null:I$(e);if(l)return Gg(l);a=!1,i=Wg,c=new Fg}else c=t?[]:s;e:for(;++r<o;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}var L$=ch((function(e){return z$(Ev(e,1,fb,!0))})),B$=ch((function(e){var t=Mb(e);return fb(t)&&(t=void 0),z$(Ev(e,1,fb,!0),Ny(t))})),q$=B$,F$=ch((function(e){var t=Mb(e);return t="function"==typeof t?t:void 0,z$(Ev(e,1,fb,!0),void 0,t)}));function V$(e){return e&&e.length?z$(e):[]}function W$(e,t){return e&&e.length?z$(e,Ny(t)):[]}function H$(e,t){return t="function"==typeof t?t:void 0,e&&e.length?z$(e,void 0,t):[]}var U$=0;function J$(e){var t=++U$;return wv(e)+t}function K$(e,t){return null==e||ij(e,t)}var G$=Math.max;function Q$(e){if(!e||!e.length)return[];var t=0;return e=wm(e,(function(e){if(fb(e))return t=G$(e.length,t),!0})),mh(t,(function(t){return Au(e,Ty(t))}))}function Y$(e,t){if(!e||!e.length)return[];var n=Q$(e);return null==t?n:Au(n,(function(e){return Ef(t,void 0,e)}))}function X$(e,t,n,r){return cj(e,t,n(Sv(e,t)),r)}function Z$(e,t,n){return null==e?e:X$(e,t,Bb(n))}function e_(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:X$(e,t,Bb(n),r)}var t_=Zp((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),n_=t_;function r_(e){return null==e?[]:ok(e,Kh(e))}var i_=ch((function(e,t){return fb(e)?$b(e,t):[]})),o_=i_;function a_(e,t){return Xj(Bb(t),e)}var s_=Pv((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return $v(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Df&&Sd(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:c$,args:[i],thisArg:void 0}),new Wf(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)})),c_=s_;function l_(){return sm(this)}function u_(){var e=this.__wrapped__;if(e instanceof Df){var t=e;return this.__actions__.length&&(t=new Df(this)),(t=t.reverse()).__actions__.push({func:c$,args:[VS],thisArg:void 0}),new Wf(t,this.__chain__)}return this.thru(VS)}function f_(e,t,n){var r=e.length;if(r<2)return r?z$(e[0]):[];for(var i=-1,o=Array(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=$b(o[i]||a,e[s],t,n));return z$(Ev(o,1),t,n)}var d_=ch((function(e){return f_(wm(e,fb))})),h_=ch((function(e){var t=Mb(e);return fb(t)&&(t=void 0),f_(wm(e,fb),Ny(t))})),v_=h_,p_=ch((function(e){var t=Mb(e);return t="function"==typeof t?t:void 0,f_(wm(e,fb),void 0,t)})),m_=ch(Q$);function g_(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}function y_(e,t){return g_(e||[],t||[],ih)}function b_(e,t){return g_(e||[],t||[],cj)}var w_=ch((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Y$(e,n)})),k_=w_,x_={chunk:um,compact:Bg,concat:qg,difference:Ob,differenceBy:Ab,differenceWith:Tb,drop:Nb,dropRight:Ib,dropRightWhile:zb,dropWhile:Lb,fill:lw,findIndex:vw,findLastIndex:ww,first:jw,flatten:Av,flattenDeep:Mw,flattenDepth:Ew,fromPairs:Bw,head:jw,indexOf:uk,initial:fk,intersection:pk,intersectionBy:gk,intersectionWith:yk,join:dx,last:Mb,lastIndexOf:bx,nth:nj,pull:fS,pullAll:uS,pullAllBy:dS,pullAllWith:hS,pullAt:gS,remove:DS,reverse:VS,slice:iC,sortedIndex:gC,sortedIndexBy:yC,sortedIndexOf:bC,sortedLastIndex:wC,sortedLastIndexBy:kC,sortedLastIndexOf:xC,sortedUniq:SC,sortedUniqBy:CC,tail:zC,take:LC,takeRight:BC,takeRightWhile:qC,takeWhile:FC,union:L$,unionBy:q$,unionWith:F$,uniq:V$,uniqBy:W$,uniqWith:H$,unzip:Q$,unzipWith:Y$,without:o_,xor:d_,xorBy:v_,xorWith:p_,zip:m_,zipObject:y_,zipObjectDeep:b_,zipWith:k_},j_={countBy:Qy,each:qb,eachRight:Ub,every:aw,filter:fw,find:pw,findLast:kw,flatMap:$w,flatMapDeep:_w,flatMapDepth:Ow,forEach:qb,forEachRight:Ub,groupBy:Uw,includes:ck,invokeMap:Pk,keyBy:mx,map:Cw,orderBy:pj,partition:nS,reduce:TS,reduceRight:NS,reject:IS,sample:JS,sampleSize:YS,shuffle:nC,size:rC,some:cC,sortBy:uC},S_={now:eb},C_={after:ef,ary:eh,before:Kv,bind:Qv,bindKey:ep,curry:Xy,curryRight:Zy,debounce:ib,defer:kb,delay:jb,flip:Aw,memoize:pv,negate:Gx,once:dj,overArgs:kj,partial:Xj,partialRight:eS,rearg:AS,rest:BS,spread:OC,throttle:s$,unary:E$,wrap:a_},$_={castArray:nm,clone:Tg,cloneDeep:Rg,cloneDeepWith:Dg,cloneWith:zg,conformsTo:Ly,eq:nh,gt:Gw,gte:Qw,isArguments:kh,isArray:Pu,isArrayBuffer:Rk,isArrayLike:fh,isArrayLikeObject:fb,isBoolean:Nk,isBuffer:$h,isDate:Dk,isElement:zk,isEmpty:Fk,isEqual:Vk,isEqualWith:Wk,isError:Wv,isFinite:Uk,isFunction:sf,isInteger:Jk,isLength:uh,isMap:kg,isMatch:Kk,isMatchWith:Gk,isNaN:Xk,isNative:ex,isNil:tx,isNull:nx,isNumber:Yk,isObject:Vu,isObjectLike:$u,isPlainObject:qv,isRegExp:ix,isSafeInteger:ax,isSet:jg,isString:ik,isSymbol:Ou,isTypedArray:Nh,isUndefined:sx,isWeakMap:cx,isWeakSet:lx,lt:Sx,lte:Cx,toArray:Zx,toFinite:Xu,toInteger:Zu,toLength:cw,toNumber:Gu,toPlainObject:hb,toSafeInteger:b$,toString:wv},__={add:zu,ceil:am,divide:Rb,floor:Pw,max:Ax,maxBy:Px,mean:Ix,meanBy:Dx,min:Wx,minBy:Hx,multiply:Jx,round:WS,subtract:NC,sum:IC,sumBy:DC},O_=dm,M_=nk,E_=SS,A_={assign:Hh,assignIn:Qh,assignInWith:Xh,assignWith:ev,at:Tv,create:Yy,defaults:lb,defaultsDeep:yb,entries:Gb,entriesIn:Qb,extend:Qh,extendWith:Xh,findKey:gw,findLastKey:xw,forIn:Iw,forInRight:Dw,forOwn:zw,forOwnRight:Lw,functions:Fw,functionsIn:Vw,get:Cv,has:Zw,hasIn:My,invert:xk,invertBy:_k,invoke:Ek,keys:Fh,keysIn:Kh,mapKeys:$x,mapValues:_x,merge:Lx,mergeWith:gb,omit:sj,omitBy:fj,pick:iS,pickBy:uj,result:qS,set:XS,setWith:ZS,toPairs:Gb,toPairsIn:Qb,transform:k$,unset:K$,update:Z$,updateWith:e_,values:ak,valuesIn:r_},P_={at:c_,chain:sm,commit:Lg,lodash:Kf,next:ej,plant:oS,reverse:u_,tap:VC,thru:c$,toIterator:h$,toJSON:p$,value:p$,valueOf:p$,wrapperChain:l_},T_={camelCase:tm,capitalize:wp,deburr:$p,endsWith:Jb,escape:ew,escapeRegExp:rw,kebabCase:vx,lowerCase:kx,lowerFirst:xx,pad:Hj,padEnd:Uj,padStart:Jj,parseInt:Qj,repeat:zS,replace:LS,snakeCase:aC,split:$C,startCase:EC,startsWith:AC,template:o$,templateSettings:QC,toLower:m$,toUpper:w$,trim:S$,trimEnd:C$,trimStart:_$,truncate:M$,unescape:R$,upperCase:n_,upperFirst:bp,words:Yp},R_={attempt:Uv,bindAll:Xv,cond:Iy,conforms:zy,constant:nd,defaultTo:ob,flow:Rw,flowRight:Nw,identity:tf,iteratee:ux,matches:Ox,matchesProperty:Mx,method:qx,methodOf:Vx,mixin:Ux,noop:zf,nthArg:rj,over:gj,overEvery:xj,overSome:jj,property:Ry,propertyOf:aS,range:OS,rangeRight:MS,stubArray:km,stubFalse:xh,stubObject:PC,stubString:TC,stubTrue:RC,times:d$,toPath:g$,uniqueId:J$};var N_=Math.max,I_=Math.min;var D_=Math.min;
/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var z_,L_=4294967295,B_=Array.prototype,q_=Object.prototype.hasOwnProperty,F_=mu?mu.iterator:void 0,V_=Math.max,W_=Math.min,H_=function(e){return function(t,n,r){if(null==r){var i=Vu(n),o=i&&Fh(n),a=o&&o.length&&qw(n,o);(a?a.length:i)||(r=n,n=t,t=this)}return e(t,n,r)}}(Ux);Kf.after=C_.after,Kf.ary=C_.ary,Kf.assign=A_.assign,Kf.assignIn=A_.assignIn,Kf.assignInWith=A_.assignInWith,Kf.assignWith=A_.assignWith,Kf.at=A_.at,Kf.before=C_.before,Kf.bind=C_.bind,Kf.bindAll=R_.bindAll,Kf.bindKey=C_.bindKey,Kf.castArray=$_.castArray,Kf.chain=P_.chain,Kf.chunk=x_.chunk,Kf.compact=x_.compact,Kf.concat=x_.concat,Kf.cond=R_.cond,Kf.conforms=R_.conforms,Kf.constant=R_.constant,Kf.countBy=j_.countBy,Kf.create=A_.create,Kf.curry=C_.curry,Kf.curryRight=C_.curryRight,Kf.debounce=C_.debounce,Kf.defaults=A_.defaults,Kf.defaultsDeep=A_.defaultsDeep,Kf.defer=C_.defer,Kf.delay=C_.delay,Kf.difference=x_.difference,Kf.differenceBy=x_.differenceBy,Kf.differenceWith=x_.differenceWith,Kf.drop=x_.drop,Kf.dropRight=x_.dropRight,Kf.dropRightWhile=x_.dropRightWhile,Kf.dropWhile=x_.dropWhile,Kf.fill=x_.fill,Kf.filter=j_.filter,Kf.flatMap=j_.flatMap,Kf.flatMapDeep=j_.flatMapDeep,Kf.flatMapDepth=j_.flatMapDepth,Kf.flatten=x_.flatten,Kf.flattenDeep=x_.flattenDeep,Kf.flattenDepth=x_.flattenDepth,Kf.flip=C_.flip,Kf.flow=R_.flow,Kf.flowRight=R_.flowRight,Kf.fromPairs=x_.fromPairs,Kf.functions=A_.functions,Kf.functionsIn=A_.functionsIn,Kf.groupBy=j_.groupBy,Kf.initial=x_.initial,Kf.intersection=x_.intersection,Kf.intersectionBy=x_.intersectionBy,Kf.intersectionWith=x_.intersectionWith,Kf.invert=A_.invert,Kf.invertBy=A_.invertBy,Kf.invokeMap=j_.invokeMap,Kf.iteratee=R_.iteratee,Kf.keyBy=j_.keyBy,Kf.keys=Fh,Kf.keysIn=A_.keysIn,Kf.map=j_.map,Kf.mapKeys=A_.mapKeys,Kf.mapValues=A_.mapValues,Kf.matches=R_.matches,Kf.matchesProperty=R_.matchesProperty,Kf.memoize=C_.memoize,Kf.merge=A_.merge,Kf.mergeWith=A_.mergeWith,Kf.method=R_.method,Kf.methodOf=R_.methodOf,Kf.mixin=H_,Kf.negate=Gx,Kf.nthArg=R_.nthArg,Kf.omit=A_.omit,Kf.omitBy=A_.omitBy,Kf.once=C_.once,Kf.orderBy=j_.orderBy,Kf.over=R_.over,Kf.overArgs=C_.overArgs,Kf.overEvery=R_.overEvery,Kf.overSome=R_.overSome,Kf.partial=C_.partial,Kf.partialRight=C_.partialRight,Kf.partition=j_.partition,Kf.pick=A_.pick,Kf.pickBy=A_.pickBy,Kf.property=R_.property,Kf.propertyOf=R_.propertyOf,Kf.pull=x_.pull,Kf.pullAll=x_.pullAll,Kf.pullAllBy=x_.pullAllBy,Kf.pullAllWith=x_.pullAllWith,Kf.pullAt=x_.pullAt,Kf.range=R_.range,Kf.rangeRight=R_.rangeRight,Kf.rearg=C_.rearg,Kf.reject=j_.reject,Kf.remove=x_.remove,Kf.rest=C_.rest,Kf.reverse=x_.reverse,Kf.sampleSize=j_.sampleSize,Kf.set=A_.set,Kf.setWith=A_.setWith,Kf.shuffle=j_.shuffle,Kf.slice=x_.slice,Kf.sortBy=j_.sortBy,Kf.sortedUniq=x_.sortedUniq,Kf.sortedUniqBy=x_.sortedUniqBy,Kf.split=T_.split,Kf.spread=C_.spread,Kf.tail=x_.tail,Kf.take=x_.take,Kf.takeRight=x_.takeRight,Kf.takeRightWhile=x_.takeRightWhile,Kf.takeWhile=x_.takeWhile,Kf.tap=P_.tap,Kf.throttle=C_.throttle,Kf.thru=c$,Kf.toArray=$_.toArray,Kf.toPairs=A_.toPairs,Kf.toPairsIn=A_.toPairsIn,Kf.toPath=R_.toPath,Kf.toPlainObject=$_.toPlainObject,Kf.transform=A_.transform,Kf.unary=C_.unary,Kf.union=x_.union,Kf.unionBy=x_.unionBy,Kf.unionWith=x_.unionWith,Kf.uniq=x_.uniq,Kf.uniqBy=x_.uniqBy,Kf.uniqWith=x_.uniqWith,Kf.unset=A_.unset,Kf.unzip=x_.unzip,Kf.unzipWith=x_.unzipWith,Kf.update=A_.update,Kf.updateWith=A_.updateWith,Kf.values=A_.values,Kf.valuesIn=A_.valuesIn,Kf.without=x_.without,Kf.words=T_.words,Kf.wrap=C_.wrap,Kf.xor=x_.xor,Kf.xorBy=x_.xorBy,Kf.xorWith=x_.xorWith,Kf.zip=x_.zip,Kf.zipObject=x_.zipObject,Kf.zipObjectDeep=x_.zipObjectDeep,Kf.zipWith=x_.zipWith,Kf.entries=A_.toPairs,Kf.entriesIn=A_.toPairsIn,Kf.extend=A_.assignIn,Kf.extendWith=A_.assignInWith,H_(Kf,Kf),Kf.add=__.add,Kf.attempt=R_.attempt,Kf.camelCase=T_.camelCase,Kf.capitalize=T_.capitalize,Kf.ceil=__.ceil,Kf.clamp=O_,Kf.clone=$_.clone,Kf.cloneDeep=$_.cloneDeep,Kf.cloneDeepWith=$_.cloneDeepWith,Kf.cloneWith=$_.cloneWith,Kf.conformsTo=$_.conformsTo,Kf.deburr=T_.deburr,Kf.defaultTo=R_.defaultTo,Kf.divide=__.divide,Kf.endsWith=T_.endsWith,Kf.eq=$_.eq,Kf.escape=T_.escape,Kf.escapeRegExp=T_.escapeRegExp,Kf.every=j_.every,Kf.find=j_.find,Kf.findIndex=x_.findIndex,Kf.findKey=A_.findKey,Kf.findLast=j_.findLast,Kf.findLastIndex=x_.findLastIndex,Kf.findLastKey=A_.findLastKey,Kf.floor=__.floor,Kf.forEach=j_.forEach,Kf.forEachRight=j_.forEachRight,Kf.forIn=A_.forIn,Kf.forInRight=A_.forInRight,Kf.forOwn=A_.forOwn,Kf.forOwnRight=A_.forOwnRight,Kf.get=A_.get,Kf.gt=$_.gt,Kf.gte=$_.gte,Kf.has=A_.has,Kf.hasIn=A_.hasIn,Kf.head=x_.head,Kf.identity=tf,Kf.includes=j_.includes,Kf.indexOf=x_.indexOf,Kf.inRange=M_,Kf.invoke=A_.invoke,Kf.isArguments=$_.isArguments,Kf.isArray=Pu,Kf.isArrayBuffer=$_.isArrayBuffer,Kf.isArrayLike=$_.isArrayLike,Kf.isArrayLikeObject=$_.isArrayLikeObject,Kf.isBoolean=$_.isBoolean,Kf.isBuffer=$_.isBuffer,Kf.isDate=$_.isDate,Kf.isElement=$_.isElement,Kf.isEmpty=$_.isEmpty,Kf.isEqual=$_.isEqual,Kf.isEqualWith=$_.isEqualWith,Kf.isError=$_.isError,Kf.isFinite=$_.isFinite,Kf.isFunction=$_.isFunction,Kf.isInteger=$_.isInteger,Kf.isLength=$_.isLength,Kf.isMap=$_.isMap,Kf.isMatch=$_.isMatch,Kf.isMatchWith=$_.isMatchWith,Kf.isNaN=$_.isNaN,Kf.isNative=$_.isNative,Kf.isNil=$_.isNil,Kf.isNull=$_.isNull,Kf.isNumber=$_.isNumber,Kf.isObject=Vu,Kf.isObjectLike=$_.isObjectLike,Kf.isPlainObject=$_.isPlainObject,Kf.isRegExp=$_.isRegExp,Kf.isSafeInteger=$_.isSafeInteger,Kf.isSet=$_.isSet,Kf.isString=$_.isString,Kf.isSymbol=$_.isSymbol,Kf.isTypedArray=$_.isTypedArray,Kf.isUndefined=$_.isUndefined,Kf.isWeakMap=$_.isWeakMap,Kf.isWeakSet=$_.isWeakSet,Kf.join=x_.join,Kf.kebabCase=T_.kebabCase,Kf.last=Mb,Kf.lastIndexOf=x_.lastIndexOf,Kf.lowerCase=T_.lowerCase,Kf.lowerFirst=T_.lowerFirst,Kf.lt=$_.lt,Kf.lte=$_.lte,Kf.max=__.max,Kf.maxBy=__.maxBy,Kf.mean=__.mean,Kf.meanBy=__.meanBy,Kf.min=__.min,Kf.minBy=__.minBy,Kf.stubArray=R_.stubArray,Kf.stubFalse=R_.stubFalse,Kf.stubObject=R_.stubObject,Kf.stubString=R_.stubString,Kf.stubTrue=R_.stubTrue,Kf.multiply=__.multiply,Kf.nth=x_.nth,Kf.noop=R_.noop,Kf.now=S_.now,Kf.pad=T_.pad,Kf.padEnd=T_.padEnd,Kf.padStart=T_.padStart,Kf.parseInt=T_.parseInt,Kf.random=E_,Kf.reduce=j_.reduce,Kf.reduceRight=j_.reduceRight,Kf.repeat=T_.repeat,Kf.replace=T_.replace,Kf.result=A_.result,Kf.round=__.round,Kf.sample=j_.sample,Kf.size=j_.size,Kf.snakeCase=T_.snakeCase,Kf.some=j_.some,Kf.sortedIndex=x_.sortedIndex,Kf.sortedIndexBy=x_.sortedIndexBy,Kf.sortedIndexOf=x_.sortedIndexOf,Kf.sortedLastIndex=x_.sortedLastIndex,Kf.sortedLastIndexBy=x_.sortedLastIndexBy,Kf.sortedLastIndexOf=x_.sortedLastIndexOf,Kf.startCase=T_.startCase,Kf.startsWith=T_.startsWith,Kf.subtract=__.subtract,Kf.sum=__.sum,Kf.sumBy=__.sumBy,Kf.template=T_.template,Kf.times=R_.times,Kf.toFinite=$_.toFinite,Kf.toInteger=Zu,Kf.toLength=$_.toLength,Kf.toLower=T_.toLower,Kf.toNumber=$_.toNumber,Kf.toSafeInteger=$_.toSafeInteger,Kf.toString=$_.toString,Kf.toUpper=T_.toUpper,Kf.trim=T_.trim,Kf.trimEnd=T_.trimEnd,Kf.trimStart=T_.trimStart,Kf.truncate=T_.truncate,Kf.unescape=T_.unescape,Kf.uniqueId=R_.uniqueId,Kf.upperCase=T_.upperCase,Kf.upperFirst=T_.upperFirst,Kf.each=j_.forEach,Kf.eachRight=j_.forEachRight,Kf.first=x_.head,H_(Kf,(z_={},Vy(Kf,(function(e,t){q_.call(Kf.prototype,t)||(z_[t]=e)})),z_),{chain:!1}),Kf.VERSION="4.17.21",(Kf.templateSettings=T_.templateSettings).imports._=Kf,sd(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Kf[e].placeholder=Kf})),sd(["drop","take"],(function(e,t){Df.prototype[e]=function(n){n=void 0===n?1:V_(Zu(n),0);var r=this.__filtered__&&!t?new Df(this):this.clone();return r.__filtered__?r.__takeCount__=W_(n,r.__takeCount__):r.__views__.push({size:W_(n,L_),type:e+(r.__dir__<0?"Right":"")}),r},Df.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),sd(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Df.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ny(e),type:n}),t.__filtered__=t.__filtered__||r,t}})),sd(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Df.prototype[e]=function(){return this[n](1).value()[0]}})),sd(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Df.prototype[e]=function(){return this.__filtered__?new Df(this):this[n](1)}})),Df.prototype.compact=function(){return this.filter(tf)},Df.prototype.find=function(e){return this.filter(e).head()},Df.prototype.findLast=function(e){return this.reverse().find(e)},Df.prototype.invokeMap=ch((function(e,t){return"function"==typeof e?new Df(this):this.map((function(n){return Mk(n,e,t)}))})),Df.prototype.reject=function(e){return this.filter(Gx(Ny(e)))},Df.prototype.slice=function(e,t){e=Zu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Df(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Zu(t))<0?n.dropRight(-t):n.take(t-e)),n)},Df.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Df.prototype.toArray=function(){return this.take(L_)},Vy(Df.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Kf[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Kf.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Df,c=a[0],l=s||Pu(t),u=function(e){var t=i.apply(Kf,_v([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=o&&!f,v=s&&!d;if(!o&&l){t=v?t:new Df(this);var p=e.apply(t,a);return p.__actions__.push({func:c$,args:[u],thisArg:void 0}),new Wf(p,f)}return h&&v?e.apply(this,a):(p=this.thru(u),h?r?p.value()[0]:p.value():p)})})),sd(["pop","push","shift","sort","splice","unshift"],(function(e){var t=B_[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Kf.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Pu(i)?i:[],e)}return this[n]((function(n){return t.apply(Pu(n)?n:[],e)}))}})),Vy(Df.prototype,(function(e,t){var n=Kf[t];if(n){var r=n.name+"";q_.call(qf,r)||(qf[r]=[]),qf[r].push({name:t,func:n})}})),qf[Rd(void 0,2).name]=[{name:"wrapper",func:void 0}],Df.prototype.clone=function(){var e=new Df(this.__wrapped__);return e.__actions__=Hf(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Hf(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Hf(this.__views__),e},Df.prototype.reverse=function(){if(this.__filtered__){var e=new Df(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Df.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pu(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=I_(t,e+a);break;case"takeRight":e=N_(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=r?s:a-1,u=this.__iteratees__,f=u.length,d=0,h=D_(c,this.__takeCount__);if(!n||!r&&i==c&&h==c)return v$(e,this.__actions__);var v=[];e:for(;c--&&d<h;){for(var p=-1,m=e[l+=t];++p<f;){var g=u[p],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}v[d++]=m}return v},Kf.prototype.at=P_.at,Kf.prototype.chain=P_.wrapperChain,Kf.prototype.commit=P_.commit,Kf.prototype.next=P_.next,Kf.prototype.plant=P_.plant,Kf.prototype.reverse=P_.reverse,Kf.prototype.toJSON=Kf.prototype.valueOf=Kf.prototype.value=P_.value,Kf.prototype.first=Kf.prototype.head,F_&&(Kf.prototype[F_]=P_.toIterator)
/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/;var U_=Object.freeze({__proto__:null,add:zu,after:ef,ary:eh,assign:Hh,assignIn:Qh,assignInWith:Xh,assignWith:ev,at:Tv,attempt:Uv,before:Kv,bind:Qv,bindAll:Xv,bindKey:ep,camelCase:tm,capitalize:wp,castArray:nm,ceil:am,chain:sm,chunk:um,clamp:dm,clone:Tg,cloneDeep:Rg,cloneDeepWith:Dg,cloneWith:zg,commit:Lg,compact:Bg,concat:qg,cond:Iy,conforms:zy,conformsTo:Ly,constant:nd,countBy:Qy,create:Yy,curry:Xy,curryRight:Zy,debounce:ib,deburr:$p,default:Kf,defaultTo:ob,defaults:lb,defaultsDeep:yb,defer:kb,delay:jb,difference:Ob,differenceBy:Ab,differenceWith:Tb,divide:Rb,drop:Nb,dropRight:Ib,dropRightWhile:zb,dropWhile:Lb,each:qb,eachRight:Ub,endsWith:Jb,entries:Gb,entriesIn:Qb,eq:nh,escape:ew,escapeRegExp:rw,every:aw,extend:Qh,extendWith:Xh,fill:lw,filter:fw,find:pw,findIndex:vw,findKey:gw,findLast:kw,findLastIndex:ww,findLastKey:xw,first:jw,flatMap:$w,flatMapDeep:_w,flatMapDepth:Ow,flatten:Av,flattenDeep:Mw,flattenDepth:Ew,flip:Aw,floor:Pw,flow:Rw,flowRight:Nw,forEach:qb,forEachRight:Ub,forIn:Iw,forInRight:Dw,forOwn:zw,forOwnRight:Lw,fromPairs:Bw,functions:Fw,functionsIn:Vw,get:Cv,groupBy:Uw,gt:Gw,gte:Qw,has:Zw,hasIn:My,head:jw,identity:tf,inRange:nk,includes:ck,indexOf:uk,initial:fk,intersection:pk,intersectionBy:gk,intersectionWith:yk,invert:xk,invertBy:_k,invoke:Ek,invokeMap:Pk,isArguments:kh,isArray:Pu,isArrayBuffer:Rk,isArrayLike:fh,isArrayLikeObject:fb,isBoolean:Nk,isBuffer:$h,isDate:Dk,isElement:zk,isEmpty:Fk,isEqual:Vk,isEqualWith:Wk,isError:Wv,isFinite:Uk,isFunction:sf,isInteger:Jk,isLength:uh,isMap:kg,isMatch:Kk,isMatchWith:Gk,isNaN:Xk,isNative:ex,isNil:tx,isNull:nx,isNumber:Yk,isObject:Vu,isObjectLike:$u,isPlainObject:qv,isRegExp:ix,isSafeInteger:ax,isSet:jg,isString:ik,isSymbol:Ou,isTypedArray:Nh,isUndefined:sx,isWeakMap:cx,isWeakSet:lx,iteratee:ux,join:dx,kebabCase:vx,keyBy:mx,keys:Fh,keysIn:Kh,last:Mb,lastIndexOf:bx,lodash:Kf,lowerCase:kx,lowerFirst:xx,lt:Sx,lte:Cx,map:Cw,mapKeys:$x,mapValues:_x,matches:Ox,matchesProperty:Mx,max:Ax,maxBy:Px,mean:Ix,meanBy:Dx,memoize:pv,merge:Lx,mergeWith:gb,method:qx,methodOf:Vx,min:Wx,minBy:Hx,mixin:Ux,multiply:Jx,negate:Gx,next:ej,noop:zf,now:eb,nth:nj,nthArg:rj,omit:sj,omitBy:fj,once:dj,orderBy:pj,over:gj,overArgs:kj,overEvery:xj,overSome:jj,pad:Hj,padEnd:Uj,padStart:Jj,parseInt:Qj,partial:Xj,partialRight:eS,partition:nS,pick:iS,pickBy:uj,plant:oS,property:Ry,propertyOf:aS,pull:fS,pullAll:uS,pullAllBy:dS,pullAllWith:hS,pullAt:gS,random:SS,range:OS,rangeRight:MS,rearg:AS,reduce:TS,reduceRight:NS,reject:IS,remove:DS,repeat:zS,replace:LS,rest:BS,result:qS,reverse:VS,round:WS,sample:JS,sampleSize:YS,set:XS,setWith:ZS,shuffle:nC,size:rC,slice:iC,snakeCase:aC,some:cC,sortBy:uC,sortedIndex:gC,sortedIndexBy:yC,sortedIndexOf:bC,sortedLastIndex:wC,sortedLastIndexBy:kC,sortedLastIndexOf:xC,sortedUniq:SC,sortedUniqBy:CC,split:$C,spread:OC,startCase:EC,startsWith:AC,stubArray:km,stubFalse:xh,stubObject:PC,stubString:TC,stubTrue:RC,subtract:NC,sum:IC,sumBy:DC,tail:zC,take:LC,takeRight:BC,takeRightWhile:qC,takeWhile:FC,tap:VC,template:o$,templateSettings:QC,throttle:s$,thru:c$,times:d$,toArray:Zx,toFinite:Xu,toInteger:Zu,toIterator:h$,toJSON:p$,toLength:cw,toLower:m$,toNumber:Gu,toPairs:Gb,toPairsIn:Qb,toPath:g$,toPlainObject:hb,toSafeInteger:b$,toString:wv,toUpper:w$,transform:k$,trim:S$,trimEnd:C$,trimStart:_$,truncate:M$,unary:E$,unescape:R$,union:L$,unionBy:q$,unionWith:F$,uniq:V$,uniqBy:W$,uniqWith:H$,uniqueId:J$,unset:K$,unzip:Q$,unzipWith:Y$,update:Z$,updateWith:e_,upperCase:n_,upperFirst:bp,value:p$,valueOf:p$,values:ak,valuesIn:r_,without:o_,words:Yp,wrap:a_,wrapperAt:c_,wrapperChain:l_,wrapperCommit:Lg,wrapperLodash:Kf,wrapperNext:ej,wrapperPlant:oS,wrapperReverse:u_,wrapperToIterator:h$,wrapperValue:p$,xor:d_,xorBy:v_,xorWith:p_,zip:m_,zipObject:y_,zipObjectDeep:b_,zipWith:k_}),J_=1e4,K_=[];function G_(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};if(!Array.isArray(e))throw new TypeError("Array expected");function r(e,i){(!Array.isArray(e)&&!ru(e)||t&&i.length>0)&&(n[oc(i)]=!0),ru(e)&&Object.keys(e).forEach((function(t){r(e[t],i.concat(t))}))}for(var i=Math.min(e.length,J_),o=0;o<i;o++){r(e[o],K_)}return Object.keys(n).sort().map(ic)}function Q_(e,t,n){if(!(t<=e))for(var r=e;r<t;r++)n(r)}function Y_(e,t){return e.length>t?e.slice(0,t):e}function X_(e){return Ri({},e)}function Z_(e){return Object.values(e)}function eO(e,t,n,r){var i=e.slice(0),o=i.splice(t,n);return i.splice.apply(i,[t+r,0].concat(Bi(o))),i}function tO(e,t){try{return t.parse(e)}catch(n){return t.parse(Xl(e))}}function nO(e,t){try{return tO(e,t)}catch(e){return}}function rO(e,t){e=e.replace(oO,"");try{return t(e)}catch(e){}try{return t("["+e+"]")}catch(e){}try{return t("{"+e+"}")}catch(e){}throw new Error("Failed to parse partial JSON")}function iO(e){e=e.replace(oO,"");try{return Xl(e)}catch(e){}try{var t=Xl("["+e+"]");return t.substring(1,t.length-1)}catch(e){}try{var n=Xl("{"+e+"}");return n.substring(1,n.length-1)}catch(e){}throw new Error("Failed to repair partial JSON")}var oO=/,\s*$/;function aO(e,t){var n=mO.exec(t);if(n){var r=eu(n[2]),i=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,i=0,o=n;o<r;o++)e.charAt(o)===t&&i++;return i}(e,"\n",0,r),o=r-e.lastIndexOf("\n",r)-1;return{position:r,line:i,column:o,message:t.replace(mO,(function(){return"line ".concat(i+1," column ").concat(o+1)}))}}var a=gO.exec(t),s=a?eu(a[1]):null,c=null!==s?s-1:null,l=yO.exec(t),u=l?eu(l[1]):null,f=null!==u?u-1:null,d=null!==c&&null!==f?function(e,t,n){var r=e.indexOf("\n"),i=1;for(;i<t&&-1!==r;)r=e.indexOf("\n",r+1),i++;return-1!==r?r+n+1:null}(e,c,f):null;return{position:d,line:c,column:f,message:t.replace(/^JSON.parse: /,"").replace(/ of the JSON data$/,"")}}function sO(e){return ru(e)?void 0!==e.json?void 0!==e.text?'Content must contain either a property "json" or a property "text" but not both':null:void 0===e.text?'Content must contain either a property "json" or a property "text"':"string"!=typeof e.text?'Content "text" property must be a string containing a JSON document. Did you mean to use the "json" property instead?':null:"Content must be an object"}function cO(e){return ru(e)&&(void 0!==e.json||"string"==typeof e.text)}function lO(e){return ru(e)&&"string"==typeof e.text}function uO(e){return ru(e)&&void 0!==e.json&&!lO(e)}function fO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return lO(e)?e:{text:n.stringify(e.json,null,t)}}function dO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return uO(e)?e:{json:t.parse(e.text)}}function hO(e,t,n){return fO(e,t,n).text}function vO(e,t){return pO(e,t)>t}function pO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(lO(e))return e.text.length;var n=e.json,r=0;return function e(n){if(Array.isArray(n)){if((r+=n.length-1+2)>t)return r;for(var i=0;i<n.length;i++){if(e(n[i]),r>t)return r}}else if(ru(n)){var o=Object.keys(n);r+=2+o.length+(o.length-1);for(var a=0;a<o.length;a++){var s=o[a],c=n[s];r+=s.length+2,e(c)}}else r+="string"==typeof n?n.length+2:String(n).length}(n),r}var mO=/(position|char) (\d+)/,gO=/line (\d+)/,yO=/column (\d+)/;function bO(e,t){return e.parse===t.parse&&e.stringify===t.stringify}function wO(e){return kO.test(e)&&e.length>2}var kO=/^[[{]\S/;function xO(e){var t=e.escapeControlCharacters,n=e.escapeUnicodeCharacters;return t?n?jO:SO:n?CO:$O}var jO={escapeValue:function(e){return _O(AO(String(e)))},unescapeValue:function(e){return PO(OO(e))}},SO={escapeValue:function(e){return AO(String(e))},unescapeValue:function(e){return PO(e)}},CO={escapeValue:function(e){return _O(String(e))},unescapeValue:function(e){return OO(e)}},$O={escapeValue:function(e){return String(e)},unescapeValue:function(e){return e}};function _O(e){return e.replace(/[^\x20-\x7F]/g,(function(e){var t;return"\b"===e||"\f"===e||"\n"===e||"\r"===e||"\t"===e?e:"\\u"+("000"+(null===(t=e.codePointAt(0))||void 0===t?void 0:t.toString(16))).slice(-4)}))}function OO(e){return e.replace(/\\u[a-fA-F0-9]{4}/g,(function(e){try{var t=JSON.parse('"'+e+'"');return MO[t]||t}catch(t){return e}}))}var MO={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},EO={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function AO(e){return e.replace(/["\b\f\n\r\t\\]/g,(function(e){return MO[e]||e}))}function PO(e){return e.replace(/\\["bfnrt\\]/g,(function(e){return EO[e]||e}))}function TO(e){return"string"!=typeof e?String(e):e.endsWith("\n")?e+"\n":e}function RO(e,t){return IO(e,(function(e){return e.nodeName.toUpperCase()===t.toUpperCase()}))}function NO(e,t,n){return IO(e,(function(e){return function(e,t,n){return"function"==typeof e.getAttribute&&e.getAttribute(t)===n}(e,t,n)}))}function IO(e,t){return!!DO(e,t)}function DO(e,t){for(var n=e;n&&!t(n);)n=n.parentNode;return n||void 0}function zO(e){if(null!=e.firstChild){var t=document.createRange(),n=window.getSelection();t.setStart(e,1),t.collapse(!0),null==n||n.removeAllRanges(),null==n||n.addRange(t)}else e.focus()}function LO(e,t,n,r){var i=BO(e);if(i){var o=i.document.activeElement?i.document.activeElement:null;o&&o.isContentEditable&&(o.textContent=n?t:o.textContent+t,console.log("UPDATED TEXT",n?t:o.textContent+t),zO(o),r&&r(o))}}function BO(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:null}function qO(e){var t=BO(e),n=null==t?void 0:t.document.activeElement;return!!n&&IO(n,(function(t){return t===e}))}function FO(e,t){return DO(e,(function(e){return e.nodeName===t}))}function VO(e){return NO(e,"data-type","selectable-key")?Xa.key:NO(e,"data-type","selectable-value")?Xa.value:NO(e,"data-type","insert-selection-area-inside")?Xa.inside:NO(e,"data-type","insert-selection-area-after")?Xa.after:Xa.multi}function WO(e){return encodeURIComponent(oc(e))}function HO(e){var t=DO(e,(function(e){return!(null==e||!e.hasAttribute)&&e.hasAttribute("data-path")})),n=null==t?void 0:t.getAttribute("data-path");return n?ic(decodeURIComponent(n)):null}function UO(e){var t=e.allElements,n=e.currentElement,r=e.direction,i=e.hasPrio,o=void 0===i?function(){return!0}:i,a=e.margin,s=void 0===a?10:a,c=Cw(t.filter((function(e){var t=e.getBoundingClientRect();return t.width>0&&t.height>0})),u),l=u(n);function u(e){var t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2,rect:t,element:e}}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.x-t.x,i=(e.y-t.y)*n;return Math.sqrt(r*r+i*i)}var d=function(e){return f(e,l)};if("Left"===r||"Right"===r){var h="Left"===r?c.filter((function(e){return t=l,e.rect.left+s<t.rect.left;var t})):c.filter((function(e){return t=l,e.rect.right>t.rect.right+s;var t})),v=Hx(h.filter((function(e){return t=e,n=l,Math.abs(t.y-n.y)<s;var t,n})),d)||Hx(h,(function(e){return f(e,l,10)}));return null==v?void 0:v.element}if("Up"===r||"Down"===r){var p="Up"===r?c.filter((function(e){return t=l,e.y+s<t.y;var t})):c.filter((function(e){return t=l,e.y>t.y+s;var t})),m=Hx(p.filter((function(e){return o(e.element)})),d)||Hx(p,d);return null==m?void 0:m.element}}function JO(e){return!!e&&"DIV"===e.nodeName&&"function"==typeof e.refresh&&"function"==typeof e.cancel}function KO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",n=[];e.ctrlKey&&n.push("Ctrl"),e.metaKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift");var r=1===e.key.length?e.key.toUpperCase():e.key;return r in GO||n.push(r),n.join(t)}var GO={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},QO=po.window;function YO(e){go(e,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.svelte-1r8q3m8{position:fixed;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content.svelte-1r8q3m8{position:absolute}")}function XO(e){var t,n,r,i,o,a,s=[e[0].props],c=e[0].component;function l(e,t){var n={};if(void 0!==t&&1&t)n=Ea(s,[Aa(e[0].props)]);else for(var r=0;r<s.length;r+=1)n=Ji(n,s[r]);return{props:n}}return c&&(i=Fo(c,l(e))),{c:function(){t=So("div"),n=So("input"),r=_o(),i&&Ta(i.$$.fragment),Po(n,"type","text"),n.readOnly=!0,Po(n,"tabindex","-1"),Po(n,"class","jse-hidden-input svelte-1r8q3m8"),Po(t,"class","jse-absolute-popup-content svelte-1r8q3m8"),Po(t,"style",o=tM(e[1],e[0].options))},m:function(o,s){ko(o,t,s),mo(t,n),e[7](n),mo(t,r),i&&Ra(i,t,null),a=!0},p:function(e,n){if(1&n&&c!==(c=e[0].component)){if(i){wa();var r=i;ja(r.$$.fragment,1,0,(function(){Na(r,1)})),ka()}c?(Ta((i=Fo(c,l(e,n))).$$.fragment),xa(i.$$.fragment,1),Ra(i,t,null)):i=null}else if(c){var u=1&n?Ea(s,[Aa(e[0].props)]):{};i.$set(u)}(!a||3&n&&o!==(o=tM(e[1],e[0].options)))&&Po(t,"style",o)},i:function(e){a||(i&&xa(i.$$.fragment,e),a=!0)},o:function(e){i&&ja(i.$$.fragment,e),a=!1},d:function(n){n&&xo(t),e[7](null),i&&Na(i)}}}function ZO(e){var t,n,r,i,o=e[1]&&XO(e);return{c:function(){t=So("div"),o&&o.c(),Po(t,"role","none"),Po(t,"class","jse-absolute-popup svelte-1r8q3m8")},m:function(a,s){ko(a,t,s),o&&o.m(t,null),e[8](t),n=!0,r||(i=[Mo(QO,"mousedown",e[3],!0),Mo(QO,"keydown",e[4],!0),Mo(QO,"wheel",e[5],!0),Mo(t,"mousedown",eM),Mo(t,"keydown",e[4])],r=!0)},p:function(e,n){var r=xi(n,1)[0];e[1]?o?(o.p(e,r),2&r&&xa(o,1)):((o=XO(e)).c(),xa(o,1),o.m(t,null)):o&&(wa(),ja(o,1,1,(function(){o=null})),ka())},i:function(e){n||(xa(o),n=!0)},o:function(e){ja(o),n=!1},d:function(n){n&&xo(t),o&&o.d(),e[8](null),r=!1,Qi(i)}}}function eM(e){e.stopPropagation()}function tM(e,t){var n=e.getBoundingClientRect(),r=function(){if(t.anchor){var e=t.anchor,n=t.width,r=void 0===n?0:n,i=t.height,o=void 0===i?0:i,a=t.offsetTop,s=void 0===a?0:a,c=t.offsetLeft,l=void 0===c?0:c,u=t.position,f=e.getBoundingClientRect(),d=f.left,h=f.top,v=f.bottom,p=f.right,m="top"===u||h+o>window.innerHeight&&h>o,g="left"===u||d+r>window.innerWidth&&d>r;return{left:g?p-l:d+l,top:m?h-s:v+s,positionAbove:m,positionLeft:g}}if("number"==typeof t.left&&"number"==typeof t.top){var y=t.left,b=t.top,w=t.width,k=void 0===w?0:w,x=t.height,j=void 0===x?0:x;return{left:y,top:b,positionAbove:b+j>window.innerHeight&&b>j,positionLeft:y+k>window.innerWidth&&y>k}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),i=r.left,o=r.top,a=r.positionAbove,s=r.positionLeft;return(a?"bottom: ".concat(n.top-o,"px;"):"top: ".concat(o-n.top,"px;"))+(s?"right: ".concat(n.left-i,"px;"):"left: ".concat(i-n.left,"px;"))}function nM(e,t,n){var r,i,o=t.popup,a=t.closeAbsolutePopup;function s(e){o.options&&o.options.closeOnOuterClick&&!IO(e.target,(function(e){return e===r}))&&a(o.id)}return Qo((function(){i&&i.focus()})),e.$$set=function(e){"popup"in e&&n(0,o=e.popup),"closeAbsolutePopup"in e&&n(6,a=e.closeAbsolutePopup)},[o,r,i,function(e){s(e)},function(e){"Escape"===KO(e)&&a(o.id)},function(e){s(e)},a,function(e){ra[e?"unshift":"push"]((function(){n(2,i=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(1,r=e)}))}]}var rM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,nM,ZO,Xi,{popup:0,closeAbsolutePopup:6},YO),r}return Di(n)}();function iM(e,t,n){var r=e.slice();return r[6]=t[n],r}function oM(e){var t,n;return t=new rM({props:{popup:e[6],closeAbsolutePopup:e[1]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.popup=e[6]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function aM(e){for(var t,n,r=$a(e[0]),i=[],o=0;o<r.length;o+=1)i[o]=oM(iM(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))},s=e[3].default,c=eo(s,e,e[2],null);return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=_o(),c&&c.c()},m:function(e,r){for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(e,r);ko(e,t,r),c&&c.m(e,r),n=!0},p:function(e,o){var l=xi(o,1)[0];if(3&l){var u;for(r=$a(e[0]),u=0;u<r.length;u+=1){var f=iM(e,r,u);i[u]?(i[u].p(f,l),xa(i[u],1)):(i[u]=oM(f),i[u].c(),xa(i[u],1),i[u].m(t.parentNode,t))}for(wa(),u=r.length;u<i.length;u+=1)a(u);ka()}c&&c.p&&(!n||4&l)&&ro(c,s,e,e[2],n?no(s,e[2],l,null):io(e[2]),null)},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);xa(c,e),n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);ja(c,e),n=!1},d:function(e){e&&xo(t),jo(i,e),c&&c.d(e)}}}function sM(e,t,n){var r=t.$$slots,i=void 0===r?{}:r,o=t.$$scope,a=za("jsoneditor:AbsolutePopup"),s=[];function c(e){var t=s.findIndex((function(t){return t.id===e}));if(-1!==t){var r=s[t];r.options.onClose&&r.options.onClose(),n(0,s=s.filter((function(t){return t.id!==e})))}}return Zo("absolute-popup",{openAbsolutePopup:function(e,t,r){a("open...",t,r);var i={id:Ts(),component:e,props:t||{},options:r||{}};return n(0,s=[].concat(Bi(s),[i])),i.id},closeAbsolutePopup:c}),e.$$set=function(e){"$$scope"in e&&n(2,o=e.$$scope)},e.$$.update=function(){1&e.$$.dirty&&a("popups",s)},[s,c,o,i]}var cM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,sM,aM,Zi,{}),r}return Di(n)}();function lM(e){return e.map((function(e,t){return pM.test(e)?"["+e+"]":/[.[\]]/.test(e)||""===e?'["'+(e.replace(/"/g,'\\"')+'"]'):(t>0?".":"")+e})).join("")}function uM(e){for(var t=[],n=0;n<e.length;)"."===e[n]&&n++,"["===e[n]?(n++,'"'===e[n]?(n++,t.push(r((function(e){return'"'===e}),!0)),i('"')):t.push(r((function(e){return"]"===e}))),i("]")):t.push(r((function(e){return"."===e||"["===e})));function r(t){for(var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="";n<e.length&&!t(e[n]);)r&&"\\"===e[n]&&'"'===e[n+1]?(i+='"',n+=2):(i+=e[n],n++);return i}function i(t){if(e[n]!==t)throw new SyntaxError("Invalid JSON path: ".concat(t," expected at position ").concat(n));n++}return t}function fM(e){return{value:e,label:Fk(e)?"(item root)":lM(e)}}function dM(e){if(pM.test(e))return"["+e+"]";if(vM.test(e))return"."+e;var t=JSON.stringify(e);return"['"+t.substring(1,t.length-1).replace(/\\"/g,'"')+"']"}function hM(e){return e.map((function(e){return pM.test(e)?"?.[".concat(e,"]"):vM.test(e)?"?.".concat(e):"?.[".concat(JSON.stringify(e),"]")})).join("")}var vM=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,pM=/^\d+$/;function mM(e,t){for(var n=new Set(t),r=e.replace(/ \(copy( \d+)?\)$/,""),i=e,o=1;n.has(i);){var a="copy"+(o>1?" "+o:"");i="".concat(r," (").concat(a,")"),o++}return i}function gM(e,t){var n=t-3;return e.length>t?e.substring(0,n)+"...":e}function yM(e){if(""===e)return"";var t=e.toLowerCase();if("null"===t)return null;if("true"===t)return!0;if("false"===t)return!1;if("undefined"!==t){var n=Number(e),r=parseFloat(e);return isNaN(n)||isNaN(r)?e:n}}var bM={id:"javascript",name:"JavaScript",description:"\n<p>\n Enter a JavaScript function to filter, sort, or transform the data.\n</p>\n",createQuery:function(e,t){var n=t.filter,r=t.sort,i=t.projection,o=[" return data\n"];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(hM(n.path)),s=yM(n.value),c="string"==typeof s?"'".concat(n.value,"'"):fu(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;o.push(" .filter(".concat(a," ").concat(n.relation," ").concat(c,")\n"))}r&&r.path&&r.direction&&("desc"===r.direction?o.push(" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(hM(r.path),"\n")+" const valueB = b".concat(hM(r.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n"):o.push(" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(hM(r.path),"\n")+" const valueB = b".concat(hM(r.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"));if(i&&i.paths)if(i.paths.length>1){var l=i.paths.map((function(e){var t=e[e.length-1]||"item",n="item".concat(hM(e));return" ".concat(JSON.stringify(t),": ").concat(n)}));o.push(" .map(item => ({\n".concat(l.join(",\n"),"})\n )\n"))}else{var u="item".concat(hM(i.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(e,t){var n=new Function('"use strict";\n\n'+t+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(e);return void 0!==n?n:null}};var wM={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M297.2 248.9C311.6 228.3 320 203.2 320 176c0-70.7-57.3-128-128-128S64 105.3 64 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H109c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C27.6 247.9 16 213.3 16 176C16 78.8 94.8 0 192 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4l0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5H226.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM192 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80V416H272v16c0 44.2-35.8 80-80 80z"]},kM={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},xM={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H384zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"]},jM={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function SM(e){var t;return{c:function(){t=Co("g")},m:function(n,r){ko(n,t,r),t.innerHTML=e[0]},p:function(e,n){1&xi(n,1)[0]&&(t.innerHTML=e[0])},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function CM(e,t,n){var r=870711;var i="",o=t.data;function a(e){if(!e||!e.raw)return"";var t=e.raw,n={};return t=t.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g,(function(e,t){var i="fa-".concat((r+=1).toString(16));return n[t]=i,' id="'.concat(i,'"')})),t=t.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(function(e,t,r,i){var o=t||i;return o&&n[o]?"#".concat(n[o]):e})),t}return e.$$set=function(e){"data"in e&&n(1,o=e.data)},e.$$.update=function(){2&e.$$.dirty&&n(0,i=a(o))},[i,o]}var $M=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,CM,SM,Xi,{data:1}),r}return Di(n)}();function _M(e){go(e,"svelte-1mc5hvj",".fa-icon.svelte-1mc5hvj{display:inline-block;fill:currentColor}.fa-flip-horizontal.svelte-1mc5hvj{transform:scale(-1, 1)}.fa-flip-vertical.svelte-1mc5hvj{transform:scale(1, -1)}.fa-spin.svelte-1mc5hvj{animation:svelte-1mc5hvj-fa-spin 1s 0s infinite linear}.fa-inverse.svelte-1mc5hvj{color:#fff}.fa-pulse.svelte-1mc5hvj{animation:svelte-1mc5hvj-fa-spin 1s infinite steps(8)}@keyframes svelte-1mc5hvj-fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}")}function OM(e){for(var t,n,r,i,o=e[12].default,a=eo(o,e,e[11],null),s=[{version:"1.1"},{class:n="fa-icon "+e[0]},{width:e[1]},{height:e[2]},{"aria-label":e[9]},{role:r=e[9]?"img":"presentation"},{viewBox:e[3]},{style:e[8]},e[10]],c={},l=0;l<s.length;l+=1)c=Ji(c,s[l]);return{c:function(){t=Co("svg"),a&&a.c(),No(t,c),Bo(t,"fa-spin",e[4]),Bo(t,"fa-pulse",e[6]),Bo(t,"fa-inverse",e[5]),Bo(t,"fa-flip-horizontal","horizontal"===e[7]),Bo(t,"fa-flip-vertical","vertical"===e[7]),Bo(t,"svelte-1mc5hvj",!0)},m:function(e,n){ko(e,t,n),a&&a.m(t,null),i=!0},p:function(e,l){var u=xi(l,1)[0];a&&a.p&&(!i||2048&u)&&ro(a,o,e,e[11],i?no(o,e[11],u,null):io(e[11]),null),No(t,c=Ea(s,[{version:"1.1"},(!i||1&u&&n!==(n="fa-icon "+e[0]))&&{class:n},(!i||2&u)&&{width:e[1]},(!i||4&u)&&{height:e[2]},(!i||512&u)&&{"aria-label":e[9]},(!i||512&u&&r!==(r=e[9]?"img":"presentation"))&&{role:r},(!i||8&u)&&{viewBox:e[3]},(!i||256&u)&&{style:e[8]},1024&u&&e[10]])),Bo(t,"fa-spin",e[4]),Bo(t,"fa-pulse",e[6]),Bo(t,"fa-inverse",e[5]),Bo(t,"fa-flip-horizontal","horizontal"===e[7]),Bo(t,"fa-flip-vertical","vertical"===e[7]),Bo(t,"svelte-1mc5hvj",!0)},i:function(e){i||(xa(a,e),i=!0)},o:function(e){ja(a,e),i=!1},d:function(e){e&&xo(t),a&&a.d(e)}}}function MM(e,t,n){var r=["class","width","height","box","spin","inverse","pulse","flip","style","label"],i=ao(t,r),o=t,a=o.$$slots,s=void 0===a?{}:a,c=o.$$scope,l=t.class,u=void 0===l?"":l,f=t.width,d=t.height,h=t.box,v=void 0===h?"0 0 0 0":h,p=t.spin,m=void 0!==p&&p,g=t.inverse,y=void 0!==g&&g,b=t.pulse,w=void 0!==b&&b,k=t.flip,x=void 0===k?"none":k,j=t.style,S=void 0===j?"":j,C=t.label,$=void 0===C?"":C;return e.$$set=function(e){t=Ji(Ji({},t),oo(e)),n(10,i=ao(t,r)),"class"in e&&n(0,u=e.class),"width"in e&&n(1,f=e.width),"height"in e&&n(2,d=e.height),"box"in e&&n(3,v=e.box),"spin"in e&&n(4,m=e.spin),"inverse"in e&&n(5,y=e.inverse),"pulse"in e&&n(6,w=e.pulse),"flip"in e&&n(7,x=e.flip),"style"in e&&n(8,S=e.style),"label"in e&&n(9,$=e.label),"$$scope"in e&&n(11,c=e.$$scope)},[u,f,d,v,m,y,w,x,S,$,i,c,s]}var EM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,MM,OM,Xi,{class:0,width:1,height:2,box:3,spin:4,inverse:5,pulse:6,flip:7,style:8,label:9},_M),r}return Di(n)}();function AM(e,t,n){var r=e.slice();return r[24]=t[n],r}function PM(e,t,n){var r=e.slice();return r[27]=t[n],r}function TM(e){var t,n,r,i,o=e[6].paths&&RM(e),a=e[6].polygons&&IM(e),s=e[6].raw&&zM(e);return{c:function(){o&&o.c(),t=_o(),a&&a.c(),n=_o(),s&&s.c(),r=Oo()},m:function(e,c){o&&o.m(e,c),ko(e,t,c),a&&a.m(e,c),ko(e,n,c),s&&s.m(e,c),ko(e,r,c),i=!0},p:function(e,i){e[6].paths?o?o.p(e,i):((o=RM(e)).c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null),e[6].polygons?a?a.p(e,i):((a=IM(e)).c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null),e[6].raw?s?(s.p(e,i),64&i&&xa(s,1)):((s=zM(e)).c(),xa(s,1),s.m(r.parentNode,r)):s&&(wa(),ja(s,1,1,(function(){s=null})),ka())},i:function(e){i||(xa(s),i=!0)},o:function(e){ja(s),i=!1},d:function(e){e&&(xo(t),xo(n),xo(r)),o&&o.d(e),a&&a.d(e),s&&s.d(e)}}}function RM(e){for(var t,n=$a(e[6].paths),r=[],i=0;i<n.length;i+=1)r[i]=NM(PM(e,n,i));return{c:function(){for(var e=0;e<r.length;e+=1)r[e].c();t=Oo()},m:function(e,n){for(var i=0;i<r.length;i+=1)r[i]&&r[i].m(e,n);ko(e,t,n)},p:function(e,i){if(64&i){var o;for(n=$a(e[6].paths),o=0;o<n.length;o+=1){var a=PM(e,n,o);r[o]?r[o].p(a,i):(r[o]=NM(a),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d:function(e){e&&xo(t),jo(r,e)}}}function NM(e){for(var t,n=[e[27]],r={},i=0;i<n.length;i+=1)r=Ji(r,n[i]);return{c:function(){No(t=Co("path"),r)},m:function(e,n){ko(e,t,n)},p:function(e,i){No(t,r=Ea(n,[64&i&&e[27]]))},d:function(e){e&&xo(t)}}}function IM(e){for(var t,n=$a(e[6].polygons),r=[],i=0;i<n.length;i+=1)r[i]=DM(AM(e,n,i));return{c:function(){for(var e=0;e<r.length;e+=1)r[e].c();t=Oo()},m:function(e,n){for(var i=0;i<r.length;i+=1)r[i]&&r[i].m(e,n);ko(e,t,n)},p:function(e,i){if(64&i){var o;for(n=$a(e[6].polygons),o=0;o<n.length;o+=1){var a=AM(e,n,o);r[o]?r[o].p(a,i):(r[o]=DM(a),r[o].c(),r[o].m(t.parentNode,t))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d:function(e){e&&xo(t),jo(r,e)}}}function DM(e){for(var t,n=[e[24]],r={},i=0;i<n.length;i+=1)r=Ji(r,n[i]);return{c:function(){No(t=Co("polygon"),r)},m:function(e,n){ko(e,t,n)},p:function(e,i){No(t,r=Ea(n,[64&i&&e[24]]))},d:function(e){e&&xo(t)}}}function zM(e){var t,n,r;function i(t){e[16](t)}var o={};return void 0!==e[6]&&(o.data=e[6]),t=new $M({props:o}),ra.push((function(){return Pa(t,"data",i)})),{c:function(){Ta(t.$$.fragment)},m:function(e,n){Ra(t,e,n),r=!0},p:function(e,r){var i={};!n&&64&r&&(n=!0,i.data=e[6],fa((function(){return n=!1}))),t.$set(i)},i:function(e){r||(xa(t.$$.fragment,e),r=!0)},o:function(e){ja(t.$$.fragment,e),r=!1},d:function(e){Na(t,e)}}}function LM(e){var t,n=e[15].default,r=eo(n,e,e[17],null),i=r||function(e){var t,n,r=e[6]&&TM(e);return{c:function(){r&&r.c(),t=Oo()},m:function(e,i){r&&r.m(e,i),ko(e,t,i),n=!0},p:function(e,n){e[6]?r?(r.p(e,n),64&n&&xa(r,1)):((r=TM(e)).c(),xa(r,1),r.m(t.parentNode,t)):r&&(wa(),ja(r,1,1,(function(){r=null})),ka())},i:function(e){n||(xa(r),n=!0)},o:function(e){ja(r),n=!1},d:function(e){e&&xo(t),r&&r.d(e)}}}(e);return{c:function(){i&&i.c()},m:function(e,n){i&&i.m(e,n),t=!0},p:function(e,o){r?r.p&&(!t||131072&o)&&ro(r,n,e,e[17],t?no(n,e[17],o,null):io(e[17]),null):i&&i.p&&(!t||64&o)&&i.p(e,t?o:-1)},i:function(e){t||(xa(i,e),t=!0)},o:function(e){ja(i,e),t=!1},d:function(e){i&&i.d(e)}}}function BM(e){for(var t,n,r=[{label:e[5]},{width:e[7]},{height:e[8]},{box:e[10]},{style:e[9]},{spin:e[1]},{flip:e[4]},{inverse:e[2]},{pulse:e[3]},{class:e[0]},e[11]],i={$$slots:{default:[LM]},$$scope:{ctx:e}},o=0;o<r.length;o+=1)i=Ji(i,r[o]);return t=new EM({props:i}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var i=xi(n,1)[0],o=4031&i?Ea(r,[32&i&&{label:e[5]},128&i&&{width:e[7]},256&i&&{height:e[8]},1024&i&&{box:e[10]},512&i&&{style:e[9]},2&i&&{spin:e[1]},16&i&&{flip:e[4]},4&i&&{inverse:e[2]},8&i&&{pulse:e[3]},1&i&&{class:e[0]},2048&i&&Aa(e[11])]):{};131136&i&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function qM(e,t,n){var r,i,o,a=["class","data","scale","spin","inverse","pulse","flip","label","style"],s=ao(t,a),c=t,l=c.$$slots,u=void 0===l?{}:l,f=c.$$scope,d=t.class,h=void 0===d?"":d,v=t.data,p=t.scale,m=void 0===p?1:p,g=t.spin,y=void 0!==g&&g,b=t.inverse,w=void 0!==b&&b,k=t.pulse,x=void 0!==k&&k,j=t.flip,S=void 0===j?void 0:j,C=t.label,$=void 0===C?"":C,_=t.style,O=void 0===_?"":_,M=10,E=10;function A(){var e=1;return void 0!==m&&(e=Number(m)),isNaN(e)||e<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.'),1):1*e}function P(){return r?Math.max(r.width,r.height)/16:1}return e.$$set=function(e){t=Ji(Ji({},t),oo(e)),n(11,s=ao(t,a)),"class"in e&&n(0,h=e.class),"data"in e&&n(12,v=e.data),"scale"in e&&n(13,m=e.scale),"spin"in e&&n(1,y=e.spin),"inverse"in e&&n(2,w=e.inverse),"pulse"in e&&n(3,x=e.pulse),"flip"in e&&n(4,S=e.flip),"label"in e&&n(5,$=e.label),"style"in e&&n(14,O=e.style),"$$scope"in e&&n(17,f=e.$$scope)},e.$$.update=function(){28672&e.$$.dirty&&(n(6,r=function(e){var t;if(e){if(!("definition"in e)){if("iconName"in e&&"icon"in e){e.iconName;var n=xi(e.icon,5),r=n[0],i=n[1],o=n[4];t={width:r,height:i,paths:(Array.isArray(o)?o:[o]).map((function(e){return{d:e}}))}}else t=e[Object.keys(e)[0]];return t}console.error("`import faIconName from '@fortawesome/package-name/faIconName` not supported - Please use `import { faIconName } from '@fortawesome/package-name/faIconName'` instead")}}(v)),n(7,M=r?r.width/P()*A():0),n(8,E=r?r.height/P()*A():0),n(9,i=function(){var e="";null!==O&&(e+=O);var t=A();return 1===t?0===e.length?"":e:(""===e||e.endsWith(";")||(e+="; "),"".concat(e,"font-size: ").concat(t,"em"))}()),n(10,o=r?"0 0 ".concat(r.width," ").concat(r.height):"0 0 ".concat(M," ").concat(E)))},[h,y,w,x,S,$,r,M,E,i,o,s,v,m,O,u,function(e){n(6,r=e),n(12,v),n(14,O),n(13,m)},f]}var FM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,qM,BM,Xi,{class:0,data:12,scale:13,spin:1,inverse:2,pulse:3,flip:4,label:5,style:14}),r}return Di(n)}();function VM(e){go(e,"svelte-1vj58yv",".jse-boolean-toggle.svelte-1vj58yv{padding:0;margin:1px 0 0;vertical-align:top;display:inline-flex;color:var(--jse-value-color-boolean)}.jse-boolean-toggle.svelte-1vj58yv:not(.jse-readonly){cursor:pointer}")}function WM(e){var t,n,r,i,o,a,s;return n=new FM({props:{data:!0===e[0]?kM:xM}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"role","checkbox"),Po(t,"tabindex","-1"),Po(t,"aria-checked",r=!0===e[0]),Po(t,"class","jse-boolean-toggle svelte-1vj58yv"),Po(t,"title",i=e[1]?"Boolean value ".concat(e[0]):"Click to toggle this boolean value"),Bo(t,"jse-readonly",e[1])},m:function(r,i){ko(r,t,i),Ra(n,t,null),o=!0,a||(s=Mo(t,"mousedown",e[2]),a=!0)},p:function(e,a){var s=xi(a,1)[0],c={};1&s&&(c.data=!0===e[0]?kM:xM),n.$set(c),(!o||1&s&&r!==(r=!0===e[0]))&&Po(t,"aria-checked",r),(!o||3&s&&i!==(i=e[1]?"Boolean value ".concat(e[0]):"Click to toggle this boolean value"))&&Po(t,"title",i),(!o||2&s)&&Bo(t,"jse-readonly",e[1])},i:function(e){o||(xa(n.$$.fragment,e),o=!0)},o:function(e){ja(n.$$.fragment,e),o=!1},d:function(e){e&&xo(t),Na(n),a=!1,s()}}}function HM(e,t,n){var r=t.path,i=t.value,o=t.readOnly,a=t.onPatch,s=t.focus;return e.$$set=function(e){"path"in e&&n(3,r=e.path),"value"in e&&n(0,i=e.value),"readOnly"in e&&n(1,o=e.readOnly),"onPatch"in e&&n(4,a=e.onPatch),"focus"in e&&n(5,s=e.focus)},[i,o,function(e){e.stopPropagation(),o||(a([{op:"replace",path:oc(r),value:!i}]),s())},r,a,s]}var UM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,HM,WM,Zi,{path:3,value:0,readOnly:1,onPatch:4,focus:5},VM),r}return Di(n)}();function JM(e){go(e,"svelte-1gn8yt9",".jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::before,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::after{background:var(--jse-color-picker-background);line-height:normal}.jse-color-picker-popup.svelte-1gn8yt9 .picker_slider,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sl,.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sample,.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{box-shadow:var(--jse-color-picker-border-box-shadow)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input{background:var(--jse-background-color);color:var(--jse-text-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{background:var(--jse-button-background);color:var(--jse-button-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button:hover{background:var(--jse-button-background-highlight)}")}function KM(e){var t;return{c:function(){Po(t=So("div"),"class","jse-color-picker-popup svelte-1gn8yt9")},m:function(n,r){ko(n,t,r),e[4](t)},p:Hi,i:Hi,o:Hi,d:function(n){n&&xo(t),e[4](null)}}}function GM(e,t,n){var r,i=t.color,o=t.onChange,a=t.showOnTop,s=function(){};return Qo(ki(bi().mark((function e(){var t,n,c;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return vte}));case 2:if(e.t1=t=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===t;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=t.default;case 11:n=e.t2,c=new n({parent:r,color:i,popup:a?"top":"bottom",onDone:function(e){var t=1===e.rgba[3]?e.hex.substring(0,7):e.hex;o(t)}}),c.show(),s=function(){c.destroy()};case 15:case"end":return e.stop()}}),e)})))),Yo((function(){s()})),e.$$set=function(e){"color"in e&&n(1,i=e.color),"onChange"in e&&n(2,o=e.onChange),"showOnTop"in e&&n(3,a=e.showOnTop)},[r,i,o,a,function(e){ra[e?"unshift":"push"]((function(){n(0,r=e)}))}]}var QM=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,GM,KM,Xi,{color:1,onChange:2,showOnTop:3},JM),r}return Di(n)}();function YM(e){go(e,"svelte-1nv0s05",".jse-color-picker-button.svelte-1nv0s05{font-size:var(--jse-font-size-mono);width:var(--jse-color-picker-button-size);height:var(--jse-color-picker-button-size);box-sizing:border-box;padding:0;margin:2px 0 0;display:inline-flex;vertical-align:top;border:1px solid var(--jse-text-color);border-radius:2px;background:inherit;outline:none}.jse-color-picker-button.svelte-1nv0s05:not(.jse-readonly){cursor:pointer}")}function XM(e){var t,n,r,i;return{c:function(){Po(t=So("button"),"type","button"),Po(t,"class","jse-color-picker-button svelte-1nv0s05"),zo(t,"background",e[2]),Po(t,"title",n=e[1]?"Color ".concat(e[0]):"Click to open a color picker"),Bo(t,"jse-readonly",e[1])},m:function(n,o){ko(n,t,o),r||(i=Mo(t,"click",e[3]),r=!0)},p:function(e,r){var i=xi(r,1)[0];4&i&&zo(t,"background",e[2]),3&i&&n!==(n=e[1]?"Color ".concat(e[0]):"Click to open a color picker")&&Po(t,"title",n),2&i&&Bo(t,"jse-readonly",e[1])},i:Hi,o:Hi,d:function(e){e&&xo(t),r=!1,i()}}}function ZM(e,t,n){var r,i=ea("absolute-popup").openAbsolutePopup,o=t.path,a=t.value,s=t.readOnly,c=t.onPatch,l=t.focus;function u(e){c([{op:"replace",path:oc(o),value:e}]),f()}function f(){l()}return e.$$set=function(e){"path"in e&&n(4,o=e.path),"value"in e&&n(0,a=e.value),"readOnly"in e&&n(1,s=e.readOnly),"onPatch"in e&&n(5,c=e.onPatch),"focus"in e&&n(6,l=e.focus)},e.$$.update=function(){1&e.$$.dirty&&n(2,r=au(a))},[a,s,r,function(e){if(!s){var t=e.target.getBoundingClientRect().top,n=BO(e.target).innerHeight;i(QM,{color:a,onChange:u,showOnTop:n-t<300&&t>300},{anchor:e.target,closeOnOuterClick:!0,onClose:f,offsetTop:18,offsetLeft:-8,height:300})}},o,c,l]}var eE=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,ZM,XM,Zi,{path:4,value:0,readOnly:1,onPatch:5,focus:6},YM),r}return Di(n)}();function tE(e){for(var t=uC(e,(function(e){return e.start})),n=[t[0]],r=0;r<t.length;r++){var i=n.length-1,o=n[i],a=t[r];a.start<=o.end?n[i]={start:Math.min(o.start,a.start),end:Math.max(o.end,a.end)}:n.push(a)}return n}function nE(e,t){return e.some((function(e){return t>=e.start&&t<e.end}))}function rE(e){return iE(e)+us}function iE(e){return Math.floor(e/us)*us}function oE(e){var t={expandedMap:{},enforceStringMap:{},visibleSectionsMap:{},selection:{type:Xa.value,path:[],edit:!1},sortedColumn:null};return null!=e&&e.select&&void 0!==e.json&&(t=Ri(Ri({},t),{},{selection:e.select(e.json,t)})),null!=e&&e.expand&&(t=lE(e.json,t,[],e.expand)),t}function aE(e,t){return e.visibleSectionsMap[t]||hs}function sE(e,t,n){t.forEach((function(t){var r=t.start,i=t.end;Q_(r,Math.min(e.length,i),n)}))}function cE(e,t,n){for(var r=Ri({},t.expandedMap),i=Ri({},t.visibleSectionsMap),o=0;o<n.length;o++){var a=n.slice(0,o),s=oc(a),c=Ys(e,a);if(iu(c)&&(r[s]=!0),Array.isArray(c)&&o<n.length){var l=i[s]||hs,u=eu(n[o]);if(!nE(l,u)){var f=iE(u),d={start:f,end:rE(f)};i[s]=tE(l.concat(d))}}}return Ri(Ri({},t),{},{expandedMap:r,visibleSectionsMap:i})}function lE(e,t,n,r){var i=Ri({},t.expandedMap);var o=n.slice(),a=void 0!==e?Ys(e,n):e;return void 0!==a&&function e(n){var a=o.length;if(Array.isArray(n)){if(r(o)){var s=oc(o);if(i[s]=!0,n.length>0){var c=aE(t,s);sE(n,c,(function(t){o[a]=String(t),e(n[t])})),o.pop()}}}else if(ru(n)&&r(o)){i[oc(o)]=!0;var l=Object.keys(n);if(l.length>0){var u,f=yi(l);try{for(f.s();!(u=f.n()).done;){var d=u.value;o[a]=d,e(n[d])}}catch(e){f.e(e)}finally{f.f()}o.pop()}}}(a),Ri(Ri({},t),{},{expandedMap:i})}function uE(e,t){var n=pE(e.expandedMap,t),r=pE(e.enforceStringMap,t),i=pE(e.visibleSectionsMap,t);return Ri(Ri({},e),{},{expandedMap:n,enforceStringMap:r,visibleSectionsMap:i})}function fE(e,t,n){if(n){var r=Ri({},e.enforceStringMap);return r[t]=n,Ri(Ri({},e),{},{enforceStringMap:r})}if("boolean"==typeof e.enforceStringMap[t]){var i=Ri({},e.enforceStringMap);return delete i[t],Ri(Ri({},e),{},{enforceStringMap:i})}return e}function dE(e,t,n){var r=lc(e,n),i=n.reduce((function(e,t){return Ds(t)?hE(r,e,t):zs(t)?vE(r,e,t):Ls(t)?function(e,t,n){var r=n.path,i=wE(e,t.expandedMap),o=wE(e,t.enforceStringMap),a=wE(e,t.visibleSectionsMap);Is(n.value)||Ns(n.value)||delete i[r];Ns(n.value)||delete a[r];(Is(n.value)||Ns(n.value))&&delete o[r];return Ri(Ri({},t),{},{expandedMap:i,enforceStringMap:o,visibleSectionsMap:a})}(r,e,t):Bs(t)||qs(t)?function(e,t,n){if(qs(n)&&n.from===n.path)return t;var r=function(e){return n.path+e.substring(n.from.length)},i=yE(mE(t.expandedMap,n.from),r),o=yE(mE(t.enforceStringMap,n.from),r),a=yE(mE(t.visibleSectionsMap,n.from),r),s=t;qs(n)&&(s=vE(e,s,{op:"remove",path:n.from}));s=hE(e,s,{op:"add",path:n.path,value:null});var c=gE(s.expandedMap,i),l=gE(s.enforceStringMap,o),u=gE(s.visibleSectionsMap,a);return Ri(Ri({},t),{},{expandedMap:c,enforceStringMap:l,visibleSectionsMap:u})}(r,e,t):e}),t);return{json:r,documentState:i}}function hE(e,t,n){var r=yc(e,n.path),i=fk(r),o=oc(i);if(Ns(Ys(e,i))){var a=eu(Mb(r)),s=bE(t.expandedMap,i,a,1),c=bE(t.enforceStringMap,i,a,1),l=bE(t.visibleSectionsMap,i,a,1);return l=kE(l,o,(function(e){return xE(e,a,1)})),Ri(Ri({},t),{},{expandedMap:s,enforceStringMap:c,visibleSectionsMap:l})}return t}function vE(e,t,n){var r=yc(e,n.path),i=fk(r),o=oc(i),a=Ys(e,i),s=t.expandedMap,c=t.enforceStringMap,l=t.visibleSectionsMap;if(s=pE(s,r),c=pE(c,r),l=pE(l,r),Ns(a)){var u=eu(Mb(r));s=bE(s,i,u,-1),c=bE(c,i,u,-1),l=kE(l=bE(l,i,u,-1),o,(function(e){return xE(e,u,-1)}))}return Ri(Ri({},t),{},{expandedMap:s,enforceStringMap:c,visibleSectionsMap:l})}function pE(e,t){var n={},r=oc(t);return Object.keys(e).forEach((function(t){cc(t,r)||(n[t]=e[t])})),n}function mE(e,t){var n={};return Object.keys(e).forEach((function(r){cc(r,t)&&(n[r]=e[r])})),n}function gE(e,t){return Ri(Ri({},e),t)}function yE(e,t){var n={};return Object.keys(e).forEach((function(r){var i=t(r);n[i]=e[r]})),n}function bE(e,t,n,r){for(var i=t.length,o=oc(t),a=[],s=0,c=Object.keys(e);s<c.length;s++){var l=c[s];if(cc(l,o)){var u=ic(l),f=eu(u[i]);f>=n&&(u[i]=String(f+r),a.push({oldPointer:l,newPointer:oc(u),value:e[l]}))}}if(0===a.length)return e;var d=Ri({},e);return a.forEach((function(e){delete d[e.oldPointer]})),a.forEach((function(e){d[e.newPointer]=e.value})),d}function wE(e,t){var n={};return Object.keys(t).filter((function(t){return rc(e,yc(e,t))})).forEach((function(e){n[e]=t[e]})),n}function kE(e,t,n){var r=e[t];if(t in e){var i=n(r);if(!Vk(r,i)){var o=Ri({},e);return void 0===i?delete o[t]:o[t]=i,o}}return e}function xE(e,t,n){return function(e){var t=e.slice(0),n=1;for(;n<t.length;)t[n-1].end===t[n].start&&(t[n-1]={start:t[n-1].start,end:t[n].end},t.splice(n)),n++;return t}(e.map((function(e){return{start:e.start>t?e.start+n:e.start,end:e.end>t?e.end+n:e.end}})))}function jE(e,t,n,r){var i=t?t[n]:void 0;return"boolean"==typeof i?i:function(e,t){return"string"==typeof e&&"string"!=typeof uu(e,t)}(e,r)}function SE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.indexOf(t);return-1!==r?n?e.slice(r):e.slice(r+1):[]}function CE(e,t){var n=[];return function e(r,i){n.push(i);var o=oc(i);if(r&&!0===t.expandedMap[o]){if(Ns(r)){var a=aE(t,o);sE(r,a,(function(t){e(r[t],i.concat(String(t)))}))}Is(r)&&Object.keys(r).forEach((function(t){e(r[t],i.concat(t))}))}}(e,[]),n}function $E(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];return function e(i,o){r.push({path:o,type:Za.value});var a=oc(o);if(i&&!0===t.expandedMap[a]){if(n&&r.push({path:o,type:Za.inside}),Ns(i)){var s=aE(t,a);sE(i,s,(function(t){var a=o.concat(String(t));e(i[t],a),n&&r.push({path:a,type:Za.after})}))}if(Is(i))Object.keys(i).forEach((function(t){var a=o.concat(t);r.push({path:a,type:Za.key}),e(i[t],a),n&&r.push({path:a,type:Za.after})}))}}(e,[]),r}function _E(e,t,n){var r=CE(e,t),i=r.map(oc).indexOf(oc(n));return-1!==i&&i<r.length-1?r[i+1]:null}function OE(e,t,n){var r=Ys(e,n);return void 0===r?t:lE(e,t,n,!vO({json:r},gs)?EE:ME)}function ME(e){return 0===e.length||1===e.length&&"0"===e[0]}function EE(){return!0}function AE(e){return e&&e.type===Xa.after||!1}function PE(e){return e&&e.type===Xa.inside||!1}function TE(e){return e&&e.type===Xa.key||!1}function RE(e){return e&&e.type===Xa.value||!1}function NE(e){return e&&e.type===Xa.multi||!1}function IE(e){return NE(e)&&Vk(e.focusPath,e.anchorPath)}function DE(e){return e&&e.type===Xa.text||!1}function zE(e,t){var n=[];return function(e,t,n){if(!t)return;var r=dA(t),i=fA(t);if(Vk(r,i))return n(r);if(void 0===e)return;var o=UE(r,i);if(r.length===o.length||i.length===o.length)return n(o);var a=tA(r,i),s=BE(e,a),c=qE(e,a),l=uA(e,a,s),u=uA(e,a,c);if(-1===l||-1===u)return;var f=Ys(e,o);if(Is(f)){for(var d=Object.keys(f),h=l;h<=u;h++){var v=n(o.concat(d[h]));if(void 0!==v)return v}return}if(Ns(f)){for(var p=l;p<=u;p++){var m=n(o.concat(String(p)));if(void 0!==m)return m}return}throw new Error("Failed to create selection")}(e,t,(function(e){n.push(e)})),n}function LE(e){return PE(e)?e.path:fk(fA(e))}function BE(e,t){if(!NE(t))return t.path;var n=uA(e,t,t.anchorPath);return uA(e,t,t.focusPath)<n?t.focusPath:t.anchorPath}function qE(e,t){if(!NE(t))return t.path;var n=uA(e,t,t.anchorPath);return uA(e,t,t.focusPath)>n?t.focusPath:t.anchorPath}function FE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.selection;if(!r)return null;var i=n?fA(r):BE(e,r),o=function(e,t,n){var r=CE(e,t),i=r.map(oc),o=oc(n),a=i.indexOf(o);return-1!==a&&a>0?r[a-1]:null}(e,t,i);if(n)return PE(r)||AE(r)?null!==o?tA(i,i):null:null!==o?tA(dA(r),o):null;if(AE(r))return XE(i,!1);if(PE(r))return XE(i,!1);if(TE(r)){if(null==o||0===o.length)return null;var a=Ys(e,fk(o));return Array.isArray(a)||Fk(o)?XE(o,!1):YE(o,!1)}return RE(r),null!==o?XE(o,!1):null}function VE(e,t,n){var r=t.selection;if(!r)return{caret:null,previous:null,next:null};var i=$E(e,t,n),o=i.findIndex((function(e){return Vk(e.path,fA(r))&&String(e.type)===String(r.type)}));return{caret:-1!==o?i[o]:null,previous:-1!==o&&o>0?i[o-1]:null,next:-1!==o&&o<i.length-1?i[o+1]:null}}function WE(e,t){for(var n=CE(e,t),r=0;r<n.length-1&&n[r+1].length>n[r].length;)r++;var i=n[r];return void 0===i||0===i.length||Array.isArray(Ys(e,fk(i)))?XE(i,!1):YE(i,!1)}function HE(e,t){if(1===t.length){var n=jw(t);if("replace"===n.op)return XE(yc(e,n.path),!1)}if(!Fk(t)&&t.every((function(e){return"move"===e.op}))){var r=jw(t),i=t.slice(1);if((Bs(r)||qs(r))&&r.from!==r.path&&i.every((function(e){return(Bs(e)||qs(e))&&e.from===e.path})))return YE(yc(e,r.path),!1)}var o=t.filter((function(e){return"test"!==e.op&&"remove"!==e.op&&("move"!==e.op||e.from!==e.path)&&"string"==typeof e.path})).map((function(t){return yc(e,t.path)}));return Fk(o)?null:{type:Xa.multi,anchorPath:jw(o),focusPath:Mb(o)}}function UE(e,t){for(var n=0;n<e.length&&n<t.length&&e[n]===t[n];)n++;return e.slice(0,n)}function JE(e){return TE(e)||RE(e)||IE(e)}function KE(e,t){return JE(t)&&iu(Ys(e,fA(t)))?fA(t):fk(fA(t))}function GE(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function QE(e){var t=e.selection;return(TE(t)||RE(t))&&t.edit?Ri(Ri({},e),{},{selection:Ri(Ri({},t),{},{edit:!1})}):e}function YE(e,t){return{type:Xa.key,path:e,edit:t}}function XE(e,t){return{type:Xa.value,path:e,edit:t}}function ZE(e){return{type:Xa.inside,path:e}}function eA(e){return{type:Xa.after,path:e}}function tA(e,t){var n=UE(e,t),r=e.length>n.length&&t.length>n.length;return{type:Xa.multi,anchorPath:r?n.concat(e[n.length]):n,focusPath:r?n.concat(t[n.length]):n}}function nA(e,t,n,r){if(TE(t))return String(Mb(t.path));if(RE(t)){var i=Ys(e,t.path);return"string"==typeof i?i:r.stringify(i,null,n)}if(NE(t)){if(Fk(t.focusPath))return r.stringify(e,null,n);var o=LE(t),a=Ys(e,o);if(Array.isArray(a)){if(IE(t)){var s=Ys(e,t.focusPath);return r.stringify(s,null,n)}return zE(e,t).map((function(t){var i=Ys(e,t);return"".concat(r.stringify(i,null,n),",")})).join("\n")}return zE(e,t).map((function(t){var i=Mb(t),o=Ys(e,t);return"".concat(r.stringify(i),": ").concat(r.stringify(o,null,n),",")})).join("\n")}return null}function rA(e){return(TE(e)||RE(e))&&!0===e.edit}function iA(e){return TE(e)||RE(e)||NE(e)}function oA(e){return TE(e)||RE(e)||IE(e)}function aA(e){switch(e.type){case Za.key:return YE(e.path,!1);case Za.value:return XE(e.path,!1);case Za.after:return eA(e.path);case Za.inside:return ZE(e.path)}}function sA(e,t,n){switch(t){case Xa.key:return YE(n,!1);case Xa.value:return XE(n,!1);case Xa.after:return eA(n);case Xa.inside:return ZE(n);case Xa.multi:case Xa.text:return tA(n,n)}}function cA(e,t,n){return t&&(lA(e,t,n)||GE(NE(t)?fk(t.focusPath):t.path,n))?t:null}function lA(e,t,n){if(void 0===e||!t)return!1;if(TE(t)||PE(t)||AE(t))return Vk(t.path,n);if(RE(t))return GE(n,t.path);if(NE(t)){var r=BE(e,t),i=qE(e,t),o=fk(t.focusPath);if(!GE(n,o)||n.length<=o.length)return!1;var a=uA(e,t,r),s=uA(e,t,i),c=uA(e,t,n);return-1!==c&&c>=a&&c<=s}return!1}function uA(e,t,n){var r=fk(t.focusPath);if(!GE(n,r)||n.length<=r.length)return-1;var i=n[r.length],o=Ys(e,r);if(Is(o))return Object.keys(o).indexOf(i);if(Ns(o)){var a=eu(i);if(a<o.length)return a}return-1}function fA(e){return NE(e)?e.focusPath:e.path}function dA(e){return NE(e)?e.anchorPath:e.path}function hA(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if("string"==typeof a&&e.push(a),a&&"object"===Wi(a))for(var s in a)Object.hasOwnProperty.call(a,s)&&a[s]&&e.push(s)}return e.join(" ")}function vA(e,t){return hA("jse-value","jse-"+su(e,t),{"jse-url":lu(e),"jse-empty":"string"==typeof e&&0===e.length})}function pA(e){go(e,"svelte-1iltvlj",".jse-value.jse-string.svelte-1iltvlj{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-1iltvlj,.jse-value.jse-array.svelte-1iltvlj{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-1iltvlj{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-1iltvlj{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-1iltvlj{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-1iltvlj{color:var(--jse-text-color)}.jse-value.jse-url.svelte-1iltvlj{color:var(--jse-value-color-url);text-decoration:underline}div.jse-editable-div.svelte-1iltvlj{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;cursor:text !important;word-break:normal;white-space:pre-wrap;overflow-wrap:anywhere}div.jse-editable-div.jse-short-text.svelte-1iltvlj{overflow-wrap:normal}div.jse-editable-div[contenteditable=true].svelte-1iltvlj{outline:var(--jse-edit-outline);background:inherit !important;position:relative;border-radius:0;z-index:3}div.jse-editable-div.jse-empty.svelte-1iltvlj:not(:focus){outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}div.jse-editable-div.jse-empty.svelte-1iltvlj::after{pointer-events:none;color:var(--jse-tag-background)}")}function mA(e){var t,n,r,i;return{c:function(){Po(t=So("div"),"role","textbox"),Po(t,"tabindex","0"),Po(t,"class",n=so(hA("jse-editable-div",e[2],{"jse-short-text":e[0]}))+" svelte-1iltvlj"),Po(t,"contenteditable","true"),Po(t,"spellcheck","false")},m:function(n,o){ko(n,t,o),e[13](t),r||(i=[Mo(t,"input",e[3]),Mo(t,"keydown",e[4]),Mo(t,"paste",e[5]),Mo(t,"blur",e[6])],r=!0)},p:function(e,r){5&xi(r,1)[0]&&n!==(n=so(hA("jse-editable-div",e[2],{"jse-short-text":e[0]}))+" svelte-1iltvlj")&&Po(t,"class",n)},i:Hi,o:Hi,d:function(n){n&&xo(t),e[13](null),r=!1,Qi(i)}}}function gA(e,t,n){var r,i,o=za("jsoneditor:EditableDiv"),a=t.value,s=t.shortText,c=void 0!==s&&s,l=t.onChange,u=t.onCancel,f=t.onFind,d=t.onPaste,h=void 0===d?zf:d,v=t.onValueClass,p=void 0===v?function(){return""}:v,m=!1;function g(){return r?function(e){return e.replace(/\n$/,"")}(r.innerText):""}function y(e){r&&n(1,r.innerText=TO(e),r)}function b(){var e=g();""===e&&y(""),n(2,i=p(e))}function w(){m=!0,u()}return Qo((function(){o("onMount",{value:a}),y(a),r&&(zO(r),n(1,r.refresh=b,r),n(1,r.cancel=w,r))})),Yo((function(){var e=g();o("onDestroy",{closed:m,value:a,newValue:e}),m||e===a||l(e,rs.no)})),e.$$set=function(e){"value"in e&&n(7,a=e.value),"shortText"in e&&n(0,c=e.shortText),"onChange"in e&&n(8,l=e.onChange),"onCancel"in e&&n(9,u=e.onCancel),"onFind"in e&&n(10,f=e.onFind),"onPaste"in e&&n(11,h=e.onPaste),"onValueClass"in e&&n(12,p=e.onValueClass)},e.$$.update=function(){4224&e.$$.dirty&&n(2,i=p(a))},[c,r,i,b,function(e){e.stopPropagation();var t=KO(e);if("Escape"===t&&w(),"Enter"===t||"Tab"===t){m=!0;var n=g();l(n,rs.nextInside)}"Ctrl+F"===t&&(e.preventDefault(),f(!1)),"Ctrl+H"===t&&(e.preventDefault(),f(!0))},function(e){if(e.stopPropagation(),h&&e.clipboardData){var t=e.clipboardData.getData("text/plain");h(t)}},function(){var e=document.hasFocus(),t=g();o("handleBlur",{hasFocus:e,closed:m,value:a,newValue:t}),document.hasFocus()&&!m&&(m=!0,t!==a&&l(t,rs.self))},a,l,u,f,h,p,function(e){ra[e?"unshift":"push"]((function(){n(1,r=e)}))}]}var yA=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,gA,mA,Zi,{value:7,shortText:0,onChange:8,onCancel:9,onFind:10,onPaste:11,onValueClass:12},pA),r}return Di(n)}();function bA(e){var t,n;return t=new yA({props:{value:e[1].escapeValue(e[0]),onChange:e[3],onCancel:e[4],onPaste:e[5],onFind:e[2],onValueClass:e[6]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r=xi(n,1)[0],i={};3&r&&(i.value=e[1].escapeValue(e[0])),4&r&&(i.onFind=e[2]),t.$set(i)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function wA(e,t,n){var r=t.path,i=t.value,o=t.parser,a=t.normalization,s=t.enforceString,c=t.onPatch,l=t.onPasteJson,u=t.onSelect,f=t.onFind,d=t.focus,h=t.findNextInside;function v(e){return s?e:uu(e,o)}return e.$$set=function(e){"path"in e&&n(7,r=e.path),"value"in e&&n(0,i=e.value),"parser"in e&&n(8,o=e.parser),"normalization"in e&&n(1,a=e.normalization),"enforceString"in e&&n(9,s=e.enforceString),"onPatch"in e&&n(10,c=e.onPatch),"onPasteJson"in e&&n(11,l=e.onPasteJson),"onSelect"in e&&n(12,u=e.onSelect),"onFind"in e&&n(2,f=e.onFind),"focus"in e&&n(13,d=e.focus),"findNextInside"in e&&n(14,h=e.findNextInside)},[i,a,f,function(e,t){c([{op:"replace",path:oc(r),value:v(a.unescapeValue(e))}],(function(e,n){if(!n.selection||Vk(r,fA(n.selection))){var i=t===rs.nextInside?h(r):XE(r,!1);return{state:Ri(Ri({},n),{},{selection:i})}}})),d()},function(){u(XE(r,!1)),d()},function(e){try{var t=o.parse(e);iu(t)&&l({path:r,contents:t})}catch(e){}},function(e){return vA(v(a.unescapeValue(e)),o)},r,o,s,c,l,u,d,h]}var kA=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,wA,bA,Zi,{path:7,value:0,parser:8,normalization:1,enforceString:9,onPatch:10,onPasteJson:11,onSelect:12,onFind:2,focus:13,findNextInside:14}),r}return Di(n)}();function xA(e,t,n){var r=fk(t),i=Ys(e,r);if(Ns(i)){var o=eu(Mb(t));return n.map((function(e,t){return{op:"add",path:oc(r.concat(String(o+t))),value:e.value}}))}if(Is(i)){var a=Mb(t),s=Object.keys(i),c=void 0!==a?SE(s,a,!0):[];return[].concat(Bi(n.map((function(e){var t=mM(e.key,s);return{op:"add",path:oc(r.concat(t)),value:e.value}}))),Bi(c.map((function(e){return OA(r,e)}))))}throw new Error("Cannot create insert operations: parent must be an Object or Array")}function jA(e,t,n){var r=Ys(e,t);if(Array.isArray(r)){var i=r.length;return n.map((function(e,n){return{op:"add",path:oc(t.concat(String(i+n))),value:e.value}}))}return n.map((function(e){var n=mM(e.key,Object.keys(r));return{op:"add",path:oc(t.concat(n)),value:e.value}}))}function SA(e,t,n,r){var i=mM(r,t.filter((function(e){return e!==n}))),o=SE(t,n,!1);return[{op:"move",from:oc(e.concat(n)),path:oc(e.concat(i))}].concat(Bi(o.map((function(t){return OA(e,t)}))))}function CA(e,t){var n=Mb(t);if(Fk(n))throw new Error("Cannot duplicate root object");var r=fk(n),i=Mb(n),o=Ys(e,r);if(Ns(o)){var a=Mb(t),s=a?eu(Mb(a))+1:0;return Bi(t.map((function(e,t){return{op:"copy",from:oc(e),path:oc(r.concat(String(t+s)))}})))}if(Is(o)){var c=Object.keys(o),l=void 0!==i?SE(c,i,!1):[];return[].concat(Bi(t.map((function(e){var t=mM(Mb(e),c);return{op:"copy",from:oc(e),path:oc(r.concat(t))}}))),Bi(l.map((function(e){return OA(r,e)}))))}throw new Error("Cannot create duplicate operations: parent must be an Object or Array")}function $A(e,t,n,r){if(TE(t)){var i=nO(n,r),o=fk(t.path),a=Ys(e,o);return SA(o,Object.keys(a),Mb(t.path),"string"==typeof i?i:n)}if(RE(t)||NE(t)&&Fk(t.focusPath))try{return[{op:"replace",path:oc(fA(t)),value:rO(n,(function(e){return tO(e,r)}))}]}catch(e){return[{op:"replace",path:oc(fA(t)),value:n}]}if(NE(t)){var s=MA(n,r);return function(e,t,n){var r=fk(jw(t)),i=Ys(e,r);if(Ns(i)){var o=jw(t),a=o?eu(Mb(o)):0;return[].concat(Bi(_A(t)),Bi(n.map((function(e,t){return{op:"add",path:oc(r.concat(String(t+a))),value:e.value}}))))}if(Is(i)){var s=Mb(t),c=fk(s),l=Mb(s),u=Object.keys(i),f=void 0!==l?SE(u,l,!1):[],d=new Set(t.map((function(e){return Mb(e)}))),h=u.filter((function(e){return!d.has(e)}));return[].concat(Bi(_A(t)),Bi(n.map((function(e){var t=mM(e.key,h);return{op:"add",path:oc(c.concat(t)),value:e.value}}))),Bi(f.map((function(e){return OA(c,e)}))))}throw new Error("Cannot create replace operations: parent must be an Object or Array")}(e,zE(e,t),s)}if(AE(t)){var c=MA(n,r),l=t.path,u=fk(l),f=Ys(e,u);if(Ns(f)){var d=eu(Mb(l));return xA(e,u.concat(String(d+1)),c)}if(Is(f)){var h=String(Mb(l)),v=Object.keys(f);if(Fk(v)||Mb(v)===h)return jA(e,u,c);var p=v.indexOf(h),m=v[p+1];return xA(e,u.concat(m),c)}throw new Error("Cannot create insert operations: parent must be an Object or Array")}if(PE(t)){var g=MA(n,r),y=t.path,b=Ys(e,y);if(Ns(b))return xA(e,y.concat("0"),g);if(Is(b)){var w=Object.keys(b);if(Fk(w))return jA(e,y,g);var k=jw(w);return xA(e,y.concat(k),g)}throw new Error("Cannot create insert operations: parent must be an Object or Array")}throw new Error("Cannot insert: unsupported type of selection "+JSON.stringify(t))}function _A(e){return e.map((function(e){return{op:"remove",path:oc(e)}})).reverse()}function OA(e,t){return{op:"move",from:oc(e.concat(t)),path:oc(e.concat(t))}}function MA(e,t){var n=/^\s*{/.test(e),r=/^\s*\[/.test(e),i=nO(e,t),o=void 0!==i?i:rO(e,(function(e){return tO(e,t)}));return n&&ru(o)||r&&Array.isArray(o)?[{key:"New item",value:o}]:Array.isArray(o)?o.map((function(e,t){return{key:"New item "+t,value:e}})):ru(o)?Object.keys(o).map((function(e){return{key:e,value:o[e]}})):[{key:"New item",value:o}]}function EA(e,t){if(TE(t)){var n=fk(t.path),r=Ys(e,n),i=SA(n,Object.keys(r),Mb(t.path),"");return{operations:i,newSelection:HE(e,i)}}if(RE(t))return{operations:[{op:"replace",path:oc(t.path),value:""}],newSelection:t};if(NE(t)){var o=zE(e,t),a=_A(o),s=Mb(o);if(Fk(s)){return{operations:[{op:"replace",path:"",value:""}],newSelection:XE([],!1)}}var c=fk(s),l=Ys(e,c);if(Ns(l)){var u=eu(Mb(jw(o)));return{operations:a,newSelection:0===u?ZE(c):eA(c.concat(String(u-1)))}}if(Is(l)){var f=Object.keys(l),d=Mb(jw(o)),h=f.indexOf(d),v=f[h-1];return{operations:a,newSelection:0===h?ZE(c):eA(c.concat(v))}}throw new Error("Cannot create remove operations: parent must be an Object or Array")}throw new Error("Cannot remove: unsupported type of selection "+JSON.stringify(t))}function AA(e,t){return xc(e,t,{before:function(e,t,n){if(zs(t)){var r=ic(t.path);return{revertOperations:[].concat(Bi(n),Bi(PA(e,r)))}}if(qs(t)){var i=ic(t.from);return{revertOperations:[].concat(Bi(n),Bi(PA(e,i)))}}return{revertOperations:n}}})}function PA(e,t){var n=fk(t),r=Mb(t),i=Ys(e,n);return Is(i)?SE(Object.keys(i),r,!1).map((function(e){return OA(n,e)})):[]}function TA(e){var t=e.activeIndex<e.items.length-1?e.activeIndex+1:e.items.length>0?0:-1,n=e.items[t],r=e.items.map((function(e,n){return Ri(Ri({},e),{},{active:n===t})}));return Ri(Ri({},e),{},{items:r,itemsMap:Uw(r,(function(e){return oc(e.path)})),activeItem:n,activeIndex:t})}function RA(e){var t=e.activeIndex>0?e.activeIndex-1:e.items.length-1,n=e.items[t],r=e.items.map((function(e,n){return Ri(Ri({},e),{},{active:n===t})}));return Ri(Ri({},e),{},{items:r,itemsMap:Uw(r,(function(e){return oc(e.path)})),activeItem:n,activeIndex:t})}function NA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=[],i=[];function o(e){r.length<n&&r.push(e)}"string"==typeof e&&""!==e&&function e(t,a){if(Ns(a)){var s=i.length;i.push("0");for(var c=0;c<a.length;c++)if(i[s]=String(c),e(t,a[c]),r.length>=n)return;i.pop()}else if(Is(a)){var l=Object.keys(a),u=i.length;i.push("");for(var f=0,d=l;f<d.length;f++){var h=d[f];if(i[u]=h,IA(h,t,i,ts.key,o),e(t,a[h]),r.length>=n)return}i.pop()}else IA(String(a),t,i,ts.value,o)}(e.toLowerCase(),t);return r}function IA(e,t,n,r,i){var o=e.toLowerCase(),a=0,s=-1,c=-1;do{-1!==(c=o.indexOf(t,s))&&(s=c+t.length,i({path:n.slice(0),field:r,fieldIndex:a,start:c,end:s}),a++)}while(-1!==c)}function DA(e,t,n,r){return e.substring(0,n)+t+e.substring(r)}function zA(e,t,n){var r=e;return Ub(n,(function(e){r=DA(r,t,e.start,e.end)})),r}function LA(e,t,n,r,i){var o=r.field,a=r.path,s=r.start,c=r.end;if(o===ts.key){var l=fk(a),u=Ys(e,l),f=Mb(a),d=SA(l,Object.keys(u),f,DA(f,n,s,c));return{newSelection:HE(e,d),operations:d}}if(o===ts.value){var h=Ys(e,a);if(void 0===h)throw new Error("Cannot replace: path not found ".concat(oc(a)));var v="string"==typeof h?h:String(h),p=oc(a),m=jE(h,t.enforceStringMap,p,i),g=DA(v,n,s,c),y=[{op:"replace",path:oc(a),value:m?g:uu(g,i)}];return{newSelection:HE(e,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function BA(e,t,n,r,i){for(var o=NA(n,e,1/0),a=[],s=0;s<o.length;s++){var c=o[s-1],l=o[s];0!==s&&l.field===c.field&&Vk(l.path,c.path)?Mb(a).items.push(l):a.push({path:l.path,field:l.field,items:[l]})}a.sort((function(e,t){return e.field!==t.field?e.field===ts.key?1:-1:t.path.length-e.path.length}));var u=[],f=null;return a.forEach((function(n){var o=n.field,a=n.path,s=n.items;if(o===ts.key){var c=fk(a),l=Ys(e,c),d=Mb(a),h=SA(c,Object.keys(l),d,zA(d,r,s));u=u.concat(h),f=HE(e,h)}else{if(o!==ts.value)throw new Error("Cannot replace: unknown type of search result field ".concat(o));var v=Ys(e,a);if(void 0===v)throw new Error("Cannot replace: path not found ".concat(oc(a)));var p="string"==typeof v?v:String(v),m=oc(a),g=jE(v,t.enforceStringMap,m,i),y=zA(p,r,s),b=[{op:"replace",path:oc(a),value:g?y:uu(y,i)}];u=u.concat(b),f=HE(e,b)}})),{operations:u,newSelection:f}}function qA(e){return e.path.concat(e.field,String(e.fieldIndex))}function FA(e,t){var n,r=null==e||null===(n=e[t])||void 0===n?void 0:n.filter((function(e){return e.field===ts.key}));if(r&&0!==r.length)return r}function VA(e,t){var n,r=null==e||null===(n=e[t])||void 0===n?void 0:n.filter((function(e){return e.field===ts.value}));if(r&&0!==r.length)return r}function WA(e){go(e,"svelte-s6kbew",".jse-highlight.svelte-s6kbew{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-highlight.jse-active.svelte-s6kbew{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}")}function HA(e,t,n){var r=e.slice();return r[3]=t[n],r}function UA(e){var t,n,r=TO(e[3].text)+"";return{c:function(){t=So("span"),n=$o(r),Po(t,"class","jse-highlight svelte-s6kbew"),Bo(t,"jse-active",e[3].active)},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,i){1&i&&r!==(r=TO(e[3].text)+"")&&Io(n,r),1&i&&Bo(t,"jse-active",e[3].active)},d:function(e){e&&xo(t)}}}function JA(e){var t,n=e[3].text+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=e[3].text+"")&&Io(t,n)},d:function(e){e&&xo(t)}}}function KA(e){var t;function n(e,t){return"normal"===e[3].type?JA:UA}var r=n(e),i=r(e);return{c:function(){i.c(),t=Oo()},m:function(e,n){i.m(e,n),ko(e,t,n)},p:function(e,o){r===(r=n(e))&&i?i.p(e,o):(i.d(1),(i=r(e))&&(i.c(),i.m(t.parentNode,t)))},d:function(e){e&&xo(t),i.d(e)}}}function GA(e){for(var t,n=$a(e[0]),r=[],i=0;i<n.length;i+=1)r[i]=KA(HA(e,n,i));return{c:function(){for(var e=0;e<r.length;e+=1)r[e].c();t=Oo()},m:function(e,n){for(var i=0;i<r.length;i+=1)r[i]&&r[i].m(e,n);ko(e,t,n)},p:function(e,i){var o=xi(i,1)[0];if(1&o){var a;for(n=$a(e[0]),a=0;a<n.length;a+=1){var s=HA(e,n,a);r[a]?r[a].p(s,o):(r[a]=KA(s),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},i:Hi,o:Hi,d:function(e){e&&xo(t),jo(r,e)}}}function QA(e,t,n){var r,i=t.text,o=t.searchResultItems;return e.$$set=function(e){"text"in e&&n(1,i=e.text),"searchResultItems"in e&&n(2,o=e.searchResultItems)},e.$$.update=function(){6&e.$$.dirty&&n(0,r=function(e,t){var n,r=[],i=0,o=yi(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=e.slice(i,a.start);""!==s&&r.push({type:"normal",text:s,active:!1});var c=e.slice(a.start,a.end);r.push({type:"highlight",text:c,active:a.active}),i=a.end}}catch(e){o.e(e)}finally{o.f()}var l=Mb(t);return l&&l.end<e.length&&r.push({type:"normal",text:e.slice(l.end),active:!1}),r}(String(i),o))},[r,i,o]}var YA=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,QA,GA,Xi,{text:1,searchResultItems:2},WA),r}return Di(n)}();function XA(e){go(e,"svelte-4unvg2",'.jse-value.jse-string.svelte-4unvg2{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-4unvg2,.jse-value.jse-array.svelte-4unvg2{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-4unvg2{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-4unvg2{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-4unvg2{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-4unvg2{color:var(--jse-text-color)}.jse-value.jse-url.svelte-4unvg2{color:var(--jse-value-color-url);text-decoration:underline}.jse-value.svelte-4unvg2{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:anywhere;white-space:pre-wrap}.jse-value.svelte-4unvg2:hover{background:var(--jse-hover-background-color)}.jse-value.jse-empty.svelte-4unvg2{min-width:4em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-value.jse-empty.svelte-4unvg2::after{pointer-events:none;color:var(--jse-tag-background);content:"value"}')}function ZA(e){var t,n=TO(e[1].escapeValue(e[0]))+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){3&r&&n!==(n=TO(e[1].escapeValue(e[0]))+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function eP(e){var t,n;return t=new YA({props:{text:e[1].escapeValue(e[0]),searchResultItems:e[3]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};3&n&&(r.text=e[1].escapeValue(e[0])),8&n&&(r.searchResultItems=e[3]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function tP(e){var t,n,r,i,o,a,s,c,l=[eP,ZA],u=[];function f(e,t){return e[3]?0:1}return n=f(e),r=u[n]=l[n](e),{c:function(){t=So("div"),r.c(),Po(t,"role","button"),Po(t,"tabindex","-1"),Po(t,"data-type","selectable-value"),Po(t,"class",i=so(vA(e[0],e[2]))+" svelte-4unvg2"),Po(t,"title",o=e[4]?"Ctrl+Click or Ctrl+Enter to open url in new window":null)},m:function(r,i){ko(r,t,i),u[n].m(t,null),a=!0,s||(c=[Mo(t,"click",e[5]),Mo(t,"dblclick",e[6])],s=!0)},p:function(e,s){var c=xi(s,1)[0],d=n;(n=f(e))===d?u[n].p(e,c):(wa(),ja(u[d],1,1,(function(){u[d]=null})),ka(),(r=u[n])?r.p(e,c):(r=u[n]=l[n](e)).c(),xa(r,1),r.m(t,null)),(!a||5&c&&i!==(i=so(vA(e[0],e[2]))+" svelte-4unvg2"))&&Po(t,"class",i),(!a||16&c&&o!==(o=e[4]?"Ctrl+Click or Ctrl+Enter to open url in new window":null))&&Po(t,"title",o)},i:function(e){a||(xa(r),a=!0)},o:function(e){ja(r),a=!1},d:function(e){e&&xo(t),u[n].d(),s=!1,Qi(c)}}}function nP(e,t,n){var r,i=t.path,o=t.value,a=t.readOnly,s=t.normalization,c=t.parser,l=t.onSelect,u=t.searchResultItems;return e.$$set=function(e){"path"in e&&n(7,i=e.path),"value"in e&&n(0,o=e.value),"readOnly"in e&&n(8,a=e.readOnly),"normalization"in e&&n(1,s=e.normalization),"parser"in e&&n(2,c=e.parser),"onSelect"in e&&n(9,l=e.onSelect),"searchResultItems"in e&&n(3,u=e.searchResultItems)},e.$$.update=function(){1&e.$$.dirty&&n(4,r=lu(o))},[o,s,c,u,r,function(e){"string"==typeof o&&r&&e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),window.open(o,"_blank"))},function(e){a||(e.preventDefault(),l(XE(i,!0)))},i,a,l]}var rP=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,nP,tP,Zi,{path:7,value:0,readOnly:8,normalization:1,parser:2,onSelect:9,searchResultItems:3},XA),r}return Di(n)}();function iP(e){go(e,"svelte-r4omvg",".jse-tooltip.svelte-r4omvg{font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);border-radius:3px;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);white-space:nowrap;box-shadow:var(--jse-controls-box-shadow)}")}function oP(e){var t,n;return{c:function(){t=So("div"),n=$o(e[0]),Po(t,"class","jse-tooltip svelte-r4omvg")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){1&xi(t,1)[0]&&Io(n,e[0])},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function aP(e,t,n){var r=t.text;return e.$$set=function(e){"text"in e&&n(0,r=e.text)},[r]}var sP=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,aP,oP,Xi,{text:0},iP),r}return Di(n)}();function cP(e,t){var n,r=t.text,i=t.openAbsolutePopup,o=t.closeAbsolutePopup;function a(){n=i(sP,{text:r},{position:"top",width:10*r.length,offsetTop:3,anchor:e,closeOnOuterClick:!0})}function s(){o(n)}return e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",s),{destroy:function(){e.removeEventListener("mouseenter",a),e.removeEventListener("mouseleave",s)}}}function lP(e){go(e,"svelte-1w5pf7",".jse-timestamp.svelte-1w5pf7{padding:0;margin:0;vertical-align:middle;display:inline-flex;color:var(--jse-value-color-number)}")}function uP(e){var t,n,r,i,o,a;return n=new FM({props:{data:jM}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-timestamp svelte-1w5pf7")},m:function(s,c){ko(s,t,c),Ra(n,t,null),i=!0,o||(a=co(r=cP.call(null,t,Ri({text:e[0]},e[1]))),o=!0)},p:function(e,t){var n=xi(t,1)[0];r&&Yi(r.update)&&1&n&&r.update.call(null,Ri({text:e[0]},e[1]))},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,a()}}}function fP(e,t,n){var r,i=ea("absolute-popup"),o=t.value;return e.$$set=function(e){"value"in e&&n(2,o=e.value)},e.$$.update=function(){4&e.$$.dirty&&n(0,r="Time: ".concat(new Date(o).toString()))},[r,i,o]}var dP=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,fP,uP,Zi,{value:2},lP),r}return Di(n)}();function hP(e){var t=e.path,n=e.value,r=e.readOnly,i=e.enforceString,o=e.searchResultItems,a=e.isEditing,s=e.parser,c=e.normalization,l=e.onPatch,u=e.onPasteJson,f=e.onSelect,d=e.onFind,h=e.findNextInside,v=e.focus,p=[];return!a&&function(e){return!0===e||!1===e}(n)&&p.push({component:UM,props:{path:t,value:n,readOnly:r,onPatch:l,focus:v}}),!a&&function(e){return"string"==typeof e&&!!au(e)}(n)&&p.push({component:eE,props:{path:t,value:n,readOnly:r,onPatch:l,focus:v}}),a&&p.push({component:kA,props:{path:t,value:n,enforceString:i,parser:s,normalization:c,onPatch:l,onPasteJson:u,onSelect:f,onFind:d,findNextInside:h,focus:v}}),a||p.push({component:rP,props:{path:t,value:n,readOnly:r,parser:s,normalization:c,searchResultItems:o,onSelect:f}}),!a&&ou(n)&&p.push({component:dP,props:{value:n}}),p}var vP={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},pP={prefix:"fas",iconName:"caret-right",icon:[256,512,[],"f0da","M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z"]},mP={prefix:"fas",iconName:"paste",icon:[512,512,["file-clipboard"],"f0ea","M160 0c-23.7 0-44.4 12.9-55.4 32H48C21.5 32 0 53.5 0 80V400c0 26.5 21.5 48 48 48H192V176c0-44.2 35.8-80 80-80h48V80c0-26.5-21.5-48-48-48H215.4C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48V448v16c0 26.5 21.5 48 48 48H464c26.5 0 48-21.5 48-48V256H416c-17.7 0-32-14.3-32-32V128H320 272zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm256 88v96h96l-96-96z"]},gP={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},yP={prefix:"fas",iconName:"scissors",icon:[512,512,[9984,9986,9988,"cut"],"f0c4","M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},bP={prefix:"fas",iconName:"square-caret-down",icon:[448,512,["caret-square-down"],"f150","M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"]},wP={prefix:"fas",iconName:"caret-left",icon:[256,512,[],"f0d9","M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z"]},kP={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},xP={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},jP={prefix:"fas",iconName:"angle-right",icon:[320,512,[8250],"f105","M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"]},SP={prefix:"fas",iconName:"square-caret-up",icon:[448,512,["caret-square-up"],"f151","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM224 160c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4H120c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z"]},CP={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},$P={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},_P={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"]},OP={prefix:"fas",iconName:"wrench",icon:[512,512,[128295],"f0ad","M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7H336c-8.8 0-16-7.2-16-16V118.6c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},MP={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},EP={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},AP={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z"]},PP={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},TP={prefix:"fas",iconName:"crop-simple",icon:[512,512,["crop-alt"],"f565","M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32V64H32C14.3 64 0 78.3 0 96s14.3 32 32 32H64V384c0 35.3 28.7 64 64 64H352V384H128V32zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32V448h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H448l0-256c0-35.3-28.7-64-64-64L160 64v64l224 0 0 352z"]},RP={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},NP={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},IP={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},DP={prefix:"fas",iconName:"arrow-right-arrow-left",icon:[448,512,[8644,"exchange"],"f0ec","M438.6 150.6c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.7 96 32 96C14.3 96 0 110.3 0 128s14.3 32 32 32l306.7 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96zm-333.3 352c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 416 416 416c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96z"]},zP={prefix:"fas",iconName:"arrow-down-short-wide",icon:[576,512,["sort-amount-desc","sort-amount-down-alt"],"f884","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},LP={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},BP={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},qP={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},FP={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},VP={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"]},WP={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},HP={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},UP=HP,JP=HP,KP={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},GP={prefix:"fas",iconName:"clone",icon:[512,512,[],"f24d","M288 448H64V224h64V160H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64zm-64-96H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64z"]},QP={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},YP={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},XP={},ZP={showWizard:!0,showOriginal:!0},eT=Math.min,tT=Math.max,nT=Math.round,rT=Math.floor,iT=function(e){return{x:e,y:e}},oT={left:"right",right:"left",bottom:"top",top:"bottom"},aT={start:"end",end:"start"};function sT(e,t,n){return tT(e,eT(t,n))}function cT(e,t){return"function"==typeof e?e(t):e}function lT(e){return e.split("-")[0]}function uT(e){return e.split("-")[1]}function fT(e){return"x"===e?"y":"x"}function dT(e){return"y"===e?"height":"width"}function hT(e){return["top","bottom"].includes(lT(e))?"y":"x"}function vT(e){return fT(hT(e))}function pT(e,t,n){void 0===n&&(n=!1);var r=uT(e),i=vT(e),o=dT(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=bT(a)),[a,bT(a)]}function mT(e){var t=bT(e);return[gT(e),t,gT(t)]}function gT(e){return e.replace(/start|end/g,(function(e){return aT[e]}))}function yT(e,t,n,r){var i=uT(e),o=function(e,t,n){var r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(lT(e),"start"===n,r);return i&&(o=o.map((function(e){return e+"-"+i})),t&&(o=o.concat(o.map(gT)))),o}function bT(e){return e.replace(/left|right|bottom|top/g,(function(e){return oT[e]}))}function wT(e){return"number"!=typeof e?function(e){return Ri({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function kT(e){return Ri(Ri({},e),{},{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function xT(e,t,n){var r,i=e.reference,o=e.floating,a=hT(t),s=vT(t),c=dT(s),l=lT(t),u="y"===a,f=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;switch(l){case"top":r={x:f,y:i.y-o.height};break;case"bottom":r={x:f,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:d};break;case"left":r={x:i.x-o.width,y:d};break;default:r={x:i.x,y:i.y}}switch(uT(t)){case"start":r[s]-=h*(n&&u?-1:1);break;case"end":r[s]+=h*(n&&u?-1:1)}return r}var jT=function(){var e=ki(bi().mark((function e(t,n,r){var i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.placement,o=void 0===i?"bottom":i,a=r.strategy,s=void 0===a?"absolute":a,c=r.middleware,l=void 0===c?[]:c,u=r.platform,f=l.filter(Boolean),e.next=4,null==u.isRTL?void 0:u.isRTL(n);case 4:return d=e.sent,e.next=7,u.getElementRects({reference:t,floating:n,strategy:s});case 7:h=e.sent,v=xT(h,o,d),p=v.x,m=v.y,g=o,y={},b=0,w=0;case 13:if(!(w<f.length)){e.next=46;break}return k=f[w],x=k.name,j=k.fn,e.next=17,j({x:p,y:m,initialPlacement:o,placement:g,strategy:s,middlewareData:y,rects:h,platform:u,elements:{reference:t,floating:n}});case 17:if(S=e.sent,C=S.x,$=S.y,_=S.data,O=S.reset,p=null!=C?C:p,m=null!=$?$:m,y=Ri(Ri({},y),{},zi({},x,Ri(Ri({},y[x]),_))),!(O&&b<=50)){e.next=43;break}if(b++,"object"!==Wi(O)){e.next=41;break}if(O.placement&&(g=O.placement),!O.rects){e.next=38;break}if(!0!==O.rects){e.next=36;break}return e.next=33,u.getElementRects({reference:t,floating:n,strategy:s});case 33:e.t0=e.sent,e.next=37;break;case 36:e.t0=O.rects;case 37:h=e.t0;case 38:M=xT(h,g,d),p=M.x,m=M.y;case 41:return w=-1,e.abrupt("continue",43);case 43:w++,e.next=13;break;case 46:return e.abrupt("return",{x:p,y:m,placement:g,strategy:s,middlewareData:y});case 47:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();function ST(e,t){return CT.apply(this,arguments)}function CT(){return CT=ki(bi().mark((function e(t,n){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n={}),i=t.x,o=t.y,a=t.platform,s=t.rects,c=t.elements,l=t.strategy,u=cT(n,t),f=u.boundary,d=void 0===f?"clippingAncestors":f,h=u.rootBoundary,v=void 0===h?"viewport":h,p=u.elementContext,m=void 0===p?"floating":p,g=u.altBoundary,y=void 0!==g&&g,b=u.padding,w=wT(void 0===b?0:b),k="floating"===m?"reference":"floating",x=c[y?k:m],e.t0=kT,e.t1=a,e.next=10,null==a.isElement?void 0:a.isElement(x);case 10:if(e.t2=r=e.sent,null==e.t2){e.next=15;break}e.t3=r,e.next=16;break;case 15:e.t3=!0;case 16:if(!e.t3){e.next=20;break}e.t4=x,e.next=26;break;case 20:if(e.t5=x.contextElement,e.t5){e.next=25;break}return e.next=24,null==a.getDocumentElement?void 0:a.getDocumentElement(c.floating);case 24:e.t5=e.sent;case 25:e.t4=e.t5;case 26:return e.t6=e.t4,e.t7=d,e.t8=v,e.t9=l,e.t10={element:e.t6,boundary:e.t7,rootBoundary:e.t8,strategy:e.t9},e.next=33,e.t1.getClippingRect.call(e.t1,e.t10);case 33:return e.t11=e.sent,j=(0,e.t0)(e.t11),S="floating"===m?Ri(Ri({},s.floating),{},{x:i,y:o}):s.reference,e.next=38,null==a.getOffsetParent?void 0:a.getOffsetParent(c.floating);case 38:return C=e.sent,e.next=41,null==a.isElement?void 0:a.isElement(C);case 41:if(!e.sent){e.next=50;break}return e.next=44,null==a.getScale?void 0:a.getScale(C);case 44:if(e.t13=e.sent,e.t13){e.next=47;break}e.t13={x:1,y:1};case 47:e.t12=e.t13,e.next=51;break;case 50:e.t12={x:1,y:1};case 51:if($=e.t12,e.t14=kT,!a.convertOffsetParentRelativeRectToViewportRelativeRect){e.next=59;break}return e.next=56,a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:S,offsetParent:C,strategy:l});case 56:e.t15=e.sent,e.next=60;break;case 59:e.t15=S;case 60:return e.t16=e.t15,_=(0,e.t14)(e.t16),e.abrupt("return",{top:(j.top-_.top+w.top)/$.y,bottom:(_.bottom-j.bottom+w.bottom)/$.y,left:(j.left-_.left+w.left)/$.x,right:(_.right-j.right+w.right)/$.x});case 63:case"end":return e.stop()}}),e)}))),CT.apply(this,arguments)}var $T=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn:function(t){return ki(bi().mark((function n(){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,A,P,T,R,N,I,D,z,L;return bi().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=t.placement,a=t.middlewareData,s=t.rects,c=t.initialPlacement,l=t.platform,u=t.elements,f=cT(e,t),d=f.mainAxis,h=void 0===d||d,v=f.crossAxis,p=void 0===v||v,m=f.fallbackPlacements,g=f.fallbackStrategy,y=void 0===g?"bestFit":g,b=f.fallbackAxisSideDirection,w=void 0===b?"none":b,k=f.flipAlignment,x=void 0===k||k,j=gi(f,hi),null==(r=a.arrow)||!r.alignmentOffset){n.next=4;break}return n.abrupt("return",{});case 4:return S=lT(o),C=lT(c)===c,n.next=8,null==l.isRTL?void 0:l.isRTL(u.floating);case 8:return $=n.sent,_=m||(C||!x?[bT(c)]:mT(c)),m||"none"===w||_.push.apply(_,Bi(yT(c,x,w,$))),O=[c].concat(Bi(_)),n.next=14,ST(t,j);case 14:if(M=n.sent,E=[],A=(null==(i=a.flip)?void 0:i.overflows)||[],h&&E.push(M[S]),p&&(P=pT(o,s,$),E.push(M[P[0]],M[P[1]])),A=[].concat(Bi(A),[{placement:o,overflows:E}]),E.every((function(e){return e<=0}))){n.next=37;break}if(N=((null==(T=a.flip)?void 0:T.index)||0)+1,!(I=O[N])){n.next=25;break}return n.abrupt("return",{data:{index:N,overflows:A},reset:{placement:I}});case 25:if(D=null==(R=A.filter((function(e){return e.overflows[0]<=0})).sort((function(e,t){return e.overflows[1]-t.overflows[1]}))[0])?void 0:R.placement){n.next=35;break}n.t0=y,n.next="bestFit"===n.t0?30:"initialPlacement"===n.t0?33:35;break;case 30:return L=null==(z=A.map((function(e){return[e.placement,e.overflows.filter((function(e){return e>0})).reduce((function(e,t){return e+t}),0)]})).sort((function(e,t){return e[1]-t[1]}))[0])?void 0:z[0],L&&(D=L),n.abrupt("break",35);case 33:return D=c,n.abrupt("break",35);case 35:if(o===D){n.next=37;break}return n.abrupt("return",{reset:{placement:D}});case 37:return n.abrupt("return",{});case 38:case"end":return n.stop()}}),n)})))()}}};function _T(e,t){return OT.apply(this,arguments)}function OT(){return OT=ki(bi().mark((function e(t,n){var r,i,o,a,s,c,l,u,f,d,h,v,p,m;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.placement,i=t.platform,o=t.elements,e.next=3,null==i.isRTL?void 0:i.isRTL(o.floating);case 3:return a=e.sent,s=lT(r),c=uT(r),l="y"===hT(r),u=["left","top"].includes(s)?-1:1,f=a&&l?-1:1,d=cT(n,t),h="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:Ri({mainAxis:0,crossAxis:0,alignmentAxis:null},d),v=h.mainAxis,p=h.crossAxis,m=h.alignmentAxis,c&&"number"==typeof m&&(p="end"===c?-1*m:m),e.abrupt("return",l?{x:p*f,y:v*u}:{x:v*u,y:p*f});case 13:case"end":return e.stop()}}),e)}))),OT.apply(this,arguments)}var MT=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn:function(t){return ki(bi().mark((function n(){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$;return bi().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.x,i=t.y,o=t.placement,a=cT(e,t),s=a.mainAxis,c=void 0===s||s,l=a.crossAxis,u=void 0!==l&&l,f=a.limiter,d=void 0===f?{fn:function(e){return{x:e.x,y:e.y}}}:f,h=gi(a,vi),v={x:r,y:i},n.next=5,ST(t,h);case 5:return p=n.sent,m=hT(lT(o)),g=fT(m),y=v[g],b=v[m],c&&(w="y"===g?"bottom":"right",k=y+p["y"===g?"top":"left"],x=y-p[w],y=sT(k,y,x)),u&&(j="y"===m?"bottom":"right",S=b+p["y"===m?"top":"left"],C=b-p[j],b=sT(S,b,C)),$=d.fn(Ri(Ri({},t),{},zi(zi({},g,y),m,b))),n.abrupt("return",Ri(Ri({},$),{},{data:{x:$.x-r,y:$.y-i}}));case 14:case"end":return n.stop()}}),n)})))()}}};function ET(e){return TT(e)?(e.nodeName||"").toLowerCase():"#document"}function AT(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function PT(e){var t;return null==(t=(TT(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function TT(e){return e instanceof Node||e instanceof AT(e).Node}function RT(e){return e instanceof Element||e instanceof AT(e).Element}function NT(e){return e instanceof HTMLElement||e instanceof AT(e).HTMLElement}function IT(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof AT(e).ShadowRoot)}function DT(e){var t=FT(e),n=t.overflow,r=t.overflowX,i=t.overflowY,o=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!["inline","contents"].includes(o)}function zT(e){return["table","td","th"].includes(ET(e))}function LT(e){var t=BT(),n=FT(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((function(e){return(n.willChange||"").includes(e)}))||["paint","layout","strict","content"].some((function(e){return(n.contain||"").includes(e)}))}function BT(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qT(e){return["html","body","#document"].includes(ET(e))}function FT(e){return AT(e).getComputedStyle(e)}function VT(e){return RT(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function WT(e){if("html"===ET(e))return e;var t=e.assignedSlot||e.parentNode||IT(e)&&e.host||PT(e);return IT(t)?t.host:t}function HT(e){var t=WT(e);return qT(t)?e.ownerDocument?e.ownerDocument.body:e.body:NT(t)&&DT(t)?t:HT(t)}function UT(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);var i=HT(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=AT(i);return o?t.concat(a,a.visualViewport||[],DT(i)?i:[],a.frameElement&&n?UT(a.frameElement):[]):t.concat(i,UT(i,[],n))}function JT(e){var t=FT(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=NT(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=nT(n)!==o||nT(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function KT(e){return RT(e)?e:e.contextElement}function GT(e){var t=KT(e);if(!NT(t))return iT(1);var n=t.getBoundingClientRect(),r=JT(t),i=r.width,o=r.height,a=r.$,s=(a?nT(n.width):n.width)/i,c=(a?nT(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),c&&Number.isFinite(c)||(c=1),{x:s,y:c}}var QT=iT(0);function YT(e){var t=AT(e);return BT()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:QT}function XT(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),o=KT(e),a=iT(1);t&&(r?RT(r)&&(a=GT(r)):a=GT(e));var s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==AT(e))&&t}(o,n,r)?YT(o):iT(0),c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(o)for(var d=AT(o),h=r&&RT(r)?AT(r):r,v=d.frameElement;v&&r&&h!==d;){var p=GT(v),m=v.getBoundingClientRect(),g=FT(v),y=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*p.x,b=m.top+(v.clientTop+parseFloat(g.paddingTop))*p.y;c*=p.x,l*=p.y,u*=p.x,f*=p.y,c+=y,l+=b,v=AT(v).frameElement}return kT({width:u,height:f,x:c,y:l})}function ZT(e){return XT(PT(e)).left+VT(e).scrollLeft}function eR(e,t,n){var r;if("viewport"===t)r=function(e,t){var n=AT(e),r=PT(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var l=BT();(!l||l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s,y:c}}(e,n);else if("document"===t)r=function(e){var t=PT(e),n=VT(e),r=e.ownerDocument.body,i=tT(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=tT(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+ZT(e),s=-n.scrollTop;return"rtl"===FT(r).direction&&(a+=tT(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(PT(e));else if(RT(t))r=function(e,t){var n=XT(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=NT(e)?GT(e):iT(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{var i=YT(e);r=Ri(Ri({},t),{},{x:t.x-i.x,y:t.y-i.y})}return kT(r)}function tR(e,t){var n=WT(e);return!(n===t||!RT(n)||qT(n))&&("fixed"===FT(n).position||tR(n,t))}function nR(e,t,n){var r=NT(t),i=PT(t),o="fixed"===n,a=XT(e,!0,o,t),s={scrollLeft:0,scrollTop:0},c=iT(0);if(r||!r&&!o)if(("body"!==ET(t)||DT(i))&&(s=VT(t)),r){var l=XT(t,!0,o,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else i&&(c.x=ZT(i));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function rR(e,t){return NT(e)&&"fixed"!==FT(e).position?t?t(e):e.offsetParent:null}function iR(e,t){var n=AT(e);if(!NT(e))return n;for(var r=rR(e,t);r&&zT(r)&&"static"===FT(r).position;)r=rR(r,t);return r&&("html"===ET(r)||"body"===ET(r)&&"static"===FT(r).position&&!LT(r))?n:r||function(e){for(var t=WT(e);NT(t)&&!qT(t);){if(LT(t))return t;t=WT(t)}return null}(e)||n}var oR={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){var t=e.rect,n=e.offsetParent,r=e.strategy,i=NT(n),o=PT(n);if(n===o)return t;var a={scrollLeft:0,scrollTop:0},s=iT(1),c=iT(0);if((i||!i&&"fixed"!==r)&&(("body"!==ET(n)||DT(o))&&(a=VT(n)),NT(n))){var l=XT(n);s=GT(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}},getDocumentElement:PT,getClippingRect:function(e){var t=e.element,n=e.boundary,r=e.rootBoundary,i=e.strategy,o="clippingAncestors"===n?function(e,t){var n=t.get(e);if(n)return n;for(var r=UT(e,[],!1).filter((function(e){return RT(e)&&"body"!==ET(e)})),i=null,o="fixed"===FT(e).position,a=o?WT(e):e;RT(a)&&!qT(a);){var s=FT(a),c=LT(a);c||"fixed"!==s.position||(i=null),(o?!c&&!i:!c&&"static"===s.position&&i&&["absolute","fixed"].includes(i.position)||DT(a)&&!c&&tR(e,a))?r=r.filter((function(e){return e!==a})):i=s,a=WT(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[].concat(Bi(o),[r]),s=a[0],c=a.reduce((function(e,n){var r=eR(t,n,i);return e.top=tT(r.top,e.top),e.right=eT(r.right,e.right),e.bottom=eT(r.bottom,e.bottom),e.left=tT(r.left,e.left),e}),eR(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:iR,getElementRects:function(){var e=ki(bi().mark((function e(t){var n,r,i,o,a;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.reference,r=t.floating,i=t.strategy,o=this.getOffsetParent||iR,a=this.getDimensions,e.t0=nR,e.t1=n,e.next=7,o(r);case 7:return e.t2=e.sent,e.t3=i,e.t4=(0,e.t0)(e.t1,e.t2,e.t3),e.t5=Ri,e.t6={x:0,y:0},e.next=14,a(r);case 14:return e.t7=e.sent,e.t8=(0,e.t5)(e.t6,e.t7),e.abrupt("return",{reference:e.t4,floating:e.t8});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return JT(e)},getScale:GT,isElement:RT,isRTL:function(e){return"rtl"===FT(e).direction}};function aR(e,t,n,r){void 0===r&&(r={});var i=r,o=i.ancestorScroll,a=void 0===o||o,s=i.ancestorResize,c=void 0===s||s,l=i.elementResize,u=void 0===l?"function"==typeof ResizeObserver:l,f=i.layoutShift,d=void 0===f?"function"==typeof IntersectionObserver:f,h=i.animationFrame,v=void 0!==h&&h,p=KT(e),m=a||c?[].concat(Bi(p?UT(p):[]),Bi(UT(t))):[];m.forEach((function(e){a&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));var g,y=p&&d?function(e,t){var n,r=null,i=PT(e);function o(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),o();var l=e.getBoundingClientRect(),u=l.left,f=l.top,d=l.width,h=l.height;if(s||t(),d&&h){var v={rootMargin:-rT(f)+"px "+-rT(i.clientWidth-(u+d))+"px "+-rT(i.clientHeight-(f+h))+"px "+-rT(u)+"px",threshold:tT(0,eT(1,c))||1},p=!0;try{r=new IntersectionObserver(m,Ri(Ri({},v),{},{root:i.ownerDocument}))}catch(e){r=new IntersectionObserver(m,v)}r.observe(e)}function m(e){var t=e[0].intersectionRatio;if(t!==c){if(!p)return a();t?a(!1,t):n=setTimeout((function(){a(!1,1e-7)}),100)}p=!1}}(!0),o}(p,n):null,b=-1,w=null;u&&(w=new ResizeObserver((function(e){var r=xi(e,1)[0];r&&r.target===p&&w&&(w.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame((function(){w&&w.observe(t)}))),n()})),p&&!v&&w.observe(p),w.observe(t));var k=v?XT(e):null;return v&&function t(){var r=XT(e);!k||r.x===k.x&&r.y===k.y&&r.width===k.width&&r.height===k.height||n();k=r,g=requestAnimationFrame(t)}(),n(),function(){m.forEach((function(e){a&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),y&&y(),w&&w.disconnect(),w=null,v&&cancelAnimationFrame(g)}}var sR=function(e,t,n){var r=new Map,i=Ri({platform:oR},n),o=Ri(Ri({},i.platform),{},{_c:r});return jT(e,t,Ri(Ri({},i),{},{platform:o}))};function cR(e){var t=e.loadOptions,n=e.filterText,r=e.items,i=e.multiple,o=e.value,a=e.itemId,s=e.groupBy,c=e.filterSelectedItems,l=e.itemFilter,u=e.convertStringItemsToObjects,f=e.filterGroupedItems,d=e.label;if(r&&t)return r;if(!r)return[];r&&r.length>0&&"object"!==Wi(r[0])&&(r=u(r));var h=r.filter((function(e){var t=l(e[d],n,e);return t&&i&&null!=o&&o.length&&(t=!o.some((function(t){return!!c&&t[a]===e[a]}))),t}));return s&&(h=f(h)),h}function lR(e){return uR.apply(this,arguments)}function uR(){return uR=ki(bi().mark((function e(t){var n,r,i,o,a;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dispatch,r=t.loadOptions,i=t.convertStringItemsToObjects,o=t.filterText,e.next=3,r(o).catch((function(e){console.warn("svelte-select loadOptions error :>> ",e),n("error",{type:"loadOptions",details:e})}));case 3:if(!(a=e.sent)||a.cancelled){e.next=7;break}return a?(a&&a.length>0&&"object"!==Wi(a[0])&&(a=i(a)),n("loaded",{items:a})):a=[],e.abrupt("return",{filteredItems:a,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return e.stop()}}),e)}))),uR.apply(this,arguments)}function fR(e){go(e,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function dR(e){var t,n;return{c:function(){t=Co("svg"),Po(n=Co("path"),"fill","currentColor"),Po(n,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),Po(t,"width","100%"),Po(t,"height","100%"),Po(t,"viewBox","0 0 20 20"),Po(t,"focusable","false"),Po(t,"aria-hidden","true"),Po(t,"class","svelte-qbd276")},m:function(e,r){ko(e,t,r),mo(t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}var hR=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,null,dR,Xi,{},fR),r}return Di(n)}();function vR(e){go(e,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function pR(e){var t,n;return{c:function(){t=Co("svg"),Po(n=Co("path"),"fill","currentColor"),Po(n,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),Po(t,"width","100%"),Po(t,"height","100%"),Po(t,"viewBox","-2 -2 50 50"),Po(t,"focusable","false"),Po(t,"aria-hidden","true"),Po(t,"role","presentation"),Po(t,"class","svelte-whdbu1")},m:function(e,r){ko(e,t,r),mo(t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}var mR=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,null,pR,Xi,{},vR),r}return Di(n)}();function gR(e){go(e,"svelte-1p3nqvd",".loading.svelte-1p3nqvd{width:var(--spinner-width, 20px);height:var(--spinner-height, 20px);color:var(--spinner-color, var(--icons-color));animation:svelte-1p3nqvd-rotate 0.75s linear infinite;transform-origin:center center;transform:none}.circle_path.svelte-1p3nqvd{stroke-dasharray:90;stroke-linecap:round}@keyframes svelte-1p3nqvd-rotate{100%{transform:rotate(360deg)}}")}function yR(e){var t,n;return{c:function(){t=Co("svg"),Po(n=Co("circle"),"class","circle_path svelte-1p3nqvd"),Po(n,"cx","50"),Po(n,"cy","50"),Po(n,"r","20"),Po(n,"fill","none"),Po(n,"stroke","currentColor"),Po(n,"stroke-width","5"),Po(n,"stroke-miterlimit","10"),Po(t,"class","loading svelte-1p3nqvd"),Po(t,"viewBox","25 25 50 50")},m:function(e,r){ko(e,t,r),mo(t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}var bR=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,null,yR,Xi,{},gR),r}return Di(n)}();function wR(e){go(e,"svelte-82qwg8",".svelte-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--groupTitleBorderColor:var(--group-title-border-color);--groupTitleBorderWidth:var(--group-title-border-width);--groupTitleBorderStyle:var(--group-title-border-style);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px);max-height:var(--max-height)}.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:var(--value-container-padding, 5px 0);position:relative;overflow:var(--value-container-overflow, hidden);align-self:stretch}.prepend.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.indicators.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;flex-shrink:0;align-items:center}.indicators.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:var(--indicators-position);top:var(--indicators-top);right:var(--indicators-right);bottom:var(--indicators-bottom)}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-82qwg8:not(.multi)>.value-container.svelte-82qwg8>input.svelte-82qwg8{width:100%;height:100%}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:none}.svelte-select.focused.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-82qwg8 input.svelte-82qwg8.svelte-82qwg8::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-82qwg8 .selected-item.svelte-82qwg8.svelte-82qwg8{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:none}.hide-selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0}.icon.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;align-items:center;justify-content:center}.clear-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-82qwg8 input.svelte-82qwg8.svelte-82qwg8{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0;pointer-events:none}.list-group-title.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase);border-width:var(--group-title-border-width, medium);border-style:var(--group-title-border-style, none);border-color:var(--group-title-border-color, color)}.empty.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.hover.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.active.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var kR=function(e){return{value:8&e[0]}},xR=function(e){return{value:e[3]}},jR=function(e){return{value:8&e[0]}},SR=function(e){return{value:e[3]}},CR=function(e){return{listOpen:64&e[0]}},$R=function(e){return{listOpen:e[6]}},_R=function(e){return{}},OR=function(e){return{}},MR=function(e){return{}},ER=function(e){return{}},AR=function(e){return{selection:8&e[0]}},PR=function(e){return{selection:e[3]}};function TR(e,t,n){var r=e.slice();return r[126]=t[n],r[128]=n,r}var RR=function(e){return{}},NR=function(e){return{}},IR=function(e){return{selection:8&e[0]}},DR=function(e){return{selection:e[126],index:e[128]}},zR=function(e){return{}},LR=function(e){return{}},BR=function(e){return{}},qR=function(e){return{}},FR=function(e){return{}},VR=function(e){return{}};function WR(e,t,n){var r=e.slice();return r[126]=t[n],r[128]=n,r}var HR=function(e){return{item:16777216&e[0]}},UR=function(e){return{item:e[126],index:e[128]}},JR=function(e){return{filteredItems:16777216&e[0]}},KR=function(e){return{filteredItems:e[24]}},GR=function(e){return{}},QR=function(e){return{}};function YR(e){var t,n,r,i,o,a,s,c,l=e[50]["list-prepend"]&&XR(e),u=[tN,eN,ZR],f=[];function d(e,t){return e[50].list?0:e[24].length>0?1:e[19]?-1:2}~(r=d(e))&&(i=f[r]=u[r](e));var h=e[50]["list-append"]&&rN(e);return{c:function(){t=So("div"),l&&l.c(),n=_o(),i&&i.c(),o=_o(),h&&h.c(),Po(t,"class","svelte-select-list svelte-82qwg8"),Bo(t,"prefloat",e[28])},m:function(i,u){ko(i,t,u),l&&l.m(t,null),mo(t,n),~r&&f[r].m(t,null),mo(t,o),h&&h.m(t,null),e[91](t),a=!0,s||(c=[co(e[49].call(null,t)),Mo(t,"scroll",e[41]),Mo(t,"pointerup",Ao(Eo(e[85]))),Mo(t,"mousedown",Ao(Eo(e[86])))],s=!0)},p:function(e,s){e[50]["list-prepend"]?l?(l.p(e,s),524288&s[1]&&xa(l,1)):((l=XR(e)).c(),xa(l,1),l.m(t,n)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka());var c=r;(r=d(e))===c?~r&&f[r].p(e,s):(i&&(wa(),ja(f[c],1,1,(function(){f[c]=null})),ka()),~r?((i=f[r])?i.p(e,s):(i=f[r]=u[r](e)).c(),xa(i,1),i.m(t,o)):i=null),e[50]["list-append"]?h?(h.p(e,s),524288&s[1]&&xa(h,1)):((h=rN(e)).c(),xa(h,1),h.m(t,null)):h&&(wa(),ja(h,1,1,(function(){h=null})),ka()),(!a||268435456&s[0])&&Bo(t,"prefloat",e[28])},i:function(e){a||(xa(l),xa(i),xa(h),a=!0)},o:function(e){ja(l),ja(i),ja(h),a=!1},d:function(n){n&&xo(t),l&&l.d(),~r&&f[r].d(),h&&h.d(),e[91](null),s=!1,Qi(c)}}}function XR(e){var t,n=e[83]["list-prepend"],r=eo(n,e,e[82],QR);return{c:function(){r&&r.c()},m:function(e,n){r&&r.m(e,n),t=!0},p:function(e,i){r&&r.p&&(!t||1048576&i[2])&&ro(r,n,e,e[82],t?no(n,e[82],i,GR):io(e[82]),QR)},i:function(e){t||(xa(r,e),t=!0)},o:function(e){ja(r,e),t=!1},d:function(e){r&&r.d(e)}}}function ZR(e){var t,n,r=e[83].empty,i=eo(r,e,e[82],VR),o=i||{c:function(){(n=So("div")).textContent="No options",Po(n,"class","empty svelte-82qwg8")},m:function(e,t){ko(e,n,t)},p:Hi,d:function(e){e&&xo(n)}};return{c:function(){o&&o.c()},m:function(e,n){o&&o.m(e,n),t=!0},p:function(e,n){i&&i.p&&(!t||1048576&n[2])&&ro(i,r,e,e[82],t?no(r,e[82],n,FR):io(e[82]),VR)},i:function(e){t||(xa(o,e),t=!0)},o:function(e){ja(o,e),t=!1},d:function(e){o&&o.d(e)}}}function eN(e){for(var t,n,r=$a(e[24]),i=[],o=0;o<r.length;o+=1)i[o]=nN(WR(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=Oo()},m:function(e,r){for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(e,r);ko(e,t,r),n=!0},p:function(e,n){if(1627402376&n[0]|28672&n[1]|1048576&n[2]){var o;for(r=$a(e[24]),o=0;o<r.length;o+=1){var s=WR(e,r,o);i[o]?(i[o].p(s,n),xa(i[o],1)):(i[o]=nN(s),i[o].c(),xa(i[o],1),i[o].m(t.parentNode,t))}for(wa(),o=r.length;o<i.length;o+=1)a(o);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function tN(e){var t,n=e[83].list,r=eo(n,e,e[82],KR);return{c:function(){r&&r.c()},m:function(e,n){r&&r.m(e,n),t=!0},p:function(e,i){r&&r.p&&(!t||16777216&i[0]|1048576&i[2])&&ro(r,n,e,e[82],t?no(n,e[82],i,JR):io(e[82]),KR)},i:function(e){t||(xa(r,e),t=!0)},o:function(e){ja(r,e),t=!1},d:function(e){r&&r.d(e)}}}function nN(e){var t,n,r,i,o,a,s,c,l=e[83].item,u=eo(l,e,e[82],UR),f=u||function(e){var t,n,r=(null===(t=e[126])||void 0===t?void 0:t[e[12]])+"";return{c:function(){n=$o(r)},m:function(e,t){ko(e,n,t)},p:function(e,t){var i;16781312&t[0]&&r!==(r=(null===(i=e[126])||void 0===i?void 0:i[e[12]])+"")&&Io(n,r)},d:function(e){e&&xo(n)}}}(e);function d(){return e[88](e[128])}function h(){return e[89](e[128])}function v(){return e[90](e[126],e[128])}return{c:function(){var r;t=So("div"),n=So("div"),f&&f.c(),o=_o(),Po(n,"class","item svelte-82qwg8"),Bo(n,"list-group-title",e[126].groupHeader),Bo(n,"active",e[45](e[126],e[3],e[13])),Bo(n,"first",0===e[128]),Bo(n,"hover",e[7]===e[128]),Bo(n,"group-item",e[126].groupItem),Bo(n,"not-selectable",!1===(null===(r=e[126])||void 0===r?void 0:r.selectable)),Po(t,"class","list-item svelte-82qwg8"),Po(t,"tabindex","-1"),Po(t,"role","none")},m:function(l,u){ko(l,t,u),mo(t,n),f&&f.m(n,null),mo(t,o),a=!0,s||(c=[co(r=e[46].call(null,n,{scroll:e[45](e[126],e[3],e[13]),listDom:e[30]})),co(i=e[47].call(null,n,{scroll:e[29]===e[128],listDom:e[30]})),Mo(t,"mouseover",d),Mo(t,"focus",h),Mo(t,"click",Ao(v)),Mo(t,"keydown",Ao(Eo(e[87])))],s=!0)},p:function(t,o){var s;(e=t,u?u.p&&(!a||16777216&o[0]|1048576&o[2])&&ro(u,l,e,e[82],a?no(l,e[82],o,HR):io(e[82]),UR):f&&f.p&&(!a||16781312&o[0])&&f.p(e,a?o:[-1,-1,-1,-1,-1]),r&&Yi(r.update)&&1090527240&o[0]&&r.update.call(null,{scroll:e[45](e[126],e[3],e[13]),listDom:e[30]}),i&&Yi(i.update)&&1610612736&o[0]&&i.update.call(null,{scroll:e[29]===e[128],listDom:e[30]}),(!a||16777216&o[0])&&Bo(n,"list-group-title",e[126].groupHeader),(!a||16785416&o[0]|16384&o[1])&&Bo(n,"active",e[45](e[126],e[3],e[13])),(!a||128&o[0])&&Bo(n,"hover",e[7]===e[128]),(!a||16777216&o[0])&&Bo(n,"group-item",e[126].groupItem),!a||16777216&o[0])&&Bo(n,"not-selectable",!1===(null===(s=e[126])||void 0===s?void 0:s.selectable))},i:function(e){a||(xa(f,e),a=!0)},o:function(e){ja(f,e),a=!1},d:function(e){e&&xo(t),f&&f.d(e),s=!1,Qi(c)}}}function rN(e){var t,n=e[83]["list-append"],r=eo(n,e,e[82],qR);return{c:function(){r&&r.c()},m:function(e,n){r&&r.m(e,n),t=!0},p:function(e,i){r&&r.p&&(!t||1048576&i[2])&&ro(r,n,e,e[82],t?no(n,e[82],i,BR):io(e[82]),qR)},i:function(e){t||(xa(r,e),t=!0)},o:function(e){ja(r,e),t=!1},d:function(e){r&&r.d(e)}}}function iN(e){var t,n,r,i,o;return{c:function(){t=So("span"),n=$o(e[32]),r=_o(),i=So("span"),o=$o(e[31]),Po(t,"id","aria-selection"),Po(t,"class","svelte-82qwg8"),Po(i,"id","aria-context"),Po(i,"class","svelte-82qwg8")},m:function(e,a){ko(e,t,a),mo(t,n),ko(e,r,a),ko(e,i,a),mo(i,o)},p:function(e,t){2&t[1]&&Io(n,e[32]),1&t[1]&&Io(o,e[31])},d:function(e){e&&(xo(t),xo(r),xo(i))}}}function oN(e){var t,n,r,i,o=[sN,aN],a=[];function s(e,t){return e[9]?0:1}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=Oo()},m:function(e,n){a[t].m(e,n),ko(e,r,n),i=!0},p:function(e,i){var c=t;(t=s(e))===c?a[t].p(e,i):(wa(),ja(a[c],1,1,(function(){a[c]=null})),ka(),(n=a[t])?n.p(e,i):(n=a[t]=o[t](e)).c(),xa(n,1),n.m(r.parentNode,r))},i:function(e){i||(xa(n),i=!0)},o:function(e){ja(n),i=!1},d:function(e){e&&xo(r),a[t].d(e)}}}function aN(e){var t,n,r=e[83].selection,i=eo(r,e,e[82],PR),o=i||function(e){var t,n=e[3][e[12]]+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){4104&r[0]&&n!==(n=e[3][e[12]]+"")&&Io(t,n)},d:function(e){e&&xo(t)}}}(e);return{c:function(){t=So("div"),o&&o.c(),Po(t,"class","selected-item svelte-82qwg8"),Bo(t,"hide-selected-item",e[35])},m:function(e,r){ko(e,t,r),o&&o.m(t,null),n=!0},p:function(e,a){i?i.p&&(!n||8&a[0]|1048576&a[2])&&ro(i,r,e,e[82],n?no(r,e[82],a,AR):io(e[82]),PR):o&&o.p&&(!n||4104&a[0])&&o.p(e,n?a:[-1,-1,-1,-1,-1]),(!n||16&a[1])&&Bo(t,"hide-selected-item",e[35])},i:function(e){n||(xa(o,e),n=!0)},o:function(e){ja(o,e),n=!1},d:function(e){e&&xo(t),o&&o.d(e)}}}function sN(e){for(var t,n,r=$a(e[3]),i=[],o=0;o<r.length;o+=1)i[o]=lN(TR(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=Oo()},m:function(e,r){for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(e,r);ko(e,t,r),n=!0},p:function(e,n){if(67116040&n[0]|32&n[1]|1048576&n[2]){var o;for(r=$a(e[3]),o=0;o<r.length;o+=1){var s=TR(e,r,o);i[o]?(i[o].p(s,n),xa(i[o],1)):(i[o]=lN(s),i[o].c(),xa(i[o],1),i[o].m(t.parentNode,t))}for(wa(),o=r.length;o<i.length;o+=1)a(o);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function cN(e){var t,n,r,i,o=e[83]["multi-clear-icon"],a=eo(o,e,e[82],NR),s=a||function(e){var t,n;return t=new mR({}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}();function c(){return e[92](e[128])}return{c:function(){t=So("div"),s&&s.c(),Po(t,"class","multi-item-clear svelte-82qwg8")},m:function(e,o){ko(e,t,o),s&&s.m(t,null),n=!0,r||(i=Mo(t,"pointerup",Ao(Eo(c))),r=!0)},p:function(t,r){e=t,a&&a.p&&(!n||1048576&r[2])&&ro(a,o,e,e[82],n?no(o,e[82],r,RR):io(e[82]),NR)},i:function(e){n||(xa(s,e),n=!0)},o:function(e){ja(s,e),n=!1},d:function(e){e&&xo(t),s&&s.d(e),r=!1,i()}}}function lN(e){var t,n,r,i,o,a,s,c=e[83].selection,l=eo(c,e,e[82],DR),u=l||function(e){var t,n=e[126][e[12]]+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){4104&r[0]&&n!==(n=e[126][e[12]]+"")&&Io(t,n)},d:function(e){e&&xo(t)}}}(e),f=!e[11]&&!e[10]&&mR&&cN(e);function d(){return e[93](e[128])}return{c:function(){t=So("div"),n=So("span"),u&&u.c(),r=_o(),f&&f.c(),i=_o(),Po(n,"class","multi-item-text svelte-82qwg8"),Po(t,"class","multi-item svelte-82qwg8"),Po(t,"role","none"),Bo(t,"active",e[26]===e[128]),Bo(t,"disabled",e[11])},m:function(c,l){ko(c,t,l),mo(t,n),u&&u.m(n,null),mo(t,r),f&&f.m(t,null),mo(t,i),o=!0,a||(s=[Mo(t,"click",Eo(d)),Mo(t,"keydown",Ao(Eo(e[84])))],a=!0)},p:function(n,r){e=n,l?l.p&&(!o||8&r[0]|1048576&r[2])&&ro(l,c,e,e[82],o?no(c,e[82],r,IR):io(e[82]),DR):u&&u.p&&(!o||4104&r[0])&&u.p(e,o?r:[-1,-1,-1,-1,-1]),e[11]||e[10]||!mR?f&&(wa(),ja(f,1,1,(function(){f=null})),ka()):f?(f.p(e,r),3072&r[0]&&xa(f,1)):((f=cN(e)).c(),xa(f,1),f.m(t,i)),(!o||67108864&r[0])&&Bo(t,"active",e[26]===e[128]),(!o||2048&r[0])&&Bo(t,"disabled",e[11])},i:function(e){o||(xa(u,e),xa(f),o=!0)},o:function(e){ja(u,e),ja(f),o=!1},d:function(e){e&&xo(t),u&&u.d(e),f&&f.d(),a=!1,Qi(s)}}}function uN(e){var t,n,r=e[83]["loading-icon"],i=eo(r,e,e[82],ER),o=i||function(e){var t,n;return t=new bR({}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}();return{c:function(){t=So("div"),o&&o.c(),Po(t,"class","icon loading svelte-82qwg8"),Po(t,"aria-hidden","true")},m:function(e,r){ko(e,t,r),o&&o.m(t,null),n=!0},p:function(e,t){i&&i.p&&(!n||1048576&t[2])&&ro(i,r,e,e[82],n?no(r,e[82],t,MR):io(e[82]),ER)},i:function(e){n||(xa(o,e),n=!0)},o:function(e){ja(o,e),n=!1},d:function(e){e&&xo(t),o&&o.d(e)}}}function fN(e){var t,n,r,i,o=e[83]["clear-icon"],a=eo(o,e,e[82],OR),s=a||function(e){var t,n;return t=new mR({}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}();return{c:function(){t=So("button"),s&&s.c(),Po(t,"type","button"),Po(t,"class","icon clear-select svelte-82qwg8")},m:function(o,a){ko(o,t,a),s&&s.m(t,null),n=!0,r||(i=Mo(t,"click",e[22]),r=!0)},p:function(e,t){a&&a.p&&(!n||1048576&t[2])&&ro(a,o,e,e[82],n?no(o,e[82],t,_R):io(e[82]),OR)},i:function(e){n||(xa(s,e),n=!0)},o:function(e){ja(s,e),n=!1},d:function(e){e&&xo(t),s&&s.d(e),r=!1,i()}}}function dN(e){var t,n,r=e[83]["chevron-icon"],i=eo(r,e,e[82],$R),o=i||function(e){var t,n;return t=new hR({}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}();return{c:function(){t=So("div"),o&&o.c(),Po(t,"class","icon chevron svelte-82qwg8"),Po(t,"aria-hidden","true")},m:function(e,r){ko(e,t,r),o&&o.m(t,null),n=!0},p:function(e,t){i&&i.p&&(!n||64&t[0]|1048576&t[2])&&ro(i,r,e,e[82],n?no(r,e[82],t,CR):io(e[82]),$R)},i:function(e){n||(xa(o,e),n=!0)},o:function(e){ja(o,e),n=!1},d:function(e){e&&xo(t),o&&o.d(e)}}}function hN(e){var t,n,r=e[83].required,i=eo(r,e,e[82],xR),o=i||{c:function(){Po(n=So("select"),"class","required svelte-82qwg8"),n.required=!0,Po(n,"tabindex","-1"),Po(n,"aria-hidden","true")},m:function(e,t){ko(e,n,t)},p:Hi,d:function(e){e&&xo(n)}};return{c:function(){o&&o.c()},m:function(e,n){o&&o.m(e,n),t=!0},p:function(e,n){i&&i.p&&(!t||8&n[0]|1048576&n[2])&&ro(i,r,e,e[82],t?no(r,e[82],n,kR):io(e[82]),xR)},i:function(e){t||(xa(o,e),t=!0)},o:function(e){ja(o,e),t=!1},d:function(e){o&&o.d(e)}}}function vN(e){for(var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k=e[6]&&YR(e),x=e[2]&&iN(e),j=e[83].prepend,S=eo(j,e,e[82],LR),C=e[25]&&oN(e),$=[{readOnly:u=!e[17]},e[27],{placeholder:e[33]},{style:e[18]},{disabled:e[11]}],_={},O=0;O<$.length;O+=1)_=Ji(_,$[O]);var M=e[5]&&uN(e),E=e[34]&&fN(e),A=e[20]&&dN(e),P=e[83]["input-hidden"],T=eo(P,e,e[82],SR),R=T||function(e){var t,n;return{c:function(){Po(t=So("input"),"name",e[8]),Po(t,"type","hidden"),t.value=n=e[3]?JSON.stringify(e[3]):null,Po(t,"class","svelte-82qwg8")},m:function(e,n){ko(e,t,n)},p:function(e,r){256&r[0]&&Po(t,"name",e[8]),8&r[0]&&n!==(n=e[3]?JSON.stringify(e[3]):null)&&(t.value=n)},d:function(e){e&&xo(t)}}}(e),N=e[16]&&(!e[3]||0===e[3].length)&&hN(e);return{c:function(){t=So("div"),k&&k.c(),n=_o(),r=So("span"),x&&x.c(),i=_o(),o=So("div"),S&&S.c(),a=_o(),s=So("div"),C&&C.c(),c=_o(),l=So("input"),f=_o(),d=So("div"),M&&M.c(),h=_o(),E&&E.c(),v=_o(),A&&A.c(),p=_o(),R&&R.c(),m=_o(),N&&N.c(),Po(r,"aria-live","polite"),Po(r,"aria-atomic","false"),Po(r,"aria-relevant","additions text"),Po(r,"class","a11y-text svelte-82qwg8"),Po(o,"class","prepend svelte-82qwg8"),Ro(l,_),Bo(l,"svelte-82qwg8",!0),Po(s,"class","value-container svelte-82qwg8"),Po(d,"class","indicators svelte-82qwg8"),Po(t,"class",g="svelte-select "+e[21]+" svelte-82qwg8"),Po(t,"style",e[14]),Po(t,"role","none"),Bo(t,"multi",e[9]),Bo(t,"disabled",e[11]),Bo(t,"focused",e[2]),Bo(t,"list-open",e[6]),Bo(t,"show-chevron",e[20]),Bo(t,"error",e[15])},m:function(u,g){ko(u,t,g),k&&k.m(t,null),mo(t,n),mo(t,r),x&&x.m(r,null),mo(t,i),mo(t,o),S&&S.m(o,null),mo(t,a),mo(t,s),C&&C.m(s,null),mo(s,c),mo(s,l),l.autofocus&&l.focus(),e[94](l),Do(l,e[4]),mo(t,f),mo(t,d),M&&M.m(d,null),mo(d,h),E&&E.m(d,null),mo(d,v),A&&A.m(d,null),mo(t,p),R&&R.m(t,null),mo(t,m),N&&N.m(t,null),e[96](t),y=!0,b||(w=[Mo(window,"click",e[42]),Mo(window,"keydown",e[37]),Mo(l,"keydown",e[37]),Mo(l,"blur",e[39]),Mo(l,"focus",e[38]),Mo(l,"input",e[95]),Mo(t,"pointerup",Eo(e[40])),co(e[48].call(null,t))],b=!0)},p:function(e,i){e[6]?k?(k.p(e,i),64&i[0]&&xa(k,1)):((k=YR(e)).c(),xa(k,1),k.m(t,n)):k&&(wa(),ja(k,1,1,(function(){k=null})),ka()),e[2]?x?x.p(e,i):((x=iN(e)).c(),x.m(r,null)):x&&(x.d(1),x=null),S&&S.p&&(!y||1048576&i[2])&&ro(S,j,e,e[82],y?no(j,e[82],i,zR):io(e[82]),LR),e[25]?C?(C.p(e,i),33554432&i[0]&&xa(C,1)):((C=oN(e)).c(),xa(C,1),C.m(s,c)):C&&(wa(),ja(C,1,1,(function(){C=null})),ka()),Ro(l,_=Ea($,[(!y||131072&i[0]&&u!==(u=!e[17]))&&{readOnly:u},134217728&i[0]&&e[27],(!y||4&i[1])&&{placeholder:e[33]},(!y||262144&i[0])&&{style:e[18]},(!y||2048&i[0])&&{disabled:e[11]}])),16&i[0]&&l.value!==e[4]&&Do(l,e[4]),Bo(l,"svelte-82qwg8",!0),e[5]?M?(M.p(e,i),32&i[0]&&xa(M,1)):((M=uN(e)).c(),xa(M,1),M.m(d,h)):M&&(wa(),ja(M,1,1,(function(){M=null})),ka()),e[34]?E?(E.p(e,i),8&i[1]&&xa(E,1)):((E=fN(e)).c(),xa(E,1),E.m(d,v)):E&&(wa(),ja(E,1,1,(function(){E=null})),ka()),e[20]?A?(A.p(e,i),1048576&i[0]&&xa(A,1)):((A=dN(e)).c(),xa(A,1),A.m(d,null)):A&&(wa(),ja(A,1,1,(function(){A=null})),ka()),T?T.p&&(!y||8&i[0]|1048576&i[2])&&ro(T,P,e,e[82],y?no(P,e[82],i,jR):io(e[82]),SR):R&&R.p&&(!y||264&i[0])&&R.p(e,y?i:[-1,-1,-1,-1,-1]),!e[16]||e[3]&&0!==e[3].length?N&&(wa(),ja(N,1,1,(function(){N=null})),ka()):N?(N.p(e,i),65544&i[0]&&xa(N,1)):((N=hN(e)).c(),xa(N,1),N.m(t,null)),(!y||2097152&i[0]&&g!==(g="svelte-select "+e[21]+" svelte-82qwg8"))&&Po(t,"class",g),(!y||16384&i[0])&&Po(t,"style",e[14]),(!y||2097664&i[0])&&Bo(t,"multi",e[9]),(!y||2099200&i[0])&&Bo(t,"disabled",e[11]),(!y||2097156&i[0])&&Bo(t,"focused",e[2]),(!y||2097216&i[0])&&Bo(t,"list-open",e[6]),(!y||3145728&i[0])&&Bo(t,"show-chevron",e[20]),(!y||2129920&i[0])&&Bo(t,"error",e[15])},i:function(e){y||(xa(k),xa(S,e),xa(C),xa(M),xa(E),xa(A),xa(R,e),xa(N),y=!0)},o:function(e){ja(k),ja(S,e),ja(C),ja(M),ja(E),ja(A),ja(R,e),ja(N),y=!1},d:function(n){n&&xo(t),k&&k.d(),x&&x.d(),S&&S.d(n),C&&C.d(),e[94](null),M&&M.d(),E&&E.d(),A&&A.d(),R&&R.d(n),N&&N.d(),e[96](null),b=!1,Qi(w)}}}function pN(e){return e.map((function(e,t){return{index:t,value:e,label:"".concat(e)}}))}function mN(e,t,n){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b=t.$$slots,w=void 0===b?{}:b,k=t.$$scope,x=function(e){var t={};for(var n in e)t[n]=!0;return t}(w),j=Xo(),S=t.justValue,C=void 0===S?null:S,$=t.filter,_=void 0===$?cR:$,O=t.getItems,M=void 0===O?lR:O,E=t.id,A=void 0===E?null:E,P=t.name,T=void 0===P?null:P,R=t.container,N=void 0===R?void 0:R,I=t.input,D=void 0===I?void 0:I,z=t.multiple,L=void 0!==z&&z,B=t.multiFullItemClearable,q=void 0!==B&&B,F=t.disabled,V=void 0!==F&&F,W=t.focused,H=void 0!==W&&W,U=t.value,J=void 0===U?null:U,K=t.filterText,G=void 0===K?"":K,Q=t.placeholder,Y=void 0===Q?"Please select":Q,X=t.placeholderAlwaysShow,Z=void 0!==X&&X,ee=t.items,te=void 0===ee?null:ee,ne=t.label,re=void 0===ne?"label":ne,ie=t.itemFilter,oe=void 0===ie?function(e,t,n){return"".concat(e).toLowerCase().includes(t.toLowerCase())}:ie,ae=t.groupBy,se=void 0===ae?void 0:ae,ce=t.groupFilter,le=void 0===ce?function(e){return e}:ce,ue=t.groupHeaderSelectable,fe=void 0!==ue&&ue,de=t.itemId,he=void 0===de?"value":de,ve=t.loadOptions,pe=void 0===ve?void 0:ve,me=t.containerStyles,ge=void 0===me?"":me,ye=t.hasError,be=void 0!==ye&&ye,we=t.filterSelectedItems,ke=void 0===we||we,xe=t.required,je=void 0!==xe&&xe,Se=t.closeListOnChange,Ce=void 0===Se||Se,$e=t.clearFilterTextOnBlur,_e=void 0===$e||$e,Oe=t.createGroupHeaderItem,Me=void 0===Oe?function(e,t){return zi({value:e},re,e)}:Oe,Ee=t.searchable,Ae=void 0===Ee||Ee,Pe=t.inputStyles,Te=void 0===Pe?"":Pe,Re=t.clearable,Ne=void 0===Re||Re,Ie=t.loading,De=void 0!==Ie&&Ie,ze=t.listOpen,Le=void 0!==ze&&ze,Be=t.debounce,qe=void 0===Be?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(d),d=setTimeout(e,t)}:Be,Fe=t.debounceWait,Ve=void 0===Fe?300:Fe,We=t.hideEmptyState,He=void 0!==We&&We,Ue=t.inputAttributes,Je=void 0===Ue?{}:Ue,Ke=t.listAutoWidth,Ge=void 0===Ke||Ke,Qe=t.showChevron,Ye=void 0!==Qe&&Qe,Xe=t.listOffset,Ze=void 0===Xe?5:Xe,et=t.hoverItemIndex,tt=void 0===et?0:et,nt=t.floatingConfig,rt=void 0===nt?{}:nt,it=t.class,ot=void 0===it?"":it;function at(e){var t=[],n={};e.forEach((function(e){var r=se(e);t.includes(r)||(t.push(r),n[r]=[],r&&n[r].push(Object.assign(Me(r,e),{id:r,groupHeader:!0,selectable:fe}))),n[r].push(Object.assign({groupItem:!!r},e))}));var r=[];return le(t).forEach((function(e){n[e]&&r.push.apply(r,Bi(n[e]))})),r}function st(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;n(7,tt=e<0?0:e),!t&&se&&l[tt]&&!l[tt].selectable&&Mt(1)}function ct(){var e=!0;if(J){var t=[],r=[];J.forEach((function(n){t.includes(n[he])?e=!1:(t.push(n[he]),r.push(n))})),e||n(3,J=r)}return e}function lt(e){var t=e?e[he]:J[he];return te.find((function(e){return e[he]===t}))}function ut(e){return ft.apply(this,arguments)}function ft(){return ft=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=J[t],1===J.length?n(3,J=void 0):n(3,J=J.filter((function(e){return e!==r}))),j("clear",r);case 3:case"end":return e.stop()}}),e)}))),ft.apply(this,arguments)}function dt(e){var t,r;H&&D===(null===(t=document)||void 0===t?void 0:t.activeElement)||(e&&j("focus",e),null===(r=D)||void 0===r||r.focus(),n(2,H=!0))}function ht(e){return vt.apply(this,arguments)}function vt(){return(vt=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ct){e.next=2;break}return e.abrupt("return");case 2:(Le||H)&&(j("blur",t),pt(),n(2,H=!1),n(26,h=void 0),null===(r=D)||void 0===r||r.blur());case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pt(){_e&&n(4,G=""),n(6,Le=!1)}y=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n(78,v=J),n(79,p=G),n(80,m=L);case 3:case"end":return e.stop()}}),e)}))),Go().$$.before_update.push(y),Qo((function(){Le&&n(2,H=!0),H&&D&&D.focus()}));var mt=t.ariaValues,gt=void 0===mt?function(e){return"Option ".concat(e,", selected.")}:mt,yt=t.ariaListOpen,bt=void 0===yt?function(e,t){return"You are currently focused on option ".concat(e,". There are ").concat(t," results available.")}:yt,wt=t.ariaFocused,kt=void 0===wt?function(){return"Select is focused, type to refine list, press down to open the menu."}:wt;var xt,jt=null;function St(){clearTimeout(xt),xt=setTimeout((function(){Ct=!1}),100)}Yo((function(){var e;null===(e=jt)||void 0===e||e.remove()}));var Ct=!1;function $t(e){e&&!1!==e.selectable&&function(e){if(e){n(4,G="");var t=Object.assign({},e);if(t.groupHeader&&!t.selectable)return;n(3,J=L?J?J.concat([t]):[t]:n(3,J=t)),setTimeout((function(){Ce&&pt(),n(26,h=void 0),j("change",J),j("select",e)}))}}(e)}function _t(e){Ct||n(7,tt=e)}function Ot(e){var t=e.item,r=e.i;if(!1!==(null==t?void 0:t.selectable))return J&&!L&&J[he]===t[he]?pt():void(function(e){return e.groupHeader&&e.selectable||e.selectable||!e.hasOwnProperty("selectable")}(t)&&(n(7,tt=r),$t(t)))}function Mt(e){if(0===l.filter((function(e){return!Object.hasOwn(e,"selectable")||!0===e.selectable})).length)return n(7,tt=0);e>0&&tt===l.length-1?n(7,tt=0):n(7,e<0&&0===tt?tt=l.length-1:tt+=e);var t=l[tt];t&&!1===t.selectable&&(1!==e&&-1!==e||Mt(e))}var Et=Pt,At=Pt;function Pt(e){return{update:function(t){t.scroll&&(St(),e.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Tt,Rt={strategy:"absolute",placement:"bottom-start",middleware:[(Tt=Ze,void 0===Tt&&(Tt=0),{name:"offset",options:Tt,fn:function(e){return ki(bi().mark((function t(){var n,r,i;return bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.x,r=e.y,t.next=3,_T(e,Tt);case 3:return i=t.sent,t.abrupt("return",{x:n+i.x,y:r+i.y,data:i});case 5:case"end":return t.stop()}}),t)})))()}}),$T(),MT()],autoUpdate:!1},Nt=function(e){var t,n,r={autoUpdate:!0},i=e,o=function(t){return Ri(Ri(Ri({},r),e||{}),t||{})},a=function(e){t&&n&&(i=o(e),sR(t,n,i).then((function(e){var t;Object.assign(n.style,{position:e.strategy,left:"".concat(e.x,"px"),top:"".concat(e.y,"px")}),(null===(t=i)||void 0===t?void 0:t.onComputed)&&i.onComputed(e)})))},s=function(e){Yo(e.subscribe((function(e){void 0===t?(t=e,a()):(Object.assign(t,e),a())})))};return[function(e){if("subscribe"in e)return s(e),{};t=e,a()},function(e,r){var s;n=e,i=o(r),setTimeout((function(){return a(r)}),0),a(r);var c=function(){s&&(s(),s=void 0)},l=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i||{}).autoUpdate;if(c(),!1!==e)return aR(t,n,(function(){return a(i)}),!0===e?{}:e)};return s=l(),{update:function(e){a(e),s=l(e)},destroy:function(){c()}}},a]}(Rt),It=xi(Nt,3),Dt=It[0],zt=It[1],Lt=It[2],Bt=!0;return e.$$set=function(e){"justValue"in e&&n(52,C=e.justValue),"filter"in e&&n(53,_=e.filter),"getItems"in e&&n(54,M=e.getItems),"id"in e&&n(55,A=e.id),"name"in e&&n(8,T=e.name),"container"in e&&n(0,N=e.container),"input"in e&&n(1,D=e.input),"multiple"in e&&n(9,L=e.multiple),"multiFullItemClearable"in e&&n(10,q=e.multiFullItemClearable),"disabled"in e&&n(11,V=e.disabled),"focused"in e&&n(2,H=e.focused),"value"in e&&n(3,J=e.value),"filterText"in e&&n(4,G=e.filterText),"placeholder"in e&&n(56,Y=e.placeholder),"placeholderAlwaysShow"in e&&n(57,Z=e.placeholderAlwaysShow),"items"in e&&n(51,te=e.items),"label"in e&&n(12,re=e.label),"itemFilter"in e&&n(58,oe=e.itemFilter),"groupBy"in e&&n(59,se=e.groupBy),"groupFilter"in e&&n(60,le=e.groupFilter),"groupHeaderSelectable"in e&&n(61,fe=e.groupHeaderSelectable),"itemId"in e&&n(13,he=e.itemId),"loadOptions"in e&&n(62,pe=e.loadOptions),"containerStyles"in e&&n(14,ge=e.containerStyles),"hasError"in e&&n(15,be=e.hasError),"filterSelectedItems"in e&&n(63,ke=e.filterSelectedItems),"required"in e&&n(16,je=e.required),"closeListOnChange"in e&&n(64,Ce=e.closeListOnChange),"clearFilterTextOnBlur"in e&&n(65,_e=e.clearFilterTextOnBlur),"createGroupHeaderItem"in e&&n(66,Me=e.createGroupHeaderItem),"searchable"in e&&n(17,Ae=e.searchable),"inputStyles"in e&&n(18,Te=e.inputStyles),"clearable"in e&&n(68,Ne=e.clearable),"loading"in e&&n(5,De=e.loading),"listOpen"in e&&n(6,Le=e.listOpen),"debounce"in e&&n(69,qe=e.debounce),"debounceWait"in e&&n(70,Ve=e.debounceWait),"hideEmptyState"in e&&n(19,He=e.hideEmptyState),"inputAttributes"in e&&n(71,Je=e.inputAttributes),"listAutoWidth"in e&&n(72,Ge=e.listAutoWidth),"showChevron"in e&&n(20,Ye=e.showChevron),"listOffset"in e&&n(73,Ze=e.listOffset),"hoverItemIndex"in e&&n(7,tt=e.hoverItemIndex),"floatingConfig"in e&&n(74,rt=e.floatingConfig),"class"in e&&n(21,ot=e.class),"ariaValues"in e&&n(75,gt=e.ariaValues),"ariaListOpen"in e&&n(76,bt=e.ariaListOpen),"ariaFocused"in e&&n(77,kt=e.ariaFocused),"$$scope"in e&&n(82,k=e.$$scope)},e.$$.update=function(){var t,d,y,b,w;(8&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&J&&function(){if("string"==typeof J){var e=(te||[]).find((function(e){return e[he]===J}));n(3,J=e||zi(zi({},he,J),"label",J))}else L&&Array.isArray(J)&&J.length>0&&n(3,J=J.map((function(e){return"string"==typeof e?{value:e,label:e}:e})))}(),131072&e.$$.dirty[0]|512&e.$$.dirty[2]&&(!Je&&Ae||(n(27,g=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},Je)),A&&n(27,g.id=A,g),Ae||n(27,g.readonly=!0,g))),512&e.$$.dirty[0]&&L&&J&&(Array.isArray(J)?n(3,J=Bi(J)):n(3,J=[J])),512&e.$$.dirty[0]|262144&e.$$.dirty[2]&&m&&!L&&J&&n(3,J=null),520&e.$$.dirty[0]&&L&&J&&J.length>1&&ct(),8&e.$$.dirty[0]&&J&&(L?JSON.stringify(J)!==JSON.stringify(v)&&ct()&&j("input",J):v&&JSON.stringify(J[he])===JSON.stringify(v[he])||j("input",J)),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&!J&&L&&v&&j("input",J),6&e.$$.dirty[0]&&!H&&D&&pt(),16&e.$$.dirty[0]|131072&e.$$.dirty[2]&&G!==p&&(pe||0!==G.length)&&(pe?qe(ki(bi().mark((function e(){var t;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(5,De=!0),e.next=3,M({dispatch:j,loadOptions:pe,convertStringItemsToObjects:pN,filterText:G});case 3:(t=e.sent)?(n(5,De=t.loading),n(6,Le=Le?t.listOpen:G.length>0),n(2,H=Le&&t.focused),n(51,te=se?at(t.filteredItems):t.filteredItems)):(n(5,De=!1),n(2,H=!0),n(6,Le=!0));case 5:case"end":return e.stop()}}),e)}))),Ve):(n(6,Le=!0),L&&n(26,h=void 0))),12824&e.$$.dirty[0]|407896064&e.$$.dirty[1]|3&e.$$.dirty[2]&&n(24,l=_({loadOptions:pe,filterText:G,items:te,multiple:L,value:J,itemId:he,groupBy:se,label:re,filterSelectedItems:ke,itemFilter:oe,convertStringItemsToObjects:pN,filterGroupedItems:at})),16777800&e.$$.dirty[0]&&!L&&Le&&J&&l&&(t=l.findIndex((function(e){return e[he]===J[he]})),st(t,!0)),576&e.$$.dirty[0]&&Le&&L&&n(7,tt=0),16&e.$$.dirty[0]&&G&&n(7,tt=0),128&e.$$.dirty[0]&&function(e){j("hoverItem",e)}(tt),520&e.$$.dirty[0]&&n(25,r=L?J&&J.length>0:J),33554448&e.$$.dirty[0]&&n(35,i=r&&G.length>0),33556512&e.$$.dirty[0]|64&e.$$.dirty[2]&&n(34,o=r&&Ne&&!V&&!De),520&e.$$.dirty[0]|100663296&e.$$.dirty[1])&&n(33,a=Z&&L||L&&0===(null===(d=J)||void 0===d?void 0:d.length)?Y:J?"":Y);(520&e.$$.dirty[0]&&n(32,s=J?(y=void 0,y=L&&J.length>0?J.map((function(e){return e[re]})).join(", "):J[re],gt(y)):""),16777412&e.$$.dirty[0]&&n(31,c=function(){if(!l||0===l.length)return"";var e=l[tt];if(Le&&e){var t=l?l.length:0;return bt(e[re],t)}return kt()}()),1048576&e.$$.dirty[1]&&function(e){e&&0!==e.length&&!e.some((function(e){return"object"!==Wi(e)}))&&J&&(L?!J.some((function(e){return!e||!e[he]})):J[he])&&(Array.isArray(J)?n(3,J=J.map((function(e){return lt(e)||e}))):n(3,J=lt()||J))}(te),8712&e.$$.dirty[0]&&n(52,C=L?J?J.map((function(e){return e[he]})):null:J?J[he]:J),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&(L||!v||J||j("input",J)),16777800&e.$$.dirty[0]&&Le&&l&&!L&&!J&&st(),16777216&e.$$.dirty[0]&&function(e){Le&&j("filter",e)}(l),1&e.$$.dirty[0]|4096&e.$$.dirty[2])&&(N&&void 0===(null===(b=rt)||void 0===b?void 0:b.autoUpdate)&&n(81,Rt.autoUpdate=!0,Rt));1&e.$$.dirty[0]|528384&e.$$.dirty[2]&&N&&rt&&Lt(Object.assign(Rt,rt)),8388608&e.$$.dirty[0]&&n(30,u=!!jt),8388672&e.$$.dirty[0]&&function(e,t){if(!e||!t)return n(28,Bt=!0);setTimeout((function(){n(28,Bt=!1)}),0)}(jt,Le),8388673&e.$$.dirty[0]&&Le&&N&&jt&&(w=N.getBoundingClientRect().width,n(23,jt.style.width=Ge?w+"px":"auto",jt)),128&e.$$.dirty[0]&&n(29,f=tt),70&e.$$.dirty[0]&&D&&Le&&!H&&dt()},[N,D,H,J,G,De,Le,tt,T,L,q,V,re,he,ge,be,je,Ae,Te,He,Ye,ot,function(){j("clear",J),n(3,J=void 0),pt(),dt()},jt,l,r,h,g,Bt,f,u,c,s,a,o,i,ut,function(e){if(H)switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),pt();break;case"Enter":if(e.preventDefault(),Le){if(0===l.length)break;var t=l[tt];if(J&&!L&&J[he]===t[he]){pt();break}$t(l[tt])}break;case"ArrowDown":e.preventDefault(),Le?Mt(1):(n(6,Le=!0),n(26,h=void 0));break;case"ArrowUp":e.preventDefault(),Le?Mt(-1):(n(6,Le=!0),n(26,h=void 0));break;case"Tab":if(Le&&H){if(0===l.length||J&&J[he]===l[tt][he])return pt();e.preventDefault(),$t(l[tt]),pt()}break;case"Backspace":if(!L||G.length>0)return;if(L&&J&&J.length>0){if(ut(void 0!==h?h:J.length-1),0===h||void 0===h)break;n(26,h=J.length>h?h-1:void 0)}break;case"ArrowLeft":if(!J||!L||G.length>0)return;void 0===h?n(26,h=J.length-1):J.length>h&&0!==h&&n(26,h-=1);break;case"ArrowRight":if(!J||!L||G.length>0||void 0===h)return;h===J.length-1?n(26,h=void 0):h<J.length-1&&n(26,h+=1)}},dt,ht,function(){if(!V)return G.length>0?n(6,Le=!0):void n(6,Le=!Le)},St,function(e){var t;Le||H||!N||N.contains(e.target)||null!==(t=jt)&&void 0!==t&&t.contains(e.target)||ht()},_t,Ot,function(e,t,n){if(!L)return t&&t[n]===e[n]},Et,At,Dt,zt,x,te,C,_,M,A,Y,Z,oe,se,le,fe,pe,ke,Ce,_e,Me,function(){return l},Ne,qe,Ve,Je,Ge,Ze,rt,gt,bt,kt,v,p,m,Rt,k,w,function(t){ta.call(this,e,t)},function(t){ta.call(this,e,t)},function(t){ta.call(this,e,t)},function(t){ta.call(this,e,t)},function(e){return _t(e)},function(e){return _t(e)},function(e,t){return Ot({item:e,i:t})},function(e){ra[e?"unshift":"push"]((function(){n(23,jt=e)}))},function(e){return ut(e)},function(e){return q?ut(e):{}},function(e){ra[e?"unshift":"push"]((function(){n(1,D=e)}))},function(){G=this.value,n(4,G)},function(e){ra[e?"unshift":"push"]((function(){n(0,N=e)}))}]}var gN=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,mN,vN,Xi,{justValue:52,filter:53,getItems:54,id:55,name:8,container:0,input:1,multiple:9,multiFullItemClearable:10,disabled:11,focused:2,value:3,filterText:4,placeholder:56,placeholderAlwaysShow:57,items:51,label:12,itemFilter:58,groupBy:59,groupFilter:60,groupHeaderSelectable:61,itemId:13,loadOptions:62,containerStyles:14,hasError:15,filterSelectedItems:63,required:16,closeListOnChange:64,clearFilterTextOnBlur:65,createGroupHeaderItem:66,getFilteredItems:67,searchable:17,inputStyles:18,clearable:68,loading:5,listOpen:6,debounce:69,debounceWait:70,hideEmptyState:19,inputAttributes:71,listAutoWidth:72,showChevron:20,listOffset:73,hoverItemIndex:7,floatingConfig:74,class:21,handleClear:22,ariaValues:75,ariaListOpen:76,ariaFocused:77},wR,[-1,-1,-1,-1,-1]),r}return Di(n,[{key:"getFilteredItems",get:function(){return this.$$.ctx[67]}},{key:"handleClear",get:function(){return this.$$.ctx[22]}}]),n}();function yN(e){go(e,"svelte-1kiph99","table.jse-transform-wizard.svelte-1kiph99.svelte-1kiph99{border-collapse:collapse;border-spacing:0;width:100%}table.jse-transform-wizard.svelte-1kiph99 input.svelte-1kiph99{font-family:inherit;font-size:inherit}table.jse-transform-wizard.svelte-1kiph99 tr th.svelte-1kiph99{font-weight:normal;text-align:left;width:60px}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99{width:100%;display:flex;flex-direction:row;margin-bottom:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select .multi-item{align-items:center}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select .value-container{gap:0 !important}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-filter-path{flex:4;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-filter-relation{flex:1.5;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-sort-path{flex:3;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-sort-direction{flex:1}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-projection-paths{flex:1}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select input{box-sizing:border-box}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal .jse-filter-value.svelte-1kiph99{flex:4;padding:4px 8px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);outline:none;background:var(--jse-input-background);color:inherit}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal .jse-filter-value.svelte-1kiph99:focus{border:var(--jse-input-border-focus)}")}function bN(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,A,P,T,R,N;function I(t){e[16](t)}var D={class:"jse-filter-path",showChevron:!0,items:e[7]};function z(t){e[17](t)}void 0!==e[0]&&(D.value=e[0]),s=new gN({props:D}),ra.push((function(){return Pa(s,"value",I)}));var L={class:"jse-filter-relation",showChevron:!0,items:e[8]};function B(t){e[19](t)}void 0!==e[1]&&(L.value=e[1]),u=new gN({props:L}),ra.push((function(){return Pa(u,"value",z)}));var q={class:"jse-sort-path",showChevron:!0,items:e[7]};function F(t){e[20](t)}void 0!==e[3]&&(q.value=e[3]),w=new gN({props:q}),ra.push((function(){return Pa(w,"value",B)}));var V={class:"jse-sort-direction",showChevron:!0,items:e[9]};function W(t){e[21](t)}void 0!==e[4]&&(V.value=e[4]),j=new gN({props:V}),ra.push((function(){return Pa(j,"value",F)}));var H={class:"jse-projection-paths",multiple:!0,showChevron:!0,items:e[6]};return void 0!==e[5]&&(H.value=e[5]),A=new gN({props:H}),ra.push((function(){return Pa(A,"value",W)})),{c:function(){t=So("table"),n=So("tr"),(r=So("th")).textContent="Filter",i=_o(),o=So("td"),a=So("div"),Ta(s.$$.fragment),l=_o(),Ta(u.$$.fragment),d=_o(),h=So("input"),v=_o(),p=So("tr"),(m=So("th")).textContent="Sort",g=_o(),y=So("td"),b=So("div"),Ta(w.$$.fragment),x=_o(),Ta(j.$$.fragment),C=_o(),$=So("tr"),(_=So("th")).textContent="Pick",O=_o(),M=So("td"),E=So("div"),Ta(A.$$.fragment),Po(r,"class","svelte-1kiph99"),Po(h,"class","jse-filter-value svelte-1kiph99"),Po(a,"class","jse-horizontal svelte-1kiph99"),Po(m,"class","svelte-1kiph99"),Po(b,"class","jse-horizontal svelte-1kiph99"),Po(_,"class","svelte-1kiph99"),Po(E,"class","jse-horizontal svelte-1kiph99"),Po(t,"class","jse-transform-wizard svelte-1kiph99")},m:function(c,f){ko(c,t,f),mo(t,n),mo(n,r),mo(n,i),mo(n,o),mo(o,a),Ra(s,a,null),mo(a,l),Ra(u,a,null),mo(a,d),mo(a,h),Do(h,e[2]),mo(t,v),mo(t,p),mo(p,m),mo(p,g),mo(p,y),mo(y,b),Ra(w,b,null),mo(b,x),Ra(j,b,null),mo(t,C),mo(t,$),mo($,_),mo($,O),mo($,M),mo(M,E),Ra(A,E,null),T=!0,R||(N=Mo(h,"input",e[18]),R=!0)},p:function(e,t){var n=xi(t,1)[0],r={};128&n&&(r.items=e[7]),!c&&1&n&&(c=!0,r.value=e[0],fa((function(){return c=!1}))),s.$set(r);var i={};!f&&2&n&&(f=!0,i.value=e[1],fa((function(){return f=!1}))),u.$set(i),4&n&&h.value!==e[2]&&Do(h,e[2]);var o={};128&n&&(o.items=e[7]),!k&&8&n&&(k=!0,o.value=e[3],fa((function(){return k=!1}))),w.$set(o);var a={};!S&&16&n&&(S=!0,a.value=e[4],fa((function(){return S=!1}))),j.$set(a);var l={};64&n&&(l.items=e[6]),!P&&32&n&&(P=!0,l.value=e[5],fa((function(){return P=!1}))),A.$set(l)},i:function(e){T||(xa(s.$$.fragment,e),xa(u.$$.fragment,e),xa(w.$$.fragment,e),xa(j.$$.fragment,e),xa(A.$$.fragment,e),T=!0)},o:function(e){ja(s.$$.fragment,e),ja(u.$$.fragment,e),ja(w.$$.fragment,e),ja(j.$$.fragment,e),ja(A.$$.fragment,e),T=!1},d:function(e){e&&xo(t),Na(s),Na(u),Na(w),Na(j),Na(A),R=!1,N()}}}function wN(e,t,n){var r,i,o,a,s,c,l,u,f,d,h,v=za("jsoneditor:TransformWizard"),p=t.json,m=t.queryOptions,g=void 0===m?{}:m,y=t.onChange,b=["==","!=","<","<=",">",">="].map((function(e){return{value:e,label:e}})),w=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],k=null!==(r=g)&&void 0!==r&&null!==(r=r.filter)&&void 0!==r&&r.path?fM(g.filter.path):null,x=null!==(i=g)&&void 0!==i&&null!==(i=i.filter)&&void 0!==i&&i.relation?b.find((function(e){var t;return e.value===(null===(t=g.filter)||void 0===t?void 0:t.relation)})):null,j=(null===(o=g)||void 0===o||null===(o=o.filter)||void 0===o?void 0:o.value)||"",S=null!==(a=g)&&void 0!==a&&null!==(a=a.sort)&&void 0!==a&&a.path?fM(g.sort.path):null,C=null!==(s=g)&&void 0!==s&&null!==(s=s.sort)&&void 0!==s&&s.direction?w.find((function(e){var t;return e.value===(null===(t=g.sort)||void 0===t?void 0:t.direction)})):null;return e.$$set=function(e){"json"in e&&n(11,p=e.json),"queryOptions"in e&&n(10,g=e.queryOptions),"onChange"in e&&n(12,y=e.onChange)},e.$$.update=function(){var t,r,i,o,a,s,m,b,w,$,_,O,M;(2048&e.$$.dirty&&n(15,c=Array.isArray(p)),34816&e.$$.dirty&&n(14,l=c?G_(p):[]),34816&e.$$.dirty&&n(13,u=c?G_(p,!0):[]),16384&e.$$.dirty&&n(7,f=l.map(fM)),8192&e.$$.dirty&&n(6,d=u?u.map(fM):[]),1088&e.$$.dirty)&&n(5,h=null!==(t=g)&&void 0!==t&&null!==(t=t.projection)&&void 0!==t&&t.paths&&d?g.projection.paths.map((function(e){return d.find((function(t){return Vk(t.value,e)}))})).filter((function(e){return!!e})):null);1&e.$$.dirty&&(i=(null===(r=k)||void 0===r?void 0:r.value)||null,Vk(null===(o=g)||void 0===o||null===(o=o.filter)||void 0===o?void 0:o.path,i)||(v("changeFilterPath",i),n(10,g=Xs(g,["filter","path"],i,!0)),y(g)));2&e.$$.dirty&&(s=(null===(a=x)||void 0===a?void 0:a.value)||null,Vk(null===(m=g)||void 0===m||null===(m=m.filter)||void 0===m?void 0:m.relation,s)||(v("changeFilterRelation",s),n(10,g=Xs(g,["filter","relation"],s,!0)),y(g)));(4&e.$$.dirty&&(b=j||null,Vk(null===(w=g)||void 0===w||null===(w=w.filter)||void 0===w?void 0:w.value,b)||(v("changeFilterValue",b),n(10,g=Xs(g,["filter","value"],b,!0)),y(g))),8&e.$$.dirty)&&function(e){var t;Vk(null===(t=g)||void 0===t||null===(t=t.sort)||void 0===t?void 0:t.path,e)||(v("changeSortPath",e),n(10,g=Xs(g,["sort","path"],e,!0)),y(g))}((null===($=S)||void 0===$?void 0:$.value)||null);16&e.$$.dirty&&(O=(null===(_=C)||void 0===_?void 0:_.value)||null,Vk(null===(M=g)||void 0===M||null===(M=M.sort)||void 0===M?void 0:M.direction,O)||(v("changeSortDirection",O),n(10,g=Xs(g,["sort","direction"],O,!0)),y(g)));32&e.$$.dirty&&function(e){var t;Vk(null===(t=g)||void 0===t||null===(t=t.projection)||void 0===t?void 0:t.paths,e)||(v("changeProjectionPaths",e),n(10,g=Xs(g,["projection","paths"],e,!0)),y(g))}(h?h.map((function(e){return e.value})):null)},[k,x,j,S,C,h,d,f,b,w,g,p,y,u,l,c,function(e){n(0,k=e)},function(e){n(1,x=e)},function(){j=this.value,n(2,j)},function(e){n(3,S=e)},function(e){n(4,C=e)},function(e){n(5,h=e),n(10,g),n(6,d),n(13,u),n(15,c),n(11,p)}]}var kN=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,wN,bN,Zi,{json:11,queryOptions:10,onChange:12},yN),r}return Di(n)}();function xN(e){go(e,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function jN(e,t,n){var r=e.slice();return r[5]=t[n],r}function SN(e){var t,n;return t=new FM({props:{data:xM}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function CN(e){var t,n;return t=new FM({props:{data:kM}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function $N(e){var t,n,r,i,o,a,s,c,l,u,f=e[5].name+"",d=[CN,SN],h=[];function v(e,t){return e[5].id===e[0]?0:1}function p(){return e[4](e[5])}return n=v(e),r=h[n]=d[n](e),{c:function(){t=So("button"),r.c(),i=_o(),o=$o(f),a=_o(),Po(t,"type","button"),Po(t,"class","jse-query-language svelte-19cxesy"),Po(t,"title",s="Select ".concat(e[5].name," as query language")),Bo(t,"selected",e[5].id===e[0])},m:function(e,r){ko(e,t,r),h[n].m(t,null),mo(t,i),mo(t,o),mo(t,a),c=!0,l||(u=Mo(t,"click",p),l=!0)},p:function(a,l){var u=n;(n=v(e=a))!==u&&(wa(),ja(h[u],1,1,(function(){h[u]=null})),ka(),(r=h[n])||(r=h[n]=d[n](e)).c(),xa(r,1),r.m(t,i)),(!c||2&l)&&f!==(f=e[5].name+"")&&Io(o,f),(!c||2&l&&s!==(s="Select ".concat(e[5].name," as query language")))&&Po(t,"title",s),(!c||3&l)&&Bo(t,"selected",e[5].id===e[0])},i:function(e){c||(xa(r),c=!0)},o:function(e){ja(r),c=!1},d:function(e){e&&xo(t),h[n].d(),l=!1,u()}}}function _N(e){for(var t,n,r,i=$a(e[1]),o=[],a=0;a<i.length;a+=1)o[a]=$N(jN(e,i,a));var s=function(e){return ja(o[e],1,1,(function(){o[e]=null}))};return{c:function(){t=So("div"),n=So("div");for(var e=0;e<o.length;e+=1)o[e].c();Po(n,"class","jse-select-query-language-container svelte-19cxesy"),Po(t,"class","jse-select-query-language svelte-19cxesy")},m:function(e,i){ko(e,t,i),mo(t,n);for(var a=0;a<o.length;a+=1)o[a]&&o[a].m(n,null);r=!0},p:function(e,t){var r=xi(t,1)[0];if(7&r){var a;for(i=$a(e[1]),a=0;a<i.length;a+=1){var c=jN(e,i,a);o[a]?(o[a].p(c,r),xa(o[a],1)):(o[a]=$N(c),o[a].c(),xa(o[a],1),o[a].m(n,null))}for(wa(),a=i.length;a<o.length;a+=1)s(a);ka()}},i:function(e){if(!r){for(var t=0;t<i.length;t+=1)xa(o[t]);r=!0}},o:function(e){o=o.filter(Boolean);for(var t=0;t<o.length;t+=1)ja(o[t]);r=!1},d:function(e){e&&xo(t),jo(o,e)}}}function ON(e,t,n){var r=t.queryLanguages,i=t.queryLanguageId,o=t.onChangeQueryLanguage;function a(e){n(0,i=e),o(e)}return e.$$set=function(e){"queryLanguages"in e&&n(1,r=e.queryLanguages),"queryLanguageId"in e&&n(0,i=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(3,o=e.onChangeQueryLanguage)},[i,r,a,o,function(e){return a(e.id)}]}var MN=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,ON,_N,Xi,{queryLanguages:1,queryLanguageId:0,onChangeQueryLanguage:3},xN),r}return Di(n)}();function EN(e){go(e,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function AN(e){var t,n,r,i,o;return n=new FM({props:{data:RP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-config svelte-d01h2s"),Po(t,"title","Select a query language")},m:function(a,s){ko(a,t,s),Ra(n,t,null),e[6](t),r=!0,i||(o=Mo(t,"click",e[3]),i=!0)},p:Hi,i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(r){r&&xo(t),Na(n),e[6](null),i=!1,o()}}}function PN(e){var t,n,r,i,o,a,s,c,l,u=e[0].length>1&&AN(e);return a=new FM({props:{data:JP}}),{c:function(){t=So("div"),(n=So("div")).textContent="Transform",r=_o(),u&&u.c(),i=_o(),o=So("button"),Ta(a.$$.fragment),Po(n,"class","jse-title svelte-d01h2s"),Po(o,"type","button"),Po(o,"class","jse-close svelte-d01h2s"),Po(t,"class","jse-header svelte-d01h2s")},m:function(f,d){ko(f,t,d),mo(t,n),mo(t,r),u&&u.m(t,null),mo(t,i),mo(t,o),Ra(a,o,null),s=!0,c||(l=Mo(o,"click",e[7]),c=!0)},p:function(e,n){var r=xi(n,1)[0];e[0].length>1?u?(u.p(e,r),1&r&&xa(u,1)):((u=AN(e)).c(),xa(u,1),u.m(t,i)):u&&(wa(),ja(u,1,1,(function(){u=null})),ka())},i:function(e){s||(xa(u),xa(a.$$.fragment,e),s=!0)},o:function(e){ja(u),ja(a.$$.fragment,e),s=!1},d:function(e){e&&xo(t),u&&u.d(),Na(a),c=!1,l()}}}function TN(e,t,n){var r,i,o=t.queryLanguages,a=t.queryLanguageId,s=t.onChangeQueryLanguage,c=ea("simple-modal").close,l=ea("absolute-popup"),u=l.openAbsolutePopup,f=l.closeAbsolutePopup;return e.$$set=function(e){"queryLanguages"in e&&n(0,o=e.queryLanguages),"queryLanguageId"in e&&n(4,a=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(5,s=e.onChangeQueryLanguage)},[o,r,c,function(){i=u(MN,{queryLanguages:o,queryLanguageId:a,onChangeQueryLanguage:function(e){f(i),s(e)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:r,closeOnOuterClick:!0})},a,s,function(e){ra[e?"unshift":"push"]((function(){n(1,r=e)}))},function(){return c()}]}var RN=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,TN,PN,Zi,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},EN),r}return Di(n)}(),NN=za("jsoneditor:AutoScrollHandler");var IN=function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},DN=function(){var e,t,n,r,i,o,a,s,c,l,u,f,d;function h(t){return t.getBoundingClientRect().top-(e.getBoundingClientRect?e.getBoundingClientRect().top:0)+n}function v(t){e.scrollTo?e.scrollTo(e.scrollLeft,t):e.scrollTop=t}function p(e){l||(l=e),v(o(u=e-l,n,s,c)),d=!0,u<c?requestAnimationFrame(p):function(){if(v(n+s),t&&a){t.setAttribute("tabindex","-1"),t.focus()}"function"==typeof f&&f();l=0,d=!1}()}return function(u){var v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(c=1e3,i=v.offset||0,f=v.callback,o=v.easing||IN,a=v.a11y||!1,Wi(v.container)){case"object":e=v.container;break;case"string":e=document.querySelector(v.container);break;default:e=window.document.documentElement}switch(n=e.scrollTop,Wi(u)){case"number":t=void 0,a=!1,r=n+u;break;case"object":r=h(t=u);break;case"string":t=document.querySelector(u),r=h(t)}switch(s=r-n+i,Wi(v.duration)){case"number":c=v.duration;break;case"function":c=v.duration(s)}d?l=0:requestAnimationFrame(p)}},zN=1e3,LN=za("jsoneditor:History");function BN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxItems||zN,n=[],r=0;function i(){return r<n.length}function o(){return r>0}function a(){return{canUndo:i(),canRedo:o(),length:n.length}}function s(){e.onChange&&e.onChange(a())}return{add:function(e){LN("add",e),n=[e].concat(n.slice(r)).slice(0,t),r=0,s()},clear:function(){LN("clear"),n=[],r=0,s()},getState:a,undo:function(){if(i()){var e=n[r];return r+=1,LN("undo",e),s(),e}},redo:function(){if(o())return LN("redo",n[r-=1]),s(),n[r]}}}function qN(e,t){var n=Date.now(),r=e();return t(Date.now()-n),r}var FN=za("validation");function VN(e,t,n,r){return FN("validateJSON"),t?t(n!==r?r.parse(n.stringify(e)):e):[]}function WN(e,t,n,r){if(FN("validateText"),e.length>vs)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:es.info}]};if(0===e.length)return null;try{var i=qN((function(){return n.parse(e)}),(function(e){return FN("validate: parsed json in ".concat(e," ms"))}));if(!t)return null;var o=n===r?i:qN((function(){return r.parse(e)}),(function(e){return FN("validate: parsed json with the validationParser in ".concat(e," ms"))})),a=qN((function(){return t(o)}),(function(e){return FN("validate: validated json in ".concat(e," ms"))}));return Fk(a)?null:{validationErrors:a}}catch(t){var s=qN((function(){return function(e,t){if(e.length>ps)return!1;try{return t.parse(Xl(e)),!0}catch(e){return!1}}(e,n)}),(function(e){return FN("validate: checked whether repairable in ".concat(e," ms"))}));return{parseError:aO(e,t.message||t.toString()),isRepairable:s}}}var HN=za("jsoneditor:FocusTracker");function UN(e){var t,n=e.onMount,r=e.onDestroy,i=e.getWindow,o=e.hasFocus,a=e.onFocus,s=e.onBlur,c=!1;function l(){var e=o();e&&(clearTimeout(t),c||(HN("focus"),a(),c=e))}function u(){c&&(clearTimeout(t),t=setTimeout((function(){o()||(HN("blur"),c=!1,s())})))}n((function(){HN("mount FocusTracker");var e=i();e&&(e.addEventListener("focusin",l,!0),e.addEventListener("focusout",u,!0))})),r((function(){HN("destroy FocusTracker");var e=i();e&&(e.removeEventListener("focusin",l,!0),e.removeEventListener("focusout",u,!0))}))}function JN(e){go(e,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function KN(e,t,n){var r=e.slice();return r[9]=t[n],r}function GN(e){var t,n;return t=new FM({props:{data:e[1]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2&n&&(r.data=e[1]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function QN(e){var t,n;return t=new FM({props:{data:e[9].icon}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8&n&&(r.data=e[9].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function YN(e){var t,n,r,i,o,a,s,c,l,u=e[9].text+"",f=e[9].icon&&QN(e);function d(){return e[7](e[9])}function h(){return e[8](e[9])}return{c:function(){t=So("button"),f&&f.c(),n=_o(),r=$o(u),i=_o(),Po(t,"type","button"),Po(t,"class","jse-button jse-action jse-primary svelte-fqu1ku"),Po(t,"title",o=e[9].title),t.disabled=a=e[9].disabled},m:function(e,o){ko(e,t,o),f&&f.m(t,null),mo(t,n),mo(t,r),mo(t,i),s=!0,c||(l=[Mo(t,"click",d),Mo(t,"mousedown",h)],c=!0)},p:function(i,c){(e=i)[9].icon?f?(f.p(e,c),8&c&&xa(f,1)):((f=QN(e)).c(),xa(f,1),f.m(t,n)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka()),(!s||8&c)&&u!==(u=e[9].text+"")&&Io(r,u),(!s||8&c&&o!==(o=e[9].title))&&Po(t,"title",o),(!s||8&c&&a!==(a=e[9].disabled))&&(t.disabled=a)},i:function(e){s||(xa(f),s=!0)},o:function(e){ja(f),s=!1},d:function(e){e&&xo(t),f&&f.d(),c=!1,Qi(l)}}}function XN(e){for(var t,n,r,i,o,a,s,c,l,u,f,d=e[1]&&GN(e),h=$a(e[3]),v=[],p=0;p<h.length;p+=1)v[p]=YN(KN(e,h,p));var m=function(e){return ja(v[e],1,1,(function(){v[e]=null}))};return{c:function(){t=So("div"),n=So("div"),r=So("div"),d&&d.c(),i=_o(),o=$o(e[2]),a=_o(),s=So("div");for(var l=0;l<v.length;l+=1)v[l].c();Po(r,"class","jse-text-centered"),Po(n,"role","button"),Po(n,"tabindex","-1"),Po(n,"class","jse-text svelte-fqu1ku"),Bo(n,"jse-clickable",!!e[4]),Po(s,"class","jse-actions svelte-fqu1ku"),Po(t,"class",c="jse-message jse-"+e[0]+" svelte-fqu1ku")},m:function(c,h){ko(c,t,h),mo(t,n),mo(n,r),d&&d.m(r,null),mo(r,i),mo(r,o),mo(t,a),mo(t,s);for(var p=0;p<v.length;p+=1)v[p]&&v[p].m(s,null);l=!0,u||(f=Mo(n,"click",e[5]),u=!0)},p:function(e,a){var u=xi(a,1)[0];if(e[1]?d?(d.p(e,u),2&u&&xa(d,1)):((d=GN(e)).c(),xa(d,1),d.m(r,i)):d&&(wa(),ja(d,1,1,(function(){d=null})),ka()),(!l||4&u)&&Io(o,e[2]),(!l||16&u)&&Bo(n,"jse-clickable",!!e[4]),8&u){var f;for(h=$a(e[3]),f=0;f<h.length;f+=1){var p=KN(e,h,f);v[f]?(v[f].p(p,u),xa(v[f],1)):(v[f]=YN(p),v[f].c(),xa(v[f],1),v[f].m(s,null))}for(wa(),f=h.length;f<v.length;f+=1)m(f);ka()}(!l||1&u&&c!==(c="jse-message jse-"+e[0]+" svelte-fqu1ku"))&&Po(t,"class",c)},i:function(e){if(!l){xa(d);for(var t=0;t<h.length;t+=1)xa(v[t]);l=!0}},o:function(e){ja(d),v=v.filter(Boolean);for(var t=0;t<v.length;t+=1)ja(v[t]);l=!1},d:function(e){e&&xo(t),d&&d.d(),jo(v,e),u=!1,f()}}}function ZN(e,t,n){var r=t.type,i=void 0===r?"success":r,o=t.icon,a=void 0===o?void 0:o,s=t.message,c=void 0===s?void 0:s,l=t.actions,u=void 0===l?[]:l,f=t.onClick,d=void 0===f?void 0:f,h=t.onClose,v=void 0===h?void 0:h;v&&Yo(v);return e.$$set=function(e){"type"in e&&n(0,i=e.type),"icon"in e&&n(1,a=e.icon),"message"in e&&n(2,c=e.message),"actions"in e&&n(3,u=e.actions),"onClick"in e&&n(4,d=e.onClick),"onClose"in e&&n(6,v=e.onClose)},[i,a,c,u,d,function(){d&&d()},v,function(e){e.onClick&&e.onClick()},function(e){e.onMouseDown&&e.onMouseDown()}]}var eI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,ZN,XN,Zi,{type:0,icon:1,message:2,actions:3,onClick:4,onClose:6},JN),r}return Di(n)}();function tI(e){go(e,"svelte-1oe8e8r",".jse-validation-errors-overview.svelte-1oe8e8r.svelte-1oe8e8r{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-message-warning-background);color:var(--jse-message-warning-color);overflow:auto;max-height:25%}.jse-validation-errors-overview.svelte-1oe8e8r table.svelte-1oe8e8r{border-collapse:collapse;width:100%}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r{cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.svelte-1oe8e8r{padding:4px var(--jse-padding);vertical-align:middle}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-icon.svelte-1oe8e8r{width:36px;box-sizing:border-box}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action.svelte-1oe8e8r{width:36px;box-sizing:border-box;padding:0}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:36px;height:26px;cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.2)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td div.jse-validation-errors-expand.svelte-1oe8e8r{display:inline-block;position:relative;top:3px}")}function nI(e,t,n){var r=e.slice();return r[7]=t[n],r[9]=n,r}function rI(e){var t,n,r,i,o=[oI,iI],a=[];function s(e,t){return e[2]||1===e[3]?0:1}return n=s(e),r=a[n]=o[n](e),{c:function(){t=So("div"),r.c(),Po(t,"class","jse-validation-errors-overview svelte-1oe8e8r")},m:function(e,r){ko(e,t,r),a[n].m(t,null),i=!0},p:function(e,i){var c=n;(n=s(e))===c?a[n].p(e,i):(wa(),ja(a[c],1,1,(function(){a[c]=null})),ka(),(r=a[n])?r.p(e,i):(r=a[n]=o[n](e)).c(),xa(r,1),r.m(t,null))},i:function(e){i||(xa(r),i=!0)},o:function(e){ja(r),i=!1},d:function(e){e&&xo(t),a[n].d()}}}function iI(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v;return o=new FM({props:{data:YP}}),f=new FM({props:{data:jP}}),{c:function(){t=So("table"),n=So("tbody"),r=So("tr"),i=So("td"),Ta(o.$$.fragment),a=_o(),s=So("td"),c=$o(e[3]),l=$o(" validation errors\n "),u=So("div"),Ta(f.$$.fragment),Po(i,"class","jse-validation-error-icon svelte-1oe8e8r"),Po(u,"class","jse-validation-errors-expand svelte-1oe8e8r"),Po(s,"class","jse-validation-error-count svelte-1oe8e8r"),Po(r,"class","jse-validation-error svelte-1oe8e8r"),Po(t,"class","jse-validation-errors-overview-collapsed svelte-1oe8e8r")},m:function(p,m){ko(p,t,m),mo(t,n),mo(n,r),mo(r,i),Ra(o,i,null),mo(r,a),mo(r,s),mo(s,c),mo(s,l),mo(s,u),Ra(f,u,null),d=!0,h||(v=Mo(r,"click",e[5]),h=!0)},p:function(e,t){(!d||8&t)&&Io(c,e[3])},i:function(e){d||(xa(o.$$.fragment,e),xa(f.$$.fragment,e),d=!0)},o:function(e){ja(o.$$.fragment,e),ja(f.$$.fragment,e),d=!1},d:function(e){e&&xo(t),Na(o),Na(f),h=!1,v()}}}function oI(e){for(var t,n,r,i,o=$a(Y_(e[0],fs)),a=[],s=0;s<o.length;s+=1)a[s]=sI(nI(e,o,s));var c=function(e){return ja(a[e],1,1,(function(){a[e]=null}))},l=e[3]>fs&&cI(e);return{c:function(){t=So("table"),n=So("tbody");for(var e=0;e<a.length;e+=1)a[e].c();r=_o(),l&&l.c(),Po(t,"class","jse-validation-errors-overview-expanded svelte-1oe8e8r")},m:function(e,o){ko(e,t,o),mo(t,n);for(var s=0;s<a.length;s+=1)a[s]&&a[s].m(n,null);mo(n,r),l&&l.m(n,null),i=!0},p:function(e,t){if(19&t){var i;for(o=$a(Y_(e[0],fs)),i=0;i<o.length;i+=1){var s=nI(e,o,i);a[i]?(a[i].p(s,t),xa(a[i],1)):(a[i]=sI(s),a[i].c(),xa(a[i],1),a[i].m(n,r))}for(wa(),i=o.length;i<a.length;i+=1)c(i);ka()}e[3]>fs?l?l.p(e,t):((l=cI(e)).c(),l.m(n,null)):l&&(l.d(1),l=null)},i:function(e){if(!i){for(var t=0;t<o.length;t+=1)xa(a[t]);i=!0}},o:function(e){a=a.filter(Boolean);for(var t=0;t<a.length;t+=1)ja(a[t]);i=!1},d:function(e){e&&xo(t),jo(a,e),l&&l.d()}}}function aI(e){var t,n,r,i,o;return n=new FM({props:{data:LP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-validation-errors-collapse svelte-1oe8e8r"),Po(t,"title","Collapse validation errors")},m:function(a,s){ko(a,t,s),Ra(n,t,null),r=!0,i||(o=Mo(t,"click",Ao(e[4])),i=!0)},p:Hi,i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n),i=!1,o()}}}function sI(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p=lM(e[7].path)+"",m=e[7].message+"";r=new FM({props:{data:YP}});var g=0===e[9]&&e[0].length>1&&aI(e);function y(){return e[6](e[7])}return{c:function(){t=So("tr"),n=So("td"),Ta(r.$$.fragment),i=_o(),o=So("td"),a=$o(p),s=_o(),c=So("td"),l=$o(m),u=_o(),f=So("td"),g&&g.c(),Po(n,"class","jse-validation-error-icon svelte-1oe8e8r"),Po(o,"class","jse-validation-error-path svelte-1oe8e8r"),Po(c,"class","jse-validation-error-message svelte-1oe8e8r"),Po(f,"class","jse-validation-error-action svelte-1oe8e8r"),Po(t,"class","jse-validation-error svelte-1oe8e8r")},m:function(e,p){ko(e,t,p),mo(t,n),Ra(r,n,null),mo(t,i),mo(t,o),mo(o,a),mo(t,s),mo(t,c),mo(c,l),mo(t,u),mo(t,f),g&&g.m(f,null),d=!0,h||(v=Mo(t,"click",y),h=!0)},p:function(t,n){e=t,(!d||1&n)&&p!==(p=lM(e[7].path)+"")&&Io(a,p),(!d||1&n)&&m!==(m=e[7].message+"")&&Io(l,m),0===e[9]&&e[0].length>1?g?(g.p(e,n),1&n&&xa(g,1)):((g=aI(e)).c(),xa(g,1),g.m(f,null)):g&&(wa(),ja(g,1,1,(function(){g=null})),ka())},i:function(e){d||(xa(r.$$.fragment,e),xa(g),d=!0)},o:function(e){ja(r.$$.fragment,e),ja(g),d=!1},d:function(e){e&&xo(t),Na(r),g&&g.d(),h=!1,v()}}}function cI(e){var t,n,r,i,o,a,s,c,l,u,f,d=e[3]-fs+"";return{c:function(){t=So("tr"),n=So("td"),r=_o(),i=So("td"),o=_o(),a=So("td"),s=$o("(and "),c=$o(d),l=$o(" more errors)"),u=_o(),f=So("td"),Po(n,"class","svelte-1oe8e8r"),Po(i,"class","svelte-1oe8e8r"),Po(a,"class","svelte-1oe8e8r"),Po(f,"class","svelte-1oe8e8r"),Po(t,"class","jse-validation-error svelte-1oe8e8r")},m:function(e,d){ko(e,t,d),mo(t,n),mo(t,r),mo(t,i),mo(t,o),mo(t,a),mo(a,s),mo(a,c),mo(a,l),mo(t,u),mo(t,f)},p:function(e,t){8&t&&d!==(d=e[3]-fs+"")&&Io(c,d)},d:function(e){e&&xo(t)}}}function lI(e){var t,n,r=!Fk(e[0]),i=r&&rI(e);return{c:function(){i&&i.c(),t=Oo()},m:function(e,r){i&&i.m(e,r),ko(e,t,r),n=!0},p:function(e,n){var o=xi(n,1)[0];1&o&&(r=!Fk(e[0])),r?i?(i.p(e,o),1&o&&xa(i,1)):((i=rI(e)).c(),xa(i,1),i.m(t.parentNode,t)):i&&(wa(),ja(i,1,1,(function(){i=null})),ka())},i:function(e){n||(xa(i),n=!0)},o:function(e){ja(i),n=!1},d:function(e){e&&xo(t),i&&i.d(e)}}}function uI(e,t,n){var r,i=t.validationErrors,o=t.selectError,a=!0;return e.$$set=function(e){"validationErrors"in e&&n(0,i=e.validationErrors),"selectError"in e&&n(1,o=e.selectError)},e.$$.update=function(){1&e.$$.dirty&&n(3,r=i.length)},[i,o,a,r,function(){n(2,a=!1)},function(){n(2,a=!0)},function(e){setTimeout((function(){return o(e)}))}]}var fI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,uI,lI,Zi,{validationErrors:0,selectError:1},tI),r}return Di(n)}(),dI="undefined"!=typeof navigator&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function hI(e){go(e,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function vI(e){var t,n,r,i,o,a,s,c,l;return a=new FM({props:{data:JP}}),{c:function(){t=So("div"),n=So("div"),r=$o(e[0]),i=_o(),o=So("button"),Ta(a.$$.fragment),Po(n,"class","jse-title svelte-d01h2s"),Po(o,"type","button"),Po(o,"class","jse-close svelte-d01h2s"),Po(t,"class","jse-header svelte-d01h2s")},m:function(u,f){ko(u,t,f),mo(t,n),mo(n,r),mo(t,i),mo(t,o),Ra(a,o,null),s=!0,c||(l=Mo(o,"click",e[3]),c=!0)},p:function(e,t){var n=xi(t,1)[0];(!s||1&n)&&Io(r,e[0])},i:function(e){s||(xa(a.$$.fragment,e),s=!0)},o:function(e){ja(a.$$.fragment,e),s=!1},d:function(e){e&&xo(t),Na(a),c=!1,l()}}}function pI(e,t,n){var r=t.title,i=void 0===r?"Modal":r,o=t.onClose,a=void 0===o?void 0:o,s=ea("simple-modal").close;return e.$$set=function(e){"title"in e&&n(0,i=e.title),"onClose"in e&&n(1,a=e.onClose)},[i,a,s,function(){a?a():s()}]}var mI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,pI,vI,Zi,{title:0,onClose:1},hI),r}return Di(n)}();function gI(e){go(e,"svelte-1wk5pvq",".jse-modal.svelte-1wk5pvq.svelte-1wk5pvq{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1wk5pvq .jse-modal-contents.svelte-1wk5pvq{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1wk5pvq .jse-modal-contents .jse-actions.svelte-1wk5pvq{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1wk5pvq .jse-modal-contents .jse-actions button.jse-primary.svelte-1wk5pvq{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1wk5pvq .jse-modal-contents .jse-actions button.jse-primary.svelte-1wk5pvq:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1wk5pvq .jse-modal-contents .jse-actions button.jse-primary.svelte-1wk5pvq:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-copy-paste.svelte-1wk5pvq .jse-shortcuts.svelte-1wk5pvq{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1wk5pvq .jse-shortcuts .jse-shortcut .jse-key.svelte-1wk5pvq{font-size:200%;color:var(--jse-theme-color)}")}function yI(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S;return n=new mI({props:{title:"Copying and pasting"}}),{c:function(){t=So("div"),Ta(n.$$.fragment),r=_o(),i=So("div"),(o=So("div")).textContent="These actions are unavailable via the menu. Please use:",a=_o(),s=So("div"),c=So("div"),(l=So("div")).textContent="".concat(e[1],"+C"),u=$o("\n for copy"),f=_o(),d=So("div"),(h=So("div")).textContent="".concat(e[1],"+X"),v=$o("\n for cut"),p=_o(),m=So("div"),(g=So("div")).textContent="".concat(e[1],"+V"),y=$o("\n for paste"),b=_o(),w=So("div"),(k=So("button")).textContent="Close",Po(l,"class","jse-key svelte-1wk5pvq"),Po(c,"class","jse-shortcut"),Po(h,"class","jse-key svelte-1wk5pvq"),Po(d,"class","jse-shortcut"),Po(g,"class","jse-key svelte-1wk5pvq"),Po(m,"class","jse-shortcut"),Po(s,"class","jse-shortcuts svelte-1wk5pvq"),Po(k,"type","button"),Po(k,"class","jse-primary svelte-1wk5pvq"),Po(w,"class","jse-actions svelte-1wk5pvq"),Po(i,"class","jse-modal-contents svelte-1wk5pvq"),Po(t,"class","jse-modal jse-copy-paste svelte-1wk5pvq")},m:function(C,$){ko(C,t,$),Ra(n,t,null),mo(t,r),mo(t,i),mo(i,o),mo(i,a),mo(i,s),mo(s,c),mo(c,l),mo(c,u),mo(s,f),mo(s,d),mo(d,h),mo(d,v),mo(s,p),mo(s,m),mo(m,g),mo(m,y),mo(i,b),mo(i,w),mo(w,k),x=!0,j||(S=Mo(k,"click",e[0]),j=!0)},p:Hi,i:function(e){x||(xa(n.$$.fragment,e),x=!0)},o:function(e){ja(n.$$.fragment,e),x=!1},d:function(e){e&&xo(t),Na(n),j=!1,S()}}}function bI(e){return[ea("simple-modal").close,dI?"⌘":"Ctrl"]}var wI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,bI,yI,Zi,{},gI),r}return Di(n)}();function kI(e){return!!e&&("space"===e.type||!0===e.space)}function xI(e){return!!e&&("separator"===e.type||!0===e.separator)}function jI(e){return!!e&&("label"===e.type&&"string"==typeof e.text)}function SI(e){return!!e&&"function"==typeof e.onClick}function CI(e){return!!e&&("dropdown-button"===e.type&&SI(e.main)&&Array.isArray(e.items))}function $I(e){return!!e&&("row"===e.type&&Array.isArray(e.items))}function _I(e){return!!e&&("column"===e.type&&Array.isArray(e.items))}function OI(e){return ru(e)&&ru(e.parseError)}function MI(e){return ru(e)&&Array.isArray(e.validationErrors)}function EI(e){go(e,"svelte-id9e3c",".jse-menu.svelte-id9e3c.svelte-id9e3c{background:var(--jse-theme-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size-main-menu);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:stretch;position:relative}.jse-menu.svelte-id9e3c .jse-button.svelte-id9e3c{font-family:inherit;font-size:inherit;line-height:1.5em;border:none;background:transparent;color:inherit;cursor:pointer;width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0;display:inline-flex;align-items:center;text-align:center;justify-content:center}.jse-menu.svelte-id9e3c .jse-button.svelte-id9e3c:hover,.jse-menu.svelte-id9e3c .jse-button.svelte-id9e3c:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-id9e3c .jse-button.svelte-id9e3c:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.svelte-id9e3c{width:auto;height:calc(var(--jse-menu-button-size) - var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;padding:0 calc(0.5 * var(--jse-padding)) 1px;border:1px solid var(--jse-menu-color)}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.svelte-id9e3c:not(.jse-last){border-right:none}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.jse-first.svelte-id9e3c{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.jse-last.svelte-id9e3c{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.svelte-id9e3c:hover,.jse-menu.svelte-id9e3c .jse-button.jse-group-button.svelte-id9e3c:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-id9e3c .jse-button.jse-group-button.jse-selected.svelte-id9e3c{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-id9e3c .jse-space.svelte-id9e3c{flex:1}.jse-menu.svelte-id9e3c .jse-separator.svelte-id9e3c{background:var(--jse-menu-color);opacity:0.3;width:1px;margin:3px}")}var AI=function(e){return{}},PI=function(e){return{}};function TI(e,t,n){var r=e.slice();return r[3]=t[n],r}var RI=function(e){return{}},NI=function(e){return{}};function II(e){var t,n=WI(e[3])+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=WI(e[3])+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function DI(e){var t,n,r,i,o,a,s,c,l=e[3].icon&&BI(e),u=e[3].text&&qI(e);return{c:function(){t=So("button"),l&&l.c(),n=_o(),u&&u.c(),Po(t,"type","button"),Po(t,"class",r="jse-button "+e[3].className+" svelte-id9e3c"),Po(t,"title",i=e[3].title),t.disabled=o=e[3].disabled||!1},m:function(r,i){ko(r,t,i),l&&l.m(t,null),mo(t,n),u&&u.m(t,null),a=!0,s||(c=Mo(t,"click",(function(){Yi(e[3].onClick)&&e[3].onClick.apply(this,arguments)})),s=!0)},p:function(s,c){(e=s)[3].icon?l?(l.p(e,c),1&c&&xa(l,1)):((l=BI(e)).c(),xa(l,1),l.m(t,n)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka()),e[3].text?u?u.p(e,c):((u=qI(e)).c(),u.m(t,null)):u&&(u.d(1),u=null),(!a||1&c&&r!==(r="jse-button "+e[3].className+" svelte-id9e3c"))&&Po(t,"class",r),(!a||1&c&&i!==(i=e[3].title))&&Po(t,"title",i),(!a||1&c&&o!==(o=e[3].disabled||!1))&&(t.disabled=o)},i:function(e){a||(xa(l),a=!0)},o:function(e){ja(l),a=!1},d:function(e){e&&xo(t),l&&l.d(),u&&u.d(),s=!1,c()}}}function zI(e){var t;return{c:function(){Po(t=So("div"),"class","jse-space svelte-id9e3c")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function LI(e){var t;return{c:function(){Po(t=So("div"),"class","jse-separator svelte-id9e3c")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function BI(e){var t,n;return t=new FM({props:{data:e[3].icon}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[3].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function qI(e){var t,n=e[3].text+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=e[3].text+"")&&Io(t,n)},d:function(e){e&&xo(t)}}}function FI(e){var t,n,r,i,o,a,s,c=[LI,zI,DI,II],l=[];function u(e,i){return 1&i&&(t=null),1&i&&(n=null),1&i&&(r=null),null==t&&(t=!!xI(e[3])),t?0:(null==n&&(n=!!kI(e[3])),n?1:(null==r&&(r=!!SI(e[3])),r?2:3))}return i=u(e,-1),o=l[i]=c[i](e),{c:function(){o.c(),a=Oo()},m:function(e,t){l[i].m(e,t),ko(e,a,t),s=!0},p:function(e,t){var n=i;(i=u(e,t))===n?l[i].p(e,t):(wa(),ja(l[n],1,1,(function(){l[n]=null})),ka(),(o=l[i])?o.p(e,t):(o=l[i]=c[i](e)).c(),xa(o,1),o.m(a.parentNode,a))},i:function(e){s||(xa(o),s=!0)},o:function(e){ja(o),s=!1},d:function(e){e&&xo(a),l[i].d(e)}}}function VI(e){for(var t,n,r,i,o=e[2].left,a=eo(o,e,e[1],NI),s=$a(e[0]),c=[],l=0;l<s.length;l+=1)c[l]=FI(TI(e,s,l));var u=function(e){return ja(c[e],1,1,(function(){c[e]=null}))},f=e[2].right,d=eo(f,e,e[1],PI);return{c:function(){t=So("div"),a&&a.c(),n=_o();for(var e=0;e<c.length;e+=1)c[e].c();r=_o(),d&&d.c(),Po(t,"class","jse-menu svelte-id9e3c")},m:function(e,o){ko(e,t,o),a&&a.m(t,null),mo(t,n);for(var s=0;s<c.length;s+=1)c[s]&&c[s].m(t,null);mo(t,r),d&&d.m(t,null),i=!0},p:function(e,n){var l=xi(n,1)[0];if(a&&a.p&&(!i||2&l)&&ro(a,o,e,e[1],i?no(o,e[1],l,RI):io(e[1]),NI),1&l){var h;for(s=$a(e[0]),h=0;h<s.length;h+=1){var v=TI(e,s,h);c[h]?(c[h].p(v,l),xa(c[h],1)):(c[h]=FI(v),c[h].c(),xa(c[h],1),c[h].m(t,r))}for(wa(),h=s.length;h<c.length;h+=1)u(h);ka()}d&&d.p&&(!i||2&l)&&ro(d,f,e,e[1],i?no(f,e[1],l,AI):io(e[1]),PI)},i:function(e){if(!i){xa(a,e);for(var t=0;t<s.length;t+=1)xa(c[t]);xa(d,e),i=!0}},o:function(e){ja(a,e),c=c.filter(Boolean);for(var t=0;t<c.length;t+=1)ja(c[t]);ja(d,e),i=!1},d:function(e){e&&xo(t),a&&a.d(e),jo(c,e),d&&d.d(e)}}}function WI(e){return console.error("Unknown type of menu item",e),"???"}function HI(e,t,n){var r=t.$$slots,i=void 0===r?{}:r,o=t.$$scope,a=t.items,s=void 0===a?[]:a;return e.$$set=function(e){"items"in e&&n(0,s=e.items),"$$scope"in e&&n(1,o=e.$$scope)},[s,o,i]}var UI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,HI,VI,Zi,{items:0},EI),r}return Di(n)}();function JI(e){go(e,"svelte-gz09vf",".jse-json-repair-component.svelte-gz09vf.svelte-gz09vf{flex:1;display:flex;flex-direction:column;background:var(--jse-background-color);color:var(--jse-text-color)}.jse-json-repair-component.svelte-gz09vf .jse-menu .jse-info.svelte-gz09vf{padding:0 var(--jse-padding)}.jse-json-repair-component.svelte-gz09vf .jse-json-text.svelte-gz09vf{flex:1;border:none;padding:2px;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-background-color);color:var(--jse-text-color);resize:none;outline:none}")}function KI(e){var t;return{c:function(){(t=So("div")).textContent="Repair invalid JSON, then click apply",Po(t,"slot","left"),Po(t,"class","jse-info svelte-gz09vf")},m:function(e,n){ko(e,t,n)},p:Hi,d:function(e){e&&xo(t)}}}function GI(e){var t,n;return t=new eI({props:{type:"success",message:"JSON is valid now and can be parsed.",actions:e[5]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};32&n&&(r.actions=e[5]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function QI(e){var t,n;return t=new eI({props:{type:"error",icon:YP,message:"Cannot parse JSON: ".concat(e[2].message),actions:e[6]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};4&n&&(r.message="Cannot parse JSON: ".concat(e[2].message)),64&n&&(r.actions=e[6]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function YI(e){var t,n,r,i,o,a,s,c,l,u;n=new UI({props:{items:e[4],$$slots:{left:[KI]},$$scope:{ctx:e}}});var f=[QI,GI],d=[];function h(e,t){return e[2]?0:1}return i=h(e),o=d[i]=f[i](e),{c:function(){t=So("div"),Ta(n.$$.fragment),r=_o(),o.c(),a=_o(),(s=So("textarea")).readOnly=e[1],Po(s,"class","jse-json-text svelte-gz09vf"),Po(s,"autocomplete","off"),Po(s,"autocapitalize","off"),Po(s,"spellcheck","false"),s.value=e[0],Po(t,"class","jse-json-repair-component svelte-gz09vf")},m:function(o,f){ko(o,t,f),Ra(n,t,null),mo(t,r),d[i].m(t,null),mo(t,a),mo(t,s),e[16](s),c=!0,l||(u=Mo(s,"input",e[7]),l=!0)},p:function(e,r){var l=xi(r,1)[0],u={};16&l&&(u.items=e[4]),8388608&l&&(u.$$scope={dirty:l,ctx:e}),n.$set(u);var v=i;(i=h(e))===v?d[i].p(e,l):(wa(),ja(d[v],1,1,(function(){d[v]=null})),ka(),(o=d[i])?o.p(e,l):(o=d[i]=f[i](e)).c(),xa(o,1),o.m(t,a)),(!c||2&l)&&(s.readOnly=e[1]),(!c||1&l)&&(s.value=e[0])},i:function(e){c||(xa(n.$$.fragment,e),xa(o),c=!0)},o:function(e){ja(n.$$.fragment,e),ja(o),c=!1},d:function(r){r&&xo(t),Na(n),d[i].d(),e[16](null),l=!1,u()}}}function XI(e,t,n){var r,i,o,a,s,c,l,u,f=t.text,d=void 0===f?"":f,h=t.readOnly,v=void 0!==h&&h,p=t.onParse,m=t.onRepair,g=t.onChange,y=void 0===g?null:g,b=t.onApply,w=t.onCancel,k=za("jsoneditor:JSONRepair");function x(){b(d)}return e.$$set=function(e){"text"in e&&n(0,d=e.text),"readOnly"in e&&n(1,v=e.readOnly),"onParse"in e&&n(8,p=e.onParse),"onRepair"in e&&n(9,m=e.onRepair),"onChange"in e&&n(10,y=e.onChange),"onApply"in e&&n(11,b=e.onApply),"onCancel"in e&&n(12,w=e.onCancel)},e.$$.update=function(){1&e.$$.dirty&&n(2,r=function(e){try{return p(e),null}catch(t){return aO(e,t.message)}}(d)),1&e.$$.dirty&&n(15,i=function(e){try{return m(e),!0}catch(e){return!1}}(d)),4&e.$$.dirty&&k("error",r),4096&e.$$.dirty&&n(4,u=[{type:"space"},{type:"button",icon:JP,title:"Cancel repair",className:"jse-cancel",onClick:w}]),57344&e.$$.dirty&&n(6,s=i?[o,a]:[o]),2&e.$$.dirty&&n(5,c=[{icon:QP,text:"Apply",title:"Apply fixed JSON",disabled:v,onClick:x}])},n(13,o={icon:BP,text:"Show me",title:"Scroll to the error location",onClick:function(){if(l&&r){var e=null!=r.position?r.position:0;l.setSelectionRange(e,e),l.focus()}}}),n(14,a={icon:OP,text:"Auto repair",title:"Automatically repair JSON",onClick:function(){try{n(0,d=m(d)),y&&y(d)}catch(e){}}}),[d,v,r,l,u,c,s,function(e){k("handleChange");var t=e.target.value;d!==t&&(n(0,d=t),y&&y(d))},p,m,y,b,w,o,a,i,function(e){ra[e?"unshift":"push"]((function(){n(3,l=e)}))}]}var ZI=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,XI,YI,Zi,{text:0,readOnly:1,onParse:8,onRepair:9,onChange:10,onApply:11,onCancel:12},JI),r}return Di(n)}(),eD=[];function tD(e){if("Escape"===e.key){var t=Mb(eD);t&&t()}}function nD(e,t){return Fk(eD)&&window.addEventListener("keydown",tD),eD.push(t),{destroy:function(){Fk(eD=eD.filter((function(e){return e!==t})))&&window.removeEventListener("keydown",tD)}}}function rD(e){go(e,"svelte-5nh81x",".jse-modal.jse-repair.svelte-5nh81x{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}")}function iD(e){var t,n,r,i,o,a;function s(t){e[7](t)}var c={onParse:e[1],onRepair:e[2],onApply:e[4],onCancel:e[5]};return void 0!==e[0]&&(c.text=e[0]),n=new ZI({props:c}),ra.push((function(){return Pa(n,"text",s)})),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-modal jse-repair svelte-5nh81x")},m:function(r,s){ko(r,t,s),Ra(n,t,null),i=!0,o||(a=co(nD.call(null,t,e[3])),o=!0)},p:function(e,t){var i=xi(t,1)[0],o={};2&i&&(o.onParse=e[1]),4&i&&(o.onRepair=e[2]),!r&&1&i&&(r=!0,o.text=e[0],fa((function(){return r=!1}))),n.$set(o)},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,a()}}}function oD(e,t,n){var r=t.text,i=t.onParse,o=t.onRepair,a=t.onApply,s=ea("simple-modal").close;return e.$$set=function(e){"text"in e&&n(0,r=e.text),"onParse"in e&&n(1,i=e.onParse),"onRepair"in e&&n(2,o=e.onRepair),"onApply"in e&&n(6,a=e.onApply)},[r,i,o,s,function(e){s(),a(e)},function(){s()},a,function(e){n(0,r=e)}]}var aD=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,oD,iD,Zi,{text:0,onParse:1,onRepair:2,onApply:6},rD),r}return Di(n)}();function sD(e){go(e,"svelte-1u2b6j8","button.jse-context-menu-button.svelte-1u2b6j8{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;flex:1;white-space:nowrap;padding:var(--jse-padding);color:inherit}button.jse-context-menu-button.svelte-1u2b6j8:hover{background:var(--jse-context-menu-background-highlight)}button.jse-context-menu-button.svelte-1u2b6j8:focus{background:var(--jse-context-menu-background-highlight);z-index:1}button.jse-context-menu-button.svelte-1u2b6j8:disabled{color:var(--jse-context-menu-color-disabled);background:unset}button.jse-context-menu-button.left.svelte-1u2b6j8{text-align:left}button.jse-context-menu-button.svelte-1u2b6j8 svg{width:16px}")}function cD(e){var t,n;return t=new FM({props:{data:e[0].icon}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[0].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function lD(e){var t,n=e[0].text+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=e[0].text+"")&&Io(t,n)},d:function(e){e&&xo(t)}}}function uD(e){var t,n,r,i,o,a,s,c,l=e[0].icon&&cD(e),u=e[0].text&&lD(e);return{c:function(){t=So("button"),l&&l.c(),n=_o(),u&&u.c(),Po(t,"type","button"),Po(t,"class",r=so(hA("jse-context-menu-button",e[1],e[0].className))+" svelte-1u2b6j8"),Po(t,"title",i=e[0].title),t.disabled=o=e[0].disabled||!1},m:function(r,i){ko(r,t,i),l&&l.m(t,null),mo(t,n),u&&u.m(t,null),a=!0,s||(c=Mo(t,"click",(function(){Yi(e[0].onClick)&&e[0].onClick.apply(this,arguments)})),s=!0)},p:function(s,c){var f=xi(c,1)[0];(e=s)[0].icon?l?(l.p(e,f),1&f&&xa(l,1)):((l=cD(e)).c(),xa(l,1),l.m(t,n)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka()),e[0].text?u?u.p(e,f):((u=lD(e)).c(),u.m(t,null)):u&&(u.d(1),u=null),(!a||3&f&&r!==(r=so(hA("jse-context-menu-button",e[1],e[0].className))+" svelte-1u2b6j8"))&&Po(t,"class",r),(!a||1&f&&i!==(i=e[0].title))&&Po(t,"title",i),(!a||1&f&&o!==(o=e[0].disabled||!1))&&(t.disabled=o)},i:function(e){a||(xa(l),a=!0)},o:function(e){ja(l),a=!1},d:function(e){e&&xo(t),l&&l.d(),u&&u.d(),s=!1,c()}}}function fD(e,t,n){var r=t.item,i=t.className,o=void 0===i?void 0:i;return e.$$set=function(e){"item"in e&&n(0,r=e.item),"className"in e&&n(1,o=e.className)},[r,o]}var dD=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,fD,uD,Xi,{item:0,className:1},sD),r}return Di(n)}();function hD(e){go(e,"svelte-12ophpi",".jse-dropdown-button.svelte-12ophpi.svelte-12ophpi{flex:1;line-height:normal;border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;position:relative;padding:0;display:flex}.jse-dropdown-button.svelte-12ophpi ul.svelte-12ophpi{margin:0;padding:0}.jse-dropdown-button.svelte-12ophpi ul li.svelte-12ophpi{margin:0;padding:0;list-style-type:none}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:2em;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);border-radius:0}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.jse-visible.svelte-12ophpi{background:var(--jse-context-menu-background)}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:focus{z-index:1}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:disabled{color:var(--jse-context-menu-color-disabled);background:unset}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items.svelte-12ophpi{display:none;position:absolute;top:100%;left:0;z-index:1;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);box-shadow:var(--jse-controls-box-shadow)}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items.jse-visible.svelte-12ophpi{display:block}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:100%;text-align:left;padding:var(--jse-padding);margin:0}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi:disabled{color:var(--jse-context-menu-color-disabled);background:unset}")}function vD(e,t,n){var r=e.slice();return r[11]=t[n],r}var pD=function(e){return{}},mD=function(e){return{}};function gD(e){var t,n;return t=new FM({props:{data:e[11].icon}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[11].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function yD(e){var t,n,r,i,o,a,s,c,l,u,f,d=e[11].text+"",h=e[11].icon&&gD(e);function v(){return e[9](e[11])}return{c:function(){t=So("li"),n=So("button"),h&&h.c(),r=_o(),i=$o(d),c=_o(),Po(n,"type","button"),Po(n,"title",o=e[11].title),n.disabled=a=e[11].disabled,Po(n,"class",s=so(e[11].className)+" svelte-12ophpi"),Po(t,"class","svelte-12ophpi")},m:function(e,o){ko(e,t,o),mo(t,n),h&&h.m(n,null),mo(n,r),mo(n,i),mo(t,c),l=!0,u||(f=Mo(n,"click",v),u=!0)},p:function(t,c){(e=t)[11].icon?h?(h.p(e,c),1&c&&xa(h,1)):((h=gD(e)).c(),xa(h,1),h.m(n,r)):h&&(wa(),ja(h,1,1,(function(){h=null})),ka()),(!l||1&c)&&d!==(d=e[11].text+"")&&Io(i,d),(!l||1&c&&o!==(o=e[11].title))&&Po(n,"title",o),(!l||1&c&&a!==(a=e[11].disabled))&&(n.disabled=a),(!l||1&c&&s!==(s=so(e[11].className)+" svelte-12ophpi"))&&Po(n,"class",s)},i:function(e){l||(xa(h),l=!0)},o:function(e){ja(h),l=!1},d:function(e){e&&xo(t),h&&h.d(),u=!1,f()}}}function bD(e){var t,n,r,i,o,a,s,c,l,u,f=e[8].defaultItem,d=eo(f,e,e[7],mD);i=new FM({props:{data:NP}});for(var h=$a(e[0]),v=[],p=0;p<h.length;p+=1)v[p]=yD(vD(e,h,p));var m=function(e){return ja(v[e],1,1,(function(){v[e]=null}))};return{c:function(){t=So("div"),d&&d.c(),n=_o(),r=So("button"),Ta(i.$$.fragment),o=_o(),a=So("div"),s=So("ul");for(var c=0;c<v.length;c+=1)v[c].c();Po(r,"type","button"),Po(r,"class","jse-open-dropdown svelte-12ophpi"),Po(r,"data-type","jse-open-dropdown"),r.disabled=e[4],Bo(r,"jse-visible",e[3]),Po(s,"class","svelte-12ophpi"),Po(a,"class","jse-dropdown-items svelte-12ophpi"),zo(a,"width",e[2]),Bo(a,"jse-visible",e[3]),Po(t,"role","button"),Po(t,"tabindex","0"),Po(t,"class","jse-dropdown-button svelte-12ophpi"),Po(t,"title",e[1])},m:function(f,h){ko(f,t,h),d&&d.m(t,null),mo(t,n),mo(t,r),Ra(i,r,null),mo(t,o),mo(t,a),mo(a,s);for(var p=0;p<v.length;p+=1)v[p]&&v[p].m(s,null);c=!0,l||(u=[Mo(r,"click",e[5]),Mo(t,"click",e[6])],l=!0)},p:function(e,n){var i=xi(n,1)[0];if(d&&d.p&&(!c||128&i)&&ro(d,f,e,e[7],c?no(f,e[7],i,pD):io(e[7]),mD),(!c||16&i)&&(r.disabled=e[4]),(!c||8&i)&&Bo(r,"jse-visible",e[3]),1&i){var o;for(h=$a(e[0]),o=0;o<h.length;o+=1){var l=vD(e,h,o);v[o]?(v[o].p(l,i),xa(v[o],1)):(v[o]=yD(l),v[o].c(),xa(v[o],1),v[o].m(s,null))}for(wa(),o=h.length;o<v.length;o+=1)m(o);ka()}(!c||4&i)&&zo(a,"width",e[2]),(!c||8&i)&&Bo(a,"jse-visible",e[3]),(!c||2&i)&&Po(t,"title",e[1])},i:function(e){if(!c){xa(d,e),xa(i.$$.fragment,e);for(var t=0;t<h.length;t+=1)xa(v[t]);c=!0}},o:function(e){ja(d,e),ja(i.$$.fragment,e),v=v.filter(Boolean);for(var t=0;t<v.length;t+=1)ja(v[t]);c=!1},d:function(e){e&&xo(t),d&&d.d(e),Na(i),jo(v,e),l=!1,Qi(u)}}}function wD(e,t,n){var r,i=t.$$slots,o=void 0===i?{}:i,a=t.$$scope,s=t.items,c=void 0===s?[]:s,l=t.title,u=void 0===l?void 0:l,f=t.width,d=void 0===f?"120px":f,h=!1;function v(){n(3,h=!1)}function p(e){"Escape"===KO(e)&&(e.preventDefault(),n(3,h=!1))}Qo((function(){document.addEventListener("click",v),document.addEventListener("keydown",p)})),Yo((function(){document.removeEventListener("click",v),document.removeEventListener("keydown",p)}));return e.$$set=function(e){"items"in e&&n(0,c=e.items),"title"in e&&n(1,u=e.title),"width"in e&&n(2,d=e.width),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=function(){1&e.$$.dirty&&n(4,r=c.every((function(e){return!0===e.disabled})))},[c,u,d,h,r,function(){var e=h;setTimeout((function(){return n(3,h=!e)}))},v,a,o,function(e){return e.onClick()}]}var kD=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,wD,bD,Zi,{items:0,title:1,width:2},hD),r}return Di(n)}();function xD(e){go(e,"svelte-1u2b6j8","button.jse-context-menu-button.svelte-1u2b6j8{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;flex:1;white-space:nowrap;padding:var(--jse-padding);color:inherit}button.jse-context-menu-button.svelte-1u2b6j8:hover{background:var(--jse-context-menu-background-highlight)}button.jse-context-menu-button.svelte-1u2b6j8:focus{background:var(--jse-context-menu-background-highlight);z-index:1}button.jse-context-menu-button.svelte-1u2b6j8:disabled{color:var(--jse-context-menu-color-disabled);background:unset}button.jse-context-menu-button.left.svelte-1u2b6j8{text-align:left}button.jse-context-menu-button.svelte-1u2b6j8 svg{width:16px}")}function jD(e){var t,n;return t=new FM({props:{data:e[0].main.icon}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[0].main.icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function SD(e){var t,n,r,i,o,a,s,c,l,u=e[0].main.text+"",f=e[0].main.icon&&jD(e);return{c:function(){t=So("button"),f&&f.c(),n=_o(),r=$o(u),Po(t,"class",i=so(hA("jse-context-menu-button",e[1],e[0].main.className))+" svelte-1u2b6j8"),Po(t,"type","button"),Po(t,"slot","defaultItem"),Po(t,"title",o=e[0].main.title),t.disabled=a=e[0].main.disabled||!1},m:function(i,o){ko(i,t,o),f&&f.m(t,null),mo(t,n),mo(t,r),s=!0,c||(l=Mo(t,"click",(function(){Yi(e[0].main.onClick)&&e[0].main.onClick.apply(this,arguments)})),c=!0)},p:function(c,l){(e=c)[0].main.icon?f?(f.p(e,l),1&l&&xa(f,1)):((f=jD(e)).c(),xa(f,1),f.m(t,n)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka()),(!s||1&l)&&u!==(u=e[0].main.text+"")&&Io(r,u),(!s||3&l&&i!==(i=so(hA("jse-context-menu-button",e[1],e[0].main.className))+" svelte-1u2b6j8"))&&Po(t,"class",i),(!s||1&l&&o!==(o=e[0].main.title))&&Po(t,"title",o),(!s||1&l&&a!==(a=e[0].main.disabled||!1))&&(t.disabled=a)},i:function(e){s||(xa(f),s=!0)},o:function(e){ja(f),s=!1},d:function(e){e&&xo(t),f&&f.d(),c=!1,l()}}}function CD(e){var t,n;return t=new kD({props:{width:e[0].width,items:e[0].items,$$slots:{defaultItem:[SD]},$$scope:{ctx:e}}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r=xi(n,1)[0],i={};1&r&&(i.width=e[0].width),1&r&&(i.items=e[0].items),7&r&&(i.$$scope={dirty:r,ctx:e}),t.$set(i)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function $D(e,t,n){var r=t.item,i=t.className,o=void 0===i?void 0:i;return e.$$set=function(e){"item"in e&&n(0,r=e.item),"className"in e&&n(1,o=e.className)},[r,o]}var _D=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,$D,CD,Xi,{item:0,className:1},xD),r}return Di(n)}();function OD(e){go(e,"svelte-1nininf",".jse-contextmenu.svelte-1nininf.svelte-1nininf{box-shadow:var(--jse-controls-box-shadow);font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-context-menu-background);color:var(--jse-context-menu-color)}.jse-contextmenu.svelte-1nininf .jse-row.svelte-1nininf{display:flex;flex-direction:row;align-items:flex-start;justify-content:stretch}.jse-contextmenu.svelte-1nininf .jse-row div.jse-label.svelte-1nininf{flex:1;white-space:nowrap;padding:var(--jse-padding);color:var(--jse-context-menu-color-disabled);line-height:normal}.jse-contextmenu.svelte-1nininf .jse-row div.jse-tip.svelte-1nininf{flex:1;background:var(--jse-context-menu-tip-background);color:var(--jse-context-menu-tip-color);margin:calc(0.5 * var(--jse-padding));padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);font-size:80%;line-height:1.3em;display:flex;flex-direction:row;align-items:start;gap:var(--jse-padding);border-radius:3px}.jse-contextmenu.svelte-1nininf .jse-row div.jse-tip div.jse-tip-icon.svelte-1nininf{padding-top:calc(0.5 * var(--jse-padding))}.jse-contextmenu.svelte-1nininf .jse-column.svelte-1nininf{flex:1;display:flex;flex-direction:column;align-items:stretch}.jse-contextmenu.svelte-1nininf .jse-column.svelte-1nininf:not(:last-child){border-right:1px solid var(--jse-context-menu-separator-color)}.jse-contextmenu.svelte-1nininf .jse-separator.svelte-1nininf{width:100%;height:1px;background:var(--jse-context-menu-separator-color)}")}function MD(e,t,n){var r=e.slice();return r[6]=t[n],r}function ED(e,t,n){var r=e.slice();return r[9]=t[n],r}function AD(e,t,n){var r=e.slice();return r[12]=t[n],r}function PD(e){var t,n=XD(e[6])+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=XD(e[6])+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function TD(e){var t;return{c:function(){Po(t=So("div"),"class","jse-separator svelte-1nininf")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function RD(e){for(var t,n,r=$a(e[6].items),i=[],o=0;o<r.length;o+=1)i[o]=KD(ED(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){t=So("div");for(var e=0;e<i.length;e+=1)i[e].c();Po(t,"class","jse-row svelte-1nininf")},m:function(e,r){ko(e,t,r);for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(t,null);n=!0},p:function(e,n){if(1&n){var o;for(r=$a(e[6].items),o=0;o<r.length;o+=1){var s=ED(e,r,o);i[o]?(i[o].p(s,n),xa(i[o],1)):(i[o]=KD(s),i[o].c(),xa(i[o],1),i[o].m(t,null))}for(wa(),o=r.length;o<i.length;o+=1)a(o);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function ND(e){var t,n;return t=new _D({props:{item:e[6]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[6]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function ID(e){var t,n;return t=new dD({props:{item:e[6]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[6]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function DD(e){var t,n=XD(e[9])+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=XD(e[9])+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function zD(e){var t;return{c:function(){Po(t=So("div"),"class","jse-separator svelte-1nininf")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function LD(e){for(var t,n,r=$a(e[9].items),i=[],o=0;o<r.length;o+=1)i[o]=JD(AD(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){t=So("div");for(var e=0;e<i.length;e+=1)i[e].c();Po(t,"class","jse-column svelte-1nininf")},m:function(e,r){ko(e,t,r);for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(t,null);n=!0},p:function(e,n){if(1&n){var o;for(r=$a(e[9].items),o=0;o<r.length;o+=1){var s=AD(e,r,o);i[o]?(i[o].p(s,n),xa(i[o],1)):(i[o]=JD(s),i[o].c(),xa(i[o],1),i[o].m(t,null))}for(wa(),o=r.length;o<i.length;o+=1)a(o);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function BD(e){var t,n;return t=new _D({props:{item:e[9]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[9]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function qD(e){var t,n;return t=new dD({props:{item:e[9]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[9]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function FD(e){var t,n=XD(e[12])+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){1&r&&n!==(n=XD(e[12])+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function VD(e){var t,n,r=e[12].text+"";return{c:function(){t=So("div"),n=$o(r),Po(t,"class","jse-label svelte-1nininf")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){1&t&&r!==(r=e[12].text+"")&&Io(n,r)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function WD(e){var t;return{c:function(){Po(t=So("div"),"class","jse-separator svelte-1nininf")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function HD(e){var t,n;return t=new _D({props:{className:"left",item:e[12]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[12]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function UD(e){var t,n;return t=new dD({props:{className:"left",item:e[12]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.item=e[12]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function JD(e){var t,n,r,i,o,a,s,c,l=[UD,HD,WD,VD,FD],u=[];function f(e,o){return 1&o&&(t=null),1&o&&(n=null),1&o&&(r=null),1&o&&(i=null),null==t&&(t=!!SI(e[12])),t?0:(null==n&&(n=!!CI(e[12])),n?1:(null==r&&(r=!!xI(e[12])),r?2:(null==i&&(i=!!jI(e[12])),i?3:4)))}return o=f(e,-1),a=u[o]=l[o](e),{c:function(){a.c(),s=Oo()},m:function(e,t){u[o].m(e,t),ko(e,s,t),c=!0},p:function(e,t){var n=o;(o=f(e,t))===n?u[o].p(e,t):(wa(),ja(u[n],1,1,(function(){u[n]=null})),ka(),(a=u[o])?a.p(e,t):(a=u[o]=l[o](e)).c(),xa(a,1),a.m(s.parentNode,s))},i:function(e){c||(xa(a),c=!0)},o:function(e){ja(a),c=!1},d:function(e){e&&xo(s),u[o].d(e)}}}function KD(e){var t,n,r,i,o,a,s,c,l=[qD,BD,LD,zD,DD],u=[];function f(e,o){return 1&o&&(t=null),1&o&&(n=null),1&o&&(r=null),1&o&&(i=null),null==t&&(t=!!SI(e[9])),t?0:(null==n&&(n=!!CI(e[9])),n?1:(null==r&&(r=!!_I(e[9])),r?2:(null==i&&(i=!!xI(e[9])),i?3:4)))}return o=f(e,-1),a=u[o]=l[o](e),{c:function(){a.c(),s=Oo()},m:function(e,t){u[o].m(e,t),ko(e,s,t),c=!0},p:function(e,t){var n=o;(o=f(e,t))===n?u[o].p(e,t):(wa(),ja(u[n],1,1,(function(){u[n]=null})),ka(),(a=u[o])?a.p(e,t):(a=u[o]=l[o](e)).c(),xa(a,1),a.m(s.parentNode,s))},i:function(e){c||(xa(a),c=!0)},o:function(e){ja(a),c=!1},d:function(e){e&&xo(s),u[o].d(e)}}}function GD(e){var t,n,r,i,o,a,s,c,l=[ID,ND,RD,TD,PD],u=[];function f(e,o){return 1&o&&(t=null),1&o&&(n=null),1&o&&(r=null),1&o&&(i=null),null==t&&(t=!!SI(e[6])),t?0:(null==n&&(n=!!CI(e[6])),n?1:(null==r&&(r=!!$I(e[6])),r?2:(null==i&&(i=!!xI(e[6])),i?3:4)))}return o=f(e,-1),a=u[o]=l[o](e),{c:function(){a.c(),s=Oo()},m:function(e,t){u[o].m(e,t),ko(e,s,t),c=!0},p:function(e,t){var n=o;(o=f(e,t))===n?u[o].p(e,t):(wa(),ja(u[n],1,1,(function(){u[n]=null})),ka(),(a=u[o])?a.p(e,t):(a=u[o]=l[o](e)).c(),xa(a,1),a.m(s.parentNode,s))},i:function(e){c||(xa(a),c=!0)},o:function(e){ja(a),c=!1},d:function(e){e&&xo(s),u[o].d(e)}}}function QD(e){var t,n,r,i,o,a,s,c;return i=new FM({props:{data:wM}}),{c:function(){t=So("div"),n=So("div"),r=So("div"),Ta(i.$$.fragment),o=_o(),a=So("div"),s=$o(e[1]),Po(r,"class","jse-tip-icon svelte-1nininf"),Po(a,"class","jse-tip-text"),Po(n,"class","jse-tip svelte-1nininf"),Po(t,"class","jse-row svelte-1nininf")},m:function(e,l){ko(e,t,l),mo(t,n),mo(n,r),Ra(i,r,null),mo(n,o),mo(n,a),mo(a,s),c=!0},p:function(e,t){(!c||2&t)&&Io(s,e[1])},i:function(e){c||(xa(i.$$.fragment,e),c=!0)},o:function(e){ja(i.$$.fragment,e),c=!1},d:function(e){e&&xo(t),Na(i)}}}function YD(e){for(var t,n,r,i,o,a=$a(e[0]),s=[],c=0;c<a.length;c+=1)s[c]=GD(MD(e,a,c));var l=function(e){return ja(s[e],1,1,(function(){s[e]=null}))},u=e[1]&&QD(e);return{c:function(){t=So("div");for(var e=0;e<s.length;e+=1)s[e].c();n=_o(),u&&u.c(),Po(t,"role","menu"),Po(t,"tabindex","-1"),Po(t,"class","jse-contextmenu svelte-1nininf")},m:function(a,c){ko(a,t,c);for(var l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);mo(t,n),u&&u.m(t,null),e[4](t),r=!0,i||(o=Mo(t,"keydown",e[3]),i=!0)},p:function(e,r){var i=xi(r,1)[0];if(1&i){var o;for(a=$a(e[0]),o=0;o<a.length;o+=1){var c=MD(e,a,o);s[o]?(s[o].p(c,i),xa(s[o],1)):(s[o]=GD(c),s[o].c(),xa(s[o],1),s[o].m(t,n))}for(wa(),o=a.length;o<s.length;o+=1)l(o);ka()}e[1]?u?(u.p(e,i),2&i&&xa(u,1)):((u=QD(e)).c(),xa(u,1),u.m(t,null)):u&&(wa(),ja(u,1,1,(function(){u=null})),ka())},i:function(e){if(!r){for(var t=0;t<a.length;t+=1)xa(s[t]);xa(u),r=!0}},o:function(e){s=s.filter(Boolean);for(var t=0;t<s.length;t+=1)ja(s[t]);ja(u),r=!1},d:function(n){n&&xo(t),jo(s,n),u&&u.d(),e[4](null),i=!1,o()}}}function XD(e){return console.error("Unknown type of context menu item",e),"???"}function ZD(e,t,n){var r,i=t.items,o=t.tip;Qo((function(){var e=Array.from(r.querySelectorAll("button")).find((function(e){return!e.disabled}));e&&e.focus()}));var a={ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right"};return e.$$set=function(e){"items"in e&&n(0,i=e.items),"tip"in e&&n(1,o=e.tip)},[i,o,r,function(e){var t=KO(e),n=a[t];if(n&&e.target){e.preventDefault();var i=UO({allElements:Array.from(r.querySelectorAll("button:not([disabled])")),currentElement:e.target,direction:n,hasPrio:function(e){return"jse-open-dropdown"!==e.getAttribute("data-type")}});i&&i.focus()}},function(e){ra[e?"unshift":"push"]((function(){n(2,r=e)}))}]}var ez=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,ZD,YD,Zi,{items:0,tip:1},OD),r}return Di(n)}();function tz(e){var t,n;return t=new ez({props:{items:e[1],tip:e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2&n[0]&&(r.items=e[1]),1&n[0]&&(r.tip=e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function nz(e,t,n){var r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j=t.json,S=t.documentState,C=t.parser,$=t.showTip,_=t.onCloseContextMenu,O=t.onEditKey,M=t.onEditValue,E=t.onToggleEnforceString,A=t.onCut,P=t.onCopy,T=t.onPaste,R=t.onRemove,N=t.onDuplicate,I=t.onExtract,D=t.onInsertBefore,z=t.onInsert,L=t.onConvert,B=t.onInsertAfter,q=t.onSort,F=t.onTransform;function V(){_(),O()}function W(){_(),M()}function H(){_(),E()}function U(){_(),A(!0)}function J(){_(),A(!1)}function K(){_(),P(!0)}function G(){_(),P(!1)}function Q(){_(),T()}function Y(){_(),R()}function X(){_(),N()}function Z(){_(),I()}function ee(e){_(),l?L(e):z(e)}function te(){_(),q()}function ne(){_(),F()}function re(){_(),D()}function ie(){_(),B()}return e.$$set=function(e){"json"in e&&n(2,j=e.json),"documentState"in e&&n(3,S=e.documentState),"parser"in e&&n(4,C=e.parser),"showTip"in e&&n(0,$=e.showTip),"onCloseContextMenu"in e&&n(5,_=e.onCloseContextMenu),"onEditKey"in e&&n(6,O=e.onEditKey),"onEditValue"in e&&n(7,M=e.onEditValue),"onToggleEnforceString"in e&&n(8,E=e.onToggleEnforceString),"onCut"in e&&n(9,A=e.onCut),"onCopy"in e&&n(10,P=e.onCopy),"onPaste"in e&&n(11,T=e.onPaste),"onRemove"in e&&n(12,R=e.onRemove),"onDuplicate"in e&&n(13,N=e.onDuplicate),"onExtract"in e&&n(14,I=e.onExtract),"onInsertBefore"in e&&n(15,D=e.onInsertBefore),"onInsert"in e&&n(16,z=e.onInsert),"onConvert"in e&&n(17,L=e.onConvert),"onInsertAfter"in e&&n(18,B=e.onInsertAfter),"onSort"in e&&n(19,q=e.onSort),"onTransform"in e&&n(20,F=e.onTransform)},e.$$.update=function(){8&e.$$.dirty[0]&&n(37,r=S.selection),4&e.$$.dirty[0]&&n(39,i=void 0!==j),64&e.$$.dirty[1]&&n(31,o=!!r),64&e.$$.dirty[1]&&n(21,a=!!r&&Fk(fA(r))),4&e.$$.dirty[0]|64&e.$$.dirty[1]&&n(38,s=r?Ys(j,fA(r)):void 0),128&e.$$.dirty[1]&&n(35,c=Array.isArray(s)?"Edit array":ru(s)?"Edit object":"Edit value"),320&e.$$.dirty[1]&&n(22,l=i&&(NE(r)||TE(r)||RE(r))),6291456&e.$$.dirty[0]|256&e.$$.dirty[1]&&n(30,u=i&&l&&!a),2097152&e.$$.dirty[0]|320&e.$$.dirty[1]&&n(29,f=i&&null!=r&&(NE(r)||RE(r))&&!a),2097156&e.$$.dirty[0]|320&e.$$.dirty[1]&&n(36,d=i&&null!=r&&JE(r)&&!a&&!Array.isArray(Ys(j,fk(fA(r))))),320&e.$$.dirty[1]&&n(34,h=i&&null!=r&&JE(r)),136&e.$$.dirty[1]&&n(32,v=h&&!iu(s)),4194304&e.$$.dirty[0]&&n(25,p=l),33554432&e.$$.dirty[0]&&n(24,m=p?"Convert to:":"Insert:"),33554432&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(28,g=!p&&o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(27,y=p?oA(r)&&!ru(s):o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(26,b=p?oA(r)&&!Array.isArray(s):o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(23,w=p?oA(r)&&iu(s):o),24&e.$$.dirty[0]|192&e.$$.dirty[1]&&n(33,k=!(null==r||!s)&&jE(s,S.enforceStringMap,oc(fA(r)),C)),2145386496&e.$$.dirty[0]|63&e.$$.dirty[1]&&n(1,x=[{type:"row",items:[{type:"button",onClick:V,icon:EP,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!d},{type:"dropdown-button",main:{type:"button",onClick:W,icon:EP,text:c,title:"Edit the value (Double-click on the value)",disabled:!h},width:"11em",items:[{type:"button",icon:EP,text:c,title:"Edit the value (Double-click on the value)",onClick:W,disabled:!h},{type:"button",icon:k?kM:xM,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:H,disabled:!v}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:U,icon:yP,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:yP,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:U,disabled:!l},{type:"button",icon:yP,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:J,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:K,icon:VP,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:VP,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:K,disabled:!l},{type:"button",icon:VP,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:G,disabled:!l}]},{type:"button",onClick:Q,icon:mP,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:X,icon:GP,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:Z,icon:TP,text:"Extract",title:"Extract selected contents",disabled:!f},{type:"button",onClick:te,icon:zP,text:"Sort",title:"Sort array or object contents",disabled:!l},{type:"button",onClick:ne,icon:$P,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!l},{type:"button",onClick:Y,icon:vP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:m},{type:"button",onClick:function(){return ee("structure")},icon:p?DP:WP,text:"Structure",title:m+" structure",disabled:!g},{type:"button",onClick:function(){return ee("object")},icon:p?DP:WP,text:"Object",title:m+" structure",disabled:!y},{type:"button",onClick:function(){return ee("array")},icon:p?DP:WP,text:"Array",title:m+" array",disabled:!b},{type:"button",onClick:function(){return ee("value")},icon:p?DP:WP,text:"Value",title:m+" value",disabled:!w}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:re,icon:SP,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!l||a},{type:"button",onClick:ie,icon:bP,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!l||a}]}])},[$,x,j,S,C,_,O,M,E,A,P,T,R,N,I,D,z,L,B,q,F,a,l,w,m,p,b,y,g,f,u,o,v,k,h,c,d,r,s,i]}var rz=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,nz,tz,Zi,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Di(n)}();function iz(e){go(e,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function oz(e,t,n){var r=e.slice();return r[13]=t[n],r}function az(e){var t,n,r,i,o,a,s,c,l=e[13].start+"",u=e[13].end+"";function f(){return e[12](e[13])}return{c:function(){t=So("button"),n=$o("show "),r=$o(l),i=$o("-"),o=$o(u),a=_o(),Po(t,"type","button"),Po(t,"class","jse-expand-items svelte-1kai5ns")},m:function(e,l){ko(e,t,l),mo(t,n),mo(t,r),mo(t,i),mo(t,o),mo(t,a),s||(c=Mo(t,"click",f),s=!0)},p:function(t,n){e=t,16&n&&l!==(l=e[13].start+"")&&Io(r,l),16&n&&u!==(u=e[13].end+"")&&Io(o,u)},d:function(e){e&&xo(t),s=!1,c()}}}function sz(e){for(var t,n,r,i,o,a,s,c,l,u,f,d=$a(e[4]),h=[],v=0;v<d.length;v+=1)h[v]=az(oz(e,d,v));return{c:function(){t=So("div"),n=So("div"),r=So("div"),i=$o("Items "),o=$o(e[3]),a=$o("-"),s=$o(e[2]),c=_o();for(var u=0;u<h.length;u+=1)h[u].c();Po(r,"class","jse-text svelte-1kai5ns"),Po(t,"role","none"),Po(t,"class","jse-collapsed-items svelte-1kai5ns"),Po(t,"style",l=cz(e[0].length+2)),Bo(t,"jse-selected",e[5])},m:function(e,l){ko(e,t,l),mo(t,n),mo(n,r),mo(r,i),mo(r,o),mo(r,a),mo(r,s),mo(n,c);for(var d=0;d<h.length;d+=1)h[d]&&h[d].m(n,null);u||(f=Mo(t,"mousemove",lz),u=!0)},p:function(e,r){var i=xi(r,1)[0];if(8&i&&Io(o,e[3]),4&i&&Io(s,e[2]),19&i){var a;for(d=$a(e[4]),a=0;a<d.length;a+=1){var c=oz(e,d,a);h[a]?h[a].p(c,i):(h[a]=az(c),h[a].c(),h[a].m(n,null))}for(;a<h.length;a+=1)h[a].d(1);h.length=d.length}1&i&&l!==(l=cz(e[0].length+2))&&Po(t,"style",l),32&i&&Bo(t,"jse-selected",e[5])},i:Hi,o:Hi,d:function(e){e&&xo(t),jo(h,e),u=!1,f()}}}function cz(e){return"margin-left: calc(".concat(e," * var(--jse-indent-size))")}function lz(e){e.stopPropagation()}function uz(e,t,n){var r,i,o,a,s,c=t.visibleSections,l=t.sectionIndex,u=t.total,f=t.path,d=t.selection,h=t.onExpandSection,v=t.context;return e.$$set=function(e){"visibleSections"in e&&n(6,c=e.visibleSections),"sectionIndex"in e&&n(7,l=e.sectionIndex),"total"in e&&n(8,u=e.total),"path"in e&&n(0,f=e.path),"selection"in e&&n(9,d=e.selection),"onExpandSection"in e&&n(1,h=e.onExpandSection),"context"in e&&n(10,v=e.context)},e.$$.update=function(){192&e.$$.dirty&&n(11,r=c[l]),2048&e.$$.dirty&&n(3,i=r.end),448&e.$$.dirty&&n(2,o=c[l+1]?c[l+1].start:u),1545&e.$$.dirty&&n(5,a=lA(v.getJson(),d,f.concat(String(i)))),12&e.$$.dirty&&n(4,s=function(e,t){var n={start:e,end:Math.min(rE(e),t)},r=Math.max(iE((e+t)/2),e),i={start:r,end:Math.min(rE(r),t)},o=iE(t),a=o===t?o-us:o,s={start:Math.max(a,e),end:t},c=[n],l=i.start>=n.end&&i.end<=s.start;return l&&c.push(i),s.start>=(l?i.end:n.end)&&c.push(s),c}(i,o))},[f,h,o,i,s,a,c,l,u,d,v,r,function(e){return h(f,e)}]}var fz=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,uz,sz,Zi,{visibleSections:6,sectionIndex:7,total:8,path:0,selection:9,onExpandSection:1,context:10},iz),r}return Di(n)}();function dz(e){go(e,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function hz(e){var t,n,r,i,o;return n=new FM({props:{data:NP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-context-menu-pointer svelte-1yzl4st"),Po(t,"title",js),Bo(t,"jse-selected",e[0])},m:function(a,s){ko(a,t,s),Ra(n,t,null),r=!0,i||(o=Mo(t,"click",e[1]),i=!0)},p:function(e,n){var i=xi(n,1)[0];(!r||1&i)&&Bo(t,"jse-selected",e[0])},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n),i=!1,o()}}}function vz(e,t,n){var r=t.selected,i=t.onContextMenu;return e.$$set=function(e){"selected"in e&&n(0,r=e.selected),"onContextMenu"in e&&n(2,i=e.onContextMenu)},[r,function(e){for(var t=e.target;t&&"BUTTON"!==t.nodeName;)t=t.parentNode;t&&i({anchor:t,left:0,top:0,width:Es,height:Ms,offsetTop:2,offsetLeft:0,showTip:!0})},i]}var pz=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,vz,hz,Zi,{selected:0,onContextMenu:2},dz),r}return Di(n)}();function mz(e){go(e,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function gz(e){var t,n,r,i,o,a,s,c=[wz,bz],l=[];function u(e,t){return e[1]?0:1}return n=u(e),r=l[n]=c[n](e),{c:function(){t=So("div"),r.c(),Po(t,"role","none"),Po(t,"data-type","selectable-key"),Po(t,"class",i=so(e[6](e[0]))+" svelte-24a1b2")},m:function(r,i){ko(r,t,i),l[n].m(t,null),o=!0,a||(s=Mo(t,"dblclick",e[5]),a=!0)},p:function(e,a){var s=n;(n=u(e))===s?l[n].p(e,a):(wa(),ja(l[s],1,1,(function(){l[s]=null})),ka(),(r=l[n])?r.p(e,a):(r=l[n]=c[n](e)).c(),xa(r,1),r.m(t,null)),(!o||1&a&&i!==(i=so(e[6](e[0]))+" svelte-24a1b2"))&&Po(t,"class",i)},i:function(e){o||(xa(r),o=!0)},o:function(e){ja(r),o=!1},d:function(e){e&&xo(t),l[n].d(),a=!1,s()}}}function yz(e){var t,n;return t=new yA({props:{value:e[2].normalization.escapeValue(e[0]),shortText:!0,onChange:e[7],onCancel:e[8],onFind:e[2].onFind}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};5&n&&(r.value=e[2].normalization.escapeValue(e[0])),4&n&&(r.onFind=e[2].onFind),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function bz(e){var t,n=TO(e[2].normalization.escapeValue(e[0]))+"";return{c:function(){t=$o(n)},m:function(e,n){ko(e,t,n)},p:function(e,r){5&r&&n!==(n=TO(e[2].normalization.escapeValue(e[0]))+"")&&Io(t,n)},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function wz(e){var t,n;return t=new YA({props:{text:e[2].normalization.escapeValue(e[0]),searchResultItems:e[1]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};5&n&&(r.text=e[2].normalization.escapeValue(e[0])),2&n&&(r.searchResultItems=e[1]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function kz(e){var t,n;return t=new pz({props:{selected:!0,onContextMenu:e[2].onContextMenu}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};4&n&&(r.onContextMenu=e[2].onContextMenu),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function xz(e){var t,n,r,i,o,a=[yz,gz],s=[];function c(e,t){return e[4]?0:1}t=c(e),n=s[t]=a[t](e);var l=!e[2].readOnly&&e[3]&&!e[4]&&kz(e);return{c:function(){n.c(),r=_o(),l&&l.c(),i=Oo()},m:function(e,n){s[t].m(e,n),ko(e,r,n),l&&l.m(e,n),ko(e,i,n),o=!0},p:function(e,o){var u=xi(o,1)[0],f=t;(t=c(e))===f?s[t].p(e,u):(wa(),ja(s[f],1,1,(function(){s[f]=null})),ka(),(n=s[t])?n.p(e,u):(n=s[t]=a[t](e)).c(),xa(n,1),n.m(r.parentNode,r)),e[2].readOnly||!e[3]||e[4]?l&&(wa(),ja(l,1,1,(function(){l=null})),ka()):l?(l.p(e,u),28&u&&xa(l,1)):((l=kz(e)).c(),xa(l,1),l.m(i.parentNode,i))},i:function(e){o||(xa(n),xa(l),o=!0)},o:function(e){ja(n),ja(l),o=!1},d:function(e){e&&(xo(r),xo(i)),s[t].d(e),l&&l.d(e)}}}function jz(e,t,n){var r,i,o=t.path,a=t.key,s=t.selection,c=t.searchResultItems,l=t.onUpdateKey,u=t.context;return e.$$set=function(e){"path"in e&&n(9,o=e.path),"key"in e&&n(0,a=e.key),"selection"in e&&n(10,s=e.selection),"searchResultItems"in e&&n(1,c=e.searchResultItems),"onUpdateKey"in e&&n(11,l=e.onUpdateKey),"context"in e&&n(2,u=e.context)},e.$$.update=function(){1536&e.$$.dirty&&n(3,r=!!s&&(TE(s)&&Vk(s.path,o))),1032&e.$$.dirty&&n(4,i=r&&rA(s))},[a,c,u,r,i,function(e){i||u.readOnly||(e.preventDefault(),u.onSelect(YE(o,!0)))},function(e){return hA("jse-key",{"jse-empty":""===e})},function(e,t){var n=l(a,u.normalization.unescapeValue(e)),r=fk(o).concat(n);u.onSelect(t===rs.nextInside?XE(r,!1):YE(r,!1)),t!==rs.self&&u.focus()},function(){u.onSelect(YE(o,!1)),u.focus()},o,s,l]}var Sz=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,jz,xz,Zi,{path:9,key:0,selection:10,searchResultItems:1,onUpdateKey:11,context:2},mz),r}return Di(n)}();function Cz(e,t,n){var r=e.slice();return r[8]=t[n],r}function $z(e){var t,n,r,i=[e[8].props],o=e[8].component;function a(e,t){var n={};if(void 0!==t&&1&t)n=Ea(i,[Aa(e[8].props)]);else for(var r=0;r<i.length;r+=1)n=Ji(n,i[r]);return{props:n}}return o&&(t=Fo(o,a(e))),{c:function(){t&&Ta(t.$$.fragment),n=Oo()},m:function(e,i){t&&Ra(t,e,i),ko(e,n,i),r=!0},p:function(e,r){if(1&r&&o!==(o=e[8].component)){if(t){wa();var s=t;ja(s.$$.fragment,1,0,(function(){Na(s,1)})),ka()}o?(Ta((t=Fo(o,a(e,r))).$$.fragment),xa(t.$$.fragment,1),Ra(t,n.parentNode,n)):t=null}else if(o){var c=1&r?Ea(i,[Aa(e[8].props)]):{};t.$set(c)}},i:function(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o:function(e){t&&ja(t.$$.fragment,e),r=!1},d:function(e){e&&xo(n),t&&Na(t,e)}}}function _z(e){var t,n,r=e[8].component,i=$z(e);return{c:function(){i.c(),t=Oo()},m:function(e,r){i.m(e,r),ko(e,t,r),n=!0},p:function(e,n){1&n&&Zi(r,r=e[8].component)?(wa(),ja(i,1,1,Hi),ka(),(i=$z(e)).c(),xa(i,1),i.m(t.parentNode,t)):i.p(e,n)},i:function(e){n||(xa(i),n=!0)},o:function(e){ja(i),n=!1},d:function(e){e&&xo(t),i.d(e)}}}function Oz(e){for(var t,n,r=$a(e[0]),i=[],o=0;o<r.length;o+=1)i[o]=_z(Cz(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=Oo()},m:function(e,r){for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(e,r);ko(e,t,r),n=!0},p:function(e,n){var o=xi(n,1)[0];if(1&o){var s;for(r=$a(e[0]),s=0;s<r.length;s+=1){var c=Cz(e,r,s);i[s]?(i[s].p(c,o),xa(i[s],1)):(i[s]=_z(c),i[s].c(),xa(i[s],1),i[s].m(t.parentNode,t))}for(wa(),s=r.length;s<i.length;s+=1)a(s);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function Mz(e,t,n){var r,i,o=t.path,a=t.value,s=t.context,c=t.enforceString,l=t.selection,u=t.searchResultItems;return e.$$set=function(e){"path"in e&&n(1,o=e.path),"value"in e&&n(2,a=e.value),"context"in e&&n(3,s=e.context),"enforceString"in e&&n(4,c=e.enforceString),"selection"in e&&n(5,l=e.selection),"searchResultItems"in e&&n(6,u=e.searchResultItems)},e.$$.update=function(){40&e.$$.dirty&&n(7,r=!s.readOnly&&RE(l)&&rA(l)),254&e.$$.dirty&&n(0,i=s.onRenderValue({path:o,value:a,readOnly:s.readOnly,enforceString:c,isEditing:r,parser:s.parser,normalization:s.normalization,selection:l,searchResultItems:u,onPatch:s.onPatch,onPasteJson:s.onPasteJson,onSelect:s.onSelect,onFind:s.onFind,findNextInside:s.findNextInside,focus:s.focus}))},[i,o,a,s,c,l,u,r]}var Ez=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Mz,Oz,Zi,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Di(n)}(),Az=Ez,Pz={selecting:!1,selectionAnchor:null,selectionAnchorType:null,selectionFocus:null,dragging:!1};function Tz(e){var t=e.json,n=e.documentState,r=e.deltaY,i=e.items;if(!n.selection)return{operations:void 0,updatedSelection:null,offset:0};var o=n.selection,a=r<0?function(e){var t=e.json,n=e.items,r=e.selection,i=e.deltaY,o=BE(t,r),a=n.findIndex((function(e){return Vk(e.path,o)})),s=function(){var e;return null===(e=n[c-1])||void 0===e?void 0:e.height},c=a,l=0;for(;void 0!==s()&&Math.abs(i)>l+s()/2;)l+=s(),c-=1;var u=n[c].path,f=c-a;return c!==a&&void 0!==n[c]?{beforePath:u,offset:f}:void 0}({json:t,selection:o,deltaY:r,items:i}):function(e){var t,n=e.json,r=e.items,i=e.selection,o=e.deltaY,a=qE(n,i),s=r.findIndex((function(e){return Vk(e.path,a)})),c=0,l=s,u=function(){var e;return null===(e=r[l+1])||void 0===e?void 0:e.height};for(;void 0!==u()&&Math.abs(o)>c+u()/2;)c+=u(),l+=1;var f=fk(a),d=Ys(n,f),h=Array.isArray(d),v=h?l:l+1,p=null===(t=r[v])||void 0===t?void 0:t.path,m=l-s;return p?{beforePath:p,offset:m}:{append:!0,offset:m}}({json:t,selection:o,deltaY:r,items:i});if(!a||0===a.offset)return{operations:void 0,updatedSelection:null,offset:0};var s=function(e,t,n){if(!t)return[];var r="beforePath"in n?n.beforePath:void 0,i="append"in n?n.append:void 0,o=fk(fA(t)),a=Ys(e,o);if(!(i||r&&GE(r,o)&&r.length>o.length))return[];var s=BE(e,t),c=qE(e,t),l=Mb(s),u=Mb(c),f=r?r[o.length]:void 0;if(!Is(a)){if(Ns(a)){var d=eu(l),h=eu(u),v=void 0!==f?eu(f):a.length;return d$(h-d+1,v<d?function(e){return{op:"move",from:oc(o.concat(String(d+e))),path:oc(o.concat(String(v+e)))}}:function(){return{op:"move",from:oc(o.concat(String(d))),path:oc(o.concat(String(v)))}})}throw new Error("Cannot create move operations: parent must be an Object or Array")}var p=Object.keys(a),m=p.indexOf(l),g=p.indexOf(u),y=i?p.length:void 0!==f?p.indexOf(f):-1;return-1!==m&&-1!==g&&-1!==y?y>m?[].concat(Bi(p.slice(m,g+1)),Bi(p.slice(y,p.length))).map((function(e){return OA(o,e)})):[].concat(Bi(p.slice(y,m)),Bi(p.slice(g+1,p.length))).map((function(e){return OA(o,e)})):[]}(t,o,a),c=Ys(t,fk(BE(t,o)));if(Array.isArray(c)){var l=function(e){var t,n,r=e.items,i=e.json,o=e.selection,a=e.offset,s=BE(i,o),c=qE(i,o),l=r.findIndex((function(e){return Vk(e.path,s)})),u=r.findIndex((function(e){return Vk(e.path,c)})),f=null===(t=r[l+a])||void 0===t?void 0:t.path,d=null===(n=r[u+a])||void 0===n?void 0:n.path;return tA(f,d)}({items:i,json:t,selection:o,offset:a.offset});return{operations:s,updatedSelection:l,offset:a.offset}}return{operations:s,updatedSelection:null,offset:a.offset}}function Rz(e,t){return function(e,t){if(e){for(var n={},r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];t(o,e[o])&&(n[o]=e[o])}return Object.keys(n).length>0?n:void 0}}(e,(function(e){return cc(e,t)}))}function Nz(e){go(e,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function Iz(e){var t,n,r,i,o,a;return n=new FM({props:{data:YP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-validation-error svelte-pz3g1j")},m:function(s,c){ko(s,t,c),Ra(n,t,null),i=!0,o||(a=[Mo(t,"click",(function(){Yi(e[0])&&e[0].apply(this,arguments)})),co(r=cP.call(null,t,Ri({text:e[1]},e[2])))],o=!0)},p:function(t,n){var i=xi(n,1)[0];e=t,r&&Yi(r.update)&&2&i&&r.update.call(null,Ri({text:e[1]},e[2]))},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,Qi(a)}}}function Dz(e,t,n){var r,i=ea("absolute-popup"),o=t.validationError,a=t.onExpand;return e.$$set=function(e){"validationError"in e&&n(3,o=e.validationError),"onExpand"in e&&n(0,a=e.onExpand)},e.$$.update=function(){8&e.$$.dirty&&n(1,r=o.isChildError?"Contains invalid data":o.message)},[a,r,i,o]}var zz=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Dz,Iz,Xi,{validationError:3,onExpand:0},Nz),r}return Di(n)}();function Lz(e){go(e,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var Bz=function(e){return{}},qz=function(e){return{}};function Fz(e,t,n){var r=e.slice();return r[53]=t[n],r}var Vz=function(e){return{}},Wz=function(e){return{}};function Hz(e,t,n){var r=e.slice();return r[47]=t[n],r[49]=n,r}function Uz(e,t,n){var r=e.slice();return r[50]=t[n],r}var Jz=function(e){return{}},Kz=function(e){return{}};function Gz(e){var t,n,r,i,o,a,s,c,l,u=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!rA(e[7])&&Vk(fA(e[7]),e[1]),f=e[34].identifier,d=eo(f,e,e[35],qz),h=!e[17]&&Xz();o=new Az({props:{path:e[1],value:e[0],enforceString:e[13],selection:e[16]?e[7]:null,searchResultItems:VA(e[6],e[9]),context:e[8]}});var v=u&&Zz(e),p=e[15]&&eL(e),m=!e[17]&&tL(e);return{c:function(){t=So("div"),n=So("div"),d&&d.c(),r=_o(),h&&h.c(),i=_o(),Ta(o.$$.fragment),a=_o(),v&&v.c(),s=_o(),p&&p.c(),c=_o(),m&&m.c(),Po(n,"class","jse-contents svelte-1wlxti1"),Po(t,"class","jse-contents-outer svelte-1wlxti1"),Po(t,"style",e[18])},m:function(e,u){ko(e,t,u),mo(t,n),d&&d.m(n,null),mo(n,r),h&&h.m(n,null),mo(n,i),Ra(o,n,null),mo(n,a),v&&v.m(n,null),mo(t,s),p&&p.m(t,null),mo(t,c),m&&m.m(t,null),l=!0},p:function(e,r){d&&d.p&&(!l||16&r[1])&&ro(d,f,e,e[35],l?no(f,e[35],r,Bz):io(e[35]),qz),e[17]?h&&(h.d(1),h=null):h||((h=Xz()).c(),h.m(n,i));var a={};2&r[0]&&(a.path=e[1]),1&r[0]&&(a.value=e[0]),8192&r[0]&&(a.enforceString=e[13]),65664&r[0]&&(a.selection=e[16]?e[7]:null),576&r[0]&&(a.searchResultItems=VA(e[6],e[9])),256&r[0]&&(a.context=e[8]),o.$set(a),65922&r[0]&&(u=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!rA(e[7])&&Vk(fA(e[7]),e[1])),u?v?(v.p(e,r),65922&r[0]&&xa(v,1)):((v=Zz(e)).c(),xa(v,1),v.m(n,null)):v&&(wa(),ja(v,1,1,(function(){v=null})),ka()),e[15]?p?(p.p(e,r),32768&r[0]&&xa(p,1)):((p=eL(e)).c(),xa(p,1),p.m(t,c)):p&&(wa(),ja(p,1,1,(function(){p=null})),ka()),e[17]?m&&(m.d(1),m=null):m?m.p(e,r):((m=tL(e)).c(),m.m(t,null)),(!l||262144&r[0])&&Po(t,"style",e[18])},i:function(e){l||(xa(d,e),xa(o.$$.fragment,e),xa(v),xa(p),l=!0)},o:function(e){ja(d,e),ja(o.$$.fragment,e),ja(v),ja(p),l=!1},d:function(e){e&&xo(t),d&&d.d(e),h&&h.d(),Na(o),v&&v.d(),p&&p.d(),m&&m.d()}}}function Qz(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!e[7].edit&&Vk(fA(e[7]),e[1]),w=[rL,nL],k=[];function x(e,t){return e[12]?0:1}i=x(e),o=k[i]=w[i](e);var j=e[34].identifier,S=eo(j,e,e[35],Wz),C=!e[17]&&iL();function $(e,t){return e[12]?aL:oL}var _=$(e),O=_(e),M=b&&sL(e),E=e[15]&&(!e[12]||!e[15].isChildError)&&cL(e);function A(e,t){return e[12]?uL:e[17]?void 0:lL}var P=A(e),T=P&&P(e),R=e[12]&&fL(e);return{c:function(){t=So("div"),n=So("div"),r=So("button"),o.c(),a=_o(),S&&S.c(),s=_o(),C&&C.c(),c=_o(),l=So("div"),u=So("div"),O.c(),f=_o(),M&&M.c(),d=_o(),E&&E.c(),h=_o(),T&&T.c(),v=_o(),R&&R.c(),p=Oo(),Po(r,"type","button"),Po(r,"class","jse-expand svelte-1wlxti1"),Po(r,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),Po(u,"class","jse-meta-inner svelte-1wlxti1"),Po(l,"class","jse-meta svelte-1wlxti1"),Po(l,"data-type","selectable-value"),Po(n,"class","jse-header svelte-1wlxti1"),Po(t,"class","jse-header-outer svelte-1wlxti1"),Po(t,"style",e[18])},m:function(o,b){ko(o,t,b),mo(t,n),mo(n,r),k[i].m(r,null),mo(n,a),S&&S.m(n,null),mo(n,s),C&&C.m(n,null),mo(n,c),mo(n,l),mo(l,u),O.m(u,null),mo(n,f),M&&M.m(n,null),mo(t,d),E&&E.m(t,null),mo(t,h),T&&T.m(t,null),ko(o,v,b),R&&R.m(o,b),ko(o,p,b),m=!0,g||(y=Mo(r,"click",e[21]),g=!0)},p:function(e,a){var s=i;(i=x(e))!==s&&(wa(),ja(k[s],1,1,(function(){k[s]=null})),ka(),(o=k[i])||(o=k[i]=w[i](e)).c(),xa(o,1),o.m(r,null)),S&&S.p&&(!m||16&a[1])&&ro(S,j,e,e[35],m?no(j,e[35],a,Vz):io(e[35]),Wz),e[17]?C&&(C.d(1),C=null):C||((C=iL()).c(),C.m(n,c)),_===(_=$(e))&&O?O.p(e,a):(O.d(1),(O=_(e))&&(O.c(),O.m(u,null))),65922&a[0]&&(b=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!e[7].edit&&Vk(fA(e[7]),e[1])),b?M?(M.p(e,a),65922&a[0]&&xa(M,1)):((M=sL(e)).c(),xa(M,1),M.m(n,null)):M&&(wa(),ja(M,1,1,(function(){M=null})),ka()),!e[15]||e[12]&&e[15].isChildError?E&&(wa(),ja(E,1,1,(function(){E=null})),ka()):E?(E.p(e,a),36864&a[0]&&xa(E,1)):((E=cL(e)).c(),xa(E,1),E.m(t,h)),P===(P=A(e))&&T?T.p(e,a):(T&&T.d(1),(T=P&&P(e))&&(T.c(),T.m(t,null))),(!m||262144&a[0])&&Po(t,"style",e[18]),e[12]?R?(R.p(e,a),4096&a[0]&&xa(R,1)):((R=fL(e)).c(),xa(R,1),R.m(p.parentNode,p)):R&&(wa(),ja(R,1,1,(function(){R=null})),ka())},i:function(e){m||(xa(o),xa(S,e),xa(M),xa(E),xa(R),m=!0)},o:function(e){ja(o),ja(S,e),ja(M),ja(E),ja(R),m=!1},d:function(e){e&&(xo(t),xo(v),xo(p)),k[i].d(),S&&S.d(e),C&&C.d(),O.d(),M&&M.d(),E&&E.d(),T&&T.d(),R&&R.d(e),g=!1,y()}}}function Yz(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!e[7].edit&&Vk(fA(e[7]),e[1]),w=[gL,mL],k=[];function x(e,t){return e[12]?0:1}i=x(e),o=k[i]=w[i](e);var j=e[34].identifier,S=eo(j,e,e[35],Kz),C=!e[17]&&yL();function $(e,t){return e[12]?wL:bL}var _=$(e),O=_(e),M=b&&kL(e),E=e[15]&&(!e[12]||!e[15].isChildError)&&xL(e);function A(e,t){return e[12]?SL:jL}var P=A(e),T=P(e),R=e[12]&&CL(e);return{c:function(){t=So("div"),n=So("div"),r=So("button"),o.c(),a=_o(),S&&S.c(),s=_o(),C&&C.c(),c=_o(),l=So("div"),u=So("div"),O.c(),f=_o(),M&&M.c(),d=_o(),E&&E.c(),h=_o(),T.c(),v=_o(),R&&R.c(),p=Oo(),Po(r,"type","button"),Po(r,"class","jse-expand svelte-1wlxti1"),Po(r,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),Po(u,"class","jse-meta-inner svelte-1wlxti1"),Po(u,"data-type","selectable-value"),Po(l,"class","jse-meta svelte-1wlxti1"),Po(n,"class","jse-header svelte-1wlxti1"),Po(t,"class","jse-header-outer svelte-1wlxti1"),Po(t,"style",e[18])},m:function(o,b){ko(o,t,b),mo(t,n),mo(n,r),k[i].m(r,null),mo(n,a),S&&S.m(n,null),mo(n,s),C&&C.m(n,null),mo(n,c),mo(n,l),mo(l,u),O.m(u,null),mo(n,f),M&&M.m(n,null),mo(t,d),E&&E.m(t,null),mo(t,h),T.m(t,null),ko(o,v,b),R&&R.m(o,b),ko(o,p,b),m=!0,g||(y=Mo(r,"click",e[21]),g=!0)},p:function(e,a){var s=i;(i=x(e))!==s&&(wa(),ja(k[s],1,1,(function(){k[s]=null})),ka(),(o=k[i])||(o=k[i]=w[i](e)).c(),xa(o,1),o.m(r,null)),S&&S.p&&(!m||16&a[1])&&ro(S,j,e,e[35],m?no(j,e[35],a,Jz):io(e[35]),Kz),e[17]?C&&(C.d(1),C=null):C||((C=yL()).c(),C.m(n,c)),_===(_=$(e))&&O?O.p(e,a):(O.d(1),(O=_(e))&&(O.c(),O.m(u,null))),65922&a[0]&&(b=!e[8].readOnly&&e[16]&&e[7]&&(RE(e[7])||NE(e[7]))&&!e[7].edit&&Vk(fA(e[7]),e[1])),b?M?(M.p(e,a),65922&a[0]&&xa(M,1)):((M=kL(e)).c(),xa(M,1),M.m(n,null)):M&&(wa(),ja(M,1,1,(function(){M=null})),ka()),!e[15]||e[12]&&e[15].isChildError?E&&(wa(),ja(E,1,1,(function(){E=null})),ka()):E?(E.p(e,a),36864&a[0]&&xa(E,1)):((E=xL(e)).c(),xa(E,1),E.m(t,h)),P===(P=A(e))&&T?T.p(e,a):(T.d(1),(T=P(e))&&(T.c(),T.m(t,null))),(!m||262144&a[0])&&Po(t,"style",e[18]),e[12]?R?(R.p(e,a),4096&a[0]&&xa(R,1)):((R=CL(e)).c(),xa(R,1),R.m(p.parentNode,p)):R&&(wa(),ja(R,1,1,(function(){R=null})),ka())},i:function(e){m||(xa(o),xa(S,e),xa(M),xa(E),xa(R),m=!0)},o:function(e){ja(o),ja(S,e),ja(M),ja(E),ja(R),m=!1},d:function(e){e&&(xo(t),xo(v),xo(p)),k[i].d(),S&&S.d(e),C&&C.d(),O.d(),M&&M.d(),E&&E.d(),T.d(),R&&R.d(e),g=!1,y()}}}function Xz(e){var t;return{c:function(){(t=So("div")).textContent=":",Po(t,"class","jse-separator svelte-1wlxti1")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function Zz(e){var t,n,r;return n=new pz({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.onContextMenu=e[8].onContextMenu),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function eL(e){var t,n;return t=new zz({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.validationError=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function tL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[30]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function nL(e){var t,n;return t=new FM({props:{data:pP}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function rL(e){var t,n;return t=new FM({props:{data:NP}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function iL(e){var t;return{c:function(){(t=So("div")).textContent=":",Po(t,"class","jse-separator svelte-1wlxti1")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function oL(e){var t,n,r,i,o,a,s,c,l,u,f=Object.keys(e[0]).length+"",d=1===Object.keys(e[0]).length?"prop":"props";return{c:function(){(t=So("div")).textContent="{",n=_o(),r=So("button"),i=$o(f),o=_o(),a=$o(d),s=_o(),(c=So("div")).textContent="}",Po(t,"class","jse-bracket svelte-1wlxti1"),Po(r,"type","button"),Po(r,"class","jse-tag svelte-1wlxti1"),Po(c,"class","jse-bracket svelte-1wlxti1")},m:function(f,d){ko(f,t,d),ko(f,n,d),ko(f,r,d),mo(r,i),mo(r,o),mo(r,a),ko(f,s,d),ko(f,c,d),l||(u=Mo(r,"click",e[22]),l=!0)},p:function(e,t){1&t[0]&&f!==(f=Object.keys(e[0]).length+"")&&Io(i,f),1&t[0]&&d!==(d=1===Object.keys(e[0]).length?"prop":"props")&&Io(a,d)},d:function(e){e&&(xo(t),xo(n),xo(r),xo(s),xo(c)),l=!1,u()}}}function aL(e){var t;return{c:function(){(t=So("div")).textContent="{",Po(t,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,n){ko(e,t,n)},p:Hi,d:function(e){e&&xo(t)}}}function sL(e){var t,n,r;return n=new pz({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.onContextMenu=e[8].onContextMenu),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function cL(e){var t,n;return t=new zz({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.validationError=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function lL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[30]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function uL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-inside")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[29]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function fL(e){for(var t,n,r,i,o,a,s,c=!e[8].readOnly&&(e[10]===Ss||e[16]&&PE(e[7])),l=c&&dL(e),u=$a(e[19](e[1],e[0],e[2],e[3],e[4],e[5],e[6],e[7],e[11])),f=[],d=0;d<u.length;d+=1)f[d]=vL(Fz(e,u,d));var h=function(e){return ja(f[e],1,1,(function(){f[e]=null}))},v=!e[17]&&pL(e);return{c:function(){t=So("div"),l&&l.c(),n=_o();for(var s=0;s<f.length;s+=1)f[s].c();r=_o(),i=So("div"),(o=So("div")).innerHTML='<div class="jse-bracket svelte-1wlxti1">}</div>',a=_o(),v&&v.c(),Po(t,"class","jse-props svelte-1wlxti1"),Po(o,"data-type","selectable-value"),Po(o,"class","jse-footer svelte-1wlxti1"),Po(i,"class","jse-footer-outer svelte-1wlxti1"),Po(i,"style",e[18])},m:function(e,c){ko(e,t,c),l&&l.m(t,null),mo(t,n);for(var u=0;u<f.length;u+=1)f[u]&&f[u].m(t,null);ko(e,r,c),ko(e,i,c),mo(i,o),mo(i,a),v&&v.m(i,null),s=!0},p:function(e,r){if(66944&r[0]&&(c=!e[8].readOnly&&(e[10]===Ss||e[16]&&PE(e[7]))),c?l?(l.p(e,r),66944&r[0]&&xa(l,1)):((l=dL(e)).c(),xa(l,1),l.m(t,n)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka()),76024319&r[0]){var o;for(u=$a(e[19](e[1],e[0],e[2],e[3],e[4],e[5],e[6],e[7],e[11])),o=0;o<u.length;o+=1){var a=Fz(e,u,o);f[o]?(f[o].p(a,r),xa(f[o],1)):(f[o]=vL(a),f[o].c(),xa(f[o],1),f[o].m(t,null))}for(wa(),o=u.length;o<f.length;o+=1)h(o);ka()}e[17]?v&&(v.d(1),v=null):v?v.p(e,r):((v=pL(e)).c(),v.m(i,null)),(!s||262144&r[0])&&Po(i,"style",e[18])},i:function(e){if(!s){xa(l);for(var t=0;t<u.length;t+=1)xa(f[t]);s=!0}},o:function(e){ja(l),f=f.filter(Boolean);for(var t=0;t<f.length;t+=1)ja(f[t]);s=!1},d:function(e){e&&(xo(t),xo(r),xo(i)),l&&l.d(),jo(f,e),v&&v.d()}}}function dL(e){var t,n,r,i;return n=new pz({props:{selected:e[16]&&PE(e[7]),onContextMenu:e[31]}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-insert-area jse-inside svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-inside"),Po(t,"style",r=RL(e[1].length+1)),Po(t,"title",xs),Bo(t,"jse-hovered",e[10]===Ss),Bo(t,"jse-selected",e[16]&&PE(e[7]))},m:function(e,r){ko(e,t,r),Ra(n,t,null),i=!0},p:function(e,o){var a={};65664&o[0]&&(a.selected=e[16]&&PE(e[7])),n.$set(a),(!i||2&o[0]&&r!==(r=RL(e[1].length+1)))&&Po(t,"style",r),(!i||1024&o[0])&&Bo(t,"jse-hovered",e[10]===Ss),(!i||65664&o[0])&&Bo(t,"jse-selected",e[16]&&PE(e[7]))},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n)}}}function hL(e){var t,n,r,i;return n=new Sz({props:{path:e[53].path,key:e[53].key,selection:e[53].selection,searchResultItems:e[53].keySearchResultItemsMap,context:e[8],onUpdateKey:e[23]}}),{c:function(){t=So("div"),Ta(n.$$.fragment),r=_o(),Po(t,"slot","identifier"),Po(t,"class","jse-identifier svelte-1wlxti1")},m:function(e,o){ko(e,t,o),Ra(n,t,null),mo(t,r),i=!0},p:function(e,t){var r={};2303&t[0]&&(r.path=e[53].path),2303&t[0]&&(r.key=e[53].key),2303&t[0]&&(r.selection=e[53].selection),2303&t[0]&&(r.searchResultItems=e[53].keySearchResultItemsMap),256&t[0]&&(r.context=e[8]),n.$set(r)},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n)}}}function vL(e){var t,n;return t=new IL({props:{value:e[53].value,path:e[53].path,expandedMap:e[53].expandedMap,enforceStringMap:e[53].enforceStringMap,visibleSectionsMap:e[53].visibleSectionsMap,validationErrorsMap:e[53].validationErrorsMap,searchResultItemsMap:e[53].valueSearchResultItemsMap,selection:e[53].selection,context:e[8],onDragSelectionStart:e[26],$$slots:{identifier:[hL]},$$scope:{ctx:e}}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2303&n[0]&&(r.value=e[53].value),2303&n[0]&&(r.path=e[53].path),2303&n[0]&&(r.expandedMap=e[53].expandedMap),2303&n[0]&&(r.enforceStringMap=e[53].enforceStringMap),2303&n[0]&&(r.visibleSectionsMap=e[53].visibleSectionsMap),2303&n[0]&&(r.validationErrorsMap=e[53].validationErrorsMap),2303&n[0]&&(r.searchResultItemsMap=e[53].valueSearchResultItemsMap),2303&n[0]&&(r.selection=e[53].selection),256&n[0]&&(r.context=e[8]),2559&n[0]|16&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function pL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[30]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function mL(e){var t,n;return t=new FM({props:{data:pP}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function gL(e){var t,n;return t=new FM({props:{data:NP}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function yL(e){var t;return{c:function(){(t=So("div")).textContent=":",Po(t,"class","jse-separator svelte-1wlxti1")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function bL(e){var t,n,r,i,o,a,s,c,l,u,f=e[0].length+"",d=1===e[0].length?"item":"items";return{c:function(){(t=So("div")).textContent="[",n=_o(),r=So("button"),i=$o(f),o=_o(),a=$o(d),s=_o(),(c=So("div")).textContent="]",Po(t,"class","jse-bracket svelte-1wlxti1"),Po(r,"type","button"),Po(r,"class","jse-tag svelte-1wlxti1"),Po(c,"class","jse-bracket svelte-1wlxti1")},m:function(f,d){ko(f,t,d),ko(f,n,d),ko(f,r,d),mo(r,i),mo(r,o),mo(r,a),ko(f,s,d),ko(f,c,d),l||(u=Mo(r,"click",e[22]),l=!0)},p:function(e,t){1&t[0]&&f!==(f=e[0].length+"")&&Io(i,f),1&t[0]&&d!==(d=1===e[0].length?"item":"items")&&Io(a,d)},d:function(e){e&&(xo(t),xo(n),xo(r),xo(s),xo(c)),l=!1,u()}}}function wL(e){var t,n,r,i,o,a,s,c=e[0].length+"",l=1===e[0].length?"item":"items";return{c:function(){(t=So("div")).textContent="[",n=_o(),r=So("span"),i=$o(c),o=_o(),a=$o(l),s=$o("\n "),Po(t,"class","jse-bracket svelte-1wlxti1"),Po(r,"class","jse-tag jse-expanded svelte-1wlxti1")},m:function(e,c){ko(e,t,c),ko(e,n,c),ko(e,r,c),mo(r,i),mo(r,o),mo(r,a),ko(e,s,c)},p:function(e,t){1&t[0]&&c!==(c=e[0].length+"")&&Io(i,c),1&t[0]&&l!==(l=1===e[0].length?"item":"items")&&Io(a,l)},d:function(e){e&&(xo(t),xo(n),xo(r),xo(s))}}}function kL(e){var t,n,r;return n=new pz({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.onContextMenu=e[8].onContextMenu),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function xL(e){var t,n;return t=new zz({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.validationError=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function jL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[30]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function SL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-inside")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[29]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function CL(e){for(var t,n,r,i,o,a,s,c=!e[8].readOnly&&(e[10]===Ss||e[16]&&PE(e[7])),l=[],u=new Map,f=c&&$L(e),d=$a(e[14]||hs),h=function(e){return e[49]},v=0;v<d.length;v+=1){var p=Hz(e,d,v),m=h(p);u.set(m,l[v]=EL(m,p))}var g=!e[17]&&AL(e);return{c:function(){t=So("div"),f&&f.c(),n=_o();for(var s=0;s<l.length;s+=1)l[s].c();r=_o(),i=So("div"),(o=So("div")).innerHTML='<span class="jse-bracket svelte-1wlxti1">]</span>',a=_o(),g&&g.c(),Po(t,"class","jse-items svelte-1wlxti1"),Po(o,"data-type","selectable-value"),Po(o,"class","jse-footer svelte-1wlxti1"),Po(i,"class","jse-footer-outer svelte-1wlxti1"),Po(i,"style",e[18])},m:function(e,c){ko(e,t,c),f&&f.m(t,null),mo(t,n);for(var u=0;u<l.length;u+=1)l[u]&&l[u].m(t,null);ko(e,r,c),ko(e,i,c),mo(i,o),mo(i,a),g&&g.m(i,null),s=!0},p:function(e,r){66944&r[0]&&(c=!e[8].readOnly&&(e[10]===Ss||e[16]&&PE(e[7]))),c?f?(f.p(e,r),66944&r[0]&&xa(f,1)):((f=$L(e)).c(),xa(f,1),f.m(t,n)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka()),68176383&r[0]&&(d=$a(e[14]||hs),wa(),l=Ma(l,r,h,1,e,d,u,t,Oa,EL,null,Hz),ka()),e[17]?g&&(g.d(1),g=null):g?g.p(e,r):((g=AL(e)).c(),g.m(i,null)),(!s||262144&r[0])&&Po(i,"style",e[18])},i:function(e){if(!s){xa(f);for(var t=0;t<d.length;t+=1)xa(l[t]);s=!0}},o:function(e){ja(f);for(var t=0;t<l.length;t+=1)ja(l[t]);s=!1},d:function(e){e&&(xo(t),xo(r),xo(i)),f&&f.d();for(var n=0;n<l.length;n+=1)l[n].d();g&&g.d()}}}function $L(e){var t,n,r,i;return n=new pz({props:{selected:e[16]&&PE(e[7]),onContextMenu:e[31]}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-insert-area jse-inside svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-inside"),Po(t,"style",r=RL(e[1].length+1)),Po(t,"title",xs),Bo(t,"jse-hovered",e[10]===Ss),Bo(t,"jse-selected",e[16]&&PE(e[7]))},m:function(e,r){ko(e,t,r),Ra(n,t,null),i=!0},p:function(e,o){var a={};65664&o[0]&&(a.selected=e[16]&&PE(e[7])),n.$set(a),(!i||2&o[0]&&r!==(r=RL(e[1].length+1)))&&Po(t,"style",r),(!i||1024&o[0])&&Bo(t,"jse-hovered",e[10]===Ss),(!i||65664&o[0])&&Bo(t,"jse-selected",e[16]&&PE(e[7]))},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n)}}}function _L(e){var t,n,r,i=e[50].index+"";return{c:function(){t=So("div"),n=So("div"),r=$o(i),Po(n,"class","jse-index svelte-1wlxti1"),Po(t,"slot","identifier"),Po(t,"class","jse-identifier svelte-1wlxti1")},m:function(e,i){ko(e,t,i),mo(t,n),mo(n,r)},p:function(e,t){18687&t[0]&&i!==(i=e[50].index+"")&&Io(r,i)},d:function(e){e&&xo(t)}}}function OL(e,t){var n,r,i;return r=new IL({props:{value:t[50].value,path:t[50].path,expandedMap:t[50].expandedMap,enforceStringMap:t[50].enforceStringMap,visibleSectionsMap:t[50].visibleSectionsMap,validationErrorsMap:t[50].validationErrorsMap,searchResultItemsMap:t[50].searchResultItemsMap,selection:t[50].selection,context:t[8],onDragSelectionStart:t[26],$$slots:{identifier:[_L]},$$scope:{ctx:t}}}),{key:e,first:null,c:function(){n=Oo(),Ta(r.$$.fragment),this.first=n},m:function(e,t){ko(e,n,t),Ra(r,e,t),i=!0},p:function(e,n){t=e;var i={};18687&n[0]&&(i.value=t[50].value),18687&n[0]&&(i.path=t[50].path),18687&n[0]&&(i.expandedMap=t[50].expandedMap),18687&n[0]&&(i.enforceStringMap=t[50].enforceStringMap),18687&n[0]&&(i.visibleSectionsMap=t[50].visibleSectionsMap),18687&n[0]&&(i.validationErrorsMap=t[50].validationErrorsMap),18687&n[0]&&(i.searchResultItemsMap=t[50].searchResultItemsMap),18687&n[0]&&(i.selection=t[50].selection),256&n[0]&&(i.context=t[8]),18687&n[0]|16&n[1]&&(i.$$scope={dirty:n,ctx:t}),r.$set(i)},i:function(e){i||(xa(r.$$.fragment,e),i=!0)},o:function(e){ja(r.$$.fragment,e),i=!1},d:function(e){e&&xo(n),Na(r,e)}}}function ML(e){var t,n;return t=new fz({props:{visibleSections:e[14]||hs,sectionIndex:e[49],total:e[0].length,path:e[1],onExpandSection:e[8].onExpandSection,selection:e[7],context:e[8]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};16384&n[0]&&(r.visibleSections=e[14]||hs),16384&n[0]&&(r.sectionIndex=e[49]),1&n[0]&&(r.total=e[0].length),2&n[0]&&(r.path=e[1]),256&n[0]&&(r.onExpandSection=e[8].onExpandSection),128&n[0]&&(r.selection=e[7]),256&n[0]&&(r.context=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function EL(e,t){for(var n,r,i,o,a=[],s=new Map,c=$a(t[20](t[1],t[0],t[47],t[2],t[3],t[4],t[5],t[6],t[7],t[11])),l=function(e){return e[50].index},u=0;u<c.length;u+=1){var f=Uz(t,c,u),d=l(f);s.set(d,a[u]=OL(d,f))}var h=t[47].end<t[0].length&&ML(t);return{key:e,first:null,c:function(){n=Oo();for(var e=0;e<a.length;e+=1)a[e].c();r=_o(),h&&h.c(),i=Oo(),this.first=n},m:function(e,t){ko(e,n,t);for(var s=0;s<a.length;s+=1)a[s]&&a[s].m(e,t);ko(e,r,t),h&&h.m(e,t),ko(e,i,t),o=!0},p:function(e,n){t=e,68176383&n[0]&&(c=$a(t[20](t[1],t[0],t[47],t[2],t[3],t[4],t[5],t[6],t[7],t[11])),wa(),a=Ma(a,n,l,1,t,c,s,r.parentNode,Oa,OL,r,Uz),ka()),t[47].end<t[0].length?h?(h.p(t,n),16385&n[0]&&xa(h,1)):((h=ML(t)).c(),xa(h,1),h.m(i.parentNode,i)):h&&(wa(),ja(h,1,1,(function(){h=null})),ka())},i:function(e){if(!o){for(var t=0;t<c.length;t+=1)xa(a[t]);xa(h),o=!0}},o:function(e){for(var t=0;t<a.length;t+=1)ja(a[t]);ja(h),o=!1},d:function(e){e&&(xo(n),xo(r),xo(i));for(var t=0;t<a.length;t+=1)a[t].d(e);h&&h.d(e)}}}function AL(e){var t,n,r;return{c:function(){Po(t=So("div"),"role","none"),Po(t,"class","jse-insert-selection-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after")},m:function(i,o){ko(i,t,o),n||(r=Mo(t,"click",e[30]),n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,r()}}}function PL(e){var t,n,r;return n=new pz({props:{selected:e[16]&&AE(e[7]),onContextMenu:e[32]}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-insert-area jse-after svelte-1wlxti1"),Po(t,"data-type","insert-selection-area-after"),Po(t,"style",e[18]),Po(t,"title",xs),Bo(t,"jse-hovered",e[10]===Cs),Bo(t,"jse-selected",e[16]&&AE(e[7]))},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,i){var o={};65664&i[0]&&(o.selected=e[16]&&AE(e[7])),n.$set(o),(!r||262144&i[0])&&Po(t,"style",e[18]),(!r||1024&i[0])&&Bo(t,"jse-hovered",e[10]===Cs),(!r||65664&i[0])&&Bo(t,"jse-selected",e[16]&&AE(e[7]))},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function TL(e){var t,n,r,i,o,a,s,c,l,u,f,d=!e[8].readOnly&&(e[10]===Cs||e[16]&&AE(e[7])),h=[Yz,Qz,Gz],v=[];function p(e,t){return 1&t[0]&&(n=null),1&t[0]&&(r=null),null==n&&(n=!!Array.isArray(e[0])),n?0:(null==r&&(r=!!ru(e[0])),r?1:2)}i=p(e,[-1,-1]),o=v[i]=h[i](e);var m=d&&PL(e);return{c:function(){t=So("div"),o.c(),a=_o(),m&&m.c(),Po(t,"role","treeitem"),Po(t,"tabindex","-1"),Po(t,"class",s=so(hA("jse-json-node",{"jse-expanded":e[12]},e[8].onClassName(e[1],e[0])))+" svelte-1wlxti1"),Po(t,"data-path",c=WO(e[1])),Po(t,"aria-selected",e[16]),Bo(t,"jse-root",e[17]),Bo(t,"jse-selected",e[16]&&NE(e[7])),Bo(t,"jse-selected-key",e[16]&&TE(e[7])),Bo(t,"jse-selected-value",e[16]&&RE(e[7])),Bo(t,"jse-readonly",e[8].readOnly),Bo(t,"jse-hovered",e[10]===$s)},m:function(n,r){ko(n,t,r),v[i].m(t,null),mo(t,a),m&&m.m(t,null),l=!0,u||(f=[Mo(t,"mousedown",e[24]),Mo(t,"mousemove",e[25]),Mo(t,"mouseover",e[27]),Mo(t,"mouseout",e[28]),Mo(t,"focus",void 0),Mo(t,"blur",void 0)],u=!0)},p:function(e,n){var r=i;(i=p(e,n))===r?v[i].p(e,n):(wa(),ja(v[r],1,1,(function(){v[r]=null})),ka(),(o=v[i])?o.p(e,n):(o=v[i]=h[i](e)).c(),xa(o,1),o.m(t,a)),66944&n[0]&&(d=!e[8].readOnly&&(e[10]===Cs||e[16]&&AE(e[7]))),d?m?(m.p(e,n),66944&n[0]&&xa(m,1)):((m=PL(e)).c(),xa(m,1),m.m(t,null)):m&&(wa(),ja(m,1,1,(function(){m=null})),ka()),(!l||4355&n[0]&&s!==(s=so(hA("jse-json-node",{"jse-expanded":e[12]},e[8].onClassName(e[1],e[0])))+" svelte-1wlxti1"))&&Po(t,"class",s),(!l||2&n[0]&&c!==(c=WO(e[1])))&&Po(t,"data-path",c),(!l||65536&n[0])&&Po(t,"aria-selected",e[16]),(!l||135427&n[0])&&Bo(t,"jse-root",e[17]),(!l||70019&n[0])&&Bo(t,"jse-selected",e[16]&&NE(e[7])),(!l||70019&n[0])&&Bo(t,"jse-selected-key",e[16]&&TE(e[7])),(!l||70019&n[0])&&Bo(t,"jse-selected-value",e[16]&&RE(e[7])),(!l||4355&n[0])&&Bo(t,"jse-readonly",e[8].readOnly),(!l||5379&n[0])&&Bo(t,"jse-hovered",e[10]===$s)},i:function(e){l||(xa(o),xa(m),l=!0)},o:function(e){ja(o),ja(m),l=!1},d:function(e){e&&xo(t),v[i].d(),m&&m.d(),u=!1,Qi(f)}}}function RL(e){return"margin-left: calc(".concat(e," * var(--jse-indent-size))")}function NL(e,t,n){var r,i,o,a,s,c,l,u,f=t.$$slots,d=void 0===f?{}:f,h=t.$$scope,v=t.value,p=t.path,m=t.expandedMap,g=t.enforceStringMap,y=t.visibleSectionsMap,b=t.validationErrorsMap,w=t.searchResultItemsMap,k=t.selection,x=t.context,j=t.onDragSelectionStart,S=za("jsoneditor:JSONNode"),C=void 0,$=void 0,_=void 0,O=pv((function(e){return e}),lM);function M(e){x.onDrag(e)}function E(e){Pz.selecting&&(Pz.selecting=!1,e.stopPropagation()),x.onDragEnd(),document.removeEventListener("mousemove",M,!0),document.removeEventListener("mouseup",E)}function A(){var e;return(null===(e=x.findElement([]))||void 0===e||null===(e=e.getBoundingClientRect())||void 0===e?void 0:e.top)||0}function P(e,t){var n=A()-e.initialContentTop;return t.clientY-e.initialClientY-n}function T(e){if(_){var t=x.getJson(),r=x.getDocumentState(),i=P(_,e),o=Tz({json:t,documentState:r,deltaY:i,items:_.items}).offset;o!==_.offset&&(S("drag selection",o,i),n(11,_=Ri(Ri({},_),{},{offset:o,didMoveItems:!0})))}}function R(e){if(_){var t=x.getJson(),r=Tz({json:t,documentState:x.getDocumentState(),deltaY:P(_,e),items:_.items}),i=r.operations,o=r.updatedSelection;if(i)x.onPatch(i,(function(e,t){return{state:Ri(Ri({},t),{},{selection:o||k})}}));else if(e.target===_.initialTarget&&!_.didMoveItems){var a=VO(e.target),s=HO(e.target);s&&x.onSelect(sA(0,a,s))}n(11,_=void 0),Pz.dragging=!1,document.removeEventListener("mousemove",T,!0),document.removeEventListener("mouseup",R)}}return e.$$set=function(e){"value"in e&&n(0,v=e.value),"path"in e&&n(1,p=e.path),"expandedMap"in e&&n(2,m=e.expandedMap),"enforceStringMap"in e&&n(3,g=e.enforceStringMap),"visibleSectionsMap"in e&&n(4,y=e.visibleSectionsMap),"validationErrorsMap"in e&&n(5,b=e.validationErrorsMap),"searchResultItemsMap"in e&&n(6,w=e.searchResultItemsMap),"selection"in e&&n(7,k=e.selection),"context"in e&&n(8,x=e.context),"onDragSelectionStart"in e&&n(33,j=e.onDragSelectionStart),"$$scope"in e&&n(35,h=e.$$scope)},e.$$.update=function(){2&e.$$.dirty[0]&&n(9,o=oc(p)),516&e.$$.dirty[0]&&n(12,a=!!m&&!0===m[o]),777&e.$$.dirty[0]&&n(13,s=jE(v,g,o,x.parser)),528&e.$$.dirty[0]&&n(14,c=y?y[o]:void 0),544&e.$$.dirty[0]&&n(15,l=b?b[o]:void 0),386&e.$$.dirty[0]&&n(16,u=lA(x.getJson(),k,p)),2&e.$$.dirty[0]&&n(17,r=0===p.length),2&e.$$.dirty[0]&&n(18,i=RL(p.length))},[v,p,m,g,y,b,w,k,x,o,C,_,a,s,c,l,u,r,i,function(e,t,n,r,i,a,s,c,l){var u=Object.keys(t).map((function(l){var u=O(e.concat(l)),f=sc(o,l);return{key:l,value:t[l],path:u,expandedMap:Rz(n,f),enforceStringMap:Rz(r,f),visibleSectionsMap:Rz(i,f),validationErrorsMap:Rz(a,f),keySearchResultItemsMap:FA(s,f),valueSearchResultItemsMap:Rz(s,f),selection:cA(x.getJson(),c,u)}}));return l&&0!==l.offset&&(u=eO(u,l.selectionStartIndex,l.selectionItemsCount,l.offset)),u},function(e,t,n,r,i,a,s,c,l,u){for(var f=n.start,d=Math.min(n.end,t.length),h=[],v=f;v<d;v++){var p=O(e.concat(String(v))),m=sc(o,v);h.push({index:v,value:t[v],path:p,expandedMap:Rz(r,m),enforceStringMap:Rz(i,m),visibleSectionsMap:Rz(a,m),validationErrorsMap:Rz(s,m),searchResultItemsMap:Rz(c,m),selection:cA(x.getJson(),l,p)})}if(u&&0!==u.offset){var g=h.map((function(e){return e.index}));h=eO(h,u.selectionStartIndex,u.selectionItemsCount,u.offset);for(var y=0;y<h.length;y++)h[y].index=g[y]}return h},function(e){e.stopPropagation();var t=e.ctrlKey;x.onExpand(p,!a,t)},function(e){e.stopPropagation(),x.onExpand(p,!0)},function(e,t){var n=SA(p,Object.keys(v),e,t);return x.onPatch(n),Mb(ic(n[0].path))},function(e){if(!(function(e){return"DIV"===e.nodeName&&"true"===e.contentEditable}(e.target)||1===e.which&&RO(e.target,"BUTTON"))){e.stopPropagation(),e.preventDefault(),x.focus(),document.addEventListener("mousemove",M,!0),document.addEventListener("mouseup",E);var t=VO(e.target),n=x.getJson(),i=x.getDocumentState();if(!k||t===Xa.after||t===Xa.inside||k.type!==t&&k.type!==Xa.multi||!lA(n,k,p))if(Pz.selecting=!0,Pz.selectionAnchor=p,Pz.selectionAnchorType=t,Pz.selectionFocus=p,e.shiftKey){var o=x.getDocumentState().selection;o&&x.onSelect(tA(dA(o),p))}else if(t===Xa.multi)if(r&&e.target.hasAttribute("data-path")){var a=Mb($E(v,i));x.onSelect(aA(a))}else x.onSelect(tA(p,p));else x.onSelect(sA(0,t,p));else 0===e.button&&j(e)}},function(e){if(Pz.selecting){e.preventDefault(),e.stopPropagation(),null==Pz.selectionFocus&&window.getSelection&&window.getSelection().empty();var t=VO(e.target);Vk(p,Pz.selectionFocus)&&t===Pz.selectionAnchorType||(Pz.selectionFocus=p,Pz.selectionAnchorType=t,x.onSelect(tA(Pz.selectionAnchor||Pz.selectionFocus,Pz.selectionFocus)))}},function(e){if(!x.readOnly&&k){var t=fk(fA(k));if(Vk(p,t)){var r=function(e,t){var n=[];function r(e){var t=p.concat(e),r=x.findElement(t);null!=r&&n.push({path:t,height:r.clientHeight})}if(Array.isArray(v)){var i=BE(x.getJson(),e),o=qE(x.getJson(),e),a=Mb(i),s=Mb(o),c=t.find((function(e){return a>=e.start&&s<=e.end}));if(!c)return null;var l=c.start,u=c.end;Q_(l,Math.min(v.length,u),(function(e){return r(String(e))}))}else Object.keys(v).forEach(r);return n}(k,c||hs);if(S("dragSelectionStart",{selection:k,items:r}),r){var i=x.getJson(),o=BE(i,k),a=r.findIndex((function(e){return Vk(e.path,o)})),s=Tz({json:i,documentState:x.getDocumentState(),deltaY:0,items:r}).offset;n(11,_={initialTarget:e.target,initialClientY:e.clientY,initialContentTop:A(),selectionStartIndex:a,selectionItemsCount:zE(i,k).length,items:r,offset:s,didMoveItems:!1}),Pz.dragging=!0,document.addEventListener("mousemove",T,!0),document.addEventListener("mouseup",R)}else S("Cannot drag the current selection (probably spread over multiple sections)")}else j(e)}},function(e){Pz.selecting||Pz.dragging||(e.stopPropagation(),NO(e.target,"data-type","selectable-value")?n(10,C=$s):NO(e.target,"data-type","insert-selection-area-inside")?n(10,C=Ss):NO(e.target,"data-type","insert-selection-area-after")&&n(10,C=Cs),clearTimeout($))},function(e){e.stopPropagation(),$=setTimeout((function(){return n(10,C=void 0)}))},function(e){e.shiftKey||(e.stopPropagation(),e.preventDefault(),x.onSelect(ZE(p)))},function(e){e.shiftKey||(e.stopPropagation(),e.preventDefault(),x.onSelect(eA(p)))},function(e){x.onSelect(ZE(p)),x.onContextMenu(e)},function(e){x.onSelect(eA(p)),x.onContextMenu(e)},j,d,h]}var IL=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,NL,TL,Zi,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},Lz,[-1,-1]),r}return Di(n)}(),DL=IL,zL={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},LL={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},BL={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},qL={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};function FL(e){var t,n;return t=new UI({props:{items:e[0]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&xi(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function VL(e,t,n){var r,i,o,a,s,c,l,u=t.json,f=t.selection,d=t.readOnly,h=t.showSearch,v=void 0!==h&&h,p=t.historyState,m=t.onExpandAll,g=t.onCollapseAll,y=t.onUndo,b=t.onRedo,w=t.onSort,k=t.onTransform,x=t.onContextMenu,j=t.onCopy,S=t.onRenderMenu;function C(){n(1,v=!v)}return e.$$set=function(e){"json"in e&&n(2,u=e.json),"selection"in e&&n(3,f=e.selection),"readOnly"in e&&n(4,d=e.readOnly),"showSearch"in e&&n(1,v=e.showSearch),"historyState"in e&&n(5,p=e.historyState),"onExpandAll"in e&&n(6,m=e.onExpandAll),"onCollapseAll"in e&&n(7,g=e.onCollapseAll),"onUndo"in e&&n(8,y=e.onUndo),"onRedo"in e&&n(9,b=e.onRedo),"onSort"in e&&n(10,w=e.onSort),"onTransform"in e&&n(11,k=e.onTransform),"onContextMenu"in e&&n(12,x=e.onContextMenu),"onCopy"in e&&n(13,j=e.onCopy),"onRenderMenu"in e&&n(14,S=e.onRenderMenu)},e.$$.update=function(){4&e.$$.dirty&&n(20,r=void 0!==u),1048584&e.$$.dirty&&n(19,i=r&&(NE(f)||TE(f)||RE(f))),68&e.$$.dirty&&n(15,a={type:"button",icon:zL,title:"Expand all",className:"jse-expand-all",onClick:m,disabled:!iu(u)}),132&e.$$.dirty&&n(16,s={type:"button",icon:LL,title:"Collapse all",className:"jse-collapse-all",onClick:g,disabled:!iu(u)}),4&e.$$.dirty&&n(17,c={type:"button",icon:qP,title:"Search (Ctrl+F)",className:"jse-search",onClick:C,disabled:void 0===u}),769844&e.$$.dirty&&n(18,l=d?[a,s,{type:"separator"},{type:"button",icon:VP,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:j,disabled:!i},{type:"separator"},c,{type:"space"}]:[a,s,{type:"separator"},{type:"button",icon:zP,title:"Sort",className:"jse-sort",onClick:w,disabled:d||void 0===u},{type:"button",icon:$P,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:k,disabled:d||void 0===u},c,{type:"button",icon:IP,title:js,className:"jse-contextmenu",onClick:x},{type:"separator"},{type:"button",icon:PP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!p.canUndo},{type:"button",icon:AP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!p.canRedo},{type:"space"}]),278528&e.$$.dirty&&n(0,o=S(l)||l)},[o,v,u,f,d,p,m,g,y,b,w,k,x,j,S,a,s,c,l,i,r]}var WL=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,VL,FL,Zi,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),r}return Di(n)}();function HL(e){go(e,"svelte-k5ozhr",".jse-welcome.svelte-k5ozhr.svelte-k5ozhr{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-k5ozhr.svelte-k5ozhr:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-k5ozhr .jse-space.jse-before.svelte-k5ozhr{flex:1}.jse-welcome.svelte-k5ozhr .jse-space.jse-after.svelte-k5ozhr{flex:2}.jse-welcome.svelte-k5ozhr .jse-contents.svelte-k5ozhr{display:flex;flex-direction:column;max-width:300px;margin:2em var(--jse-padding);gap:var(--jse-padding)}.jse-welcome.svelte-k5ozhr .jse-contents .jse-welcome-info.svelte-k5ozhr{color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-k5ozhr .jse-contents button.svelte-k5ozhr{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-welcome.svelte-k5ozhr .jse-contents button.svelte-k5ozhr:hover{background:var(--jse-button-primary-background-highlight)}.jse-welcome.svelte-k5ozhr .jse-contents button.svelte-k5ozhr:disabled{background:var(--jse-button-primary-background-disabled)}")}function UL(e){var t,n,r,i,o,a,s;return{c:function(){(t=So("div")).innerHTML="You can paste clipboard data using <b>Ctrl+V</b>, or use the following options:",n=_o(),(r=So("button")).textContent="Create object",i=_o(),(o=So("button")).textContent="Create array",Po(t,"class","jse-welcome-info svelte-k5ozhr"),Po(r,"title","Create an empty JSON object (press '{')"),Po(r,"class","svelte-k5ozhr"),Po(o,"title","Create an empty JSON array (press '[')"),Po(o,"class","svelte-k5ozhr")},m:function(c,l){ko(c,t,l),ko(c,n,l),ko(c,r,l),ko(c,i,l),ko(c,o,l),a||(s=[Mo(r,"click",Ao(e[4])),Mo(o,"click",Ao(e[5]))],a=!0)},p:Hi,d:function(e){e&&(xo(t),xo(n),xo(r),xo(i),xo(o)),a=!1,Qi(s)}}}function JL(e){var t,n,r,i,o,a,s,c,l,u,f=!e[0]&&UL(e);return{c:function(){t=So("div"),n=So("div"),r=_o(),i=So("div"),(o=So("div")).textContent="Empty document",a=_o(),f&&f.c(),s=_o(),c=So("div"),Po(n,"class","jse-space jse-before svelte-k5ozhr"),Po(o,"class","jse-welcome-title"),Po(i,"class","jse-contents svelte-k5ozhr"),Po(c,"class","jse-space jse-after svelte-k5ozhr"),Po(t,"class","jse-welcome svelte-k5ozhr"),Po(t,"role","none")},m:function(d,h){ko(d,t,h),mo(t,n),mo(t,r),mo(t,i),mo(i,o),mo(i,a),f&&f.m(i,null),mo(t,s),mo(t,c),l||(u=Mo(t,"click",e[6]),l=!0)},p:function(e,t){var n=xi(t,1)[0];e[0]?f&&(f.d(1),f=null):f?f.p(e,n):((f=UL(e)).c(),f.m(i,null))},i:Hi,o:Hi,d:function(e){e&&xo(t),f&&f.d(),l=!1,u()}}}function KL(e,t,n){var r=t.readOnly,i=t.onCreateArray,o=t.onCreateObject,a=t.onClick;return e.$$set=function(e){"readOnly"in e&&n(0,r=e.readOnly),"onCreateArray"in e&&n(1,i=e.onCreateArray),"onCreateObject"in e&&n(2,o=e.onCreateObject),"onClick"in e&&n(3,a=e.onClick)},[r,i,o,a,function(){return o()},function(){return i()},function(){return a()}]}var GL=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,KL,JL,Zi,{readOnly:0,onCreateArray:1,onCreateObject:2,onClick:3},HL),r}return Di(n)}(),QL={exports:{}},YL=function(e,t){var n,r,i=1,o=0,a=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;(r=c(e,n))<76&&r>65;)++n;return+e.slice(t-1,n)}return(r=s&&s.indexOf(e.charAt(t)))>-1?r+76:(r=e.charCodeAt(t)||0)<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63}if((e+="")!=(t+=""))for(;i;)if(r=c(e,o++),i=c(t,a++),r<76&&i<76&&r>66&&i>66&&(r=c(e,o,o),i=c(t,a,o=n),a=n),r!=i)return r<i?-1:1;return 0};try{QL.exports=YL}catch(e){String.naturalCompare=YL}var XL=$c(QL.exports);function ZL(e,t){var n="string"==typeof e?e.toLowerCase():e,r="string"==typeof t?t.toLowerCase():t;return XL(n,r)}function eB(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(Ns(Ys(e,t))){if(void 0===n)throw new Error("Cannot sort: no property selected by which to sort the array");return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=function(e,t){return function(n,r){var i=Ys(n,e),o=Ys(r,e);return void 0===i?t:void 0===o?-t:"string"!=typeof i&&"string"!=typeof o?i>o?t:i<o?-t:0:t*ZL(i,o)}}(n,r),o=Ys(e,t);return[{op:"replace",path:oc(t),value:o.slice(0).sort(i)}]}(e,t,n,r)}if(ru(e))return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Ys(e,t),i=Object.keys(r),o=i.slice();o.sort((function(e,t){return n*ZL(e,t)}));for(var a=[],s=0;s<o.length;s++){var c=o[s],l=oc(t.concat(c));a.push({op:"move",from:l,path:l})}return a}(e,t,r);throw new Error("Cannot sort: no array or object")}function tB(e){go(e,"svelte-6hb2gf",".jse-navigation-bar-dropdown.svelte-6hb2gf.svelte-6hb2gf{position:absolute;top:100%;left:0;z-index:3;background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color);box-shadow:var(--jse-controls-box-shadow);display:flex;flex-direction:column;max-height:300px;overflow:auto;min-width:80px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);border:none;background:transparent;color:inherit;cursor:pointer;outline:none;text-align:left;white-space:nowrap;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding)) 36px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:focus,.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:hover{background:var(--jse-navigation-bar-background-highlight)}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.jse-selected.svelte-6hb2gf{background:var(--jse-navigation-bar-dropdown-color);color:var(--jse-navigation-bar-background)}")}function nB(e,t,n){var r=e.slice();return r[4]=t[n],r}function rB(e,t){var n,r,i,o,a,s=gM(t[4].toString(),sB)+"";function c(){return t[3](t[4])}return{key:e,first:null,c:function(){n=So("button"),r=$o(s),Po(n,"type","button"),Po(n,"class","jse-navigation-bar-dropdown-item svelte-6hb2gf"),Po(n,"title",i=t[4].toString()),Bo(n,"jse-selected",t[4]===t[1]),this.first=n},m:function(e,t){ko(e,n,t),mo(n,r),o||(a=Mo(n,"click",Ao(c)),o=!0)},p:function(e,o){t=e,1&o&&s!==(s=gM(t[4].toString(),sB)+"")&&Io(r,s),1&o&&i!==(i=t[4].toString())&&Po(n,"title",i),3&o&&Bo(n,"jse-selected",t[4]===t[1])},d:function(e){e&&xo(n),o=!1,a()}}}function iB(e){var t,n;return{c:function(){t=So("button"),n=$o("..."),Po(t,"type","button"),Po(t,"class","jse-navigation-bar-dropdown-item svelte-6hb2gf"),Po(t,"title","Limited to "+aB+" items")},m:function(e,r){ko(e,t,r),mo(t,n)},p:Hi,d:function(e){e&&xo(t)}}}function oB(e){for(var t,n,r=[],i=new Map,o=$a(Y_(e[0],aB)),a=function(e){return e[4]},s=0;s<o.length;s+=1){var c=nB(e,o,s),l=a(c);i.set(l,r[s]=rB(l,c))}var u=e[0].length>aB&&iB();return{c:function(){t=So("div");for(var e=0;e<r.length;e+=1)r[e].c();n=_o(),u&&u.c(),Po(t,"class","jse-navigation-bar-dropdown svelte-6hb2gf")},m:function(e,i){ko(e,t,i);for(var o=0;o<r.length;o+=1)r[o]&&r[o].m(t,null);mo(t,n),u&&u.m(t,null)},p:function(e,s){var c=xi(s,1)[0];7&c&&(o=$a(Y_(e[0],aB)),r=Ma(r,c,a,1,e,o,i,t,_a,rB,n,nB)),e[0].length>aB?u?u.p(e,c):((u=iB()).c(),u.m(t,null)):u&&(u.d(1),u=null)},i:Hi,o:Hi,d:function(e){e&&xo(t);for(var n=0;n<r.length;n+=1)r[n].d();u&&u.d()}}}var aB=100,sB=30;function cB(e,t,n){var r=t.items,i=t.selectedItem,o=t.onSelect;return e.$$set=function(e){"items"in e&&n(0,r=e.items),"selectedItem"in e&&n(1,i=e.selectedItem),"onSelect"in e&&n(2,o=e.onSelect)},[r,i,o,function(e){return o(e)}]}var lB=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,cB,oB,Zi,{items:0,selectedItem:1,onSelect:2},tB),r}return Di(n)}();function uB(e){go(e,"svelte-1r1k9th",".jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th{position:relative;display:flex}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th{font-family:inherit;font-size:inherit;padding:calc(0.5 * var(--jse-padding)) 2px;border:none;background:transparent;color:inherit;cursor:pointer;outline:none;min-width:2em;white-space:nowrap}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:focus,.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:hover{background:var(--jse-panel-button-background-highlight);color:var(--jse-panel-button-color-highlight)}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.svelte-1r1k9th{padding:2px var(--jse-padding) 0}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.jse-open.svelte-1r1k9th{background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color)}.jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th:last-child{padding-right:var(--jse-padding)}")}function fB(e){var t,n,r,i;return{c:function(){t=So("button"),n=$o(e[2]),Po(t,"type","button"),Po(t,"class","jse-navigation-bar-button svelte-1r1k9th")},m:function(o,a){ko(o,t,a),mo(t,n),r||(i=Mo(t,"click",e[9]),r=!0)},p:function(e,t){4&t&&Io(n,e[2])},d:function(e){e&&xo(t),r=!1,i()}}}function dB(e){var t,n,r,i,o,a,s;r=new FM({props:{data:jP}});var c=void 0!==e[2]&&fB(e);return{c:function(){t=So("div"),n=So("button"),Ta(r.$$.fragment),i=_o(),c&&c.c(),Po(n,"type","button"),Po(n,"class","jse-navigation-bar-button jse-navigation-bar-arrow svelte-1r1k9th"),Bo(n,"jse-open",e[1]),Po(t,"class","jse-navigation-bar-item svelte-1r1k9th")},m:function(l,u){ko(l,t,u),mo(t,n),Ra(r,n,null),mo(t,i),c&&c.m(t,null),e[10](t),o=!0,a||(s=Mo(n,"click",e[4]),a=!0)},p:function(e,r){var i=xi(r,1)[0];(!o||2&i)&&Bo(n,"jse-open",e[1]),void 0!==e[2]?c?c.p(e,i):((c=fB(e)).c(),c.m(t,null)):c&&(c.d(1),c=null)},i:function(e){o||(xa(r.$$.fragment,e),o=!0)},o:function(e){ja(r.$$.fragment,e),o=!1},d:function(n){n&&xo(t),Na(r),c&&c.d(),e[10](null),a=!1,s()}}}function hB(e,t,n){var r,i,o,a,s=ea("absolute-popup"),c=s.openAbsolutePopup,l=s.closeAbsolutePopup,u=t.path,f=t.index,d=t.onSelect,h=t.getItems,v=!1;function p(e){l(a),d(r.concat(e))}return e.$$set=function(e){"path"in e&&n(5,u=e.path),"index"in e&&n(6,f=e.index),"onSelect"in e&&n(7,d=e.onSelect),"getItems"in e&&n(8,h=e.getItems)},e.$$.update=function(){96&e.$$.dirty&&(r=u.slice(0,f)),96&e.$$.dirty&&n(2,i=u[f])},[o,v,i,p,function(){if(o){n(1,v=!0);var e={items:h(r),selectedItem:i,onSelect:p};a=c(lB,e,{anchor:o,closeOnOuterClick:!0,onClose:function(){n(1,v=!1)}})}},u,f,d,h,function(){return p(i)},function(e){ra[e?"unshift":"push"]((function(){n(0,o=e)}))}]}var vB=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,hB,dB,Zi,{path:5,index:6,onSelect:7,getItems:8},uB),r}return Di(n)}();function pB(e){var t,n;if(navigator.clipboard)return navigator.clipboard.writeText(e);if(null!==(t=(n=document).queryCommandSupported)&&void 0!==t&&t.call(n,"copy")){var r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy")}catch(e){console.error(e)}finally{document.body.removeChild(r)}}else console.error("Copy failed.")}function mB(e){go(e,"svelte-g0evpe",".jse-navigation-bar-path-editor.svelte-g0evpe.svelte-g0evpe{flex:1;display:flex;border:var(--jse-edit-outline);background:var(--jse-background-color)}.jse-navigation-bar-path-editor.svelte-g0evpe input.jse-navigation-bar-text.svelte-g0evpe{flex:1;font-family:inherit;font-size:inherit;padding:0 5px 1px;background:var(--jse-background-color);color:var(--jse-text-color);border:none;outline:none}.jse-navigation-bar-path-editor.svelte-g0evpe button.svelte-g0evpe{border:none;background:var(--jse-background-color);cursor:pointer;font-family:inherit;font-size:80%;color:inherit}.jse-navigation-bar-path-editor.svelte-g0evpe button.jse-navigation-bar-copy.copied.svelte-g0evpe{color:var(--jse-message-success-background)}.jse-navigation-bar-path-editor.svelte-g0evpe button.jse-navigation-bar-validation-error.svelte-g0evpe{color:var(--jse-error-color)}.jse-navigation-bar-path-editor.error.svelte-g0evpe.svelte-g0evpe{border-color:var(--jse-error-color)}.jse-navigation-bar-path-editor.error.svelte-g0evpe input.jse-navigation-bar-text.svelte-g0evpe{color:var(--jse-error-color)}.jse-navigation-bar-path-editor.svelte-g0evpe .jse-copied-text.svelte-g0evpe{background:var(--jse-message-success-background);color:var(--jse-message-success-color);position:relative;margin:2px;padding:0 5px;border-radius:3px}")}function gB(e){var t,n,r,i,o,a;return n=new FM({props:{data:YP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-navigation-bar-validation-error svelte-g0evpe")},m:function(s,c){ko(s,t,c),Ra(n,t,null),i=!0,o||(a=co(r=cP.call(null,t,Ri({text:e[3]},e[4]))),o=!0)},p:function(e,t){r&&Yi(r.update)&&8&t&&r.update.call(null,Ri({text:e[3]},e[4]))},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,a()}}}function yB(e){var t;return{c:function(){(t=So("div")).textContent="Copied!",Po(t,"class","jse-copied-text svelte-g0evpe")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function bB(e){var t,n,r,i,o,a,s,c,l,u,f=e[3]&&gB(e),d=e[2]&&yB();return s=new FM({props:{data:VP}}),{c:function(){t=So("div"),n=So("input"),r=_o(),f&&f.c(),i=_o(),d&&d.c(),o=_o(),a=So("button"),Ta(s.$$.fragment),Po(n,"type","text"),Po(n,"class","jse-navigation-bar-text svelte-g0evpe"),n.value=e[0],Po(a,"type","button"),Po(a,"class","jse-navigation-bar-copy svelte-g0evpe"),Po(a,"title","Copy selected path to the clipboard"),Bo(a,"copied",e[2]),Po(t,"class","jse-navigation-bar-path-editor svelte-g0evpe"),Bo(t,"error",e[3])},m:function(h,v){ko(h,t,v),mo(t,n),e[15](n),mo(t,r),f&&f.m(t,null),mo(t,i),d&&d.m(t,null),mo(t,o),mo(t,a),Ra(s,a,null),c=!0,l||(u=[Mo(n,"keydown",Ao(e[6])),Mo(n,"input",e[5]),Mo(a,"click",e[7])],l=!0)},p:function(e,r){var s=xi(r,1)[0];(!c||1&s&&n.value!==e[0])&&(n.value=e[0]),e[3]?f?(f.p(e,s),8&s&&xa(f,1)):((f=gB(e)).c(),xa(f,1),f.m(t,i)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka()),e[2]?d||((d=yB()).c(),d.m(t,o)):d&&(d.d(1),d=null),(!c||4&s)&&Bo(a,"copied",e[2]),(!c||8&s)&&Bo(t,"error",e[3])},i:function(e){c||(xa(f),xa(s.$$.fragment,e),c=!0)},o:function(e){ja(f),ja(s.$$.fragment,e),c=!1},d:function(n){n&&xo(t),e[15](null),f&&f.d(),d&&d.d(),Na(s),l=!1,Qi(u)}}}function wB(e,t,n){var r,i,o,a=ea("absolute-popup"),s=t.path,c=t.pathParser,l=t.onChange,u=t.onClose,f=t.onError,d=t.pathExists,h=!1,v=void 0,p=!1;function m(){i.focus()}function g(e){try{var t=c.parse(e);return function(e){if(!d(e))throw new Error("Path does not exist in current document")}(t),{path:t,error:void 0}}catch(e){return{path:void 0,error:e}}}return Qo((function(){m()})),Yo((function(){clearTimeout(v)})),e.$$set=function(e){"path"in e&&n(8,s=e.path),"pathParser"in e&&n(9,c=e.pathParser),"onChange"in e&&n(10,l=e.onChange),"onClose"in e&&n(11,u=e.onClose),"onError"in e&&n(12,f=e.onError),"pathExists"in e&&n(13,d=e.pathExists)},e.$$.update=function(){768&e.$$.dirty&&n(0,o=c.stringify(s)),16385&e.$$.dirty&&n(3,r=h?g(o).error:void 0)},[o,i,p,r,a,function(e){n(0,o=e.currentTarget.value)},function(e){var t=KO(e);if("Escape"===t&&u(),"Enter"===t){n(14,h=!0);var r=g(o);void 0!==r.path?l(r.path):f(r.error)}},function(){pB(o),n(2,p=!0),v=setTimeout((function(){return n(2,p=!1)}),1e3),m()},s,c,l,u,f,d,h,function(e){ra[e?"unshift":"push"]((function(){n(1,i=e)}))}]}var kB=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,wB,bB,Xi,{path:8,pathParser:9,onChange:10,onClose:11,onError:12,pathExists:13},mB),r}return Di(n)}();function xB(e){go(e,"svelte-15r3ahw",".jse-navigation-bar.svelte-15r3ahw.svelte-15r3ahw{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-panel-background);color:var(--jse-panel-button-color);padding:0;margin:0;display:flex;overflow:auto;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);color:var(--jse-panel-color-readonly);background:transparent;border:none;display:flex;cursor:pointer;outline:none;align-items:center}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.flex.svelte-15r3ahw{flex:1}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw:focus,.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw:hover,.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.editing.svelte-15r3ahw{background:var(--jse-panel-button-background-highlight);color:var(--jse-panel-button-color-highlight);transition:color 0.2s ease-in, background 0.2s ease-in}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit .jse-navigation-bar-space.svelte-15r3ahw{flex:1;text-align:left}")}function jB(e,t,n){var r=e.slice();return r[18]=t[n],r[20]=n,r}function SB(e){var t,n;return t=new kB({props:{path:e[3],onClose:e[11],onChange:e[12],onError:e[1],pathExists:e[8],pathParser:e[2]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8&n&&(r.path=e[3]),2&n&&(r.onError=e[1]),4&n&&(r.pathParser=e[2]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function CB(e){for(var t,n,r,i=[],o=new Map,a=$a(e[3]),s=function(e){return e[20]},c=0;c<a.length;c+=1){var l=jB(e,a,c),u=s(l);o.set(u,i[c]=$B(u,l))}var f=e[6]&&_B(e);return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=_o(),f&&f.c(),n=Oo()},m:function(e,o){for(var a=0;a<i.length;a+=1)i[a]&&i[a].m(e,o);ko(e,t,o),f&&f.m(e,o),ko(e,n,o),r=!0},p:function(e,r){648&r&&(a=$a(e[3]),wa(),i=Ma(i,r,s,1,e,a,o,t.parentNode,Oa,$B,t,jB),ka()),e[6]?f?(f.p(e,r),64&r&&xa(f,1)):((f=_B(e)).c(),xa(f,1),f.m(n.parentNode,n)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka())},i:function(e){if(!r){for(var t=0;t<a.length;t+=1)xa(i[t]);xa(f),r=!0}},o:function(e){for(var t=0;t<i.length;t+=1)ja(i[t]);ja(f),r=!1},d:function(e){e&&(xo(t),xo(n));for(var r=0;r<i.length;r+=1)i[r].d(e);f&&f.d(e)}}}function $B(e,t){var n,r,i;return r=new vB({props:{getItems:t[7],path:t[3],index:t[20],onSelect:t[9]}}),{key:e,first:null,c:function(){n=Oo(),Ta(r.$$.fragment),this.first=n},m:function(e,t){ko(e,n,t),Ra(r,e,t),i=!0},p:function(e,n){t=e;var i={};8&n&&(i.path=t[3]),8&n&&(i.index=t[20]),r.$set(i)},i:function(e){i||(xa(r.$$.fragment,e),i=!0)},o:function(e){ja(r.$$.fragment,e),i=!1},d:function(e){e&&xo(n),Na(r,e)}}}function _B(e){var t,n;return t=new vB({props:{getItems:e[7],path:e[3],index:e[3].length,onSelect:e[9]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8&n&&(r.path=e[3]),8&n&&(r.index=e[3].length),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function OB(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v=iu(e[0])||e[5]?" ":"Navigation bar",p=[CB,SB],m=[];function g(e,t){return e[5]?1:0}return n=g(e),r=m[n]=p[n](e),l=new FM({props:{data:e[5]?UP:kP}}),{c:function(){t=So("div"),r.c(),i=_o(),o=So("button"),a=So("span"),s=$o(v),c=_o(),Ta(l.$$.fragment),Po(a,"class","jse-navigation-bar-space svelte-15r3ahw"),Po(o,"type","button"),Po(o,"class","jse-navigation-bar-edit svelte-15r3ahw"),Po(o,"title",u=e[5]?"Cancel editing the selected path":"Edit the selected path"),Bo(o,"flex",!e[5]),Bo(o,"editing",e[5]),Po(t,"class","jse-navigation-bar svelte-15r3ahw")},m:function(r,u){ko(r,t,u),m[n].m(t,null),mo(t,i),mo(t,o),mo(o,a),mo(a,s),mo(o,c),Ra(l,o,null),e[15](t),f=!0,d||(h=Mo(o,"click",e[10]),d=!0)},p:function(e,a){var c=xi(a,1)[0],d=n;(n=g(e))===d?m[n].p(e,c):(wa(),ja(m[d],1,1,(function(){m[d]=null})),ka(),(r=m[n])?r.p(e,c):(r=m[n]=p[n](e)).c(),xa(r,1),r.m(t,i)),(!f||33&c)&&v!==(v=iu(e[0])||e[5]?" ":"Navigation bar")&&Io(s,v);var h={};32&c&&(h.data=e[5]?UP:kP),l.$set(h),(!f||32&c&&u!==(u=e[5]?"Cancel editing the selected path":"Edit the selected path"))&&Po(o,"title",u),(!f||32&c)&&Bo(o,"flex",!e[5]),(!f||32&c)&&Bo(o,"editing",e[5])},i:function(e){f||(xa(r),xa(l.$$.fragment,e),f=!0)},o:function(e){ja(r),ja(l.$$.fragment,e),f=!1},d:function(r){r&&xo(t),m[n].d(),Na(l),e[15](null),d=!1,h()}}}function MB(e,t,n){var r,i,o,a=za("jsoneditor:NavigationBar"),s=t.json,c=t.selection,l=t.onSelect,u=t.onError,f=t.pathParser,d=!1;function h(e){a("select path",JSON.stringify(e)),l(tA(e,e))}function v(){n(5,d=!1)}return e.$$set=function(e){"json"in e&&n(0,s=e.json),"selection"in e&&n(13,c=e.selection),"onSelect"in e&&n(14,l=e.onSelect),"onError"in e&&n(1,u=e.onError),"pathParser"in e&&n(2,f=e.pathParser)},e.$$.update=function(){8192&e.$$.dirty&&n(3,r=c?fA(c):[]),9&e.$$.dirty&&n(6,i=iu(Ys(s,r))),8&e.$$.dirty&&setTimeout((function(){if(o&&o.scrollTo){var e=o.scrollWidth-o.clientWidth;e>0&&(a("scrollTo ",e),o.scrollTo({left:e,behavior:"smooth"}))}}))},[s,u,f,r,o,d,i,function(e){a("get items for path",e);var t=Ys(s,e);if(Array.isArray(t))return OS(0,t.length).map(String);if(ru(t)){var n=Object.keys(t).slice(0);return n.sort(ZL),n}return[]},function(e){return rc(s,e)},h,function(){n(5,d=!d)},v,function(e){v(),h(e)},c,l,function(e){ra[e?"unshift":"push"]((function(){n(4,o=e)}))}]}var EB=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,MB,OB,Zi,{json:0,selection:13,onSelect:14,onError:1,pathParser:2},xB),r}return Di(n)}();function AB(e){go(e,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function PB(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M=(-1!==e[3]?"".concat(e[3]+1,"/"):"")+"",E=!e[4]&&TB(e),A=[NB,RB],P=[];function T(e,t){return e[2]?0:1}s=T(e),c=P[s]=A[s](e),y=new FM({props:{data:FP}}),k=new FM({props:{data:xP}}),S=new FM({props:{data:JP}});var R=e[0]&&!e[4]&&IB(e);return{c:function(){t=So("div"),n=So("form"),E&&E.c(),r=_o(),i=So("div"),o=So("div"),a=So("div"),c.c(),l=_o(),u=So("label"),f=So("input"),d=_o(),h=So("div"),v=$o(M),p=$o(e[10]),m=_o(),g=So("button"),Ta(y.$$.fragment),b=_o(),w=So("button"),Ta(k.$$.fragment),x=_o(),j=So("button"),Ta(S.$$.fragment),C=_o(),R&&R.c(),Po(a,"class","jse-search-icon svelte-3lbrbf"),Po(f,"class","jse-search-input svelte-3lbrbf"),Po(f,"title","Enter text to search"),Po(f,"type","text"),Po(f,"placeholder","Find"),Po(u,"class","jse-search-input-label svelte-3lbrbf"),Po(u,"about","jse-search input"),Po(h,"class","jse-search-count svelte-3lbrbf"),Bo(h,"jse-visible",""!==e[8]),Po(g,"type","button"),Po(g,"class","jse-search-next svelte-3lbrbf"),Po(g,"title","Go to next search result (Enter)"),Po(w,"type","button"),Po(w,"class","jse-search-previous svelte-3lbrbf"),Po(w,"title","Go to previous search result (Shift+Enter)"),Po(j,"type","button"),Po(j,"class","jse-search-clear svelte-3lbrbf"),Po(j,"title","Close search box (Esc)"),Po(o,"class","jse-search-section svelte-3lbrbf"),Po(i,"class","jse-search-contents svelte-3lbrbf"),Po(n,"class","jse-search-form svelte-3lbrbf"),Po(t,"class","jse-search-box svelte-3lbrbf")},m:function(c,M){ko(c,t,M),mo(t,n),E&&E.m(n,null),mo(n,r),mo(n,i),mo(i,o),mo(o,a),P[s].m(a,null),mo(o,l),mo(o,u),mo(u,f),Do(f,e[8]),mo(o,d),mo(o,h),mo(h,v),mo(h,p),mo(o,m),mo(o,g),Ra(y,g,null),mo(o,b),mo(o,w),Ra(k,w,null),mo(o,x),mo(o,j),Ra(S,j,null),mo(i,C),R&&R.m(i,null),$=!0,_||(O=[Mo(f,"input",e[21]),co(zB.call(null,f)),Mo(g,"click",e[22]),Mo(w,"click",e[23]),Mo(j,"click",e[24]),Mo(n,"submit",e[12]),Mo(n,"keydown",e[13])],_=!0)},p:function(e,t){e[4]?E&&(wa(),ja(E,1,1,(function(){E=null})),ka()):E?(E.p(e,t),16&t&&xa(E,1)):((E=TB(e)).c(),xa(E,1),E.m(n,r));var o=s;(s=T(e))!==o&&(wa(),ja(P[o],1,1,(function(){P[o]=null})),ka(),(c=P[s])||(c=P[s]=A[s](e)).c(),xa(c,1),c.m(a,null)),256&t&&f.value!==e[8]&&Do(f,e[8]),(!$||8&t)&&M!==(M=(-1!==e[3]?"".concat(e[3]+1,"/"):"")+"")&&Io(v,M),(!$||1024&t)&&Io(p,e[10]),(!$||256&t)&&Bo(h,"jse-visible",""!==e[8]),e[0]&&!e[4]?R?R.p(e,t):((R=IB(e)).c(),R.m(i,null)):R&&(R.d(1),R=null)},i:function(e){$||(xa(E),xa(c),xa(y.$$.fragment,e),xa(k.$$.fragment,e),xa(S.$$.fragment,e),$=!0)},o:function(e){ja(E),ja(c),ja(y.$$.fragment,e),ja(k.$$.fragment,e),ja(S.$$.fragment,e),$=!1},d:function(e){e&&xo(t),E&&E.d(),P[s].d(),Na(y),Na(k),Na(S),R&&R.d(),_=!1,Qi(O)}}}function TB(e){var t,n,r,i,o;return n=new FM({props:{data:e[0]?NP:pP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-replace-toggle svelte-3lbrbf"),Po(t,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(a,s){ko(a,t,s),Ra(n,t,null),r=!0,i||(o=Mo(t,"click",e[11]),i=!0)},p:function(e,t){var r={};1&t&&(r.data=e[0]?NP:pP),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n),i=!1,o()}}}function RB(e){var t,n;return t=new FM({props:{data:qP}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function NB(e){var t,n;return t=new FM({props:{data:gP,spin:!0}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function IB(e){var t,n,r,i,o,a,s,c;return{c:function(){t=So("div"),n=So("input"),r=_o(),(i=So("button")).textContent="Replace",o=_o(),(a=So("button")).textContent="All",Po(n,"class","jse-replace-input svelte-3lbrbf"),Po(n,"title","Enter replacement text"),Po(n,"type","text"),Po(n,"placeholder","Replace"),Po(i,"type","button"),Po(i,"title","Replace current occurrence (Ctrl+Enter)"),Po(i,"class","svelte-3lbrbf"),Po(a,"type","button"),Po(a,"title","Replace all occurrences"),Po(a,"class","svelte-3lbrbf"),Po(t,"class","jse-replace-section svelte-3lbrbf")},m:function(l,u){ko(l,t,u),mo(t,n),Do(n,e[9]),mo(t,r),mo(t,i),mo(t,o),mo(t,a),s||(c=[Mo(n,"input",e[25]),Mo(i,"click",e[14]),Mo(a,"click",e[15])],s=!0)},p:function(e,t){512&t&&n.value!==e[9]&&Do(n,e[9])},d:function(e){e&&xo(t),s=!1,Qi(c)}}}function DB(e){var t,n,r=e[1]&&PB(e);return{c:function(){r&&r.c(),t=Oo()},m:function(e,i){r&&r.m(e,i),ko(e,t,i),n=!0},p:function(e,n){var i=xi(n,1)[0];e[1]?r?(r.p(e,i),2&i&&xa(r,1)):((r=PB(e)).c(),xa(r,1),r.m(t.parentNode,t)):r&&(wa(),ja(r,1,1,(function(){r=null})),ka())},i:function(e){n||(xa(r),n=!0)},o:function(e){ja(r),n=!1},d:function(e){e&&xo(t),r&&r.d(e)}}}function zB(e){e.select()}function LB(e,t,n){var r,i,o=t.show,a=void 0!==o&&o,s=t.searching,c=t.resultCount,l=void 0===c?0:c,u=t.activeIndex,f=void 0===u?0:u,d=t.showReplace,h=void 0!==d&&d,v=t.readOnly,p=void 0!==v&&v,m=t.onChange,g=void 0===m?zf:m,y=t.onPrevious,b=void 0===y?zf:y,w=t.onNext,k=void 0===w?zf:w,x=t.onReplace,j=void 0===x?zf:x,S=t.onReplaceAll,C=void 0===S?zf:S,$=t.onClose,_=void 0===$?zf:$,O="",M="",E="";function A(){n(0,h=!h&&!p)}function P(){p||j(O,E)}return e.$$set=function(e){"show"in e&&n(1,a=e.show),"searching"in e&&n(2,s=e.searching),"resultCount"in e&&n(16,l=e.resultCount),"activeIndex"in e&&n(3,f=e.activeIndex),"showReplace"in e&&n(0,h=e.showReplace),"readOnly"in e&&n(4,p=e.readOnly),"onChange"in e&&n(17,g=e.onChange),"onPrevious"in e&&n(5,b=e.onPrevious),"onNext"in e&&n(6,k=e.onNext),"onReplace"in e&&n(18,j=e.onReplace),"onReplaceAll"in e&&n(19,C=e.onReplaceAll),"onClose"in e&&n(7,_=e.onClose)},e.$$.update=function(){65536&e.$$.dirty&&n(10,r=l>=ls?"".concat(999,"+"):String(l)),131072&e.$$.dirty&&n(20,i=ib(g,300)),1048832&e.$$.dirty&&i(O),2&e.$$.dirty&&a&&""!==O&&g(O)},[h,a,s,f,p,b,k,_,O,E,r,A,function(e){e.preventDefault(),O!==M?(M=O,i.cancel(),g(O)):k()},function(e){e.stopPropagation();var t=KO(e);"Enter"===t&&(e.preventDefault(),k()),"Shift+Enter"===t&&(e.preventDefault(),b()),"Ctrl+Enter"===t&&(e.preventDefault(),h?P():k()),"Ctrl+H"===t&&(e.preventDefault(),A()),"Escape"===t&&(e.preventDefault(),_())},P,function(){p||C(O,E)},l,g,j,C,i,function(){O=this.value,n(8,O)},function(){return k()},function(){return b()},function(){return _()},function(){E=this.value,n(9,E)}]}var BB=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,LB,DB,Zi,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},AB),r}return Di(n)}(),qB=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function FB(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||qB(r)&&qB(i)))return!1;var r,i;return!0}function VB(e,t){void 0===t&&(t=FB);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}var WB=Symbol("path");function HB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r={};Array.isArray(e)&&function(e,t,n){if(e.length<t)e.forEach(n);else for(var r=t>1?(e.length-1)/(t-1):e.length,i=0;i<t;i++){var o=Math.floor(i*r);n(e[o],o,e)}}(e,n,(function(e){ru(e)?UB(e,r,t):r[WB]=!0}));var i=[];return WB in r&&i.push([]),JB(r,[],i,t),i}function UB(e,t,n){for(var r in e){var i=e[r],o=t[r]||(t[r]={});ru(i)&&n?UB(i,o,n):void 0===o[WB]&&(o[WB]=!0)}}function JB(e,t,n,r){for(var i in e){var o=t.concat(i),a=e[i];a&&!0===a[WB]&&n.push(o),Is(a)&&r&&JB(a,o,n,r)}}function KB(e,t,n,r,i){for(var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,a=Ns(n)?n.length:0,s=function(e,t){var n=Object.values(e);if(Fk(n))return t;var r=function(e,t){return e+t},i=n.reduce(r);return i/n.length}(r,i),c=e-o,l=t+2*o,u=function(e){return r[e]||i},f=0,d=0;d<c&&f<a;)d+=u(f),f++;f>0&&(d-=u(--f));for(var h=f,v=0;v<l&&h<a;)v+=u(h),h++;for(var p=0,m=h;m<a;m++)p+=u(m);return{startIndex:f,endIndex:h,startHeight:d,endHeight:p,averageItemHeight:s,visibleHeight:v,visibleItems:Ns(n)?n.slice(f,h):[]}}function GB(e,t,n,r){for(var i=QB(e,t).rowIndex,o=0,a=0;a<i;a++)o+=n[a]||r;return o}function QB(e,t){var n,r=Si(n=e)||Fi(n)||qi(n)||ji(),i=r[0],o=r.slice(1),a=parseInt(i,10);return{rowIndex:isNaN(a)?-1:a,columnIndex:t.findIndex((function(e){return GE(o,e)}))}}function YB(e,t){var n=e.rowIndex,r=e.columnIndex;return[String(n)].concat(Bi(t[r]))}function XB(e,t){var n=xi(nS(e,(function(e){return tu(e.path[0])})),2),r=n[0],i=n[1],o=_x(Uw(r,eq),(function(e){var n={row:[],columns:{}};return e.forEach((function(e){var r=function(e,t){var n=QB(e.path,t);if(-1!==n.columnIndex)return n.columnIndex;return-1}(e,t);-1!==r?(void 0===n.columns[r]&&(n.columns[r]=[]),n.columns[r].push(e)):n.row.push(e)})),n}));return{root:i,rows:o}}function ZB(e,t){if(t&&0!==t.length)return 1===t.length?t[0]:{path:e,message:"Multiple validation issues: "+t.map((function(e){return lM(e.path)+" "+e.message})).join(", "),severity:es.warning}}function eq(e){return parseInt(e.path[0],10)}function tq(e,t,n){return t.some((function(t){return function(e,t,n){if(!e)return!1;if("replace"===t.op){var r=QB(ic(t.path),n),i=r.rowIndex,o=r.columnIndex,a=n.findIndex((function(t){return Vk(t,e.path)}));if(-1!==i&&-1!==o&&o!==a)return!1}return!0}(e.sortedColumn,t,n)}))?Ri(Ri({},e),{},{sortedColumn:null}):e}var nq=za("jsoneditor:actions");function rq(e){return iq.apply(this,arguments)}function iq(){return iq=ki(bi().mark((function e(t){var n,r,i,o,a,s,c,l,u,f;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.json,r=t.documentState,i=t.indentation,o=t.readOnly,a=t.parser,s=t.onPatch,!o&&void 0!==n&&r.selection&&iA(r.selection)){e.next=3;break}return e.abrupt("return");case 3:if(null!=(c=nA(n,r.selection,i,a))){e.next=6;break}return e.abrupt("return");case 6:return nq("cut",{selection:r.selection,clipboard:c,indentation:i}),e.next=9,pB(c);case 9:l=EA(n,r.selection),u=l.operations,f=l.newSelection,s(u,(function(e,t){return{state:Ri(Ri({},t),{},{selection:f})}}));case 11:case"end":return e.stop()}}),e)}))),iq.apply(this,arguments)}function oq(e){return aq.apply(this,arguments)}function aq(){return aq=ki(bi().mark((function e(t){var n,r,i,o,a;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.json,r=t.documentState,i=t.indentation,o=t.parser,null!=(a=nA(n,r.selection,i,o))){e.next=4;break}return e.abrupt("return");case 4:return nq("copy",{clipboard:a,indentation:i}),e.next=7,pB(a);case 7:case"end":return e.stop()}}),e)}))),aq.apply(this,arguments)}function sq(e){var t=e.clipboardText,n=e.json,r=e.selection,i=e.readOnly,o=e.parser,a=e.onPatch,s=e.onChangeText,c=e.openRepairModal;if(!i)try{l(t)}catch(e){c(t,(function(e){nq("repaired pasted text: ",e),l(e)}))}function l(e){if(void 0!==n){var i=r||XE([],!1),c=$A(n,i,e,o);nq("paste",{pastedText:e,operations:c,selectionNonNull:i}),a(c,(function(e,t){var r=t;return c.filter((function(e){return(Ds(e)||Ls(e))&&iu(e.value)})).forEach((function(t){var i=yc(n,t.path);r=OE(e,r,i)})),{state:r}}))}else nq("paste text",{pastedText:e}),s(t,(function(e,t){if(e){return{state:OE(e,t,[])}}}))}}function cq(e){var t=e.json,n=e.text,r=e.documentState,i=e.keepSelection,o=e.readOnly,a=e.onChange,s=e.onPatch;if(!o&&r.selection){var c=void 0!==t&&(TE(r.selection)||RE(r.selection))?tA(r.selection.path,r.selection.path):r.selection;if(Fk(fA(r.selection)))nq("remove root",{selection:r.selection}),a&&a({text:"",json:void 0},void 0!==t?{text:void 0,json:t}:{text:n||"",json:t},{contentErrors:null,patchResult:null});else if(void 0!==t){var l=EA(t,c),u=l.operations,f=l.newSelection;nq("remove",{operations:u,selection:r.selection,newSelection:f}),s(u,(function(e,t){return{state:Ri(Ri({},t),{},{selection:i?r.selection:f})}}))}}}function lq(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&void 0!==t&&n.selection&&iA(n.selection)){var a=QB(fA(n.selection),r),s=a.rowIndex,c=a.columnIndex;nq("duplicate row",{rowIndex:s});var l=[String(s)];o(CA(t,[l]),(function(e,n){var i=XE(YB({rowIndex:s<t.length?s+1:s,columnIndex:c},r),!1);return{state:Ri(Ri({},n),{},{selection:i})}}))}}function uq(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&void 0!==t&&n.selection&&iA(n.selection)){var a=QB(fA(n.selection),r).rowIndex;nq("insert before row",{rowIndex:a}),o(xA(t,[String(a)],[{key:"",value:Is(t[0])?{}:""}]))}}function fq(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&void 0!==t&&n.selection&&iA(n.selection)){var a=QB(fA(n.selection),r),s=a.rowIndex,c=a.columnIndex;nq("insert after row",{rowIndex:s});var l=s+1,u=[String(l)],f=[{key:"",value:Is(t[0])?{}:""}];o(l<t.length?xA(t,u,f):jA(t,[],f),(function(e,t){var n=XE(YB({rowIndex:l,columnIndex:c},r),!1);return{state:Ri(Ri({},t),{},{selection:n})}}))}}function dq(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&void 0!==t&&n.selection&&iA(n.selection)){var a=QB(fA(n.selection),r),s=a.rowIndex,c=a.columnIndex;nq("remove row",{rowIndex:s}),o(_A([[String(s)]]),(function(e,t){var n=s<e.length?s:s>0?s-1:void 0,i=void 0!==n?XE(YB({rowIndex:n,columnIndex:c},r),!1):null;return nq("remove row new selection",{rowIndex:s,newRowIndex:n,newSelection:i}),{state:Ri(Ri({},t),{},{selection:i})}}))}}function hq(e){var t=e.insertType,n=e.selectInside,r=e.refJsonEditor,i=e.json,o=e.selection,a=e.readOnly,s=e.parser,c=e.onPatch,l=e.onReplaceJson;if(!a){var u=function(e,t,n){if("object"===n)return{};if("array"===n)return[];if("structure"===n&&void 0!==e){var r=Ys(e,t?LE(t):[]);if(Array.isArray(r)&&!Fk(r)){var i=jw(r);return iu(i)?Dg(i,(function(e){return Array.isArray(e)?[]:ru(e)?void 0:""})):""}}return""}(i,o,t);if(void 0!==i){var f=s.stringify(u),d=$A(i,o,f,s);nq("onInsert",{insertType:t,operations:d,newValue:u,data:f});var h=Mb(d.filter((function(e){return"add"===e.op||"replace"===e.op})));c(d,(function(e,t){if(h){var r=yc(e,h.path);if(iu(u))return{state:Ri(Ri({},lE(e,t,r,EE)),{},{selection:n?ZE(r):t.selection})};if(""===u){var i=Fk(r)?null:Ys(e,fk(r));return{state:cE(e,Ri(Ri({},t),{},{selection:ru(i)?YE(r,!0):XE(r,!0)}),r)}}}else;})),nq("after patch"),h&&""===u&&yq((function(){return LO(r,"",!0,bq)}))}else{nq("onInsert",{insertType:t,newValue:u});var v=[];l(u,(function(e,t){return{state:Ri(Ri({},OE(e,t,v)),{},{selection:iu(u)?ZE(v):XE(v,!0)})}}))}}}function vq(e){return pq.apply(this,arguments)}function pq(){return pq=ki(bi().mark((function e(t){var n,r,i,o,a,s,c,l,u,f,d,h;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.char,r=t.selectInside,i=t.refJsonEditor,o=t.json,a=t.selection,s=t.readOnly,c=t.parser,l=t.onPatch,u=t.onReplaceJson,f=t.onSelect,!s){e.next=3;break}return e.abrupt("return");case 3:if(!TE(a)){e.next=8;break}return d=!a.edit,f(Ri(Ri({},a),{},{edit:!0})),yq((function(){return LO(i,n,d,bq)})),e.abrupt("return");case 8:if("{"!==n){e.next=12;break}hq({insertType:"object",selectInside:r,refJsonEditor:i,json:o,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u}),e.next=23;break;case 12:if("["!==n){e.next=16;break}hq({insertType:"array",selectInside:r,refJsonEditor:i,json:o,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u}),e.next=23;break;case 16:if(!RE(a)||void 0===o){e.next=20;break}iu(Ys(o,a.path))||(h=!a.edit,f(Ri(Ri({},a),{},{edit:!0})),yq((function(){return LO(i,n,h,bq)}))),e.next=23;break;case 20:return nq("onInsertValueWithCharacter",{char:n}),e.next=23,mq({char:n,refJsonEditor:i,json:o,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u});case 23:case"end":return e.stop()}}),e)}))),pq.apply(this,arguments)}function mq(e){return gq.apply(this,arguments)}function gq(){return gq=ki(bi().mark((function e(t){var n,r,i,o,a,s,c,l,u;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.char,r=t.refJsonEditor,i=t.json,o=t.selection,a=t.readOnly,s=t.parser,c=t.onPatch,l=t.onReplaceJson,!a){e.next=3;break}return e.abrupt("return");case 3:hq({insertType:"value",selectInside:!1,refJsonEditor:r,json:i,selection:o,readOnly:a,parser:s,onPatch:c,onReplaceJson:l}),u=!rA(o),yq((function(){return LO(r,n,u,bq)}));case 6:case"end":return e.stop()}}),e)}))),gq.apply(this,arguments)}function yq(e){setTimeout((function(){return setTimeout(e)}))}function bq(e){null==e||e.refresh()}function wq(e){go(e,"svelte-1fnjw3y",".jse-json-preview.svelte-1fnjw3y{flex:1;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;padding:2px;border-left:var(--jse-main-border);border-right:var(--jse-main-border);border-bottom:var(--jse-main-border)}")}function kq(e){var t,n;return{c:function(){t=So("div"),n=$o(e[0]),Po(t,"class","jse-json-preview svelte-1fnjw3y")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){1&xi(t,1)[0]&&Io(n,e[0])},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function xq(e,t,n){var r,i,o=t.text,a=t.json,s=t.indentation,c=t.parser;return e.$$set=function(e){"text"in e&&n(1,o=e.text),"json"in e&&n(2,a=e.json),"indentation"in e&&n(3,s=e.indentation),"parser"in e&&n(4,c=e.parser)},e.$$.update=function(){6&e.$$.dirty&&n(5,r=void 0!==a?{json:a}:{text:o||""}),56&e.$$.dirty&&n(0,i=gM(hO(r,s,c),ds))},[i,o,a,s,c,r]}var jq=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,xq,kq,Xi,{text:1,json:2,indentation:3,parser:4},wq),r}return Di(n)}(),Sq=po.window;function Cq(e){go(e,"svelte-1n5yill",".jse-tree-mode.svelte-1n5yill.svelte-1n5yill{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color);line-height:var(--jse-line-height)}.jse-tree-mode.svelte-1n5yill .jse-hidden-input-label .jse-hidden-input.svelte-1n5yill{position:fixed;top:-10px;left:-10px;width:1px;height:1px;padding:0;border:0;outline:none}.jse-tree-mode.svelte-1n5yill .jse-search-box-container.svelte-1n5yill{position:relative;height:0;top:var(--jse-padding);margin-right:calc(var(--jse-padding) + 20px);margin-left:var(--jse-padding);text-align:right;z-index:3}.jse-tree-mode.no-main-menu.svelte-1n5yill.svelte-1n5yill{border-top:var(--jse-main-border)}.jse-tree-mode.svelte-1n5yill .jse-contents.svelte-1n5yill{border-left:var(--jse-main-border);border-right:var(--jse-main-border);flex:1;overflow:auto;position:relative;padding:2px;display:flex;flex-direction:column}.jse-tree-mode.svelte-1n5yill .jse-contents.svelte-1n5yill:last-child{border-bottom:var(--jse-main-border)}.jse-tree-mode.svelte-1n5yill .jse-contents .jse-loading-space.svelte-1n5yill{flex:1}.jse-tree-mode.svelte-1n5yill .jse-contents .jse-loading.svelte-1n5yill{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function $q(e){var t,n,r;function i(t){e[78](t)}var o={json:e[11],selection:e[17].selection,readOnly:e[0],historyState:e[23],onExpandAll:e[41],onCollapseAll:e[42],onUndo:e[37],onRedo:e[38],onSort:e[39],onTransform:e[40],onContextMenu:e[46],onCopy:e[34],onRenderMenu:e[7]};return void 0!==e[20]&&(o.showSearch=e[20]),t=new WL({props:o}),ra.push((function(){return Pa(t,"showSearch",i)})),{c:function(){Ta(t.$$.fragment)},m:function(e,n){Ra(t,e,n),r=!0},p:function(e,r){var i={};2048&r[0]&&(i.json=e[11]),131072&r[0]&&(i.selection=e[17].selection),1&r[0]&&(i.readOnly=e[0]),8388608&r[0]&&(i.historyState=e[23]),128&r[0]&&(i.onRenderMenu=e[7]),!n&&1048576&r[0]&&(n=!0,i.showSearch=e[20],fa((function(){return n=!1}))),t.$set(i)},i:function(e){r||(xa(t.$$.fragment,e),r=!0)},o:function(e){ja(t.$$.fragment,e),r=!1},d:function(e){Na(t,e)}}}function _q(e){var t,n;return t=new EB({props:{json:e[11],selection:e[17].selection,onSelect:e[50],onError:e[6],pathParser:e[4]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2048&n[0]&&(r.json=e[11]),131072&n[0]&&(r.selection=e[17].selection),64&n[0]&&(r.onError=e[6]),16&n[0]&&(r.pathParser=e[4]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Oq(e){var t;return{c:function(){(t=So("div")).innerHTML='<div class="jse-loading-space svelte-1n5yill"></div> <div class="jse-loading svelte-1n5yill">loading...</div>',Po(t,"class","jse-contents svelte-1n5yill")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function Mq(e){var t,n,r,i,o,a,s,c,l,u=[Aq,Eq],f=[];function d(e,t){return void 0===e[11]?0:1}return i=d(e),o=f[i]=u[i](e),{c:function(){t=So("label"),n=So("input"),r=_o(),o.c(),a=Oo(),Po(n,"type","text"),n.readOnly=!0,Po(n,"tabindex","-1"),Po(n,"class","jse-hidden-input svelte-1n5yill"),Po(t,"class","jse-hidden-input-label")},m:function(o,u){ko(o,t,u),mo(t,n),e[79](n),ko(o,r,u),f[i].m(o,u),ko(o,a,u),s=!0,c||(l=Mo(n,"paste",e[35]),c=!0)},p:function(e,t){var n=i;(i=d(e))===n?f[i].p(e,t):(wa(),ja(f[n],1,1,(function(){f[n]=null})),ka(),(o=f[i])?o.p(e,t):(o=f[i]=u[i](e)).c(),xa(o,1),o.m(a.parentNode,a))},i:function(e){s||(xa(o),s=!0)},o:function(e){ja(o),s=!1},d:function(n){n&&(xo(t),xo(r),xo(a)),e[79](null),f[i].d(n),c=!1,l()}}}function Eq(e){var t,n,r,i,o,a,s,c,l,u,f,d,h;o=new BB({props:{show:e[20],resultCount:(null===(t=e[18])||void 0===t||null===(t=t.items)||void 0===t?void 0:t.length)||0,activeIndex:(null===(n=e[18])||void 0===n?void 0:n.activeIndex)||0,showReplace:e[21],searching:e[22],readOnly:e[0],onChange:e[27],onNext:e[28],onPrevious:e[29],onReplace:e[30],onReplaceAll:e[31],onClose:e[32]}}),c=new DL({props:{value:e[11],path:[],expandedMap:e[17].expandedMap,enforceStringMap:e[17].enforceStringMap,visibleSectionsMap:e[17].visibleSectionsMap,validationErrorsMap:e[25],searchResultItemsMap:null===(r=e[18])||void 0===r?void 0:r.itemsMap,selection:e[17].selection,context:e[13],onDragSelectionStart:zf}});var v=e[19]&&Pq(e),p=e[24]&&Tq(e);return d=new fI({props:{validationErrors:e[12],selectError:e[33]}}),{c:function(){i=So("div"),Ta(o.$$.fragment),a=_o(),s=So("div"),Ta(c.$$.fragment),l=_o(),v&&v.c(),u=_o(),p&&p.c(),f=_o(),Ta(d.$$.fragment),Po(i,"class","jse-search-box-container svelte-1n5yill"),Po(s,"class","jse-contents svelte-1n5yill"),Po(s,"data-jsoneditor-scrollable-contents",!0)},m:function(t,n){ko(t,i,n),Ra(o,i,null),ko(t,a,n),ko(t,s,n),Ra(c,s,null),e[83](s),ko(t,l,n),v&&v.m(t,n),ko(t,u,n),p&&p.m(t,n),ko(t,f,n),Ra(d,t,n),h=!0},p:function(e,t){var n,r,i,a={};1048576&t[0]&&(a.show=e[20]),262144&t[0]&&(a.resultCount=(null===(n=e[18])||void 0===n||null===(n=n.items)||void 0===n?void 0:n.length)||0),262144&t[0]&&(a.activeIndex=(null===(r=e[18])||void 0===r?void 0:r.activeIndex)||0),2097152&t[0]&&(a.showReplace=e[21]),4194304&t[0]&&(a.searching=e[22]),1&t[0]&&(a.readOnly=e[0]),o.$set(a);var s={};2048&t[0]&&(s.value=e[11]),131072&t[0]&&(s.expandedMap=e[17].expandedMap),131072&t[0]&&(s.enforceStringMap=e[17].enforceStringMap),131072&t[0]&&(s.visibleSectionsMap=e[17].visibleSectionsMap),33554432&t[0]&&(s.validationErrorsMap=e[25]),262144&t[0]&&(s.searchResultItemsMap=null===(i=e[18])||void 0===i?void 0:i.itemsMap),131072&t[0]&&(s.selection=e[17].selection),8192&t[0]&&(s.context=e[13]),c.$set(s),e[19]?v?(v.p(e,t),524288&t[0]&&xa(v,1)):((v=Pq(e)).c(),xa(v,1),v.m(u.parentNode,u)):v&&(wa(),ja(v,1,1,(function(){v=null})),ka()),e[24]?p?(p.p(e,t),16777216&t[0]&&xa(p,1)):((p=Tq(e)).c(),xa(p,1),p.m(f.parentNode,f)):p&&(wa(),ja(p,1,1,(function(){p=null})),ka());var l={};4096&t[0]&&(l.validationErrors=e[12]),d.$set(l)},i:function(e){h||(xa(o.$$.fragment,e),xa(c.$$.fragment,e),xa(v),xa(p),xa(d.$$.fragment,e),h=!0)},o:function(e){ja(o.$$.fragment,e),ja(c.$$.fragment,e),ja(v),ja(p),ja(d.$$.fragment,e),h=!1},d:function(t){t&&(xo(i),xo(a),xo(s),xo(l),xo(u),xo(f)),Na(o),Na(c),e[83](null),v&&v.d(t),p&&p.d(t),Na(d,t)}}}function Aq(e){var t,n,r,i,o=[Nq,Rq],a=[];function s(e,t){return""===e[16]||void 0===e[16]?0:1}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=Oo()},m:function(e,n){a[t].m(e,n),ko(e,r,n),i=!0},p:function(e,i){var c=t;(t=s(e))===c?a[t].p(e,i):(wa(),ja(a[c],1,1,(function(){a[c]=null})),ka(),(n=a[t])?n.p(e,i):(n=a[t]=o[t](e)).c(),xa(n,1),n.m(r.parentNode,r))},i:function(e){i||(xa(n),i=!0)},o:function(e){ja(n),i=!1},d:function(e){e&&xo(r),a[t].d(e)}}}function Pq(e){var t,n;return t=new eI({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(e[19].contents)?"array":"object"," as text"),actions:[{icon:OP,text:"Paste as JSON instead",title:"Replace the value with the pasted JSON",onMouseDown:e[47]},{text:"Leave as is",title:"Keep the JSON embedded in the value",onClick:e[48]}]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};524288&n[0]&&(r.message="You pasted a JSON ".concat(Array.isArray(e[19].contents)?"array":"object"," as text")),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Tq(e){var t,n;return t=new eI({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:e[0]?[]:[{icon:QP,text:"Ok",title:"Accept the repaired document",onClick:e[8]},{icon:_P,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[49]}],onClose:e[9]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.actions=e[0]?[]:[{icon:QP,text:"Ok",title:"Accept the repaired document",onClick:e[8]},{icon:_P,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[49]}]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Rq(e){var t,n,r,i;return t=new eI({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:_P,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[49]}]}}),r=new jq({props:{text:e[16],json:e[11],indentation:e[5],parser:e[3]}}),{c:function(){Ta(t.$$.fragment),n=_o(),Ta(r.$$.fragment)},m:function(e,o){Ra(t,e,o),ko(e,n,o),Ra(r,e,o),i=!0},p:function(e,n){var i={};1&n[0]&&(i.actions=e[0]?[]:[{icon:_P,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[49]}]),t.$set(i);var o={};65536&n[0]&&(o.text=e[16]),2048&n[0]&&(o.json=e[11]),32&n[0]&&(o.indentation=e[5]),8&n[0]&&(o.parser=e[3]),r.$set(o)},i:function(e){i||(xa(t.$$.fragment,e),xa(r.$$.fragment,e),i=!0)},o:function(e){ja(t.$$.fragment,e),ja(r.$$.fragment,e),i=!1},d:function(e){e&&xo(n),Na(t,e),Na(r,e)}}}function Nq(e){var t,n;return t=new GL({props:{readOnly:e[0],onCreateObject:e[80],onCreateArray:e[81],onClick:e[82]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.readOnly=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Iq(e){var t,n,r,i,o,a,s,c,l=e[1]&&$q(e),u=e[2]&&_q(e),f=[Mq,Oq],d=[];return i=function(e,t){return e[26]?1:0}(e),o=d[i]=f[i](e),{c:function(){t=So("div"),l&&l.c(),n=_o(),u&&u.c(),r=_o(),o.c(),Po(t,"role","tree"),Po(t,"tabindex","-1"),Po(t,"class","jse-tree-mode svelte-1n5yill"),Bo(t,"no-main-menu",!e[1])},m:function(o,f){ko(o,t,f),l&&l.m(t,null),mo(t,n),u&&u.m(t,null),mo(t,r),d[i].m(t,null),e[84](t),a=!0,s||(c=[Mo(Sq,"mousedown",e[51]),Mo(t,"keydown",e[43]),Mo(t,"mousedown",e[44]),Mo(t,"contextmenu",e[45])],s=!0)},p:function(e,i){e[1]?l?(l.p(e,i),2&i[0]&&xa(l,1)):((l=$q(e)).c(),xa(l,1),l.m(t,n)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka()),e[2]?u?(u.p(e,i),4&i[0]&&xa(u,1)):((u=_q(e)).c(),xa(u,1),u.m(t,r)):u&&(wa(),ja(u,1,1,(function(){u=null})),ka()),o.p(e,i),(!a||2&i[0])&&Bo(t,"no-main-menu",!e[1])},i:function(e){a||(xa(l),xa(u),xa(o),a=!0)},o:function(e){ja(l),ja(u),ja(o),a=!1},d:function(n){n&&xo(t),l&&l.d(),u&&u.d(),d[i].d(),e[84](null),s=!1,Qi(c)}}}function Dq(e,t,n){var r,i=za("jsoneditor:TreeMode"),o="undefined"==typeof window;i("isSSR:",o);var a,s,c,l,u,f=ea("simple-modal").open,d=J$(),h=J$(),v=ea("absolute-popup"),p=v.openAbsolutePopup,m=v.closeAbsolutePopup,g=!1,y=DN(),b=t.readOnly,w=t.externalContent,k=t.externalSelection,x=t.mainMenuBar,j=t.navigationBar,S=t.escapeControlCharacters,C=t.escapeUnicodeCharacters,$=t.parser,_=t.parseMemoizeOne,O=t.validator,M=t.validationParser,E=t.pathParser,A=t.indentation,P=t.onError,T=t.onChange,R=t.onChangeMode,N=t.onSelect,I=t.onRenderValue,D=t.onRenderMenu,z=t.onClassName,L=t.onFocus,B=t.onBlur,q=t.onSortModal,F=t.onTransformModal,V=t.onJSONEditorModal,W=!1;UN({onMount:Qo,onDestroy:Yo,getWindow:function(){return BO(c)},hasFocus:function(){return W&&document.hasFocus()||qO(c)},onFocus:function(){g=!0,L&&L()},onBlur:function(){g=!1,B&&B()}});var H=void 0;function U(e){i("updateSelection",e);var t="function"==typeof e?e(Y.selection)||null:e;Vk(t,Y.selection)||(n(17,Y=Ri(Ri({},Y),{},{selection:t})),N(t))}var J,K,G,Q=!1,Y=oE(),X=!1,Z=!1,ee=!1,te="";function ne(e){return re.apply(this,arguments)}function re(){return re=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("search text updated",t),n(77,te=t),e.next=4,la();case 4:return e.next=6,ce();case 6:case"end":return e.stop()}}),e)}))),re.apply(this,arguments)}function ie(){return(ie=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(18,J=J?TA(J):void 0),e.next=3,ce();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(18,J=J?RA(J):void 0),e.next=3,ce();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return(ae=ki(bi().mark((function e(t,n){var r,o,a,s,c;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null===(r=J)||void 0===r?void 0:r.activeItem,i("handleReplace",{replacementText:n,activeItem:o}),o&&void 0!==l){e.next=4;break}return e.abrupt("return");case 4:return a=LA(l,Y,n,o,$),s=a.operations,c=a.newSelection,rt(s,(function(e,t){return{state:Ri(Ri({},t),{},{selection:c})}})),e.next=8,la();case 8:return e.next=10,ce();case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return se=ki(bi().mark((function e(t,n){var r,o,a;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("handleReplaceAll",{text:t,replacementText:n}),r=BA(l,Y,t,n,$),o=r.operations,a=r.newSelection,rt(o,(function(e,t){return{state:Ri(Ri({},t),{},{selection:a})}})),e.next=5,la();case 5:return e.next=7,ce();case 7:case"end":return e.stop()}}),e)}))),se.apply(this,arguments)}function ce(){return le.apply(this,arguments)}function le(){return(le=ki(bi().mark((function e(){var t,r,o;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null===(t=J)||void 0===t?void 0:t.activeItem,i("focusActiveSearchResult",J),!r||void 0===l){e.next=9;break}return o=r.path,n(17,Y=Ri(Ri({},cE(l,Y,o)),{},{selection:null})),e.next=7,la();case 7:return e.next=9,Xe(o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ue=BN({onChange:function(e){n(23,fe=e)}}),fe=ue.getState();var de,he,ve=s$((function(e,t){if(""===e)return i("clearing search result"),void(void 0!==J&&n(18,J=void 0));n(22,ee=!0),setTimeout((function(){i("searching...",e);var r=NA(e,t,ls);n(18,J=function(e,t,n){var r=null!=n&&n.activeItem?qA(n.activeItem):void 0,i=t.findIndex((function(e){return Vk(r,qA(e))})),o=-1!==i?i:void 0!==(null==n?void 0:n.activeIndex)&&(null==n?void 0:n.activeIndex)<t.length?null==n?void 0:n.activeIndex:t.length>0?0:-1,a=t.map((function(e,t){return Ri(Ri({},e),{},{active:t===o})})),s=a[o];return{items:a,itemsMap:Uw(a,(function(e){return oc(e.path)})),activeItem:s,activeIndex:o}}(0,r,J)),n(22,ee=!1)}))}),300),pe=!1,me=[],ge=VB(VN);function ye(e,t,r,o){qN((function(){var a;try{a=ge(e,t,r,o)}catch(e){a=[{path:[],message:"Failed to validate: "+e.message,severity:es.warning}]}Vk(a,me)||(i("validationErrors changed:",a),n(12,me=a))}),(function(e){return i("validationErrors updated in ".concat(e," ms"))}))}function be(){return i("validate"),H?{parseError:H,isRepairable:!1}:(ye(l,O,$,M),Fk(me)?null:{validationErrors:me})}function we(){return l}function ke(){return Y}function xe(e){void 0!==e.json&&function(e){if(void 0===e)return;var t=!Vk(l,e);if(i("update external json",{isChanged:t,currentlyText:void 0===l}),!t)return;var r={json:l,text:u},o=Y,a=l,s=u,c=pe;n(11,l=e),je(l),n(16,u=void 0),n(24,pe=!1),H=void 0,Se(l),Ce({previousJson:a,previousState:o,previousText:s,previousTextIsRepaired:c}),nt(r,null)}(e.json),void 0!==e.text&&function(e){if(void 0===e||void 0!==w.json)return;var t=e!==u;if(i("update external text",{isChanged:t}),!t)return;var r={json:l,text:u},o=l,a=Y,s=u,c=pe;try{n(11,l=_(e)),je(l),n(16,u=e),n(24,pe=!1),H=void 0}catch(t){try{n(11,l=_(Xl(e))),je(l),n(16,u=e),n(24,pe=!0),H=void 0,Se(l)}catch(e){n(11,l=void 0),n(16,u=w.text),n(24,pe=!1),H=void 0!==u&&""!==u?aO(u,t.message||String(t)):void 0}}Se(l),Ce({previousJson:o,previousState:a,previousText:s,previousTextIsRepaired:c}),nt(r,null)}(e.text)}function je(e){Q||(Q=!0,n(17,Y=lE(e,Y,[],function(e){return vO({json:e},gs)?ME:EE}(e))))}function Se(e){Y.selection&&(rc(e,dA(Y.selection))&&rc(e,fA(Y.selection))||(i("clearing selection: path does not exist anymore",Y.selection),n(17,Y=Ri(Ri({},Y),{},{selection:WE(e,Y)}))))}function Ce(e){var t=e.previousJson,n=e.previousState,r=e.previousText,i=e.previousTextIsRepaired;void 0===t&&void 0===r||(void 0!==l?void 0!==t?ue.add({undo:{patch:[{op:"replace",path:"",value:t}],state:QE(n),json:void 0,text:r,textIsRepaired:i},redo:{patch:[{op:"replace",path:"",value:l}],state:QE(Y),json:void 0,text:u,textIsRepaired:pe}}):ue.add({undo:{patch:void 0,json:void 0,text:r,state:QE(n),textIsRepaired:i},redo:{patch:void 0,json:l,state:QE(Y),text:u,textIsRepaired:pe}}):void 0!==t&&ue.add({undo:{patch:void 0,json:t,state:QE(n),text:r,textIsRepaired:i},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:pe,state:QE(Y)}}))}function $e(e,t){if(i("patch",e,t),void 0===l)throw new Error("Cannot apply patch: no JSON");var r={json:l,text:u},o=l,a=Y,s=u,c=pe,f=AA(l,e),d=dE(l,Y,e),h=HE(l,e),v=function(e,t){return t||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ri(Ri({},e),{},{selection:t}):e}(d.documentState,h,!1);i("patch updatedSelection",h);var p="function"==typeof t?t(d.json,v):void 0;n(11,l=p&&void 0!==p.json?p.json:d.json);var m=p&&void 0!==p.state?p.state:v;n(17,Y=m),n(16,u=void 0),n(24,pe=!1),n(19,G=void 0),H=void 0,Se(l),ue.add({undo:{patch:f,json:void 0,text:s,state:QE(a),textIsRepaired:c},redo:{patch:e,json:void 0,state:QE(m),text:u,textIsRepaired:pe}});var g={json:l,previousJson:o,undo:f,redo:e};return nt(r,g),g}function _e(){!b&&Y.selection&&U(YE(fA(Y.selection),!0))}function Oe(){if(!b&&Y.selection){var e=fA(Y.selection),t=Ys(l,e);iu(t)?function(e,t){i("openJSONEditorModal",{path:e,value:t}),W=!0,V({content:{json:t},path:e,onPatch:he.onPatch,onClose:function(){W=!1,ht()}})}(e,t):U(XE(e,!0))}}function Me(){if(!b&&RE(Y.selection)){var e=fA(Y.selection),t=oc(e),n=Ys(l,e),r=!jE(n,Y.enforceStringMap,t,$),o=r?String(n):uu(String(n),$);i("handleToggleEnforceString",{enforceString:r,value:n,updatedValue:o}),rt([{op:"replace",path:t,value:o}],(function(e,n){return{state:fE(n,t,r)}}))}}function Ee(){return Ae.apply(this,arguments)}function Ae(){return Ae=ki(bi().mark((function e(){var t,n=arguments;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(n.length>0&&void 0!==n[0])||n[0],e.next=3,rq({json:l,documentState:Y,indentation:t?A:void 0,readOnly:b,parser:$,onPatch:rt});case 3:case"end":return e.stop()}}),e)}))),Ae.apply(this,arguments)}function Pe(){return Te.apply(this,arguments)}function Te(){return Te=ki(bi().mark((function e(){var t,n=arguments;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(n.length>0&&void 0!==n[0])||n[0],void 0!==l){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,oq({json:l,documentState:Y,indentation:t?A:void 0,parser:$});case 5:case"end":return e.stop()}}),e)}))),Te.apply(this,arguments)}function Re(){f(wI,{},Ri(Ri({},ys),{},{styleWindow:{width:"450px"}}),{onClose:function(){return ht()}})}function Ne(e,t){f(aD,{text:e,onParse:function(e){return rO(e,(function(e){return tO(e,$)}))},onRepair:iO,onApply:t},Ri(Ri({},ys),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ht()}})}function Ie(){cq({json:l,text:u,documentState:Y,keepSelection:!1,readOnly:b,onChange:T,onPatch:rt})}function De(){!b&&void 0!==l&&Y.selection&&iA(Y.selection)&&!Fk(fA(Y.selection))&&(i("duplicate",{selection:Y.selection}),rt(CA(l,zE(l,Y.selection))))}function ze(){if(!b&&Y.selection&&(NE(Y.selection)||RE(Y.selection))&&!Fk(fA(Y.selection))){i("extract",{selection:Y.selection});var e=function(e,t){if(RE(t))return[{op:"move",from:oc(t.path),path:""}];if(!NE(t))throw new Error("Cannot create extract operations: parent must be an Object or Array");var n=Ys(e,fk(t.focusPath));if(Ns(n))return[{op:"replace",path:"",value:zE(e,t).map((function(e){var t=eu(Mb(e));return n[t]}))}];if(Is(n)){var r={};return zE(e,t).forEach((function(e){var t=String(Mb(e));r[t]=n[t]})),[{op:"replace",path:"",value:r}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(t))}(l,Y.selection);rt(e,(function(e,t){if(iu(e)){return{state:OE(e,t,[])}}}))}}function Le(e){void 0!==l&&hq({insertType:e,selectInside:!0,refJsonEditor:c,json:l,selection:Y.selection,readOnly:b,parser:$,onPatch:rt,onReplaceJson:it})}function Be(e){TE(Y.selection)&&U(XE(Y.selection.path,!1)),Y.selection||U(WE(l,Y)),Le(e)}function qe(e){if(!b&&Y.selection)if(oA(Y.selection))try{var t=dA(Y.selection),n=Ys(l,t),r=function(e,t,n){if("array"===t){if(Array.isArray(e))return e;if(ru(e))return Z_(e);if("string"==typeof e)try{var r=n.parse(e);if(Array.isArray(r))return r;if(ru(r))return Z_(r)}catch(t){return[e]}return[e]}if("object"===t){if(Array.isArray(e))return X_(e);if(ru(e))return e;if("string"==typeof e)try{var i=n.parse(e);if(ru(i))return i;if(Array.isArray(i))return X_(i)}catch(t){return{value:e}}return{value:e}}if("value"===t)return iu(e)?n.stringify(e):e;throw new Error("Cannot convert ".concat(su(e,n)," to ").concat(t))}(n,e,$);if(r===n)return;var o=[{op:"replace",path:oc(t),value:r}];i("handleConvert",{selection:Y.selection,path:t,type:e,operations:o}),rt(o,(function(e,t){return{state:Y.selection?OE(e,t,fA(Y.selection)):Y}}))}catch(e){P(e)}else P(new Error("Cannot convert current selection to ".concat(e)))}function Fe(){if(Y.selection){var e=FE(l,Y,!1),t=fk(fA(Y.selection));e&&!Fk(fA(e))&&Vk(t,fk(fA(e)))?U(eA(fA(e))):U(ZE(t)),i("insert before",{selection:Y.selection,selectionBefore:e,parentPath:t}),la().then(ft)}}function Ve(){if(Y.selection){var e=qE(l,Y.selection);i("insert after",e),U(eA(e)),la().then(ft)}}function We(e){return He.apply(this,arguments)}function He(){return(He=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vq({char:t,selectInside:!0,refJsonEditor:c,json:l,selection:Y.selection,readOnly:b,parser:$,onPatch:rt,onReplaceJson:it,onSelect:U});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ue(){if(!b&&ue.getState().canUndo){var e=ue.undo();if(e){var t={json:l,text:u};n(11,l=e.undo.patch?lc(l,e.undo.patch):e.undo.json),n(17,Y=e.undo.state),n(16,u=e.undo.text),n(24,pe=e.undo.textIsRepaired),H=void 0,i("undo",{item:e,json:l,documentState:Y}),nt(t,{json:l,previousJson:t.json,redo:e.undo.patch,undo:e.redo.patch}),ht(),Y.selection&&Xe(fA(Y.selection),!1)}}}function Je(){if(!b&&ue.getState().canRedo){var e=ue.redo();if(e){var t={json:l,text:u};n(11,l=e.redo.patch?lc(l,e.redo.patch):e.redo.json),n(17,Y=e.redo.state),n(16,u=e.redo.text),n(24,pe=e.redo.textIsRepaired),H=void 0,i("redo",{item:e,json:l,documentState:Y}),nt(t,{json:l,previousJson:t.json,redo:e.redo.patch,undo:e.undo.patch}),ht(),Y.selection&&Xe(fA(Y.selection),!1)}}}function Ke(e){var t;b||void 0===l||(W=!0,q({id:d,json:l,rootPath:e,onSort:(t=ki(bi().mark((function t(n){var r;return bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.operations,i("onSort",e,r),rt(r,(function(t,n){return{state:Ri(Ri({},OE(t,n,e)),{},{selection:XE(e,!1)})}}));case 3:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)}),onClose:function(){W=!1,ht()}}))}function Ge(){Y.selection&&Ke(KE(l,Y.selection))}function Qe(e){if(void 0!==l){var t=e.id,n=e.onTransform,r=e.onClose,o=e.rootPath||[];W=!0,F({id:t||h,json:l,rootPath:o,onTransform:function(e){n?n({operations:e,json:l,transformedJson:lc(l,e)}):(i("onTransform",o,e),rt(e,(function(e,t){return{state:Ri(Ri({},OE(e,t,o)),{},{selection:XE(o,!1)})}})))},onClose:function(){W=!1,ht(),r&&r()}})}}function Ye(){Y.selection&&Qe({rootPath:KE(l,Y.selection)})}function Xe(e){return Ze.apply(this,arguments)}function Ze(){return Ze=ki(bi().mark((function e(t){var r,o,s,c,u,f=arguments;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(f.length>1&&void 0!==f[1])||f[1],n(17,Y=cE(l,Y,t)),e.next=4,la();case 4:if(o=et(t),i("scrollTo",{path:t,elem:o,refContents:a}),o&&a){e.next=8;break}return e.abrupt("return",Promise.resolve());case 8:if(s=a.getBoundingClientRect(),c=o.getBoundingClientRect(),r){e.next=13;break}if(!(c.bottom>s.top&&c.top<s.bottom)){e.next=13;break}return e.abrupt("return",Promise.resolve());case 13:return u=-s.height/4,e.abrupt("return",new Promise((function(e){y(o,{container:a,offset:u,duration:300,callback:function(){return e()}})})));case 15:case"end":return e.stop()}}),e)}))),Ze.apply(this,arguments)}function et(e){return a?a.querySelector('div[data-path="'.concat(WO(e),'"]')):null}function tt(e){var t=et(e);if(t&&a){var n=a.getBoundingClientRect(),r=t.getBoundingClientRect(),i=iu(Ys(l,e))?20:r.height;r.top<n.top+20?y(t,{container:a,offset:-20,duration:0}):r.top+i>n.bottom-20&&y(t,{container:a,offset:-(n.height-i-20),duration:0})}}function nt(e,t){if(void 0!==e.json||void 0!==(null==e?void 0:e.text))if(void 0!==u)T({text:u,json:void 0},e,{contentErrors:be(),patchResult:t});else if(void 0!==l){T({text:void 0,json:l},e,{contentErrors:be(),patchResult:t})}}function rt(e,t){if(!b)return i("handlePatch",e,t),$e(e,t)}function it(e,t){var r=Y,i=l,o=u,a={json:l,text:u},s=pe,c=lE(l,Y,[],ME),f="function"==typeof t?t(e,c):void 0;n(11,l=f&&void 0!==f.json?f.json:e),n(17,Y=f&&void 0!==f.state?f.state:c),n(16,u=void 0),n(24,pe=!1),H=void 0,Se(l),Ce({previousJson:i,previousState:r,previousText:o,previousTextIsRepaired:s});nt(a,null)}function ot(e,t){i("handleChangeText");var r=Y,o=l,a=u,s={json:l,text:u},c=pe;try{n(11,l=_(e)),n(17,Y=lE(l,Y,[],ME)),n(16,u=void 0),n(24,pe=!1),H=void 0}catch(t){try{n(11,l=_(Xl(e))),n(17,Y=lE(l,Y,[],ME)),n(16,u=e),n(24,pe=!0),H=void 0}catch(r){n(11,l=void 0),n(17,Y=oE({json:l,expand:ME})),n(16,u=e),n(24,pe=!1),H=""!==u?aO(u,t.message||String(t)):void 0}}if("function"==typeof t){var f=t(l,Y);n(11,l=f&&f.json?f.json:l),n(17,Y=f&&f.state?f.state:Y)}Se(l),Ce({previousJson:o,previousState:r,previousText:a,previousTextIsRepaired:c});nt(s,null)}function at(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i("expand",{path:e,expanded:t,recursive:r}),n(17,Y=t?r?lE(l,Y,e,EE):function(e,t){return Ri(Ri({},e),{},{expandedMap:Ri(Ri({},e.expandedMap),{},zi({},oc(t),!0))})}(Y,e):uE(Y,e)),Y.selection&&!t&&function(e,t){return GE(fA(e),t)&&(fA(e).length>t.length||PE(e))}(Y.selection,e)&&U(null),ht()}function st(e){i("openFind",{findAndReplace:e}),n(20,X=!1),n(21,Z=!1),la().then((function(){n(20,X=!0),n(21,Z=e)}))}function ct(e,t){i("handleExpandSection",e,t);var r=oc(e);n(17,Y=function(e,t,n,r){return Ri(Ri({},t),{},{visibleSectionsMap:Ri(Ri({},t.visibleSectionsMap),{},zi({},n,tE(aE(t,n).concat(r))))})}(0,Y,r,t))}function lt(e){i("pasted json as text",e),n(19,G=e)}function ut(e){var t=e.anchor,n=e.left,r=e.top,i=e.width,o=e.height,a=e.offsetTop,s=e.offsetLeft,c=e.showTip;W=!0;var u=p(rz,{json:l,documentState:Y,parser:$,showTip:c,onEditKey:_e,onEditValue:Oe,onToggleEnforceString:Me,onCut:Ee,onCopy:Pe,onPaste:Re,onRemove:Ie,onDuplicate:De,onExtract:ze,onInsertBefore:Fe,onInsert:Be,onConvert:qe,onInsertAfter:Ve,onSort:Ge,onTransform:Ye,onCloseContextMenu:function(){m(u),ht()}},{left:n,top:r,offsetTop:a,offsetLeft:s,width:i,height:o,anchor:t,closeOnOuterClick:!0,onClose:function(){W=!1,ht()}})}function ft(e){if(!b&&!rA(Y.selection)){if(e&&(e.stopPropagation(),e.preventDefault()),e&&"contextmenu"===e.type&&e.target!==s)ut({left:e.clientX,top:e.clientY,width:Es,height:Ms,showTip:!1});else{var t,n=null===(t=a)||void 0===t?void 0:t.querySelector(".jse-context-menu-pointer.jse-selected");if(n)ut({anchor:n,offsetTop:2,width:Es,height:Ms,showTip:!1});else{var r,i=null===(r=a)||void 0===r?void 0:r.getBoundingClientRect();i&&ut({top:i.top+2,left:i.left+2,width:Es,height:Ms,showTip:!1})}}return!1}}function dt(){return(dt=ki(bi().mark((function e(){var t,r,o,s,c;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("apply pasted json",G),G){e.next=3;break}return e.abrupt("return");case 3:o=(r=G).path,s=r.contents,n(19,G=void 0),JO(c=(null===(t=a)||void 0===t?void 0:t.querySelector(".jse-editable-div"))||null)&&c.cancel(),rt([{op:"replace",path:oc(o),value:s}],(function(e,t){return{state:OE(e,t,o)}})),setTimeout(ht);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(){i("focus"),s&&(s.focus(),s.select())}function vt(e){return function(e,t,n){var r=fk(n),i=[Mb(n)],o=Ys(e,r),a=o?_E(o,t,i):void 0;return a?XE(r.concat(a),!1):eA(n)}(l,Y,e)}function pt(e){r&&r.onDrag(e)}function mt(){r&&r.onDragEnd()}return e.$$set=function(e){"readOnly"in e&&n(0,b=e.readOnly),"externalContent"in e&&n(52,w=e.externalContent),"externalSelection"in e&&n(53,k=e.externalSelection),"mainMenuBar"in e&&n(1,x=e.mainMenuBar),"navigationBar"in e&&n(2,j=e.navigationBar),"escapeControlCharacters"in e&&n(54,S=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(55,C=e.escapeUnicodeCharacters),"parser"in e&&n(3,$=e.parser),"parseMemoizeOne"in e&&n(56,_=e.parseMemoizeOne),"validator"in e&&n(57,O=e.validator),"validationParser"in e&&n(58,M=e.validationParser),"pathParser"in e&&n(4,E=e.pathParser),"indentation"in e&&n(5,A=e.indentation),"onError"in e&&n(6,P=e.onError),"onChange"in e&&n(59,T=e.onChange),"onChangeMode"in e&&n(60,R=e.onChangeMode),"onSelect"in e&&n(61,N=e.onSelect),"onRenderValue"in e&&n(62,I=e.onRenderValue),"onRenderMenu"in e&&n(7,D=e.onRenderMenu),"onClassName"in e&&n(63,z=e.onClassName),"onFocus"in e&&n(64,L=e.onFocus),"onBlur"in e&&n(65,B=e.onBlur),"onSortModal"in e&&n(66,q=e.onSortModal),"onTransformModal"in e&&n(67,F=e.onTransformModal),"onJSONEditorModal"in e&&n(68,V=e.onJSONEditorModal)},e.$$.update=function(){25165824&e.$$.dirty[1]&&n(76,K=xO({escapeControlCharacters:S,escapeUnicodeCharacters:C})),2097152&e.$$.dirty[1]&&xe(w),4194304&e.$$.dirty[1]&&function(e){if(!Vk(Y.selection,e)){if(i("applyExternalSelection",e),DE(e))return;U(e)}}(k),2048&e.$$.dirty[0]|32768&e.$$.dirty[2]&&ve(te,l),2056&e.$$.dirty[0]|201326592&e.$$.dirty[1]&&ye(l,O,$,M),4096&e.$$.dirty[0]&&n(25,de=function(e){var t={};return e.forEach((function(e){t[oc(e.path)]=e})),e.forEach((function(e){for(var n=e.path;n.length>0;){var r=oc(n=fk(n));r in t||(t[r]={isChildError:!0,path:n,message:"Contains invalid data",severity:es.warning})}})),t}(me)),1024&e.$$.dirty[0]&&(r=a?function(e){var t,n;function r(e){return e<20?as:e<50?ss:cs}function i(){if(e){var n=(t||0)*(os/1e3);e.scrollTop+=n}}function o(e){n&&e===t||(a(),NN("startAutoScroll",e),t=e,n=setInterval(i,os))}function a(){n&&(NN("stopAutoScroll"),clearInterval(n),n=void 0,t=void 0)}return NN("createAutoScrollHandler",e),{onDrag:function(t){if(e){var n=t.clientY,i=e.getBoundingClientRect(),s=i.top,c=i.bottom;n<s?o(-r(s-n)):n>c?o(r(n-c)):a()}},onDragEnd:function(){a()}}}(a):void 0),9&e.$$.dirty[0]|16387&e.$$.dirty[2]&&n(13,he={readOnly:b,parser:$,normalization:K,getJson:we,getDocumentState:ke,findElement:et,findNextInside:vt,focus:ht,onPatch:rt,onInsert:Le,onExpand:at,onSelect:U,onFind:st,onExpandSection:ct,onPasteJson:lt,onRenderValue:I,onContextMenu:ut,onClassName:z||function(){},onDrag:pt,onDragEnd:mt}),8192&e.$$.dirty[0]&&i("context changed",he)},[b,x,j,$,E,A,P,D,function(){return pe&&void 0!==l&&it(l),void 0!==l?{json:l}:{text:u||""}},ht,a,l,me,he,s,c,u,Y,J,G,X,Z,ee,fe,pe,de,o,ne,function(){return ie.apply(this,arguments)},function(){return oe.apply(this,arguments)},function(e,t){return ae.apply(this,arguments)},function(e,t){return se.apply(this,arguments)},function(){n(20,X=!1),n(21,Z=!1),ne(""),ht()},function(e){i("select validation error",e),U(XE(e.path,!1)),Xe(e.path)},Pe,function(e){e.preventDefault(),sq({clipboardText:e.clipboardData.getData("text/plain"),json:l,selection:Y.selection,readOnly:b,parser:$,onPatch:rt,onChangeText:ot,openRepairModal:Ne})},We,Ue,Je,function(){Ke([])},function(){Qe({rootPath:[]})},function(){at([],!0,!0)},function(){at([],!1,!0)},function(e){var t=KO(e),n=e.shiftKey;if(i("keydown",{combo:t,key:e.key}),"Ctrl+X"===t&&(e.preventDefault(),Ee(!0)),"Ctrl+Shift+X"===t&&(e.preventDefault(),Ee(!1)),"Ctrl+C"===t&&(e.preventDefault(),Pe(!0)),"Ctrl+Shift+C"===t&&(e.preventDefault(),Pe(!1)),"Ctrl+D"===t&&(e.preventDefault(),De()),"Delete"!==t&&"Backspace"!==t||(e.preventDefault(),Ie()),"Insert"===t&&(e.preventDefault(),Le("structure")),"Ctrl+A"===t&&(e.preventDefault(),U(XE([],!1))),"Ctrl+Q"===t&&ft(e),"ArrowUp"===t||"Shift+ArrowUp"===t){e.preventDefault();var r=Y.selection?FE(l,Y,n)||Y.selection:WE(l,Y);U(r),tt(fA(r))}if("ArrowDown"===t||"Shift+ArrowDown"===t){e.preventDefault();var o=Y.selection?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.selection;if(!r)return null;var i=n?fA(r):qE(e,r),o=iu(Ys(e,i))?uE(t,i):t,a=_E(e,t,i),s=_E(e,o,i);if(n)return PE(r)?null!==a?tA(a,a):null:AE(r)?null!==s?tA(s,s):null:null!==s?tA(dA(r),s):null;if(AE(r))return null!==s?XE(s,!1):null;if(PE(r))return null!==a?XE(a,!1):null;if(RE(r))return null!==a?XE(a,!1):null;if(TE(r)){if(null===a||0===a.length)return null;var c=Ys(e,fk(a));return Array.isArray(c)?XE(a,!1):YE(a,!1)}return NE(r)?null!==s?XE(s,!1):null!==a?XE(a,!1):null:null}(l,Y,n)||Y.selection:WE(l,Y);U(o),tt(fA(o))}if("ArrowLeft"===t||"Shift+ArrowLeft"===t){e.preventDefault();var a=Y.selection?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=t.selection;if(!i)return null;var o=VE(e,t,r),a=o.caret,s=o.previous;if(n)return NE(i)?null:tA(i.path,i.path);if(a&&s)return aA(s);var c=Ys(e,fk(fA(i)));return RE(i)&&Array.isArray(c)?tA(i.path,i.path):NE(i)&&!Array.isArray(c)?YE(i.focusPath,!1):null}(l,Y,n,!b)||Y.selection:WE(l,Y);U(a),tt(fA(a))}if("ArrowRight"===t||"Shift+ArrowRight"===t){e.preventDefault();var s=Y.selection&&void 0!==l?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=t.selection;if(!i)return null;var o=VE(e,t,r),a=o.caret,s=o.next;return n?NE(i)?null:tA(i.path,i.path):a&&s?aA(s):NE(i)?XE(i.focusPath,!1):null}(l,Y,n,!b)||Y.selection:WE(l,Y);U(s),tt(fA(s))}if("Enter"===t&&Y.selection){if(!b&&IE(Y.selection)){var c=Y.selection.focusPath,u=Ys(l,fk(c));Array.isArray(u)&&U(XE(c,!1))}if(!b&&TE(Y.selection)&&(e.preventDefault(),U(Ri(Ri({},Y.selection),{},{edit:!0}))),RE(Y.selection))e.preventDefault(),iu(Ys(l,Y.selection.path))?at(Y.selection.path,!0):b||U(Ri(Ri({},Y.selection),{},{edit:!0}))}if(1===t.replace(/^Shift\+/,"").length&&Y.selection)return e.preventDefault(),void We(e.key);if("Enter"===t&&(AE(Y.selection)||PE(Y.selection)))return e.preventDefault(),void We("");if("Ctrl+Enter"===t&&RE(Y.selection)){var f=Ys(l,Y.selection.path);lu(f)&&window.open(String(f),"_blank")}"Escape"===t&&Y.selection&&(e.preventDefault(),U(null)),"Ctrl+F"===t&&(e.preventDefault(),st(!1)),"Ctrl+H"===t&&(e.preventDefault(),st(!0)),"Ctrl+Z"===t&&(e.preventDefault(),Ue()),"Ctrl+Shift+Z"===t&&(e.preventDefault(),Je())},function(e){i("handleMouseDown",e),RO(e.target,"BUTTON")||e.target.isContentEditable||(ht(),Y.selection||void 0!==l||""!==u&&void 0!==u||(i("createDefaultSelection"),n(17,Y=Ri(Ri({},Y),{},{selection:XE([],!1)}))))},ft,function(e){b||ut({anchor:FO(e.target,"BUTTON"),offsetTop:0,width:Es,height:Ms,showTip:!0})},function(){return dt.apply(this,arguments)},function(){i("clear pasted json"),n(19,G=void 0),ht()},function(){R(Ya.text)},function(e){U(e),ht(),Xe(fA(e))},function(e){var t=!IO(e.target,(function(e){return e===c}));t&&rA(Y.selection)&&(i("click outside the editor, stop edit mode"),U((function(e){return TE(e)||RE(e)?Ri(Ri({},e),{},{edit:!1}):e})),g&&s&&(s.focus(),s.blur()),i("blur (outside editor)"),s&&s.blur())},w,k,S,C,_,O,M,T,R,N,I,z,L,B,q,F,V,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EE;i("expand");var t=Ri(Ri({},Y),{},{expandedMap:{},visibleSectionsMap:{}});n(17,Y=lE(l,t,[],e))},be,we,$e,Qe,Xe,et,K,te,function(e){n(20,X=e)},function(e){ra[e?"unshift":"push"]((function(){n(14,s=e)}))},function(){ht(),We("{")},function(){ht(),We("[")},function(){ht()},function(e){ra[e?"unshift":"push"]((function(){n(10,a=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(15,c=e)}))}]}var zq=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Dq,Iq,Zi,{readOnly:0,externalContent:52,externalSelection:53,mainMenuBar:1,navigationBar:2,escapeControlCharacters:54,escapeUnicodeCharacters:55,parser:3,parseMemoizeOne:56,validator:57,validationParser:58,pathParser:4,indentation:5,onError:6,onChange:59,onChangeMode:60,onSelect:61,onRenderValue:62,onRenderMenu:7,onClassName:63,onFocus:64,onBlur:65,onSortModal:66,onTransformModal:67,onJSONEditorModal:68,expand:69,validate:70,getJson:71,patch:72,acceptAutoRepair:8,openTransformModal:73,scrollTo:74,findElement:75,focus:9},Cq,[-1,-1,-1,-1,-1]),r}return Di(n,[{key:"expand",get:function(){return this.$$.ctx[69]}},{key:"validate",get:function(){return this.$$.ctx[70]}},{key:"getJson",get:function(){return this.$$.ctx[71]}},{key:"patch",get:function(){return this.$$.ctx[72]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[73]}},{key:"scrollTo",get:function(){return this.$$.ctx[74]}},{key:"findElement",get:function(){return this.$$.ctx[75]}},{key:"focus",get:function(){return this.$$.ctx[9]}}]),n}();function Lq(e){go(e,"svelte-jizu3t",".jse-modal.svelte-jizu3t.svelte-jizu3t{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-jizu3t .jse-modal-contents.svelte-jizu3t{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-jizu3t .jse-modal-contents .jse-actions.svelte-jizu3t{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-jizu3t .jse-modal-contents .jse-actions button.jse-primary.svelte-jizu3t{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-jizu3t .jse-modal-contents .jse-actions button.jse-primary.svelte-jizu3t:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-jizu3t .jse-modal-contents .jse-actions button.jse-primary.svelte-jizu3t:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents.svelte-jizu3t{color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents.svelte-jizu3t{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-jizu3t{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-jizu3t p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-jizu3t p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-jizu3t p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-jizu3t code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-jizu3t{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-jizu3t{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-jizu3t{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-jizu3t{flex:none}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-jizu3t{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-jizu3t{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-actions.svelte-jizu3t{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents.svelte-jizu3t{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-jizu3t{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-jizu3t .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-jizu3t .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-jizu3t .jse-label.svelte-jizu3t{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-jizu3t .jse-label .jse-label-inner.svelte-jizu3t{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-jizu3t .jse-label .jse-label-inner button.svelte-jizu3t{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-jizu3t .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-jizu3t input.svelte-jizu3t,.jse-modal.jse-transform.svelte-jizu3t textarea.svelte-jizu3t{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-jizu3t input.svelte-jizu3t:focus,.jse-modal.jse-transform.svelte-jizu3t textarea.svelte-jizu3t:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-jizu3t input.svelte-jizu3t:read-only,.jse-modal.jse-transform.svelte-jizu3t textarea.svelte-jizu3t:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-jizu3t .jse-preview.jse-error.svelte-jizu3t{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-jizu3t a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-jizu3t a:hover{color:var(--jse-a-color-highlight)}")}function Bq(e){var t,n,r,i,o,a=[Fq,qq],s=[];function c(e,n){return 4096&n[0]&&(t=null),null==t&&(t=!!Array.isArray(e[12])),t?0:1}return n=c(e,[-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),i=Oo()},m:function(e,t){s[n].m(e,t),ko(e,i,t),o=!0},p:function(e,t){var o=n;(n=c(e,t))===o?s[n].p(e,t):(wa(),ja(s[o],1,1,(function(){s[o]=null})),ka(),(r=s[n])?r.p(e,t):(r=s[n]=a[n](e)).c(),xa(r,1),r.m(i.parentNode,i))},i:function(e){o||(xa(r),o=!0)},o:function(e){ja(r),o=!1},d:function(e){e&&xo(i),s[n].d(e)}}}function qq(e){var t;return{c:function(){t=$o("(Only available for arrays, not for objects)")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function Fq(e){var t,n;return t=new kN({props:{queryOptions:e[13],json:e[12],onChange:e[22]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8192&n[0]&&(r.queryOptions=e[13]),4096&n[0]&&(r.json=e[12]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Vq(e){var t,n;return t=new zq({props:{externalContent:e[15],externalSelection:null,readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:e[2],escapeControlCharacters:e[3],escapeUnicodeCharacters:e[4],parser:e[5],parseMemoizeOne:e[6],onRenderValue:e[10],onRenderMenu:e[34],onError:console.error,onChange:zf,onChangeMode:zf,onSelect:zf,onFocus:zf,onBlur:zf,onSortModal:zf,onTransformModal:zf,onJSONEditorModal:zf,onClassName:e[11],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.externalContent=e[15]),4&n[0]&&(r.indentation=e[2]),8&n[0]&&(r.escapeControlCharacters=e[3]),16&n[0]&&(r.escapeUnicodeCharacters=e[4]),32&n[0]&&(r.parser=e[5]),64&n[0]&&(r.parseMemoizeOne=e[6]),1024&n[0]&&(r.onRenderValue=e[10]),2048&n[0]&&(r.onClassName=e[11]),128&n[0]&&(r.validationParser=e[7]),256&n[0]&&(r.pathParser=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Wq(e){var t,n;return{c:function(){t=So("div"),n=$o(e[18]),Po(t,"class","jse-preview jse-error svelte-jizu3t")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){262144&t[0]&&Io(n,e[18])},i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function Hq(e){var t,n;return t=new zq({props:{externalContent:e[19],externalSelection:null,readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:e[2],escapeControlCharacters:e[3],escapeUnicodeCharacters:e[4],parser:e[5],parseMemoizeOne:e[6],onRenderValue:e[10],onRenderMenu:e[35],onError:console.error,onChange:zf,onChangeMode:zf,onSelect:zf,onFocus:zf,onBlur:zf,onSortModal:zf,onTransformModal:zf,onJSONEditorModal:zf,onClassName:e[11],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};524288&n[0]&&(r.externalContent=e[19]),4&n[0]&&(r.indentation=e[2]),8&n[0]&&(r.escapeControlCharacters=e[3]),16&n[0]&&(r.escapeUnicodeCharacters=e[4]),32&n[0]&&(r.parser=e[5]),64&n[0]&&(r.parseMemoizeOne=e[6]),1024&n[0]&&(r.onRenderValue=e[10]),2048&n[0]&&(r.onClassName=e[11]),128&n[0]&&(r.validationParser=e[7]),256&n[0]&&(r.pathParser=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Uq(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,A,P,T,R,N,I,D,z,L,B,q,F,V,W,H,U,J,K=e[21](e[0]).description+"";t=new RN({props:{queryLanguages:e[9],queryLanguageId:e[0],onChangeQueryLanguage:e[27]}}),y=new FM({props:{data:e[16]?NP:pP}});var G=e[16]&&Bq(e);A=new FM({props:{data:e[17]?NP:pP}});var Q=e[17]&&Vq(e),Y=[Hq,Wq],X=[];function Z(e,t){return e[18]?1:0}return z=Z(e),L=X[z]=Y[z](e),{c:function(){Ta(t.$$.fragment),n=_o(),r=So("div"),i=So("div"),o=So("div"),(a=So("div")).innerHTML='<div class="jse-label-inner svelte-jizu3t">Language</div>',s=_o(),c=So("div"),l=_o(),(u=So("div")).innerHTML='<div class="jse-label-inner svelte-jizu3t">Path</div>',f=_o(),d=So("input"),v=_o(),p=So("div"),m=So("div"),g=So("button"),Ta(y.$$.fragment),b=$o("\n Wizard"),w=_o(),G&&G.c(),k=_o(),(x=So("div")).innerHTML='<div class="jse-label-inner svelte-jizu3t">Query</div>',j=_o(),S=So("textarea"),C=_o(),$=So("div"),_=So("div"),O=So("div"),M=So("div"),E=So("button"),Ta(A.$$.fragment),P=$o("\n Original"),T=_o(),Q&&Q.c(),R=_o(),N=So("div"),(I=So("div")).innerHTML='<div class="jse-label-inner svelte-jizu3t">Preview</div>',D=_o(),L.c(),B=_o(),q=So("div"),F=So("button"),V=$o("Transform"),Po(a,"class","jse-label svelte-jizu3t"),Po(c,"class","jse-description svelte-jizu3t"),Po(u,"class","jse-label svelte-jizu3t"),Po(d,"class","jse-path svelte-jizu3t"),Po(d,"type","text"),d.readOnly=!0,Po(d,"title","Selected path"),d.value=h=Fk(e[1])?"(document root)":lM(e[1]),Po(g,"type","button"),Po(g,"class","svelte-jizu3t"),Po(m,"class","jse-label-inner svelte-jizu3t"),Po(p,"class","jse-label svelte-jizu3t"),Po(x,"class","jse-label svelte-jizu3t"),Po(S,"class","jse-query svelte-jizu3t"),Po(S,"spellcheck","false"),S.value=e[14],Po(o,"class","jse-query-contents svelte-jizu3t"),Po(E,"type","button"),Po(E,"class","svelte-jizu3t"),Po(M,"class","jse-label-inner svelte-jizu3t"),Po(O,"class","jse-label svelte-jizu3t"),Po(_,"class","jse-original-data svelte-jizu3t"),Bo(_,"jse-hide",!e[17]),Po(I,"class","jse-label svelte-jizu3t"),Po(N,"class","jse-preview-data svelte-jizu3t"),Po($,"class","jse-data-contents svelte-jizu3t"),Bo($,"jse-hide-original-data",!e[17]),Po(i,"class","jse-main-contents svelte-jizu3t"),Po(F,"type","button"),Po(F,"class","jse-primary svelte-jizu3t"),F.disabled=W=!!e[18],Po(q,"class","jse-actions svelte-jizu3t"),Po(r,"class","jse-modal-contents svelte-jizu3t")},m:function(h,L){Ra(t,h,L),ko(h,n,L),ko(h,r,L),mo(r,i),mo(i,o),mo(o,a),mo(o,s),mo(o,c),c.innerHTML=K,mo(o,l),mo(o,u),mo(o,f),mo(o,d),mo(o,v),mo(o,p),mo(p,m),mo(m,g),Ra(y,g,null),mo(g,b),mo(o,w),G&&G.m(o,null),mo(o,k),mo(o,x),mo(o,j),mo(o,S),mo(i,C),mo(i,$),mo($,_),mo(_,O),mo(O,M),mo(M,E),Ra(A,E,null),mo(E,P),mo(_,T),Q&&Q.m(_,null),mo($,R),mo($,N),mo(N,I),mo(N,D),X[z].m(N,null),mo(r,B),mo(r,q),mo(q,F),mo(F,V),H=!0,U||(J=[Mo(g,"click",e[25]),Mo(S,"input",e[23]),Mo(E,"click",e[26]),Mo(F,"click",e[24]),co(Kq.call(null,F))],U=!0)},p:function(e,n){var r={};512&n[0]&&(r.queryLanguages=e[9]),1&n[0]&&(r.queryLanguageId=e[0]),t.$set(r),(!H||1&n[0])&&K!==(K=e[21](e[0]).description+"")&&(c.innerHTML=K),(!H||2&n[0]&&h!==(h=Fk(e[1])?"(document root)":lM(e[1]))&&d.value!==h)&&(d.value=h);var i={};65536&n[0]&&(i.data=e[16]?NP:pP),y.$set(i),e[16]?G?(G.p(e,n),65536&n[0]&&xa(G,1)):((G=Bq(e)).c(),xa(G,1),G.m(o,k)):G&&(wa(),ja(G,1,1,(function(){G=null})),ka()),(!H||16384&n[0])&&(S.value=e[14]);var a={};131072&n[0]&&(a.data=e[17]?NP:pP),A.$set(a),e[17]?Q?(Q.p(e,n),131072&n[0]&&xa(Q,1)):((Q=Vq(e)).c(),xa(Q,1),Q.m(_,null)):Q&&(wa(),ja(Q,1,1,(function(){Q=null})),ka()),(!H||131072&n[0])&&Bo(_,"jse-hide",!e[17]);var s=z;(z=Z(e))===s?X[z].p(e,n):(wa(),ja(X[s],1,1,(function(){X[s]=null})),ka(),(L=X[z])?L.p(e,n):(L=X[z]=Y[z](e)).c(),xa(L,1),L.m(N,null)),(!H||131072&n[0])&&Bo($,"jse-hide-original-data",!e[17]),(!H||262144&n[0]&&W!==(W=!!e[18]))&&(F.disabled=W)},i:function(e){H||(xa(t.$$.fragment,e),xa(y.$$.fragment,e),xa(G),xa(A.$$.fragment,e),xa(Q),xa(L),H=!0)},o:function(e){ja(t.$$.fragment,e),ja(y.$$.fragment,e),ja(G),ja(A.$$.fragment,e),ja(Q),ja(L),H=!1},d:function(e){e&&(xo(n),xo(r)),Na(t,e),Na(y),G&&G.d(),Na(A),Q&&Q.d(),X[z].d(),U=!1,Qi(J)}}}function Jq(e){var t,n,r,i,o;return n=new cM({props:{$$slots:{default:[Uq]},$$scope:{ctx:e}}}),{c:function(){t=So("div"),Ta(n.$$.fragment),Po(t,"class","jse-modal jse-transform svelte-jizu3t")},m:function(a,s){ko(a,t,s),Ra(n,t,null),r=!0,i||(o=co(nD.call(null,t,e[20])),i=!0)},p:function(e,t){var r={};1048575&t[0]|2048&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n),i=!1,o()}}}function Kq(e){e.focus()}function Gq(e,t,n){var r,i,o=za("jsoneditor:TransformModal"),a=t.id,s=void 0===a?"transform-modal-"+Ts():a,c=t.json,l=t.rootPath,u=void 0===l?[]:l,f=t.indentation,d=t.escapeControlCharacters,h=t.escapeUnicodeCharacters,v=t.parser,p=t.parseMemoizeOne,m=t.validationParser,g=t.pathParser,y=t.queryLanguages,b=t.queryLanguageId,w=t.onChangeQueryLanguage,k=t.onRenderValue,x=t.onClassName,j=t.onTransform,S=ea("simple-modal").close,C="".concat(s,":").concat(oc(u)),$=XP[C]||{},_=!1!==ZP.showWizard,O=!1!==ZP.showOriginal,M=$.queryOptions||{},E=b===$.queryLanguageId&&$.query?$.query:R(b).createQuery(c,$.queryOptions||{}),A=$.isManual||!1,P=void 0,T={text:""};function R(e){return y.find((function(t){return t.id===e}))||y[0]}var N=ib((function(e,t){if(void 0===e)return n(19,T={text:""}),void n(18,P="Error: No JSON");try{o("previewTransform",{query:t});var r=R(b).executeQuery(e,t,v);n(19,T={json:r}),n(18,P=void 0)}catch(e){n(19,T={text:""}),n(18,P=String(e))}}),300);return e.$$set=function(e){"id"in e&&n(28,s=e.id),"json"in e&&n(29,c=e.json),"rootPath"in e&&n(1,u=e.rootPath),"indentation"in e&&n(2,f=e.indentation),"escapeControlCharacters"in e&&n(3,d=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(4,h=e.escapeUnicodeCharacters),"parser"in e&&n(5,v=e.parser),"parseMemoizeOne"in e&&n(6,p=e.parseMemoizeOne),"validationParser"in e&&n(7,m=e.validationParser),"pathParser"in e&&n(8,g=e.pathParser),"queryLanguages"in e&&n(9,y=e.queryLanguages),"queryLanguageId"in e&&n(0,b=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(30,w=e.onChangeQueryLanguage),"onRenderValue"in e&&n(10,k=e.onRenderValue),"onClassName"in e&&n(11,x=e.onClassName),"onTransform"in e&&n(31,j=e.onTransform)},e.$$.update=function(){536870914&e.$$.dirty[0]&&n(12,r=Ys(c,u)),4096&e.$$.dirty[0]&&n(15,i=r?{json:r}:{text:""}),20480&e.$$.dirty[0]&&N(r,E),24577&e.$$.dirty[0]|6&e.$$.dirty[1]&&(n(32,XP[C]={queryOptions:M,query:E,queryLanguageId:b,isManual:A},XP),o("store state in memory",C,XP[C]))},[b,u,f,d,h,v,p,m,g,y,k,x,r,M,E,i,_,O,P,T,S,R,function(e){n(13,M=e),n(14,E=R(b).createQuery(c,e)),n(33,A=!1),o("updateQueryByWizard",{queryOptions:M,query:E,isManual:A})},function(e){n(14,E=e.target.value),n(33,A=!0),o("handleChangeQuery",{query:E,isManual:A})},function(){if(void 0===r)return n(19,T={text:""}),void n(18,P="Error: No JSON");try{o("handleTransform",{query:E});var e=R(b).executeQuery(r,E,v);j([{op:"replace",path:oc(u),value:e}]),S()}catch(e){console.error(e),n(19,T={text:""}),n(18,P=String(e))}},function(){n(16,_=!_),ZP.showWizard=_},function(){n(17,O=!O),ZP.showOriginal=O},function(e){o("handleChangeQueryLanguage",e),n(0,b=e),w(e);var t=R(b);n(14,E=t.createQuery(c,M)),n(33,A=!1)},s,c,w,j,XP,A,function(){},function(){}]}var Qq=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Gq,Jq,Zi,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},Lq,[-1,-1]),r}return Di(n)}(),Yq={};function Xq(e){go(e,"svelte-kctj9r",".jse-modal.svelte-kctj9r.svelte-kctj9r{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-kctj9r .jse-modal-contents.svelte-kctj9r{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-kctj9r .jse-modal-contents .jse-actions.svelte-kctj9r{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-kctj9r .jse-modal-contents .jse-actions button.jse-primary.svelte-kctj9r{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-kctj9r .jse-modal-contents .jse-actions button.jse-primary.svelte-kctj9r:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-kctj9r .jse-modal-contents .jse-actions button.jse-primary.svelte-kctj9r:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-sort.svelte-kctj9r table.svelte-kctj9r{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-kctj9r table th.svelte-kctj9r,.jse-modal.jse-sort.svelte-kctj9r table td.svelte-kctj9r{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-kctj9r table th input.jse-path.svelte-kctj9r,.jse-modal.jse-sort.svelte-kctj9r table td input.jse-path.svelte-kctj9r{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-kctj9r table th input.jse-path.svelte-kctj9r:read-only,.jse-modal.jse-sort.svelte-kctj9r table td input.jse-path.svelte-kctj9r:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-kctj9r table th.svelte-kctj9r .svelte-select input,.jse-modal.jse-sort.svelte-kctj9r table td.svelte-kctj9r .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-kctj9r .jse-space.svelte-kctj9r{height:200px}.jse-modal.jse-sort.svelte-kctj9r .jse-space .jse-error.svelte-kctj9r{color:var(--jse-error-color)}")}function Zq(e){var t,n,r,i,o,a,s;function c(t){e[14](t)}var l={showChevron:!0,items:e[5]};return void 0!==e[1]&&(l.value=e[1]),o=new gN({props:l}),ra.push((function(){return Pa(o,"value",c)})),{c:function(){t=So("tr"),(n=So("th")).textContent="Property",r=_o(),i=So("td"),Ta(o.$$.fragment),Po(n,"class","svelte-kctj9r"),Po(i,"class","svelte-kctj9r")},m:function(e,a){ko(e,t,a),mo(t,n),mo(t,r),mo(t,i),Ra(o,i,null),s=!0},p:function(e,t){var n={};32&t&&(n.items=e[5]),!a&&2&t&&(a=!0,n.value=e[1],fa((function(){return a=!1}))),o.$set(n)},i:function(e){s||(xa(o.$$.fragment,e),s=!0)},o:function(e){ja(o.$$.fragment,e),s=!1},d:function(e){e&&xo(t),Na(o)}}}function eF(e){var t,n;return{c:function(){t=So("div"),n=$o(e[4]),Po(t,"class","jse-error svelte-kctj9r")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){16&t&&Io(n,e[4])},d:function(e){e&&xo(t)}}}function tF(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,A,P,T;r=new mI({props:{title:e[3]?"Sort array items":"Sort object keys"}});var R=e[3]&&(e[5]&&(null===(t=e[5])||void 0===t?void 0:t.length)>1||void 0===e[1])&&Zq(e);function N(t){e[15](t)}var I={showChevron:!0,clearable:!1,items:e[7]};void 0!==e[2]&&(I.value=e[2]),x=new gN({props:I}),ra.push((function(){return Pa(x,"value",N)}));var D=e[4]&&eF(e);return{c:function(){var t;n=So("div"),Ta(r.$$.fragment),i=_o(),o=So("div"),a=So("table"),(s=So("colgroup")).innerHTML='<col width="25%"/> <col width="75%"/>',c=_o(),l=So("tbody"),u=So("tr"),(f=So("th")).textContent="Path",d=_o(),h=So("td"),v=So("input"),m=_o(),R&&R.c(),g=_o(),y=So("tr"),(b=So("th")).textContent="Direction",w=_o(),k=So("td"),Ta(x.$$.fragment),S=_o(),C=So("div"),D&&D.c(),$=_o(),_=So("div"),O=So("button"),M=$o("Sort"),Po(f,"class","svelte-kctj9r"),Po(v,"class","jse-path svelte-kctj9r"),Po(v,"type","text"),v.readOnly=!0,Po(v,"title","Selected path"),v.value=p=Fk(e[0])?"(document root)":lM(e[0]),Po(h,"class","svelte-kctj9r"),Po(b,"class","svelte-kctj9r"),Po(k,"class","svelte-kctj9r"),Po(a,"class","svelte-kctj9r"),Po(C,"class","jse-space svelte-kctj9r"),Po(O,"type","button"),Po(O,"class","jse-primary svelte-kctj9r"),O.disabled=E=!!(e[3]&&e[5]&&(null===(t=e[5])||void 0===t?void 0:t.length)>1)&&!e[1],Po(_,"class","jse-actions svelte-kctj9r"),Po(o,"class","jse-modal-contents svelte-kctj9r"),Po(n,"class","jse-modal jse-sort svelte-kctj9r")},m:function(t,p){ko(t,n,p),Ra(r,n,null),mo(n,i),mo(n,o),mo(o,a),mo(a,s),mo(a,c),mo(a,l),mo(l,u),mo(u,f),mo(u,d),mo(u,h),mo(h,v),mo(l,m),R&&R.m(l,null),mo(l,g),mo(l,y),mo(y,b),mo(y,w),mo(y,k),Ra(x,k,null),mo(o,S),mo(o,C),D&&D.m(C,null),mo(o,$),mo(o,_),mo(_,O),mo(O,M),A=!0,P||(T=[Mo(O,"click",e[8]),co(nF.call(null,O)),co(nD.call(null,n,e[6]))],P=!0)},p:function(e,t){var n,i,o=xi(t,1)[0],a={};8&o&&(a.title=e[3]?"Sort array items":"Sort object keys"),r.$set(a),(!A||1&o&&p!==(p=Fk(e[0])?"(document root)":lM(e[0]))&&v.value!==p)&&(v.value=p),e[3]&&(e[5]&&(null===(n=e[5])||void 0===n?void 0:n.length)>1||void 0===e[1])?R?(R.p(e,o),42&o&&xa(R,1)):((R=Zq(e)).c(),xa(R,1),R.m(l,g)):R&&(wa(),ja(R,1,1,(function(){R=null})),ka());var s={};!j&&4&o&&(j=!0,s.value=e[2],fa((function(){return j=!1}))),x.$set(s),e[4]?D?D.p(e,o):((D=eF(e)).c(),D.m(C,null)):D&&(D.d(1),D=null),(!A||42&o&&E!==(E=!!(e[3]&&e[5]&&(null===(i=e[5])||void 0===i?void 0:i.length)>1)&&!e[1]))&&(O.disabled=E)},i:function(e){A||(xa(r.$$.fragment,e),xa(R),xa(x.$$.fragment,e),A=!0)},o:function(e){ja(r.$$.fragment,e),ja(R),ja(x.$$.fragment,e),A=!1},d:function(e){e&&xo(n),Na(r),R&&R.d(),Na(x),D&&D.d(),P=!1,Qi(T)}}}function nF(e){e.focus()}function rF(e,t,n){var r,i,o,a,s,c=za("jsoneditor:SortModal"),l=t.id,u=t.json,f=t.rootPath,d=t.onSort,h=ea("simple-modal").close,v="".concat(l,":").concat(oc(f)),p=Ys(u,f),m={value:1,label:"ascending"},g=[m,{value:-1,label:"descending"}],y=null===(r=Yq[v])||void 0===r?void 0:r.selectedProperty,b=(null===(i=Yq[v])||void 0===i?void 0:i.selectedDirection)||m,w=void 0;return e.$$set=function(e){"id"in e&&n(9,l=e.id),"json"in e&&n(10,u=e.json),"rootPath"in e&&n(0,f=e.rootPath),"onSort"in e&&n(11,d=e.onSort)},e.$$.update=function(){8&e.$$.dirty&&n(13,a=o&&void 0!==p?G_(p):void 0),8192&e.$$.dirty&&n(5,s=a?a.map(fM):void 0),4102&e.$$.dirty&&(n(12,Yq[v]={selectedProperty:y,selectedDirection:b},Yq),c("store state in memory",v,Yq[v]))},n(3,o=Array.isArray(p)),[f,y,b,o,w,s,h,g,function(){try{var e,t,r;n(4,w=void 0);var i=(null===(e=y)||void 0===e?void 0:e.value)||(null===(t=s)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.value)||[],o=null===(r=b)||void 0===r?void 0:r.value,a=eB(u,f,i,o);d({operations:a,rootPath:f,itemPath:i,direction:o}),h()}catch(e){n(4,w=String(e))}},l,u,d,Yq,a,function(e){n(1,y=e)},function(e){n(2,b=e)}]}var iF=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,rF,tF,Zi,{id:9,json:10,rootPath:0,onSort:11},Xq),r}return Di(n)}();function oF(){}function aF(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(e<.9*t)return e.toFixed()+" B";var n=e/t;if(n<.9*t)return n.toFixed(1)+" KB";var r=n/t;if(r<.9*t)return r.toFixed(1)+" MB";var i=r/t;return i<.9*t?i.toFixed(1)+" GB":(i/t).toFixed(1)+" TB"}function sF(e){var t,n;return t=new UI({props:{items:e[0]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&xi(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function cF(e,t,n){var r,i,o=t.readOnly,a=void 0!==o&&o,s=t.onFormat,c=t.onCompact,l=t.onSort,u=t.onTransform,f=t.onToggleSearch,d=t.onUndo,h=t.onRedo,v=t.canUndo,p=t.canRedo,m=t.canFormat,g=t.canCompact,y=t.canSort,b=t.canTransform,w=t.onRenderMenu,k={type:"button",icon:qP,title:"Search (Ctrl+F)",className:"jse-search",onClick:f};return e.$$set=function(e){"readOnly"in e&&n(1,a=e.readOnly),"onFormat"in e&&n(2,s=e.onFormat),"onCompact"in e&&n(3,c=e.onCompact),"onSort"in e&&n(4,l=e.onSort),"onTransform"in e&&n(5,u=e.onTransform),"onToggleSearch"in e&&n(6,f=e.onToggleSearch),"onUndo"in e&&n(7,d=e.onUndo),"onRedo"in e&&n(8,h=e.onRedo),"canUndo"in e&&n(9,v=e.canUndo),"canRedo"in e&&n(10,p=e.canRedo),"canFormat"in e&&n(11,m=e.canFormat),"canCompact"in e&&n(12,g=e.canCompact),"canSort"in e&&n(13,y=e.canSort),"canTransform"in e&&n(14,b=e.canTransform),"onRenderMenu"in e&&n(15,w=e.onRenderMenu)},e.$$.update=function(){32702&e.$$.dirty&&n(16,i=a?[k,{type:"space"}]:[{type:"button",icon:BL,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:s,disabled:a||!m},{type:"button",icon:qL,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:c,disabled:a||!g},{type:"separator"},{type:"button",icon:zP,title:"Sort",className:"jse-sort",onClick:l,disabled:a||!y},{type:"button",icon:$P,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:a||!b},k,{type:"separator"},{type:"button",icon:PP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!v},{type:"button",icon:AP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!p},{type:"space"}]),98304&e.$$.dirty&&n(0,r=w(i)||i)},[r,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,i]}var lF=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,cF,sF,Zi,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),r}return Di(n)}(),uF=function(){function e(){Ni(this,e)}return Di(e,[{key:"lineAt",value:function(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}},{key:"line",value:function(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}},{key:"replace",value:function(e,t,n){var r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),dF.from(r,this.length-(t-e)+n.length)}},{key:"append",value:function(e){return this.replace(this.length,this.length,e)}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=[];return this.decompose(e,t,n,0),dF.from(n,t-e)}},{key:"eq",value:function(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;for(var t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new pF(this),i=new pF(e),o=t,a=t;;){if(r.next(o),i.next(o),o=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){return new pF(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new mF(this,e,t)}},{key:"iterLines",value:function(e,t){var n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);var r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new gF(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var e=[];return this.flatten(e),e}}],[{key:"of",value:function(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new fF(t):dF.from(fF.split(t,[])):e.empty}}]),e}(),fF=function(e){_i(n,uF);var t=Mi(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t,n=-1,r=yi(e);try{for(r.s();!(t=r.n()).done;){n+=t.value.length+1}}catch(e){r.e(e)}finally{r.f()}return n}(e);return Ni(this,n),(r=t.call(this)).text=e,r.length=i,r}return Di(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.text[i],a=r+o.length;if((t?n:a)>=e)return new yF(r,a,n,o);r=a+1,n++}}},{key:"decompose",value:function(e,t,r,i){var o=e<=0&&t>=this.length?this:new n(vF(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){var a=r.pop(),s=hF(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new n(s,a.length+o.length));else{var c=s.length>>1;r.push(new n(s.slice(0,c)),new n(s.slice(c)))}}else r.push(o)}},{key:"replace",value:function(e,t,r){if(!(r instanceof n))return mi(Pi(n.prototype),"replace",this).call(this,e,t,r);var i=hF(this.text,hF(r.text,vF(this.text,0,e)),t),o=this.length+r.length-(t-e);return i.length<=32?new n(i,o):dF.from(n.split(i,[]),o)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<=t&&o<this.text.length;o++){var a=this.text[o],s=i+a.length;i>e&&o&&(r+=n),e<s&&t>i&&(r+=a.slice(Math.max(0,e-i),t-i)),i=s+1}return r}},{key:"flatten",value:function(e){var t,n=yi(this.text);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(e,t){var r,i=[],o=-1,a=yi(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;i.push(s),o+=s.length+1,32==i.length&&(t.push(new n(i,o)),i=[],o=-1)}}catch(e){a.e(e)}finally{a.f()}return o>-1&&t.push(new n(i,o)),t}}]),n}(),dF=function(e){_i(n,uF);var t=Mi(n);function n(e,r){var i;Ni(this,n),(i=t.call(this)).children=e,i.length=r,i.lines=0;var o,a=yi(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;i.lines+=s.lines}}catch(e){a.e(e)}finally{a.f()}return i}return Di(n,[{key:"lineInner",value:function(e,t,n,r){for(var i=0;;i++){var o=this.children[i],a=r+o.length,s=n+o.lines-1;if((t?s:a)>=e)return o.lineInner(e,t,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(e,t,n,r){for(var i=0,o=0;o<=t&&i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(e<=s&&t>=o){var c=r&((o<=e?1:0)|(s>=t?2:0));o>=e&&s<=t&&!c?n.push(a):a.decompose(e-o,t-o,n,c)}o=s+1}}},{key:"replace",value:function(e,t,r){if(r.lines<this.lines)for(var i=0,o=0;i<this.children.length;i++){var a=this.children[i],s=o+a.length;if(e>=o&&t<=s){var c=a.replace(e-o,t-o,r),l=this.lines-a.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){var u=this.children.slice();return u[i]=c,new n(u,this.length-(t-e)+r.length)}return mi(Pi(n.prototype),"replace",this).call(this,o,s,c)}o=s+1}return mi(Pi(n.prototype),"replace",this).call(this,e,t,r)}},{key:"sliceString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r="",i=0,o=0;i<this.children.length&&o<=t;i++){var a=this.children[i],s=o+a.length;o>e&&i&&(r+=n),e<s&&t>o&&(r+=a.sliceString(e-o,t-o,n)),o=s+1}return r}},{key:"flatten",value:function(e){var t,n=yi(this.children);try{for(n.s();!(t=n.n()).done;){t.value.flatten(e)}}catch(e){n.e(e)}finally{n.f()}}},{key:"scanIdentical",value:function(e,t){if(!(e instanceof n))return 0;for(var r=0,i=xi(t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1],4),o=i[0],a=i[1],s=i[2],c=i[3];;o+=t,a+=t){if(o==s||a==c)return r;var l=this.children[o],u=e.children[a];if(l!=u)return r+l.scanIdentical(u,t);r+=l.length+1}}}],[{key:"from",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.reduce((function(e,t){return e+t.length+1}),-1),i=0,o=yi(e);try{for(o.s();!(t=o.n()).done;){i+=t.value.lines}}catch(e){o.e(e)}finally{o.f()}if(i<32){var a,s=[],c=yi(e);try{for(c.s();!(a=c.n()).done;){a.value.flatten(s)}}catch(e){c.e(e)}finally{c.f()}return new fF(s,r)}var l=Math.max(32,i>>5),u=l<<1,f=l>>1,d=[],h=0,v=-1,p=[];function m(e){var t;if(e.lines>u&&e instanceof n){var r,i=yi(e.children);try{for(i.s();!(r=i.n()).done;){m(r.value)}}catch(e){i.e(e)}finally{i.f()}}else e.lines>f&&(h>f||!h)?(g(),d.push(e)):e instanceof fF&&h&&(t=p[p.length-1])instanceof fF&&e.lines+t.lines<=32?(h+=e.lines,v+=e.length+1,p[p.length-1]=new fF(t.text.concat(e.text),t.length+1+e.length)):(h+e.lines>l&&g(),h+=e.lines,v+=e.length+1,p.push(e))}function g(){0!=h&&(d.push(1==p.length?p[0]:n.from(p,v)),v=-1,h=p.length=0)}var y,b=yi(e);try{for(b.s();!(y=b.n()).done;){m(y.value)}}catch(e){b.e(e)}finally{b.f()}return g(),1==d.length?d[0]:new n(d,r)}}]),n}();function hF(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,i=0,o=0,a=!0;o<e.length&&i<=r;o++){var s=e[o],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(t[t.length-1]+=s,a=!1):t.push(s)),i=c+1}return t}function vF(e,t,n){return hF(e,[""],t,n)}uF.empty=new fF([""],0);var pF=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Ni(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof fF?t.text.length:t.children.length)<<1]}return Di(e,[{key:"nextInner",value:function(e,t){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof fF?r.text.length:r.children.length;if(o==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof fF){var s=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{var c=r.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof fF?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}]),e}(),mF=function(){function e(t,n,r){Ni(this,e),this.value="",this.done=!1,this.cursor=new pF(t,n>r?-1:1),this.pos=n>r?t.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return Di(e,[{key:"nextInner",value:function(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);var n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;var r=this.cursor.next(e).value;return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),e}(),gF=function(){function e(t){Ni(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return Di(e,[{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.inner.next(e),n=t.done,r=t.lineBreak,i=t.value;return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),e}();"undefined"!=typeof Symbol&&(uF.prototype[Symbol.iterator]=function(){return this.iter()},pF.prototype[Symbol.iterator]=mF.prototype[Symbol.iterator]=gF.prototype[Symbol.iterator]=function(){return this});for(var yF=function(){function e(t,n,r,i){Ni(this,e),this.from=t,this.to=n,this.number=r,this.text=i}return Di(e,[{key:"length",get:function(){return this.to-this.from}}]),e}(),bF="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((function(e){return e?parseInt(e,36):1})),wF=1;wF<bF.length;wF++)bF[wF]+=bF[wF-1];function kF(e){for(var t=1;t<bF.length;t+=2)if(bF[t]>e)return bF[t-1]<=e;return!1}function xF(e){return e>=127462&&e<=127487}var jF=8205;function SF(e,t){return(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?CF:$F)(e,t,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function CF(e,t,n){if(t==e.length)return t;t&&_F(e.charCodeAt(t))&&OF(e.charCodeAt(t-1))&&t--;var r=MF(e,t);for(t+=AF(r);t<e.length;){var i=MF(e,t);if(r==jF||i==jF||n&&kF(i))t+=AF(i),r=i;else{if(!xF(i))break;for(var o=0,a=t-2;a>=0&&xF(MF(e,a));)o++,a-=2;if(o%2==0)break;t+=2}}return t}function $F(e,t,n){for(;t>0;){var r=CF(e,t-2,n);if(r<t)return r;t--}return 0}function _F(e){return e>=56320&&e<57344}function OF(e){return e>=55296&&e<56320}function MF(e,t){var n=e.charCodeAt(t);if(!OF(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return _F(r)?r-56320+(n-55296<<10)+65536:n}function EF(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function AF(e){return e<65536?1:2}var PF=/\r\n?|\n/,TF=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(TF||(TF={})),RF=function(){function e(t){Ni(this,e),this.sections=t}return Di(e,[{key:"length",get:function(){for(var e=0,t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}},{key:"newLength",get:function(){for(var e=0,t=0;t<this.sections.length;t+=2){var n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}},{key:"empty",get:function(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}},{key:"iterGaps",value:function(e){for(var t=0,n=0,r=0;t<this.sections.length;){var i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}},{key:"iterChangedRanges",value:function(e){zF(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var t=[],n=0;n<this.sections.length;){var r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new e(t)}},{key:"composeDesc",value:function(e){return this.empty?e:e.empty?this:BF(this,e)}},{key:"mapDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:LF(this,e,t)}},{key:"mapPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:TF.Simple,r=0,i=0,o=0;o<this.sections.length;){var a=this.sections[o++],s=this.sections[o++],c=r+a;if(s<0){if(c>e)return i+(e-r);i+=a}else{if(n!=TF.Simple&&c>=e&&(n==TF.TrackDel&&r<e&&c>e||n==TF.TrackBefore&&r<e||n==TF.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!a)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw new RangeError("Position ".concat(e," is out of range for changeset of length ").concat(r));return i}},{key:"touchesRange",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=0,r=0;n<this.sections.length&&r<=t;){var i=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&i>=e)return!(r<e&&i>t)||"cover";r=i}return!1}},{key:"toString",value:function(){for(var e="",t=0;t<this.sections.length;){var n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(t){if(!Array.isArray(t)||t.length%2||t.some((function(e){return"number"!=typeof e})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new e(t)}},{key:"create",value:function(t){return new e(t)}}]),e}(),NF=function(e){_i(n,RF);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this,e)).inserted=r,i}return Di(n,[{key:"apply",value:function(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return zF(this,(function(t,n,r,i,o){return e=e.replace(r,r+(n-t),o)}),!1),e}},{key:"mapDesc",value:function(e){return LF(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(e){for(var t=this.sections.slice(),r=[],i=0,o=0;i<t.length;i+=2){var a=t[i],s=t[i+1];if(s>=0){t[i]=s,t[i+1]=a;for(var c=i>>1;r.length<c;)r.push(uF.empty);r.push(a?e.slice(o,o+a):uF.empty)}o+=a}return new n(t,r)}},{key:"compose",value:function(e){return this.empty?e:e.empty?this:BF(this,e,!0)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:LF(this,e,t,!0)}},{key:"iterChanges",value:function(e){zF(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return RF.create(this.sections)}},{key:"filter",value:function(e){var t=[],r=[],i=[],o=new qF(this);e:for(var a=0,s=0;;){for(var c=a==e.length?1e9:e[a++];s<c||s==c&&0==o.len;){if(o.done)break e;var l=Math.min(o.len,c-s);IF(i,l,-1);var u=-1==o.ins?-1:0==o.off?o.ins:0;IF(t,l,u),u>0&&DF(r,t,o.text),o.forward(l),s+=l}for(var f=e[a++];s<f;){if(o.done)break e;var d=Math.min(o.len,f-s);IF(t,d,-1),IF(i,d,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(d),s+=d}}return{changes:new n(t,r),filtered:RF.create(i)}}},{key:"toJSON",value:function(){for(var e=[],t=0;t<this.sections.length;t+=2){var n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}}],[{key:"of",value:function(e,t,r){var i=[],o=[],a=0,s=null;function c(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||i.length){a<t&&IF(i,t-a,-1);var e=new n(i,o);s=s?s.compose(e.map(s)):e,i=[],o=[],a=0}}return function e(l){if(Array.isArray(l)){var u,f=yi(l);try{for(f.s();!(u=f.n()).done;){e(u.value)}}catch(e){f.e(e)}finally{f.f()}}else if(l instanceof n){if(l.length!=t)throw new RangeError("Mismatched change set length (got ".concat(l.length,", expected ").concat(t,")"));c(),s=s?s.compose(l.map(s)):l}else{var d=l.from,h=l.to,v=void 0===h?d:h,p=l.insert;if(d>v||d<0||v>t)throw new RangeError("Invalid change range ".concat(d," to ").concat(v," (in doc of length ").concat(t,")"));var m=p?"string"==typeof p?uF.of(p.split(r||PF)):p:uF.empty,g=m.length;if(d==v&&0==g)return;d<a&&c(),d>a&&IF(i,d-a,-1),IF(i,v-d,g),DF(o,i,m),a=v}}(e),c(!s),s}},{key:"empty",value:function(e){return new n(e?[e,-1]:[],[])}},{key:"fromJSON",value:function(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");for(var t=[],r=[],i=0;i<e.length;i++){var o=e[i];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some((function(e,t){return t&&"string"!=typeof e})))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;r.length<i;)r.push(uF.empty);r[i]=uF.of(o.slice(1)),t.push(o[0],r[i].length)}}}return new n(t,r)}},{key:"createSet",value:function(e,t){return new n(e,t)}}]),n}();function IF(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!(0==t&&n<=0)){var i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}}function DF(e,t,n){if(0!=n.length){var r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(uF.empty);e.push(n)}}}function zF(e,t,n){for(var r=e.inserted,i=0,o=0,a=0;a<e.sections.length;){var s=e.sections[a++],c=e.sections[a++];if(c<0)i+=s,o+=s;else{for(var l=i,u=o,f=uF.empty;l+=s,u+=c,c&&r&&(f=f.append(r[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],c=e.sections[a++];t(i,l,o,u,f),i=l,o=u}}}function LF(e,t,n){for(var r=[],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,o=new qF(e),a=new qF(t),s=-1;;)if(-1==o.ins&&-1==a.ins){var c=Math.min(o.len,a.len);IF(r,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||s==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!n))){var l=a.len;for(IF(r,a.ins,-1);l;){var u=Math.min(o.len,l);o.ins>=0&&s<o.i&&o.len<=u&&(IF(r,0,o.ins),i&&DF(i,r,o.text),s=o.i),o.forward(u),l-=u}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return i?NF.createSet(r,i):RF.create(r);throw new Error("Mismatched change set lengths")}for(var f=0,d=o.len;d;)if(-1==a.ins){var h=Math.min(d,a.len);f+=h,d-=h,a.forward(h)}else{if(!(0==a.ins&&a.len<d))break;d-=a.len,a.next()}IF(r,f,s<o.i?o.ins:0),i&&s<o.i&&DF(i,r,o.text),s=o.i,o.forward(o.len-d)}}function BF(e,t){for(var n=[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?[]:null,i=new qF(e),o=new qF(t),a=!1;;){if(i.done&&o.done)return r?NF.createSet(n,r):RF.create(n);if(0==i.ins)IF(n,i.len,0,a),i.next();else if(0!=o.len||o.done){if(i.done||o.done)throw new Error("Mismatched change set lengths");var s=Math.min(i.len2,o.len),c=n.length;if(-1==i.ins){var l=-1==o.ins?-1:o.off?0:o.ins;IF(n,s,l,a),r&&l&&DF(r,n,o.text)}else-1==o.ins?(IF(n,i.off?0:i.len,s,a),r&&DF(r,n,i.textBit(s))):(IF(n,i.off?0:i.len,o.off?0:o.ins,a),r&&!o.off&&DF(r,n,o.text));a=(i.ins>s||o.ins>=0&&o.len>s)&&(a||n.length>c),i.forward2(s),o.forward(s)}else IF(n,0,o.ins,a),r&&DF(r,n,o.text),o.next()}}var qF=function(){function e(t){Ni(this,e),this.set=t,this.i=0,this.next()}return Di(e,[{key:"next",value:function(){var e=this.set.sections;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}},{key:"done",get:function(){return-2==this.ins}},{key:"len2",get:function(){return this.ins<0?this.len:this.ins}},{key:"text",get:function(){var e=this.set.inserted,t=this.i-2>>1;return t>=e.length?uF.empty:e[t]}},{key:"textBit",value:function(e){var t=this.set.inserted,n=this.i-2>>1;return n>=t.length&&!e?uF.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}},{key:"forward",value:function(e){e==this.len?this.next():(this.len-=e,this.off+=e)}},{key:"forward2",value:function(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}]),e}(),FF=function(){function e(t,n,r){Ni(this,e),this.from=t,this.to=n,this.flags=r}return Di(e,[{key:"anchor",get:function(){return 32&this.flags?this.to:this.from}},{key:"head",get:function(){return 32&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 8&this.flags?-1:16&this.flags?1:0}},{key:"bidiLevel",get:function(){var e=7&this.flags;return 7==e?null:e}},{key:"goalColumn",get:function(){var e=this.flags>>6;return 16777215==e?void 0:e}},{key:"map",value:function(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return this.empty?n=r=t.mapPos(this.from,i):(n=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new e(n,r,this.flags)}},{key:"extend",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e<=this.anchor&&t>=this.anchor)return VF.range(e,t);var n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return VF.range(this.anchor,n)}},{key:"eq",value:function(e){return this.anchor==e.anchor&&this.head==e.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return VF.range(e.anchor,e.head)}},{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),VF=function(){function e(t,n){Ni(this,e),this.ranges=t,this.mainIndex=n}return Di(e,[{key:"map",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t.empty?this:e.create(this.ranges.map((function(e){return e.map(t,n)})),this.mainIndex)}},{key:"eq",value:function(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}},{key:"main",get:function(){return this.ranges[this.mainIndex]}},{key:"asSingle",value:function(){return 1==this.ranges.length?this:new e([this.main],0)}},{key:"addRange",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map((function(e){return e.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new e(t.ranges.map((function(e){return FF.fromJSON(e)})),t.main)}},{key:"single",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e([e.range(t,n)],0)}},{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==t.length)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i<t.length;i++){var o=t[i];if(o.empty?o.from<=r:o.from<r)return e.normalized(t.slice(),n);r=o.to}return new e(t,n)}},{key:"cursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return FF.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}},{key:"range",value:function(e,t,n,r){var i=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return t<e?FF.create(t,e,48|i):FF.create(e,t,(t>e?8:0)|i)}},{key:"normalized",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t[n];t.sort((function(e,t){return e.from-t.from})),n=t.indexOf(r);for(var i=1;i<t.length;i++){var o=t[i],a=t[i-1];if(o.empty?o.from<=a.to:o.from<a.to){var s=a.from,c=Math.max(o.to,a.to);i<=n&&n--,t.splice(--i,2,o.anchor>o.head?e.range(c,s):e.range(s,c))}}return new e(t,n)}}]),e}();function WF(e,t){var n,r=yi(e.ranges);try{for(r.s();!(n=r.n()).done;){if(n.value.to>t)throw new RangeError("Selection points outside of document")}}catch(e){r.e(e)}finally{r.f()}}var HF=0,UF=function(){function e(t,n,r,i,o){Ni(this,e),this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=HF++,this.default=t([]),this.extensions="function"==typeof o?o(this):o}return Di(e,[{key:"reader",get:function(){return this}},{key:"of",value:function(e){return new KF([],this,0,e)}},{key:"compute",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new KF(e,this,1,t)}},{key:"computeN",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new KF(e,this,2,t)}},{key:"from",value:function(e,t){return t||(t=function(e){return e}),this.compute([e],(function(n){return t(n.field(e))}))}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t.combine||function(e){return e},t.compareInput||function(e,t){return e===t},t.compare||(t.combine?function(e,t){return e===t}:JF),!!t.static,t.enables)}}]),e}();function JF(e,t){return e==t||e.length==t.length&&e.every((function(e,n){return e===t[n]}))}var KF=function(){function e(t,n,r,i){Ni(this,e),this.dependencies=t,this.facet=n,this.type=r,this.value=i,this.id=HF++}return Di(e,[{key:"dynamicSlot",value:function(e){var t,n,r=this,i=this.value,o=this.facet.compareInput,a=this.id,s=e[a]>>1,c=2==this.type,l=!1,u=!1,f=[],d=yi(this.dependencies);try{for(d.s();!(n=d.n()).done;){var h=n.value;"doc"==h?l=!0:"selection"==h?u=!0:0==(1&(null!==(t=e[h.id])&&void 0!==t?t:1))&&f.push(e[h.id])}}catch(e){d.e(e)}finally{d.f()}return{create:function(e){return e.values[s]=i(e),1},update:function(e,t){if(l&&t.docChanged||u&&(t.docChanged||t.selection)||QF(e,f)){var n=i(e);if(c?!GF(n,e.values[s],o):!o(n,e.values[s]))return e.values[s]=n,1}return 0},reconfigure:function(e,t){var n,l=t.config.address[a];if(null!=l){var u=uV(t,l);if(r.dependencies.every((function(n){return n instanceof UF?t.facet(n)===e.facet(n):!(n instanceof XF)||t.field(n,!1)==e.field(n,!1)}))||(c?GF(n=i(e),u,o):o(n=i(e),u)))return e.values[s]=u,0}else n=i(e);return e.values[s]=n,1}}}}]),e}();function GF(e,t,n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function QF(e,t){var n,r=!1,i=yi(t);try{for(i.s();!(n=i.n()).done;){1&lV(e,n.value)&&(r=!0)}}catch(e){i.e(e)}finally{i.f()}return r}var YF=UF.define({static:!0}),XF=function(){function e(t,n,r,i,o){Ni(this,e),this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}return Di(e,[{key:"create",value:function(e){var t=this,n=e.facet(YF).find((function(e){return e.field==t}));return((null==n?void 0:n.create)||this.createF)(e)}},{key:"slot",value:function(e){var t=this,n=e[this.id]>>1;return{create:function(e){return e.values[n]=t.create(e),1},update:function(e,r){var i=e.values[n],o=t.updateF(i,r);return t.compareF(i,o)?0:(e.values[n]=o,1)},reconfigure:function(e,r){return null!=r.config.address[t.id]?(e.values[n]=r.field(t),0):(e.values[n]=t.create(e),1)}}}},{key:"init",value:function(e){return[this,YF.of({field:this,create:e})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(t){var n=new e(HF++,t.create,t.update,t.compare||function(e,t){return e===t},t);return t.provide&&(n.provides=t.provide(n)),n}}]),e}(),ZF=4,eV=3,tV=2,nV=1;function rV(e){return function(t){return new oV(t,e)}}var iV={highest:rV(0),high:rV(nV),default:rV(tV),low:rV(eV),lowest:rV(ZF)},oV=Di((function e(t,n){Ni(this,e),this.inner=t,this.prec=n})),aV=function(){function e(){Ni(this,e)}return Di(e,[{key:"of",value:function(e){return new sV(this,e)}},{key:"reconfigure",value:function(t){return e.reconfigure.of({compartment:this,extension:t})}},{key:"get",value:function(e){return e.config.compartments.get(this)}}]),e}(),sV=Di((function e(t,n){Ni(this,e),this.compartment=t,this.inner=n})),cV=function(){function e(t,n,r,i,o,a){for(Ni(this,e),this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}return Di(e,[{key:"staticFacet",value:function(e){var t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}}],[{key:"resolve",value:function(t,n,r){var i,o=[],a=Object.create(null),s=new Map,c=yi(function(e,t,n){var r=[[],[],[],[],[]],i=new Map;function o(e,a){var s=i.get(e);if(null!=s){if(s<=a)return;var c=r[s].indexOf(e);c>-1&&r[s].splice(c,1),e instanceof sV&&n.delete(e.compartment)}if(i.set(e,a),Array.isArray(e)){var l,u=yi(e);try{for(u.s();!(l=u.n()).done;){o(l.value,a)}}catch(e){u.e(e)}finally{u.f()}}else if(e instanceof sV){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");var f=t.get(e.compartment)||e.inner;n.set(e.compartment,f),o(f,a)}else if(e instanceof oV)o(e.inner,e.prec);else if(e instanceof XF)r[a].push(e),e.provides&&o(e.provides,a);else if(e instanceof KF)r[a].push(e),e.facet.extensions&&o(e.facet.extensions,tV);else{var d=e.extension;if(!d)throw new Error("Unrecognized extension value in extension set (".concat(e,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));o(d,a)}}return o(e,tV),r.reduce((function(e,t){return e.concat(t)}))}(t,n,s));try{for(c.s();!(i=c.n()).done;){var l=i.value;l instanceof XF?o.push(l):(a[l.facet.id]||(a[l.facet.id]=[])).push(l)}}catch(e){c.e(e)}finally{c.f()}for(var u=Object.create(null),f=[],d=[],h=function(){var e=p[v];u[e.id]=d.length<<1,d.push((function(t){return e.slot(t)}))},v=0,p=o;v<p.length;v++)h();var m=null==r?void 0:r.config.facets,g=function(){var e=a[y],t=e[0].facet,n=m&&m[y]||[];if(e.every((function(e){return 0==e.type})))if(u[t.id]=f.length<<1|1,JF(n,e))f.push(r.facet(t));else{var i=t.combine(e.map((function(e){return e.value})));f.push(r&&t.compare(i,r.facet(t))?r.facet(t):i)}else{var o,s=yi(e);try{var c=function(){var e=o.value;0==e.type?(u[e.id]=f.length<<1|1,f.push(e.value)):(u[e.id]=d.length<<1,d.push((function(t){return e.dynamicSlot(t)})))};for(s.s();!(o=s.n()).done;)c()}catch(e){s.e(e)}finally{s.f()}u[t.id]=d.length<<1,d.push((function(n){return function(e,t,n){var r=n.map((function(t){return e[t.id]})),i=n.map((function(e){return e.type})),o=r.filter((function(e){return!(1&e)})),a=e[t.id]>>1;function s(e){for(var n=[],o=0;o<r.length;o++){var a=uV(e,r[o]);if(2==i[o]){var s,c=yi(a);try{for(c.s();!(s=c.n()).done;){var l=s.value;n.push(l)}}catch(e){c.e(e)}finally{c.f()}}else n.push(a)}return t.combine(n)}return{create:function(e){var t,n=yi(r);try{for(n.s();!(t=n.n()).done;)lV(e,t.value)}catch(e){n.e(e)}finally{n.f()}return e.values[a]=s(e),1},update:function(e,n){if(!QF(e,o))return 0;var r=s(e);return t.compare(r,e.values[a])?0:(e.values[a]=r,1)},reconfigure:function(e,i){var o=QF(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!o&&JF(n,c))return e.values[a]=l,0;var u=s(e);return t.compare(u,l)?(e.values[a]=l,0):(e.values[a]=u,1)}}}(n,t,e)}))}};for(var y in a)g();return new e(t,s,d.map((function(e){return e(u)})),u,f,a)}}]),e}();function lV(e,t){if(1&t)return 2;var n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;var i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function uV(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}var fV=UF.define(),dV=UF.define({combine:function(e){return e.some((function(e){return e}))},static:!0}),hV=UF.define({combine:function(e){return e.length?e[0]:void 0},static:!0}),vV=UF.define(),pV=UF.define(),mV=UF.define(),gV=UF.define({combine:function(e){return!!e.length&&e[0]}}),yV=function(){function e(t,n){Ni(this,e),this.type=t,this.value=n}return Di(e,null,[{key:"define",value:function(){return new bV}}]),e}(),bV=function(){function e(){Ni(this,e)}return Di(e,[{key:"of",value:function(e){return new yV(this,e)}}]),e}(),wV=function(){function e(t){Ni(this,e),this.map=t}return Di(e,[{key:"of",value:function(e){return new kV(this,e)}}]),e}(),kV=function(){function e(t,n){Ni(this,e),this.type=t,this.value=n}return Di(e,[{key:"map",value:function(t){var n=this.type.map(this.value,t);return void 0===n?void 0:n==this.value?this:new e(this.type,n)}},{key:"is",value:function(e){return this.type==e}}],[{key:"define",value:function(){return new wV((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(e,t){if(!e.length)return e;var n,r=[],i=yi(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.map(t);o&&r.push(o)}}catch(e){i.e(e)}finally{i.f()}return r}}]),e}();kV.reconfigure=kV.define(),kV.appendConfig=kV.define();var xV=function(){function e(t,n,r,i,o,a){Ni(this,e),this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&WF(r,n.newLength),o.some((function(t){return t.type==e.time}))||(this.annotations=o.concat(e.time.of(Date.now())))}return Di(e,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(e){var t,n=yi(this.annotations);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.type==e)return r.value}}catch(e){n.e(e)}finally{n.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(t){var n=this.annotation(e.userEvent);return!(!n||!(n==t||n.length>t.length&&n.slice(0,t.length)==t&&"."==n[t.length]))}}],[{key:"create",value:function(t,n,r,i,o,a){return new e(t,n,r,i,o,a)}}]),e}();function jV(e,t){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],a=e[r++];else{if(!(i<t.length))return n;o=t[i++],a=t[i++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function SV(e,t,n){var r,i,o,a;return n?(i=t.changes,o=NF.empty(t.changes.length),a=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(i)),{changes:a,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:kV.mapEffects(e.effects,i).concat(kV.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function CV(e,t,n){var r=t.selection,i=OV(t.annotations);return t.userEvent&&(i=i.concat(xV.userEvent.of(t.userEvent))),{changes:t.changes instanceof NF?t.changes:NF.of(t.changes||[],n,e.facet(hV)),selection:r&&(r instanceof VF?r:VF.single(r.anchor,r.head)),effects:OV(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function $V(e,t,n){var r=CV(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(var i=1;i<t.length;i++){!1===t[i].filter&&(n=!1);var o=!!t[i].sequential;r=SV(r,CV(e,t[i],o?r.changes.newLength:e.doc.length),o)}var a=xV.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){for(var t=e.startState,n=t.facet(mV),r=e,i=n.length-1;i>=0;i--){var o=n[i](e);o&&Object.keys(o).length&&(r=SV(r,CV(t,o,e.changes.newLength),!0))}return r==e?e:xV.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){var t,n=e.startState,r=!0,i=yi(n.facet(vV));try{for(i.s();!(t=i.n()).done;){var o=(0,t.value)(e);if(!1===o){r=!1;break}Array.isArray(o)&&(r=!0===r?o:jV(r,o))}}catch(e){i.e(e)}finally{i.f()}if(!0!==r){var a,s;if(!1===r)s=e.changes.invertedDesc,a=NF.empty(n.doc.length);else{var c=e.changes.filter(r);a=c.changes,s=c.filtered.mapDesc(c.changes).invertedDesc}e=xV.create(n,a,e.selection&&e.selection.map(s),kV.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}for(var l=n.facet(pV),u=l.length-1;u>=0;u--){var f=l[u](e);e=f instanceof xV?f:Array.isArray(f)&&1==f.length&&f[0]instanceof xV?f[0]:$V(n,OV(f),!1)}return e}(a):a)}xV.time=yV.define(),xV.userEvent=yV.define(),xV.addToHistory=yV.define(),xV.remote=yV.define();var _V=[];function OV(e){return null==e?_V:Array.isArray(e)?e:[e]}var MV,EV=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(EV||(EV={})),AV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{MV=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(U_){}function PV(e){return function(t){if(!/\S/.test(t))return EV.Space;if(function(e){if(MV)return MV.test(e);for(var t=0;t<e.length;t++){var n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||AV.test(n)))return!0}return!1}(t))return EV.Word;for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return EV.Word;return EV.Other}}var TV=function(){function e(t,n,r,i,o,a){Ni(this,e),this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(var s=0;s<this.config.dynamicSlots.length;s++)lV(this,s<<1);this.computeSlot=null}return Di(e,[{key:"field",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.config.address[e.id];if(null!=n)return lV(this,n),uV(this,n);if(t)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $V(this,t,!0)}},{key:"applyTransaction",value:function(t){var n,r,i=this,o=this.config,a=o,s=a.base,c=a.compartments,l=yi(t.effects);try{for(l.s();!(n=l.n()).done;){var u=n.value;u.is(aV.reconfigure)?(o&&(c=new Map,o.compartments.forEach((function(e,t){return c.set(t,e)})),o=null),c.set(u.value.compartment,u.value.extension)):u.is(kV.reconfigure)?(o=null,s=u.value):u.is(kV.appendConfig)&&(o=null,s=OV(s).concat(u.value))}}catch(e){l.e(e)}finally{l.f()}o?r=t.startState.values.slice():r=new e(o=cV.resolve(s,c,this),this.doc,this.selection,o.dynamicSlots.map((function(){return null})),(function(e,t){return t.reconfigure(e,i)}),null).values;new e(o,t.newDoc,t.newSelection,r,(function(e,n){return n.update(e,t)}),t)}},{key:"replaceSelection",value:function(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange((function(t){return{changes:{from:t.from,to:t.to,insert:e},range:VF.cursor(t.from+e.length)}}))}},{key:"changeByRange",value:function(e){for(var t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=OV(n.effects),a=1;a<t.ranges.length;a++){for(var s=e(t.ranges[a]),c=this.changes(s.changes),l=c.map(r),u=0;u<a;u++)i[u]=i[u].map(l);var f=r.mapDesc(c,!0);i.push(s.range.map(f)),r=r.compose(l),o=kV.mapEffects(o,l).concat(kV.mapEffects(OV(s.effects),f))}return{changes:r,selection:VF.create(i,t.mainIndex),effects:o}}},{key:"changes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof NF?t:NF.of(t,this.doc.length,this.facet(e.lineSeparator))}},{key:"toText",value:function(t){return uF.of(t.split(this.facet(e.lineSeparator)||PF))}},{key:"sliceDoc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(e,t,this.lineBreak)}},{key:"facet",value:function(e){var t=this.config.address[e.id];return null==t?e.default:(lV(this,t),uV(this,t))}},{key:"toJSON",value:function(e){var t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(var n in e){var r=e[n];r instanceof XF&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}},{key:"tabSize",get:function(){return this.facet(e.tabSize)}},{key:"lineBreak",get:function(){return this.facet(e.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(gV)}},{key:"phrase",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o,a=yi(this.facet(e.phrases));try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Object.prototype.hasOwnProperty.call(s,t)){t=s[t];break}}}catch(e){a.e(e)}finally{a.f()}return r.length&&(t=t.replace(/\$(\$|\d*)/g,(function(e,t){if("$"==t)return"$";var n=+(t||1);return!n||n>r.length?e:r[n-1]}))),t}},{key:"languageDataAt",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=yi(this.facet(fV));try{for(o.s();!(n=o.n()).done;){var a,s=yi((0,n.value)(this,t,r));try{for(s.s();!(a=s.n()).done;){var c=a.value;Object.prototype.hasOwnProperty.call(c,e)&&i.push(c[e])}}catch(e){s.e(e)}finally{s.f()}}}catch(e){o.e(e)}finally{o.f()}return i}},{key:"charCategorizer",value:function(e){return PV(this.languageDataAt("wordChars",e).join(""))}},{key:"wordAt",value:function(e){for(var t=this.doc.lineAt(e),n=t.text,r=t.from,i=t.length,o=this.charCategorizer(e),a=e-r,s=e-r;a>0;){var c=SF(n,a,!1);if(o(n.slice(c,a))!=EV.Word)break;a=c}for(;s<i;){var l=SF(n,s);if(o(n.slice(s,l))!=EV.Word)break;s=l}return a==s?null:VF.range(a+r,s+r)}}],[{key:"fromJSON",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");var i=[];if(r){var o=function(){if(Object.prototype.hasOwnProperty.call(t,a)){var e=r[a],n=t[a];i.push(e.init((function(t){return e.spec.fromJSON(n,t)})))}};for(var a in r)o()}return e.create({doc:t.doc,selection:VF.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=cV.resolve(t.extensions||[],new Map),r=t.doc instanceof uF?t.doc:uF.of((t.doc||"").split(n.staticFacet(e.lineSeparator)||PF)),i=t.selection?t.selection instanceof VF?t.selection:VF.single(t.selection.anchor,t.selection.head):VF.single(0);return WF(i,r.length),n.staticFacet(dV)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map((function(){return null})),(function(e,t){return t.create(e)}),null)}}]),e}();function RV(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={},o=yi(e);try{for(o.s();!(n=o.n()).done;)for(var a=n.value,s=0,c=Object.keys(a);s<c.length;s++){var l=c[s],u=a[l],f=i[l];if(void 0===f)i[l]=u;else if(f===u||void 0===u);else{if(!Object.hasOwnProperty.call(r,l))throw new Error("Config merge conflict for field "+l);i[l]=r[l](f,u)}}}catch(e){o.e(e)}finally{o.f()}for(var d in t)void 0===i[d]&&(i[d]=t[d]);return i}TV.allowMultipleSelections=dV,TV.tabSize=UF.define({combine:function(e){return e.length?e[0]:4}}),TV.lineSeparator=hV,TV.readOnly=gV,TV.phrases=UF.define({compare:function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((function(n){return e[n]==t[n]}))}}),TV.languageData=fV,TV.changeFilter=vV,TV.transactionFilter=pV,TV.transactionExtender=mV,aV.reconfigure=kV.define();var NV=function(){function e(){Ni(this,e)}return Di(e,[{key:"eq",value:function(e){return this==e}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return IV.create(e,t,this)}}]),e}();NV.prototype.startSide=NV.prototype.endSide=0,NV.prototype.point=!1,NV.prototype.mapMode=TF.TrackDel;var IV=function(){function e(t,n,r){Ni(this,e),this.from=t,this.to=n,this.value=r}return Di(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}();function DV(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var zV=function(){function e(t,n,r,i){Ni(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=i}return Di(e,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n?this.to:this.from,o=r,a=i.length;;){if(o==a)return o;var s=o+a>>1,c=i[s]-e||(n?this.value[s].endSide:this.value[s].startSide)-t;if(s==o)return c>=0?o:a;c>=0?a=s:o=s+1}}},{key:"between",value:function(e,t,n,r){for(var i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}},{key:"map",value:function(t,n){for(var r=[],i=[],o=[],a=-1,s=-1,c=0;c<this.value.length;c++){var l=this.value[c],u=this.from[c]+t,f=this.to[c]+t,d=void 0,h=void 0;if(u==f){var v=n.mapPos(u,l.startSide,l.mapMode);if(null==v)continue;if(d=h=v,l.startSide!=l.endSide&&(h=n.mapPos(u,l.endSide))<d)continue}else if((d=n.mapPos(u,l.startSide))>(h=n.mapPos(f,l.endSide))||d==h&&l.startSide>0&&l.endSide<=0)continue;(h-d||l.endSide-l.startSide)<0||(a<0&&(a=d),l.point&&(s=Math.max(s,h-d)),r.push(l),i.push(d-a),o.push(h-a))}return{mapped:r.length?new e(i,o,r,s):null,pos:a}}}]),e}(),LV=function(){function e(t,n,r,i){Ni(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}return Di(e,[{key:"length",get:function(){var e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var e,t=this.nextLayer.size,n=yi(this.chunk);try{for(n.s();!(e=n.n()).done;){t+=e.value.value.length}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"chunkEnd",value:function(e){return this.chunkPos[e]+this.chunk[e].length}},{key:"update",value:function(t){var n=t.add,r=void 0===n?[]:n,i=t.sort,o=void 0!==i&&i,a=t.filterFrom,s=void 0===a?0:a,c=t.filterTo,l=void 0===c?this.length:c,u=t.filter;if(0==r.length&&!u)return this;if(o&&(r=r.slice().sort(DV)),this.isEmpty)return r.length?e.of(r):this;for(var f=new FV(this,null,-1).goto(0),d=0,h=[],v=new BV;f.value||d<r.length;)if(d<r.length&&(f.from-r[d].from||f.startSide-r[d].value.startSide)>=0){var p=r[d++];v.addInner(p.from,p.to,p.value)||h.push(p)}else 1==f.rangeIndex&&f.chunkIndex<this.chunk.length&&(d==r.length||this.chunkEnd(f.chunkIndex)<r[d].from)&&(!u||s>this.chunkEnd(f.chunkIndex)||l<this.chunkPos[f.chunkIndex])&&v.addChunk(this.chunkPos[f.chunkIndex],this.chunk[f.chunkIndex])?f.nextChunk():((!u||s>f.to||l<f.from||u(f.from,f.to,f.value))&&(v.addInner(f.from,f.to,f.value)||h.push(IV.create(f.from,f.to,f.value))),f.next());return v.finishInner(this.nextLayer.isEmpty&&!h.length?e.empty:this.nextLayer.update({add:h,filter:u,filterFrom:s,filterTo:l}))}},{key:"map",value:function(t){if(t.empty||this.isEmpty)return this;for(var n=[],r=[],i=-1,o=0;o<this.chunk.length;o++){var a=this.chunkPos[o],s=this.chunk[o],c=t.touchesRange(a,a+s.length);if(!1===c)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(!0===c){var l=s.map(a,t),u=l.mapped,f=l.pos;u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}var d=this.nextLayer.map(t);return 0==n.length?d:new e(r,n,d||e.empty,i)}},{key:"between",value:function(e,t,n){if(!this.isEmpty){for(var r=0;r<this.chunk.length;r++){var i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return VV.from([this]).goto(e)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(t,n,r,i){return new e(t,n,r,i)}},{key:"iter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return VV.from(e).goto(t)}},{key:"compare",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=e.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i})),a=t.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i})),s=qV(o,a,n),c=new HV(o,s,i),l=new HV(a,s,i);n.iterGaps((function(e,t,n){return UV(c,e,l,t,n,r)})),n.empty&&0==n.length&&UV(c,0,l,0,0,r)}},{key:"eq",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var i=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0})),o=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0}));if(i.length!=o.length)return!1;if(!i.length)return!0;for(var a=qV(i,o),s=new HV(i,a,0).goto(n),c=new HV(o,a,0).goto(n);;){if(s.to!=c.to||!JV(s.active,c.active)||s.point&&(!c.point||!s.point.eq(c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}},{key:"spans",value:function(e,t,n,r){for(var i=new HV(e,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(t),o=t,a=i.openStart;;){var s=Math.min(i.to,n);if(i.point){var c=i.activeForPoint(i.to),l=i.pointFrom<t?c.length+1:Math.min(c.length,a);r.point(o,s,i.point,c,l,i.pointRank),a=Math.min(i.openEnd(s),c.length)}else s>o&&(r.span(o,s,i.active,a),a=i.openEnd(s));if(i.to>n)return a+(i.point&&i.to>n?1:0);o=i.to,i.next()}}},{key:"of",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new BV,i=yi(e instanceof IV?[e]:n?function(e){if(e.length>1)for(var t=e[0],n=1;n<e.length;n++){var r=e[n];if(DV(t,r)>0)return e.slice().sort(DV);t=r}return e}(e):e);try{for(i.s();!(t=i.n()).done;){var o=t.value;r.add(o.from,o.to,o.value)}}catch(e){i.e(e)}finally{i.f()}return r.finish()}}]),e}();LV.empty=new LV([],[],null,-1),LV.empty.nextLayer=LV.empty;var BV=function(){function e(){Ni(this,e),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return Di(e,[{key:"finishChunk",value:function(e){this.chunks.push(new zV(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new e)).add(t,n,r)}},{key:"addInner",value:function(e,t,n){var r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}},{key:"addChunk",value:function(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);var n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}},{key:"finish",value:function(){return this.finishInner(LV.empty)}},{key:"finishInner",value:function(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;var t=LV.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}]),e}();function qV(e,t,n){var r,i=new Map,o=yi(e);try{for(o.s();!(r=o.n()).done;)for(var a=r.value,s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&i.set(a.chunk[s],a.chunkPos[s])}catch(e){o.e(e)}finally{o.f()}var c,l=new Set,u=yi(t);try{for(u.s();!(c=u.n()).done;)for(var f=c.value,d=0;d<f.chunk.length;d++){var h=i.get(f.chunk[d]);null==h||(n?n.mapPos(h):h)!=f.chunkPos[d]||(null==n?void 0:n.touchesRange(h,h+f.chunk[d].length))||l.add(f.chunk[d])}}catch(e){u.e(e)}finally{u.f()}return l}var FV=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Ni(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=i}return Di(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}},{key:"gotoInner",value:function(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){var r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){var i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}},{key:"forward",value:function(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}},{key:"next",value:function(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}var e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}},{key:"setRangeIndex",value:function(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}},{key:"nextChunk",value:function(){this.chunkIndex++,this.rangeIndex=0,this.next()}},{key:"compare",value:function(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}]),e}(),VV=function(){function e(t){Ni(this,e),this.heap=t}return Di(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"goto",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9,r=yi(this.heap);try{for(r.s();!(t=r.n()).done;){t.value.goto(e,n)}}catch(e){r.e(e)}finally{r.f()}for(var i=this.heap.length>>1;i>=0;i--)WV(this.heap,i);return this.next(),this}},{key:"forward",value:function(e,t){var n,r=yi(this.heap);try{for(r.s();!(n=r.n()).done;){n.value.forward(e,t)}}catch(e){r.e(e)}finally{r.f()}for(var i=this.heap.length>>1;i>=0;i--)WV(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),WV(this.heap,0)}}}],[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,i=[],o=0;o<t.length;o++)for(var a=t[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new FV(a,n,r,o));return 1==i.length?i[0]:new e(i)}}]),e}();function WV(e,t){for(var n=e[t];;){var r=1+(t<<1);if(r>=e.length)break;var i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var HV=function(){function e(t,n,r){Ni(this,e),this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=VV.from(t,n,r)}return Di(e,[{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}},{key:"forward",value:function(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}},{key:"removeActive",value:function(e){KV(this.active,e),KV(this.activeTo,e),KV(this.activeRank,e),this.minActive=QV(this.active,this.activeTo)}},{key:"addActive",value:function(e){for(var t=0,n=this.cursor,r=n.value,i=n.to,o=n.rank;t<this.activeRank.length&&this.activeRank[t]<=o;)t++;GV(this.active,t,r),GV(this.activeTo,t,i),GV(this.activeRank,t,o),e&&GV(e,t,this.cursor.from),this.minActive=QV(this.active,this.activeTo)}},{key:"next",value:function(){var e=this.to,t=this.point;this.point=null;for(var n=this.openStart<0?[]:null;;){var r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&KV(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var i=this.cursor.value;if(i.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}if(n){this.openStart=0;for(var o=n.length-1;o>=0&&n[o]<e;o--)this.openStart++}}},{key:"activeForPoint",value:function(e){if(!this.active.length)return this.active;for(var t=[],n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}},{key:"openEnd",value:function(e){for(var t=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}]),e}();function UV(e,t,n,r,i,o){e.goto(t),n.goto(r);for(var a=r+i,s=r,c=r-t;;){var l=e.to+c-n.to||e.endSide-n.endSide,u=l<0?e.to+c:n.to,f=Math.min(u,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&JV(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(s,f,e.point,n.point):f>s&&!JV(e.active,n.active)&&o.compareRange(s,f,e.active,n.active),u>a)break;s=u,l<=0&&e.next(),l>=0&&n.next()}}function JV(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function KV(e,t){for(var n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function GV(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function QV(e,t){for(var n=-1,r=1e9,i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function YV(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0;i<n;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=SF(e,i));return r}function XV(e,t,n,r){for(var i=0,o=0;;){if(o>=t)return i;if(i==e.length)break;o+=9==e.charCodeAt(i)?n-o%n:1,i=SF(e,i)}return!0===r?-1:e.length}for(var ZV="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),eW="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),tW="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},nW=function(){function e(t,n){Ni(this,e),this.rules=[];var r=(n||{}).finish;function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,n,a){var s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&"keyframes"==c[1];if(c&&null==t)return n.push(e[0]+";");for(var u in t){var f=t[u];if(/&/.test(u))o(u.split(/,\s*/).map((function(t){return e.map((function(e){return t.replace(/&/,e)}))})).reduce((function(e,t){return e.concat(t)})),f,n);else if(f&&"object"==Wi(f)){if(!c)throw new RangeError("The value of a property ("+u+") should be a primitive value.");o(i(u),f,s,l)}else null!=f&&s.push(u.replace(/_.*/,"").replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))+": "+f+";")}(s.length||l)&&n.push((!r||c||a?e:e.map(r)).join(", ")+" {"+s.join(" ")+"}")}for(var a in t)o(i(a),t[a],this.rules)}return Di(e,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var e=tW[ZV]||1;return tW[ZV]=e+1,"ͼ"+e.toString(36)}},{key:"mount",value:function(e,t,n){var r=e[eW],i=n&&n.nonce;r?i&&r.setNonce(i):r=new iW(e,i),r.mount(Array.isArray(t)?t:[t])}}]),e}(),rW=new Map,iW=function(){function e(t,n){Ni(this,e);var r=t.ownerDocument||t,i=r.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){var o=rW.get(r);if(o)return t.adoptedStyleSheets=[o.sheet].concat(Bi(t.adoptedStyleSheets)),t[eW]=o;this.sheet=new i.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(Bi(t.adoptedStyleSheets)),rW.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);var a=t.head||t;a.insertBefore(this.styleTag,a.firstChild)}this.modules=[],t[eW]=this}return Di(e,[{key:"mount",value:function(e){for(var t=this.sheet,n=0,r=0,i=0;i<e.length;i++){var o=e[i],a=this.modules.indexOf(o);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),t)for(var s=0;s<o.rules.length;s++)t.insertRule(o.rules[s],n++)}else{for(;r<a;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){for(var c="",l=0;l<this.modules.length;l++)c+=this.modules[l].getRules()+"\n";this.styleTag.textContent=c}}},{key:"setNonce",value:function(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}]),e}(),oW={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},aW={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},sW="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),cW="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),lW=0;lW<10;lW++)oW[48+lW]=oW[96+lW]=String(lW);for(lW=1;lW<=24;lW++)oW[lW+111]="F"+lW;for(lW=65;lW<=90;lW++)oW[lW]=String.fromCharCode(lW+32),aW[lW]=String.fromCharCode(lW);for(var uW in oW)aW.hasOwnProperty(uW)||(aW[uW]=oW[uW]);function fW(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function dW(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function hW(e,t){if(!t.anchorNode)return!1;try{return dW(e,t.anchorNode)}catch(e){return!1}}function vW(e){return 3==e.nodeType?CW(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function pW(e,t,n,r){return!!n&&(gW(e,t,n,r,-1)||gW(e,t,n,r,1))}function mW(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function gW(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:yW(e))){if("DIV"==e.nodeName)return!1;var o=e.parentNode;if(!o||1!=o.nodeType)return!1;t=mW(e)+(i<0?0:1),e=o}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?yW(e):0}}}function yW(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function bW(e,t){var n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function wW(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}var kW,xW=function(){function e(){Ni(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Di(e,[{key:"eq",value:function(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}},{key:"setRange",value:function(e){var t=e.anchorNode,n=e.focusNode;this.set(t,Math.min(e.anchorOffset,t?yW(t):0),n,Math.min(e.focusOffset,n?yW(n):0))}},{key:"set",value:function(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}]),e}(),jW=null;function SW(e){if(e.setActive)return e.setActive();if(jW)return e.focus(jW);for(var t=[],n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==jW?{get preventScroll(){return jW={preventScroll:!0},!0}}:void 0),!jW){jW=!1;for(var r=0;r<t.length;){var i=t[r++],o=t[r++],a=t[r++];i.scrollTop!=o&&(i.scrollTop=o),i.scrollLeft!=a&&(i.scrollLeft=a)}}}function CW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=kW||(kW=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function $W(e,t,n){var r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);var o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function _W(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function OW(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}var MW=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Ni(this,e),this.node=t,this.offset=n,this.precise=r}return Di(e,null,[{key:"before",value:function(t,n){return new e(t.parentNode,mW(t),n)}},{key:"after",value:function(t,n){return new e(t.parentNode,mW(t)+1,n)}}]),e}(),EW=[],AW=function(){function e(){Ni(this,e),this.parent=null,this.dom=null,this.flags=2}return Di(e,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(e){var t,n=this.posAtStart,r=yi(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i==e)return n;n+=i.length+i.breakAfter}}catch(e){r.e(e)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(e){return this.posBefore(e)+e.length}},{key:"sync",value:function(t,n){if(2&this.flags){var r,i,o=this.dom,a=null,s=yi(this.children);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(7&c.flags){if(!c.dom&&(r=a?a.nextSibling:o.firstChild)){var l=e.get(r);(!l||!l.parent&&l.canReuseDOM(c))&&c.reuseDOM(r)}c.sync(t,n),c.flags&=-8}if(r=a?a.nextSibling:o.firstChild,n&&!n.written&&n.node==o&&r!=c.dom&&(n.written=!0),c.dom.parentNode==o)for(;r&&r!=c.dom;)r=PW(r);else o.insertBefore(c.dom,r);a=c.dom}}catch(e){s.e(e)}finally{s.f()}for((r=a?a.nextSibling:o.firstChild)&&n&&n.node==o&&(n.written=!0);r;)r=PW(r)}else if(1&this.flags){var u,f=yi(this.children);try{for(f.s();!(u=f.n()).done;){var d=u.value;7&d.flags&&(d.sync(t,n),d.flags&=-8)}}catch(e){f.e(e)}finally{f.f()}}}},{key:"reuseDOM",value:function(e){}},{key:"localPosFromDOM",value:function(t,n){var r;if(t==this.dom)r=this.dom.childNodes[n];else{for(var i=0==yW(t)?0:0==n?-1:1;;){var o=t.parentNode;if(o==this.dom)break;0==i&&o.firstChild!=o.lastChild&&(i=t==o.firstChild?-1:1),t=o}r=i<0?t:t.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!e.get(r);)r=r.nextSibling;if(!r)return this.length;for(var a=0,s=0;;a++){var c=this.children[a];if(c.dom==r)return s;s+=c.length+c.breakAfter}}},{key:"domBoundsAround",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,i=-1,o=-1,a=-1,s=0,c=n,l=n;s<this.children.length;s++){var u=this.children[s],f=c+u.length;if(c<e&&f>t)return u.domBoundsAround(e,t,c);if(f>=e&&-1==r&&(r=s,i=c),c>t&&u.dom.parentNode==this.dom){o=s,a=l;break}l=f,c=f+u.breakAfter}return{from:i,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}},{key:"markDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.flags|=2,this.markParentsDirty(e)}},{key:"markParentsDirty",value:function(e){for(var t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}},{key:"setParent",value:function(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}},{key:"rootView",get:function(){for(var e=this;;){var t=e.parent;if(!t)return e;e=t}}},{key:"replaceChildren",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:EW;this.markDirty();for(var i=e;i<t;i++){var o=this.children[i];o.parent==this&&o.destroy()}(n=this.children).splice.apply(n,[e,t-e].concat(Bi(r)));for(var a=0;a<r.length;a++)r[a].setParent(this)}},{key:"ignoreMutation",value:function(e){return!1}},{key:"ignoreEvent",value:function(e){return!1}},{key:"childCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length;return new TW(this.children,e,this.children.length)}},{key:"childPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(e,t)}},{key:"toString",value:function(){var e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"isHidden",get:function(){return!1}},{key:"merge",value:function(e,t,n,r,i,o){return!1}},{key:"become",value:function(e){return!1}},{key:"canReuseDOM",value:function(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(e){return e.cmView}}]),e}();function PW(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}AW.prototype.breakAfter=0;var TW=function(){function e(t,n,r){Ni(this,e),this.children=t,this.pos=n,this.i=r,this.off=0}return Di(e,[{key:"findPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;var n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}]),e}();function RW(e,t,n,r,i,o,a,s,c){var l=e.children,u=l.length?l[t]:null,f=o.length?o[o.length-1]:null,d=f?f.breakAfter:a;if(!(t==r&&u&&!a&&!d&&o.length<2&&u.merge(n,i,o.length?f:null,0==n,s,c))){if(r<l.length){var h=l[r];h&&(i<h.length||h.breakAfter&&(null==f?void 0:f.breakAfter))?(t==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,c)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,c),o.push(h))):(null==h?void 0:h.breakAfter)&&(f?f.breakAfter=1:a=1),r++}for(u&&(u.breakAfter=a,n>0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,s,0),t++));t<r&&o.length;)if(l[r-1].become(o[o.length-1]))r--,o.pop(),c=o.length?0:s;else{if(!l[t].become(o[0]))break;t++,o.shift(),s=o.length?0:c}!o.length&&t&&r<l.length&&!l[t-1].breakAfter&&l[r].merge(0,0,l[t-1],!1,s,c)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function NW(e,t,n,r,i,o){var a,s=e.childCursor(),c=s.findPos(n,1),l=c.i,u=c.off,f=s.findPos(t,-1),d=f.i,h=f.off,v=t-n,p=yi(r);try{for(p.s();!(a=p.n()).done;){v+=a.value.length}}catch(e){p.e(e)}finally{p.f()}e.length+=v,RW(e,d,h,l,u,r,0,i,o)}var IW="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},DW="undefined"!=typeof document?document:{documentElement:{style:{}}},zW=/Edge\/(\d+)/.exec(IW.userAgent),LW=/MSIE \d/.test(IW.userAgent),BW=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(IW.userAgent),qW=!!(LW||BW||zW),FW=!qW&&/gecko\/(\d+)/i.test(IW.userAgent),VW=!qW&&/Chrome\/(\d+)/.exec(IW.userAgent),WW="webkitFontSmoothing"in DW.documentElement.style,HW=!qW&&/Apple Computer/.test(IW.vendor),UW=HW&&(/Mobile\/\w+/.test(IW.userAgent)||IW.maxTouchPoints>2),JW={mac:UW||/Mac/.test(IW.platform),windows:/Win/.test(IW.platform),linux:/Linux|X11/.test(IW.platform),ie:qW,ie_version:LW?DW.documentMode||6:BW?+BW[1]:zW?+zW[1]:0,gecko:FW,gecko_version:FW?+(/Firefox\/(\d+)/.exec(IW.userAgent)||[0,0])[1]:0,chrome:!!VW,chrome_version:VW?+VW[1]:0,ios:UW,android:/Android\b/.test(IW.userAgent),webkit:WW,safari:HW,webkit_version:WW?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=DW.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},KW=function(e){_i(n,AW);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).text=e,r}return Di(n,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(e){this.setDOM(e||document.createTextNode(this.text))}},{key:"sync",value:function(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(e){3==e.nodeType&&this.createDOM(e)}},{key:"merge",value:function(e,t,r){return!(8&this.flags||r&&(!(r instanceof n)||this.length-(t-e)+r.length>256||8&r.flags))&&(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(t),this.markDirty(),!0)}},{key:"split",value:function(e){var t=new n(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}},{key:"localPosFromDOM",value:function(e,t){return e==this.dom?t:t?this.text.length:0}},{key:"domAtPos",value:function(e){return new MW(this.dom,e)}},{key:"domBoundsAround",value:function(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(e,t){return function(e,t,n){var r=e.nodeValue.length;t>r&&(t=r);var i=t,o=t,a=0;0==t&&n<0||t==r&&n>=0?JW.chrome||JW.gecko||(t?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;var s=CW(e,i,o).getClientRects();if(!s.length)return null;var c=s[(a?a<0:n>=0)?0:s.length-1];JW.safari&&!a&&0==c.width&&(c=Array.prototype.find.call(s,(function(e){return e.width}))||c);return a?bW(c,a<0):c||null}(this.dom,e,t)}}]),n}(),GW=function(e){_i(n,AW);var t=Mi(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Ni(this,n),(r=t.call(this)).mark=e,r.children=i,r.length=o;var a,s=yi(i);try{for(s.s();!(a=s.n()).done;){a.value.setParent(Ei(r))}}catch(e){s.e(e)}finally{s.f()}return r}return Di(n,[{key:"setAttrs",value:function(e){if(_W(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(var t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}},{key:"canReuseDOM",value:function(e){return mi(Pi(n.prototype),"canReuseDOM",this).call(this,e)&&!(8&(this.flags|e.flags))}},{key:"reuseDOM",value:function(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),mi(Pi(n.prototype),"sync",this).call(this,e,t)}},{key:"merge",value:function(e,t,r,i,o,a){return(!r||!(!(r instanceof n&&r.mark.eq(this.mark))||e&&o<=0||t<this.length&&a<=0))&&(NW(this,e,t,r?r.children:[],o-1,a-1),this.markDirty(),!0)}},{key:"split",value:function(e){var t,r=[],i=0,o=-1,a=0,s=yi(this.children);try{for(s.s();!(t=s.n()).done;){var c=t.value,l=i+c.length;l>e&&r.push(i<e?c.split(e-i):c),o<0&&i>=e&&(o=a),i=l,a++}}catch(e){s.e(e)}finally{s.f()}var u=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new n(this.mark,r,u)}},{key:"domAtPos",value:function(e){return XW(this,e)}},{key:"coordsAt",value:function(e,t){return eH(this,e,t)}}]),n}();var QW=function(e){_i(n,AW);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this)).widget=e,o.length=r,o.side=i,o.prevWidget=null,o}return Di(n,[{key:"split",value:function(e){var t=n.create(this.widget,this.length-e,this.side);return this.length-=e,t}},{key:"sync",value:function(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(e,t,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&a<=0))&&(this.length=e+(r?r.length:0)+(this.length-t),!0)}},{key:"become",value:function(e){return e instanceof n&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(e){return this.widget.ignoreEvent(e)}},{key:"overrideDOMText",get:function(){if(0==this.length)return uF.empty;for(var e=this;e.parent;)e=e.parent;var t=e.view,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):uF.empty}},{key:"domAtPos",value:function(e){return(this.length?0==e:this.side>0)?MW.before(this.dom):MW.after(this.dom,e==this.length)}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e,t){var n=this.widget.coordsAt(this.dom,e,t);if(n)return n;var r=this.dom.getClientRects(),i=null;if(!r.length)return null;for(var o=this.side?this.side<0:e>0,a=o?r.length-1:0;i=r[a],!(e>0?0==a:a==r.length-1||i.top<i.bottom);a+=o?-1:1);return bW(i,!o)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"isHidden",get:function(){return this.widget.isHidden}},{key:"destroy",value:function(){mi(Pi(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(e,t,r){return new n(e,t,r)}}]),n}(),YW=function(e){_i(n,AW);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).side=e,r}return Di(n,[{key:"length",get:function(){return 0}},{key:"merge",value:function(){return!1}},{key:"become",value:function(e){return e instanceof n&&e.side==this.side}},{key:"split",value:function(){return new n(this.side)}},{key:"sync",value:function(){if(!this.dom){var e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(e){return this.side>0?MW.before(this.dom):MW.after(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e){return this.dom.getBoundingClientRect()}},{key:"overrideDOMText",get:function(){return uF.empty}},{key:"isHidden",get:function(){return!0}}]),n}();function XW(e,t){for(var n=e.dom,r=e.children,i=0,o=0;i<r.length;i++){var a=r[i],s=o+a.length;if(!(s==o&&a.getSide()<=0)){if(t>o&&t<s&&a.dom.parentNode==n)return a.domAtPos(t-o);if(t<=o)break;o=s}}for(var c=i;c>0;c--){var l=r[c-1];if(l.dom.parentNode==n)return l.domAtPos(l.length)}for(var u=i;u<r.length;u++){var f=r[u];if(f.dom.parentNode==n)return f.domAtPos(0)}return new MW(n,0)}function ZW(e,t,n){var r,i=e.children;n>0&&t instanceof GW&&i.length&&(r=i[i.length-1])instanceof GW&&r.mark.eq(t.mark)?ZW(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function eH(e,t,n){var r=null,i=-1,o=null,a=-1;!function e(t,s){for(var c=0,l=0;c<t.children.length&&l<=s;c++){var u=t.children[c],f=l+u.length;f>=s&&(u.children.length?e(u,s-l):(!o||o.isHidden&&n>0)&&(f>s||l==f&&u.getSide()>0)?(o=u,a=s-l):(l<s||l==f&&u.getSide()<0&&!u.isHidden)&&(r=u,i=s-l)),l=f}}(e,t);var s=(n<0?r:o)||r||o;return s?s.coordsAt(Math.max(0,s==r?i:a),n):function(e){var t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();var n=vW(t);return n[n.length-1]||null}(e)}function tH(e,t){for(var n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}KW.prototype.children=QW.prototype.children=YW.prototype.children=EW;var nH=Object.create(null);function rH(e,t,n){if(e==t)return!0;e||(e=nH),t||(t=nH);var r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s!=n&&(-1==i.indexOf(s)||e[s]!==t[s]))return!1}return!0}function iH(e,t,n){var r=!1;if(t)for(var i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(var o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function oH(e){for(var t=Object.create(null),n=0;n<e.attributes.length;n++){var r=e.attributes[n];t[r.name]=r.value}return t}var aH=function(e){_i(n,AW);var t=Mi(n);function n(){var e;return Ni(this,n),(e=t.apply(this,arguments)).children=[],e.length=0,e.prevAttrs=void 0,e.attrs=null,e.breakAfter=0,e}return Di(n,[{key:"merge",value:function(e,t,r,i,o,a){if(r){if(!(r instanceof n))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),NW(this,e,t,r?r.children:[],o,a),!0}},{key:"split",value:function(e){var t=new n;if(t.breakAfter=this.breakAfter,0==this.length)return t;var r=this.childPos(e),i=r.i,o=r.off;o&&(t.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(var a=i;a<this.children.length;a++)t.append(this.children[a],0);for(;i>0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}},{key:"transferDOM",value:function(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(e){rH(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}},{key:"append",value:function(e,t){ZW(this,e,t)}},{key:"addLineDeco",value:function(e){var t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=tH(t,this.attrs||{})),n&&(this.attrs=tH({class:n},this.attrs||{}))}},{key:"domAtPos",value:function(e){return XW(this,e)}},{key:"reuseDOM",value:function(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,t){var r;this.dom?4&this.flags&&(_W(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(iH(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),mi(Pi(n.prototype),"sync",this).call(this,e,t);for(var i=this.dom.lastChild;i&&AW.get(i)instanceof GW;)i=i.lastChild;if(!(i&&this.length&&("BR"==i.nodeName||0!=(null===(r=AW.get(i))||void 0===r?void 0:r.isEditable)||JW.ios&&this.children.some((function(e){return e instanceof KW}))))){var o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var e,t,n=0,r=yi(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!(i instanceof KW)||/[^ -~]/.test(i.text))return null;var o=vW(i.dom);if(1!=o.length)return null;n+=o[0].width,e=o[0].height}}catch(e){r.e(e)}finally{r.f()}return n?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:n/this.length,textHeight:e}:null}},{key:"coordsAt",value:function(e,t){var n=eH(this,e,t);if(!this.children.length&&n&&this.parent){var r=this.parent.view.viewState.heightOracle,i=n.bottom-n.top;if(Math.abs(i-r.lineHeight)<2&&r.textHeight<i){var o=(i-r.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}},{key:"become",value:function(e){return!1}},{key:"covers",value:function(){return!0}}],[{key:"find",value:function(e,t){for(var r=0,i=0;r<e.children.length;r++){var o=e.children[r],a=i+o.length;if(a>=t){if(o instanceof n)return o;if(a>t)break}i=a+o.breakAfter}return null}}]),n}(),sH=function(e){_i(n,AW);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this)).widget=e,o.length=r,o.deco=i,o.breakAfter=0,o.prevWidget=null,o}return Di(n,[{key:"merge",value:function(e,t,r,i,o,a){return!(r&&(!(r instanceof n&&this.widget.compare(r.widget))||e>0&&o<=0||t<this.length&&a<=0))&&(this.length=e+(r?r.length:0)+(this.length-t),!0)}},{key:"domAtPos",value:function(e){return 0==e?MW.before(this.dom):MW.after(this.dom,e==this.length)}},{key:"split",value:function(e){var t=this.length-e;this.length=e;var r=new n(this.widget,t,this.deco);return r.breakAfter=this.breakAfter,r}},{key:"children",get:function(){return EW}},{key:"sync",value:function(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}},{key:"overrideDOMText",get:function(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):uF.empty}},{key:"domBoundsAround",value:function(){return null}},{key:"become",value:function(e){return e instanceof n&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(e){return this.widget.ignoreEvent(e)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"coordsAt",value:function(e,t){return this.widget.coordsAt(this.dom,e,t)}},{key:"destroy",value:function(){mi(Pi(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}},{key:"covers",value:function(e){var t=this.deco,n=t.startSide,r=t.endSide;return n!=r&&(e<0?n<0:r>0)}}]),n}(),cH=function(){function e(){Ni(this,e)}return Di(e,[{key:"eq",value:function(e){return!1}},{key:"updateDOM",value:function(e,t){return!1}},{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"estimatedHeight",get:function(){return-1}},{key:"lineBreaks",get:function(){return 0}},{key:"ignoreEvent",value:function(e){return!0}},{key:"coordsAt",value:function(e,t,n){return null}},{key:"isHidden",get:function(){return!1}},{key:"destroy",value:function(e){}}]),e}(),lH=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(lH||(lH={})),uH=function(e){_i(n,NV);var t=Mi(n);function n(e,r,i,o){var a;return Ni(this,n),(a=t.call(this)).startSide=e,a.endSide=r,a.widget=i,a.spec=o,a}return Di(n,[{key:"heightRelevant",get:function(){return!1}},{key:"hasHeight",value:function(){return!!this.widget&&this.widget.estimatedHeight>-1}}],[{key:"mark",value:function(e){return new fH(e)}},{key:"widget",value:function(e){var t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new hH(e,t,t,n,e.widget||null,!1)}},{key:"replace",value:function(e){var t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{var i=vH(e,r);t=(i.start?r?-3e8:-1:5e8)-1,n=1+(i.end?r?2e8:1:-6e8)}return new hH(e,t,n,r,e.widget||null,!0)}},{key:"line",value:function(e){return new dH(e)}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return LV.of(e,t)}}]),n}();uH.none=LV.empty;var fH=function(e){_i(n,uH);var t=Mi(n);function n(e){var r;Ni(this,n);var i=vH(e),o=i.start,a=i.end;return(r=t.call(this,o?-1:5e8,a?1:-6e8,null,e)).tagName=e.tagName||"span",r.class=e.class||"",r.attrs=e.attributes||null,r}return Di(n,[{key:"eq",value:function(e){var t,r;return this==e||e instanceof n&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(r=e.attrs)||void 0===r?void 0:r.class))&&rH(this.attrs,e.attrs,"class")}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e>=t)throw new RangeError("Mark decorations may not be empty");return mi(Pi(n.prototype),"range",this).call(this,e,t)}}]),n}();fH.prototype.point=!1;var dH=function(e){_i(n,uH);var t=Mi(n);function n(e){return Ni(this,n),t.call(this,-2e8,-2e8,null,e)}return Di(n,[{key:"eq",value:function(e){return e instanceof n&&this.spec.class==e.spec.class&&rH(this.spec.attributes,e.spec.attributes)}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return mi(Pi(n.prototype),"range",this).call(this,e,t)}}]),n}();dH.prototype.mapMode=TF.TrackBefore,dH.prototype.point=!0;var hH=function(e){_i(n,uH);var t=Mi(n);function n(e,r,i,o,a,s){var c;return Ni(this,n),(c=t.call(this,r,i,a,e)).block=o,c.isReplace=s,c.mapMode=o?r<=0?TF.TrackBefore:TF.TrackAfter:TF.TrackDel,c}return Di(n,[{key:"type",get:function(){return this.startSide!=this.endSide?lH.WidgetRange:this.startSide<=0?lH.WidgetBefore:lH.WidgetAfter}},{key:"heightRelevant",get:function(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}},{key:"eq",value:function(e){return e instanceof n&&(t=this.widget,r=e.widget,t==r||!!(t&&r&&t.compare(r)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,r}},{key:"range",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return mi(Pi(n.prototype),"range",this).call(this,e,t)}}]),n}();function vH(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.inclusiveStart,r=e.inclusiveEnd;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function pH(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}hH.prototype.point=!0;var mH=function(){function e(t,n,r,i){Ni(this,e),this.doc=t,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}return Di(e,[{key:"posCovered",value:function(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;var e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof sH&&e.deco.endSide<0)}},{key:"getLine",value:function(){return this.curLine||(this.content.push(this.curLine=new aH),this.atCursorPos=!0),this.curLine}},{key:"flushBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(gH(new YW(-1),e),e.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}},{key:"finish",value:function(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof sH||this.getLine()}},{key:"buildText",value:function(e,t,n){for(;e>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),i=r.value,o=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=i,this.textOff=0}var s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(gH(new KW(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}},{key:"span",value:function(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof hH){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=t-e;if(n instanceof hH)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new sH(n.widget||new yH("div"),a,n));else{var s=QW.create(n.widget||new yH("span"),a,a?0:n.startSide),c=this.atCursorPos&&!s.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!s.isEditable&&(e<t||i>r.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||c||s.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),c&&(u.append(gH(new YW(1),r),i),i=r.length+Math.max(0,i-r.length)),u.append(gH(s,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}}],[{key:"build",value:function(t,n,r,i,o){var a=new e(t,n,r,o);return a.openEnd=LV.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}]),e}();function gH(e,t){var n,r=yi(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e=new GW(i,[e],e.length)}}catch(e){r.e(e)}finally{r.f()}return e}var yH=function(e){_i(n,cH);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).tag=e,r}return Di(n,[{key:"eq",value:function(e){return e.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(e){return e.nodeName.toLowerCase()==this.tag}},{key:"isHidden",get:function(){return!0}}]),n}(),bH=UF.define(),wH=UF.define(),kH=UF.define(),xH=UF.define(),jH=UF.define(),SH=UF.define(),CH=UF.define(),$H=UF.define({combine:function(e){return e.some((function(e){return e}))}}),_H=UF.define({combine:function(e){return e.some((function(e){return e}))}}),OH=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Ni(this,e),this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}return Di(e,[{key:"map",value:function(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},{key:"clip",value:function(t){return this.range.to<=t.doc.length?this:new e(VF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}]),e}(),MH=kV.define({map:function(e,t){return e.map(t)}});function EH(e,t,n){var r=e.facet(xH);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}var AH=UF.define({combine:function(e){return!e.length||e[0]}}),PH=0,TH=UF.define(),RH=function(){function e(t,n,r,i,o){Ni(this,e),this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}return Di(e,null,[{key:"define",value:function(t,n){var r=n||{},i=r.eventHandlers,o=r.eventObservers,a=r.provide,s=r.decorations;return new e(PH++,t,i,o,(function(e){var t=[TH.of(e)];return s&&t.push(zH.of((function(t){var n=t.plugin(e);return n?s(n):uH.none}))),a&&t.push(a(e)),t}))}},{key:"fromClass",value:function(t,n){return e.define((function(e){return new t(e)}),n)}}]),e}(),NH=function(){function e(t){Ni(this,e),this.spec=t,this.mustUpdate=null,this.value=null}return Di(e,[{key:"update",value:function(e){if(this.value){if(this.mustUpdate){var t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(EH(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){EH(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){EH(e.state,t,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),e}(),IH=UF.define(),DH=UF.define(),zH=UF.define(),LH=UF.define(),BH=UF.define();function qH(e,t,n){var r=e.state.facet(BH);if(!r.length)return r;var i=r.map((function(t){return t instanceof Function?t(e):t})),o=[];return LV.spans(i,t,n,{point:function(){},span:function(e,t,n,r){for(var i=o,a=n.length-1;a>=0;a--,r--){var s=n[a].spec.bidiIsolate,c=void 0;if(null!=s)if(r>0&&i.length&&(c=i[i.length-1]).to==e&&c.direction==s)c.to=t,i=c.inner;else{var l={from:e,to:t,direction:s,inner:[]};i.push(l),i=l.inner}}}}),o}var FH=UF.define();function VH(e){var t,n=0,r=0,i=0,o=0,a=yi(e.state.facet(FH));try{for(a.s();!(t=a.n()).done;){var s=(0,t.value)(e);s&&(null!=s.left&&(n=Math.max(n,s.left)),null!=s.right&&(r=Math.max(r,s.right)),null!=s.top&&(i=Math.max(i,s.top)),null!=s.bottom&&(o=Math.max(o,s.bottom)))}}catch(e){a.e(e)}finally{a.f()}return{left:n,right:r,top:i,bottom:o}}var WH=UF.define(),HH=function(){function e(t,n,r,i){Ni(this,e),this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}return Di(e,[{key:"join",value:function(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}},{key:"addToSet",value:function(e){for(var t=e.length,n=this;t>0;t--){var r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}}],[{key:"extendWithRanges",value:function(t,n){if(0==n.length)return t;for(var r=[],i=0,o=0,a=0,s=0;;i++){for(var c=i==t.length?null:t[i],l=a-s,u=c?c.fromB:1e9;o<n.length&&n[o]<u;){var f=n[o],d=n[o+1],h=Math.max(s,f),v=Math.min(u,d);if(h<=v&&new e(h+l,v+l,h,v).addToSet(r),d>u)break;o+=2}if(!c)return r;new e(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),a=c.toA,s=c.toB}}}]),e}(),UH=function(){function e(t,n,r){Ni(this,e),this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=NF.empty(this.startState.doc.length);var i,o=yi(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.changes=this.changes.compose(a.changes)}}catch(e){o.e(e)}finally{o.f()}var s=[];this.changes.iterChangedRanges((function(e,t,n,r){return s.push(new HH(e,t,n,r))})),this.changedRanges=s}return Di(e,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some((function(e){return e.selection}))}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),JH=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(JH||(JH={})),KH=JH.LTR,GH=JH.RTL;function QH(e){for(var t=[],n=0;n<e.length;n++)t.push(1<<+e[n]);return t}for(var YH=QH("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),XH=QH("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),ZH=Object.create(null),eU=[],tU=0,nU=["()","[]","{}"];tU<nU.length;tU++){var rU=nU[tU],iU=rU.charCodeAt(0),oU=rU.charCodeAt(1);ZH[iU]=oU,ZH[oU]=-iU}var aU=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,sU=function(){function e(t,n,r){Ni(this,e),this.from=t,this.to=n,this.level=r}return Di(e,[{key:"dir",get:function(){return this.level%2?GH:KH}},{key:"side",value:function(e,t){return this.dir==t==e?this.to:this.from}}],[{key:"find",value:function(e,t,n,r){for(var i=-1,o=0;o<e.length;o++){var a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(i<0||(0!=r?r<0?a.from<t:a.to>t:e[i].level>a.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}]),e}();function cU(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!cU(r.inner,i.inner))return!1}return!0}var lU=[];function uU(e,t,n,r,i,o,a){var s=r%2?2:1;if(r%2==i%2)for(var c=t,l=0;c<n;){var u=!0,f=!1;if(l==o.length||c<o[l].from){var d=lU[c];d!=s&&(u=!1,f=16==d)}var h=u||1!=s?null:[],v=u?r:r+1,p=c;e:for(;;)if(l<o.length&&p==o[l].from){if(f)break e;var m=o[l];if(!u)for(var g=m.to,y=l+1;;){if(g==n)break e;if(!(y<o.length&&o[y].from==g)){if(lU[g]==s)break e;break}g=o[y++].to}if(l++,h)h.push(m);else m.from>c&&a.push(new sU(c,m.from,v)),fU(e,m.direction==KH!=!(v%2)?r+1:r,i,m.inner,m.from,m.to,a),c=m.to;p=m.to}else{if(p==n||(u?lU[p]!=s:lU[p]==s))break;p++}h?uU(e,c,p,r+1,i,h,a):c<p&&a.push(new sU(c,p,v)),c=p}else for(var b=n,w=o.length;b>t;){var k=!0,x=!1;if(!w||b>o[w-1].to){var j=lU[b-1];j!=s&&(k=!1,x=16==j)}var S=k||1!=s?null:[],C=k?r:r+1,$=b;e:for(;;)if(w&&$==o[w-1].to){if(x)break e;var _=o[--w];if(!k)for(var O=_.from,M=w;;){if(O==t)break e;if(!M||o[M-1].to!=O){if(lU[O-1]==s)break e;break}O=o[--M].from}if(S)S.push(_);else _.to<b&&a.push(new sU(_.to,b,C)),fU(e,_.direction==KH!=!(C%2)?r+1:r,i,_.inner,_.from,_.to,a),b=_.from;$=_.from}else{if($==t||(k?lU[$-1]!=s:lU[$-1]==s))break;$--}S?uU(e,$,b,r+1,i,S,a):$<b&&a.push(new sU($,b,C)),b=$}}function fU(e,t,n,r,i,o,a){var s=t%2?2:1;!function(e,t,n,r,i){for(var o=0;o<=r.length;o++){for(var a=o?r[o-1].to:t,s=o<r.length?r[o].from:n,c=o?256:i,l=a,u=c,f=c;l<s;l++){var d=(w=e.charCodeAt(l))<=247?YH[w]:1424<=w&&w<=1524?2:1536<=w&&w<=1785?XH[w-1536]:1774<=w&&w<=2220?4:8192<=w&&w<=8203?256:64336<=w&&w<=65023?4:8204==w?256:1;512==d?d=u:8==d&&4==f&&(d=16),lU[l]=4==d?2:d,7&d&&(f=d),u=d}for(var h=a,v=c,p=c;h<s;h++){var m=lU[h];if(128==m)h<s-1&&v==lU[h+1]&&24&v?m=lU[h]=v:lU[h]=256;else if(64==m){for(var g=h+1;g<s&&64==lU[g];)g++;for(var y=h&&8==v||g<n&&8==lU[g]?1==p?1:8:256,b=h;b<g;b++)lU[b]=y;h=g-1}else 8==m&&1==p&&(lU[h]=1);v=m,7&m&&(p=m)}}var w}(e,i,o,r,s),function(e,t,n,r,i){for(var o=1==i?2:1,a=0,s=0,c=0;a<=r.length;a++)for(var l,u,f,d=a?r[a-1].to:t,h=a<r.length?r[a].from:n,v=d;v<h;v++)if(u=ZH[l=e.charCodeAt(v)])if(u<0){for(var p=s-3;p>=0;p-=3)if(eU[p+1]==-u){var m=eU[p+2],g=2&m?i:4&m?1&m?o:i:0;g&&(lU[v]=lU[eU[p]]=g),s=p;break}}else{if(189==eU.length)break;eU[s++]=v,eU[s++]=l,eU[s++]=c}else if(2==(f=lU[v])||1==f){var y=f==i;c=y?0:1;for(var b=s-3;b>=0;b-=3){var w=eU[b+2];if(2&w)break;if(y)eU[b+2]|=2;else{if(4&w)break;eU[b+2]|=4}}}}(e,i,o,r,s),function(e,t,n,r){for(var i=0,o=r;i<=n.length;i++)for(var a=i?n[i-1].to:e,s=i<n.length?n[i].from:t,c=a;c<s;){var l=lU[c];if(256==l){for(var u=c+1;;)if(u==s){if(i==n.length)break;u=n[i++].to,s=i<n.length?n[i].from:t}else{if(256!=lU[u])break;u++}for(var f=1==o,d=f==(1==(u<t?lU[u]:r))?f?1:2:r,h=u,v=i,p=v?n[v-1].to:e;h>c;)h==p&&(h=n[--v].from,p=v?n[v-1].to:e),lU[--h]=d;c=u}else o=l,c++}}(i,o,r,s),uU(e,i,o,t,n,r,a)}function dU(e){return[new sU(0,e,0)]}var hU="";function vU(e,t,n,r,i){var o,a=r.head-e.from,s=-1;if(0==a){if(!i||!e.length)return null;t[0].level!=n&&(a=t[0].side(!1,n),s=0)}else if(a==e.length){if(i)return null;var c=t[t.length-1];c.level!=n&&(a=c.side(!0,n),s=t.length-1)}s<0&&(s=sU.find(t,a,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));var l=t[s];a==l.side(i,n)&&(a=(l=t[s+=i?1:-1]).side(!i,n));var u=i==(l.dir==n),f=SF(e.text,a,u);if(hU=e.text.slice(Math.min(a,f),Math.max(a,f)),f!=l.side(i,n))return VF.cursor(f+e.from,u?-1:1,l.level);var d=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];return d||l.level==n?d&&d.level<l.level?VF.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):VF.cursor(f+e.from,i?-1:1,l.level):VF.cursor(i?e.to:e.from,i?-1:1,n)}var pU=function(e){_i(n,AW);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).view=e,r.decorations=[],r.dynamicDecorationMap=[],r.domChanged=null,r.hasComposition=null,r.markedForComposition=new Set,r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(e.contentDOM),r.children=[new aH],r.children[0].setParent(Ei(r)),r.updateDeco(),r.updateInner([new HH(0,0,0,e.state.doc.length)],0,null),r}return Di(n,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(e){var t,n=this,r=e.changedRanges;this.minWidth>0&&r.length&&(r.every((function(e){var t=e.fromA;return e.toA<n.minWidthFrom||t>n.minWidthTo}))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);var i=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?i=this.domChanged.newSel.head:function(e,t){var n=!1;t&&e.iterChangedRanges((function(e,r){e<t.to&&r>t.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(i=e.state.selection.main.head));var o=i>-1?function(e,t,n){var r=gU(e,n);if(!r)return null;var i=r.node,o=r.from,a=r.to,s=i.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;for(var c=t.invertedDesc,l=new HH(c.mapPos(o),c.mapPos(a),o,a),u=[],f=i.parentNode;;f=f.parentNode){var d=AW.get(f);if(d instanceof GW)u.push({node:f,deco:d.mark});else{if(d instanceof aH||"DIV"==f.nodeName&&f.parentNode==e.contentDOM)return{range:l,text:i,marks:u,line:f};if(f==e.contentDOM)return null;u.push({node:f,deco:new fH({inclusive:!0,attributes:oH(f),tagName:f.tagName.toLowerCase()})})}}}(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();var a=this.hasComposition,s=a.from,c=a.to;r=new HH(s,c,e.changes.mapPos(s,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(JW.ie||JW.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);var l,u,f,d,h=this.decorations,v=this.updateDeco(),p=(l=h,u=v,f=e.changes,d=new bU,LV.compare(l,u,f,d),d.changes);return r=HH.extendWithRanges(r,p),!!(7&this.flags||0!=r.length)&&(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}},{key:"updateInner",value:function(e,t,n){var r=this;this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);var i=this.view.observer;i.ignore((function(){r.dom.style.height=r.view.viewState.contentHeight/r.view.scaleY+"px",r.dom.style.flexBasis=r.minWidth?r.minWidth+"px":"";var e=JW.chrome||JW.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;r.sync(r.view,e),r.flags&=-8,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(r.forceSelection=!0),r.dom.style.height=""})),this.markedForComposition.forEach((function(e){return e.flags&=-9}));var o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){var a,s=yi(this.children);try{for(s.s();!(a=s.n()).done;){var c=a.value;c instanceof sH&&c.widget instanceof mU&&o.push(c.dom)}}catch(e){s.e(e)}finally{s.f()}}i.updateGaps(o)}},{key:"updateChildren",value:function(e,t,n){for(var r=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t),o=r.length-1;;o--){var a=o>=0?r[o]:null;if(!a)break;var s=a.fromA,c=a.toA,l=a.fromB,u=a.toB,f=void 0,d=void 0,h=void 0,v=void 0;if(n&&n.range.fromB<u&&n.range.toB>l){var p=mH.build(this.view.state.doc,l,n.range.fromB,this.decorations,this.dynamicDecorationMap),m=mH.build(this.view.state.doc,n.range.toB,u,this.decorations,this.dynamicDecorationMap);d=p.breakAtStart,h=p.openStart,v=m.openEnd;var g=this.compositionView(n);m.breakAtStart?g.breakAfter=1:m.content.length&&g.merge(g.length,g.length,m.content[0],!1,m.openStart,0)&&(g.breakAfter=m.content[0].breakAfter,m.content.shift()),p.content.length&&g.merge(0,0,p.content[p.content.length-1],!0,0,p.openEnd)&&p.content.pop(),f=p.content.concat(g).concat(m.content)}else{var y=mH.build(this.view.state.doc,l,u,this.decorations,this.dynamicDecorationMap);f=y.content,d=y.breakAtStart,h=y.openStart,v=y.openEnd}var b=i.findPos(c,1),w=b.i,k=b.off,x=i.findPos(s,-1);RW(this,x.i,x.off,w,k,f,d,h,v)}n&&this.fixCompositionDOM(n)}},{key:"compositionView",value:function(e){var t=new KW(e.text.nodeValue);t.flags|=8;var n,r=yi(e.marks);try{for(r.s();!(n=r.n()).done;){var i=n.value.deco;t=new GW(i,[t],t.length)}}catch(e){r.e(e)}finally{r.f()}var o=new aH;return o.append(t,0),o}},{key:"fixCompositionDOM",value:function(e){var t=this,n=function(e,n){n.flags|=8|(n.children.some((function(e){return 7&e.flags}))?1:0),t.markedForComposition.add(n);var r=AW.get(e);r&&r!=n&&(r.dom=null),n.setDOM(e)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(var o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}},{key:"updateSelection",value:function(){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();var n=this.view.root.activeElement,r=n==this.dom,i=!r&&hW(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(r||t||i){var o=this.forceSelection;this.forceSelection=!1;var a,s=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?c:this.moveToLine(this.domAtPos(s.head));if(JW.gecko&&s.empty&&!this.hasComposition&&(1==(a=c).node.nodeType&&a.node.firstChild&&(0==a.offset||"false"==a.node.childNodes[a.offset-1].contentEditable)&&(a.offset==a.node.childNodes.length||"false"==a.node.childNodes[a.offset].contentEditable))){var u=document.createTextNode("");this.view.observer.ignore((function(){return c.node.insertBefore(u,c.node.childNodes[c.offset]||null)})),c=l=new MW(u,0),o=!0}var f=this.view.observer.selectionRange;!o&&f.focusNode&&pW(c.node,c.offset,f.anchorNode,f.anchorOffset)&&pW(l.node,l.offset,f.focusNode,f.focusOffset)||(this.view.observer.ignore((function(){JW.android&&JW.chrome&&e.dom.contains(f.focusNode)&&function(e,t){for(var n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(f.focusNode,e.dom)&&(e.dom.blur(),e.dom.focus({preventScroll:!0}));var t=fW(e.view.root);if(t)if(s.empty){if(JW.gecko){var r=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(t<e.childNodes.length&&"false"==e.childNodes[t].contentEditable?2:0)}(c.node,c.offset);if(r&&3!=r){var o=yU(c.node,c.offset,1==r?1:-1);o&&(c=new MW(o.node,o.offset))}}t.collapse(c.node,c.offset),null!=s.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=s.bidiLevel)}else if(t.extend){t.collapse(c.node,c.offset);try{t.extend(l.node,l.offset)}catch(e){}}else{var a=document.createRange();if(s.anchor>s.head){var u=[l,c];c=u[0],l=u[1]}a.setEnd(l.node,l.offset),a.setStart(c.node,c.offset),t.removeAllRanges(),t.addRange(a)}else;i&&e.view.root.activeElement==e.dom&&(e.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new MW(f.anchorNode,f.anchorOffset),this.impreciseHead=l.precise?null:new MW(f.focusNode,f.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.hasComposition){var e=this.view,t=e.state.selection.main,n=fW(e.root),r=e.observer.selectionRange,i=r.anchorNode,o=r.anchorOffset;if(n&&t.empty&&t.assoc&&n.modify){var a=aH.find(this,t.head);if(a){var s=a.posAtStart;if(t.head!=s&&t.head!=s+a.length){var c=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(c&&l&&!(c.bottom>l.top)){var u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();var f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(i,o)}}}}}}},{key:"moveToLine",value:function(e){var t,n=this.dom;if(e.node!=n)return e;for(var r=e.offset;!t&&r<n.childNodes.length;r++){var i=AW.get(n.childNodes[r]);i instanceof aH&&(t=i.domAtPos(0))}for(var o=e.offset-1;!t&&o>=0;o--){var a=AW.get(n.childNodes[o]);a instanceof aH&&(t=a.domAtPos(a.length))}return t?new MW(t.node,t.offset,!0):e}},{key:"nearest",value:function(e){for(var t=e;t;){var n=AW.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}},{key:"posFromDOM",value:function(e,t){var n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}},{key:"domAtPos",value:function(e){for(var t=this.childCursor().findPos(e,-1),n=t.i,r=t.off;n<this.children.length-1;){var i=this.children[n];if(r<i.length||i instanceof aH)break;n++,r=0}return this.children[n].domAtPos(r)}},{key:"coordsAt",value:function(e,t){for(var n=null,r=0,i=this.length,o=this.children.length-1;o>=0;o--){var a=this.children[o],s=i-a.breakAfter,c=s-a.length;if(s<e)break;c<=e&&(c<e||a.covers(-1))&&(s>e||a.covers(1))&&(!n||a instanceof aH&&!(n instanceof aH&&t>=0))&&(n=a,r=c),i=c}return n?n.coordsAt(e-r,t):null}},{key:"coordsForChar",value:function(e){var t=this.childPos(e,1),n=t.i,r=t.off,i=this.children[n];if(!(i instanceof aH))return null;for(;i.children.length;){for(var o=i.childPos(r,1),a=o.i,s=o.off;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=s}if(!(i instanceof KW))return null;var c=SF(i.text,r);if(c==r)return null;for(var l=CW(i.dom,r,c).getClientRects(),u=0;u<l.length;u++){var f=l[u];if(u==l.length-1||f.top<f.bottom&&f.left<f.right)return f}return null}},{key:"measureVisibleLineHeights",value:function(e){for(var t=[],n=e.from,r=e.to,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==JH.LTR,c=0,l=0;l<this.children.length;l++){var u=this.children[l],f=c+u.length;if(f>r)break;if(c>=n){var d=u.dom.getBoundingClientRect();if(t.push(d.height),o){var h=u.dom.lastChild,v=h?vW(h):[];if(v.length){var p=v[v.length-1],m=s?p.right-d.left:d.right-p.left;m>a&&(a=m,this.minWidth=i,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+u.breakAfter}return t}},{key:"textDirectionAt",value:function(e){var t=this.childPos(e,1).i;return"rtl"==getComputedStyle(this.children[t].dom).direction?JH.RTL:JH.LTR}},{key:"measureTextSize",value:function(){var e,t=this,n=yi(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r instanceof aH){var i=r.measureTextSize();if(i)return i}}}catch(e){n.e(e)}finally{n.f()}var o,a,s,c=document.createElement("div");return c.className="cm-line",c.style.width="99999px",c.style.position="absolute",c.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){t.dom.appendChild(c);var e=vW(c.firstChild)[0];o=c.getBoundingClientRect().height,a=e?e.width/27:7,s=e?e.height:o,c.remove()})),{lineHeight:o,charWidth:a,textHeight:s}}},{key:"childCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,t=this.children.length;return t&&(e-=this.children[--t].length),new TW(this.children,e,t)}},{key:"computeBlockGapDeco",value:function(){for(var e=[],t=this.view.viewState,n=0,r=0;;r++){var i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){var a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(uH.replace({widget:new mU(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return uH.set(e)}},{key:"updateDeco",value:function(){for(var e=this,t=this.view.state.facet(zH).map((function(t,n){return(e.dynamicDecorationMap[n]="function"==typeof t)?t(e.view):t})),n=t.length;n<t.length+3;n++)this.dynamicDecorationMap[n]=!1;return this.decorations=[].concat(Bi(t),[this.computeBlockGapDeco(),this.view.viewState.lineGapDeco])}},{key:"scrollIntoView",value:function(e){if(e.isSnapshot){var t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}var n,r=e.range,i=this.coordsAt(r.head,r.empty?r.assoc:r.head>r.anchor?-1:1);if(i){!r.empty&&(n=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});var o=VH(this.view),a={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},s=this.view.scrollDOM,c=s.offsetWidth,l=s.offsetHeight;!function(e,t,n,r,i,o,a,s){for(var c=e.ownerDocument,l=c.defaultView||window,u=e,f=!1;u&&!f;)if(1==u.nodeType){var d=void 0,h=u==c.body,v=1,p=1;if(h)d=wW(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}var m=u.getBoundingClientRect();v=m.width/u.offsetWidth,p=m.height/u.offsetHeight,d={left:m.left,right:m.left+u.clientWidth*v,top:m.top,bottom:m.top+u.clientHeight*p}}var g=0,y=0;if("nearest"==i)t.top<d.top?(y=-(d.top-t.top+a),n>0&&t.bottom>d.bottom+y&&(y=t.bottom-d.bottom+y+a)):t.bottom>d.bottom&&(y=t.bottom-d.bottom+a,n<0&&t.top-y<d.top&&(y=-(d.top+y-t.top+a)));else{var b=t.bottom-t.top,w=d.bottom-d.top;y=("center"==i&&b<=w?t.top+b/2-w/2:"start"==i||"center"==i&&n<0?t.top-a:t.bottom-w+a)-d.top}if("nearest"==r?t.left<d.left?(g=-(d.left-t.left+o),n>0&&t.right>d.right+g&&(g=t.right-d.right+g+o)):t.right>d.right&&(g=t.right-d.right+o,n<0&&t.left<d.left+g&&(g=-(d.left+g-t.left+o))):g=("center"==r?t.left+(t.right-t.left)/2-(d.right-d.left)/2:"start"==r==s?t.left-o:t.right-(d.right-d.left)+o)-d.left,g||y)if(h)l.scrollBy(g,y);else{var k=0,x=0;if(y){var j=u.scrollTop;u.scrollTop+=y/p,x=(u.scrollTop-j)*p}if(g){var S=u.scrollLeft;u.scrollLeft+=g/v,k=(u.scrollLeft-S)*v}t={left:t.left-k,top:t.top-x,right:t.right-k,bottom:t.bottom-x},k&&Math.abs(k-g)<1&&(r="nearest"),x&&Math.abs(x-y)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,a,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==JH.LTR)}}}]),n}();var mU=function(e){_i(n,cH);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).height=e,r}return Di(n,[{key:"toDOM",value:function(){var e=document.createElement("div");return this.updateDOM(e),e}},{key:"eq",value:function(e){return e.height==this.height}},{key:"updateDOM",value:function(e){return e.style.height=this.height+"px",!0}},{key:"estimatedHeight",get:function(){return this.height}}]),n}();function gU(e,t){var n=e.observer.selectionRange,r=n.focusNode&&yU(n.focusNode,n.focusOffset,0);if(!r)return null;var i=t-r.offset;return{from:i,to:i+r.node.nodeValue.length,node:r.node}}function yU(e,t,n){if(n<=0)for(var r=e,i=t;;){if(3==r.nodeType)return{node:r,offset:i};if(!(1==r.nodeType&&i>0))break;i=yW(r=r.childNodes[i-1])}if(n>=0)for(var o=e,a=t;;){if(3==o.nodeType)return{node:o,offset:a};if(!(1==o.nodeType&&a<o.childNodes.length&&n>=0))break;o=o.childNodes[a],a=0}return null}var bU=function(){function e(){Ni(this,e),this.changes=[]}return Di(e,[{key:"compareRange",value:function(e,t){pH(e,t,this.changes)}},{key:"comparePoint",value:function(e,t){pH(e,t,this.changes)}}]),e}();function wU(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function kU(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function xU(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function jU(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function SU(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function CU(e,t,n){for(var r,i,o,a,s,c,l,u,f=!1,d=e.firstChild;d;d=d.nextSibling)for(var h=vW(d),v=0;v<h.length;v++){var p=h[v];i&&xU(i,p)&&(p=jU(SU(p,i.bottom),i.top));var m=wU(t,p),g=kU(n,p);if(0==m&&0==g)return 3==d.nodeType?$U(d,t,n):CU(d,t,n);if(!r||a>g||a==g&&o>m){r=d,i=p,o=m,a=g;var y=g?n<p.top?-1:1:m?t<p.left?-1:1:0;f=!y||(y>0?v<h.length-1:v>0)}0==m?n>p.bottom&&(!l||l.bottom<p.bottom)?(s=d,l=p):n<p.top&&(!u||u.top>p.top)&&(c=d,u=p):l&&xU(l,p)?l=SU(l,p.bottom):u&&xU(u,p)&&(u=jU(u,p.top))}if(l&&l.bottom>=n?(r=s,i=l):u&&u.top<=n&&(r=c,i=u),!r)return{node:e,offset:0};var b=Math.max(i.left,Math.min(i.right,t));return 3==r.nodeType?$U(r,b,n):f&&"false"!=r.contentEditable?CU(r,b,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function $U(e,t,n){for(var r=e.nodeValue.length,i=-1,o=1e9,a=0,s=0;s<r;s++)for(var c=CW(e,s,s+1).getClientRects(),l=0;l<c.length;l++){var u=c[l];if(u.top!=u.bottom){a||(a=t-u.left);var f=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&f<o){var d=t>=(u.left+u.right)/2,h=d;if(JW.chrome||JW.gecko)CW(e,s).getBoundingClientRect().left==u.right&&(h=!d);if(f<=0)return{node:e,offset:s+(h?1:0)};i=s+(h?1:0),o=f}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function _U(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=e.contentDOM.getBoundingClientRect(),c=s.top+e.viewState.paddingTop,l=e.viewState.docHeight,u=t.x,f=t.y,d=f-c;if(d<0)return 0;if(d>l)return e.state.doc.length;for(var h=e.viewState.heightOracle.textHeight/2,v=!1;(o=e.elementAtHeight(d)).type!=lH.Text;)for(;!((d=a>0?o.bottom+h:o.top-h)>=0&&d<=l);){if(v)return n?null:0;v=!0,a=-a}f=c+d;var p=o.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:OU(e,s,o,u,f);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:OU(e,s,o,u,f);var m=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:m,y=g.elementFromPoint(u,f);y&&!e.contentDOM.contains(y)&&(y=null),y||(u=Math.max(s.left+1,Math.min(s.right-1,u)),(y=g.elementFromPoint(u,f))&&!e.contentDOM.contains(y)&&(y=null));var b,w=-1;if(y&&0!=(null===(r=e.docView.nearest(y))||void 0===r?void 0:r.isEditable))if(m.caretPositionFromPoint){var k=m.caretPositionFromPoint(u,f);k&&(b=k.offsetNode,w=k.offset)}else if(m.caretRangeFromPoint){var x=m.caretRangeFromPoint(u,f);x&&(b=x.startContainer,w=x.startOffset,(!e.contentDOM.contains(b)||JW.safari&&function(e,t,n){var r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(var i=e.nextSibling;i;i=i.nextSibling)if(1!=i.nodeType||"BR"!=i.nodeName)return!1;return CW(e,r-1,r).getBoundingClientRect().left>n}(b,w,u)||JW.chrome&&function(e,t,n){if(0!=t)return!1;for(var r=e;;){var i=r.parentNode;if(!i||1!=i.nodeType||i.firstChild!=r)return!1;if(i.classList.contains("cm-line"))break;r=i}var o=1==e.nodeType?e.getBoundingClientRect():CW(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-o.left>5}(b,w,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){var j=aH.find(e.docView,p);if(!j)return d>o.top+o.height/2?o.to:o.from;var S=CU(j.dom,u,f);b=S.node,w=S.offset}var C=e.docView.nearest(b);if(!C)return null;if(C.isWidget&&1==(null===(i=C.dom)||void 0===i?void 0:i.nodeType)){var $=C.dom.getBoundingClientRect();return t.y<$.top||t.y<=$.bottom&&t.x<=($.left+$.right)/2?C.posAtStart:C.posAtEnd}return C.localPosFromDOM(b,w)+C.posAtStart}function OU(e,t,n,r,i){var o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){var a=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-a))/a)*e.viewState.heightOracle.lineLength}var s=e.state.sliceDoc(n.from,n.to);return n.from+XV(s,o,e.state.tabSize)}function MU(e,t){var n=e.lineBlockAt(t);if(Array.isArray(n.type)){var r,i=yi(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>t||o.to==t&&(o.to==n.to||o.type==lH.Text))return o}}catch(e){i.e(e)}finally{i.f()}}return n}function EU(e,t,n,r){for(var i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),a=e.textDirectionAt(i.from),s=t,c=null;;){var l=vU(i,o,a,s,n),u=hU;if(!l){if(i.number==(n?e.state.doc.lines:1))return s;u="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),l=VF.cursor(n?i.from:i.to)}if(c){if(!c(u))return s}else{if(!r)return l;c=r(u)}s=l}}function AU(e,t,n){for(var r,i=function(){var r,i=0,o=yi(e);try{for(o.s();!(r=o.n()).done;){r.value.between(t-1,t+1,(function(e,r,o){if(t>e&&t<r){var a=i||n||(t-e<r-t?-1:1);t=a<0?e:r,i=a}}))}}catch(e){o.e(e)}finally{o.f()}if(!i)return{v:t}};;)if(r=i())return r.v}function PU(e,t,n){var r=AU(e.state.facet(LH).map((function(t){return t(e)})),n.from,t.head>n.from?-1:1);return r==n.from?n:VF.cursor(r,r<n.from?1:-1)}var TU=function(){function e(t){Ni(this,e),this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,JW.safari&&t.contentDOM.addEventListener("input",(function(){return null})),JW.gecko&&function(e){aJ.has(e)||(aJ.add(e),e.addEventListener("copy",(function(){})),e.addEventListener("cut",(function(){})))}(t.contentDOM.ownerDocument)}return Di(e,[{key:"setSelectionOrigin",value:function(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}},{key:"handleEvent",value:function(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=AW.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}},{key:"runHandlers",value:function(e,t){var n=this.handlers[e];if(n){var r,i=yi(n.observers);try{for(i.s();!(r=i.n()).done;){(0,r.value)(this.view,t)}}catch(e){i.e(e)}finally{i.f()}var o,a=yi(n.handlers);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}catch(e){a.e(e)}finally{a.f()}}}},{key:"ensureHandlers",value:function(e){var t=NU(e),n=this.handlers,r=this.view.contentDOM;for(var i in t)if("scroll"!=i){var o=!t[i].handlers.length,a=n[i];a&&o!=!a.handlers.length&&(r.removeEventListener(i,this.handleEvent),a=null),a||r.addEventListener(i,this.handleEvent,{passive:o})}for(var s in n)"scroll"==s||t[s]||r.removeEventListener(s,this.handleEvent);this.handlers=t}},{key:"keydown",value:function(e){var t,n=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()<this.lastEscPress+2e3||(27!=e.keyCode&&zU.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),!JW.android||!JW.chrome||e.synthetic||13!=e.keyCode&&8!=e.keyCode?!JW.ios||e.synthetic||e.altKey||e.metaKey||!((t=IU.find((function(t){return t.keyCode==e.keyCode})))&&!e.ctrlKey||DU.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((function(){return n.flushIOSKey()}),250),!0):(this.view.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,$W(this.view.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(JW.safari&&!JW.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}},{key:"startMouseSelection",value:function(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}},{key:"update",value:function(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),e}();function RU(e,t){return function(n,r){try{return t.call(e,r,n)}catch(e){EH(n.state,e)}}}function NU(e){var t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}var r,i=yi(e);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.spec;if(a&&a.domEventHandlers)for(var s in a.domEventHandlers){var c=a.domEventHandlers[s];c&&n(s).handlers.push(RU(o.value,c))}if(a&&a.domEventObservers)for(var l in a.domEventObservers){var u=a.domEventObservers[l];u&&n(l).observers.push(RU(o.value,u))}}}catch(e){i.e(e)}finally{i.f()}for(var f in qU)n(f).handlers.push(qU[f]);for(var d in FU)n(d).observers.push(FU[d]);return t}var IU=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],DU="dthko",zU=[16,17,18,20,91,92,224,225];function LU(e){return.7*Math.max(0,e)+8}var BU=function(){function e(t,n,r,i){Ni(this,e),this.view=t,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=function(e){for(var t=e.ownerDocument,n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(t.contentDOM),this.atoms=t.state.facet(LH).map((function(e){return e(t)}));var o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(TV.allowMultipleSelections)&&function(e,t){var n=e.state.facet(bH);return n.length?n[0](t):JW.mac?t.metaKey:t.ctrlKey}(t,n),this.dragging=!(!function(e,t){var n=e.state.selection.main;if(n.empty)return!1;var r=fW(e.root);if(!r||0==r.rangeCount)return!0;for(var i=r.getRangeAt(0).getClientRects(),o=0;o<i.length;o++){var a=i[o];if(a.left<=t.clientX&&a.right>=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}(t,n)||1!=eJ(n))&&null}return Di(e,[{key:"start",value:function(e){!1===this.dragging&&this.select(e)}},{key:"move",value:function(e){var t;if(0==e.buttons)return this.destroy();if(!(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))){var n,r;this.select(this.lastEvent=e);var i=0,o=0,a=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=VH(this.view);e.clientX-s.left<=a.left+6?i=-LU(a.left-e.clientX):e.clientX+s.right>=a.right-6&&(i=LU(e.clientX-a.right)),e.clientY-s.top<=a.top+6?o=-LU(a.top-e.clientY):e.clientY+s.bottom>=a.bottom-6&&(o=LU(e.clientY-a.bottom)),this.setScrollSpeed(i,o)}}},{key:"up",value:function(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}},{key:"setScrollSpeed",value:function(e,t){var n=this;this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((function(){return n.scroll()}),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"skipAtoms",value:function(e){for(var t=null,n=0;n<e.ranges.length;n++){var r=e.ranges[n],i=null;if(r.empty){var o=AU(this.atoms,r.from,0);o!=r.from&&(i=VF.cursor(o,-1))}else{var a=AU(this.atoms,r.from,-1),s=AU(this.atoms,r.to,1);a==r.from&&s==r.to||(i=VF.range(r.from==r.anchor?a:s,r.from==r.head?a:s))}i&&(t||(t=e.ranges.slice()),t[n]=i)}return t?VF.create(t,e.mainIndex):e}},{key:"select",value:function(e){var t=this.view,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection)||n.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(e){var t=this;this.style.update(e)&&setTimeout((function(){return t.select(t.lastEvent)}),20)}}]),e}();var qU=Object.create(null),FU=Object.create(null),VU=JW.ie&&JW.ie_version<15||JW.ios&&JW.webkit_version<604;function WU(e,t){var n,r=e.state,i=1,o=r.toText(t),a=o.lines==r.selection.ranges.length,s=null!=nJ&&r.selection.ranges.every((function(e){return e.empty}))&&nJ==o.toString();if(s){var c=-1;n=r.changeByRange((function(e){var n=r.doc.lineAt(e.from);if(n.from==c)return{range:e};c=n.from;var s=r.toText((a?o.line(i++).text:t)+r.lineBreak);return{changes:{from:n.from,insert:s},range:VF.cursor(e.from+s.length)}}))}else n=a?r.changeByRange((function(e){var t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:VF.cursor(e.from+t.length)}})):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function HU(e,t,n,r){if(1==r)return VF.cursor(t,n);if(2==r)return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return VF.cursor(t);0==o?n=1:o==i.length&&(n=-1);var a=o,s=o;n<0?a=SF(i.text,o,!1):s=SF(i.text,o);for(var c=r(i.text.slice(a,s));a>0;){var l=SF(i.text,a,!1);if(r(i.text.slice(l,a))!=c)break;a=l}for(;s<i.length;){var u=SF(i.text,s);if(r(i.text.slice(s,u))!=c)break;s=u}return VF.range(a+i.from,s+i.from)}(e.state,t,n);var i=aH.find(e.docView,t),o=e.state.doc.lineAt(i?i.posAtEnd:t),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<e.state.doc.length&&s==o.to&&s++,VF.range(a,s)}FU.scroll=function(e){e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},qU.keydown=function(e,t){return e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1},FU.touchstart=function(e,t){e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},FU.touchmove=function(e){e.inputState.setSelectionOrigin("select.pointer")},qU.mousedown=function(e,t){if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;var n,r=null,i=yi(e.state.facet(kH));try{for(i.s();!(n=i.n()).done;){if(r=(0,n.value)(e,t))break}}catch(e){i.e(e)}finally{i.f()}if(r||0!=t.button||(r=function(e,t){var n=GU(e,t),r=eJ(t),i=e.state.selection;return{update:function(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get:function(t,o,a){var s,c=GU(e,t),l=HU(e,c.pos,c.bias,r);if(n.pos!=c.pos&&!o){var u=HU(e,n.pos,n.bias,r),f=Math.min(u.from,l.from),d=Math.max(u.to,l.to);l=f<l.from?VF.range(f,d):VF.range(d,f)}return o?i.replaceRange(i.main.extend(l.from,l.to)):a&&1==r&&i.ranges.length>1&&(s=function(e,t){for(var n=0;n<e.ranges.length;n++){var r=e.ranges[n],i=r.from,o=r.to;if(i<=t&&o>=t)return VF.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,c.pos))?s:a?i.addRange(l):VF.create([l])}}}(e,t)),r){var o=!e.hasFocus;e.inputState.startMouseSelection(new BU(e,t,r,o)),o&&e.observer.ignore((function(){return SW(e.contentDOM)}));var a=e.inputState.mouseSelection;if(a)return a.start(t),!1===a.dragging}return!1};var UU=function(e,t){return e>=t.top&&e<=t.bottom},JU=function(e,t,n){return UU(t,n)&&e>=n.left&&e<=n.right};function KU(e,t,n,r){var i=aH.find(e.docView,t);if(!i)return 1;var o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;var a=i.coordsAt(o,-1);if(a&&JU(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&JU(n,r,s)?1:a&&UU(r,a)?-1:1}function GU(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:KU(e,n,t.clientX,t.clientY)}}var QU=JW.ie&&JW.ie_version<=11,YU=null,XU=0,ZU=0;function eJ(e){if(!QU)return e.detail;var t=YU,n=ZU;return YU=e,ZU=Date.now(),XU=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(XU+1)%3:1}function tJ(e,t,n,r){if(n){var i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),o=e.inputState.draggedContent,a=r&&o&&function(e,t){var n=e.state.facet(wH);return n.length?n[0](t):JW.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,s={from:i,insert:n},c=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}}qU.dragstart=function(e,t){var n=e.state.selection.main;if(t.target.draggable){var r=e.docView.nearest(t.target);if(r&&r.isWidget){var i=r.posAtStart,o=i+r.length;(i>=n.to||o<=n.from)&&(n=VF.range(i,o))}}var a=e.inputState;return a.mouseSelection&&(a.mouseSelection.dragging=!0),a.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},qU.dragend=function(e){return e.inputState.draggedContent=null,!1},qU.drop=function(e,t){if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;var n=t.dataTransfer.files;if(n&&n.length){for(var r=Array(n.length),i=0,o=function(){++i==n.length&&tJ(e,t,r.filter((function(e){return null!=e})).join(e.state.lineBreak),!1)},a=function(e){var t=new FileReader;t.onerror=o,t.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])},s=0;s<n.length;s++)a(s);return!0}var c=t.dataTransfer.getData("Text");return!!c&&(tJ(e,t,c,!0),!0)},qU.paste=function(e,t){if(e.state.readOnly)return!0;e.observer.flush();var n=VU?null:t.clipboardData;return n?(WU(e,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(e){var t=e.dom.parentNode;if(t){var n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((function(){e.focus(),n.remove(),WU(e,n.value)}),50)}}(e),!1)};var nJ=null;qU.copy=qU.cut=function(e,t){var n=function(e){var t,n=[],r=[],i=!1,o=yi(e.selection.ranges);try{for(o.s();!(t=o.n()).done;){var a=t.value;a.empty||(n.push(e.sliceDoc(a.from,a.to)),r.push(a))}}catch(e){o.e(e)}finally{o.f()}if(!n.length){var s,c=-1,l=yi(e.selection.ranges);try{for(l.s();!(s=l.n()).done;){var u=s.value.from,f=e.doc.lineAt(u);f.number>c&&(n.push(f.text),r.push({from:f.from,to:Math.min(e.doc.length,f.to+1)})),c=f.number}}catch(e){l.e(e)}finally{l.f()}i=!0}return{text:n.join(e.lineBreak),ranges:r,linewise:i}}(e.state),r=n.text,i=n.ranges,o=n.linewise;if(!r&&!o)return!1;nJ=o?r:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});var a=VU?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",r),!0):(function(e,t){var n=e.dom.parentNode;if(n){var r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((function(){r.remove(),e.focus()}),50)}}(e,r),!1)};var rJ=yV.define();function iJ(e,t){var n,r=[],i=yi(e.facet(CH));try{for(i.s();!(n=i.n()).done;){var o=(0,n.value)(e,t);o&&r.push(o)}}catch(e){i.e(e)}finally{i.f()}return r?e.update({effects:r,annotations:rJ.of(!0)}):null}function oJ(e){setTimeout((function(){var t=e.hasFocus;if(t!=e.inputState.notifiedFocused){var n=iJ(e.state,t);n?e.dispatch(n):e.update([])}}),10)}FU.focus=function(e){e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),oJ(e)},FU.blur=function(e){e.observer.clearSelectionRange(),oJ(e)},FU.compositionstart=FU.compositionupdate=function(e){null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},FU.compositionend=function(e){e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,JW.chrome&&JW.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((function(){return e.observer.flush()})):setTimeout((function(){e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},FU.contextmenu=function(e){e.inputState.lastContextMenu=Date.now()},qU.beforeinput=function(e,t){var n,r;if(JW.chrome&&JW.android&&(r=IU.find((function(e){return e.inputType==t.inputType})))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){var i=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((function(){var t;((null===(t=window.visualViewport)||void 0===t?void 0:t.height)||0)>i+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return!1};var aJ=new Set;var sJ=["pre-wrap","normal","pre-line","break-spaces"],cJ=function(){function e(t){Ni(this,e),this.lineWrapping=t,this.doc=uF.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}return Di(e,[{key:"heightForGap",value:function(e,t){var n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}},{key:"heightForLine",value:function(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(e){return this.doc=e,this}},{key:"mustRefreshForWrapping",value:function(e){return sJ.indexOf(e)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(e){for(var t=!1,n=0;n<e.length;n++){var r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}},{key:"refresh",value:function(e,t,n,r,i,o){var a=sJ.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(var c=0;c<o.length;c++){var l=o[c];l<0?c++:this.heightSamples[Math.floor(10*l)]=!0}}return s}}]),e}(),lJ=function(){function e(t,n){Ni(this,e),this.from=t,this.heights=n,this.index=0}return Di(e,[{key:"more",get:function(){return this.index<this.heights.length}}]),e}(),uJ=function(){function e(t,n,r,i,o){Ni(this,e),this.from=t,this.length=n,this.top=r,this.height=i,this._content=o}return Di(e,[{key:"type",get:function(){return"number"==typeof this._content?lH.Text:Array.isArray(this._content)?this._content:this._content.type}},{key:"to",get:function(){return this.from+this.length}},{key:"bottom",get:function(){return this.top+this.height}},{key:"widget",get:function(){return this._content instanceof hH?this._content.widget:null}},{key:"widgetLineBreaks",get:function(){return"number"==typeof this._content?this._content:0}},{key:"join",value:function(t){var n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}}]),e}(),fJ=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(fJ||(fJ={})),dJ=.001,hJ=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;Ni(this,e),this.length=t,this.height=n,this.flags=r}return Di(e,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(e){this.flags=(e?2:0)|-3&this.flags}},{key:"setHeight",value:function(e,t){this.height!=t&&(Math.abs(this.height-t)>dJ&&(e.heightChanged=!0),this.height=t)}},{key:"replace",value:function(t,n,r){return e.of(r)}},{key:"decomposeLeft",value:function(e,t){t.push(this)}},{key:"decomposeRight",value:function(e,t){t.push(this)}},{key:"applyChanges",value:function(e,t,n,r){for(var i=this,o=n.doc,a=r.length-1;a>=0;a--){var s=r[a],c=s.fromA,l=s.toA,u=s.fromB,f=s.toB,d=i.lineAt(c,fJ.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,fJ.ByPosNoHeight,n,0,0);for(f+=h.to-l,l=h.to;a>0&&d.from<=r[a-1].toA;)c=r[a-1].fromA,u=r[a-1].fromB,a--,c<d.from&&(d=i.lineAt(c,fJ.ByPosNoHeight,n,0,0));u+=d.from-c,c=d.from;var v=bJ.build(n.setDoc(o),e,u,f);i=i.replace(c,l,v)}return i.updateHeight(n,0)}}],[{key:"empty",value:function(){return new pJ(0,0)}},{key:"of",value:function(t){if(1==t.length)return t[0];for(var n=0,r=t.length,i=0,o=0;;)if(n==r)if(i>2*o){var a=t[n-1];a.break?t.splice(--n,1,a.left,null,a.right):t.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else{if(!(o>2*i))break;var s=t[r];s.break?t.splice(r,1,s.left,null,s.right):t.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else if(i<o){var c=t[n++];c&&(i+=c.size)}else{var l=t[--r];l&&(o+=l.size)}var u=0;return null==t[n-1]?(u=1,n--):null==t[n]&&(u=1,r++),new gJ(e.of(t.slice(0,n)),u,e.of(t.slice(r)))}}]),e}();hJ.prototype.size=1;var vJ=function(e){_i(n,hJ);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this,e,r)).deco=i,o}return Di(n,[{key:"blockAt",value:function(e,t,n,r){return new uJ(r,this.length,n,this.height,this.deco||0)}},{key:"lineAt",value:function(e,t,n,r,i){return this.blockAt(0,n,r,i)}},{key:"forEachLine",value:function(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),n}(),pJ=function(e){_i(n,vJ);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this,e,r,null)).collapsed=0,i.widgetHeight=0,i.breaks=0,i}return Di(n,[{key:"blockAt",value:function(e,t,n,r){return new uJ(r,this.length,n,this.height,this.breaks)}},{key:"replace",value:function(e,t,r){var i=r[0];return 1==r.length&&(i instanceof n||i instanceof mJ&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof mJ?i=new n(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):hJ.of(r)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(),mJ=function(e){_i(n,hJ);var t=Mi(n);function n(e){return Ni(this,n),t.call(this,e,0)}return Di(n,[{key:"heightMetrics",value:function(e,t){var n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,a=0;if(e.lineWrapping){var s=Math.min(this.height,e.lineHeight*o);n=s/o,this.length>o+1&&(a=(this.height-s)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:a}}},{key:"blockAt",value:function(e,t,n,r){var i=this.heightMetrics(t,r),o=i.firstLine,a=i.lastLine,s=i.perLine,c=i.perChar;if(t.lineWrapping){var l=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),u=t.doc.lineAt(l),f=s+u.length*c,d=Math.max(n,e-f/2);return new uJ(u.from,u.length,d,f,0)}var h=Math.max(0,Math.min(a-o,Math.floor((e-n)/s))),v=t.doc.line(o+h),p=v.from,m=v.length;return new uJ(p,m,n+s*h,s,0)}},{key:"lineAt",value:function(e,t,n,r,i){if(t==fJ.ByHeight)return this.blockAt(e,n,r,i);if(t==fJ.ByPosNoHeight){var o=n.doc.lineAt(e),a=o.from,s=o.to;return new uJ(a,s-a,0,0,0)}var c=this.heightMetrics(n,i),l=c.firstLine,u=c.perLine,f=c.perChar,d=n.doc.lineAt(e),h=u+d.length*f,v=d.number-l,p=r+u*v+f*(d.from-i-v);return new uJ(d.from,d.length,Math.max(r,Math.min(p,r+this.height-h)),h,0)}},{key:"forEachLine",value:function(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);for(var a=this.heightMetrics(n,i),s=a.firstLine,c=a.perLine,l=a.perChar,u=e,f=r;u<=t;){var d=n.doc.lineAt(u);if(u==e){var h=d.number-s;f+=c*h+l*(e-i-h)}var v=c+l*d.length;o(new uJ(d.from,d.length,f,v,0)),f+=v,u=d.to+1}}},{key:"replace",value:function(e,t,r){var i=this.length-t;if(i>0){var o=r[r.length-1];o instanceof n?r[r.length-1]=new n(o.length+i):r.push(null,new n(i-1))}if(e>0){var a=r[0];a instanceof n?r[0]=new n(e+a.length):r.unshift(new n(e-1),null)}return hJ.of(r)}},{key:"decomposeLeft",value:function(e,t){t.push(new n(e-1),null)}},{key:"decomposeRight",value:function(e,t){t.push(null,new n(this.length-e-1))}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o=t+this.length;if(i&&i.from<=t+this.length&&i.more){var a=[],s=Math.max(t,i.from),c=-1;for(i.from>t&&a.push(new n(i.from-t-1).updateHeight(e,t));s<=o&&i.more;){var l=e.doc.lineAt(s).length;a.length&&a.push(null);var u=i.heights[i.index++];-1==c?c=u:Math.abs(u-c)>=dJ&&(c=-2);var f=new pJ(l,u);f.outdated=!1,a.push(f),s+=l+1}s<=o&&a.push(null,new n(o-s).updateHeight(e,s));var d=hJ.of(a);return(c<0||Math.abs(d.height-this.height)>=dJ||Math.abs(c-this.heightMetrics(e,t).perLine)>=dJ)&&(e.heightChanged=!0),d}return(r||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),n}(),gJ=function(e){_i(n,hJ);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this,e.length+r+i.length,e.height+i.height,r|(e.outdated||i.outdated?2:0))).left=e,o.right=i,o.size=e.size+i.size,o}return Di(n,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(e,t,n,r){var i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}},{key:"lineAt",value:function(e,t,n,r,i){var o=r+this.left.height,a=i+this.left.length+this.break,s=t==fJ.ByHeight?e<o:e<a,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,a);if(this.break||(s?c.to<a:c.from>a))return c;var l=t==fJ.ByPosNoHeight?fJ.ByPosNoHeight:fJ.ByPos;return s?c.join(this.right.lineAt(a,l,n,o,a)):this.left.lineAt(a,l,n,r,i).join(c)}},{key:"forEachLine",value:function(e,t,n,r,i,o){var a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,o),t>=s&&this.right.forEachLine(e,t,n,a,s,o);else{var c=this.lineAt(s,fJ.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,a,s,o)}}},{key:"replace",value:function(e,t,n){var r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));var i=[];e>0&&this.decomposeLeft(e,i);var o,a=i.length,s=yi(n);try{for(s.s();!(o=s.n()).done;){var c=o.value;i.push(c)}}catch(e){s.e(e)}finally{s.f()}if(e>0&&yJ(i,a-1),t<this.length){var l=i.length;this.decomposeRight(t,i),yJ(i,l)}return hJ.of(i)}},{key:"decomposeLeft",value:function(e,t){var n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}},{key:"decomposeRight",value:function(e,t){var n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}},{key:"balanced",value:function(e,t){return e.size>2*t.size||t.size>2*e.size?hJ.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=this.left,o=this.right,a=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=a+o.length&&r.more?s=o=o.updateHeight(e,a,n,r):o.updateHeight(e,a,n),s?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),n}();function yJ(e,t){var n,r;null==e[t]&&(n=e[t-1])instanceof mJ&&(r=e[t+1])instanceof mJ&&e.splice(t-1,3,new mJ(n.length+1+r.length))}var bJ=function(){function e(t,n){Ni(this,e),this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}return Di(e,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(e,t){if(this.lineStart>-1){var n=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof pJ?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new pJ(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}},{key:"point",value:function(e,t,n){if(e<t||n.heightRelevant){var r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);var o=t-e;n.block?this.addBlock(new vJ(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}},{key:"enterLine",value:function(){if(!(this.lineStart>-1)){var e=this.oracle.doc.lineAt(this.pos),t=e.from,n=e.to;this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new pJ(this.pos-t,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(e,t){var n=new mJ(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}},{key:"ensureLine",value:function(){this.enterLine();var e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof pJ)return e;var t=new pJ(0,-1);return this.nodes.push(t),t}},{key:"addBlock",value:function(e){this.enterLine();var t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}},{key:"addLineDeco",value:function(e,t,n){var r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}},{key:"finish",value:function(e){var t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof pJ||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new pJ(0,-1));var n,r=e,i=yi(this.nodes);try{for(i.s();!(n=i.n()).done;){var o=n.value;o instanceof pJ&&o.updateHeight(this.oracle,r),r+=o?o.length:1}}catch(e){i.e(e)}finally{i.f()}return this.nodes}}],[{key:"build",value:function(t,n,r,i){var o=new e(r,t);return LV.spans(n,r,i,o,0),o.finish(r)}}]),e}();var wJ=function(){function e(){Ni(this,e),this.changes=[]}return Di(e,[{key:"compareRange",value:function(){}},{key:"comparePoint",value:function(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&pH(e,t,this.changes,5)}}]),e}();function kJ(e,t){for(var n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom),l=e.parentNode;l&&l!=r.body;)if(1==l.nodeType){var u=l,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=f.overflow){var d=u.getBoundingClientRect();o=Math.max(o,d.left),a=Math.min(a,d.right),s=Math.max(s,d.top),c=l==e.parentNode?d.bottom:Math.min(c,d.bottom)}l="absolute"==f.position||"fixed"==f.position?u.offsetParent:u.parentNode}else{if(11!=l.nodeType)break;l=l.host}return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function xJ(e,t){var n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var jJ=function(){function e(t,n,r){Ni(this,e),this.from=t,this.to=n,this.size=r}return Di(e,[{key:"draw",value:function(e,t){return uH.replace({widget:new SJ(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}],[{key:"same",value:function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}}]),e}(),SJ=function(e){_i(n,cH);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this)).size=e,i.vertical=r,i}return Di(n,[{key:"eq",value:function(e){return e.size==this.size&&e.vertical==this.vertical}},{key:"toDOM",value:function(){var e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}},{key:"estimatedHeight",get:function(){return this.vertical?this.size:-1}}]),n}(),CJ=function(){function e(t){var n=this;Ni(this,e),this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=EJ,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=JH.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;var r=t.facet(DH).some((function(e){return"function"!=typeof e&&"cm-lineWrapping"==e.class}));this.heightOracle=new cJ(r),this.stateDeco=t.facet(zH).filter((function(e){return"function"!=typeof e})),this.heightMap=hJ.empty().applyChanges(this.stateDeco,uF.empty,this.heightOracle.setDoc(t.doc),[new HH(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=uH.set(this.lineGaps.map((function(e){return e.draw(n,!1)}))),this.computeVisibleRanges()}return Di(e,[{key:"updateForViewport",value:function(){for(var e=this,t=[this.viewport],n=this.state.selection.main,r=function(){var r=i?n.head:n.anchor;if(!t.some((function(e){var t=e.from,n=e.to;return r>=t&&r<=n}))){var o=e.lineBlockAt(r),a=o.from,s=o.to;t.push(new $J(a,s))}},i=0;i<=1;i++)r();this.viewports=t.sort((function(e,t){return e.from-t.from})),this.scaler=this.heightMap.height<=7e6?EJ:new AJ(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var e=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(function(t){e.viewportLines.push(1==e.scaler.scale?t:PJ(t,e.scaler))}))}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=e.state;var n=this.stateDeco;this.stateDeco=this.state.facet(zH).filter((function(e){return"function"!=typeof e}));var r,i,o,a,s=e.changedRanges,c=HH.extendWithRanges(s,(r=n,i=this.stateDeco,o=e?e.changes:NF.empty(this.state.doc.length),a=new wJ,LV.compare(r,i,o,a,0),a.changes)),l=this.heightMap.height,u=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),c),this.heightMap.height!=l&&(e.flags|=2),u?(this.scrollAnchorPos=e.changes.mapPos(u.from,-1),this.scrollAnchorHeight=u.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);var f=c.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<f.from||t.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,t));var d=!e.changes.empty||2&e.flags||f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,this.updateForViewport(),d&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(_H)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(e){var t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?JH.RTL:JH.LTR;var o=this.heightOracle.mustRefreshForWrapping(i),a=t.getBoundingClientRect(),s=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,l=0;if(a.width&&a.height){var u=a.width/t.offsetWidth,f=a.height/t.offsetHeight;(u>.995&&u<1.005||!isFinite(u)||Math.abs(a.width-t.offsetWidth)<1)&&(u=1),(f>.995&&f<1.005||!isFinite(f)||Math.abs(a.height-t.offsetHeight)<1)&&(f=1),this.scaleX==u&&this.scaleY==f||(this.scaleX=u,this.scaleY=f,c|=8,o=s=!0)}var d=(parseInt(n.paddingTop)||0)*this.scaleY,h=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);var v=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=v&&(this.scrollAnchorHeight=-1,this.scrollTop=v),this.scrolledToBottom=OW(e.scrollDOM);var p=(this.printing?xJ:kJ)(t,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;var y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(s=!0)),!this.inView&&!this.scrollTarget)return 0;var b=a.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),s){var w=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(w)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){var k=e.docView.measureTextSize(),x=k.lineHeight,j=k.charWidth,S=k.textHeight;(o=x>0&&r.refresh(i,x,j,S,b/j,w))&&(e.docView.minWidth=0,c|=8)}m>0&&g>0?l=Math.max(m,g):m<0&&g<0&&(l=Math.min(m,g)),r.heightChanged=!1;var C,$=yi(this.viewports);try{for($.s();!(C=$.n()).done;){var _=C.value,O=_.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(_);this.heightMap=(o?hJ.empty().applyChanges(this.stateDeco,uF.empty,this.heightOracle,[new HH(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new lJ(_.from,O))}}catch(e){$.e(e)}finally{$.f()}r.heightChanged&&(c|=2)}var M=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return M&&(this.viewport=this.getViewport(l,this.scrollTarget)),this.updateForViewport(),(2&c||M)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(e,t){var n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,o=this.visibleTop,a=this.visibleBottom,s=new $J(r.lineAt(o-1e3*n,fJ.ByHeight,i,0,0).from,r.lineAt(a+1e3*(1-n),fJ.ByHeight,i,0,0).to);if(t){var c=t.range.head;if(c<s.from||c>s.to){var l,u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,fJ.ByPos,i,0,0);l="center"==t.y?(f.top+f.bottom)/2-u/2:"start"==t.y||"nearest"==t.y&&c<s.from?f.top:f.bottom-u,s=new $J(r.lineAt(l-500,fJ.ByHeight,i,0,0).from,r.lineAt(l+u+500,fJ.ByHeight,i,0,0).to)}}return s}},{key:"mapViewport",value:function(e,t){var n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new $J(this.heightMap.lineAt(n,fJ.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,fJ.ByPos,this.heightOracle,0,0).to)}},{key:"viewportIsAppropriate",value:function(e){var t=e.from,n=e.to,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var i=this.heightMap.lineAt(t,fJ.ByPos,this.heightOracle,0,0).top,o=this.heightMap.lineAt(n,fJ.ByPos,this.heightOracle,0,0).bottom,a=this.visibleTop,s=this.visibleBottom;return(0==t||i<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=s+Math.max(10,Math.min(r,250)))&&i>a-2e3&&o<s+2e3}},{key:"mapLineGaps",value:function(e,t){if(!e.length||t.empty)return e;var n,r=[],i=yi(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.touchesRange(o.from,o.to)||r.push(new jJ(t.mapPos(o.from),t.mapPos(o.to),o.size))}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"ensureLineGaps",value:function(e,t){var n=this,r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,a=i<<1;if(this.defaultTextDirection!=JH.LTR&&!r)return[];var s,c=[],l=function i(a,s,l,u){if(!(s-a<o)){var f=n.state.selection.main,d=[f.from];f.empty||d.push(f.to);for(var h=0,v=d;h<v.length;h++){var p=v[h];if(p>a&&p<s)return i(a,p-10,l,u),void i(p+10,s,l,u)}var m=function(e,t){var n,r=yi(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t(i))return i}}catch(e){r.e(e)}finally{r.f()}return}(e,(function(e){return e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-a)<o&&Math.abs(e.to-s)<o&&!d.some((function(t){return e.from<t&&e.to>t}))}));if(!m){if(s<l.to&&t&&r&&t.visibleRanges.some((function(e){return e.from<=s&&e.to>=s}))){var g=t.moveToLineBoundary(VF.cursor(s),!1,!0).head;g>a&&(s=g)}m=new jJ(a,s,n.gapSize(l,a,s,u))}c.push(m)}},u=yi(this.viewportLines);try{for(u.s();!(s=u.n()).done;){var f=s.value;if(!(f.length<a)){var d=_J(f.from,f.to,this.stateDeco);if(!(d.total<a)){var h=this.scrollTarget?this.scrollTarget.range.head:null,v=void 0,p=void 0;if(r){var m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,g=void 0,y=void 0;if(null!=h){var b=MJ(d,h),w=((this.visibleBottom-this.visibleTop)/2+m)/f.height;g=b-w,y=b+w}else g=(this.visibleTop-f.top-m)/f.height,y=(this.visibleBottom-f.top+m)/f.height;v=OJ(d,g),p=OJ(d,y)}else{var k=d.total*this.heightOracle.charWidth,x=i*this.heightOracle.charWidth,j=void 0,S=void 0;if(null!=h){var C=MJ(d,h),$=((this.pixelViewport.right-this.pixelViewport.left)/2+x)/k;j=C-$,S=C+$}else j=(this.pixelViewport.left-x)/k,S=(this.pixelViewport.right+x)/k;v=OJ(d,j),p=OJ(d,S)}v>f.from&&l(f.from,v,f,d),p<f.to&&l(p,f.to,f,d)}}}}catch(e){u.e(e)}finally{u.f()}return c}},{key:"gapSize",value:function(e,t,n,r){var i=MJ(r,n)-MJ(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}},{key:"updateLineGaps",value:function(e){var t=this;jJ.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=uH.set(e.map((function(e){return e.draw(t,t.heightOracle.lineWrapping)}))))}},{key:"computeVisibleRanges",value:function(){var e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));var t=[];LV.spans(e,this.viewport.from,this.viewport.to,{span:function(e,n){t.push({from:e,to:n})},point:function(){}},20);var n=t.length!=this.visibleRanges.length||this.visibleRanges.some((function(e,n){return e.from!=t[n].from||e.to!=t[n].to}));return this.visibleRanges=t,n?4:0}},{key:"lineBlockAt",value:function(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((function(t){return t.from<=e&&t.to>=e}))||PJ(this.heightMap.lineAt(e,fJ.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(e){return PJ(this.heightMap.lineAt(this.scaler.fromDOM(e),fJ.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"scrollAnchorAt",value:function(e){var t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}},{key:"elementAtHeight",value:function(e){return PJ(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),e}(),$J=Di((function e(t,n){Ni(this,e),this.from=t,this.to=n}));function _J(e,t,n){var r=[],i=e,o=0;return LV.spans(n,e,t,{span:function(){},point:function(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i),{total:o,ranges:r}}function OJ(e,t){var n=e.total,r=e.ranges;if(t<=0)return r[0].from;if(t>=1)return r[r.length-1].to;for(var i=Math.floor(n*t),o=0;;o++){var a=r[o],s=a.from,c=a.to-s;if(i<=c)return s+i;i-=c}}function MJ(e,t){var n,r=0,i=yi(e.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.from,s=o.to;if(t<=s){r+=t-a;break}r+=s-a}}catch(e){i.e(e)}finally{i.f()}return r/e.total}var EJ={toDOM:function(e){return e},fromDOM:function(e){return e},scale:1},AJ=function(){function e(t,n,r){Ni(this,e);var i=0,o=0,a=0;this.viewports=r.map((function(e){var r=e.from,o=e.to,a=n.lineAt(r,fJ.ByPos,t,0,0).top,s=n.lineAt(o,fJ.ByPos,t,0,0).bottom;return i+=s-a,{from:r,to:o,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-i)/(n.height-i);var s,c=yi(this.viewports);try{for(c.s();!(s=c.n()).done;){var l=s.value;l.domTop=a+(l.top-o)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),o=l.bottom}}catch(e){c.e(e)}finally{c.f()}}return Di(e,[{key:"toDOM",value:function(e){for(var t=0,n=0,r=0;;t++){var i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}},{key:"fromDOM",value:function(e){for(var t=0,n=0,r=0;;t++){var i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}]),e}();function PJ(e,t){if(1==t.scale)return e;var n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new uJ(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((function(e){return PJ(e,t)})):e._content)}var TJ=UF.define({combine:function(e){return e.join(" ")}}),RJ=UF.define({combine:function(e){return e.indexOf(!0)>-1}}),NJ=nW.newName(),IJ=nW.newName(),DJ=nW.newName(),zJ={"&light":"."+IJ,"&dark":"."+DJ};function LJ(e,t,n){return new nW(t,{finish:function(t){return/&/.test(t)?t.replace(/&\w*/,(function(t){if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: ".concat(t));return n[t]})):e+" "+t}})}var BJ=LJ("."+NJ,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},zJ),qJ="￿",FJ=function(){function e(t,n){Ni(this,e),this.points=t,this.text="",this.lineSeparator=n.facet(TV.lineSeparator)}return Di(e,[{key:"append",value:function(e){this.text+=e}},{key:"lineBreak",value:function(){this.text+=qJ}},{key:"readRange",value:function(e,t){if(!e)return this;for(var n=e.parentNode,r=e;;){this.findPointBefore(n,r);var i=this.text.length;this.readNode(r);var o=r.nextSibling;if(o==t)break;var a=AW.get(r),s=AW.get(o);(a&&s?a.breakAfter:(a?a.breakAfter:WJ(r))||WJ(o)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>i)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}},{key:"readTextNode",value:function(e){var t,n=e.nodeValue,r=yi(this.points);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length))}}catch(e){r.e(e)}finally{r.f()}for(var o=0,a=this.lineSeparator?null:/\r\n?|\n/g;;){var s=-1,c=1,l=void 0;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,o),c=this.lineSeparator.length):(l=a.exec(n))&&(s=l.index,c=l[0].length),this.append(n.slice(o,s<0?n.length:s)),s<0)break;if(this.lineBreak(),c>1){var u,f=yi(this.points);try{for(f.s();!(u=f.n()).done;){var d=u.value;d.node==e&&d.pos>this.text.length&&(d.pos-=c-1)}}catch(e){f.e(e)}finally{f.f()}}o=s+c}}},{key:"readNode",value:function(e){if(!e.cmIgnore){var t=AW.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(var r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}}},{key:"findPointBefore",value:function(e,t){var n,r=yi(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}}catch(e){r.e(e)}finally{r.f()}}},{key:"findPointInside",value:function(e,t){var n,r=yi(this.points);try{for(r.s();!(n=r.n()).done;){var i=n.value;(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(VJ(e,i.node,i.offset)?t:0))}}catch(e){r.e(e)}finally{r.f()}}}]),e}();function VJ(e,t,n){for(;;){if(!t||n<yW(t))return!1;if(t==e)return!0;n=mW(t)+1,t=t.parentNode}}function WJ(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}var HJ=Di((function e(t,n){Ni(this,e),this.node=t,this.offset=n,this.pos=-1})),UJ=Di((function e(t,n,r,i){Ni(this,e),this.typeOver=i,this.bounds=null,this.text="";var o=t.docView,a=o.impreciseHead,s=o.impreciseAnchor;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,r,0))){var c=a||s?[]:function(e){var t=[];if(e.root.activeElement!=e.contentDOM)return t;var n=e.observer.selectionRange,r=n.anchorNode,i=n.anchorOffset,o=n.focusNode,a=n.focusOffset;r&&(t.push(new HJ(r,i)),o==r&&a==i||t.push(new HJ(o,a)));return t}(t),l=new FJ(c,t.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=function(e,t){if(0==e.length)return null;var n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?VF.single(n+t,r+t):null}(c,this.bounds.from)}else{var u=t.observer.selectionRange,f=a&&a.node==u.focusNode&&a.offset==u.focusOffset||!dW(t.contentDOM,u.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(u.focusNode,u.focusOffset),d=s&&s.node==u.anchorNode&&s.offset==u.anchorOffset||!dW(t.contentDOM,u.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=VF.single(d,f)}}));function JJ(e,t){var n,r=t.newSel,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){var a=t.bounds,s=a.from,c=a.to,l=i.from,u=null;(8===o||JW.android&&t.text.length<c-s)&&(l=i.to,u="end");var f=function(e,t,n,r){var i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;var a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,o-Math.min(a,s))-o}if(a<o&&e.length<t.length){s=(o-=n<=o&&n>=a?o-n:0)+(s-a),a=o}else if(s<o){a=(o-=n<=o&&n>=s?o-n:0)+(a-s),s=o}return{from:o,toA:a,toB:s}}(e.state.doc.sliceString(s,c,qJ),t.text,l-s,u);f&&(JW.chrome&&13==o&&f.toB==f.from+2&&t.text.slice(f.from,f.toB)==qJ+qJ&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:uF.of(t.text.slice(f.from,f.toB).split(qJ))})}else r&&(!e.hasFocus&&e.state.facet(AH)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(JW.mac||JW.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=VF.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:uF.of([" "])}):JW.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=VF.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:uF.of([" "])}),n){if(JW.ios&&e.inputState.flushIOSKey())return!0;if(JW.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&$W(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.length<n.to-n.from&&n.to>i.head)&&$W(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&$W(e.contentDOM,"Delete",46)))return!0;var d,h=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;var v=function(){return d||(d=function(e,t,n){var r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){var a=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(a+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{var c=i.changes(t),l=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){var u,f=e.state.sliceDoc(t.from,t.to),d=n&&gU(e,n.main.head);if(d){var h=t.insert.length-(t.to-t.from);u={from:d.from,to:d.to-h}}else u=e.state.doc.lineAt(o.head);var v=o.to-t.to,p=o.to-o.from;r=i.changeByRange((function(n){if(n.from==o.from&&n.to==o.to)return{changes:c,range:l||n.map(c)};var r=n.to-v,a=r-f.length;if(n.to-n.from!=p||e.state.sliceDoc(a,r)!=f||n.to>=u.from&&n.from<=u.to)return{range:n};var s=i.changes({from:a,to:r,insert:t.insert}),d=n.to-o.to;return{changes:s,range:l?VF.range(Math.max(0,l.anchor+d),Math.max(0,l.head+d)):n.map(s)}}))}else r={changes:c,selection:l&&i.selection.replaceRange(l)}}var m="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,m+=".compose",e.inputState.compositionFirstChange&&(m+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:m,scrollIntoView:!0})}(e,n,r))};return e.state.facet(SH).some((function(t){return t(e,n.from,n.to,h,v)}))||e.dispatch(v()),!0}if(r&&!r.main.eq(i)){var p=!1,m="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(p=!0),m=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:p,userEvent:m}),!0}return!1}var KJ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},GJ=JW.ie&&JW.ie_version<=11,QJ=function(){function e(t){var n=this;Ni(this,e),this.view=t,this.active=!1,this.selectionRange=new xW,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((function(e){var r,i=yi(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.queue.push(o)}}catch(e){i.e(e)}finally{i.f()}(JW.ie&&JW.ie_version<=11||JW.ios&&t.composing)&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),GJ&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((function(){var e;(null===(e=n.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&n.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((function(e){n.parentCheck<0&&(n.parentCheck=setTimeout(n.listenForScroll.bind(n),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=n.intersecting&&(n.intersecting=!n.intersecting,n.intersecting!=n.view.inView&&n.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((function(e){e.length>0&&e[e.length-1].intersectionRatio>0&&n.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}return Di(e,[{key:"onScrollChanged",value:function(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}},{key:"onResize",value:function(){var e=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((function(){e.resizeTimeout=-1,e.view.requestMeasure()}),50))}},{key:"onPrint",value:function(){var e=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout((function(){e.view.viewState.printing=!1,e.view.requestMeasure()}),500)}},{key:"updateGaps",value:function(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((function(t,n){return t!=e[n]})))){this.gapIntersection.disconnect();var t,n=yi(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.gapIntersection.observe(r)}}catch(e){n.e(e)}finally{n.f()}this.gaps=e}}},{key:"onSelectionChange",value:function(e){var t=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var n=this.view,r=this.selectionRange;if(n.state.facet(AH)?n.root.activeElement==this.dom:hW(n.dom,r)){var i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(JW.ie&&JW.ie_version<=11||JW.android&&JW.chrome)&&!n.state.selection.main.empty&&r.focusNode&&pW(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var e=this.view,t=JW.safari&&11==e.root.nodeType&&function(e){for(var t=e.activeElement;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){var t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);if(pW(s.node,s.offset,o,a)){var c=[o,a,r,i];r=c[0],i=c[1],o=c[2],a=c[3]}return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}}(this.view)||fW(e.root);if(!t||this.selectionRange.eq(t))return!1;var n=hW(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){var n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,yW(n));;)if(r){if(1!=n.nodeType)return!1;var i=n.childNodes[r-1];"false"==i.contentEditable?r--:r=yW(n=i)}else{if(n==e)return!0;r=mW(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}},{key:"setSelectionRange",value:function(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}},{key:"clearSelectionRange",value:function(){this.selectionRange.set(null,0,null,0)}},{key:"listenForScroll",value:function(){this.parentCheck=-1;for(var e=0,t=null,n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){var r,i=yi(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(e){i.e(e)}finally{i.f()}var o,a=yi(this.scrollTargets=t);try{for(a.s();!(o=a.n()).done;){o.value.addEventListener("scroll",this.onScroll)}}catch(e){a.e(e)}finally{a.f()}}}},{key:"ignore",value:function(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}},{key:"start",value:function(){this.active||(this.observer.observe(this.dom,KJ),GJ&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}},{key:"stop",value:function(){this.active&&(this.active=!1,this.observer.disconnect(),GJ&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}},{key:"clear",value:function(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}},{key:"delayAndroidKey",value:function(e,t){var n,r=this;if(!this.delayedAndroidKey){this.flushingAndroidKey=this.view.win.requestAnimationFrame((function(){var e=r.delayedAndroidKey;e&&(r.clearDelayedAndroidKey(),r.view.inputState.lastKeyCode=e.keyCode,r.view.inputState.lastKeyTime=Date.now(),!r.flush()&&e.force&&$W(r.dom,e.key,e.keyCode))}))}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}},{key:"clearDelayedAndroidKey",value:function(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}},{key:"flushSoon",value:function(){var e=this;this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((function(){e.delayedFlush=-1,e.flush()})))}},{key:"forceFlush",value:function(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"pendingRecords",value:function(){var e,t=yi(this.observer.takeRecords());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.queue.push(n)}}catch(e){t.e(e)}finally{t.f()}return this.queue}},{key:"processRecords",value:function(){var e=this.pendingRecords();e.length&&(this.queue=[]);var t,n=-1,r=-1,i=!1,o=yi(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=this.readMutation(a);s&&(s.typeOver&&(i=!0),-1==n?(n=s.from,r=s.to):(n=Math.min(s.from,n),r=Math.max(s.to,r)))}}catch(e){o.e(e)}finally{o.f()}return{from:n,to:r,typeOver:i}}},{key:"readChange",value:function(){var e=this.processRecords(),t=e.from,n=e.to,r=e.typeOver,i=this.selectionChanged&&hW(this.dom,this.selectionRange);if(t<0&&!i)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;var o=new UJ(this.view,t,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}},{key:"flush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();var t=this.readChange();if(!t)return this.view.requestMeasure(),!1;var n=this.view.state,r=JJ(this.view,t);return this.view.state==n&&this.view.update([]),r}},{key:"readMutation",value:function(e){var t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){var n=YJ(t,e.previousSibling||e.target.previousSibling,-1),r=YJ(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}},{key:"setWindow",value:function(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();var r,i=yi(this.scrollTargets);try{for(i.s();!(r=i.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(e){i.e(e)}finally{i.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),e}();function YJ(e,t,n){for(;t;){var r=AW.get(t);if(r&&r.parent==e)return r;var i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}var XJ=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ni(this,e),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);var r=n.dispatch;this.dispatchTransactions=n.dispatchTransactions||r&&function(e){return e.forEach((function(e){return r(e,t)}))}||function(e){return t.update(e)},this.dispatch=this.dispatch.bind(this),this._root=n.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(n.parent)||document,this.viewState=new CJ(n.state||TV.create(n)),n.scrollTo&&n.scrollTo.is(MH)&&(this.viewState.scrollTarget=n.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(TH).map((function(e){return new NH(e)}));var i,o=yi(this.plugins);try{for(o.s();!(i=o.n()).done;){i.value.update(this)}}catch(e){o.e(e)}finally{o.f()}this.observer=new QJ(this),this.inputState=new TU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new pU(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return Di(e,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=1==n.length&&n[0]instanceof xV?n:1==n.length&&Array.isArray(n[0])?n[0]:[(e=this.state).update.apply(e,n)];this.dispatchTransactions(i,this)}},{key:"update",value:function(e){var t=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var n,r,i=!1,o=!1,a=this.state,s=yi(e);try{for(s.s();!(r=s.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(e){s.e(e)}finally{s.f()}if(this.destroyed)this.viewState.state=a;else{var l=this.hasFocus,u=0,f=null;e.some((function(e){return e.annotation(rJ)}))?(this.inputState.notifiedFocused=l,u=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,(f=iJ(a,l))||(u=1));var d=this.observer.delayedAndroidKey,h=null;if(d?(this.observer.clearDelayedAndroidKey(),((h=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(h=null)):this.observer.clear(),a.facet(TV.phrases)!=this.state.facet(TV.phrases))return this.setState(a);n=UH.create(this,a,e),n.flags|=u;var v=this.viewState.scrollTarget;try{this.updateState=2;var p,m=yi(e);try{for(m.s();!(p=m.n()).done;){var g=p.value;if(v&&(v=v.map(g.changes)),g.scrollIntoView){var y=g.state.selection.main;v=new OH(y.empty?y:VF.cursor(y.head,y.head>y.anchor?-1:1))}var b,w=yi(g.effects);try{for(w.s();!(b=w.n()).done;){var k=b.value;k.is(MH)&&(v=k.value.clip(this.state))}}catch(e){w.e(e)}finally{w.f()}}}catch(e){m.e(e)}finally{m.f()}this.viewState.update(n,v),this.bidiCache=tK.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),i=this.docView.update(n),this.state.facet(WH)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(i,e.some((function(e){return e.isUserEvent("select.pointer")})))}finally{this.updateState=0}if(n.startState.facet(TJ)!=n.state.facet(TJ)&&(this.viewState.mustMeasureContent=!0),(i||o||v||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!n.empty){var x,j=yi(this.state.facet(jH));try{for(j.s();!(x=j.n()).done;){var S=x.value;try{S(n)}catch(k){EH(this.state,k,"update listener")}}}catch(e){j.e(e)}finally{j.f()}}(f||h)&&Promise.resolve().then((function(){f&&t.state==f.startState&&t.dispatch(f),h&&!JJ(t,h)&&d.force&&$W(t.contentDOM,d.key,d.keyCode)}))}}},{key:"setState",value:function(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=e;else{this.updateState=2;var t=this.hasFocus;try{var n,r=yi(this.plugins);try{for(r.s();!(n=r.n()).done;){n.value.destroy(this)}}catch(e){r.e(e)}finally{r.f()}this.viewState=new CJ(e),this.plugins=e.facet(TH).map((function(e){return new NH(e)})),this.pluginMap.clear();var i,o=yi(this.plugins);try{for(o.s();!(i=o.n()).done;){i.value.update(this)}}catch(e){o.e(e)}finally{o.f()}this.docView=new pU(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(e){var t=e.startState.facet(TH),n=e.state.facet(TH);if(t!=n){var r,i=[],o=yi(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=t.indexOf(a);if(s<0)i.push(new NH(a));else{var c=this.plugins[s];c.mustUpdate=e,i.push(c)}}}catch(e){o.e(e)}finally{o.f()}var l,u=yi(this.plugins);try{for(u.s();!(l=u.n()).done;){var f=l.value;f.mustUpdate!=e&&f.destroy(this)}}catch(e){u.e(e)}finally{u.f()}this.plugins=i,this.pluginMap.clear()}else{var d,h=yi(this.plugins);try{for(h.s();!(d=h.n()).done;){d.value.mustUpdate=e}}catch(e){h.e(e)}finally{h.f()}}for(var v=0;v<this.plugins.length;v++)this.plugins[v].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}},{key:"measure",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();var n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,o=this.viewState,a=o.scrollAnchorPos,s=o.scrollAnchorHeight;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(var c=0;;c++){if(s<0)if(OW(r))a=-1,s=this.viewState.heightMap.height;else{var l=this.viewState.scrollAnchorAt(i);a=l.from,s=l.top}this.updateState=1;var u=this.viewState.measure(this);if(!u&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&u)){var d=[f,this.measureRequests];this.measureRequests=d[0],f=d[1]}var h=f.map((function(t){try{return t.read(e)}catch(t){return EH(e.state,t),eK}})),v=UH.create(this,this.state,[]),p=!1;v.flags|=u,n?n.flags|=u:n=v,this.updateState=2,v.empty||(this.updatePlugins(v),this.inputState.update(v),this.updateAttrs(),p=this.docView.update(v));for(var m=0;m<f.length;m++)if(h[m]!=eK)try{var g=f[m];g.write&&g.write(h[m],this)}catch(e){EH(this.state,e)}if(p&&this.docView.updateSelection(!0),!v.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}var y=(a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-s;if(y>1||y<-1){i+=y,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty){var b,w=yi(this.state.facet(jH));try{for(w.s();!(b=w.n()).done;){(0,b.value)(n)}}catch(e){w.e(e)}finally{w.f()}}}}},{key:"themeClasses",get:function(){return NJ+" "+(this.state.facet(RJ)?DJ:IJ)+" "+this.state.facet(TJ)}},{key:"updateAttrs",value:function(){var e=this,t=nK(this,IH,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(AH)?"true":"false",class:"cm-content",style:"".concat(JW.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),nK(this,DH,n);var r=this.observer.ignore((function(){var r=iH(e.contentDOM,e.contentAttrs,n),i=iH(e.dom,e.editorAttrs,t);return r||i}));return this.editorAttrs=t,this.contentAttrs=n,r}},{key:"showAnnouncements",value:function(t){var n,r=!0,i=yi(t);try{for(i.s();!(n=i.n()).done;){var o,a=yi(n.value.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(e.announce))r&&(this.announceDOM.textContent=""),r=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=s.value}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(WH);var t=this.state.facet(e.cspNonce);nW.mount(this.root,this.styleModules.concat(BJ).reverse(),t?{nonce:t}:void 0)}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(e){var t=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((function(){return t.measure()}))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(var n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key)return void(this.measureRequests[n]=e);this.measureRequests.push(e)}}},{key:"plugin",value:function(e){var t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find((function(t){return t.spec==e}))||null),t&&t.update(this).value}},{key:"documentTop",get:function(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}},{key:"documentPadding",get:function(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}},{key:"scaleX",get:function(){return this.viewState.scaleX}},{key:"scaleY",get:function(){return this.viewState.scaleY}},{key:"elementAtHeight",value:function(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}},{key:"lineBlockAtHeight",value:function(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}},{key:"viewportLineBlocks",get:function(){return this.viewState.viewportLines}},{key:"lineBlockAt",value:function(e){return this.viewState.lineBlockAt(e)}},{key:"contentHeight",get:function(){return this.viewState.contentHeight}},{key:"moveByChar",value:function(e,t,n){return PU(this,e,EU(this,e,t,n))}},{key:"moveByGroup",value:function(e,t){var n=this;return PU(this,e,EU(this,e,t,(function(t){return function(e,t,n){var r=e.state.charCategorizer(t),i=r(n);return function(e){var t=r(e);return i==EV.Space&&(i=t),i==t}}(n,e.head,t)})))}},{key:"moveToLineBoundary",value:function(e,t){return function(e,t,n,r){var i=MU(e,t.head),o=r&&i.type==lH.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){var a=e.dom.getBoundingClientRect(),s=e.textDirectionAt(i.from),c=e.posAtCoords({x:n==(s==JH.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(null!=c)return VF.cursor(c,n?-1:1)}return VF.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(e,t,n){return PU(this,e,function(e,t,n,r){var i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return VF.cursor(i,t.assoc);var a,s=t.goalColumn,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(l)null==s&&(s=l.left-c.left),a=o<0?l.top:l.bottom;else{var f=e.viewState.lineBlockAt(i);null==s&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-f.from))),a=(o<0?f.top:f.bottom)+u}for(var d=c.left+s,h=null!=r?r:e.viewState.heightOracle.textHeight>>1,v=0;;v+=10){var p=a+(h+v)*o,m=_U(e,{x:d,y:p},!1,o);if(p<c.top||p>c.bottom||(o<0?m<i:m>i)){var g=e.docView.coordsForChar(m),y=!g||p<g.top?-1:1;return VF.cursor(m,y,void 0,s)}}}(this,e,t,n))}},{key:"domAtPos",value:function(e){return this.docView.domAtPos(e)}},{key:"posAtDOM",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(e,t)}},{key:"posAtCoords",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),_U(this,e,t)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;var r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return bW(n,i[sU.find(i,e-r.from,-1,t)].dir==JH.LTR==t>0)}},{key:"coordsForChar",value:function(e){return this.readMeasured(),this.docView.coordsForChar(e)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(e){return!this.state.facet($H)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(e){if(e.length>ZJ)return dU(e.length);var t,n,r=this.textDirectionAt(e.from),i=yi(this.bidiCache);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from==e.from&&o.dir==r&&(o.fresh||cU(o.isolates,t=qH(this,e.from,e.to))))return o.order}}catch(e){i.e(e)}finally{i.f()}t||(t=qH(this,e.from,e.to));var a=function(e,t,n){if(!e)return[new sU(0,0,t==GH?1:0)];if(t==KH&&!n.length&&!aU.test(e))return dU(e.length);if(n.length)for(;e.length>lU.length;)lU[lU.length]=256;var r=[],i=t==KH?0:1;return fU(e,i,i,n,0,e.length,r),r}(e.text,r,t);return this.bidiCache.push(new tK(e.from,e.to,r,t,!0,a)),a}},{key:"hasFocus",get:function(){var e;return(this.dom.ownerDocument.hasFocus()||JW.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var e=this;this.observer.ignore((function(){SW(e.contentDOM),e.docView.updateSelection()}))}},{key:"setRoot",value:function(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var e,t=yi(this.plugins);try{for(t.s();!(e=t.n()).done;){e.value.destroy(this)}}catch(e){t.e(e)}finally{t.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}},{key:"scrollSnapshot",value:function(){var e=this.scrollDOM,t=e.scrollTop,n=e.scrollLeft,r=this.viewState.scrollAnchorAt(t);return MH.of(new OH(VF.cursor(r.from),"start","start",r.top-t,n,!0))}}],[{key:"scrollIntoView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return MH.of(new OH("number"==typeof e?VF.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}},{key:"domEventHandlers",value:function(e){return RH.define((function(){return{}}),{eventHandlers:e})}},{key:"domEventObservers",value:function(e){return RH.define((function(){return{}}),{eventObservers:e})}},{key:"theme",value:function(e,t){var n=nW.newName(),r=[TJ.of(n),WH.of(LJ(".".concat(n),e))];return t&&t.dark&&r.push(RJ.of(!0)),r}},{key:"baseTheme",value:function(e){return iV.lowest(WH.of(LJ("."+NJ,e,zJ)))}},{key:"findFromDOM",value:function(e){var t,n=e.querySelector(".cm-content"),r=n&&AW.get(n)||AW.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}]),e}();XJ.styleModule=WH,XJ.inputHandler=SH,XJ.focusChangeEffect=CH,XJ.perLineTextDirection=$H,XJ.exceptionSink=xH,XJ.updateListener=jH,XJ.editable=AH,XJ.mouseSelectionStyle=kH,XJ.dragMovesSelection=wH,XJ.clickAddsSelectionRange=bH,XJ.decorations=zH,XJ.atomicRanges=LH,XJ.bidiIsolatedRanges=BH,XJ.scrollMargins=FH,XJ.darkTheme=RJ,XJ.cspNonce=UF.define({combine:function(e){return e.length?e[0]:""}}),XJ.contentAttributes=DH,XJ.editorAttributes=IH,XJ.lineWrapping=XJ.contentAttributes.of({class:"cm-lineWrapping"}),XJ.announce=kV.define();var ZJ=4096,eK={},tK=function(){function e(t,n,r,i,o,a){Ni(this,e),this.from=t,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}return Di(e,null,[{key:"update",value:function(t,n){if(n.empty&&!t.some((function(e){return e.fresh})))return t;for(var r=[],i=t.length?t[t.length-1].dir:JH.LTR,o=Math.max(0,t.length-10);o<t.length;o++){var a=t[o];a.dir!=i||n.touchesRange(a.from,a.to)||r.push(new e(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return r}}]),e}();function nK(e,t,n){for(var r=e.state.facet(t),i=r.length-1;i>=0;i--){var o=r[i],a="function"==typeof o?o(e):o;a&&tH(a,n)}return n}var rK=JW.mac?"mac":JW.windows?"win":JW.linux?"linux":"key";function iK(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}var oK=iV.default(XJ.domEventHandlers({keydown:function(e,t){return fK(cK(t.state),e,t,"editor")}})),aK=UF.define({enables:oK}),sK=new WeakMap;function cK(e){var t=e.facet(aK),n=sK.get(t);return n||sK.set(t,n=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rK,r=Object.create(null),i=Object.create(null),o=function(e,t){var n=i[e];if(null==n)i[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},a=function(e,t,i,a,s){for(var c,l,u=r[e]||(r[e]=Object.create(null)),f=t.split(/ (?!$)/).map((function(e){return function(e,t){var n,r,i,o,a=e.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var c=0;c<a.length-1;++c){var l=a[c];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))i=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);"mac"==t?o=!0:r=!0}}return n&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),i&&(s="Shift-"+s),s}(e,n)})),d=function(){var t=f.slice(0,h).join(" ");o(t,!0),u[t]||(u[t]={preventDefault:!0,stopPropagation:!1,run:[function(n){var r=lK={view:n,prefix:t,scope:e};return setTimeout((function(){lK==r&&(lK=null)}),uK),!0}]})},h=1;h<f.length;h++)d();var v=f.join(" ");o(v,!1);var p=u[v]||(u[v]={preventDefault:!1,stopPropagation:!1,run:(null===(l=null===(c=u._any)||void 0===c?void 0:c.run)||void 0===l?void 0:l.slice())||[]});i&&p.run.push(i),a&&(p.preventDefault=!0),s&&(p.stopPropagation=!0)},s=yi(e);try{for(s.s();!(t=s.n()).done;){var c=t.value,l=c.scope?c.scope.split(" "):["editor"];if(c.any){var u,f=yi(l);try{for(f.s();!(u=f.n()).done;){var d=u.value,h=r[d]||(r[d]=Object.create(null));for(var v in h._any||(h._any={preventDefault:!1,stopPropagation:!1,run:[]}),h)h[v].run.push(c.any)}}catch(e){f.e(e)}finally{f.f()}}var p=c[n]||c.key;if(p){var m,g=yi(l);try{for(g.s();!(m=g.n()).done;){var y=m.value;a(y,p,c.run,c.preventDefault,c.stopPropagation),c.shift&&a(y,"Shift-"+p,c.shift,c.preventDefault,c.stopPropagation)}}catch(e){g.e(e)}finally{g.f()}}}}catch(e){s.e(e)}finally{s.f()}return r}(t.reduce((function(e,t){return e.concat(t)}),[]))),n}var lK=null,uK=4e3;function fK(e,t,n,r){var i=function(e){var t=!(sW&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||cW&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?aW:oW)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),o=AF(MF(i,0))==i.length&&" "!=i,a="",s=!1,c=!1,l=!1;lK&&lK.view==n&&lK.scope==r&&(a=lK.prefix+" ",zU.indexOf(t.keyCode)<0&&(c=!0,lK=null));var u,f,d=new Set,h=function(e){if(e){var r,i=yi(e.run);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(!d.has(o)&&(d.add(o),o(n,t)))return e.stopPropagation&&(l=!0),!0}}catch(e){i.e(e)}finally{i.f()}e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},v=e[r];return v&&(h(v[a+iK(i,t,!o)])?s=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(JW.windows&&t.ctrlKey&&t.altKey)&&(u=oW[t.keyCode])&&u!=i?(h(v[a+iK(u,t,!0)])||t.shiftKey&&(f=aW[t.keyCode])!=i&&f!=u&&h(v[a+iK(f,t,!1)]))&&(s=!0):o&&t.shiftKey&&h(v[a+iK(i,t,!0)])&&(s=!0),!s&&h(v._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),s}var dK=function(){function e(t,n,r,i,o){Ni(this,e),this.className=t,this.left=n,this.top=r,this.width=i,this.height=o}return Di(e,[{key:"draw",value:function(){var e=document.createElement("div");return e.className=this.className,this.adjust(e),e}},{key:"update",value:function(e,t){return t.className==this.className&&(this.adjust(e),!0)}},{key:"adjust",value:function(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}},{key:"eq",value:function(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}}],[{key:"forRange",value:function(t,n,r){if(r.empty){var i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];var o=hK(t);return[new e(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}return pK(t,n,r)}}]),e}();function hK(e){var t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==JH.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function vK(e,t,n){var r=VF.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:lH.Text}}function pK(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];var r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==JH.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),c=hK(e),l=a.querySelector(".cm-line"),u=l&&window.getComputedStyle(l),f=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=s.right-(u?parseInt(u.paddingRight):0),h=MU(e,r),v=MU(e,i),p=h.type==lH.Text?h:null,m=v.type==lH.Text?v:null;if(p&&(e.lineWrapping||h.widgetLineBreaks)&&(p=vK(e,r,p)),m&&(e.lineWrapping||v.widgetLineBreaks)&&(m=vK(e,i,m)),p&&m&&p.from==m.from)return k(x(n.from,n.to,p));var g=p?x(n.from,null,p):j(h,!1),y=m?x(null,n.to,m):j(v,!0),b=[];return(p||h).to<(m||v).from-(p&&m?1:0)||h.widgetLineBreaks>1&&g.bottom+e.defaultLineHeight/2<y.top?b.push(w(f,g.bottom,d,y.top)):g.bottom<y.top&&e.elementAtHeight((g.bottom+y.top)/2).type==lH.Text&&(g.bottom=y.top=(g.bottom+y.top)/2),k(g).concat(b).concat(k(y));function w(e,n,r,i){return new dK(t,e-c.left,n-c.top-.01,r-e,i-n+.01)}function k(e){for(var t=e.top,n=e.bottom,r=e.horizontal,i=[],o=0;o<r.length;o+=2)i.push(w(r[o],t,r[o+1],n));return i}function x(t,n,r){var i=1e9,a=-1e9,s=[];function c(t,n,c,l,u){var h=e.coordsAtPos(t,t==r.to?-2:2),v=e.coordsAtPos(c,c==r.from?2:-2);h&&v&&(i=Math.min(h.top,v.top,i),a=Math.max(h.bottom,v.bottom,a),u==JH.LTR?s.push(o&&n?f:h.left,o&&l?d:v.right):s.push(!o&&l?f:v.left,!o&&n?d:h.right))}var l,u=null!=t?t:r.from,h=null!=n?n:r.to,v=yi(e.visibleRanges);try{for(v.s();!(l=v.n()).done;){var p=l.value;if(p.to>u&&p.from<h)for(var m=Math.max(p.from,u),g=Math.min(p.to,h);;){var y,b=e.state.doc.lineAt(m),w=yi(e.bidiSpans(b));try{for(w.s();!(y=w.n()).done;){var k=y.value,x=k.from+b.from,j=k.to+b.from;if(x>=g)break;j>m&&c(Math.max(x,m),null==t&&x<=u,Math.min(j,g),null==n&&j>=h,k.dir)}}catch(e){w.e(e)}finally{w.f()}if((m=b.to+1)>=g)break}}}catch(e){v.e(e)}finally{v.f()}return 0==s.length&&c(u,null==t,h,null==n,e.textDirection),{top:i,bottom:a,horizontal:s}}function j(e,t){var n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}var mK=function(){function e(t,n){Ni(this,e),this.view=t,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}return Di(e,[{key:"update",value:function(e){e.startState.facet(gK)!=e.state.facet(gK)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}},{key:"setOrder",value:function(e){for(var t=0,n=e.facet(gK);t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}},{key:"measure",value:function(){return this.layer.markers(this.view)}},{key:"scale",value:function(){var e=this.view,t=e.scaleX,n=e.scaleY;t==this.scaleX&&n==this.scaleY||(this.scaleX=t,this.scaleY=n,this.dom.style.transform="scale(".concat(1/t,", ").concat(1/n,")"))}},{key:"draw",value:function(e){var t=this;if(e.length!=this.drawn.length||e.some((function(e,n){return r=e,i=t.drawn[n],!(r.constructor==i.constructor&&r.eq(i));var r,i}))){var n,r=this.dom.firstChild,i=0,o=yi(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;a.update&&r&&a.constructor&&this.drawn[i].constructor&&a.update(r,this.drawn[i])?(r=r.nextSibling,i++):this.dom.insertBefore(a.draw(),r)}}catch(e){o.e(e)}finally{o.f()}for(;r;){var s=r.nextSibling;r.remove(),r=s}this.drawn=e}}},{key:"destroy",value:function(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}]),e}(),gK=UF.define();function yK(e){return[RH.define((function(t){return new mK(t,e)})),gK.of(e)]}var bK=!JW.ios,wK=UF.define({combine:function(e){return RV(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:function(e,t){return Math.min(e,t)},drawRangeCursor:function(e,t){return e||t}})}});function kK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[wK.of(e),jK,CK,_K,_H.of(!0)]}function xK(e){return e.startState.facet(wK)!=e.state.facet(wK)}var jK=yK({above:!0,markers:function(e){var t,n=e.state,r=n.facet(wK),i=[],o=yi(n.selection.ranges);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a==n.selection.main;if(a.empty?!s||bK:r.drawRangeCursor){var c,l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=a.empty?a:VF.cursor(a.head,a.head>a.anchor?-1:1),f=yi(dK.forRange(e,l,u));try{for(f.s();!(c=f.n()).done;){var d=c.value;i.push(d)}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){o.e(e)}finally{o.f()}return i},update:function(e,t){e.transactions.some((function(e){return e.selection}))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");var n=xK(e);return n&&SK(e.state,t),e.docChanged||e.selectionSet||n},mount:function(e,t){SK(t.state,e)},class:"cm-cursorLayer"});function SK(e,t){t.style.animationDuration=e.facet(wK).cursorBlinkRate+"ms"}var CK=yK({above:!1,markers:function(e){return e.state.selection.ranges.map((function(t){return t.empty?[]:dK.forRange(e,"cm-selectionBackground",t)})).reduce((function(e,t){return e.concat(t)}))},update:function(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||xK(e)},class:"cm-selectionLayer"}),$K={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};bK&&($K[".cm-line"].caretColor="transparent !important");var _K=iV.highest(XJ.theme($K)),OK=kV.define({map:function(e,t){return null==e?null:t.mapPos(e)}}),MK=XF.define({create:function(){return null},update:function(e,t){return null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((function(e,t){return t.is(OK)?t.value:e}),e)}}),EK=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Di(e,[{key:"update",value:function(e){var t,n=e.state.field(MK);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(MK)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var e=this.view,t=e.state.field(MK),n=null!=t&&e.coordsAtPos(t);if(!n)return null;var r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}},{key:"drawCursor",value:function(e){if(this.cursor){var t=this.view,n=t.scaleX,r=t.scaleY;e?(this.cursor.style.left=e.left/n+"px",this.cursor.style.top=e.top/r+"px",this.cursor.style.height=e.height/r+"px"):this.cursor.style.left="-100000px"}}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(e){this.view.state.field(MK)!=e&&this.view.dispatch({effects:OK.of(e)})}}]),e}(),{eventObservers:{dragover:function(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave:function(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function AK(e,t,n,r,i){t.lastIndex=0;for(var o,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;o=t.exec(a.value);)i(s+o.index,o)}var PK=function(){function e(t){Ni(this,e);var n=t.regexp,r=t.decoration,i=t.decorate,o=t.boundary,a=t.maxLength,s=void 0===a?1e3:a;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=function(e,t,n,r){return i(r,n,n+e[0].length,e,t)};else if("function"==typeof r)this.addMatch=function(e,t,n,i){var o=r(e,t,n);o&&i(n,n+e[0].length,o)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(e,t,n,i){return i(n,n+e[0].length,r)}}this.boundary=o,this.maxLength=s}return Di(e,[{key:"createDeco",value:function(e){var t,n=this,r=new BV,i=r.add.bind(r),o=yi(function(e,t){var n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;var r,i=[],o=yi(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,c=a.to;s=Math.max(e.state.doc.lineAt(s).from,s-t),c=Math.min(e.state.doc.lineAt(c).to,c+t),i.length&&i[i.length-1].to>=s?i[i.length-1].to=c:i.push({from:s,to:c})}}catch(e){o.e(e)}finally{o.f()}return i}(e,this.maxLength));try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.from,c=a.to;AK(e.state.doc,this.regexp,s,c,(function(t,r){return n.addMatch(r,e,t,i)}))}}catch(e){o.e(e)}finally{o.f()}return r.finish()}},{key:"updateDeco",value:function(e,t){var n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((function(t,i,o,a){a>e.view.viewport.from&&o<e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(a,r))})),e.viewportChanged||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}},{key:"updateRange",value:function(e,t,n,r){var i,o=this,a=yi(e.visibleRanges);try{var s=function(){var a=i.value,s=Math.max(a.from,n),c=Math.min(a.to,r);if(c>s){var l=e.state.doc.lineAt(s),u=l.to<c?e.state.doc.lineAt(c):l,f=Math.max(a.from,l.from),d=Math.min(a.to,u.to);if(o.boundary){for(;s>l.from;s--)if(o.boundary.test(l.text[s-1-l.from])){f=s;break}for(;c<u.to;c++)if(o.boundary.test(u.text[c-u.from])){d=c;break}}var h,v=[],p=function(e,t,n){return v.push(n.range(e,t))};if(l==u)for(o.regexp.lastIndex=f-l.from;(h=o.regexp.exec(l.text))&&h.index<d-l.from;)o.addMatch(h,e,h.index+l.from,p);else AK(e.state.doc,o.regexp,f,d,(function(t,n){return o.addMatch(n,e,t,p)}));t=t.update({filterFrom:f,filterTo:d,filter:function(e,t){return e<f||t>d},add:v})}};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return t}}]),e}(),TK=null!=/x/.unicode?"gu":"g",RK=new RegExp("[\0-\b\n--Ÿ­؜\u2028\u2029\ufeff-]",TK),NK={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},IK=null;var DK=UF.define({combine:function(e){var t=RV(e,{render:null,specialChars:RK,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==IK&&"undefined"!=typeof document&&document.body){var t=document.body.style;IK=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return IK||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,TK)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,TK)),t}});function zK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[DK.of(e),LK||(LK=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.decorations=uH.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(DK)),this.decorations=this.decorator.createDeco(t)}return Di(e,[{key:"makeDecorator",value:function(e){var t=this;return new PK({regexp:e.specialChars,decoration:function(n,r,i){var o=r.state.doc,a=MF(n[0],0);if(9==a){var s=o.lineAt(i),c=r.state.tabSize,l=YV(s.text,c,i-s.from);return uH.replace({widget:new qK((c-l%c)*t.view.defaultCharacterWidth/t.view.scaleX)})}return t.decorationCache[a]||(t.decorationCache[a]=uH.replace({widget:new BK(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(e){var t=e.state.facet(DK);e.startState.facet(DK)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}}]),e}(),{decorations:function(e){return e.decorations}}))]}var LK=null;var BK=function(e){_i(n,cH);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this)).options=e,i.code=r,i}return Di(n,[{key:"eq",value:function(e){return e.code==this.code}},{key:"toDOM",value:function(e){var t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(NK[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;var i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}},{key:"ignoreEvent",value:function(){return!1}}]),n}(),qK=function(e){_i(n,cH);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).width=e,r}return Di(n,[{key:"eq",value:function(e){return e.width==this.width}},{key:"toDOM",value:function(){var e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}},{key:"ignoreEvent",value:function(){return!1}}]),n}();var FK=uH.line({class:"cm-activeLine"}),VK=RH.fromClass(function(){function e(t){Ni(this,e),this.decorations=this.getDeco(t)}return Di(e,[{key:"update",value:function(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t,n=-1,r=[],i=yi(e.state.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.lineBlockAt(o.head);a.from>n&&(r.push(FK.range(a.from)),n=a.from)}}catch(e){i.e(e)}finally{i.f()}return uH.set(r)}}]),e}(),{decorations:function(e){return e.decorations}}),WK=2e3;function HK(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>WK?-1:i==r.length?function(e,t){var n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):YV(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function UK(e,t){var n=HK(e,t),r=e.state.selection;return n?{update:function(e){if(e.docChanged){var t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get:function(t,i,o){var a=HK(e,t);if(!a)return r;var s=function(e,t,n){var r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>WK||n.off>WK||t.col<0||n.col<0)for(var a=Math.min(t.off,n.off),s=Math.max(t.off,n.off),c=r;c<=i;c++){var l=e.doc.line(c);l.length<=s&&o.push(VF.range(l.from+a,l.to+s))}else for(var u=Math.min(t.col,n.col),f=Math.max(t.col,n.col),d=r;d<=i;d++){var h=e.doc.line(d),v=XV(h.text,u,e.tabSize,!0);if(v<0)o.push(VF.cursor(h.to));else{var p=XV(h.text,f,e.tabSize);o.push(VF.range(h.from+v,h.from+p))}}return o}(e.state,n,a);return s.length?o?VF.create(s.concat(r.ranges)):VF.create(s):r}}:null}function JK(e){var t=(null==e?void 0:e.eventFilter)||function(e){return e.altKey&&0==e.button};return XJ.mouseSelectionStyle.of((function(e,n){return t(n)?UK(e,n):null}))}var KK={Alt:[18,function(e){return!!e.altKey}],Control:[17,function(e){return!!e.ctrlKey}],Shift:[16,function(e){return!!e.shiftKey}],Meta:[91,function(e){return!!e.metaKey}]},GK={style:"cursor: crosshair"};function QK(){var e=xi(KK[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),t=e[0],n=e[1],r=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.isDown=!1}return Di(e,[{key:"set",value:function(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}}]),e}(),{eventObservers:{keydown:function(e){this.set(e.keyCode==t||n(e))},keyup:function(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove:function(e){this.set(n(e))}}});return[r,XJ.contentAttributes.of((function(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?GK:null}))]}var YK="-10000px",XK=function(){function e(t,n,r){Ni(this,e),this.facet=n,this.createTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter((function(e){return e})),this.tooltipViews=this.tooltips.map(r)}return Di(e,[{key:"update",value:function(e,t){var n,r=e.state.facet(this.facet),i=r.filter((function(e){return e}));if(r===this.input){var o,a=yi(this.tooltipViews);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.update&&s.update(e)}}catch(e){a.e(e)}finally{a.f()}return!1}for(var c=[],l=t?[]:null,u=0;u<i.length;u++){var f=i[u],d=-1;if(f){for(var h=0;h<this.tooltips.length;h++){var v=this.tooltips[h];v&&v.create==f.create&&(d=h)}if(d<0)c[u]=this.createTooltipView(f),l&&(l[u]=!!f.above);else{var p=c[u]=this.tooltipViews[d];l&&(l[u]=t[d]),p.update&&p.update(e)}}}var m,g=yi(this.tooltipViews);try{for(g.s();!(m=g.n()).done;){var y=m.value;c.indexOf(y)<0&&(y.dom.remove(),null===(n=y.destroy)||void 0===n||n.call(y))}}catch(e){g.e(e)}finally{g.f()}return t&&(l.forEach((function(e,n){return t[n]=e})),t.length=l.length),this.input=r,this.tooltips=i,this.tooltipViews=c,!0}}]),e}();function ZK(e){var t=e.win;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}var eG=UF.define({combine:function(e){var t,n,r;return{position:JW.ios?"absolute":(null===(t=e.find((function(e){return e.position})))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find((function(e){return e.parent})))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find((function(e){return e.tooltipSpace})))||void 0===r?void 0:r.tooltipSpace)||ZK}}}),tG=new WeakMap,nG=RH.fromClass(function(){function e(t){var n=this;Ni(this,e),this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;var r=t.state.facet(eG);this.position=r.position,this.parent=r.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new XK(t,oG,(function(e){return n.createTooltip(e)})),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((function(e){Date.now()>n.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&n.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Di(e,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var e,t=yi(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.intersectionObserver.observe(n.dom)}}catch(e){t.e(e)}finally{t.f()}}}},{key:"measureSoon",value:function(){var e=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout((function(){e.measureTimeout=-1,e.maybeMeasure()}),50))}},{key:"update",value:function(e){e.transactions.length&&(this.lastTransaction=Date.now());var t=this.manager.update(e,this.above);t&&this.observeIntersection();var n=t||e.geometryChanged,r=e.state.facet(eG);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;var i,o=yi(this.manager.tooltipViews);try{for(o.s();!(i=o.n()).done;){i.value.dom.style.position=this.position}}catch(e){o.e(e)}finally{o.f()}n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,s=yi(this.manager.tooltipViews);try{for(s.s();!(a=s.n()).done;){var c=a.value;this.container.appendChild(c.dom)}}catch(e){s.e(e)}finally{s.f()}n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}},{key:"createTooltip",value:function(e){var t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=YK,t.dom.style.left="0px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}},{key:"destroy",value:function(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);var n,r=yi(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.dom.remove(),null===(e=i.destroy)||void 0===e||e.call(i)}}catch(e){r.e(e)}finally{r.f()}this.parent&&this.container.remove(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var e=this,t=this.view.dom.getBoundingClientRect(),n=1,r=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){var o=this.manager.tooltipViews[0].dom;if(JW.gecko)i=o.offsetParent!=this.container.ownerDocument.body;else if(1!=this.view.scaleX||1!=this.view.scaleY)i=!0;else if(o.style.top==YK&&"0px"==o.style.left){var a=o.getBoundingClientRect();i=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(i||"absolute"==this.position)if(this.parent){var s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,r=s.height/this.parent.offsetHeight)}else{var c=this.view.viewState;n=c.scaleX,r=c.scaleY}return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((function(t,n){var r=e.manager.tooltipViews[n];return r.getCoords?r.getCoords(t.pos):e.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((function(e){return e.dom.getBoundingClientRect()})),space:this.view.state.facet(eG).tooltipSpace(this.view),scaleX:n,scaleY:r,makeAbsolute:i}}},{key:"writeMeasure",value:function(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";var n,r=yi(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){n.value.dom.style.position="absolute"}}catch(e){r.e(e)}finally{r.f()}}for(var i=e.editor,o=e.space,a=e.scaleX,s=e.scaleY,c=[],l=0;l<this.manager.tooltips.length;l++){var u=this.manager.tooltips[l],f=this.manager.tooltipViews[l],d=f.dom,h=e.pos[l],v=e.size[l];if(!h||h.bottom<=Math.max(i.top,o.top)||h.top>=Math.min(i.bottom,o.bottom)||h.right<Math.max(i.left,o.left)-.1||h.left>Math.min(i.right,o.right)+.1)d.style.top=YK;else{var p=u.arrow?f.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=v.right-v.left,y=null!==(t=tG.get(f))&&void 0!==t?t:v.bottom-v.top,b=f.offset||iG,w=this.view.textDirection==JH.LTR,k=v.width>o.right-o.left?w?o.left:o.right-v.width:w?Math.min(h.left-(p?14:0)+b.x,o.right-g):Math.max(o.left,h.left-g+(p?14:0)-b.x),x=this.above[l];!u.strictSide&&(x?h.top-(v.bottom-v.top)-b.y<o.top:h.bottom+(v.bottom-v.top)+b.y>o.bottom)&&x==o.bottom-h.bottom>h.top-o.top&&(x=this.above[l]=!x);var j=(x?h.top-o.top:o.bottom-h.bottom)-m;if(j<y&&!1!==f.resize){if(j<this.view.defaultLineHeight){d.style.top=YK;continue}tG.set(f,y),d.style.height=(y=j)/s+"px"}else d.style.height&&(d.style.height="");var S=x?h.top-y-m-b.y:h.bottom+m+b.y,C=k+g;if(!0!==f.overlap){var $,_=yi(c);try{for(_.s();!($=_.n()).done;){var O=$.value;O.left<C&&O.right>k&&O.top<S+y&&O.bottom>S&&(S=x?O.top-y-2-m:O.bottom+m+2)}}catch(e){_.e(e)}finally{_.f()}}if("absolute"==this.position?(d.style.top=(S-e.parent.top)/s+"px",d.style.left=(k-e.parent.left)/a+"px"):(d.style.top=S/s+"px",d.style.left=k/a+"px"),p){var M=h.left+(w?b.x:-b.x)-(k+14-7);p.style.left=M/a+"px"}!0!==f.overlap&&c.push({left:k,top:S,right:C,bottom:S+y}),d.classList.toggle("cm-tooltip-above",x),d.classList.toggle("cm-tooltip-below",!x),f.positioned&&f.positioned(e.space)}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var e,t=yi(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.style.top=YK}}catch(e){t.e(e)}finally{t.f()}}}}]),e}(),{eventObservers:{scroll:function(){this.maybeMeasure()}}}),rG=XJ.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),iG={x:0,y:0},oG=UF.define({enables:[nG,rG]}),aG=UF.define(),sG=function(){function e(t){var n=this;Ni(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new XK(t,aG,(function(e){return n.createHostedView(e)}))}return Di(e,[{key:"createHostedView",value:function(e){var t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}},{key:"mount",value:function(e){var t,n=yi(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.mount&&r.mount(e)}}catch(e){n.e(e)}finally{n.f()}this.mounted=!0}},{key:"positioned",value:function(e){var t,n=yi(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.positioned&&r.positioned(e)}}catch(e){n.e(e)}finally{n.f()}}},{key:"update",value:function(e){this.manager.update(e)}},{key:"destroy",value:function(){var e,t,n=yi(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;null===(e=r.destroy)||void 0===e||e.call(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"passProp",value:function(e){var t,n=void 0,r=yi(this.manager.tooltipViews);try{for(r.s();!(t=r.n()).done;){var i=t.value[e];if(void 0!==i)if(void 0===n)n=i;else if(n!==i)return}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"offset",get:function(){return this.passProp("offset")}},{key:"getCoords",get:function(){return this.passProp("getCoords")}},{key:"overlap",get:function(){return this.passProp("overlap")}},{key:"resize",get:function(){return this.passProp("resize")}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),cG=oG.compute([aG],(function(e){var t=e.facet(aG).filter((function(e){return e}));return 0===t.length?null:{pos:Math.min.apply(Math,Bi(t.map((function(e){return e.pos})))),end:Math.max.apply(Math,Bi(t.filter((function(e){return null!=e.end})).map((function(e){return e.end})))),create:sG.create,above:t[0].above,arrow:t.some((function(e){return e.arrow}))}})),lG=function(){function e(t,n,r,i,o){Ni(this,e),this.view=t,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Di(e,[{key:"update",value:function(){var e=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((function(){return e.startHover()}),20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}}},{key:"startHover",value:function(){var e=this;clearTimeout(this.restartTimeout);var t=this.view,n=this.lastMove,r=t.docView.nearest(n.target);if(r){var i,o=1;if(r instanceof QW)i=r.posAtStart;else{if(null==(i=t.posAtCoords(n)))return;var a=t.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-t.defaultCharacterWidth||n.x>a.right+t.defaultCharacterWidth)return;var s=t.bidiSpans(t.state.doc.lineAt(i)).find((function(e){return e.from<=i&&e.to>=i})),c=s&&s.dir==JH.RTL?-1:1;o=n.x<a.left?-c:c}var l=this.source(t,i,o);if(null==l?void 0:l.then){var u=this.pending={pos:i};l.then((function(n){e.pending==u&&(e.pending=null,n&&t.dispatch({effects:e.setHover.of(n)}))}),(function(e){return EH(t.state,e,"hover tooltip")}))}else l&&t.dispatch({effects:this.setHover.of(l)})}}},{key:"mousemove",value:function(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));var n=this.active;if(n&&!uG(this.lastMove.target)||this.pending){var r=(n||this.pending).pos,i=null!==(t=null==n?void 0:n.end)&&void 0!==t?t:r;(r==i?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,r,i,o){var a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;var c=e.posAtCoords({x:r,y:i},!1);return c>=t&&c<=n}(this.view,r,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}},{key:"mouseleave",value:function(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!uG(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}},{key:"destroy",value:function(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}]),e}();function uG(e){for(var t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function fG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=kV.define(),r=XF.define({create:function(){return null},update:function(e,r){if(e&&(t.hideOnChange&&(r.docChanged||r.selection)||t.hideOn&&t.hideOn(r,e)))return null;if(e&&r.docChanged){var i=r.changes.mapPos(e.pos,-1,TF.TrackDel);if(null==i)return null;var o=Object.assign(Object.create(null),e);o.pos=i,null!=e.end&&(o.end=r.changes.mapPos(e.end)),e=o}var a,s=yi(r.effects);try{for(s.s();!(a=s.n()).done;){var c=a.value;c.is(n)&&(e=c.value),c.is(hG)&&(e=null)}}catch(e){s.e(e)}finally{s.f()}return e},provide:function(e){return aG.from(e)}});return[r,RH.define((function(i){return new lG(i,e,r,n,t.hoverTime||300)})),cG]}function dG(e,t){var n=e.plugin(nG);if(!n)return null;var r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var hG=kV.define(),vG=UF.define({combine:function(e){var t,n,r,i=yi(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;t=t||o.topContainer,n=n||o.bottomContainer}}catch(e){i.e(e)}finally{i.f()}return{topContainer:t,bottomContainer:n}}});function pG(e,t){var n=e.plugin(mG),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var mG=RH.fromClass(function(){function e(t){Ni(this,e),this.input=t.state.facet(bG),this.specs=this.input.filter((function(e){return e})),this.panels=this.specs.map((function(e){return e(t)}));var n=t.state.facet(vG);this.top=new gG(t,!0,n.topContainer),this.bottom=new gG(t,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(e){return e.top}))),this.bottom.sync(this.panels.filter((function(e){return!e.top})));var r,i=yi(this.panels);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(e){i.e(e)}finally{i.f()}}return Di(e,[{key:"update",value:function(e){var t=e.state.facet(vG);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new gG(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new gG(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=e.state.facet(bG);if(n!=this.input){var r,i=n.filter((function(e){return e})),o=[],a=[],s=[],c=[],l=yi(i);try{for(l.s();!(r=l.n()).done;){var u=r.value,f=this.specs.indexOf(u),d=void 0;f<0?(d=u(e.view),c.push(d)):(d=this.panels[f]).update&&d.update(e),o.push(d),(d.top?a:s).push(d)}}catch(e){l.e(e)}finally{l.f()}this.specs=i,this.panels=o,this.top.sync(a),this.bottom.sync(s);for(var h=0,v=c;h<v.length;h++){var p=v[h];p.dom.classList.add("cm-panel"),p.mount&&p.mount()}}else{var m,g=yi(this.panels);try{for(g.s();!(m=g.n()).done;){var y=m.value;y.update&&y.update(e)}}catch(e){g.e(e)}finally{g.f()}}}},{key:"destroy",value:function(){this.top.sync([]),this.bottom.sync([])}}]),e}(),{provide:function(e){return XJ.scrollMargins.of((function(t){var n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))}}),gG=function(){function e(t,n,r){Ni(this,e),this.view=t,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}return Di(e,[{key:"sync",value:function(e){var t,n=yi(this.panels);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.destroy&&e.indexOf(r)<0&&r.destroy()}}catch(e){n.e(e)}finally{n.f()}this.panels=e,this.syncDOM()}},{key:"syncDOM",value:function(){if(0!=this.panels.length){if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";var e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}var t,n=this.dom.firstChild,r=yi(this.panels);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.dom.parentNode==this.dom){for(;n!=i.dom;)n=yG(n);n=n.nextSibling}else this.dom.insertBefore(i.dom,n)}}catch(e){r.e(e)}finally{r.f()}for(;n;)n=yG(n)}else this.dom&&(this.dom.remove(),this.dom=void 0)}},{key:"scrollMargin",value:function(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}},{key:"syncClasses",value:function(){if(this.container&&this.classes!=this.view.themeClasses){var e,t=yi(this.classes.split(" "));try{for(t.s();!(e=t.n()).done;){var n=e.value;n&&this.container.classList.remove(n)}}catch(e){t.e(e)}finally{t.f()}var r,i=yi((this.classes=this.view.themeClasses).split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value;o&&this.container.classList.add(o)}}catch(e){i.e(e)}finally{i.f()}}}}]),e}();function yG(e){var t=e.nextSibling;return e.remove(),t}var bG=UF.define({enables:mG}),wG=function(e){_i(n,NV);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"eq",value:function(e){return!1}},{key:"destroy",value:function(e){}}]),n}();wG.prototype.elementClass="",wG.prototype.toDOM=void 0,wG.prototype.mapMode=TF.TrackBefore,wG.prototype.startSide=wG.prototype.endSide=-1,wG.prototype.point=!0;var kG=UF.define(),xG={class:"",renderEmptyElements:!1,elementStyle:"",markers:function(){return LV.empty},lineMarker:function(){return null},widgetMarker:function(){return null},lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},jG=UF.define();function SG(e){return[$G(),jG.of(Object.assign(Object.assign({},xG),e))]}var CG=UF.define({combine:function(e){return e.some((function(e){return e}))}});function $G(e){var t=[_G];return e&&!1===e.fixed&&t.push(CG.of(!0)),t}var _G=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(jG).map((function(e){return new AG(t,e)}));var n,r=yi(this.gutters);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.dom.appendChild(i.dom)}}catch(e){r.e(e)}finally{r.f()}this.fixed=!t.state.facet(CG),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}return Di(e,[{key:"update",value:function(e){if(this.updateGutters(e)){var t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(CG)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}},{key:"syncGutters",value:function(e){var t=this,n=this.dom.nextSibling;e&&this.dom.remove();var r,i=LV.iter(this.view.state.facet(kG),this.view.viewport.from),o=[],a=this.gutters.map((function(e){return new EG(e,t.view.viewport,-t.view.documentPadding.top)})),s=yi(this.view.viewportLineBlocks);try{for(s.s();!(r=s.n()).done;){var c=r.value;if(o.length&&(o=[]),Array.isArray(c.type)){var l,u=!0,f=yi(c.type);try{for(f.s();!(l=f.n()).done;){var d=l.value;if(d.type==lH.Text&&u){MG(i,o,d.from);var h,v=yi(a);try{for(v.s();!(h=v.n()).done;){h.value.line(this.view,d,o)}}catch(e){v.e(e)}finally{v.f()}u=!1}else if(d.widget){var p,m=yi(a);try{for(m.s();!(p=m.n()).done;){p.value.widget(this.view,d)}}catch(e){m.e(e)}finally{m.f()}}}}catch(e){f.e(e)}finally{f.f()}}else if(c.type==lH.Text){MG(i,o,c.from);var g,y=yi(a);try{for(y.s();!(g=y.n()).done;){g.value.line(this.view,c,o)}}catch(e){y.e(e)}finally{y.f()}}else if(c.widget){var b,w=yi(a);try{for(w.s();!(b=w.n()).done;){b.value.widget(this.view,c)}}catch(e){w.e(e)}finally{w.f()}}}}catch(e){s.e(e)}finally{s.f()}var k,x=yi(a);try{for(x.s();!(k=x.n()).done;){k.value.finish()}}catch(e){x.e(e)}finally{x.f()}e&&this.view.scrollDOM.insertBefore(this.dom,n)}},{key:"updateGutters",value:function(e){var t=e.startState.facet(jG),n=e.state.facet(jG),r=e.docChanged||e.heightChanged||e.viewportChanged||!LV.eq(e.startState.facet(kG),e.state.facet(kG),e.view.viewport.from,e.view.viewport.to);if(t==n){var i,o=yi(this.gutters);try{for(o.s();!(i=o.n()).done;){i.value.update(e)&&(r=!0)}}catch(e){o.e(e)}finally{o.f()}}else{r=!0;var a,s=[],c=yi(n);try{for(c.s();!(a=c.n()).done;){var l=a.value,u=t.indexOf(l);u<0?s.push(new AG(this.view,l)):(this.gutters[u].update(e),s.push(this.gutters[u]))}}catch(e){c.e(e)}finally{c.f()}var f,d=yi(this.gutters);try{for(d.s();!(f=d.n()).done;){var h=f.value;h.dom.remove(),s.indexOf(h)<0&&h.destroy()}}catch(e){d.e(e)}finally{d.f()}for(var v=0,p=s;v<p.length;v++){var m=p[v];this.dom.appendChild(m.dom)}this.gutters=s}return r}},{key:"destroy",value:function(){var e,t=yi(this.gutters);try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(e){t.e(e)}finally{t.f()}this.dom.remove()}}]),e}(),{provide:function(e){return XJ.scrollMargins.of((function(t){var n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==JH.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null}))}});function OG(e){return Array.isArray(e)?e:[e]}function MG(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var EG=function(){function e(t,n,r){Ni(this,e),this.gutter=t,this.height=r,this.i=0,this.cursor=LV.iter(t.markers,n.from)}return Di(e,[{key:"addElement",value:function(e,t,n){var r=this.gutter,i=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==r.elements.length){var a=new PG(e,o,i,n);r.elements.push(a),r.dom.appendChild(a.dom)}else r.elements[this.i].update(e,o,i,n);this.height=t.bottom,this.i++}},{key:"line",value:function(e,t,n){var r=[];MG(this.cursor,r,t.from),n.length&&(r=r.concat(n));var i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);var o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}},{key:"widget",value:function(e,t){var n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}},{key:"finish",value:function(){for(var e=this.gutter;e.elements.length>this.i;){var t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}]),e}(),AG=function(){function e(t,n){var r=this;Ni(this,e),this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var i=function(e){r.dom.addEventListener(e,(function(i){var o,a=i.target;if(a!=r.dom&&r.dom.contains(a)){for(;a.parentNode!=r.dom;)a=a.parentNode;var s=a.getBoundingClientRect();o=(s.top+s.bottom)/2}else o=i.clientY;var c=t.lineBlockAtHeight(o-t.documentTop);n.domEventHandlers[e](t,c,i)&&i.preventDefault()}))};for(var o in n.domEventHandlers)i(o);this.markers=OG(n.markers(t)),n.initialSpacer&&(this.spacer=new PG(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Di(e,[{key:"update",value:function(e){var t=this.markers;if(this.markers=OG(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){var n=this.config.updateSpacer(this.spacer.markers[0],e);n!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[n])}var r=e.view.viewport;return!LV.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}},{key:"destroy",value:function(){var e,t=yi(this.elements);try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(e){t.e(e)}finally{t.f()}}}]),e}(),PG=function(){function e(t,n,r,i){Ni(this,e),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,r,i)}return Di(e,[{key:"update",value:function(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)||this.setMarkers(e,r)}},{key:"setMarkers",value:function(e,t){for(var n="cm-gutterElement",r=this.dom.firstChild,i=0,o=0;;){var a=o,s=i<t.length?t[i++]:null,c=!1;if(s){var l=s.elementClass;l&&(n+=" "+l);for(var u=o;u<this.markers.length;u++)if(this.markers[u].compare(s)){a=u,c=!0;break}}else a=this.markers.length;for(;o<a;){var f=this.markers[o++];if(f.toDOM){f.destroy(r);var d=r.nextSibling;r.remove(),r=d}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&o++}this.dom.className=n,this.markers=t}},{key:"destroy",value:function(){this.setMarkers(null,[])}}]),e}();var TG=UF.define(),RG=UF.define({combine:function(e){return RV(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers:function(e,t){var n=Object.assign({},e),r=function(){var e=n[i],r=t[i];n[i]=e?function(t,n,i){return e(t,n,i)||r(t,n,i)}:r};for(var i in t)r();return n}})}}),NG=function(e){_i(n,wG);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).number=e,r}return Di(n,[{key:"eq",value:function(e){return this.number==e.number}},{key:"toDOM",value:function(){return document.createTextNode(this.number)}}]),n}();function IG(e,t){return e.state.facet(RG).formatNumber(t,e.state)}var DG=jG.compute([RG],(function(e){return{class:"cm-lineNumbers",renderEmptyElements:!1,markers:function(e){return e.state.facet(TG)},lineMarker:function(e,t,n){return n.some((function(e){return e.toDOM}))?null:new NG(IG(e,e.state.doc.lineAt(t.from).number))},widgetMarker:function(){return null},lineMarkerChange:function(e){return e.startState.facet(RG)!=e.state.facet(RG)},initialSpacer:function(e){return new NG(IG(e,LG(e.state.doc.lines)))},updateSpacer:function(e,t){var n=IG(t.view,LG(t.view.state.doc.lines));return n==e.number?e:new NG(n)},domEventHandlers:e.facet(RG).domEventHandlers}}));function zG(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[RG.of(e),$G(),DG]}function LG(e){for(var t=9;t<e;)t=10*t+9;return t}var BG=new(function(e){_i(n,wG);var t=Mi(n);function n(){var e;return Ni(this,n),(e=t.apply(this,arguments)).elementClass="cm-activeLineGutter",e}return Di(n)}()),qG=kG.compute(["selection"],(function(e){var t,n=[],r=-1,i=yi(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.head).from;a>r&&(r=a,n.push(BG.range(a)))}}catch(e){i.e(e)}finally{i.f()}return LV.of(n)}));var FG=0,VG=Di((function e(t,n){Ni(this,e),this.from=t,this.to=n})),WG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ni(this,e),this.id=FG++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Di(e,[{key:"add",value:function(e){var t=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=JG.match(e)),function(n){var r=e(n);return void 0===r?null:[t,r]}}}]),e}();WG.closedBy=new WG({deserialize:function(e){return e.split(" ")}}),WG.openedBy=new WG({deserialize:function(e){return e.split(" ")}}),WG.group=new WG({deserialize:function(e){return e.split(" ")}}),WG.contextHash=new WG({perNode:!0}),WG.lookAhead=new WG({perNode:!0}),WG.mounted=new WG({perNode:!0});var HG=function(){function e(t,n,r){Ni(this,e),this.tree=t,this.overlay=n,this.parser=r}return Di(e,null,[{key:"get",value:function(e){return e&&e.props&&e.props[WG.mounted.id]}}]),e}(),UG=Object.create(null),JG=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Ni(this,e),this.name=t,this.props=n,this.id=r,this.flags=i}return Di(e,[{key:"prop",value:function(e){return this.props[e.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(e){if("string"==typeof e){if(this.name==e)return!0;var t=this.prop(WG.group);return!!t&&t.indexOf(e)>-1}return this.id==e}}],[{key:"define",value:function(t){var n=t.props&&t.props.length?Object.create(null):UG,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),i=new e(t.name||"",n,t.id,r);if(t.props){var o,a=yi(t.props);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}}catch(e){a.e(e)}finally{a.f()}}return i}},{key:"match",value:function(e){var t=Object.create(null);for(var n in e){var r,i=yi(n.split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value;t[o]=e[n]}}catch(e){i.e(e)}finally{i.f()}}return function(e){for(var n=e.prop(WG.group),r=-1;r<(n?n.length:0);r++){var i=t[r<0?e.name:n[r]];if(i)return i}}}}]),e}();JG.none=new JG("",Object.create(null),0,8);var KG,GG=function(){function e(t){Ni(this,e),this.types=t;for(var n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}return Di(e,[{key:"extend",value:function(){for(var t=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o,a=yi(this.types);try{for(a.s();!(o=a.n()).done;){var s,c=o.value,l=null,u=yi(r);try{for(u.s();!(s=u.n()).done;){var f=(0,s.value)(c);f&&(l||(l=Object.assign({},c.props)),l[f[0].id]=f[1])}}catch(e){u.e(e)}finally{u.f()}t.push(l?new JG(c.name,l,c.id,c.flags):c)}}catch(e){a.e(e)}finally{a.f()}return new e(t)}}]),e}(),QG=new WeakMap,YG=new WeakMap;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(KG||(KG={}));var XG=function(){function e(t,n,r,i,o){if(Ni(this,e),this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);var a,s=yi(o);try{for(s.s();!(a=s.n()).done;){var c=xi(a.value,2),l=c[0],u=c[1];this.props["number"==typeof l?l:l.id]=u}}catch(e){s.e(e)}finally{s.f()}}}return Di(e,[{key:"toString",value:function(){var e=HG.get(this);if(e&&!e.overlay)return e.tree.toString();var t,n="",r=yi(this.children);try{for(r.s();!(t=r.n()).done;){var i=t.value.toString();i&&(n&&(n+=","),n+=i)}}catch(e){r.e(e)}finally{r.f()}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}},{key:"cursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new fQ(this.topNode,e)}},{key:"cursorAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=QG.get(this)||this.topNode,r=new fQ(n);return r.moveTo(e,t),QG.set(this,r._tree),r}},{key:"topNode",get:function(){return new iQ(this,0,0,null)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=nQ(QG.get(this)||this.topNode,e,t,!1);return QG.set(this,n),n}},{key:"resolveInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=nQ(YG.get(this)||this.topNode,e,t,!0);return YG.set(this,n),n}},{key:"resolveStack",value:function(e){return function(e,t,n){for(var r=e.resolveInner(t,n),i=null,o=r instanceof iQ?r:r.context.parent;o;o=o.parent)if(o.index<0){var a=o.parent;(i||(i=[r])).push(a.resolve(t,n)),o=a}else{var s=HG.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){var c=new iQ(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(nQ(c,t,n,!1))}}return i?lQ(i):r}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"iterate",value:function(e){for(var t=e.enter,n=e.leave,r=e.from,i=void 0===r?0:r,o=e.to,a=void 0===o?this.length:o,s=e.mode||0,c=(s&KG.IncludeAnonymous)>0,l=this.cursor(s|KG.IncludeAnonymous);;){var u=!1;if(l.from<=a&&l.to>=i&&(!c&&l.type.isAnonymous||!1!==t(l))){if(l.firstChild())continue;u=!0}for(;u&&n&&(c||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}},{key:"prop",value:function(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}},{key:"propValues",get:function(){var e=[];if(this.props)for(var t in this.props)e.push([+t,this.props[t]]);return e}},{key:"balance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:mQ(JG.none,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,i){return new e(t.type,n,r,i,t.propValues)}),n.makeTree||function(t,n,r){return new e(JG.none,t,n,r)})}}],[{key:"build",value:function(e){return hQ(e)}}]),e}();XG.empty=new XG(JG.none,[],[],0);var ZG=function(){function e(t,n){Ni(this,e),this.buffer=t,this.index=n}return Di(e,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new e(this.buffer,this.index)}}]),e}(),eQ=function(){function e(t,n,r){Ni(this,e),this.buffer=t,this.length=n,this.set=r}return Di(e,[{key:"type",get:function(){return JG.none}},{key:"toString",value:function(){for(var e=[],t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}},{key:"childString",value:function(e){var t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;for(var o=[];e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}},{key:"findChild",value:function(e,t,n,r,i){for(var o=this.buffer,a=-1,s=e;s!=t&&!(tQ(i,r,o[s+1],o[s+2])&&(a=s,n>0));s=o[s+3]);return a}},{key:"slice",value:function(t,n,r){for(var i=this.buffer,o=new Uint16Array(n-t),a=0,s=t,c=0;s<n;){o[c++]=i[s++],o[c++]=i[s++]-r;var l=o[c++]=i[s++]-r;o[c++]=i[s++]-t,a=Math.max(a,l)}return new e(o,a,this.set)}}]),e}();function tQ(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function nQ(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){var o=!r&&e instanceof iQ&&e.index<0?null:e.parent;if(!o)return e;e=o}var a=r?0:KG.IgnoreOverlays;if(r)for(var s=e,c=s.parent;c;c=(s=c).parent)s instanceof iQ&&s.index<0&&(null===(i=c.enter(t,n,a))||void 0===i?void 0:i.from)!=s.from&&(e=c);for(;;){var l=e.enter(t,n,a);if(!l)return e;e=l}}var rQ=function(){function e(){Ni(this,e)}return Di(e,[{key:"cursor",value:function(){return new fQ(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"getChild",value:function(e){var t=oQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return t.length?t[0]:null}},{key:"getChildren",value:function(e){return oQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"resolve",value:function(e){return nQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(e){return nQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"matchContext",value:function(e){return aQ(this,e)}},{key:"enterUnfinishedNodesBefore",value:function(e){for(var t=this.childBefore(e),n=this;t;){var r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}},{key:"node",get:function(){return this}},{key:"next",get:function(){return this.parent}}]),e}(),iQ=function(e){_i(n,rQ);var t=Mi(n);function n(e,r,i,o){var a;return Ni(this,n),(a=t.call(this))._tree=e,a.from=r,a.index=i,a._parent=o,a}return Di(n,[{key:"type",get:function(){return this._tree.type}},{key:"name",get:function(){return this._tree.type.name}},{key:"to",get:function(){return this.from+this._tree.length}},{key:"nextChild",value:function(e,t,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a._tree,c=s.children,l=s.positions,u=t>0?c.length:-1;e!=u;e+=t){var f=c[e],d=l[e]+a.from;if(tQ(i,r,d,d+f.length))if(f instanceof eQ){if(o&KG.ExcludeBuffers)continue;var h=f.findChild(0,f.buffer.length,t,r-d,i);if(h>-1)return new cQ(new sQ(a,f,e,d),null,h)}else if(o&KG.IncludeAnonymous||!f.type.isAnonymous||dQ(f)){var v=void 0;if(!(o&KG.IgnoreMounts)&&(v=HG.get(f))&&!v.overlay)return new n(v.tree,d,e,a);var p=new n(f,d,e,a);return o&KG.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?f.children.length-1:0,t,r,i)}}if(o&KG.IncludeAnonymous||!a.type.isAnonymous)return null;if(e=a.index>=0?a.index+t:t<0?-1:a._parent._tree.children.length,!(a=a._parent))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(e){return this.nextChild(0,1,e,2)}},{key:"childBefore",value:function(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}},{key:"enter",value:function(e,t){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(i&KG.IgnoreOverlays)&&(r=HG.get(this._tree))&&r.overlay){var o,a=e-this.from,s=yi(r.overlay);try{for(s.s();!(o=s.n()).done;){var c=o.value,l=c.from,u=c.to;if((t>0?l<=a:l<a)&&(t<0?u>=a:u>a))return new n(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(e){s.e(e)}finally{s.f()}}return this.nextChild(0,1,e,t,i)}},{key:"nextSignificantParent",value:function(){for(var e=this;e.type.isAnonymous&&e._parent;)e=e._parent;return e}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"toString",value:function(){return this._tree.toString()}}]),n}();function oQ(e,t,n,r){var i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function aQ(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length-1,r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var sQ=Di((function e(t,n,r,i){Ni(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=i})),cQ=function(e){_i(n,rQ);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this)).context=e,o._parent=r,o.index=i,o.type=e.buffer.set.types[e.buffer.buffer[i]],o}return Di(n,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(e,t,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return o<0?null:new n(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(e){return this.child(1,e,2)}},{key:"childBefore",value:function(e){return this.child(-1,e,-2)}},{key:"enter",value:function(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&KG.ExcludeBuffers)return null;var r=this.context.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new n(this.context,this,i)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}},{key:"nextSibling",get:function(){var e=this.context.buffer,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new n(this.context,this._parent,t):this.externalSibling(1)}},{key:"prevSibling",get:function(){var e=this.context.buffer,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new n(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var e=[],t=[],n=this.context.buffer,r=this.index+4,i=n.buffer[this.index+3];if(i>r){var o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new XG(this.type,e,t,this.to-this.from)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}}]),n}();function lQ(e){if(!e.length)return null;for(var t=0,n=e[0],r=1;r<e.length;r++){var i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}var o=n instanceof iQ&&n.index<0?null:n.parent,a=e.slice();return o?a[t]=o:a.splice(t,1),new uQ(a,n)}var uQ=function(){function e(t,n){Ni(this,e),this.heads=t,this.node=n}return Di(e,[{key:"next",get:function(){return lQ(this.heads)}}]),e}();var fQ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Ni(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof iQ)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(var r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}return Di(e,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}},{key:"yieldBuf",value:function(e,t){this.index=e;var n=this.buffer,r=n.start,i=n.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}},{key:"yield",value:function(e){return!!e&&(e instanceof iQ?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));var r=this.buffer.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(e){return this.enterChild(1,e,2)}},{key:"childBefore",value:function(e){return this.enterChild(-1,e,-2)}},{key:"enter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(n&KG.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&KG.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var e=this.mode&KG.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}},{key:"sibling",value:function(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));var t=this.buffer.buffer,n=this.stack.length-1;if(e<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{var i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(e){var t,n,r=this.buffer;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(var i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;t=r.index,n=r.parent}else{var o=this._tree;t=o.index,n=o._parent}for(;n;t=(a=n).index,n=a._parent,a){var a;if(t>-1)for(var s=t+e,c=e<0?-1:n._tree.children.length;s!=c;s+=e){var l=n._tree.children[s];if(this.mode&KG.IncludeAnonymous||l instanceof eQ||!l.type.isAnonymous||dQ(l))return!1}}return!0}},{key:"move",value:function(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}},{key:"next",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,e)}},{key:"prev",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,e)}},{key:"moveTo",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}},{key:"node",get:function(){if(!this.buffer)return this._tree;var e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(var r=this.index,i=this.stack.length;i>=0;){for(var o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(var a=n;a<this.stack.length;a++)t=new cQ(this.buffer,t,this.stack[a]);return this.bufferNode=new cQ(this.buffer,t,this.index)}},{key:"tree",get:function(){return this.buffer?null:this._tree._tree}},{key:"iterate",value:function(e,t){for(var n=0;;){var r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,r=!0}}}},{key:"matchContext",value:function(e){if(!this.buffer)return aQ(this.node,e);for(var t=this.buffer.buffer,n=t.set.types,r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return aQ(this.node,e,r);var o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}]),e}();function dQ(e){return e.children.some((function(e){return e instanceof eQ||!e.type.isAnonymous||dQ(e)}))}function hQ(e){var t,n=e.buffer,r=e.nodeSet,i=e.maxBufferLength,o=void 0===i?1024:i,a=e.reused,s=void 0===a?[]:a,c=e.minRepeatType,l=void 0===c?r.types.length:c,u=Array.isArray(n)?new ZG(n,n.length):n,f=r.types,d=0,h=0;function v(e,t,n,i,a,c){for(var b=u.id,w=u.start,k=u.end,x=u.size,j=h;x<0;){if(u.next(),-1==x){var S=s[b];return n.push(S),void i.push(w-e)}if(-3==x)return void(d=b);if(-4==x)return void(h=b);throw new RangeError("Unrecognized record size: ".concat(x))}var C,$,_=f[b],O=w-e;if(k-w<=o&&($=function(e,t){var n=u.fork(),r=0,i=0,a=0,s=n.end-o,c={size:0,start:0,skip:0};e:for(var f=n.pos-e;n.pos>f;){var d=n.size;if(n.id==t&&d>=0)c.size=r,c.start=i,c.skip=a,a+=4,r+=4,n.next();else{var h=n.pos-d;if(d<0||h<f||n.start<s)break;var v=n.id>=l?4:0,p=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3!=n.size)break e;v+=4}else n.id>=l&&(v+=4);n.next()}i=p,r+=d,a+=v}}(t<0||r==e)&&(c.size=r,c.start=i,c.skip=a);return c.size>4?c:void 0}(u.pos-t,a))){for(var M=new Uint16Array($.size-$.skip),E=u.pos-$.size,A=M.length;u.pos>E;)A=y($.start,M,A);C=new eQ(M,k-$.start,r),O=$.start-e}else{var P=u.pos-x;u.next();for(var T=[],R=[],N=b>=l?b:-1,I=0,D=k;u.pos>P;)N>=0&&u.id==N&&u.size>=0?(u.end<=D-o&&(m(T,R,w,I,u.end,D,N,j),I=T.length,D=u.end),u.next()):c>2500?p(w,P,T,R):v(w,P,T,R,N,c+1);if(N>=0&&I>0&&I<T.length&&m(T,R,w,I,w,D,N,j),T.reverse(),R.reverse(),N>-1&&I>0){var z=function(e){return function(t,n,r){var i,o,a=0,s=t.length-1;if(s>=0&&(i=t[s])instanceof XG){if(!s&&i.type==e&&i.length==r)return i;(o=i.prop(WG.lookAhead))&&(a=n[s]+i.length+o)}return g(e,t,n,r,a)}}(_);C=mQ(_,T,R,0,T.length,0,k-w,z,z)}else C=g(_,T,R,k-w,j-k)}n.push(C),i.push(O)}function p(e,t,n,i){for(var a=[],s=0,c=-1;u.pos>t;){var l=u.id,f=u.start,d=u.end;if(u.size>4)u.next();else{if(c>-1&&f<c)break;c<0&&(c=d-o),a.push(l,f,d),s++,u.next()}}if(s){for(var h=new Uint16Array(4*s),v=a[a.length-2],p=a.length-3,m=0;p>=0;p-=3)h[m++]=a[p],h[m++]=a[p+1]-v,h[m++]=a[p+2]-v,h[m++]=m;n.push(new eQ(h,a[2]-v,r)),i.push(v-e)}}function m(e,t,n,i,o,a,s,c){for(var l=[],u=[];e.length>i;)l.push(e.pop()),u.push(t.pop()+n-o);e.push(g(r.types[s],l,u,a-o,c-a)),t.push(o-n)}function g(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;if(d){var a=[WG.contextHash,d];o=o?[a].concat(o):[a]}if(i>25){var s=[WG.lookAhead,i];o=o?[s].concat(o):[s]}return new XG(e,t,n,r,o)}function y(e,t,n){var r=u.id,i=u.start,o=u.end,a=u.size;if(u.next(),a>=0&&r<l){var s=n;if(a>4)for(var c=u.pos-(a-4);u.pos>c;)n=y(e,t,n);t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==a?d=r:-4==a&&(h=r);return n}for(var b=[],w=[];u.pos>0;)v(e.start||0,e.bufferStart||0,b,w,-1,0);var k=null!==(t=e.length)&&void 0!==t?t:b.length?w[0]+b[0].length:0;return new XG(f[e.topID],b.reverse(),w.reverse(),k)}var vQ=new WeakMap;function pQ(e,t){if(!e.isAnonymous||t instanceof eQ||t.type!=e)return 1;var n=vQ.get(t);if(null==n){n=1;var r,i=yi(t.children);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.type!=e||!(o instanceof XG)){n=1;break}n+=pQ(e,o)}}catch(e){i.e(e)}finally{i.f()}vQ.set(t,n)}return n}function mQ(e,t,n,r,i,o,a,s,c){for(var l=0,u=r;u<i;u++)l+=pQ(e,t[u]);var f=Math.ceil(1.5*l/8),d=[],h=[];return function t(n,r,i,a,s){for(var l=i;l<a;){var u=l,v=r[l],p=pQ(e,n[l]);for(l++;l<a;l++){var m=pQ(e,n[l]);if(p+m>=f)break;p+=m}if(l==u+1){if(p>f){var g=n[u];t(g.children,g.positions,0,g.children.length,r[u]+s);continue}d.push(n[u])}else{var y=r[l-1]+n[l-1].length-v;d.push(mQ(e,n,r,u,l,v,y,null,c))}h.push(v+s-o)}}(t,n,r,i,0),(s||c)(d,h,a)}var gQ=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Ni(this,e),this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}return Di(e,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=[new e(0,t.length,t,0,!1,i)],a=yi(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.to>t.length&&o.push(s)}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"applyChanges",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return t;for(var i=[],o=1,a=t.length?t[0]:null,s=0,c=0,l=0;;s++){var u=s<n.length?n[s]:null,f=u?u.fromA:1e9;if(f-c>=r)for(;a&&a.from<f;){var d=a;if(c>=d.from||f<=d.to||l){var h=Math.max(d.from,c)-l,v=Math.min(d.to,f)-l;d=h>=v?null:new e(h,v,d.tree,d.offset+l,s>0,!!u)}if(d&&i.push(d),a.to>f)break;a=o<t.length?t[o++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}}]),e}(),yQ=function(){function e(){Ni(this,e)}return Di(e,[{key:"startParse",value:function(e,t,n){return"string"==typeof e&&(e=new bQ(e)),n=n?n.length?n.map((function(e){return new VG(e.from,e.to)})):[new VG(0,0)]:[new VG(0,e.length)],this.createParse(e,t||[],n)}},{key:"parse",value:function(e,t,n){for(var r=this.startParse(e,t,n);;){var i=r.advance();if(i)return i}}}]),e}(),bQ=function(){function e(t){Ni(this,e),this.string=t}return Di(e,[{key:"length",get:function(){return this.string.length}},{key:"chunk",value:function(e){return this.string.slice(e)}},{key:"lineChunks",get:function(){return!1}},{key:"read",value:function(e,t){return this.string.slice(e,t)}}]),e}();new WG({perNode:!0});var wQ=0,kQ=function(){function e(t,n,r){Ni(this,e),this.set=t,this.base=n,this.modified=r,this.id=wQ++}return Di(e,null,[{key:"define",value:function(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");var n=new e([],null,[]);if(n.set.push(n),t){var r,i=yi(t.set);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.set.push(o)}}catch(e){i.e(e)}finally{i.f()}}return n}},{key:"defineModifier",value:function(){var e=new jQ;return function(t){return t.modified.indexOf(e)>-1?t:jQ.get(t.base||t,t.modified.concat(e).sort((function(e,t){return e.id-t.id})))}}}]),e}(),xQ=0,jQ=function(){function e(){Ni(this,e),this.instances=[],this.id=xQ++}return Di(e,null,[{key:"get",value:function(t,n){if(!n.length)return t;var r=n[0].instances.find((function(e){return e.base==t&&(r=n,i=e.modified,r.length==i.length&&r.every((function(e,t){return e==i[t]})));var r,i}));if(r)return r;var i,o=[],a=new kQ(o,t,n),s=yi(n);try{for(s.s();!(i=s.n()).done;){i.value.instances.push(a)}}catch(e){s.e(e)}finally{s.f()}var c,l=function(e){for(var t=[[]],n=0;n<e.length;n++)for(var r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((function(e,t){return t.length-e.length}))}(n),u=yi(t.set);try{for(u.s();!(c=u.n()).done;){var f=c.value;if(!f.modified.length){var d,h=yi(l);try{for(h.s();!(d=h.n()).done;){var v=d.value;o.push(e.get(f,v))}}catch(e){h.e(e)}finally{h.f()}}}}catch(e){u.e(e)}finally{u.f()}return a}}]),e}();function SQ(e){var t=Object.create(null);for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]);var i,o=yi(n.split(" "));try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a){for(var s=[],c=2,l=a,u=0;;){if("..."==l&&u>0&&u+3==a.length){c=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+a);if(s.push("*"==f[0]?"":'"'==f[0][0]?JSON.parse(f[0]):f[0]),(u+=f[0].length)==a.length)break;var d=a[u++];if(u==a.length&&"!"==d){c=0;break}if("/"!=d)throw new RangeError("Invalid path: "+a);l=a.slice(u)}var h=s.length-1,v=s[h];if(!v)throw new RangeError("Invalid path: "+a);var p=new $Q(r,c,h>0?s.slice(0,h):null);t[v]=p.sort(t[v])}}}catch(e){o.e(e)}finally{o.f()}}return CQ.add(t)}var CQ=new WG,$Q=function(){function e(t,n,r,i){Ni(this,e),this.tags=t,this.mode=n,this.context=r,this.next=i}return Di(e,[{key:"opaque",get:function(){return 0==this.mode}},{key:"inherit",get:function(){return 1==this.mode}},{key:"sort",value:function(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}},{key:"depth",get:function(){return this.context?this.context.length:0}}]),e}();function _Q(e,t){var n,r=Object.create(null),i=yi(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(Array.isArray(o.tag)){var a,s=yi(o.tag);try{for(s.s();!(a=s.n()).done;){var c=a.value;r[c.id]=o.class}}catch(e){s.e(e)}finally{s.f()}}else r[o.tag.id]=o.class}}catch(e){i.e(e)}finally{i.f()}var l=t||{},u=l.scope,f=l.all,d=void 0===f?null:f;return{style:function(e){var t,n=d,i=yi(e);try{for(i.s();!(t=i.n()).done;){var o,a=yi(t.value.set);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=r[s.id];if(c){n=n?n+" "+c:c;break}}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}return n},scope:u}}function OQ(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length,o=new MQ(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}$Q.empty=new $Q([],2,null);var MQ=function(){function e(t,n,r){Ni(this,e),this.at=t,this.highlighters=n,this.span=r,this.class=""}return Di(e,[{key:"startSpan",value:function(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}},{key:"flush",value:function(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}},{key:"highlightRange",value:function(e,t,n,r,i){var o=e.type,a=e.from,s=e.to;if(!(a>=n||s<=t)){o.isTop&&(i=this.highlighters.filter((function(e){return!e.scope||e.scope(o)})));var c=r,l=function(e){var t=e.type.prop(CQ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||$Q.empty,u=function(e,t){var n,r=null,i=yi(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.style(t);o&&(r=r?r+" "+o:o)}}catch(e){i.e(e)}finally{i.f()}return r}(i,l.tags);if(u&&(c&&(c+=" "),c+=u,1==l.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,a),c),!l.opaque){var f=e.tree&&e.tree.prop(WG.mounted);if(f&&f.overlay){for(var d=e.node.enter(f.overlay[0].from+a,1),h=this.highlighters.filter((function(e){return!e.scope||e.scope(f.tree.type)})),v=e.firstChild(),p=0,m=a;;p++){var g=p<f.overlay.length?f.overlay[p]:null,y=g?g.from+a:s,b=Math.max(t,m),w=Math.min(n,y);if(b<w&&v)for(;e.from<w&&(this.highlightRange(e,b,w,r,i),this.startSpan(Math.min(w,e.to),c),!(e.to>=y)&&e.nextSibling()););if(!g||y>n)break;(m=g.to+a)>t&&(this.highlightRange(d.cursor(),Math.max(t,g.from+a),Math.min(n,m),"",h),this.startSpan(Math.min(n,m),c))}v&&e.parent()}else if(e.firstChild()){f&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}}while(e.nextSibling());e.parent()}}}}}]),e}();var EQ,AQ=kQ.define,PQ=AQ(),TQ=AQ(),RQ=AQ(TQ),NQ=AQ(TQ),IQ=AQ(),DQ=AQ(IQ),zQ=AQ(IQ),LQ=AQ(),BQ=AQ(LQ),qQ=AQ(),FQ=AQ(),VQ=AQ(),WQ=AQ(VQ),HQ=AQ(),UQ={comment:PQ,lineComment:AQ(PQ),blockComment:AQ(PQ),docComment:AQ(PQ),name:TQ,variableName:AQ(TQ),typeName:RQ,tagName:AQ(RQ),propertyName:NQ,attributeName:AQ(NQ),className:AQ(TQ),labelName:AQ(TQ),namespace:AQ(TQ),macroName:AQ(TQ),literal:IQ,string:DQ,docString:AQ(DQ),character:AQ(DQ),attributeValue:AQ(DQ),number:zQ,integer:AQ(zQ),float:AQ(zQ),bool:AQ(IQ),regexp:AQ(IQ),escape:AQ(IQ),color:AQ(IQ),url:AQ(IQ),keyword:qQ,self:AQ(qQ),null:AQ(qQ),atom:AQ(qQ),unit:AQ(qQ),modifier:AQ(qQ),operatorKeyword:AQ(qQ),controlKeyword:AQ(qQ),definitionKeyword:AQ(qQ),moduleKeyword:AQ(qQ),operator:FQ,derefOperator:AQ(FQ),arithmeticOperator:AQ(FQ),logicOperator:AQ(FQ),bitwiseOperator:AQ(FQ),compareOperator:AQ(FQ),updateOperator:AQ(FQ),definitionOperator:AQ(FQ),typeOperator:AQ(FQ),controlOperator:AQ(FQ),punctuation:VQ,separator:AQ(VQ),bracket:WQ,angleBracket:AQ(WQ),squareBracket:AQ(WQ),paren:AQ(WQ),brace:AQ(WQ),content:LQ,heading:BQ,heading1:AQ(BQ),heading2:AQ(BQ),heading3:AQ(BQ),heading4:AQ(BQ),heading5:AQ(BQ),heading6:AQ(BQ),contentSeparator:AQ(LQ),list:AQ(LQ),quote:AQ(LQ),emphasis:AQ(LQ),strong:AQ(LQ),link:AQ(LQ),monospace:AQ(LQ),strikethrough:AQ(LQ),inserted:AQ(),deleted:AQ(),changed:AQ(),invalid:AQ(),meta:HQ,documentMeta:AQ(HQ),annotation:AQ(HQ),processingInstruction:AQ(HQ),definition:kQ.defineModifier(),constant:kQ.defineModifier(),function:kQ.defineModifier(),standard:kQ.defineModifier(),local:kQ.defineModifier(),special:kQ.defineModifier()};_Q([{tag:UQ.link,class:"tok-link"},{tag:UQ.heading,class:"tok-heading"},{tag:UQ.emphasis,class:"tok-emphasis"},{tag:UQ.strong,class:"tok-strong"},{tag:UQ.keyword,class:"tok-keyword"},{tag:UQ.atom,class:"tok-atom"},{tag:UQ.bool,class:"tok-bool"},{tag:UQ.url,class:"tok-url"},{tag:UQ.labelName,class:"tok-labelName"},{tag:UQ.inserted,class:"tok-inserted"},{tag:UQ.deleted,class:"tok-deleted"},{tag:UQ.literal,class:"tok-literal"},{tag:UQ.string,class:"tok-string"},{tag:UQ.number,class:"tok-number"},{tag:[UQ.regexp,UQ.escape,UQ.special(UQ.string)],class:"tok-string2"},{tag:UQ.variableName,class:"tok-variableName"},{tag:UQ.local(UQ.variableName),class:"tok-variableName tok-local"},{tag:UQ.definition(UQ.variableName),class:"tok-variableName tok-definition"},{tag:UQ.special(UQ.variableName),class:"tok-variableName2"},{tag:UQ.definition(UQ.propertyName),class:"tok-propertyName tok-definition"},{tag:UQ.typeName,class:"tok-typeName"},{tag:UQ.namespace,class:"tok-namespace"},{tag:UQ.className,class:"tok-className"},{tag:UQ.macroName,class:"tok-macroName"},{tag:UQ.propertyName,class:"tok-propertyName"},{tag:UQ.operator,class:"tok-operator"},{tag:UQ.comment,class:"tok-comment"},{tag:UQ.meta,class:"tok-meta"},{tag:UQ.invalid,class:"tok-invalid"},{tag:UQ.punctuation,class:"tok-punctuation"}]);var JQ=new WG;var KQ=new WG,GQ=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";Ni(this,e),this.data=t,this.name=i,TV.prototype.hasOwnProperty("tree")||Object.defineProperty(TV.prototype,"tree",{get:function(){return XQ(this)}}),this.parser=n,this.extension=[sY.of(this),TV.languageData.of((function(e,t,n){var r=QQ(e,t,n),i=r.type.prop(JQ);if(!i)return[];var o=e.facet(i),a=r.type.prop(KQ);if(a){var s,c=r.resolve(t-r.from,n),l=yi(a);try{for(l.s();!(s=l.n()).done;){var u=s.value;if(u.test(c,e)){var f=e.facet(u.facet);return"replace"==u.type?f:f.concat(o)}}}catch(e){l.e(e)}finally{l.f()}}return o}))].concat(r)}return Di(e,[{key:"isActiveAt",value:function(e,t){return QQ(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(JQ)==this.data}},{key:"findRegions",value:function(e){var t=this,n=e.facet(sY);if((null==n?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];var r=[];return function e(n,i){if(n.prop(JQ)!=t.data){var o=n.prop(WG.mounted);if(o){if(o.tree.prop(JQ)==t.data){if(o.overlay){var a,s=yi(o.overlay);try{for(s.s();!(a=s.n()).done;){var c=a.value;r.push({from:c.from+i,to:c.to+i})}}catch(e){s.e(e)}finally{s.f()}}else r.push({from:i,to:i+n.length});return}if(o.overlay){var l=r.length;if(e(o.tree,o.overlay[0].from+i),r.length>l)return}}for(var u=0;u<n.children.length;u++){var f=n.children[u];f instanceof XG&&e(f,n.positions[u]+i)}}else r.push({from:i,to:i+n.length})}(XQ(e),0),r}},{key:"allowsNesting",get:function(){return!0}}]),e}();function QQ(e,t,n){var r=e.facet(sY),i=XQ(e).topNode;if(!r||r.allowsNesting)for(var o=i;o;o=o.enter(t,n,KG.ExcludeBuffers))o.type.isTop&&(i=o);return i}GQ.setState=kV.define();var YQ=function(e){_i(n,GQ);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this,e,r,[],i)).parser=r,o}return Di(n,[{key:"configure",value:function(e,t){return new n(this.data,this.parser.configure(e),t||this.name)}},{key:"allowsNesting",get:function(){return this.parser.hasWrappers()}}],[{key:"define",value:function(e){var t,r=(t=e.languageData,UF.define({combine:t?function(e){return e.concat(t)}:void 0}));return new n(r,e.parser.configure({props:[JQ.add((function(e){return e.isTop?r:void 0}))]}),e.name)}}]),n}();function XQ(e){var t=e.field(GQ.state,!1);return t?t.tree:XG.empty}var ZQ=function(){function e(t){Ni(this,e),this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}return Di(e,[{key:"length",get:function(){return this.doc.length}},{key:"syncTo",value:function(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(e){return this.syncTo(e),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(e,t){var n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}]),e}(),eY=null,tY=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;Ni(this,e),this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}return Di(e,[{key:"startParse",value:function(){return this.parser.startParse(new ZQ(this.state.doc),this.fragments)}},{key:"work",value:function(e,t){var n=this;return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=XG.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r;if("number"==typeof e){var i=Date.now()+e;e=function(){return Date.now()>i}}for(n.parse||(n.parse=n.startParse()),null!=t&&(null==n.parse.stoppedAt||n.parse.stoppedAt>t)&&t<n.state.doc.length&&n.parse.stopAt(t);;){var o=n.parse.advance();if(o){if(n.fragments=n.withoutTempSkipped(gQ.addTree(o,n.fragments,null!=n.parse.stoppedAt)),n.treeLen=null!==(r=n.parse.stoppedAt)&&void 0!==r?r:n.state.doc.length,n.tree=o,n.parse=null,!(n.treeLen<(null!=t?t:n.state.doc.length)))return!0;n.parse=n.startParse()}if(e())return!1}}))}},{key:"takeTree",value:function(){var e,t,n=this;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((function(){for(;!(t=n.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(gQ.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(e){var t=eY;eY=this;try{return e()}finally{eY=t}}},{key:"withoutTempSkipped",value:function(e){for(var t;t=this.tempSkipped.pop();)e=nY(e,t.from,t.to);return e}},{key:"changes",value:function(t,n){var r=this.fragments,i=this.tree,o=this.treeLen,a=this.viewport,s=this.skipped;if(this.takeTree(),!t.empty){var c=[];if(t.iterChangedRanges((function(e,t,n,r){return c.push({fromA:e,toA:t,fromB:n,toB:r})})),r=gQ.applyChanges(r,c),i=XG.empty,o=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){s=[];var l,u=yi(this.skipped);try{for(u.s();!(l=u.n()).done;){var f=l.value,d=t.mapPos(f.from,1),h=t.mapPos(f.to,-1);d<h&&s.push({from:d,to:h})}}catch(e){u.e(e)}finally{u.f()}}}return new e(this.parser,n,r,i,o,a,s,this.scheduleOn)}},{key:"updateViewport",value:function(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;for(var t=this.skipped.length,n=0;n<this.skipped.length;n++){var r=this.skipped[n],i=r.from,o=r.to;i<e.to&&o>e.from&&(this.fragments=nY(this.fragments,i,o),this.skipped.splice(n--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(e,t){this.skipped.push({from:e,to:t})}},{key:"isDone",value:function(e){e=Math.min(e,this.state.doc.length);var t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}}],[{key:"create",value:function(t,n,r){return new e(t,n,[],XG.empty,0,r,[],null)}},{key:"getSkippingParser",value:function(e){return new(function(t){_i(r,yQ);var n=Mi(r);function r(){return Ni(this,r),n.apply(this,arguments)}return Di(r,[{key:"createParse",value:function(t,n,r){var i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance:function(){var t=eY;if(t){var n,a=yi(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;t.tempSkipped.push(s)}}catch(e){a.e(e)}finally{a.f()}e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new XG(JG.none,[],[],o-i)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return eY}}]),e}();function nY(e,t,n){return gQ.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var rY=function(){function e(t){Ni(this,e),this.context=t,this.tree=t.tree}return Di(e,[{key:"apply",value:function(t){if(!t.docChanged&&this.tree==this.context.tree)return this;var n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}}],[{key:"init",value:function(t){var n=Math.min(3e3,t.doc.length),r=tY.create(t.facet(sY).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}}]),e}();GQ.state=XF.define({create:rY.init,update:function(e,t){var n,r=yi(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(GQ.setState))return i.value}}catch(e){r.e(e)}finally{r.f()}return t.startState.facet(sY)!=t.state.facet(sY)?rY.init(t.state):e.apply(t)}});var iY=function(e){var t=setTimeout((function(){return e()}),500);return function(){return clearTimeout(t)}};"undefined"!=typeof requestIdleCallback&&(iY=function(e){var t=-1,n=setTimeout((function(){t=requestIdleCallback(e,{timeout:400})}),100);return function(){return t<0?clearTimeout(n):cancelIdleCallback(t)}});var oY="undefined"!=typeof navigator&&(null===(EQ=navigator.scheduling)||void 0===EQ?void 0:EQ.isInputPending)?function(){return navigator.scheduling.isInputPending()}:null,aY=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Di(e,[{key:"update",value:function(e){var t=this.view.state.field(GQ.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}},{key:"scheduleWork",value:function(){if(!this.working){var e=this.view.state,t=e.field(GQ.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=iY(this.work))}}},{key:"work",value:function(e){this.working=null;var t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),!(this.chunkBudget<=0)){var n=this.view,r=n.state,i=n.viewport.to,o=r.field(GQ.state);if(o.tree!=o.context.tree||!o.context.isDone(i+1e5)){var a=Date.now()+Math.min(this.chunkBudget,100,e&&!oY?Math.max(25,e.timeRemaining()-5):1e9),s=o.context.treeLen<i&&r.doc.length>i+1e3,c=o.context.work((function(){return oY&&oY()||Date.now()>a}),i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:GQ.setState.of(new rY(o.context))})),this.chunkBudget>0&&(!c||s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}}}},{key:"checkAsyncSchedule",value:function(e){var t=this;e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((function(){return t.scheduleWork()})).catch((function(e){return EH(t.view.state,e)})).then((function(){return t.workScheduled--})),e.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),e}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),sY=UF.define({combine:function(e){return e.length?e[0]:null},enables:function(e){return[GQ.state,aY,XJ.contentAttributes.compute([e],(function(t){var n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]}}),cY=Di((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ni(this,e),this.language=t,this.support=n,this.extension=[t,n]})),lY=UF.define(),uY=UF.define({combine:function(e){if(!e.length)return" ";var t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((function(e){return e!=t[0]})))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function fY(e){var t=e.facet(uY);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function dY(e,t){var n="",r=e.tabSize,i=e.facet(uY)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(var o=0;o<t;o++)n+=i;return n}function hY(e,t){e instanceof TV&&(e=new vY(e));var n,r=yi(e.state.facet(lY));try{for(r.s();!(n=r.n()).done;){var i=(0,n.value)(e,t);if(void 0!==i)return i}}catch(e){r.e(e)}finally{r.f()}var o=XQ(e.state);return o.length>=t?function(e,t,n){var r=t.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){for(var o=[],a=i;a!=r.node;a=a.parent)o.push(a);for(var s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return mY(r,e,n)}(e,o,t):null}var vY=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ni(this,e),this.state=t,this.options=n,this.unit=fY(t)}return Di(e,[{key:"lineAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(e),r=this.options,i=r.simulateBreak,o=r.simulateDoubleBreak;return null!=i&&i>=n.from&&i<=n.to?o&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}},{key:"textAfterPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";var n=this.lineAt(e,t),r=n.text,i=n.from;return r.slice(e-i,Math.min(r.length,e+100-i))}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.countColumn(r,e-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}},{key:"countColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return YV(e,this.state.tabSize,t)}},{key:"lineIndent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,i=n.from,o=this.options.overrideIndentation;if(o){var a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),e}(),pY=new WG;function mY(e,t,n){for(var r=e;r;r=r.next){var i=gY(r.node);if(i)return i(bY.create(t,n,r))}return 0}function gY(e){var t=e.type.prop(pY);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(WG.closedBy))){var i=e.lastChild,o=i&&n.indexOf(i.name)>-1;return function(e){return function(e,t,n,r,i){var o=e.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==e.pos+a,c=t?function(e){var t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;for(var i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i),s=n.to;;){var c=t.childAfter(s);if(!c||c==r)return null;if(!c.type.isSkipped)return c.from<a?n:null;s=c.to}}(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}(e,!0,1,void 0,o&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?i.from:void 0)}}return null==e.parent?yY:null}function yY(){return 0}var bY=function(e){_i(n,vY);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this,e.state,e.options)).base=e,o.pos=r,o.context=i,o}return Di(n,[{key:"node",get:function(){return this.context.node}},{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){return this.baseIndentFor(this.node)}},{key:"baseIndentFor",value:function(e){for(var t=this.state.doc.lineAt(e.from);;){for(var n=e.resolve(t.from);n.parent&&n.parent.from==n.from;)n=n.parent;if(wY(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}},{key:"continue",value:function(){return mY(this.context.next,this.base,this.pos)}}],[{key:"create",value:function(e,t,r){return new n(e,t,r)}}]),n}();function wY(e,t){for(var n=t;n;n=n.parent)if(e==n)return!0;return!1}function kY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.except,n=e.units,r=void 0===n?1:n;return function(e){var n=t&&t.test(e.textAfter);return e.baseIndent+(n?0:r*e.unit)}}var xY=200;var jY=UF.define(),SY=new WG;function CY(e,t,n){var r,i=yi(e.facet(jY));try{for(i.s();!(r=i.n()).done;){var o=(0,r.value)(e,t,n);if(o)return o}}catch(e){i.e(e)}finally{i.f()}return function(e,t,n){var r=XQ(e);if(r.length<n)return null;for(var i,o,a=null,s=r.resolveStack(n,1);s;s=s.next){var c=s.node;if(!(c.to<=n||c.from>n)){if(a&&c.from<t)break;var l=c.type.prop(SY);if(l&&(c.to<r.length-50||r.length==e.doc.length||(o=void 0,!(o=(i=c).lastChild)||o.to!=i.to||!o.type.isError))){var u=l(c,e);u&&u.from<=n&&u.from>=t&&u.to>n&&(a=u)}}}return a}(e,t,n)}function $Y(e,t){var n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var _Y=kV.define({map:$Y}),OY=kV.define({map:$Y});function MY(e){var t,n=[],r=yi(e.state.selection.ranges);try{var i=function(){var r=t.value.head;if(n.some((function(e){return e.from<=r&&e.to>=r})))return 1;n.push(e.lineBlockAt(r))};for(r.s();!(t=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}return n}var EY=XF.define({create:function(){return uH.none},update:function(e,t){e=e.map(t.changes);var n,r=yi(t.effects);try{var i=function(){var r=n.value;if(r.is(_Y)&&!function(e,t,n){var r=!1;return e.between(t,t,(function(e,i){e==t&&i==n&&(r=!0)})),r}(e,r.value.from,r.value.to)){var i=t.state.facet(IY).preparePlaceholder,o=i?uH.replace({widget:new BY(i(t.state,r.value))}):LY;e=e.update({add:[o.range(r.value.from,r.value.to)]})}else r.is(OY)&&(e=e.update({filter:function(e,t){return r.value.from!=e||r.value.to!=t},filterFrom:r.value.from,filterTo:r.value.to}))};for(r.s();!(n=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}if(t.selection){var o=!1,a=t.selection.main.head;e.between(a,a,(function(e,t){e<a&&t>a&&(o=!0)})),o&&(e=e.update({filterFrom:a,filterTo:a,filter:function(e,t){return t<=a||e>=a}}))}return e},provide:function(e){return XJ.decorations.from(e)},toJSON:function(e,t){var n=[];return e.between(0,t.doc.length,(function(e,t){n.push(e,t)})),n},fromJSON:function(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");for(var t=[],n=0;n<e.length;){var r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");t.push(LY.range(r,i))}return uH.set(t,!0)}});function AY(e,t,n){var r,i=null;return null===(r=e.field(EY,!1))||void 0===r||r.between(t,n,(function(e,t){(!i||i.from>e)&&(i={from:e,to:t})})),i}function PY(e,t){return e.field(EY,!1)?t:t.concat(kV.appendConfig.of(DY()))}function TY(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return XJ.announce.of("".concat(e.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(e.state.phrase("to")," ").concat(i,"."))}var RY=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(e){var t,n=yi(MY(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=CY(e.state,r.from,r.to);if(i)return e.dispatch({effects:PY(e.state,[_Y.of(i),TY(e,i)])}),!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(e){if(!e.state.field(EY,!1))return!1;var t,n=[],r=yi(MY(e));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=AY(e.state,i.from,i.to);o&&n.push(OY.of(o),TY(e,o,!1))}}catch(e){r.e(e)}finally{r.f()}return n.length&&e.dispatch({effects:n}),n.length>0}},{key:"Ctrl-Alt-[",run:function(e){for(var t=e.state,n=[],r=0;r<t.doc.length;){var i=e.lineBlockAt(r),o=CY(t,i.from,i.to);o&&n.push(_Y.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:PY(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:function(e){var t=e.state.field(EY,!1);if(!t||!t.size)return!1;var n=[];return t.between(0,e.state.doc.length,(function(e,t){n.push(OY.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],NY={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},IY=UF.define({combine:function(e){return RV(e,NY)}});function DY(e){var t=[EY,WY];return e&&t.push(IY.of(e)),t}function zY(e,t){var n=e.state,r=n.facet(IY),i=function(t){var n=e.lineBlockAt(e.posAtDOM(t.target)),r=AY(e.state,n.from,n.to);r&&e.dispatch({effects:OY.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);var o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}var LY=uH.replace({widget:new(function(e){_i(n,cH);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"toDOM",value:function(e){return zY(e,null)}}]),n}())}),BY=function(e){_i(n,cH);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).value=e,r}return Di(n,[{key:"eq",value:function(e){return this.value==e.value}},{key:"toDOM",value:function(e){return zY(e,this.value)}}]),n}(),qY={openText:"⌄",closedText:"",markerDOM:null,domEventHandlers:{},foldingChanged:function(){return!1}},FY=function(e){_i(n,wG);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this)).config=e,i.open=r,i}return Di(n,[{key:"eq",value:function(e){return this.config==e.config&&this.open==e.open}},{key:"toDOM",value:function(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);var t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}]),n}();function VY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},qY),e),n=new FY(t,!0),r=new FY(t,!1),i=RH.fromClass(function(){function e(t){Ni(this,e),this.from=t.viewport.from,this.markers=this.buildMarkers(t)}return Di(e,[{key:"update",value:function(e){(e.docChanged||e.viewportChanged||e.startState.facet(sY)!=e.state.facet(sY)||e.startState.field(EY,!1)!=e.state.field(EY,!1)||XQ(e.startState)!=XQ(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}},{key:"buildMarkers",value:function(e){var t,i=new BV,o=yi(e.viewportLineBlocks);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=AY(e.state,a.from,a.to)?r:CY(e.state,a.from,a.to)?n:null;s&&i.add(a.from,a.from,s)}}catch(e){o.e(e)}finally{o.f()}return i.finish()}}]),e}()),o=t.domEventHandlers;return[i,SG({class:"cm-foldGutter",markers:function(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||LV.empty},initialSpacer:function(){return new FY(t,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(e,t,n){if(o.click&&o.click(e,t,n))return!0;var r=AY(e.state,t.from,t.to);if(r)return e.dispatch({effects:OY.of(r)}),!0;var i=CY(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:_Y.of(i)}),!0)}})}),DY()]}var WY=XJ.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),HY=function(){function e(t,n){var r;function i(e){var t=nW.newName();return(r||(r=Object.create(null)))["."+t]=e,t}Ni(this,e),this.specs=t;var o="string"==typeof n.all?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof GQ?function(e){return e.prop(JQ)==a.data}:a?function(e){return e==a}:void 0,this.style=_Q(t.map((function(e){return{tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))}})),{all:o}).style,this.module=r?new nW(r):null,this.themeType=n.themeType}return Di(e,null,[{key:"define",value:function(t,n){return new e(t,n||{})}}]),e}(),UY=UF.define(),JY=UF.define({combine:function(e){return e.length?[e[0]]:null}});function KY(e){var t=e.facet(UY);return t.length?t:e.facet(JY)}function GY(e,t){var n,r=[YY];return e instanceof HY&&(e.module&&r.push(XJ.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(JY.of(e)):n?r.push(UY.computeN([XJ.darkTheme],(function(t){return t.facet(XJ.darkTheme)==("dark"==n)?[e]:[]}))):r.push(UY.of(e)),r}var QY=function(){function e(t){Ni(this,e),this.markCache=Object.create(null),this.tree=XQ(t.state),this.decorations=this.buildDeco(t,KY(t.state))}return Di(e,[{key:"update",value:function(e){var t=XQ(e.state),n=KY(e.state),r=n!=KY(e.startState);t.length<e.view.viewport.to&&!r&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n))}},{key:"buildDeco",value:function(e,t){var n=this;if(!t||!this.tree.length)return uH.none;var r,i=new BV,o=yi(e.visibleRanges);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.from,c=a.to;OQ(this.tree,t,(function(e,t,r){i.add(e,t,n.markCache[r]||(n.markCache[r]=uH.mark({class:r})))}),s,c)}}catch(e){o.e(e)}finally{o.f()}return i.finish()}}]),e}(),YY=iV.high(RH.fromClass(QY,{decorations:function(e){return e.decorations}})),XY=HY.define([{tag:UQ.meta,color:"#404740"},{tag:UQ.link,textDecoration:"underline"},{tag:UQ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:UQ.emphasis,fontStyle:"italic"},{tag:UQ.strong,fontWeight:"bold"},{tag:UQ.strikethrough,textDecoration:"line-through"},{tag:UQ.keyword,color:"#708"},{tag:[UQ.atom,UQ.bool,UQ.url,UQ.contentSeparator,UQ.labelName],color:"#219"},{tag:[UQ.literal,UQ.inserted],color:"#164"},{tag:[UQ.string,UQ.deleted],color:"#a11"},{tag:[UQ.regexp,UQ.escape,UQ.special(UQ.string)],color:"#e40"},{tag:UQ.definition(UQ.variableName),color:"#00f"},{tag:UQ.local(UQ.variableName),color:"#30a"},{tag:[UQ.typeName,UQ.namespace],color:"#085"},{tag:UQ.className,color:"#167"},{tag:[UQ.special(UQ.variableName),UQ.macroName],color:"#256"},{tag:UQ.definition(UQ.propertyName),color:"#00c"},{tag:UQ.comment,color:"#940"},{tag:UQ.invalid,color:"#f00"}]),ZY=XJ.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),eX=1e4,tX="()[]{}",nX=UF.define({combine:function(e){return RV(e,{afterCursor:!0,brackets:tX,maxScanDistance:eX,renderMatch:oX})}}),rX=uH.mark({class:"cm-matchingBracket"}),iX=uH.mark({class:"cm-nonmatchingBracket"});function oX(e){var t=[],n=e.matched?rX:iX;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}var aX=XF.define({create:function(){return uH.none},update:function(e,t){if(!t.docChanged&&!t.selection)return e;var n,r=[],i=t.state.facet(nX),o=yi(t.state.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.empty){var s=dX(t.state,a.head,-1,i)||a.head>0&&dX(t.state,a.head-1,1,i)||i.afterCursor&&(dX(t.state,a.head,1,i)||a.head<t.state.doc.length&&dX(t.state,a.head+1,-1,i));s&&(r=r.concat(i.renderMatch(s,t.state)))}}}catch(e){o.e(e)}finally{o.f()}return uH.set(r,!0)},provide:function(e){return XJ.decorations.from(e)}}),sX=[aX,ZY];function cX(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[nX.of(e),sX]}var lX=new WG;function uX(e,t,n){var r=e.prop(t<0?WG.openedBy:WG.closedBy);if(r)return r;if(1==e.name.length){var i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function fX(e){var t=e.type.prop(lX);return t?t(e.node):e}function dX(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.maxScanDistance||eX,o=r.brackets||tX,a=XQ(e),s=a.resolveInner(t,n),c=s;c;c=c.parent){var l=uX(c.type,n,o);if(l&&c.from<c.to){var u=fX(c);if(u&&(n>0?t>=u.from&&t<u.to:t>u.from&&t<=u.to))return hX(e,t,n,c,u,l,o)}}return function(e,t,n,r,i,o,a){var s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=a.indexOf(s);if(c<0||c%2==0!=n>0)return null;for(var l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0,d=0;!u.next().done&&d<=o;){var h=u.value;n<0&&(d+=h.length);for(var v=t+d*n,p=n>0?0:h.length-1,m=n>0?h.length:-1;p!=m;p+=n){var g=a.indexOf(h[p]);if(!(g<0||r.resolveInner(v+p,1).type!=i))if(g%2==0==n>0)f++;else{if(1==f)return{start:l,end:{from:v+p,to:v+p+1},matched:g>>1==c>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:l,matched:!1}:null}(e,t,n,a,s.type,i,o)}function hX(e,t,n,r,i,o,a){var s=r.parent,c={from:i.from,to:i.to},l=0,u=null==s?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==l&&o.indexOf(u.type.name)>-1&&u.from<u.to){var f=fX(u);return{start:c,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}if(uX(u.type,n,a))l++;else if(uX(u.type,-n,a)){if(0==l){var d=fX(u);return{start:c,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}l--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}for(var vX=Object.create(null),pX=[JG.none],mX=[],gX=Object.create(null),yX=0,bX=[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]];yX<bX.length;yX++){var wX=xi(bX[yX],2),kX=wX[0],xX=wX[1];gX[kX]=SX(vX,xX)}function jX(e,t){mX.indexOf(e)>-1||(mX.push(e),console.warn(t))}function SX(e,t){var n,r=[],i=yi(t.split(" "));try{for(i.s();!(n=i.n()).done;){var o,a=n.value,s=[],c=yi(a.split("."));try{for(c.s();!(o=c.n()).done;){var l=o.value,u=e[l]||UQ[l];u?"function"==typeof u?s.length?s=s.map(u):jX(l,"Modifier ".concat(l," used at start of tag")):s.length?jX(l,"Tag ".concat(l," used as modifier")):s=Array.isArray(u)?u:[u]:jX(l,"Unknown highlighting tag ".concat(l))}}catch(e){c.e(e)}finally{c.f()}var f,d=yi(s);try{for(d.s();!(f=d.n()).done;){var h=f.value;r.push(h)}}catch(e){d.e(e)}finally{d.f()}}}catch(e){i.e(e)}finally{i.f()}if(!r.length)return 0;var v=t.replace(/ /g,"_"),p=JG.define({id:pX.length,name:v,props:[SQ(zi({},v,r))]});return pX.push(p),p.id}function CX(e,t){return function(n){var r=n.state,i=n.dispatch;if(r.readOnly)return!1;var o=e(t,r);return!!o&&(i(r.update(o)),!0)}}var $X=CX(PX,0),_X=CX(AX,0),OX=CX((function(e,t){return AX(e,t,function(e){var t,n=[],r=yi(e.selection.ranges);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=e.doc.lineAt(i.from),a=i.to<=o.to?o:e.doc.lineAt(i.to),s=n.length-1;s>=0&&n[s].to>o.from?n[s].to=a.to:n.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:a.to})}}catch(e){r.e(e)}finally{r.f()}return n}(t))}),0);function MX(e,t){var n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}var EX=50;function AX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=n.map((function(e){return MX(t,e.from).block}));if(!r.every((function(e){return e})))return null;var i=n.map((function(e,n){return function(e,t,n,r){var i,o,a=t.open,s=t.close,c=e.sliceDoc(n-EX,n),l=e.sliceDoc(r,r+EX),u=/\s*$/.exec(c)[0].length,f=/^\s*/.exec(l)[0].length,d=c.length-u;if(c.slice(d-a.length,d)==a&&l.slice(f,f+s.length)==s)return{open:{pos:n-u,margin:u&&1},close:{pos:r+f,margin:f&&1}};r-n<=2*EX?i=o=e.sliceDoc(n,r):(i=e.sliceDoc(n,n+EX),o=e.sliceDoc(r-EX,r));var h=/^\s*/.exec(i)[0].length,v=/\s*$/.exec(o)[0].length,p=o.length-v-s.length;return i.slice(h,h+a.length)==a&&o.slice(p,p+s.length)==s?{open:{pos:n+h+a.length,margin:/\s/.test(i.charAt(h+a.length))?1:0},close:{pos:r-v-s.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null}(t,r[n],e.from,e.to)}));if(2!=e&&!i.every((function(e){return e})))return{changes:t.changes(n.map((function(e,t){return i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]})))};if(1!=e&&i.some((function(e){return e}))){for(var o,a=[],s=0;s<i.length;s++)if(o=i[s]){var c=r[s],l=o,u=l.open,f=l.close;a.push({from:u.pos-c.open.length,to:u.pos+u.margin},{from:f.pos-f.margin,to:f.pos+c.close.length})}return{changes:a}}return null}function PX(e,t){var n,r=[],i=-1,o=yi(arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.from,c=a.to,l=r.length,u=1e9,f=MX(t,s).line;if(f){for(var d=s;d<=c;){var h=t.doc.lineAt(d);if(h.from>i&&(s==c||c>h.from)){i=h.from;var v=/^\s*/.exec(h.text)[0].length,p=v==h.length,m=h.text.slice(v,v+f.length)==f?v:-1;v<h.text.length&&v<u&&(u=v),r.push({line:h,comment:m,token:f,indent:v,empty:p,single:!1})}d=h.to+1}if(u<1e9)for(var g=l;g<r.length;g++)r[g].indent<r[g].line.text.length&&(r[g].indent=u);r.length==l+1&&(r[l].single=!0)}}}catch(e){o.e(e)}finally{o.f()}if(2!=e&&r.some((function(e){return e.comment<0&&(!e.empty||e.single)}))){var y,b=[],w=yi(r);try{for(w.s();!(y=w.n()).done;){var k=y.value,x=k.line,j=k.token,S=k.indent,C=k.empty;!k.single&&C||b.push({from:x.from+S,insert:j+" "})}}catch(e){w.e(e)}finally{w.f()}var $=t.changes(b);return{changes:$,selection:t.selection.map($,1)}}if(1!=e&&r.some((function(e){return e.comment>=0}))){var _,O=[],M=yi(r);try{for(M.s();!(_=M.n()).done;){var E=_.value,A=E.line,P=E.comment,T=E.token;if(P>=0){var R=A.from+P,N=R+T.length;" "==A.text[N-A.from]&&N++,O.push({from:R,to:N})}}}catch(e){M.e(e)}finally{M.f()}return{changes:O}}return null}var TX=yV.define(),RX=yV.define(),NX=UF.define(),IX=UF.define({combine:function(e){return RV(e,{minDepth:100,newGroupDelay:500,joinToEvent:function(e,t){return t}},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:function(e,t){return function(n,r){return e(n,r)||t(n,r)}}})}});var DX=XF.define({create:function(){return rZ.empty},update:function(e,t){var n,r,i=t.state.facet(IX),o=t.annotation(TX);if(o){var a=t.docChanged?VF.single((n=t.changes,r=0,n.iterChangedRanges((function(e,t){return r=t})),r)):void 0,s=JX.fromTransaction(t,a),c=o.side,l=0==c?e.undone:e.done;return l=s?KX(l,l.length,i.minDepth,s):XX(l,t.startState.selection),new rZ(0==c?o.rest:l,0==c?l:o.rest)}var u=t.annotation(RX);if("full"!=u&&"before"!=u||(e=e.isolate()),!1===t.annotation(xV.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);var f=JX.fromTransaction(t),d=t.annotation(xV.time),h=t.annotation(xV.userEvent);return f?e=e.addChanges(f,d,h,i,t):t.selection&&(e=e.addSelection(t.startState.selection,d,h,i.newGroupDelay)),"full"!=u&&"after"!=u||(e=e.isolate()),e},toJSON:function(e){return{done:e.done.map((function(e){return e.toJSON()})),undone:e.undone.map((function(e){return e.toJSON()}))}},fromJSON:function(e){return new rZ(e.done.map(JX.fromJSON),e.undone.map(JX.fromJSON))}});function zX(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[DX,IX.of(e),XJ.domEventHandlers({beforeinput:function(e,t){var n="historyUndo"==e.inputType?BX:"historyRedo"==e.inputType?qX:null;return!!n&&(e.preventDefault(),n(t))}})]}function LX(e,t){return function(n){var r=n.state,i=n.dispatch;if(!t&&r.readOnly)return!1;var o=r.field(DX,!1);if(!o)return!1;var a=o.pop(e,r,t);return!!a&&(i(a),!0)}}var BX=LX(0,!1),qX=LX(1,!1),FX=LX(0,!0),VX=LX(1,!0);function WX(e){return function(t){var n=t.field(DX,!1);if(!n)return 0;var r=0==e?n.done:n.undone;return r.length-(r.length&&!r[0].changes?1:0)}}var HX=WX(0),UX=WX(1),JX=function(){function e(t,n,r,i,o){Ni(this,e),this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return Di(e,[{key:"setSelAfter",value:function(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}},{key:"toJSON",value:function(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((function(e){return e.toJSON()}))}}}],[{key:"fromJSON",value:function(t){return new e(t.changes&&NF.fromJSON(t.changes),[],t.mapped&&RF.fromJSON(t.mapped),t.startSelection&&VF.fromJSON(t.startSelection),t.selectionsAfter.map(VF.fromJSON))}},{key:"fromTransaction",value:function(t,n){var r,i=QX,o=yi(t.startState.facet(NX));try{for(o.s();!(r=o.n()).done;){var a=(0,r.value)(t);a.length&&(i=i.concat(a))}}catch(e){o.e(e)}finally{o.f()}return!i.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,QX)}},{key:"selection",value:function(t){return new e(void 0,QX,void 0,void 0,t)}}]),e}();function KX(e,t,n,r){var i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function GX(e,t){return e.length?t.length?e.concat(t):e:t}var QX=[],YX=200;function XX(e,t){if(e.length){var n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-YX));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),KX(e,e.length-1,1e9,n.setSelAfter(r)))}return[JX.selection([t])]}function ZX(e){var t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function eZ(e,t){if(!e.length)return e;for(var n=e.length,r=QX;n;){var i=tZ(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){var o=e.slice(0,n);return o[n-1]=i,o}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[JX.selection(r)]:QX}function tZ(e,t,n){var r=GX(e.selectionsAfter.length?e.selectionsAfter.map((function(e){return e.map(t)})):QX,n);if(!e.changes)return JX.selection(r);var i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new JX(i,kV.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}var nZ=/^(input\.type|delete)($|\.)/,rZ=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;Ni(this,e),this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return Di(e,[{key:"isolate",value:function(){return this.prevTime?new e(this.done,this.undone):this}},{key:"addChanges",value:function(t,n,r,i,o){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||nZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,function(e,t){var n=[],r=!1;return e.iterChangedRanges((function(e,t){return n.push(e,t)})),t.iterChangedRanges((function(e,t,i,o){for(var a=0;a<n.length;){var s=n[a++],c=n[a++];o>=s&&i<=c&&(r=!0)}})),r}(s.changes,t.changes))||"input.type.compose"==r)?KX(a,a.length-1,i.minDepth,new JX(t.changes.compose(s.changes),GX(t.effects,s.effects),s.mapped,s.startSelection,QX)):KX(a,a.length,i.minDepth,t),new e(a,QX,n,r)}},{key:"addSelection",value:function(t,n,r,i){var o,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:QX;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&(o=s[s.length-1],a=t,o.ranges.length==a.ranges.length&&0===o.ranges.filter((function(e,t){return e.empty!=a.ranges[t].empty})).length)?this:new e(XX(this.done,t),this.undone,n,r)}},{key:"addMapping",value:function(t){return new e(eZ(this.done,t),eZ(this.undone,t),this.prevTime,this.prevUserEvent)}},{key:"pop",value:function(e,t,n){var r=0==e?this.done:this.undone;if(0==r.length)return null;var i=r[r.length-1];if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:TX.of({side:e,rest:ZX(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){var o=1==r.length?QX:r.slice(0,r.length-1);return i.mapped&&(o=eZ(o,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:TX.of({side:e,rest:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}]),e}();rZ.empty=new rZ(QX,QX);var iZ=[{key:"Mod-z",run:BX,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:qX,preventDefault:!0},{linux:"Ctrl-Shift-z",run:qX,preventDefault:!0},{key:"Mod-u",run:FX,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:VX,preventDefault:!0}];function oZ(e,t){return VF.create(e.ranges.map(t),e.mainIndex)}function aZ(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function sZ(e,t){var n=e.state,r=e.dispatch,i=oZ(n.selection,t);return!i.eq(n.selection)&&(r(aZ(n,i)),!0)}function cZ(e,t){return VF.cursor(t?e.to:e.from)}function lZ(e,t){return sZ(e,(function(n){return n.empty?e.moveByChar(n,t):cZ(n,t)}))}function uZ(e){return e.textDirectionAt(e.state.selection.main.head)==JH.LTR}var fZ=function(e){return lZ(e,!uZ(e))},dZ=function(e){return lZ(e,uZ(e))};function hZ(e,t){return sZ(e,(function(n){return n.empty?e.moveByGroup(n,t):cZ(n,t)}))}function vZ(e,t,n){if(t.type.prop(n))return!0;var r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function pZ(e,t,n){for(var r=XQ(e).resolveInner(t.head),i=n?WG.closedBy:WG.openedBy,o=t.head;;){var a=n?r.childAfter(o):r.childBefore(o);if(!a)break;vZ(e,a,i)?r=a:o=n?a.to:a.from}var s,c;return c=r.type.prop(i)&&(s=n?dX(e,r.from,1):dX(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,VF.cursor(c,n?-1:1)}function mZ(e,t){return sZ(e,(function(n){if(!n.empty)return cZ(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}var gZ=function(e){return mZ(e,!1)},yZ=function(e){return mZ(e,!0)};function bZ(e){var t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){var o,a=yi(e.state.facet(XJ.scrollMargins));try{for(a.s();!(o=a.n()).done;){var s=(0,o.value)(e);(null==s?void 0:s.top)&&(r=Math.max(null==s?void 0:s.top,r)),(null==s?void 0:s.bottom)&&(i=Math.max(null==s?void 0:s.bottom,i))}}catch(e){a.e(e)}finally{a.f()}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function wZ(e,t){var n,r=bZ(e),i=e.state,o=oZ(i.selection,(function(n){return n.empty?e.moveVertically(n,t,r.height):cZ(n,t)}));if(o.eq(i.selection))return!1;if(r.selfScroll){var a=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),c=s.top+r.marginTop,l=s.bottom-r.marginBottom;a&&a.top>c&&a.bottom<l&&(n=XJ.scrollIntoView(o.main.head,{y:"start",yMargin:a.top-c}))}return e.dispatch(aZ(i,o),{effects:n}),!0}var kZ=function(e){return wZ(e,!1)},xZ=function(e){return wZ(e,!0)};function jZ(e,t,n){var r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){var o=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&t.head!=r.from+o&&(i=VF.cursor(r.from+o))}return i}function SZ(e,t){var n=oZ(e.state.selection,(function(e){var n=t(e);return VF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(aZ(e.state,n)),!0)}function CZ(e,t){return SZ(e,(function(n){return e.moveByChar(n,t)}))}var $Z=function(e){return CZ(e,!uZ(e))},_Z=function(e){return CZ(e,uZ(e))};function OZ(e,t){return SZ(e,(function(n){return e.moveByGroup(n,t)}))}function MZ(e,t){return SZ(e,(function(n){return e.moveVertically(n,t)}))}var EZ=function(e){return MZ(e,!1)},AZ=function(e){return MZ(e,!0)};function PZ(e,t){return SZ(e,(function(n){return e.moveVertically(n,t,bZ(e).height)}))}var TZ=function(e){return PZ(e,!1)},RZ=function(e){return PZ(e,!0)},NZ=function(e){var t=e.state;return(0,e.dispatch)(aZ(t,{anchor:0})),!0},IZ=function(e){var t=e.state;return(0,e.dispatch)(aZ(t,{anchor:t.doc.length})),!0},DZ=function(e){var t=e.state;return(0,e.dispatch)(aZ(t,{anchor:t.selection.main.anchor,head:0})),!0},zZ=function(e){var t=e.state;return(0,e.dispatch)(aZ(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function LZ(e,t){if(e.state.readOnly)return!1;var n="delete.selection",r=e.state,i=r.changeByRange((function(r){var i=r.from,o=r.to;if(i==o){var a=t(r);a<i?(n="delete.backward",a=BZ(e,a,!1)):a>i&&(n="delete.forward",a=BZ(e,a,!0)),i=Math.min(i,a),o=Math.max(o,a)}else i=BZ(e,i,!1),o=BZ(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:VF.cursor(i,i<r.head?-1:1)}}));return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?XJ.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function BZ(e,t,n){if(e instanceof XJ){var r,i=yi(e.state.facet(XJ.atomicRanges).map((function(t){return t(e)})));try{for(i.s();!(r=i.n()).done;){r.value.between(t,t,(function(e,r){e<t&&r>t&&(t=n?r:e)}))}}catch(e){i.e(e)}finally{i.f()}}return t}var qZ=function(e,t){return LZ(e,(function(n){var r,i,o=n.from,a=e.state,s=a.doc.lineAt(o);if(!t&&o>s.from&&o<s.from+200&&!/[^ \t]/.test(r=s.text.slice(0,o-s.from))){if("\t"==r[r.length-1])return o-1;for(var c=YV(r,a.tabSize)%fY(a)||fY(a),l=0;l<c&&" "==r[r.length-1-l];l++)o--;i=o}else(i=SF(s.text,o-s.from,t,t)+s.from)==o&&s.number!=(t?a.doc.lines:1)&&(i+=t?1:-1);return i}))},FZ=function(e){return qZ(e,!1)},VZ=function(e){return qZ(e,!0)},WZ=function(e,t){return LZ(e,(function(n){for(var r=n.head,i=e.state,o=i.doc.lineAt(r),a=i.charCategorizer(r),s=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}var c=SF(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),u=a(l);if(null!=s&&u!=s)break;" "==l&&r==n.head||(s=u),r=c}return r}))},HZ=function(e){return WZ(e,!1)};function UZ(e){var t,n=[],r=-1,i=yi(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.from),s=e.doc.lineAt(o.to);if(o.empty||o.to!=s.from||(s=e.doc.lineAt(o.to-1)),r>=a.number){var c=n[n.length-1];c.to=s.to,c.ranges.push(o)}else n.push({from:a.from,to:s.to,ranges:[o]});r=s.number+1}}catch(e){i.e(e)}finally{i.f()}return n}function JZ(e,t,n){if(e.readOnly)return!1;var r,i=[],o=[],a=yi(UZ(e));try{for(a.s();!(r=a.n()).done;){var s=r.value;if(n?s.to!=e.doc.length:0!=s.from){var c=e.doc.lineAt(n?s.to+1:s.from-1),l=c.length+1;if(n){i.push({from:s.to,to:c.to},{from:s.from,insert:c.text+e.lineBreak});var u,f=yi(s.ranges);try{for(f.s();!(u=f.n()).done;){var d=u.value;o.push(VF.range(Math.min(e.doc.length,d.anchor+l),Math.min(e.doc.length,d.head+l)))}}catch(e){f.e(e)}finally{f.f()}}else{i.push({from:c.from,to:s.from},{from:s.to,insert:e.lineBreak+c.text});var h,v=yi(s.ranges);try{for(v.s();!(h=v.n()).done;){var p=h.value;o.push(VF.range(p.anchor-l,p.head-l))}}catch(e){v.e(e)}finally{v.f()}}}}}catch(e){a.e(e)}finally{a.f()}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:VF.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function KZ(e,t,n){if(e.readOnly)return!1;var r,i=[],o=yi(UZ(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;n?i.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):i.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)})}}catch(e){o.e(e)}finally{o.f()}return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var GZ=YZ(!1),QZ=YZ(!0);function YZ(e){return function(t){var n=t.state,r=t.dispatch;if(n.readOnly)return!1;var i=n.changeByRange((function(t){var r=t.from,i=t.to,o=n.doc.lineAt(r),a=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};var n,r=XQ(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(WG.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(i.to,o.from))?{from:i.to,to:o.from}:null}(n,r);e&&(r=i=(i<=o.to?o:n.doc.lineAt(i)).to);var s=new vY(n,{simulateBreak:r,simulateDoubleBreak:!!a}),c=hY(s,r);for(null==c&&(c=YV(/^\s*/.exec(n.doc.lineAt(r).text)[0],n.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;a?(r=a.from,i=a.to):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);var l=["",dY(n,c)];return a&&l.push(dY(n,s.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:uF.of(l)},range:VF.cursor(r+1+l[1].length)}}));return r(n.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function XZ(e,t){var n=-1;return e.changeByRange((function(r){for(var i=[],o=r.from;o<=r.to;){var a=e.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),o=a.to+1}var s=e.changes(i);return{changes:i,range:VF.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}var ZZ=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(XZ(t,(function(e,n){n.push({from:e.from,insert:t.facet(uY)})})),{userEvent:"input.indent"})),!0)},e0=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(XZ(t,(function(e,n){var r=/^\s*/.exec(e.text)[0];if(r){for(var i=YV(r,t.tabSize),o=0,a=dY(t,Math.max(0,i-fY(t)));o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:e.from+o,to:e.from+r.length,insert:a.slice(o)})}})),{userEvent:"delete.dedent"})),!0)},t0=[{key:"Ctrl-b",run:fZ,shift:$Z,preventDefault:!0},{key:"Ctrl-f",run:dZ,shift:_Z},{key:"Ctrl-p",run:gZ,shift:EZ},{key:"Ctrl-n",run:yZ,shift:AZ},{key:"Ctrl-a",run:function(e){return sZ(e,(function(t){return VF.cursor(e.lineBlockAt(t.head).from,1)}))},shift:function(e){return SZ(e,(function(t){return VF.cursor(e.lineBlockAt(t.head).from)}))}},{key:"Ctrl-e",run:function(e){return sZ(e,(function(t){return VF.cursor(e.lineBlockAt(t.head).to,-1)}))},shift:function(e){return SZ(e,(function(t){return VF.cursor(e.lineBlockAt(t.head).to)}))}},{key:"Ctrl-d",run:VZ},{key:"Ctrl-h",run:FZ},{key:"Ctrl-k",run:function(e){return LZ(e,(function(t){var n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))}},{key:"Ctrl-Alt-h",run:HZ},{key:"Ctrl-o",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){return{changes:{from:e.from,to:e.to,insert:uF.of(["",""])},range:VF.cursor(e.from)}}));return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange((function(e){if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};var n=e.from,r=t.doc.lineAt(n),i=n==r.from?n-1:SF(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:SF(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:t.doc.slice(n,o).append(t.doc.slice(i,n))},range:VF.cursor(o)}}));return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:xZ}],n0=[{key:"ArrowLeft",run:fZ,shift:$Z,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:function(e){return hZ(e,!uZ(e))},shift:function(e){return OZ(e,!uZ(e))},preventDefault:!0},{mac:"Cmd-ArrowLeft",run:function(e){return sZ(e,(function(t){return jZ(e,t,!uZ(e))}))},shift:function(e){return SZ(e,(function(t){return jZ(e,t,!uZ(e))}))},preventDefault:!0},{key:"ArrowRight",run:dZ,shift:_Z,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:function(e){return hZ(e,uZ(e))},shift:function(e){return OZ(e,uZ(e))},preventDefault:!0},{mac:"Cmd-ArrowRight",run:function(e){return sZ(e,(function(t){return jZ(e,t,uZ(e))}))},shift:function(e){return SZ(e,(function(t){return jZ(e,t,uZ(e))}))},preventDefault:!0},{key:"ArrowUp",run:gZ,shift:EZ,preventDefault:!0},{mac:"Cmd-ArrowUp",run:NZ,shift:DZ},{mac:"Ctrl-ArrowUp",run:kZ,shift:TZ},{key:"ArrowDown",run:yZ,shift:AZ,preventDefault:!0},{mac:"Cmd-ArrowDown",run:IZ,shift:zZ},{mac:"Ctrl-ArrowDown",run:xZ,shift:RZ},{key:"PageUp",run:kZ,shift:TZ},{key:"PageDown",run:xZ,shift:RZ},{key:"Home",run:function(e){return sZ(e,(function(t){return jZ(e,t,!1)}))},shift:function(e){return SZ(e,(function(t){return jZ(e,t,!1)}))},preventDefault:!0},{key:"Mod-Home",run:NZ,shift:DZ},{key:"End",run:function(e){return sZ(e,(function(t){return jZ(e,t,!0)}))},shift:function(e){return SZ(e,(function(t){return jZ(e,t,!0)}))},preventDefault:!0},{key:"Mod-End",run:IZ,shift:zZ},{key:"Enter",run:GZ},{key:"Mod-a",run:function(e){var t=e.state;return(0,e.dispatch)(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0}},{key:"Backspace",run:FZ,shift:FZ},{key:"Delete",run:VZ},{key:"Mod-Backspace",mac:"Alt-Backspace",run:HZ},{key:"Mod-Delete",mac:"Alt-Delete",run:function(e){return WZ(e,!0)}},{mac:"Mod-Backspace",run:function(e){return LZ(e,(function(t){var n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}))}},{mac:"Mod-Delete",run:function(e){return LZ(e,(function(t){var n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}))}}].concat(t0.map((function(e){return{mac:e.key,run:e.run,shift:e.shift}}))),r0=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(e){return sZ(e,(function(t){return pZ(e.state,t,!uZ(e))}))},shift:function(e){return SZ(e,(function(t){return pZ(e.state,t,!uZ(e))}))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(e){return sZ(e,(function(t){return pZ(e.state,t,uZ(e))}))},shift:function(e){return SZ(e,(function(t){return pZ(e.state,t,uZ(e))}))}},{key:"Alt-ArrowUp",run:function(e){return JZ(e.state,e.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(e){return KZ(e.state,e.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(e){return JZ(e.state,e.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(e){return KZ(e.state,e.dispatch,!0)}},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch,r=t.selection,i=null;return r.ranges.length>1?i=VF.create([r.main]):r.main.empty||(i=VF.create([VF.cursor(r.main.head)])),!!i&&(n(aZ(t,i)),!0)}},{key:"Mod-Enter",run:QZ},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=UZ(t).map((function(e){var n=e.from,r=e.to;return VF.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:VF.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=oZ(t.selection,(function(e){for(var n,r=XQ(t).resolveStack(e.from,1);r;r=r.next){var i=r.node;if((i.from<e.from&&i.to>=e.to||i.to>e.to&&i.from<=e.from)&&(null===(n=i.parent)||void 0===n?void 0:n.parent))return VF.range(i.to,i.from)}return e}));return n(aZ(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:e0},{key:"Mod-]",run:ZZ},{key:"Mod-Alt-\\",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=Object.create(null),i=new vY(t,{overrideIndentation:function(e){var t=r[e];return null==t?-1:t}}),o=XZ(t,(function(e,n,o){var a=hY(i,e.from);if(null!=a){/\S/.test(e.text)||(a=0);var s=/^\s*/.exec(e.text)[0],c=dY(t,a);(s!=c||o.from<e.from+s.length)&&(r[e.from]=a,n.push({from:e.from,to:e.from+s.length,insert:c}))}}));return o.changes.empty||n(t.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:function(e){if(e.state.readOnly)return!1;var t=e.state,n=t.changes(UZ(t).map((function(e){var n=e.from,r=e.to;return n>0?n--:r<t.doc.length&&r++,{from:n,to:r}}))),r=oZ(t.selection,(function(t){return e.moveVertically(t,!0)})).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:function(e){return function(e,t,n){var r=!1,i=oZ(e.selection,(function(t){var i=dX(e,t.head,-1)||dX(e,t.head,1)||t.head>0&&dX(e,t.head-1,1)||t.head<e.doc.length&&dX(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;var o=i.start.from==t.head?i.end.to:i.end.from;return n?VF.range(t.anchor,o):VF.cursor(o)}));return!!r&&(t(aZ(e,i)),!0)}(e.state,e.dispatch,!1)}},{key:"Mod-/",run:function(e){var t=e.state,n=t.doc.lineAt(t.selection.main.from),r=MX(e.state,n.from);return r.line?$X(e):!!r.block&&OX(e)}},{key:"Alt-A",run:_X}].concat(n0),i0={key:"Tab",run:ZZ,shift:e0};function o0(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==Wi(n)&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)a0(e,arguments[t]);return e}function a0(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)a0(e,t[n])}}var s0=Di((function e(t,n,r){Ni(this,e),this.from=t,this.to=n,this.diagnostic=r})),c0=function(){function e(t,n,r){Ni(this,e),this.diagnostics=t,this.panel=n,this.selected=r}return Di(e,null,[{key:"init",value:function(t,n,r){var i=t,o=r.facet(x0).markerFilter;o&&(i=o(i));var a=uH.set(i.map((function(e){return e.from==e.to||e.from==e.to-1&&r.doc.lineAt(e.from).to==e.from?uH.widget({widget:new C0(e),diagnostic:e}).range(e.from):uH.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity+(e.markClass?" "+e.markClass:"")},diagnostic:e}).range(e.from,e.to)})),!0);return new e(a,n,l0(a))}}]),e}();function l0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,(function(e,n,i){var o=i.spec;if(!t||o.diagnostic==t)return r=new s0(e,n,o.diagnostic),!1})),r}function u0(e,t){var n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((function(e){return e.is(d0)}))&&!e.changes.touchesRange(n.from,n.to))}function f0(e,t){return e.field(p0,!1)?t:t.concat(kV.appendConfig.of(L0))}var d0=kV.define(),h0=kV.define(),v0=kV.define(),p0=XF.define({create:function(){return new c0(uH.none,null,null)},update:function(e,t){if(t.docChanged){var n=e.diagnostics.map(t.changes),r=null;if(e.selected){var i=t.changes.mapPos(e.selected.from,1);r=l0(n,e.selected.diagnostic,i)||l0(n,null,i)}e=new c0(n,e.panel,r)}var o,a=yi(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.is(d0)?e=c0.init(s.value,e.panel,t.state):s.is(h0)?e=new c0(e.diagnostics,s.value?_0.open:null,e.selected):s.is(v0)&&(e=new c0(e.diagnostics,e.panel,s.value))}}catch(e){a.e(e)}finally{a.f()}return e},provide:function(e){return[bG.from(e,(function(e){return e.panel})),XJ.decorations.from(e,(function(e){return e.diagnostics}))]}}),m0=uH.mark({class:"cm-lintRange cm-lintRange-active"});function g0(e,t,n){var r=e.state.field(p0).diagnostics,i=[],o=2e8,a=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(function(e,r,s){var c=s.spec;t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0))&&(i.push(c.diagnostic),o=Math.min(e,o),a=Math.max(r,a))}));var s=e.state.facet(x0).tooltipFilter;return s&&(i=s(i)),i.length?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:function(){return{dom:y0(e,i)}}}:null}function y0(e,t){return o0("ul",{class:"cm-tooltip-lint"},t.map((function(t){return S0(e,t,!1)})))}var b0=function(e){var t=e.state.field(p0,!1);return!(!t||!t.panel)&&(e.dispatch({effects:h0.of(!1)}),!0)},w0=[{key:"Mod-Shift-m",run:function(e){var t=e.state.field(p0,!1);t&&t.panel||e.dispatch({effects:f0(e.state,[h0.of(!0)])});var n=pG(e,_0.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:function(e){var t=e.state.field(p0,!1);if(!t)return!1;var n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(!(r=t.diagnostics.iter(0)).value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],k0=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.timeout=-1,this.set=!0;var n=t.state.facet(x0).delay;this.lintTime=Date.now()+n,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,n)}return Di(e,[{key:"run",value:function(){var e=this,t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;var n=this.view.state,r=n.facet(x0).sources;Promise.all(r.map((function(t){return Promise.resolve(t(e.view))}))).then((function(t){var r=t.reduce((function(e,t){return e.concat(t)}));e.view.state.doc==n.doc&&e.view.dispatch(function(e,t){return{effects:f0(e,[d0.of(t)])}}(e.view.state,r))}),(function(t){EH(e.view.state,t)}))}}},{key:"update",value:function(e){var t=e.state.facet(x0);(e.docChanged||t!=e.startState.facet(x0)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}},{key:"force",value:function(){this.set&&(this.lintTime=Date.now(),this.run())}},{key:"destroy",value:function(){clearTimeout(this.timeout)}}]),e}()),x0=UF.define({combine:function(e){return Object.assign({sources:e.map((function(e){return e.source}))},RV(e.map((function(e){return e.config})),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:function(e,t){return e?t?function(n){return e(n)||t(n)}:e:t}}))}});function j0(e){var t=[];if(e){var n,r=yi(e);try{e:for(r.s();!(n=r.n()).done;){for(var i=n.value.name,o=function(){var e=i[a];if(/[a-zA-Z]/.test(e)&&!t.some((function(t){return t.toLowerCase()==e.toLowerCase()})))return t.push(e),1},a=0;a<i.length;a++)if(o())continue e;t.push("")}}catch(e){r.e(e)}finally{r.f()}}return t}function S0(e,t,n){var r,i=n?j0(t.actions):[];return o0("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},o0("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map((function(n,r){var o=!1,a=function(r){if(r.preventDefault(),!o){o=!0;var i=l0(e.state.field(p0).diagnostics,t);i&&n.apply(e,i.from,i.to)}},s=n.name,c=i[r]?s.indexOf(i[r]):-1,l=c<0?s:[s.slice(0,c),o0("u",s.slice(c,c+1)),s.slice(c+1)];return o0("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":" Action: ".concat(s).concat(c<0?"":' (access key "'.concat(i[r],')"'),".")},l)})),t.source&&o0("div",{class:"cm-diagnosticSource"},t.source))}var C0=function(e){_i(n,cH);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).diagnostic=e,r}return Di(n,[{key:"eq",value:function(e){return e.diagnostic==this.diagnostic}},{key:"toDOM",value:function(){return o0("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}]),n}(),$0=Di((function e(t,n){Ni(this,e),this.diagnostic=n,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=S0(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")})),_0=function(){function e(t){var n=this;Ni(this,e),this.view=t,this.items=[];this.list=o0("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:function(e){if(27==e.keyCode)b0(n.view),n.view.focus();else if(38==e.keyCode||33==e.keyCode)n.moveSelection((n.selectedIndex-1+n.items.length)%n.items.length);else if(40==e.keyCode||34==e.keyCode)n.moveSelection((n.selectedIndex+1)%n.items.length);else if(36==e.keyCode)n.moveSelection(0);else if(35==e.keyCode)n.moveSelection(n.items.length-1);else if(13==e.keyCode)n.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&n.selectedIndex>=0))return;for(var r=n.items[n.selectedIndex].diagnostic,i=j0(r.actions),o=0;o<i.length;o++)if(i[o].toUpperCase().charCodeAt(0)==e.keyCode){var a=l0(n.view.state.field(p0).diagnostics,r);a&&r.actions[o].apply(t,a.from,a.to)}}e.preventDefault()},onclick:function(e){for(var t=0;t<n.items.length;t++)n.items[t].dom.contains(e.target)&&n.moveSelection(t)}}),this.dom=o0("div",{class:"cm-panel-lint"},this.list,o0("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:function(){return b0(n.view)}},"×")),this.update()}return Di(e,[{key:"selectedIndex",get:function(){var e=this.view.state.field(p0).selected;if(!e)return-1;for(var t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}},{key:"update",value:function(){var e=this,t=this.view.state.field(p0),n=t.diagnostics,r=t.selected,i=0,o=!1,a=null;for(n.between(0,this.view.state.doc.length,(function(t,n,s){for(var c,l=s.spec,u=-1,f=i;f<e.items.length;f++)if(e.items[f].diagnostic==l.diagnostic){u=f;break}u<0?(c=new $0(e.view,l.diagnostic),e.items.splice(i,0,c),o=!0):(c=e.items[u],u>i&&(e.items.splice(i,u-i),o=!0)),r&&c.diagnostic==r.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),a=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++}));i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)o=!0,this.items.pop();0==this.items.length&&(this.items.push(new $0(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),o=!0),a?(this.list.setAttribute("aria-activedescendant",a.id),this.view.requestMeasure({key:this,read:function(){return{sel:a.dom.getBoundingClientRect(),panel:e.list.getBoundingClientRect()}},write:function(t){var n=t.sel,r=t.panel,i=r.height/e.list.offsetHeight;n.top<r.top?e.list.scrollTop-=(r.top-n.top)/i:n.bottom>r.bottom&&(e.list.scrollTop+=(n.bottom-r.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}},{key:"sync",value:function(){var e=this.list.firstChild;function t(){var t=e;e=t.nextSibling,t.remove()}var n,r=yi(this.items);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e)}}catch(e){r.e(e)}finally{r.f()}for(;e;)t()}},{key:"moveSelection",value:function(e){if(!(this.selectedIndex<0)){var t=l0(this.view.state.field(p0).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:v0.of(t)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function O0(e){return'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(e),"</svg>')")}function M0(e){return O0('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(e,'" fill="none" stroke-width=".7"/>'),'width="6" height="3"')}var E0=XJ.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:M0("#d11")},".cm-lintRange-warning":{backgroundImage:M0("orange")},".cm-lintRange-info":{backgroundImage:M0("#999")},".cm-lintRange-hint":{backgroundImage:M0("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function A0(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}var P0=function(e){_i(n,wG);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).diagnostics=e,r.severity=e.reduce((function(e,t){return A0(e)<A0(t.severity)?t.severity:e}),"hint"),r}return Di(n,[{key:"toDOM",value:function(e){var t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;var n=this.diagnostics,r=e.state.facet(B0).tooltipFilter;return r&&(n=r(n)),n.length&&(t.onmouseover=function(){return function(e,t,n){function r(){var r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:I0.of({pos:r.from,above:!1,create:function(){return{dom:y0(e,n),getCoords:function(){return t.getBoundingClientRect()}}}})}),t.onmouseout=t.onmousemove=null,function(e,t){var n=function n(r){var i=t.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientX<i.right+10&&r.clientY>i.top-10&&r.clientY<i.bottom+10)){for(var o=r.target;o;o=o.parentNode)if(1==o.nodeType&&o.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),e.state.field(D0)&&e.dispatch({effects:I0.of(null)})}};window.addEventListener("mousemove",n)}(e,t)}var i=e.state.facet(B0),o=i.hoverTime,a=setTimeout(r,o);t.onmouseout=function(){clearTimeout(a),t.onmouseout=t.onmousemove=null},t.onmousemove=function(){clearTimeout(a),a=setTimeout(r,o)}}(e,t,n)}),t}}]),n}();function T0(e,t){var n,r=Object.create(null),i=yi(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=e.lineAt(o.from);(r[a.from]||(r[a.from]=[])).push(o)}}catch(e){i.e(e)}finally{i.f()}var s=[];for(var c in r)s.push(new P0(r[c]).range(+c));return LV.of(s,!0)}var R0=SG({class:"cm-gutter-lint",markers:function(e){return e.state.field(N0)}}),N0=XF.define({create:function(){return LV.empty},update:function(e,t){e=e.map(t.changes);var n,r=t.state.facet(B0).markerFilter,i=yi(t.effects);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.is(d0)){var a=o.value;r&&(a=r(a||[])),e=T0(t.state.doc,a.slice(0))}}}catch(e){i.e(e)}finally{i.f()}return e}}),I0=kV.define(),D0=XF.define({create:function(){return null},update:function(e,t){return e&&t.docChanged&&(e=u0(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce((function(e,t){return t.is(I0)?t.value:e}),e)},provide:function(e){return oG.from(e)}}),z0=XJ.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:O0('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:O0('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:O0('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),L0=[p0,XJ.decorations.compute([p0],(function(e){var t=e.field(p0),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?uH.set([m0.range(n.from,n.to)]):uH.none})),fG(g0,{hideOn:u0}),E0],B0=UF.define({combine:function(e){return RV(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function q0(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[B0.of(e),N0,R0,z0,D0]}var F0=function(){function e(t,n,r,i,o,a,s,c,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10?arguments[10]:void 0;Ni(this,e),this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=c,this.curContext=l,this.lookAhead=u,this.parent=f}return Di(e,[{key:"toString",value:function(){return"[".concat(this.stack.filter((function(e,t){return t%3==0})).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}},{key:"reduce",value:function(e){var t,n=e>>19,r=65535&e,i=this.p.parser,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,4,!0),void this.reduceContext(r,this.reducePos);var a=this.stack.length-3*(n-1)-(262144&e?6:0),s=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-s;c>=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));var l=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-l;if(r<i.minRepeatTerm||131072&e){var f=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,s,f,u+4,!0)}if(262144&e)this.state=this.stack[a];else{var d=this.stack[a-3];this.state=i.getGoto(d,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,s)}},{key:"storeNode",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){var o=this,a=this.buffer.length;if(0==a&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&0==o.buffer[a-4]&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t)return void(o.buffer[a-2]=n)}}if(i&&this.pos!=n){var s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=n,this.buffer[s+3]=r}else this.buffer.push(e,t,n,r)}},{key:"shift",value:function(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){var i=e,o=this.p.parser;(r>this.pos||t<=o.maxNode)&&(this.pos=r,o.stateFlag(i,1)||(this.reducePos=r)),this.pushState(i,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}},{key:"apply",value:function(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}},{key:"useNode",value:function(e,t){var n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);var r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}},{key:"split",value:function(){for(var t=this,n=t.buffer.length;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;for(var r=t.buffer.slice(n),i=t.bufferBase+n;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}},{key:"recoverByDelete",value:function(e,t){var n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}},{key:"canShift",value:function(e){for(var t=new W0(this);;){var n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}},{key:"recoverByInsert",value:function(e){if(this.stack.length>=300)return[];var t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){for(var n,r=[],i=0;i<t.length;i+=2)(n=t[i+1])!=this.state&&this.p.parser.hasAction(n,e)&&r.push(t[i],n);if(this.stack.length<120)for(var o=function(){var e=t[a+1];r.some((function(t,n){return 1&n&&t==e}))||r.push(t[a],e)},a=0;r.length<8&&a<t.length;a+=2)o();t=r}for(var s=[],c=0;c<t.length&&s.length<4;c+=2){var l=t[c+1];if(l!=this.state){var u=this.split();u.pushState(l,this.pos),u.storeNode(0,u.pos,u.pos,4,!0),u.shiftContext(t[c],this.pos),u.reducePos=this.pos,u.score-=200,s.push(u)}}return s}},{key:"forceReduce",value:function(){var e=this.p.parser,t=e.stateSlot(this.state,5);if(0==(65536&t))return!1;if(!e.validAction(this.state,t)){var n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){var o=this.findForcedReduction();if(null==o)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}},{key:"findForcedReduction",value:function(){var e=this,t=this.p.parser,n=[];return function r(i,o){if(!n.includes(i))return n.push(i),t.allActions(i,(function(n){if(393216&n);else if(65536&n){var i=(n>>19)-o;if(i>1){var a=65535&n,s=e.stack.length-3*i;if(s>=0&&t.getGoto(e.stack[s],a,!1)>=0)return i<<19|65536|a}}else{var c=r(n,o+1);if(null!=c)return c}}))}(this.state,0)}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var e=this.p.parser;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}},{key:"restart",value:function(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(var t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}},{key:"parser",get:function(){return this.p.parser}},{key:"dialectEnabled",value:function(e){return this.p.parser.dialect.flags[e]}},{key:"shiftContext",value:function(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}},{key:"reduceContext",value:function(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}},{key:"emitContext",value:function(){var e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}},{key:"emitLookAhead",value:function(){var e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}},{key:"updateContext",value:function(e){if(e!=this.curContext.context){var t=new V0(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}},{key:"setLookAhead",value:function(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new V0(i,i.start):null,0,null)}}]),e}(),V0=Di((function e(t,n){Ni(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0})),W0=function(){function e(t){Ni(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return Di(e,[{key:"reduce",value:function(e){var t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}]),e}(),H0=function(){function e(t,n,r){Ni(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}return Di(e,[{key:"maybeNext",value:function(){var e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new e(this.stack,this.pos,this.index)}}],[{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.bufferBase+t.buffer.length;return new e(t,n,n-t.bufferBase)}}]),e}();function U0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof e)return e;for(var n=null,r=0,i=0;r<e.length;){for(var o=0;;){var a=e.charCodeAt(r++),s=!1;if(126==a){o=65535;break}a>=92&&a--,a>=34&&a--;var c=a-32;if(c>=46&&(c-=46,s=!0),o+=c,s)break;o*=46}n?n[i++]=o:n=new t(o)}return n}var J0=Di((function e(){Ni(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0})),K0=new J0,G0=function(){function e(t,n){Ni(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=K0,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return Di(e,[{key:"resolveOffset",value:function(e,t){for(var n=this.range,r=this.rangeIndex,i=this.pos+e;i<n.from;){if(!r)return null;var o=this.ranges[--r];i-=n.from-o.to,n=o}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];i+=a.from-n.to,n=a}return i}},{key:"clipPos",value:function(e){if(e>=this.range.from&&e<this.range.to)return e;var t,n=yi(this.ranges);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.to>e)return Math.max(e,r.from)}}catch(e){n.e(e)}finally{n.f()}return this.end}},{key:"peek",value:function(e){var t,n,r=this.chunkOff+e;if(r>=0&&r<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(r);else{var i=this.resolveOffset(e,1);if(null==i)return-1;if((t=i)>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{for(var o=this.rangeIndex,a=this.range;a.to<=t;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}},{key:"acceptToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}},{key:"getChunk",value:function(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){var e=this.chunk,t=this.chunkPos;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;var n=this.input.chunk(this.pos),r=this.pos+n.length;this.chunk=r>this.range.to?n.slice(0,this.range.to-this.pos):n,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=K0,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}},{key:"read",value:function(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);var n,r="",i=yi(this.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from>=t)break;o.to>e&&(r+=this.input.read(Math.max(o.from,e),Math.min(o.to,t)))}}catch(e){i.e(e)}finally{i.f()}return r}}]),e}(),Q0=function(){function e(t,n){Ni(this,e),this.data=t,this.id=n}return Di(e,[{key:"token",value:function(e,t){var n=t.p.parser;!function(e,t,n,r,i,o){var a=0,s=1<<r,c=n.p.parser.dialect;e:for(;0!=(s&e[a]);){for(var l=e[a+1],u=a+3;u<l;u+=2)if((e[u+1]&s)>0){var f=e[u];if(c.allows(f)&&(-1==t.token.value||t.token.value==f||X0(f,t.token.value,i,o))){t.acceptToken(f);break}}var d=t.next,h=0,v=e[a+2];if(!(t.next<0&&v>h&&65535==e[l+3*v-3])){for(;h<v;){var p=h+v>>1,m=l+p+(p<<1),g=e[m],y=e[m+1]||65536;if(d<g)v=p;else{if(!(d>=y)){a=e[m+2],t.advance();continue e}h=p+1}}break}a=e[l+3*v-1]}}(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}]),e}();function Y0(e,t,n){for(var r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function X0(e,t,n,r){var i=Y0(n,r,t);return i<0||Y0(n,r,e)<i}Q0.prototype.contextual=Q0.prototype.fallback=Q0.prototype.extend=!1,Q0.prototype.fallback=Q0.prototype.extend=!1;var Z0="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),e1=null;function t1(e,t,n){var r=e.cursor(KG.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var n1=function(){function e(t,n){Ni(this,e),this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Di(e,[{key:"nextFragment",value:function(){var e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?t1(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?t1(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){var t=this.trees.length-1;if(t<0)return this.nextFragment(),null;var n=this.trees[t],r=this.index[t];if(r!=n.children.length){var i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof XG){if(o==e){if(o<this.safeFrom)return null;var a=o+i.length;if(a<=this.safeTo){var s=i.prop(WG.lookAhead);if(!s||a+s<this.fragment.to)return i}}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),e}(),r1=function(){function e(t,n){Ni(this,e),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((function(e){return new J0}))}return Di(e,[{key:"getActions",value:function(e){for(var t=0,n=null,r=e.p.parser,i=r.tokenizers,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0,c=0;c<i.length;c++)if(0!=(1<<c&o)){var l=i[c],u=this.tokens[c];if((!n||l.fallback)&&((l.contextual||u.start!=e.pos||u.mask!=o||u.context!=a)&&(this.updateCachedToken(u,l,e),u.mask=o,u.context=a),u.lookAhead>u.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){var f=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>f))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new J0).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}},{key:"getMainToken",value:function(e){if(this.mainToken)return this.mainToken;var t=new J0,n=e.pos,r=e.p;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}},{key:"updateCachedToken",value:function(e,t,n){var r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){for(var i=n.p.parser,o=0;o<i.specialized.length;o++)if(i.specialized[o]==e.value){var a=i.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){0==(1&a)?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(e,t,n,r){for(var i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}},{key:"addActions",value:function(e,t,n,r){for(var i=e.state,o=e.p.parser,a=o.data,s=0;s<2;s++)for(var c=o.stateSlot(i,s?2:1);;c+=3){if(65535==a[c]){if(1!=a[c+1]){0==r&&2==a[c+1]&&(r=this.putAction(c1(a,c+2),t,n,r));break}c=c1(a,c+2)}a[c]==t&&(r=this.putAction(c1(a,c+1),t,n,r))}return r}}]),e}(),i1=function(){function e(t,n,r,i){Ni(this,e),this.parser=t,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new G0(n,i),this.tokens=new r1(t,this.stream),this.topTerm=t.top[1];var o=i[0].from;this.stacks=[F0.start(this,t.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*t.bufferLength?new n1(r,t.nodeSet):null}return Di(e,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){var e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){for(var o=xi(n,1)[0];o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(var a=0;a<n.length;a++)for(var s=n[a];;){if(this.tokens.mainToken=null,s.pos>r)i.push(s);else{if(this.advanceStack(s,i,n))continue;e||(e=[],t=[]),e.push(s);var c=this.tokens.getMainToken(s);t.push(c.value,c.end)}break}if(!i.length){var l=e&&function(e){var t,n=null,r=yi(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=o&&i.pos>o)&&i.p.parser.stateFlag(i.state,2)&&(!n||n.score<i.score)&&(n=i)}}catch(e){r.e(e)}finally{r.f()}return n}(e);if(l)return Z0&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw Z0&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){var u=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(u)return Z0&&console.log("Force-finish "+this.stackID(u)),this.stackToTree(u.forceAll())}if(this.recovering){var f=1==this.recovering?1:3*this.recovering;if(i.length>f)for(i.sort((function(e,t){return t.score-e.score}));i.length>f;)i.pop();i.some((function(e){return e.reducePos>r}))&&this.recovering--}else if(i.length>1){e:for(var d=0;d<i.length-1;d++)for(var h=i[d],v=d+1;v<i.length;v++){var p=i[v];if(h.sameState(p)||h.buffer.length>500&&p.buffer.length>500){if(!((h.score-p.score||h.buffer.length-p.buffer.length)>0)){i.splice(d--,1);continue e}i.splice(v--,1)}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(var m=1;m<i.length;m++)i[m].pos<this.minStackPos&&(this.minStackPos=i[m].pos);return null}},{key:"stopAt",value:function(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}},{key:"advanceStack",value:function(e,t,n){var r=e.pos,i=this.parser,o=Z0?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments)for(var a=e.curContext&&e.curContext.tracker.strict,s=a?e.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var l=this.parser.nodeSet.types[c.type.id]==c.type?i.getGoto(e.state,c.type.id):-1;if(l>-1&&c.length&&(!a||(c.prop(WG.contextHash)||0)==s))return e.useNode(c,l),Z0&&console.log(o+this.stackID(e)+" (via reuse of ".concat(i.getName(c.type.id),")")),!0;if(!(c instanceof XG)||0==c.children.length||c.positions[0]>0)break;var u=c.children[0];if(!(u instanceof XG&&0==c.positions[0]))break;c=u}var f=i.stateSlot(e.state,4);if(f>0)return e.reduce(f),Z0&&console.log(o+this.stackID(e)+" (via always-reduce ".concat(i.getName(65535&f),")")),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););for(var d=this.tokens.getActions(e),h=0;h<d.length;){var v=d[h++],p=d[h++],m=d[h++],g=h==d.length||!n,y=g?e:e.split(),b=this.tokens.mainToken;if(y.apply(v,p,b?b.start:y.pos,m),Z0&&console.log(o+this.stackID(y)+" (via ".concat(0==(65536&v)?"shift":"reduce of ".concat(i.getName(65535&v))," for ").concat(i.getName(p)," @ ").concat(r).concat(y==e?"":", split",")")),g)return!0;y.pos>r?t.push(y):n.push(y)}return!1}},{key:"advanceFully",value:function(e,t){for(var n=e.pos;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return o1(e,t),!0}}},{key:"runRecovery",value:function(e,t,n){for(var r=null,i=!1,o=0;o<e.length;o++){var a=e[o],s=t[o<<1],c=t[1+(o<<1)],l=Z0?this.stackID(a)+" -> ":"";if(a.deadEnd){if(i)continue;if(i=!0,a.restart(),Z0&&console.log(l+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}for(var u=a.split(),f=l,d=0;u.forceReduce()&&d<10;d++){if(Z0&&console.log(f+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;Z0&&(f=this.stackID(u)+" -> ")}var h,v=yi(a.recoverByInsert(s));try{for(v.s();!(h=v.n()).done;){var p=h.value;Z0&&console.log(l+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n)}}catch(e){v.e(e)}finally{v.f()}this.stream.end>a.pos?(c==a.pos&&(c++,s=0),a.recoverByDelete(s,c),Z0&&console.log(l+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(s),")")),o1(a,n)):(!r||r.score<a.score)&&(r=a)}return r}},{key:"stackToTree",value:function(e){return e.close(),XG.build({buffer:H0.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}},{key:"stackID",value:function(e){var t=(e1||(e1=new WeakMap)).get(e);return t||e1.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}]),e}();function o1(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}var a1=function(){function e(t,n,r){Ni(this,e),this.source=t,this.flags=n,this.disabled=r}return Di(e,[{key:"allows",value:function(e){return!this.disabled||0==this.disabled[e]}}]),e}(),s1=function(e){_i(n,yQ);var t=Mi(n);function n(e){var r,i;if(Ni(this,n),(i=t.call(this)).wrappers=[],14!=e.version)throw new RangeError("Parser version (".concat(e.version,") doesn't match runtime version (",14,")"));var o=e.nodeNames.split(" ");i.minRepeatTerm=o.length;for(var a=0;a<e.repeatNodeCount;a++)o.push("");for(var s=Object.keys(e.topRules).map((function(t){return e.topRules[t][1]})),c=[],l=0;l<o.length;l++)c.push([]);function u(e,t,n){c[e].push([t,t.deserialize(String(n))])}if(e.nodeProps){var f,d=yi(e.nodeProps);try{for(d.s();!(f=d.n()).done;){var h=f.value,v=h[0];"string"==typeof v&&(v=WG[v]);for(var p=1;p<h.length;){var m=h[p++];if(m>=0)u(m,v,h[p++]);else{for(var g=h[p+-m],y=-m;y>0;y--)u(h[p++],v,g);p++}}}}catch(e){d.e(e)}finally{d.f()}}i.nodeSet=new GG(o.map((function(t,n){return JG.define({name:n>=i.minRepeatTerm?void 0:t,id:n,props:c[n],top:s.indexOf(n)>-1,error:0==n,skipped:e.skippedNodes&&e.skippedNodes.indexOf(n)>-1})}))),e.propSources&&(i.nodeSet=(r=i.nodeSet).extend.apply(r,Bi(e.propSources))),i.strict=!1,i.bufferLength=1024;var b=U0(e.tokenData);i.context=e.context,i.specializerSpecs=e.specialized||[],i.specialized=new Uint16Array(i.specializerSpecs.length);for(var w=0;w<i.specializerSpecs.length;w++)i.specialized[w]=i.specializerSpecs[w].term;return i.specializers=i.specializerSpecs.map(l1),i.states=U0(e.states,Uint32Array),i.data=U0(e.stateData),i.goto=U0(e.goto),i.maxTerm=e.maxTerm,i.tokenizers=e.tokenizers.map((function(e){return"number"==typeof e?new Q0(b,e):e})),i.topRules=e.topRules,i.dialects=e.dialects||{},i.dynamicPrecedences=e.dynamicPrecedences||null,i.tokenPrecTable=e.tokenPrec,i.termNames=e.termNames||null,i.maxNode=i.nodeSet.types.length-1,i.dialect=i.parseDialect(),i.top=i.topRules[Object.keys(i.topRules)[0]],i}return Di(n,[{key:"createParse",value:function(e,t,n){var r,i=new i1(this,e,t,n),o=yi(this.wrappers);try{for(o.s();!(r=o.n()).done;){i=(0,r.value)(i,e,t,n)}}catch(e){o.e(e)}finally{o.f()}return i}},{key:"getGoto",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.goto;if(t>=r[0])return-1;for(var i=r[t+1];;){var o=r[i++],a=1&o,s=r[i++];if(a&&n)return s;for(var c=i+(o>>1);i<c;i++)if(r[i]==e)return s;if(a)return-1}}},{key:"hasAction",value:function(e,t){for(var n=this.data,r=0;r<2;r++)for(var i,o=this.stateSlot(e,r?2:1);;o+=3){if(65535==(i=n[o])){if(1!=n[o+1]){if(2==n[o+1])return c1(n,o+2);break}i=n[o=c1(n,o+2)]}if(i==t||0==i)return c1(n,o+1)}return 0}},{key:"stateSlot",value:function(e,t){return this.states[6*e+t]}},{key:"stateFlag",value:function(e,t){return(this.stateSlot(e,0)&t)>0}},{key:"validAction",value:function(e,t){return!!this.allActions(e,(function(e){return e==t||null}))}},{key:"allActions",value:function(e,t){for(var n=this.stateSlot(e,4),r=n?t(n):void 0,i=this.stateSlot(e,1);null==r;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=c1(this.data,i+2)}r=t(c1(this.data,i+1))}return r}},{key:"nextStates",value:function(e){for(var t=this,n=[],r=function(e){if(65535==t.data[e]){if(1!=t.data[e+1])return i=e,1;e=c1(t.data,e+2)}if(0==(1&t.data[e+2])){var r=t.data[e+1];n.some((function(e,t){return 1&t&&e==r}))||n.push(t.data[e],r)}i=e},i=this.stateSlot(e,1);!r(i);i+=3);return n}},{key:"configure",value:function(e){var t,r=Object.assign(Object.create(n.prototype),this);if(e.props&&(r.nodeSet=(t=this.nodeSet).extend.apply(t,Bi(e.props))),e.top){var i=this.topRules[e.top];if(!i)throw new RangeError("Invalid top rule name ".concat(e.top));r.top=i}return e.tokenizers&&(r.tokenizers=this.tokenizers.map((function(t){var n=e.tokenizers.find((function(e){return e.from==t}));return n?n.to:t}))),e.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((function(t,n){var i=e.specializers.find((function(e){return e.from==t.external}));if(!i)return t;var o=Object.assign(Object.assign({},t),{external:i.to});return r.specializers[n]=l1(o),o}))),e.contextTracker&&(r.context=e.contextTracker),e.dialect&&(r.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(r.strict=e.strict),e.wrap&&(r.wrappers=r.wrappers.concat(e.wrap)),null!=e.bufferLength&&(r.bufferLength=e.bufferLength),r}},{key:"hasWrappers",value:function(){return this.wrappers.length>0}},{key:"getName",value:function(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(e){var t=this.dynamicPrecedences;return null==t?0:t[e]||0}},{key:"parseDialect",value:function(e){var t=Object.keys(this.dialects),n=t.map((function(){return!1}));if(e){var r,i=yi(e.split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.indexOf(o);a>=0&&(n[a]=!0)}}catch(e){i.e(e)}finally{i.f()}}for(var s=null,c=0;c<t.length;c++)if(!n[c])for(var l,u=this.dialects[t[c]];65535!=(l=this.data[u++]);)(s||(s=new Uint8Array(this.maxTerm+1)))[l]=1;return new a1(e,n,s)}}],[{key:"deserialize",value:function(e){return new n(e)}}]),n}();function c1(e,t){return e[t]|e[t+1]<<16}function l1(e){if(e.external){var t=e.extend?1:0;return function(n,r){return e.external(n,r)<<1|t}}return e.get}var u1=SQ({String:UQ.string,Number:UQ.number,"True False":UQ.bool,PropertyName:UQ.propertyName,Null:UQ.null,",":UQ.separator,"[ ]":UQ.squareBracket,"{ }":UQ.brace}),f1=s1.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[u1],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),d1=YQ.define({name:"json",parser:f1.configure({props:[pY.add({Object:kY({except:/^\s*\}/}),Array:kY({except:/^\s*\]/})}),SY.add({"Object Array":function(e){var t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});var h1="function"==typeof String.prototype.normalize?function(e){return e.normalize("NFKD")}:function(e){return e},v1=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;Ni(this,e),this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(r,i),this.bufferStart=r,this.normalize=o?function(e){return o(h1(e))}:h1,this.query=this.normalize(n)}return Di(e,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return MF(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var e=this.peek();if(e<0)return this.done=!0,this;var t=EF(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=AF(e);for(var r=this.normalize(t),i=0,o=n;;i++){var a=r.charCodeAt(i),s=this.match(a,o);if(i==r.length-1){if(s)return this.value=s,this;break}o==n&&i<t.length&&t.charCodeAt(i)==a&&o++}}}},{key:"match",value:function(e,t){for(var n=null,r=0;r<this.matches.length;r+=2){var i=this.matches[r],o=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?n={from:this.matches[r+1],to:t+1}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?n={from:t,to:t+1}:this.matches.push(1,t)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferStart)&&(n=null),n}}]),e}();"undefined"!=typeof Symbol&&(v1.prototype[Symbol.iterator]=function(){return this});var p1={from:-1,to:-1,match:/.*/.exec("")},m1="gm"+(null==/x/.unicode?"":"u"),g1=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length;if(Ni(this,e),this.text=t,this.to=o,this.curLine="",this.done=!1,this.value=p1,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new w1(t,n,r,i,o);this.re=new RegExp(n,m1+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=t.iter();var a=t.lineAt(i);this.curLineStart=a.from,this.matchPos=k1(t,i),this.getLine(this.curLineStart)}return Di(e,[{key:"getLine",value:function(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;var t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){var n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=k1(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}]),e}(),y1=new WeakMap,b1=function(){function e(t,n){Ni(this,e),this.from=t,this.text=n}return Di(e,[{key:"to",get:function(){return this.from+this.text.length}}],[{key:"get",value:function(t,n,r){var i=y1.get(t);if(!i||i.from>=r||i.to<=n){var o=new e(n,t.sliceString(n,r));return y1.set(t,o),o}if(i.from==n&&i.to==r)return i;var a=i.text,s=i.from;return s>n&&(a=t.sliceString(n,s)+a,s=n),i.to<r&&(a+=t.sliceString(i.to,r)),y1.set(t,new e(s,a)),new e(n,a.slice(n-s,r-s))}}]),e}(),w1=function(){function e(t,n,r,i,o){Ni(this,e),this.text=t,this.to=o,this.done=!1,this.value=p1,this.matchPos=k1(t,i),this.re=new RegExp(n,m1+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.flat=b1.get(t,i,this.chunkEnd(i+5e3))}return Di(e,[{key:"chunkEnd",value:function(e){return e>=this.to?this.to:this.text.lineAt(e).to}},{key:"next",value:function(){for(;;){var e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){var n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=k1(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=b1.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),e}();function k1(e,t){if(t>=e.length)return t;for(var n,r=e.lineAt(t);t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function x1(e){var t=o0("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(n){var r=e.state,i=r.doc.lineAt(r.selection.main.head),o=xi(n,5),a=o[1],s=o[2],c=o[3],l=o[4],u=c?+c.slice(1):0,f=s?+s:i.number;if(s&&l){var d=f/100;a&&(d=d*("-"==a?-1:1)+i.number/r.doc.lines),f=Math.round(r.doc.lines*d)}else s&&a&&(f=f*("-"==a?-1:1)+i.number);var h=r.doc.line(Math.max(1,Math.min(r.doc.lines,f))),v=VF.cursor(h.from+Math.max(0,Math.min(u,h.length)));e.dispatch({effects:[j1.of(!1),XJ.scrollIntoView(v.from,{y:"center"})],selection:v}),e.focus()}}return{dom:o0("form",{class:"cm-gotoLine",onkeydown:function(t){27==t.keyCode?(t.preventDefault(),e.dispatch({effects:j1.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:function(e){e.preventDefault(),n()}},o0("label",e.state.phrase("Go to line"),": ",t)," ",o0("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(g1.prototype[Symbol.iterator]=w1.prototype[Symbol.iterator]=function(){return this});var j1=kV.define(),S1=XF.define({create:function(){return!0},update:function(e,t){var n,r=yi(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(j1)&&(e=i.value)}}catch(e){r.e(e)}finally{r.f()}return e},provide:function(e){return bG.from(e,(function(e){return e?x1:null}))}}),C1=XJ.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),$1={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},_1=UF.define({combine:function(e){return RV(e,$1,{highlightWordAroundCursor:function(e,t){return e||t},minSelectionLength:Math.min,maxMatches:Math.min})}});var O1=uH.mark({class:"cm-selectionMatch"}),M1=uH.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function E1(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==EV.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==EV.Word)}var A1=RH.fromClass(function(){function e(t){Ni(this,e),this.decorations=this.getDeco(t)}return Di(e,[{key:"update",value:function(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t=e.state.facet(_1),n=e.state,r=n.selection;if(r.ranges.length>1)return uH.none;var i,o=r.main,a=null;if(o.empty){if(!t.highlightWordAroundCursor)return uH.none;var s=n.wordAt(o.head);if(!s)return uH.none;a=n.charCategorizer(o.head),i=n.sliceDoc(s.from,s.to)}else{var c=o.to-o.from;if(c<t.minSelectionLength||c>200)return uH.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),!E1(a=n.charCategorizer(o.head),n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==EV.Word&&e(t.sliceDoc(r-1,r))==EV.Word}(a,n,o.from,o.to))return uH.none}else if(!(i=n.sliceDoc(o.from,o.to).trim()))return uH.none}var l,u=[],f=yi(e.visibleRanges);try{for(f.s();!(l=f.n()).done;)for(var d=l.value,h=new v1(n.doc,i,d.from,d.to);!h.next().done;){var v=h.value,p=v.from,m=v.to;if((!a||E1(a,n,p,m))&&(o.empty&&p<=o.from&&m>=o.to?u.push(M1.range(p,m)):(p>=o.to||m<=o.from)&&u.push(O1.range(p,m)),u.length>t.maxMatches))return uH.none}}catch(e){f.e(e)}finally{f.f()}return uH.set(u)}}]),e}(),{decorations:function(e){return e.decorations}}),P1=XJ.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var T1=UF.define({combine:function(e){return RV(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:function(e){return new l2(e)},scrollToMatch:function(e){return XJ.scrollIntoView(e)}})}});function R1(e){return e?[T1.of(e),p2]:p2}var N1=function(){function e(t){Ni(this,e),this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,m1),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}return Di(e,[{key:"unquote",value:function(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"}))}},{key:"eq",value:function(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}},{key:"create",value:function(){return this.regexp?new F1(this):new z1(this)}},{key:"getCursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=e.doc?e:TV.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?L1(this,r,t,n):D1(this,r,t,n)}}]),e}(),I1=Di((function e(t){Ni(this,e),this.spec=t}));function D1(e,t,n,r){return new v1(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:function(e){return e.toLowerCase()},e.wholeWord?function(e,t){return function(n,r,i,o){return(o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=e.sliceString(o,Math.min(e.length,r+2))),!(t(B1(i,n-o))==EV.Word&&t(q1(i,n-o))==EV.Word||t(q1(i,r-o))==EV.Word&&t(B1(i,r-o))==EV.Word)}}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}var z1=function(e){_i(n,I1);var t=Mi(n);function n(e){return Ni(this,n),t.call(this,e)}return Di(n,[{key:"nextMatch",value:function(e,t,n){var r=D1(this.spec,e,n,e.doc.length).nextOverlapping();return r.done&&(r=D1(this.spec,e,0,t).nextOverlapping()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(e,t,n){for(var r=n;;){for(var i=Math.max(t,r-1e4-this.spec.unquoted.length),o=D1(this.spec,e,i,r),a=null;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(i==t)return null;r-=1e4}}},{key:"prevMatch",value:function(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}},{key:"getReplacement",value:function(e){return this.spec.unquote(this.spec.replace)}},{key:"matchAll",value:function(e,t){for(var n=D1(this.spec,e,0,e.doc.length),r=[];!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var i=D1(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}();function L1(e,t,n,r){return new g1(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),function(e,t,n){return!n[0].length||(i(B1(n.input,n.index))!=EV.Word||i(q1(n.input,n.index))!=EV.Word)&&(i(q1(n.input,n.index+n[0].length))!=EV.Word||i(B1(n.input,n.index+n[0].length))!=EV.Word)}):void 0},n,r);var i}function B1(e,t){return e.slice(SF(e,t,!1),t)}function q1(e,t){return e.slice(t,SF(e,t))}var F1=function(e){_i(n,I1);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"nextMatch",value:function(e,t,n){var r=L1(this.spec,e,n,e.doc.length).next();return r.done&&(r=L1(this.spec,e,0,t).next()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(e,t,n){for(var r=1;;r++){for(var i=Math.max(t,n-1e4*r),o=L1(this.spec,e,i,n),a=null;!o.next().done;)a=o.value;if(a&&(i==t||a.from>i+10))return a;if(i==t)return null}}},{key:"prevMatch",value:function(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}},{key:"getReplacement",value:function(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(function(t,n){return"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n<e.match.length?e.match[n]:t})))}},{key:"matchAll",value:function(e,t){for(var n=L1(this.spec,e,0,e.doc.length),r=[];!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var i=L1(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));!i.next().done;)r(i.value.from,i.value.to)}}]),n}(),V1=kV.define(),W1=kV.define(),H1=XF.define({create:function(e){return new U1(r2(e).create(),null)},update:function(e,t){var n,r=yi(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(V1)?e=new U1(i.value.create(),e.panel):i.is(W1)&&(e=new U1(e.query,i.value?n2:null))}}catch(e){r.e(e)}finally{r.f()}return e},provide:function(e){return bG.from(e,(function(e){return e.panel}))}}),U1=Di((function e(t,n){Ni(this,e),this.query=t,this.panel=n})),J1=uH.mark({class:"cm-searchMatch"}),K1=uH.mark({class:"cm-searchMatch cm-searchMatch-selected"}),G1=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.decorations=this.highlight(t.state.field(H1))}return Di(e,[{key:"update",value:function(e){var t=e.state.field(H1);(t!=e.startState.field(H1)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}},{key:"highlight",value:function(e){var t=e.query;if(!e.panel||!t.spec.valid)return uH.none;for(var n=this.view,r=new BV,i=0,o=n.visibleRanges,a=o.length;i<a;i++){for(var s=o[i],c=s.from,l=s.to;i<a-1&&l>o[i+1].from-500;)l=o[++i].to;t.highlight(n.state,c,l,(function(e,t){var i=n.state.selection.ranges.some((function(n){return n.from==e&&n.to==t}));r.add(e,t,i?K1:J1)}))}return r.finish()}}]),e}(),{decorations:function(e){return e.decorations}});function Q1(e){return function(t){var n=t.state.field(H1,!1);return n&&n.query.spec.valid?e(t,n):a2(t)}}var Y1=Q1((function(e,t){var n=t.query,r=e.state.selection.main.to,i=n.nextMatch(e.state,r,r);if(!i)return!1;var o=VF.single(i.from,i.to),a=e.state.facet(T1);return e.dispatch({selection:o,effects:[h2(e,i),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),o2(e),!0})),X1=Q1((function(e,t){var n=t.query,r=e.state,i=r.selection.main.from,o=n.prevMatch(r,i,i);if(!o)return!1;var a=VF.single(o.from,o.to),s=e.state.facet(T1);return e.dispatch({selection:a,effects:[h2(e,o),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),o2(e),!0})),Z1=Q1((function(e,t){var n=t.query.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:VF.create(n.map((function(e){return VF.range(e.from,e.to)}))),userEvent:"select.search.matches"}),!0)})),e2=Q1((function(e,t){var n=t.query,r=e.state,i=r.selection.main,o=i.from,a=i.to;if(r.readOnly)return!1;var s=n.nextMatch(r,o,o);if(!s)return!1;var c,l,u=[],f=[];if(s.from==o&&s.to==a&&(l=r.toText(n.getReplacement(s)),u.push({from:s.from,to:s.to,insert:l}),s=n.nextMatch(r,s.from,s.to),f.push(XJ.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),s){var d=0==u.length||u[0].from>=s.to?0:s.to-s.from-l.length;c=VF.single(s.from-d,s.to-d),f.push(h2(e,s)),f.push(r.facet(T1).scrollToMatch(c.main,e))}return e.dispatch({changes:u,selection:c,effects:f,userEvent:"input.replace"}),!0})),t2=Q1((function(e,t){var n=t.query;if(e.state.readOnly)return!1;var r=n.matchAll(e.state,1e9).map((function(e){return{from:e.from,to:e.to,insert:n.getReplacement(e)}}));if(!r.length)return!1;var i=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:XJ.announce.of(i),userEvent:"input.replace.all"}),!0}));function n2(e){return e.state.facet(T1).createPanel(e)}function r2(e,t){var n,r,i,o,a,s=e.selection.main,c=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!c)return t;var l=e.facet(T1);return new N1({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:l.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:l.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:l.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:l.wholeWord})}function i2(e){var t=pG(e,n2);return t&&t.dom.querySelector("[main-field]")}function o2(e){var t=i2(e);t&&t==e.root.activeElement&&t.select()}var a2=function(e){var t=e.state.field(H1,!1);if(t&&t.panel){var n=i2(e);if(n&&n!=e.root.activeElement){var r=r2(e.state,t.query.spec);r.valid&&e.dispatch({effects:V1.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[W1.of(!0),t?V1.of(r2(e.state,t.query.spec)):kV.appendConfig.of(p2)]});return!0},s2=function(e){var t=e.state.field(H1,!1);if(!t||!t.panel)return!1;var n=pG(e,n2);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:W1.of(!1)}),!0},c2=[{key:"Mod-f",run:a2,scope:"editor search-panel"},{key:"F3",run:Y1,shift:X1,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Y1,shift:X1,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:s2,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(e){var t=e.state,n=e.dispatch,r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;for(var i=r.main,o=i.from,a=i.to,s=[],c=0,l=new v1(t.doc,t.sliceDoc(o,a));!l.next().done;){if(s.length>1e3)return!1;l.value.from==o&&(c=s.length),s.push(VF.range(l.value.from,l.value.to))}return n(t.update({selection:VF.create(s,c),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(e){var t=pG(e,x1);if(!t){var n=[j1.of(!0)];null==e.state.field(S1,!1)&&n.push(kV.appendConfig.of([S1,C1])),e.dispatch({effects:n}),t=pG(e,x1)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:function(e){var t=e.state,n=e.dispatch,r=t.selection.ranges;if(r.some((function(e){return e.from===e.to})))return function(e){var t=e.state,n=e.dispatch,r=t.selection,i=VF.create(r.ranges.map((function(e){return t.wordAt(e.head)||VF.cursor(e.head)})),r.mainIndex);return!i.eq(r)&&(n(t.update({selection:i})),!0)}({state:t,dispatch:n});var i=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some((function(e){return t.sliceDoc(e.from,e.to)!=i})))return!1;var o=function(e,t){for(var n,r=e.selection,i=r.main,o=r.ranges,a=e.wordAt(i.head),s=a&&a.from==i.from&&a.to==i.to,c=function(n,r){if(r.next(),!r.done){if(n&&o.some((function(e){return e.from==r.value.from})))return l=n,u=r,0;if(s){var i=e.wordAt(r.value.from);if(!i||i.from!=r.value.from||i.to!=r.value.to)return l=n,u=r,0}return{v:r.value}}if(n)return{v:null};r=new v1(e.doc,t,0,Math.max(0,o[o.length-1].from-1)),l=n=!0,u=r},l=!1,u=new v1(e.doc,t,o[o.length-1].to);;)if(0!==(n=c(l,u))&&n)return n.v}(t,i);return!!o&&(n(t.update({selection:t.selection.addRange(VF.range(o.from,o.to),!1),effects:XJ.scrollIntoView(o.to)})),!0)},preventDefault:!0}],l2=function(){function e(t){var n=this;Ni(this,e),this.view=t;var r=this.query=t.state.field(H1).query.spec;function i(e,t,n){return o0("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=o0("input",{value:r.search,placeholder:u2(t,"Find"),"aria-label":u2(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=o0("input",{value:r.replace,placeholder:u2(t,"Replace"),"aria-label":u2(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=o0("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=o0("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=o0("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit}),this.dom=o0("div",{onkeydown:function(e){return n.keydown(e)},class:"cm-search"},[this.searchField,i("next",(function(){return Y1(t)}),[u2(t,"next")]),i("prev",(function(){return X1(t)}),[u2(t,"previous")]),i("select",(function(){return Z1(t)}),[u2(t,"all")]),o0("label",null,[this.caseField,u2(t,"match case")]),o0("label",null,[this.reField,u2(t,"regexp")]),o0("label",null,[this.wordField,u2(t,"by word")])].concat(Bi(t.state.readOnly?[]:[o0("br"),this.replaceField,i("replace",(function(){return e2(t)}),[u2(t,"replace")]),i("replaceAll",(function(){return t2(t)}),[u2(t,"replace all")])]),[o0("button",{name:"close",onclick:function(){return s2(t)},"aria-label":u2(t,"close"),type:"button"},["×"])]))}return Di(e,[{key:"commit",value:function(){var e=new N1({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:V1.of(e)}))}},{key:"keydown",value:function(e){!function(e,t,n){return fK(cK(e.state),t,e,n)}(this.view,e,"search-panel")?13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?X1:Y1)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),e2(this.view)):e.preventDefault()}},{key:"update",value:function(e){var t,n=yi(e.transactions);try{for(n.s();!(t=n.n()).done;){var r,i=yi(t.value.effects);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.is(V1)&&!o.value.eq(this.query)&&this.setQuery(o.value)}}catch(e){i.e(e)}finally{i.f()}}}catch(e){n.e(e)}finally{n.f()}}},{key:"setQuery",value:function(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(T1).top}}]),e}();function u2(e,t){return e.state.phrase(t)}var f2=30,d2=/[\s\.,:;?!]/;function h2(e,t){var n=t.from,r=t.to,i=e.state.doc.lineAt(n),o=e.state.doc.lineAt(r).to,a=Math.max(i.from,n-f2),s=Math.min(o,r+f2),c=e.state.sliceDoc(a,s);if(a!=i.from)for(var l=0;l<f2;l++)if(!d2.test(c[l+1])&&d2.test(c[l])){c=c.slice(l);break}if(s!=o)for(var u=c.length-1;u>c.length-f2;u--)if(!d2.test(c[u-1])&&d2.test(c[u])){c=c.slice(0,u);break}return XJ.announce.of("".concat(e.state.phrase("current match"),". ").concat(c," ").concat(e.state.phrase("on line")," ").concat(i.number,"."))}var v2=XJ.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),p2=[H1,iV.low(G1),v2],m2=function(){function e(t,n,r){Ni(this,e),this.state=t,this.pos=n,this.explicit=r,this.abortListeners=[]}return Di(e,[{key:"tokenBefore",value:function(e){for(var t=XQ(this.state).resolveInner(this.pos,-1);t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}},{key:"matchBefore",value:function(e){var t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(k2(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}]),e}();function g2(e){var t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),"[".concat(n?"\\w":"").concat(t.replace(/[^\w\s]/g,"\\$&"),"]")}function y2(e){var t=e.map((function(e){return"string"==typeof e?{label:e}:e})),n=t.every((function(e){return/^\w+$/.test(e.label)}))?[/\w*$/,/\w+$/]:function(e){var t,n=Object.create(null),r=Object.create(null),i=yi(e);try{for(i.s();!(t=i.n()).done;){var o=t.value.label;n[o[0]]=!0;for(var a=1;a<o.length;a++)r[o[a]]=!0}}catch(e){i.e(e)}finally{i.f()}var s=g2(n)+g2(r)+"*$";return[new RegExp("^"+s),new RegExp(s)]}(t),r=xi(n,2),i=r[0],o=r[1];return function(e){var n=e.matchBefore(o);return n||e.explicit?{from:n?n.from:e.pos,options:t,validFor:i}:null}}var b2=Di((function e(t,n,r,i){Ni(this,e),this.completion=t,this.source=n,this.match=r,this.score=i}));function w2(e){return e.selection.main.from}function k2(e,t){var n,r=e.source,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp("".concat(i?"^":"","(?:").concat(r,")").concat(o?"$":""),null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}var x2=yV.define();var j2=new WeakMap;function S2(e){if(!Array.isArray(e))return e;var t=j2.get(e);return t||j2.set(e,t=y2(e)),t}var C2=kV.define(),$2=kV.define(),_2=function(){function e(t){Ni(this,e),this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(var n=0;n<t.length;){var r=MF(t,n),i=AF(r);this.chars.push(r);var o=t.slice(n,n+i),a=o.toUpperCase();this.folded.push(MF(a==o?o.toLowerCase():a,0)),n+=i}this.astral=t.length!=this.chars.length}return Di(e,[{key:"ret",value:function(e,t){return this.score=e,this.matched=t,!0}},{key:"match",value:function(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return!1;var t=this.chars,n=this.folded,r=this.any,i=this.precise,o=this.byWord;if(1==t.length){var a=MF(e,0),s=AF(a),c=s==e.length?0:-100;if(a==t[0]);else{if(a!=n[0])return!1;c+=-200}return this.ret(c,[0,s])}var l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);var u=t.length,f=0;if(l<0){for(var d=0,h=Math.min(e.length,200);d<h&&f<u;){var v=MF(e,d);v!=t[f]&&v!=n[f]||(r[f++]=d),d+=AF(v)}if(f<u)return!1}for(var p=0,m=0,g=!1,y=0,b=-1,w=-1,k=/[a-z]/.test(e),x=!0,j=0,S=Math.min(e.length,200),C=0;j<S&&m<u;){var $=MF(e,j);l<0&&(p<u&&$==t[p]&&(i[p++]=j),y<u&&($==t[y]||$==n[y]?(0==y&&(b=j),w=j+1,y++):y=0));var _=void 0,O=$<255?$>=48&&$<=57||$>=97&&$<=122?2:$>=65&&$<=90?1:0:(_=EF($))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!j||1==O&&k||0==C&&0!=O)&&(t[m]==$||n[m]==$&&(g=!0)?o[m++]=j:o.length&&(x=!1)),C=O,j+=AF($)}return m==u&&0==o[0]&&x?this.result((g?-200:0)-100,o,e):y==u&&0==b?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):y==u?this.ret(-900-e.length,[b,w]):m==u?this.result((g?-200:0)-100-700+(x?0:-1100),o,e):2!=t.length&&this.result((r[0]?-700:0)-200-1100,r,e)}},{key:"result",value:function(e,t,n){var r,i=[],o=0,a=yi(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,c=s+(this.astral?AF(MF(n,s)):1);o&&i[o-1]==s?i[o-1]=c:(i[o++]=s,i[o++]=c)}}catch(e){a.e(e)}finally{a.f()}return this.ret(e-n.length,i)}}]),e}(),O2=UF.define({combine:function(e){return RV(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:function(){return""},optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:E2,compareCompletions:function(e,t){return e.label.localeCompare(t.label)},interactionDelay:75,updateSyncTime:100},{defaultKeymap:function(e,t){return e&&t},closeOnBlur:function(e,t){return e&&t},icons:function(e,t){return e&&t},tooltipClass:function(e,t){return function(n){return M2(e(n),t(n))}},optionClass:function(e,t){return function(n){return M2(e(n),t(n))}},addToOptions:function(e,t){return e.concat(t)}})}});function M2(e,t){return e?t?e+" "+t:e:t}function E2(e,t,n,r,i,o){var a,s,c=e.textDirection==JH.RTL,l=c,u=!1,f="top",d=t.left-i.left,h=i.right-t.right,v=r.right-r.left,p=r.bottom-r.top;if(l&&d<Math.min(v,h)?l=!1:!l&&h<Math.min(v,d)&&(l=!0),v<=(l?d:h))a=Math.max(i.top,Math.min(n.top,i.bottom-p))-t.top,s=Math.min(400,l?d:h);else{u=!0,s=Math.min(400,(c?t.right:i.right-t.left)-30);var m=i.bottom-t.bottom;m>=p||m>t.top?a=n.bottom-t.top:(f="bottom",a=t.bottom-n.top)}var g=(t.bottom-t.top)/o.offsetHeight,y=(t.right-t.left)/o.offsetWidth;return{style:"".concat(f,": ").concat(a/g,"px; max-width: ").concat(s/y,"px"),class:"cm-completionInfo-"+(u?c?"left-narrow":"right-narrow":l?"left":"right")}}function A2(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){var r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}var P2=function(){function e(t,n,r){var i=this;Ni(this,e),this.view=t,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:function(){return i.measureInfo()},write:function(e){return i.placeInfo(e)},key:this},this.space=null,this.currentClass="";var o=t.state.field(n),a=o.open,s=a.options,c=a.selected,l=t.state.facet(O2);this.optionContent=function(e){var t=e.addToOptions.slice();return e.icons&&t.push({render:function(e){var t,n=document.createElement("div");return n.classList.add("cm-completionIcon"),e.type&&(t=n.classList).add.apply(t,Bi(e.type.split(/\s+/g).map((function(e){return"cm-completionIcon-"+e})))),n.setAttribute("aria-hidden","true"),n},position:20}),t.push({render:function(e,t,n,r){var i=document.createElement("span");i.className="cm-completionLabel";for(var o=e.displayLabel||e.label,a=0,s=0;s<r.length;){var c=r[s++],l=r[s++];c>a&&i.appendChild(document.createTextNode(o.slice(a,c)));var u=i.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(o.slice(c,l))),u.className="cm-completionMatchedText",a=l}return a<o.length&&i.appendChild(document.createTextNode(o.slice(a))),i},position:50},{render:function(e){if(!e.detail)return null;var t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((function(e,t){return e.position-t.position})).map((function(e){return e.render}))}(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=A2(s.length,c,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(function(e){for(var r,o=t.state.field(n).open.options,a=e.target;a&&a!=i.dom;a=a.parentNode)if("LI"==a.nodeName&&(r=/-(\d+)$/.exec(a.id))&&+r[1]<o.length)return i.applyCompletion(t,o[+r[1]]),void e.preventDefault()})),this.dom.addEventListener("focusout",(function(e){var n=t.state.field(i.stateField,!1);n&&n.tooltip&&t.state.facet(O2).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:$2.of(null)})})),this.showOptions(s,o.id)}return Di(e,[{key:"mount",value:function(){this.updateSel()}},{key:"showOptions",value:function(e,t){var n=this;this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(function(){n.info&&n.view.requestMeasure(n.placeInfoReq)}))}},{key:"update",value:function(e){var t,n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){var i=n.open,o=i.options,a=i.selected,s=i.disabled;r.open&&r.open.options==o||(this.range=A2(o.length,a,e.state.facet(O2).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),s!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}},{key:"updateTooltipClass",value:function(e){var t=this.tooltipClass(e);if(t!=this.currentClass){var n,r=yi(this.currentClass.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.dom.classList.remove(i)}}catch(e){r.e(e)}finally{r.f()}var o,a=yi(t.split(" "));try{for(a.s();!(o=a.n()).done;){var s=o.value;s&&this.dom.classList.add(s)}}catch(e){a.e(e)}finally{a.f()}this.currentClass=t}}},{key:"positioned",value:function(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}},{key:"updateSel",value:function(){var e=this,t=this.view.state.field(this.stateField),n=t.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=A2(n.options.length,n.selected,this.view.state.facet(O2).maxRenderedOptions),this.showOptions(n.options,t.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();var r=n.options[n.selected].completion,i=r.info;if(!i)return;var o="string"==typeof i?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then((function(n){n&&e.view.state.field(e.stateField,!1)==t&&e.addInfoPane(n,r)})).catch((function(t){return EH(e.view.state,t,"completion info")})):this.addInfoPane(o,r)}}},{key:"addInfoPane",value:function(e,t){this.destroyInfo();var n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{var r=e.dom,i=e.destroy;n.appendChild(r),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}},{key:"updateSelectedOption",value:function(e){for(var t=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}(this.list,t),t}},{key:"measureInfo",value:function(){var e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;var t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){var o=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(O2).positionInfo(this.view,t,r,n,i,this.dom)}},{key:"placeInfo",value:function(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}},{key:"createListBox",value:function(e,t,n){var r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(var i=null,o=n.from;o<n.to;o++){var a=e[o],s=a.completion,c=a.match,l=s.section;if(l){var u="string"==typeof l?l:l.name;if(u!=i&&(o>n.from||0==n.from))if(i=u,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else r.appendChild(document.createElement("completion-section")).textContent=u}var f=r.appendChild(document.createElement("li"));f.id=t+"-"+o,f.setAttribute("role","option");var d=this.optionClass(s);d&&(f.className=d);var h,v=yi(this.optionContent);try{for(v.s();!(h=v.n()).done;){var p=(0,h.value)(s,this.view.state,this.view,c);p&&f.appendChild(p)}}catch(e){v.e(e)}finally{v.f()}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}},{key:"destroyInfo",value:function(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}},{key:"destroy",value:function(){this.destroyInfo()}}]),e}();function T2(e,t){return function(n){return new P2(n,e,t)}}function R2(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}var N2=function(){function e(t,n,r,i,o,a){Ni(this,e),this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}return Di(e,[{key:"setSelected",value:function(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,z2(n,t),this.tooltip,this.timestamp,t,this.disabled)}},{key:"map",value:function(t){return new e(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}],[{key:"build",value:function(t,n,r,i,o){var a=function(e,t){var n,r=[],i=null,o=function(e){r.push(e);var t=e.completion.section;if(t){i||(i=[]);var n="string"==typeof t?t:t.name;i.some((function(e){return e.name==n}))||i.push("string"==typeof t?{name:n}:t)}},a=yi(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.hasResult()){var c=s.result.getMatch;if(!1===s.result.filter){var l,u=yi(s.result.options);try{for(u.s();!(l=u.n()).done;){var f=l.value;o(new b2(f,s.source,c?c(f):[],1e9-r.length))}}catch(e){u.e(e)}finally{u.f()}}else{var d,h=new _2(t.sliceDoc(s.from,s.to)),v=yi(s.result.options);try{for(v.s();!(d=v.n()).done;){var p=d.value;if(h.match(p.label)){var m=p.displayLabel?c?c(p,h.matched):[]:h.matched;o(new b2(p,s.source,m,h.score+(p.boost||0)))}}}catch(e){v.e(e)}finally{v.f()}}}}}catch(e){a.e(e)}finally{a.f()}if(i){var g,y=Object.create(null),b=0,w=yi(i.sort((function(e,t){var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.name<t.name?-1:1)})));try{for(w.s();!(g=w.n()).done;){var k=g.value;b-=1e5,y[k.name]=b}}catch(e){w.e(e)}finally{w.f()}var x,j=yi(r);try{for(j.s();!(x=j.n()).done;){var S=x.value,C=S.completion.section;C&&(S.score+=y["string"==typeof C?C:C.name])}}catch(e){j.e(e)}finally{j.f()}}var $,_=[],O=null,M=t.facet(O2).compareCompletions,E=yi(r.sort((function(e,t){return t.score-e.score||M(e.completion,t.completion)})));try{for(E.s();!($=E.n()).done;){var A=$.value,P=A.completion;!O||O.label!=P.label||O.detail!=P.detail||null!=O.type&&null!=P.type&&O.type!=P.type||O.apply!=P.apply||O.boost!=P.boost?_.push(A):R2(A.completion)>R2(O)&&(_[_.length-1]=A),O=A.completion}}catch(e){E.e(e)}finally{E.f()}return _}(t,n);if(!a.length)return i&&t.some((function(e){return 1==e.state}))?new e(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;var s=n.facet(O2).selectOnOpen?0:-1;if(i&&i.selected!=s&&-1!=i.selected)for(var c=i.options[i.selected].completion,l=0;l<a.length;l++)if(a[l].completion==c){s=l;break}return new e(a,z2(r,s),{pos:t.reduce((function(e,t){return t.hasResult()?Math.min(e,t.from):e}),1e8),create:J2,above:o.aboveCursor},i?i.timestamp:Date.now(),s,!1)}}]),e}(),I2=function(){function e(t,n,r){Ni(this,e),this.active=t,this.id=n,this.open=r}return Di(e,[{key:"update",value:function(t){var n=this,r=t.state,i=r.facet(O2),o=(i.override||r.languageDataAt("autocomplete",w2(r)).map(S2)).map((function(e){return(n.active.find((function(t){return t.source==e}))||new q2(e,n.active.some((function(e){return 0!=e.state}))?1:0)).update(t,i)}));o.length==this.active.length&&o.every((function(e,t){return e==n.active[t]}))&&(o=this.active);var a=this.open;a&&t.docChanged&&(a=a.map(t.changes)),t.selection||o.some((function(e){return e.hasResult()&&t.changes.touchesRange(e.from,e.to)}))||!function(e,t){if(e==t)return!0;for(var n=0,r=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;r<t.length&&!t[r].hasResult;)r++;var i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(o,this.active)?a=N2.build(o,r,this.id,a,i):a&&a.disabled&&!o.some((function(e){return 1==e.state}))&&(a=null),!a&&o.every((function(e){return 1!=e.state}))&&o.some((function(e){return e.hasResult()}))&&(o=o.map((function(e){return e.hasResult()?new q2(e.source,0):e})));var s,c=yi(t.effects);try{for(c.s();!(s=c.n()).done;){var l=s.value;l.is(W2)&&(a=a&&a.setSelected(l.value,this.id))}}catch(e){c.e(e)}finally{c.f()}return o==this.active&&a==this.open?this:new e(o,this.id,a)}},{key:"tooltip",get:function(){return this.open?this.open.tooltip:null}},{key:"attrs",get:function(){return this.open?this.open.attrs:D2}}],[{key:"start",value:function(){return new e(L2,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}}]),e}();var D2={"aria-autocomplete":"list"};function z2(e,t){var n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}var L2=[];function B2(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}var q2=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;Ni(this,e),this.source=t,this.state=n,this.explicitPos=r}return Di(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=B2(t),i=this;r?i=i.handleUserEvent(t,r,n):t.docChanged?i=i.handleChange(t):t.selection&&0!=i.state&&(i=new e(i.source,0));var o,a=yi(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(C2))i=new e(i.source,1,s.value?w2(t.state):-1);else if(s.is($2))i=new e(i.source,0);else if(s.is(V2)){var c,l=yi(s.value);try{for(l.s();!(c=l.n()).done;){var u=c.value;u.source==i.source&&(i=u)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(t,n,r){return"delete"!=n&&r.activateOnTyping?new e(this.source,1):this.map(t.changes)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(w2(t.startState))?new e(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty||this.explicitPos<0?this:new e(this.source,this.state,t.mapPos(this.explicitPos))}}]),e}(),F2=function(e){_i(n,q2);var t=Mi(n);function n(e,r,i,o,a){var s;return Ni(this,n),(s=t.call(this,e,2,r)).result=i,s.from=o,s.to=a,s}return Di(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(e,t,r){var i,o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=w2(e.state);if((this.explicitPos<0?s<=o:s<this.from)||s>a||"delete"==t&&w2(e.startState)==this.from)return new q2(this.source,"input"==t&&r.activateOnTyping?1:0);var c,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;var i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):k2(e,!0).test(i)}(this.result.validFor,e.state,o,a)?new n(this.source,l,this.result,o,a):this.result.update&&(c=this.result.update(this.result,o,a,new m2(e.state,s,l>=0)))?new n(this.source,l,c,c.from,null!==(i=c.to)&&void 0!==i?i:w2(e.state)):new q2(this.source,1,l)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(this.from,this.to)?new q2(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty?this:new n(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}]),n}();var V2=kV.define({map:function(e,t){return e.map((function(e){return e.map(t)}))}}),W2=kV.define(),H2=XF.define({create:function(){return I2.start()},update:function(e,t){return e.update(t)},provide:function(e){return[oG.from(e,(function(e){return e.tooltip})),XJ.contentAttributes.from(e,(function(e){return e.attrs}))]}});function U2(e,t){var n=t.completion.apply||t.completion.label,r=e.state.field(H2).active.find((function(e){return e.source==t.source}));return r instanceof F2&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){var i=e.selection.main,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},e.changeByRange((function(s){return s!=i&&n!=r&&e.sliceDoc(s.from+o,s.from+a)!=e.sliceDoc(n,r)?{range:s}:{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:t},range:VF.cursor(s.from+o+t.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:x2.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}var J2=T2(H2,U2);function K2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(H2,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(O2).interactionDelay)return!1;var i,o=1;"page"==t&&(i=dG(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));var a=r.open.options.length,s=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:W2.of(s)}),!0}}var G2=Di((function e(t,n){Ni(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0})),Q2=RH.fromClass(function(){function e(t){Ni(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=yi(t.state.field(H2).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;1==i.state&&this.startQuery(i)}}catch(e){r.e(e)}finally{r.f()}}return Di(e,[{key:"update",value:function(e){var t=this,n=e.state.field(H2);if(e.selectionSet||e.docChanged||e.startState.field(H2)!=n){for(var r=e.transactions.some((function(e){return(e.selection||e.docChanged)&&!B2(e)})),i=0;i<this.running.length;i++){var o=this.running[i];if(r||o.updates.length+e.transactions.length>50&&Date.now()-o.time>1e3){var a,s=yi(o.context.abortListeners);try{for(s.s();!(a=s.n()).done;){var c=a.value;try{c()}catch(e){EH(this.view.state,e)}}}catch(e){s.e(e)}finally{s.f()}o.context.abortListeners=null,this.running.splice(i--,1)}else{var l;(l=o.updates).push.apply(l,Bi(e.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some((function(e){return 1==e.state&&!t.running.some((function(t){return t.active.source==e.source}))}))?setTimeout((function(){return t.startUpdate()}),50):-1,0!=this.composing){var u,f=yi(e.transactions);try{for(f.s();!(u=f.n()).done;){var d=u.value;"input"==B2(d)?this.composing=2:2==this.composing&&d.selection&&(this.composing=3)}}catch(e){f.e(e)}finally{f.f()}}}}},{key:"startUpdate",value:function(){var e=this;this.debounceUpdate=-1;var t,n=yi(this.view.state.field(H2).active);try{var r=function(){var n=t.value;1!=n.state||e.running.some((function(e){return e.active.source==n.source}))||e.startQuery(n)};for(n.s();!(t=n.n()).done;)r()}catch(e){n.e(e)}finally{n.f()}}},{key:"startQuery",value:function(e){var t=this,n=this.view.state,r=w2(n),i=new m2(n,r,e.explicitPos==r),o=new G2(e,i);this.running.push(o),Promise.resolve(e.source(i)).then((function(e){o.context.aborted||(o.done=e||null,t.scheduleAccept())}),(function(e){t.view.dispatch({effects:$2.of(null)}),EH(t.view.state,e)}))}},{key:"scheduleAccept",value:function(){var e=this;this.running.every((function(e){return void 0!==e.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return e.accept()}),this.view.state.facet(O2).updateSyncTime))}},{key:"accept",value:function(){var e,t=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(O2),i=function(i){var a=t.running[i];if(void 0===a.done)return o=i,0;if(t.running.splice(i--,1),a.done){var s,c=new F2(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(e=a.done.to)&&void 0!==e?e:w2(a.updates.length?a.updates[0].startState:t.view.state)),l=yi(a.updates);try{for(l.s();!(s=l.n()).done;){var u=s.value;c=c.update(u,r)}}catch(e){l.e(e)}finally{l.f()}if(c.hasResult())return n.push(c),o=i,0}var f=t.view.state.field(H2).active.find((function(e){return e.source==a.active.source}));if(f&&1==f.state)if(null==a.done){var d,h=new q2(a.active.source,0),v=yi(a.updates);try{for(v.s();!(d=v.n()).done;){var p=d.value;h=h.update(p,r)}}catch(e){v.e(e)}finally{v.f()}1!=h.state&&n.push(h)}else t.startQuery(f);o=i},o=0;o<this.running.length;o++)i(o);n.length&&this.view.dispatch({effects:V2.of(n)})}}]),e}(),{eventHandlers:{blur:function(e){var t=this.view.state.field(H2,!1);if(t&&t.tooltip&&this.view.state.facet(O2).closeOnBlur){var n=t.open&&dG(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||this.view.dispatch({effects:$2.of(null)})}},compositionstart:function(){this.composing=1},compositionend:function(){var e=this;3==this.composing&&setTimeout((function(){return e.view.dispatch({effects:C2.of(!1)})}),20),this.composing=0}}}),Y2=XJ.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"".concat(400,"px"),boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"".concat(30,"px")},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"".concat(30,"px")},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"''"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),X2={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Z2=kV.define({map:function(e,t){var n=t.mapPos(e,-1,TF.TrackAfter);return null==n?void 0:n}}),e3=new(function(e){_i(n,NV);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n)}());e3.startSide=1,e3.endSide=-1;var t3=XF.define({create:function(){return LV.empty},update:function(e,t){if(t.selection){var n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:function(e){return e>=n.from&&e<=n.to}})}e=e.map(t.changes);var r,i=yi(t.effects);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.is(Z2)&&(e=e.update({add:[e3.range(o.value,o.value+1)]}))}}catch(e){i.e(e)}finally{i.f()}return e}});var n3="()[]{}<>";function r3(e){for(var t=0;t<n3.length;t+=2)if(n3.charCodeAt(t)==e)return n3.charAt(t+1);return EF(e<128?e:e+1)}function i3(e,t){return e.languageDataAt("closeBrackets",t)[0]||X2}var o3="object"==("undefined"==typeof navigator?"undefined":Wi(navigator))&&/Android\b/.test(navigator.userAgent),a3=XJ.inputHandler.of((function(e,t,n,r){if((o3?e.composing:e.compositionStarted)||e.state.readOnly)return!1;var i=e.state.selection.main;if(r.length>2||2==r.length&&1==AF(MF(r,0))||t!=i.from||n!=i.to)return!1;var o=function(e,t){var n,r=i3(e,e.selection.main.head),i=r.brackets||X2.brackets,o=yi(i);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=r3(MF(a,0));if(t==a)return s==a?d3(e,a,i.indexOf(a+a+a)>-1,r):u3(e,a,s,r.before||X2.before);if(t==s&&c3(e,e.selection.main.from))return f3(e,a,s)}}catch(e){o.e(e)}finally{o.f()}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)})),s3=[{key:"Backspace",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=i3(t,t.selection.main.head).brackets||X2.brackets,i=null,o=t.changeByRange((function(e){if(e.empty){var n,o=function(e,t){var n=e.sliceString(t-2,t);return AF(MF(n,0))==n.length?n:n.slice(1)}(t.doc,e.head),a=yi(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s==o&&l3(t.doc,e.head)==r3(MF(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:VF.cursor(e.head-s.length)}}}catch(e){a.e(e)}finally{a.f()}}return{range:i=e}}));return i||n(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function c3(e,t){var n=!1;return e.field(t3).between(0,e.doc.length,(function(e){e==t&&(n=!0)})),n}function l3(e,t){var n=e.sliceString(t,t+2);return n.slice(0,AF(MF(n,0)))}function u3(e,t,n,r){var i=null,o=e.changeByRange((function(o){if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:Z2.of(o.to+t.length),range:VF.range(o.anchor+t.length,o.head+t.length)};var a=l3(e.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:Z2.of(o.head+t.length),range:VF.cursor(o.head+t.length)}:{range:i=o}}));return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function f3(e,t,n){var r=null,i=e.changeByRange((function(t){return t.empty&&l3(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:VF.cursor(t.head+n.length)}:r={range:t}}));return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function d3(e,t,n,r){var i=r.stringPrefixes||X2.stringPrefixes,o=null,a=e.changeByRange((function(r){if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Z2.of(r.to+t.length),range:VF.range(r.anchor+t.length,r.head+t.length)};var a,s=r.head,c=l3(e.doc,s);if(c==t){if(h3(e,s))return{changes:{insert:t+t,from:s},effects:Z2.of(s+t.length),range:VF.cursor(s+t.length)};if(c3(e,s)){var l=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+l.length,insert:l},range:VF.cursor(s+l.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=v3(e,s-2*t.length,i))>-1&&h3(e,a))return{changes:{insert:t+t+t+t,from:s},effects:Z2.of(s+t.length),range:VF.cursor(s+t.length)};if(e.charCategorizer(s)(c)!=EV.Word&&v3(e,s,i)>-1&&!function(e,t,n,r){for(var i=XQ(e).resolveInner(t,-1),o=r.reduce((function(e,t){return Math.max(e,t.length)}),0),a=0;a<5;a++){var s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=s.indexOf(n);if(!c||c>-1&&r.indexOf(s.slice(0,c))>-1){for(var l=i.firstChild;l&&l.from==i.from&&l.to-l.from>n.length+c;){if(e.sliceDoc(l.to-n.length,l.to)==n)return!1;l=l.firstChild}return!0}var u=i.to==t&&i.parent;if(!u)break;i=u}return!1}(e,s,t,i))return{changes:{insert:t+t,from:s},effects:Z2.of(s+t.length),range:VF.cursor(s+t.length)}}return{range:o=r}}));return o?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function h3(e,t){var n=XQ(e).resolveInner(t+1);return n.parent&&n.from==t}function v3(e,t,n){var r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=EV.Word)return t;var i,o=yi(n);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=t-a.length;if(e.sliceDoc(s,t)==a&&r(e.sliceDoc(s-1,s))!=EV.Word)return s}}catch(e){o.e(e)}finally{o.f()}return-1}function p3(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[H2,O2.of(e),Q2,g3,Y2]}var m3=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(H2,!1)&&(e.dispatch({effects:C2.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(H2,!1);return!(!t||!t.active.some((function(e){return 0!=e.state})))&&(e.dispatch({effects:$2.of(null)}),!0)}},{key:"ArrowDown",run:K2(!0)},{key:"ArrowUp",run:K2(!1)},{key:"PageDown",run:K2(!0,"page")},{key:"PageUp",run:K2(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(H2,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(O2).interactionDelay)&&U2(e,t.open.options[t.open.selected])}}],g3=iV.highest(aK.computeN([O2],(function(e){return e.facet(O2).defaultKeymap?[m3]:[]})));function y3(e){go(e,"svelte-1oo7hnc",".jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);margin:0;border-top:var(--jse-panel-border);border-left:var(--jse-main-border);border-right:var(--jse-main-border);display:flex;gap:var(--jse-padding)}.jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc:last-child{border-bottom:var(--jse-main-border)}.jse-status-bar.svelte-1oo7hnc .jse-status-bar-info.svelte-1oo7hnc{padding:2px}")}function b3(e){var t,n,r;return{c:function(){t=So("div"),n=$o("Line: "),r=$o(e[0]),Po(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(e,i){ko(e,t,i),mo(t,n),mo(t,r)},p:function(e,t){1&t&&Io(r,e[0])},d:function(e){e&&xo(t)}}}function w3(e){var t,n,r;return{c:function(){t=So("div"),n=$o("Column: "),r=$o(e[1]),Po(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(e,i){ko(e,t,i),mo(t,n),mo(t,r)},p:function(e,t){2&t&&Io(r,e[1])},d:function(e){e&&xo(t)}}}function k3(e){var t,n,r,i;return{c:function(){t=So("div"),n=$o("Selection: "),r=$o(e[2]),i=$o(" characters"),Po(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(e,o){ko(e,t,o),mo(t,n),mo(t,r),mo(t,i)},p:function(e,t){4&t&&Io(r,e[2])},d:function(e){e&&xo(t)}}}function x3(e){var t,n,r,i=void 0!==e[0]&&b3(e),o=void 0!==e[1]&&w3(e),a=void 0!==e[2]&&e[2]>0&&k3(e);return{c:function(){t=So("div"),i&&i.c(),n=_o(),o&&o.c(),r=_o(),a&&a.c(),Po(t,"class","jse-status-bar svelte-1oo7hnc")},m:function(e,s){ko(e,t,s),i&&i.m(t,null),mo(t,n),o&&o.m(t,null),mo(t,r),a&&a.m(t,null)},p:function(e,s){var c=xi(s,1)[0];void 0!==e[0]?i?i.p(e,c):((i=b3(e)).c(),i.m(t,n)):i&&(i.d(1),i=null),void 0!==e[1]?o?o.p(e,c):((o=w3(e)).c(),o.m(t,r)):o&&(o.d(1),o=null),void 0!==e[2]&&e[2]>0?a?a.p(e,c):((a=k3(e)).c(),a.m(t,null)):a&&(a.d(1),a=null)},i:Hi,o:Hi,d:function(e){e&&xo(t),i&&i.d(),o&&o.d(),a&&a.d()}}}function j3(e,t,n){var r,i,o,a,s,c=t.editorState;return e.$$set=function(e){"editorState"in e&&n(3,c=e.editorState)},e.$$.update=function(){var t,l,u;8&e.$$.dirty&&n(4,r=null===(t=c)||void 0===t||null===(t=t.selection)||void 0===t||null===(t=t.main)||void 0===t?void 0:t.head);24&e.$$.dirty&&n(5,i=null===(l=c)||void 0===l||null===(l=l.doc)||void 0===l?void 0:l.lineAt(r));(32&e.$$.dirty&&n(0,o=i?i.number:void 0),48&e.$$.dirty&&n(1,a=i?r-i.from+1:void 0),8&e.$$.dirty)&&n(2,s=null===(u=c)||void 0===u||null===(u=u.selection)||void 0===u||null===(u=u.ranges)||void 0===u?void 0:u.reduce((function(e,t){return e+t.to-t.from}),0))},[o,a,s,c,r,i]}var S3=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,j3,x3,Xi,{editorState:3},y3),r}return Di(n)}(),C3=HY.define([{tag:UQ.propertyName,color:"var(--jse-key-color)"},{tag:UQ.number,color:"var(--jse-value-color-number)"},{tag:UQ.bool,color:"var(--jse-value-color-boolean)"},{tag:UQ.string,color:"var(--jse-value-color-string)"},{tag:UQ.keyword,color:"var(--jse-value-color-null)"}]),$3=GY(C3),_3=C3.style;function O3(e){var t=e.selection.main.head;return e.doc.lineAt(t)}function M3(e,t){var n=0;e:for(var r=0;r<e.length;r++)switch(e[r]){case" ":n+=1;continue e;case"\t":n+=t-n%t;continue e;case"\r":continue e;default:break e}return n}C3.style=function(e){return _3(e||[])};var E3=UF.define({combine:function(e){return RV(e,{highlightActiveBlock:!0,hideFirstIndent:!1,markerType:"fullScope",thickness:1})}}),A3=function(){function e(t,n,r,i){Ni(this,e),this.lines=t,this.state=n,this.map=new Map,this.unitWidth=r,this.markerType=i;var o,a=yi(this.lines);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.add(s)}}catch(e){a.e(e)}finally{a.f()}this.state.facet(E3).highlightActiveBlock&&this.findAndSetActiveLines()}return Di(e,[{key:"has",value:function(e){return this.map.has("number"==typeof e?e:e.number)}},{key:"get",value:function(e){var t=this.map.get("number"==typeof e?e:e.number);if(!t)throw new Error("Line not found in indentation map");return t}},{key:"set",value:function(e,t,n){var r=!e.text.trim().length,i={line:e,col:t,level:n,empty:r};return this.map.set(i.line.number,i),i}},{key:"add",value:function(e){if(this.has(e))return this.get(e);if(!e.length||!e.text.trim().length){if(1===e.number)return this.set(e,0,0);if(e.number===this.state.doc.lines){var t=this.closestNonEmpty(e,-1);return this.set(e,0,t.level)}var n=this.closestNonEmpty(e,-1),r=this.closestNonEmpty(e,1);return n.level>=r.level&&"codeOnly"!==this.markerType?this.set(e,0,n.level):n.empty&&0===n.level&&0!==r.level?this.set(e,0,0):r.level>n.level?this.set(e,0,n.level+1):this.set(e,0,r.level)}var i=M3(e.text,this.state.tabSize),o=Math.floor(i/this.unitWidth);return this.set(e,i,o)}},{key:"closestNonEmpty",value:function(e,t){for(var n=e.number+t;-1===t?n>=1:n<=this.state.doc.lines;){if(this.has(n)){var r=this.get(n);if(!r.empty)return r}var i=this.state.doc.line(n);if(i.text.trim().length){var o=M3(i.text,this.state.tabSize),a=Math.floor(o/this.unitWidth);return this.set(i,o,a)}n+=t}var s=this.state.doc.line(-1===t?1:this.state.doc.lines);return this.set(s,0,0)}},{key:"findAndSetActiveLines",value:function(){var e=O3(this.state);if(this.has(e)){var t=this.get(e);if(this.has(t.line.number+1)){var n=this.get(t.line.number+1);n.level>t.level&&(t=n)}if(this.has(t.line.number-1)){var r=this.get(t.line.number-1);r.level>t.level&&(t=r)}if(0!==t.level){var i,o;for(t.active=t.level,i=t.line.number;i>1;i--)if(this.has(i-1)){var a=this.get(i-1);if(a.level<t.level)break;a.active=t.level}for(o=t.line.number;o<this.state.doc.lines;o++)if(this.has(o+1)){var s=this.get(o+1);if(s.level<t.level)break;s.active=t.level}}}}}]),e}();function P3(e){var t={light:"#F0F1F2",dark:"#2B3245",activeLight:"#E4E5E6",activeDark:"#3C445C"},n=t;return e&&(n=Object.assign(Object.assign({},t),e)),XJ.baseTheme({"&light":{"--indent-marker-bg-color":n.light,"--indent-marker-active-bg-color":n.activeLight},"&dark":{"--indent-marker-bg-color":n.dark,"--indent-marker-active-bg-color":n.activeDark},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}})}function T3(e,t,n,r,i){var o="repeating-linear-gradient(to right, var(".concat(e,") 0 ").concat(t,"px, transparent ").concat(t,"px ").concat(n,"ch)");return"".concat(o," ").concat(r*n,".5ch/calc(").concat(n*i,"ch - 1px) no-repeat")}function R3(e,t,n,r){var i=e.level,o=e.active;if(n&&0===i)return[];var a=n?1:0,s=[];if(void 0!==o){var c=o-a-1;c>0&&s.push(T3("--indent-marker-bg-color",r,t,a,c)),s.push(T3("--indent-marker-active-bg-color",r,t,o-1,1)),o!==i&&s.push(T3("--indent-marker-bg-color",r,t,o,i-o))}else s.push(T3("--indent-marker-bg-color",r,t,a,i-a));return s.join(",")}var N3=function(){function e(t){Ni(this,e),this.view=t,this.unitWidth=fY(t.state),this.currentLineNumber=O3(t.state).number,this.generate(t.state)}return Di(e,[{key:"update",value:function(e){var t=fY(e.state),n=t!==this.unitWidth;n&&(this.unitWidth=t);var r=O3(e.state).number,i=r!==this.currentLineNumber;this.currentLineNumber=r;var o=e.state.facet(E3).highlightActiveBlock&&i;(e.docChanged||e.viewportChanged||n||o)&&this.generate(e.state)}},{key:"generate",value:function(e){var t,n=new BV,r=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.state,r=new Set,i=yi(e.visibleRanges);try{for(i.s();!(t=i.n()).done;)for(var o=t.value,a=o.from,s=o.to,c=a;c<=s;){var l=n.doc.lineAt(c);r.has(l)||r.add(l),c=l.to+1}}catch(e){i.e(e)}finally{i.f()}return r}(this.view,e),i=e.facet(E3),o=i.hideFirstIndent,a=i.markerType,s=i.thickness,c=new A3(r,e,this.unitWidth,a),l=yi(r);try{for(l.s();!(t=l.n()).done;){var u=t.value,f=c.get(u.number);if(null==f?void 0:f.level){var d=R3(f,this.unitWidth,o,s);n.add(u.from,u.from,uH.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(d)}}))}}}catch(e){l.e(e)}finally{l.f()}this.decorations=n.finish()}}]),e}();function I3(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[E3.of(e),P3(e.colors),RH.fromClass(N3,{decorations:function(e){return e.decorations}})]}var D3=function(){function e(t){Ni(this,e),this.view=t,this.indentUnit=fY(t.state),this.initialPaddingLeft=null,this.generate(t.state)}return Di(e,[{key:"update",value:function(e){var t=fY(e.state);(t!==this.indentUnit||e.docChanged||e.viewportChanged)&&(this.indentUnit=t,this.generate(e.state))}},{key:"generate",value:function(e){var t=this,n=new BV;this.initialPaddingLeft?this.addStyleToBuilder(n,e,this.initialPaddingLeft):this.view.requestMeasure({read:function(r){var i=r.contentDOM.querySelector(".cm-line");i&&(t.initialPaddingLeft=window.getComputedStyle(i).getPropertyValue("padding-left"),t.addStyleToBuilder(n,e,t.initialPaddingLeft)),t.decorations=n.finish()}}),this.decorations=n.finish()}},{key:"addStyleToBuilder",value:function(e,t,n){var r,i=yi(this.getVisibleLines(t));try{for(i.s();!(r=i.n()).done;){var o=r.value,a=this.getIndentSize(o),s="calc(".concat(a+this.indentUnit,"ch + ").concat(n,")");e.add(o.from,o.from,uH.line({attributes:{style:"padding-left: ".concat(s,"; text-indent: -").concat(a+this.indentUnit,"ch;")}}))}}catch(e){i.e(e)}finally{i.f()}}},{key:"getVisibleLines",value:function(e){var t,n=new Set,r=null,i=yi(this.view.visibleRanges);try{for(i.s();!(t=i.n()).done;)for(var o=t.value,a=o.from,s=o.to,c=a;c<=s;){var l=e.doc.lineAt(c);r!==l&&(n.add(l),r=l),c=l.to+1}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"getIndentSize",value:function(e){return e.text.length-e.text.trimStart().length}}]),e}(),z3=[RH.fromClass(D3,{decorations:function(e){return e.decorations}})];function L3(e){go(e,"svelte-10sadri",'.jse-text-mode.svelte-10sadri.svelte-10sadri{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-10sadri.svelte-10sadri{border-top:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.jse-hidden.svelte-10sadri{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-activeLine,.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-10sadri .jse-contents .jse-loading-space.svelte-10sadri{flex:1}.jse-text-mode.svelte-10sadri .jse-contents .jse-loading.svelte-10sadri{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-10sadri .jse-contents.jse-preview.svelte-10sadri{flex:1;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function B3(e){var t=e.slice(),n=0===t[11].length;return t[98]=n,t}function q3(e){var t,n;return t=new lF({props:{readOnly:e[1],onFormat:e[17],onCompact:e[18],onSort:e[19],onTransform:e[20],onToggleSearch:e[21],onUndo:e[22],onRedo:e[23],canFormat:!e[98],canCompact:!e[98],canSort:!e[98],canTransform:!e[98],canUndo:e[12],canRedo:e[13],onRenderMenu:e[4]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2&n[0]&&(r.readOnly=e[1]),2048&n[0]&&(r.canFormat=!e[98]),2048&n[0]&&(r.canCompact=!e[98]),2048&n[0]&&(r.canSort=!e[98]),2048&n[0]&&(r.canTransform=!e[98]),4096&n[0]&&(r.canUndo=e[12]),8192&n[0]&&(r.canRedo=e[13]),16&n[0]&&(r.onRenderMenu=e[4]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function F3(e){var t;return{c:function(){(t=So("div")).innerHTML='<div class="jse-loading-space svelte-10sadri"></div> <div class="jse-loading svelte-10sadri">loading...</div>',Po(t,"class","jse-contents svelte-10sadri")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function V3(e){var t,n,r,i,o,a=e[97]&&W3(e),s=!e[97]&&H3(e);return{c:function(){t=So("div"),n=_o(),a&&a.c(),r=_o(),s&&s.c(),i=Oo(),Po(t,"class","jse-contents svelte-10sadri"),Bo(t,"jse-hidden",e[97])},m:function(c,l){ko(c,t,l),e[52](t),ko(c,n,l),a&&a.m(c,l),ko(c,r,l),s&&s.m(c,l),ko(c,i,l),o=!0},p:function(e,n){(!o||268438016&n[0])&&Bo(t,"jse-hidden",e[97]),e[97]?a?(a.p(e,n),2560&n[0]&&xa(a,1)):((a=W3(e)).c(),xa(a,1),a.m(r.parentNode,r)):a&&(wa(),ja(a,1,1,(function(){a=null})),ka()),e[97]?s&&(wa(),ja(s,1,1,(function(){s=null})),ka()):s?(s.p(e,n),2560&n[0]&&xa(s,1)):((s=H3(e)).c(),xa(s,1),s.m(i.parentNode,i))},i:function(e){o||(xa(a),xa(s),o=!0)},o:function(e){ja(a),ja(s),o=!1},d:function(o){o&&(xo(t),xo(n),xo(r),xo(i)),e[52](null),a&&a.d(o),s&&s.d(o)}}}function W3(e){var t,n,r,i,o,a=gM(e[11]||"",ds)+"";return t=new eI({props:{icon:YP,type:"error",message:"The JSON document is larger than ".concat(aF(ms,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(aF(e[11].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:e[24]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:e[25]},{text:"Cancel",title:"Cancel opening this large document.",onClick:e[26]}],onClose:e[5]}}),{c:function(){Ta(t.$$.fragment),n=_o(),r=So("div"),i=$o(a),Po(r,"class","jse-contents jse-preview svelte-10sadri")},m:function(e,a){Ra(t,e,a),ko(e,n,a),ko(e,r,a),mo(r,i),o=!0},p:function(e,n){var r={};2048&n[0]&&(r.message="The JSON document is larger than ".concat(aF(ms,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(aF(e[11].length,1024),".")),t.$set(r),(!o||2048&n[0])&&a!==(a=gM(e[11]||"",ds)+"")&&Io(i,a)},i:function(e){o||(xa(t.$$.fragment,e),o=!0)},o:function(e){ja(t.$$.fragment,e),o=!1},d:function(e){e&&(xo(n),xo(r)),Na(t,e)}}}function H3(e){var t,n,r,i,o,a=!e[14]&&e[0]&&wO(e[11]),s=e[3]&&U3(e),c=e[14]&&J3(e),l=a&&K3(e);return i=new fI({props:{validationErrors:e[10],selectError:e[27]}}),{c:function(){s&&s.c(),t=_o(),c&&c.c(),n=_o(),l&&l.c(),r=_o(),Ta(i.$$.fragment)},m:function(e,a){s&&s.m(e,a),ko(e,t,a),c&&c.m(e,a),ko(e,n,a),l&&l.m(e,a),ko(e,r,a),Ra(i,e,a),o=!0},p:function(e,o){e[3]?s?(s.p(e,o),8&o[0]&&xa(s,1)):((s=U3(e)).c(),xa(s,1),s.m(t.parentNode,t)):s&&(wa(),ja(s,1,1,(function(){s=null})),ka()),e[14]?c?(c.p(e,o),16384&o[0]&&xa(c,1)):((c=J3(e)).c(),xa(c,1),c.m(n.parentNode,n)):c&&(wa(),ja(c,1,1,(function(){c=null})),ka()),18433&o[0]&&(a=!e[14]&&e[0]&&wO(e[11])),a?l?(l.p(e,o),18433&o[0]&&xa(l,1)):((l=K3(e)).c(),xa(l,1),l.m(r.parentNode,r)):l&&(wa(),ja(l,1,1,(function(){l=null})),ka());var u={};1024&o[0]&&(u.validationErrors=e[10]),i.$set(u)},i:function(e){o||(xa(s),xa(c),xa(l),xa(i.$$.fragment,e),o=!0)},o:function(e){ja(s),ja(c),ja(l),ja(i.$$.fragment,e),o=!1},d:function(e){e&&(xo(t),xo(n),xo(r)),s&&s.d(e),c&&c.d(e),l&&l.d(e),Na(i,e)}}}function U3(e){var t,n;return t=new S3({props:{editorState:e[8]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};256&n[0]&&(r.editorState=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function J3(e){var t,n;return t=new eI({props:{type:"error",icon:YP,message:e[14].message,actions:e[15],onClick:e[29],onClose:e[5]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};16384&n[0]&&(r.message=e[14].message),32768&n[0]&&(r.actions=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function K3(e){var t,n;return t=new eI({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:BL,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:e[17]},{icon:JP,text:"No thanks",title:"Close this message",onClick:e[53]}],onClose:e[5]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.actions=[{icon:BL,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:e[17]},{icon:JP,text:"No thanks",title:"Close this message",onClick:e[53]}]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function G3(e){var t,n,r,i,o,a=e[2]&&q3(B3(e)),s=[V3,F3],c=[];function l(e,t){return 0===t?function(e){var t=e.slice(),n=t[28](t[11],t[9]);return t[97]=n,t}(e):e}return r=function(e,t){return e[16]?1:0}(e),i=c[r]=s[r](l(e,r)),{c:function(){t=So("div"),a&&a.c(),n=_o(),i.c(),Po(t,"class","jse-text-mode svelte-10sadri"),Bo(t,"no-main-menu",!e[2])},m:function(i,s){ko(i,t,s),a&&a.m(t,null),mo(t,n),c[r].m(t,null),e[54](t),o=!0},p:function(e,s){e[2]?a?(a.p(B3(e),s),4&s[0]&&xa(a,1)):((a=q3(B3(e))).c(),xa(a,1),a.m(t,n)):a&&(wa(),ja(a,1,1,(function(){a=null})),ka()),i.p(l(e,r),s),(!o||4&s[0])&&Bo(t,"no-main-menu",!e[2])},i:function(e){o||(xa(a),xa(i),o=!0)},o:function(e){ja(a),ja(i),o=!1},d:function(n){n&&xo(t),a&&a.d(),c[r].d(),e[54](null)}}}function Q3(e){return{from:e.from||0,to:e.to||0,message:e.message||"",actions:e.actions,severity:e.severity}}function Y3(e,t,n){var r,i,o,a,s,c,l=t.readOnly,u=t.mainMenuBar,f=t.statusBar,d=t.askToFormat,h=t.externalContent,v=t.externalSelection,p=t.indentation,m=t.tabSize,g=t.escapeUnicodeCharacters,y=t.parser,b=t.validator,w=t.validationParser,k=t.onChange,x=t.onChangeMode,j=t.onSelect,S=t.onError,C=t.onFocus,$=t.onBlur,_=t.onRenderMenu,O=t.onSortModal,M=t.onTransformModal,E=za("jsoneditor:TextMode"),A={key:"Mod-i",run:Q,shift:Y,preventDefault:!0},P="undefined"==typeof window;E("isSSR:",P);var T=!1,R=[],N=new aV,I=new aV,D=new aV,z=new aV,L=new aV,B=h,q=hO(B,p,y),F=g;Qo(ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return");case 2:try{s=re({target:o,initialText:be(q,T)?"":r.escapeValue(q),readOnly:l,indentation:p})}catch(e){console.error(e)}case 3:case"end":return e.stop()}}),e)})))),Yo((function(){s&&(E("Destroy CodeMirror editor"),s.destroy())}));var V=!1,W=!1,H=J$(),U=J$();function J(){s&&(E("focus"),s.focus())}var K=!1;function G(e){E("patch",e);var t=y.parse(q),n=lc(t,e),r=xc(t,e);return se({text:y.stringify(n,null,p)}),{json:n,previousJson:t,undo:r,redo:e}}function Q(){if(E("format"),l)return!1;try{var e=y.parse(q);return se({text:y.stringify(e,null,p)}),n(0,d=!0),!0}catch(e){S(e)}return!1}function Y(){if(E("compact"),l)return!1;try{var e=y.parse(q);return se({text:y.stringify(e)}),n(0,d=!1),!0}catch(e){S(e)}return!1}function X(){if(E("repair"),!l)try{se({text:Xl(q)}),n(51,we=_s),n(14,ke=null)}catch(e){S(e)}}function Z(e){var t=e.id,n=e.rootPath,r=e.onTransform,i=e.onClose;try{var o=y.parse(q);K=!0,M({id:t||U,json:o,rootPath:n||[],onTransform:function(e){r?r({operations:e,json:o,transformedJson:lc(o,e)}):(E("onTransform",e),G(e))},onClose:function(){K=!1,J(),i&&i()}})}catch(e){S(e)}}function ee(e,t){E("setSelection",{anchor:e,head:t}),s&&s.dispatch(s.state.update({selection:{anchor:e,head:t},scrollIntoView:!0}))}function te(e,t){if(1===t.state.selection.ranges.length){var n=t.state.selection.ranges[0],r=q.slice(n.from,n.to);if("{"===r||"["===r){var i=_c.parse(q),o=Object.keys(i.pointers).find((function(e){var t;return(null===(t=i.pointers[e].value)||void 0===t?void 0:t.pos)===n.from})),a=i.pointers[o];if(o&&a&&a.value&&a.valueEnd)E("pointer found, selecting inner contents of path:",o,a),ee(a.value.pos+1,a.valueEnd.pos-1)}}}function ne(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[x0.of({source:e,config:t}),k0,L0]}(xe,{delay:300})}function re(e){var t=e.target,r=e.initialText,i=e.readOnly,o=e.indentation;E("Create CodeMirror editor",{readOnly:i,indentation:o});var a,l,u=TV.create({doc:r,selection:ce(v),extensions:[aK.of([i0,A]),N.of(ne()),q0(),zG(),qG,zK(),zX(),VY(),kK(),[MK,EK],TV.allowMultipleSelections.of(!0),TV.transactionFilter.of((function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;var n=e.newDoc,r=e.newSelection.main.head,i=n.lineAt(r);if(r>i.from+xY)return e;var o=n.sliceString(i.from,r);if(!t.some((function(e){return e.test(o)})))return e;var a,s=e.state,c=-1,l=[],u=yi(s.selection.ranges);try{for(u.s();!(a=u.n()).done;){var f=a.value.head,d=s.doc.lineAt(f);if(d.from!=c){c=d.from;var h=hY(s,d.from);if(null!=h){var v=/^\s*/.exec(d.text)[0],p=dY(s,h);v!=p&&l.push({from:d.from,to:d.from+v.length,insert:p})}}}}catch(e){u.e(e)}finally{u.f()}return l.length?[e,{changes:l,sequential:!0}]:e})),GY(XY,{fallback:!0}),cX(),[a3,t3],p3(),JK(),QK(),VK,(l=[P1,A1],a&&l.push(_1.of(a)),l),aK.of([].concat(s3,Bi(r0),c2,iZ,RY,m3,w0)),$3,I3({hideFirstIndent:!0}),XJ.domEventHandlers({dblclick:te}),XJ.updateListener.of((function(e){n(8,c=e.state),e.docChanged?pe():e.selectionSet&&ye()})),new cY(d1),R1({top:!0}),I.of(TV.readOnly.of(i)),z.of(TV.tabSize.of(m)),D.of(he(o)),L.of(XJ.theme({},{dark:ie()})),XJ.lineWrapping,z3]});return s=new XJ({state:u,parent:t})}function ie(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function oe(e){var t=e.path,n=e.message,i=function(e,t){try{var n=_c.parse(e),r=oc(t),i=n.pointers[r];if(i)return{path:t,line:i.key?i.key.line:i.value?i.value.line:0,column:i.key?i.key.column:i.value?i.value.column:0,from:i.key?i.key.pos:i.value?i.value.pos:0,to:i.keyEnd?i.keyEnd.pos:i.valueEnd?i.valueEnd.pos:0}}catch(e){console.error(e)}return null}(r.escapeValue(q),t);return{path:t,line:i.line,column:i.column,from:i.from,to:i.to,message:n,severity:es.warning,actions:[]}}function ae(e,t){var n=e.line,r=e.column,i=e.position,o=e.message;return{path:[],line:n,column:r,from:i,to:i,severity:es.error,message:o,actions:t&&!l?[{name:"Auto repair",apply:function(){return X()}}]:null}}function se(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=hO(e,p,y),o=!Vk(e,B),a=B;B=e,n(11,q=i),E("setCodeMirrorContent",{isChanged:o,forceUpdate:t}),s&&(o||t)&&(be(q,T)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:r.escapeValue(q)}}),ve(),o&&ge(B,a))}function ce(e){return DE(e)?VF.fromJSON(e):void 0}function le(){return(le=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E("refresh"),e.next=3,fe();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){if(s){var e=s?r.unescapeValue(s.state.doc.toString()):"",t=e!==q;if(E("onChangeCodeMirrorValue",{isChanged:t}),t){var i=B;n(11,q=e),B={text:q},ve(),ge(B,i),la().then(ye)}}}function fe(){return de.apply(this,arguments)}function de(){return(de=ki(bi().mark((function e(){var t;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,la();case 2:s&&(t=ie(),E("updateTheme",{dark:t}),s.dispatch({effects:[L.reconfigure(XJ.theme({},{dark:t}))]}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){return uY.of("number"==typeof e?" ".repeat(e):e)}function ve(){n(12,V=HX(s.state)>0),n(13,W=UX(s.state)>0),E({canUndo:V,canRedo:W})}Yo((function(){me()})),UN({onMount:Qo,onDestroy:Yo,getWindow:function(){return BO(a)},hasFocus:function(){return K&&document.hasFocus()||qO(a)},onFocus:C,onBlur:function(){me(),$()}});var pe=ib(ue,300);function me(){pe.flush()}function ge(e,t){k&&k(e,t,{contentErrors:je(),patchResult:null})}function ye(){j(Ri({type:Xa.text},c.selection.toJSON()))}function be(e,t){return!!e&&e.length>ms&&!t}var we=_s,ke=null;function xe(){if(be(q,T))return[];var e=je();return OI(e)?[Q3(ae(e.parseError,e.isRepairable))]:MI(e)?e.validationErrors.map(oe).map(Q3):[]}function je(){E("validate:start"),me();var e=Se(r.escapeValue(q),b,y,w);return OI(e)?(n(51,we=e.isRepairable?Os:"invalid"),n(14,ke=e.parseError),n(10,R=[])):(n(51,we=_s),n(14,ke=null),n(10,R=(null==e?void 0:e.validationErrors)||[])),E("validate:end"),e}var Se=VB(WN);function Ce(){ke&&function(e){E("select parse error",e);var t=ae(e,!1);ee(null!=t.from?t.from:0,null!=t.to?t.to:0),J()}(ke)}var $e={icon:MP,text:"Show me",title:"Move to the parse error location",onClick:Ce};return e.$$set=function(e){"readOnly"in e&&n(1,l=e.readOnly),"mainMenuBar"in e&&n(2,u=e.mainMenuBar),"statusBar"in e&&n(3,f=e.statusBar),"askToFormat"in e&&n(0,d=e.askToFormat),"externalContent"in e&&n(30,h=e.externalContent),"externalSelection"in e&&n(31,v=e.externalSelection),"indentation"in e&&n(32,p=e.indentation),"tabSize"in e&&n(33,m=e.tabSize),"escapeUnicodeCharacters"in e&&n(34,g=e.escapeUnicodeCharacters),"parser"in e&&n(35,y=e.parser),"validator"in e&&n(36,b=e.validator),"validationParser"in e&&n(37,w=e.validationParser),"onChange"in e&&n(38,k=e.onChange),"onChangeMode"in e&&n(39,x=e.onChangeMode),"onSelect"in e&&n(40,j=e.onSelect),"onError"in e&&n(41,S=e.onError),"onFocus"in e&&n(42,C=e.onFocus),"onBlur"in e&&n(43,$=e.onBlur),"onRenderMenu"in e&&n(4,_=e.onRenderMenu),"onSortModal"in e&&n(44,O=e.onSortModal),"onTransformModal"in e&&n(45,M=e.onTransformModal)},e.$$.update=function(){8&e.$$.dirty[1]&&(r=xO({escapeControlCharacters:!1,escapeUnicodeCharacters:g})),1073741824&e.$$.dirty[0]&&se(h),1&e.$$.dirty[1]&&function(e){if(DE(e)){var t=ce(e);!s||!t||c&&c.selection.eq(t)||(E("applyExternalSelection",t),s.dispatch({selection:t}))}}(v),32&e.$$.dirty[1]&&function(e){E("updateLinter",e),s&&s.dispatch({effects:N.reconfigure(ne())})}(b),2&e.$$.dirty[1]&&function(e){s&&(E("updateIndentation",e),s.dispatch({effects:D.reconfigure(he(e))}))}(p),4&e.$$.dirty[1]&&function(e){s&&(E("updateTabSize",e),s.dispatch({effects:z.reconfigure(TV.tabSize.of(e))}))}(m),2&e.$$.dirty[0]&&function(e){s&&(E("updateReadOnly",e),s.dispatch({effects:[I.reconfigure(TV.readOnly.of(e))]}))}(l),524296&e.$$.dirty[1]&&F!==g&&(n(50,F=g),E("forceUpdateText",{escapeUnicodeCharacters:g}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:r.escapeValue(q)}})),2&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&n(15,i=we!==Os||l?[$e]:[{icon:OP,text:"Auto repair",title:"Automatically repair JSON",onClick:X},$e])},[d,l,u,f,_,J,o,a,c,T,R,q,V,W,ke,i,P,Q,Y,function(){var e;if(!l)try{var t=y.parse(q);K=!0,O({id:H,json:t,rootPath:[],onSort:(e=ki(bi().mark((function e(t){var n;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.operations,E("onSort",n),G(n);case 3:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)}),onClose:function(){K=!1,J()}})}catch(e){S(e)}},function(){l||Z({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?s2(s):a2(s))},function(){l||s&&(BX(s),J())},function(){l||s&&(qX(s),J())},function(){n(9,T=!0),se(h,!0)},function(){x(Ya.tree)},function(){ue()},function(e){E("select validation error",e);var t=oe(e);ee(t.from,t.to),J()},be,Ce,h,v,p,m,g,y,b,w,k,x,j,S,C,$,O,M,G,Z,function(){return le.apply(this,arguments)},je,F,we,function(e){ra[e?"unshift":"push"]((function(){n(6,o=e)}))},function(){return n(0,d=!1)},function(e){ra[e?"unshift":"push"]((function(){n(7,a=e)}))}]}var X3=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,Y3,G3,Zi,{readOnly:1,mainMenuBar:2,statusBar:3,askToFormat:0,externalContent:30,externalSelection:31,indentation:32,tabSize:33,escapeUnicodeCharacters:34,parser:35,validator:36,validationParser:37,onChange:38,onChangeMode:39,onSelect:40,onError:41,onFocus:42,onBlur:43,onRenderMenu:4,onSortModal:44,onTransformModal:45,focus:5,patch:46,openTransformModal:47,refresh:48,validate:49},L3,[-1,-1,-1,-1]),r}return Di(n,[{key:"focus",get:function(){return this.$$.ctx[5]}},{key:"patch",get:function(){return this.$$.ctx[46]}},{key:"openTransformModal",get:function(){return this.$$.ctx[47]}},{key:"refresh",get:function(){return this.$$.ctx[48]}},{key:"validate",get:function(){return this.$$.ctx[49]}}]),n}();function Z3(e){var t,n;return t=new UI({props:{items:e[0]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&xi(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function e4(e,t,n){var r,i,o=t.json,a=t.readOnly,s=t.historyState,c=t.onSort,l=t.onTransform,u=t.onContextMenu,f=t.onUndo,d=t.onRedo,h=t.onRenderMenu;return e.$$set=function(e){"json"in e&&n(1,o=e.json),"readOnly"in e&&n(2,a=e.readOnly),"historyState"in e&&n(3,s=e.historyState),"onSort"in e&&n(4,c=e.onSort),"onTransform"in e&&n(5,l=e.onTransform),"onContextMenu"in e&&n(6,u=e.onContextMenu),"onUndo"in e&&n(7,f=e.onUndo),"onRedo"in e&&n(8,d=e.onRedo),"onRenderMenu"in e&&n(9,h=e.onRenderMenu)},e.$$.update=function(){510&e.$$.dirty&&n(10,r=a?[{type:"space"}]:[{type:"button",icon:zP,title:"Sort",className:"jse-sort",onClick:c,disabled:a||void 0===o},{type:"button",icon:$P,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:l,disabled:a||void 0===o},{type:"button",icon:IP,title:js,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:PP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:f,disabled:!s.canUndo},{type:"button",icon:AP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:d,disabled:!s.canRedo},{type:"space"}]),1536&e.$$.dirty&&n(0,i=h(r)||r)},[i,o,a,s,c,l,u,f,d,h,r]}var t4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,e4,Z3,Zi,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Di(n)}();function n4(e,t,n){var r=e.slice();return r[9]=t[n],r}function r4(e){var t,n,r,i=[e[9].props],o=e[9].component;function a(e,t){var n={};if(void 0!==t&&1&t)n=Ea(i,[Aa(e[9].props)]);else for(var r=0;r<i.length;r+=1)n=Ji(n,i[r]);return{props:n}}return o&&(t=Fo(o,a(e))),{c:function(){t&&Ta(t.$$.fragment),n=Oo()},m:function(e,i){t&&Ra(t,e,i),ko(e,n,i),r=!0},p:function(e,r){if(1&r&&o!==(o=e[9].component)){if(t){wa();var s=t;ja(s.$$.fragment,1,0,(function(){Na(s,1)})),ka()}o?(Ta((t=Fo(o,a(e,r))).$$.fragment),xa(t.$$.fragment,1),Ra(t,n.parentNode,n)):t=null}else if(o){var c=1&r?Ea(i,[Aa(e[9].props)]):{};t.$set(c)}},i:function(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o:function(e){t&&ja(t.$$.fragment,e),r=!1},d:function(e){e&&xo(n),t&&Na(t,e)}}}function i4(e){var t,n,r=e[9].component,i=r4(e);return{c:function(){i.c(),t=Oo()},m:function(e,r){i.m(e,r),ko(e,t,r),n=!0},p:function(e,n){1&n&&Zi(r,r=e[9].component)?(wa(),ja(i,1,1,Hi),ka(),(i=r4(e)).c(),xa(i,1),i.m(t.parentNode,t)):i.p(e,n)},i:function(e){n||(xa(i),n=!0)},o:function(e){ja(i),n=!1},d:function(e){e&&xo(t),i.d(e)}}}function o4(e){for(var t,n,r=$a(e[0]),i=[],o=0;o<r.length;o+=1)i[o]=i4(n4(e,r,o));var a=function(e){return ja(i[e],1,1,(function(){i[e]=null}))};return{c:function(){for(var e=0;e<i.length;e+=1)i[e].c();t=Oo()},m:function(e,r){for(var o=0;o<i.length;o+=1)i[o]&&i[o].m(e,r);ko(e,t,r),n=!0},p:function(e,n){var o=xi(n,1)[0];if(1&o){var s;for(r=$a(e[0]),s=0;s<r.length;s+=1){var c=n4(e,r,s);i[s]?(i[s].p(c,o),xa(i[s],1)):(i[s]=i4(c),i[s].c(),xa(i[s],1),i[s].m(t.parentNode,t))}for(wa(),s=r.length;s<i.length;s+=1)a(s);ka()}},i:function(e){if(!n){for(var t=0;t<r.length;t+=1)xa(i[t]);n=!0}},o:function(e){i=i.filter(Boolean);for(var t=0;t<i.length;t+=1)ja(i[t]);n=!1},d:function(e){e&&xo(t),jo(i,e)}}}function a4(e,t,n){var r,i,o=t.path,a=t.value,s=t.context,c=t.enforceString,l=t.selection,u=t.searchResultItems;function f(e,t){return s.onPatch(function(e,t){return e.flatMap((function(e){if(Ls(e)){var n=ic(e.path);if(n.length>0){for(var r=[e],i=fk(n);i.length>0&&!rc(t,i);)r.unshift({op:"add",path:oc(i),value:{}}),i=fk(i);return r}}return e}))}(e,s.getJson()),t)}return e.$$set=function(e){"path"in e&&n(1,o=e.path),"value"in e&&n(2,a=e.value),"context"in e&&n(3,s=e.context),"enforceString"in e&&n(4,c=e.enforceString),"selection"in e&&n(5,l=e.selection),"searchResultItems"in e&&n(6,u=e.searchResultItems)},e.$$.update=function(){40&e.$$.dirty&&n(7,r=!s.readOnly&&RE(l)&&rA(l)),254&e.$$.dirty&&n(0,i=s.onRenderValue({path:o,value:a,readOnly:s.readOnly,enforceString:c,isEditing:r,parser:s.parser,normalization:s.normalization,selection:l,searchResultItems:u,onPatch:f,onPasteJson:s.onPasteJson,onSelect:s.onSelect,onFind:s.onFind,findNextInside:s.findNextInside,focus:s.focus}))},[i,o,a,s,c,l,u,r]}var s4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,a4,o4,Zi,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Di(n)}();function c4(e){go(e,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function l4(e){var t,n,r,i,o=gM(e[2].stringify(e[1]),50)+"";return{c:function(){t=So("button"),n=$o(o),Po(t,"type","button"),Po(t,"class","jse-inline-value svelte-l28mqd"),Bo(t,"jse-selected",e[3])},m:function(o,a){ko(o,t,a),mo(t,n),r||(i=Mo(t,"dblclick",e[5]),r=!0)},p:function(e,r){var i=xi(r,1)[0];6&i&&o!==(o=gM(e[2].stringify(e[1]),50)+"")&&Io(n,o),8&i&&Bo(t,"jse-selected",e[3])},i:Hi,o:Hi,d:function(e){e&&xo(t),r=!1,i()}}}function u4(e,t,n){var r=t.path,i=t.value,o=t.parser,a=t.isSelected,s=t.onEdit;return e.$$set=function(e){"path"in e&&n(0,r=e.path),"value"in e&&n(1,i=e.value),"parser"in e&&n(2,o=e.parser),"isSelected"in e&&n(3,a=e.isSelected),"onEdit"in e&&n(4,s=e.onEdit)},[r,i,o,a,s,function(){return s(r)}]}var f4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,u4,l4,Zi,{path:0,value:1,parser:2,isSelected:3,onEdit:4},c4),r}return Di(n)}();function d4(e){go(e,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function h4(e){var t,n,r,i;return n=new FM({props:{data:e[1]===ns.asc?NP:CP}}),{c:function(){t=So("span"),Ta(n.$$.fragment),Po(t,"class","jse-column-sort-icon svelte-h4fort"),Po(t,"title",r="Currently sorted in ".concat(e[2]," order"))},m:function(e,r){ko(e,t,r),Ra(n,t,null),i=!0},p:function(e,o){var a={};2&o&&(a.data=e[1]===ns.asc?NP:CP),n.$set(a),(!i||4&o&&r!==(r="Currently sorted in ".concat(e[2]," order")))&&Po(t,"title",r)},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n)}}}function v4(e){var t,n,r,i,o,a,s,c,l=gM(e[3],50)+"",u=void 0!==e[1]&&h4(e);return{c:function(){t=So("button"),n=So("span"),r=$o(l),i=_o(),u&&u.c(),Po(n,"class","jse-column-name"),Po(t,"type","button"),Po(t,"class","jse-column-header svelte-h4fort"),Po(t,"title",o=e[0]?e[3]:e[3]+" (Click to sort the data by this column)"),Bo(t,"jse-readonly",e[0])},m:function(o,l){ko(o,t,l),mo(t,n),mo(n,r),mo(t,i),u&&u.m(t,null),a=!0,s||(c=Mo(t,"click",e[4]),s=!0)},p:function(e,n){var i=xi(n,1)[0];(!a||8&i)&&l!==(l=gM(e[3],50)+"")&&Io(r,l),void 0!==e[1]?u?(u.p(e,i),2&i&&xa(u,1)):((u=h4(e)).c(),xa(u,1),u.m(t,null)):u&&(wa(),ja(u,1,1,(function(){u=null})),ka()),(!a||9&i&&o!==(o=e[0]?e[3]:e[3]+" (Click to sort the data by this column)"))&&Po(t,"title",o),(!a||1&i)&&Bo(t,"jse-readonly",e[0])},i:function(e){a||(xa(u),a=!0)},o:function(e){ja(u),a=!1},d:function(e){e&&xo(t),u&&u.d(),s=!1,c()}}}function p4(e,t,n){var r,i,o,a=t.path,s=t.sortedColumn,c=t.readOnly,l=t.onSort;return e.$$set=function(e){"path"in e&&n(5,a=e.path),"sortedColumn"in e&&n(6,s=e.sortedColumn),"readOnly"in e&&n(0,c=e.readOnly),"onSort"in e&&n(7,l=e.onSort)},e.$$.update=function(){var t;(32&e.$$.dirty&&n(3,r=Fk(a)?"values":lM(a)),96&e.$$.dirty)&&n(1,i=s&&Vk(a,null===(t=s)||void 0===t?void 0:t.path)?s.sortDirection:void 0);2&e.$$.dirty&&n(2,o=i?As[i]:void 0)},[c,i,o,r,function(){c||l({path:a,sortDirection:i===ns.asc?ns.desc:ns.asc})},a,s,l]}var m4,g4,y4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,p4,v4,Zi,{path:5,sortedColumn:6,readOnly:0,onSort:7},d4),r}return Di(n)}();function b4(e,t){return m4||(g4=new WeakMap,m4=new ResizeObserver((function(e){var t,n=yi(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=g4.get(r.target);i&&i(r.target)}}catch(e){n.e(e)}finally{n.f()}}))),g4.set(e,t),m4.observe(e),{destroy:function(){g4.delete(e),m4.unobserve(e)}}}function w4(e){var t,n;return t=new ez({props:{items:e[1],tip:e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2&n[0]&&(r.items=e[1]),1&n[0]&&(r.tip=e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function k4(e,t,n){var r,i,o,a,s,c,l,u,f,d=t.json,h=t.documentState,v=t.parser,p=t.showTip,m=t.onCloseContextMenu,g=t.onEditValue,y=t.onEditRow,b=t.onToggleEnforceString,w=t.onCut,k=t.onCopy,x=t.onPaste,j=t.onRemove,S=t.onDuplicateRow,C=t.onInsertBeforeRow,$=t.onInsertAfterRow,_=t.onRemoveRow;function O(){m(),g()}function M(){m(),y()}function E(){m(),b()}function A(){m(),w(!0)}function P(){m(),w(!1)}function T(){m(),k(!0)}function R(){m(),k(!1)}function N(){m(),x()}function I(){m(),j()}function D(){m(),S()}function z(){m(),C()}function L(){m(),$()}function B(){m(),_()}return e.$$set=function(e){"json"in e&&n(2,d=e.json),"documentState"in e&&n(3,h=e.documentState),"parser"in e&&n(4,v=e.parser),"showTip"in e&&n(0,p=e.showTip),"onCloseContextMenu"in e&&n(5,m=e.onCloseContextMenu),"onEditValue"in e&&n(6,g=e.onEditValue),"onEditRow"in e&&n(7,y=e.onEditRow),"onToggleEnforceString"in e&&n(8,b=e.onToggleEnforceString),"onCut"in e&&n(9,w=e.onCut),"onCopy"in e&&n(10,k=e.onCopy),"onPaste"in e&&n(11,x=e.onPaste),"onRemove"in e&&n(12,j=e.onRemove),"onDuplicateRow"in e&&n(13,S=e.onDuplicateRow),"onInsertBeforeRow"in e&&n(14,C=e.onInsertBeforeRow),"onInsertAfterRow"in e&&n(15,$=e.onInsertAfterRow),"onRemoveRow"in e&&n(16,_=e.onRemoveRow)},e.$$.update=function(){8&e.$$.dirty[0]&&n(22,r=h.selection),4&e.$$.dirty[0]&&n(24,i=void 0!==d),4194304&e.$$.dirty[0]&&n(17,o=!!r),4194308&e.$$.dirty[0]&&n(23,a=void 0!==d&&r?Ys(d,fA(r)):void 0),20971520&e.$$.dirty[0]&&n(18,s=i&&(NE(r)||TE(r)||RE(r))),20971520&e.$$.dirty[0]&&n(21,c=i&&null!=r&&JE(r)),10485760&e.$$.dirty[0]&&n(19,l=c&&!iu(a)),12582936&e.$$.dirty[0]&&n(20,u=null!=r&&jE(a,h.enforceStringMap,oc(fA(r)),v)),4063232&e.$$.dirty[0]&&n(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:O,icon:EP,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:EP,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:O,disabled:!c},{type:"button",icon:u?kM:xM,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:E,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:A,icon:yP,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!s},width:"10em",items:[{type:"button",icon:yP,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:A,disabled:!s},{type:"button",icon:yP,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:P,disabled:!s}]},{type:"dropdown-button",main:{type:"button",onClick:T,icon:VP,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!s},width:"12em",items:[{type:"button",icon:VP,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:T,disabled:!s},{type:"button",icon:VP,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:R,disabled:!s}]},{type:"button",onClick:N,icon:mP,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:I,icon:vP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!s}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:M,icon:EP,text:"Edit row",title:"Edit the current row",disabled:!s},{type:"button",onClick:D,icon:GP,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:z,icon:WP,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:L,icon:WP,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:B,icon:vP,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[p,f,d,h,v,m,g,y,b,w,k,x,j,S,C,$,_,o,s,l,u,c,r,a,i]}var x4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,k4,w4,Zi,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Di(n)}();function j4(e){go(e,"svelte-zejhe1",".jse-table-mode-welcome.svelte-zejhe1.svelte-zejhe1{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-zejhe1.svelte-zejhe1:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-zejhe1 .jse-space.jse-before.svelte-zejhe1{flex:1}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays.svelte-zejhe1{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:2em var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays .jse-nested-arrays-info.svelte-zejhe1{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays button.jse-nested-array-action.svelte-zejhe1{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays button.jse-nested-array-action.svelte-zejhe1:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays button.jse-nested-array-action.svelte-zejhe1:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-zejhe1 .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-zejhe1{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-zejhe1 .jse-space.jse-after.svelte-zejhe1{flex:2}")}function S4(e,t,n){var r=e.slice();r[13]=t[n];var i=Ys(r[0],r[13]).length;return r[14]=i,r}function C4(e){var t,n;return{c:function(){t=$o(e[7]),n=$o(" cannot be opened in table mode.")},m:function(e,r){ko(e,t,r),ko(e,n,r)},p:function(e,n){128&n&&Io(t,e[7])},d:function(e){e&&(xo(t),xo(n))}}}function $4(e){var t;return{c:function(){t=$o("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,n){ko(e,t,n)},p:Hi,d:function(e){e&&xo(t)}}}function _4(e){var t;return{c:function(){t=$o("You can open the document in tree mode instead.")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function O4(e){var t,n,r;return{c:function(){t=$o("You can open the document in tree mode instead, or paste a JSON Array using "),(n=So("b")).textContent="Ctrl+V",r=$o(".")},m:function(e,i){ko(e,t,i),ko(e,n,i),ko(e,r,i)},d:function(e){e&&(xo(t),xo(n),xo(r))}}}function M4(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v=lM(e[13])+"",p=e[14]+"",m=1!==e[14]?"items":"item";function g(){return e[11](e[13])}return{c:function(){t=So("button"),n=$o(e[8]),r=$o(' "'),i=$o(v),o=$o('"\n '),a=So("span"),s=$o("("),c=$o(p),l=_o(),u=$o(m),f=$o(")"),Po(a,"class","jse-nested-array-count svelte-zejhe1"),Po(t,"type","button"),Po(t,"class","jse-nested-array-action svelte-zejhe1")},m:function(e,v){ko(e,t,v),mo(t,n),mo(t,r),mo(t,i),mo(t,o),mo(t,a),mo(a,s),mo(a,c),mo(a,l),mo(a,u),mo(a,f),d||(h=Mo(t,"click",g),d=!0)},p:function(t,r){e=t,256&r&&Io(n,e[8]),16&r&&v!==(v=lM(e[13])+"")&&Io(i,v),17&r&&p!==(p=e[14]+"")&&Io(c,p),17&r&&m!==(m=1!==e[14]?"items":"item")&&Io(u,m)},d:function(e){e&&xo(t),d=!1,h()}}}function E4(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y;function b(e,t){return e[6]?$4:C4}var w=b(e),k=w(e);function x(e,t){return e[5]&&!e[1]?O4:_4}for(var j=x(e),S=j(e),C=$a(e[4]),$=[],_=0;_<C.length;_+=1)$[_]=M4(S4(e,C,_));return{c:function(){t=So("div"),n=So("div"),r=_o(),i=So("div"),o=So("div"),a=$o(e[7]),s=_o(),c=So("div"),k.c(),l=_o(),S.c(),u=_o();for(var g=0;g<$.length;g+=1)$[g].c();f=_o(),d=So("button"),h=$o(e[8]),v=$o(" in tree mode"),p=_o(),m=So("div"),Po(n,"class","jse-space jse-before svelte-zejhe1"),Po(o,"class","jse-nested-arrays-title"),Po(c,"class","jse-nested-arrays-info svelte-zejhe1"),Po(d,"type","button"),Po(d,"class","jse-nested-array-action svelte-zejhe1"),Po(i,"class","jse-nested-arrays svelte-zejhe1"),Po(m,"class","jse-space jse-after svelte-zejhe1"),Po(t,"class","jse-table-mode-welcome svelte-zejhe1")},m:function(b,w){ko(b,t,w),mo(t,n),mo(t,r),mo(t,i),mo(i,o),mo(o,a),mo(i,s),mo(i,c),k.m(c,null),mo(c,l),S.m(c,null),mo(i,u);for(var x=0;x<$.length;x+=1)$[x]&&$[x].m(i,null);mo(i,f),mo(i,d),mo(d,h),mo(d,v),mo(t,p),mo(t,m),g||(y=Mo(d,"click",e[12]),g=!0)},p:function(e,t){var n=xi(t,1)[0];if(128&n&&Io(a,e[7]),w===(w=b(e))&&k?k.p(e,n):(k.d(1),(k=w(e))&&(k.c(),k.m(c,l))),j!==(j=x(e))&&(S.d(1),(S=j(e))&&(S.c(),S.m(c,null))),277&n){var r;for(C=$a(e[4]),r=0;r<C.length;r+=1){var o=S4(e,C,r);$[r]?$[r].p(o,n):($[r]=M4(o),$[r].c(),$[r].m(i,f))}for(;r<$.length;r+=1)$[r].d(1);$.length=C.length}256&n&&Io(h,e[8])},i:Hi,o:Hi,d:function(e){e&&xo(t),k.d(),S.d(),jo($,e),g=!1,y()}}}function A4(e,t,n){var r,i,o,a,s,c=t.text,l=t.json,u=t.readOnly,f=t.parser,d=t.openJSONEditorModal,h=t.onChangeMode;return e.$$set=function(e){"text"in e&&n(9,c=e.text),"json"in e&&n(0,l=e.json),"readOnly"in e&&n(1,u=e.readOnly),"parser"in e&&n(10,f=e.parser),"openJSONEditorModal"in e&&n(2,d=e.openJSONEditorModal),"onChangeMode"in e&&n(3,h=e.onChangeMode)},e.$$.update=function(){2&e.$$.dirty&&n(8,r=u?"View":"Edit"),1&e.$$.dirty&&n(4,s=l?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=[];return function e(r,i){Is(r)&&i.length<t&&Object.keys(r).forEach((function(t){e(r[t],i.concat(t))})),Ns(r)&&n.push(i)}(e,[]),n}(l).slice(0,99).filter((function(e){return e.length>0})):[]),16&e.$$.dirty&&n(6,i=!Fk(s)),513&e.$$.dirty&&n(5,o=void 0===l&&(""===c||void 0===c)),1121&e.$$.dirty&&n(7,a=i?"Object with nested arrays":o?"An empty document":Is(l)?"An object":Ns(l)?"An empty array":"A ".concat(su(l,f)))},[l,u,d,h,s,o,i,a,r,c,f,function(e){return d(e)},function(){return h(Ya.tree)}]}var P4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,A4,E4,Zi,{text:9,json:0,readOnly:1,parser:10,openJSONEditorModal:2,onChangeMode:3},j4),r}return Di(n)}();function T4(e){go(e,"svelte-py7l9h",".jse-column-header.svelte-py7l9h{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-py7l9h:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-py7l9h:not(.jse-column-header.jse-readonly){cursor:pointer}")}function R4(e){var t,n,r,i,o,a;return n=new FM({props:{data:KP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),Po(t,"type","button"),Po(t,"class","jse-column-header svelte-py7l9h"),Po(t,"title",r="The Columns are created by sampling ".concat(e[1]," items out of ").concat(e[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(r,s){ko(r,t,s),Ra(n,t,null),i=!0,o||(a=Mo(t,"click",e[3]),o=!0)},p:function(e,n){var o=xi(n,1)[0];(!i||3&o&&r!==(r="The Columns are created by sampling ".concat(e[1]," items out of ").concat(e[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&Po(t,"title",r)},i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,a()}}}function N4(e,t,n){var r=t.count,i=t.maxSampleCount,o=t.onRefresh;return e.$$set=function(e){"count"in e&&n(0,r=e.count),"maxSampleCount"in e&&n(1,i=e.maxSampleCount),"onRefresh"in e&&n(2,o=e.onRefresh)},[r,i,o,function(){return o()}]}var I4=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,N4,R4,Zi,{count:0,maxSampleCount:1,onRefresh:2},T4),r}return Di(n)}();function D4(e){go(e,"svelte-7jv5dt",".jse-table-mode.svelte-7jv5dt.svelte-7jv5dt{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color);line-height:var(--jse-line-height)}.jse-table-mode.no-main-menu.svelte-7jv5dt.svelte-7jv5dt{border-top:var(--jse-main-border)}.jse-table-mode.svelte-7jv5dt .jse-hidden-input-label.svelte-7jv5dt{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-7jv5dt .jse-hidden-input-label .jse-hidden-input.svelte-7jv5dt{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-7jv5dt .jse-contents.svelte-7jv5dt{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-7jv5dt .jse-contents.svelte-7jv5dt:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main.svelte-7jv5dt{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-7jv5dt,.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-7jv5dt{margin:0;padding:0}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-7jv5dt{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row.svelte-7jv5dt:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-7jv5dt{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-7jv5dt,.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-7jv5dt{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-7jv5dt{padding:0;position:sticky;top:0}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-7jv5dt{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-7jv5dt{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-7jv5dt>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-7jv5dt div{display:inline-flex}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-7jv5dt div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-7jv5dt .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-7jv5dt{position:relative;vertical-align:top}.jse-table-mode.svelte-7jv5dt .jse-contents.jse-contents-loading.svelte-7jv5dt{align-items:unset}.jse-table-mode.svelte-7jv5dt .jse-contents.jse-contents-loading .jse-loading-space.svelte-7jv5dt{flex:1}.jse-table-mode.svelte-7jv5dt .jse-contents.jse-contents-loading .jse-loading.svelte-7jv5dt{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function z4(e,t,n){var r=e.slice();r[122]=t[n],r[126]=n;var i=r[23].startIndex+r[126];r[123]=i;var o=r[22].rows[r[123]];return r[124]=o,r}function L4(e,t,n){var r,i=e.slice();i[127]=t[n],i[133]=n;var o=[String(i[123])].concat(i[127]);i[128]=o;var a=Ys(i[122],i[127]);i[129]=a;var s=RE(i[11].selection)&&GE(i[11].selection.path,i[128]);i[130]=s;var c=null===(r=i[124])||void 0===r?void 0:r.columns[i[133]];return i[131]=c,i}function B4(e,t,n){var r=e.slice();return r[127]=t[n],r}function q4(e){var t,n;return t=new t4({props:{json:e[8],readOnly:e[0],historyState:e[20],onSort:e[41],onTransform:e[42],onUndo:e[43],onRedo:e[44],onContextMenu:e[33],onRenderMenu:e[5]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};256&n[0]&&(r.json=e[8]),1&n[0]&&(r.readOnly=e[0]),1048576&n[0]&&(r.historyState=e[20]),32&n[0]&&(r.onRenderMenu=e[5]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function F4(e){var t;return{c:function(){(t=So("div")).innerHTML='<div class="jse-loading-space svelte-7jv5dt"></div> <div class="jse-loading svelte-7jv5dt">loading...</div>',Po(t,"class","jse-contents jse-contents-loading svelte-7jv5dt")},m:function(e,n){ko(e,t,n)},p:Hi,i:Hi,o:Hi,d:function(e){e&&xo(t)}}}function V4(e){var t,n,r,i,o,a,s,c,l,u=[U4,H4,W4],f=[];function d(e,t){return e[25]?0:e[17]&&void 0!==e[16]&&""!==e[16]?1:2}return i=d(e),o=f[i]=u[i](e),{c:function(){t=So("label"),n=So("input"),r=_o(),o.c(),a=Oo(),Po(n,"type","text"),n.readOnly=!0,Po(n,"tabindex","-1"),Po(n,"class","jse-hidden-input svelte-7jv5dt"),Po(t,"class","jse-hidden-input-label svelte-7jv5dt")},m:function(o,u){ko(o,t,u),mo(t,n),e[72](n),ko(o,r,u),f[i].m(o,u),ko(o,a,u),s=!0,c||(l=Mo(n,"paste",e[38]),c=!0)},p:function(e,t){var n=i;(i=d(e))===n?f[i].p(e,t):(wa(),ja(f[n],1,1,(function(){f[n]=null})),ka(),(o=f[i])?o.p(e,t):(o=f[i]=u[i](e)).c(),xa(o,1),o.m(a.parentNode,a))},i:function(e){s||(xa(o),s=!0)},o:function(e){ja(o),s=!1},d:function(n){n&&(xo(t),xo(r),xo(a)),e[72](null),f[i].d(n),c=!1,l()}}}function W4(e){var t,n;return t=new P4({props:{text:e[16],json:e[8],readOnly:e[0],parser:e[2],openJSONEditorModal:e[40],onChangeMode:e[4]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};65536&n[0]&&(r.text=e[16]),256&n[0]&&(r.json=e[8]),1&n[0]&&(r.readOnly=e[0]),4&n[0]&&(r.parser=e[2]),16&n[0]&&(r.onChangeMode=e[4]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function H4(e){var t,n,r,i;return t=new eI({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:_P,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[36]}]}}),r=new jq({props:{text:e[16],json:e[8],indentation:e[3],parser:e[2]}}),{c:function(){Ta(t.$$.fragment),n=_o(),Ta(r.$$.fragment)},m:function(e,o){Ra(t,e,o),ko(e,n,o),Ra(r,e,o),i=!0},p:function(e,n){var i={};1&n[0]&&(i.actions=e[0]?[]:[{icon:_P,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[36]}]),t.$set(i);var o={};65536&n[0]&&(o.text=e[16]),256&n[0]&&(o.json=e[8]),8&n[0]&&(o.indentation=e[3]),4&n[0]&&(o.parser=e[2]),r.$set(o)},i:function(e){i||(xa(t.$$.fragment,e),xa(r.$$.fragment,e),i=!0)},o:function(e){ja(t.$$.fragment,e),ja(r.$$.fragment,e),i=!1},d:function(e){e&&xo(n),Na(t,e),Na(r,e)}}}function U4(e){for(var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C=!Fk(null===(t=e[22])||void 0===t?void 0:t.root),$=C&&J4(e),_=$a(e[10]),O=[],M=0;M<_.length;M+=1)O[M]=K4(B4(e,_,M));for(var E=function(e){return ja(O[e],1,1,(function(){O[e]=null}))},A=e[24]&&G4(e),P=$a(e[23].visibleItems),T=[],R=0;R<P.length;R+=1)T[R]=i8(z4(e,P,R));var N=function(e){return ja(T[e],1,1,(function(){T[e]=null}))},I=e[18]&&o8(e),D=e[19]&&a8(e);return k=new fI({props:{validationErrors:e[12],selectError:e[39]}}),{c:function(){n=So("div"),r=So("table"),i=So("tbody"),o=So("tr"),a=So("th"),$&&$.c(),s=_o();for(var t=0;t<O.length;t+=1)O[t].c();c=_o(),A&&A.c(),l=_o(),u=So("tr"),f=So("td"),h=_o();for(var x=0;x<T.length;x+=1)T[x].c();v=_o(),p=So("tr"),m=So("td"),y=_o(),I&&I.c(),b=_o(),D&&D.c(),w=_o(),Ta(k.$$.fragment),Po(a,"class","jse-table-cell jse-table-cell-header svelte-7jv5dt"),Po(o,"class","jse-table-row jse-table-row-header svelte-7jv5dt"),Po(f,"colspan",d=e[10].length),Po(f,"class","svelte-7jv5dt"),zo(f,"height",e[23].startHeight+"px"),Po(u,"class","jse-table-invisible-start-section"),Po(m,"colspan",g=e[10].length),Po(m,"class","svelte-7jv5dt"),zo(m,"height",e[23].endHeight+"px"),Po(p,"class","jse-table-invisible-end-section"),Po(r,"class","jse-table-main svelte-7jv5dt"),Po(r,"cellpadding","0"),Po(r,"cellspacing","0"),Po(n,"class","jse-contents svelte-7jv5dt")},m:function(t,d){ko(t,n,d),mo(n,r),mo(r,i),mo(i,o),mo(o,a),$&&$.m(a,null),mo(o,s);for(var g=0;g<O.length;g+=1)O[g]&&O[g].m(o,null);mo(o,c),A&&A.m(o,null),mo(i,l),mo(i,u),mo(u,f),mo(i,h);for(var C=0;C<T.length;C+=1)T[C]&&T[C].m(i,null);mo(i,v),mo(i,p),mo(p,m),e[75](n),ko(t,y,d),I&&I.m(t,d),ko(t,b,d),D&&D.m(t,d),ko(t,w,d),Ra(k,t,d),x=!0,j||(S=[co(b4.call(null,n,e[45])),Mo(n,"scroll",e[29])],j=!0)},p:function(e,t){var n;if(4194304&t[0]&&(C=!Fk(null===(n=e[22])||void 0===n?void 0:n.root)),C?$?($.p(e,t),4194304&t[0]&&xa($,1)):(($=J4(e)).c(),xa($,1),$.m(a,null)):$&&(wa(),ja($,1,1,(function(){$=null})),ka()),268438529&t[0]){var r;for(_=$a(e[10]),r=0;r<_.length;r+=1){var s=B4(e,_,r);O[r]?(O[r].p(s,t),xa(O[r],1)):(O[r]=K4(s),O[r].c(),xa(O[r],1),O[r].m(o,c))}for(wa(),r=_.length;r<O.length;r+=1)E(r);ka()}if(e[24]?A?(A.p(e,t),16777216&t[0]&&xa(A,1)):((A=G4(e)).c(),xa(A,1),A.m(o,null)):A&&(wa(),ja(A,1,1,(function(){A=null})),ka()),(!x||1024&t[0]&&d!==(d=e[10].length))&&Po(f,"colspan",d),8388608&t[0]&&zo(f,"height",e[23].startHeight+"px"),165678085&t[0]|33281&t[1]){var l;for(P=$a(e[23].visibleItems),l=0;l<P.length;l+=1){var u=z4(e,P,l);T[l]?(T[l].p(u,t),xa(T[l],1)):(T[l]=i8(u),T[l].c(),xa(T[l],1),T[l].m(i,v))}for(wa(),l=P.length;l<T.length;l+=1)N(l);ka()}(!x||1024&t[0]&&g!==(g=e[10].length))&&Po(m,"colspan",g),8388608&t[0]&&zo(m,"height",e[23].endHeight+"px"),e[18]?I?(I.p(e,t),262144&t[0]&&xa(I,1)):((I=o8(e)).c(),xa(I,1),I.m(b.parentNode,b)):I&&(wa(),ja(I,1,1,(function(){I=null})),ka()),e[19]?D?(D.p(e,t),524288&t[0]&&xa(D,1)):((D=a8(e)).c(),xa(D,1),D.m(w.parentNode,w)):D&&(wa(),ja(D,1,1,(function(){D=null})),ka());var h={};4096&t[0]&&(h.validationErrors=e[12]),k.$set(h)},i:function(e){if(!x){xa($);for(var t=0;t<_.length;t+=1)xa(O[t]);xa(A);for(var n=0;n<P.length;n+=1)xa(T[n]);xa(I),xa(D),xa(k.$$.fragment,e),x=!0}},o:function(e){ja($),O=O.filter(Boolean);for(var t=0;t<O.length;t+=1)ja(O[t]);ja(A),T=T.filter(Boolean);for(var n=0;n<T.length;n+=1)ja(T[n]);ja(I),ja(D),ja(k.$$.fragment,e),x=!1},d:function(t){t&&(xo(n),xo(y),xo(b),xo(w)),$&&$.d(),jo(O,t),A&&A.d(),jo(T,t),e[75](null),I&&I.d(t),D&&D.d(t),Na(k,t),j=!1,Qi(S)}}}function J4(e){var t,n,r,i;return r=new zz({props:{validationError:ZB([],null===(t=e[22])||void 0===t?void 0:t.root),onExpand:oF}}),{c:function(){n=So("div"),Ta(r.$$.fragment),Po(n,"class","jse-table-root-error svelte-7jv5dt")},m:function(e,t){ko(e,n,t),Ra(r,n,null),i=!0},p:function(e,t){var n,i={};4194304&t[0]&&(i.validationError=ZB([],null===(n=e[22])||void 0===n?void 0:n.root)),r.$set(i)},i:function(e){i||(xa(r.$$.fragment,e),i=!0)},o:function(e){ja(r.$$.fragment,e),i=!1},d:function(e){e&&xo(n),Na(r)}}}function K4(e){var t,n,r;return n=new y4({props:{path:e[127],sortedColumn:e[11].sortedColumn,readOnly:e[0],onSort:e[28]}}),{c:function(){t=So("th"),Ta(n.$$.fragment),Po(t,"class","jse-table-cell jse-table-cell-header svelte-7jv5dt")},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,t){var r={};1024&t[0]&&(r.path=e[127]),2048&t[0]&&(r.sortedColumn=e[11].sortedColumn),1&t[0]&&(r.readOnly=e[0]),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function G4(e){var t,n,r;return n=new I4({props:{count:Array.isArray(e[8])?e[8].length:0,maxSampleCount:e[9],onRefresh:e[73]}}),{c:function(){t=So("th"),Ta(n.$$.fragment),Po(t,"class","jse-table-cell jse-table-cell-header svelte-7jv5dt")},m:function(e,i){ko(e,t,i),Ra(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.count=Array.isArray(e[8])?e[8].length:0),512&t[0]&&(r.maxSampleCount=e[9]),512&t[0]&&(r.onRefresh=e[73]),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){e&&xo(t),Na(n)}}}function Q4(e){var t,n;return t=new zz({props:{validationError:ZB([String(e[123])],e[124].row),onExpand:oF}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};12582912&n[0]&&(r.validationError=ZB([String(e[123])],e[124].row)),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Y4(e){var t,n,r,i,o,a,s,c,l=e[123]+"",u=!Fk(null===(t=e[124])||void 0===t?void 0:t.row),f=u&&Q4(e);function d(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e)[74].apply(t,[e[123]].concat(r))}return{c:function(){n=So("th"),r=$o(l),i=_o(),f&&f.c(),Po(n,"class","jse-table-cell jse-table-cell-gutter svelte-7jv5dt")},m:function(e,t){ko(e,n,t),mo(n,r),mo(n,i),f&&f.m(n,null),a=!0,s||(c=co(o=b4.call(null,n,d)),s=!0)},p:function(t,i){var s;e=t,(!a||8388608&i[0])&&l!==(l=e[123]+"")&&Io(r,l),12582912&i[0]&&(u=!Fk(null===(s=e[124])||void 0===s?void 0:s.row)),u?f?(f.p(e,i),12582912&i[0]&&xa(f,1)):((f=Q4(e)).c(),xa(f,1),f.m(n,null)):f&&(wa(),ja(f,1,1,(function(){f=null})),ka()),o&&Yi(o.update)&&8388608&i[0]&&o.update.call(null,d)},i:function(e){a||(xa(f),a=!0)},o:function(e){ja(f),a=!1},d:function(e){e&&xo(n),f&&f.d(),s=!1,c()}}}function X4(e){var t,n;return t=new s4({props:{path:e[128],value:void 0!==e[129]?e[129]:"",enforceString:jE(e[129],e[11].enforceStringMap,oc(e[128]),e[21].parser),selection:e[130]?e[11].selection:null,searchResultItems:e[27],context:e[21]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8389632&n[0]&&(r.path=e[128]),8389632&n[0]&&(r.value=void 0!==e[129]?e[129]:""),10488832&n[0]&&(r.enforceString=jE(e[129],e[11].enforceStringMap,oc(e[128]),e[21].parser)),8391680&n[0]&&(r.selection=e[130]?e[11].selection:null),2097152&n[0]&&(r.context=e[21]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function Z4(e){var t,n;return t=new f4({props:{path:e[128],value:e[129],parser:e[2],isSelected:e[130],onEdit:e[40]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};8389632&n[0]&&(r.path=e[128]),8389632&n[0]&&(r.value=e[129]),4&n[0]&&(r.parser=e[2]),8391680&n[0]&&(r.isSelected=e[130]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function e8(e){var t,n,r,i;return n=new pz({props:{selected:!0,onContextMenu:e[31]}}),{c:function(){t=So("div"),Ta(n.$$.fragment),r=_o(),Po(t,"class","jse-context-menu-anchor svelte-7jv5dt")},m:function(e,o){ko(e,t,o),Ra(n,t,null),ko(e,r,o),i=!0},p:Hi,i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&(xo(t),xo(r)),Na(n)}}}function t8(e){var t,n;return t=new zz({props:{validationError:ZB(e[128],e[131]),onExpand:oF}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};12583936&n[0]&&(r.validationError=ZB(e[128],e[131])),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function n8(e){var t,n,r,i,o,a,s,c,l=!e[0]&&e[130]&&!rA(e[11].selection),u=!Fk(e[131]),f=[Z4,X4],d=[];function h(e,t){return 8389632&t[0]&&(n=null),null==n&&(n=!!iu(e[129])),n?0:1}r=h(e,[-1,-1,-1,-1,-1]),i=d[r]=f[r](e);var v=l&&e8(e),p=u&&t8(e);return{c:function(){t=So("td"),i.c(),o=Oo(),v&&v.c(),a=Oo(),p&&p.c(),Po(t,"class","jse-table-cell svelte-7jv5dt"),Po(t,"data-path",s=WO(e[128])),Bo(t,"jse-selected-value",e[130])},m:function(e,n){ko(e,t,n),d[r].m(t,null),mo(t,o),v&&v.m(t,null),mo(t,a),p&&p.m(t,null),c=!0},p:function(e,n){var m=r;(r=h(e,n))===m?d[r].p(e,n):(wa(),ja(d[m],1,1,(function(){d[m]=null})),ka(),(i=d[r])?i.p(e,n):(i=d[r]=f[r](e)).c(),xa(i,1),i.m(t,o)),8391681&n[0]&&(l=!e[0]&&e[130]&&!rA(e[11].selection)),l?v?(v.p(e,n),8391681&n[0]&&xa(v,1)):((v=e8(e)).c(),xa(v,1),v.m(t,a)):v&&(wa(),ja(v,1,1,(function(){v=null})),ka()),12582912&n[0]&&(u=!Fk(e[131])),u?p?(p.p(e,n),12582912&n[0]&&xa(p,1)):((p=t8(e)).c(),xa(p,1),p.m(t,null)):p&&(wa(),ja(p,1,1,(function(){p=null})),ka()),(!c||8389632&n[0]&&s!==(s=WO(e[128])))&&Po(t,"data-path",s),(!c||8391680&n[0])&&Bo(t,"jse-selected-value",e[130])},i:function(e){c||(xa(i),xa(v),xa(p),c=!0)},o:function(e){ja(i),ja(v),ja(p),c=!1},d:function(e){e&&xo(t),d[r].d(),v&&v.d(),p&&p.d()}}}function r8(e){var t;return{c:function(){Po(t=So("td"),"class","jse-table-cell svelte-7jv5dt")},m:function(e,n){ko(e,t,n)},d:function(e){e&&xo(t)}}}function i8(e){for(var t,n,r,i,o=e[123],a=Y4(e),s=$a(e[10]),c=[],l=0;l<s.length;l+=1)c[l]=n8(L4(e,s,l));var u=function(e){return ja(c[e],1,1,(function(){c[e]=null}))},f=e[24]&&r8();return{c:function(){t=So("tr"),a.c(),n=_o();for(var e=0;e<c.length;e+=1)c[e].c();r=_o(),f&&f.c(),Po(t,"class","jse-table-row svelte-7jv5dt")},m:function(e,o){ko(e,t,o),a.m(t,null),mo(t,n);for(var s=0;s<c.length;s+=1)c[s]&&c[s].m(t,null);mo(t,r),f&&f.m(t,null),i=!0},p:function(e,i){if(8388608&i[0]&&Zi(o,o=e[123])?(wa(),ja(a,1,1,Hi),ka(),(a=Y4(e)).c(),xa(a,1),a.m(t,n)):a.p(e,i),148900869&i[0]|513&i[1]){var l;for(s=$a(e[10]),l=0;l<s.length;l+=1){var d=L4(e,s,l);c[l]?(c[l].p(d,i),xa(c[l],1)):(c[l]=n8(d),c[l].c(),xa(c[l],1),c[l].m(t,r))}for(wa(),l=s.length;l<c.length;l+=1)u(l);ka()}e[24]?f||((f=r8()).c(),f.m(t,null)):f&&(f.d(1),f=null)},i:function(e){if(!i){xa(a);for(var t=0;t<s.length;t+=1)xa(c[t]);i=!0}},o:function(e){ja(a),c=c.filter(Boolean);for(var t=0;t<c.length;t+=1)ja(c[t]);i=!1},d:function(e){e&&xo(t),a.d(e),jo(c,e),f&&f.d()}}}function o8(e){var t,n;return t=new eI({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(e[18].contents)?"array":"object"," as text"),actions:[{icon:OP,text:"Paste as JSON instead",title:"Paste the text as JSON instead of a single value",onMouseDown:e[34]},{text:"Leave as is",title:"Keep the pasted content as a single value",onClick:e[35]}]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};262144&n[0]&&(r.message="You pasted a JSON ".concat(Array.isArray(e[18].contents)?"array":"object"," as text")),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function a8(e){var t,n;return t=new eI({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:e[0]?[]:[{icon:QP,text:"Ok",title:"Accept the repaired document",onClick:e[7]},{icon:_P,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[36]}],onClose:e[6]}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.actions=e[0]?[]:[{icon:QP,text:"Ok",title:"Accept the repaired document",onClick:e[7]},{icon:_P,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[36]}]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function s8(e){var t,n,r,i,o,a,s,c=e[1]&&q4(e),l=[V4,F4],u=[];return r=function(e,t){return e[26]?1:0}(e),i=u[r]=l[r](e),{c:function(){t=So("div"),c&&c.c(),n=_o(),i.c(),Po(t,"role","table"),Po(t,"class","jse-table-mode svelte-7jv5dt"),Bo(t,"no-main-menu",!e[1])},m:function(i,l){ko(i,t,l),c&&c.m(t,null),mo(t,n),u[r].m(t,null),e[76](t),o=!0,a||(s=[Mo(t,"mousedown",e[30]),Mo(t,"keydown",e[37]),Mo(t,"contextmenu",e[32])],a=!0)},p:function(e,r){e[1]?c?(c.p(e,r),2&r[0]&&xa(c,1)):((c=q4(e)).c(),xa(c,1),c.m(t,n)):c&&(wa(),ja(c,1,1,(function(){c=null})),ka()),i.p(e,r),(!o||2&r[0])&&Bo(t,"no-main-menu",!e[1])},i:function(e){o||(xa(c),xa(i),o=!0)},o:function(e){ja(c),ja(i),o=!1},d:function(n){n&&xo(t),c&&c.d(),u[r].d(),e[76](null),a=!1,Qi(s)}}}var c8=18;function l8(e,t,n){var r,i,o,a,s=za("jsoneditor:TableMode"),c=ea("simple-modal").open,l=ea("absolute-popup"),u=l.openAbsolutePopup,f=l.closeAbsolutePopup,d=DN(),h=J$(),v=J$(),p="undefined"==typeof window;s("isSSR:",p);var m,g,y,b,w,k,x=t.readOnly,j=t.externalContent,S=t.externalSelection,C=t.mainMenuBar,$=t.escapeControlCharacters,_=t.escapeUnicodeCharacters,O=t.flattenColumns,M=t.parser,E=t.parseMemoizeOne,A=t.validator,P=t.validationParser,T=t.indentation,R=t.onChange,N=t.onChangeMode,I=t.onSelect,D=t.onRenderValue,z=t.onRenderMenu,L=t.onFocus,B=t.onBlur,q=t.onSortModal,F=t.onTransformModal,V=t.onJSONEditorModal;UN({onMount:Qo,onDestroy:Yo,getWindow:function(){return BO(g)},hasFocus:function(){return K&&document.hasFocus()||qO(g)},onFocus:function(){!0,L&&L()},onBlur:function(){!1,B&&B()}});var W,H=void 0,U=1e4,J=[],K=!1,G={},Q=600,Y=0;function X(e){s("updateSelection",e);var t="function"==typeof e?e(ee.selection)||null:e;Vk(t,ee.selection)||(n(11,ee=Ri(Ri({},ee),{},{selection:t})),I(t))}function Z(e){ee.selection&&void 0!==e&&(rc(e,dA(ee.selection))&&rc(e,fA(ee.selection))||(s("clearing selection: path does not exist anymore",ee.selection),n(11,ee=Ri(Ri({},ee),{},{selection:null}))))}var ee=oE(),te=!1;var ne,re=BN({onChange:function(e){n(20,ie=e)}}),ie=re.getState();function oe(e){var t=w,r=lO(e)?e.text!==k:!Vk(t,e.json);if(s("update external content",{isChanged:r}),r){var i={json:w,text:k},o=w,a=ee,c=k,l=te;if(lO(e))try{n(8,w=E(e.text)),n(16,k=e.text),n(19,te=!1),n(17,H=void 0)}catch(t){try{n(8,w=E(Xl(e.text))),n(16,k=e.text),n(19,te=!0),n(17,H=void 0)}catch(e){n(8,w=void 0),n(16,k=j.text),n(19,te=!1),n(17,H=void 0!==k&&""!==k?aO(k,t.message||String(t)):void 0)}}else n(8,w=e.json),n(16,k=void 0),n(19,te=!1),n(17,H=void 0);Z(w),ee.sortedColumn&&n(11,ee=Ri(Ri({},ee),{},{sortedColumn:null})),ae({previousJson:o,previousState:a,previousText:c,previousTextIsRepaired:l});he(i,null)}}function ae(e){var t=e.previousJson,n=e.previousState,r=e.previousText,i=e.previousTextIsRepaired;void 0===t&&void 0===r||(void 0!==w?void 0!==t?re.add({undo:{patch:[{op:"replace",path:"",value:t}],state:QE(n),json:void 0,text:r,textIsRepaired:i},redo:{patch:[{op:"replace",path:"",value:w}],state:QE(ee),json:void 0,text:k,textIsRepaired:te}}):re.add({undo:{patch:void 0,json:void 0,text:r,state:QE(n),textIsRepaired:i},redo:{patch:void 0,json:w,state:QE(ee),text:k,textIsRepaired:te}}):void 0!==t&&re.add({undo:{patch:void 0,json:t,state:QE(n),text:r,textIsRepaired:i},redo:{patch:void 0,json:void 0,text:k,textIsRepaired:te,state:QE(ee)}}))}var se=[],ce=VB(VN);function le(e,t,r,i){qN((function(){var o;try{o=ce(e,t,r,i)}catch(e){o=[{path:[],message:"Failed to validate: "+e.message,severity:es.warning}]}Vk(o,se)||(s("validationErrors changed:",o),n(12,se=o))}),(function(e){return s("validationErrors updated in ".concat(e," ms"))}))}function ue(){return s("validate"),H?{parseError:H,isRepairable:!1}:(le(w,A,M,P),Fk(se)?null:{validationErrors:se})}function fe(e,t){if(s("patch",e,t),void 0===w)throw new Error("Cannot apply patch: no JSON");var r={json:w},i=w,o=ee,a=te,c=AA(w,e),l=dE(w,ee,e).json,u=tq(ee,e,J),f="function"==typeof t?t(l,u):void 0;n(8,w=f&&void 0!==f.json?f.json:l);var d=f&&void 0!==f.state?f.state:u;n(11,ee=d),n(16,k=void 0),n(19,te=!1),n(18,W=void 0),n(17,H=void 0),re.add({undo:{patch:c,json:void 0,text:void 0,state:QE(o),textIsRepaired:a},redo:{patch:e,json:void 0,state:QE(d),text:void 0,textIsRepaired:te}});var h={json:w,previousJson:i,undo:c,redo:e};return he(r,h),h}function de(e,t){if(!x)return fe(e,t)}function he(e,t){if((void 0!==e.json||void 0!==(null==e?void 0:e.text))&&R)if(void 0!==k)R({text:k,json:void 0},e,{contentErrors:ue(),patchResult:t});else if(void 0!==w){R({text:void 0,json:w},e,{contentErrors:ue(),patchResult:t})}}function ve(e){s("handleFind",e)}function pe(e){s("pasted json as text",e),n(18,W=e)}function me(e){var t=parseInt(e[0]),n=[String(t+1)].concat(Bi(e.slice(1)));return rc(w,n)?XE(n,!1):XE(e,!1)}function ge(){s("focus"),b&&(b.focus(),b.select())}function ye(){ee.selection||X(!Ns(w)||Fk(w)||Fk(J)?null:XE(["0"].concat(Bi(J[0])),!1))}function be(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=GB(e,J,G,c8),r=n-Y,i=xe(e);if(s("scrollTo",{path:e,top:n,scrollTop:Y,elem:i}),!y)return Promise.resolve();var o=y.getBoundingClientRect();if(i&&!t){var a=i.getBoundingClientRect();if(a.bottom>o.top&&a.top<o.bottom)return Promise.resolve()}var c=-o.height/4;return new Promise(i?function(t){d(i,{container:y,offset:c,duration:300,callback:function(){we(e),t()}})}:function(i){var o;d(r,{container:y,offset:c,duration:300,callback:(o=ki(bi().mark((function r(){return bi().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,la();case 2:if(GB(e,J,G,c8)===n){r.next=8;break}return r.next=6,be(e,t);case 6:r.next=9;break;case 8:we(e);case 9:i();case 10:case"end":return r.stop()}}),r)}))),function(){return o.apply(this,arguments)})})})}function we(e){var t=xe(e);if(t&&y){var r=y.getBoundingClientRect(),i=t.getBoundingClientRect();if(i.right>r.right){var o=i.right-r.right;n(14,y.scrollLeft+=o,y)}if(i.left<r.left){var a=r.left-i.left;n(14,y.scrollLeft-=a,y)}}}function ke(e){!function(e){if(y){var t=QB(e,J).rowIndex,r=GB(e,J,G,c8),i=r+(G[t]||c8),o=y.getBoundingClientRect(),a=Y,s=Y+o.height-18;if(i>s){var c=i-s;n(14,y.scrollTop+=c,y)}if(r<a){var l=a-r;n(14,y.scrollTop-=l,y)}}}(e),we(e)}function xe(e){return y?y.querySelector('td[data-path="'.concat(WO(e),'"]')):null}function je(e){var t=e.anchor,n=e.left,r=e.top,i=e.width,o=e.height,a=e.offsetTop,s=e.offsetLeft,c=e.showTip;K=!0;var l=u(x4,{json:w,documentState:ee,parser:M,showTip:c,onEditValue:Ce,onEditRow:$e,onToggleEnforceString:_e,onCut:Ee,onCopy:Pe,onPaste:Me,onRemove:Re,onDuplicateRow:Ne,onInsertBeforeRow:Ie,onInsertAfterRow:De,onRemoveRow:ze,onCloseContextMenu:function(){f(l),ge()}},{left:n,top:r,offsetTop:a,offsetLeft:s,width:i,height:o,anchor:t,closeOnOuterClick:!0,onClose:function(){K=!1,ge()}})}function Se(e){if(!x&&!rA(ee.selection)){if(e&&(e.stopPropagation(),e.preventDefault()),e&&"contextmenu"===e.type&&e.target!==b)je({left:e.clientX,top:e.clientY,width:Es,height:Ms,showTip:!1});else{var t,n=null===(t=y)||void 0===t?void 0:t.querySelector(".jse-table-cell.jse-selected-value");if(n)je({anchor:n,offsetTop:2,width:Es,height:Ms,showTip:!1});else{var r,i=null===(r=y)||void 0===r?void 0:r.getBoundingClientRect();i&&je({top:i.top+2,left:i.left+2,width:Es,height:Ms,showTip:!1})}}return!1}}function Ce(){if(!x&&ee.selection){var e=fA(ee.selection);iu(Ys(w,e))?Ve(e):X(XE(e,!0))}}function $e(){!x&&ee.selection&&Ve(fA(ee.selection).slice(0,1))}function _e(){if(!x&&RE(ee.selection)){var e=ee.selection.path,t=oc(e),n=Ys(w,e),r=!jE(n,ee.enforceStringMap,t,M),i=r?String(n):uu(String(n),M);s("handleToggleEnforceString",{enforceString:r,value:n,updatedValue:i}),de([{op:"replace",path:t,value:i}],(function(e,n){return{state:fE(n,t,r)}}))}}function Oe(){return(Oe=ki(bi().mark((function e(){var t,n,r,i,o;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("apply pasted json",W),W){e.next=3;break}return e.abrupt("return");case 3:r=(n=W).path,i=n.contents,JO(o=(null===(t=y)||void 0===t?void 0:t.querySelector(".jse-editable-div"))||null)&&o.cancel(),de([{op:"replace",path:oc(r),value:i}]),setTimeout(ge);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Me(){c(wI,{},Ri(Ri({},ys),{},{styleWindow:{width:"450px"}}),{onClose:function(){return ge()}})}function Ee(e){return Ae.apply(this,arguments)}function Ae(){return(Ae=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rq({json:w,documentState:ee,indentation:t?T:void 0,readOnly:x,parser:M,onPatch:de});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(){return Te.apply(this,arguments)}function Te(){return Te=ki(bi().mark((function e(){var t,n=arguments;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(n.length>0&&void 0!==n[0])||n[0],void 0!==w){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,oq({json:w,documentState:ee,indentation:t?T:void 0,parser:M});case 5:case"end":return e.stop()}}),e)}))),Te.apply(this,arguments)}function Re(){cq({json:w,text:k,documentState:ee,keepSelection:!0,readOnly:x,onChange:R,onPatch:de})}function Ne(){lq({json:w,documentState:ee,columns:J,readOnly:x,onPatch:de})}function Ie(){uq({json:w,documentState:ee,columns:J,readOnly:x,onPatch:de})}function De(){fq({json:w,documentState:ee,columns:J,readOnly:x,onPatch:de})}function ze(){dq({json:w,documentState:ee,columns:J,readOnly:x,onPatch:de})}function Le(){return(Le=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vq({char:t,selectInside:!1,refJsonEditor:g,json:w,selection:ee.selection,readOnly:x,parser:M,onPatch:de,onReplaceJson:Be,onSelect:X});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Be(e,t){var r=ee,i=w,o=k,a={json:w,text:k},s=te,c=lE(w,ee,[],ME),l="function"==typeof t?t(e,c):void 0;n(8,w=l&&void 0!==l.json?l.json:e),n(11,ee=l&&void 0!==l.state?l.state:c),n(16,k=void 0),n(19,te=!1),n(17,H=void 0),Z(w),ae({previousJson:i,previousState:r,previousText:o,previousTextIsRepaired:s});he(a,null)}function qe(e,t){s("handleChangeText");var r=ee,i=w,o=k,a={json:w,text:k},c=te;try{n(8,w=E(e)),n(11,ee=lE(w,ee,[],ME)),n(16,k=void 0),n(19,te=!1),n(17,H=void 0)}catch(t){try{n(8,w=E(Xl(e))),n(11,ee=lE(w,ee,[],ME)),n(16,k=e),n(19,te=!0),n(17,H=void 0)}catch(r){n(8,w=void 0),n(11,ee=oE({json:w,expand:ME})),n(16,k=e),n(19,te=!1),n(17,H=""!==k?aO(k,t.message||String(t)):void 0)}}if("function"==typeof t){var l=t(w,ee);n(8,w=l&&l.json?l.json:w),n(11,ee=l&&l.state?l.state:ee)}Z(w),ae({previousJson:i,previousState:r,previousText:o,previousTextIsRepaired:c});he(a,null)}function Fe(e){if(void 0!==w){var t=e.id,n=e.onTransform,r=e.onClose,i=e.rootPath||[];K=!0,F({id:t||v,json:w,rootPath:i||[],onTransform:function(e){n?n({operations:e,json:w,transformedJson:lc(w,e)}):(s("onTransform",i,e),de(e))},onClose:function(){K=!1,ge(),r&&r()}})}}function Ve(e){s("openJSONEditorModal",{path:e}),K=!0,V({content:{json:Ys(w,e)},path:e,onPatch:ne.onPatch,onClose:function(){K=!1,ge()}})}function We(e,t){c(aD,{text:e,onParse:function(e){return rO(e,(function(e){return tO(e,M)}))},onRepair:iO,onApply:t},Ri(Ri({},ys),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ge()}})}function He(){if(!x&&re.getState().canUndo){var e=re.undo();if(e){var t={json:w,text:k};n(8,w=e.undo.patch?lc(w,e.undo.patch):e.undo.json),n(11,ee=e.undo.state),n(16,k=e.undo.text),n(19,te=e.undo.textIsRepaired),n(17,H=void 0),s("undo",{item:e,json:w}),he(t,{json:w,previousJson:t.json,redo:e.undo.patch,undo:e.redo.patch}),ge(),ee.selection&&be(fA(ee.selection),!1)}}}function Ue(){if(!x&&re.getState().canRedo){var e=re.redo();if(e){var t={json:w,text:k};n(8,w=e.redo.patch?lc(w,e.redo.patch):e.redo.json),n(11,ee=e.redo.state),n(16,k=e.redo.text),n(19,te=e.redo.textIsRepaired),n(17,H=void 0),s("redo",{item:e,json:w}),he(t,{json:w,previousJson:t.json,redo:e.redo.patch,undo:e.undo.patch}),ge(),ee.selection&&be(fA(ee.selection),!1)}}}function Je(e,t){n(69,G[t]=e.getBoundingClientRect().height,G)}return e.$$set=function(e){"readOnly"in e&&n(0,x=e.readOnly),"externalContent"in e&&n(47,j=e.externalContent),"externalSelection"in e&&n(48,S=e.externalSelection),"mainMenuBar"in e&&n(1,C=e.mainMenuBar),"escapeControlCharacters"in e&&n(49,$=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(50,_=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(51,O=e.flattenColumns),"parser"in e&&n(2,M=e.parser),"parseMemoizeOne"in e&&n(52,E=e.parseMemoizeOne),"validator"in e&&n(53,A=e.validator),"validationParser"in e&&n(54,P=e.validationParser),"indentation"in e&&n(3,T=e.indentation),"onChange"in e&&n(55,R=e.onChange),"onChangeMode"in e&&n(4,N=e.onChangeMode),"onSelect"in e&&n(56,I=e.onSelect),"onRenderValue"in e&&n(57,D=e.onRenderValue),"onRenderMenu"in e&&n(5,z=e.onRenderMenu),"onFocus"in e&&n(58,L=e.onFocus),"onBlur"in e&&n(59,B=e.onBlur),"onSortModal"in e&&n(60,q=e.onSortModal),"onTransformModal"in e&&n(61,F=e.onTransformModal),"onJSONEditorModal"in e&&n(62,V=e.onJSONEditorModal)},e.$$.update=function(){786432&e.$$.dirty[1]&&n(68,m=xO({escapeControlCharacters:$,escapeUnicodeCharacters:_})),65536&e.$$.dirty[1]&&oe(j),131072&e.$$.dirty[1]&&function(e){Vk(ee.selection,e)||(s("applyExternalSelection",e),X(e))}(S),1792&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&n(10,J=Ns(w)?function(e,t){var n,r=new Set(t.map(oc)),i=new Set(e.map(oc)),o=yi(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;i.has(a)||r.delete(a)}}catch(e){o.e(e)}finally{o.f()}var s,c=yi(i);try{for(c.s();!(s=c.n()).done;){var l=s.value;r.has(l)||r.add(l)}}catch(e){c.e(e)}finally{c.f()}return Bi(r).map(ic)}(HB(w,O,U),J):[]),1280&e.$$.dirty[0]&&n(25,r=w&&!Fk(J)),768&e.$$.dirty[0]&&n(24,i=Array.isArray(w)&&w.length>U),256&e.$$.dirty[0]|896&e.$$.dirty[2]&&n(23,o=KB(Y,Q,w,G,c8)),256&e.$$.dirty[0]&&y&&y.scrollTo({top:y.scrollTop,left:y.scrollLeft}),2309&e.$$.dirty[0]|67108864&e.$$.dirty[1]|64&e.$$.dirty[2]&&n(21,ne={readOnly:x,parser:M,normalization:m,getJson:function(){return w},getDocumentState:function(){return ee},findElement:xe,findNextInside:me,focus:ge,onPatch:de,onSelect:X,onFind:ve,onPasteJson:pe,onRenderValue:D}),260&e.$$.dirty[0]|12582912&e.$$.dirty[1]&&le(w,A,M,P),5120&e.$$.dirty[0]&&n(22,a=XB(se,J))},[x,C,M,T,N,z,ge,function(){if(te&&void 0!==w){var e=ee,t=w,r=k,i={json:w,text:k},o=te;n(16,k=void 0),n(19,te=!1),Z(w),ae({previousJson:t,previousState:e,previousText:r,previousTextIsRepaired:o});he(i,null)}return{json:w,text:k}},w,U,J,ee,se,g,y,b,k,H,W,te,ie,ne,a,o,i,r,p,undefined,function(e){if(!x){s("onSortByHeader",e);var t=e.sortDirection===ns.desc?-1:1;de(eB(w,[],e.path,t),(function(t,n){return{state:Ri(Ri({},n),{},{sortedColumn:e})}}))}},function(e){n(71,Y=e.target.scrollTop)},function(e){var t=null!=e&&e.target?HO(e.target):void 0;if(t){if(rA(ee.selection)&&lA(w,ee.selection,t))return;X(XE(t,!1)),e.preventDefault()}RO(e.target,"BUTTON")||e.target.isContentEditable||ge()},je,Se,function(e){x||je({anchor:FO(e.target,"BUTTON"),offsetTop:0,width:Es,height:Ms,showTip:!0})},function(){return Oe.apply(this,arguments)},function(){s("clear pasted json"),n(18,W=void 0),ge()},function(){N(Ya.text)},function(e){var t=KO(e);if(s("keydown",{combo:t,key:e.key}),"Ctrl+X"===t&&(e.preventDefault(),Ee(!0)),"Ctrl+Shift+X"===t&&(e.preventDefault(),Ee(!1)),"Ctrl+C"===t&&(e.preventDefault(),Pe(!0)),"Ctrl+Shift+C"===t&&(e.preventDefault(),Pe(!1)),"Ctrl+D"===t&&e.preventDefault(),"Delete"!==t&&"Backspace"!==t||(e.preventDefault(),Re()),"Insert"===t&&e.preventDefault(),"Ctrl+A"===t&&e.preventDefault(),"Ctrl+Q"===t&&Se(e),"ArrowLeft"===t&&(e.preventDefault(),ye(),ee.selection)){var n=function(e,t){var n=QB(fA(t),e),r=n.rowIndex,i=n.columnIndex;return i>0?XE(YB({rowIndex:r,columnIndex:i-1},e),!1):t}(J,ee.selection);X(n),ke(fA(n))}if("ArrowRight"===t&&(e.preventDefault(),ye(),ee.selection)){var r=function(e,t){var n=QB(fA(t),e),r=n.rowIndex,i=n.columnIndex;return i<e.length-1?XE(YB({rowIndex:r,columnIndex:i+1},e),!1):t}(J,ee.selection);X(r),ke(fA(r))}if("ArrowUp"===t&&(e.preventDefault(),ye(),ee.selection)){var i=function(e,t){var n=QB(fA(t),e),r=n.rowIndex,i=n.columnIndex;return r>0?XE(YB({rowIndex:r-1,columnIndex:i},e),!1):t}(J,ee.selection);X(i),ke(fA(i))}if("ArrowDown"===t&&(e.preventDefault(),ye(),ee.selection)){var o=function(e,t,n){var r=QB(fA(n),t),i=r.rowIndex,o=r.columnIndex;return i<e.length-1?XE(YB({rowIndex:i+1,columnIndex:o},t),!1):n}(w,J,ee.selection);X(o),ke(fA(o))}if("Enter"===t&&ee.selection&&RE(ee.selection)){e.preventDefault();var a=ee.selection.path;iu(Ys(w,a))?Ve(a):x||X(Ri(Ri({},ee.selection),{},{edit:!0}))}if(1===t.replace(/^Shift\+/,"").length&&ee.selection)return e.preventDefault(),void function(e){Le.apply(this,arguments)}(e.key);if("Ctrl+Enter"===t&&RE(ee.selection)){var c=Ys(w,ee.selection.path);lu(c)&&window.open(String(c),"_blank")}"Escape"===t&&ee.selection&&(e.preventDefault(),X(null)),"Ctrl+F"===t&&e.preventDefault(),"Ctrl+H"===t&&e.preventDefault(),"Ctrl+Z"===t&&(e.preventDefault(),He()),"Ctrl+Shift+Z"===t&&(e.preventDefault(),Ue())},function(e){e.preventDefault(),sq({clipboardText:e.clipboardData.getData("text/plain"),json:w,selection:ee.selection,readOnly:x,parser:M,onPatch:de,onChangeText:qe,openRepairModal:We})},function(e){s("select validation error",e),X(XE(e.path,!1)),be(e.path)},Ve,function(){!function(e){x||void 0===w||(K=!0,q({id:h,json:w,rootPath:e,onSort:function(t){var n=t.operations,r=t.itemPath,i=t.direction;s("onSort",n,e,r,i),de(n,(function(e,t){return{state:Ri(Ri({},t),{},{sortedColumn:{path:r,sortDirection:-1===i?ns.desc:ns.asc}})}}))},onClose:function(){K=!1,ge()}}))}([])},function(){Fe({rootPath:[]})},He,Ue,function(e){n(70,Q=e.getBoundingClientRect().height)},Je,j,S,$,_,O,E,A,P,R,I,D,L,B,q,F,V,ue,fe,be,xe,Fe,m,G,Q,Y,function(e){ra[e?"unshift":"push"]((function(){n(15,b=e)}))},function(){return n(9,U=1/0)},function(e,t){return Je(t,e)},function(e){ra[e?"unshift":"push"]((function(){n(14,y=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(13,g=e)}))}]}var u8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,l8,s8,Zi,{readOnly:0,externalContent:47,externalSelection:48,mainMenuBar:1,escapeControlCharacters:49,escapeUnicodeCharacters:50,flattenColumns:51,parser:2,parseMemoizeOne:52,validator:53,validationParser:54,indentation:3,onChange:55,onChangeMode:4,onSelect:56,onRenderValue:57,onRenderMenu:5,onFocus:58,onBlur:59,onSortModal:60,onTransformModal:61,onJSONEditorModal:62,validate:63,patch:64,focus:6,acceptAutoRepair:7,scrollTo:65,findElement:66,openTransformModal:67},D4,[-1,-1,-1,-1,-1]),r}return Di(n,[{key:"validate",get:function(){return this.$$.ctx[63]}},{key:"patch",get:function(){return this.$$.ctx[64]}},{key:"focus",get:function(){return this.$$.ctx[6]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[7]}},{key:"scrollTo",get:function(){return this.$$.ctx[65]}},{key:"findElement",get:function(){return this.$$.ctx[66]}},{key:"openTransformModal",get:function(){return this.$$.ctx[67]}}]),n}();function f8(e){var t,n,r={externalContent:e[0],externalSelection:e[1],readOnly:e[2],indentation:e[3],mainMenuBar:e[6],navigationBar:e[7],escapeControlCharacters:e[10],escapeUnicodeCharacters:e[11],parser:e[13],parseMemoizeOne:e[14],validator:e[15],validationParser:e[16],pathParser:e[17],onError:e[23],onChange:e[18],onChangeMode:e[19],onSelect:e[20],onRenderValue:e[21],onClassName:e[22],onFocus:e[24],onBlur:e[25],onRenderMenu:e[32],onSortModal:e[26],onTransformModal:e[27],onJSONEditorModal:e[28]};return t=new zq({props:r}),e[47](t),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.externalContent=e[0]),2&n[0]&&(r.externalSelection=e[1]),4&n[0]&&(r.readOnly=e[2]),8&n[0]&&(r.indentation=e[3]),64&n[0]&&(r.mainMenuBar=e[6]),128&n[0]&&(r.navigationBar=e[7]),1024&n[0]&&(r.escapeControlCharacters=e[10]),2048&n[0]&&(r.escapeUnicodeCharacters=e[11]),8192&n[0]&&(r.parser=e[13]),16384&n[0]&&(r.parseMemoizeOne=e[14]),32768&n[0]&&(r.validator=e[15]),65536&n[0]&&(r.validationParser=e[16]),131072&n[0]&&(r.pathParser=e[17]),8388608&n[0]&&(r.onError=e[23]),262144&n[0]&&(r.onChange=e[18]),524288&n[0]&&(r.onChangeMode=e[19]),1048576&n[0]&&(r.onSelect=e[20]),2097152&n[0]&&(r.onRenderValue=e[21]),4194304&n[0]&&(r.onClassName=e[22]),16777216&n[0]&&(r.onFocus=e[24]),33554432&n[0]&&(r.onBlur=e[25]),2&n[1]&&(r.onRenderMenu=e[32]),67108864&n[0]&&(r.onSortModal=e[26]),134217728&n[0]&&(r.onTransformModal=e[27]),268435456&n[0]&&(r.onJSONEditorModal=e[28]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(n){e[47](null),Na(t,n)}}}function d8(e){var t,n,r={externalContent:e[0],externalSelection:e[1],readOnly:e[2],mainMenuBar:e[6],escapeControlCharacters:e[10],escapeUnicodeCharacters:e[11],flattenColumns:e[12],parser:e[13],parseMemoizeOne:e[14],validator:e[15],validationParser:e[16],indentation:e[3],onChange:e[18],onChangeMode:e[19],onSelect:e[20],onRenderValue:e[21],onFocus:e[24],onBlur:e[25],onRenderMenu:e[32],onSortModal:e[26],onTransformModal:e[27],onJSONEditorModal:e[28]};return t=new u8({props:r}),e[46](t),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.externalContent=e[0]),2&n[0]&&(r.externalSelection=e[1]),4&n[0]&&(r.readOnly=e[2]),64&n[0]&&(r.mainMenuBar=e[6]),1024&n[0]&&(r.escapeControlCharacters=e[10]),2048&n[0]&&(r.escapeUnicodeCharacters=e[11]),4096&n[0]&&(r.flattenColumns=e[12]),8192&n[0]&&(r.parser=e[13]),16384&n[0]&&(r.parseMemoizeOne=e[14]),32768&n[0]&&(r.validator=e[15]),65536&n[0]&&(r.validationParser=e[16]),8&n[0]&&(r.indentation=e[3]),262144&n[0]&&(r.onChange=e[18]),524288&n[0]&&(r.onChangeMode=e[19]),1048576&n[0]&&(r.onSelect=e[20]),2097152&n[0]&&(r.onRenderValue=e[21]),16777216&n[0]&&(r.onFocus=e[24]),33554432&n[0]&&(r.onBlur=e[25]),2&n[1]&&(r.onRenderMenu=e[32]),67108864&n[0]&&(r.onSortModal=e[26]),134217728&n[0]&&(r.onTransformModal=e[27]),268435456&n[0]&&(r.onJSONEditorModal=e[28]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(n){e[46](null),Na(t,n)}}}function h8(e){var t,n,r={externalContent:e[0],externalSelection:e[1],readOnly:e[2],indentation:e[3],tabSize:e[4],mainMenuBar:e[6],statusBar:e[8],askToFormat:e[9],escapeUnicodeCharacters:e[11],parser:e[13],validator:e[15],validationParser:e[16],onChange:e[18],onSelect:e[20],onChangeMode:e[19],onError:e[23],onFocus:e[24],onBlur:e[25],onRenderMenu:e[32],onSortModal:e[26],onTransformModal:e[27]};return t=new X3({props:r}),e[45](t),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.externalContent=e[0]),2&n[0]&&(r.externalSelection=e[1]),4&n[0]&&(r.readOnly=e[2]),8&n[0]&&(r.indentation=e[3]),16&n[0]&&(r.tabSize=e[4]),64&n[0]&&(r.mainMenuBar=e[6]),256&n[0]&&(r.statusBar=e[8]),512&n[0]&&(r.askToFormat=e[9]),2048&n[0]&&(r.escapeUnicodeCharacters=e[11]),8192&n[0]&&(r.parser=e[13]),32768&n[0]&&(r.validator=e[15]),65536&n[0]&&(r.validationParser=e[16]),262144&n[0]&&(r.onChange=e[18]),1048576&n[0]&&(r.onSelect=e[20]),524288&n[0]&&(r.onChangeMode=e[19]),8388608&n[0]&&(r.onError=e[23]),16777216&n[0]&&(r.onFocus=e[24]),33554432&n[0]&&(r.onBlur=e[25]),2&n[1]&&(r.onRenderMenu=e[32]),67108864&n[0]&&(r.onSortModal=e[26]),134217728&n[0]&&(r.onTransformModal=e[27]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(n){e[45](null),Na(t,n)}}}function v8(e){var t,n,r,i,o=[h8,d8,f8],a=[];function s(e,t){return e[5]===Ya.text||"code"===e[5]?0:e[5]===Ya.table?1:2}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=Oo()},m:function(e,n){a[t].m(e,n),ko(e,r,n),i=!0},p:function(e,i){var c=t;(t=s(e))===c?a[t].p(e,i):(wa(),ja(a[c],1,1,(function(){a[c]=null})),ka(),(n=a[t])?n.p(e,i):(n=a[t]=o[t](e)).c(),xa(n,1),n.m(r.parentNode,r))},i:function(e){i||(xa(n),i=!0)},o:function(e){ja(n),i=!1},d:function(e){e&&xo(r),a[t].d(e)}}}function p8(e,t,n){var r,i,o,a,s,c=t.content,l=t.selection,u=t.readOnly,f=t.indentation,d=t.tabSize,h=t.mode,v=t.mainMenuBar,p=t.navigationBar,m=t.statusBar,g=t.askToFormat,y=t.escapeControlCharacters,b=t.escapeUnicodeCharacters,w=t.flattenColumns,k=t.parser,x=t.parseMemoizeOne,j=t.validator,S=t.validationParser,C=t.pathParser,$=t.insideModal,_=t.onChange,O=t.onChangeMode,M=t.onSelect,E=t.onRenderValue,A=t.onClassName,P=t.onRenderMenu,T=t.onError,R=t.onFocus,N=t.onBlur,I=t.onSortModal,D=t.onTransformModal,z=t.onJSONEditorModal,L={type:"separator"};function B(){return(B=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=3;break}return e.next=3,o.refresh();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return e.$$set=function(e){"content"in e&&n(0,c=e.content),"selection"in e&&n(1,l=e.selection),"readOnly"in e&&n(2,u=e.readOnly),"indentation"in e&&n(3,f=e.indentation),"tabSize"in e&&n(4,d=e.tabSize),"mode"in e&&n(5,h=e.mode),"mainMenuBar"in e&&n(6,v=e.mainMenuBar),"navigationBar"in e&&n(7,p=e.navigationBar),"statusBar"in e&&n(8,m=e.statusBar),"askToFormat"in e&&n(9,g=e.askToFormat),"escapeControlCharacters"in e&&n(10,y=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(11,b=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(12,w=e.flattenColumns),"parser"in e&&n(13,k=e.parser),"parseMemoizeOne"in e&&n(14,x=e.parseMemoizeOne),"validator"in e&&n(15,j=e.validator),"validationParser"in e&&n(16,S=e.validationParser),"pathParser"in e&&n(17,C=e.pathParser),"insideModal"in e&&n(33,$=e.insideModal),"onChange"in e&&n(18,_=e.onChange),"onChangeMode"in e&&n(19,O=e.onChangeMode),"onSelect"in e&&n(20,M=e.onSelect),"onRenderValue"in e&&n(21,E=e.onRenderValue),"onClassName"in e&&n(22,A=e.onClassName),"onRenderMenu"in e&&n(34,P=e.onRenderMenu),"onError"in e&&n(23,T=e.onError),"onFocus"in e&&n(24,R=e.onFocus),"onBlur"in e&&n(25,N=e.onBlur),"onSortModal"in e&&n(26,I=e.onSortModal),"onTransformModal"in e&&n(27,D=e.onTransformModal),"onJSONEditorModal"in e&&n(28,z=e.onJSONEditorModal)},e.$$.update=function(){524320&e.$$.dirty[0]&&n(44,a=[{type:"button",text:"text",title:"Switch to text mode (current mode: ".concat(h,")"),className:"jse-group-button jse-first"+(h===Ya.text||"code"===h?" jse-selected":""),onClick:function(){return O(Ya.text)}},{type:"button",text:"tree",title:"Switch to tree mode (current mode: ".concat(h,")"),className:"jse-group-button "+(h===Ya.tree?" jse-selected":""),onClick:function(){return O(Ya.tree)}},{type:"button",text:"table",title:"Switch to table mode (current mode: ".concat(h,")"),className:"jse-group-button jse-last"+(h===Ya.table?" jse-selected":""),onClick:function(){return O(Ya.table)}}]),32&e.$$.dirty[0]|8204&e.$$.dirty[1]&&n(32,s=function(e){var t=kI(e[0])?a.concat(e):a.concat(L,e);return P(t,{mode:h,modal:$})||t})},[c,l,u,f,d,h,v,p,m,g,y,b,w,k,x,j,S,C,_,O,M,E,A,T,R,N,I,D,z,r,i,o,s,$,P,function(e){if(r)return r.patch(e);if(i)return i.patch(e);if(o)return o.patch(e);throw new Error('Method patch is not available in mode "'.concat(h,'"'))},function(e){if(r)return r.expand(e);throw new Error('Method expand is not available in mode "'.concat(h,'"'))},function(e){if(o)o.openTransformModal(e);else if(r)r.openTransformModal(e);else{if(!i)throw new Error('Method transform is not available in mode "'.concat(h,'"'));i.openTransformModal(e)}},function(){if(o)return o.validate();if(r)return r.validate();if(i)return i.validate();throw new Error('Method validate is not available in mode "'.concat(h,'"'))},function(){return r?r.acceptAutoRepair():c},function(e){if(r)return r.scrollTo(e);if(i)return i.scrollTo(e);throw new Error('Method scrollTo is not available in mode "'.concat(h,'"'))},function(e){if(r)return r.findElement(e);if(i)return i.findElement(e);throw new Error('Method findElement is not available in mode "'.concat(h,'"'))},function(){o?o.focus():r?r.focus():i&&i.focus()},function(){return B.apply(this,arguments)},a,function(e){ra[e?"unshift":"push"]((function(){n(31,o=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(30,i=e)}))},function(e){ra[e?"unshift":"push"]((function(){n(29,r=e)}))}]}var m8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,p8,v8,Xi,{content:0,selection:1,readOnly:2,indentation:3,tabSize:4,mode:5,mainMenuBar:6,navigationBar:7,statusBar:8,askToFormat:9,escapeControlCharacters:10,escapeUnicodeCharacters:11,flattenColumns:12,parser:13,parseMemoizeOne:14,validator:15,validationParser:16,pathParser:17,insideModal:33,onChange:18,onChangeMode:19,onSelect:20,onRenderValue:21,onClassName:22,onRenderMenu:34,onError:23,onFocus:24,onBlur:25,onSortModal:26,onTransformModal:27,onJSONEditorModal:28,patch:35,expand:36,transform:37,validate:38,acceptAutoRepair:39,scrollTo:40,findElement:41,focus:42,refresh:43},null,[-1,-1]),r}return Di(n,[{key:"patch",get:function(){return this.$$.ctx[35]}},{key:"expand",get:function(){return this.$$.ctx[36]}},{key:"transform",get:function(){return this.$$.ctx[37]}},{key:"validate",get:function(){return this.$$.ctx[38]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[39]}},{key:"scrollTo",get:function(){return this.$$.ctx[40]}},{key:"findElement",get:function(){return this.$$.ctx[41]}},{key:"focus",get:function(){return this.$$.ctx[42]}},{key:"refresh",get:function(){return this.$$.ctx[43]}}]),n}();function g8(e){go(e,"svelte-4nt0y7",".jse-modal.svelte-4nt0y7.svelte-4nt0y7{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-4nt0y7 .jse-modal-contents.svelte-4nt0y7{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-4nt0y7 .jse-modal-contents .jse-actions.svelte-4nt0y7{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-4nt0y7 .jse-modal-contents .jse-actions button.jse-primary.svelte-4nt0y7{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-4nt0y7 .jse-modal-contents .jse-actions button.jse-primary.svelte-4nt0y7:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-4nt0y7 .jse-modal-contents .jse-actions button.jse-primary.svelte-4nt0y7:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-modal-contents.svelte-4nt0y7{padding-top:0;--jse-theme-color:var(--jse-modal-theme-color);--jse-theme-color-highlight:var(--jse-modal-theme-color-highlight)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-modal-contents .jse-label.svelte-4nt0y7{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-modal-contents .jse-label .jse-label-inner.svelte-4nt0y7{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-modal-contents .jse-label .jse-label-inner button.svelte-4nt0y7{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-modal-contents .jse-modal-inline-editor.svelte-4nt0y7{flex:1;min-height:150px;min-width:0;display:flex}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-actions.svelte-4nt0y7{gap:var(--jse-padding);align-items:center}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-actions .jse-error.svelte-4nt0y7{flex:1;color:var(--jse-error-color)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-actions button.jse-secondary.svelte-4nt0y7{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-secondary-background);color:var(--jse-button-secondary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-actions button.jse-secondary.svelte-4nt0y7:hover{background:var(--jse-button-secondary-background-highlight)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 .jse-actions button.jse-secondary.svelte-4nt0y7:disabled{background:var(--jse-button-secondary-background-disabled)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 input.svelte-4nt0y7{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 input.svelte-4nt0y7:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-jsoneditor-modal.svelte-4nt0y7 input.svelte-4nt0y7:read-only{background:var(--jse-input-background-readonly)}")}function y8(e){var t,n;return{c:function(){t=So("div"),n=$o(e[21]),Po(t,"class","jse-error svelte-4nt0y7")},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,t){2097152&t[0]&&Io(n,e[21])},d:function(e){e&&xo(t)}}}function b8(e){var t,n,r,i,o,a;return n=new FM({props:{data:wP}}),{c:function(){t=So("button"),Ta(n.$$.fragment),r=$o(" Back"),Po(t,"type","button"),Po(t,"class","jse-secondary svelte-4nt0y7")},m:function(s,c){ko(s,t,c),Ra(n,t,null),mo(t,r),i=!0,o||(a=Mo(t,"click",e[26]),o=!0)},p:Hi,i:function(e){i||(xa(n.$$.fragment,e),i=!0)},o:function(e){ja(n.$$.fragment,e),i=!1},d:function(e){e&&xo(t),Na(n),o=!1,a()}}}function w8(e){var t,n,r;return{c:function(){(t=So("button")).textContent="Close",Po(t,"type","button"),Po(t,"class","jse-primary svelte-4nt0y7")},m:function(i,o){ko(i,t,o),n||(r=[Mo(t,"click",e[26]),co(j8.call(null,t))],n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,Qi(r)}}}function k8(e){var t,n,r;return{c:function(){(t=So("button")).textContent="Apply",Po(t,"type","button"),Po(t,"class","jse-primary svelte-4nt0y7")},m:function(i,o){ko(i,t,o),n||(r=[Mo(t,"click",e[25]),co(j8.call(null,t))],n=!0)},p:Hi,d:function(e){e&&xo(t),n=!1,Qi(r)}}}function x8(e){var t,n,r,i,o,a,s,c,l,u,f,d,h,v,p,m,g,y,b;n=new mI({props:{title:"Edit nested content "+(e[19].length>1?" (".concat(e[19].length,")"):""),onClose:e[26]}});var w={mode:e[22].mode,content:e[22].content,selection:e[22].selection,readOnly:e[0],indentation:e[1],tabSize:e[2],statusBar:e[5],askToFormat:e[6],mainMenuBar:e[3],navigationBar:e[4],escapeControlCharacters:e[7],escapeUnicodeCharacters:e[8],flattenColumns:e[9],parser:e[10],parseMemoizeOne:e[23],validator:e[11],validationParser:e[12],pathParser:e[13],insideModal:!0,onError:e[30],onChange:e[27],onChangeMode:e[29],onSelect:e[28],onRenderValue:e[14],onClassName:e[15],onFocus:oF,onBlur:oF,onRenderMenu:e[16],onSortModal:e[17],onTransformModal:e[18],onJSONEditorModal:e[31]};d=new m8({props:w}),e[36](d);var k=e[21]&&y8(e),x=e[19].length>1&&b8(e);function j(e,t){return e[0]?w8:k8}var S=j(e),C=S(e);return{c:function(){t=So("div"),Ta(n.$$.fragment),r=_o(),i=So("div"),(o=So("div")).innerHTML='<div class="jse-label-inner svelte-4nt0y7">Path</div>',a=_o(),s=So("input"),c=_o(),(l=So("div")).innerHTML='<div class="jse-label-inner svelte-4nt0y7">Contents</div>',u=_o(),f=So("div"),Ta(d.$$.fragment),h=_o(),v=So("div"),k&&k.c(),p=_o(),x&&x.c(),m=_o(),C.c(),Po(o,"class","jse-label svelte-4nt0y7"),Po(s,"class","jse-path svelte-4nt0y7"),Po(s,"type","text"),s.readOnly=!0,Po(s,"title","Selected path"),s.value=e[24],Po(l,"class","jse-label svelte-4nt0y7"),Po(f,"class","jse-modal-inline-editor svelte-4nt0y7"),Po(v,"class","jse-actions svelte-4nt0y7"),Po(i,"class","jse-modal-contents svelte-4nt0y7"),Po(t,"class","jse-modal jse-jsoneditor-modal svelte-4nt0y7")},m:function(w,j){ko(w,t,j),Ra(n,t,null),mo(t,r),mo(t,i),mo(i,o),mo(i,a),mo(i,s),mo(i,c),mo(i,l),mo(i,u),mo(i,f),Ra(d,f,null),mo(i,h),mo(i,v),k&&k.m(v,null),mo(v,p),x&&x.m(v,null),mo(v,m),C.m(v,null),g=!0,y||(b=co(nD.call(null,t,e[26])),y=!0)},p:function(e,t){var r={};524288&t[0]&&(r.title="Edit nested content "+(e[19].length>1?" (".concat(e[19].length,")"):"")),n.$set(r),(!g||16777216&t[0]&&s.value!==e[24])&&(s.value=e[24]);var i={};4194304&t[0]&&(i.mode=e[22].mode),4194304&t[0]&&(i.content=e[22].content),4194304&t[0]&&(i.selection=e[22].selection),1&t[0]&&(i.readOnly=e[0]),2&t[0]&&(i.indentation=e[1]),4&t[0]&&(i.tabSize=e[2]),32&t[0]&&(i.statusBar=e[5]),64&t[0]&&(i.askToFormat=e[6]),8&t[0]&&(i.mainMenuBar=e[3]),16&t[0]&&(i.navigationBar=e[4]),128&t[0]&&(i.escapeControlCharacters=e[7]),256&t[0]&&(i.escapeUnicodeCharacters=e[8]),512&t[0]&&(i.flattenColumns=e[9]),1024&t[0]&&(i.parser=e[10]),8388608&t[0]&&(i.parseMemoizeOne=e[23]),2048&t[0]&&(i.validator=e[11]),4096&t[0]&&(i.validationParser=e[12]),8192&t[0]&&(i.pathParser=e[13]),16384&t[0]&&(i.onRenderValue=e[14]),32768&t[0]&&(i.onClassName=e[15]),65536&t[0]&&(i.onRenderMenu=e[16]),131072&t[0]&&(i.onSortModal=e[17]),262144&t[0]&&(i.onTransformModal=e[18]),d.$set(i),e[21]?k?k.p(e,t):((k=y8(e)).c(),k.m(v,p)):k&&(k.d(1),k=null),e[19].length>1?x?(x.p(e,t),524288&t[0]&&xa(x,1)):((x=b8(e)).c(),xa(x,1),x.m(v,m)):x&&(wa(),ja(x,1,1,(function(){x=null})),ka()),S===(S=j(e))&&C?C.p(e,t):(C.d(1),(C=S(e))&&(C.c(),C.m(v,null)))},i:function(e){g||(xa(n.$$.fragment,e),xa(d.$$.fragment,e),xa(x),g=!0)},o:function(e){ja(n.$$.fragment,e),ja(d.$$.fragment,e),ja(x),g=!1},d:function(r){r&&xo(t),Na(n),e[36](null),Na(d),k&&k.d(),x&&x.d(),C.d(),y=!1,b()}}}function j8(e){e.focus()}function S8(e,t,n){var r,i,o,a,s,c=za("jsoneditor:JSONEditorModal"),l=t.content,u=t.path,f=t.onPatch,d=t.readOnly,h=t.indentation,v=t.tabSize,p=t.mainMenuBar,m=t.navigationBar,g=t.statusBar,y=t.askToFormat,b=t.escapeControlCharacters,w=t.escapeUnicodeCharacters,k=t.flattenColumns,x=t.parser,j=t.validator,S=t.validationParser,C=t.pathParser,$=t.onRenderValue,_=t.onClassName,O=t.onRenderMenu,M=t.onSortModal,E=t.onTransformModal,A=ea("simple-modal").close,P={mode:N(l),content:l,selection:null,relativePath:u},T=[P],R=void 0;function N(e){return uO(e)&&Ns(e.json)?Ya.table:Ya.tree}function I(){var e,t=(null===(e=Mb(T))||void 0===e?void 0:e.selection)||null;t&&s.scrollTo(fA(t))}return e.$$set=function(e){"content"in e&&n(32,l=e.content),"path"in e&&n(33,u=e.path),"onPatch"in e&&n(34,f=e.onPatch),"readOnly"in e&&n(0,d=e.readOnly),"indentation"in e&&n(1,h=e.indentation),"tabSize"in e&&n(2,v=e.tabSize),"mainMenuBar"in e&&n(3,p=e.mainMenuBar),"navigationBar"in e&&n(4,m=e.navigationBar),"statusBar"in e&&n(5,g=e.statusBar),"askToFormat"in e&&n(6,y=e.askToFormat),"escapeControlCharacters"in e&&n(7,b=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(8,w=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(9,k=e.flattenColumns),"parser"in e&&n(10,x=e.parser),"validator"in e&&n(11,j=e.validator),"validationParser"in e&&n(12,S=e.validationParser),"pathParser"in e&&n(13,C=e.pathParser),"onRenderValue"in e&&n(14,$=e.onRenderValue),"onClassName"in e&&n(15,_=e.onClassName),"onRenderMenu"in e&&n(16,O=e.onRenderMenu),"onSortModal"in e&&n(17,M=e.onSortModal),"onTransformModal"in e&&n(18,E=e.onTransformModal)},e.$$.update=function(){524288&e.$$.dirty[0]&&n(22,r=Mb(T)||P),524288&e.$$.dirty[0]&&n(35,i=T.flatMap((function(e){return e.relativePath}))),16&e.$$.dirty[1]&&n(24,o=Fk(i)?"(document root)":lM(i)),1024&e.$$.dirty[0]&&n(23,a=VB(x.parse))},[d,h,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O,M,E,T,s,R,r,a,o,function(){if(c("handleApply"),!d)try{n(21,R=void 0);var e=r.relativePath,t=r.content,i=[{op:"replace",path:oc(e),value:dO(t,x).json}];if(T.length>1){var o={json:lc(dO(T[T.length-2].content,x).json,i)},a=Ri(Ri({},T[T.length-2]||P),{},{content:o});n(19,T=[].concat(Bi(T.slice(0,T.length-2)),[a])),la().then(I)}else f(i),A()}catch(e){n(21,R=String(e))}},function(){c("handleClose"),T.length>1?(n(19,T=fk(T)),la().then(I),n(21,R=void 0)):A()},function(e){c("handleChange",e);var t=Ri(Ri({},r),{},{content:e});n(19,T=[].concat(Bi(fk(T)),[t]))},function(e){c("handleChangeSelection",e);var t=Ri(Ri({},r),{},{selection:e});n(19,T=[].concat(Bi(fk(T)),[t]))},function(e){c("handleChangeMode",e);var t=Ri(Ri({},r),{},{mode:e});n(19,T=[].concat(Bi(fk(T)),[t]))},function(e){n(21,R=e.toString()),console.error(e)},function(e){var t=e.content,r=e.path;c("handleJSONEditorModal",{content:t,path:r});var i={mode:N(t),content:t,selection:null,relativePath:r};n(19,T=[].concat(Bi(T),[i]))},l,u,f,i,function(e){ra[e?"unshift":"push"]((function(){n(20,s=e)}))}]}var C8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,S8,x8,Zi,{content:32,path:33,onPatch:34,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,askToFormat:6,escapeControlCharacters:7,escapeUnicodeCharacters:8,flattenColumns:9,parser:10,validator:11,validationParser:12,pathParser:13,onRenderValue:14,onClassName:15,onRenderMenu:16,onSortModal:17,onTransformModal:18},g8,[-1,-1]),r}return Di(n)}();function $8(e,t,n){var r=ea("simple-modal");return[r.open,r.close]}var _8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,$8,null,Zi,{open:0,close:1}),r}return Di(n,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),n}();function O8(e){go(e,"svelte-hsp9wr",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-main-menu:14px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-hsp9wr{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function M8(e){var t,n,r={mode:e[1],content:e[0],selection:e[2],readOnly:e[3],indentation:e[4],tabSize:e[5],statusBar:e[8],askToFormat:e[9],mainMenuBar:e[6],navigationBar:e[7],escapeControlCharacters:e[10],escapeUnicodeCharacters:e[11],flattenColumns:e[12],parser:e[13],parseMemoizeOne:e[26],validator:e[14],validationParser:e[15],pathParser:e[16],insideModal:!1,onError:e[20],onChange:e[27],onChangeMode:e[31],onSelect:e[28],onRenderValue:e[17],onClassName:e[18],onFocus:e[29],onBlur:e[30],onRenderMenu:e[19],onSortModal:e[33],onTransformModal:e[32],onJSONEditorModal:e[34]};return t=new m8({props:r}),e[61](t),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};2&n[0]&&(r.mode=e[1]),1&n[0]&&(r.content=e[0]),4&n[0]&&(r.selection=e[2]),8&n[0]&&(r.readOnly=e[3]),16&n[0]&&(r.indentation=e[4]),32&n[0]&&(r.tabSize=e[5]),256&n[0]&&(r.statusBar=e[8]),512&n[0]&&(r.askToFormat=e[9]),64&n[0]&&(r.mainMenuBar=e[6]),128&n[0]&&(r.navigationBar=e[7]),1024&n[0]&&(r.escapeControlCharacters=e[10]),2048&n[0]&&(r.escapeUnicodeCharacters=e[11]),4096&n[0]&&(r.flattenColumns=e[12]),8192&n[0]&&(r.parser=e[13]),67108864&n[0]&&(r.parseMemoizeOne=e[26]),16384&n[0]&&(r.validator=e[14]),32768&n[0]&&(r.validationParser=e[15]),65536&n[0]&&(r.pathParser=e[16]),1048576&n[0]&&(r.onError=e[20]),131072&n[0]&&(r.onRenderValue=e[17]),262144&n[0]&&(r.onClassName=e[18]),524288&n[0]&&(r.onRenderMenu=e[19]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(n){e[61](null),Na(t,n)}}}function E8(e){var t,n,r,i,o,a=e[21];function s(t){e[60](t)}var c={};void 0!==e[24]&&(c.open=e[24]),t=new _8({props:c}),ra.push((function(){return Pa(t,"open",s)}));var l=M8(e);return{c:function(){Ta(t.$$.fragment),r=_o(),i=So("div"),l.c(),Po(i,"class","jse-main svelte-hsp9wr"),Bo(i,"jse-focus",e[22])},m:function(e,n){Ra(t,e,n),ko(e,r,n),ko(e,i,n),l.m(i,null),o=!0},p:function(e,r){var s={};!n&&16777216&r[0]&&(n=!0,s.open=e[24],fa((function(){return n=!1}))),t.$set(s),2097152&r[0]&&Zi(a,a=e[21])?(wa(),ja(l,1,1,Hi),ka(),(l=M8(e)).c(),xa(l,1),l.m(i,null)):l.p(e,r),(!o||4194304&r[0])&&Bo(i,"jse-focus",e[22])},i:function(e){o||(xa(t.$$.fragment,e),xa(l),o=!0)},o:function(e){ja(t.$$.fragment,e),ja(l),o=!1},d:function(e){e&&(xo(r),xo(i)),Na(t,e),l.d(e)}}}function A8(e){var t,n;return t=new is({props:{closeOnEsc:!1,$$slots:{default:[E8]},$$scope:{ctx:e}}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};100663295&n[0]|4&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function P8(e){for(var t,n,r,i=[{show:null===(t=e[25])||void 0===t?void 0:t.component},ks,{closeOnEsc:!1}],o={$$slots:{default:[A8]},$$scope:{ctx:e}},a=0;a<i.length;a+=1)o=Ji(o,i[a]);return(n=new is({props:o})).$on("close",e[35]),{c:function(){Ta(n.$$.fragment)},m:function(e,t){Ra(n,e,t),r=!0},p:function(e,t){var r,o=33554432&t[0]?Ea(i,[{show:null===(r=e[25])||void 0===r?void 0:r.component},i[1],i[2]]):{};100663295&t[0]|4&t[2]&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ja(n.$$.fragment,e),r=!1},d:function(e){Na(n,e)}}}function T8(e){var t,n;return t=new cM({props:{$$slots:{default:[P8]},$$scope:{ctx:e}}}),{c:function(){Ta(t.$$.fragment)},m:function(e,r){Ra(t,e,r),n=!0},p:function(e,n){var r={};134217727&n[0]|4&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ja(t.$$.fragment,e),n=!1},d:function(e){Na(t,e)}}}function R8(e,t,n){var r,i,o,a=za("jsoneditor:JSONEditor"),s=t.content,c=void 0===s?{text:""}:s,l=t.selection,u=void 0===l?null:l,f=t.readOnly,d=void 0!==f&&f,h=t.indentation,v=void 0===h?2:h,p=t.tabSize,m=void 0===p?4:p,g=t.mode,y=void 0===g?Ya.tree:g,b=t.mainMenuBar,w=void 0===b||b,k=t.navigationBar,x=void 0===k||k,j=t.statusBar,S=void 0===j||j,C=t.askToFormat,$=void 0===C||C,_=t.escapeControlCharacters,O=void 0!==_&&_,M=t.escapeUnicodeCharacters,E=void 0!==M&&M,A=t.flattenColumns,P=void 0===A||A,T=t.parser,R=void 0===T?JSON:T,N=t.validator,I=void 0===N?null:N,D=t.validationParser,z=void 0===D?JSON:D,L=t.pathParser,B=void 0===L?{parse:uM,stringify:lM}:L,q=t.queryLanguages,F=void 0===q?[bM]:q,V=t.queryLanguageId,W=void 0===V?F[0].id:V,H=t.onChangeQueryLanguage,U=void 0===H?oF:H,J=t.onChange,K=void 0===J?null:J,G=t.onSelect,Q=void 0===G?oF:G,Y=t.onRenderValue,X=void 0===Y?hP:Y,Z=t.onClassName,ee=void 0===Z?function(){}:Z,te=t.onRenderMenu,ne=void 0===te?oF:te,re=t.onChangeMode,ie=void 0===re?oF:re,oe=t.onError,ae=void 0===oe?function(e){console.error(e),alert(e.toString())}:oe,se=t.onFocus,ce=void 0===se?oF:se,le=t.onBlur,ue=void 0===le?oF:le,fe=Ts(),de=!1,he=null,ve=R;function pe(){return(pe=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a("set"),!(r=sO(t))){e.next=4;break}throw new Error(r);case 4:return n(21,fe=Ts()),e.next=7,la();case 7:n(0,c=t);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(){return(me=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a("update"),!(r=sO(t))){e.next=4;break}throw new Error(r);case 4:return n(0,c=t),e.next=7,la();case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ge(){return ge=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!lO(c)){e.next=8;break}e.prev=1,n(0,c={json:R.parse(c.text),text:void 0}),e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(1),new Error("Cannot apply patch: current document contains invalid JSON");case 8:return r=i.patch(t),e.next=11,la();case 11:return e.abrupt("return",r);case 12:case"end":return e.stop()}}),e,null,[[1,5]])}))),ge.apply(this,arguments)}function ye(){return(ye=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(2,u=t),e.next=3,la();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(){return(be=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.expand(t),e.next=3,la();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(){return we=ki(bi().mark((function e(){var t;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.acceptAutoRepair(),e.next=3,la();case 3:return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))),we.apply(this,arguments)}function ke(){return(ke=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.scrollTo(t);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xe(){return je.apply(this,arguments)}function je(){return(je=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.focus(),e.next=3,la();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Se(){return(Se=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.refresh();case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ce(){return(Ce=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$set(t),e.next=3,la();case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function $e(){return($e=ki(bi().mark((function e(){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$destroy(),e.next=3,la();case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function _e(){return(_e=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y!==t){e.next=2;break}return e.abrupt("return");case 2:return n(1,y=t),e.next=5,la();case 5:return e.next=7,xe();case 7:ie(t);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(e){a("handleChangeQueryLanguage",e),n(36,W=e),U(e)}function Me(e){var t=e.id,n=e.json,i=e.rootPath,a=e.onTransform,s=e.onClose;d||o(Qq,{id:t,json:n,rootPath:i,indentation:v,escapeControlCharacters:O,escapeUnicodeCharacters:E,parser:R,parseMemoizeOne:r,validationParser:z,pathParser:B,queryLanguages:F,queryLanguageId:W,onChangeQueryLanguage:Oe,onRenderValue:X,onClassName:ee,onTransform:a},ws,{onClose:s})}function Ee(e){var t=e.id,n=e.json,r=e.rootPath,i=e.onSort,a=e.onClose;d||o(iF,{id:t,json:n,rootPath:r,onSort:i},bs,{onClose:a})}return e.$$set=function(e){"content"in e&&n(0,c=e.content),"selection"in e&&n(2,u=e.selection),"readOnly"in e&&n(3,d=e.readOnly),"indentation"in e&&n(4,v=e.indentation),"tabSize"in e&&n(5,m=e.tabSize),"mode"in e&&n(1,y=e.mode),"mainMenuBar"in e&&n(6,w=e.mainMenuBar),"navigationBar"in e&&n(7,x=e.navigationBar),"statusBar"in e&&n(8,S=e.statusBar),"askToFormat"in e&&n(9,$=e.askToFormat),"escapeControlCharacters"in e&&n(10,O=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(11,E=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(12,P=e.flattenColumns),"parser"in e&&n(13,R=e.parser),"validator"in e&&n(14,I=e.validator),"validationParser"in e&&n(15,z=e.validationParser),"pathParser"in e&&n(16,B=e.pathParser),"queryLanguages"in e&&n(37,F=e.queryLanguages),"queryLanguageId"in e&&n(36,W=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(38,U=e.onChangeQueryLanguage),"onChange"in e&&n(39,K=e.onChange),"onSelect"in e&&n(40,Q=e.onSelect),"onRenderValue"in e&&n(17,X=e.onRenderValue),"onClassName"in e&&n(18,ee=e.onClassName),"onRenderMenu"in e&&n(19,ne=e.onRenderMenu),"onChangeMode"in e&&n(41,ie=e.onChangeMode),"onError"in e&&n(20,ae=e.onError),"onFocus"in e&&n(42,ce=e.onFocus),"onBlur"in e&&n(43,ue=e.onBlur)},e.$$.update=function(){if(8193&e.$$.dirty[0]|268435456&e.$$.dirty[1]&&(bO(R,ve)||(a("parser changed, recreate editor"),uO(c)&&n(0,c={json:R.parse(ve.stringify(c.json))}),n(59,ve=R),n(21,fe=Ts()))),1&e.$$.dirty[0]){var t=sO(c);t&&console.error("Error: "+t)}8192&e.$$.dirty[0]&&n(26,r=VB(R.parse)),2&e.$$.dirty[0]&&(a("mode changed to",y),"code"===y&&console.warn('Deprecation warning: "code" mode is renamed to "text". Please use mode="text" instead.'))},[c,y,u,d,v,m,w,x,S,$,O,E,P,R,I,z,B,X,ee,ne,ae,fe,de,i,o,he,r,function(e,t,r){n(0,c=e),K&&K(e,t,r)},function(e){n(2,u=e),Q(e)},function(){n(22,de=!0),ce&&ce()},function(){n(22,de=!1),ue&&ue()},function(e){return _e.apply(this,arguments)},Me,Ee,function(e){var t=e.content,r=e.path,i=e.onPatch,o=e.onClose;a("onJSONEditorModal",{content:t,path:r}),n(25,he={component:Ga(C8,{content:t,path:r,onPatch:i,readOnly:d,indentation:v,tabSize:m,mainMenuBar:w,navigationBar:x,statusBar:S,askToFormat:$,escapeControlCharacters:O,escapeUnicodeCharacters:E,flattenColumns:P,parser:R,validator:void 0,validationParser:z,pathParser:B,onRenderValue:X,onClassName:ee,onRenderMenu:ne,onSortModal:Ee,onTransformModal:Me}),callbacks:{onClose:o}})},function(){var e,t;null===(e=he)||void 0===e||null===(e=e.callbacks)||void 0===e||null===(t=e.onClose)||void 0===t||t.call(e),n(25,he=null)},W,F,U,K,Q,ie,ce,ue,function(){return c},function(e){return pe.apply(this,arguments)},function(e){return me.apply(this,arguments)},function(e){return ge.apply(this,arguments)},function(e){return ye.apply(this,arguments)},function(e){return be.apply(this,arguments)},function(e){i.transform(e)},function(){return i.validate()},function(){return we.apply(this,arguments)},function(e){return ke.apply(this,arguments)},function(e){return i.findElement(e)},xe,function(){return Se.apply(this,arguments)},function(e){return Ce.apply(this,arguments)},function(){return $e.apply(this,arguments)},ve,function(e){n(24,o=e)},function(e){ra[e?"unshift":"push"]((function(){n(23,i=e)}))}]}var N8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,R8,T8,Zi,{content:0,selection:2,readOnly:3,indentation:4,tabSize:5,mode:1,mainMenuBar:6,navigationBar:7,statusBar:8,askToFormat:9,escapeControlCharacters:10,escapeUnicodeCharacters:11,flattenColumns:12,parser:13,validator:14,validationParser:15,pathParser:16,queryLanguages:37,queryLanguageId:36,onChangeQueryLanguage:38,onChange:39,onSelect:40,onRenderValue:17,onClassName:18,onRenderMenu:19,onChangeMode:41,onError:20,onFocus:42,onBlur:43,get:44,set:45,update:46,patch:47,select:48,expand:49,transform:50,validate:51,acceptAutoRepair:52,scrollTo:53,findElement:54,focus:55,refresh:56,updateProps:57,destroy:58},O8,[-1,-1,-1]),r}return Di(n,[{key:"get",get:function(){return this.$$.ctx[44]}},{key:"set",get:function(){return this.$$.ctx[45]}},{key:"update",get:function(){return this.$$.ctx[46]}},{key:"patch",get:function(){return this.$$.ctx[47]}},{key:"select",get:function(){return this.$$.ctx[48]}},{key:"expand",get:function(){return this.$$.ctx[49]}},{key:"transform",get:function(){return this.$$.ctx[50]}},{key:"validate",get:function(){return this.$$.ctx[51]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[52]}},{key:"scrollTo",get:function(){return this.$$.ctx[53]}},{key:"findElement",get:function(){return this.$$.ctx[54]}},{key:"focus",get:function(){return this.$$.ctx[55]}},{key:"refresh",get:function(){return this.$$.ctx[56]}},{key:"updateProps",get:function(){return this.$$.ctx[57]}},{key:"destroy",get:function(){return this.$$.ctx[58]}}]),n}();function I8(e){go(e,"svelte-rc6e9m",".jse-value.jse-string.svelte-rc6e9m{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-rc6e9m,.jse-value.jse-array.svelte-rc6e9m{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-rc6e9m{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-rc6e9m{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-rc6e9m{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-rc6e9m{color:var(--jse-text-color)}.jse-value.jse-url.svelte-rc6e9m{color:var(--jse-value-color-url);text-decoration:underline}.jse-enum-value.svelte-rc6e9m{background:var(--jse-hover-background-color);border:none;padding:0;font-family:inherit;font-size:inherit;cursor:pointer;outline:none}.jse-enum-value.jse-selected.svelte-rc6e9m{background:var(--jse-selection-background-color);color:inherit}.jse-enum-value.jse-value.svelte-rc6e9m:focus{color:var(--jse-text-color)}.jse-json-node.jse-selected .jse-enum-value.svelte-rc6e9m{background:transparent}")}function D8(e,t,n){var r=e.slice();return r[13]=t[n],r}function z8(e){var t,n,r,i=e[13].text+"";return{c:function(){t=So("option"),n=$o(i),t.__value=r=e[13].value,Do(t,t.__value)},m:function(e,r){ko(e,t,r),mo(t,n)},p:function(e,o){4&o&&i!==(i=e[13].text+"")&&Io(n,i),4&o&&r!==(r=e[13].value)&&(t.__value=r,Do(t,t.__value))},d:function(e){e&&xo(t)}}}function L8(e){for(var t,n,r,i,o=$a(e[2]),a=[],s=0;s<o.length;s+=1)a[s]=z8(D8(e,o,s));return{c:function(){t=So("select");for(var r=0;r<a.length;r+=1)a[r].c();Po(t,"class",n=so("jse-enum-value ".concat(vA(e[4],e[0])))+" svelte-rc6e9m"),void 0===e[4]&&ua((function(){return e[10].call(t)})),Bo(t,"jse-selected",RE(e[1]))},m:function(n,o){ko(n,t,o);for(var s=0;s<a.length;s+=1)a[s]&&a[s].m(t,null);Lo(t,e[4],!0),e[11](t),r||(i=[Mo(t,"change",e[10]),Mo(t,"change",e[5]),Mo(t,"mousedown",B8)],r=!0)},p:function(e,r){var i=xi(r,1)[0];if(4&i){var s;for(o=$a(e[2]),s=0;s<o.length;s+=1){var c=D8(e,o,s);a[s]?a[s].p(c,i):(a[s]=z8(c),a[s].c(),a[s].m(t,null))}for(;s<a.length;s+=1)a[s].d(1);a.length=o.length}17&i&&n!==(n=so("jse-enum-value ".concat(vA(e[4],e[0])))+" svelte-rc6e9m")&&Po(t,"class",n),16&i&&Lo(t,e[4]),19&i&&Bo(t,"jse-selected",RE(e[1]))},i:Hi,o:Hi,d:function(n){n&&xo(t),jo(a,n),e[11](null),r=!1,Qi(i)}}}function B8(e){e.stopPropagation()}function q8(e,t,n){var r,i=t.path,o=t.value,a=t.parser,s=t.readOnly,c=t.selection,l=t.onPatch,u=t.options,f=o;return e.$$set=function(e){"path"in e&&n(6,i=e.path),"value"in e&&n(7,o=e.value),"parser"in e&&n(0,a=e.parser),"readOnly"in e&&n(8,s=e.readOnly),"selection"in e&&n(1,c=e.selection),"onPatch"in e&&n(9,l=e.onPatch),"options"in e&&n(2,u=e.options)},e.$$.update=function(){128&e.$$.dirty&&n(4,f=o),2&e.$$.dirty&&function(e){e&&r&&r.focus()}(c)},[a,c,u,r,f,function(e){e.stopPropagation(),s||l([{op:"replace",path:oc(i),value:f}])},i,o,s,l,function(){var e;e=this.querySelector(":checked"),f=e&&e.__value,n(4,f),n(7,o)},function(e){ra[e?"unshift":"push"]((function(){n(3,r=e),n(2,u)}))}]}var F8=function(e){_i(n,Da);var t=Mi(n);function n(e){var r;return Ni(this,n),Ia(Ei(r=t.call(this)),e,q8,L8,Zi,{path:6,value:7,parser:0,readOnly:8,selection:1,onPatch:9,options:2},I8),r}return Di(n)}();function V8(e,t,n){var r=W8(e,t||{},n);return r?function(e){if(Array.isArray(e.enum))return e.enum;var t=e.oneOf||e.anyOf||e.allOf;if(Array.isArray(t)){var n=t.filter((function(e){return e.enum}));if(n.length>0)return n[0].enum}return null}(r):null}function W8(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=n.slice(1,n.length),o=n[0],a=[r],s=0,c=[r.oneOf,r.anyOf,r.allOf];s<c.length;s++){var l=c[s];Array.isArray(l)&&(a=a.concat(l))}var u,f=yi(a);try{for(f.s();!(u=f.n()).done;){if("$ref"in(r=u.value)&&"string"==typeof r.$ref){var d,h=r.$ref;if(h in t)r=t[h];else{if(!h.startsWith("#/")){if(1===(null===(d=h.match(/#\//g))||void 0===d?void 0:d.length)){var v=xi(h.split("#/"),2),p=v[0],m=v[1];if(p in t){var g=t[p],y={$ref:"#/".concat(m)},b=[];return b.push(o),i.length>0&&b.push.apply(b,Bi(i)),W8(g,t,b,y)}throw Error("Unable to resolve reference ".concat(h))}throw Error("Unable to resolve reference ".concat(h))}var w=h.substring(2).split("/");r=e;var k,x=yi(w);try{for(x.s();!(k=x.n()).done;){var j=k.value;if(!(j in r))throw Error("Unable to resolve reference ".concat(h));r=r[j]}}catch(e){x.e(e)}finally{x.f()}}}if(void 0===o)return r;if("object"===Wi(r.properties)&&null!==r.properties&&o in r.properties)return W8(e,t,i,r=r.properties[o]);if("object"===Wi(r.patternProperties)&&null!==r.patternProperties)for(var S in r.patternProperties)if(o.match(S))return W8(e,t,i,r=r.patternProperties[S]);if("object"===Wi(r.additionalProperties))return W8(e,t,i,r=r.additionalProperties);if("object"===Wi(r.items)&&null!==r.items)return W8(e,t,i,r=r.items)}}catch(e){f.e(e)}finally{f.f()}return null}function H8(e,t,n){var r=V8(t,n,e.path);if(r){var i=e.value,o=e.path,a=e.selection,s=e.parser,c=e.readOnly,l=e.onPatch,u=r.map((function(e){return{value:e,text:e}})),f=r.includes(e.value)?u:[{value:i,text:i}].concat(u);return[{component:F8,props:{value:i,path:o,selection:a,parser:s,readOnly:c,onPatch:l,options:f}}]}return null}var U8,J8={exports:{}},K8={},G8={},Q8={},Y8={},X8={},Z8={};function e5(){return U8||(U8=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;var r=Di((function e(){Ni(this,e)}));n._CodeOrName=r,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var i=function(e){_i(r,e);var t=Mi(r);function r(e){var i;if(Ni(this,r),i=t.call(this),!n.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");return i.str=e,i}return Di(r,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){return!1}},{key:"names",get:function(){return zi({},this.str,1)}}]),r}(r);n.Name=i;var o=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this))._items="string"==typeof e?[e]:e,r}return Di(n,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){if(this._items.length>1)return!1;var e=this._items[0];return""===e||'""'===e}},{key:"str",get:function(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((function(e,t){return"".concat(e).concat(t)}),"")}},{key:"names",get:function(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((function(e,t){return t instanceof i&&(e[t.str]=(e[t.str]||0)+1),e}),{})}}]),n}(r);function a(e){for(var t=[e[0]],n=0,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];for(;n<i.length;)l(t,i[n]),t.push(e[++n]);return new o(t)}n._Code=o,n.nil=new o(""),n._=a;var s=new o("+");function c(e){for(var t=[f(e[0])],n=0,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];for(;n<i.length;)t.push(s),l(t,i[n]),t.push(s,f(e[++n]));return function(e){var t=1;for(;t<e.length-1;){if(e[t]===s){var n=u(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(t),new o(t)}function l(e,t){var n;t instanceof o?e.push.apply(e,Bi(t._items)):t instanceof i?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:f(Array.isArray(n)?n.join(","):n))}function u(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof i||'"'!==e[e.length-1])return;return"string"!=typeof t?"".concat(e.slice(0,-1)).concat(t,'"'):'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof i?void 0:'"'.concat(e).concat(t.slice(1))}function f(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}n.str=c,n.addCodeArg=l,n.strConcat=function(t,n){return n.emptyStr()?t:t.emptyStr()?n:c(e||(e=pi(["","",""])),t,n)},n.stringify=function(e){return new o(f(e))},n.safeStringify=f,n.getProperty=function(e){return"string"==typeof e&&n.IDENTIFIER.test(e)?new o(".".concat(e)):a(t||(t=pi(["[","]"])),e)},n.getEsmExportName=function(e){if("string"==typeof e&&n.IDENTIFIER.test(e))return new o("".concat(e));throw new Error("CodeGen: invalid export name: ".concat(e,", use explicit $id name mapping"))},n.regexpCode=function(e){return new o(e.toString())}}(Z8)),Z8}var t5,n5,r5={};function i5(){return t5||(t5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t,s=e5(),c=function(e){_i(n,Ci(Error));var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this,'CodeGen: "code" for '.concat(e," not defined"))).value=e.value,r}return Di(n)}();!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(t=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefixes,r=t.parent;Ni(this,e),this._names={},this._prefixes=n,this._parent=r}return Di(e,[{key:"toName",value:function(e){return e instanceof s.Name?e:this.name(e)}},{key:"name",value:function(e){return new s.Name(this._newName(e))}},{key:"_newName",value:function(e){var t=this._names[e]||this._nameGroup(e);return"".concat(e).concat(t.index++)}},{key:"_nameGroup",value:function(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error('CodeGen: prefix "'.concat(e,'" is not allowed in this scope'));return this._names[e]={prefix:e,index:0}}}]),e}();e.Scope=l;var u=function(e){_i(r,e);var t=Mi(r);function r(e,n){var i;return Ni(this,r),(i=t.call(this,n)).prefix=e,i}return Di(r,[{key:"setValue",value:function(e,t){var r=t.property,i=t.itemIndex;this.value=e,this.scopePath=(0,s._)(n||(n=pi([".","[","]"])),new s.Name(r),i)}}]),r}(s.Name);e.ValueScopeName=u;var f=(0,s._)(r||(r=pi(["\n"],["\\n"]))),d=function(n){_i(l,n);var r=Mi(l);function l(e){var t;return Ni(this,l),(t=r.call(this,e))._values={},t._scope=e.scope,t.opts=Ri(Ri({},e),{},{_n:e.lines?f:s.nil}),t}return Di(l,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(e){return new u(e,this._newName(e))}},{key:"value",value:function(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");var r=this.toName(e),i=r.prefix,o=null!==(n=t.key)&&void 0!==n?n:t.ref,a=this._values[i];if(a){var s=a.get(o);if(s)return s}else a=this._values[i]=new Map;a.set(o,r);var c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:i,itemIndex:l}),r}},{key:"getValue",value:function(e,t){var n=this._values[e];if(n)return n.get(t)}},{key:"scopeRefs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values;return this._reduceValues(t,(function(t){if(void 0===t.scopePath)throw new Error('CodeGen: name "'.concat(t,'" has no value'));return(0,s._)(i||(i=pi(["","",""])),e,t.scopePath)}))}},{key:"scopeCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return this._reduceValues(e,(function(e){if(void 0===e.value)throw new Error('CodeGen: name "'.concat(e,'" has no value'));return e.value.code}),t,n)}},{key:"_reduceValues",value:function(n,r){var i=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,f=s.nil,d=function(){var d=n[h];if(!d)return 1;var v=l[h]=l[h]||new Map;d.forEach((function(n){if(!v.has(n)){v.set(n,t.Started);var l=r(n);if(l){var d=i.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,s._)(o||(o=pi(["",""," "," = ",";",""])),f,d,n,l,i.opts._n)}else{if(!(l=null==u?void 0:u(n)))throw new c(n);f=(0,s._)(a||(a=pi(["","","",""])),f,l,i.opts._n)}v.set(n,t.Completed)}}))};for(var h in n)d();return f}}]),l}(l);e.ValueScope=d}(r5)),r5}function o5(){return n5||(n5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=e5(),n=i5(),r=e5();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=i5();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var o=function(){function e(){Ni(this,e)}return Di(e,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(e,t){return this}}]),e}(),a=function(e){_i(i,e);var r=Mi(i);function i(e,t,n){var o;return Ni(this,i),(o=r.call(this)).varKind=e,o.name=t,o.rhs=n,o}return Di(i,[{key:"render",value:function(e){var t=e.es5,r=e._n,i=t?n.varKinds.var:this.varKind,o=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(i," ").concat(this.name).concat(o,";")+r}},{key:"optimizeNames",value:function(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}},{key:"names",get:function(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}]),i}(o),h=function(e){_i(r,e);var n=Mi(r);function r(e,t,i){var o;return Ni(this,r),(o=n.call(this)).lhs=e,o.rhs=t,o.sideEffects=i,o}return Di(r,[{key:"render",value:function(e){var t=e._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+t}},{key:"optimizeNames",value:function(e,n){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,n),this}},{key:"names",get:function(){return N(this.lhs instanceof t.Name?{}:Ri({},this.lhs.names),this.rhs)}}]),r}(o),v=function(e){_i(n,e);var t=Mi(n);function n(e,r,i,o){var a;return Ni(this,n),(a=t.call(this,e,i,o)).op=r,a}return Di(n,[{key:"render",value:function(e){var t=e._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}}]),n}(h),p=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).label=e,r.names={},r}return Di(n,[{key:"render",value:function(e){var t=e._n;return"".concat(this.label,":")+t}}]),n}(o),m=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).label=e,r.names={},r}return Di(n,[{key:"render",value:function(e){var t=e._n,n=this.label?" ".concat(this.label):"";return"break".concat(n,";")+t}}]),n}(o),g=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).error=e,r}return Di(n,[{key:"render",value:function(e){var t=e._n;return"throw ".concat(this.error,";")+t}},{key:"names",get:function(){return this.error.names}}]),n}(o),y=function(e){_i(r,e);var n=Mi(r);function r(e){var t;return Ni(this,r),(t=n.call(this)).code=e,t}return Di(r,[{key:"render",value:function(e){var t=e._n;return"".concat(this.code,";")+t}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(e,t){return this.code=I(this.code,e,t),this}},{key:"names",get:function(){return this.code instanceof t._CodeOrName?this.code.names:{}}}]),r}(o),b=function(e){_i(n,e);var t=Mi(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Ni(this,n),(e=t.call(this)).nodes=r,e}return Di(n,[{key:"render",value:function(e){return this.nodes.reduce((function(t,n){return t+n.render(e)}),"")}},{key:"optimizeNodes",value:function(){for(var e=this.nodes,t=e.length;t--;){var n=e[t].optimizeNodes();Array.isArray(n)?e.splice.apply(e,[t,1].concat(Bi(n))):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}},{key:"optimizeNames",value:function(e,t){for(var n=this.nodes,r=n.length;r--;){var i=n[r];i.optimizeNames(e,t)||(D(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce((function(e,t){return R(e,t.names)}),{})}}]),n}(o),w=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"render",value:function(e){return"{"+e._n+mi(Pi(n.prototype),"render",this).call(this,e)+"}"+e._n}}]),n}(b),k=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n)}(b),x=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n)}(w);x.kind="else";var j=function(e){_i(n,e);var t=Mi(n);function n(e,r){var i;return Ni(this,n),(i=t.call(this,r)).condition=e,i}return Di(n,[{key:"render",value:function(e){var t="if(".concat(this.condition,")")+mi(Pi(n.prototype),"render",this).call(this,e);return this.else&&(t+="else "+this.else.render(e)),t}},{key:"optimizeNodes",value:function(){mi(Pi(n.prototype),"optimizeNodes",this).call(this);var e=this.condition;if(!0===e)return this.nodes;var t=this.else;if(t){var r=t.optimizeNodes();t=this.else=Array.isArray(r)?new x(r):r}return t?!1===e?t instanceof n?t:t.nodes:this.nodes.length?this:new n(z(e),t instanceof n?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),mi(Pi(n.prototype),"optimizeNames",this).call(this,e,t)||this.else)return this.condition=I(this.condition,e,t),this}},{key:"names",get:function(){var e=mi(Pi(n.prototype),"names",this);return N(e,this.condition),this.else&&R(e,this.else.names),e}}]),n}(w);j.kind="if";var S=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n)}(w);S.kind="for";var C=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).iteration=e,r}return Di(n,[{key:"render",value:function(e){return"for(".concat(this.iteration,")")+mi(Pi(n.prototype),"render",this).call(this,e)}},{key:"optimizeNames",value:function(e,t){if(mi(Pi(n.prototype),"optimizeNames",this).call(this,e,t))return this.iteration=I(this.iteration,e,t),this}},{key:"names",get:function(){return R(mi(Pi(n.prototype),"names",this),this.iteration.names)}}]),n}(S),$=function(e){_i(r,e);var t=Mi(r);function r(e,n,i,o){var a;return Ni(this,r),(a=t.call(this)).varKind=e,a.name=n,a.from=i,a.to=o,a}return Di(r,[{key:"render",value:function(e){var t=e.es5?n.varKinds.var:this.varKind,i=this.name,o=this.from,a=this.to;return"for(".concat(t," ").concat(i,"=").concat(o,"; ").concat(i,"<").concat(a,"; ").concat(i,"++)")+mi(Pi(r.prototype),"render",this).call(this,e)}},{key:"names",get:function(){var e=N(mi(Pi(r.prototype),"names",this),this.from);return N(e,this.to)}}]),r}(S),_=function(e){_i(n,e);var t=Mi(n);function n(e,r,i,o){var a;return Ni(this,n),(a=t.call(this)).loop=e,a.varKind=r,a.name=i,a.iterable=o,a}return Di(n,[{key:"render",value:function(e){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+mi(Pi(n.prototype),"render",this).call(this,e)}},{key:"optimizeNames",value:function(e,t){if(mi(Pi(n.prototype),"optimizeNames",this).call(this,e,t))return this.iterable=I(this.iterable,e,t),this}},{key:"names",get:function(){return R(mi(Pi(n.prototype),"names",this),this.iterable.names)}}]),n}(S),O=function(e){_i(n,e);var t=Mi(n);function n(e,r,i){var o;return Ni(this,n),(o=t.call(this)).name=e,o.args=r,o.async=i,o}return Di(n,[{key:"render",value:function(e){var t=this.async?"async ":"";return"".concat(t,"function ").concat(this.name,"(").concat(this.args,")")+mi(Pi(n.prototype),"render",this).call(this,e)}}]),n}(w);O.kind="func";var M=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"render",value:function(e){return"return "+mi(Pi(n.prototype),"render",this).call(this,e)}}]),n}(b);M.kind="return";var E=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"render",value:function(e){var t="try"+mi(Pi(n.prototype),"render",this).call(this,e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}},{key:"optimizeNodes",value:function(){var e,t;return mi(Pi(n.prototype),"optimizeNodes",this).call(this),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}},{key:"optimizeNames",value:function(e,t){var r,i;return mi(Pi(n.prototype),"optimizeNames",this).call(this,e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(i=this.finally)||void 0===i||i.optimizeNames(e,t),this}},{key:"names",get:function(){var e=mi(Pi(n.prototype),"names",this);return this.catch&&R(e,this.catch.names),this.finally&&R(e,this.finally.names),e}}]),n}(w),A=function(e){_i(n,e);var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this)).error=e,r}return Di(n,[{key:"render",value:function(e){return"catch(".concat(this.error,")")+mi(Pi(n.prototype),"render",this).call(this,e)}}]),n}(w);A.kind="catch";var P=function(e){_i(n,e);var t=Mi(n);function n(){return Ni(this,n),t.apply(this,arguments)}return Di(n,[{key:"render",value:function(e){return"finally"+mi(Pi(n.prototype),"render",this).call(this,e)}}]),n}(w);P.kind="finally";var T=function(){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ni(this,r),this._values={},this._blockStarts=[],this._constants={},this.opts=Ri(Ri({},t),{},{_n:t.lines?"\n":""}),this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new k]}return Di(r,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(e){return this._scope.name(e)}},{key:"scopeName",value:function(e){return this._extScope.name(e)}},{key:"scopeValue",value:function(e,t){var n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}},{key:"getScopeValue",value:function(e,t){return this._extScope.getValue(e,t)}},{key:"scopeRefs",value:function(e){return this._extScope.scopeRefs(e,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(e,t,n,r){var i=this._scope.toName(t);return void 0!==n&&r&&(this._constants[i.str]=n),this._leafNode(new a(e,i,n)),i}},{key:"const",value:function(e,t,r){return this._def(n.varKinds.const,e,t,r)}},{key:"let",value:function(e,t,r){return this._def(n.varKinds.let,e,t,r)}},{key:"var",value:function(e,t,r){return this._def(n.varKinds.var,e,t,r)}},{key:"assign",value:function(e,t,n){return this._leafNode(new h(e,t,n))}},{key:"add",value:function(t,n){return this._leafNode(new v(t,e.operators.ADD,n))}},{key:"code",value:function(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new y(e)),this}},{key:"object",value:function(){for(var e=["{"],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=xi(a[o],2),c=s[0],l=s[1];e.length>1&&e.push(","),e.push(c),(c!==l||this.opts.es5)&&(e.push(":"),(0,t.addCodeArg)(e,l))}return e.push("}"),new t._Code(e)}},{key:"if",value:function(e,t,n){if(this._blockNode(new j(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(e){return this._elseNode(new j(e))}},{key:"else",value:function(){return this._elseNode(new x)}},{key:"endIf",value:function(){return this._endBlockNode(j,x)}},{key:"_for",value:function(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}},{key:"for",value:function(e,t){return this._for(new C(e),t)}},{key:"forRange",value:function(e,t,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?n.varKinds.var:n.varKinds.let,a=this._scope.toName(e);return this._for(new $(o,a,t,r),(function(){return i(a)}))}},{key:"forOf",value:function(e,r,i){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.varKinds.const,l=this._scope.toName(e);if(this.opts.es5){var u=r instanceof t.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,t._)(s||(s=pi(["",".length"])),u),(function(e){o.var(l,(0,t._)(c||(c=pi(["","[","]"])),u,e)),i(l)}))}return this._for(new _("of",a,l,r),(function(){return i(l)}))}},{key:"forIn",value:function(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?n.varKinds.var:n.varKinds.const;if(this.opts.ownProperties)return this.forOf(e,(0,t._)(l||(l=pi(["Object.keys(",")"])),r),i);var a=this._scope.toName(e);return this._for(new _("in",o,a,r),(function(){return i(a)}))}},{key:"endFor",value:function(){return this._endBlockNode(S)}},{key:"label",value:function(e){return this._leafNode(new p(e))}},{key:"break",value:function(e){return this._leafNode(new m(e))}},{key:"return",value:function(e){var t=new M;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}},{key:"try",value:function(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');var r=new E;if(this._blockNode(r),this.code(e),t){var i=this.name("e");this._currNode=r.catch=new A(i),t(i)}return n&&(this._currNode=r.finally=new P,this.code(n)),this._endBlockNode(A,P)}},{key:"throw",value:function(e){return this._leafNode(new g(e))}},{key:"block",value:function(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}},{key:"endBlock",value:function(e){var t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");var n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error("CodeGen: wrong number of nodes: ".concat(n," vs ").concat(e," expected"));return this._nodes.length=t,this}},{key:"func",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.nil,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this._blockNode(new O(e,n,r)),i&&this.code(i).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(O)}},{key:"optimize",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(e){return this._currNode.nodes.push(e),this}},{key:"_blockNode",value:function(e){this._currNode.nodes.push(e),this._nodes.push(e)}},{key:"_endBlockNode",value:function(e,t){var n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(t?"".concat(e.kind,"/").concat(t.kind):e.kind,'"'))}},{key:"_elseNode",value:function(e){var t=this._currNode;if(!(t instanceof j))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var e=this._nodes;return e[e.length-1]},set:function(e){var t=this._nodes;t[t.length-1]=e}}]),r}();function R(e,t){for(var n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function N(e,n){return n instanceof t._CodeOrName?R(e,n.names):e}function I(e,n,r){return e instanceof t.Name?o(e):(i=e)instanceof t._Code&&i._items.some((function(e){return e instanceof t.Name&&1===n[e.str]&&void 0!==r[e.str]}))?new t._Code(e._items.reduce((function(e,n){return n instanceof t.Name&&(n=o(n)),n instanceof t._Code?e.push.apply(e,Bi(n._items)):e.push(n),e}),[])):e;var i;function o(e){var t=r[e.str];return void 0===t||1!==n[e.str]?e:(delete n[e.str],t)}}function D(e,t){for(var n in t)e[n]=(e[n]||0)-(t[n]||0)}function z(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)(u||(u=pi(["!",""])),F(e))}e.CodeGen=T,e.not=z;var L=q(e.operators.AND);e.and=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(L)};var B=q(e.operators.OR);function q(e){return function(n,r){return n===t.nil?r:r===t.nil?n:(0,t._)(f||(f=pi([""," "," ",""])),F(n),e,F(r))}}function F(e){return e instanceof t.Name?e:(0,t._)(d||(d=pi(["(",")"])),e)}e.or=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(B)}}(X8)),X8}var a5={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=o5(),n=e5();function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema,n=e.opts,r=e.self;if(n.strictSchema&&"boolean"!=typeof t){var i=r.RULES.keywords;for(var o in t)i[o]||d(e,'unknown keyword: "'.concat(o,'"'))}}function i(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0;return!1}function o(e){return"number"==typeof e?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function s(e){var n=e.mergeNames,r=e.mergeToName,i=e.mergeValues,o=e.resultToName;return function(e,a,s,c){var l=void 0===s?a:s instanceof t.Name?(a instanceof t.Name?n(e,a,s):r(e,a,s),s):a instanceof t.Name?(r(e,s,a),a):i(a,s);return c!==t.Name||l instanceof t.Name?l:o(e,l)}}function c(e,n){if(!0===n)return e.var("props",!0);var r=e.var("props",(0,t._)(C||(C=pi(["{}"]))));return void 0!==n&&l(e,r,n),r}function l(e,n,r){Object.keys(r).forEach((function(r){return e.assign((0,t._)($||($=pi(["","",""])),n,(0,t.getProperty)(r)),!0)}))}e.toHash=function(e){var t,n={},r=yi(e);try{for(r.s();!(t=r.n()).done;){n[t.value]=!0}}catch(e){r.e(e)}finally{r.f()}return n},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!i(t,e.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=i,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(var n in e)if("$ref"!==n&&t.all[n])return!0;return!1},e.schemaRefOrVal=function(e,n,r,i){var o=e.topSchemaRef,a=e.schemaPath;if(!i){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return(0,t._)(h||(h=pi(["",""])),n)}return(0,t._)(v||(v=pi(["","","",""])),o,a,(0,t.getProperty)(r))},e.unescapeFragment=function(e){return a(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(o(e))},e.escapeJsonPointer=o,e.unescapeJsonPointer=a,e.eachItem=function(e,t){if(Array.isArray(e)){var n,r=yi(e);try{for(r.s();!(n=r.n()).done;){t(n.value)}}catch(e){r.e(e)}finally{r.f()}}else t(e)},e.mergeEvaluated={props:s({mergeNames:function(e,n,r){return e.if((0,t._)(p||(p=pi([""," !== true && "," !== undefined"])),r,n),(function(){e.if((0,t._)(m||(m=pi([""," === true"])),n),(function(){return e.assign(r,!0)}),(function(){return e.assign(r,(0,t._)(g||(g=pi([""," || {}"])),r)).code((0,t._)(y||(y=pi(["Object.assign(",", ",")"])),r,n))}))}))},mergeToName:function(e,n,r){return e.if((0,t._)(b||(b=pi([""," !== true"])),r),(function(){!0===n?e.assign(r,!0):(e.assign(r,(0,t._)(w||(w=pi([""," || {}"])),r)),l(e,r,n))}))},mergeValues:function(e,t){return!0===e||Ri(Ri({},e),t)},resultToName:c}),items:s({mergeNames:function(e,n,r){return e.if((0,t._)(k||(k=pi([""," !== true && "," !== undefined"])),r,n),(function(){return e.assign(r,(0,t._)(x||(x=pi([""," === true ? true : "," > "," ? "," : ",""])),n,r,n,r,n))}))},mergeToName:function(e,n,r){return e.if((0,t._)(j||(j=pi([""," !== true"])),r),(function(){return e.assign(r,!0===n||(0,t._)(S||(S=pi([""," > "," ? "," : ",""])),r,n,r,n))}))},mergeValues:function(e,t){return!0===e||Math.max(e,t)},resultToName:function(e,t){return e.var("items",t)}})},e.evaluatedPropsToName=c,e.setEvaluated=l;var u,f={};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.opts.strictSchema;if(n){if(t="strict mode: ".concat(t),!0===n)throw new Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=e.Type||(e.Type={})),e.getErrorPath=function(e,n,r){if(e instanceof t.Name){var i=n===u.Num;return r?i?(0,t._)(_||(_=pi(['"[" + ',' + "]"'])),e):(0,t._)(O||(O=pi(['"[\'" + ',' + "\']"'])),e):i?(0,t._)(M||(M=pi(['"/" + ',""])),e):(0,t._)(E||(E=pi(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),e)}return r?(0,t.getProperty)(e).toString():"/"+o(e)},e.checkStrictMode=d}(a5);var s5,c5,l5,u5={};function f5(){if(s5)return u5;s5=1,Object.defineProperty(u5,"__esModule",{value:!0});var e=o5(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return u5.default=t,u5}function d5(){return c5||(c5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=o5(),n=a5,r=f5();function i(e,n){var i=e.const("err",n);e.if((0,t._)(W||(W=pi([""," === null"])),r.default.vErrors),(function(){return e.assign(r.default.vErrors,(0,t._)(H||(H=pi(["[","]"])),i))}),(0,t._)(U||(U=pi(["",".push(",")"])),r.default.vErrors,i)),e.code((0,t._)(J||(J=pi(["","++"])),r.default.errors))}function o(e,n){var r=e.gen,i=e.validateName;e.schemaEnv.$async?r.throw((0,t._)(K||(K=pi(["new ","(",")"])),e.ValidationError,n)):(r.assign((0,t._)(G||(G=pi(["",".errors"])),i),n),r.return(!1))}e.keywordError={message:function(e){var n=e.keyword;return(0,t.str)(A||(A=pi(['must pass "','" keyword validation'])),n)}},e.keyword$DataError={message:function(e){var n=e.keyword,r=e.schemaType;return r?(0,t.str)(P||(P=pi(['"','" keyword must be '," ($data)"])),n,r):(0,t.str)(T||(T=pi(['"','" keyword is invalid ($data)'])),n)}},e.reportError=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,a=arguments.length>2?arguments[2]:void 0,c=arguments.length>3?arguments[3]:void 0,l=n.it,u=l.gen,f=l.compositeRule,d=l.allErrors,h=s(n,r,a);(null!=c?c:f||d)?i(u,h):o(l,(0,t._)(R||(R=pi(["[","]"])),h))},e.reportExtraError=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,a=arguments.length>2?arguments[2]:void 0,c=t.it,l=c.gen,u=c.compositeRule,f=c.allErrors;i(l,s(t,n,a)),u||f||o(c,r.default.vErrors)},e.resetErrorsCount=function(e,n){e.assign(r.default.errors,n),e.if((0,t._)(N||(N=pi([""," !== null"])),r.default.vErrors),(function(){return e.if(n,(function(){return e.assign((0,t._)(I||(I=pi(["",".length"])),r.default.vErrors),n)}),(function(){return e.assign(r.default.vErrors,null)}))}))},e.extendErrors=function(e){var n=e.gen,i=e.keyword,o=e.schemaValue,a=e.data,s=e.errsCount,c=e.it;if(void 0===s)throw new Error("ajv implementation error");var l=n.name("err");n.forRange("i",s,r.default.errors,(function(e){n.const(l,(0,t._)(D||(D=pi(["","[","]"])),r.default.vErrors,e)),n.if((0,t._)(z||(z=pi(["",".instancePath === undefined"])),l),(function(){return n.assign((0,t._)(L||(L=pi(["",".instancePath"])),l),(0,t.strConcat)(r.default.instancePath,c.errorPath))})),n.assign((0,t._)(B||(B=pi(["",".schemaPath"])),l),(0,t.str)(q||(q=pi(["","/",""])),c.errSchemaPath,i)),c.opts.verbose&&(n.assign((0,t._)(F||(F=pi(["",".schema"])),l),o),n.assign((0,t._)(V||(V=pi(["",".data"])),l),a))}))};var a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,n,i){return!1===e.it.createErrors?(0,t._)(Q||(Q=pi(["{}"]))):function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=e.gen,s=e.it,u=[c(s,i),l(e,i)];return function(e,n,i){var o=n.params,s=n.message,c=e.keyword,l=e.data,u=e.schemaValue,f=e.it,d=f.opts,h=f.propertyName,v=f.topSchemaRef,p=f.schemaPath;i.push([a.keyword,c],[a.params,"function"==typeof o?o(e):o||(0,t._)(ee||(ee=pi(["{}"])))]),d.messages&&i.push([a.message,"function"==typeof s?s(e):s]);d.verbose&&i.push([a.schema,u],[a.parentSchema,(0,t._)(te||(te=pi(["","",""])),v,p)],[r.default.data,l]);h&&i.push([a.propertyName,h])}(e,n,u),o.object.apply(o,u)}(e,n,i)}function c(e,i){var o=e.errorPath,a=i.instancePath,s=a?(0,t.str)(Y||(Y=pi(["","",""])),o,(0,n.getErrorPath)(a,n.Type.Str)):o;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)]}function l(e,r){var i=e.keyword,o=e.it.errSchemaPath,s=r.schemaPath,c=r.parentSchema?o:(0,t.str)(X||(X=pi(["","/",""])),o,i);return s&&(c=(0,t.str)(Z||(Z=pi(["","",""])),c,(0,n.getErrorPath)(s,n.Type.Str))),[a.schemaPath,c]}}(Y8)),Y8}var h5={},v5={};Object.defineProperty(v5,"__esModule",{value:!0}),v5.getRules=v5.isJSONType=void 0;var p5=new Set(["string","number","integer","boolean","null","object","array"]);v5.isJSONType=function(e){return"string"==typeof e&&p5.has(e)},v5.getRules=function(){var e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ri(Ri({},e),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var m5,g5={};function y5(){if(m5)return g5;function e(e,n){return n.rules.some((function(n){return t(e,n)}))}function t(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((function(t){return void 0!==e[t]})))}return m5=1,Object.defineProperty(g5,"__esModule",{value:!0}),g5.shouldUseRule=g5.shouldUseGroup=g5.schemaHasRulesForType=void 0,g5.schemaHasRulesForType=function(t,n){var r=t.schema,i=t.self.RULES.types[n];return i&&!0!==i&&e(r,i)},g5.shouldUseGroup=e,g5.shouldUseRule=t,g5}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t,n=v5,r=y5(),i=d5(),o=o5(),a=a5;function s(e){var t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(t=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){var t=s(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=s,e.coerceAndCheckDataType=function(e,n){var i=e.gen,a=e.data,s=e.opts,l=function(e,t){return t?e.filter((function(e){return c.has(e)||"array"===t&&"array"===e})):[]}(n,s.coerceTypes),f=n.length>0&&!(0===l.length&&1===n.length&&(0,r.schemaHasRulesForType)(e,n[0]));if(f){var h=u(n,a,s.strictNumbers,t.Wrong);i.if(h,(function(){l.length?function(e,t,n){var r=e.gen,i=e.data,a=e.opts,s=r.let("dataType",(0,o._)(re||(re=pi(["typeof ",""])),i)),l=r.let("coerced",(0,o._)(ie||(ie=pi(["undefined"]))));"array"===a.coerceTypes&&r.if((0,o._)(oe||(oe=pi([""," == 'object' && Array.isArray(",") && ",".length == 1"])),s,i,i),(function(){return r.assign(i,(0,o._)(ae||(ae=pi(["","[0]"])),i)).assign(s,(0,o._)(se||(se=pi(["typeof ",""])),i)).if(u(t,i,a.strictNumbers),(function(){return r.assign(l,i)}))}));r.if((0,o._)(ce||(ce=pi([""," !== undefined"])),l));var f,h=yi(n);try{for(h.s();!(f=h.n()).done;){var v=f.value;(c.has(v)||"array"===v&&"array"===a.coerceTypes)&&p(v)}}catch(e){h.e(e)}finally{h.f()}function p(e){switch(e){case"string":return void r.elseIf((0,o._)(ue||(ue=pi(["",' == "number" || ',' == "boolean"'])),s,s)).assign(l,(0,o._)(fe||(fe=pi(['"" + ',""])),i)).elseIf((0,o._)(de||(de=pi([""," === null"])),i)).assign(l,(0,o._)(he||(he=pi(['""']))));case"number":return void r.elseIf((0,o._)(ve||(ve=pi(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),s,i,s,i,i,i)).assign(l,(0,o._)(pe||(pe=pi(["+",""])),i));case"integer":return void r.elseIf((0,o._)(me||(me=pi(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),s,i,s,i,i,i,i)).assign(l,(0,o._)(ge||(ge=pi(["+",""])),i));case"boolean":return void r.elseIf((0,o._)(ye||(ye=pi(["",' === "false" || '," === 0 || "," === null"])),i,i,i)).assign(l,!1).elseIf((0,o._)(be||(be=pi(["",' === "true" || '," === 1"])),i,i)).assign(l,!0);case"null":return r.elseIf((0,o._)(we||(we=pi(["",' === "" || '," === 0 || "," === false"])),i,i,i)),void r.assign(l,null);case"array":r.elseIf((0,o._)(ke||(ke=pi(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),s,s,s,i)).assign(l,(0,o._)(xe||(xe=pi(["[","]"])),i))}}r.else(),d(e),r.endIf(),r.if((0,o._)(le||(le=pi([""," !== undefined"])),l),(function(){r.assign(i,l),function(e,t){var n=e.gen,r=e.parentData,i=e.parentDataProperty;n.if((0,o._)(je||(je=pi([""," !== undefined"])),r),(function(){return n.assign((0,o._)(Se||(Se=pi(["","[","]"])),r,i),t)}))}(e,l)}))}(e,n,l):d(e)}))}return f};var c=new Set(["string","number","integer","boolean","null"]);function l(e,n,r){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.Correct,s=a===t.Correct?o.operators.EQ:o.operators.NEQ;switch(e){case"null":return(0,o._)(Ce||(Ce=pi([""," "," null"])),n,s);case"array":i=(0,o._)($e||($e=pi(["Array.isArray(",")"])),n);break;case"object":i=(0,o._)(_e||(_e=pi([""," && typeof ",' == "object" && !Array.isArray(',")"])),n,n,n);break;case"integer":i=c((0,o._)(Oe||(Oe=pi(["!("," % 1) && !isNaN(",")"])),n,n));break;case"number":i=c();break;default:return(0,o._)(Me||(Me=pi(["typeof "," "," ",""])),n,s,e)}return a===t.Correct?i:(0,o.not)(i);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(Ee||(Ee=pi(["typeof ",' == "number"'])),n),e,r?(0,o._)(Ae||(Ae=pi(["isFinite(",")"])),n):o.nil)}}function u(e,t,n,r){if(1===e.length)return l(e[0],t,n,r);var i,s=(0,a.toHash)(e);if(s.array&&s.object){var c=(0,o._)(Pe||(Pe=pi(["typeof ",' != "object"'])),t);i=s.null?c:(0,o._)(Te||(Te=pi(["!"," || ",""])),t,c),delete s.null,delete s.array,delete s.object}else i=o.nil;for(var u in s.number&&delete s.integer,s)i=(0,o.and)(i,l(u,t,n,r));return i}e.checkDataType=l,e.checkDataTypes=u;var f={message:function(e){var t=e.schema;return"must be ".concat(t)},params:function(e){var t=e.schema,n=e.schemaValue;return"string"==typeof t?(0,o._)(Re||(Re=pi(["{type: ","}"])),t):(0,o._)(Ne||(Ne=pi(["{type: ","}"])),n)}};function d(e){var t=function(e){var t=e.gen,n=e.data,r=e.schema,i=(0,a.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);(0,i.reportError)(t,f)}e.reportTypeError=d}(h5);var b5,w5={};var k5,x5,j5={},S5={};function C5(){if(k5)return S5;k5=1,Object.defineProperty(S5,"__esModule",{value:!0}),S5.validateUnion=S5.validateArray=S5.usePattern=S5.callValidateCode=S5.schemaProperties=S5.allSchemaProperties=S5.noPropertyInData=S5.propertyInData=S5.isOwnProperty=S5.hasPropFunc=S5.reportMissingProp=S5.checkMissingProp=S5.checkReportMissingProp=void 0;var e=o5(),t=a5,n=f5(),r=a5;function i(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)(Fe||(Fe=pi(["Object.prototype.hasOwnProperty"])))})}function o(t,n,r){return(0,e._)(Ve||(Ve=pi(["",".call(",", ",")"])),i(t),n,r)}function a(t,n,r,i){var a=(0,e._)(Ue||(Ue=pi(["",""," === undefined"])),n,(0,e.getProperty)(r));return i?(0,e.or)(a,(0,e.not)(o(t,n,r))):a}function s(e){return e?Object.keys(e).filter((function(e){return"__proto__"!==e})):[]}S5.checkReportMissingProp=function(t,n){var r=t.gen,i=t.data,o=t.it;r.if(a(r,i,n,o.opts.ownProperties),(function(){t.setParams({missingProperty:(0,e._)(Be||(Be=pi(["",""])),n)},!0),t.error()}))},S5.checkMissingProp=function(t,n,r){var i=t.gen,o=t.data,s=t.it.opts;return e.or.apply(void 0,Bi(n.map((function(t){return(0,e.and)(a(i,o,t,s.ownProperties),(0,e._)(qe||(qe=pi([""," = ",""])),r,t))}))))},S5.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},S5.hasPropFunc=i,S5.isOwnProperty=o,S5.propertyInData=function(t,n,r,i){var a=(0,e._)(We||(We=pi(["",""," !== undefined"])),n,(0,e.getProperty)(r));return i?(0,e._)(He||(He=pi([""," && ",""])),a,o(t,n,r)):a},S5.noPropertyInData=a,S5.allSchemaProperties=s,S5.schemaProperties=function(e,n){return s(n).filter((function(r){return!(0,t.alwaysValidSchema)(e,n[r])}))},S5.callValidateCode=function(t,r,i,o){var a=t.schemaCode,s=t.data,c=t.it,l=c.gen,u=c.topSchemaRef,f=c.schemaPath,d=c.errorPath,h=t.it,v=o?(0,e._)(Je||(Je=pi(["",", ",", ","",""])),a,s,u,f):s,p=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)],[n.default.parentData,h.parentData],[n.default.parentDataProperty,h.parentDataProperty],[n.default.rootData,n.default.rootData]];h.opts.dynamicRef&&p.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);var m=(0,e._)(Ke||(Ke=pi(["",", ",""])),v,l.object.apply(l,p));return i!==e.nil?(0,e._)(Ge||(Ge=pi(["",".call(",", ",")"])),r,i,m):(0,e._)(Qe||(Qe=pi(["","(",")"])),r,m)};var c=(0,e._)(Ye||(Ye=pi(["new RegExp"])));return S5.usePattern=function(t,n){var i=t.gen,o=t.it.opts,a=o.unicodeRegExp?"u":"",s=o.code.regExp,l=s(n,a);return i.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,e._)(Xe||(Xe=pi(["","(",", ",")"])),"new RegExp"===s.code?c:(0,r.useFunc)(i,s),n,a)})},S5.validateArray=function(n){var r=n.gen,i=n.data,o=n.keyword,a=n.it,s=r.name("valid");if(a.allErrors){var c=r.let("valid",!0);return l((function(){return r.assign(c,!1)})),c}return r.var(s,!0),l((function(){return r.break()})),s;function l(a){var c=r.const("len",(0,e._)(Ze||(Ze=pi(["",".length"])),i));r.forRange("i",0,c,(function(i){n.subschema({keyword:o,dataProp:i,dataPropType:t.Type.Num},s),r.if((0,e.not)(s),a)}))}},S5.validateUnion=function(n){var r=n.gen,i=n.schema,o=n.keyword,a=n.it;if(!Array.isArray(i))throw new Error("ajv implementation error");if(!i.some((function(e){return(0,t.alwaysValidSchema)(a,e)}))||a.opts.unevaluated){var s=r.let("valid",!1),c=r.name("_valid");r.block((function(){return i.forEach((function(t,i){var a=n.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,e._)(et||(et=pi([""," || ",""])),s,c)),n.mergeValidEvaluated(a,c)||r.if((0,e.not)(s))}))})),n.result(s,(function(){return n.reset()}),(function(){return n.error(!0)}))}},S5}function $5(){if(x5)return j5;x5=1,Object.defineProperty(j5,"__esModule",{value:!0}),j5.validateKeywordUsage=j5.validSchemaType=j5.funcKeywordCode=j5.macroKeywordCode=void 0;var e=o5(),t=f5(),n=C5(),r=d5();function i(t){var n=t.gen,r=t.data,i=t.it;n.if(i.parentData,(function(){return n.assign(r,(0,e._)(st||(st=pi(["","[","]"])),i.parentData,i.parentDataProperty))}))}function o(t,n,r){if(void 0===r)throw new Error('keyword "'.concat(n,'" failed to compile'));return t.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,e.stringify)(r)})}return j5.macroKeywordCode=function(t,n){var r=t.gen,i=t.keyword,a=t.schema,s=t.parentSchema,c=t.it,l=n.macro.call(c.self,a,s,c),u=o(r,i,l);!1!==c.opts.validateSchema&&c.self.validateSchema(l,!0);var f=r.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:"".concat(c.errSchemaPath,"/").concat(i),topSchemaRef:u,compositeRule:!0},f),t.pass(f,(function(){return t.error(!0)}))},j5.funcKeywordCode=function(a,s){var c,l=a.gen,u=a.keyword,f=a.schema,d=a.parentSchema,h=a.$data,v=a.it;!function(e,t){var n=e.schemaEnv;if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}(v,s);var p=!h&&s.compile?s.compile.call(v.self,f,d,v):s.validate,m=o(l,u,p),g=l.let("valid");function y(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.async?(0,e._)(ot||(ot=pi(["await "]))):e.nil,i=v.opts.passContext?t.default.this:t.default.self,o=!("compile"in s&&!h||!1===s.schema);l.assign(g,(0,e._)(at||(at=pi(["","",""])),r,(0,n.callValidateCode)(a,m,i,o)),s.modifying)}function b(t){var n;l.if((0,e.not)(null!==(n=s.valid)&&void 0!==n?n:g),t)}a.block$data(g,(function(){if(!1===s.errors)y(),s.modifying&&i(a),b((function(){return a.error()}));else{var n=s.async?function(){var t=l.let("ruleErrs",null);return l.try((function(){return y((0,e._)(tt||(tt=pi(["await "]))))}),(function(n){return l.assign(g,!1).if((0,e._)(nt||(nt=pi([""," instanceof ",""])),n,v.ValidationError),(function(){return l.assign(t,(0,e._)(rt||(rt=pi(["",".errors"])),n))}),(function(){return l.throw(n)}))})),t}():(o=(0,e._)(it||(it=pi(["",".errors"])),m),l.assign(o,null),y(e.nil),o);s.modifying&&i(a),b((function(){return function(n,i){var o=n.gen;o.if((0,e._)(ct||(ct=pi(["Array.isArray(",")"])),i),(function(){o.assign(t.default.vErrors,(0,e._)(lt||(lt=pi([""," === null ? "," : ",".concat(",")"])),t.default.vErrors,i,t.default.vErrors,i)).assign(t.default.errors,(0,e._)(ut||(ut=pi(["",".length"])),t.default.vErrors)),(0,r.extendErrors)(n)}),(function(){return n.error()}))}(a,n)}))}var o})),a.ok(null!==(c=s.valid)&&void 0!==c?c:g)},j5.validSchemaType=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!t.length||t.some((function(t){return"array"===t?Array.isArray(e):"object"===t?e&&"object"==Wi(e)&&!Array.isArray(e):Wi(e)==t||n&&void 0===e}))},j5.validateKeywordUsage=function(e,t,n){var r=e.schema,i=e.opts,o=e.self,a=e.errSchemaPath;if(Array.isArray(t.keyword)?!t.keyword.includes(n):t.keyword!==n)throw new Error("ajv implementation error");var s=t.dependencies;if(null==s?void 0:s.some((function(e){return!Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have dependencies of ".concat(n,": ").concat(s.join(",")));if(t.validateSchema&&!t.validateSchema(r[n])){var c='keyword "'.concat(n,'" value is invalid at path "').concat(a,'": ')+o.errorsText(t.validateSchema.errors);if("log"!==i.validateSchema)throw new Error(c);o.logger.error(c)}},j5}var _5,O5={};var M5={},E5=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==Wi(t)&&"object"==Wi(n)){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},A5={exports:{}},P5=A5.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),T5(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function T5(e,t,n,r,i,o,a,s,c,l){if(r&&"object"==Wi(r)&&!Array.isArray(r)){for(var u in t(r,i,o,a,s,c,l),r){var f=r[u];if(Array.isArray(f)){if(u in P5.arrayKeywords)for(var d=0;d<f.length;d++)T5(e,t,n,f[d],i+"/"+u+"/"+d,o,i,u,r,d)}else if(u in P5.propsKeywords){if(f&&"object"==Wi(f))for(var h in f)T5(e,t,n,f[h],i+"/"+u+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,u,r,h)}else(u in P5.keywords||e.allKeys&&!(u in P5.skipKeywords))&&T5(e,t,n,f,i+"/"+u,o,i,u,r)}n(r,i,o,a,s,c,l)}}P5.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},P5.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},P5.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},P5.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var R5=A5.exports;Object.defineProperty(M5,"__esModule",{value:!0}),M5.getSchemaRefs=M5.resolveUrl=M5.normalizeId=M5._getFullPath=M5.getFullPath=M5.inlineRef=void 0;var N5=a5,I5=E5,D5=R5,z5=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);M5.inlineRef=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof e||(!0===t?!B5(e):!!t&&q5(e)<=t)};var L5=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function B5(e){for(var t in e){if(L5.has(t))return!0;var n=e[t];if(Array.isArray(n)&&n.some(B5))return!0;if("object"==Wi(n)&&B5(n))return!0}return!1}function q5(e){var t=0;for(var n in e){if("$ref"===n)return 1/0;if(t++,!z5.has(n)&&("object"==Wi(e[n])&&(0,N5.eachItem)(e[n],(function(e){return t+=q5(e)})),t===1/0))return 1/0}return t}function F5(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(t=H5(t));var n=e.parse(t);return V5(e,n)}function V5(e,t){return e.serialize(t).split("#")[0]+"#"}M5.getFullPath=F5,M5._getFullPath=V5;var W5=/#\/?$/;function H5(e){return e?e.replace(W5,""):""}M5.normalizeId=H5,M5.resolveUrl=function(e,t,n){return n=H5(n),e.resolve(t,n)};var U5,J5=/^[a-z_][-a-z0-9._]*$/i;function K5(){if(U5)return G8;U5=1,Object.defineProperty(G8,"__esModule",{value:!0}),G8.getData=G8.KeywordCxt=G8.validateFunctionCode=void 0;var e=function(){if(l5)return Q8;l5=1,Object.defineProperty(Q8,"__esModule",{value:!0}),Q8.boolOrEmptySchema=Q8.topBoolOrEmptySchema=void 0;var e=d5(),t=o5(),n=f5(),r={message:"boolean schema is false"};function i(t,n){var i={gen:t.gen,keyword:"false schema",data:t.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(i,r,void 0,n)}return Q8.topBoolOrEmptySchema=function(e){var r=e.gen,o=e.schema,a=e.validateName;!1===o?i(e,!1):"object"==Wi(o)&&!0===o.$async?r.return(n.default.data):(r.assign((0,t._)(ne||(ne=pi(["",".errors"])),a),null),r.return(!0))},Q8.boolOrEmptySchema=function(e,t){var n=e.gen;!1===e.schema?(n.var(t,!1),i(e)):n.var(t,!0)},Q8}(),t=h5,n=y5(),r=h5,i=function(){if(b5)return w5;b5=1,Object.defineProperty(w5,"__esModule",{value:!0}),w5.assignDefaults=void 0;var e=o5(),t=a5;function n(n,r,i){var o=n.gen,a=n.compositeRule,s=n.data,c=n.opts;if(void 0!==i){var l=(0,e._)(Ie||(Ie=pi(["","",""])),s,(0,e.getProperty)(r));if(a)(0,t.checkStrictMode)(n,"default is ignored for: ".concat(l));else{var u=(0,e._)(De||(De=pi([""," === undefined"])),l);"empty"===c.useDefaults&&(u=(0,e._)(ze||(ze=pi([""," || "," === null || ",' === ""'])),u,l,l)),o.if(u,(0,e._)(Le||(Le=pi([""," = ",""])),l,(0,e.stringify)(i)))}}}return w5.assignDefaults=function(e,t){var r=e.schema,i=r.properties,o=r.items;if("object"===t&&i)for(var a in i)n(e,a,i[a].default);else"array"===t&&Array.isArray(o)&&o.forEach((function(t,r){return n(e,r,t.default)}))},w5}(),o=$5(),a=function(){if(_5)return O5;_5=1,Object.defineProperty(O5,"__esModule",{value:!0}),O5.extendSubschemaMode=O5.extendSubschemaData=O5.getSubschema=void 0;var e=o5(),t=a5;return O5.getSubschema=function(n,r){var i=r.keyword,o=r.schemaProp,a=r.schema,s=r.schemaPath,c=r.errSchemaPath,l=r.topSchemaRef;if(void 0!==i&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){var u=n.schema[i];return void 0===o?{schema:u,schemaPath:(0,e._)(ft||(ft=pi(["","",""])),n.schemaPath,(0,e.getProperty)(i)),errSchemaPath:"".concat(n.errSchemaPath,"/").concat(i)}:{schema:u[o],schemaPath:(0,e._)(dt||(dt=pi(["","","",""])),n.schemaPath,(0,e.getProperty)(i),(0,e.getProperty)(o)),errSchemaPath:"".concat(n.errSchemaPath,"/").concat(i,"/").concat((0,t.escapeFragment)(o))}}if(void 0!==a){if(void 0===s||void 0===c||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:s,topSchemaRef:l,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')},O5.extendSubschemaData=function(n,r,i){var o=i.dataProp,a=i.dataPropType,s=i.data,c=i.dataTypes,l=i.propertyName;if(void 0!==s&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');var u=r.gen;if(void 0!==o){var f=r.errorPath,d=r.dataPathArr,h=r.opts;v(u.let("data",(0,e._)(ht||(ht=pi(["","",""])),r.data,(0,e.getProperty)(o)),!0)),n.errorPath=(0,e.str)(vt||(vt=pi(["","",""])),f,(0,t.getErrorPath)(o,a,h.jsPropertySyntax)),n.parentDataProperty=(0,e._)(pt||(pt=pi(["",""])),o),n.dataPathArr=[].concat(Bi(d),[n.parentDataProperty])}function v(e){n.data=e,n.dataLevel=r.dataLevel+1,n.dataTypes=[],r.definedProperties=new Set,n.parentData=r.data,n.dataNames=[].concat(Bi(r.dataNames),[e])}void 0!==s&&(v(s instanceof e.Name?s:u.let("data",s,!0)),void 0!==l&&(n.propertyName=l)),c&&(n.dataTypes=c)},O5.extendSubschemaMode=function(e,t){var n=t.jtdDiscriminator,r=t.jtdMetadata,i=t.compositeRule,o=t.createErrors,a=t.allErrors;void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=n,e.jtdMetadata=r},O5}(),s=o5(),c=f5(),l=M5,u=a5,f=d5();function d(e,t){var n=e.gen,r=e.validateName,i=e.schema,o=e.schemaEnv,a=e.opts;a.code.es5?n.func(r,(0,s._)(mt||(mt=pi(["",", ",""])),c.default.data,c.default.valCxt),o.$async,(function(){n.code((0,s._)(gt||(gt=pi(['"use strict"; ',""])),h(i,a))),function(e,t){e.if(c.default.valCxt,(function(){e.var(c.default.instancePath,(0,s._)(kt||(kt=pi(["",".",""])),c.default.valCxt,c.default.instancePath)),e.var(c.default.parentData,(0,s._)(xt||(xt=pi(["",".",""])),c.default.valCxt,c.default.parentData)),e.var(c.default.parentDataProperty,(0,s._)(jt||(jt=pi(["",".",""])),c.default.valCxt,c.default.parentDataProperty)),e.var(c.default.rootData,(0,s._)(St||(St=pi(["",".",""])),c.default.valCxt,c.default.rootData)),t.dynamicRef&&e.var(c.default.dynamicAnchors,(0,s._)(Ct||(Ct=pi(["",".",""])),c.default.valCxt,c.default.dynamicAnchors))}),(function(){e.var(c.default.instancePath,(0,s._)($t||($t=pi(['""'])))),e.var(c.default.parentData,(0,s._)(_t||(_t=pi(["undefined"])))),e.var(c.default.parentDataProperty,(0,s._)(Ot||(Ot=pi(["undefined"])))),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,(0,s._)(Mt||(Mt=pi(["{}"]))))}))}(n,a),n.code(t)})):n.func(r,(0,s._)(yt||(yt=pi(["",", ",""])),c.default.data,function(e){return(0,s._)(bt||(bt=pi(["{",'="", ',", ",", ","=","","}={}"])),c.default.instancePath,c.default.parentData,c.default.parentDataProperty,c.default.rootData,c.default.data,e.dynamicRef?(0,s._)(wt||(wt=pi([", ","={}"])),c.default.dynamicAnchors):s.nil)}(a)),o.$async,(function(){return n.code(h(i,a)).code(t)}))}function h(e,t){var n="object"==Wi(e)&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,s._)(Dt||(Dt=pi(["/*# sourceURL="," */"])),n):s.nil}function v(t,n){m(t)&&(g(t),p(t))?function(e,t){var n=e.schema,r=e.gen,i=e.opts;i.$comment&&n.$comment&&b(e);(function(e){var t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);var o=r.const("_errs",c.default.errors);y(e,o),r.var(t,(0,s._)(zt||(zt=pi([""," === ",""])),o,c.default.errors))}(t,n):(0,e.boolOrEmptySchema)(t,n)}function p(e){var t=e.schema,n=e.self;if("boolean"==typeof t)return!t;for(var r in t)if(n.RULES.all[r])return!0;return!1}function m(e){return"boolean"!=typeof e.schema}function g(e){(0,u.checkUnknownRules)(e),function(e){var t=e.schema,n=e.errSchemaPath,r=e.opts,i=e.self;t.$ref&&r.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(n,'"'))}(e)}function y(e,n){if(e.opts.jtd)return w(e,[],!1,n);var r=(0,t.getSchemaTypes)(e.schema);w(e,r,!(0,t.coerceAndCheckDataType)(e,r),n)}function b(e){var t=e.gen,n=e.schemaEnv,r=e.schema,i=e.errSchemaPath,o=e.opts,a=r.$comment;if(!0===o.$comment)t.code((0,s._)(Lt||(Lt=pi(["",".logger.log(",")"])),c.default.self,a));else if("function"==typeof o.$comment){var l=(0,s.str)(Bt||(Bt=pi(["","/$comment"])),i),u=t.scopeValue("root",{ref:n.root});t.code((0,s._)(qt||(qt=pi(["",".opts.$comment(",", ",", ",".schema)"])),c.default.self,a,l,u))}}function w(e,t,i,o){var a=e.gen,l=e.schema,f=e.data,d=e.allErrors,h=e.opts,v=e.self.RULES;function p(u){(0,n.shouldUseGroup)(l,u)&&(u.type?(a.if((0,r.checkDataType)(u.type,f,h.strictNumbers)),k(e,u),1===t.length&&t[0]===u.type&&i&&(a.else(),(0,r.reportTypeError)(e)),a.endIf()):k(e,u),d||a.if((0,s._)(Kt||(Kt=pi([""," === ",""])),c.default.errors,o||0)))}!l.$ref||!h.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(l,v)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((function(t){j(e.dataTypes,t)||S(e,'type "'.concat(t,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))})),function(e,t){var n,r=[],i=yi(e.dataTypes);try{for(i.s();!(n=i.n()).done;){var o=n.value;j(t,o)?r.push(o):t.includes("integer")&&"number"===o&&r.push("integer")}}catch(e){i.e(e)}finally{i.f()}e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){var r=e.self.RULES.all;for(var i in r){var o=r[i];if("object"==Wi(o)&&(0,n.shouldUseRule)(e.schema,o)){var a=o.definition.type;a.length&&!a.some((function(e){return x(t,e)}))&&S(e,'missing type "'.concat(a.join(","),'" for keyword "').concat(i,'"'))}}}(e,e.dataTypes)}(e,t),a.block((function(){var e,t=yi(v.rules);try{for(t.s();!(e=t.n()).done;){p(e.value)}}catch(e){t.e(e)}finally{t.f()}p(v.post)}))):a.block((function(){return $(e,"$ref",v.all.$ref.definition)}))}function k(e,t){var r=e.gen,o=e.schema;e.opts.useDefaults&&(0,i.assignDefaults)(e,t.type),r.block((function(){var r,i=yi(t.rules);try{for(i.s();!(r=i.n()).done;){var a=r.value;(0,n.shouldUseRule)(o,a)&&$(e,a.keyword,a.definition,t.type)}}catch(e){i.e(e)}finally{i.f()}}))}function x(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function j(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){var n=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(n,'" (strictTypes)'),(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}G8.validateFunctionCode=function(t){m(t)&&(g(t),p(t))?function(e){var t=e.schema,n=e.opts,r=e.gen;d(e,(function(){n.$comment&&t.$comment&&b(e),function(e){var t=e.schema,n=e.opts;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(c.default.vErrors,null),r.let(c.default.errors,0),n.unevaluated&&function(e){var t=e.gen,n=e.validateName;e.evaluated=t.const("evaluated",(0,s._)(Et||(Et=pi(["",".evaluated"])),n)),t.if((0,s._)(At||(At=pi(["",".dynamicProps"])),e.evaluated),(function(){return t.assign((0,s._)(Pt||(Pt=pi(["",".props"])),e.evaluated),(0,s._)(Tt||(Tt=pi(["undefined"]))))})),t.if((0,s._)(Rt||(Rt=pi(["",".dynamicItems"])),e.evaluated),(function(){return t.assign((0,s._)(Nt||(Nt=pi(["",".items"])),e.evaluated),(0,s._)(It||(It=pi(["undefined"]))))}))}(e),y(e),function(e){var t=e.gen,n=e.schemaEnv,r=e.validateName,i=e.ValidationError,o=e.opts;n.$async?t.if((0,s._)(Ft||(Ft=pi([""," === 0"])),c.default.errors),(function(){return t.return(c.default.data)}),(function(){return t.throw((0,s._)(Vt||(Vt=pi(["new ","(",")"])),i,c.default.vErrors))})):(t.assign((0,s._)(Wt||(Wt=pi(["",".errors"])),r),c.default.vErrors),o.unevaluated&&function(e){var t=e.gen,n=e.evaluated,r=e.props,i=e.items;r instanceof s.Name&&t.assign((0,s._)(Ut||(Ut=pi(["",".props"])),n),r);i instanceof s.Name&&t.assign((0,s._)(Jt||(Jt=pi(["",".items"])),n),i)}(e),t.return((0,s._)(Ht||(Ht=pi([""," === 0"])),c.default.errors)))}(e)}))}(t):d(t,(function(){return(0,e.topBoolOrEmptySchema)(t)}))};var C=function(){function e(t,n,r){if(Ni(this,e),(0,o.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",M(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error("".concat(r," value must be ").concat(JSON.stringify(n.schemaType)));("code"in n?n.trackErrors:!1!==n.errors)&&(this.errsCount=t.gen.const("_errs",c.default.errors))}return Di(e,[{key:"result",value:function(e,t,n){this.failResult((0,s.not)(e),t,n)}},{key:"failResult",value:function(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(e,t){this.failResult((0,s.not)(e),void 0,t)}},{key:"fail",value:function(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(e){if(!this.$data)return this.fail(e);var t=this.schemaCode;this.fail((0,s._)(Gt||(Gt=pi([""," !== undefined && (",")"])),t,(0,s.or)(this.invalid$data(),e)))}},{key:"error",value:function(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}},{key:"_error",value:function(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}},{key:"$dataError",value:function(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(e){this.allErrors||this.gen.if(e)}},{key:"setParams",value:function(e,t){t?Object.assign(this.params,e):this.params=e}},{key:"block$data",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.nil;this.gen.block((function(){n.check$data(e,r),t()}))}},{key:"check$data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.nil,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.nil;if(this.$data){var n=this.gen,r=this.schemaCode,i=this.schemaType,o=this.def;n.if((0,s.or)((0,s._)(Qt||(Qt=pi([""," === undefined"])),r),t)),e!==s.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==s.nil&&n.assign(e,!1)),n.else()}}},{key:"invalid$data",value:function(){var e=this.gen,t=this.schemaCode,n=this.schemaType,i=this.def,o=this.it;return(0,s.or)(function(){if(n.length){if(!(t instanceof s.Name))throw new Error("ajv implementation error");var e=Array.isArray(n)?n:[n];return(0,s._)(Yt||(Yt=pi(["",""])),(0,r.checkDataTypes)(e,t,o.opts.strictNumbers,r.DataType.Wrong))}return s.nil}(),function(){if(i.validateSchema){var n=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,s._)(Xt||(Xt=pi(["!","(",")"])),n,t)}return s.nil}())}},{key:"subschema",value:function(e,t){var n=(0,a.getSubschema)(this.it,e);(0,a.extendSubschemaData)(n,this.it,e),(0,a.extendSubschemaMode)(n,e);var r=Ri(Ri(Ri({},this.it),n),{},{items:void 0,props:void 0});return v(r,t),r}},{key:"mergeEvaluated",value:function(e,t){var n=this.it,r=this.gen;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=u.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=u.mergeEvaluated.items(r,e.items,n.items,t)))}},{key:"mergeValidEvaluated",value:function(e,t){var n=this,r=this.it,i=this.gen;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,(function(){return n.mergeEvaluated(e,s.Name)})),!0}}]),e}();function $(e,t,n,r){var i=new C(e,n,t);"code"in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):"macro"in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}G8.KeywordCxt=C;var _=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function M(e,t){var n,r,i=t.dataLevel,o=t.dataNames,a=t.dataPathArr;if(""===e)return c.default.rootData;if("/"===e[0]){if(!_.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));n=e,r=c.default.rootData}else{var l=O.exec(e);if(!l)throw new Error("Invalid JSON-pointer: ".concat(e));var f=+l[1];if("#"===(n=l[2])){if(f>=i)throw new Error(m("property/index",f));return a[i-f]}if(f>i)throw new Error(m("data",f));if(r=o[i-f],!n)return r}var d,h=r,v=yi(n.split("/"));try{for(v.s();!(d=v.n()).done;){var p=d.value;p&&(r=(0,s._)(Zt||(Zt=pi(["","",""])),r,(0,s.getProperty)((0,u.unescapeJsonPointer)(p))),h=(0,s._)(en||(en=pi([""," && ",""])),h,r))}}catch(e){v.e(e)}finally{v.f()}return h;function m(e,t){return"Cannot access ".concat(e," ").concat(t," levels up, current level is ").concat(i)}}return G8.getData=M,G8}M5.getSchemaRefs=function(e,t){var n=this;if("boolean"==typeof e)return{};var r=this.opts,i=r.schemaId,o=r.uriResolver,a=H5(e[i]||t),s={"":a},c=F5(o,a,!1),l={},u=new Set;return D5(e,{allKeys:!0},(function(e,t,r,o){if(void 0!==o){var a=c+t,h=s[o];"string"==typeof e[i]&&(h=v.call(n,e[i])),p.call(n,e.$anchor),p.call(n,e.$dynamicAnchor),s[t]=h}function v(t){var n=this.opts.uriResolver.resolve;if(t=H5(h?n(h,t):t),u.has(t))throw d(t);u.add(t);var r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==Wi(r)?f(e,r.schema,t):t!==H5(a)&&("#"===t[0]?(f(e,l[t],t),l[t]=e):this.refs[t]=a),t}function p(e){if("string"==typeof e){if(!J5.test(e))throw new Error('invalid anchor "'.concat(e,'"'));v.call(this,"#".concat(e))}}})),l;function f(e,t,n){if(void 0!==t&&!I5(e,t))throw d(n)}function d(e){return new Error('reference "'.concat(e,'" resolves to more than one schema'))}};var G5,Q5={};function Y5(){if(G5)return Q5;G5=1,Object.defineProperty(Q5,"__esModule",{value:!0});var e=function(e){_i(n,Ci(Error));var t=Mi(n);function n(e){var r;return Ni(this,n),(r=t.call(this,"validation failed")).errors=e,r.ajv=r.validation=!0,r}return Di(n)}();return Q5.default=e,Q5}var X5,Z5={};function e6(){if(X5)return Z5;X5=1,Object.defineProperty(Z5,"__esModule",{value:!0});var e=M5,t=function(t){_i(r,Ci(Error));var n=Mi(r);function r(t,i,o,a){var s;return Ni(this,r),(s=n.call(this,a||"can't resolve reference ".concat(o," from id ").concat(i))).missingRef=(0,e.resolveUrl)(t,i,o),s.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,s.missingRef)),s}return Di(r)}();return Z5.default=t,Z5}var t6={};Object.defineProperty(t6,"__esModule",{value:!0}),t6.resolveSchema=t6.getCompilingSchema=t6.resolveRef=t6.compileSchema=t6.SchemaEnv=void 0;var n6=o5(),r6=Y5(),i6=f5(),o6=M5,a6=a5,s6=K5(),c6=Di((function e(t){var n,r;Ni(this,e),this.refs={},this.dynamicAnchors={},"object"==Wi(t.schema)&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(n=t.baseId)&&void 0!==n?n:(0,o6.normalizeId)(null==r?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==r?void 0:r.$async,this.refs={}}));function l6(e){var t=f6.call(this,e);if(t)return t;var n,r=(0,o6.getFullPath)(this.opts.uriResolver,e.root.baseId),i=this.opts.code,o=i.es5,a=i.lines,s=this.opts.ownProperties,c=new n6.CodeGen(this.scope,{es5:o,lines:a,ownProperties:s});e.$async&&(n=c.scopeValue("Error",{ref:r6.default,code:(0,n6._)(tn||(tn=pi(['require("ajv/dist/runtime/validation_error").default'])))}));var l=c.scopeName("validate");e.validateName=l;var u,f={gen:c,allErrors:this.opts.allErrors,data:i6.default.data,parentData:i6.default.parentData,parentDataProperty:i6.default.parentDataProperty,dataNames:[i6.default.data],dataPathArr:[n6.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n6.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n6.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n6._)(nn||(nn=pi(['""']))),opts:this.opts,self:this};try{this._compilations.add(e),(0,s6.validateFunctionCode)(f),c.optimize(this.opts.code.optimize);var d=c.toString();u="".concat(c.scopeRefs(i6.default.scope),"return ").concat(d),this.opts.code.process&&(u=this.opts.code.process(u,e));var h=new Function("".concat(i6.default.self),"".concat(i6.default.scope),u)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),!0===this.opts.code.source&&(h.source={validateName:l,validateCode:d,scopeValues:c._values}),this.opts.unevaluated){var v=f.props,p=f.items;h.evaluated={props:v instanceof n6.Name?void 0:v,items:p instanceof n6.Name?void 0:p,dynamicProps:v instanceof n6.Name,dynamicItems:p instanceof n6.Name},h.source&&(h.source.evaluated=(0,n6.stringify)(h.evaluated))}return e.validate=h,e}catch(t){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),t}finally{this._compilations.delete(e)}}function u6(e){return(0,o6.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l6.call(this,e)}function f6(e){var t,n,r,i=yi(this._compilations);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(r=e,(n=o).schema===r.schema&&n.root===r.root&&n.baseId===r.baseId)return o}}catch(e){i.e(e)}finally{i.f()}}function d6(e,t){for(var n;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||h6.call(this,e,t)}function h6(e,t){var n=this.opts.uriResolver.parse(t),r=(0,o6._getFullPath)(this.opts.uriResolver,n),i=(0,o6.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===i)return p6.call(this,n,e);var o=(0,o6.normalizeId)(r),a=this.refs[o]||this.schemas[o];if("string"==typeof a){var s=h6.call(this,e,a);if("object"!==Wi(null==s?void 0:s.schema))return;return p6.call(this,n,s)}if("object"===Wi(null==a?void 0:a.schema)){if(a.validate||l6.call(this,a),o===(0,o6.normalizeId)(t)){var c=a.schema,l=this.opts.schemaId,u=c[l];return u&&(i=(0,o6.resolveUrl)(this.opts.uriResolver,i,u)),new c6({schema:c,schemaId:l,root:e,baseId:i})}return p6.call(this,n,a)}}t6.SchemaEnv=c6,t6.compileSchema=l6,t6.resolveRef=function(e,t,n){var r;n=(0,o6.resolveUrl)(this.opts.uriResolver,t,n);var i=e.refs[n];if(i)return i;var o=d6.call(this,e,n);if(void 0===o){var a=null===(r=e.localRefs)||void 0===r?void 0:r[n],s=this.opts.schemaId;a&&(o=new c6({schema:a,schemaId:s,root:e,baseId:t}))}return void 0!==o?e.refs[n]=u6.call(this,o):void 0},t6.getCompilingSchema=f6,t6.resolveSchema=h6;var v6=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function p6(e,t){var n,r=t.baseId,i=t.schema,o=t.root;if("/"===(null===(n=e.fragment)||void 0===n?void 0:n[0])){var a,s,c=yi(e.fragment.slice(1).split("/"));try{for(c.s();!(a=c.n()).done;){var l=a.value;if("boolean"==typeof i)return;var u=i[(0,a6.unescapeFragment)(l)];if(void 0===u)return;var f="object"===Wi(i=u)&&i[this.opts.schemaId];!v6.has(l)&&f&&(r=(0,o6.resolveUrl)(this.opts.uriResolver,r,f))}}catch(e){c.e(e)}finally{c.f()}if("boolean"!=typeof i&&i.$ref&&!(0,a6.schemaHasRulesButRef)(i,this.RULES)){var d=(0,o6.resolveUrl)(this.opts.uriResolver,r,i.$ref);s=h6.call(this,o,d)}var h=this.opts.schemaId;return(s=s||new c6({schema:i,schemaId:h,root:o,baseId:r})).schema!==s.root.schema?s:void 0}}var m6={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},g6={},y6={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i<r;++i)t[i]=t[i].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}function s(e){var r="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=n(n("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+n("%[89A-Fa-f]"+o+"%"+o+o)+"|"+n("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),l=e?"[\\uE000-\\uF8FF]":"[]",u=t(r,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n(r+t(r,i,"[\\+\\-\\.]")+"*"),n(n(a+"|"+t(u,s,"[\\:]"))+"*");var f=n(n("25[0-5]")+"|"+n("2[0-4]"+i)+"|"+n("1"+i+i)+"|"+n("0?[1-9]"+i)+"|0?0?"+i),d=n(f+"\\."+f+"\\."+f+"\\."+f),h=n(o+"{1,4}"),v=n(n(h+"\\:"+h)+"|"+d),p=n(n(h+"\\:")+"{6}"+v),m=n("\\:\\:"+n(h+"\\:")+"{5}"+v),g=n(n(h)+"?\\:\\:"+n(h+"\\:")+"{4}"+v),y=n(n(n(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+n(h+"\\:")+"{3}"+v),b=n(n(n(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+n(h+"\\:")+"{2}"+v),w=n(n(n(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+v),k=n(n(n(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+v),x=n(n(n(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),j=n(n(n(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),S=n([p,m,g,y,b,w,k,x,j].join("|")),C=n(n(u+"|"+a)+"+");n("[vV]"+o+"+\\."+t(u,s,"[\\:]")+"+"),n(n(a+"|"+t(u,s))+"*");var $=n(a+"|"+t(u,s,"[\\:\\@]"));return n(n(a+"|"+t(u,s,"[\\@]"))+"+"),n(n($+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",r,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,s,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,s),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,c),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+n(n("\\%25|\\%(?!"+o+"{2})")+"("+C+")")+"?\\]?$")}}var c=s(!1),l=s(!0),u=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},d=2147483647,h=36,v=1,p=26,m=38,g=700,y=72,b=128,w="-",k=/^xn--/,x=/[^\0-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-v,$=Math.floor,_=String.fromCharCode;function O(e){throw new RangeError(S[e])}function M(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function E(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+M((e=e.replace(j,".")).split("."),t).join(".")}function A(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}var P=function(e){return String.fromCodePoint.apply(String,f(e))},T=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},N=function(e,t,n){var r=0;for(e=n?$(e/g):e>>1,e+=$(e/t);e>C*p>>1;r+=h)e=$(e/C);return $(r+(C+1)*e/(e+m))},I=function(e){var t=[],n=e.length,r=0,i=b,o=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s<a;++s)e.charCodeAt(s)>=128&&O("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c<n;){for(var l=r,u=1,f=h;;f+=h){c>=n&&O("invalid-input");var m=T(e.charCodeAt(c++));(m>=h||m>$((d-r)/u))&&O("overflow"),r+=m*u;var g=f<=o?v:f>=o+p?p:f-o;if(m<g)break;var k=h-g;u>$(d/k)&&O("overflow"),u*=k}var x=t.length+1;o=N(r-l,x,0==l),$(r/x)>d-i&&O("overflow"),i+=$(r/x),r%=x,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},D=function(e){var t=[],n=(e=A(e)).length,r=b,i=0,o=y,a=!0,s=!1,c=void 0;try{for(var l,u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var f=l.value;f<128&&t.push(_(f))}}catch(e){s=!0,c=e}finally{try{!a&&u.return&&u.return()}finally{if(s)throw c}}var m=t.length,g=m;for(m&&t.push(w);g<n;){var k=d,x=!0,j=!1,S=void 0;try{for(var C,M=e[Symbol.iterator]();!(x=(C=M.next()).done);x=!0){var E=C.value;E>=r&&E<k&&(k=E)}}catch(e){j=!0,S=e}finally{try{!x&&M.return&&M.return()}finally{if(j)throw S}}var P=g+1;k-r>$((d-i)/P)&&O("overflow"),i+=(k-r)*P,r=k;var T=!0,I=!1,D=void 0;try{for(var z,L=e[Symbol.iterator]();!(T=(z=L.next()).done);T=!0){var B=z.value;if(B<r&&++i>d&&O("overflow"),B==r){for(var q=i,F=h;;F+=h){var V=F<=o?v:F>=o+p?p:F-o;if(q<V)break;var W=q-V,H=h-V;t.push(_(R(V+W%H,0))),q=$(W/H)}t.push(_(R(q,0))),o=N(i,P,g==m),i=0,++g}}}catch(e){I=!0,D=e}finally{try{!T&&L.return&&L.return()}finally{if(I)throw D}}++i,++r}return t.join("")},z=function(e){return E(e,(function(e){return k.test(e)?I(e.slice(4).toLowerCase()):e}))},L=function(e){return E(e,(function(e){return x.test(e)?"xn--"+D(e):e}))},B={version:"2.1.0",ucs2:{decode:A,encode:P},decode:I,encode:D,toASCII:L,toUnicode:z},q={};function F(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function V(e){for(var t="",n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function W(e,t){function n(e){var n=V(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,F).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,F).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,F).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,F).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,F).replace(t.PCT_ENCODED,i)),e}function H(e){return e.replace(/^0*(.*)/,"$1")||"0"}function U(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(H).join("."):e}function J(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],o=r[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(H):[],d=c.split(":").map(H),h=t.IPV4ADDRESS.test(d[d.length-1]),v=h?7:8,p=d.length-v,m=Array(v),g=0;g<v;++g)m[g]=f[g]||d[p+g]||"";h&&(m[v-1]=U(m[v-1],t));var y=m.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(y&&y.length>1){var w=m.slice(0,y.index),k=m.slice(y.index+y.length);b=w.join(":")+"::"+k.join(":")}else b=m.join(":");return o&&(b+="%"+o),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?l:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(K);if(i){G?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=J(U(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=q[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)W(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=B.toASCII(n.host.replace(r.PCT_ENCODED,V).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}W(n,c)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function Y(e,t){var n=!1!==t.iri?l:c,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(J(U(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var X=/^\.\.?\//,Z=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(te);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?l:c,r=[],i=q[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,V).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}W(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=Y(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=ne(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),r.push(a)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=Q(re(e,n),n),t=Q(re(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=ne(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=ne(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function oe(e,t,n){var r=a({scheme:"null"},n);return re(ie(Q(e,r),Q(t,r),r,!0),r)}function ae(e,t){return"string"==typeof e?e=re(Q(e,t),t):"object"===r(e)&&(e=Q(re(e,t),t)),e}function se(e,t,n){return"string"==typeof e?e=re(Q(e,n),n):"object"===r(e)&&(e=re(e,n)),"string"==typeof t?t=re(Q(t,n),n):"object"===r(t)&&(t=re(t,n)),e===t}function ce(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:c.ESCAPE,F)}function le(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:c.PCT_ENCODED,V)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},fe={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=de(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),i=r[0],o=r[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},ve={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},pe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ye=n(n("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+n("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+n("%"+ge+ge)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",we=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ke="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),je=new RegExp(ye,"g"),Se=new RegExp(t("[^]",be,"[\\.]",'[\\"]',we),"g"),Ce=new RegExp(t("[^]",me,ke),"g"),$e=Ce;function _e(e){var t=V(e);return t.match(xe)?t:e}var Oe={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,o={},a=n.query.split("&"),s=0,c=a.length;s<c;++s){var l=a[s].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),f=0,d=u.length;f<d;++f)r.push(u[f]);break;case"subject":n.subject=le(l[1],t);break;case"body":n.body=le(l[1],t);break;default:i=!0,o[le(l[0],t)]=le(l[1],t)}}i&&(n.headers=o)}n.query=void 0;for(var h=0,v=r.length;h<v;++h){var p=r[h].split("@");if(p[0]=le(p[0]),t.unicodeSupport)p[1]=le(p[1],t).toLowerCase();else try{p[1]=B.toASCII(le(p[1],t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}r[h]=p.join("@")}return n},serialize:function(e,t){var n=e,r=o(e.to);if(r){for(var a=0,s=r.length;a<s;++a){var c=String(r[a]),l=c.lastIndexOf("@"),u=c.slice(0,l).replace(je,_e).replace(je,i).replace(Se,F),f=c.slice(l+1);try{f=t.iri?B.toUnicode(f):B.toASCII(le(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}r[a]=u+"@"+f}n.path=r.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var h=[];for(var v in d)d[v]!==pe[v]&&h.push(v.replace(je,_e).replace(je,i).replace(Ce,F)+"="+d[v].replace(je,_e).replace(je,i).replace($e,F));return h.length&&(n.query=h.join("&")),n}},Me=/^([^\:]+)\:(.*)/,Ee={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(Me),r=e;if(n){var i=t.scheme||r.scheme||"urn",o=n[1].toLowerCase(),a=n[2],s=i+":"+(t.nid||o),c=q[s];r.nid=o,r.nss=a,r.path=void 0,c&&(r=c.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,i=n+":"+(t.nid||r),o=q[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(r||t.nid)+":"+s,a}},Ae=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Pe={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(Ae)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};q[ue.scheme]=ue,q[fe.scheme]=fe,q[he.scheme]=he,q[ve.scheme]=ve,q[Oe.scheme]=Oe,q[Ee.scheme]=Ee,q[Pe.scheme]=Pe,e.SCHEMES=q,e.pctEncChar=F,e.pctDecChars=V,e.parse=Q,e.removeDotSegments=ne,e.serialize=re,e.resolveComponents=ie,e.resolve=oe,e.normalize=ae,e.equal=se,e.escapeComponent=ce,e.unescapeComponent=le,Object.defineProperty(e,"__esModule",{value:!0})}(y6.exports);var b6=y6.exports;Object.defineProperty(g6,"__esModule",{value:!0});var w6=b6;w6.code='require("ajv/dist/runtime/uri").default',g6.default=w6,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=K5();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=o5();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Y5(),i=e6(),o=v5,a=t6,s=o5(),c=M5,l=h5,u=a5,f=m6,d=g6,h=function(e,t){return new RegExp(e,t)};h.code="new RegExp";var v=["removeAdditional","useDefaults","coerceTypes"],p=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ni(this,e),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=Ri(Ri({},t),function(e){var t,n,r,i,o,a,s,c,l,u,f,v,p,m,g,y,b,w,k,x,j,S,C,$,_,O=e.strict,M=null===(t=e.code)||void 0===t?void 0:t.optimize,E=!0===M||void 0===M?1:M||0,A=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:h,P=null!==(i=e.uriResolver)&&void 0!==i?i:d.default;return{strictSchema:null===(a=null!==(o=e.strictSchema)&&void 0!==o?o:O)||void 0===a||a,strictNumbers:null===(c=null!==(s=e.strictNumbers)&&void 0!==s?s:O)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:O)&&void 0!==u?u:"log",strictTuples:null!==(v=null!==(f=e.strictTuples)&&void 0!==f?f:O)&&void 0!==v?v:"log",strictRequired:null!==(m=null!==(p=e.strictRequired)&&void 0!==p?p:O)&&void 0!==m&&m,code:e.code?Ri(Ri({},e.code),{},{optimize:E,regExp:A}):{optimize:E,regExp:A},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(k=e.inlineRefs)||void 0===k||k,schemaId:null!==(x=e.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(C=e.validateFormats)||void 0===C||C,unicodeRegExp:null===($=e.unicodeRegExp)||void 0===$||$,int32range:null===(_=e.int32range)||void 0===_||_,uriResolver:P}}(t));var n=this.opts.code,r=n.es5,i=n.lines;this.scope=new s.ValueScope({scope:{},prefixes:p,es5:r,lines:i}),this.logger=function(e){if(!1===e)return C;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(t.logger);var a=t.validateFormats;t.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,t,"NOT SUPPORTED"),b.call(this,g,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&x.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&j.call(this,t.keywords),"object"==Wi(t.meta)&&this.addMetaSchema(t.meta),k.call(this),t.validateFormats=a}return Di(e,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var e=this.opts,t=e.$data,n=e.meta,r=e.schemaId,i=f;"id"===r&&((i=Ri({},f)).id=i.$id,delete i.$id),n&&t&&this.addMetaSchema(i,i[r],!1)}},{key:"defaultMeta",value:function(){var e=this.opts,t=e.meta,n=e.schemaId;return this.opts.defaultMeta="object"==Wi(t)?t[n]||t:void 0}},{key:"validate",value:function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'.concat(e,'"'))}else n=this.compile(e);var r=n(t);return"$async"in n||(this.errors=n.errors),r}},{key:"compile",value:function(e,t){var n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}},{key:"compileAsync",value:function(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var n=this.opts.loadSchema;return r.call(this,e,t);function r(e,t){return o.apply(this,arguments)}function o(){return(o=ki(bi().mark((function e(t,n){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.call(this,t.$schema);case 2:return r=this._addSchema(t,n),e.abrupt("return",r.validate||c.call(this,r));case 4:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function a(e){return s.apply(this,arguments)}function s(){return(s=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t||this.getSchema(t)){e.next=3;break}return e.next=3,r.call(this,{$ref:t},!0);case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function c(e){return l.apply(this,arguments)}function l(){return(l=ki(bi().mark((function e(t){return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",this._compileSchemaEnv(t));case 4:if(e.prev=4,e.t0=e.catch(0),e.t0 instanceof i.default){e.next=8;break}throw e.t0;case 8:return u.call(this,e.t0),e.next=11,f.call(this,e.t0.missingSchema);case 11:return e.abrupt("return",c.call(this,t));case 12:case"end":return e.stop()}}),e,this,[[0,4]])})))).apply(this,arguments)}function u(e){var t=e.missingSchema,n=e.missingRef;if(this.refs[t])throw new Error("AnySchema ".concat(t," is loaded but ").concat(n," cannot be resolved"))}function f(e){return d.apply(this,arguments)}function d(){return d=ki(bi().mark((function e(n){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.call(this,n);case 2:if(r=e.sent,this.refs[n]){e.next=6;break}return e.next=6,a.call(this,r.$schema);case 6:this.refs[n]||this.addSchema(r,n,t);case 7:case"end":return e.stop()}}),e,this)}))),d.apply(this,arguments)}function h(e){return v.apply(this,arguments)}function v(){return v=ki(bi().mark((function e(t){var r;return bi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this._loading[t])){e.next=3;break}return e.abrupt("return",r);case 3:return e.prev=3,e.next=6,this._loading[t]=n(t);case 6:return e.abrupt("return",e.sent);case 7:return e.prev=7,delete this._loading[t],e.finish(7);case 10:case"end":return e.stop()}}),e,this,[[3,,7,10]])}))),v.apply(this,arguments)}}},{key:"addSchema",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(e)){var o,a=yi(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.addSchema(s,void 0,n,i)}}catch(e){a.e(e)}finally{a.f()}return this}if("object"===Wi(e)){var l=this.opts.schemaId;if(void 0!==(r=e[l])&&"string"!=typeof r)throw new Error("schema ".concat(l," must be string"))}return t=(0,c.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,i,!0),this}},{key:"addMetaSchema",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema;return this.addSchema(e,t,!0,n),this}},{key:"validateSchema",value:function(e,t){if("boolean"==typeof e)return!0;var n;if(void 0!==(n=e.$schema)&&"string"!=typeof n)throw new Error("$schema must be a string");if(!(n=n||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,e);if(!r&&t){var i="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(i);this.logger.error(i)}return r}},{key:"getSchema",value:function(e){for(var t;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){var n=this.opts.schemaId,r=new a.SchemaEnv({schema:{},schemaId:n});if(!(t=a.resolveSchema.call(this,r,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}},{key:"removeSchema",value:function(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(Wi(e)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var t=w.call(this,e);return"object"==Wi(t)&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this;case"object":var n=e;this._cache.delete(n);var r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(e){var t,n=yi(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addKeyword(r)}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addKeyword",value:function(e,t){var n,r=this;if("string"==typeof e)n=e,"object"==Wi(t)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=Wi(e)||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(_.call(this,n,t),!t)return(0,u.eachItem)(n,(function(e){return O.call(r,e)})),this;E.call(this,t);var i=Ri(Ri({},t),{},{type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)});return(0,u.eachItem)(n,0===i.type.length?function(e){return O.call(r,e,i)}:function(e){return i.type.forEach((function(t){return O.call(r,e,i,t)}))}),this}},{key:"getKeyword",value:function(e){var t=this.RULES.all[e];return"object"==Wi(t)?t.definition:!!t}},{key:"removeKeyword",value:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e];var n,r=yi(t.rules);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.rules.findIndex((function(t){return t.keyword===e}));o>=0&&i.rules.splice(o,1)}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"addFormat",value:function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}},{key:"errorsText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.separator,r=void 0===n?", ":n,i=t.dataVar,o=void 0===i?"data":i;return e&&0!==e.length?e.map((function(e){return"".concat(o).concat(e.instancePath," ").concat(e.message)})).reduce((function(e,t){return e+r+t})):"No errors"}},{key:"$dataMetaSchema",value:function(e,t){var n=this.RULES.all;e=JSON.parse(JSON.stringify(e));var r,i=yi(t);try{for(i.s();!(r=i.n()).done;){var o,a=r.value.split("/").slice(1),s=e,c=yi(a);try{for(c.s();!(o=c.n()).done;){s=s[o.value]}}catch(e){c.e(e)}finally{c.f()}for(var l in n){var u=n[l];if("object"==Wi(u)){var f=u.definition.$data,d=s[l];f&&d&&(s[l]=P(d))}}}}catch(e){i.e(e)}finally{i.f()}return e}},{key:"_removeAllSchemas",value:function(e,t){for(var n in e){var r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}},{key:"_addSchema",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,s=this.opts.schemaId;if("object"==Wi(e))r=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}var l=this._cache.get(e);if(void 0!==l)return l;n=(0,c.normalizeId)(r||n);var u=c.getSchemaRefs.call(this,e,n);return l=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}},{key:"_checkUnique",value:function(e){if(this.schemas[e]||this.refs[e])throw new Error('schema with key or id "'.concat(e,'" already exists'))}},{key:"_compileSchemaEnv",value:function(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}},{key:"_compileMetaSchema",value:function(e){var t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}}]),e}();function b(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var i in e){var o=i;o in t&&this.logger[r]("".concat(n,": option ").concat(i,". ").concat(e[o]))}}function w(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function k(){var e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(var t in e)this.addSchema(e[t],t)}function x(){for(var e in this.opts.formats){var t=this.opts.formats[e];t&&this.addFormat(e,t)}}function j(e){if(Array.isArray(e))this.addVocabulary(e);else for(var t in this.logger.warn("keywords option as map is deprecated, pass array"),e){var n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function S(){var e,t=Ri({},this.opts),n=yi(v);try{for(n.s();!(e=n.n()).done;){delete t[e.value]}}catch(e){n.e(e)}finally{n.f()}return t}e.default=y,y.ValidationError=r.default,y.MissingRefError=i.default;var C={log:function(){},warn:function(){},error:function(){}};var $=/^[a-z_$][a-z0-9_$:-]*$/i;function _(e,t){var n=this.RULES;if((0,u.eachItem)(e,(function(e){if(n.keywords[e])throw new Error("Keyword ".concat(e," is already defined"));if(!$.test(e))throw new Error("Keyword ".concat(e," has invalid name"))})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function O(e,t,n){var r,i=this,o=null==t?void 0:t.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');var a=this.RULES,s=o?a.post:a.rules.find((function(e){return e.type===n}));if(s||(s={type:n,rules:[]},a.rules.push(s)),a.keywords[e]=!0,t){var c={keyword:e,definition:Ri(Ri({},t),{},{type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)})};t.before?M.call(this,s,c,t.before):s.rules.push(c),a.all[e]=c,null===(r=t.implements)||void 0===r||r.forEach((function(e){return i.addKeyword(e)}))}}function M(e,t,n){var r=e.rules.findIndex((function(e){return e.keyword===n}));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn("rule ".concat(n," is not defined")))}function E(e){var t=e.metaSchema;void 0!==t&&(e.$data&&this.opts.$data&&(t=P(t)),e.validateSchema=this.compile(t,!0))}var A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function P(e){return{anyOf:[e,A]}}}(K8);var k6={},x6={},j6={};Object.defineProperty(j6,"__esModule",{value:!0});var S6={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};j6.default=S6;var C6={};Object.defineProperty(C6,"__esModule",{value:!0}),C6.callRef=C6.getValidate=void 0;var $6=e6(),_6=C5(),O6=o5(),M6=f5(),E6=t6,A6=a5,P6={keyword:"$ref",schemaType:"string",code:function(e){var t=e.gen,n=e.schema,r=e.it,i=r.baseId,o=r.schemaEnv,a=r.validateName,s=r.opts,c=r.self,l=o.root;if(("#"===n||"#/"===n)&&i===l.baseId)return function(){if(o===l)return R6(e,a,o,o.$async);var n=t.scopeValue("root",{ref:l});return R6(e,(0,O6._)(rn||(rn=pi(["",".validate"])),n),l,l.$async)}();var u,f,d=E6.resolveRef.call(c,l,i,n);if(void 0===d)throw new $6.default(r.opts.uriResolver,i,n);return d instanceof E6.SchemaEnv?(f=T6(e,u=d),void R6(e,f,u,u.$async)):function(r){var i=t.scopeValue("schema",!0===s.code.source?{ref:r,code:(0,O6.stringify)(r)}:{ref:r}),o=t.name("valid"),a=e.subschema({schema:r,dataTypes:[],schemaPath:O6.nil,topSchemaRef:i,errSchemaPath:n},o);e.mergeEvaluated(a),e.ok(o)}(d)}};function T6(e,t){var n=e.gen;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,O6._)(on||(on=pi(["",".validate"])),n.scopeValue("wrapper",{ref:t}))}function R6(e,t,n,r){var i=e.gen,o=e.it,a=o.allErrors,s=o.schemaEnv,c=o.opts.passContext?M6.default.this:O6.nil;function l(e){var t=(0,O6._)(cn||(cn=pi(["",".errors"])),e);i.assign(M6.default.vErrors,(0,O6._)(ln||(ln=pi([""," === null ? "," : ",".concat(",")"])),M6.default.vErrors,t,M6.default.vErrors,t)),i.assign(M6.default.errors,(0,O6._)(un||(un=pi(["",".length"])),M6.default.vErrors))}function u(e){var t;if(o.opts.unevaluated){var r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==o.props)if(r&&!r.dynamicProps)void 0!==r.props&&(o.props=A6.mergeEvaluated.props(i,r.props,o.props));else{var a=i.var("props",(0,O6._)(fn||(fn=pi(["",".evaluated.props"])),e));o.props=A6.mergeEvaluated.props(i,a,o.props,O6.Name)}if(!0!==o.items)if(r&&!r.dynamicItems)void 0!==r.items&&(o.items=A6.mergeEvaluated.items(i,r.items,o.items));else{var s=i.var("items",(0,O6._)(dn||(dn=pi(["",".evaluated.items"])),e));o.items=A6.mergeEvaluated.items(i,s,o.items,O6.Name)}}}r?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");var n=i.let("valid");i.try((function(){i.code((0,O6._)(an||(an=pi(["await ",""])),(0,_6.callValidateCode)(e,t,c))),u(t),a||i.assign(n,!0)}),(function(e){i.if((0,O6._)(sn||(sn=pi(["!("," instanceof ",")"])),e,o.ValidationError),(function(){return i.throw(e)})),l(e),a||i.assign(n,!1)})),e.ok(n)}():e.result((0,_6.callValidateCode)(e,t,c),(function(){return u(t)}),(function(){return l(t)}))}C6.getValidate=T6,C6.callRef=R6,C6.default=P6,Object.defineProperty(x6,"__esModule",{value:!0});var N6=C6,I6=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",j6.default,N6.default];x6.default=I6;var D6={},z6={};Object.defineProperty(z6,"__esModule",{value:!0});var L6=o5(),B6=L6.operators,q6={maximum:{okStr:"<=",ok:B6.LTE,fail:B6.GT},minimum:{okStr:">=",ok:B6.GTE,fail:B6.LT},exclusiveMaximum:{okStr:"<",ok:B6.LT,fail:B6.GTE},exclusiveMinimum:{okStr:">",ok:B6.GT,fail:B6.LTE}},F6={message:function(e){var t=e.keyword,n=e.schemaCode;return(0,L6.str)(hn||(hn=pi(["must be "," ",""])),q6[t].okStr,n)},params:function(e){var t=e.keyword,n=e.schemaCode;return(0,L6._)(vn||(vn=pi(["{comparison: ",", limit: ","}"])),q6[t].okStr,n)}},V6={keyword:Object.keys(q6),type:"number",schemaType:"number",$data:!0,error:F6,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode;e.fail$data((0,L6._)(pn||(pn=pi([""," "," "," || isNaN(",")"])),n,q6[t].fail,r,n))}};z6.default=V6;var W6={};Object.defineProperty(W6,"__esModule",{value:!0});var H6=o5(),U6={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,H6.str)(mn||(mn=pi(["must be multiple of ",""])),t)},params:function(e){var t=e.schemaCode;return(0,H6._)(gn||(gn=pi(["{multipleOf: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.schemaCode,i=e.it.opts.multipleOfPrecision,o=t.let("res"),a=i?(0,H6._)(yn||(yn=pi(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,i):(0,H6._)(bn||(bn=pi([""," !== parseInt(",")"])),o,o);e.fail$data((0,H6._)(wn||(wn=pi(["("," === 0 || ("," = ","/",", ","))"])),r,o,n,r,a))}};W6.default=U6;var J6={},K6={};function G6(e){for(var t,n=e.length,r=0,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r}Object.defineProperty(K6,"__esModule",{value:!0}),K6.default=G6,G6.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(J6,"__esModule",{value:!0});var Q6=o5(),Y6=a5,X6=K6,Z6={message:function(e){var t=e.keyword,n=e.schemaCode,r="maxLength"===t?"more":"fewer";return(0,Q6.str)(kn||(kn=pi(["must NOT have "," than "," characters"])),r,n)},params:function(e){var t=e.schemaCode;return(0,Q6._)(xn||(xn=pi(["{limit: ","}"])),t)}},e7={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Z6,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i=e.it,o="maxLength"===t?Q6.operators.GT:Q6.operators.LT,a=!1===i.opts.unicode?(0,Q6._)(jn||(jn=pi(["",".length"])),n):(0,Q6._)(Sn||(Sn=pi(["","(",")"])),(0,Y6.useFunc)(e.gen,X6.default),n);e.fail$data((0,Q6._)(Cn||(Cn=pi([""," "," ",""])),a,o,r))}};J6.default=e7;var t7={};Object.defineProperty(t7,"__esModule",{value:!0});var n7=C5(),r7=o5(),i7={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,r7.str)($n||($n=pi(['must match pattern "','"'])),t)},params:function(e){var t=e.schemaCode;return(0,r7._)(_n||(_n=pi(["{pattern: ","}"])),t)}},code:function(e){var t=e.data,n=e.$data,r=e.schema,i=e.schemaCode,o=e.it.opts.unicodeRegExp?"u":"",a=n?(0,r7._)(On||(On=pi(["(new RegExp(",", ","))"])),i,o):(0,n7.usePattern)(e,r);e.fail$data((0,r7._)(Mn||(Mn=pi(["!",".test(",")"])),a,t))}};t7.default=i7;var o7={};Object.defineProperty(o7,"__esModule",{value:!0});var a7=o5(),s7={message:function(e){var t=e.keyword,n=e.schemaCode,r="maxProperties"===t?"more":"fewer";return(0,a7.str)(En||(En=pi(["must NOT have "," than "," properties"])),r,n)},params:function(e){var t=e.schemaCode;return(0,a7._)(An||(An=pi(["{limit: ","}"])),t)}},c7={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:s7,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i="maxProperties"===t?a7.operators.GT:a7.operators.LT;e.fail$data((0,a7._)(Pn||(Pn=pi(["Object.keys(",").length "," ",""])),n,i,r))}};o7.default=c7;var l7={};Object.defineProperty(l7,"__esModule",{value:!0});var u7=C5(),f7=o5(),d7=a5,h7={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:function(e){var t=e.params.missingProperty;return(0,f7.str)(Tn||(Tn=pi(["must have required property '","'"])),t)},params:function(e){var t=e.params.missingProperty;return(0,f7._)(Rn||(Rn=pi(["{missingProperty: ","}"])),t)}},code:function(e){var t=e.gen,n=e.schema,r=e.schemaCode,i=e.data,o=e.$data,a=e.it,s=a.opts;if(o||0!==n.length){var c=n.length>=s.loopRequired;if(a.allErrors?function(){if(c||o)e.block$data(f7.nil,m);else{var t,r=yi(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;(0,u7.checkReportMissingProp)(e,i)}}catch(e){r.e(e)}finally{r.f()}}}():function(){var a=t.let("missing");if(c||o){var l=t.let("valid",!0);e.block$data(l,(function(){return function(n,o){e.setParams({missingProperty:n}),t.forOf(n,r,(function(){t.assign(o,(0,u7.propertyInData)(t,i,n,s.ownProperties)),t.if((0,f7.not)(o),(function(){e.error(),t.break()}))}),f7.nil)}(a,l)})),e.ok(l)}else t.if((0,u7.checkMissingProp)(e,n,a)),(0,u7.reportMissingProp)(e,a),t.else()}(),s.strictRequired){var l,u=e.parentSchema.properties,f=e.it.definedProperties,d=yi(n);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(void 0===(null==u?void 0:u[h])&&!f.has(h)){var v=a.schemaEnv.baseId+a.errSchemaPath,p='required property "'.concat(h,'" is not defined at "').concat(v,'" (strictRequired)');(0,d7.checkStrictMode)(a,p,a.opts.strictRequired)}}}catch(e){d.e(e)}finally{d.f()}}}function m(){t.forOf("prop",r,(function(n){e.setParams({missingProperty:n}),t.if((0,u7.noPropertyInData)(t,i,n,s.ownProperties),(function(){return e.error()}))}))}}};l7.default=h7;var v7={};Object.defineProperty(v7,"__esModule",{value:!0});var p7=o5(),m7={message:function(e){var t=e.keyword,n=e.schemaCode,r="maxItems"===t?"more":"fewer";return(0,p7.str)(Nn||(Nn=pi(["must NOT have "," than "," items"])),r,n)},params:function(e){var t=e.schemaCode;return(0,p7._)(In||(In=pi(["{limit: ","}"])),t)}},g7={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:m7,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i="maxItems"===t?p7.operators.GT:p7.operators.LT;e.fail$data((0,p7._)(Dn||(Dn=pi(["",".length "," ",""])),n,i,r))}};v7.default=g7;var y7={},b7={};Object.defineProperty(b7,"__esModule",{value:!0});var w7=E5;w7.code='require("ajv/dist/runtime/equal").default',b7.default=w7,Object.defineProperty(y7,"__esModule",{value:!0});var k7=h5,x7=o5(),j7=a5,S7=b7,C7={message:function(e){var t=e.params,n=t.i,r=t.j;return(0,x7.str)(zn||(zn=pi(["must NOT have duplicate items (items ## "," and "," are identical)"])),r,n)},params:function(e){var t=e.params,n=t.i,r=t.j;return(0,x7._)(Ln||(Ln=pi(["{i: ",", j: ","}"])),n,r)}},$7={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:C7,code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schema,o=e.parentSchema,a=e.schemaCode,s=e.it;if(r||i){var c=t.let("valid"),l=o.items?(0,k7.getSchemaTypes)(o.items):[];e.block$data(c,(function(){var r=t.let("i",(0,x7._)(qn||(qn=pi(["",".length"])),n)),i=t.let("j");e.setParams({i:r,j:i}),t.assign(c,!0),t.if((0,x7._)(Fn||(Fn=pi([""," > 1"])),r),(function(){return(l.length>0&&!l.some((function(e){return"object"===e||"array"===e}))?u:f)(r,i)}))}),(0,x7._)(Bn||(Bn=pi([""," === false"])),a)),e.ok(c)}function u(r,i){var o=t.name("item"),a=(0,k7.checkDataTypes)(l,o,s.opts.strictNumbers,k7.DataType.Wrong),u=t.const("indices",(0,x7._)(Vn||(Vn=pi(["{}"]))));t.for((0,x7._)(Wn||(Wn=pi([";","--;"])),r),(function(){t.let(o,(0,x7._)(Hn||(Hn=pi(["","[","]"])),n,r)),t.if(a,(0,x7._)(Un||(Un=pi(["continue"])))),l.length>1&&t.if((0,x7._)(Jn||(Jn=pi(["typeof ",' == "string"'])),o),(0,x7._)(Kn||(Kn=pi(["",' += "_"'])),o)),t.if((0,x7._)(Gn||(Gn=pi(["typeof ","[",'] == "number"'])),u,o),(function(){t.assign(i,(0,x7._)(Qn||(Qn=pi(["","[","]"])),u,o)),e.error(),t.assign(c,!1).break()})).code((0,x7._)(Yn||(Yn=pi(["","[","] = ",""])),u,o,r))}))}function f(r,i){var o=(0,j7.useFunc)(t,S7.default),a=t.name("outer");t.label(a).for((0,x7._)(Xn||(Xn=pi([";","--;"])),r),(function(){return t.for((0,x7._)(Zn||(Zn=pi([""," = ","; ","--;"])),i,r,i),(function(){return t.if((0,x7._)(er||(er=pi(["","(","[","], ","[","])"])),o,n,r,n,i),(function(){e.error(),t.assign(c,!1).break(a)}))}))}))}}};y7.default=$7;var _7={};Object.defineProperty(_7,"__esModule",{value:!0});var O7=o5(),M7=a5,E7=b7,A7={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(e){var t=e.schemaCode;return(0,O7._)(tr||(tr=pi(["{allowedValue: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schemaCode,o=e.schema;r||o&&"object"==Wi(o)?e.fail$data((0,O7._)(nr||(nr=pi(["!","(",", ",")"])),(0,M7.useFunc)(t,E7.default),n,i)):e.fail((0,O7._)(rr||(rr=pi([""," !== ",""])),o,n))}};_7.default=A7;var P7={};Object.defineProperty(P7,"__esModule",{value:!0});var T7=o5(),R7=a5,N7=b7,I7={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(e){var t=e.schemaCode;return(0,T7._)(ir||(ir=pi(["{allowedValues: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schema,o=e.schemaCode,a=e.it;if(!r&&0===i.length)throw new Error("enum must have non-empty array");var s,c,l=i.length>=a.opts.loopEnum,u=function(){return null!=s?s:s=(0,R7.useFunc)(t,N7.default)};if(l||r)c=t.let("valid"),e.block$data(c,(function(){t.assign(c,!1),t.forOf("v",o,(function(e){return t.if((0,T7._)(or||(or=pi(["","(",", ",")"])),u(),n,e),(function(){return t.assign(c,!0).break()}))}))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");var f=t.const("vSchema",o);c=T7.or.apply(void 0,Bi(i.map((function(e,t){return function(e,t){var r=i[t];return"object"===Wi(r)&&null!==r?(0,T7._)(ar||(ar=pi(["","(",", ","[","])"])),u(),n,e,t):(0,T7._)(sr||(sr=pi([""," === ",""])),n,r)}(f,t)}))))}e.pass(c)}};P7.default=I7,Object.defineProperty(D6,"__esModule",{value:!0});var D7=W6,z7=J6,L7=t7,B7=o7,q7=l7,F7=v7,V7=y7,W7=_7,H7=P7,U7=[z6.default,D7.default,z7.default,L7.default,B7.default,q7.default,F7.default,V7.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},W7.default,H7.default];D6.default=U7;var J7={},K7={};Object.defineProperty(K7,"__esModule",{value:!0}),K7.validateAdditionalItems=void 0;var G7=o5(),Q7=a5,Y7={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,G7.str)(cr||(cr=pi(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,G7._)(lr||(lr=pi(["{limit: ","}"])),t)}},code:function(e){var t=e.parentSchema,n=e.it,r=t.items;Array.isArray(r)?X7(e,r):(0,Q7.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function X7(e,t){var n=e.gen,r=e.schema,i=e.data,o=e.keyword,a=e.it;a.items=!0;var s=n.const("len",(0,G7._)(ur||(ur=pi(["",".length"])),i));if(!1===r)e.setParams({len:t.length}),e.pass((0,G7._)(fr||(fr=pi([""," <= ",""])),s,t.length));else if("object"==Wi(r)&&!(0,Q7.alwaysValidSchema)(a,r)){var c=n.var("valid",(0,G7._)(dr||(dr=pi([""," <= ",""])),s,t.length));n.if((0,G7.not)(c),(function(){return function(r){n.forRange("i",t.length,s,(function(t){e.subschema({keyword:o,dataProp:t,dataPropType:Q7.Type.Num},r),a.allErrors||n.if((0,G7.not)(r),(function(){return n.break()}))}))}(c)})),e.ok(c)}}K7.validateAdditionalItems=X7,K7.default=Y7;var Z7={},e9={};Object.defineProperty(e9,"__esModule",{value:!0}),e9.validateTuple=void 0;var t9=o5(),n9=a5,r9=C5(),i9={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(e){var t=e.schema,n=e.it;if(Array.isArray(t))return o9(e,"additionalItems",t);n.items=!0,(0,n9.alwaysValidSchema)(n,t)||e.ok((0,r9.validateArray)(e))}};function o9(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.schema,r=e.gen,i=e.parentSchema,o=e.data,a=e.keyword,s=e.it;!function(e){var r=s.opts,i=s.errSchemaPath,o=n.length,c=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(r.strictTuples&&!c){var l='"'.concat(a,'" is ').concat(o,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(i,'"');(0,n9.checkStrictMode)(s,l,r.strictTuples)}}(i),s.opts.unevaluated&&n.length&&!0!==s.items&&(s.items=n9.mergeEvaluated.items(r,n.length,s.items));var c=r.name("valid"),l=r.const("len",(0,t9._)(hr||(hr=pi(["",".length"])),o));n.forEach((function(t,n){(0,n9.alwaysValidSchema)(s,t)||(r.if((0,t9._)(vr||(vr=pi([""," > ",""])),l,n),(function(){return e.subschema({keyword:a,schemaProp:n,dataProp:n},c)})),e.ok(c))}))}e9.validateTuple=o9,e9.default=i9,Object.defineProperty(Z7,"__esModule",{value:!0});var a9=e9,s9={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(e){return(0,a9.validateTuple)(e,"items")}};Z7.default=s9;var c9={};Object.defineProperty(c9,"__esModule",{value:!0});var l9=o5(),u9=a5,f9=C5(),d9=K7,h9={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,l9.str)(pr||(pr=pi(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,l9._)(mr||(mr=pi(["{limit: ","}"])),t)}},code:function(e){var t=e.schema,n=e.parentSchema,r=e.it,i=n.prefixItems;r.items=!0,(0,u9.alwaysValidSchema)(r,t)||(i?(0,d9.validateAdditionalItems)(e,i):e.ok((0,f9.validateArray)(e)))}};c9.default=h9;var v9={};Object.defineProperty(v9,"__esModule",{value:!0});var p9=o5(),m9=a5,g9={message:function(e){var t=e.params,n=t.min,r=t.max;return void 0===r?(0,p9.str)(gr||(gr=pi(["must contain at least "," valid item(s)"])),n):(0,p9.str)(yr||(yr=pi(["must contain at least "," and no more than "," valid item(s)"])),n,r)},params:function(e){var t=e.params,n=t.min,r=t.max;return void 0===r?(0,p9._)(br||(br=pi(["{minContains: ","}"])),n):(0,p9._)(wr||(wr=pi(["{minContains: ",", maxContains: ","}"])),n,r)}},y9={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:g9,code:function(e){var t,n,r=e.gen,i=e.schema,o=e.parentSchema,a=e.data,s=e.it,c=o.minContains,l=o.maxContains;s.opts.next?(t=void 0===c?1:c,n=l):t=1;var u=r.const("len",(0,p9._)(kr||(kr=pi(["",".length"])),a));if(e.setParams({min:t,max:n}),void 0!==n||0!==t){if(void 0!==n&&t>n)return(0,m9.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,m9.alwaysValidSchema)(s,i)){var f=(0,p9._)(xr||(xr=pi([""," >= ",""])),u,t);return void 0!==n&&(f=(0,p9._)(jr||(jr=pi([""," && "," <= ",""])),f,u,n)),void e.pass(f)}s.items=!0;var d=r.name("valid");void 0===n&&1===t?v(d,(function(){return r.if(d,(function(){return r.break()}))})):0===t?(r.let(d,!0),void 0!==n&&r.if((0,p9._)(Sr||(Sr=pi(["",".length > 0"])),a),h)):(r.let(d,!1),h()),e.result(d,(function(){return e.reset()}))}else(0,m9.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function h(){var e=r.name("_valid"),i=r.let("count",0);v(e,(function(){return r.if(e,(function(){return function(e){r.code((0,p9._)(Cr||(Cr=pi(["","++"])),e)),void 0===n?r.if((0,p9._)($r||($r=pi([""," >= ",""])),e,t),(function(){return r.assign(d,!0).break()})):(r.if((0,p9._)(_r||(_r=pi([""," > ",""])),e,n),(function(){return r.assign(d,!1).break()})),1===t?r.assign(d,!0):r.if((0,p9._)(Or||(Or=pi([""," >= ",""])),e,t),(function(){return r.assign(d,!0)})))}(i)}))}))}function v(t,n){r.forRange("i",0,u,(function(r){e.subschema({keyword:"contains",dataProp:r,dataPropType:m9.Type.Num,compositeRule:!0},t),n()}))}}};v9.default=y9;var b9={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=o5(),n=a5,r=C5();e.error={message:function(e){var n=e.params,r=n.property,i=n.depsCount,o=n.deps,a=1===i?"property":"properties";return(0,t.str)(Mr||(Mr=pi(["must have "," "," when property "," is present"])),a,o,r)},params:function(e){var n=e.params,r=n.property,i=n.depsCount,o=n.deps,a=n.missingProperty;return(0,t._)(Er||(Er=pi(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),r,a,i,o)}};var i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code:function(e){var t=xi(function(e){var t=e.schema,n={},r={};for(var i in t){if("__proto__"!==i)(Array.isArray(t[i])?n:r)[i]=t[i]}return[n,r]}(e),2),n=t[0],r=t[1];o(e,n),a(e,r)}};function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema,i=e.gen,o=e.data,a=e.it;if(0!==Object.keys(n).length){var s=i.let("missing"),c=function(){var c=n[l];if(0===c.length)return 1;var u=(0,r.propertyInData)(i,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?i.if(u,(function(){var t,n=yi(c);try{for(n.s();!(t=n.n()).done;){var i=t.value;(0,r.checkReportMissingProp)(e,i)}}catch(e){n.e(e)}finally{n.f()}})):(i.if((0,t._)(Ar||(Ar=pi([""," && (",")"])),u,(0,r.checkMissingProp)(e,c,s))),(0,r.reportMissingProp)(e,s),i.else())};for(var l in n)c()}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema,i=e.gen,o=e.data,a=e.keyword,s=e.it,c=i.name("valid"),l=function(l){if((0,n.alwaysValidSchema)(s,t[l]))return 1;i.if((0,r.propertyInData)(i,o,l,s.opts.ownProperties),(function(){var t=e.subschema({keyword:a,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(function(){return i.var(c,!0)})),e.ok(c)};for(var u in t)l(u)}e.validatePropertyDeps=o,e.validateSchemaDeps=a,e.default=i}(b9);var w9={};Object.defineProperty(w9,"__esModule",{value:!0});var k9=o5(),x9=a5,j9={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(e){var t=e.params;return(0,k9._)(Pr||(Pr=pi(["{propertyName: ","}"])),t.propertyName)}},code:function(e){var t=e.gen,n=e.schema,r=e.data,i=e.it;if(!(0,x9.alwaysValidSchema)(i,n)){var o=t.name("valid");t.forIn("key",r,(function(n){e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},o),t.if((0,k9.not)(o),(function(){e.error(!0),i.allErrors||t.break()}))})),e.ok(o)}}};w9.default=j9;var S9={};Object.defineProperty(S9,"__esModule",{value:!0});var C9=C5(),$9=o5(),_9=f5(),O9=a5,M9={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(e){var t=e.params;return(0,$9._)(Tr||(Tr=pi(["{additionalProperty: ","}"])),t.additionalProperty)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.data,o=e.errsCount,a=e.it;if(!o)throw new Error("ajv implementation error");var s=a.allErrors,c=a.opts;if(a.props=!0,"all"===c.removeAdditional||!(0,O9.alwaysValidSchema)(a,n)){var l=(0,C9.allSchemaProperties)(r.properties),u=(0,C9.allSchemaProperties)(r.patternProperties);t.forIn("key",i,(function(n){l.length||u.length?t.if(function(n){var i;if(l.length>8){var o=(0,O9.schemaRefOrVal)(a,r.properties,"properties");i=(0,C9.isOwnProperty)(t,o,n)}else i=l.length?$9.or.apply(void 0,Bi(l.map((function(e){return(0,$9._)(Nr||(Nr=pi([""," === ",""])),n,e)})))):$9.nil;return u.length&&(i=$9.or.apply(void 0,[i].concat(Bi(u.map((function(t){return(0,$9._)(Ir||(Ir=pi(["",".test(",")"])),(0,C9.usePattern)(e,t),n)})))))),(0,$9.not)(i)}(n),(function(){return d(n)})):d(n)})),e.ok((0,$9._)(Rr||(Rr=pi([""," === ",""])),o,_9.default.errors))}function f(e){t.code((0,$9._)(Dr||(Dr=pi(["delete ","[","]"])),i,e))}function d(r){if("all"===c.removeAdditional||c.removeAdditional&&!1===n)f(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(s||t.break());if("object"==Wi(n)&&!(0,O9.alwaysValidSchema)(a,n)){var i=t.name("valid");"failing"===c.removeAdditional?(h(r,i,!1),t.if((0,$9.not)(i),(function(){e.reset(),f(r)}))):(h(r,i),s||t.if((0,$9.not)(i),(function(){return t.break()})))}}}function h(t,n,r){var i={keyword:"additionalProperties",dataProp:t,dataPropType:O9.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,n)}}};S9.default=M9;var E9={};Object.defineProperty(E9,"__esModule",{value:!0});var A9=K5(),P9=C5(),T9=a5,R9=S9,N9={keyword:"properties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.data,o=e.it;"all"===o.opts.removeAdditional&&void 0===r.additionalProperties&&R9.default.code(new A9.KeywordCxt(o,R9.default,"additionalProperties"));var a,s=(0,P9.allSchemaProperties)(n),c=yi(s);try{for(c.s();!(a=c.n()).done;){var l=a.value;o.definedProperties.add(l)}}catch(e){c.e(e)}finally{c.f()}o.opts.unevaluated&&s.length&&!0!==o.props&&(o.props=T9.mergeEvaluated.props(t,(0,T9.toHash)(s),o.props));var u=s.filter((function(e){return!(0,T9.alwaysValidSchema)(o,n[e])}));if(0!==u.length){var f,d=t.name("valid"),h=yi(u);try{for(h.s();!(f=h.n()).done;){var v=f.value;p(v)?m(v):(t.if((0,P9.propertyInData)(t,i,v,o.opts.ownProperties)),m(v),o.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(v),e.ok(d)}}catch(e){h.e(e)}finally{h.f()}}function p(e){return o.opts.useDefaults&&!o.compositeRule&&void 0!==n[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};E9.default=N9;var I9={};Object.defineProperty(I9,"__esModule",{value:!0});var D9=C5(),z9=o5(),L9=a5,B9=a5,q9={keyword:"patternProperties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.data,i=e.parentSchema,o=e.it,a=o.opts,s=(0,D9.allSchemaProperties)(n),c=s.filter((function(e){return(0,L9.alwaysValidSchema)(o,n[e])}));if(0!==s.length&&(c.length!==s.length||o.opts.unevaluated&&!0!==o.props)){var l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=t.name("valid");!0===o.props||o.props instanceof z9.Name||(o.props=(0,B9.evaluatedPropsToName)(t,o.props));var f=o.props;!function(){var e,n=yi(s);try{for(n.s();!(e=n.n()).done;){var r=e.value;l&&d(r),o.allErrors?h(r):(t.var(u,!0),h(r),t.if(u))}}catch(e){n.e(e)}finally{n.f()}}()}function d(e){for(var t in l)new RegExp(e).test(t)&&(0,L9.checkStrictMode)(o,"property ".concat(t," matches pattern ").concat(e," (use allowMatchingProperties)"))}function h(n){t.forIn("key",r,(function(r){t.if((0,z9._)(zr||(zr=pi(["",".test(",")"])),(0,D9.usePattern)(e,n),r),(function(){var i=c.includes(n);i||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:r,dataPropType:B9.Type.Str},u),o.opts.unevaluated&&!0!==f?t.assign((0,z9._)(Lr||(Lr=pi(["","[","]"])),f,r),!0):i||o.allErrors||t.if((0,z9.not)(u),(function(){return t.break()}))}))}))}}};I9.default=q9;var F9={};Object.defineProperty(F9,"__esModule",{value:!0});var V9=a5,W9={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(e){var t=e.gen,n=e.schema,r=e.it;if((0,V9.alwaysValidSchema)(r,n))e.fail();else{var i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(function(){return e.reset()}),(function(){return e.error()}))}},error:{message:"must NOT be valid"}};F9.default=W9;var H9={};Object.defineProperty(H9,"__esModule",{value:!0});var U9={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:C5().validateUnion,error:{message:"must match a schema in anyOf"}};H9.default=U9;var J9={};Object.defineProperty(J9,"__esModule",{value:!0});var K9=o5(),G9=a5,Q9={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(e){var t=e.params;return(0,K9._)(Br||(Br=pi(["{passingSchemas: ","}"])),t.passing)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.it;if(!Array.isArray(n))throw new Error("ajv implementation error");if(!i.opts.discriminator||!r.discriminator){var o=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block((function(){o.forEach((function(n,r){var o;(0,G9.alwaysValidSchema)(i,n)?t.var(c,!0):o=e.subschema({keyword:"oneOf",schemaProp:r,compositeRule:!0},c),r>0&&t.if((0,K9._)(qr||(qr=pi([""," && ",""])),c,a)).assign(a,!1).assign(s,(0,K9._)(Fr||(Fr=pi(["[",", ","]"])),s,r)).else(),t.if(c,(function(){t.assign(a,!0),t.assign(s,r),o&&e.mergeEvaluated(o,K9.Name)}))}))})),e.result(a,(function(){return e.reset()}),(function(){return e.error(!0)}))}}};J9.default=Q9;var Y9={};Object.defineProperty(Y9,"__esModule",{value:!0});var X9=a5,Z9={keyword:"allOf",schemaType:"array",code:function(e){var t=e.gen,n=e.schema,r=e.it;if(!Array.isArray(n))throw new Error("ajv implementation error");var i=t.name("valid");n.forEach((function(t,n){if(!(0,X9.alwaysValidSchema)(r,t)){var o=e.subschema({keyword:"allOf",schemaProp:n},i);e.ok(i),e.mergeEvaluated(o)}}))}};Y9.default=Z9;var eee={};Object.defineProperty(eee,"__esModule",{value:!0});var tee=o5(),nee=a5,ree={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(e){var t=e.params;return(0,tee.str)(Vr||(Vr=pi(['must match "','" schema'])),t.ifClause)},params:function(e){var t=e.params;return(0,tee._)(Wr||(Wr=pi(["{failingKeyword: ","}"])),t.ifClause)}},code:function(e){var t=e.gen,n=e.parentSchema,r=e.it;void 0===n.then&&void 0===n.else&&(0,nee.checkStrictMode)(r,'"if" without "then" and "else" is ignored');var i=iee(r,"then"),o=iee(r,"else");if(i||o){var a,s=t.let("valid",!0),c=t.name("_valid");if(a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c),e.mergeEvaluated(a),e.reset(),i&&o){var l=t.let("ifClause");e.setParams({ifClause:l}),t.if(c,u("then",l),u("else",l))}else i?t.if(c,u("then")):t.if((0,tee.not)(c),u("else"));e.pass(s,(function(){return e.error(!0)}))}function u(n,r){return function(){var i=e.subschema({keyword:n},c);t.assign(s,c),e.mergeValidEvaluated(i,s),r?t.assign(r,(0,tee._)(Hr||(Hr=pi(["",""])),n)):e.setParams({ifClause:n})}}}};function iee(e,t){var n=e.schema[t];return void 0!==n&&!(0,nee.alwaysValidSchema)(e,n)}eee.default=ree;var oee={};Object.defineProperty(oee,"__esModule",{value:!0});var aee=a5,see={keyword:["then","else"],schemaType:["object","boolean"],code:function(e){var t=e.keyword,n=e.parentSchema,r=e.it;void 0===n.if&&(0,aee.checkStrictMode)(r,'"'.concat(t,'" without "if" is ignored'))}};oee.default=see,Object.defineProperty(J7,"__esModule",{value:!0});var cee=K7,lee=Z7,uee=e9,fee=c9,dee=v9,hee=b9,vee=w9,pee=S9,mee=E9,gee=I9,yee=F9,bee=H9,wee=J9,kee=Y9,xee=eee,jee=oee;J7.default=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[yee.default,bee.default,wee.default,kee.default,xee.default,jee.default,vee.default,pee.default,hee.default,mee.default,gee.default];return e?t.push(lee.default,fee.default):t.push(cee.default,uee.default),t.push(dee.default),t};var See={},Cee={};Object.defineProperty(Cee,"__esModule",{value:!0});var $ee=o5(),_ee={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,$ee.str)(Ur||(Ur=pi(['must match format "','"'])),t)},params:function(e){var t=e.schemaCode;return(0,$ee._)(Jr||(Jr=pi(["{format: ","}"])),t)}},code:function(e,t){var n=e.gen,r=e.data,i=e.$data,o=e.schema,a=e.schemaCode,s=e.it,c=s.opts,l=s.errSchemaPath,u=s.schemaEnv,f=s.self;c.validateFormats&&(i?function(){var i=n.scopeValue("formats",{ref:f.formats,code:c.code.formats}),o=n.const("fDef",(0,$ee._)(Kr||(Kr=pi(["","[","]"])),i,a)),s=n.let("fType"),l=n.let("format");n.if((0,$ee._)(Gr||(Gr=pi(["typeof ",' == "object" && !('," instanceof RegExp)"])),o,o),(function(){return n.assign(s,(0,$ee._)(Qr||(Qr=pi(["",'.type || "string"'])),o)).assign(l,(0,$ee._)(Yr||(Yr=pi(["",".validate"])),o))}),(function(){return n.assign(s,(0,$ee._)(Xr||(Xr=pi(['"string"'])))).assign(l,o)})),e.fail$data((0,$ee.or)(!1===c.strictSchema?$ee.nil:(0,$ee._)(Zr||(Zr=pi([""," && !",""])),a,l),(d=u.$async?(0,$ee._)(ei||(ei=pi(["(",".async ? await ","(",") : ","(","))"])),o,l,r,l,r):(0,$ee._)(ti||(ti=pi(["","(",")"])),l,r),h=(0,$ee._)(ni||(ni=pi(["(typeof ",' == "function" ? '," : ",".test(","))"])),l,d,l,r),(0,$ee._)(ri||(ri=pi([""," && "," !== true && "," === "," && !",""])),l,l,s,t,h))));var d,h}():function(){var i=f.formats[o];if(!i)return void function(){if(!1===c.strictSchema)return void f.logger.warn(e());throw new Error(e());function e(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(l,'"')}}();if(!0===i)return;var a=xi(function(e){var t=e instanceof RegExp?(0,$ee.regexpCode)(e):c.code.formats?(0,$ee._)(ii||(ii=pi(["","",""])),c.code.formats,(0,$ee.getProperty)(o)):void 0,r=n.scopeValue("formats",{key:o,ref:e,code:t});if("object"==Wi(e)&&!(e instanceof RegExp))return[e.type||"string",e.validate,(0,$ee._)(oi||(oi=pi(["",".validate"])),r)];return["string",e,r]}(i),3),s=a[0],d=a[1],h=a[2];s===t&&e.pass(function(){if("object"==Wi(i)&&!(i instanceof RegExp)&&i.async){if(!u.$async)throw new Error("async format in sync schema");return(0,$ee._)(ai||(ai=pi(["await ","(",")"])),h,r)}return"function"==typeof d?(0,$ee._)(si||(si=pi(["","(",")"])),h,r):(0,$ee._)(ci||(ci=pi(["",".test(",")"])),h,r)}())}())}};Cee.default=_ee,Object.defineProperty(See,"__esModule",{value:!0});var Oee=[Cee.default];See.default=Oee;var Mee={};Object.defineProperty(Mee,"__esModule",{value:!0}),Mee.contentVocabulary=Mee.metadataVocabulary=void 0,Mee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Mee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(k6,"__esModule",{value:!0});var Eee=D6,Aee=J7,Pee=See,Tee=Mee,Ree=[x6.default,Eee.default,(0,Aee.default)(),Pee.default,Tee.metadataVocabulary,Tee.contentVocabulary];k6.default=Ree;var Nee={},Iee={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(Iee),Object.defineProperty(Nee,"__esModule",{value:!0});var Dee=o5(),zee=Iee,Lee=t6,Bee=a5,qee={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(e){var t=e.params,n=t.discrError,r=t.tagName;return n===zee.DiscrError.Tag?'tag "'.concat(r,'" must be string'):'value of tag "'.concat(r,'" must be in oneOf')},params:function(e){var t=e.params,n=t.discrError,r=t.tag,i=t.tagName;return(0,Dee._)(li||(li=pi(["{error: ",", tag: ",", tagValue: ","}"])),n,i,r)}},code:function(e){var t=e.gen,n=e.data,r=e.schema,i=e.parentSchema,o=e.it,a=i.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var s=r.propertyName;if("string"!=typeof s)throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");var c=t.let("valid",!1),l=t.const("tag",(0,Dee._)(ui||(ui=pi(["","",""])),n,(0,Dee.getProperty)(s)));function u(n){var r=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:n},r);return e.mergeEvaluated(i,Dee.Name),r}t.if((0,Dee._)(fi||(fi=pi(["typeof ",' == "string"'])),l),(function(){return function(){var n=function(){for(var e,t={},n=f(i),r=!0,c=0;c<a.length;c++){var l=a[c];(null==l?void 0:l.$ref)&&!(0,Bee.schemaHasRulesButRef)(l,o.self.RULES)&&(l=Lee.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,null==l?void 0:l.$ref))instanceof Lee.SchemaEnv&&(l=l.schema);var u=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[s];if("object"!=Wi(u))throw new Error('discriminator: oneOf subschemas (or referenced schemas) must have "properties/'.concat(s,'"'));r=r&&(n||f(l)),d(u,c)}if(!r)throw new Error('discriminator: "'.concat(s,'" must be required'));return t;function f(e){var t=e.required;return Array.isArray(t)&&t.includes(s)}function d(e,t){if(e.const)h(e.const,t);else{if(!e.enum)throw new Error('discriminator: "properties/'.concat(s,'" must have "const" or "enum"'));var n,r=yi(e.enum);try{for(r.s();!(n=r.n()).done;){h(n.value,t)}}catch(e){r.e(e)}finally{r.f()}}}function h(e,n){if("string"!=typeof e||e in t)throw new Error('discriminator: "'.concat(s,'" values must be unique strings'));t[e]=n}}();for(var r in t.if(!1),n)t.elseIf((0,Dee._)(di||(di=pi([""," === ",""])),l,r)),t.assign(c,u(n[r]));t.else(),e.error(!1,{discrError:zee.DiscrError.Mapping,tag:l,tagName:s}),t.endIf()}()}),(function(){return e.error(!1,{discrError:zee.DiscrError.Tag,tag:l,tagName:s})})),e.ok(c)}};Nee.default=qee;var Fee={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=k6,r=Nee,i=Fee,o=["/properties"],a="http://json-schema.org/draft-07/schema",s=function(e){_i(s,e);var t=Mi(s);function s(){return Ni(this,s),t.apply(this,arguments)}return Di(s,[{key:"_addVocabularies",value:function(){var e=this;mi(Pi(s.prototype),"_addVocabularies",this).call(this),n.default.forEach((function(t){return e.addVocabulary(t)})),this.opts.discriminator&&this.addKeyword(r.default)}},{key:"_addDefaultMetaSchema",value:function(){if(mi(Pi(s.prototype),"_addDefaultMetaSchema",this).call(this),this.opts.meta){var e=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}}},{key:"defaultMeta",value:function(){return this.opts.defaultMeta=mi(Pi(s.prototype),"defaultMeta",this).call(this)||(this.getSchema(a)?a:void 0)}}]),s}(K8.default);e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var c=K5();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=o5();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Y5();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=e6();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(J8,J8.exports);var Vee=$c(J8.exports);function Wee(e){if(void 0===e.schema)throw new Error("Deprecation warning: the signature of createAjvValidator is changed from createAjvValidator(schema, schemaDefinitions, ajvOptions) to createAjvValidator({ schema, schemaDefinitions, ajvOptions }). Please pass the arguments as an object instead of unnamed arguments.");var t=function(e){var t=e.schemaDefinitions,n=e.ajvOptions,r=new Vee(Ri({allErrors:!0,verbose:!0,$data:!0},n));t&&Object.keys(t).forEach((function(e){r.addSchema(t[e],e)}));return r}(e);if(void 0!==e.onCreateAjv&&!1===(t=e.onCreateAjv(t)||t).opts.verbose)throw new Error("Ajv must be configured with the option verbose=true");var n=t.compile(e.schema);if(n.errors)throw n.errors[0];return function(e){return n(e),(n.errors||[]).map(Hee).map((function(t){return function(e,t){return{path:yc(e,t.instancePath),message:t.message||"Unknown error",severity:es.warning}}(e,t)}))}}function Hee(e){if("enum"===e.keyword&&Array.isArray(e.schema)){var t=e.schema;if(t){if((t=t.map((function(e){return JSON.stringify(e)}))).length>5){var n=["("+(t.length-5)+" more...)"];(t=t.slice(0,5)).push(n)}e.message="should be equal to one of: "+t.join(", ")}}return"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}var Uee={id:"lodash",name:"Lodash",description:'\n<p>\n Enter a JavaScript function to filter, sort, or transform the data.\n You can use <a href="https://lodash.com" target="_blank" rel="noopener noreferrer">Lodash</a>\n functions like <code>_.map</code>, <code>_.filter</code>,\n <code>_.orderBy</code>, <code>_.sortBy</code>, <code>_.groupBy</code>,\n <code>_.pick</code>, <code>_.uniq</code>, <code>_.get</code>, etcetera.\n</p>\n',createQuery:function(e,t){var n=t.filter,r=t.sort,i=t.projection,o=[" return _.chain(data)\n"];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(hM(n.path)),s=yM(n.value),c="string"==typeof s?"'".concat(n.value,"'"):fu(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;o.push(" .filter(".concat(a," ").concat(n.relation," ").concat(c,")\n"))}r&&r.path&&r.direction&&o.push(" .orderBy([".concat(function(e){return 0===e.length?"":e.every((function(e){return pM.test(e)||vM.test(e)}))?"'"+e.map(dM).join("").replace(/^\./,"")+"'":JSON.stringify(e)}(r.path),"], ['").concat(r.direction,"'])\n"));if(i&&i.paths)if(i.paths.length>1){var l=i.paths.map((function(e){var t=Mb(e)||"item";return" ".concat(JSON.stringify(t),": item").concat(hM(e))}));o.push(" .map(item => ({\n".concat(l.join(",\n"),"\n }))\n"))}else{var u=i.paths[0];o.push(" .map(item => item".concat(hM(u),")\n"))}return o.push(" .value()\n"),"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(e,t){!function(e){var t,n,r=null===(t=e.match(/_\.chain\(/g))||void 0===t?void 0:t.length,i=null===(n=e.match(/\.value\(\)/g))||void 0===n?void 0:n.length;if(r!==i)throw new Error("Cannot execute query: Lodash _.chain(...) must end with .value()")}(t);var n=new Function("_",'"use strict";\n\n'+t+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')(U_)(e);return void 0!==n?n:null}};var Jee={};!function(e){function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,i){if(e===i)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(i))return!1;if(!0===t(e)){if(e.length!==i.length)return!1;for(var o=0;o<e.length;o++)if(!1===r(e[o],i[o]))return!1;return!0}if(!0===n(e)){var a={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===r(e[s],i[s]))return!1;a[s]=!0}for(var c in i)if(hasOwnProperty.call(i,c)&&!0!==a[c])return!1;return!0}return!1}function i(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(n(e)){for(var r in e)if(e.hasOwnProperty(r))return!1;return!0}return!1}var o;o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var a=0,s=1,c=2,l=3,u=4,f=6,d=8,h=9,v={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},p="EOF",m="UnquotedIdentifier",g="QuotedIdentifier",y="Rbracket",b="Rparen",w="Comma",k="Colon",x="Rbrace",j="Number",S="Current",C="Expref",$="Pipe",_="Or",O="And",M="EQ",E="GT",A="LT",P="GTE",T="LTE",R="NE",N="Flatten",I="Star",D="Filter",z="Dot",L="Not",B="Lbrace",q="Lbracket",F="Lparen",V="Literal",W={".":z,"*":I,",":w,":":k,"{":B,"}":x,"]":y,"(":F,")":b,"@":S},H={"<":!0,">":!0,"=":!0,"!":!0},U={" ":!0,"\t":!0,"\n":!0};function J(e){return e>="0"&&e<="9"||"-"===e}function K(){}K.prototype={tokenize:function(e){var t,n,r,i,o=[];for(this._current=0;this._current<e.length;)if((i=e[this._current])>="a"&&i<="z"||i>="A"&&i<="Z"||"_"===i)t=this._current,n=this._consumeUnquotedIdentifier(e),o.push({type:m,value:n,start:t});else if(void 0!==W[e[this._current]])o.push({type:W[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(J(e[this._current]))r=this._consumeNumber(e),o.push(r);else if("["===e[this._current])r=this._consumeLBracket(e),o.push(r);else if('"'===e[this._current])t=this._current,n=this._consumeQuotedIdentifier(e),o.push({type:g,value:n,start:t});else if("'"===e[this._current])t=this._current,n=this._consumeRawStringLiteral(e),o.push({type:V,value:n,start:t});else if("`"===e[this._current]){t=this._current;var a=this._consumeLiteral(e);o.push({type:V,value:a,start:t})}else if(void 0!==H[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==U[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:O,value:"&&",start:t})):o.push({type:C,value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:_,value:"||",start:t})):o.push({type:$,value:"|",start:t})}return o},_consumeUnquotedIdentifier:function(e){var t,n=this._current;for(this._current++;this._current<e.length&&((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(n,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&'"'!==e[r+1]?r++:r+=2,this._current=r}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var n=e.length;"'"!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&"'"!==e[r+1]?r++:r+=2,this._current=r}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var n=e.length;J(e[this._current])&&this._current<n;)this._current++;var r=parseInt(e.slice(t,this._current));return{type:j,value:r,start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:D,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:N,value:"[]",start:t}):{type:q,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,n=e[t];return this._current++,"!"===n?"="===e[this._current]?(this._current++,{type:R,value:"!=",start:t}):{type:L,value:"!",start:t}:"<"===n?"="===e[this._current]?(this._current++,{type:T,value:"<=",start:t}):{type:A,value:"<",start:t}:">"===n?"="===e[this._current]?(this._current++,{type:P,value:">=",start:t}):{type:E,value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:M,value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current<r;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}var a=o(e.slice(n,this._current));return a=a.replace("\\`","`"),t=this._looksLikeJSON(a)?JSON.parse(a):JSON.parse('"'+a+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var G={};function Q(){}function Y(e){this.runtime=e}function X(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[d]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[c,l]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[c]},{types:[c]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[c,l,u]}]},map:{_func:this._functionMap,_signature:[{types:[f]},{types:[l]}]},max:{_func:this._functionMax,_signature:[{types:[d,h]}]},merge:{_func:this._functionMerge,_signature:[{types:[u],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[l]},{types:[f]}]},sum:{_func:this._functionSum,_signature:[{types:[d]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[c]},{types:[c]}]},min:{_func:this._functionMin,_signature:[{types:[d,h]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[l]},{types:[f]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[u]}]},values:{_func:this._functionValues,_signature:[{types:[u]}]},sort:{_func:this._functionSort,_signature:[{types:[h,d]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[l]},{types:[f]}]},join:{_func:this._functionJoin,_signature:[{types:[c]},{types:[h]}]},reverse:{_func:this._functionReverse,_signature:[{types:[c,l]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}G[p]=0,G[m]=0,G[g]=0,G[y]=0,G[b]=0,G[w]=0,G[x]=0,G[j]=0,G[S]=0,G[C]=0,G[$]=1,G[_]=2,G[O]=3,G[M]=5,G[E]=5,G[A]=5,G[P]=5,G[T]=5,G[R]=5,G[N]=9,G[I]=20,G[D]=21,G[z]=40,G[L]=45,G[B]=50,G[q]=55,G[F]=60,Q.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if(this._lookahead(0)!==p){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=(new K).tokenize(e);t.push({type:p,value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e<G[r];)this._advance(),n=this.led(r,n),r=this._lookahead(0);return n},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,n;switch(e.type){case V:return{type:"Literal",value:e.value};case m:return{type:"Field",name:e.value};case g:var r={type:"Field",name:e.value};if(this._lookahead(0)===F)throw new Error("Quoted identifier not allowed for function names.");return r;case L:return{type:"NotExpression",children:[t=this.expression(G.Not)]};case I:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===y?{type:"Identity"}:this._parseProjectionRHS(G.Star)]};case D:return this.led(e.type,{type:"Identity"});case B:return this._parseMultiselectHash();case N:return{type:"Projection",children:[{type:N,children:[{type:"Identity"}]},t=this._parseProjectionRHS(G.Flatten)]};case q:return this._lookahead(0)===j||this._lookahead(0)===k?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):this._lookahead(0)===I&&this._lookahead(1)===y?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(G.Star)]}):this._parseMultiselectList();case S:return{type:S};case C:return{type:"ExpressionReference",children:[n=this.expression(G.Expref)]};case F:for(var i=[];this._lookahead(0)!==b;)this._lookahead(0)===S?(n={type:S},this._advance()):n=this.expression(0),i.push(n);return this._match(b),i[0];default:this._errorToken(e)}},led:function(e,t){var n;switch(e){case z:var r=G.Dot;return this._lookahead(0)!==I?{type:"Subexpression",children:[t,n=this._parseDotRHS(r)]}:(this._advance(),{type:"ValueProjection",children:[t,n=this._parseProjectionRHS(r)]});case $:return n=this.expression(G.Pipe),{type:$,children:[t,n]};case _:return{type:"OrExpression",children:[t,n=this.expression(G.Or)]};case O:return{type:"AndExpression",children:[t,n=this.expression(G.And)]};case F:for(var i,o=t.name,a=[];this._lookahead(0)!==b;)this._lookahead(0)===S?(i={type:S},this._advance()):i=this.expression(0),this._lookahead(0)===w&&this._match(w),a.push(i);return this._match(b),{type:"Function",name:o,children:a};case D:var s=this.expression(0);return this._match(y),{type:"FilterProjection",children:[t,n=this._lookahead(0)===N?{type:"Identity"}:this._parseProjectionRHS(G.Filter),s]};case N:return{type:"Projection",children:[{type:N,children:[t]},this._parseProjectionRHS(G.Flatten)]};case M:case R:case E:case P:case A:case T:return this._parseComparator(t,e);case q:var c=this._lookaheadToken(0);return c.type===j||c.type===k?(n=this._parseIndexExpression(),this._projectIfSlice(t,n)):(this._match(I),this._match(y),{type:"Projection",children:[t,n=this._parseProjectionRHS(G.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),n=new Error("Expected "+e+", got: "+t.type);throw n.name="ParserError",n}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if(this._lookahead(0)===k||this._lookahead(1)===k)return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(y),e},_projectIfSlice:function(e,t){var n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[n,this._parseProjectionRHS(G.Star)]}:n},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,n=this._lookahead(0);n!==y&&t<3;){if(n===k)t++,this._advance();else{if(n!==j){var r=this._lookahead(0),i=new Error("Syntax error, unexpected token: "+r.value+"("+r.type+")");throw i.name="Parsererror",i}e[t]=this._lookaheadToken(0).value,this._advance()}n=this._lookahead(0)}return this._match(y),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(G[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return[m,g,I].indexOf(t)>=0?this.expression(e):t===q?(this._match(q),this._parseMultiselectList()):t===B?(this._match(B),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(G[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===q)t=this.expression(e);else if(this._lookahead(0)===D)t=this.expression(e);else{if(this._lookahead(0)!==z){var n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}this._match(z),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==y;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===w&&(this._match(w),this._lookahead(0)===y))throw new Error("Unexpected token Rbracket")}return this._match(y),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,r=[],i=[m,g];;){if(e=this._lookaheadToken(0),i.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(k),n={type:"KeyValuePair",name:t,value:this.expression(0)},r.push(n),this._lookahead(0)===w)this._match(w);else if(this._lookahead(0)===x){this._match(x);break}}return{type:"MultiSelectHash",children:r}}},Y.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var a,s,c,l,u,f,d,h,v;switch(e.type){case"Field":return null!==o&&n(o)?void 0===(f=o[e.name])?null:f:null;case"Subexpression":for(c=this.visit(e.children[0],o),v=1;v<e.children.length;v++)if(null===(c=this.visit(e.children[1],c)))return null;return c;case"IndexExpression":return d=this.visit(e.children[0],o),this.visit(e.children[1],d);case"Index":if(!t(o))return null;var p=e.value;return p<0&&(p=o.length+p),void 0===(c=o[p])&&(c=null),c;case"Slice":if(!t(o))return null;var m=e.children.slice(0),g=this.computeSliceParams(o.length,m),y=g[0],b=g[1],w=g[2];if(c=[],w>0)for(v=y;v<b;v+=w)c.push(o[v]);else for(v=y;v>b;v+=w)c.push(o[v]);return c;case"Projection":var k=this.visit(e.children[0],o);if(!t(k))return null;for(h=[],v=0;v<k.length;v++)null!==(s=this.visit(e.children[1],k[v]))&&h.push(s);return h;case"ValueProjection":if(!n(k=this.visit(e.children[0],o)))return null;h=[];var x=function(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n}(k);for(v=0;v<x.length;v++)null!==(s=this.visit(e.children[1],x[v]))&&h.push(s);return h;case"FilterProjection":if(!t(k=this.visit(e.children[0],o)))return null;var j=[],_=[];for(v=0;v<k.length;v++)i(a=this.visit(e.children[2],k[v]))||j.push(k[v]);for(var O=0;O<j.length;O++)null!==(s=this.visit(e.children[1],j[O]))&&_.push(s);return _;case"Comparator":switch(l=this.visit(e.children[0],o),u=this.visit(e.children[1],o),e.name){case M:c=r(l,u);break;case R:c=!r(l,u);break;case E:c=l>u;break;case P:c=l>=u;break;case A:c=l<u;break;case T:c=l<=u;break;default:throw new Error("Unknown comparator: "+e.name)}return c;case N:var I=this.visit(e.children[0],o);if(!t(I))return null;var D=[];for(v=0;v<I.length;v++)t(s=I[v])?D.push.apply(D,s):D.push(s);return D;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(h=[],v=0;v<e.children.length;v++)h.push(this.visit(e.children[v],o));return h;case"MultiSelectHash":if(null===o)return null;var z;for(h={},v=0;v<e.children.length;v++)h[(z=e.children[v]).name]=this.visit(z.value,o);return h;case"OrExpression":return i(a=this.visit(e.children[0],o))&&(a=this.visit(e.children[1],o)),a;case"AndExpression":return!0===i(l=this.visit(e.children[0],o))?l:this.visit(e.children[1],o);case"NotExpression":return i(l=this.visit(e.children[0],o));case"Literal":return e.value;case $:return d=this.visit(e.children[0],o),this.visit(e.children[1],d);case S:return o;case"Function":var L=[];for(v=0;v<e.children.length;v++)L.push(this.visit(e.children[v],o));return this.runtime.callFunction(e.name,L);case"ExpressionReference":var B=e.children[0];return B.jmespathType=C,B;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var n=t[0],r=t[1],i=t[2],o=[null,null,null];if(null===i)i=1;else if(0===i){var a=new Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var s=i<0;return n=null===n?s?e-1:0:this.capSliceRange(e,n,i),r=null===r?s?-1:e:this.capSliceRange(e,r,i),o[0]=n,o[1]=r,o[2]=i,o},capSliceRange:function(e,t,n){return t<0?(t+=e)<0&&(t=n<0?-1:0):t>=e&&(t=n<0?e-1:e),t}},X.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r,i,o,a;if(n[n.length-1].variadic){if(t.length<n.length)throw r=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+n.length+r+" but received "+t.length)}else if(t.length!==n.length)throw r=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+n.length+r+" but received "+t.length);for(var s=0;s<n.length;s++){a=!1,i=n[s].types,o=this._getTypeName(t[s]);for(var c=0;c<i.length;c++)if(this._typeMatches(o,i[c],t[s])){a=!0;break}if(!a){var l=i.map((function(e){return v[e]})).join(",");throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+l+" but received type "+v[o]+" instead.")}}},_typeMatches:function(e,t,n){if(t===s)return!0;if(t!==h&&t!==d&&t!==l)return e===t;if(t===l)return e===l;if(e===l){var r;t===d?r=a:t===h&&(r=c);for(var i=0;i<n.length;i++)if(!this._typeMatches(this._getTypeName(n[i]),r,n[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return c;case"[object Number]":return a;case"[object Array]":return l;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return e.jmespathType===C?f:u}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],n=e[1];return-1!==t.indexOf(n,t.length-n.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===c){for(var t=e[0],n="",r=t.length-1;r>=0;r--)n+=t[r];return n}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],r=0;r<n.length;r++)t+=n[r];return t/n.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],i=e[1],o=0;o<i.length;o++)t.push(n.visit(r,i[o]));return t},_functionMerge:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var i in r)t[i]=r[i]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r<t.length;r++)n.localeCompare(t[r])<0&&(n=t[r]);return n}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===a)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r<t.length;r++)t[r].localeCompare(n)<0&&(n=t[r]);return n}return null},_functionSum:function(e){for(var t=0,n=e[0],r=0;r<n.length;r++)t+=n[r];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case a:return"number";case c:return"string";case l:return"array";case u:return"object";case 5:return"boolean";case f:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],n=Object.keys(t),r=[],i=0;i<n.length;i++)r.push(t[n[i]]);return r},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===l?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===c?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,n=this._getTypeName(e[0]);return n===a?e[0]:n!==c||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var n=this._interpreter,r=e[1],i=this._getTypeName(n.visit(r,t[0]));if([a,c].indexOf(i)<0)throw new Error("TypeError");for(var o=this,s=[],l=0;l<t.length;l++)s.push([l,t[l]]);s.sort((function(e,t){var a=n.visit(r,e[1]),s=n.visit(r,t[1]);if(o._getTypeName(a)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(a));if(o._getTypeName(s)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(s));return a>s?1:a<s?-1:e[0]-t[0]}));for(var u=0;u<s.length;u++)t[u]=s[u][1];return t},_functionMaxBy:function(e){for(var t,n,r=e[1],i=e[0],o=this.createKeyFunction(r,[a,c]),s=-1/0,l=0;l<i.length;l++)(n=o(i[l]))>s&&(s=n,t=i[l]);return t},_functionMinBy:function(e){for(var t,n,r=e[1],i=e[0],o=this.createKeyFunction(r,[a,c]),s=1/0,l=0;l<i.length;l++)(n=o(i[l]))<s&&(s=n,t=i[l]);return t},createKeyFunction:function(e,t){var n=this,r=this._interpreter;return function(i){var o=r.visit(e,i);if(t.indexOf(n._getTypeName(o))<0){var a="TypeError: expected one of "+t+", received "+n._getTypeName(o);throw new Error(a)}return o}}},e.tokenize=function(e){return(new K).tokenize(e)},e.compile=function(e){return(new Q).parse(e)},e.search=function(e,t){var n=new Q,r=new X,i=new Y(r);r._interpreter=i;var o=n.parse(t);return i.search(o,e)},e.strictDeepEqual=r}(Jee);var Kee=$c(Jee),Gee={id:"jmespath",name:"JMESPath",description:'\n<p>\n Enter a <a href="https://jmespath.org" target="_blank" rel="noopener noreferrer">JMESPath</a> query \n to filter, sort, or transform the JSON data.\n To learn JMESPath, go to <a href="https://jmespath.org/tutorial.html" target="_blank" rel="noopener noreferrer">the interactive tutorial</a>.\n</p>\n',createQuery:function(e,t){var n=t.sort,r=t.filter,i=t.projection,o="";if(r&&r.path&&r.relation&&r.value){var a=Ys(e,["0"].concat(r.path)),s=yM(r.value),c="string"==typeof a&&null!=s?'"'.concat(r.value,'"'):s;o+="[? "+Qee(r.path)+" "+r.relation+" `"+c+"`]"}else o+=Array.isArray(e)?"[*]":"@";n&&n.path&&n.direction&&("desc"===n.direction?o+=" | reverse(sort_by(@, &"+Qee(n.path)+"))":o+=" | sort_by(@, &"+Qee(n.path)+")");if(i&&i.paths)if("]"!==o[o.length-1]&&(o+=" | [*]"),1===i.paths.length){var l=i.paths[0];o+=0===l.length?"":"."+Qee(l)}else i.paths.length>1&&(o+=".{"+i.paths.map((function(e){return Yee(e[e.length-1])+": "+Qee(e)})).join(", ")+"}");return o},executeQuery:function(e,t,n){var r=bO(n,JSON)?e:JSON.parse(n.stringify(e));return Kee.search(r,t)}};function Qee(e){if(0===e.length)return"@";var t=e.map((function(e){return"number"==typeof e?"["+e+"]":"."+Yee(String(e))})).join("");return"."===t[0]?t.slice(1):t}function Yee(e){return e.match(/^[A-Za-z\d_$]+$/)?e:JSON.stringify(e)}
/*!
* vanilla-picker v2.12.2
* https://vanilla-picker.js.org
*
* Copyright 2017-2023 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
* Released under the ISC license.
*/var Xee=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Zee=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ete=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var n=this;n.length<e;)n=t+n;return n};var tte={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function nte(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var rte=function(){function e(t,n,r,i){Xee(this,e);var o=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===r){var a=t&&""+t;a&&function(t){if(t.startsWith("hsl")){var n=t.match(/([\-\d\.e]+)/g).map(Number),r=ete(n,4),i=r[0],a=r[1],s=r[2],c=r[3];void 0===c&&(c=1),i/=360,a/=100,s/=100,o.hsla=[i,a,s,c]}else if(t.startsWith("rgb")){var l=t.match(/([\-\d\.e]+)/g).map(Number),u=ete(l,4),f=u[0],d=u[1],h=u[2],v=u[3];void 0===v&&(v=1),o.rgba=[f,d,h,v]}else t.startsWith("#")?o.rgba=e.hexToRgb(t):o.rgba=e.nameToRgb(t)||e.hexToRgb(t)}(a.toLowerCase())}else this.rgba=[t,n,r,void 0===i?1:i]}return Zee(e,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return nte(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],n=["","%","%",""],r=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,r){return nte(e*t[r],3===r?3:1)+n[r]}));return e?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=e.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=e.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var e=this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}));return"#"+e.map((function(e){return e.padStart(2,"0")})).join("")},set:function(t){this.rgba=e.hexToRgb(t)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var n=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(t){var n=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=tte[n];return void 0===r?r:e.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=ete(e,4),n=t[0],r=t[1],i=t[2],o=t[3];n/=255,r/=255,i/=255;var a=Math.max(n,r,i),s=Math.min(n,r,i),c=void 0,l=void 0,u=(a+s)/2;if(a===s)c=l=0;else{var f=a-s;switch(l=u>.5?f/(2-a-s):f/(a+s),a){case n:c=(r-i)/f+(r<i?6:0);break;case r:c=(i-n)/f+2;break;case i:c=(n-r)/f+4}c/=6}return[c,l,u,o]}},{key:"hslToRgb",value:function(e){var t=ete(e,4),n=t[0],r=t[1],i=t[2],o=t[3],a=void 0,s=void 0,c=void 0;if(0===r)a=s=c=i;else{var l=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=i<.5?i*(1+r):i+r-i*r,f=2*i-u;a=l(f,u,n+1/3),s=l(f,u,n),c=l(f,u,n-1/3)}var d=[255*a,255*s,255*c].map(Math.round);return d[3]=o,d}}]),e}(),ite=function(){function e(){Xee(this,e),this._events=[]}return Zee(e,[{key:"add",value:function(e,t,n){e.addEventListener(t,n,!1),this._events.push({target:e,type:t,handler:n})}},{key:"remove",value:function(t,n,r){this._events=this._events.filter((function(i){var o=!0;return t&&t!==i.target&&(o=!1),n&&n!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&e._doRemove(i.target,i.type,i.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(t){return e._doRemove(t.target,t.type,t.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,n){e.removeEventListener(t,n,!1)}}]),e}();function ote(e,t,n){var r=!1;function i(e,t,n){return Math.max(t,Math.min(e,n))}function o(e,o,a){if(a&&(r=!0),r){e.preventDefault();var s=t.getBoundingClientRect(),c=s.width,l=s.height,u=o.clientX,f=o.clientY,d=i(u-s.left,0,c),h=i(f-s.top,0,l);n(d/c,h/l)}}function a(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):r=!1}function s(e,t){1===e.touches.length?o(e,e.touches[0],t):r=!1}e.add(t,"mousedown",(function(e){a(e,!0)})),e.add(t,"touchstart",(function(e){s(e,!0)})),e.add(window,"mousemove",a),e.add(t,"touchmove",s),e.add(window,"mouseup",(function(e){r=!1})),e.add(t,"touchend",(function(e){r=!1})),e.add(t,"touchcancel",(function(e){r=!1}))}var ate="keydown",ste="mousedown",cte="focusin";function lte(e,t){return(t||document).querySelector(e)}function ute(e){e.preventDefault(),e.stopPropagation()}function fte(e,t,n,r,i){e.add(t,ate,(function(e){n.indexOf(e.key)>=0&&(i&&ute(e),r(e))}))}var dte=function(){function e(t){Xee(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new ite,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return Zee(e,[{key:"setOptions",value:function(e){var t=this;if(e){var n=this.settings;if(e instanceof HTMLElement)n.parent=e;else{n.parent&&e.parent&&n.parent!==e.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(e,t,n){for(var r in e)n&&n.indexOf(r)>=0||(t[r]=e[r])}(e,n),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var r=e.color||e.colour;r&&this._setColor(r)}var i=n.parent;if(i&&n.popup&&!this._popupInited){var o=function(e){return t.openHandler(e)};this._events.add(i,"click",o),fte(this._events,i,[" ","Spacebar","Enter"],o),this._popupInited=!0}else e.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===ate?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,n=!1;if(e)if(t===ste||t===cte){var r=(this.__containedEvent||0)+100;e.timeStamp>r&&(n=!0)}else ute(e),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==ste&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var n=void 0;try{n=new rte(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',i=(t=r,(n=document.createElement("div")).innerHTML=t,n.firstElementChild);return this.domElement=i,this._domH=lte(".picker_hue",i),this._domSL=lte(".picker_sl",i),this._domA=lte(".picker_alpha",i),this._domEdit=lte(".picker_editor input",i),this._domSample=lte(".picker_sample",i),this._domOkay=lte(".picker_done button",i),this._domCancel=lte(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup((function(){return i.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,n=this.domElement,r=this._events;function i(e,t,n){r.add(e,t,n)}i(n,"click",(function(e){return e.preventDefault()})),ote(r,this._domH,(function(e,n){return t._setHSLA(e)})),ote(r,this._domSL,(function(e,n){return t._setHSLA(null,e,1-n)})),this.settings.alpha&&ote(r,this._domA,(function(e,n){return t._setHSLA(null,null,null,1-n)}));var o=this._domEdit;i(o,"input",(function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),i(o,"focus",(function(e){var t=this;t.selectionStart===t.selectionEnd&&t.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};i(window,ste,t),i(window,cte,t),fte(r,n,["Esc","Escape"],t);var o=function(t){e.__containedEvent=t.timeStamp};i(n,ste,o),i(n,cte,o),i(e._domCancel,"click",t)}));var a=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};i(this._domOkay,"click",a),fte(r,n,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(n){"static"===getComputedStyle(e).position&&(e.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===r?t.classList.add(e):t.classList.remove(e)})),t.classList.add(r)}))}},{key:"_setHSLA",value:function(e,t,n,r,i){i=i||{};var o=this.colour,a=o.hsla;[e,t,n,r].forEach((function(e,t){(e||0===e)&&(a[t]=e)})),o.hsla=a,this._updateUI(i),this.onChange&&!i.silent&&this.onChange(o)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,n=t.hsla,r="hsl("+360*n[0]+", 100%, 50%)",i=t.hslString,o=t.hslaString,a=this._domH,s=this._domSL,c=this._domA,l=lte(".picker_selector",a),u=lte(".picker_selector",s),f=lte(".picker_selector",c);y(0,l,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,u,n[1]),b(0,u,1-n[2]),s.style.color=i,b(0,f,1-n[3]);var d=i,h=d.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[d,h]+")";if(this._domA.style.background=v+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var p=this.settings.editorFormat,m=this.settings.alpha,g=void 0;switch(p){case"rgb":g=t.printRGB(m);break;case"hsl":g=t.printHSL(m);break;default:g=t.printHex(m)}this._domEdit.value=g}this._domSample.style.color=o}function y(e,t,n){t.style.left=100*n+"%"}function b(e,t,n){t.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var n=e?"":"none",r=t.style.display!==n;return r&&(t.style.display=n),r}}]),e}(),hte=document.createElement("style");hte.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(hte),dte.StyleElement=hte;var vte=Object.freeze({__proto__:null,default:dte});export{UM as BooleanToggle,Za as CaretType,eE as ColorPicker,kA as EditableValue,F8 as EnumValue,N8 as JSONEditor,Ya as Mode,rP as ReadonlyValue,ts as SearchField,Xa as SelectionType,ns as SortDirection,dP as TimestampTag,rs as UpdateSelectionAfterChange,es as ValidationSeverity,eA as createAfterSelection,Wee as createAjvValidator,ZE as createInsideSelection,YE as createKeySelection,tA as createMultiSelection,XE as createValueSelection,pO as estimateSerializedSize,AE as isAfterSelection,cO as isContent,OI as isContentParseError,MI as isContentValidationErrors,_I as isContextMenuColumn,$I as isContextMenuRow,rA as isEditingSelection,bO as isEqualParser,PE as isInsideSelection,uO as isJSONContent,TE as isKeySelection,vO as isLargeContent,SI as isMenuButton,CI as isMenuDropDownButton,jI as isMenuLabel,xI as isMenuSeparator,kI as isMenuSpace,NE as isMultiSelection,lO as isTextContent,RE as isValueSelection,bM as javascriptQueryLanguage,Gee as jmespathQueryLanguage,Uee as lodashQueryLanguage,nD as onEscape,uM as parseJSONPath,H8 as renderJSONSchemaEnum,hP as renderValue,b4 as resizeObserver,lM as stringifyJSONPath,dO as toJSONContent,fO as toTextContent};