diff --git a/docs/assets/index-lOL8ihAD.js b/docs/assets/index-B9_qItwe.js similarity index 58% rename from docs/assets/index-lOL8ihAD.js rename to docs/assets/index-B9_qItwe.js index bb4a870..2a4bbf4 100644 --- a/docs/assets/index-lOL8ihAD.js +++ b/docs/assets/index-B9_qItwe.js @@ -1,47 +1,47 @@ -var Vh=Object.defineProperty;var Qh=(o,l,a)=>l in o?Vh(o,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[l]=a;var Zi=(o,l,a)=>(Qh(o,typeof l!="symbol"?l+"":l,a),a);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const y of p.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&f(y)}).observe(document,{childList:!0,subtree:!0});function a(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function f(d){if(d.ep)return;d.ep=!0;const p=a(d);fetch(d.href,p)}})();/** +var ep=Object.defineProperty;var tp=(o,l,a)=>l in o?ep(o,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[l]=a;var Zi=(o,l,a)=>(tp(o,typeof l!="symbol"?l+"":l,a),a);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const y of p.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&f(y)}).observe(document,{childList:!0,subtree:!0});function a(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function f(d){if(d.ep)return;d.ep=!0;const p=a(d);fetch(d.href,p)}})();/** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Bs(o,l){const a=new Set(o.split(","));return l?f=>a.has(f.toLowerCase()):f=>a.has(f)}const ot={},ui=[],ur=()=>{},ep=()=>!1,cl=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&(o.charCodeAt(2)>122||o.charCodeAt(2)<97),Ks=o=>o.startsWith("onUpdate:"),Ft=Object.assign,js=(o,l)=>{const a=o.indexOf(l);a>-1&&o.splice(a,1)},tp=Object.prototype.hasOwnProperty,Ge=(o,l)=>tp.call(o,l),Fe=Array.isArray,fi=o=>dl(o)==="[object Map]",Jf=o=>dl(o)==="[object Set]",Re=o=>typeof o=="function",Tt=o=>typeof o=="string",vi=o=>typeof o=="symbol",ft=o=>o!==null&&typeof o=="object",Zf=o=>(ft(o)||Re(o))&&Re(o.then)&&Re(o.catch),Vf=Object.prototype.toString,dl=o=>Vf.call(o),rp=o=>dl(o).slice(8,-1),Qf=o=>dl(o)==="[object Object]",Us=o=>Tt(o)&&o!=="NaN"&&o[0]!=="-"&&""+parseInt(o,10)===o,to=Bs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hl=o=>{const l=Object.create(null);return a=>l[a]||(l[a]=o(a))},np=/-(\w)/g,hi=hl(o=>o.replace(np,(l,a)=>a?a.toUpperCase():"")),ip=/\B([A-Z])/g,mi=hl(o=>o.replace(ip,"-$1").toLowerCase()),ec=hl(o=>o.charAt(0).toUpperCase()+o.slice(1)),ys=hl(o=>o?`on${ec(o)}`:""),cn=(o,l)=>!Object.is(o,l),bs=(o,l)=>{for(let a=0;a{Object.defineProperty(o,l,{configurable:!0,enumerable:!1,value:a})},op=o=>{const l=parseFloat(o);return isNaN(l)?o:l};let sf;const tc=()=>sf||(sf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ao(o){if(Fe(o)){const l={};for(let a=0;a{if(a){const f=a.split(sp);f.length>1&&(l[f[0].trim()]=f[1].trim())}}),l}function Br(o){let l="";if(Tt(o))l=o;else if(Fe(o))for(let a=0;aTt(o)?o:o==null?"":Fe(o)||ft(o)&&(o.toString===Vf||!Re(o.toString))?JSON.stringify(o,nc,2):String(o),nc=(o,l)=>l&&l.__v_isRef?nc(o,l.value):fi(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((a,[f,d],p)=>(a[xs(f,p)+" =>"]=d,a),{})}:Jf(l)?{[`Set(${l.size})`]:[...l.values()].map(a=>xs(a))}:vi(l)?xs(l):ft(l)&&!Fe(l)&&!Qf(l)?String(l):l,xs=(o,l="")=>{var a;return vi(o)?`Symbol(${(a=o.description)!=null?a:l})`:o};/** +**/function zs(o,l){const a=new Set(o.split(","));return l?f=>a.has(f.toLowerCase()):f=>a.has(f)}const ot={},ui=[],ur=()=>{},rp=()=>!1,cl=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&(o.charCodeAt(2)>122||o.charCodeAt(2)<97),Bs=o=>o.startsWith("onUpdate:"),Ft=Object.assign,Ks=(o,l)=>{const a=o.indexOf(l);a>-1&&o.splice(a,1)},np=Object.prototype.hasOwnProperty,Ge=(o,l)=>np.call(o,l),Fe=Array.isArray,fi=o=>dl(o)==="[object Map]",Jf=o=>dl(o)==="[object Set]",Re=o=>typeof o=="function",Tt=o=>typeof o=="string",vi=o=>typeof o=="symbol",ft=o=>o!==null&&typeof o=="object",Zf=o=>(ft(o)||Re(o))&&Re(o.then)&&Re(o.catch),Vf=Object.prototype.toString,dl=o=>Vf.call(o),ip=o=>dl(o).slice(8,-1),Qf=o=>dl(o)==="[object Object]",js=o=>Tt(o)&&o!=="NaN"&&o[0]!=="-"&&""+parseInt(o,10)===o,to=zs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hl=o=>{const l=Object.create(null);return a=>l[a]||(l[a]=o(a))},op=/-(\w)/g,hi=hl(o=>o.replace(op,(l,a)=>a?a.toUpperCase():"")),lp=/\B([A-Z])/g,mi=hl(o=>o.replace(lp,"-$1").toLowerCase()),ec=hl(o=>o.charAt(0).toUpperCase()+o.slice(1)),ys=hl(o=>o?`on${ec(o)}`:""),cn=(o,l)=>!Object.is(o,l),bs=(o,l)=>{for(let a=0;a{Object.defineProperty(o,l,{configurable:!0,enumerable:!1,value:a})},sp=o=>{const l=parseFloat(o);return isNaN(l)?o:l};let lf;const tc=()=>lf||(lf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ao(o){if(Fe(o)){const l={};for(let a=0;a{if(a){const f=a.split(up);f.length>1&&(l[f[0].trim()]=f[1].trim())}}),l}function Br(o){let l="";if(Tt(o))l=o;else if(Fe(o))for(let a=0;aTt(o)?o:o==null?"":Fe(o)||ft(o)&&(o.toString===Vf||!Re(o.toString))?JSON.stringify(o,nc,2):String(o),nc=(o,l)=>l&&l.__v_isRef?nc(o,l.value):fi(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((a,[f,d],p)=>(a[xs(f,p)+" =>"]=d,a),{})}:Jf(l)?{[`Set(${l.size})`]:[...l.values()].map(a=>xs(a))}:vi(l)?xs(l):ft(l)&&!Fe(l)&&!Qf(l)?String(l):l,xs=(o,l="")=>{var a;return vi(o)?`Symbol(${(a=o.description)!=null?a:l})`:o};/** * @vue/reactivity v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let wr;class dp{constructor(l=!1){this.detached=l,this._active=!0,this.effects=[],this.cleanups=[],this.parent=wr,!l&&wr&&(this.index=(wr.scopes||(wr.scopes=[])).push(this)-1)}get active(){return this._active}run(l){if(this._active){const a=wr;try{return wr=this,l()}finally{wr=a}}}on(){wr=this}off(){wr=this.parent}stop(l){if(this._active){let a,f;for(a=0,f=this.effects.length;a=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Nn()}return this._dirtyLevel>=4}set dirty(l){this._dirtyLevel=l?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let l=an,a=Mn;try{return an=!0,Mn=this,this._runnings++,af(this),this.fn()}finally{uf(this),this._runnings--,Mn=a,an=l}}stop(){var l;this.active&&(af(this),uf(this),(l=this.onStop)==null||l.call(this),this.active=!1)}}function gp(o){return o.value}function af(o){o._trackId++,o._depsLength=0}function uf(o){if(o.deps.length>o._depsLength){for(let l=o._depsLength;l{const a=new Map;return a.cleanup=o,a.computed=l,a},Es=new WeakMap,An=Symbol(""),Ps=Symbol("");function er(o,l,a){if(an&&Mn){let f=Es.get(o);f||Es.set(o,f=new Map);let d=f.get(a);d||f.set(a,d=ac(()=>f.delete(a))),lc(Mn,d)}}function zr(o,l,a,f,d,p){const y=Es.get(o);if(!y)return;let x=[];if(l==="clear")x=[...y.values()];else if(a==="length"&&Fe(o)){const b=Number(f);y.forEach((L,w)=>{(w==="length"||!vi(w)&&w>=b)&&x.push(L)})}else switch(a!==void 0&&x.push(y.get(a)),l){case"add":Fe(o)?Us(a)&&x.push(y.get("length")):(x.push(y.get(An)),fi(o)&&x.push(y.get(Ps)));break;case"delete":Fe(o)||(x.push(y.get(An)),fi(o)&&x.push(y.get(Ps)));break;case"set":fi(o)&&x.push(y.get(An));break}qs();for(const b of x)b&&sc(b,4);Xs()}const vp=Bs("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(o=>o!=="arguments"&&o!=="caller").map(o=>Symbol[o]).filter(vi)),ff=mp();function mp(){const o={};return["includes","indexOf","lastIndexOf"].forEach(l=>{o[l]=function(...a){const f=Ye(this);for(let p=0,y=this.length;p{o[l]=function(...a){Pn(),qs();const f=Ye(this)[l].apply(this,a);return Xs(),Nn(),f}}),o}function yp(o){const l=Ye(this);return er(l,"has",o),l.hasOwnProperty(o)}class fc{constructor(l=!1,a=!1){this._isReadonly=l,this._isShallow=a}get(l,a,f){const d=this._isReadonly,p=this._isShallow;if(a==="__v_isReactive")return!d;if(a==="__v_isReadonly")return d;if(a==="__v_isShallow")return p;if(a==="__v_raw")return f===(d?p?Ep:pc:p?hc:dc).get(l)||Object.getPrototypeOf(l)===Object.getPrototypeOf(f)?l:void 0;const y=Fe(l);if(!d){if(y&&Ge(ff,a))return Reflect.get(ff,a,f);if(a==="hasOwnProperty")return yp}const x=Reflect.get(l,a,f);return(vi(a)?uc.has(a):vp(a))||(d||er(l,"get",a),p)?x:tr(x)?y&&Us(a)?x:x.value:ft(x)?d?gc(x):yi(x):x}}class cc extends fc{constructor(l=!1){super(!1,l)}set(l,a,f,d){let p=l[a];if(!this._isShallow){const b=pi(p);if(!sl(f)&&!pi(f)&&(p=Ye(p),f=Ye(f)),!Fe(l)&&tr(p)&&!tr(f))return b?!1:(p.value=f,!0)}const y=Fe(l)&&Us(a)?Number(a)o,pl=o=>Reflect.getPrototypeOf(o);function Yo(o,l,a=!1,f=!1){o=o.__v_raw;const d=Ye(o),p=Ye(l);a||(cn(l,p)&&er(d,"get",l),er(d,"get",p));const{has:y}=pl(d),x=f?Ys:a?Zs:uo;if(y.call(d,l))return x(o.get(l));if(y.call(d,p))return x(o.get(p));o!==d&&o.get(l)}function $o(o,l=!1){const a=this.__v_raw,f=Ye(a),d=Ye(o);return l||(cn(o,d)&&er(f,"has",o),er(f,"has",d)),o===d?a.has(o):a.has(o)||a.has(d)}function Jo(o,l=!1){return o=o.__v_raw,!l&&er(Ye(o),"iterate",An),Reflect.get(o,"size",o)}function cf(o){o=Ye(o);const l=Ye(this);return pl(l).has.call(l,o)||(l.add(o),zr(l,"add",o,o)),this}function df(o,l){l=Ye(l);const a=Ye(this),{has:f,get:d}=pl(a);let p=f.call(a,o);p||(o=Ye(o),p=f.call(a,o));const y=d.call(a,o);return a.set(o,l),p?cn(l,y)&&zr(a,"set",o,l):zr(a,"add",o,l),this}function hf(o){const l=Ye(this),{has:a,get:f}=pl(l);let d=a.call(l,o);d||(o=Ye(o),d=a.call(l,o)),f&&f.call(l,o);const p=l.delete(o);return d&&zr(l,"delete",o,void 0),p}function pf(){const o=Ye(this),l=o.size!==0,a=o.clear();return l&&zr(o,"clear",void 0,void 0),a}function Zo(o,l){return function(f,d){const p=this,y=p.__v_raw,x=Ye(y),b=l?Ys:o?Zs:uo;return!o&&er(x,"iterate",An),y.forEach((L,w)=>f.call(d,b(L),b(w),p))}}function Vo(o,l,a){return function(...f){const d=this.__v_raw,p=Ye(d),y=fi(p),x=o==="entries"||o===Symbol.iterator&&y,b=o==="keys"&&y,L=d[o](...f),w=a?Ys:l?Zs:uo;return!l&&er(p,"iterate",b?Ps:An),{next(){const{value:P,done:E}=L.next();return E?{value:P,done:E}:{value:x?[w(P[0]),w(P[1])]:w(P),done:E}},[Symbol.iterator](){return this}}}}function nn(o){return function(...l){return o==="delete"?!1:o==="clear"?void 0:this}}function Sp(){const o={get(p){return Yo(this,p)},get size(){return Jo(this)},has:$o,add:cf,set:df,delete:hf,clear:pf,forEach:Zo(!1,!1)},l={get(p){return Yo(this,p,!1,!0)},get size(){return Jo(this)},has:$o,add:cf,set:df,delete:hf,clear:pf,forEach:Zo(!1,!0)},a={get(p){return Yo(this,p,!0)},get size(){return Jo(this,!0)},has(p){return $o.call(this,p,!0)},add:nn("add"),set:nn("set"),delete:nn("delete"),clear:nn("clear"),forEach:Zo(!0,!1)},f={get(p){return Yo(this,p,!0,!0)},get size(){return Jo(this,!0)},has(p){return $o.call(this,p,!0)},add:nn("add"),set:nn("set"),delete:nn("delete"),clear:nn("clear"),forEach:Zo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(p=>{o[p]=Vo(p,!1,!1),a[p]=Vo(p,!0,!1),l[p]=Vo(p,!1,!0),f[p]=Vo(p,!0,!0)}),[o,a,l,f]}const[Cp,_p,Tp,Lp]=Sp();function $s(o,l){const a=l?o?Lp:Tp:o?_p:Cp;return(f,d,p)=>d==="__v_isReactive"?!o:d==="__v_isReadonly"?o:d==="__v_raw"?f:Reflect.get(Ge(a,d)&&d in f?a:f,d,p)}const Op={get:$s(!1,!1)},Mp={get:$s(!1,!0)},Ap={get:$s(!0,!1)},dc=new WeakMap,hc=new WeakMap,pc=new WeakMap,Ep=new WeakMap;function Pp(o){switch(o){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Np(o){return o.__v_skip||!Object.isExtensible(o)?0:Pp(rp(o))}function yi(o){return pi(o)?o:Js(o,!1,xp,Op,dc)}function Ip(o){return Js(o,!1,kp,Mp,hc)}function gc(o){return Js(o,!0,wp,Ap,pc)}function Js(o,l,a,f,d){if(!ft(o)||o.__v_raw&&!(l&&o.__v_isReactive))return o;const p=d.get(o);if(p)return p;const y=Np(o);if(y===0)return o;const x=new Proxy(o,y===2?f:a);return d.set(o,x),x}function ci(o){return pi(o)?ci(o.__v_raw):!!(o&&o.__v_isReactive)}function pi(o){return!!(o&&o.__v_isReadonly)}function sl(o){return!!(o&&o.__v_isShallow)}function vc(o){return ci(o)||pi(o)}function Ye(o){const l=o&&o.__v_raw;return l?Ye(l):o}function mc(o){return Object.isExtensible(o)&&ol(o,"__v_skip",!0),o}const uo=o=>ft(o)?yi(o):o,Zs=o=>ft(o)?gc(o):o;class yc{constructor(l,a,f,d){this.getter=l,this._setter=a,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Gs(()=>l(this._value),()=>el(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!d,this.__v_isReadonly=f}get value(){const l=Ye(this);return(!l._cacheable||l.effect.dirty)&&cn(l._value,l._value=l.effect.run())&&el(l,4),bc(l),l.effect._dirtyLevel>=2&&el(l,2),l._value}set value(l){this._setter(l)}get _dirty(){return this.effect.dirty}set _dirty(l){this.effect.dirty=l}}function Dp(o,l,a=!1){let f,d;const p=Re(o);return p?(f=o,d=ur):(f=o.get,d=o.set),new yc(f,d,p||!d,a)}function bc(o){var l;an&&Mn&&(o=Ye(o),lc(Mn,(l=o.dep)!=null?l:o.dep=ac(()=>o.dep=void 0,o instanceof yc?o:void 0)))}function el(o,l=4,a){o=Ye(o);const f=o.dep;f&&sc(f,l)}function tr(o){return!!(o&&o.__v_isRef===!0)}function un(o){return Fp(o,!1)}function Fp(o,l){return tr(o)?o:new Hp(o,l)}class Hp{constructor(l,a){this.__v_isShallow=a,this.dep=void 0,this.__v_isRef=!0,this._rawValue=a?l:Ye(l),this._value=a?l:uo(l)}get value(){return bc(this),this._value}set value(l){const a=this.__v_isShallow||sl(l)||pi(l);l=a?l:Ye(l),cn(l,this._rawValue)&&(this._rawValue=l,this._value=a?l:uo(l),el(this,4))}}function _t(o){return tr(o)?o.value:o}const Wp={get:(o,l,a)=>_t(Reflect.get(o,l,a)),set:(o,l,a,f)=>{const d=o[l];return tr(d)&&!tr(a)?(d.value=a,!0):Reflect.set(o,l,a,f)}};function xc(o){return ci(o)?o:new Proxy(o,Wp)}/** +**/let wr;class pp{constructor(l=!1){this.detached=l,this._active=!0,this.effects=[],this.cleanups=[],this.parent=wr,!l&&wr&&(this.index=(wr.scopes||(wr.scopes=[])).push(this)-1)}get active(){return this._active}run(l){if(this._active){const a=wr;try{return wr=this,l()}finally{wr=a}}}on(){wr=this}off(){wr=this.parent}stop(l){if(this._active){let a,f;for(a=0,f=this.effects.length;a=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Nn()}return this._dirtyLevel>=4}set dirty(l){this._dirtyLevel=l?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let l=an,a=Mn;try{return an=!0,Mn=this,this._runnings++,sf(this),this.fn()}finally{af(this),this._runnings--,Mn=a,an=l}}stop(){var l;this.active&&(sf(this),af(this),(l=this.onStop)==null||l.call(this),this.active=!1)}}function mp(o){return o.value}function sf(o){o._trackId++,o._depsLength=0}function af(o){if(o.deps.length>o._depsLength){for(let l=o._depsLength;l{const a=new Map;return a.cleanup=o,a.computed=l,a},As=new WeakMap,An=Symbol(""),Es=Symbol("");function er(o,l,a){if(an&&Mn){let f=As.get(o);f||As.set(o,f=new Map);let d=f.get(a);d||f.set(a,d=ac(()=>f.delete(a))),lc(Mn,d)}}function zr(o,l,a,f,d,p){const y=As.get(o);if(!y)return;let x=[];if(l==="clear")x=[...y.values()];else if(a==="length"&&Fe(o)){const b=Number(f);y.forEach((L,w)=>{(w==="length"||!vi(w)&&w>=b)&&x.push(L)})}else switch(a!==void 0&&x.push(y.get(a)),l){case"add":Fe(o)?js(a)&&x.push(y.get("length")):(x.push(y.get(An)),fi(o)&&x.push(y.get(Es)));break;case"delete":Fe(o)||(x.push(y.get(An)),fi(o)&&x.push(y.get(Es)));break;case"set":fi(o)&&x.push(y.get(An));break}Gs();for(const b of x)b&&sc(b,4);qs()}const yp=zs("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(o=>o!=="arguments"&&o!=="caller").map(o=>Symbol[o]).filter(vi)),uf=bp();function bp(){const o={};return["includes","indexOf","lastIndexOf"].forEach(l=>{o[l]=function(...a){const f=Ye(this);for(let p=0,y=this.length;p{o[l]=function(...a){Pn(),Gs();const f=Ye(this)[l].apply(this,a);return qs(),Nn(),f}}),o}function xp(o){const l=Ye(this);return er(l,"has",o),l.hasOwnProperty(o)}class fc{constructor(l=!1,a=!1){this._isReadonly=l,this._isShallow=a}get(l,a,f){const d=this._isReadonly,p=this._isShallow;if(a==="__v_isReactive")return!d;if(a==="__v_isReadonly")return d;if(a==="__v_isShallow")return p;if(a==="__v_raw")return f===(d?p?Np:pc:p?hc:dc).get(l)||Object.getPrototypeOf(l)===Object.getPrototypeOf(f)?l:void 0;const y=Fe(l);if(!d){if(y&&Ge(uf,a))return Reflect.get(uf,a,f);if(a==="hasOwnProperty")return xp}const x=Reflect.get(l,a,f);return(vi(a)?uc.has(a):yp(a))||(d||er(l,"get",a),p)?x:tr(x)?y&&js(a)?x:x.value:ft(x)?d?gc(x):yi(x):x}}class cc extends fc{constructor(l=!1){super(!1,l)}set(l,a,f,d){let p=l[a];if(!this._isShallow){const b=pi(p);if(!sl(f)&&!pi(f)&&(p=Ye(p),f=Ye(f)),!Fe(l)&&tr(p)&&!tr(f))return b?!1:(p.value=f,!0)}const y=Fe(l)&&js(a)?Number(a)o,pl=o=>Reflect.getPrototypeOf(o);function Yo(o,l,a=!1,f=!1){o=o.__v_raw;const d=Ye(o),p=Ye(l);a||(cn(l,p)&&er(d,"get",l),er(d,"get",p));const{has:y}=pl(d),x=f?Xs:a?Js:uo;if(y.call(d,l))return x(o.get(l));if(y.call(d,p))return x(o.get(p));o!==d&&o.get(l)}function $o(o,l=!1){const a=this.__v_raw,f=Ye(a),d=Ye(o);return l||(cn(o,d)&&er(f,"has",o),er(f,"has",d)),o===d?a.has(o):a.has(o)||a.has(d)}function Jo(o,l=!1){return o=o.__v_raw,!l&&er(Ye(o),"iterate",An),Reflect.get(o,"size",o)}function ff(o){o=Ye(o);const l=Ye(this);return pl(l).has.call(l,o)||(l.add(o),zr(l,"add",o,o)),this}function cf(o,l){l=Ye(l);const a=Ye(this),{has:f,get:d}=pl(a);let p=f.call(a,o);p||(o=Ye(o),p=f.call(a,o));const y=d.call(a,o);return a.set(o,l),p?cn(l,y)&&zr(a,"set",o,l):zr(a,"add",o,l),this}function df(o){const l=Ye(this),{has:a,get:f}=pl(l);let d=a.call(l,o);d||(o=Ye(o),d=a.call(l,o)),f&&f.call(l,o);const p=l.delete(o);return d&&zr(l,"delete",o,void 0),p}function hf(){const o=Ye(this),l=o.size!==0,a=o.clear();return l&&zr(o,"clear",void 0,void 0),a}function Zo(o,l){return function(f,d){const p=this,y=p.__v_raw,x=Ye(y),b=l?Xs:o?Js:uo;return!o&&er(x,"iterate",An),y.forEach((L,w)=>f.call(d,b(L),b(w),p))}}function Vo(o,l,a){return function(...f){const d=this.__v_raw,p=Ye(d),y=fi(p),x=o==="entries"||o===Symbol.iterator&&y,b=o==="keys"&&y,L=d[o](...f),w=a?Xs:l?Js:uo;return!l&&er(p,"iterate",b?Es:An),{next(){const{value:P,done:E}=L.next();return E?{value:P,done:E}:{value:x?[w(P[0]),w(P[1])]:w(P),done:E}},[Symbol.iterator](){return this}}}}function nn(o){return function(...l){return o==="delete"?!1:o==="clear"?void 0:this}}function _p(){const o={get(p){return Yo(this,p)},get size(){return Jo(this)},has:$o,add:ff,set:cf,delete:df,clear:hf,forEach:Zo(!1,!1)},l={get(p){return Yo(this,p,!1,!0)},get size(){return Jo(this)},has:$o,add:ff,set:cf,delete:df,clear:hf,forEach:Zo(!1,!0)},a={get(p){return Yo(this,p,!0)},get size(){return Jo(this,!0)},has(p){return $o.call(this,p,!0)},add:nn("add"),set:nn("set"),delete:nn("delete"),clear:nn("clear"),forEach:Zo(!0,!1)},f={get(p){return Yo(this,p,!0,!0)},get size(){return Jo(this,!0)},has(p){return $o.call(this,p,!0)},add:nn("add"),set:nn("set"),delete:nn("delete"),clear:nn("clear"),forEach:Zo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(p=>{o[p]=Vo(p,!1,!1),a[p]=Vo(p,!0,!1),l[p]=Vo(p,!1,!0),f[p]=Vo(p,!0,!0)}),[o,a,l,f]}const[Tp,Lp,Op,Mp]=_p();function Ys(o,l){const a=l?o?Mp:Op:o?Lp:Tp;return(f,d,p)=>d==="__v_isReactive"?!o:d==="__v_isReadonly"?o:d==="__v_raw"?f:Reflect.get(Ge(a,d)&&d in f?a:f,d,p)}const Ap={get:Ys(!1,!1)},Ep={get:Ys(!1,!0)},Pp={get:Ys(!0,!1)},dc=new WeakMap,hc=new WeakMap,pc=new WeakMap,Np=new WeakMap;function Ip(o){switch(o){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dp(o){return o.__v_skip||!Object.isExtensible(o)?0:Ip(ip(o))}function yi(o){return pi(o)?o:$s(o,!1,kp,Ap,dc)}function Fp(o){return $s(o,!1,Cp,Ep,hc)}function gc(o){return $s(o,!0,Sp,Pp,pc)}function $s(o,l,a,f,d){if(!ft(o)||o.__v_raw&&!(l&&o.__v_isReactive))return o;const p=d.get(o);if(p)return p;const y=Dp(o);if(y===0)return o;const x=new Proxy(o,y===2?f:a);return d.set(o,x),x}function ci(o){return pi(o)?ci(o.__v_raw):!!(o&&o.__v_isReactive)}function pi(o){return!!(o&&o.__v_isReadonly)}function sl(o){return!!(o&&o.__v_isShallow)}function vc(o){return ci(o)||pi(o)}function Ye(o){const l=o&&o.__v_raw;return l?Ye(l):o}function mc(o){return Object.isExtensible(o)&&ol(o,"__v_skip",!0),o}const uo=o=>ft(o)?yi(o):o,Js=o=>ft(o)?gc(o):o;class yc{constructor(l,a,f,d){this.getter=l,this._setter=a,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Us(()=>l(this._value),()=>el(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!d,this.__v_isReadonly=f}get value(){const l=Ye(this);return(!l._cacheable||l.effect.dirty)&&cn(l._value,l._value=l.effect.run())&&el(l,4),bc(l),l.effect._dirtyLevel>=2&&el(l,2),l._value}set value(l){this._setter(l)}get _dirty(){return this.effect.dirty}set _dirty(l){this.effect.dirty=l}}function Hp(o,l,a=!1){let f,d;const p=Re(o);return p?(f=o,d=ur):(f=o.get,d=o.set),new yc(f,d,p||!d,a)}function bc(o){var l;an&&Mn&&(o=Ye(o),lc(Mn,(l=o.dep)!=null?l:o.dep=ac(()=>o.dep=void 0,o instanceof yc?o:void 0)))}function el(o,l=4,a){o=Ye(o);const f=o.dep;f&&sc(f,l)}function tr(o){return!!(o&&o.__v_isRef===!0)}function un(o){return Wp(o,!1)}function Wp(o,l){return tr(o)?o:new Rp(o,l)}class Rp{constructor(l,a){this.__v_isShallow=a,this.dep=void 0,this.__v_isRef=!0,this._rawValue=a?l:Ye(l),this._value=a?l:uo(l)}get value(){return bc(this),this._value}set value(l){const a=this.__v_isShallow||sl(l)||pi(l);l=a?l:Ye(l),cn(l,this._rawValue)&&(this._rawValue=l,this._value=a?l:uo(l),el(this,4))}}function _t(o){return tr(o)?o.value:o}const zp={get:(o,l,a)=>_t(Reflect.get(o,l,a)),set:(o,l,a,f)=>{const d=o[l];return tr(d)&&!tr(a)?(d.value=a,!0):Reflect.set(o,l,a,f)}};function xc(o){return ci(o)?o:new Proxy(o,zp)}/** * @vue/runtime-core v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function fn(o,l,a,f){try{return f?o(...f):o()}catch(d){gl(d,l,a)}}function Sr(o,l,a,f){if(Re(o)){const p=fn(o,l,a,f);return p&&Zf(p)&&p.catch(y=>{gl(y,l,a)}),p}const d=[];for(let p=0;p>>1,d=Rt[f],p=co(d);pEr&&Rt.splice(l,1)}function jp(o){Fe(o)?di.push(...o):(!on||!on.includes(o,o.allowRecurse?On+1:On))&&di.push(o),kc()}function gf(o,l,a=fo?Er+1:0){for(;aco(a)-co(f));if(di.length=0,on){on.push(...l);return}for(on=l,On=0;Ono.id==null?1/0:o.id,Up=(o,l)=>{const a=co(o)-co(l);if(a===0){if(o.pre&&!l.pre)return-1;if(l.pre&&!o.pre)return 1}return a};function Cc(o){Ns=!1,fo=!0,Rt.sort(Up);try{for(Er=0;ErTt(D)?D.trim():D)),P&&(d=a.map(op))}let x,b=f[x=ys(l)]||f[x=ys(hi(l))];!b&&p&&(b=f[x=ys(mi(l))]),b&&Sr(b,o,6,d);const L=f[x+"Once"];if(L){if(!o.emitted)o.emitted={};else if(o.emitted[x])return;o.emitted[x]=!0,Sr(L,o,6,d)}}function _c(o,l,a=!1){const f=l.emitsCache,d=f.get(o);if(d!==void 0)return d;const p=o.emits;let y={},x=!1;if(!Re(o)){const b=L=>{const w=_c(L,l,!0);w&&(x=!0,Ft(y,w))};!a&&l.mixins.length&&l.mixins.forEach(b),o.extends&&b(o.extends),o.mixins&&o.mixins.forEach(b)}return!p&&!x?(ft(o)&&f.set(o,null),null):(Fe(p)?p.forEach(b=>y[b]=null):Ft(y,p),ft(o)&&f.set(o,y),y)}function vl(o,l){return!o||!cl(l)?!1:(l=l.slice(2).replace(/Once$/,""),Ge(o,l[0].toLowerCase()+l.slice(1))||Ge(o,mi(l))||Ge(o,l))}let Qt=null,ml=null;function al(o){const l=Qt;return Qt=o,ml=o&&o.type.__scopeId||null,l}function Tc(o){ml=o}function Lc(){ml=null}function Ln(o,l=Qt,a){if(!l||o._n)return o;const f=(...d)=>{f._d&&Lf(-1);const p=al(l);let y;try{y=o(...d)}finally{al(p),f._d&&Lf(1)}return y};return f._n=!0,f._c=!0,f._d=!0,f}function ws(o){const{type:l,vnode:a,proxy:f,withProxy:d,props:p,propsOptions:[y],slots:x,attrs:b,emit:L,render:w,renderCache:P,data:E,setupState:D,ctx:X,inheritAttrs:V}=o;let W,M;const S=al(o);try{if(a.shapeFlag&4){const R=d||f,B=R;W=Ar(w.call(B,R,P,p,D,E,X)),M=b}else{const R=l;W=Ar(R.length>1?R(p,{attrs:b,slots:x,emit:L}):R(p,null)),M=l.props?b:qp(b)}}catch(R){lo.length=0,gl(R,o,1),W=Ct(dn)}let O=W;if(M&&V!==!1){const R=Object.keys(M),{shapeFlag:B}=O;R.length&&B&7&&(y&&R.some(Ks)&&(M=Xp(M,y)),O=gi(O,M))}return a.dirs&&(O=gi(O),O.dirs=O.dirs?O.dirs.concat(a.dirs):a.dirs),a.transition&&(O.transition=a.transition),W=O,al(S),W}const qp=o=>{let l;for(const a in o)(a==="class"||a==="style"||cl(a))&&((l||(l={}))[a]=o[a]);return l},Xp=(o,l)=>{const a={};for(const f in o)(!Ks(f)||!(f.slice(9)in l))&&(a[f]=o[f]);return a};function Yp(o,l,a){const{props:f,children:d,component:p}=o,{props:y,children:x,patchFlag:b}=l,L=p.emitsOptions;if(l.dirs||l.transition)return!0;if(a&&b>=0){if(b&1024)return!0;if(b&16)return f?vf(f,y,L):!!y;if(b&8){const w=l.dynamicProps;for(let P=0;Po.__isSuspense;function Vp(o,l){l&&l.pendingBranch?Fe(o)?l.effects.push(...o):l.effects.push(o):jp(o)}const Qp=Symbol.for("v-scx"),eg=()=>tl(Qp);function mf(o,l){return ea(o,null,l)}const Qo={};function ro(o,l,a){return ea(o,l,a)}function ea(o,l,{immediate:a,deep:f,flush:d,once:p,onTrack:y,onTrigger:x}=ot){if(l&&p){const ee=l;l=(...fe)=>{ee(...fe),B()}}const b=Yt,L=ee=>f===!0?ee:ai(ee,f===!1?1:void 0);let w,P=!1,E=!1;if(tr(o)?(w=()=>o.value,P=sl(o)):ci(o)?(w=()=>L(o),P=!0):Fe(o)?(E=!0,P=o.some(ee=>ci(ee)||sl(ee)),w=()=>o.map(ee=>{if(tr(ee))return ee.value;if(ci(ee))return L(ee);if(Re(ee))return fn(ee,b,2)})):Re(o)?l?w=()=>fn(o,b,2):w=()=>(D&&D(),Sr(o,b,3,[X])):w=ur,l&&f){const ee=w;w=()=>ai(ee())}let D,X=ee=>{D=O.onStop=()=>{fn(ee,b,4),D=O.onStop=void 0}},V;if(kl)if(X=ur,l?a&&Sr(l,b,3,[w(),E?[]:void 0,X]):w(),d==="sync"){const ee=eg();V=ee.__watcherHandles||(ee.__watcherHandles=[])}else return ur;let W=E?new Array(o.length).fill(Qo):Qo;const M=()=>{if(!(!O.active||!O.dirty))if(l){const ee=O.run();(f||P||(E?ee.some((fe,ae)=>cn(fe,W[ae])):cn(ee,W)))&&(D&&D(),Sr(l,b,3,[ee,W===Qo?void 0:E&&W[0]===Qo?[]:W,X]),W=ee)}else O.run()};M.allowRecurse=!!l;let S;d==="sync"?S=M:d==="post"?S=()=>Vt(M,b&&b.suspense):(M.pre=!0,b&&(M.id=b.uid),S=()=>Qs(M));const O=new Gs(w,ur,S),R=pp(),B=()=>{O.stop(),R&&js(R.effects,O)};return l?a?M():W=O.run():d==="post"?Vt(O.run.bind(O),b&&b.suspense):O.run(),V&&V.push(B),B}function tg(o,l,a){const f=this.proxy,d=Tt(o)?o.includes(".")?Oc(f,o):()=>f[o]:o.bind(f,f);let p;Re(l)?p=l:(p=l.handler,a=l);const y=go(this),x=ea(d,p.bind(f),a);return y(),x}function Oc(o,l){const a=l.split(".");return()=>{let f=o;for(let d=0;d0){if(a>=l)return o;a++}if(f=f||new Set,f.has(o))return o;if(f.add(o),tr(o))ai(o.value,l,a,f);else if(Fe(o))for(let d=0;d{ai(d,l,a,f)});else if(Qf(o))for(const d in o)ai(o[d],l,a,f);return o}function _n(o,l,a,f){const d=o.dirs,p=l&&l.dirs;for(let y=0;y!!o.type.__asyncLoader,Mc=o=>o.type.__isKeepAlive;function rg(o,l){Ac(o,"a",l)}function ng(o,l){Ac(o,"da",l)}function Ac(o,l,a=Yt){const f=o.__wdc||(o.__wdc=()=>{let d=a;for(;d;){if(d.isDeactivated)return;d=d.parent}return o()});if(yl(l,f,a),a){let d=a.parent;for(;d&&d.parent;)Mc(d.parent.vnode)&&ig(f,l,a,d),d=d.parent}}function ig(o,l,a,f){const d=yl(l,o,f,!0);ta(()=>{js(f[l],d)},a)}function yl(o,l,a=Yt,f=!1){if(a){const d=a[o]||(a[o]=[]),p=l.__weh||(l.__weh=(...y)=>{if(a.isUnmounted)return;Pn();const x=go(a),b=Sr(l,a,o,y);return x(),Nn(),b});return f?d.unshift(p):d.push(p),p}}const jr=o=>(l,a=Yt)=>(!kl||o==="sp")&&yl(o,(...f)=>l(...f),a),og=jr("bm"),bl=jr("m"),lg=jr("bu"),sg=jr("u"),ag=jr("bum"),ta=jr("um"),ug=jr("sp"),fg=jr("rtg"),cg=jr("rtc");function dg(o,l=Yt){yl("ec",o,l)}function Is(o,l,a,f){let d;const p=a&&a[f];if(Fe(o)||Tt(o)){d=new Array(o.length);for(let y=0,x=o.length;yl(y,x,void 0,p&&p[x]));else{const y=Object.keys(o);d=new Array(y.length);for(let x=0,b=y.length;xKc(l)?!(l.type===dn||l.type===Dt&&!Ec(l.children)):!0)?o:null}const Ds=o=>o?Gc(o)?oa(o)||o.proxy:Ds(o.parent):null,io=Ft(Object.create(null),{$:o=>o,$el:o=>o.vnode.el,$data:o=>o.data,$props:o=>o.props,$attrs:o=>o.attrs,$slots:o=>o.slots,$refs:o=>o.refs,$parent:o=>Ds(o.parent),$root:o=>Ds(o.root),$emit:o=>o.emit,$options:o=>ra(o),$forceUpdate:o=>o.f||(o.f=()=>{o.effect.dirty=!0,Qs(o.update)}),$nextTick:o=>o.n||(o.n=zp.bind(o.proxy)),$watch:o=>tg.bind(o)}),ks=(o,l)=>o!==ot&&!o.__isScriptSetup&&Ge(o,l),hg={get({_:o},l){const{ctx:a,setupState:f,data:d,props:p,accessCache:y,type:x,appContext:b}=o;let L;if(l[0]!=="$"){const D=y[l];if(D!==void 0)switch(D){case 1:return f[l];case 2:return d[l];case 4:return a[l];case 3:return p[l]}else{if(ks(f,l))return y[l]=1,f[l];if(d!==ot&&Ge(d,l))return y[l]=2,d[l];if((L=o.propsOptions[0])&&Ge(L,l))return y[l]=3,p[l];if(a!==ot&&Ge(a,l))return y[l]=4,a[l];Fs&&(y[l]=0)}}const w=io[l];let P,E;if(w)return l==="$attrs"&&er(o,"get",l),w(o);if((P=x.__cssModules)&&(P=P[l]))return P;if(a!==ot&&Ge(a,l))return y[l]=4,a[l];if(E=b.config.globalProperties,Ge(E,l))return E[l]},set({_:o},l,a){const{data:f,setupState:d,ctx:p}=o;return ks(d,l)?(d[l]=a,!0):f!==ot&&Ge(f,l)?(f[l]=a,!0):Ge(o.props,l)||l[0]==="$"&&l.slice(1)in o?!1:(p[l]=a,!0)},has({_:{data:o,setupState:l,accessCache:a,ctx:f,appContext:d,propsOptions:p}},y){let x;return!!a[y]||o!==ot&&Ge(o,y)||ks(l,y)||(x=p[0])&&Ge(x,y)||Ge(f,y)||Ge(io,y)||Ge(d.config.globalProperties,y)},defineProperty(o,l,a){return a.get!=null?o._.accessCache[l]=0:Ge(a,"value")&&this.set(o,l,a.value,null),Reflect.defineProperty(o,l,a)}};function bf(o){return Fe(o)?o.reduce((l,a)=>(l[a]=null,l),{}):o}let Fs=!0;function pg(o){const l=ra(o),a=o.proxy,f=o.ctx;Fs=!1,l.beforeCreate&&xf(l.beforeCreate,o,"bc");const{data:d,computed:p,methods:y,watch:x,provide:b,inject:L,created:w,beforeMount:P,mounted:E,beforeUpdate:D,updated:X,activated:V,deactivated:W,beforeDestroy:M,beforeUnmount:S,destroyed:O,unmounted:R,render:B,renderTracked:ee,renderTriggered:fe,errorCaptured:ae,serverPrefetch:be,expose:me,inheritAttrs:ce,components:Ae,directives:j,filters:ne}=l;if(L&&gg(L,f,null),y)for(const Y in y){const le=y[Y];Re(le)&&(f[Y]=le.bind(a))}if(d){const Y=d.call(a,a);ft(Y)&&(o.data=yi(Y))}if(Fs=!0,p)for(const Y in p){const le=p[Y],Ee=Re(le)?le.bind(a,a):Re(le.get)?le.get.bind(a,a):ur,Pe=!Re(le)&&Re(le.set)?le.set.bind(a):ur,Be=Xc({get:Ee,set:Pe});Object.defineProperty(f,Y,{enumerable:!0,configurable:!0,get:()=>Be.value,set:Ze=>Be.value=Ze})}if(x)for(const Y in x)Pc(x[Y],f,a,Y);if(b){const Y=Re(b)?b.call(a):b;Reflect.ownKeys(Y).forEach(le=>{wg(le,Y[le])})}w&&xf(w,o,"c");function re(Y,le){Fe(le)?le.forEach(Ee=>Y(Ee.bind(a))):le&&Y(le.bind(a))}if(re(og,P),re(bl,E),re(lg,D),re(sg,X),re(rg,V),re(ng,W),re(dg,ae),re(cg,ee),re(fg,fe),re(ag,S),re(ta,R),re(ug,be),Fe(me))if(me.length){const Y=o.exposed||(o.exposed={});me.forEach(le=>{Object.defineProperty(Y,le,{get:()=>a[le],set:Ee=>a[le]=Ee})})}else o.exposed||(o.exposed={});B&&o.render===ur&&(o.render=B),ce!=null&&(o.inheritAttrs=ce),Ae&&(o.components=Ae),j&&(o.directives=j)}function gg(o,l,a=ur){Fe(o)&&(o=Hs(o));for(const f in o){const d=o[f];let p;ft(d)?"default"in d?p=tl(d.from||f,d.default,!0):p=tl(d.from||f):p=tl(d),tr(p)?Object.defineProperty(l,f,{enumerable:!0,configurable:!0,get:()=>p.value,set:y=>p.value=y}):l[f]=p}}function xf(o,l,a){Sr(Fe(o)?o.map(f=>f.bind(l.proxy)):o.bind(l.proxy),l,a)}function Pc(o,l,a,f){const d=f.includes(".")?Oc(a,f):()=>a[f];if(Tt(o)){const p=l[o];Re(p)&&ro(d,p)}else if(Re(o))ro(d,o.bind(a));else if(ft(o))if(Fe(o))o.forEach(p=>Pc(p,l,a,f));else{const p=Re(o.handler)?o.handler.bind(a):l[o.handler];Re(p)&&ro(d,p,o)}}function ra(o){const l=o.type,{mixins:a,extends:f}=l,{mixins:d,optionsCache:p,config:{optionMergeStrategies:y}}=o.appContext,x=p.get(l);let b;return x?b=x:!d.length&&!a&&!f?b=l:(b={},d.length&&d.forEach(L=>ul(b,L,y,!0)),ul(b,l,y)),ft(l)&&p.set(l,b),b}function ul(o,l,a,f=!1){const{mixins:d,extends:p}=l;p&&ul(o,p,a,!0),d&&d.forEach(y=>ul(o,y,a,!0));for(const y in l)if(!(f&&y==="expose")){const x=vg[y]||a&&a[y];o[y]=x?x(o[y],l[y]):l[y]}return o}const vg={data:wf,props:kf,emits:kf,methods:eo,computed:eo,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:eo,directives:eo,watch:yg,provide:wf,inject:mg};function wf(o,l){return l?o?function(){return Ft(Re(o)?o.call(this,this):o,Re(l)?l.call(this,this):l)}:l:o}function mg(o,l){return eo(Hs(o),Hs(l))}function Hs(o){if(Fe(o)){const l={};for(let a=0;a1)return a&&Re(l)?l.call(f&&f.proxy):l}}function kg(o,l,a,f=!1){const d={},p={};ol(p,wl,1),o.propsDefaults=Object.create(null),Ic(o,l,d,p);for(const y in o.propsOptions[0])y in d||(d[y]=void 0);a?o.props=f?d:Ip(d):o.type.props?o.props=d:o.props=p,o.attrs=p}function Sg(o,l,a,f){const{props:d,attrs:p,vnode:{patchFlag:y}}=o,x=Ye(d),[b]=o.propsOptions;let L=!1;if((f||y>0)&&!(y&16)){if(y&8){const w=o.vnode.dynamicProps;for(let P=0;P{b=!0;const[E,D]=Dc(P,l,!0);Ft(y,E),D&&x.push(...D)};!a&&l.mixins.length&&l.mixins.forEach(w),o.extends&&w(o.extends),o.mixins&&o.mixins.forEach(w)}if(!p&&!b)return ft(o)&&f.set(o,ui),ui;if(Fe(p))for(let w=0;w-1,D[1]=V<0||X-1||Ge(D,"default"))&&x.push(P)}}}const L=[y,x];return ft(o)&&f.set(o,L),L}function Sf(o){return o[0]!=="$"&&!to(o)}function Cf(o){return o===null?"null":typeof o=="function"?o.name||"":typeof o=="object"&&o.constructor&&o.constructor.name||""}function _f(o,l){return Cf(o)===Cf(l)}function Tf(o,l){return Fe(l)?l.findIndex(a=>_f(a,o)):Re(l)&&_f(l,o)?0:-1}const Fc=o=>o[0]==="_"||o==="$stable",na=o=>Fe(o)?o.map(Ar):[Ar(o)],Cg=(o,l,a)=>{if(l._n)return l;const f=Ln((...d)=>na(l(...d)),a);return f._c=!1,f},Hc=(o,l,a)=>{const f=o._ctx;for(const d in o){if(Fc(d))continue;const p=o[d];if(Re(p))l[d]=Cg(d,p,f);else if(p!=null){const y=na(p);l[d]=()=>y}}},Wc=(o,l)=>{const a=na(l);o.slots.default=()=>a},_g=(o,l)=>{if(o.vnode.shapeFlag&32){const a=l._;a?(o.slots=Ye(l),ol(l,"_",a)):Hc(l,o.slots={})}else o.slots={},l&&Wc(o,l);ol(o.slots,wl,1)},Tg=(o,l,a)=>{const{vnode:f,slots:d}=o;let p=!0,y=ot;if(f.shapeFlag&32){const x=l._;x?a&&x===1?p=!1:(Ft(d,l),!a&&x===1&&delete d._):(p=!l.$stable,Hc(l,d)),y=l}else l&&(Wc(o,l),y={default:1});if(p)for(const x in d)!Fc(x)&&y[x]==null&&delete d[x]};function Rs(o,l,a,f,d=!1){if(Fe(o)){o.forEach((E,D)=>Rs(E,l&&(Fe(l)?l[D]:l),a,f,d));return}if(no(f)&&!d)return;const p=f.shapeFlag&4?oa(f.component)||f.component.proxy:f.el,y=d?null:p,{i:x,r:b}=o,L=l&&l.r,w=x.refs===ot?x.refs={}:x.refs,P=x.setupState;if(L!=null&&L!==b&&(Tt(L)?(w[L]=null,Ge(P,L)&&(P[L]=null)):tr(L)&&(L.value=null)),Re(b))fn(b,x,12,[y,w]);else{const E=Tt(b),D=tr(b);if(E||D){const X=()=>{if(o.f){const V=E?Ge(P,b)?P[b]:w[b]:b.value;d?Fe(V)&&js(V,p):Fe(V)?V.includes(p)||V.push(p):E?(w[b]=[p],Ge(P,b)&&(P[b]=w[b])):(b.value=[p],o.k&&(w[o.k]=b.value))}else E?(w[b]=y,Ge(P,b)&&(P[b]=y)):D&&(b.value=y,o.k&&(w[o.k]=y))};y?(X.id=-1,Vt(X,a)):X()}}}const Vt=Vp;function Lg(o){return Og(o)}function Og(o,l){const a=tc();a.__VUE__=!0;const{insert:f,remove:d,patchProp:p,createElement:y,createText:x,createComment:b,setText:L,setElementText:w,parentNode:P,nextSibling:E,setScopeId:D=ur,insertStaticContent:X}=o,V=(A,I,G,q=null,Z=null,ie=null,de=void 0,J=null,te=!!I.dynamicChildren)=>{if(A===I)return;A&&!Vi(A,I)&&(q=Le(A),Ze(A,Z,ie,!0),A=null),I.patchFlag===-2&&(te=!1,I.dynamicChildren=null);const{type:T,ref:z,shapeFlag:H}=I;switch(T){case xl:W(A,I,G,q);break;case dn:M(A,I,G,q);break;case rl:A==null&&S(I,G,q,de);break;case Dt:Ae(A,I,G,q,Z,ie,de,J,te);break;default:H&1?B(A,I,G,q,Z,ie,de,J,te):H&6?j(A,I,G,q,Z,ie,de,J,te):(H&64||H&128)&&T.process(A,I,G,q,Z,ie,de,J,te,Oe)}z!=null&&Z&&Rs(z,A&&A.ref,ie,I||A,!I)},W=(A,I,G,q)=>{if(A==null)f(I.el=x(I.children),G,q);else{const Z=I.el=A.el;I.children!==A.children&&L(Z,I.children)}},M=(A,I,G,q)=>{A==null?f(I.el=b(I.children||""),G,q):I.el=A.el},S=(A,I,G,q)=>{[A.el,A.anchor]=X(A.children,I,G,q,A.el,A.anchor)},O=({el:A,anchor:I},G,q)=>{let Z;for(;A&&A!==I;)Z=E(A),f(A,G,q),A=Z;f(I,G,q)},R=({el:A,anchor:I})=>{let G;for(;A&&A!==I;)G=E(A),d(A),A=G;d(I)},B=(A,I,G,q,Z,ie,de,J,te)=>{I.type==="svg"?de="svg":I.type==="math"&&(de="mathml"),A==null?ee(I,G,q,Z,ie,de,J,te):be(A,I,Z,ie,de,J,te)},ee=(A,I,G,q,Z,ie,de,J)=>{let te,T;const{props:z,shapeFlag:H,transition:ue,dirs:ke}=A;if(te=A.el=y(A.type,ie,z&&z.is,z),H&8?w(te,A.children):H&16&&ae(A.children,te,null,q,Z,Ss(A,ie),de,J),ke&&_n(A,null,q,"created"),fe(te,A,A.scopeId,de,q),z){for(const je in z)je!=="value"&&!to(je)&&p(te,je,null,z[je],ie,A.children,q,Z,Ce);"value"in z&&p(te,"value",null,z.value,ie),(T=z.onVnodeBeforeMount)&&Mr(T,q,A)}ke&&_n(A,null,q,"beforeMount");const De=Mg(Z,ue);De&&ue.beforeEnter(te),f(te,I,G),((T=z&&z.onVnodeMounted)||De||ke)&&Vt(()=>{T&&Mr(T,q,A),De&&ue.enter(te),ke&&_n(A,null,q,"mounted")},Z)},fe=(A,I,G,q,Z)=>{if(G&&D(A,G),q)for(let ie=0;ie{for(let T=te;T{const J=I.el=A.el;let{patchFlag:te,dynamicChildren:T,dirs:z}=I;te|=A.patchFlag&16;const H=A.props||ot,ue=I.props||ot;let ke;if(G&&Tn(G,!1),(ke=ue.onVnodeBeforeUpdate)&&Mr(ke,G,I,A),z&&_n(I,A,G,"beforeUpdate"),G&&Tn(G,!0),T?me(A.dynamicChildren,T,J,G,q,Ss(I,Z),ie):de||le(A,I,J,null,G,q,Ss(I,Z),ie,!1),te>0){if(te&16)ce(J,I,H,ue,G,q,Z);else if(te&2&&H.class!==ue.class&&p(J,"class",null,ue.class,Z),te&4&&p(J,"style",H.style,ue.style,Z),te&8){const De=I.dynamicProps;for(let je=0;je{ke&&Mr(ke,G,I,A),z&&_n(I,A,G,"updated")},q)},me=(A,I,G,q,Z,ie,de)=>{for(let J=0;J{if(G!==q){if(G!==ot)for(const J in G)!to(J)&&!(J in q)&&p(A,J,G[J],null,de,I.children,Z,ie,Ce);for(const J in q){if(to(J))continue;const te=q[J],T=G[J];te!==T&&J!=="value"&&p(A,J,T,te,de,I.children,Z,ie,Ce)}"value"in q&&p(A,"value",G.value,q.value,de)}},Ae=(A,I,G,q,Z,ie,de,J,te)=>{const T=I.el=A?A.el:x(""),z=I.anchor=A?A.anchor:x("");let{patchFlag:H,dynamicChildren:ue,slotScopeIds:ke}=I;ke&&(J=J?J.concat(ke):ke),A==null?(f(T,G,q),f(z,G,q),ae(I.children||[],G,z,Z,ie,de,J,te)):H>0&&H&64&&ue&&A.dynamicChildren?(me(A.dynamicChildren,ue,G,Z,ie,de,J),(I.key!=null||Z&&I===Z.subTree)&&Rc(A,I,!0)):le(A,I,G,z,Z,ie,de,J,te)},j=(A,I,G,q,Z,ie,de,J,te)=>{I.slotScopeIds=J,A==null?I.shapeFlag&512?Z.ctx.activate(I,G,q,de,te):ne(I,G,q,Z,ie,de,te):m(A,I,te)},ne=(A,I,G,q,Z,ie,de)=>{const J=A.component=Rg(A,q,Z);if(Mc(A)&&(J.ctx.renderer=Oe),zg(J),J.asyncDep){if(Z&&Z.registerDep(J,re),!A.el){const te=J.subTree=Ct(dn);M(null,te,I,G)}}else re(J,A,I,G,Z,ie,de)},m=(A,I,G)=>{const q=I.component=A.component;if(Yp(A,I,G))if(q.asyncDep&&!q.asyncResolved){Y(q,I,G);return}else q.next=I,Kp(q.update),q.effect.dirty=!0,q.update();else I.el=A.el,q.vnode=I},re=(A,I,G,q,Z,ie,de)=>{const J=()=>{if(A.isMounted){let{next:z,bu:H,u:ue,parent:ke,vnode:De}=A;{const Mt=zc(A);if(Mt){z&&(z.el=De.el,Y(A,z,de)),Mt.asyncDep.then(()=>{A.isUnmounted||J()});return}}let je=z,Ke;Tn(A,!1),z?(z.el=De.el,Y(A,z,de)):z=De,H&&bs(H),(Ke=z.props&&z.props.onVnodeBeforeUpdate)&&Mr(Ke,ke,z,De),Tn(A,!0);const We=ws(A),vt=A.subTree;A.subTree=We,V(vt,We,P(vt.el),Le(vt),A,Z,ie),z.el=We.el,je===null&&$p(A,We.el),ue&&Vt(ue,Z),(Ke=z.props&&z.props.onVnodeUpdated)&&Vt(()=>Mr(Ke,ke,z,De),Z)}else{let z;const{el:H,props:ue}=I,{bm:ke,m:De,parent:je}=A,Ke=no(I);if(Tn(A,!1),ke&&bs(ke),!Ke&&(z=ue&&ue.onVnodeBeforeMount)&&Mr(z,je,I),Tn(A,!0),H&&ct){const We=()=>{A.subTree=ws(A),ct(H,A.subTree,A,Z,null)};Ke?I.type.__asyncLoader().then(()=>!A.isUnmounted&&We()):We()}else{const We=A.subTree=ws(A);V(null,We,G,q,A,Z,ie),I.el=We.el}if(De&&Vt(De,Z),!Ke&&(z=ue&&ue.onVnodeMounted)){const We=I;Vt(()=>Mr(z,je,We),Z)}(I.shapeFlag&256||je&&no(je.vnode)&&je.vnode.shapeFlag&256)&&A.a&&Vt(A.a,Z),A.isMounted=!0,I=G=q=null}},te=A.effect=new Gs(J,ur,()=>Qs(T),A.scope),T=A.update=()=>{te.dirty&&te.run()};T.id=A.uid,Tn(A,!0),T()},Y=(A,I,G)=>{I.component=A;const q=A.vnode.props;A.vnode=I,A.next=null,Sg(A,I.props,q,G),Tg(A,I.children,G),Pn(),gf(A),Nn()},le=(A,I,G,q,Z,ie,de,J,te=!1)=>{const T=A&&A.children,z=A?A.shapeFlag:0,H=I.children,{patchFlag:ue,shapeFlag:ke}=I;if(ue>0){if(ue&128){Pe(T,H,G,q,Z,ie,de,J,te);return}else if(ue&256){Ee(T,H,G,q,Z,ie,de,J,te);return}}ke&8?(z&16&&Ce(T,Z,ie),H!==T&&w(G,H)):z&16?ke&16?Pe(T,H,G,q,Z,ie,de,J,te):Ce(T,Z,ie,!0):(z&8&&w(G,""),ke&16&&ae(H,G,q,Z,ie,de,J,te))},Ee=(A,I,G,q,Z,ie,de,J,te)=>{A=A||ui,I=I||ui;const T=A.length,z=I.length,H=Math.min(T,z);let ue;for(ue=0;uez?Ce(A,Z,ie,!0,!1,H):ae(I,G,q,Z,ie,de,J,te,H)},Pe=(A,I,G,q,Z,ie,de,J,te)=>{let T=0;const z=I.length;let H=A.length-1,ue=z-1;for(;T<=H&&T<=ue;){const ke=A[T],De=I[T]=te?ln(I[T]):Ar(I[T]);if(Vi(ke,De))V(ke,De,G,null,Z,ie,de,J,te);else break;T++}for(;T<=H&&T<=ue;){const ke=A[H],De=I[ue]=te?ln(I[ue]):Ar(I[ue]);if(Vi(ke,De))V(ke,De,G,null,Z,ie,de,J,te);else break;H--,ue--}if(T>H){if(T<=ue){const ke=ue+1,De=keue)for(;T<=H;)Ze(A[T],Z,ie,!0),T++;else{const ke=T,De=T,je=new Map;for(T=De;T<=ue;T++){const At=I[T]=te?ln(I[T]):Ar(I[T]);At.key!=null&&je.set(At.key,T)}let Ke,We=0;const vt=ue-De+1;let Mt=!1,fr=0;const nr=new Array(vt);for(T=0;T=vt){Ze(At,Z,ie,!0);continue}let Me;if(At.key!=null)Me=je.get(At.key);else for(Ke=De;Ke<=ue;Ke++)if(nr[Ke-De]===0&&Vi(At,I[Ke])){Me=Ke;break}Me===void 0?Ze(At,Z,ie,!0):(nr[Me-De]=T+1,Me>=fr?fr=Me:Mt=!0,V(At,I[Me],G,null,Z,ie,de,J,te),We++)}const cr=Mt?Ag(nr):ui;for(Ke=cr.length-1,T=vt-1;T>=0;T--){const At=De+T,Me=I[At],hn=At+1{const{el:ie,type:de,transition:J,children:te,shapeFlag:T}=A;if(T&6){Be(A.component.subTree,I,G,q);return}if(T&128){A.suspense.move(I,G,q);return}if(T&64){de.move(A,I,G,Oe);return}if(de===Dt){f(ie,I,G);for(let H=0;HJ.enter(ie),Z);else{const{leave:H,delayLeave:ue,afterLeave:ke}=J,De=()=>f(ie,I,G),je=()=>{H(ie,()=>{De(),ke&&ke()})};ue?ue(ie,De,je):je()}else f(ie,I,G)},Ze=(A,I,G,q=!1,Z=!1)=>{const{type:ie,props:de,ref:J,children:te,dynamicChildren:T,shapeFlag:z,patchFlag:H,dirs:ue}=A;if(J!=null&&Rs(J,null,G,A,!0),z&256){I.ctx.deactivate(A);return}const ke=z&1&&ue,De=!no(A);let je;if(De&&(je=de&&de.onVnodeBeforeUnmount)&&Mr(je,I,A),z&6)Ve(A.component,G,q);else{if(z&128){A.suspense.unmount(G,q);return}ke&&_n(A,null,I,"beforeUnmount"),z&64?A.type.remove(A,I,G,Z,Oe,q):T&&(ie!==Dt||H>0&&H&64)?Ce(T,I,G,!1,!0):(ie===Dt&&H&384||!Z&&z&16)&&Ce(te,I,G),q&&Je(A)}(De&&(je=de&&de.onVnodeUnmounted)||ke)&&Vt(()=>{je&&Mr(je,I,A),ke&&_n(A,null,I,"unmounted")},G)},Je=A=>{const{type:I,el:G,anchor:q,transition:Z}=A;if(I===Dt){ht(G,q);return}if(I===rl){R(A);return}const ie=()=>{d(G),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(A.shapeFlag&1&&Z&&!Z.persisted){const{leave:de,delayLeave:J}=Z,te=()=>de(G,ie);J?J(A.el,ie,te):te()}else ie()},ht=(A,I)=>{let G;for(;A!==I;)G=E(A),d(A),A=G;d(I)},Ve=(A,I,G)=>{const{bum:q,scope:Z,update:ie,subTree:de,um:J}=A;q&&bs(q),Z.stop(),ie&&(ie.active=!1,Ze(de,A,I,G)),J&&Vt(J,I),Vt(()=>{A.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Ce=(A,I,G,q=!1,Z=!1,ie=0)=>{for(let de=ie;deA.shapeFlag&6?Le(A.component.subTree):A.shapeFlag&128?A.suspense.next():E(A.anchor||A.el);let Ne=!1;const ze=(A,I,G)=>{A==null?I._vnode&&Ze(I._vnode,null,null,!0):V(I._vnode||null,A,I,null,null,null,G),Ne||(Ne=!0,gf(),Sc(),Ne=!1),I._vnode=A},Oe={p:V,um:Ze,m:Be,r:Je,mt:ne,mc:ae,pc:le,pbc:me,n:Le,o};let xe,ct;return l&&([xe,ct]=l(Oe)),{render:ze,hydrate:xe,createApp:xg(ze,xe)}}function Ss({type:o,props:l},a){return a==="svg"&&o==="foreignObject"||a==="mathml"&&o==="annotation-xml"&&l&&l.encoding&&l.encoding.includes("html")?void 0:a}function Tn({effect:o,update:l},a){o.allowRecurse=l.allowRecurse=a}function Mg(o,l){return(!o||o&&!o.pendingBranch)&&l&&!l.persisted}function Rc(o,l,a=!1){const f=o.children,d=l.children;if(Fe(f)&&Fe(d))for(let p=0;p>1,o[a[x]]0&&(l[f]=a[p-1]),a[p]=f)}}for(p=a.length,y=a[p-1];p-- >0;)a[p]=y,y=l[y];return a}function zc(o){const l=o.subTree.component;if(l)return l.asyncDep&&!l.asyncResolved?l:zc(l)}const Eg=o=>o.__isTeleport,Dt=Symbol.for("v-fgt"),xl=Symbol.for("v-txt"),dn=Symbol.for("v-cmt"),rl=Symbol.for("v-stc"),lo=[];let kr=null;function nt(o=!1){lo.push(kr=o?null:[])}function Pg(){lo.pop(),kr=lo[lo.length-1]||null}let ho=1;function Lf(o){ho+=o}function Bc(o){return o.dynamicChildren=ho>0?kr||ui:null,Pg(),ho>0&&kr&&kr.push(o),o}function Ot(o,l,a,f,d,p){return Bc(et(o,l,a,f,d,p,!0))}function En(o,l,a,f,d){return Bc(Ct(o,l,a,f,d,!0))}function Kc(o){return o?o.__v_isVNode===!0:!1}function Vi(o,l){return o.type===l.type&&o.key===l.key}const wl="__vInternal",jc=({key:o})=>o??null,nl=({ref:o,ref_key:l,ref_for:a})=>(typeof o=="number"&&(o=""+o),o!=null?Tt(o)||tr(o)||Re(o)?{i:Qt,r:o,k:l,f:!!a}:o:null);function et(o,l=null,a=null,f=0,d=null,p=o===Dt?0:1,y=!1,x=!1){const b={__v_isVNode:!0,__v_skip:!0,type:o,props:l,key:l&&jc(l),ref:l&&nl(l),scopeId:ml,slotScopeIds:null,children:a,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:p,patchFlag:f,dynamicProps:d,dynamicChildren:null,appContext:null,ctx:Qt};return x?(ia(b,a),p&128&&o.normalize(b)):a&&(b.shapeFlag|=Tt(a)?8:16),ho>0&&!y&&kr&&(b.patchFlag>0||p&6)&&b.patchFlag!==32&&kr.push(b),b}const Ct=Ng;function Ng(o,l=null,a=null,f=0,d=null,p=!1){if((!o||o===Jp)&&(o=dn),Kc(o)){const x=gi(o,l,!0);return a&&ia(x,a),ho>0&&!p&&kr&&(x.shapeFlag&6?kr[kr.indexOf(o)]=x:kr.push(x)),x.patchFlag|=-2,x}if(Ug(o)&&(o=o.__vccOpts),l){l=Ig(l);let{class:x,style:b}=l;x&&!Tt(x)&&(l.class=Br(x)),ft(b)&&(vc(b)&&!Fe(b)&&(b=Ft({},b)),l.style=ao(b))}const y=Tt(o)?1:Zp(o)?128:Eg(o)?64:ft(o)?4:Re(o)?2:0;return et(o,l,a,f,d,y,p,!0)}function Ig(o){return o?vc(o)||wl in o?Ft({},o):o:null}function gi(o,l,a=!1){const{props:f,ref:d,patchFlag:p,children:y}=o,x=l?Fg(f||{},l):f;return{__v_isVNode:!0,__v_skip:!0,type:o.type,props:x,key:x&&jc(x),ref:l&&l.ref?a&&d?Fe(d)?d.concat(nl(l)):[d,nl(l)]:nl(l):d,scopeId:o.scopeId,slotScopeIds:o.slotScopeIds,children:y,target:o.target,targetAnchor:o.targetAnchor,staticCount:o.staticCount,shapeFlag:o.shapeFlag,patchFlag:l&&o.type!==Dt?p===-1?16:p|16:p,dynamicProps:o.dynamicProps,dynamicChildren:o.dynamicChildren,appContext:o.appContext,dirs:o.dirs,transition:o.transition,component:o.component,suspense:o.suspense,ssContent:o.ssContent&&gi(o.ssContent),ssFallback:o.ssFallback&&gi(o.ssFallback),el:o.el,anchor:o.anchor,ctx:o.ctx,ce:o.ce}}function Dg(o=" ",l=0){return Ct(xl,null,o,l)}function Uc(o,l){const a=Ct(rl,null,o);return a.staticCount=l,a}function so(o="",l=!1){return l?(nt(),En(dn,null,o)):Ct(dn,null,o)}function Ar(o){return o==null||typeof o=="boolean"?Ct(dn):Fe(o)?Ct(Dt,null,o.slice()):typeof o=="object"?ln(o):Ct(xl,null,String(o))}function ln(o){return o.el===null&&o.patchFlag!==-1||o.memo?o:gi(o)}function ia(o,l){let a=0;const{shapeFlag:f}=o;if(l==null)l=null;else if(Fe(l))a=16;else if(typeof l=="object")if(f&65){const d=l.default;d&&(d._c&&(d._d=!1),ia(o,d()),d._c&&(d._d=!0));return}else{a=32;const d=l._;!d&&!(wl in l)?l._ctx=Qt:d===3&&Qt&&(Qt.slots._===1?l._=1:(l._=2,o.patchFlag|=1024))}else Re(l)?(l={default:l,_ctx:Qt},a=32):(l=String(l),f&64?(a=16,l=[Dg(l)]):a=8);o.children=l,o.shapeFlag|=a}function Fg(...o){const l={};for(let a=0;a{let d;return(d=o[a])||(d=o[a]=[]),d.push(f),p=>{d.length>1?d.forEach(y=>y(p)):d[0](p)}};fl=l("__VUE_INSTANCE_SETTERS__",a=>Yt=a),zs=l("__VUE_SSR_SETTERS__",a=>kl=a)}const go=o=>{const l=Yt;return fl(o),o.scope.on(),()=>{o.scope.off(),fl(l)}},Of=()=>{Yt&&Yt.scope.off(),fl(null)};function Gc(o){return o.vnode.shapeFlag&4}let kl=!1;function zg(o,l=!1){l&&zs(l);const{props:a,children:f}=o.vnode,d=Gc(o);kg(o,a,d,l),_g(o,f);const p=d?Bg(o,l):void 0;return l&&zs(!1),p}function Bg(o,l){const a=o.type;o.accessCache=Object.create(null),o.proxy=mc(new Proxy(o.ctx,hg));const{setup:f}=a;if(f){const d=o.setupContext=f.length>1?jg(o):null,p=go(o);Pn();const y=fn(f,o,0,[o.props,d]);if(Nn(),p(),Zf(y)){if(y.then(Of,Of),l)return y.then(x=>{Mf(o,x,l)}).catch(x=>{gl(x,o,0)});o.asyncDep=y}else Mf(o,y,l)}else qc(o,l)}function Mf(o,l,a){Re(l)?o.type.__ssrInlineRender?o.ssrRender=l:o.render=l:ft(l)&&(o.setupState=xc(l)),qc(o,a)}let Af;function qc(o,l,a){const f=o.type;if(!o.render){if(!l&&Af&&!f.render){const d=f.template||ra(o).template;if(d){const{isCustomElement:p,compilerOptions:y}=o.appContext.config,{delimiters:x,compilerOptions:b}=f,L=Ft(Ft({isCustomElement:p,delimiters:x},y),b);f.render=Af(d,L)}}o.render=f.render||ur}{const d=go(o);Pn();try{pg(o)}finally{Nn(),d()}}}function Kg(o){return o.attrsProxy||(o.attrsProxy=new Proxy(o.attrs,{get(l,a){return er(o,"get","$attrs"),l[a]}}))}function jg(o){const l=a=>{o.exposed=a||{}};return{get attrs(){return Kg(o)},slots:o.slots,emit:o.emit,expose:l}}function oa(o){if(o.exposed)return o.exposeProxy||(o.exposeProxy=new Proxy(xc(mc(o.exposed)),{get(l,a){if(a in l)return l[a];if(a in io)return io[a](o)},has(l,a){return a in l||a in io}}))}function Ug(o){return Re(o)&&"__vccOpts"in o}const Xc=(o,l)=>Dp(o,l,kl),Gg="3.4.21";/** +**/function fn(o,l,a,f){try{return f?o(...f):o()}catch(d){gl(d,l,a)}}function Sr(o,l,a,f){if(Re(o)){const p=fn(o,l,a,f);return p&&Zf(p)&&p.catch(y=>{gl(y,l,a)}),p}const d=[];for(let p=0;p>>1,d=Rt[f],p=co(d);pEr&&Rt.splice(l,1)}function Gp(o){Fe(o)?di.push(...o):(!on||!on.includes(o,o.allowRecurse?On+1:On))&&di.push(o),kc()}function pf(o,l,a=fo?Er+1:0){for(;aco(a)-co(f));if(di.length=0,on){on.push(...l);return}for(on=l,On=0;Ono.id==null?1/0:o.id,qp=(o,l)=>{const a=co(o)-co(l);if(a===0){if(o.pre&&!l.pre)return-1;if(l.pre&&!o.pre)return 1}return a};function Cc(o){Ps=!1,fo=!0,Rt.sort(qp);try{for(Er=0;ErTt(D)?D.trim():D)),P&&(d=a.map(sp))}let x,b=f[x=ys(l)]||f[x=ys(hi(l))];!b&&p&&(b=f[x=ys(mi(l))]),b&&Sr(b,o,6,d);const L=f[x+"Once"];if(L){if(!o.emitted)o.emitted={};else if(o.emitted[x])return;o.emitted[x]=!0,Sr(L,o,6,d)}}function _c(o,l,a=!1){const f=l.emitsCache,d=f.get(o);if(d!==void 0)return d;const p=o.emits;let y={},x=!1;if(!Re(o)){const b=L=>{const w=_c(L,l,!0);w&&(x=!0,Ft(y,w))};!a&&l.mixins.length&&l.mixins.forEach(b),o.extends&&b(o.extends),o.mixins&&o.mixins.forEach(b)}return!p&&!x?(ft(o)&&f.set(o,null),null):(Fe(p)?p.forEach(b=>y[b]=null):Ft(y,p),ft(o)&&f.set(o,y),y)}function vl(o,l){return!o||!cl(l)?!1:(l=l.slice(2).replace(/Once$/,""),Ge(o,l[0].toLowerCase()+l.slice(1))||Ge(o,mi(l))||Ge(o,l))}let Qt=null,ml=null;function al(o){const l=Qt;return Qt=o,ml=o&&o.type.__scopeId||null,l}function Tc(o){ml=o}function Lc(){ml=null}function Ln(o,l=Qt,a){if(!l||o._n)return o;const f=(...d)=>{f._d&&Tf(-1);const p=al(l);let y;try{y=o(...d)}finally{al(p),f._d&&Tf(1)}return y};return f._n=!0,f._c=!0,f._d=!0,f}function ws(o){const{type:l,vnode:a,proxy:f,withProxy:d,props:p,propsOptions:[y],slots:x,attrs:b,emit:L,render:w,renderCache:P,data:E,setupState:D,ctx:X,inheritAttrs:V}=o;let W,M;const S=al(o);try{if(a.shapeFlag&4){const R=d||f,B=R;W=Ar(w.call(B,R,P,p,D,E,X)),M=b}else{const R=l;W=Ar(R.length>1?R(p,{attrs:b,slots:x,emit:L}):R(p,null)),M=l.props?b:Yp(b)}}catch(R){lo.length=0,gl(R,o,1),W=Ct(dn)}let O=W;if(M&&V!==!1){const R=Object.keys(M),{shapeFlag:B}=O;R.length&&B&7&&(y&&R.some(Bs)&&(M=$p(M,y)),O=gi(O,M))}return a.dirs&&(O=gi(O),O.dirs=O.dirs?O.dirs.concat(a.dirs):a.dirs),a.transition&&(O.transition=a.transition),W=O,al(S),W}const Yp=o=>{let l;for(const a in o)(a==="class"||a==="style"||cl(a))&&((l||(l={}))[a]=o[a]);return l},$p=(o,l)=>{const a={};for(const f in o)(!Bs(f)||!(f.slice(9)in l))&&(a[f]=o[f]);return a};function Jp(o,l,a){const{props:f,children:d,component:p}=o,{props:y,children:x,patchFlag:b}=l,L=p.emitsOptions;if(l.dirs||l.transition)return!0;if(a&&b>=0){if(b&1024)return!0;if(b&16)return f?gf(f,y,L):!!y;if(b&8){const w=l.dynamicProps;for(let P=0;Po.__isSuspense;function eg(o,l){l&&l.pendingBranch?Fe(o)?l.effects.push(...o):l.effects.push(o):Gp(o)}const tg=Symbol.for("v-scx"),rg=()=>tl(tg);function vf(o,l){return Qs(o,null,l)}const Qo={};function ro(o,l,a){return Qs(o,l,a)}function Qs(o,l,{immediate:a,deep:f,flush:d,once:p,onTrack:y,onTrigger:x}=ot){if(l&&p){const ee=l;l=(...fe)=>{ee(...fe),B()}}const b=Yt,L=ee=>f===!0?ee:ai(ee,f===!1?1:void 0);let w,P=!1,E=!1;if(tr(o)?(w=()=>o.value,P=sl(o)):ci(o)?(w=()=>L(o),P=!0):Fe(o)?(E=!0,P=o.some(ee=>ci(ee)||sl(ee)),w=()=>o.map(ee=>{if(tr(ee))return ee.value;if(ci(ee))return L(ee);if(Re(ee))return fn(ee,b,2)})):Re(o)?l?w=()=>fn(o,b,2):w=()=>(D&&D(),Sr(o,b,3,[X])):w=ur,l&&f){const ee=w;w=()=>ai(ee())}let D,X=ee=>{D=O.onStop=()=>{fn(ee,b,4),D=O.onStop=void 0}},V;if(kl)if(X=ur,l?a&&Sr(l,b,3,[w(),E?[]:void 0,X]):w(),d==="sync"){const ee=rg();V=ee.__watcherHandles||(ee.__watcherHandles=[])}else return ur;let W=E?new Array(o.length).fill(Qo):Qo;const M=()=>{if(!(!O.active||!O.dirty))if(l){const ee=O.run();(f||P||(E?ee.some((fe,ae)=>cn(fe,W[ae])):cn(ee,W)))&&(D&&D(),Sr(l,b,3,[ee,W===Qo?void 0:E&&W[0]===Qo?[]:W,X]),W=ee)}else O.run()};M.allowRecurse=!!l;let S;d==="sync"?S=M:d==="post"?S=()=>Vt(M,b&&b.suspense):(M.pre=!0,b&&(M.id=b.uid),S=()=>Vs(M));const O=new Us(w,ur,S),R=vp(),B=()=>{O.stop(),R&&Ks(R.effects,O)};return l?a?M():W=O.run():d==="post"?Vt(O.run.bind(O),b&&b.suspense):O.run(),V&&V.push(B),B}function ng(o,l,a){const f=this.proxy,d=Tt(o)?o.includes(".")?Oc(f,o):()=>f[o]:o.bind(f,f);let p;Re(l)?p=l:(p=l.handler,a=l);const y=go(this),x=Qs(d,p.bind(f),a);return y(),x}function Oc(o,l){const a=l.split(".");return()=>{let f=o;for(let d=0;d0){if(a>=l)return o;a++}if(f=f||new Set,f.has(o))return o;if(f.add(o),tr(o))ai(o.value,l,a,f);else if(Fe(o))for(let d=0;d{ai(d,l,a,f)});else if(Qf(o))for(const d in o)ai(o[d],l,a,f);return o}function _n(o,l,a,f){const d=o.dirs,p=l&&l.dirs;for(let y=0;y!!o.type.__asyncLoader,Mc=o=>o.type.__isKeepAlive;function ig(o,l){Ac(o,"a",l)}function og(o,l){Ac(o,"da",l)}function Ac(o,l,a=Yt){const f=o.__wdc||(o.__wdc=()=>{let d=a;for(;d;){if(d.isDeactivated)return;d=d.parent}return o()});if(yl(l,f,a),a){let d=a.parent;for(;d&&d.parent;)Mc(d.parent.vnode)&&lg(f,l,a,d),d=d.parent}}function lg(o,l,a,f){const d=yl(l,o,f,!0);ea(()=>{Ks(f[l],d)},a)}function yl(o,l,a=Yt,f=!1){if(a){const d=a[o]||(a[o]=[]),p=l.__weh||(l.__weh=(...y)=>{if(a.isUnmounted)return;Pn();const x=go(a),b=Sr(l,a,o,y);return x(),Nn(),b});return f?d.unshift(p):d.push(p),p}}const jr=o=>(l,a=Yt)=>(!kl||o==="sp")&&yl(o,(...f)=>l(...f),a),sg=jr("bm"),bl=jr("m"),ag=jr("bu"),ug=jr("u"),fg=jr("bum"),ea=jr("um"),cg=jr("sp"),dg=jr("rtg"),hg=jr("rtc");function pg(o,l=Yt){yl("ec",o,l)}function Ns(o,l,a,f){let d;const p=a&&a[f];if(Fe(o)||Tt(o)){d=new Array(o.length);for(let y=0,x=o.length;yl(y,x,void 0,p&&p[x]));else{const y=Object.keys(o);d=new Array(y.length);for(let x=0,b=y.length;xKc(l)?!(l.type===dn||l.type===Dt&&!Ec(l.children)):!0)?o:null}const Is=o=>o?Gc(o)?ia(o)||o.proxy:Is(o.parent):null,io=Ft(Object.create(null),{$:o=>o,$el:o=>o.vnode.el,$data:o=>o.data,$props:o=>o.props,$attrs:o=>o.attrs,$slots:o=>o.slots,$refs:o=>o.refs,$parent:o=>Is(o.parent),$root:o=>Is(o.root),$emit:o=>o.emit,$options:o=>ta(o),$forceUpdate:o=>o.f||(o.f=()=>{o.effect.dirty=!0,Vs(o.update)}),$nextTick:o=>o.n||(o.n=Kp.bind(o.proxy)),$watch:o=>ng.bind(o)}),ks=(o,l)=>o!==ot&&!o.__isScriptSetup&&Ge(o,l),gg={get({_:o},l){const{ctx:a,setupState:f,data:d,props:p,accessCache:y,type:x,appContext:b}=o;let L;if(l[0]!=="$"){const D=y[l];if(D!==void 0)switch(D){case 1:return f[l];case 2:return d[l];case 4:return a[l];case 3:return p[l]}else{if(ks(f,l))return y[l]=1,f[l];if(d!==ot&&Ge(d,l))return y[l]=2,d[l];if((L=o.propsOptions[0])&&Ge(L,l))return y[l]=3,p[l];if(a!==ot&&Ge(a,l))return y[l]=4,a[l];Ds&&(y[l]=0)}}const w=io[l];let P,E;if(w)return l==="$attrs"&&er(o,"get",l),w(o);if((P=x.__cssModules)&&(P=P[l]))return P;if(a!==ot&&Ge(a,l))return y[l]=4,a[l];if(E=b.config.globalProperties,Ge(E,l))return E[l]},set({_:o},l,a){const{data:f,setupState:d,ctx:p}=o;return ks(d,l)?(d[l]=a,!0):f!==ot&&Ge(f,l)?(f[l]=a,!0):Ge(o.props,l)||l[0]==="$"&&l.slice(1)in o?!1:(p[l]=a,!0)},has({_:{data:o,setupState:l,accessCache:a,ctx:f,appContext:d,propsOptions:p}},y){let x;return!!a[y]||o!==ot&&Ge(o,y)||ks(l,y)||(x=p[0])&&Ge(x,y)||Ge(f,y)||Ge(io,y)||Ge(d.config.globalProperties,y)},defineProperty(o,l,a){return a.get!=null?o._.accessCache[l]=0:Ge(a,"value")&&this.set(o,l,a.value,null),Reflect.defineProperty(o,l,a)}};function yf(o){return Fe(o)?o.reduce((l,a)=>(l[a]=null,l),{}):o}let Ds=!0;function vg(o){const l=ta(o),a=o.proxy,f=o.ctx;Ds=!1,l.beforeCreate&&bf(l.beforeCreate,o,"bc");const{data:d,computed:p,methods:y,watch:x,provide:b,inject:L,created:w,beforeMount:P,mounted:E,beforeUpdate:D,updated:X,activated:V,deactivated:W,beforeDestroy:M,beforeUnmount:S,destroyed:O,unmounted:R,render:B,renderTracked:ee,renderTriggered:fe,errorCaptured:ae,serverPrefetch:be,expose:me,inheritAttrs:ce,components:Ae,directives:j,filters:ne}=l;if(L&&mg(L,f,null),y)for(const Y in y){const le=y[Y];Re(le)&&(f[Y]=le.bind(a))}if(d){const Y=d.call(a,a);ft(Y)&&(o.data=yi(Y))}if(Ds=!0,p)for(const Y in p){const le=p[Y],Ee=Re(le)?le.bind(a,a):Re(le.get)?le.get.bind(a,a):ur,Pe=!Re(le)&&Re(le.set)?le.set.bind(a):ur,Be=Xc({get:Ee,set:Pe});Object.defineProperty(f,Y,{enumerable:!0,configurable:!0,get:()=>Be.value,set:Ze=>Be.value=Ze})}if(x)for(const Y in x)Pc(x[Y],f,a,Y);if(b){const Y=Re(b)?b.call(a):b;Reflect.ownKeys(Y).forEach(le=>{Sg(le,Y[le])})}w&&bf(w,o,"c");function re(Y,le){Fe(le)?le.forEach(Ee=>Y(Ee.bind(a))):le&&Y(le.bind(a))}if(re(sg,P),re(bl,E),re(ag,D),re(ug,X),re(ig,V),re(og,W),re(pg,ae),re(hg,ee),re(dg,fe),re(fg,S),re(ea,R),re(cg,be),Fe(me))if(me.length){const Y=o.exposed||(o.exposed={});me.forEach(le=>{Object.defineProperty(Y,le,{get:()=>a[le],set:Ee=>a[le]=Ee})})}else o.exposed||(o.exposed={});B&&o.render===ur&&(o.render=B),ce!=null&&(o.inheritAttrs=ce),Ae&&(o.components=Ae),j&&(o.directives=j)}function mg(o,l,a=ur){Fe(o)&&(o=Fs(o));for(const f in o){const d=o[f];let p;ft(d)?"default"in d?p=tl(d.from||f,d.default,!0):p=tl(d.from||f):p=tl(d),tr(p)?Object.defineProperty(l,f,{enumerable:!0,configurable:!0,get:()=>p.value,set:y=>p.value=y}):l[f]=p}}function bf(o,l,a){Sr(Fe(o)?o.map(f=>f.bind(l.proxy)):o.bind(l.proxy),l,a)}function Pc(o,l,a,f){const d=f.includes(".")?Oc(a,f):()=>a[f];if(Tt(o)){const p=l[o];Re(p)&&ro(d,p)}else if(Re(o))ro(d,o.bind(a));else if(ft(o))if(Fe(o))o.forEach(p=>Pc(p,l,a,f));else{const p=Re(o.handler)?o.handler.bind(a):l[o.handler];Re(p)&&ro(d,p,o)}}function ta(o){const l=o.type,{mixins:a,extends:f}=l,{mixins:d,optionsCache:p,config:{optionMergeStrategies:y}}=o.appContext,x=p.get(l);let b;return x?b=x:!d.length&&!a&&!f?b=l:(b={},d.length&&d.forEach(L=>ul(b,L,y,!0)),ul(b,l,y)),ft(l)&&p.set(l,b),b}function ul(o,l,a,f=!1){const{mixins:d,extends:p}=l;p&&ul(o,p,a,!0),d&&d.forEach(y=>ul(o,y,a,!0));for(const y in l)if(!(f&&y==="expose")){const x=yg[y]||a&&a[y];o[y]=x?x(o[y],l[y]):l[y]}return o}const yg={data:xf,props:wf,emits:wf,methods:eo,computed:eo,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:eo,directives:eo,watch:xg,provide:xf,inject:bg};function xf(o,l){return l?o?function(){return Ft(Re(o)?o.call(this,this):o,Re(l)?l.call(this,this):l)}:l:o}function bg(o,l){return eo(Fs(o),Fs(l))}function Fs(o){if(Fe(o)){const l={};for(let a=0;a1)return a&&Re(l)?l.call(f&&f.proxy):l}}function Cg(o,l,a,f=!1){const d={},p={};ol(p,wl,1),o.propsDefaults=Object.create(null),Ic(o,l,d,p);for(const y in o.propsOptions[0])y in d||(d[y]=void 0);a?o.props=f?d:Fp(d):o.type.props?o.props=d:o.props=p,o.attrs=p}function _g(o,l,a,f){const{props:d,attrs:p,vnode:{patchFlag:y}}=o,x=Ye(d),[b]=o.propsOptions;let L=!1;if((f||y>0)&&!(y&16)){if(y&8){const w=o.vnode.dynamicProps;for(let P=0;P{b=!0;const[E,D]=Dc(P,l,!0);Ft(y,E),D&&x.push(...D)};!a&&l.mixins.length&&l.mixins.forEach(w),o.extends&&w(o.extends),o.mixins&&o.mixins.forEach(w)}if(!p&&!b)return ft(o)&&f.set(o,ui),ui;if(Fe(p))for(let w=0;w-1,D[1]=V<0||X-1||Ge(D,"default"))&&x.push(P)}}}const L=[y,x];return ft(o)&&f.set(o,L),L}function kf(o){return o[0]!=="$"&&!to(o)}function Sf(o){return o===null?"null":typeof o=="function"?o.name||"":typeof o=="object"&&o.constructor&&o.constructor.name||""}function Cf(o,l){return Sf(o)===Sf(l)}function _f(o,l){return Fe(l)?l.findIndex(a=>Cf(a,o)):Re(l)&&Cf(l,o)?0:-1}const Fc=o=>o[0]==="_"||o==="$stable",ra=o=>Fe(o)?o.map(Ar):[Ar(o)],Tg=(o,l,a)=>{if(l._n)return l;const f=Ln((...d)=>ra(l(...d)),a);return f._c=!1,f},Hc=(o,l,a)=>{const f=o._ctx;for(const d in o){if(Fc(d))continue;const p=o[d];if(Re(p))l[d]=Tg(d,p,f);else if(p!=null){const y=ra(p);l[d]=()=>y}}},Wc=(o,l)=>{const a=ra(l);o.slots.default=()=>a},Lg=(o,l)=>{if(o.vnode.shapeFlag&32){const a=l._;a?(o.slots=Ye(l),ol(l,"_",a)):Hc(l,o.slots={})}else o.slots={},l&&Wc(o,l);ol(o.slots,wl,1)},Og=(o,l,a)=>{const{vnode:f,slots:d}=o;let p=!0,y=ot;if(f.shapeFlag&32){const x=l._;x?a&&x===1?p=!1:(Ft(d,l),!a&&x===1&&delete d._):(p=!l.$stable,Hc(l,d)),y=l}else l&&(Wc(o,l),y={default:1});if(p)for(const x in d)!Fc(x)&&y[x]==null&&delete d[x]};function Ws(o,l,a,f,d=!1){if(Fe(o)){o.forEach((E,D)=>Ws(E,l&&(Fe(l)?l[D]:l),a,f,d));return}if(no(f)&&!d)return;const p=f.shapeFlag&4?ia(f.component)||f.component.proxy:f.el,y=d?null:p,{i:x,r:b}=o,L=l&&l.r,w=x.refs===ot?x.refs={}:x.refs,P=x.setupState;if(L!=null&&L!==b&&(Tt(L)?(w[L]=null,Ge(P,L)&&(P[L]=null)):tr(L)&&(L.value=null)),Re(b))fn(b,x,12,[y,w]);else{const E=Tt(b),D=tr(b);if(E||D){const X=()=>{if(o.f){const V=E?Ge(P,b)?P[b]:w[b]:b.value;d?Fe(V)&&Ks(V,p):Fe(V)?V.includes(p)||V.push(p):E?(w[b]=[p],Ge(P,b)&&(P[b]=w[b])):(b.value=[p],o.k&&(w[o.k]=b.value))}else E?(w[b]=y,Ge(P,b)&&(P[b]=y)):D&&(b.value=y,o.k&&(w[o.k]=y))};y?(X.id=-1,Vt(X,a)):X()}}}const Vt=eg;function Mg(o){return Ag(o)}function Ag(o,l){const a=tc();a.__VUE__=!0;const{insert:f,remove:d,patchProp:p,createElement:y,createText:x,createComment:b,setText:L,setElementText:w,parentNode:P,nextSibling:E,setScopeId:D=ur,insertStaticContent:X}=o,V=(A,I,G,q=null,Z=null,ie=null,de=void 0,J=null,te=!!I.dynamicChildren)=>{if(A===I)return;A&&!Vi(A,I)&&(q=Le(A),Ze(A,Z,ie,!0),A=null),I.patchFlag===-2&&(te=!1,I.dynamicChildren=null);const{type:T,ref:z,shapeFlag:H}=I;switch(T){case xl:W(A,I,G,q);break;case dn:M(A,I,G,q);break;case rl:A==null&&S(I,G,q,de);break;case Dt:Ae(A,I,G,q,Z,ie,de,J,te);break;default:H&1?B(A,I,G,q,Z,ie,de,J,te):H&6?j(A,I,G,q,Z,ie,de,J,te):(H&64||H&128)&&T.process(A,I,G,q,Z,ie,de,J,te,Oe)}z!=null&&Z&&Ws(z,A&&A.ref,ie,I||A,!I)},W=(A,I,G,q)=>{if(A==null)f(I.el=x(I.children),G,q);else{const Z=I.el=A.el;I.children!==A.children&&L(Z,I.children)}},M=(A,I,G,q)=>{A==null?f(I.el=b(I.children||""),G,q):I.el=A.el},S=(A,I,G,q)=>{[A.el,A.anchor]=X(A.children,I,G,q,A.el,A.anchor)},O=({el:A,anchor:I},G,q)=>{let Z;for(;A&&A!==I;)Z=E(A),f(A,G,q),A=Z;f(I,G,q)},R=({el:A,anchor:I})=>{let G;for(;A&&A!==I;)G=E(A),d(A),A=G;d(I)},B=(A,I,G,q,Z,ie,de,J,te)=>{I.type==="svg"?de="svg":I.type==="math"&&(de="mathml"),A==null?ee(I,G,q,Z,ie,de,J,te):be(A,I,Z,ie,de,J,te)},ee=(A,I,G,q,Z,ie,de,J)=>{let te,T;const{props:z,shapeFlag:H,transition:ue,dirs:ke}=A;if(te=A.el=y(A.type,ie,z&&z.is,z),H&8?w(te,A.children):H&16&&ae(A.children,te,null,q,Z,Ss(A,ie),de,J),ke&&_n(A,null,q,"created"),fe(te,A,A.scopeId,de,q),z){for(const je in z)je!=="value"&&!to(je)&&p(te,je,null,z[je],ie,A.children,q,Z,Ce);"value"in z&&p(te,"value",null,z.value,ie),(T=z.onVnodeBeforeMount)&&Mr(T,q,A)}ke&&_n(A,null,q,"beforeMount");const De=Eg(Z,ue);De&&ue.beforeEnter(te),f(te,I,G),((T=z&&z.onVnodeMounted)||De||ke)&&Vt(()=>{T&&Mr(T,q,A),De&&ue.enter(te),ke&&_n(A,null,q,"mounted")},Z)},fe=(A,I,G,q,Z)=>{if(G&&D(A,G),q)for(let ie=0;ie{for(let T=te;T{const J=I.el=A.el;let{patchFlag:te,dynamicChildren:T,dirs:z}=I;te|=A.patchFlag&16;const H=A.props||ot,ue=I.props||ot;let ke;if(G&&Tn(G,!1),(ke=ue.onVnodeBeforeUpdate)&&Mr(ke,G,I,A),z&&_n(I,A,G,"beforeUpdate"),G&&Tn(G,!0),T?me(A.dynamicChildren,T,J,G,q,Ss(I,Z),ie):de||le(A,I,J,null,G,q,Ss(I,Z),ie,!1),te>0){if(te&16)ce(J,I,H,ue,G,q,Z);else if(te&2&&H.class!==ue.class&&p(J,"class",null,ue.class,Z),te&4&&p(J,"style",H.style,ue.style,Z),te&8){const De=I.dynamicProps;for(let je=0;je{ke&&Mr(ke,G,I,A),z&&_n(I,A,G,"updated")},q)},me=(A,I,G,q,Z,ie,de)=>{for(let J=0;J{if(G!==q){if(G!==ot)for(const J in G)!to(J)&&!(J in q)&&p(A,J,G[J],null,de,I.children,Z,ie,Ce);for(const J in q){if(to(J))continue;const te=q[J],T=G[J];te!==T&&J!=="value"&&p(A,J,T,te,de,I.children,Z,ie,Ce)}"value"in q&&p(A,"value",G.value,q.value,de)}},Ae=(A,I,G,q,Z,ie,de,J,te)=>{const T=I.el=A?A.el:x(""),z=I.anchor=A?A.anchor:x("");let{patchFlag:H,dynamicChildren:ue,slotScopeIds:ke}=I;ke&&(J=J?J.concat(ke):ke),A==null?(f(T,G,q),f(z,G,q),ae(I.children||[],G,z,Z,ie,de,J,te)):H>0&&H&64&&ue&&A.dynamicChildren?(me(A.dynamicChildren,ue,G,Z,ie,de,J),(I.key!=null||Z&&I===Z.subTree)&&Rc(A,I,!0)):le(A,I,G,z,Z,ie,de,J,te)},j=(A,I,G,q,Z,ie,de,J,te)=>{I.slotScopeIds=J,A==null?I.shapeFlag&512?Z.ctx.activate(I,G,q,de,te):ne(I,G,q,Z,ie,de,te):m(A,I,te)},ne=(A,I,G,q,Z,ie,de)=>{const J=A.component=Bg(A,q,Z);if(Mc(A)&&(J.ctx.renderer=Oe),Kg(J),J.asyncDep){if(Z&&Z.registerDep(J,re),!A.el){const te=J.subTree=Ct(dn);M(null,te,I,G)}}else re(J,A,I,G,Z,ie,de)},m=(A,I,G)=>{const q=I.component=A.component;if(Jp(A,I,G))if(q.asyncDep&&!q.asyncResolved){Y(q,I,G);return}else q.next=I,Up(q.update),q.effect.dirty=!0,q.update();else I.el=A.el,q.vnode=I},re=(A,I,G,q,Z,ie,de)=>{const J=()=>{if(A.isMounted){let{next:z,bu:H,u:ue,parent:ke,vnode:De}=A;{const Mt=zc(A);if(Mt){z&&(z.el=De.el,Y(A,z,de)),Mt.asyncDep.then(()=>{A.isUnmounted||J()});return}}let je=z,Ke;Tn(A,!1),z?(z.el=De.el,Y(A,z,de)):z=De,H&&bs(H),(Ke=z.props&&z.props.onVnodeBeforeUpdate)&&Mr(Ke,ke,z,De),Tn(A,!0);const We=ws(A),vt=A.subTree;A.subTree=We,V(vt,We,P(vt.el),Le(vt),A,Z,ie),z.el=We.el,je===null&&Zp(A,We.el),ue&&Vt(ue,Z),(Ke=z.props&&z.props.onVnodeUpdated)&&Vt(()=>Mr(Ke,ke,z,De),Z)}else{let z;const{el:H,props:ue}=I,{bm:ke,m:De,parent:je}=A,Ke=no(I);if(Tn(A,!1),ke&&bs(ke),!Ke&&(z=ue&&ue.onVnodeBeforeMount)&&Mr(z,je,I),Tn(A,!0),H&&ct){const We=()=>{A.subTree=ws(A),ct(H,A.subTree,A,Z,null)};Ke?I.type.__asyncLoader().then(()=>!A.isUnmounted&&We()):We()}else{const We=A.subTree=ws(A);V(null,We,G,q,A,Z,ie),I.el=We.el}if(De&&Vt(De,Z),!Ke&&(z=ue&&ue.onVnodeMounted)){const We=I;Vt(()=>Mr(z,je,We),Z)}(I.shapeFlag&256||je&&no(je.vnode)&&je.vnode.shapeFlag&256)&&A.a&&Vt(A.a,Z),A.isMounted=!0,I=G=q=null}},te=A.effect=new Us(J,ur,()=>Vs(T),A.scope),T=A.update=()=>{te.dirty&&te.run()};T.id=A.uid,Tn(A,!0),T()},Y=(A,I,G)=>{I.component=A;const q=A.vnode.props;A.vnode=I,A.next=null,_g(A,I.props,q,G),Og(A,I.children,G),Pn(),pf(A),Nn()},le=(A,I,G,q,Z,ie,de,J,te=!1)=>{const T=A&&A.children,z=A?A.shapeFlag:0,H=I.children,{patchFlag:ue,shapeFlag:ke}=I;if(ue>0){if(ue&128){Pe(T,H,G,q,Z,ie,de,J,te);return}else if(ue&256){Ee(T,H,G,q,Z,ie,de,J,te);return}}ke&8?(z&16&&Ce(T,Z,ie),H!==T&&w(G,H)):z&16?ke&16?Pe(T,H,G,q,Z,ie,de,J,te):Ce(T,Z,ie,!0):(z&8&&w(G,""),ke&16&&ae(H,G,q,Z,ie,de,J,te))},Ee=(A,I,G,q,Z,ie,de,J,te)=>{A=A||ui,I=I||ui;const T=A.length,z=I.length,H=Math.min(T,z);let ue;for(ue=0;uez?Ce(A,Z,ie,!0,!1,H):ae(I,G,q,Z,ie,de,J,te,H)},Pe=(A,I,G,q,Z,ie,de,J,te)=>{let T=0;const z=I.length;let H=A.length-1,ue=z-1;for(;T<=H&&T<=ue;){const ke=A[T],De=I[T]=te?ln(I[T]):Ar(I[T]);if(Vi(ke,De))V(ke,De,G,null,Z,ie,de,J,te);else break;T++}for(;T<=H&&T<=ue;){const ke=A[H],De=I[ue]=te?ln(I[ue]):Ar(I[ue]);if(Vi(ke,De))V(ke,De,G,null,Z,ie,de,J,te);else break;H--,ue--}if(T>H){if(T<=ue){const ke=ue+1,De=keue)for(;T<=H;)Ze(A[T],Z,ie,!0),T++;else{const ke=T,De=T,je=new Map;for(T=De;T<=ue;T++){const At=I[T]=te?ln(I[T]):Ar(I[T]);At.key!=null&&je.set(At.key,T)}let Ke,We=0;const vt=ue-De+1;let Mt=!1,fr=0;const nr=new Array(vt);for(T=0;T=vt){Ze(At,Z,ie,!0);continue}let Me;if(At.key!=null)Me=je.get(At.key);else for(Ke=De;Ke<=ue;Ke++)if(nr[Ke-De]===0&&Vi(At,I[Ke])){Me=Ke;break}Me===void 0?Ze(At,Z,ie,!0):(nr[Me-De]=T+1,Me>=fr?fr=Me:Mt=!0,V(At,I[Me],G,null,Z,ie,de,J,te),We++)}const cr=Mt?Pg(nr):ui;for(Ke=cr.length-1,T=vt-1;T>=0;T--){const At=De+T,Me=I[At],hn=At+1{const{el:ie,type:de,transition:J,children:te,shapeFlag:T}=A;if(T&6){Be(A.component.subTree,I,G,q);return}if(T&128){A.suspense.move(I,G,q);return}if(T&64){de.move(A,I,G,Oe);return}if(de===Dt){f(ie,I,G);for(let H=0;HJ.enter(ie),Z);else{const{leave:H,delayLeave:ue,afterLeave:ke}=J,De=()=>f(ie,I,G),je=()=>{H(ie,()=>{De(),ke&&ke()})};ue?ue(ie,De,je):je()}else f(ie,I,G)},Ze=(A,I,G,q=!1,Z=!1)=>{const{type:ie,props:de,ref:J,children:te,dynamicChildren:T,shapeFlag:z,patchFlag:H,dirs:ue}=A;if(J!=null&&Ws(J,null,G,A,!0),z&256){I.ctx.deactivate(A);return}const ke=z&1&&ue,De=!no(A);let je;if(De&&(je=de&&de.onVnodeBeforeUnmount)&&Mr(je,I,A),z&6)Ve(A.component,G,q);else{if(z&128){A.suspense.unmount(G,q);return}ke&&_n(A,null,I,"beforeUnmount"),z&64?A.type.remove(A,I,G,Z,Oe,q):T&&(ie!==Dt||H>0&&H&64)?Ce(T,I,G,!1,!0):(ie===Dt&&H&384||!Z&&z&16)&&Ce(te,I,G),q&&Je(A)}(De&&(je=de&&de.onVnodeUnmounted)||ke)&&Vt(()=>{je&&Mr(je,I,A),ke&&_n(A,null,I,"unmounted")},G)},Je=A=>{const{type:I,el:G,anchor:q,transition:Z}=A;if(I===Dt){ht(G,q);return}if(I===rl){R(A);return}const ie=()=>{d(G),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(A.shapeFlag&1&&Z&&!Z.persisted){const{leave:de,delayLeave:J}=Z,te=()=>de(G,ie);J?J(A.el,ie,te):te()}else ie()},ht=(A,I)=>{let G;for(;A!==I;)G=E(A),d(A),A=G;d(I)},Ve=(A,I,G)=>{const{bum:q,scope:Z,update:ie,subTree:de,um:J}=A;q&&bs(q),Z.stop(),ie&&(ie.active=!1,Ze(de,A,I,G)),J&&Vt(J,I),Vt(()=>{A.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Ce=(A,I,G,q=!1,Z=!1,ie=0)=>{for(let de=ie;deA.shapeFlag&6?Le(A.component.subTree):A.shapeFlag&128?A.suspense.next():E(A.anchor||A.el);let Ne=!1;const ze=(A,I,G)=>{A==null?I._vnode&&Ze(I._vnode,null,null,!0):V(I._vnode||null,A,I,null,null,null,G),Ne||(Ne=!0,pf(),Sc(),Ne=!1),I._vnode=A},Oe={p:V,um:Ze,m:Be,r:Je,mt:ne,mc:ae,pc:le,pbc:me,n:Le,o};let xe,ct;return l&&([xe,ct]=l(Oe)),{render:ze,hydrate:xe,createApp:kg(ze,xe)}}function Ss({type:o,props:l},a){return a==="svg"&&o==="foreignObject"||a==="mathml"&&o==="annotation-xml"&&l&&l.encoding&&l.encoding.includes("html")?void 0:a}function Tn({effect:o,update:l},a){o.allowRecurse=l.allowRecurse=a}function Eg(o,l){return(!o||o&&!o.pendingBranch)&&l&&!l.persisted}function Rc(o,l,a=!1){const f=o.children,d=l.children;if(Fe(f)&&Fe(d))for(let p=0;p>1,o[a[x]]0&&(l[f]=a[p-1]),a[p]=f)}}for(p=a.length,y=a[p-1];p-- >0;)a[p]=y,y=l[y];return a}function zc(o){const l=o.subTree.component;if(l)return l.asyncDep&&!l.asyncResolved?l:zc(l)}const Ng=o=>o.__isTeleport,Dt=Symbol.for("v-fgt"),xl=Symbol.for("v-txt"),dn=Symbol.for("v-cmt"),rl=Symbol.for("v-stc"),lo=[];let kr=null;function nt(o=!1){lo.push(kr=o?null:[])}function Ig(){lo.pop(),kr=lo[lo.length-1]||null}let ho=1;function Tf(o){ho+=o}function Bc(o){return o.dynamicChildren=ho>0?kr||ui:null,Ig(),ho>0&&kr&&kr.push(o),o}function Ot(o,l,a,f,d,p){return Bc(et(o,l,a,f,d,p,!0))}function En(o,l,a,f,d){return Bc(Ct(o,l,a,f,d,!0))}function Kc(o){return o?o.__v_isVNode===!0:!1}function Vi(o,l){return o.type===l.type&&o.key===l.key}const wl="__vInternal",jc=({key:o})=>o??null,nl=({ref:o,ref_key:l,ref_for:a})=>(typeof o=="number"&&(o=""+o),o!=null?Tt(o)||tr(o)||Re(o)?{i:Qt,r:o,k:l,f:!!a}:o:null);function et(o,l=null,a=null,f=0,d=null,p=o===Dt?0:1,y=!1,x=!1){const b={__v_isVNode:!0,__v_skip:!0,type:o,props:l,key:l&&jc(l),ref:l&&nl(l),scopeId:ml,slotScopeIds:null,children:a,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:p,patchFlag:f,dynamicProps:d,dynamicChildren:null,appContext:null,ctx:Qt};return x?(na(b,a),p&128&&o.normalize(b)):a&&(b.shapeFlag|=Tt(a)?8:16),ho>0&&!y&&kr&&(b.patchFlag>0||p&6)&&b.patchFlag!==32&&kr.push(b),b}const Ct=Dg;function Dg(o,l=null,a=null,f=0,d=null,p=!1){if((!o||o===Vp)&&(o=dn),Kc(o)){const x=gi(o,l,!0);return a&&na(x,a),ho>0&&!p&&kr&&(x.shapeFlag&6?kr[kr.indexOf(o)]=x:kr.push(x)),x.patchFlag|=-2,x}if(qg(o)&&(o=o.__vccOpts),l){l=Fg(l);let{class:x,style:b}=l;x&&!Tt(x)&&(l.class=Br(x)),ft(b)&&(vc(b)&&!Fe(b)&&(b=Ft({},b)),l.style=ao(b))}const y=Tt(o)?1:Qp(o)?128:Ng(o)?64:ft(o)?4:Re(o)?2:0;return et(o,l,a,f,d,y,p,!0)}function Fg(o){return o?vc(o)||wl in o?Ft({},o):o:null}function gi(o,l,a=!1){const{props:f,ref:d,patchFlag:p,children:y}=o,x=l?Wg(f||{},l):f;return{__v_isVNode:!0,__v_skip:!0,type:o.type,props:x,key:x&&jc(x),ref:l&&l.ref?a&&d?Fe(d)?d.concat(nl(l)):[d,nl(l)]:nl(l):d,scopeId:o.scopeId,slotScopeIds:o.slotScopeIds,children:y,target:o.target,targetAnchor:o.targetAnchor,staticCount:o.staticCount,shapeFlag:o.shapeFlag,patchFlag:l&&o.type!==Dt?p===-1?16:p|16:p,dynamicProps:o.dynamicProps,dynamicChildren:o.dynamicChildren,appContext:o.appContext,dirs:o.dirs,transition:o.transition,component:o.component,suspense:o.suspense,ssContent:o.ssContent&&gi(o.ssContent),ssFallback:o.ssFallback&&gi(o.ssFallback),el:o.el,anchor:o.anchor,ctx:o.ctx,ce:o.ce}}function Hg(o=" ",l=0){return Ct(xl,null,o,l)}function Uc(o,l){const a=Ct(rl,null,o);return a.staticCount=l,a}function so(o="",l=!1){return l?(nt(),En(dn,null,o)):Ct(dn,null,o)}function Ar(o){return o==null||typeof o=="boolean"?Ct(dn):Fe(o)?Ct(Dt,null,o.slice()):typeof o=="object"?ln(o):Ct(xl,null,String(o))}function ln(o){return o.el===null&&o.patchFlag!==-1||o.memo?o:gi(o)}function na(o,l){let a=0;const{shapeFlag:f}=o;if(l==null)l=null;else if(Fe(l))a=16;else if(typeof l=="object")if(f&65){const d=l.default;d&&(d._c&&(d._d=!1),na(o,d()),d._c&&(d._d=!0));return}else{a=32;const d=l._;!d&&!(wl in l)?l._ctx=Qt:d===3&&Qt&&(Qt.slots._===1?l._=1:(l._=2,o.patchFlag|=1024))}else Re(l)?(l={default:l,_ctx:Qt},a=32):(l=String(l),f&64?(a=16,l=[Hg(l)]):a=8);o.children=l,o.shapeFlag|=a}function Wg(...o){const l={};for(let a=0;a{let d;return(d=o[a])||(d=o[a]=[]),d.push(f),p=>{d.length>1?d.forEach(y=>y(p)):d[0](p)}};fl=l("__VUE_INSTANCE_SETTERS__",a=>Yt=a),Rs=l("__VUE_SSR_SETTERS__",a=>kl=a)}const go=o=>{const l=Yt;return fl(o),o.scope.on(),()=>{o.scope.off(),fl(l)}},Lf=()=>{Yt&&Yt.scope.off(),fl(null)};function Gc(o){return o.vnode.shapeFlag&4}let kl=!1;function Kg(o,l=!1){l&&Rs(l);const{props:a,children:f}=o.vnode,d=Gc(o);Cg(o,a,d,l),Lg(o,f);const p=d?jg(o,l):void 0;return l&&Rs(!1),p}function jg(o,l){const a=o.type;o.accessCache=Object.create(null),o.proxy=mc(new Proxy(o.ctx,gg));const{setup:f}=a;if(f){const d=o.setupContext=f.length>1?Gg(o):null,p=go(o);Pn();const y=fn(f,o,0,[o.props,d]);if(Nn(),p(),Zf(y)){if(y.then(Lf,Lf),l)return y.then(x=>{Of(o,x,l)}).catch(x=>{gl(x,o,0)});o.asyncDep=y}else Of(o,y,l)}else qc(o,l)}function Of(o,l,a){Re(l)?o.type.__ssrInlineRender?o.ssrRender=l:o.render=l:ft(l)&&(o.setupState=xc(l)),qc(o,a)}let Mf;function qc(o,l,a){const f=o.type;if(!o.render){if(!l&&Mf&&!f.render){const d=f.template||ta(o).template;if(d){const{isCustomElement:p,compilerOptions:y}=o.appContext.config,{delimiters:x,compilerOptions:b}=f,L=Ft(Ft({isCustomElement:p,delimiters:x},y),b);f.render=Mf(d,L)}}o.render=f.render||ur}{const d=go(o);Pn();try{vg(o)}finally{Nn(),d()}}}function Ug(o){return o.attrsProxy||(o.attrsProxy=new Proxy(o.attrs,{get(l,a){return er(o,"get","$attrs"),l[a]}}))}function Gg(o){const l=a=>{o.exposed=a||{}};return{get attrs(){return Ug(o)},slots:o.slots,emit:o.emit,expose:l}}function ia(o){if(o.exposed)return o.exposeProxy||(o.exposeProxy=new Proxy(xc(mc(o.exposed)),{get(l,a){if(a in l)return l[a];if(a in io)return io[a](o)},has(l,a){return a in l||a in io}}))}function qg(o){return Re(o)&&"__vccOpts"in o}const Xc=(o,l)=>Hp(o,l,kl),Xg="3.4.21";/** * @vue/runtime-dom v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const qg="http://www.w3.org/2000/svg",Xg="http://www.w3.org/1998/Math/MathML",sn=typeof document<"u"?document:null,Ef=sn&&sn.createElement("template"),Yg={insert:(o,l,a)=>{l.insertBefore(o,a||null)},remove:o=>{const l=o.parentNode;l&&l.removeChild(o)},createElement:(o,l,a,f)=>{const d=l==="svg"?sn.createElementNS(qg,o):l==="mathml"?sn.createElementNS(Xg,o):sn.createElement(o,a?{is:a}:void 0);return o==="select"&&f&&f.multiple!=null&&d.setAttribute("multiple",f.multiple),d},createText:o=>sn.createTextNode(o),createComment:o=>sn.createComment(o),setText:(o,l)=>{o.nodeValue=l},setElementText:(o,l)=>{o.textContent=l},parentNode:o=>o.parentNode,nextSibling:o=>o.nextSibling,querySelector:o=>sn.querySelector(o),setScopeId(o,l){o.setAttribute(l,"")},insertStaticContent(o,l,a,f,d,p){const y=a?a.previousSibling:l.lastChild;if(d&&(d===p||d.nextSibling))for(;l.insertBefore(d.cloneNode(!0),a),!(d===p||!(d=d.nextSibling)););else{Ef.innerHTML=f==="svg"?`${o}`:f==="mathml"?`${o}`:o;const x=Ef.content;if(f==="svg"||f==="mathml"){const b=x.firstChild;for(;b.firstChild;)x.appendChild(b.firstChild);x.removeChild(b)}l.insertBefore(x,a)}return[y?y.nextSibling:l.firstChild,a?a.previousSibling:l.lastChild]}},$g=Symbol("_vtc");function Jg(o,l,a){const f=o[$g];f&&(l=(l?[l,...f]:[...f]).join(" ")),l==null?o.removeAttribute("class"):a?o.setAttribute("class",l):o.className=l}const Pf=Symbol("_vod"),Zg=Symbol("_vsh"),Vg=Symbol(""),Qg=/(^|;)\s*display\s*:/;function ev(o,l,a){const f=o.style,d=Tt(a);let p=!1;if(a&&!d){if(l)if(Tt(l))for(const y of l.split(";")){const x=y.slice(0,y.indexOf(":")).trim();a[x]==null&&il(f,x,"")}else for(const y in l)a[y]==null&&il(f,y,"");for(const y in a)y==="display"&&(p=!0),il(f,y,a[y])}else if(d){if(l!==a){const y=f[Vg];y&&(a+=";"+y),f.cssText=a,p=Qg.test(a)}}else l&&o.removeAttribute("style");Pf in o&&(o[Pf]=p?f.display:"",o[Zg]&&(f.display="none"))}const Nf=/\s*!important$/;function il(o,l,a){if(Fe(a))a.forEach(f=>il(o,l,f));else if(a==null&&(a=""),l.startsWith("--"))o.setProperty(l,a);else{const f=tv(o,l);Nf.test(a)?o.setProperty(mi(f),a.replace(Nf,""),"important"):o[f]=a}}const If=["Webkit","Moz","ms"],Cs={};function tv(o,l){const a=Cs[l];if(a)return a;let f=hi(l);if(f!=="filter"&&f in o)return Cs[l]=f;f=ec(f);for(let d=0;d_s||(av.then(()=>_s=0),_s=Date.now());function fv(o,l){const a=f=>{if(!f._vts)f._vts=Date.now();else if(f._vts<=a.attached)return;Sr(cv(f,a.value),l,5,[f])};return a.value=o,a.attached=uv(),a}function cv(o,l){if(Fe(l)){const a=o.stopImmediatePropagation;return o.stopImmediatePropagation=()=>{a.call(o),o._stopped=!0},l.map(f=>d=>!d._stopped&&f&&f(d))}else return l}const Wf=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o.charCodeAt(2)>96&&o.charCodeAt(2)<123,dv=(o,l,a,f,d,p,y,x,b)=>{const L=d==="svg";l==="class"?Jg(o,f,L):l==="style"?ev(o,a,f):cl(l)?Ks(l)||lv(o,l,a,f,y):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):hv(o,l,f,L))?nv(o,l,f,p,y,x,b):(l==="true-value"?o._trueValue=f:l==="false-value"&&(o._falseValue=f),rv(o,l,f,L))};function hv(o,l,a,f){if(f)return!!(l==="innerHTML"||l==="textContent"||l in o&&Wf(l)&&Re(a));if(l==="spellcheck"||l==="draggable"||l==="translate"||l==="form"||l==="list"&&o.tagName==="INPUT"||l==="type"&&o.tagName==="TEXTAREA")return!1;if(l==="width"||l==="height"){const d=o.tagName;if(d==="IMG"||d==="VIDEO"||d==="CANVAS"||d==="SOURCE")return!1}return Wf(l)&&Tt(a)?!1:l in o}const pv=["ctrl","shift","alt","meta"],gv={stop:o=>o.stopPropagation(),prevent:o=>o.preventDefault(),self:o=>o.target!==o.currentTarget,ctrl:o=>!o.ctrlKey,shift:o=>!o.shiftKey,alt:o=>!o.altKey,meta:o=>!o.metaKey,left:o=>"button"in o&&o.button!==0,middle:o=>"button"in o&&o.button!==1,right:o=>"button"in o&&o.button!==2,exact:(o,l)=>pv.some(a=>o[`${a}Key`]&&!l.includes(a))},Yc=(o,l)=>{const a=o._withMods||(o._withMods={}),f=l.join(".");return a[f]||(a[f]=(d,...p)=>{for(let y=0;y{const l=mv().createApp(...o),{mount:a}=l;return l.mount=f=>{const d=xv(f);if(!d)return;const p=l._component;!Re(p)&&!p.render&&!p.template&&(p.template=d.innerHTML),d.innerHTML="";const y=a(d,!1,bv(d));return d instanceof Element&&(d.removeAttribute("v-cloak"),d.setAttribute("data-v-app","")),y},l};function bv(o){if(o instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&o instanceof MathMLElement)return"mathml"}function xv(o){return Tt(o)?document.querySelector(o):o}const wv=Kr({__name:"box",props:{defaultSplit:{type:Number,default:50}},setup(o){const l=o,{defaultSplit:a}=l,f=un(),d=yi({dragging:!1,split:a});function p(){const{split:P}=d;return P<10?10:P>90?90:P}let y=0,x=0;function b(P){d.dragging=!0,y=P.pageX,x=p()}function L(P){if(d.dragging){const E=P.pageX,D=f.value.offsetWidth,X=E-y;d.split=x+~~(X/D*100)}}function w(){d.dragging=!1}return(P,E)=>(nt(),Ot("div",{ref_key:"container",ref:f,class:Br(["split-box",{dragging:d.dragging}]),onMousemove:L,onMouseup:w,onMouseleave:w},[et("div",{class:"left",style:ao({width:p()+"%"})},[yf(P.$slots,"left",{},void 0,!0),et("div",{class:"dragger",onMousedown:Yc(b,["prevent"])},null,32)],4),et("div",{class:"right",style:ao({width:100-p()+"%"})},[yf(P.$slots,"right",{},void 0,!0)],4)],34))}}),bi=(o,l)=>{const a=o.__vccOpts||o;for(const[f,d]of l)a[f]=d;return a},Ts=bi(wv,[["__scopeId","data-v-5e3e45fd"]]),la=o=>(Tc("data-v-cceb445f"),o=o(),Lc(),o),kv=la(()=>et("h1",null,[et("span",{class:"text-important"},"iDraw"),et("span",{class:"text"},"Playground")],-1)),Sv={class:"links"},Cv=la(()=>et("a",{class:"link-item",target:"_blank",href:"https://www.github.com/idrawjs/idraw"},[et("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2396",width:"100",height:"100"},[et("path",{d:"M512 12.64c-282.752 0-512 229.216-512 512 0 226.208 146.72 418.144 350.144 485.824 25.6 4.736 35.008-11.104 35.008-24.64 0-12.192-0.48-52.544-0.704-95.328-142.464 30.976-172.512-60.416-172.512-60.416-23.296-59.168-56.832-74.912-56.832-74.912-46.464-31.776 3.52-31.136 3.52-31.136 51.392 3.616 78.464 52.768 78.464 52.768 45.664 78.272 119.776 55.648 148.992 42.56 4.576-33.088 17.856-55.68 32.512-68.48-113.728-12.928-233.28-56.864-233.28-253.024 0-55.904 20-101.568 52.768-137.44-5.312-12.896-22.848-64.96 4.96-135.488 0 0 43.008-13.76 140.832 52.48 40.832-11.36 84.64-17.024 128.16-17.248 43.488 0.192 87.328 5.888 128.256 17.248 97.728-66.24 140.64-52.48 140.64-52.48 27.872 70.528 10.336 122.592 5.024 135.488 32.832 35.84 52.704 81.536 52.704 137.44 0 196.64-119.776 239.936-233.792 252.64 18.368 15.904 34.72 47.04 34.72 94.816 0 68.512-0.608 123.648-0.608 140.512 0 13.632 9.216 29.6 35.168 24.576 203.328-67.776 349.856-259.616 349.856-485.76 0-282.784-229.248-512-512-512z",fill:"#3c6ea8"})])],-1)),_v=la(()=>et("li",null,[et("a",null,"v0.x")],-1)),Tv=[_v],Lv=Kr({__name:"nav",setup(o){const l=un("@0.x"),a=un(!1);async function f(){a.value=!a.value}return bl(async()=>{window.addEventListener("click",()=>{a.value=!1})}),(d,p)=>(nt(),Ot("nav",null,[kv,et("div",Sv,[Cv,et("div",{class:"version-selector",onClick:p[0]||(p[0]=Yc(()=>{},["stop"]))},[et("span",{class:"active-version",onClick:f}," Version: "+ll(l.value),1),et("ul",{class:Br(["versions",{expanded:a.value}])},Tv,2)])])]))}}),Ov=bi(Lv,[["__scopeId","data-v-cceb445f"]]);var Mv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Av(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ls={exports:{}},zf;function rr(){return zf||(zf=1,function(o,l){(function(a,f){o.exports=f()})(Mv,function(){var a=navigator.userAgent,f=navigator.platform,d=/gecko\/\d/i.test(a),p=/MSIE \d/.test(a),y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),x=/Edge\/(\d+)/.exec(a),b=p||y||x,L=b&&(p?document.documentMode||6:+(x||y)[1]),w=!x&&/WebKit\//.test(a),P=w&&/Qt\/\d+\.\d+/.test(a),E=!x&&/Chrome\/(\d+)/.exec(a),D=E&&+E[1],X=/Opera\//.test(a),V=/Apple Computer/.test(navigator.vendor),W=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(a),M=/PhantomJS/.test(a),S=V&&(/Mobile\/\w+/.test(a)||navigator.maxTouchPoints>2),O=/Android/.test(a),R=S||O||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(a),B=S||/Mac/.test(f),ee=/\bCrOS\b/.test(a),fe=/win/i.test(f),ae=X&&a.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(X=!1,w=!0);var be=B&&(P||X&&(ae==null||ae<12.11)),me=d||b&&L>=9;function ce(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ae=function(e,t){var n=e.className,r=ce(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ne(e,t){return j(e).appendChild(t)}function m(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var s=0;s=t)return u+(t-s);u+=c-s,u+=n-u%n,s=c+1}}var Oe=function(){this.id=null,this.f=null,this.time=0,this.handler=Le(this.onTimeout,this)};Oe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Oe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(u,t-i);if(i+=s-r,i+=n-i%n,r=s+1,i>=t)return r}}var ie=[""];function de(e){for(;ie.length<=e;)ie.push(J(ie)+" ");return ie[e]}function J(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&ke(e)?!0:t.test(e):ke(e)}function je(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ke=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function We(e){return e.charCodeAt(0)>=768&&Ke.test(e)}function vt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,s=r<0?Math.ceil(i):Math.floor(i);if(s==t)return e(s)?t:n;e(s)?n=s:t=s+r}}function fr(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,s=0;st||t==n&&u.to==t)&&(r(Math.max(u.from,t),Math.min(u.to,n),u.level==1?"rtl":"ltr",s),i=!0)}i||r(t,n,"ltr")}var nr=null;function cr(e,t,n){var r;nr=null;for(var i=0;it)return i;s.to==t&&(s.from!=s.to&&n=="before"?r=i:nr=i),s.from==t&&(s.from!=s.to&&n!="before"?r=i:nr=i)}return r??nr}var At=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,u=/[Lb1n]/,c=/[1n]/;function h(g,k,_){this.level=g,this.from=k,this.to=_}return function(g,k){var _=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!r.test(g))return!1;for(var F=g.length,N=[],U=0;U-1&&(r[t]=i.slice(0,s).concat(i.slice(s+1)))}}}function lt(e,t){var n=Pr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function dr(e){e.prototype.on=function(t,n){_e(this,t,n)},e.prototype.off=function(t,n){Et(this,t,n)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function In(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ur(e){Pt(e),In(e)}function xi(e){return e.target||e.srcElement}function hr(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var Sl=function(){if(b&&L<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),Dn;function vo(e){if(Dn==null){var t=m("span","​");ne(e,m("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dn=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&L<8))}var n=Dn?m("span","​"):m("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var wi;function Gr(e){if(wi!=null)return wi;var t=ne(e,document.createTextNode("AخA")),n=Y(t,0,1).getBoundingClientRect(),r=Y(t,1,2).getBoundingClientRect();return j(e),!n||n.left==n.right?!1:wi=r.right-n.right<3}var sr=` +**/const Yg="http://www.w3.org/2000/svg",$g="http://www.w3.org/1998/Math/MathML",sn=typeof document<"u"?document:null,Af=sn&&sn.createElement("template"),Jg={insert:(o,l,a)=>{l.insertBefore(o,a||null)},remove:o=>{const l=o.parentNode;l&&l.removeChild(o)},createElement:(o,l,a,f)=>{const d=l==="svg"?sn.createElementNS(Yg,o):l==="mathml"?sn.createElementNS($g,o):sn.createElement(o,a?{is:a}:void 0);return o==="select"&&f&&f.multiple!=null&&d.setAttribute("multiple",f.multiple),d},createText:o=>sn.createTextNode(o),createComment:o=>sn.createComment(o),setText:(o,l)=>{o.nodeValue=l},setElementText:(o,l)=>{o.textContent=l},parentNode:o=>o.parentNode,nextSibling:o=>o.nextSibling,querySelector:o=>sn.querySelector(o),setScopeId(o,l){o.setAttribute(l,"")},insertStaticContent(o,l,a,f,d,p){const y=a?a.previousSibling:l.lastChild;if(d&&(d===p||d.nextSibling))for(;l.insertBefore(d.cloneNode(!0),a),!(d===p||!(d=d.nextSibling)););else{Af.innerHTML=f==="svg"?`${o}`:f==="mathml"?`${o}`:o;const x=Af.content;if(f==="svg"||f==="mathml"){const b=x.firstChild;for(;b.firstChild;)x.appendChild(b.firstChild);x.removeChild(b)}l.insertBefore(x,a)}return[y?y.nextSibling:l.firstChild,a?a.previousSibling:l.lastChild]}},Zg=Symbol("_vtc");function Vg(o,l,a){const f=o[Zg];f&&(l=(l?[l,...f]:[...f]).join(" ")),l==null?o.removeAttribute("class"):a?o.setAttribute("class",l):o.className=l}const Ef=Symbol("_vod"),Qg=Symbol("_vsh"),ev=Symbol(""),tv=/(^|;)\s*display\s*:/;function rv(o,l,a){const f=o.style,d=Tt(a);let p=!1;if(a&&!d){if(l)if(Tt(l))for(const y of l.split(";")){const x=y.slice(0,y.indexOf(":")).trim();a[x]==null&&il(f,x,"")}else for(const y in l)a[y]==null&&il(f,y,"");for(const y in a)y==="display"&&(p=!0),il(f,y,a[y])}else if(d){if(l!==a){const y=f[ev];y&&(a+=";"+y),f.cssText=a,p=tv.test(a)}}else l&&o.removeAttribute("style");Ef in o&&(o[Ef]=p?f.display:"",o[Qg]&&(f.display="none"))}const Pf=/\s*!important$/;function il(o,l,a){if(Fe(a))a.forEach(f=>il(o,l,f));else if(a==null&&(a=""),l.startsWith("--"))o.setProperty(l,a);else{const f=nv(o,l);Pf.test(a)?o.setProperty(mi(f),a.replace(Pf,""),"important"):o[f]=a}}const Nf=["Webkit","Moz","ms"],Cs={};function nv(o,l){const a=Cs[l];if(a)return a;let f=hi(l);if(f!=="filter"&&f in o)return Cs[l]=f;f=ec(f);for(let d=0;d_s||(fv.then(()=>_s=0),_s=Date.now());function dv(o,l){const a=f=>{if(!f._vts)f._vts=Date.now();else if(f._vts<=a.attached)return;Sr(hv(f,a.value),l,5,[f])};return a.value=o,a.attached=cv(),a}function hv(o,l){if(Fe(l)){const a=o.stopImmediatePropagation;return o.stopImmediatePropagation=()=>{a.call(o),o._stopped=!0},l.map(f=>d=>!d._stopped&&f&&f(d))}else return l}const Hf=o=>o.charCodeAt(0)===111&&o.charCodeAt(1)===110&&o.charCodeAt(2)>96&&o.charCodeAt(2)<123,pv=(o,l,a,f,d,p,y,x,b)=>{const L=d==="svg";l==="class"?Vg(o,f,L):l==="style"?rv(o,a,f):cl(l)?Bs(l)||av(o,l,a,f,y):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):gv(o,l,f,L))?ov(o,l,f,p,y,x,b):(l==="true-value"?o._trueValue=f:l==="false-value"&&(o._falseValue=f),iv(o,l,f,L))};function gv(o,l,a,f){if(f)return!!(l==="innerHTML"||l==="textContent"||l in o&&Hf(l)&&Re(a));if(l==="spellcheck"||l==="draggable"||l==="translate"||l==="form"||l==="list"&&o.tagName==="INPUT"||l==="type"&&o.tagName==="TEXTAREA")return!1;if(l==="width"||l==="height"){const d=o.tagName;if(d==="IMG"||d==="VIDEO"||d==="CANVAS"||d==="SOURCE")return!1}return Hf(l)&&Tt(a)?!1:l in o}const vv=["ctrl","shift","alt","meta"],mv={stop:o=>o.stopPropagation(),prevent:o=>o.preventDefault(),self:o=>o.target!==o.currentTarget,ctrl:o=>!o.ctrlKey,shift:o=>!o.shiftKey,alt:o=>!o.altKey,meta:o=>!o.metaKey,left:o=>"button"in o&&o.button!==0,middle:o=>"button"in o&&o.button!==1,right:o=>"button"in o&&o.button!==2,exact:(o,l)=>vv.some(a=>o[`${a}Key`]&&!l.includes(a))},Yc=(o,l)=>{const a=o._withMods||(o._withMods={}),f=l.join(".");return a[f]||(a[f]=(d,...p)=>{for(let y=0;y{const l=bv().createApp(...o),{mount:a}=l;return l.mount=f=>{const d=kv(f);if(!d)return;const p=l._component;!Re(p)&&!p.render&&!p.template&&(p.template=d.innerHTML),d.innerHTML="";const y=a(d,!1,wv(d));return d instanceof Element&&(d.removeAttribute("v-cloak"),d.setAttribute("data-v-app","")),y},l};function wv(o){if(o instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&o instanceof MathMLElement)return"mathml"}function kv(o){return Tt(o)?document.querySelector(o):o}const Sv=Kr({__name:"box",props:{defaultSplit:{type:Number,default:50}},setup(o){const l=o,{defaultSplit:a}=l,f=un(),d=yi({dragging:!1,split:a});function p(){const{split:P}=d;return P<10?10:P>90?90:P}let y=0,x=0;function b(P){d.dragging=!0,y=P.pageX,x=p()}function L(P){if(d.dragging){const E=P.pageX,D=f.value.offsetWidth,X=E-y;d.split=x+~~(X/D*100)}}function w(){d.dragging=!1}return(P,E)=>(nt(),Ot("div",{ref_key:"container",ref:f,class:Br(["split-box",{dragging:d.dragging}]),onMousemove:L,onMouseup:w,onMouseleave:w},[et("div",{class:"left",style:ao({width:p()+"%"})},[mf(P.$slots,"left",{},void 0,!0),et("div",{class:"dragger",onMousedown:Yc(b,["prevent"])},null,32)],4),et("div",{class:"right",style:ao({width:100-p()+"%"})},[mf(P.$slots,"right",{},void 0,!0)],4)],34))}}),bi=(o,l)=>{const a=o.__vccOpts||o;for(const[f,d]of l)a[f]=d;return a},Ts=bi(Sv,[["__scopeId","data-v-5e3e45fd"]]),oa=o=>(Tc("data-v-cceb445f"),o=o(),Lc(),o),Cv=oa(()=>et("h1",null,[et("span",{class:"text-important"},"iDraw"),et("span",{class:"text"},"Playground")],-1)),_v={class:"links"},Tv=oa(()=>et("a",{class:"link-item",target:"_blank",href:"https://www.github.com/idrawjs/idraw"},[et("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2396",width:"100",height:"100"},[et("path",{d:"M512 12.64c-282.752 0-512 229.216-512 512 0 226.208 146.72 418.144 350.144 485.824 25.6 4.736 35.008-11.104 35.008-24.64 0-12.192-0.48-52.544-0.704-95.328-142.464 30.976-172.512-60.416-172.512-60.416-23.296-59.168-56.832-74.912-56.832-74.912-46.464-31.776 3.52-31.136 3.52-31.136 51.392 3.616 78.464 52.768 78.464 52.768 45.664 78.272 119.776 55.648 148.992 42.56 4.576-33.088 17.856-55.68 32.512-68.48-113.728-12.928-233.28-56.864-233.28-253.024 0-55.904 20-101.568 52.768-137.44-5.312-12.896-22.848-64.96 4.96-135.488 0 0 43.008-13.76 140.832 52.48 40.832-11.36 84.64-17.024 128.16-17.248 43.488 0.192 87.328 5.888 128.256 17.248 97.728-66.24 140.64-52.48 140.64-52.48 27.872 70.528 10.336 122.592 5.024 135.488 32.832 35.84 52.704 81.536 52.704 137.44 0 196.64-119.776 239.936-233.792 252.64 18.368 15.904 34.72 47.04 34.72 94.816 0 68.512-0.608 123.648-0.608 140.512 0 13.632 9.216 29.6 35.168 24.576 203.328-67.776 349.856-259.616 349.856-485.76 0-282.784-229.248-512-512-512z",fill:"#3c6ea8"})])],-1)),Lv=oa(()=>et("li",null,[et("a",null,"v0.x")],-1)),Ov=[Lv],Mv=Kr({__name:"nav",setup(o){const l=un("@0.x"),a=un(!1);async function f(){a.value=!a.value}return bl(async()=>{window.addEventListener("click",()=>{a.value=!1})}),(d,p)=>(nt(),Ot("nav",null,[Cv,et("div",_v,[Tv,et("div",{class:"version-selector",onClick:p[0]||(p[0]=Yc(()=>{},["stop"]))},[et("span",{class:"active-version",onClick:f}," Version: "+ll(l.value),1),et("ul",{class:Br(["versions",{expanded:a.value}])},Ov,2)])])]))}}),Av=bi(Mv,[["__scopeId","data-v-cceb445f"]]);var Ev=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pv(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var $c={exports:{}};(function(o,l){(function(a,f){o.exports=f()})(Ev,function(){var a=navigator.userAgent,f=navigator.platform,d=/gecko\/\d/i.test(a),p=/MSIE \d/.test(a),y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),x=/Edge\/(\d+)/.exec(a),b=p||y||x,L=b&&(p?document.documentMode||6:+(x||y)[1]),w=!x&&/WebKit\//.test(a),P=w&&/Qt\/\d+\.\d+/.test(a),E=!x&&/Chrome\/(\d+)/.exec(a),D=E&&+E[1],X=/Opera\//.test(a),V=/Apple Computer/.test(navigator.vendor),W=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(a),M=/PhantomJS/.test(a),S=V&&(/Mobile\/\w+/.test(a)||navigator.maxTouchPoints>2),O=/Android/.test(a),R=S||O||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(a),B=S||/Mac/.test(f),ee=/\bCrOS\b/.test(a),fe=/win/i.test(f),ae=X&&a.match(/Version\/(\d*\.\d*)/);ae&&(ae=Number(ae[1])),ae&&ae>=15&&(X=!1,w=!0);var be=B&&(P||X&&(ae==null||ae<12.11)),me=d||b&&L>=9;function ce(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ae=function(e,t){var n=e.className,r=ce(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ne(e,t){return j(e).appendChild(t)}function m(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var s=0;s=t)return u+(t-s);u+=c-s,u+=n-u%n,s=c+1}}var Oe=function(){this.id=null,this.f=null,this.time=0,this.handler=Le(this.onTimeout,this)};Oe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Oe.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(u,t-i);if(i+=s-r,i+=n-i%n,r=s+1,i>=t)return r}}var ie=[""];function de(e){for(;ie.length<=e;)ie.push(J(ie)+" ");return ie[e]}function J(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&ke(e)?!0:t.test(e):ke(e)}function je(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ke=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function We(e){return e.charCodeAt(0)>=768&&Ke.test(e)}function vt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,s=r<0?Math.ceil(i):Math.floor(i);if(s==t)return e(s)?t:n;e(s)?n=s:t=s+r}}function fr(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,s=0;st||t==n&&u.to==t)&&(r(Math.max(u.from,t),Math.min(u.to,n),u.level==1?"rtl":"ltr",s),i=!0)}i||r(t,n,"ltr")}var nr=null;function cr(e,t,n){var r;nr=null;for(var i=0;it)return i;s.to==t&&(s.from!=s.to&&n=="before"?r=i:nr=i),s.from==t&&(s.from!=s.to&&n!="before"?r=i:nr=i)}return r??nr}var At=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,u=/[Lb1n]/,c=/[1n]/;function h(g,k,_){this.level=g,this.from=k,this.to=_}return function(g,k){var _=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!r.test(g))return!1;for(var F=g.length,N=[],U=0;U-1&&(r[t]=i.slice(0,s).concat(i.slice(s+1)))}}}function lt(e,t){var n=Pr(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function dr(e){e.prototype.on=function(t,n){_e(this,t,n)},e.prototype.off=function(t,n){Et(this,t,n)}}function Pt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function In(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ur(e){Pt(e),In(e)}function xi(e){return e.target||e.srcElement}function hr(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var Sl=function(){if(b&&L<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),Dn;function vo(e){if(Dn==null){var t=m("span","​");ne(e,m("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dn=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&L<8))}var n=Dn?m("span","​"):m("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var wi;function Gr(e){if(wi!=null)return wi;var t=ne(e,document.createTextNode("AخA")),n=Y(t,0,1).getBoundingClientRect(),r=Y(t,1,2).getBoundingClientRect();return j(e),!n||n.left==n.right?!1:wi=r.right-n.right<3}var sr=` b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` -`,t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),u=s.indexOf("\r");u!=-1?(n.push(s.slice(0,u)),t+=u+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},qr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},mo=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),pr=null;function Cl(e){if(pr!=null)return pr;var t=ne(e,m("span","x")),n=t.getBoundingClientRect(),r=Y(t,0,1).getBoundingClientRect();return pr=Math.abs(n.left-r.left)>1}var Fn={},gr={};function vr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fn[e]=t}function pn(e,t){gr[e]=t}function Hn(e){if(typeof e=="string"&&gr.hasOwnProperty(e))e=gr[e];else if(e&&typeof e.name=="string"&&gr.hasOwnProperty(e.name)){var t=gr[e.name];typeof t=="string"&&(t={name:t}),e=H(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Wn(e,t){t=Hn(t);var n=Fn[t.name];if(!n)return Wn(e,"text/plain");var r=n(e,t);if(Xr.hasOwnProperty(t.name)){var i=Xr[t.name];for(var s in i)i.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=i[s])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var u in t.modeProps)r[u]=t.modeProps[u];return r}var Xr={};function Rn(e,t){var n=Xr.hasOwnProperty(e)?Xr[e]:Xr[e]={};Ne(t,n)}function Cr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ki(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function zn(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.post},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],s=i.chunkSize();if(t=e.first&&tn?K(n,we(e,n).text.length):Qc(t,we(e,t.line).text.length)}function Qc(e,t){var n=e.ch;return n==null||n>t?K(e.line,t):n<0?K(e.line,0):e}function aa(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},_r.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},_r.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},_r.fromSaved=function(e,t,n){return t instanceof yo?new _r(e,Cr(e.mode,t.state),n,t.lookAhead):new _r(e,Cr(e.mode,t),n)},_r.prototype.save=function(e){var t=e!==!1?Cr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yo(t,this.maxLookAhead):t};function ua(e,t,n,r){var i=[e.state.modeGen],s={};ga(e,t.text,e.doc.mode,n,function(g,k){return i.push(g,k)},s,r);for(var u=n.state,c=function(g){n.baseTokens=i;var k=e.state.overlays[g],_=1,F=0;n.state=!0,ga(e,t.text,k.mode,n,function(N,U){for(var Q=_;FN&&i.splice(_,1,N,i[_+1],se),_+=2,F=Math.min(N,se)}if(U)if(k.opaque)i.splice(Q,_-Q,N,"overlay "+U),_=Q+2;else for(;Q<_;Q+=2){var he=i[Q+1];i[Q+1]=(he?he+" ":"")+"overlay "+U}},s),n.state=u,n.baseTokens=null,n.baseTokenPos=1},h=0;he.options.maxHighlightLength&&Cr(e.doc.mode,r.state),s=ua(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ci(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new _r(r,!0,t);var s=ed(e,t,n),u=s>r.first&&we(r,s-1).stateAfter,c=u?_r.fromSaved(r,u,s):new _r(r,zn(r.mode),s);return r.iter(s,t,function(h){_l(e,h.text,c);var g=c.line;h.stateAfter=g==t-1||g%5==0||g>=i.viewFrom&&gt.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var da=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function ha(e,t,n,r){var i=e.doc,s=i.mode,u;t=Ie(i,t);var c=we(i,t.line),h=Ci(e,t.line,n),g=new at(c.text,e.options.tabSize,h),k;for(r&&(k=[]);(r||g.pose.options.maxHighlightLength?(c=!1,u&&_l(e,t,r,k.pos),k.pos=t.length,_=null):_=pa(Tl(n,k,r.state,F),s),F){var N=F[0].name;N&&(_="m-"+(_?N+" "+_:N))}if(!c||g!=_){for(;hu;--c){if(c<=s.first)return s.first;var h=we(s,c-1),g=h.stateAfter;if(g&&(!n||c+(g instanceof yo?g.lookAhead:0)<=s.modeFrontier))return c;var k=ze(h.text,null,e.options.tabSize);(i==null||r>k)&&(i=c-1,r=k)}return i}function td(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=we(e,r).stateAfter;if(i&&(!(i instanceof yo)||r+i.lookAhead=t:s.to>t);(r||(r=[])).push(new bo(u,s.from,h?null:s.to))}}return r}function sd(e,t,n){var r;if(e)for(var i=0;i=t:s.to>t);if(c||s.from==t&&u.type=="bookmark"&&(!n||s.marker.insertLeft)){var h=s.from==null||(u.inclusiveLeft?s.from<=t:s.from0&&c)for(var ye=0;ye0)){var k=[h,1],_=ge(g.from,c.from),F=ge(g.to,c.to);(_<0||!u.inclusiveLeft&&!_)&&k.push({from:g.from,to:c.from}),(F>0||!u.inclusiveRight&&!F)&&k.push({from:c.to,to:g.to}),i.splice.apply(i,k),h+=k.length-3}}return i}function ya(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||Ol(r,s.marker)<0)&&(r=s.marker)}return r}function ka(e,t,n,r,i){var s=we(e,t),u=Ir&&s.markedSpans;if(u)for(var c=0;c=0&&_<=0||k<=0&&_>=0)&&(k<=0&&(h.marker.inclusiveRight&&i.inclusiveLeft?ge(g.to,n)>=0:ge(g.to,n)>0)||k>=0&&(h.marker.inclusiveRight&&i.inclusiveLeft?ge(g.from,r)<=0:ge(g.from,r)<0)))return!0}}}function mr(e){for(var t;t=wa(e);)e=t.find(-1,!0).line;return e}function fd(e){for(var t;t=ko(e);)e=t.find(1,!0).line;return e}function cd(e){for(var t,n;t=ko(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ml(e,t){var n=we(e,t),r=mr(n);return n==r?t:v(r)}function Sa(e,t){if(t>e.lastLine())return t;var n=we(e,t),r;if(!Yr(e,n))return t;for(;r=ko(n);)n=r.find(1,!0).line;return v(n)+1}function Yr(e,t){var n=Ir&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Kn=function(e,t,n){this.text=e,ba(this,t),this.height=n?n(this):1};Kn.prototype.lineNo=function(){return v(this)},dr(Kn);function dd(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ya(e),ba(e,n);var i=r?r(e):1;i!=e.height&&ir(e,i)}function hd(e){e.parent=null,ya(e)}var pd={},gd={};function Ca(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?gd:pd;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function _a(e,t){var n=re("span",null,null,w?"padding-right: .1px":null),r={pre:re("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var s=i?t.rest[i-1]:t.line,u=void 0;r.pos=0,r.addToken=md,Gr(e.display.measure)&&(u=Me(s,e.doc.direction))&&(r.addToken=bd(r.addToken,u)),r.map=[];var c=t!=e.display.externalMeasured&&v(s);xd(s,r,fa(e,s,c)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=Be(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=Be(s.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(vo(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(w){var h=r.content.lastChild;(/\bcm-tab\b/.test(h.className)||h.querySelector&&h.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return lt(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Be(r.pre.className,r.textClass||"")),r}function vd(e){var t=m("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function md(e,t,n,r,i,s,u){if(t){var c=e.splitSpaces?yd(t,e.trailingSpace):t,h=e.cm.state.specialChars,g=!1,k;if(!h.test(t))e.col+=t.length,k=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,k),b&&L<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var _=0;;){h.lastIndex=_;var F=h.exec(t),N=F?F.index-_:t.length-_;if(N){var U=document.createTextNode(c.slice(_,_+N));b&&L<9?k.appendChild(m("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+N,U),e.col+=N,e.pos+=N}if(!F)break;_+=N+1;var Q=void 0;if(F[0]==" "){var se=e.cm.options.tabSize,he=se-e.col%se;Q=k.appendChild(m("span",de(he),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=he}else F[0]=="\r"||F[0]==` -`?(Q=k.appendChild(m("span",F[0]=="\r"?"␍":"␤","cm-invalidchar")),Q.setAttribute("cm-text",F[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(F[0]),Q.setAttribute("cm-text",F[0]),b&&L<9?k.appendChild(m("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=c.charCodeAt(t.length-1)==32,n||r||i||g||s||u){var ve=n||"";r&&(ve+=r),i&&(ve+=i);var pe=m("span",[k],ve,s);if(u)for(var ye in u)u.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&pe.setAttribute(ye,u[ye]);return e.content.appendChild(pe)}e.content.appendChild(k)}}function yd(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ig&&_.from<=g));F++);if(_.to>=k)return e(n,r,i,s,u,c,h);e(n,r.slice(0,_.to-g),i,s,null,c,h),s=null,r=r.slice(_.to-g),g=_.to}}}function Ta(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xd(e,t,n){var r=e.markedSpans,i=e.text,s=0;if(!r){for(var u=1;uh||He.collapsed&&Se.to==h&&Se.from==h)){if(Se.to!=null&&Se.to!=h&&N>Se.to&&(N=Se.to,Q=""),He.className&&(U+=" "+He.className),He.css&&(F=(F?F+";":"")+He.css),He.startStyle&&Se.from==h&&(se+=" "+He.startStyle),He.endStyle&&Se.to==N&&(ye||(ye=[])).push(He.endStyle,Se.to),He.title&&((ve||(ve={})).title=He.title),He.attributes)for(var Qe in He.attributes)(ve||(ve={}))[Qe]=He.attributes[Qe];He.collapsed&&(!he||Ol(he.marker,He)<0)&&(he=Se)}else Se.from>h&&N>Se.from&&(N=Se.from)}if(ye)for(var kt=0;kt=c)break;for(var Zt=Math.min(c,N);;){if(k){var Ut=h+k.length;if(!he){var pt=Ut>Zt?k.slice(0,Zt-h):k;t.addToken(t,pt,_?_+U:U,se,h+pt.length==N?Q:"",F,ve)}if(Ut>=Zt){k=k.slice(Zt-h),h=Zt;break}h=Ut,se=""}k=i.slice(s,s=n[g++]),_=Ca(n[g++],t.cm.options)}}}function La(e,t,n){this.line=t,this.rest=cd(t),this.size=this.rest?v(J(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Yr(e,t)}function Co(e,t,n){for(var r=[],i,s=t;s2&&s.push((h.bottom+g.top)/2-n.top)}}s.push(n.bottom-n.top)}}function Ia(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Ed(e,t){t=mr(t);var n=v(t),r=e.display.externalMeasured=new La(e.doc,t,n);r.lineN=n;var i=r.built=_a(e,r);return r.text=i.pre,ne(e.display.lineMeasure,i.pre),r}function Da(e,t,n,r){return Lr(e,Un(e,t),n,r)}function Dl(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(s=h-c,i=s-1,t>=h&&(u="right")),i!=null){if(r=e[g+2],c==h&&n==(r.insertLeft?"left":"right")&&(u=n),n=="left"&&i==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)r=e[(g-=3)+2],u="left";if(n=="right"&&i==h-c)for(;g=0&&(n=e[i]).left==n.right;i--);return n}function Nd(e,t,n,r){var i=Ha(t.map,n,r),s=i.node,u=i.start,c=i.end,h=i.collapse,g;if(s.nodeType==3){for(var k=0;k<4;k++){for(;u&&We(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+c0&&(h=r="right");var _;e.options.lineWrapping&&(_=s.getClientRects()).length>1?g=_[r=="right"?_.length-1:0]:g=s.getBoundingClientRect()}if(b&&L<9&&!u&&(!g||!g.left&&!g.right)){var F=s.parentNode.getClientRects()[0];F?g={left:F.left,right:F.left+qn(e.display),top:F.top,bottom:F.bottom}:g=Fa}for(var N=g.top-t.rect.top,U=g.bottom-t.rect.top,Q=(N+U)/2,se=t.view.measure.heights,he=0;he=r.text.length?(h=r.text.length,g="before"):h<=0&&(h=0,g="after"),!c)return u(g=="before"?h-1:h,g=="before");function k(U,Q,se){var he=c[Q],ve=he.level==1;return u(se?U-1:U,ve!=se)}var _=cr(c,h,g),F=nr,N=k(h,_,g=="before");return F!=null&&(N.other=k(h,F,g!="before")),N}function ja(e,t){var n=0;t=Ie(e.doc,t),e.options.lineWrapping||(n=qn(e.display)*t.ch);var r=we(e.doc,t.line),i=Dr(r)+_o(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Hl(e,t,n,r,i){var s=K(e,t,n);return s.xRel=i,r&&(s.outside=r),s}function Wl(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Hl(r.first,0,null,-1,-1);var i=C(r,n),s=r.first+r.size-1;if(i>s)return Hl(r.first+r.size-1,we(r,s).text.length,null,1,1);t<0&&(t=0);for(var u=we(r,i);;){var c=Dd(e,u,i,t,n),h=ud(u,c.ch+(c.xRel>0||c.outside>0?1:0));if(!h)return c;var g=h.find(1);if(g.line==i)return g;u=we(r,i=g.line)}}function Ua(e,t,n,r){r-=Fl(t);var i=t.text.length,s=Mt(function(u){return Lr(e,n,u-1).bottom<=r},i,0);return i=Mt(function(u){return Lr(e,n,u).top>r},s,i),{begin:s,end:i}}function Ga(e,t,n,r){n||(n=Un(e,t));var i=To(e,t,Lr(e,n,r),"line").top;return Ua(e,t,n,i)}function Rl(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Dd(e,t,n,r,i){i-=Dr(t);var s=Un(e,t),u=Fl(t),c=0,h=t.text.length,g=!0,k=Me(t,e.doc.direction);if(k){var _=(e.options.lineWrapping?Hd:Fd)(e,t,n,s,k,r,i);g=_.level!=1,c=g?_.from:_.to-1,h=g?_.to:_.from-1}var F=null,N=null,U=Mt(function(Te){var Se=Lr(e,s,Te);return Se.top+=u,Se.bottom+=u,Rl(Se,r,i,!1)?(Se.top<=i&&Se.left<=r&&(F=Te,N=Se),!0):!1},c,h),Q,se,he=!1;if(N){var ve=r-N.left=ye.bottom?1:0}return U=vt(t.text,U,1),Hl(n,U,se,he,r-Q)}function Fd(e,t,n,r,i,s,u){var c=Mt(function(_){var F=i[_],N=F.level!=1;return Rl(yr(e,K(n,N?F.to:F.from,N?"before":"after"),"line",t,r),s,u,!0)},0,i.length-1),h=i[c];if(c>0){var g=h.level!=1,k=yr(e,K(n,g?h.from:h.to,g?"after":"before"),"line",t,r);Rl(k,s,u,!0)&&k.top>u&&(h=i[c-1])}return h}function Hd(e,t,n,r,i,s,u){var c=Ua(e,t,r,u),h=c.begin,g=c.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,_=null,F=0;F=g||N.to<=h)){var U=N.level!=1,Q=Lr(e,r,U?Math.min(g,N.to)-1:Math.max(h,N.from)).right,se=Qse)&&(k=N,_=se)}}return k||(k=i[i.length-1]),k.fromg&&(k={from:k.from,to:g,level:k.level}),k}var vn;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(vn==null){vn=m("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)vn.appendChild(document.createTextNode("x")),vn.appendChild(m("br"));vn.appendChild(document.createTextNode("x"))}ne(e.measure,vn);var n=vn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),j(e.measure),n||1}function qn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=m("span","xxxxxxxxxx"),n=m("pre",[t],"CodeMirror-line-like");ne(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function zl(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,s=t.gutters.firstChild,u=0;s;s=s.nextSibling,++u){var c=e.display.gutterSpecs[u].className;n[c]=s.offsetLeft+s.clientLeft+i,r[c]=s.clientWidth}return{fixedPos:Bl(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Bl(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function qa(e){var t=Gn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/qn(e.display)-3);return function(i){if(Yr(e.doc,i))return 0;var s=0;if(i.widgets)for(var u=0;u0&&(g=we(e.doc,h.line).text).length==h.ch){var k=ze(g,g.length,e.options.tabSize)-g.length;h=K(h.line,Math.max(0,Math.round((s-Na(e.display).left)/qn(e.display))-k))}return h}function yn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ir&&Ml(e.doc,t)i.viewFrom?Jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Jr(e);else if(t<=i.viewFrom){var s=Oo(e,n,n+r,1);s?(i.view=i.view.slice(s.index),i.viewFrom=s.lineN,i.viewTo+=r):Jr(e)}else if(n>=i.viewTo){var u=Oo(e,t,t,-1);u?(i.view=i.view.slice(0,u.index),i.viewTo=u.lineN):Jr(e)}else{var c=Oo(e,t,t,-1),h=Oo(e,n,n+r,1);c&&h?(i.view=i.view.slice(0,c.index).concat(Co(e,c.lineN,h.lineN)).concat(i.view.slice(h.index)),i.viewTo+=r):Jr(e)}var g=i.externalMeasured;g&&(n=i.lineN&&t=r.viewTo)){var s=r.view[yn(e,t)];if(s.node!=null){var u=s.changes||(s.changes=[]);xe(u,n)==-1&&u.push(n)}}}function Jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Oo(e,t,n,r){var i=yn(e,t),s,u=e.display.view;if(!Ir||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var c=e.display.viewFrom,h=0;h0){if(i==u.length-1)return null;s=c+u[i].size-t,i++}else s=c-t;t+=s,n+=s}for(;Ml(e.doc,n)!=n;){if(i==(r<0?0:u.length-1))return null;n+=r*u[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Wd(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Co(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Co(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,yn(e,n)))),r.viewTo=n}function Xa(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||h.to().line0?u:e.defaultCharWidth())+"px"}if(r.other){var c=n.appendChild(m("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));c.style.display="",c.style.left=r.other.left+"px",c.style.top=r.other.top+"px",c.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Mo(e,t){return e.top-t.top||e.left-t.left}function Rd(e,t,n){var r=e.display,i=e.doc,s=document.createDocumentFragment(),u=Na(e.display),c=u.left,h=Math.max(r.sizerWidth,gn(e)-r.sizer.offsetLeft)-u.right,g=i.direction=="ltr";function k(pe,ye,Te,Se){ye<0&&(ye=0),ye=Math.round(ye),Se=Math.round(Se),s.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+pe+`px; +`,t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),u=s.indexOf("\r");u!=-1?(n.push(s.slice(0,u)),t+=u+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},qr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},mo=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),pr=null;function Cl(e){if(pr!=null)return pr;var t=ne(e,m("span","x")),n=t.getBoundingClientRect(),r=Y(t,0,1).getBoundingClientRect();return pr=Math.abs(n.left-r.left)>1}var Fn={},gr={};function vr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fn[e]=t}function pn(e,t){gr[e]=t}function Hn(e){if(typeof e=="string"&&gr.hasOwnProperty(e))e=gr[e];else if(e&&typeof e.name=="string"&&gr.hasOwnProperty(e.name)){var t=gr[e.name];typeof t=="string"&&(t={name:t}),e=H(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Wn(e,t){t=Hn(t);var n=Fn[t.name];if(!n)return Wn(e,"text/plain");var r=n(e,t);if(Xr.hasOwnProperty(t.name)){var i=Xr[t.name];for(var s in i)i.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=i[s])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var u in t.modeProps)r[u]=t.modeProps[u];return r}var Xr={};function Rn(e,t){var n=Xr.hasOwnProperty(e)?Xr[e]:Xr[e]={};Ne(t,n)}function Cr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function ki(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function zn(e,t,n){return e.startState?e.startState(t,n):!0}var at=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};at.prototype.eol=function(){return this.pos>=this.string.length},at.prototype.sol=function(){return this.pos==this.lineStart},at.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},at.prototype.next=function(){if(this.post},at.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},at.prototype.skipToEnd=function(){this.pos=this.string.length},at.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},at.prototype.backUp=function(e){this.pos-=e},at.prototype.column=function(){return this.lastColumnPos0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},at.prototype.current=function(){return this.string.slice(this.start,this.pos)},at.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},at.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},at.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],s=i.chunkSize();if(t=e.first&&tn?K(n,we(e,n).text.length):td(t,we(e,t.line).text.length)}function td(e,t){var n=e.ch;return n==null||n>t?K(e.line,t):n<0?K(e.line,0):e}function sa(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},_r.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},_r.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},_r.fromSaved=function(e,t,n){return t instanceof yo?new _r(e,Cr(e.mode,t.state),n,t.lookAhead):new _r(e,Cr(e.mode,t),n)},_r.prototype.save=function(e){var t=e!==!1?Cr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yo(t,this.maxLookAhead):t};function aa(e,t,n,r){var i=[e.state.modeGen],s={};pa(e,t.text,e.doc.mode,n,function(g,k){return i.push(g,k)},s,r);for(var u=n.state,c=function(g){n.baseTokens=i;var k=e.state.overlays[g],_=1,F=0;n.state=!0,pa(e,t.text,k.mode,n,function(N,U){for(var Q=_;FN&&i.splice(_,1,N,i[_+1],se),_+=2,F=Math.min(N,se)}if(U)if(k.opaque)i.splice(Q,_-Q,N,"overlay "+U),_=Q+2;else for(;Q<_;Q+=2){var he=i[Q+1];i[Q+1]=(he?he+" ":"")+"overlay "+U}},s),n.state=u,n.baseTokens=null,n.baseTokenPos=1},h=0;he.options.maxHighlightLength&&Cr(e.doc.mode,r.state),s=aa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ci(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new _r(r,!0,t);var s=rd(e,t,n),u=s>r.first&&we(r,s-1).stateAfter,c=u?_r.fromSaved(r,u,s):new _r(r,zn(r.mode),s);return r.iter(s,t,function(h){_l(e,h.text,c);var g=c.line;h.stateAfter=g==t-1||g%5==0||g>=i.viewFrom&&gt.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var ca=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function da(e,t,n,r){var i=e.doc,s=i.mode,u;t=Ie(i,t);var c=we(i,t.line),h=Ci(e,t.line,n),g=new at(c.text,e.options.tabSize,h),k;for(r&&(k=[]);(r||g.pose.options.maxHighlightLength?(c=!1,u&&_l(e,t,r,k.pos),k.pos=t.length,_=null):_=ha(Tl(n,k,r.state,F),s),F){var N=F[0].name;N&&(_="m-"+(_?N+" "+_:N))}if(!c||g!=_){for(;hu;--c){if(c<=s.first)return s.first;var h=we(s,c-1),g=h.stateAfter;if(g&&(!n||c+(g instanceof yo?g.lookAhead:0)<=s.modeFrontier))return c;var k=ze(h.text,null,e.options.tabSize);(i==null||r>k)&&(i=c-1,r=k)}return i}function nd(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=we(e,r).stateAfter;if(i&&(!(i instanceof yo)||r+i.lookAhead=t:s.to>t);(r||(r=[])).push(new bo(u,s.from,h?null:s.to))}}return r}function ud(e,t,n){var r;if(e)for(var i=0;i=t:s.to>t);if(c||s.from==t&&u.type=="bookmark"&&(!n||s.marker.insertLeft)){var h=s.from==null||(u.inclusiveLeft?s.from<=t:s.from0&&c)for(var ye=0;ye0)){var k=[h,1],_=ge(g.from,c.from),F=ge(g.to,c.to);(_<0||!u.inclusiveLeft&&!_)&&k.push({from:g.from,to:c.from}),(F>0||!u.inclusiveRight&&!F)&&k.push({from:c.to,to:g.to}),i.splice.apply(i,k),h+=k.length-3}}return i}function ma(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||Ol(r,s.marker)<0)&&(r=s.marker)}return r}function wa(e,t,n,r,i){var s=we(e,t),u=Ir&&s.markedSpans;if(u)for(var c=0;c=0&&_<=0||k<=0&&_>=0)&&(k<=0&&(h.marker.inclusiveRight&&i.inclusiveLeft?ge(g.to,n)>=0:ge(g.to,n)>0)||k>=0&&(h.marker.inclusiveRight&&i.inclusiveLeft?ge(g.from,r)<=0:ge(g.from,r)<0)))return!0}}}function mr(e){for(var t;t=xa(e);)e=t.find(-1,!0).line;return e}function dd(e){for(var t;t=ko(e);)e=t.find(1,!0).line;return e}function hd(e){for(var t,n;t=ko(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ml(e,t){var n=we(e,t),r=mr(n);return n==r?t:v(r)}function ka(e,t){if(t>e.lastLine())return t;var n=we(e,t),r;if(!Yr(e,n))return t;for(;r=ko(n);)n=r.find(1,!0).line;return v(n)+1}function Yr(e,t){var n=Ir&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Kn=function(e,t,n){this.text=e,ya(this,t),this.height=n?n(this):1};Kn.prototype.lineNo=function(){return v(this)},dr(Kn);function pd(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ma(e),ya(e,n);var i=r?r(e):1;i!=e.height&&ir(e,i)}function gd(e){e.parent=null,ma(e)}var vd={},md={};function Sa(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?md:vd;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ca(e,t){var n=re("span",null,null,w?"padding-right: .1px":null),r={pre:re("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var s=i?t.rest[i-1]:t.line,u=void 0;r.pos=0,r.addToken=bd,Gr(e.display.measure)&&(u=Me(s,e.doc.direction))&&(r.addToken=wd(r.addToken,u)),r.map=[];var c=t!=e.display.externalMeasured&&v(s);kd(s,r,ua(e,s,c)),s.styleClasses&&(s.styleClasses.bgClass&&(r.bgClass=Be(s.styleClasses.bgClass,r.bgClass||"")),s.styleClasses.textClass&&(r.textClass=Be(s.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(vo(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(w){var h=r.content.lastChild;(/\bcm-tab\b/.test(h.className)||h.querySelector&&h.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return lt(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Be(r.pre.className,r.textClass||"")),r}function yd(e){var t=m("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function bd(e,t,n,r,i,s,u){if(t){var c=e.splitSpaces?xd(t,e.trailingSpace):t,h=e.cm.state.specialChars,g=!1,k;if(!h.test(t))e.col+=t.length,k=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,k),b&&L<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var _=0;;){h.lastIndex=_;var F=h.exec(t),N=F?F.index-_:t.length-_;if(N){var U=document.createTextNode(c.slice(_,_+N));b&&L<9?k.appendChild(m("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+N,U),e.col+=N,e.pos+=N}if(!F)break;_+=N+1;var Q=void 0;if(F[0]==" "){var se=e.cm.options.tabSize,he=se-e.col%se;Q=k.appendChild(m("span",de(he),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=he}else F[0]=="\r"||F[0]==` +`?(Q=k.appendChild(m("span",F[0]=="\r"?"␍":"␤","cm-invalidchar")),Q.setAttribute("cm-text",F[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(F[0]),Q.setAttribute("cm-text",F[0]),b&&L<9?k.appendChild(m("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=c.charCodeAt(t.length-1)==32,n||r||i||g||s||u){var ve=n||"";r&&(ve+=r),i&&(ve+=i);var pe=m("span",[k],ve,s);if(u)for(var ye in u)u.hasOwnProperty(ye)&&ye!="style"&&ye!="class"&&pe.setAttribute(ye,u[ye]);return e.content.appendChild(pe)}e.content.appendChild(k)}}function xd(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ig&&_.from<=g));F++);if(_.to>=k)return e(n,r,i,s,u,c,h);e(n,r.slice(0,_.to-g),i,s,null,c,h),s=null,r=r.slice(_.to-g),g=_.to}}}function _a(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function kd(e,t,n){var r=e.markedSpans,i=e.text,s=0;if(!r){for(var u=1;uh||He.collapsed&&Se.to==h&&Se.from==h)){if(Se.to!=null&&Se.to!=h&&N>Se.to&&(N=Se.to,Q=""),He.className&&(U+=" "+He.className),He.css&&(F=(F?F+";":"")+He.css),He.startStyle&&Se.from==h&&(se+=" "+He.startStyle),He.endStyle&&Se.to==N&&(ye||(ye=[])).push(He.endStyle,Se.to),He.title&&((ve||(ve={})).title=He.title),He.attributes)for(var Qe in He.attributes)(ve||(ve={}))[Qe]=He.attributes[Qe];He.collapsed&&(!he||Ol(he.marker,He)<0)&&(he=Se)}else Se.from>h&&N>Se.from&&(N=Se.from)}if(ye)for(var kt=0;kt=c)break;for(var Zt=Math.min(c,N);;){if(k){var Ut=h+k.length;if(!he){var pt=Ut>Zt?k.slice(0,Zt-h):k;t.addToken(t,pt,_?_+U:U,se,h+pt.length==N?Q:"",F,ve)}if(Ut>=Zt){k=k.slice(Zt-h),h=Zt;break}h=Ut,se=""}k=i.slice(s,s=n[g++]),_=Sa(n[g++],t.cm.options)}}}function Ta(e,t,n){this.line=t,this.rest=hd(t),this.size=this.rest?v(J(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Yr(e,t)}function Co(e,t,n){for(var r=[],i,s=t;s2&&s.push((h.bottom+g.top)/2-n.top)}}s.push(n.bottom-n.top)}}function Na(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Nd(e,t){t=mr(t);var n=v(t),r=e.display.externalMeasured=new Ta(e.doc,t,n);r.lineN=n;var i=r.built=Ca(e,r);return r.text=i.pre,ne(e.display.lineMeasure,i.pre),r}function Ia(e,t,n,r){return Lr(e,Un(e,t),n,r)}function Dl(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(s=h-c,i=s-1,t>=h&&(u="right")),i!=null){if(r=e[g+2],c==h&&n==(r.insertLeft?"left":"right")&&(u=n),n=="left"&&i==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)r=e[(g-=3)+2],u="left";if(n=="right"&&i==h-c)for(;g=0&&(n=e[i]).left==n.right;i--);return n}function Dd(e,t,n,r){var i=Fa(t.map,n,r),s=i.node,u=i.start,c=i.end,h=i.collapse,g;if(s.nodeType==3){for(var k=0;k<4;k++){for(;u&&We(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+c0&&(h=r="right");var _;e.options.lineWrapping&&(_=s.getClientRects()).length>1?g=_[r=="right"?_.length-1:0]:g=s.getBoundingClientRect()}if(b&&L<9&&!u&&(!g||!g.left&&!g.right)){var F=s.parentNode.getClientRects()[0];F?g={left:F.left,right:F.left+qn(e.display),top:F.top,bottom:F.bottom}:g=Da}for(var N=g.top-t.rect.top,U=g.bottom-t.rect.top,Q=(N+U)/2,se=t.view.measure.heights,he=0;he=r.text.length?(h=r.text.length,g="before"):h<=0&&(h=0,g="after"),!c)return u(g=="before"?h-1:h,g=="before");function k(U,Q,se){var he=c[Q],ve=he.level==1;return u(se?U-1:U,ve!=se)}var _=cr(c,h,g),F=nr,N=k(h,_,g=="before");return F!=null&&(N.other=k(h,F,g!="before")),N}function Ka(e,t){var n=0;t=Ie(e.doc,t),e.options.lineWrapping||(n=qn(e.display)*t.ch);var r=we(e.doc,t.line),i=Dr(r)+_o(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Hl(e,t,n,r,i){var s=K(e,t,n);return s.xRel=i,r&&(s.outside=r),s}function Wl(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Hl(r.first,0,null,-1,-1);var i=C(r,n),s=r.first+r.size-1;if(i>s)return Hl(r.first+r.size-1,we(r,s).text.length,null,1,1);t<0&&(t=0);for(var u=we(r,i);;){var c=Hd(e,u,i,t,n),h=cd(u,c.ch+(c.xRel>0||c.outside>0?1:0));if(!h)return c;var g=h.find(1);if(g.line==i)return g;u=we(r,i=g.line)}}function ja(e,t,n,r){r-=Fl(t);var i=t.text.length,s=Mt(function(u){return Lr(e,n,u-1).bottom<=r},i,0);return i=Mt(function(u){return Lr(e,n,u).top>r},s,i),{begin:s,end:i}}function Ua(e,t,n,r){n||(n=Un(e,t));var i=To(e,t,Lr(e,n,r),"line").top;return ja(e,t,n,i)}function Rl(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function Hd(e,t,n,r,i){i-=Dr(t);var s=Un(e,t),u=Fl(t),c=0,h=t.text.length,g=!0,k=Me(t,e.doc.direction);if(k){var _=(e.options.lineWrapping?Rd:Wd)(e,t,n,s,k,r,i);g=_.level!=1,c=g?_.from:_.to-1,h=g?_.to:_.from-1}var F=null,N=null,U=Mt(function(Te){var Se=Lr(e,s,Te);return Se.top+=u,Se.bottom+=u,Rl(Se,r,i,!1)?(Se.top<=i&&Se.left<=r&&(F=Te,N=Se),!0):!1},c,h),Q,se,he=!1;if(N){var ve=r-N.left=ye.bottom?1:0}return U=vt(t.text,U,1),Hl(n,U,se,he,r-Q)}function Wd(e,t,n,r,i,s,u){var c=Mt(function(_){var F=i[_],N=F.level!=1;return Rl(yr(e,K(n,N?F.to:F.from,N?"before":"after"),"line",t,r),s,u,!0)},0,i.length-1),h=i[c];if(c>0){var g=h.level!=1,k=yr(e,K(n,g?h.from:h.to,g?"after":"before"),"line",t,r);Rl(k,s,u,!0)&&k.top>u&&(h=i[c-1])}return h}function Rd(e,t,n,r,i,s,u){var c=ja(e,t,r,u),h=c.begin,g=c.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,_=null,F=0;F=g||N.to<=h)){var U=N.level!=1,Q=Lr(e,r,U?Math.min(g,N.to)-1:Math.max(h,N.from)).right,se=Qse)&&(k=N,_=se)}}return k||(k=i[i.length-1]),k.fromg&&(k={from:k.from,to:g,level:k.level}),k}var vn;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(vn==null){vn=m("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)vn.appendChild(document.createTextNode("x")),vn.appendChild(m("br"));vn.appendChild(document.createTextNode("x"))}ne(e.measure,vn);var n=vn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),j(e.measure),n||1}function qn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=m("span","xxxxxxxxxx"),n=m("pre",[t],"CodeMirror-line-like");ne(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function zl(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,s=t.gutters.firstChild,u=0;s;s=s.nextSibling,++u){var c=e.display.gutterSpecs[u].className;n[c]=s.offsetLeft+s.clientLeft+i,r[c]=s.clientWidth}return{fixedPos:Bl(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Bl(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ga(e){var t=Gn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/qn(e.display)-3);return function(i){if(Yr(e.doc,i))return 0;var s=0;if(i.widgets)for(var u=0;u0&&(g=we(e.doc,h.line).text).length==h.ch){var k=ze(g,g.length,e.options.tabSize)-g.length;h=K(h.line,Math.max(0,Math.round((s-Pa(e.display).left)/qn(e.display))-k))}return h}function yn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ir&&Ml(e.doc,t)i.viewFrom?Jr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Jr(e);else if(t<=i.viewFrom){var s=Oo(e,n,n+r,1);s?(i.view=i.view.slice(s.index),i.viewFrom=s.lineN,i.viewTo+=r):Jr(e)}else if(n>=i.viewTo){var u=Oo(e,t,t,-1);u?(i.view=i.view.slice(0,u.index),i.viewTo=u.lineN):Jr(e)}else{var c=Oo(e,t,t,-1),h=Oo(e,n,n+r,1);c&&h?(i.view=i.view.slice(0,c.index).concat(Co(e,c.lineN,h.lineN)).concat(i.view.slice(h.index)),i.viewTo+=r):Jr(e)}var g=i.externalMeasured;g&&(n=i.lineN&&t=r.viewTo)){var s=r.view[yn(e,t)];if(s.node!=null){var u=s.changes||(s.changes=[]);xe(u,n)==-1&&u.push(n)}}}function Jr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Oo(e,t,n,r){var i=yn(e,t),s,u=e.display.view;if(!Ir||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var c=e.display.viewFrom,h=0;h0){if(i==u.length-1)return null;s=c+u[i].size-t,i++}else s=c-t;t+=s,n+=s}for(;Ml(e.doc,n)!=n;){if(i==(r<0?0:u.length-1))return null;n+=r*u[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function zd(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Co(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Co(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,yn(e,n)))),r.viewTo=n}function qa(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||h.to().line0?u:e.defaultCharWidth())+"px"}if(r.other){var c=n.appendChild(m("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));c.style.display="",c.style.left=r.other.left+"px",c.style.top=r.other.top+"px",c.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Mo(e,t){return e.top-t.top||e.left-t.left}function Bd(e,t,n){var r=e.display,i=e.doc,s=document.createDocumentFragment(),u=Pa(e.display),c=u.left,h=Math.max(r.sizerWidth,gn(e)-r.sizer.offsetLeft)-u.right,g=i.direction=="ltr";function k(pe,ye,Te,Se){ye<0&&(ye=0),ye=Math.round(ye),Se=Math.round(Se),s.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+pe+`px; top: `+ye+"px; width: "+(Te??h-pe)+`px; - height: `+(Se-ye)+"px"))}function _(pe,ye,Te){var Se=we(i,pe),He=Se.text.length,Qe,kt;function it(pt,Gt){return Lo(e,K(pe,pt),"div",Se,Gt)}function Zt(pt,Gt,Lt){var mt=Ga(e,Se,null,pt),gt=Gt=="ltr"==(Lt=="after")?"left":"right",ut=Lt=="after"?mt.begin:mt.end-(/\s/.test(Se.text.charAt(mt.end-1))?2:1);return it(ut,gt)[gt]}var Ut=Me(Se,i.direction);return fr(Ut,ye||0,Te??He,function(pt,Gt,Lt,mt){var gt=Lt=="ltr",ut=it(pt,gt?"left":"right"),qt=it(Gt-1,gt?"right":"left"),oi=ye==null&&pt==0,rn=Te==null&&Gt==He,It=mt==0,Or=!Ut||mt==Ut.length-1;if(qt.top-ut.top<=3){var St=(g?oi:rn)&&It,vs=(g?rn:oi)&&Or,Rr=St?c:(gt?ut:qt).left,Sn=vs?h:(gt?qt:ut).right;k(Rr,ut.top,Sn-Rr,ut.bottom)}else{var Cn,Wt,li,ms;gt?(Cn=g&&oi&&It?c:ut.left,Wt=g?h:Zt(pt,Lt,"before"),li=g?c:Zt(Gt,Lt,"after"),ms=g&&rn&&Or?h:qt.right):(Cn=g?Zt(pt,Lt,"before"):c,Wt=!g&&oi&&It?h:ut.right,li=!g&&rn&&Or?c:qt.left,ms=g?Zt(Gt,Lt,"after"):h),k(Cn,ut.top,Wt-Cn,ut.bottom),ut.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Xn(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function $a(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ql(e))}function Gl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Xn(e))},100)}function ql(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(lt(e,"focus",e,t),e.state.focused=!0,Pe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ul(e))}function Xn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(lt(e,"blur",e,t),e.state.focused=!1,Ae(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Ao(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,s=0,u=0;u.005||N<-.005)&&(ie.display.sizerWidth){var Q=Math.ceil(k/qn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(s)>2&&(t.scroller.scrollTop+=s)}function Ja(e){if(e.widgets)for(var t=0;t=u&&(s=C(t,Dr(we(t,h))-e.wrapper.clientHeight),u=h)}return{from:s,to:Math.max(u,s+1)}}function zd(e,t){if(!st(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,s=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(s.defaultView.innerHeight||s.documentElement.clientHeight)&&(i=!1),i!=null&&!M){var u=m("div","​",null,`position: absolute; + height: `+(Se-ye)+"px"))}function _(pe,ye,Te){var Se=we(i,pe),He=Se.text.length,Qe,kt;function it(pt,Gt){return Lo(e,K(pe,pt),"div",Se,Gt)}function Zt(pt,Gt,Lt){var mt=Ua(e,Se,null,pt),gt=Gt=="ltr"==(Lt=="after")?"left":"right",ut=Lt=="after"?mt.begin:mt.end-(/\s/.test(Se.text.charAt(mt.end-1))?2:1);return it(ut,gt)[gt]}var Ut=Me(Se,i.direction);return fr(Ut,ye||0,Te??He,function(pt,Gt,Lt,mt){var gt=Lt=="ltr",ut=it(pt,gt?"left":"right"),qt=it(Gt-1,gt?"right":"left"),oi=ye==null&&pt==0,rn=Te==null&&Gt==He,It=mt==0,Or=!Ut||mt==Ut.length-1;if(qt.top-ut.top<=3){var St=(g?oi:rn)&&It,vs=(g?rn:oi)&&Or,Rr=St?c:(gt?ut:qt).left,Sn=vs?h:(gt?qt:ut).right;k(Rr,ut.top,Sn-Rr,ut.bottom)}else{var Cn,Wt,li,ms;gt?(Cn=g&&oi&&It?c:ut.left,Wt=g?h:Zt(pt,Lt,"before"),li=g?c:Zt(Gt,Lt,"after"),ms=g&&rn&&Or?h:qt.right):(Cn=g?Zt(pt,Lt,"before"):c,Wt=!g&&oi&&It?h:ut.right,li=!g&&rn&&Or?c:qt.left,ms=g?Zt(Gt,Lt,"after"):h),k(Cn,ut.top,Wt-Cn,ut.bottom),ut.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Xn(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ya(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ql(e))}function Gl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Xn(e))},100)}function ql(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(lt(e,"focus",e,t),e.state.focused=!0,Pe(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ul(e))}function Xn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(lt(e,"blur",e,t),e.state.focused=!1,Ae(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Ao(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,s=0,u=0;u.005||N<-.005)&&(ie.display.sizerWidth){var Q=Math.ceil(k/qn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(s)>2&&(t.scroller.scrollTop+=s)}function $a(e){if(e.widgets)for(var t=0;t=u&&(s=C(t,Dr(we(t,h))-e.wrapper.clientHeight),u=h)}return{from:s,to:Math.max(u,s+1)}}function Kd(e,t){if(!st(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,s=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(s.defaultView.innerHeight||s.documentElement.clientHeight)&&(i=!1),i!=null&&!M){var u=m("div","​",null,`position: absolute; top: `+(t.top-n.viewOffset-_o(e.display))+`px; height: `+(t.bottom-t.top+Tr(e)+n.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(u),u.scrollIntoView(i),e.display.lineSpace.removeChild(u)}}}function Bd(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?K(t.line,t.ch+1,"before"):t,t=t.ch?K(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var s=0;s<5;s++){var u=!1,c=yr(e,t),h=!n||n==t?c:yr(e,n);i={left:Math.min(c.left,h.left),top:Math.min(c.top,h.top)-r,right:Math.max(c.left,h.left),bottom:Math.max(c.bottom,h.bottom)+r};var g=Xl(e,i),k=e.doc.scrollTop,_=e.doc.scrollLeft;if(g.scrollTop!=null&&(Pi(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(u=!0)),g.scrollLeft!=null&&(bn(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(u=!0)),!u)break}return i}function Kd(e,t){var n=Xl(e,t);n.scrollTop!=null&&Pi(e,n.scrollTop),n.scrollLeft!=null&&bn(e,n.scrollLeft)}function Xl(e,t){var n=e.display,r=Gn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,s=Il(e),u={};t.bottom-t.top>s&&(t.bottom=t.top+s);var c=e.doc.height+Nl(n),h=t.topc-r;if(t.topi+s){var k=Math.min(t.top,(g?c:t.bottom)-s);k!=i&&(u.scrollTop=k)}var _=e.options.fixedGutter?0:n.gutters.offsetWidth,F=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-_,N=gn(e)-n.gutters.offsetWidth,U=t.right-t.left>N;return U&&(t.right=t.left+N),t.left<10?u.scrollLeft=0:t.leftN+F-3&&(u.scrollLeft=t.right+(U?0:10)-N),u}function Yl(e,t){t!=null&&(Po(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Yn(e){Po(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ei(e,t,n){(t!=null||n!=null)&&Po(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function jd(e,t){Po(e),e.curOp.scrollToPos=t}function Po(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ja(e,t.from),r=ja(e,t.to);Za(e,n,r,t.margin)}}function Za(e,t,n,r){var i=Xl(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ei(e,i.scrollLeft,i.scrollTop)}function Pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(d||Jl(e,{top:t}),Va(e,t,!0),d&&Jl(e),Di(e,100))}function Va(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bn(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,nu(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ni(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Nl(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var xn=function(e,t,n){this.cm=n;var r=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),_e(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_e(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&L<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},xn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xn.prototype.zeroWidthHack=function(){var e=B&&!W?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Oe,this.disableVert=new Oe},xn.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),s=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);s!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},xn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function $n(e,t){t||(t=Ni(e));var n=e.display.barWidth,r=e.display.barHeight;Qa(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Ao(e),Qa(e,Ni(e)),n=e.display.barWidth,r=e.display.barHeight}function Qa(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var eu={native:xn,null:Ii};function tu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ae(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new eu[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),_e(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?bn(e,t):Pi(e,t)},e),e.display.scrollbars.addClass&&Pe(e.display.wrapper,e.display.scrollbars.addClass)}var Ud=0;function wn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ud,markArrays:null},wd(e.curOp)}function kn(e){var t=e.curOp;t&&Sd(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new No(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Xd(e){e.updatedDisplay=e.mustUpdate&&$l(e.cm,e.update)}function Yd(e){var t=e.cm,n=t.display;e.updatedDisplay&&Ao(t),e.barMeasure=Ni(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Da(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-gn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function $d(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ci(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(r.line>=e.display.viewFrom){var u=s.styles,c=s.text.length>e.options.maxHighlightLength?Cr(t.mode,r.state):null,h=ua(e,s,r,!0);c&&(r.state=c),s.styles=h.styles;var g=s.styleClasses,k=h.classes;k?s.styleClasses=k:g&&(s.styleClasses=null);for(var _=!u||u.length!=s.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),F=0;!_&&Fn)return Di(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jt(e,function(){for(var s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Xa(e)==0)return!1;iu(e)&&(Jr(e),t.dims=zl(e));var i=r.first+r.size,s=Math.max(t.visible.from-e.options.viewportMargin,r.first),u=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromu&&n.viewTo-u<20&&(u=Math.min(i,n.viewTo)),Ir&&(s=Ml(e.doc,s),u=Sa(e.doc,u));var c=s!=n.viewFrom||u!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wd(e,s,u),n.viewOffset=Dr(we(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var h=Xa(e);if(!c&&h==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var g=Qd(e);return h>4&&(n.lineDiv.style.display="none"),th(e,n.updateLineNumbers,t.dims),h>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,eh(g),j(n.cursorDiv),j(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Di(e,400)),n.updateLineNumbers=null,!0}function ru(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==gn(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Nl(e.display)-Il(e),n.top)}),t.visible=Eo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Eo(e.display,e.doc,n));if(!$l(e,t))break;Ao(e);var i=Ni(e);Ai(e),$n(e,i),Vl(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Jl(e,t){var n=new No(e,t);if($l(e,n)){Ao(e),ru(e,n);var r=Ni(e);Ai(e),$n(e,r),Vl(e,r),n.finish()}}function th(e,t,n){var r=e.display,i=e.options.lineNumbers,s=r.lineDiv,u=s.firstChild;function c(U){var Q=U.nextSibling;return w&&B&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var h=r.view,g=r.viewFrom,k=0;k-1&&(N=!1),Oa(e,_,g,n)),N&&(j(_.lineNumber),_.lineNumber.appendChild(document.createTextNode(oe(e.options,g)))),u=_.node.nextSibling}g+=_.size}for(;u;)u=c(u)}function Zl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",bt(e,"gutterChanged",e)}function Vl(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tr(e)+"px"}function nu(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Bl(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,s=r+"px",u=0;u=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&L<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!w&&!(d&&R)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ql(r.gutters,r.lineNumbers),ou(i),n.init(i)}var Io=0,Hr=null;b?Hr=-.53:d?Hr=15:E?Hr=-.7:V&&(Hr=-1/3);function lu(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function nh(e){var t=lu(e);return t.x*=Hr,t.y*=Hr,t}function su(e,t){E&&D==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=lu(t),r=n.x,i=n.y,s=Hr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,s=1);var u=e.display,c=u.scroller,h=c.scrollWidth>c.clientWidth,g=c.scrollHeight>c.clientHeight;if(r&&h||i&&g){if(i&&B&&w){e:for(var k=t.target,_=u.view;k!=c;k=k.parentNode)for(var F=0;F<_.length;F++)if(_[F].node==k){e.display.currentWheelTarget=k;break e}}if(r&&!d&&!X&&s!=null){i&&g&&Pi(e,Math.max(0,c.scrollTop+i*s)),bn(e,Math.max(0,c.scrollLeft+r*s)),(!i||i&&g)&&Pt(t),u.wheelStartX=null;return}if(i&&s!=null){var N=i*s,U=e.doc.scrollTop,Q=U+u.wrapper.clientHeight;N<0?U=Math.max(0,U+N-50):Q=Math.min(e.doc.height,Q+N+50),Jl(e,{top:U,bottom:Q})}Io<20&&t.deltaMode!==0&&(u.wheelStartX==null?(u.wheelStartX=c.scrollLeft,u.wheelStartY=c.scrollTop,u.wheelDX=r,u.wheelDY=i,setTimeout(function(){if(u.wheelStartX!=null){var se=c.scrollLeft-u.wheelStartX,he=c.scrollTop-u.wheelStartY,ve=he&&u.wheelDY&&he/u.wheelDY||se&&u.wheelDX&&se/u.wheelDX;u.wheelStartX=u.wheelStartY=null,ve&&(Hr=(Hr*Io+ve)/(Io+1),++Io)}},200)):(u.wheelDX+=r,u.wheelDY+=i))}}var or=function(e,t){this.ranges=e,this.primIndex=t};or.prototype.primary=function(){return this.ranges[this.primIndex]},or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&ge(e,r.to())<=0)return n}return-1};var Xe=function(e,t){this.anchor=e,this.head=t};Xe.prototype.from=function(){return Bn(this.anchor,this.head)},Xe.prototype.to=function(){return Bt(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function br(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(F,N){return ge(F.from(),N.from())}),n=xe(t,i);for(var s=1;s0:h>=0){var g=Bn(c.from(),u.from()),k=Bt(c.to(),u.to()),_=c.empty()?u.from()==u.head:c.from()==c.head;s<=n&&--n,t.splice(--s,2,new Xe(_?k:g,_?g:k))}}return new or(t,n)}function Zr(e,t){return new or([new Xe(e,t||e)],0)}function Vr(e){return e.text?K(e.from.line+e.text.length-1,J(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function au(e,t){if(ge(e,t.from)<0)return e;if(ge(e,t.to)<=0)return Vr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Vr(t).ch-t.to.ch),K(n,r)}function es(e,t){for(var n=[],r=0;r1&&e.remove(c.line+1,U-1),e.insert(c.line+1,he)}bt(e,"change",e,t)}function Qr(e,t,n){function r(i,s,u){if(i.linked)for(var c=0;c1&&!e.done[e.done.length-2].ranges)return e.done.pop(),J(e.done)}function pu(e,t,n,r){var i=e.history;i.undone.length=0;var s=+new Date,u,c;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(u=lh(i,i.lastOp==r)))c=J(u.changes),ge(t.from,t.to)==0&&ge(t.from,c.to)==0?c.to=Vr(t):u.changes.push(ns(e,t));else{var h=J(i.done);for((!h||!h.ranges)&&Fo(e.sel,i.done),u={changes:[ns(e,t)],generation:i.generation},i.done.push(u);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,c||lt(e,"historyAdded")}function sh(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ah(e,t,n,r){var i=e.history,s=r&&r.origin;n==i.lastSelOp||s&&i.lastSelOrigin==s&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==s||sh(e,s,J(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=s,i.lastSelOp=n,r&&r.clearRedo!==!1&&hu(i.undone)}function Fo(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function gu(e,t,n,r){var i=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(u){u.markedSpans&&((i||(i=t["spans_"+e.id]={}))[s]=u.markedSpans),++s})}function uh(e){if(!e)return null;for(var t,n=0;n-1&&(J(c)[_]=g[_],delete g[_])}}return r}function is(e,t,n,r){if(r){var i=e.anchor;if(n){var s=ge(t,i)<0;s!=ge(n,i)<0?(i=t,t=n):s!=ge(t,n)<0&&(t=n)}return new Xe(i,t)}else return new Xe(n||t,t)}function Ho(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Nt(e,new or([is(e.sel.primary(),t,n,i)],0),r)}function mu(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),s=0;s=t.ch:c.to>t.ch))){if(i&&(lt(h,"beforeCursorEnter"),h.explicitlyCleared))if(s.markedSpans){--u;continue}else break;if(!h.atomic)continue;if(n){var _=h.find(r<0?1:-1),F=void 0;if((r<0?k:g)&&(_=Su(e,_,-r,_&&_.line==t.line?s:null)),_&&_.line==t.line&&(F=ge(_,n))&&(r<0?F<0:F>0))return Zn(e,_,t,r,i)}var N=h.find(r<0?-1:1);return(r<0?g:k)&&(N=Su(e,N,r,N.line==t.line?s:null)),N?Zn(e,N,t,r,i):null}}return t}function Ro(e,t,n,r,i){var s=r||1,u=Zn(e,t,n,s,i)||!i&&Zn(e,t,n,s,!0)||Zn(e,t,n,-s,i)||!i&&Zn(e,t,n,-s,!0);return u||(e.cantEdit=!0,K(e.first,0))}function Su(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ie(e,K(t.line-1)):null:n>0&&t.ch==(r||we(e,t.line)).text.length?t.line=0;--i)Tu(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Tu(e,t)}}function Tu(e,t){if(!(t.text.length==1&&t.text[0]==""&&ge(t.from,t.to)==0)){var n=es(e,t);pu(e,t,n,e.cm?e.cm.curOp.id:NaN),Wi(e,t,n,Ll(e,t));var r=[];Qr(e,function(i,s){!s&&xe(r,i.history)==-1&&(Au(i.history,t),r.push(i.history)),Wi(i,t,null,Ll(i,t))})}}function zo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,s,u=e.sel,c=t=="undo"?i.done:i.undone,h=t=="undo"?i.undone:i.done,g=0;g=0;--N){var U=F(N);if(U)return U.v}}}}function Lu(e,t){if(t!=0&&(e.first+=t,e.sel=new or(te(e.sel.ranges,function(i){return new Xe(K(i.anchor.line+t,i.anchor.ch),K(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Kt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lines&&(t={from:t.from,to:K(s,we(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Nr(e,t.from,t.to),n||(n=es(e,t)),e.cm?dh(e.cm,t,r):rs(e,t,r),Wo(e,n,I),e.cantEdit&&Ro(e,K(e.firstLine(),0))&&(e.cantEdit=!1)}}function dh(e,t,n){var r=e.doc,i=e.display,s=t.from,u=t.to,c=!1,h=s.line;e.options.lineWrapping||(h=v(mr(we(r,s.line))),r.iter(h,u.line+1,function(N){if(N==i.maxLine)return c=!0,!0})),r.sel.contains(t.from,t.to)>-1&&lr(e),rs(r,t,n,qa(e)),e.options.lineWrapping||(r.iter(h,s.line+t.text.length,function(N){var U=So(N);U>i.maxLineLength&&(i.maxLine=N,i.maxLineLength=U,i.maxLineChanged=!0,c=!1)}),c&&(e.curOp.updateMaxLine=!0)),td(r,s.line),Di(e,400);var g=t.text.length-(u.line-s.line)-1;t.full?Kt(e):s.line==u.line&&t.text.length==1&&!fu(e.doc,t)?$r(e,s.line,"text"):Kt(e,s.line,u.line+1,g);var k=$t(e,"changes"),_=$t(e,"change");if(_||k){var F={from:s,to:u,text:t.text,removed:t.removed,origin:t.origin};_&&bt(e,"change",e,F),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(F)}e.display.selForContextMenu=null}function Qn(e,t,n,r,i){var s;r||(r=n),ge(r,n)<0&&(s=[r,n],n=s[0],r=s[1]),typeof t=="string"&&(t=e.splitLines(t)),Vn(e,{from:n,to:r,text:t,origin:i})}function Ou(e,t,n,r){n1||!(this.children[0]instanceof zi))){var c=[];this.collapse(c),this.children=[new zi(c)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var u=i.lines.length%25+25,c=u;c10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Kt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wu(e.doc)),e&&bt(e,"markerCleared",e,this,r,i),t&&kn(e),this.parent&&this.parent.clear()}},en.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||u==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=re("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ka(e,t.line,t,n,s)||t.line!=n.line&&ka(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");nd()}s.addToHistory&&pu(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var c=t.line,h=e.cm,g;if(e.iter(c,n.line+1,function(_){h&&s.collapsed&&!h.options.lineWrapping&&mr(_)==h.display.maxLine&&(g=!0),s.collapsed&&c!=t.line&&ir(_,0),od(_,new bo(s,c==t.line?t.ch:null,c==n.line?n.ch:null),e.cm&&e.cm.curOp),++c}),s.collapsed&&e.iter(t.line,n.line+1,function(_){Yr(e,_)&&ir(_,0)}),s.clearOnEnter&&_e(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(rd(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Pu,s.atomic=!0),h){if(g&&(h.curOp.updateMaxLine=!0),s.collapsed)Kt(h,t.line,n.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var k=t.line;k<=n.line;k++)$r(h,k,"text");s.atomic&&wu(h.doc),bt(h,"markerAdded",h,s)}return s}var ji=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;h--)Vn(this,r[h]);c?bu(this,c):this.cm&&Yn(this.cm)}),undo:wt(function(){zo(this,"undo")}),redo:wt(function(){zo(this,"redo")}),undoSelection:wt(function(){zo(this,"undo",!0)}),redoSelection:wt(function(){zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ie(this,e),t=Ie(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(s){var u=s.markedSpans;if(u)for(var c=0;c=h.to||h.from==null&&i!=e.line||h.from!=null&&i==t.line&&h.from>=t.ch)&&(!n||n(h.marker))&&r.push(h.marker.parent||h.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=s,++n}),Ie(this,K(n,t))},indexFromPos:function(e){e=Ie(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var k=e.dataTransfer.getData("Text");if(k){var _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Wo(t.doc,Zr(n,n)),_)for(var F=0;F<_.length;++F)Qn(t.doc,"",_[F].anchor,_[F].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function bh(e,t){if(b&&(!e.state.draggingText||+new Date-Iu<100)){Ur(t);return}if(!(st(e,t)||Fr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!V)){var n=m("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",X&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),X&&n.parentNode.removeChild(n)}}function xh(e,t){var n=mn(e,t);if(n){var r=document.createDocumentFragment();jl(e,n,r),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ne(e.display.dragCursor,r)}}function Du(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Fu(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r=0;c--)Qn(e.doc,"",r[c].from,r[c].to,"+delete");Yn(e)})}function ls(e,t,n){var r=vt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ss(e,t,n){var r=ls(e,t.ch,n);return r==null?null:new K(t.line,r,n<0?"after":"before")}function as(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var s=Me(n,t.doc.direction);if(s){var u=i<0?J(s):s[0],c=i<0==(u.level==1),h=c?"after":"before",g;if(u.level>0||t.doc.direction=="rtl"){var k=Un(t,n);g=i<0?n.text.length-1:0;var _=Lr(t,k,g).top;g=Mt(function(F){return Lr(t,k,F).top==_},i<0==(u.level==1)?u.from:u.to-1,g),h=="before"&&(g=ls(n,g,1))}else g=i<0?u.to:u.from;return new K(r,g,h)}}return new K(r,i<0?n.text.length:0,i<0?"before":"after")}function Th(e,t,n,r){var i=Me(t,e.doc.direction);if(!i)return ss(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var s=cr(i,n.ch,n.sticky),u=i[s];if(e.doc.direction=="ltr"&&u.level%2==0&&(r>0?u.to>n.ch:u.from=u.from&&F>=k.begin)){var N=_?"before":"after";return new K(n.line,F,N)}}var U=function(he,ve,pe){for(var ye=function(Qe,kt){return kt?new K(n.line,c(Qe,1),"before"):new K(n.line,Qe,"after")};he>=0&&he0==(Te.level!=1),He=Se?pe.begin:c(pe.end,-1);if(Te.from<=He&&He0?k.end:c(k.begin,-1);return se!=null&&!(r>0&&se==t.text.length)&&(Q=U(r>0?0:i.length-1,r,g(se)),Q)?Q:null}var qi={selectAll:Cu,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),I)},killLine:function(e){return ri(e,function(t){if(t.empty()){var n=we(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new K(i.line,i.ch+1),e.replaceRange(s.charAt(i.ch-1)+s.charAt(i.ch-2),K(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var u=we(e.doc,i.line-1).text;u&&(i=new K(i.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+u.charAt(u.length-1),K(i.line-1,u.length-1),i,"+transpose"))}}n.push(new Xe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Jt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&ge(t,this.pos)==0&&n==this.button};var Yi,$i;function Nh(e,t){var n=+new Date;return $i&&$i.compare(n,e,t)?(Yi=$i=null,"triple"):Yi&&Yi.compare(n,e,t)?($i=new fs(n,e,t),Yi=null,"double"):(Yi=new fs(n,e,t),$i=null,"single")}function Yu(e){var t=this,n=t.display;if(!(st(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Fr(n,e)){w||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!cs(t,e)){var r=mn(t,e),i=hr(e),s=r?Nh(r,i):"single";Ce(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Ih(t,i,r,s,e))&&(i==1?r?Fh(t,r,s,e):xi(e)==n.scroller&&Pt(e):i==2?(r&&Ho(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(me?t.display.input.onContextMenu(e):Gl(t)))}}}function Ih(e,t,n,r,i){var s="Click";return r=="double"?s="Double"+s:r=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,Xi(e,Ru(s,i),i,function(u){if(typeof u=="string"&&(u=qi[u]),!u)return!1;var c=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),c=u(e,n)!=A}finally{e.state.suppressEdits=!1}return c})}function Dh(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var s=ee?n.shiftKey&&n.metaKey:n.altKey;i.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=B?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(B?n.altKey:n.ctrlKey)),i}function Fh(e,t,n,r){b?setTimeout(Le($a,e),0):e.curOp.focus=Ee(ht(e));var i=Dh(e,n,r),s=e.doc.sel,u;e.options.dragDrop&&Sl&&!e.isReadOnly()&&n=="single"&&(u=s.contains(t))>-1&&(ge((u=s.ranges[u]).from(),t)<0||t.xRel>0)&&(ge(u.to(),t)>0||t.xRel<0)?Hh(e,r,t,i):Wh(e,r,t,i)}function Hh(e,t,n,r){var i=e.display,s=!1,u=xt(e,function(g){w&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Gl(e)),Et(i.wrapper.ownerDocument,"mouseup",u),Et(i.wrapper.ownerDocument,"mousemove",c),Et(i.scroller,"dragstart",h),Et(i.scroller,"drop",u),s||(Pt(g),r.addNew||Ho(e.doc,n,null,null,r.extend),w&&!V||b&&L==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(g){s=s||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},h=function(){return s=!0};w&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,_e(i.wrapper.ownerDocument,"mouseup",u),_e(i.wrapper.ownerDocument,"mousemove",c),_e(i.scroller,"dragstart",h),_e(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function $u(e,t,n){if(n=="char")return new Xe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Xe(K(t.line,0),Ie(e.doc,K(t.line+1,0)));var r=n(e,t);return new Xe(r.from,r.to)}function Wh(e,t,n,r){b&&Gl(e);var i=e.display,s=e.doc;Pt(t);var u,c,h=s.sel,g=h.ranges;if(r.addNew&&!r.extend?(c=s.sel.contains(n),c>-1?u=g[c]:u=new Xe(n,n)):(u=s.sel.primary(),c=s.sel.primIndex),r.unit=="rectangle")r.addNew||(u=new Xe(n,n)),n=mn(e,t,!0,!0),c=-1;else{var k=$u(e,n,r.unit);r.extend?u=is(u,k.anchor,k.head,r.extend):u=k}r.addNew?c==-1?(c=g.length,Nt(s,br(e,g.concat([u]),c),{scroll:!1,origin:"*mouse"})):g.length>1&&g[c].empty()&&r.unit=="char"&&!r.extend?(Nt(s,br(e,g.slice(0,c).concat(g.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),h=s.sel):os(s,c,u,G):(c=0,Nt(s,new or([u],0),G),h=s.sel);var _=n;function F(pe){if(ge(_,pe)!=0)if(_=pe,r.unit=="rectangle"){for(var ye=[],Te=e.options.tabSize,Se=ze(we(s,n.line).text,n.ch,Te),He=ze(we(s,pe.line).text,pe.ch,Te),Qe=Math.min(Se,He),kt=Math.max(Se,He),it=Math.min(n.line,pe.line),Zt=Math.min(e.lastLine(),Math.max(n.line,pe.line));it<=Zt;it++){var Ut=we(s,it).text,pt=Z(Ut,Qe,Te);Qe==kt?ye.push(new Xe(K(it,pt),K(it,pt))):Ut.length>pt&&ye.push(new Xe(K(it,pt),K(it,Z(Ut,kt,Te))))}ye.length||ye.push(new Xe(n,n)),Nt(s,br(e,h.ranges.slice(0,c).concat(ye),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var Gt=u,Lt=$u(e,pe,r.unit),mt=Gt.anchor,gt;ge(Lt.anchor,mt)>0?(gt=Lt.head,mt=Bn(Gt.from(),Lt.anchor)):(gt=Lt.anchor,mt=Bt(Gt.to(),Lt.head));var ut=h.ranges.slice(0);ut[c]=Rh(e,new Xe(Ie(s,mt),gt)),Nt(s,br(e,ut,c),G)}}var N=i.wrapper.getBoundingClientRect(),U=0;function Q(pe){var ye=++U,Te=mn(e,pe,!0,r.unit=="rectangle");if(Te)if(ge(Te,_)!=0){e.curOp.focus=Ee(ht(e)),F(Te);var Se=Eo(i,s);(Te.line>=Se.to||Te.lineN.bottom?20:0;He&&setTimeout(xt(e,function(){U==ye&&(i.scroller.scrollTop+=He,Q(pe))}),50)}}function se(pe){e.state.selectingText=!1,U=1/0,pe&&(Pt(pe),i.input.focus()),Et(i.wrapper.ownerDocument,"mousemove",he),Et(i.wrapper.ownerDocument,"mouseup",ve),s.history.lastSelOrigin=null}var he=xt(e,function(pe){pe.buttons===0||!hr(pe)?se(pe):Q(pe)}),ve=xt(e,se);e.state.selectingText=ve,_e(i.wrapper.ownerDocument,"mousemove",he),_e(i.wrapper.ownerDocument,"mouseup",ve)}function Rh(e,t){var n=t.anchor,r=t.head,i=we(e.doc,n.line);if(ge(n,r)==0&&n.sticky==r.sticky)return t;var s=Me(i);if(!s)return t;var u=cr(s,n.ch,n.sticky),c=s[u];if(c.from!=n.ch&&c.to!=n.ch)return t;var h=u+(c.from==n.ch==(c.level!=1)?0:1);if(h==0||h==s.length)return t;var g;if(r.line!=n.line)g=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=cr(s,r.ch,r.sticky),_=k-u||(r.ch-n.ch)*(c.level==1?-1:1);k==h-1||k==h?g=_<0:g=_>0}var F=s[h+(g?-1:0)],N=g==(F.level==1),U=N?F.from:F.to,Q=N?"after":"before";return n.ch==U&&n.sticky==Q?t:new Xe(new K(n.line,U,Q),r)}function Ju(e,t,n,r){var i,s;if(t.touches)i=t.touches[0].clientX,s=t.touches[0].clientY;else try{i=t.clientX,s=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Pt(t);var u=e.display,c=u.lineDiv.getBoundingClientRect();if(s>c.bottom||!$t(e,n))return zt(t);s-=c.top-u.viewOffset;for(var h=0;h=i){var k=C(e.doc,s),_=e.display.gutterSpecs[h];return lt(e,n,e,k,_.className,t),zt(t)}}}function cs(e,t){return Ju(e,t,"gutterClick",!0)}function Zu(e,t){Fr(e.display,t)||zh(e,t)||st(e,t,"contextmenu")||me||e.display.input.onContextMenu(t)}function zh(e,t){return $t(e,"gutterContextMenu")?Ju(e,t,"gutterContextMenu",!1):!1}function Vu(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mi(e)}var ni={toString:function(){return"CodeMirror.Init"}},Qu={},Uo={};function Bh(e){var t=e.optionHandlers;function n(r,i,s,u){e.defaults[r]=i,s&&(t[r]=u?function(c,h,g){g!=ni&&s(c,h,g)}:s)}e.defineOption=n,e.Init=ni,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,ts(r)},!0),n("indentUnit",2,ts,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Hi(r),Mi(r),Kt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var s=[],u=r.doc.first;r.doc.iter(function(h){for(var g=0;;){var k=h.text.indexOf(i,g);if(k==-1)break;g=k+i.length,s.push(K(u,k))}u++});for(var c=s.length-1;c>=0;c--)Qn(r.doc,i,s[c],K(s[c].line,s[c].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,s){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),s!=ni&&r.refresh()}),n("specialCharPlaceholder",vd,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",R?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!fe),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Vu(r),Fi(r)},!0),n("keyMap","default",function(r,i,s){var u=Ko(i),c=s!=ni&&Ko(s);c&&c.detach&&c.detach(r,u),u.attach&&u.attach(r,c||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,jh,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ql(i,r.options.lineNumbers),Fi(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Bl(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return $n(r)},!0),n("scrollbarStyle","native",function(r){tu(r),$n(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ql(r.options.gutters,i),Fi(r)},!0),n("firstLineNumber",1,Fi,!0),n("lineNumberFormatter",function(r){return r},Fi,!0),n("showCursorWhenSelecting",!1,Ai,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Xn(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Kh),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Ai,!0),n("singleCursorHeightPerLine",!0,Ai,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Hi,!0),n("addModeClass",!1,Hi,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Hi,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Kh(e,t,n){var r=n&&n!=ni;if(!t!=!r){var i=e.display.dragFunctions,s=t?_e:Et;s(e.display.scroller,"dragstart",i.start),s(e.display.scroller,"dragenter",i.enter),s(e.display.scroller,"dragover",i.over),s(e.display.scroller,"dragleave",i.leave),s(e.display.scroller,"drop",i.drop)}}function jh(e){e.options.lineWrapping?(Pe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ae(e.display.wrapper,"CodeMirror-wrap"),El(e)),Kl(e),Kt(e),Mi(e),setTimeout(function(){return $n(e)},100)}function tt(e,t){var n=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?Ne(t):{},Ne(Qu,t,!1);var r=t.value;typeof r=="string"?r=new jt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new tt.inputStyles[t.inputStyle](this),s=this.display=new rh(e,r,i,t);s.wrapper.CodeMirror=this,Vu(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),tu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Oe,keySeq:null,specialChars:null},t.autofocus&&!R&&s.input.focus(),b&&L<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Uh(this),wh(),wn(this),this.curOp.forceUpdate=!0,cu(this,r),t.autofocus&&!R||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ql(n)},20):Xn(this);for(var u in Uo)Uo.hasOwnProperty(u)&&Uo[u](this,t[u],ni);iu(this),t.finishInit&&t.finishInit(this);for(var c=0;c20*20}_e(t.scroller,"touchstart",function(h){if(!st(e,h)&&!s(h)&&!cs(e,h)){t.input.ensurePolled(),clearTimeout(n);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-r.end<=300?r:null},h.touches.length==1&&(t.activeTouch.left=h.touches[0].pageX,t.activeTouch.top=h.touches[0].pageY)}}),_e(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_e(t.scroller,"touchend",function(h){var g=t.activeTouch;if(g&&!Fr(t,h)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),_;!g.prev||u(g,g.prev)?_=new Xe(k,k):!g.prev.prev||u(g,g.prev.prev)?_=e.findWordAt(k):_=new Xe(K(k.line,0),Ie(e.doc,K(k.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),Pt(h)}i()}),_e(t.scroller,"touchcancel",i),_e(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Pi(e,t.scroller.scrollTop),bn(e,t.scroller.scrollLeft,!0),lt(e,"scroll",e))}),_e(t.scroller,"mousewheel",function(h){return su(e,h)}),_e(t.scroller,"DOMMouseScroll",function(h){return su(e,h)}),_e(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(h){st(e,h)||Ur(h)},over:function(h){st(e,h)||(xh(e,h),Ur(h))},start:function(h){return bh(e,h)},drop:xt(e,yh),leave:function(h){st(e,h)||Du(e)}};var c=t.input.getField();_e(c,"keyup",function(h){return qu.call(e,h)}),_e(c,"keydown",xt(e,Gu)),_e(c,"keypress",xt(e,Xu)),_e(c,"focus",function(h){return ql(e,h)}),_e(c,"blur",function(h){return Xn(e,h)})}var ds=[];tt.defineInitHook=function(e){return ds.push(e)};function Ji(e,t,n,r){var i=e.doc,s;n==null&&(n="add"),n=="smart"&&(i.mode.indent?s=Ci(e,t).state:n="prev");var u=e.options.tabSize,c=we(i,t),h=ze(c.text,null,u);c.stateAfter&&(c.stateAfter=null);var g=c.text.match(/^\s*/)[0],k;if(!r&&!/\S/.test(c.text))k=0,n="not";else if(n=="smart"&&(k=i.mode.indent(s,c.text.slice(g.length),c.text),k==A||k>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?k=ze(we(i,t-1).text,null,u):k=0:n=="add"?k=h+e.options.indentUnit:n=="subtract"?k=h-e.options.indentUnit:typeof n=="number"&&(k=h+n),k=Math.max(0,k);var _="",F=0;if(e.options.indentWithTabs)for(var N=Math.floor(k/u);N;--N)F+=u,_+=" ";if(Fu,h=sr(t),g=null;if(c&&r.ranges.length>1)if(xr&&xr.text.join(` + left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(u),u.scrollIntoView(i),e.display.lineSpace.removeChild(u)}}}function jd(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?K(t.line,t.ch+1,"before"):t,t=t.ch?K(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var s=0;s<5;s++){var u=!1,c=yr(e,t),h=!n||n==t?c:yr(e,n);i={left:Math.min(c.left,h.left),top:Math.min(c.top,h.top)-r,right:Math.max(c.left,h.left),bottom:Math.max(c.bottom,h.bottom)+r};var g=Xl(e,i),k=e.doc.scrollTop,_=e.doc.scrollLeft;if(g.scrollTop!=null&&(Pi(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(u=!0)),g.scrollLeft!=null&&(bn(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(u=!0)),!u)break}return i}function Ud(e,t){var n=Xl(e,t);n.scrollTop!=null&&Pi(e,n.scrollTop),n.scrollLeft!=null&&bn(e,n.scrollLeft)}function Xl(e,t){var n=e.display,r=Gn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,s=Il(e),u={};t.bottom-t.top>s&&(t.bottom=t.top+s);var c=e.doc.height+Nl(n),h=t.topc-r;if(t.topi+s){var k=Math.min(t.top,(g?c:t.bottom)-s);k!=i&&(u.scrollTop=k)}var _=e.options.fixedGutter?0:n.gutters.offsetWidth,F=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-_,N=gn(e)-n.gutters.offsetWidth,U=t.right-t.left>N;return U&&(t.right=t.left+N),t.left<10?u.scrollLeft=0:t.leftN+F-3&&(u.scrollLeft=t.right+(U?0:10)-N),u}function Yl(e,t){t!=null&&(Po(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Yn(e){Po(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ei(e,t,n){(t!=null||n!=null)&&Po(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Gd(e,t){Po(e),e.curOp.scrollToPos=t}function Po(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Ka(e,t.from),r=Ka(e,t.to);Ja(e,n,r,t.margin)}}function Ja(e,t,n,r){var i=Xl(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ei(e,i.scrollLeft,i.scrollTop)}function Pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(d||Jl(e,{top:t}),Za(e,t,!0),d&&Jl(e),Di(e,100))}function Za(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bn(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ru(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ni(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Nl(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var xn=function(e,t,n){this.cm=n;var r=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),_e(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),_e(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&L<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},xn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xn.prototype.zeroWidthHack=function(){var e=B&&!W?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Oe,this.disableVert=new Oe},xn.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),s=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);s!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},xn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function $n(e,t){t||(t=Ni(e));var n=e.display.barWidth,r=e.display.barHeight;Va(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Ao(e),Va(e,Ni(e)),n=e.display.barWidth,r=e.display.barHeight}function Va(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var Qa={native:xn,null:Ii};function eu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ae(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Qa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),_e(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?bn(e,t):Pi(e,t)},e),e.display.scrollbars.addClass&&Pe(e.display.wrapper,e.display.scrollbars.addClass)}var qd=0;function wn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qd,markArrays:null},Sd(e.curOp)}function kn(e){var t=e.curOp;t&&_d(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new No(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function $d(e){e.updatedDisplay=e.mustUpdate&&$l(e.cm,e.update)}function Jd(e){var t=e.cm,n=t.display;e.updatedDisplay&&Ao(t),e.barMeasure=Ni(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ia(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-gn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Zd(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ci(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(r.line>=e.display.viewFrom){var u=s.styles,c=s.text.length>e.options.maxHighlightLength?Cr(t.mode,r.state):null,h=aa(e,s,r,!0);c&&(r.state=c),s.styles=h.styles;var g=s.styleClasses,k=h.classes;k?s.styleClasses=k:g&&(s.styleClasses=null);for(var _=!u||u.length!=s.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),F=0;!_&&Fn)return Di(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Jt(e,function(){for(var s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&qa(e)==0)return!1;nu(e)&&(Jr(e),t.dims=zl(e));var i=r.first+r.size,s=Math.max(t.visible.from-e.options.viewportMargin,r.first),u=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromu&&n.viewTo-u<20&&(u=Math.min(i,n.viewTo)),Ir&&(s=Ml(e.doc,s),u=ka(e.doc,u));var c=s!=n.viewFrom||u!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zd(e,s,u),n.viewOffset=Dr(we(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var h=qa(e);if(!c&&h==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var g=th(e);return h>4&&(n.lineDiv.style.display="none"),nh(e,n.updateLineNumbers,t.dims),h>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,rh(g),j(n.cursorDiv),j(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Di(e,400)),n.updateLineNumbers=null,!0}function tu(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==gn(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Nl(e.display)-Il(e),n.top)}),t.visible=Eo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Eo(e.display,e.doc,n));if(!$l(e,t))break;Ao(e);var i=Ni(e);Ai(e),$n(e,i),Vl(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Jl(e,t){var n=new No(e,t);if($l(e,n)){Ao(e),tu(e,n);var r=Ni(e);Ai(e),$n(e,r),Vl(e,r),n.finish()}}function nh(e,t,n){var r=e.display,i=e.options.lineNumbers,s=r.lineDiv,u=s.firstChild;function c(U){var Q=U.nextSibling;return w&&B&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var h=r.view,g=r.viewFrom,k=0;k-1&&(N=!1),La(e,_,g,n)),N&&(j(_.lineNumber),_.lineNumber.appendChild(document.createTextNode(oe(e.options,g)))),u=_.node.nextSibling}g+=_.size}for(;u;)u=c(u)}function Zl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",bt(e,"gutterChanged",e)}function Vl(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tr(e)+"px"}function ru(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Bl(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,s=r+"px",u=0;u=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&L<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!w&&!(d&&R)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Ql(r.gutters,r.lineNumbers),iu(i),n.init(i)}var Io=0,Hr=null;b?Hr=-.53:d?Hr=15:E?Hr=-.7:V&&(Hr=-1/3);function ou(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function oh(e){var t=ou(e);return t.x*=Hr,t.y*=Hr,t}function lu(e,t){E&&D==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=ou(t),r=n.x,i=n.y,s=Hr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,s=1);var u=e.display,c=u.scroller,h=c.scrollWidth>c.clientWidth,g=c.scrollHeight>c.clientHeight;if(r&&h||i&&g){if(i&&B&&w){e:for(var k=t.target,_=u.view;k!=c;k=k.parentNode)for(var F=0;F<_.length;F++)if(_[F].node==k){e.display.currentWheelTarget=k;break e}}if(r&&!d&&!X&&s!=null){i&&g&&Pi(e,Math.max(0,c.scrollTop+i*s)),bn(e,Math.max(0,c.scrollLeft+r*s)),(!i||i&&g)&&Pt(t),u.wheelStartX=null;return}if(i&&s!=null){var N=i*s,U=e.doc.scrollTop,Q=U+u.wrapper.clientHeight;N<0?U=Math.max(0,U+N-50):Q=Math.min(e.doc.height,Q+N+50),Jl(e,{top:U,bottom:Q})}Io<20&&t.deltaMode!==0&&(u.wheelStartX==null?(u.wheelStartX=c.scrollLeft,u.wheelStartY=c.scrollTop,u.wheelDX=r,u.wheelDY=i,setTimeout(function(){if(u.wheelStartX!=null){var se=c.scrollLeft-u.wheelStartX,he=c.scrollTop-u.wheelStartY,ve=he&&u.wheelDY&&he/u.wheelDY||se&&u.wheelDX&&se/u.wheelDX;u.wheelStartX=u.wheelStartY=null,ve&&(Hr=(Hr*Io+ve)/(Io+1),++Io)}},200)):(u.wheelDX+=r,u.wheelDY+=i))}}var or=function(e,t){this.ranges=e,this.primIndex=t};or.prototype.primary=function(){return this.ranges[this.primIndex]},or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&ge(e,r.to())<=0)return n}return-1};var Xe=function(e,t){this.anchor=e,this.head=t};Xe.prototype.from=function(){return Bn(this.anchor,this.head)},Xe.prototype.to=function(){return Bt(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function br(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(F,N){return ge(F.from(),N.from())}),n=xe(t,i);for(var s=1;s0:h>=0){var g=Bn(c.from(),u.from()),k=Bt(c.to(),u.to()),_=c.empty()?u.from()==u.head:c.from()==c.head;s<=n&&--n,t.splice(--s,2,new Xe(_?k:g,_?g:k))}}return new or(t,n)}function Zr(e,t){return new or([new Xe(e,t||e)],0)}function Vr(e){return e.text?K(e.from.line+e.text.length-1,J(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function su(e,t){if(ge(e,t.from)<0)return e;if(ge(e,t.to)<=0)return Vr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Vr(t).ch-t.to.ch),K(n,r)}function es(e,t){for(var n=[],r=0;r1&&e.remove(c.line+1,U-1),e.insert(c.line+1,he)}bt(e,"change",e,t)}function Qr(e,t,n){function r(i,s,u){if(i.linked)for(var c=0;c1&&!e.done[e.done.length-2].ranges)return e.done.pop(),J(e.done)}function hu(e,t,n,r){var i=e.history;i.undone.length=0;var s=+new Date,u,c;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(u=ah(i,i.lastOp==r)))c=J(u.changes),ge(t.from,t.to)==0&&ge(t.from,c.to)==0?c.to=Vr(t):u.changes.push(ns(e,t));else{var h=J(i.done);for((!h||!h.ranges)&&Fo(e.sel,i.done),u={changes:[ns(e,t)],generation:i.generation},i.done.push(u);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,c||lt(e,"historyAdded")}function uh(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fh(e,t,n,r){var i=e.history,s=r&&r.origin;n==i.lastSelOp||s&&i.lastSelOrigin==s&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==s||uh(e,s,J(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=s,i.lastSelOp=n,r&&r.clearRedo!==!1&&du(i.undone)}function Fo(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pu(e,t,n,r){var i=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(u){u.markedSpans&&((i||(i=t["spans_"+e.id]={}))[s]=u.markedSpans),++s})}function ch(e){if(!e)return null;for(var t,n=0;n-1&&(J(c)[_]=g[_],delete g[_])}}return r}function is(e,t,n,r){if(r){var i=e.anchor;if(n){var s=ge(t,i)<0;s!=ge(n,i)<0?(i=t,t=n):s!=ge(t,n)<0&&(t=n)}return new Xe(i,t)}else return new Xe(n||t,t)}function Ho(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Nt(e,new or([is(e.sel.primary(),t,n,i)],0),r)}function vu(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),s=0;s=t.ch:c.to>t.ch))){if(i&&(lt(h,"beforeCursorEnter"),h.explicitlyCleared))if(s.markedSpans){--u;continue}else break;if(!h.atomic)continue;if(n){var _=h.find(r<0?1:-1),F=void 0;if((r<0?k:g)&&(_=ku(e,_,-r,_&&_.line==t.line?s:null)),_&&_.line==t.line&&(F=ge(_,n))&&(r<0?F<0:F>0))return Zn(e,_,t,r,i)}var N=h.find(r<0?-1:1);return(r<0?g:k)&&(N=ku(e,N,r,N.line==t.line?s:null)),N?Zn(e,N,t,r,i):null}}return t}function Ro(e,t,n,r,i){var s=r||1,u=Zn(e,t,n,s,i)||!i&&Zn(e,t,n,s,!0)||Zn(e,t,n,-s,i)||!i&&Zn(e,t,n,-s,!0);return u||(e.cantEdit=!0,K(e.first,0))}function ku(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ie(e,K(t.line-1)):null:n>0&&t.ch==(r||we(e,t.line)).text.length?t.line=0;--i)_u(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else _u(e,t)}}function _u(e,t){if(!(t.text.length==1&&t.text[0]==""&&ge(t.from,t.to)==0)){var n=es(e,t);hu(e,t,n,e.cm?e.cm.curOp.id:NaN),Wi(e,t,n,Ll(e,t));var r=[];Qr(e,function(i,s){!s&&xe(r,i.history)==-1&&(Mu(i.history,t),r.push(i.history)),Wi(i,t,null,Ll(i,t))})}}function zo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,s,u=e.sel,c=t=="undo"?i.done:i.undone,h=t=="undo"?i.undone:i.done,g=0;g=0;--N){var U=F(N);if(U)return U.v}}}}function Tu(e,t){if(t!=0&&(e.first+=t,e.sel=new or(te(e.sel.ranges,function(i){return new Xe(K(i.anchor.line+t,i.anchor.ch),K(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Kt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lines&&(t={from:t.from,to:K(s,we(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Nr(e,t.from,t.to),n||(n=es(e,t)),e.cm?ph(e.cm,t,r):rs(e,t,r),Wo(e,n,I),e.cantEdit&&Ro(e,K(e.firstLine(),0))&&(e.cantEdit=!1)}}function ph(e,t,n){var r=e.doc,i=e.display,s=t.from,u=t.to,c=!1,h=s.line;e.options.lineWrapping||(h=v(mr(we(r,s.line))),r.iter(h,u.line+1,function(N){if(N==i.maxLine)return c=!0,!0})),r.sel.contains(t.from,t.to)>-1&&lr(e),rs(r,t,n,Ga(e)),e.options.lineWrapping||(r.iter(h,s.line+t.text.length,function(N){var U=So(N);U>i.maxLineLength&&(i.maxLine=N,i.maxLineLength=U,i.maxLineChanged=!0,c=!1)}),c&&(e.curOp.updateMaxLine=!0)),nd(r,s.line),Di(e,400);var g=t.text.length-(u.line-s.line)-1;t.full?Kt(e):s.line==u.line&&t.text.length==1&&!uu(e.doc,t)?$r(e,s.line,"text"):Kt(e,s.line,u.line+1,g);var k=$t(e,"changes"),_=$t(e,"change");if(_||k){var F={from:s,to:u,text:t.text,removed:t.removed,origin:t.origin};_&&bt(e,"change",e,F),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(F)}e.display.selForContextMenu=null}function Qn(e,t,n,r,i){var s;r||(r=n),ge(r,n)<0&&(s=[r,n],n=s[0],r=s[1]),typeof t=="string"&&(t=e.splitLines(t)),Vn(e,{from:n,to:r,text:t,origin:i})}function Lu(e,t,n,r){n1||!(this.children[0]instanceof zi))){var c=[];this.collapse(c),this.children=[new zi(c)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var u=i.lines.length%25+25,c=u;c10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Kt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&xu(e.doc)),e&&bt(e,"markerCleared",e,this,r,i),t&&kn(e),this.parent&&this.parent.clear()}},en.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||u==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=re("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(wa(e,t.line,t,n,s)||t.line!=n.line&&wa(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");od()}s.addToHistory&&hu(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var c=t.line,h=e.cm,g;if(e.iter(c,n.line+1,function(_){h&&s.collapsed&&!h.options.lineWrapping&&mr(_)==h.display.maxLine&&(g=!0),s.collapsed&&c!=t.line&&ir(_,0),sd(_,new bo(s,c==t.line?t.ch:null,c==n.line?n.ch:null),e.cm&&e.cm.curOp),++c}),s.collapsed&&e.iter(t.line,n.line+1,function(_){Yr(e,_)&&ir(_,0)}),s.clearOnEnter&&_e(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(id(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Eu,s.atomic=!0),h){if(g&&(h.curOp.updateMaxLine=!0),s.collapsed)Kt(h,t.line,n.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var k=t.line;k<=n.line;k++)$r(h,k,"text");s.atomic&&xu(h.doc),bt(h,"markerAdded",h,s)}return s}var ji=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;h--)Vn(this,r[h]);c?yu(this,c):this.cm&&Yn(this.cm)}),undo:wt(function(){zo(this,"undo")}),redo:wt(function(){zo(this,"redo")}),undoSelection:wt(function(){zo(this,"undo",!0)}),redoSelection:wt(function(){zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ie(this,e),t=Ie(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(s){var u=s.markedSpans;if(u)for(var c=0;c=h.to||h.from==null&&i!=e.line||h.from!=null&&i==t.line&&h.from>=t.ch)&&(!n||n(h.marker))&&r.push(h.marker.parent||h.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=s,++n}),Ie(this,K(n,t))},indexFromPos:function(e){e=Ie(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var k=e.dataTransfer.getData("Text");if(k){var _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Wo(t.doc,Zr(n,n)),_)for(var F=0;F<_.length;++F)Qn(t.doc,"",_[F].anchor,_[F].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function wh(e,t){if(b&&(!e.state.draggingText||+new Date-Nu<100)){Ur(t);return}if(!(st(e,t)||Fr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!V)){var n=m("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",X&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),X&&n.parentNode.removeChild(n)}}function kh(e,t){var n=mn(e,t);if(n){var r=document.createDocumentFragment();jl(e,n,r),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ne(e.display.dragCursor,r)}}function Iu(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Du(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r=0;c--)Qn(e.doc,"",r[c].from,r[c].to,"+delete");Yn(e)})}function ls(e,t,n){var r=vt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ss(e,t,n){var r=ls(e,t.ch,n);return r==null?null:new K(t.line,r,n<0?"after":"before")}function as(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var s=Me(n,t.doc.direction);if(s){var u=i<0?J(s):s[0],c=i<0==(u.level==1),h=c?"after":"before",g;if(u.level>0||t.doc.direction=="rtl"){var k=Un(t,n);g=i<0?n.text.length-1:0;var _=Lr(t,k,g).top;g=Mt(function(F){return Lr(t,k,F).top==_},i<0==(u.level==1)?u.from:u.to-1,g),h=="before"&&(g=ls(n,g,1))}else g=i<0?u.to:u.from;return new K(r,g,h)}}return new K(r,i<0?n.text.length:0,i<0?"before":"after")}function Oh(e,t,n,r){var i=Me(t,e.doc.direction);if(!i)return ss(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var s=cr(i,n.ch,n.sticky),u=i[s];if(e.doc.direction=="ltr"&&u.level%2==0&&(r>0?u.to>n.ch:u.from=u.from&&F>=k.begin)){var N=_?"before":"after";return new K(n.line,F,N)}}var U=function(he,ve,pe){for(var ye=function(Qe,kt){return kt?new K(n.line,c(Qe,1),"before"):new K(n.line,Qe,"after")};he>=0&&he0==(Te.level!=1),He=Se?pe.begin:c(pe.end,-1);if(Te.from<=He&&He0?k.end:c(k.begin,-1);return se!=null&&!(r>0&&se==t.text.length)&&(Q=U(r>0?0:i.length-1,r,g(se)),Q)?Q:null}var qi={selectAll:Su,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),I)},killLine:function(e){return ri(e,function(t){if(t.empty()){var n=we(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new K(i.line,i.ch+1),e.replaceRange(s.charAt(i.ch-1)+s.charAt(i.ch-2),K(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var u=we(e.doc,i.line-1).text;u&&(i=new K(i.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+u.charAt(u.length-1),K(i.line-1,u.length-1),i,"+transpose"))}}n.push(new Xe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Jt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&ge(t,this.pos)==0&&n==this.button};var Yi,$i;function Dh(e,t){var n=+new Date;return $i&&$i.compare(n,e,t)?(Yi=$i=null,"triple"):Yi&&Yi.compare(n,e,t)?($i=new fs(n,e,t),Yi=null,"double"):(Yi=new fs(n,e,t),$i=null,"single")}function Xu(e){var t=this,n=t.display;if(!(st(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Fr(n,e)){w||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!cs(t,e)){var r=mn(t,e),i=hr(e),s=r?Dh(r,i):"single";Ce(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Fh(t,i,r,s,e))&&(i==1?r?Wh(t,r,s,e):xi(e)==n.scroller&&Pt(e):i==2?(r&&Ho(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(me?t.display.input.onContextMenu(e):Gl(t)))}}}function Fh(e,t,n,r,i){var s="Click";return r=="double"?s="Double"+s:r=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,Xi(e,Wu(s,i),i,function(u){if(typeof u=="string"&&(u=qi[u]),!u)return!1;var c=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),c=u(e,n)!=A}finally{e.state.suppressEdits=!1}return c})}function Hh(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var s=ee?n.shiftKey&&n.metaKey:n.altKey;i.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=B?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(B?n.altKey:n.ctrlKey)),i}function Wh(e,t,n,r){b?setTimeout(Le(Ya,e),0):e.curOp.focus=Ee(ht(e));var i=Hh(e,n,r),s=e.doc.sel,u;e.options.dragDrop&&Sl&&!e.isReadOnly()&&n=="single"&&(u=s.contains(t))>-1&&(ge((u=s.ranges[u]).from(),t)<0||t.xRel>0)&&(ge(u.to(),t)>0||t.xRel<0)?Rh(e,r,t,i):zh(e,r,t,i)}function Rh(e,t,n,r){var i=e.display,s=!1,u=xt(e,function(g){w&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Gl(e)),Et(i.wrapper.ownerDocument,"mouseup",u),Et(i.wrapper.ownerDocument,"mousemove",c),Et(i.scroller,"dragstart",h),Et(i.scroller,"drop",u),s||(Pt(g),r.addNew||Ho(e.doc,n,null,null,r.extend),w&&!V||b&&L==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(g){s=s||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},h=function(){return s=!0};w&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,_e(i.wrapper.ownerDocument,"mouseup",u),_e(i.wrapper.ownerDocument,"mousemove",c),_e(i.scroller,"dragstart",h),_e(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Yu(e,t,n){if(n=="char")return new Xe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new Xe(K(t.line,0),Ie(e.doc,K(t.line+1,0)));var r=n(e,t);return new Xe(r.from,r.to)}function zh(e,t,n,r){b&&Gl(e);var i=e.display,s=e.doc;Pt(t);var u,c,h=s.sel,g=h.ranges;if(r.addNew&&!r.extend?(c=s.sel.contains(n),c>-1?u=g[c]:u=new Xe(n,n)):(u=s.sel.primary(),c=s.sel.primIndex),r.unit=="rectangle")r.addNew||(u=new Xe(n,n)),n=mn(e,t,!0,!0),c=-1;else{var k=Yu(e,n,r.unit);r.extend?u=is(u,k.anchor,k.head,r.extend):u=k}r.addNew?c==-1?(c=g.length,Nt(s,br(e,g.concat([u]),c),{scroll:!1,origin:"*mouse"})):g.length>1&&g[c].empty()&&r.unit=="char"&&!r.extend?(Nt(s,br(e,g.slice(0,c).concat(g.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),h=s.sel):os(s,c,u,G):(c=0,Nt(s,new or([u],0),G),h=s.sel);var _=n;function F(pe){if(ge(_,pe)!=0)if(_=pe,r.unit=="rectangle"){for(var ye=[],Te=e.options.tabSize,Se=ze(we(s,n.line).text,n.ch,Te),He=ze(we(s,pe.line).text,pe.ch,Te),Qe=Math.min(Se,He),kt=Math.max(Se,He),it=Math.min(n.line,pe.line),Zt=Math.min(e.lastLine(),Math.max(n.line,pe.line));it<=Zt;it++){var Ut=we(s,it).text,pt=Z(Ut,Qe,Te);Qe==kt?ye.push(new Xe(K(it,pt),K(it,pt))):Ut.length>pt&&ye.push(new Xe(K(it,pt),K(it,Z(Ut,kt,Te))))}ye.length||ye.push(new Xe(n,n)),Nt(s,br(e,h.ranges.slice(0,c).concat(ye),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var Gt=u,Lt=Yu(e,pe,r.unit),mt=Gt.anchor,gt;ge(Lt.anchor,mt)>0?(gt=Lt.head,mt=Bn(Gt.from(),Lt.anchor)):(gt=Lt.anchor,mt=Bt(Gt.to(),Lt.head));var ut=h.ranges.slice(0);ut[c]=Bh(e,new Xe(Ie(s,mt),gt)),Nt(s,br(e,ut,c),G)}}var N=i.wrapper.getBoundingClientRect(),U=0;function Q(pe){var ye=++U,Te=mn(e,pe,!0,r.unit=="rectangle");if(Te)if(ge(Te,_)!=0){e.curOp.focus=Ee(ht(e)),F(Te);var Se=Eo(i,s);(Te.line>=Se.to||Te.lineN.bottom?20:0;He&&setTimeout(xt(e,function(){U==ye&&(i.scroller.scrollTop+=He,Q(pe))}),50)}}function se(pe){e.state.selectingText=!1,U=1/0,pe&&(Pt(pe),i.input.focus()),Et(i.wrapper.ownerDocument,"mousemove",he),Et(i.wrapper.ownerDocument,"mouseup",ve),s.history.lastSelOrigin=null}var he=xt(e,function(pe){pe.buttons===0||!hr(pe)?se(pe):Q(pe)}),ve=xt(e,se);e.state.selectingText=ve,_e(i.wrapper.ownerDocument,"mousemove",he),_e(i.wrapper.ownerDocument,"mouseup",ve)}function Bh(e,t){var n=t.anchor,r=t.head,i=we(e.doc,n.line);if(ge(n,r)==0&&n.sticky==r.sticky)return t;var s=Me(i);if(!s)return t;var u=cr(s,n.ch,n.sticky),c=s[u];if(c.from!=n.ch&&c.to!=n.ch)return t;var h=u+(c.from==n.ch==(c.level!=1)?0:1);if(h==0||h==s.length)return t;var g;if(r.line!=n.line)g=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=cr(s,r.ch,r.sticky),_=k-u||(r.ch-n.ch)*(c.level==1?-1:1);k==h-1||k==h?g=_<0:g=_>0}var F=s[h+(g?-1:0)],N=g==(F.level==1),U=N?F.from:F.to,Q=N?"after":"before";return n.ch==U&&n.sticky==Q?t:new Xe(new K(n.line,U,Q),r)}function $u(e,t,n,r){var i,s;if(t.touches)i=t.touches[0].clientX,s=t.touches[0].clientY;else try{i=t.clientX,s=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Pt(t);var u=e.display,c=u.lineDiv.getBoundingClientRect();if(s>c.bottom||!$t(e,n))return zt(t);s-=c.top-u.viewOffset;for(var h=0;h=i){var k=C(e.doc,s),_=e.display.gutterSpecs[h];return lt(e,n,e,k,_.className,t),zt(t)}}}function cs(e,t){return $u(e,t,"gutterClick",!0)}function Ju(e,t){Fr(e.display,t)||Kh(e,t)||st(e,t,"contextmenu")||me||e.display.input.onContextMenu(t)}function Kh(e,t){return $t(e,"gutterContextMenu")?$u(e,t,"gutterContextMenu",!1):!1}function Zu(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mi(e)}var ni={toString:function(){return"CodeMirror.Init"}},Vu={},Uo={};function jh(e){var t=e.optionHandlers;function n(r,i,s,u){e.defaults[r]=i,s&&(t[r]=u?function(c,h,g){g!=ni&&s(c,h,g)}:s)}e.defineOption=n,e.Init=ni,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,ts(r)},!0),n("indentUnit",2,ts,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Hi(r),Mi(r),Kt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var s=[],u=r.doc.first;r.doc.iter(function(h){for(var g=0;;){var k=h.text.indexOf(i,g);if(k==-1)break;g=k+i.length,s.push(K(u,k))}u++});for(var c=s.length-1;c>=0;c--)Qn(r.doc,i,s[c],K(s[c].line,s[c].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,s){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),s!=ni&&r.refresh()}),n("specialCharPlaceholder",yd,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",R?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!fe),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){Zu(r),Fi(r)},!0),n("keyMap","default",function(r,i,s){var u=Ko(i),c=s!=ni&&Ko(s);c&&c.detach&&c.detach(r,u),u.attach&&u.attach(r,c||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Gh,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Ql(i,r.options.lineNumbers),Fi(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Bl(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return $n(r)},!0),n("scrollbarStyle","native",function(r){eu(r),$n(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Ql(r.options.gutters,i),Fi(r)},!0),n("firstLineNumber",1,Fi,!0),n("lineNumberFormatter",function(r){return r},Fi,!0),n("showCursorWhenSelecting",!1,Ai,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Xn(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Uh),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Ai,!0),n("singleCursorHeightPerLine",!0,Ai,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Hi,!0),n("addModeClass",!1,Hi,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Hi,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Uh(e,t,n){var r=n&&n!=ni;if(!t!=!r){var i=e.display.dragFunctions,s=t?_e:Et;s(e.display.scroller,"dragstart",i.start),s(e.display.scroller,"dragenter",i.enter),s(e.display.scroller,"dragover",i.over),s(e.display.scroller,"dragleave",i.leave),s(e.display.scroller,"drop",i.drop)}}function Gh(e){e.options.lineWrapping?(Pe(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ae(e.display.wrapper,"CodeMirror-wrap"),El(e)),Kl(e),Kt(e),Mi(e),setTimeout(function(){return $n(e)},100)}function tt(e,t){var n=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?Ne(t):{},Ne(Vu,t,!1);var r=t.value;typeof r=="string"?r=new jt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new tt.inputStyles[t.inputStyle](this),s=this.display=new ih(e,r,i,t);s.wrapper.CodeMirror=this,Zu(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),eu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Oe,keySeq:null,specialChars:null},t.autofocus&&!R&&s.input.focus(),b&&L<11&&setTimeout(function(){return n.display.input.reset(!0)},20),qh(this),Sh(),wn(this),this.curOp.forceUpdate=!0,fu(this,r),t.autofocus&&!R||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ql(n)},20):Xn(this);for(var u in Uo)Uo.hasOwnProperty(u)&&Uo[u](this,t[u],ni);nu(this),t.finishInit&&t.finishInit(this);for(var c=0;c20*20}_e(t.scroller,"touchstart",function(h){if(!st(e,h)&&!s(h)&&!cs(e,h)){t.input.ensurePolled(),clearTimeout(n);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-r.end<=300?r:null},h.touches.length==1&&(t.activeTouch.left=h.touches[0].pageX,t.activeTouch.top=h.touches[0].pageY)}}),_e(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_e(t.scroller,"touchend",function(h){var g=t.activeTouch;if(g&&!Fr(t,h)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),_;!g.prev||u(g,g.prev)?_=new Xe(k,k):!g.prev.prev||u(g,g.prev.prev)?_=e.findWordAt(k):_=new Xe(K(k.line,0),Ie(e.doc,K(k.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),Pt(h)}i()}),_e(t.scroller,"touchcancel",i),_e(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Pi(e,t.scroller.scrollTop),bn(e,t.scroller.scrollLeft,!0),lt(e,"scroll",e))}),_e(t.scroller,"mousewheel",function(h){return lu(e,h)}),_e(t.scroller,"DOMMouseScroll",function(h){return lu(e,h)}),_e(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(h){st(e,h)||Ur(h)},over:function(h){st(e,h)||(kh(e,h),Ur(h))},start:function(h){return wh(e,h)},drop:xt(e,xh),leave:function(h){st(e,h)||Iu(e)}};var c=t.input.getField();_e(c,"keyup",function(h){return Gu.call(e,h)}),_e(c,"keydown",xt(e,Uu)),_e(c,"keypress",xt(e,qu)),_e(c,"focus",function(h){return ql(e,h)}),_e(c,"blur",function(h){return Xn(e,h)})}var ds=[];tt.defineInitHook=function(e){return ds.push(e)};function Ji(e,t,n,r){var i=e.doc,s;n==null&&(n="add"),n=="smart"&&(i.mode.indent?s=Ci(e,t).state:n="prev");var u=e.options.tabSize,c=we(i,t),h=ze(c.text,null,u);c.stateAfter&&(c.stateAfter=null);var g=c.text.match(/^\s*/)[0],k;if(!r&&!/\S/.test(c.text))k=0,n="not";else if(n=="smart"&&(k=i.mode.indent(s,c.text.slice(g.length),c.text),k==A||k>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?k=ze(we(i,t-1).text,null,u):k=0:n=="add"?k=h+e.options.indentUnit:n=="subtract"?k=h-e.options.indentUnit:typeof n=="number"&&(k=h+n),k=Math.max(0,k);var _="",F=0;if(e.options.indentWithTabs)for(var N=Math.floor(k/u);N;--N)F+=u,_+=" ";if(Fu,h=sr(t),g=null;if(c&&r.ranges.length>1)if(xr&&xr.text.join(` `)==t){if(r.ranges.length%xr.text.length==0){g=[];for(var k=0;k=0;F--){var N=r.ranges[F],U=N.from(),Q=N.to();N.empty()&&(n&&n>0?U=K(U.line,U.ch-n):e.state.overwrite&&!c?Q=K(Q.line,Math.min(we(s,Q.line).text.length,Q.ch+J(h).length)):c&&xr&&xr.lineWise&&xr.text.join(` `)==h.join(` -`)&&(U=Q=K(U.line,0)));var se={from:U,to:Q,text:g?g[F%g.length]:h,origin:i||(c?"paste":e.state.cutIncoming>u?"cut":"+input")};Vn(e.doc,se),bt(e,"inputRead",e,se)}t&&!c&&tf(e,t),Yn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ef(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Jt(t,function(){return hs(t,n,0,null,"paste")}),!0}function tf(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var s=e.getModeAt(i.head),u=!1;if(s.electricChars){for(var c=0;c-1){u=Ji(e,i.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(we(e.doc,i.head.line).text.slice(0,i.head.ch))&&(u=Ji(e,i.head.line,"smart"));u&&bt(e,"electricInput",e,i.head.line)}}}function rf(e){for(var t=[],n=[],r=0;rs&&(Ji(this,c.head.line,r,!0),s=c.head.line,u==this.doc.sel.primIndex&&Yn(this));else{var h=c.from(),g=c.to(),k=Math.max(s,h.line);s=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var _=k;_0&&os(this.doc,u,new Xe(h,F[u].to()),I)}}}),getTokenAt:function(r,i){return ha(this,r,i)},getLineTokens:function(r,i){return ha(this,K(r),i,!0)},getTokenTypeAt:function(r){r=Ie(this.doc,r);var i=fa(this,we(this.doc,r.line)),s=0,u=(i.length-1)/2,c=r.ch,h;if(c==0)h=i[2];else for(;;){var g=s+u>>1;if((g?i[g*2-1]:0)>=c)u=g;else if(i[g*2+1]h&&(r=h,u=!0),c=we(this.doc,r)}else c=r;return To(this,c,{top:0,left:0},i||"page",s||u).top+(u?this.doc.height-Dr(c):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return qn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,s,u,c){var h=this.display;r=yr(this,Ie(this.doc,r));var g=r.bottom,k=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),h.sizer.appendChild(i),u=="over")g=r.top;else if(u=="above"||u=="near"){var _=Math.max(h.wrapper.clientHeight,this.doc.height),F=Math.max(h.sizer.clientWidth,h.lineSpace.clientWidth);(u=="above"||r.bottom+i.offsetHeight>_)&&r.top>i.offsetHeight?g=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=_&&(g=r.bottom),k+i.offsetWidth>F&&(k=F-i.offsetWidth)}i.style.top=g+"px",i.style.left=i.style.right="",c=="right"?(k=h.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(c=="left"?k=0:c=="middle"&&(k=(h.sizer.clientWidth-i.offsetWidth)/2),i.style.left=k+"px"),s&&Kd(this,{left:k,top:g,right:k+i.offsetWidth,bottom:g+i.offsetHeight})},triggerOnKeyDown:Ht(Gu),triggerOnKeyPress:Ht(Xu),triggerOnKeyUp:qu,triggerOnMouseDown:Ht(Yu),execCommand:function(r){if(qi.hasOwnProperty(r))return qi[r].call(null,this)},triggerElectric:Ht(function(r){tf(this,r)}),findPosH:function(r,i,s,u){var c=1;i<0&&(c=-1,i=-i);for(var h=Ie(this.doc,r),g=0;g0&&k(s.charAt(u-1));)--u;for(;c.5||this.options.lineWrapping)&&Kl(this),lt(this,"refresh",this)}),swapDoc:Ht(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),cu(this,r),Mi(this),this.display.input.reset(),Ei(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,bt(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},dr(e),e.registerHelper=function(r,i,s){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=s},e.registerGlobalHelper=function(r,i,s,u){e.registerHelper(r,i,u),n[r]._global.push({pred:s,val:u})}}function gs(e,t,n,r,i){var s=t,u=n,c=we(e,t.line),h=i&&e.direction=="rtl"?-n:n;function g(){var ve=t.line+h;return ve=e.first+e.size?!1:(t=new K(ve,t.ch,t.sticky),c=we(e,ve))}function k(ve){var pe;if(r=="codepoint"){var ye=c.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ye))pe=null;else{var Te=n>0?ye>=55296&&ye<56320:ye>=56320&&ye<57343;pe=new K(t.line,Math.max(0,Math.min(c.text.length,t.ch+n*(Te?2:1))),-n)}}else i?pe=Th(e.cm,c,t,n):pe=ss(c,t,n);if(pe==null)if(!ve&&g())t=as(i,e.cm,c,t.line,h);else return!1;else t=pe;return!0}if(r=="char"||r=="codepoint")k();else if(r=="column")k(!0);else if(r=="word"||r=="group")for(var _=null,F=r=="group",N=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(n<0&&!k(!U));U=!1){var Q=c.text.charAt(t.ch)||` +`)&&(U=Q=K(U.line,0)));var se={from:U,to:Q,text:g?g[F%g.length]:h,origin:i||(c?"paste":e.state.cutIncoming>u?"cut":"+input")};Vn(e.doc,se),bt(e,"inputRead",e,se)}t&&!c&&ef(e,t),Yn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Qu(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Jt(t,function(){return hs(t,n,0,null,"paste")}),!0}function ef(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var s=e.getModeAt(i.head),u=!1;if(s.electricChars){for(var c=0;c-1){u=Ji(e,i.head.line,"smart");break}}else s.electricInput&&s.electricInput.test(we(e.doc,i.head.line).text.slice(0,i.head.ch))&&(u=Ji(e,i.head.line,"smart"));u&&bt(e,"electricInput",e,i.head.line)}}}function tf(e){for(var t=[],n=[],r=0;rs&&(Ji(this,c.head.line,r,!0),s=c.head.line,u==this.doc.sel.primIndex&&Yn(this));else{var h=c.from(),g=c.to(),k=Math.max(s,h.line);s=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var _=k;_0&&os(this.doc,u,new Xe(h,F[u].to()),I)}}}),getTokenAt:function(r,i){return da(this,r,i)},getLineTokens:function(r,i){return da(this,K(r),i,!0)},getTokenTypeAt:function(r){r=Ie(this.doc,r);var i=ua(this,we(this.doc,r.line)),s=0,u=(i.length-1)/2,c=r.ch,h;if(c==0)h=i[2];else for(;;){var g=s+u>>1;if((g?i[g*2-1]:0)>=c)u=g;else if(i[g*2+1]h&&(r=h,u=!0),c=we(this.doc,r)}else c=r;return To(this,c,{top:0,left:0},i||"page",s||u).top+(u?this.doc.height-Dr(c):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return qn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,s,u,c){var h=this.display;r=yr(this,Ie(this.doc,r));var g=r.bottom,k=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),h.sizer.appendChild(i),u=="over")g=r.top;else if(u=="above"||u=="near"){var _=Math.max(h.wrapper.clientHeight,this.doc.height),F=Math.max(h.sizer.clientWidth,h.lineSpace.clientWidth);(u=="above"||r.bottom+i.offsetHeight>_)&&r.top>i.offsetHeight?g=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=_&&(g=r.bottom),k+i.offsetWidth>F&&(k=F-i.offsetWidth)}i.style.top=g+"px",i.style.left=i.style.right="",c=="right"?(k=h.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(c=="left"?k=0:c=="middle"&&(k=(h.sizer.clientWidth-i.offsetWidth)/2),i.style.left=k+"px"),s&&Ud(this,{left:k,top:g,right:k+i.offsetWidth,bottom:g+i.offsetHeight})},triggerOnKeyDown:Ht(Uu),triggerOnKeyPress:Ht(qu),triggerOnKeyUp:Gu,triggerOnMouseDown:Ht(Xu),execCommand:function(r){if(qi.hasOwnProperty(r))return qi[r].call(null,this)},triggerElectric:Ht(function(r){ef(this,r)}),findPosH:function(r,i,s,u){var c=1;i<0&&(c=-1,i=-i);for(var h=Ie(this.doc,r),g=0;g0&&k(s.charAt(u-1));)--u;for(;c.5||this.options.lineWrapping)&&Kl(this),lt(this,"refresh",this)}),swapDoc:Ht(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),fu(this,r),Mi(this),this.display.input.reset(),Ei(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,bt(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},dr(e),e.registerHelper=function(r,i,s){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=s},e.registerGlobalHelper=function(r,i,s,u){e.registerHelper(r,i,u),n[r]._global.push({pred:s,val:u})}}function gs(e,t,n,r,i){var s=t,u=n,c=we(e,t.line),h=i&&e.direction=="rtl"?-n:n;function g(){var ve=t.line+h;return ve=e.first+e.size?!1:(t=new K(ve,t.ch,t.sticky),c=we(e,ve))}function k(ve){var pe;if(r=="codepoint"){var ye=c.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ye))pe=null;else{var Te=n>0?ye>=55296&&ye<56320:ye>=56320&&ye<57343;pe=new K(t.line,Math.max(0,Math.min(c.text.length,t.ch+n*(Te?2:1))),-n)}}else i?pe=Oh(e.cm,c,t,n):pe=ss(c,t,n);if(pe==null)if(!ve&&g())t=as(i,e.cm,c,t.line,h);else return!1;else t=pe;return!0}if(r=="char"||r=="codepoint")k();else if(r=="column")k(!0);else if(r=="word"||r=="group")for(var _=null,F=r=="group",N=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(n<0&&!k(!U));U=!1){var Q=c.text.charAt(t.ch)||` `,se=De(Q,N)?"w":F&&Q==` -`?"n":!F||/\s/.test(Q)?null:"p";if(F&&!U&&!se&&(se="s"),_&&_!=se){n<0&&(n=1,k(),t.sticky="after");break}if(se&&(_=se),n>0&&!k(!U))break}var he=Ro(e,t,s,u,!0);return qe(s,he)&&(he.hitSide=!0),he}function of(e,t,n,r){var i=e.doc,s=t.left,u;if(r=="page"){var c=Math.min(e.display.wrapper.clientHeight,Ce(e).innerHeight||i(e).documentElement.clientHeight),h=Math.max(c-.5*Gn(e.display),3);u=(n>0?t.bottom:t.top)+n*h}else r=="line"&&(u=n>0?t.bottom+3:t.top-3);for(var g;g=Wl(e,s,u),!!g.outside;){if(n<0?u<=0:u>=i.height){g.hitSide=!0;break}u+=n*5}return g}var $e=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Oe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$e.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,ps(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function s(c){for(var h=c.target;h;h=h.parentNode){if(h==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(h.className))break}return!1}_e(i,"paste",function(c){!s(c)||st(r,c)||ef(c,r)||L<=11&&setTimeout(xt(r,function(){return t.updateFromDOM()}),20)}),_e(i,"compositionstart",function(c){t.composing={data:c.data,done:!1}}),_e(i,"compositionupdate",function(c){t.composing||(t.composing={data:c.data,done:!1})}),_e(i,"compositionend",function(c){t.composing&&(c.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_e(i,"touchstart",function(){return n.forceCompositionEnd()}),_e(i,"input",function(){t.composing||t.readFromDOMSoon()});function u(c){if(!(!s(c)||st(r,c))){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()}),c.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var h=rf(r);Go({lineWise:!0,text:h.text}),c.type=="cut"&&r.operation(function(){r.setSelections(h.ranges,0,I),r.replaceSelection("",null,"cut")})}else return;if(c.clipboardData){c.clipboardData.clearData();var g=xr.text.join(` -`);if(c.clipboardData.setData("Text",g),c.clipboardData.getData("Text")==g){c.preventDefault();return}}var k=nf(),_=k.firstChild;ps(_),r.display.lineSpace.insertBefore(k,r.display.lineSpace.firstChild),_.value=xr.text.join(` -`);var F=Ee(Ve(i));Ze(_),setTimeout(function(){r.display.lineSpace.removeChild(k),F.focus(),F==i&&n.showPrimarySelection()},50)}}_e(i,"copy",u),_e(i,"cut",u)},$e.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=Ee(Ve(this.div))==this.div,e},$e.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$e.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$e.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&lf(t,r)||{node:c[0].measure.map[2],offset:0},g=i.linee.firstLine()&&(r=K(r.line-1,we(e.doc,r.line-1).length)),i.ch==we(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var s,u,c;r.line==t.viewFrom||(s=yn(e,r.line))==0?(u=v(t.view[0].line),c=t.view[0].node):(u=v(t.view[s].line),c=t.view[s-1].node.nextSibling);var h=yn(e,i.line),g,k;if(h==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=v(t.view[h+1].line)-1,k=t.view[h+1].node.previousSibling),!c)return!1;for(var _=e.doc.splitLines(Xh(e,c,k,u,g)),F=Nr(e.doc,K(u,0),K(g,we(e.doc,g).text.length));_.length>1&&F.length>1;)if(J(_)==J(F))_.pop(),F.pop(),g--;else if(_[0]==F[0])_.shift(),F.shift(),u++;else break;for(var N=0,U=0,Q=_[0],se=F[0],he=Math.min(Q.length,se.length);Nr.ch&&ve.charCodeAt(ve.length-U-1)==pe.charCodeAt(pe.length-U-1);)N--,U++;_[_.length-1]=ve.slice(0,ve.length-U).replace(/^\u200b+/,""),_[0]=_[0].slice(N).replace(/\u200b+$/,"");var Te=K(u,N),Se=K(g,F.length?J(F).length-U:0);if(_.length>1||_[0]||ge(Te,Se))return Qn(e.doc,_,Te,Se,"+input"),!0},$e.prototype.ensurePolled=function(){this.forceCompositionEnd()},$e.prototype.reset=function(){this.forceCompositionEnd()},$e.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$e.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},$e.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Jt(this.cm,function(){return Kt(e.cm)})},$e.prototype.setUneditable=function(e){e.contentEditable="false"},$e.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||xt(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$e.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},$e.prototype.onContextMenu=function(){},$e.prototype.resetPosition=function(){},$e.prototype.needsContentAttribute=!0;function lf(e,t){var n=Dl(e,t.line);if(!n||n.hidden)return null;var r=we(e.doc,t.line),i=Ia(n,r,t.line),s=Me(r,e.doc.direction),u="left";if(s){var c=cr(s,t.ch);u=c%2?"right":"left"}var h=Ha(i.map,t.ch,u);return h.offset=h.collapse=="right"?h.end:h.start,h}function qh(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ii(e,t){return t&&(e.bad=!0),e}function Xh(e,t,n,r,i){var s="",u=!1,c=e.doc.lineSeparator(),h=!1;function g(N){return function(U){return U.id==N}}function k(){u&&(s+=c,h&&(s+=c),u=h=!1)}function _(N){N&&(k(),s+=N)}function F(N){if(N.nodeType==1){var U=N.getAttribute("cm-text");if(U){_(U);return}var Q=N.getAttribute("cm-marker"),se;if(Q){var he=e.findMarks(K(r,0),K(i+1,0),g(+Q));he.length&&(se=he[0].find(0))&&_(Nr(e.doc,se.from,se.to).join(c));return}if(N.getAttribute("contenteditable")=="false")return;var ve=/^(pre|div|p|li|table|br)$/i.test(N.nodeName);if(!/^br$/i.test(N.nodeName)&&N.textContent.length==0)return;ve&&k();for(var pe=0;pe=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),_e(i,"paste",function(u){st(r,u)||ef(u,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function s(u){if(!st(r,u)){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var c=rf(r);Go({lineWise:!0,text:c.text}),u.type=="cut"?r.setSelections(c.ranges,null,I):(n.prevInput="",i.value=c.text.join(` -`),Ze(i))}else return;u.type=="cut"&&(r.state.cutIncoming=+new Date)}}_e(i,"cut",s),_e(i,"copy",s),_e(e.scroller,"paste",function(u){if(!(Fr(e,u)||st(r,u))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var c=new Event("paste");c.clipboardData=u.clipboardData,i.dispatchEvent(c)}}),_e(e.lineSpace,"selectstart",function(u){Fr(e,u)||Pt(u)}),_e(i,"compositionstart",function(){var u=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:u,range:r.markText(u,r.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},dt.prototype.createField=function(e){this.wrapper=nf(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;ps(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},dt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},dt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var i=yr(e,n.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),u=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+u.top-s.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+u.left-s.left))}return r},dt.prototype.showSelection=function(e){var t=this.cm,n=t.display;ne(n.cursorDiv,e.cursors),ne(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},dt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ze(this.textarea),b&&L>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&L>=9&&(this.hasSelection=null));this.resetting=!1}},dt.prototype.getField=function(){return this.textarea},dt.prototype.supportsTouch=function(){return!1},dt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!R||Ee(Ve(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},dt.prototype.blur=function(){this.textarea.blur()},dt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dt.prototype.receivedFocus=function(){this.slowPoll()},dt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},dt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},dt.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||qr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&L>=9&&this.hasSelection===i||B&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=i.charCodeAt(0);if(s==8203&&!r&&(r="​"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var u=0,c=Math.min(r.length,i.length);u1e3||i.indexOf(` +`?"n":!F||/\s/.test(Q)?null:"p";if(F&&!U&&!se&&(se="s"),_&&_!=se){n<0&&(n=1,k(),t.sticky="after");break}if(se&&(_=se),n>0&&!k(!U))break}var he=Ro(e,t,s,u,!0);return qe(s,he)&&(he.hitSide=!0),he}function nf(e,t,n,r){var i=e.doc,s=t.left,u;if(r=="page"){var c=Math.min(e.display.wrapper.clientHeight,Ce(e).innerHeight||i(e).documentElement.clientHeight),h=Math.max(c-.5*Gn(e.display),3);u=(n>0?t.bottom:t.top)+n*h}else r=="line"&&(u=n>0?t.bottom+3:t.top-3);for(var g;g=Wl(e,s,u),!!g.outside;){if(n<0?u<=0:u>=i.height){g.hitSide=!0;break}u+=n*5}return g}var $e=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Oe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$e.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,ps(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function s(c){for(var h=c.target;h;h=h.parentNode){if(h==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(h.className))break}return!1}_e(i,"paste",function(c){!s(c)||st(r,c)||Qu(c,r)||L<=11&&setTimeout(xt(r,function(){return t.updateFromDOM()}),20)}),_e(i,"compositionstart",function(c){t.composing={data:c.data,done:!1}}),_e(i,"compositionupdate",function(c){t.composing||(t.composing={data:c.data,done:!1})}),_e(i,"compositionend",function(c){t.composing&&(c.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_e(i,"touchstart",function(){return n.forceCompositionEnd()}),_e(i,"input",function(){t.composing||t.readFromDOMSoon()});function u(c){if(!(!s(c)||st(r,c))){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()}),c.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var h=tf(r);Go({lineWise:!0,text:h.text}),c.type=="cut"&&r.operation(function(){r.setSelections(h.ranges,0,I),r.replaceSelection("",null,"cut")})}else return;if(c.clipboardData){c.clipboardData.clearData();var g=xr.text.join(` +`);if(c.clipboardData.setData("Text",g),c.clipboardData.getData("Text")==g){c.preventDefault();return}}var k=rf(),_=k.firstChild;ps(_),r.display.lineSpace.insertBefore(k,r.display.lineSpace.firstChild),_.value=xr.text.join(` +`);var F=Ee(Ve(i));Ze(_),setTimeout(function(){r.display.lineSpace.removeChild(k),F.focus(),F==i&&n.showPrimarySelection()},50)}}_e(i,"copy",u),_e(i,"cut",u)},$e.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=Xa(this.cm,!1);return e.focus=Ee(Ve(this.div))==this.div,e},$e.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$e.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$e.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&of(t,r)||{node:c[0].measure.map[2],offset:0},g=i.linee.firstLine()&&(r=K(r.line-1,we(e.doc,r.line-1).length)),i.ch==we(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var s,u,c;r.line==t.viewFrom||(s=yn(e,r.line))==0?(u=v(t.view[0].line),c=t.view[0].node):(u=v(t.view[s].line),c=t.view[s-1].node.nextSibling);var h=yn(e,i.line),g,k;if(h==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=v(t.view[h+1].line)-1,k=t.view[h+1].node.previousSibling),!c)return!1;for(var _=e.doc.splitLines($h(e,c,k,u,g)),F=Nr(e.doc,K(u,0),K(g,we(e.doc,g).text.length));_.length>1&&F.length>1;)if(J(_)==J(F))_.pop(),F.pop(),g--;else if(_[0]==F[0])_.shift(),F.shift(),u++;else break;for(var N=0,U=0,Q=_[0],se=F[0],he=Math.min(Q.length,se.length);Nr.ch&&ve.charCodeAt(ve.length-U-1)==pe.charCodeAt(pe.length-U-1);)N--,U++;_[_.length-1]=ve.slice(0,ve.length-U).replace(/^\u200b+/,""),_[0]=_[0].slice(N).replace(/\u200b+$/,"");var Te=K(u,N),Se=K(g,F.length?J(F).length-U:0);if(_.length>1||_[0]||ge(Te,Se))return Qn(e.doc,_,Te,Se,"+input"),!0},$e.prototype.ensurePolled=function(){this.forceCompositionEnd()},$e.prototype.reset=function(){this.forceCompositionEnd()},$e.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$e.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},$e.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Jt(this.cm,function(){return Kt(e.cm)})},$e.prototype.setUneditable=function(e){e.contentEditable="false"},$e.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||xt(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$e.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},$e.prototype.onContextMenu=function(){},$e.prototype.resetPosition=function(){},$e.prototype.needsContentAttribute=!0;function of(e,t){var n=Dl(e,t.line);if(!n||n.hidden)return null;var r=we(e.doc,t.line),i=Na(n,r,t.line),s=Me(r,e.doc.direction),u="left";if(s){var c=cr(s,t.ch);u=c%2?"right":"left"}var h=Fa(i.map,t.ch,u);return h.offset=h.collapse=="right"?h.end:h.start,h}function Yh(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ii(e,t){return t&&(e.bad=!0),e}function $h(e,t,n,r,i){var s="",u=!1,c=e.doc.lineSeparator(),h=!1;function g(N){return function(U){return U.id==N}}function k(){u&&(s+=c,h&&(s+=c),u=h=!1)}function _(N){N&&(k(),s+=N)}function F(N){if(N.nodeType==1){var U=N.getAttribute("cm-text");if(U){_(U);return}var Q=N.getAttribute("cm-marker"),se;if(Q){var he=e.findMarks(K(r,0),K(i+1,0),g(+Q));he.length&&(se=he[0].find(0))&&_(Nr(e.doc,se.from,se.to).join(c));return}if(N.getAttribute("contenteditable")=="false")return;var ve=/^(pre|div|p|li|table|br)$/i.test(N.nodeName);if(!/^br$/i.test(N.nodeName)&&N.textContent.length==0)return;ve&&k();for(var pe=0;pe=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),_e(i,"paste",function(u){st(r,u)||Qu(u,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function s(u){if(!st(r,u)){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var c=tf(r);Go({lineWise:!0,text:c.text}),u.type=="cut"?r.setSelections(c.ranges,null,I):(n.prevInput="",i.value=c.text.join(` +`),Ze(i))}else return;u.type=="cut"&&(r.state.cutIncoming=+new Date)}}_e(i,"cut",s),_e(i,"copy",s),_e(e.scroller,"paste",function(u){if(!(Fr(e,u)||st(r,u))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var c=new Event("paste");c.clipboardData=u.clipboardData,i.dispatchEvent(c)}}),_e(e.lineSpace,"selectstart",function(u){Fr(e,u)||Pt(u)}),_e(i,"compositionstart",function(){var u=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:u,range:r.markText(u,r.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},dt.prototype.createField=function(e){this.wrapper=rf(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;ps(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},dt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},dt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xa(e);if(e.options.moveInputWithCursor){var i=yr(e,n.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),u=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+u.top-s.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+u.left-s.left))}return r},dt.prototype.showSelection=function(e){var t=this.cm,n=t.display;ne(n.cursorDiv,e.cursors),ne(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},dt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ze(this.textarea),b&&L>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&L>=9&&(this.hasSelection=null));this.resetting=!1}},dt.prototype.getField=function(){return this.textarea},dt.prototype.supportsTouch=function(){return!1},dt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!R||Ee(Ve(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},dt.prototype.blur=function(){this.textarea.blur()},dt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},dt.prototype.receivedFocus=function(){this.slowPoll()},dt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},dt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},dt.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||qr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&L>=9&&this.hasSelection===i||B&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=i.charCodeAt(0);if(s==8203&&!r&&(r="​"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var u=0,c=Math.min(r.length,i.length);u1e3||i.indexOf(` `)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},dt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dt.prototype.onKeyPress=function(){b&&L>=9&&(this.hasSelection=null),this.fastPoll()},dt.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=mn(n,e),u=r.scroller.scrollTop;if(!s||X)return;var c=n.options.resetSelectionOnContextMenu;c&&n.doc.sel.contains(s)==-1&&xt(n,Nt)(n.doc,Zr(s),I);var h=i.style.cssText,g=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px; z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;w&&(_=i.ownerDocument.defaultView.scrollY),r.input.focus(),w&&i.ownerDocument.defaultView.scrollTo(null,_),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=N,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function F(){if(i.selectionStart!=null){var Q=n.somethingSelected(),se="​"+(Q?i.value:"");i.value="⇚",i.value=se,t.prevInput=Q?"":"​",i.selectionStart=1,i.selectionEnd=se.length,r.selForContextMenu=n.doc.sel}}function N(){if(t.contextMenuPending==N&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,i.style.cssText=h,b&&L<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),i.selectionStart!=null)){(!b||b&&L<9)&&F();var Q=0,se=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?xt(n,Cu)(n):Q++<10?r.detectingSelectAll=setTimeout(se,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(se,200)}}if(b&&L>=9&&F(),me){Ur(e);var U=function(){Et(window,"mouseup",U),setTimeout(N,20)};_e(window,"mouseup",U)}else setTimeout(N,50)},dt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},dt.prototype.setUneditable=function(){},dt.prototype.needsContentAttribute=!1;function $h(e,t){if(t=t?Ne(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=Ee(Ve(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=c.getValue()}var i;if(e.form&&(_e(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var s=e.form;i=s.submit;try{var u=s.submit=function(){r(),s.submit=i,s.submit(),s.submit=u}}catch{}}t.finishInit=function(h){h.save=r,h.getTextArea=function(){return e},h.toTextArea=function(){h.toTextArea=isNaN,r(),e.parentNode.removeChild(h.getWrapperElement()),e.style.display="",e.form&&(Et(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var c=tt(function(h){return e.parentNode.insertBefore(h,e.nextSibling)},t);return c}function Jh(e){e.off=Et,e.on=_e,e.wheelEventPixels=nh,e.Doc=jt,e.splitLines=sr,e.countColumn=ze,e.findColumn=Z,e.isWordChar=ke,e.Pass=A,e.signal=lt,e.Line=Kn,e.changeEnd=Vr,e.scrollbarModel=eu,e.Pos=K,e.cmpPos=ge,e.modes=Fn,e.mimeModes=gr,e.resolveMode=Hn,e.getMode=Wn,e.modeExtensions=Xr,e.extendMode=Rn,e.copyState=Cr,e.startState=zn,e.innerMode=ki,e.commands=qi,e.keyMap=Wr,e.keyName=zu,e.isModifierKey=Wu,e.lookupKey=ti,e.normalizeKeyMap=_h,e.StringStream=at,e.SharedTextMarker=ji,e.TextMarker=en,e.LineWidget=Ki,e.e_preventDefault=Pt,e.e_stopPropagation=In,e.e_stop=Ur,e.addClass=Pe,e.contains=le,e.rmClass=Ae,e.keyNames=tn}Bh(tt),Gh(tt);var Zh="iter insert remove copy getEditor constructor".split(" ");for(var Xo in jt.prototype)jt.prototype.hasOwnProperty(Xo)&&xe(Zh,Xo)<0&&(tt.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(jt.prototype[Xo]));return dr(jt),tt.inputStyles={textarea:dt,contenteditable:$e},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),vr.apply(this,arguments)},tt.defineMIME=pn,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){jt.prototype[e]=t},tt.fromTextArea=$h,Jh(tt),tt.version="5.65.16",tt})}(Ls)),Ls.exports}var Ev=rr();const Pv=Av(Ev);var Nv={exports:{}};(function(o,l){(function(a){a(rr())})(function(a){a.defineMode("javascript",function(f,d){var p=f.indentUnit,y=d.statementIndent,x=d.jsonld,b=d.json||x,L=d.trackScope!==!1,w=d.typescript,P=d.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function v(yt){return{type:yt,style:"keyword"}}var C=v("keyword a"),$=v("keyword b"),oe=v("keyword c"),K=v("keyword d"),ge=v("operator"),qe={type:"atom",style:"atom"};return{if:v("if"),while:C,with:C,else:$,do:$,try:$,finally:$,return:K,break:K,continue:K,new:v("new"),delete:oe,void:oe,throw:oe,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:ge,typeof:ge,instanceof:ge,true:qe,false:qe,null:qe,undefined:qe,NaN:qe,Infinity:qe,this:v("this"),class:v("class"),super:v("atom"),yield:oe,export:v("export"),import:v("import"),extends:oe,await:oe}}(),D=/[+\-*&%=<>!?|~^@]/,X=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(v){for(var C=!1,$,oe=!1;($=v.next())!=null;){if(!C){if($=="/"&&!oe)return;$=="["?oe=!0:oe&&$=="]"&&(oe=!1)}C=!C&&$=="\\"}}var W,M;function S(v,C,$){return W=v,M=$,C}function O(v,C){var $=v.next();if($=='"'||$=="'")return C.tokenize=R($),C.tokenize(v,C);if($=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return S("number","number");if($=="."&&v.match(".."))return S("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test($))return S($);if($=="="&&v.eat(">"))return S("=>","operator");if($=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return S("number","number");if(/\d/.test($))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),S("number","number");if($=="/")return v.eat("*")?(C.tokenize=B,B(v,C)):v.eat("/")?(v.skipToEnd(),S("comment","comment")):ir(v,C,1)?(V(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),S("regexp","string-2")):(v.eat("="),S("operator","operator",v.current()));if($=="`")return C.tokenize=ee,ee(v,C);if($=="#"&&v.peek()=="!")return v.skipToEnd(),S("meta","meta");if($=="#"&&v.eatWhile(P))return S("variable","property");if($=="<"&&v.match("!--")||$=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),S("comment","comment");if(D.test($))return($!=">"||!C.lexical||C.lexical.type!=">")&&(v.eat("=")?($=="!"||$=="=")&&v.eat("="):/[<>*+\-|&?]/.test($)&&(v.eat($),$==">"&&v.eat($))),$=="?"&&v.eat(".")?S("."):S("operator","operator",v.current());if(P.test($)){v.eatWhile(P);var oe=v.current();if(C.lastType!="."){if(E.propertyIsEnumerable(oe)){var K=E[oe];return S(K.type,K.style,oe)}if(oe=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return S("async","keyword",oe)}return S("variable","variable",oe)}}function R(v){return function(C,$){var oe=!1,K;if(x&&C.peek()=="@"&&C.match(X))return $.tokenize=O,S("jsonld-keyword","meta");for(;(K=C.next())!=null&&!(K==v&&!oe);)oe=!oe&&K=="\\";return oe||($.tokenize=O),S("string","string")}}function B(v,C){for(var $=!1,oe;oe=v.next();){if(oe=="/"&&$){C.tokenize=O;break}$=oe=="*"}return S("comment","comment")}function ee(v,C){for(var $=!1,oe;(oe=v.next())!=null;){if(!$&&(oe=="`"||oe=="$"&&v.eat("{"))){C.tokenize=O;break}$=!$&&oe=="\\"}return S("quasi","string-2",v.current())}var fe="([{}])";function ae(v,C){C.fatArrowAt&&(C.fatArrowAt=null);var $=v.string.indexOf("=>",v.start);if(!($<0)){if(w){var oe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,$));oe&&($=oe.index)}for(var K=0,ge=!1,qe=$-1;qe>=0;--qe){var yt=v.string.charAt(qe),Bt=fe.indexOf(yt);if(Bt>=0&&Bt<3){if(!K){++qe;break}if(--K==0){yt=="("&&(ge=!0);break}}else if(Bt>=3&&Bt<6)++K;else if(P.test(yt))ge=!0;else if(/["'\/`]/.test(yt))for(;;--qe){if(qe==0)return;var Bn=v.string.charAt(qe-1);if(Bn==yt&&v.string.charAt(qe-2)!="\\"){qe--;break}}else if(ge&&!K){++qe;break}}ge&&!K&&(C.fatArrowAt=qe)}}var be={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function me(v,C,$,oe,K,ge){this.indented=v,this.column=C,this.type=$,this.prev=K,this.info=ge,oe!=null&&(this.align=oe)}function ce(v,C){if(!L)return!1;for(var $=v.localVars;$;$=$.next)if($.name==C)return!0;for(var oe=v.context;oe;oe=oe.prev)for(var $=oe.vars;$;$=$.next)if($.name==C)return!0}function Ae(v,C,$,oe,K){var ge=v.cc;for(j.state=v,j.stream=K,j.marked=null,j.cc=ge,j.style=C,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var qe=ge.length?ge.pop():b?xe:ze;if(qe($,oe)){for(;ge.length&&ge[ge.length-1].lex;)ge.pop()();return j.marked?j.marked:$=="variable"&&ce(v,oe)?"variable-2":C}}}var j={state:null,column:null,marked:null,cc:null};function ne(){for(var v=arguments.length-1;v>=0;v--)j.cc.push(arguments[v])}function m(){return ne.apply(null,arguments),!0}function re(v,C){for(var $=C;$;$=$.next)if($.name==v)return!0;return!1}function Y(v){var C=j.state;if(j.marked="def",!!L){if(C.context){if(C.lexical.info=="var"&&C.context&&C.context.block){var $=le(v,C.context);if($!=null){C.context=$;return}}else if(!re(v,C.localVars)){C.localVars=new Be(v,C.localVars);return}}d.globalVars&&!re(v,C.globalVars)&&(C.globalVars=new Be(v,C.globalVars))}}function le(v,C){if(C)if(C.block){var $=le(v,C.prev);return $?$==C.prev?C:new Pe($,C.vars,!0):null}else return re(v,C.vars)?C:new Pe(C.prev,new Be(v,C.vars),!1);else return null}function Ee(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function Pe(v,C,$){this.prev=v,this.vars=C,this.block=$}function Be(v,C){this.name=v,this.next=C}var Ze=new Be("this",new Be("arguments",null));function Je(){j.state.context=new Pe(j.state.context,j.state.localVars,!1),j.state.localVars=Ze}function ht(){j.state.context=new Pe(j.state.context,j.state.localVars,!0),j.state.localVars=null}Je.lex=ht.lex=!0;function Ve(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}Ve.lex=!0;function Ce(v,C){var $=function(){var oe=j.state,K=oe.indented;if(oe.lexical.type=="stat")K=oe.lexical.indented;else for(var ge=oe.lexical;ge&&ge.type==")"&&ge.align;ge=ge.prev)K=ge.indented;oe.lexical=new me(K,j.stream.column(),v,null,oe.lexical,C)};return $.lex=!0,$}function Le(){var v=j.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}Le.lex=!0;function Ne(v){function C($){return $==v?m():v==";"||$=="}"||$==")"||$=="]"?ne():m(C)}return C}function ze(v,C){return v=="var"?m(Ce("vardef",C),In,Ne(";"),Le):v=="keyword a"?m(Ce("form"),A,ze,Le):v=="keyword b"?m(Ce("form"),ze,Le):v=="keyword d"?j.stream.match(/^\s*$/,!1)?m():m(Ce("stat"),G,Ne(";"),Le):v=="debugger"?m(Ne(";")):v=="{"?m(Ce("}"),ht,Mt,Le,Ve):v==";"?m():v=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==Le&&j.state.cc.pop()(),m(Ce("form"),A,ze,Le,Dn)):v=="function"?m(sr):v=="for"?m(Ce("form"),ht,vo,ze,Ve,Le):v=="class"||w&&C=="interface"?(j.marked="keyword",m(Ce("form",v=="class"?v:C),Fn,Le)):v=="variable"?w&&C=="declare"?(j.marked="keyword",m(ze)):w&&(C=="module"||C=="enum"||C=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",C=="enum"?m(we):C=="type"?m(mo,Ne("operator"),Me,Ne(";")):m(Ce("form"),zt,Ne("{"),Ce("}"),Mt,Le,Le)):w&&C=="namespace"?(j.marked="keyword",m(Ce("form"),xe,ze,Le)):w&&C=="abstract"?(j.marked="keyword",m(ze)):m(Ce("stat"),ue):v=="switch"?m(Ce("form"),A,Ne("{"),Ce("}","switch"),ht,Mt,Le,Le,Ve):v=="case"?m(xe,Ne(":")):v=="default"?m(Ne(":")):v=="catch"?m(Ce("form"),Je,Oe,ze,Le,Ve):v=="export"?m(Ce("stat"),Hn,Le):v=="import"?m(Ce("stat"),Xr,Le):v=="async"?m(ze):C=="@"?m(xe,ze):ne(Ce("stat"),xe,Ne(";"),Le)}function Oe(v){if(v=="(")return m(pr,Ne(")"))}function xe(v,C){return I(v,C,!1)}function ct(v,C){return I(v,C,!0)}function A(v){return v!="("?ne():m(Ce(")"),G,Ne(")"),Le)}function I(v,C,$){if(j.state.fatArrowAt==j.stream.start){var oe=$?te:J;if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,Ne("=>"),oe,Ve);if(v=="variable")return ne(Je,zt,Ne("=>"),oe,Ve)}var K=$?Z:q;return be.hasOwnProperty(v)?m(K):v=="function"?m(sr,K):v=="class"||w&&C=="interface"?(j.marked="keyword",m(Ce("form"),Cl,Le)):v=="keyword c"||v=="async"?m($?ct:xe):v=="("?m(Ce(")"),G,Ne(")"),Le,K):v=="operator"||v=="spread"?m($?ct:xe):v=="["?m(Ce("]"),at,Le,K):v=="{"?vt(De,"}",null,K):v=="quasi"?ne(ie,K):v=="new"?m(T($)):m()}function G(v){return v.match(/[;\}\)\],]/)?ne():ne(xe)}function q(v,C){return v==","?m(G):Z(v,C,!1)}function Z(v,C,$){var oe=$==!1?q:Z,K=$==!1?xe:ct;if(v=="=>")return m(Je,$?te:J,Ve);if(v=="operator")return/\+\+|--/.test(C)||w&&C=="!"?m(oe):w&&C=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?m(Ce(">"),We(Me,">"),Le,oe):C=="?"?m(xe,Ne(":"),K):m(K);if(v=="quasi")return ne(ie,oe);if(v!=";"){if(v=="(")return vt(ct,")","call",oe);if(v==".")return m(ke,oe);if(v=="[")return m(Ce("]"),G,Ne("]"),Le,oe);if(w&&C=="as")return j.marked="keyword",m(Me,oe);if(v=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),m(K)}}function ie(v,C){return v!="quasi"?ne():C.slice(C.length-2)!="${"?m(ie):m(G,de)}function de(v){if(v=="}")return j.marked="string-2",j.state.tokenize=ee,m(ie)}function J(v){return ae(j.stream,j.state),ne(v=="{"?ze:xe)}function te(v){return ae(j.stream,j.state),ne(v=="{"?ze:ct)}function T(v){return function(C){return C=="."?m(v?H:z):C=="variable"&&w?m($t,v?Z:q):ne(v?ct:xe)}}function z(v,C){if(C=="target")return j.marked="keyword",m(q)}function H(v,C){if(C=="target")return j.marked="keyword",m(Z)}function ue(v){return v==":"?m(Le,ze):ne(q,Ne(";"),Le)}function ke(v){if(v=="variable")return j.marked="property",m()}function De(v,C){if(v=="async")return j.marked="property",m(De);if(v=="variable"||j.style=="keyword"){if(j.marked="property",C=="get"||C=="set")return m(je);var $;return w&&j.state.fatArrowAt==j.stream.start&&($=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+$[0].length),m(Ke)}else{if(v=="number"||v=="string")return j.marked=x?"property":j.style+" property",m(Ke);if(v=="jsonld-keyword")return m(Ke);if(w&&Ee(C))return j.marked="keyword",m(De);if(v=="[")return m(xe,fr,Ne("]"),Ke);if(v=="spread")return m(ct,Ke);if(C=="*")return j.marked="keyword",m(De);if(v==":")return ne(Ke)}}function je(v){return v!="variable"?ne(Ke):(j.marked="property",m(sr))}function Ke(v){if(v==":")return m(ct);if(v=="(")return ne(sr)}function We(v,C,$){function oe(K,ge){if($?$.indexOf(K)>-1:K==","){var qe=j.state.lexical;return qe.info=="call"&&(qe.pos=(qe.pos||0)+1),m(function(yt,Bt){return yt==C||Bt==C?ne():ne(v)},oe)}return K==C||ge==C?m():$&&$.indexOf(";")>-1?ne(v):m(Ne(C))}return function(K,ge){return K==C||ge==C?m():ne(v,oe)}}function vt(v,C,$){for(var oe=3;oe"),Me);if(v=="quasi")return ne(Et,lr)}function hn(v){if(v=="=>")return m(Me)}function _e(v){return v.match(/[\}\)\]]/)?m():v==","||v==";"?m(_e):ne(Pr,_e)}function Pr(v,C){if(v=="variable"||j.style=="keyword")return j.marked="property",m(Pr);if(C=="?"||v=="number"||v=="string")return m(Pr);if(v==":")return m(Me);if(v=="[")return m(Ne("variable"),nr,Ne("]"),Pr);if(v=="(")return ne(qr,Pr);if(!v.match(/[;\}\)\],]/))return m()}function Et(v,C){return v!="quasi"?ne():C.slice(C.length-2)!="${"?m(Et):m(Me,lt)}function lt(v){if(v=="}")return j.marked="string-2",j.state.tokenize=ee,m(Et)}function st(v,C){return v=="variable"&&j.stream.match(/^\s*[?:]/,!1)||C=="?"?m(st):v==":"?m(Me):v=="spread"?m(st):ne(Me)}function lr(v,C){if(C=="<")return m(Ce(">"),We(Me,">"),Le,lr);if(C=="|"||v=="."||C=="&")return m(Me);if(v=="[")return m(Me,Ne("]"),lr);if(C=="extends"||C=="implements")return j.marked="keyword",m(Me);if(C=="?")return m(Me,Ne(":"),Me)}function $t(v,C){if(C=="<")return m(Ce(">"),We(Me,">"),Le,lr)}function dr(){return ne(Me,Pt)}function Pt(v,C){if(C=="=")return m(Me)}function In(v,C){return C=="enum"?(j.marked="keyword",m(we)):ne(zt,fr,hr,Sl)}function zt(v,C){if(w&&Ee(C))return j.marked="keyword",m(zt);if(v=="variable")return Y(C),m();if(v=="spread")return m(zt);if(v=="[")return vt(xi,"]");if(v=="{")return vt(Ur,"}")}function Ur(v,C){return v=="variable"&&!j.stream.match(/^\s*:/,!1)?(Y(C),m(hr)):(v=="variable"&&(j.marked="property"),v=="spread"?m(zt):v=="}"?ne():v=="["?m(xe,Ne("]"),Ne(":"),Ur):m(Ne(":"),zt,hr))}function xi(){return ne(zt,hr)}function hr(v,C){if(C=="=")return m(ct)}function Sl(v){if(v==",")return m(In)}function Dn(v,C){if(v=="keyword b"&&C=="else")return m(Ce("form","else"),ze,Le)}function vo(v,C){if(C=="await")return m(vo);if(v=="(")return m(Ce(")"),wi,Le)}function wi(v){return v=="var"?m(In,Gr):v=="variable"?m(Gr):ne(Gr)}function Gr(v,C){return v==")"?m():v==";"?m(Gr):C=="in"||C=="of"?(j.marked="keyword",m(xe,Gr)):ne(xe,Gr)}function sr(v,C){if(C=="*")return j.marked="keyword",m(sr);if(v=="variable")return Y(C),m(sr);if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,cr,ze,Ve);if(w&&C=="<")return m(Ce(">"),We(dr,">"),Le,sr)}function qr(v,C){if(C=="*")return j.marked="keyword",m(qr);if(v=="variable")return Y(C),m(qr);if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,cr,Ve);if(w&&C=="<")return m(Ce(">"),We(dr,">"),Le,qr)}function mo(v,C){if(v=="keyword"||v=="variable")return j.marked="type",m(mo);if(C=="<")return m(Ce(">"),We(dr,">"),Le)}function pr(v,C){return C=="@"&&m(xe,pr),v=="spread"?m(pr):w&&Ee(C)?(j.marked="keyword",m(pr)):w&&v=="this"?m(fr,hr):ne(zt,fr,hr)}function Cl(v,C){return v=="variable"?Fn(v,C):gr(v,C)}function Fn(v,C){if(v=="variable")return Y(C),m(gr)}function gr(v,C){if(C=="<")return m(Ce(">"),We(dr,">"),Le,gr);if(C=="extends"||C=="implements"||w&&v==",")return C=="implements"&&(j.marked="keyword"),m(w?Me:xe,gr);if(v=="{")return m(Ce("}"),vr,Le)}function vr(v,C){if(v=="async"||v=="variable"&&(C=="static"||C=="get"||C=="set"||w&&Ee(C))&&j.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return j.marked="keyword",m(vr);if(v=="variable"||j.style=="keyword")return j.marked="property",m(pn,vr);if(v=="number"||v=="string")return m(pn,vr);if(v=="[")return m(xe,fr,Ne("]"),pn,vr);if(C=="*")return j.marked="keyword",m(vr);if(w&&v=="(")return ne(qr,vr);if(v==";"||v==",")return m(vr);if(v=="}")return m();if(C=="@")return m(xe,vr)}function pn(v,C){if(C=="!"||C=="?")return m(pn);if(v==":")return m(Me,hr);if(C=="=")return m(ct);var $=j.state.lexical.prev,oe=$&&$.info=="interface";return ne(oe?qr:sr)}function Hn(v,C){return C=="*"?(j.marked="keyword",m(zn,Ne(";"))):C=="default"?(j.marked="keyword",m(xe,Ne(";"))):v=="{"?m(We(Wn,"}"),zn,Ne(";")):ne(ze)}function Wn(v,C){if(C=="as")return j.marked="keyword",m(Ne("variable"));if(v=="variable")return ne(ct,Wn)}function Xr(v){return v=="string"?m():v=="("?ne(xe):v=="."?ne(q):ne(Rn,Cr,zn)}function Rn(v,C){return v=="{"?vt(Rn,"}"):(v=="variable"&&Y(C),C=="*"&&(j.marked="keyword"),m(ki))}function Cr(v){if(v==",")return m(Rn,Cr)}function ki(v,C){if(C=="as")return j.marked="keyword",m(Rn)}function zn(v,C){if(C=="from")return j.marked="keyword",m(xe)}function at(v){return v=="]"?m():ne(We(ct,"]"))}function we(){return ne(Ce("form"),zt,Ne("{"),Ce("}"),We(Nr,"}"),Le,Le)}function Nr(){return ne(zt,hr)}function Si(v,C){return v.lastType=="operator"||v.lastType==","||D.test(C.charAt(0))||/[,.]/.test(C.charAt(0))}function ir(v,C,$){return C.tokenize==O&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(C.lastType)||C.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-($||0)))}return{startState:function(v){var C={tokenize:O,lastType:"sof",cc:[],lexical:new me((v||0)-p,0,"block",!1),localVars:d.localVars,context:d.localVars&&new Pe(null,null,!1),indented:v||0};return d.globalVars&&typeof d.globalVars=="object"&&(C.globalVars=d.globalVars),C},token:function(v,C){if(v.sol()&&(C.lexical.hasOwnProperty("align")||(C.lexical.align=!1),C.indented=v.indentation(),ae(v,C)),C.tokenize!=B&&v.eatSpace())return null;var $=C.tokenize(v,C);return W=="comment"?$:(C.lastType=W=="operator"&&(M=="++"||M=="--")?"incdec":W,Ae(C,$,W,M,v))},indent:function(v,C){if(v.tokenize==B||v.tokenize==ee)return a.Pass;if(v.tokenize!=O)return 0;var $=C&&C.charAt(0),oe=v.lexical,K;if(!/^\s*else\b/.test(C))for(var ge=v.cc.length-1;ge>=0;--ge){var qe=v.cc[ge];if(qe==Le)oe=oe.prev;else if(qe!=Dn&&qe!=Ve)break}for(;(oe.type=="stat"||oe.type=="form")&&($=="}"||(K=v.cc[v.cc.length-1])&&(K==q||K==Z)&&!/^[,\.=+\-*:?[\(]/.test(C));)oe=oe.prev;y&&oe.type==")"&&oe.prev.type=="stat"&&(oe=oe.prev);var yt=oe.type,Bt=$==yt;return yt=="vardef"?oe.indented+(v.lastType=="operator"||v.lastType==","?oe.info.length+1:0):yt=="form"&&$=="{"?oe.indented:yt=="form"?oe.indented+p:yt=="stat"?oe.indented+(Si(v,C)?y||p:0):oe.info=="switch"&&!Bt&&d.doubleIndentSwitch!=!1?oe.indented+(/^(?:case|default)\b/.test(C)?p:2*p):oe.align?oe.column+(Bt?0:1):oe.indented+(Bt?0:p)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:x,jsonMode:b,expressionAllowed:ir,skipExpression:function(v){Ae(v,"atom","atom","true",new a.StringStream("",2,null))}}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/manifest+json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Iv=Nv.exports,Bf={exports:{}},Kf;function $c(){return Kf||(Kf=1,function(o,l){(function(a){a(rr())})(function(a){a.defineMode("css",function(me,ce){var Ae=ce.inline;ce.propertyKeywords||(ce=a.resolveMode("text/css"));var j=me.indentUnit,ne=ce.tokenHooks,m=ce.documentTypes||{},re=ce.mediaTypes||{},Y=ce.mediaFeatures||{},le=ce.mediaValueKeywords||{},Ee=ce.propertyKeywords||{},Pe=ce.nonStandardPropertyKeywords||{},Be=ce.fontProperties||{},Ze=ce.counterDescriptors||{},Je=ce.colorKeywords||{},ht=ce.valueKeywords||{},Ve=ce.allowNested,Ce=ce.lineComment,Le=ce.supportsAtComponent===!0,Ne=me.highlightNonStandardPropertyKeywords!==!1,ze,Oe;function xe(T,z){return ze=z,T}function ct(T,z){var H=T.next();if(ne[H]){var ue=ne[H](T,z);if(ue!==!1)return ue}if(H=="@")return T.eatWhile(/[\w\\\-]/),xe("def",T.current());if(H=="="||(H=="~"||H=="|")&&T.eat("="))return xe(null,"compare");if(H=='"'||H=="'")return z.tokenize=A(H),z.tokenize(T,z);if(H=="#")return T.eatWhile(/[\w\\\-]/),xe("atom","hash");if(H=="!")return T.match(/^\s*\w*/),xe("keyword","important");if(/\d/.test(H)||H=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),xe("number","unit");if(H==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),xe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?xe("variable-2","variable-definition"):xe("variable-2","variable");if(T.match(/^\w+-/))return xe("meta","meta")}else return/[,+>*\/]/.test(H)?xe(null,"select-op"):H=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?xe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(H)?xe(null,H):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(z.tokenize=I),xe("variable callee","variable")):/[\w\\\-]/.test(H)?(T.eatWhile(/[\w\\\-]/),xe("property","word")):xe(null,null)}function A(T){return function(z,H){for(var ue=!1,ke;(ke=z.next())!=null;){if(ke==T&&!ue){T==")"&&z.backUp(1);break}ue=!ue&&ke=="\\"}return(ke==T||!ue&&T!=")")&&(H.tokenize=null),xe("string","string")}}function I(T,z){return T.next(),T.match(/^\s*[\"\')]/,!1)?z.tokenize=null:z.tokenize=A(")"),xe(null,"(")}function G(T,z,H){this.type=T,this.indent=z,this.prev=H}function q(T,z,H,ue){return T.context=new G(H,z.indentation()+(ue===!1?0:j),T.context),H}function Z(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function ie(T,z,H){return te[H.context.type](T,z,H)}function de(T,z,H,ue){for(var ke=ue||1;ke>0;ke--)H.context=H.context.prev;return ie(T,z,H)}function J(T){var z=T.current().toLowerCase();ht.hasOwnProperty(z)?Oe="atom":Je.hasOwnProperty(z)?Oe="keyword":Oe="variable"}var te={};return te.top=function(T,z,H){if(T=="{")return q(H,z,"block");if(T=="}"&&H.context.prev)return Z(H);if(Le&&/@component/i.test(T))return q(H,z,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return q(H,z,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return q(H,z,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return H.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return q(H,z,"at");if(T=="hash")Oe="builtin";else if(T=="word")Oe="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return q(H,z,"interpolation");if(T==":")return"pseudo";if(Ve&&T=="(")return q(H,z,"parens")}return H.context.type},te.block=function(T,z,H){if(T=="word"){var ue=z.current().toLowerCase();return Ee.hasOwnProperty(ue)?(Oe="property","maybeprop"):Pe.hasOwnProperty(ue)?(Oe=Ne?"string-2":"property","maybeprop"):Ve?(Oe=z.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Oe+=" error","maybeprop")}else return T=="meta"?"block":!Ve&&(T=="hash"||T=="qualifier")?(Oe="error","block"):te.top(T,z,H)},te.maybeprop=function(T,z,H){return T==":"?q(H,z,"prop"):ie(T,z,H)},te.prop=function(T,z,H){if(T==";")return Z(H);if(T=="{"&&Ve)return q(H,z,"propBlock");if(T=="}"||T=="{")return de(T,z,H);if(T=="(")return q(H,z,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(z.current()))Oe+=" error";else if(T=="word")J(z);else if(T=="interpolation")return q(H,z,"interpolation");return"prop"},te.propBlock=function(T,z,H){return T=="}"?Z(H):T=="word"?(Oe="property","maybeprop"):H.context.type},te.parens=function(T,z,H){return T=="{"||T=="}"?de(T,z,H):T==")"?Z(H):T=="("?q(H,z,"parens"):T=="interpolation"?q(H,z,"interpolation"):(T=="word"&&J(z),"parens")},te.pseudo=function(T,z,H){return T=="meta"?"pseudo":T=="word"?(Oe="variable-3",H.context.type):ie(T,z,H)},te.documentTypes=function(T,z,H){return T=="word"&&m.hasOwnProperty(z.current())?(Oe="tag",H.context.type):te.atBlock(T,z,H)},te.atBlock=function(T,z,H){if(T=="(")return q(H,z,"atBlock_parens");if(T=="}"||T==";")return de(T,z,H);if(T=="{")return Z(H)&&q(H,z,Ve?"block":"top");if(T=="interpolation")return q(H,z,"interpolation");if(T=="word"){var ue=z.current().toLowerCase();ue=="only"||ue=="not"||ue=="and"||ue=="or"?Oe="keyword":re.hasOwnProperty(ue)?Oe="attribute":Y.hasOwnProperty(ue)?Oe="property":le.hasOwnProperty(ue)?Oe="keyword":Ee.hasOwnProperty(ue)?Oe="property":Pe.hasOwnProperty(ue)?Oe=Ne?"string-2":"property":ht.hasOwnProperty(ue)?Oe="atom":Je.hasOwnProperty(ue)?Oe="keyword":Oe="error"}return H.context.type},te.atComponentBlock=function(T,z,H){return T=="}"?de(T,z,H):T=="{"?Z(H)&&q(H,z,Ve?"block":"top",!1):(T=="word"&&(Oe="error"),H.context.type)},te.atBlock_parens=function(T,z,H){return T==")"?Z(H):T=="{"||T=="}"?de(T,z,H,2):te.atBlock(T,z,H)},te.restricted_atBlock_before=function(T,z,H){return T=="{"?q(H,z,"restricted_atBlock"):T=="word"&&H.stateArg=="@counter-style"?(Oe="variable","restricted_atBlock_before"):ie(T,z,H)},te.restricted_atBlock=function(T,z,H){return T=="}"?(H.stateArg=null,Z(H)):T=="word"?(H.stateArg=="@font-face"&&!Be.hasOwnProperty(z.current().toLowerCase())||H.stateArg=="@counter-style"&&!Ze.hasOwnProperty(z.current().toLowerCase())?Oe="error":Oe="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(T,z,H){return T=="word"?(Oe="variable","keyframes"):T=="{"?q(H,z,"top"):ie(T,z,H)},te.at=function(T,z,H){return T==";"?Z(H):T=="{"||T=="}"?de(T,z,H):(T=="word"?Oe="tag":T=="hash"&&(Oe="builtin"),"at")},te.interpolation=function(T,z,H){return T=="}"?Z(H):T=="{"||T==";"?de(T,z,H):(T=="word"?Oe="variable":T!="variable"&&T!="("&&T!=")"&&(Oe="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ae?"block":"top",stateArg:null,context:new G(Ae?"block":"top",T||0,null)}},token:function(T,z){if(!z.tokenize&&T.eatSpace())return null;var H=(z.tokenize||ct)(T,z);return H&&typeof H=="object"&&(ze=H[1],H=H[0]),Oe=H,ze!="comment"&&(z.state=te[z.state](ze,T,z)),Oe},indent:function(T,z){var H=T.context,ue=z&&z.charAt(0),ke=H.indent;return H.type=="prop"&&(ue=="}"||ue==")")&&(H=H.prev),H.prev&&(ue=="}"&&(H.type=="block"||H.type=="top"||H.type=="interpolation"||H.type=="restricted_atBlock")?(H=H.prev,ke=H.indent):(ue==")"&&(H.type=="parens"||H.type=="atBlock_parens")||ue=="{"&&(H.type=="at"||H.type=="atBlock"))&&(ke=Math.max(0,H.indent-j))),ke},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Ce,fold:"brace"}});function f(me){for(var ce={},Ae=0;Ae")):null:m.match("--")?Y(W("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),Y(M(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),re.tokenize=W("meta","?>"),"meta"):(P=m.eat("/")?"closeTag":"openTag",re.tokenize=X,"tag bracket");if(le=="&"){var Ee;return m.eat("#")?m.eat("x")?Ee=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):Ee=m.eatWhile(/[\d]/)&&m.eat(";"):Ee=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),Ee?"atom":"error"}else return m.eatWhile(/[^&<]/),null}D.isInText=!0;function X(m,re){var Y=m.next();if(Y==">"||Y=="/"&&m.eat(">"))return re.tokenize=D,P=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return P="equals",null;if(Y=="<"){re.tokenize=D,re.state=ee,re.tagName=re.tagStart=null;var le=re.tokenize(m,re);return le?le+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(re.tokenize=V(Y),re.stringStartCol=m.column(),re.tokenize(m,re)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function V(m){var re=function(Y,le){for(;!Y.eol();)if(Y.next()==m){le.tokenize=X;break}return"string"};return re.isInAttribute=!0,re}function W(m,re){return function(Y,le){for(;!Y.eol();){if(Y.match(re)){le.tokenize=D;break}Y.next()}return m}}function M(m){return function(re,Y){for(var le;(le=re.next())!=null;){if(le=="<")return Y.tokenize=M(m+1),Y.tokenize(re,Y);if(le==">")if(m==1){Y.tokenize=D;break}else return Y.tokenize=M(m-1),Y.tokenize(re,Y)}return"meta"}}function S(m){return m&&m.toLowerCase()}function O(m,re,Y){this.prev=m.context,this.tagName=re||"",this.indent=m.indented,this.startOfLine=Y,(b.doNotIndent.hasOwnProperty(re)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function R(m){m.context&&(m.context=m.context.prev)}function B(m,re){for(var Y;;){if(!m.context||(Y=m.context.tagName,!b.contextGrabbers.hasOwnProperty(S(Y))||!b.contextGrabbers[S(Y)].hasOwnProperty(S(re))))return;R(m)}}function ee(m,re,Y){return m=="openTag"?(Y.tagStart=re.column(),fe):m=="closeTag"?ae:ee}function fe(m,re,Y){return m=="word"?(Y.tagName=re.current(),E="tag",ce):b.allowMissingTagName&&m=="endTag"?(E="tag bracket",ce(m,re,Y)):(E="error",fe)}function ae(m,re,Y){if(m=="word"){var le=re.current();return Y.context&&Y.context.tagName!=le&&b.implicitlyClosed.hasOwnProperty(S(Y.context.tagName))&&R(Y),Y.context&&Y.context.tagName==le||b.matchClosing===!1?(E="tag",be):(E="tag error",me)}else return b.allowMissingTagName&&m=="endTag"?(E="tag bracket",be(m,re,Y)):(E="error",me)}function be(m,re,Y){return m!="endTag"?(E="error",be):(R(Y),ee)}function me(m,re,Y){return E="error",be(m,re,Y)}function ce(m,re,Y){if(m=="word")return E="attribute",Ae;if(m=="endTag"||m=="selfcloseTag"){var le=Y.tagName,Ee=Y.tagStart;return Y.tagName=Y.tagStart=null,m=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(S(le))?B(Y,le):(B(Y,le),Y.context=new O(Y,le,Ee==Y.indented)),ee}return E="error",ce}function Ae(m,re,Y){return m=="equals"?j:(b.allowMissing||(E="error"),ce(m,re,Y))}function j(m,re,Y){return m=="string"?ne:m=="word"&&b.allowUnquoted?(E="string",ce):(E="error",ce(m,re,Y))}function ne(m,re,Y){return m=="string"?ne:ce(m,re,Y)}return{startState:function(m){var re={tokenize:D,state:ee,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(re.baseIndent=m),re},token:function(m,re){if(!re.tagName&&m.sol()&&(re.indented=m.indentation()),m.eatSpace())return null;P=null;var Y=re.tokenize(m,re);return(Y||P)&&Y!="comment"&&(E=null,re.state=re.state(P||Y,m,re),E&&(Y=E=="error"?Y+" error":E)),Y},indent:function(m,re,Y){var le=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+x;if(le&&le.noIndent)return a.Pass;if(m.tokenize!=X&&m.tokenize!=D)return Y?Y.match(/^(\s*)/)[0].length:0;if(m.tagName)return b.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+x*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(m){m.state==j&&(m.state=ce)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var re=[],Y=m.context;Y;Y=Y.prev)re.push(Y.tagName);return re.reverse()}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),jf.exports}(function(o,l){(function(a){a(rr(),Dv(),Iv,$c())})(function(a){var f={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function d(P,E,D){var X=P.current(),V=X.search(E);return V>-1?P.backUp(X.length-V):X.match(/<\/?$/)&&(P.backUp(X.length),P.match(E,!1)||P.match(X)),D}var p={};function y(P){var E=p[P];return E||(p[P]=new RegExp("\\s+"+P+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function x(P,E){var D=P.match(y(E));return D?/^\s*(.*?)\s*$/.exec(D[2])[1]:""}function b(P,E){return new RegExp((E?"^":"")+"","i")}function L(P,E){for(var D in P)for(var X=E[D]||(E[D]=[]),V=P[D],W=V.length-1;W>=0;W--)X.unshift(V[W])}function w(P,E){for(var D=0;D=0;M--)X.script.unshift(["type",W[M].matches,W[M].mode]);function S(O,R){var B=D.token(O,R.htmlState),ee=/\btag\b/.test(B),fe;if(ee&&!/[<>\s\/]/.test(O.current())&&(fe=R.htmlState.tagName&&R.htmlState.tagName.toLowerCase())&&X.hasOwnProperty(fe))R.inTag=fe+" ";else if(R.inTag&&ee&&/>$/.test(O.current())){var ae=/^([\S]+) (.*)/.exec(R.inTag);R.inTag=null;var be=O.current()==">"&&w(X[ae[1]],ae[2]),me=a.getMode(P,be),ce=b(ae[1],!0),Ae=b(ae[1],!1);R.token=function(j,ne){return j.match(ce,!1)?(ne.token=S,ne.localState=ne.localMode=null,null):d(j,Ae,ne.localMode.token(j,ne.localState))},R.localMode=me,R.localState=a.startState(me,D.indent(R.htmlState,"",""))}else R.inTag&&(R.inTag+=O.current(),O.eol()&&(R.inTag+=" "));return B}return{startState:function(){var O=a.startState(D);return{token:S,inTag:null,localMode:null,localState:null,htmlState:O}},copyState:function(O){var R;return O.localState&&(R=a.copyState(O.localMode,O.localState)),{token:O.token,inTag:O.inTag,localMode:O.localMode,localState:R,htmlState:a.copyState(D,O.htmlState)}},token:function(O,R){return R.token(O,R)},indent:function(O,R,B){return!O.localMode||/^\s*<\//.test(R)?D.indent(O.htmlState,R,B):O.localMode.indent?O.localMode.indent(O.localState,R,B):a.Pass},innerMode:function(O){return{state:O.localState||O.htmlState,mode:O.localMode||D}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")})})();(function(o,l){(function(a){a(rr())})(function(a){var f={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},d=a.Pos;a.defineOption("autoCloseBrackets",!1,function(M,S,O){O&&O!=a.Init&&(M.removeKeyMap(y),M.state.closeBrackets=null),S&&(x(p(S,"pairs")),M.state.closeBrackets=S,M.addKeyMap(y))});function p(M,S){return S=="pairs"&&typeof M=="string"?M:typeof M=="object"&&M[S]!=null?M[S]:f[S]}var y={Backspace:w,Enter:P};function x(M){for(var S=0;S=0;B--){var fe=R[B].head;M.replaceRange("",d(fe.line,fe.ch-1),d(fe.line,fe.ch+1),"+delete")}}function P(M){var S=L(M),O=S&&p(S,"explode");if(!O||M.getOption("disableInput"))return a.Pass;for(var R=M.listSelections(),B=0;B0?{line:fe.head.line,ch:fe.head.ch+S}:{line:fe.head.line-1};O.push({anchor:ae,head:ae})}M.setSelections(O,B)}function D(M){var S=a.cmpPos(M.anchor,M.head)>0;return{anchor:new d(M.anchor.line,M.anchor.ch+(S?-1:1)),head:new d(M.head.line,M.head.ch+(S?1:-1))}}function X(M,S){var O=L(M);if(!O||M.getOption("disableInput"))return a.Pass;var R=p(O,"pairs"),B=R.indexOf(S);if(B==-1)return a.Pass;for(var ee=p(O,"closeBefore"),fe=p(O,"triples"),ae=R.charAt(B+1)==S,be=M.listSelections(),me=B%2==0,ce,Ae=0;Ae=0&&M.getRange(ne,d(ne.line,ne.ch+3))==S+S+S?m="skipThree":m="skip";else if(ae&&ne.ch>1&&fe.indexOf(S)>=0&&M.getRange(d(ne.line,ne.ch-2),ne)==S+S){if(ne.ch>2&&/\bstring/.test(M.getTokenTypeAt(d(ne.line,ne.ch-2))))return a.Pass;m="addFour"}else if(ae){var Y=ne.ch==0?" ":M.getRange(d(ne.line,ne.ch-1),ne);if(!a.isWordChar(re)&&Y!=S&&!a.isWordChar(Y))m="both";else return a.Pass}else if(me&&(re.length===0||/\s/.test(re)||ee.indexOf(re)>-1))m="both";else return a.Pass;if(!ce)ce=m;else if(ce!=m)return a.Pass}var le=B%2?R.charAt(B-1):S,Ee=B%2?S:R.charAt(B+1);M.operation(function(){if(ce=="skip")E(M,1);else if(ce=="skipThree")E(M,3);else if(ce=="surround"){for(var Pe=M.getSelections(),Be=0;Be=S.max))return S.ch=0,S.text=S.cm.getLine(++S.line),!0}function P(S){if(!(S.line<=S.min))return S.text=S.cm.getLine(--S.line),S.ch=S.text.length,!0}function E(S){for(;;){var O=S.text.indexOf(">",S.ch);if(O==-1){if(w(S))continue;return}if(!L(S,O+1)){S.ch=O+1;continue}var R=S.text.lastIndexOf("/",O),B=R>-1&&!/\S/.test(S.text.slice(R+1,O));return S.ch=O+1,B?"selfClose":"regular"}}function D(S){for(;;){var O=S.ch?S.text.lastIndexOf("<",S.ch-1):-1;if(O==-1){if(P(S))continue;return}if(!L(S,O+1)){S.ch=O;continue}x.lastIndex=O,S.ch=O;var R=x.exec(S.text);if(R&&R.index==O)return R}}function X(S){for(;;){x.lastIndex=S.ch;var O=x.exec(S.text);if(!O){if(w(S))continue;return}if(!L(S,O.index+1)){S.ch=O.index+1;continue}return S.ch=O.index+O[0].length,O}}function V(S){for(;;){var O=S.ch?S.text.lastIndexOf(">",S.ch-1):-1;if(O==-1){if(P(S))continue;return}if(!L(S,O+1)){S.ch=O;continue}var R=S.text.lastIndexOf("/",O),B=R>-1&&!/\S/.test(S.text.slice(R+1,O));return S.ch=O+1,B?"selfClose":"regular"}}function W(S,O){for(var R=[];;){var B=X(S),ee,fe=S.line,ae=S.ch-(B?B[0].length:0);if(!B||!(ee=E(S)))return;if(ee!="selfClose")if(B[1]){for(var be=R.length-1;be>=0;--be)if(R[be]==B[2]){R.length=be;break}if(be<0&&(!O||O==B[2]))return{tag:B[2],from:f(fe,ae),to:f(S.line,S.ch)}}else R.push(B[2])}}function M(S,O){for(var R=[];;){var B=V(S);if(!B)return;if(B=="selfClose"){D(S);continue}var ee=S.line,fe=S.ch,ae=D(S);if(!ae)return;if(ae[1])R.push(ae[2]);else{for(var be=R.length-1;be>=0;--be)if(R[be]==ae[2]){R.length=be;break}if(be<0&&(!O||O==ae[2]))return{tag:ae[2],from:f(S.line,S.ch),to:f(ee,fe)}}}}a.registerHelper("fold","xml",function(S,O){for(var R=new b(S,O.line,0);;){var B=X(R);if(!B||R.line!=O.line)return;var ee=E(R);if(!ee)return;if(!B[1]&&ee!="selfClose"){var fe=f(R.line,R.ch),ae=W(R,B[2]);return ae&&d(ae.from,fe)>0?{from:fe,to:ae.from}:null}}}),a.findMatchingTag=function(S,O,R){var B=new b(S,O.line,O.ch,R);if(!(B.text.indexOf(">")==-1&&B.text.indexOf("<")==-1)){var ee=E(B),fe=ee&&f(B.line,B.ch),ae=ee&&D(B);if(!(!ee||!ae||d(B,O)>0)){var be={from:f(B.line,B.ch),to:fe,tag:ae[2]};return ee=="selfClose"?{open:be,close:null,at:"open"}:ae[1]?{open:M(B,ae[2]),close:be,at:"close"}:(B=new b(S,fe.line,fe.ch,R),{open:be,close:W(B,ae[2]),at:"open"})}}},a.findEnclosingTag=function(S,O,R,B){for(var ee=new b(S,O.line,O.ch,R);;){var fe=M(ee,B);if(!fe)break;var ae=new b(S,O.line,O.ch,R),be=W(ae,fe.tag);if(be)return{open:fe,close:be}}},a.scanForClosingTag=function(S,O,R,B){var ee=new b(S,O.line,O.ch,B?{from:0,to:B}:null);return W(ee,R)}})}()),Gf.exports}(function(o,l){(function(a){a(rr(),Fv())})(function(a){a.defineOption("autoCloseTags",!1,function(w,P,E){if(E!=a.Init&&E&&w.removeKeyMap("autoCloseTags"),!!P){var D={name:"autoCloseTags"};(typeof P!="object"||P.whenClosing!==!1)&&(D["'/'"]=function(X){return x(X)}),(typeof P!="object"||P.whenOpening!==!1)&&(D["'>'"]=function(X){return p(X)}),w.addKeyMap(D)}});var f=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function p(w){if(w.getOption("disableInput"))return a.Pass;for(var P=w.listSelections(),E=[],D=w.getOption("autoCloseTags"),X=0;XV.ch&&(R=R.slice(0,R.length-W.end+V.ch));var ae=R.toLowerCase();if(!R||W.type=="string"&&(W.end!=V.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&O.close||W.string.indexOf("/")==V.ch-W.start-1||ee&&b(ee,ae)>-1||L(w,M.mode.xmlCurrentContext&&M.mode.xmlCurrentContext(S)||[],R,V,!0))return a.Pass;var be=typeof D=="object"&&D.emptyTags;if(be&&b(be,R)>-1){E[X]={text:"/>",newPos:a.Pos(V.line,V.ch+2)};continue}var me=fe&&b(fe,ae)>-1;E[X]={indent:me,text:">"+(me?` + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;w&&(_=i.ownerDocument.defaultView.scrollY),r.input.focus(),w&&i.ownerDocument.defaultView.scrollTo(null,_),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=N,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function F(){if(i.selectionStart!=null){var Q=n.somethingSelected(),se="​"+(Q?i.value:"");i.value="⇚",i.value=se,t.prevInput=Q?"":"​",i.selectionStart=1,i.selectionEnd=se.length,r.selForContextMenu=n.doc.sel}}function N(){if(t.contextMenuPending==N&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,i.style.cssText=h,b&&L<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),i.selectionStart!=null)){(!b||b&&L<9)&&F();var Q=0,se=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?xt(n,Su)(n):Q++<10?r.detectingSelectAll=setTimeout(se,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(se,200)}}if(b&&L>=9&&F(),me){Ur(e);var U=function(){Et(window,"mouseup",U),setTimeout(N,20)};_e(window,"mouseup",U)}else setTimeout(N,50)},dt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},dt.prototype.setUneditable=function(){},dt.prototype.needsContentAttribute=!1;function Zh(e,t){if(t=t?Ne(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=Ee(Ve(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=c.getValue()}var i;if(e.form&&(_e(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var s=e.form;i=s.submit;try{var u=s.submit=function(){r(),s.submit=i,s.submit(),s.submit=u}}catch{}}t.finishInit=function(h){h.save=r,h.getTextArea=function(){return e},h.toTextArea=function(){h.toTextArea=isNaN,r(),e.parentNode.removeChild(h.getWrapperElement()),e.style.display="",e.form&&(Et(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var c=tt(function(h){return e.parentNode.insertBefore(h,e.nextSibling)},t);return c}function Vh(e){e.off=Et,e.on=_e,e.wheelEventPixels=oh,e.Doc=jt,e.splitLines=sr,e.countColumn=ze,e.findColumn=Z,e.isWordChar=ke,e.Pass=A,e.signal=lt,e.Line=Kn,e.changeEnd=Vr,e.scrollbarModel=Qa,e.Pos=K,e.cmpPos=ge,e.modes=Fn,e.mimeModes=gr,e.resolveMode=Hn,e.getMode=Wn,e.modeExtensions=Xr,e.extendMode=Rn,e.copyState=Cr,e.startState=zn,e.innerMode=ki,e.commands=qi,e.keyMap=Wr,e.keyName=Ru,e.isModifierKey=Hu,e.lookupKey=ti,e.normalizeKeyMap=Lh,e.StringStream=at,e.SharedTextMarker=ji,e.TextMarker=en,e.LineWidget=Ki,e.e_preventDefault=Pt,e.e_stopPropagation=In,e.e_stop=Ur,e.addClass=Pe,e.contains=le,e.rmClass=Ae,e.keyNames=tn}jh(tt),Xh(tt);var Qh="iter insert remove copy getEditor constructor".split(" ");for(var Xo in jt.prototype)jt.prototype.hasOwnProperty(Xo)&&xe(Qh,Xo)<0&&(tt.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(jt.prototype[Xo]));return dr(jt),tt.inputStyles={textarea:dt,contenteditable:$e},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),vr.apply(this,arguments)},tt.defineMIME=pn,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){jt.prototype[e]=t},tt.fromTextArea=Zh,Vh(tt),tt.version="5.65.16",tt})})($c);var rr=$c.exports;const Nv=Pv(rr);var Rf={exports:{}},zf;function Jc(){return zf||(zf=1,function(o,l){(function(a){a(rr)})(function(a){a.defineMode("javascript",function(f,d){var p=f.indentUnit,y=d.statementIndent,x=d.jsonld,b=d.json||x,L=d.trackScope!==!1,w=d.typescript,P=d.wordCharacters||/[\w$\xa1-\uffff]/,E=function(){function v(yt){return{type:yt,style:"keyword"}}var C=v("keyword a"),$=v("keyword b"),oe=v("keyword c"),K=v("keyword d"),ge=v("operator"),qe={type:"atom",style:"atom"};return{if:v("if"),while:C,with:C,else:$,do:$,try:$,finally:$,return:K,break:K,continue:K,new:v("new"),delete:oe,void:oe,throw:oe,debugger:v("debugger"),var:v("var"),const:v("var"),let:v("var"),function:v("function"),catch:v("catch"),for:v("for"),switch:v("switch"),case:v("case"),default:v("default"),in:ge,typeof:ge,instanceof:ge,true:qe,false:qe,null:qe,undefined:qe,NaN:qe,Infinity:qe,this:v("this"),class:v("class"),super:v("atom"),yield:oe,export:v("export"),import:v("import"),extends:oe,await:oe}}(),D=/[+\-*&%=<>!?|~^@]/,X=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function V(v){for(var C=!1,$,oe=!1;($=v.next())!=null;){if(!C){if($=="/"&&!oe)return;$=="["?oe=!0:oe&&$=="]"&&(oe=!1)}C=!C&&$=="\\"}}var W,M;function S(v,C,$){return W=v,M=$,C}function O(v,C){var $=v.next();if($=='"'||$=="'")return C.tokenize=R($),C.tokenize(v,C);if($=="."&&v.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return S("number","number");if($=="."&&v.match(".."))return S("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test($))return S($);if($=="="&&v.eat(">"))return S("=>","operator");if($=="0"&&v.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return S("number","number");if(/\d/.test($))return v.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),S("number","number");if($=="/")return v.eat("*")?(C.tokenize=B,B(v,C)):v.eat("/")?(v.skipToEnd(),S("comment","comment")):ir(v,C,1)?(V(v),v.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),S("regexp","string-2")):(v.eat("="),S("operator","operator",v.current()));if($=="`")return C.tokenize=ee,ee(v,C);if($=="#"&&v.peek()=="!")return v.skipToEnd(),S("meta","meta");if($=="#"&&v.eatWhile(P))return S("variable","property");if($=="<"&&v.match("!--")||$=="-"&&v.match("->")&&!/\S/.test(v.string.slice(0,v.start)))return v.skipToEnd(),S("comment","comment");if(D.test($))return($!=">"||!C.lexical||C.lexical.type!=">")&&(v.eat("=")?($=="!"||$=="=")&&v.eat("="):/[<>*+\-|&?]/.test($)&&(v.eat($),$==">"&&v.eat($))),$=="?"&&v.eat(".")?S("."):S("operator","operator",v.current());if(P.test($)){v.eatWhile(P);var oe=v.current();if(C.lastType!="."){if(E.propertyIsEnumerable(oe)){var K=E[oe];return S(K.type,K.style,oe)}if(oe=="async"&&v.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return S("async","keyword",oe)}return S("variable","variable",oe)}}function R(v){return function(C,$){var oe=!1,K;if(x&&C.peek()=="@"&&C.match(X))return $.tokenize=O,S("jsonld-keyword","meta");for(;(K=C.next())!=null&&!(K==v&&!oe);)oe=!oe&&K=="\\";return oe||($.tokenize=O),S("string","string")}}function B(v,C){for(var $=!1,oe;oe=v.next();){if(oe=="/"&&$){C.tokenize=O;break}$=oe=="*"}return S("comment","comment")}function ee(v,C){for(var $=!1,oe;(oe=v.next())!=null;){if(!$&&(oe=="`"||oe=="$"&&v.eat("{"))){C.tokenize=O;break}$=!$&&oe=="\\"}return S("quasi","string-2",v.current())}var fe="([{}])";function ae(v,C){C.fatArrowAt&&(C.fatArrowAt=null);var $=v.string.indexOf("=>",v.start);if(!($<0)){if(w){var oe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(v.string.slice(v.start,$));oe&&($=oe.index)}for(var K=0,ge=!1,qe=$-1;qe>=0;--qe){var yt=v.string.charAt(qe),Bt=fe.indexOf(yt);if(Bt>=0&&Bt<3){if(!K){++qe;break}if(--K==0){yt=="("&&(ge=!0);break}}else if(Bt>=3&&Bt<6)++K;else if(P.test(yt))ge=!0;else if(/["'\/`]/.test(yt))for(;;--qe){if(qe==0)return;var Bn=v.string.charAt(qe-1);if(Bn==yt&&v.string.charAt(qe-2)!="\\"){qe--;break}}else if(ge&&!K){++qe;break}}ge&&!K&&(C.fatArrowAt=qe)}}var be={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function me(v,C,$,oe,K,ge){this.indented=v,this.column=C,this.type=$,this.prev=K,this.info=ge,oe!=null&&(this.align=oe)}function ce(v,C){if(!L)return!1;for(var $=v.localVars;$;$=$.next)if($.name==C)return!0;for(var oe=v.context;oe;oe=oe.prev)for(var $=oe.vars;$;$=$.next)if($.name==C)return!0}function Ae(v,C,$,oe,K){var ge=v.cc;for(j.state=v,j.stream=K,j.marked=null,j.cc=ge,j.style=C,v.lexical.hasOwnProperty("align")||(v.lexical.align=!0);;){var qe=ge.length?ge.pop():b?xe:ze;if(qe($,oe)){for(;ge.length&&ge[ge.length-1].lex;)ge.pop()();return j.marked?j.marked:$=="variable"&&ce(v,oe)?"variable-2":C}}}var j={state:null,column:null,marked:null,cc:null};function ne(){for(var v=arguments.length-1;v>=0;v--)j.cc.push(arguments[v])}function m(){return ne.apply(null,arguments),!0}function re(v,C){for(var $=C;$;$=$.next)if($.name==v)return!0;return!1}function Y(v){var C=j.state;if(j.marked="def",!!L){if(C.context){if(C.lexical.info=="var"&&C.context&&C.context.block){var $=le(v,C.context);if($!=null){C.context=$;return}}else if(!re(v,C.localVars)){C.localVars=new Be(v,C.localVars);return}}d.globalVars&&!re(v,C.globalVars)&&(C.globalVars=new Be(v,C.globalVars))}}function le(v,C){if(C)if(C.block){var $=le(v,C.prev);return $?$==C.prev?C:new Pe($,C.vars,!0):null}else return re(v,C.vars)?C:new Pe(C.prev,new Be(v,C.vars),!1);else return null}function Ee(v){return v=="public"||v=="private"||v=="protected"||v=="abstract"||v=="readonly"}function Pe(v,C,$){this.prev=v,this.vars=C,this.block=$}function Be(v,C){this.name=v,this.next=C}var Ze=new Be("this",new Be("arguments",null));function Je(){j.state.context=new Pe(j.state.context,j.state.localVars,!1),j.state.localVars=Ze}function ht(){j.state.context=new Pe(j.state.context,j.state.localVars,!0),j.state.localVars=null}Je.lex=ht.lex=!0;function Ve(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}Ve.lex=!0;function Ce(v,C){var $=function(){var oe=j.state,K=oe.indented;if(oe.lexical.type=="stat")K=oe.lexical.indented;else for(var ge=oe.lexical;ge&&ge.type==")"&&ge.align;ge=ge.prev)K=ge.indented;oe.lexical=new me(K,j.stream.column(),v,null,oe.lexical,C)};return $.lex=!0,$}function Le(){var v=j.state;v.lexical.prev&&(v.lexical.type==")"&&(v.indented=v.lexical.indented),v.lexical=v.lexical.prev)}Le.lex=!0;function Ne(v){function C($){return $==v?m():v==";"||$=="}"||$==")"||$=="]"?ne():m(C)}return C}function ze(v,C){return v=="var"?m(Ce("vardef",C),In,Ne(";"),Le):v=="keyword a"?m(Ce("form"),A,ze,Le):v=="keyword b"?m(Ce("form"),ze,Le):v=="keyword d"?j.stream.match(/^\s*$/,!1)?m():m(Ce("stat"),G,Ne(";"),Le):v=="debugger"?m(Ne(";")):v=="{"?m(Ce("}"),ht,Mt,Le,Ve):v==";"?m():v=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==Le&&j.state.cc.pop()(),m(Ce("form"),A,ze,Le,Dn)):v=="function"?m(sr):v=="for"?m(Ce("form"),ht,vo,ze,Ve,Le):v=="class"||w&&C=="interface"?(j.marked="keyword",m(Ce("form",v=="class"?v:C),Fn,Le)):v=="variable"?w&&C=="declare"?(j.marked="keyword",m(ze)):w&&(C=="module"||C=="enum"||C=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",C=="enum"?m(we):C=="type"?m(mo,Ne("operator"),Me,Ne(";")):m(Ce("form"),zt,Ne("{"),Ce("}"),Mt,Le,Le)):w&&C=="namespace"?(j.marked="keyword",m(Ce("form"),xe,ze,Le)):w&&C=="abstract"?(j.marked="keyword",m(ze)):m(Ce("stat"),ue):v=="switch"?m(Ce("form"),A,Ne("{"),Ce("}","switch"),ht,Mt,Le,Le,Ve):v=="case"?m(xe,Ne(":")):v=="default"?m(Ne(":")):v=="catch"?m(Ce("form"),Je,Oe,ze,Le,Ve):v=="export"?m(Ce("stat"),Hn,Le):v=="import"?m(Ce("stat"),Xr,Le):v=="async"?m(ze):C=="@"?m(xe,ze):ne(Ce("stat"),xe,Ne(";"),Le)}function Oe(v){if(v=="(")return m(pr,Ne(")"))}function xe(v,C){return I(v,C,!1)}function ct(v,C){return I(v,C,!0)}function A(v){return v!="("?ne():m(Ce(")"),G,Ne(")"),Le)}function I(v,C,$){if(j.state.fatArrowAt==j.stream.start){var oe=$?te:J;if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,Ne("=>"),oe,Ve);if(v=="variable")return ne(Je,zt,Ne("=>"),oe,Ve)}var K=$?Z:q;return be.hasOwnProperty(v)?m(K):v=="function"?m(sr,K):v=="class"||w&&C=="interface"?(j.marked="keyword",m(Ce("form"),Cl,Le)):v=="keyword c"||v=="async"?m($?ct:xe):v=="("?m(Ce(")"),G,Ne(")"),Le,K):v=="operator"||v=="spread"?m($?ct:xe):v=="["?m(Ce("]"),at,Le,K):v=="{"?vt(De,"}",null,K):v=="quasi"?ne(ie,K):v=="new"?m(T($)):m()}function G(v){return v.match(/[;\}\)\],]/)?ne():ne(xe)}function q(v,C){return v==","?m(G):Z(v,C,!1)}function Z(v,C,$){var oe=$==!1?q:Z,K=$==!1?xe:ct;if(v=="=>")return m(Je,$?te:J,Ve);if(v=="operator")return/\+\+|--/.test(C)||w&&C=="!"?m(oe):w&&C=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?m(Ce(">"),We(Me,">"),Le,oe):C=="?"?m(xe,Ne(":"),K):m(K);if(v=="quasi")return ne(ie,oe);if(v!=";"){if(v=="(")return vt(ct,")","call",oe);if(v==".")return m(ke,oe);if(v=="[")return m(Ce("]"),G,Ne("]"),Le,oe);if(w&&C=="as")return j.marked="keyword",m(Me,oe);if(v=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),m(K)}}function ie(v,C){return v!="quasi"?ne():C.slice(C.length-2)!="${"?m(ie):m(G,de)}function de(v){if(v=="}")return j.marked="string-2",j.state.tokenize=ee,m(ie)}function J(v){return ae(j.stream,j.state),ne(v=="{"?ze:xe)}function te(v){return ae(j.stream,j.state),ne(v=="{"?ze:ct)}function T(v){return function(C){return C=="."?m(v?H:z):C=="variable"&&w?m($t,v?Z:q):ne(v?ct:xe)}}function z(v,C){if(C=="target")return j.marked="keyword",m(q)}function H(v,C){if(C=="target")return j.marked="keyword",m(Z)}function ue(v){return v==":"?m(Le,ze):ne(q,Ne(";"),Le)}function ke(v){if(v=="variable")return j.marked="property",m()}function De(v,C){if(v=="async")return j.marked="property",m(De);if(v=="variable"||j.style=="keyword"){if(j.marked="property",C=="get"||C=="set")return m(je);var $;return w&&j.state.fatArrowAt==j.stream.start&&($=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+$[0].length),m(Ke)}else{if(v=="number"||v=="string")return j.marked=x?"property":j.style+" property",m(Ke);if(v=="jsonld-keyword")return m(Ke);if(w&&Ee(C))return j.marked="keyword",m(De);if(v=="[")return m(xe,fr,Ne("]"),Ke);if(v=="spread")return m(ct,Ke);if(C=="*")return j.marked="keyword",m(De);if(v==":")return ne(Ke)}}function je(v){return v!="variable"?ne(Ke):(j.marked="property",m(sr))}function Ke(v){if(v==":")return m(ct);if(v=="(")return ne(sr)}function We(v,C,$){function oe(K,ge){if($?$.indexOf(K)>-1:K==","){var qe=j.state.lexical;return qe.info=="call"&&(qe.pos=(qe.pos||0)+1),m(function(yt,Bt){return yt==C||Bt==C?ne():ne(v)},oe)}return K==C||ge==C?m():$&&$.indexOf(";")>-1?ne(v):m(Ne(C))}return function(K,ge){return K==C||ge==C?m():ne(v,oe)}}function vt(v,C,$){for(var oe=3;oe"),Me);if(v=="quasi")return ne(Et,lr)}function hn(v){if(v=="=>")return m(Me)}function _e(v){return v.match(/[\}\)\]]/)?m():v==","||v==";"?m(_e):ne(Pr,_e)}function Pr(v,C){if(v=="variable"||j.style=="keyword")return j.marked="property",m(Pr);if(C=="?"||v=="number"||v=="string")return m(Pr);if(v==":")return m(Me);if(v=="[")return m(Ne("variable"),nr,Ne("]"),Pr);if(v=="(")return ne(qr,Pr);if(!v.match(/[;\}\)\],]/))return m()}function Et(v,C){return v!="quasi"?ne():C.slice(C.length-2)!="${"?m(Et):m(Me,lt)}function lt(v){if(v=="}")return j.marked="string-2",j.state.tokenize=ee,m(Et)}function st(v,C){return v=="variable"&&j.stream.match(/^\s*[?:]/,!1)||C=="?"?m(st):v==":"?m(Me):v=="spread"?m(st):ne(Me)}function lr(v,C){if(C=="<")return m(Ce(">"),We(Me,">"),Le,lr);if(C=="|"||v=="."||C=="&")return m(Me);if(v=="[")return m(Me,Ne("]"),lr);if(C=="extends"||C=="implements")return j.marked="keyword",m(Me);if(C=="?")return m(Me,Ne(":"),Me)}function $t(v,C){if(C=="<")return m(Ce(">"),We(Me,">"),Le,lr)}function dr(){return ne(Me,Pt)}function Pt(v,C){if(C=="=")return m(Me)}function In(v,C){return C=="enum"?(j.marked="keyword",m(we)):ne(zt,fr,hr,Sl)}function zt(v,C){if(w&&Ee(C))return j.marked="keyword",m(zt);if(v=="variable")return Y(C),m();if(v=="spread")return m(zt);if(v=="[")return vt(xi,"]");if(v=="{")return vt(Ur,"}")}function Ur(v,C){return v=="variable"&&!j.stream.match(/^\s*:/,!1)?(Y(C),m(hr)):(v=="variable"&&(j.marked="property"),v=="spread"?m(zt):v=="}"?ne():v=="["?m(xe,Ne("]"),Ne(":"),Ur):m(Ne(":"),zt,hr))}function xi(){return ne(zt,hr)}function hr(v,C){if(C=="=")return m(ct)}function Sl(v){if(v==",")return m(In)}function Dn(v,C){if(v=="keyword b"&&C=="else")return m(Ce("form","else"),ze,Le)}function vo(v,C){if(C=="await")return m(vo);if(v=="(")return m(Ce(")"),wi,Le)}function wi(v){return v=="var"?m(In,Gr):v=="variable"?m(Gr):ne(Gr)}function Gr(v,C){return v==")"?m():v==";"?m(Gr):C=="in"||C=="of"?(j.marked="keyword",m(xe,Gr)):ne(xe,Gr)}function sr(v,C){if(C=="*")return j.marked="keyword",m(sr);if(v=="variable")return Y(C),m(sr);if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,cr,ze,Ve);if(w&&C=="<")return m(Ce(">"),We(dr,">"),Le,sr)}function qr(v,C){if(C=="*")return j.marked="keyword",m(qr);if(v=="variable")return Y(C),m(qr);if(v=="(")return m(Je,Ce(")"),We(pr,")"),Le,cr,Ve);if(w&&C=="<")return m(Ce(">"),We(dr,">"),Le,qr)}function mo(v,C){if(v=="keyword"||v=="variable")return j.marked="type",m(mo);if(C=="<")return m(Ce(">"),We(dr,">"),Le)}function pr(v,C){return C=="@"&&m(xe,pr),v=="spread"?m(pr):w&&Ee(C)?(j.marked="keyword",m(pr)):w&&v=="this"?m(fr,hr):ne(zt,fr,hr)}function Cl(v,C){return v=="variable"?Fn(v,C):gr(v,C)}function Fn(v,C){if(v=="variable")return Y(C),m(gr)}function gr(v,C){if(C=="<")return m(Ce(">"),We(dr,">"),Le,gr);if(C=="extends"||C=="implements"||w&&v==",")return C=="implements"&&(j.marked="keyword"),m(w?Me:xe,gr);if(v=="{")return m(Ce("}"),vr,Le)}function vr(v,C){if(v=="async"||v=="variable"&&(C=="static"||C=="get"||C=="set"||w&&Ee(C))&&j.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return j.marked="keyword",m(vr);if(v=="variable"||j.style=="keyword")return j.marked="property",m(pn,vr);if(v=="number"||v=="string")return m(pn,vr);if(v=="[")return m(xe,fr,Ne("]"),pn,vr);if(C=="*")return j.marked="keyword",m(vr);if(w&&v=="(")return ne(qr,vr);if(v==";"||v==",")return m(vr);if(v=="}")return m();if(C=="@")return m(xe,vr)}function pn(v,C){if(C=="!"||C=="?")return m(pn);if(v==":")return m(Me,hr);if(C=="=")return m(ct);var $=j.state.lexical.prev,oe=$&&$.info=="interface";return ne(oe?qr:sr)}function Hn(v,C){return C=="*"?(j.marked="keyword",m(zn,Ne(";"))):C=="default"?(j.marked="keyword",m(xe,Ne(";"))):v=="{"?m(We(Wn,"}"),zn,Ne(";")):ne(ze)}function Wn(v,C){if(C=="as")return j.marked="keyword",m(Ne("variable"));if(v=="variable")return ne(ct,Wn)}function Xr(v){return v=="string"?m():v=="("?ne(xe):v=="."?ne(q):ne(Rn,Cr,zn)}function Rn(v,C){return v=="{"?vt(Rn,"}"):(v=="variable"&&Y(C),C=="*"&&(j.marked="keyword"),m(ki))}function Cr(v){if(v==",")return m(Rn,Cr)}function ki(v,C){if(C=="as")return j.marked="keyword",m(Rn)}function zn(v,C){if(C=="from")return j.marked="keyword",m(xe)}function at(v){return v=="]"?m():ne(We(ct,"]"))}function we(){return ne(Ce("form"),zt,Ne("{"),Ce("}"),We(Nr,"}"),Le,Le)}function Nr(){return ne(zt,hr)}function Si(v,C){return v.lastType=="operator"||v.lastType==","||D.test(C.charAt(0))||/[,.]/.test(C.charAt(0))}function ir(v,C,$){return C.tokenize==O&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(C.lastType)||C.lastType=="quasi"&&/\{\s*$/.test(v.string.slice(0,v.pos-($||0)))}return{startState:function(v){var C={tokenize:O,lastType:"sof",cc:[],lexical:new me((v||0)-p,0,"block",!1),localVars:d.localVars,context:d.localVars&&new Pe(null,null,!1),indented:v||0};return d.globalVars&&typeof d.globalVars=="object"&&(C.globalVars=d.globalVars),C},token:function(v,C){if(v.sol()&&(C.lexical.hasOwnProperty("align")||(C.lexical.align=!1),C.indented=v.indentation(),ae(v,C)),C.tokenize!=B&&v.eatSpace())return null;var $=C.tokenize(v,C);return W=="comment"?$:(C.lastType=W=="operator"&&(M=="++"||M=="--")?"incdec":W,Ae(C,$,W,M,v))},indent:function(v,C){if(v.tokenize==B||v.tokenize==ee)return a.Pass;if(v.tokenize!=O)return 0;var $=C&&C.charAt(0),oe=v.lexical,K;if(!/^\s*else\b/.test(C))for(var ge=v.cc.length-1;ge>=0;--ge){var qe=v.cc[ge];if(qe==Le)oe=oe.prev;else if(qe!=Dn&&qe!=Ve)break}for(;(oe.type=="stat"||oe.type=="form")&&($=="}"||(K=v.cc[v.cc.length-1])&&(K==q||K==Z)&&!/^[,\.=+\-*:?[\(]/.test(C));)oe=oe.prev;y&&oe.type==")"&&oe.prev.type=="stat"&&(oe=oe.prev);var yt=oe.type,Bt=$==yt;return yt=="vardef"?oe.indented+(v.lastType=="operator"||v.lastType==","?oe.info.length+1:0):yt=="form"&&$=="{"?oe.indented:yt=="form"?oe.indented+p:yt=="stat"?oe.indented+(Si(v,C)?y||p:0):oe.info=="switch"&&!Bt&&d.doubleIndentSwitch!=!1?oe.indented+(/^(?:case|default)\b/.test(C)?p:2*p):oe.align?oe.column+(Bt?0:1):oe.indented+(Bt?0:p)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:x,jsonMode:b,expressionAllowed:ir,skipExpression:function(v){Ae(v,"atom","atom","true",new a.StringStream("",2,null))}}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/manifest+json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),Rf.exports}Jc();var Bf={exports:{}},Kf;function Zc(){return Kf||(Kf=1,function(o,l){(function(a){a(rr)})(function(a){a.defineMode("css",function(me,ce){var Ae=ce.inline;ce.propertyKeywords||(ce=a.resolveMode("text/css"));var j=me.indentUnit,ne=ce.tokenHooks,m=ce.documentTypes||{},re=ce.mediaTypes||{},Y=ce.mediaFeatures||{},le=ce.mediaValueKeywords||{},Ee=ce.propertyKeywords||{},Pe=ce.nonStandardPropertyKeywords||{},Be=ce.fontProperties||{},Ze=ce.counterDescriptors||{},Je=ce.colorKeywords||{},ht=ce.valueKeywords||{},Ve=ce.allowNested,Ce=ce.lineComment,Le=ce.supportsAtComponent===!0,Ne=me.highlightNonStandardPropertyKeywords!==!1,ze,Oe;function xe(T,z){return ze=z,T}function ct(T,z){var H=T.next();if(ne[H]){var ue=ne[H](T,z);if(ue!==!1)return ue}if(H=="@")return T.eatWhile(/[\w\\\-]/),xe("def",T.current());if(H=="="||(H=="~"||H=="|")&&T.eat("="))return xe(null,"compare");if(H=='"'||H=="'")return z.tokenize=A(H),z.tokenize(T,z);if(H=="#")return T.eatWhile(/[\w\\\-]/),xe("atom","hash");if(H=="!")return T.match(/^\s*\w*/),xe("keyword","important");if(/\d/.test(H)||H=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),xe("number","unit");if(H==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),xe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?xe("variable-2","variable-definition"):xe("variable-2","variable");if(T.match(/^\w+-/))return xe("meta","meta")}else return/[,+>*\/]/.test(H)?xe(null,"select-op"):H=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?xe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(H)?xe(null,H):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(z.tokenize=I),xe("variable callee","variable")):/[\w\\\-]/.test(H)?(T.eatWhile(/[\w\\\-]/),xe("property","word")):xe(null,null)}function A(T){return function(z,H){for(var ue=!1,ke;(ke=z.next())!=null;){if(ke==T&&!ue){T==")"&&z.backUp(1);break}ue=!ue&&ke=="\\"}return(ke==T||!ue&&T!=")")&&(H.tokenize=null),xe("string","string")}}function I(T,z){return T.next(),T.match(/^\s*[\"\')]/,!1)?z.tokenize=null:z.tokenize=A(")"),xe(null,"(")}function G(T,z,H){this.type=T,this.indent=z,this.prev=H}function q(T,z,H,ue){return T.context=new G(H,z.indentation()+(ue===!1?0:j),T.context),H}function Z(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function ie(T,z,H){return te[H.context.type](T,z,H)}function de(T,z,H,ue){for(var ke=ue||1;ke>0;ke--)H.context=H.context.prev;return ie(T,z,H)}function J(T){var z=T.current().toLowerCase();ht.hasOwnProperty(z)?Oe="atom":Je.hasOwnProperty(z)?Oe="keyword":Oe="variable"}var te={};return te.top=function(T,z,H){if(T=="{")return q(H,z,"block");if(T=="}"&&H.context.prev)return Z(H);if(Le&&/@component/i.test(T))return q(H,z,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return q(H,z,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return q(H,z,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return H.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return q(H,z,"at");if(T=="hash")Oe="builtin";else if(T=="word")Oe="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return q(H,z,"interpolation");if(T==":")return"pseudo";if(Ve&&T=="(")return q(H,z,"parens")}return H.context.type},te.block=function(T,z,H){if(T=="word"){var ue=z.current().toLowerCase();return Ee.hasOwnProperty(ue)?(Oe="property","maybeprop"):Pe.hasOwnProperty(ue)?(Oe=Ne?"string-2":"property","maybeprop"):Ve?(Oe=z.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Oe+=" error","maybeprop")}else return T=="meta"?"block":!Ve&&(T=="hash"||T=="qualifier")?(Oe="error","block"):te.top(T,z,H)},te.maybeprop=function(T,z,H){return T==":"?q(H,z,"prop"):ie(T,z,H)},te.prop=function(T,z,H){if(T==";")return Z(H);if(T=="{"&&Ve)return q(H,z,"propBlock");if(T=="}"||T=="{")return de(T,z,H);if(T=="(")return q(H,z,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(z.current()))Oe+=" error";else if(T=="word")J(z);else if(T=="interpolation")return q(H,z,"interpolation");return"prop"},te.propBlock=function(T,z,H){return T=="}"?Z(H):T=="word"?(Oe="property","maybeprop"):H.context.type},te.parens=function(T,z,H){return T=="{"||T=="}"?de(T,z,H):T==")"?Z(H):T=="("?q(H,z,"parens"):T=="interpolation"?q(H,z,"interpolation"):(T=="word"&&J(z),"parens")},te.pseudo=function(T,z,H){return T=="meta"?"pseudo":T=="word"?(Oe="variable-3",H.context.type):ie(T,z,H)},te.documentTypes=function(T,z,H){return T=="word"&&m.hasOwnProperty(z.current())?(Oe="tag",H.context.type):te.atBlock(T,z,H)},te.atBlock=function(T,z,H){if(T=="(")return q(H,z,"atBlock_parens");if(T=="}"||T==";")return de(T,z,H);if(T=="{")return Z(H)&&q(H,z,Ve?"block":"top");if(T=="interpolation")return q(H,z,"interpolation");if(T=="word"){var ue=z.current().toLowerCase();ue=="only"||ue=="not"||ue=="and"||ue=="or"?Oe="keyword":re.hasOwnProperty(ue)?Oe="attribute":Y.hasOwnProperty(ue)?Oe="property":le.hasOwnProperty(ue)?Oe="keyword":Ee.hasOwnProperty(ue)?Oe="property":Pe.hasOwnProperty(ue)?Oe=Ne?"string-2":"property":ht.hasOwnProperty(ue)?Oe="atom":Je.hasOwnProperty(ue)?Oe="keyword":Oe="error"}return H.context.type},te.atComponentBlock=function(T,z,H){return T=="}"?de(T,z,H):T=="{"?Z(H)&&q(H,z,Ve?"block":"top",!1):(T=="word"&&(Oe="error"),H.context.type)},te.atBlock_parens=function(T,z,H){return T==")"?Z(H):T=="{"||T=="}"?de(T,z,H,2):te.atBlock(T,z,H)},te.restricted_atBlock_before=function(T,z,H){return T=="{"?q(H,z,"restricted_atBlock"):T=="word"&&H.stateArg=="@counter-style"?(Oe="variable","restricted_atBlock_before"):ie(T,z,H)},te.restricted_atBlock=function(T,z,H){return T=="}"?(H.stateArg=null,Z(H)):T=="word"?(H.stateArg=="@font-face"&&!Be.hasOwnProperty(z.current().toLowerCase())||H.stateArg=="@counter-style"&&!Ze.hasOwnProperty(z.current().toLowerCase())?Oe="error":Oe="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(T,z,H){return T=="word"?(Oe="variable","keyframes"):T=="{"?q(H,z,"top"):ie(T,z,H)},te.at=function(T,z,H){return T==";"?Z(H):T=="{"||T=="}"?de(T,z,H):(T=="word"?Oe="tag":T=="hash"&&(Oe="builtin"),"at")},te.interpolation=function(T,z,H){return T=="}"?Z(H):T=="{"||T==";"?de(T,z,H):(T=="word"?Oe="variable":T!="variable"&&T!="("&&T!=")"&&(Oe="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ae?"block":"top",stateArg:null,context:new G(Ae?"block":"top",T||0,null)}},token:function(T,z){if(!z.tokenize&&T.eatSpace())return null;var H=(z.tokenize||ct)(T,z);return H&&typeof H=="object"&&(ze=H[1],H=H[0]),Oe=H,ze!="comment"&&(z.state=te[z.state](ze,T,z)),Oe},indent:function(T,z){var H=T.context,ue=z&&z.charAt(0),ke=H.indent;return H.type=="prop"&&(ue=="}"||ue==")")&&(H=H.prev),H.prev&&(ue=="}"&&(H.type=="block"||H.type=="top"||H.type=="interpolation"||H.type=="restricted_atBlock")?(H=H.prev,ke=H.indent):(ue==")"&&(H.type=="parens"||H.type=="atBlock_parens")||ue=="{"&&(H.type=="at"||H.type=="atBlock"))&&(ke=Math.max(0,H.indent-j))),ke},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Ce,fold:"brace"}});function f(me){for(var ce={},Ae=0;Ae")):null:m.match("--")?Y(W("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),Y(M(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),re.tokenize=W("meta","?>"),"meta"):(P=m.eat("/")?"closeTag":"openTag",re.tokenize=X,"tag bracket");if(le=="&"){var Ee;return m.eat("#")?m.eat("x")?Ee=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):Ee=m.eatWhile(/[\d]/)&&m.eat(";"):Ee=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),Ee?"atom":"error"}else return m.eatWhile(/[^&<]/),null}D.isInText=!0;function X(m,re){var Y=m.next();if(Y==">"||Y=="/"&&m.eat(">"))return re.tokenize=D,P=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return P="equals",null;if(Y=="<"){re.tokenize=D,re.state=ee,re.tagName=re.tagStart=null;var le=re.tokenize(m,re);return le?le+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(re.tokenize=V(Y),re.stringStartCol=m.column(),re.tokenize(m,re)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function V(m){var re=function(Y,le){for(;!Y.eol();)if(Y.next()==m){le.tokenize=X;break}return"string"};return re.isInAttribute=!0,re}function W(m,re){return function(Y,le){for(;!Y.eol();){if(Y.match(re)){le.tokenize=D;break}Y.next()}return m}}function M(m){return function(re,Y){for(var le;(le=re.next())!=null;){if(le=="<")return Y.tokenize=M(m+1),Y.tokenize(re,Y);if(le==">")if(m==1){Y.tokenize=D;break}else return Y.tokenize=M(m-1),Y.tokenize(re,Y)}return"meta"}}function S(m){return m&&m.toLowerCase()}function O(m,re,Y){this.prev=m.context,this.tagName=re||"",this.indent=m.indented,this.startOfLine=Y,(b.doNotIndent.hasOwnProperty(re)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function R(m){m.context&&(m.context=m.context.prev)}function B(m,re){for(var Y;;){if(!m.context||(Y=m.context.tagName,!b.contextGrabbers.hasOwnProperty(S(Y))||!b.contextGrabbers[S(Y)].hasOwnProperty(S(re))))return;R(m)}}function ee(m,re,Y){return m=="openTag"?(Y.tagStart=re.column(),fe):m=="closeTag"?ae:ee}function fe(m,re,Y){return m=="word"?(Y.tagName=re.current(),E="tag",ce):b.allowMissingTagName&&m=="endTag"?(E="tag bracket",ce(m,re,Y)):(E="error",fe)}function ae(m,re,Y){if(m=="word"){var le=re.current();return Y.context&&Y.context.tagName!=le&&b.implicitlyClosed.hasOwnProperty(S(Y.context.tagName))&&R(Y),Y.context&&Y.context.tagName==le||b.matchClosing===!1?(E="tag",be):(E="tag error",me)}else return b.allowMissingTagName&&m=="endTag"?(E="tag bracket",be(m,re,Y)):(E="error",me)}function be(m,re,Y){return m!="endTag"?(E="error",be):(R(Y),ee)}function me(m,re,Y){return E="error",be(m,re,Y)}function ce(m,re,Y){if(m=="word")return E="attribute",Ae;if(m=="endTag"||m=="selfcloseTag"){var le=Y.tagName,Ee=Y.tagStart;return Y.tagName=Y.tagStart=null,m=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(S(le))?B(Y,le):(B(Y,le),Y.context=new O(Y,le,Ee==Y.indented)),ee}return E="error",ce}function Ae(m,re,Y){return m=="equals"?j:(b.allowMissing||(E="error"),ce(m,re,Y))}function j(m,re,Y){return m=="string"?ne:m=="word"&&b.allowUnquoted?(E="string",ce):(E="error",ce(m,re,Y))}function ne(m,re,Y){return m=="string"?ne:ce(m,re,Y)}return{startState:function(m){var re={tokenize:D,state:ee,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(re.baseIndent=m),re},token:function(m,re){if(!re.tagName&&m.sol()&&(re.indented=m.indentation()),m.eatSpace())return null;P=null;var Y=re.tokenize(m,re);return(Y||P)&&Y!="comment"&&(E=null,re.state=re.state(P||Y,m,re),E&&(Y=E=="error"?Y+" error":E)),Y},indent:function(m,re,Y){var le=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+x;if(le&&le.noIndent)return a.Pass;if(m.tokenize!=X&&m.tokenize!=D)return Y?Y.match(/^(\s*)/)[0].length:0;if(m.tagName)return b.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+x*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(m){m.state==j&&(m.state=ce)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var re=[],Y=m.context;Y;Y=Y.prev)re.push(Y.tagName);return re.reverse()}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),jf.exports}(function(o,l){(function(a){a(rr,Iv(),Jc(),Zc())})(function(a){var f={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function d(P,E,D){var X=P.current(),V=X.search(E);return V>-1?P.backUp(X.length-V):X.match(/<\/?$/)&&(P.backUp(X.length),P.match(E,!1)||P.match(X)),D}var p={};function y(P){var E=p[P];return E||(p[P]=new RegExp("\\s+"+P+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function x(P,E){var D=P.match(y(E));return D?/^\s*(.*?)\s*$/.exec(D[2])[1]:""}function b(P,E){return new RegExp((E?"^":"")+"","i")}function L(P,E){for(var D in P)for(var X=E[D]||(E[D]=[]),V=P[D],W=V.length-1;W>=0;W--)X.unshift(V[W])}function w(P,E){for(var D=0;D=0;M--)X.script.unshift(["type",W[M].matches,W[M].mode]);function S(O,R){var B=D.token(O,R.htmlState),ee=/\btag\b/.test(B),fe;if(ee&&!/[<>\s\/]/.test(O.current())&&(fe=R.htmlState.tagName&&R.htmlState.tagName.toLowerCase())&&X.hasOwnProperty(fe))R.inTag=fe+" ";else if(R.inTag&&ee&&/>$/.test(O.current())){var ae=/^([\S]+) (.*)/.exec(R.inTag);R.inTag=null;var be=O.current()==">"&&w(X[ae[1]],ae[2]),me=a.getMode(P,be),ce=b(ae[1],!0),Ae=b(ae[1],!1);R.token=function(j,ne){return j.match(ce,!1)?(ne.token=S,ne.localState=ne.localMode=null,null):d(j,Ae,ne.localMode.token(j,ne.localState))},R.localMode=me,R.localState=a.startState(me,D.indent(R.htmlState,"",""))}else R.inTag&&(R.inTag+=O.current(),O.eol()&&(R.inTag+=" "));return B}return{startState:function(){var O=a.startState(D);return{token:S,inTag:null,localMode:null,localState:null,htmlState:O}},copyState:function(O){var R;return O.localState&&(R=a.copyState(O.localMode,O.localState)),{token:O.token,inTag:O.inTag,localMode:O.localMode,localState:R,htmlState:a.copyState(D,O.htmlState)}},token:function(O,R){return R.token(O,R)},indent:function(O,R,B){return!O.localMode||/^\s*<\//.test(R)?D.indent(O.htmlState,R,B):O.localMode.indent?O.localMode.indent(O.localState,R,B):a.Pass},innerMode:function(O){return{state:O.localState||O.htmlState,mode:O.localMode||D}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")})})();(function(o,l){(function(a){a(rr)})(function(a){var f={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},d=a.Pos;a.defineOption("autoCloseBrackets",!1,function(M,S,O){O&&O!=a.Init&&(M.removeKeyMap(y),M.state.closeBrackets=null),S&&(x(p(S,"pairs")),M.state.closeBrackets=S,M.addKeyMap(y))});function p(M,S){return S=="pairs"&&typeof M=="string"?M:typeof M=="object"&&M[S]!=null?M[S]:f[S]}var y={Backspace:w,Enter:P};function x(M){for(var S=0;S=0;B--){var fe=R[B].head;M.replaceRange("",d(fe.line,fe.ch-1),d(fe.line,fe.ch+1),"+delete")}}function P(M){var S=L(M),O=S&&p(S,"explode");if(!O||M.getOption("disableInput"))return a.Pass;for(var R=M.listSelections(),B=0;B0?{line:fe.head.line,ch:fe.head.ch+S}:{line:fe.head.line-1};O.push({anchor:ae,head:ae})}M.setSelections(O,B)}function D(M){var S=a.cmpPos(M.anchor,M.head)>0;return{anchor:new d(M.anchor.line,M.anchor.ch+(S?-1:1)),head:new d(M.head.line,M.head.ch+(S?1:-1))}}function X(M,S){var O=L(M);if(!O||M.getOption("disableInput"))return a.Pass;var R=p(O,"pairs"),B=R.indexOf(S);if(B==-1)return a.Pass;for(var ee=p(O,"closeBefore"),fe=p(O,"triples"),ae=R.charAt(B+1)==S,be=M.listSelections(),me=B%2==0,ce,Ae=0;Ae=0&&M.getRange(ne,d(ne.line,ne.ch+3))==S+S+S?m="skipThree":m="skip";else if(ae&&ne.ch>1&&fe.indexOf(S)>=0&&M.getRange(d(ne.line,ne.ch-2),ne)==S+S){if(ne.ch>2&&/\bstring/.test(M.getTokenTypeAt(d(ne.line,ne.ch-2))))return a.Pass;m="addFour"}else if(ae){var Y=ne.ch==0?" ":M.getRange(d(ne.line,ne.ch-1),ne);if(!a.isWordChar(re)&&Y!=S&&!a.isWordChar(Y))m="both";else return a.Pass}else if(me&&(re.length===0||/\s/.test(re)||ee.indexOf(re)>-1))m="both";else return a.Pass;if(!ce)ce=m;else if(ce!=m)return a.Pass}var le=B%2?R.charAt(B-1):S,Ee=B%2?S:R.charAt(B+1);M.operation(function(){if(ce=="skip")E(M,1);else if(ce=="skipThree")E(M,3);else if(ce=="surround"){for(var Pe=M.getSelections(),Be=0;Be=S.max))return S.ch=0,S.text=S.cm.getLine(++S.line),!0}function P(S){if(!(S.line<=S.min))return S.text=S.cm.getLine(--S.line),S.ch=S.text.length,!0}function E(S){for(;;){var O=S.text.indexOf(">",S.ch);if(O==-1){if(w(S))continue;return}if(!L(S,O+1)){S.ch=O+1;continue}var R=S.text.lastIndexOf("/",O),B=R>-1&&!/\S/.test(S.text.slice(R+1,O));return S.ch=O+1,B?"selfClose":"regular"}}function D(S){for(;;){var O=S.ch?S.text.lastIndexOf("<",S.ch-1):-1;if(O==-1){if(P(S))continue;return}if(!L(S,O+1)){S.ch=O;continue}x.lastIndex=O,S.ch=O;var R=x.exec(S.text);if(R&&R.index==O)return R}}function X(S){for(;;){x.lastIndex=S.ch;var O=x.exec(S.text);if(!O){if(w(S))continue;return}if(!L(S,O.index+1)){S.ch=O.index+1;continue}return S.ch=O.index+O[0].length,O}}function V(S){for(;;){var O=S.ch?S.text.lastIndexOf(">",S.ch-1):-1;if(O==-1){if(P(S))continue;return}if(!L(S,O+1)){S.ch=O;continue}var R=S.text.lastIndexOf("/",O),B=R>-1&&!/\S/.test(S.text.slice(R+1,O));return S.ch=O+1,B?"selfClose":"regular"}}function W(S,O){for(var R=[];;){var B=X(S),ee,fe=S.line,ae=S.ch-(B?B[0].length:0);if(!B||!(ee=E(S)))return;if(ee!="selfClose")if(B[1]){for(var be=R.length-1;be>=0;--be)if(R[be]==B[2]){R.length=be;break}if(be<0&&(!O||O==B[2]))return{tag:B[2],from:f(fe,ae),to:f(S.line,S.ch)}}else R.push(B[2])}}function M(S,O){for(var R=[];;){var B=V(S);if(!B)return;if(B=="selfClose"){D(S);continue}var ee=S.line,fe=S.ch,ae=D(S);if(!ae)return;if(ae[1])R.push(ae[2]);else{for(var be=R.length-1;be>=0;--be)if(R[be]==ae[2]){R.length=be;break}if(be<0&&(!O||O==ae[2]))return{tag:ae[2],from:f(S.line,S.ch),to:f(ee,fe)}}}}a.registerHelper("fold","xml",function(S,O){for(var R=new b(S,O.line,0);;){var B=X(R);if(!B||R.line!=O.line)return;var ee=E(R);if(!ee)return;if(!B[1]&&ee!="selfClose"){var fe=f(R.line,R.ch),ae=W(R,B[2]);return ae&&d(ae.from,fe)>0?{from:fe,to:ae.from}:null}}}),a.findMatchingTag=function(S,O,R){var B=new b(S,O.line,O.ch,R);if(!(B.text.indexOf(">")==-1&&B.text.indexOf("<")==-1)){var ee=E(B),fe=ee&&f(B.line,B.ch),ae=ee&&D(B);if(!(!ee||!ae||d(B,O)>0)){var be={from:f(B.line,B.ch),to:fe,tag:ae[2]};return ee=="selfClose"?{open:be,close:null,at:"open"}:ae[1]?{open:M(B,ae[2]),close:be,at:"close"}:(B=new b(S,fe.line,fe.ch,R),{open:be,close:W(B,ae[2]),at:"open"})}}},a.findEnclosingTag=function(S,O,R,B){for(var ee=new b(S,O.line,O.ch,R);;){var fe=M(ee,B);if(!fe)break;var ae=new b(S,O.line,O.ch,R),be=W(ae,fe.tag);if(be)return{open:fe,close:be}}},a.scanForClosingTag=function(S,O,R,B){var ee=new b(S,O.line,O.ch,B?{from:0,to:B}:null);return W(ee,R)}})}()),Gf.exports}(function(o,l){(function(a){a(rr,Dv())})(function(a){a.defineOption("autoCloseTags",!1,function(w,P,E){if(E!=a.Init&&E&&w.removeKeyMap("autoCloseTags"),!!P){var D={name:"autoCloseTags"};(typeof P!="object"||P.whenClosing!==!1)&&(D["'/'"]=function(X){return x(X)}),(typeof P!="object"||P.whenOpening!==!1)&&(D["'>'"]=function(X){return p(X)}),w.addKeyMap(D)}});var f=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function p(w){if(w.getOption("disableInput"))return a.Pass;for(var P=w.listSelections(),E=[],D=w.getOption("autoCloseTags"),X=0;XV.ch&&(R=R.slice(0,R.length-W.end+V.ch));var ae=R.toLowerCase();if(!R||W.type=="string"&&(W.end!=V.ch||!/[\"\']/.test(W.string.charAt(W.string.length-1))||W.string.length==1)||W.type=="tag"&&O.close||W.string.indexOf("/")==V.ch-W.start-1||ee&&b(ee,ae)>-1||L(w,M.mode.xmlCurrentContext&&M.mode.xmlCurrentContext(S)||[],R,V,!0))return a.Pass;var be=typeof D=="object"&&D.emptyTags;if(be&&b(be,R)>-1){E[X]={text:"/>",newPos:a.Pos(V.line,V.ch+2)};continue}var me=fe&&b(fe,ae)>-1;E[X]={indent:me,text:">"+(me?` -`:"")+"",newPos:me?a.Pos(V.line+1,0):a.Pos(V.line,V.ch+1)}}for(var ce=typeof D=="object"&&D.dontIndentOnAutoClose,X=P.length-1;X>=0;X--){var Ae=E[X];w.replaceRange(Ae.text,P[X].head,P[X].anchor,"+insert");var j=w.listSelections().slice(0);j[X]={head:Ae.newPos,anchor:Ae.newPos},w.setSelections(j),!ce&&Ae.indent&&(w.indentLine(Ae.newPos.line,null,!0),w.indentLine(Ae.newPos.line+1,null,!0))}}function y(w,P){for(var E=w.listSelections(),D=[],X=P?"/":""&&(ee+=">"),D[M]=ee}if(w.replaceSelections(D),E=w.listSelections(),!W)for(var M=0;M=0&&P[S]==E;S--)++M;D=W.to;for(var S=1;S=0;V--){var W=D[V].from(),M=D[V].to();W.line>=E||(M.line>=E&&(M=p(E,0)),E=W.line,X==null?P.uncomment(W,M,w)?X="un":(P.lineComment(W,M,w),X="line"):X=="un"?P.uncomment(W,M,w):P.lineComment(W,M,w))}});function b(w,P,E){return/\bstring\b/.test(w.getTokenTypeAt(p(P.line,0)))&&!/^[\'\"\`]/.test(E)}function L(w,P){var E=w.getMode();return E.useInnerComments===!1||!E.innerMode?E:w.getModeAt(P)}a.defineExtension("lineComment",function(w,P,E){E||(E=f);var D=this,X=L(D,w),V=D.getLine(w.line);if(!(V==null||b(D,w,V))){var W=E.lineComment||X.lineComment;if(!W){(E.blockCommentStart||X.blockCommentStart)&&(E.fullLines=!0,D.blockComment(w,P,E));return}var M=Math.min(P.ch!=0||P.line==w.line?P.line+1:P.line,D.lastLine()+1),S=E.padding==null?" ":E.padding,O=E.commentBlankLines||w.line==P.line;D.operation(function(){if(E.indent){for(var R=null,B=w.line;Bfe.length)&&(R=fe)}for(var B=w.line;BM||D.operation(function(){if(E.fullLines!=!1){var O=d.test(D.getLine(M));D.replaceRange(S+W,p(M)),D.replaceRange(V+S,p(w.line,0));var R=E.blockCommentLead||X.blockCommentLead;if(R!=null)for(var B=w.line+1;B<=M;++B)(B!=M||O)&&D.replaceRange(R+S,p(B,0))}else{var ee=y(D.getCursor("to"),P)==0,fe=!D.somethingSelected();D.replaceRange(W,P),ee&&D.setSelection(fe?P:D.getCursor("from"),P),D.replaceRange(V,w)}})}}),a.defineExtension("uncomment",function(w,P,E){E||(E=f);var D=this,X=L(D,w),V=Math.min(P.ch!=0||P.line==w.line?P.line:P.line-1,D.lastLine()),W=Math.min(w.line,V),M=E.lineComment||X.lineComment,S=[],O=E.padding==null?" ":E.padding,R;e:{if(!M)break e;for(var B=W;B<=V;++B){var ee=D.getLine(B),fe=ee.indexOf(M);if(fe>-1&&!/comment/.test(D.getTokenTypeAt(p(B,fe+1)))&&(fe=-1),fe==-1&&d.test(ee)||fe>-1&&d.test(ee.slice(0,fe)))break e;S.push(ee)}if(D.operation(function(){for(var Pe=W;Pe<=V;++Pe){var Be=S[Pe-W],Ze=Be.indexOf(M),Je=Ze+M.length;Ze<0||(Be.slice(Je,Je+O.length)==O&&(Je+=O.length),R=!0,D.replaceRange("",p(Pe,Ze),p(Pe,Je)))}}),R)return!0}var ae=E.blockCommentStart||X.blockCommentStart,be=E.blockCommentEnd||X.blockCommentEnd;if(!ae||!be)return!1;var me=E.blockCommentLead||X.blockCommentLead,ce=D.getLine(W),Ae=ce.indexOf(ae);if(Ae==-1)return!1;var j=V==W?ce:D.getLine(V),ne=j.indexOf(be,V==W?Ae+ae.length:0),m=p(W,Ae+1),re=p(V,ne+1);if(ne==-1||!/comment/.test(D.getTokenTypeAt(m))||!/comment/.test(D.getTokenTypeAt(re))||D.getRange(m,re,` -`).indexOf(be)>-1)return!1;var Y=ce.lastIndexOf(ae,w.ch),le=Y==-1?-1:ce.slice(0,w.ch).indexOf(be,Y+ae.length);if(Y!=-1&&le!=-1&&le+be.length!=w.ch)return!1;le=j.indexOf(be,P.ch);var Ee=j.slice(P.ch).lastIndexOf(ae,le-P.ch);return Y=le==-1||Ee==-1?-1:P.ch+Ee,le!=-1&&Y!=-1&&Y!=P.ch?!1:(D.operation(function(){D.replaceRange("",p(V,ne-(O&&j.slice(ne-O.length,ne)==O?O.length:0)),p(V,ne+be.length));var Pe=Ae+ae.length;if(O&&ce.slice(Pe,Pe+O.length)==O&&(Pe+=O.length),D.replaceRange("",p(W,Ae),p(W,Pe)),me)for(var Be=W+1;Be<=V;++Be){var Ze=D.getLine(Be),Je=Ze.indexOf(me);if(!(Je==-1||d.test(Ze.slice(0,Je)))){var ht=Je+me.length;O&&Ze.slice(ht,ht+O.length)==O&&(ht+=O.length),D.replaceRange("",p(Be,Je),p(Be,ht))}}}),!0)})})})();var Hv={exports:{}};(function(o,l){(function(a){a(rr())})(function(a){function f(x,b,L,w){if(L&&L.call){var P=L;L=null}else var P=y(x,L,"rangeFinder");typeof b=="number"&&(b=a.Pos(b,0));var E=y(x,L,"minFoldSize");function D(M){var S=P(x,b);if(!S||S.to.line-S.from.linex.firstLine();)b=a.Pos(b.line-1,0),X=D(!1);if(!(!X||X.cleared||w==="unfold")){var V=d(x,L,X);a.on(V,"mousedown",function(M){W.clear(),a.e_preventDefault(M)});var W=x.markText(X.from,X.to,{replacedWith:V,clearOnEnter:y(x,L,"clearOnEnter"),__isFold:!0});W.on("clear",function(M,S){a.signal(x,"unfold",x,M,S)}),a.signal(x,"fold",x,X.from,X.to)}}function d(x,b,L){var w=y(x,b,"widget");if(typeof w=="function"&&(w=w(L.from,L.to)),typeof w=="string"){var P=document.createTextNode(w);w=document.createElement("span"),w.appendChild(P),w.className="CodeMirror-foldmarker"}else w&&(w=w.cloneNode(!0));return w}a.newFoldFunction=function(x,b){return function(L,w){f(L,w,{rangeFinder:x,widget:b})}},a.defineExtension("foldCode",function(x,b,L){f(this,x,b,L)}),a.defineExtension("isFolded",function(x){for(var b=this.findMarksAt(x),L=0;L=B){if(ae&&ce&&ae.test(ce.className))return;me=x(O.indicatorOpen)}}!me&&!ce||W.setGutterMarker(be,O.gutter,me)})}function L(W){return new RegExp("(^|\\s)"+W+"(?:$|\\s)\\s*")}function w(W){var M=W.getViewport(),S=W.state.foldGutter;S&&(W.operation(function(){b(W,M.from,M.to)}),S.from=M.from,S.to=M.to)}function P(W,M,S){var O=W.state.foldGutter;if(O){var R=O.options;if(S==R.gutter){var B=y(W,M);B?B.clear():W.foldCode(f(M,0),R)}}}function E(W,M){M=="mode"&&D(W)}function D(W){var M=W.state.foldGutter;if(M){var S=M.options;M.from=M.to=0,clearTimeout(M.changeUpdate),M.changeUpdate=setTimeout(function(){w(W)},S.foldOnChangeTimeSpan||600)}}function X(W){var M=W.state.foldGutter;if(M){var S=M.options;clearTimeout(M.changeUpdate),M.changeUpdate=setTimeout(function(){var O=W.getViewport();M.from==M.to||O.from-M.to>20||M.from-O.to>20?w(W):W.operation(function(){O.fromM.to&&(b(W,M.to,O.to),M.to=O.to)})},S.updateViewportTimeSpan||400)}}function V(W,M){var S=W.state.foldGutter;if(S){var O=M.line;O>=S.from&&Od.lastLine())return null;var D=d.getTokenAt(a.Pos(E,1));if(/\S/.test(D.string)||(D=d.getTokenAt(a.Pos(E,D.end+1))),D.type!="keyword"||D.string!="import")return null;for(var X=E,V=Math.min(d.lastLine(),E+10);X<=V;++X){var W=d.getLine(X),M=W.indexOf(";");if(M!=-1)return{startCh:D.end,end:a.Pos(X,M)}}}var x=p.line,b=y(x),L;if(!b||y(x-1)||(L=y(x-2))&&L.end.line==x-1)return null;for(var w=b.end;;){var P=y(w.line+1);if(P==null)break;w=P.end}return{from:d.clipPos(a.Pos(x,b.startCh+1)),to:w}}),a.registerHelper("fold","include",function(d,p){function y(P){if(Pd.lastLine())return null;var E=d.getTokenAt(a.Pos(P,1));if(/\S/.test(E.string)||(E=d.getTokenAt(a.Pos(P,E.end+1))),E.type=="meta"&&E.string.slice(0,8)=="#include")return E.start+8}var x=p.line,b=y(x);if(b==null||y(x-1)!=null)return null;for(var L=x;;){var w=y(L+1);if(w==null)break;++L}return{from:a.Pos(x,b+1),to:d.clipPos(a.Pos(L))}})})})();(function(o,l){(function(a){a(rr())})(function(a){function f(d,p){var y=d.getLine(p),x=y.search(/\S/);return x==-1||/\bcomment\b/.test(d.getTokenTypeAt(a.Pos(p,x+1)))?-1:a.countColumn(y,null,d.getOption("tabSize"))}a.registerHelper("fold","indent",function(d,p){var y=f(d,p.line);if(!(y<0)){for(var x=null,b=p.line+1,L=d.lastLine();b<=L;++b){var w=f(d,b);if(w!=-1)if(w>y)x=b;else break}if(x)return{from:a.Pos(p.line,d.getLine(p.line).length),to:a.Pos(x,d.getLine(x).length)}}})})})();(function(o,l){(function(a){a(rr())})(function(a){a.registerGlobalHelper("fold","comment",function(f){return f.blockCommentStart&&f.blockCommentEnd},function(f,d){var p=f.getModeAt(d),y=p.blockCommentStart,x=p.blockCommentEnd;if(!(!y||!x)){for(var b=d.line,L=f.getLine(b),w,P=d.ch,E=0;;){var D=P<=0?-1:L.lastIndexOf(y,P-1);if(D==-1){if(E==1)return;E=1,P=L.length;continue}if(E==1&&D{const p={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},y=Pv(a.value,{value:"",mode:f.mode,readOnly:f.readonly,tabSize:2,lineWrapping:!0,lineNumbers:!0,...p});y.on("change",()=>{d("change",y.getValue())}),mf(()=>{y.setValue(f.value)}),mf(()=>{y.setOption("mode",f.mode)}),window.addEventListener("resize",()=>{y.refresh()}),setTimeout(()=>{y.refresh()},50)}),(p,y)=>(nt(),Ot("div",{class:"editor",ref_key:"el",ref:a},null,512))}}),rt=yi({urlParams:{demo:"basic"},demoStatus:"LOADING",layout:{showHeader:!0,showSider:!0,defaultEditorSplit:40}});zv();function zv(){new URLSearchParams(window.location.search).forEach((l,a)=>{rt.urlParams[a]=l}),typeof rt.urlParams["default-editor-split"]=="string"&&parseInt(rt.urlParams["default-editor-split"])>0&&(rt.layout.defaultEditorSplit=parseInt(rt.urlParams["default-editor-split"])),rt.urlParams.header==="false"&&(rt.layout.showHeader=!1),rt.urlParams.sider==="false"&&(rt.layout.showSider=!1)}function Os(o){rt.demoStatus=o}const Jc=o=>(Tc("data-v-acfccb35"),o=o(),Lc(),o),Bv={key:0},Kv=Uc('
',1),jv=[Kv],Uv={key:1,class:"error-status"},Gv=Jc(()=>et("div",{class:"error-status-logo"},[et("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[et("path",{d:"M517.818182 69.818182C765.207273 69.818182 965.818182 270.429091 965.818182 517.818182S765.207273 965.818182 517.818182 965.818182 69.818182 765.207273 69.818182 517.818182 270.429091 69.818182 517.818182 69.818182z m0 819.991273c205.405091 0 371.991273-166.586182 371.991273-371.991273S723.223273 145.826909 517.818182 145.826909 145.826909 312.413091 145.826909 517.818182s166.586182 371.991273 371.991273 371.991273z m-47.988364-195.979637a48.011636 48.011636 0 1 1 96 0 48.011636 48.011636 0 0 1-96 0zM493.800727 581.818182a8.029091 8.029091 0 0 1-7.982545-8.005818V301.847273c0-4.421818 3.607273-8.005818 8.005818-8.005818h47.988364c4.421818 0 8.005818 3.607273 8.005818 8.005818v271.988363c0 4.421818-3.607273 8.005818-8.005818 8.005819H493.847273z",fill:"#7dc5eb"})])],-1)),qv=Jc(()=>et("div",{class:"error-status-title"},"Not Found",-1)),Xv=[Gv,qv],Yv={key:2,class:"error-status"},$v=Uc('
Not Finished
It will take a while ...
',3),Jv=[$v],Zv=Kr({__name:"status",setup(o){return(l,a)=>(nt(),Ot(Dt,null,[_t(rt).demoStatus==="LOADING"?(nt(),Ot("div",Bv,jv)):so("",!0),_t(rt).demoStatus==="NOT_FOUND"?(nt(),Ot("div",Uv,Xv)):so("",!0),_t(rt).demoStatus==="NOT_FINISHED"?(nt(),Ot("div",Yv,Jv)):so("",!0)],64))}}),Zc=bi(Zv,[["__scopeId","data-v-acfccb35"]]);let Vv=[];const Ue=yi({files:Vv,activeIndex:-1,errors:[]});function Vc(o){Ue.activeIndex=o}function Qv(o){Ue.files[Ue.activeIndex]&&(Ue.files[Ue.activeIndex].code=o)}function em(o){for(;Ue.files.length>0;)Ue.files.pop();o.forEach(l=>{Ue.files.push(l)}),Vc(0)}const tm={class:"tab-list"},rm=["onClick"],nm={class:"label"},im=Kr({__name:"tab",setup(o){return(l,a)=>(nt(),Ot("div",tm,[(nt(!0),Ot(Dt,null,Is(_t(Ue).files,(f,d)=>(nt(),Ot("div",{class:Br(["tab",{active:d===_t(Ue).activeIndex}]),onClick:p=>_t(Vc)(d)},[et("span",nm,ll(f.name),1)],10,rm))),256))]))}}),om=bi(im,[["__scopeId","data-v-83d63492"]]);function lm(o,l=100){let a;return(...f)=>{a&&clearTimeout(a),a=setTimeout(()=>{o(...f)},l)}}const sm={key:0,class:"editor-container"},am={class:"editor-main"},um=Kr({__name:"index",setup(o){var p;const l=lm(y=>{Qv(y)},300),a=un(((p=Ue.files[Ue.activeIndex])==null?void 0:p.code)||""),f={js:"javascript",css:"css",html:"htmlmixed",json:"javascript"},d=Xc(()=>{var y;return f[(y=Ue.files[Ue.activeIndex])==null?void 0:y.type]});return ro(()=>Ue.activeIndex,()=>{var y;a.value=((y=Ue.files[Ue.activeIndex])==null?void 0:y.code)||""}),(y,x)=>_t(rt).demoStatus==="LOADED"?(nt(),Ot("div",sm,[Ct(om),et("div",am,[Ct(Rv,{onChange:_t(l),value:a.value,mode:d.value},null,8,["onChange","value","mode"])])])):(nt(),En(Zc,{key:1}))}}),Xf=bi(um,[["__scopeId","data-v-247a57f2"]]);let fm=1;class cm{constructor(l,a){Zi(this,"iframe");Zi(this,"handlers");Zi(this,"pending_cmds");Zi(this,"handle_event");this.iframe=l,this.handlers=a,this.pending_cmds=new Map,this.handle_event=f=>this.handle_repl_message(f),window.addEventListener("message",this.handle_event,!1)}destroy(){window.removeEventListener("message",this.handle_event)}iframe_command(l,a){return new Promise((f,d)=>{const p=fm++;this.pending_cmds.set(p,{resolve:f,reject:d}),this.iframe.contentWindow.postMessage({action:l,cmd_id:p,args:a},"*")})}handle_command_message(l){let a=l.action,f=l.cmd_id,d=this.pending_cmds.get(f);if(d){if(this.pending_cmds.delete(f),a==="cmd_error"){let{message:p,stack:y}=l,x=new Error(p);x.stack=y,d.reject(x)}a==="cmd_ok"&&d.resolve(l.args)}else console.error("command not found",f,l,[...this.pending_cmds.keys()])}handle_repl_message(l){if(l.source!==this.iframe.contentWindow)return;const{action:a,args:f}=l.data;switch(a){case"cmd_error":case"cmd_ok":return this.handle_command_message(l.data);case"fetch_progress":return this.handlers.on_fetch_progress(f.remaining);case"error":return this.handlers.on_error(l.data);case"unhandledrejection":return this.handlers.on_unhandled_rejection(l.data);case"console":return this.handlers.on_console(l.data);case"console_group":return this.handlers.on_console_group(l.data);case"console_group_collapsed":return this.handlers.on_console_group_collapsed(l.data);case"console_group_end":return this.handlers.on_console_group_end(l.data)}}eval(l){return this.iframe_command("eval",{script:l})}handle_links(){return this.iframe_command("catch_clicks",{})}}const po=[{name:"Quick Start",list:[{name:"Basic",key:"basic"},{name:"Options",key:"basic-options"}]},{name:"Elements' Types",list:[{name:"Text",key:"elem-text",exclude:["data.js"]},{name:"Rect",key:"elem-rect",exclude:["data.js"]},{name:"Circle",key:"elem-circle",exclude:["data.js"]},{name:"Group",key:"elem-group",exclude:["data.js"]},{name:"Image",key:"elem-image",exclude:["data.js"]},{name:"SVG",key:"elem-svg",exclude:["data.js"]},{name:"HTML",key:"elem-html",exclude:["data.js"]},{name:"Path",key:"elem-path",exclude:["data.js"]}]},{name:"iDraw API",list:[{name:"setData",key:"api-setData"},{name:"getData",key:"api-getData"},{name:"setMode",key:"api-setMode"},{name:"selectElement",key:"api-selectElement"},{name:"addElement",key:"api-addElement"},{name:"updateElement",key:"api-updateElement"},{name:"deleteElement",key:"api-deleteElement"},{name:"moveElement",key:"api-moveElement"},{name:"resize",key:"api-resize"},{name:"centerContent",key:"api-centerContent"},{name:"destroy",key:"api-destroy"},{name:"disable",key:"api-disable"},{name:"enable",key:"api-enable"}]}],dm=` +`:"")+"",newPos:me?a.Pos(V.line+1,0):a.Pos(V.line,V.ch+1)}}for(var ce=typeof D=="object"&&D.dontIndentOnAutoClose,X=P.length-1;X>=0;X--){var Ae=E[X];w.replaceRange(Ae.text,P[X].head,P[X].anchor,"+insert");var j=w.listSelections().slice(0);j[X]={head:Ae.newPos,anchor:Ae.newPos},w.setSelections(j),!ce&&Ae.indent&&(w.indentLine(Ae.newPos.line,null,!0),w.indentLine(Ae.newPos.line+1,null,!0))}}function y(w,P){for(var E=w.listSelections(),D=[],X=P?"/":""&&(ee+=">"),D[M]=ee}if(w.replaceSelections(D),E=w.listSelections(),!W)for(var M=0;M=0&&P[S]==E;S--)++M;D=W.to;for(var S=1;S=0;V--){var W=D[V].from(),M=D[V].to();W.line>=E||(M.line>=E&&(M=p(E,0)),E=W.line,X==null?P.uncomment(W,M,w)?X="un":(P.lineComment(W,M,w),X="line"):X=="un"?P.uncomment(W,M,w):P.lineComment(W,M,w))}});function b(w,P,E){return/\bstring\b/.test(w.getTokenTypeAt(p(P.line,0)))&&!/^[\'\"\`]/.test(E)}function L(w,P){var E=w.getMode();return E.useInnerComments===!1||!E.innerMode?E:w.getModeAt(P)}a.defineExtension("lineComment",function(w,P,E){E||(E=f);var D=this,X=L(D,w),V=D.getLine(w.line);if(!(V==null||b(D,w,V))){var W=E.lineComment||X.lineComment;if(!W){(E.blockCommentStart||X.blockCommentStart)&&(E.fullLines=!0,D.blockComment(w,P,E));return}var M=Math.min(P.ch!=0||P.line==w.line?P.line+1:P.line,D.lastLine()+1),S=E.padding==null?" ":E.padding,O=E.commentBlankLines||w.line==P.line;D.operation(function(){if(E.indent){for(var R=null,B=w.line;Bfe.length)&&(R=fe)}for(var B=w.line;BM||D.operation(function(){if(E.fullLines!=!1){var O=d.test(D.getLine(M));D.replaceRange(S+W,p(M)),D.replaceRange(V+S,p(w.line,0));var R=E.blockCommentLead||X.blockCommentLead;if(R!=null)for(var B=w.line+1;B<=M;++B)(B!=M||O)&&D.replaceRange(R+S,p(B,0))}else{var ee=y(D.getCursor("to"),P)==0,fe=!D.somethingSelected();D.replaceRange(W,P),ee&&D.setSelection(fe?P:D.getCursor("from"),P),D.replaceRange(V,w)}})}}),a.defineExtension("uncomment",function(w,P,E){E||(E=f);var D=this,X=L(D,w),V=Math.min(P.ch!=0||P.line==w.line?P.line:P.line-1,D.lastLine()),W=Math.min(w.line,V),M=E.lineComment||X.lineComment,S=[],O=E.padding==null?" ":E.padding,R;e:{if(!M)break e;for(var B=W;B<=V;++B){var ee=D.getLine(B),fe=ee.indexOf(M);if(fe>-1&&!/comment/.test(D.getTokenTypeAt(p(B,fe+1)))&&(fe=-1),fe==-1&&d.test(ee)||fe>-1&&d.test(ee.slice(0,fe)))break e;S.push(ee)}if(D.operation(function(){for(var Pe=W;Pe<=V;++Pe){var Be=S[Pe-W],Ze=Be.indexOf(M),Je=Ze+M.length;Ze<0||(Be.slice(Je,Je+O.length)==O&&(Je+=O.length),R=!0,D.replaceRange("",p(Pe,Ze),p(Pe,Je)))}}),R)return!0}var ae=E.blockCommentStart||X.blockCommentStart,be=E.blockCommentEnd||X.blockCommentEnd;if(!ae||!be)return!1;var me=E.blockCommentLead||X.blockCommentLead,ce=D.getLine(W),Ae=ce.indexOf(ae);if(Ae==-1)return!1;var j=V==W?ce:D.getLine(V),ne=j.indexOf(be,V==W?Ae+ae.length:0),m=p(W,Ae+1),re=p(V,ne+1);if(ne==-1||!/comment/.test(D.getTokenTypeAt(m))||!/comment/.test(D.getTokenTypeAt(re))||D.getRange(m,re,` +`).indexOf(be)>-1)return!1;var Y=ce.lastIndexOf(ae,w.ch),le=Y==-1?-1:ce.slice(0,w.ch).indexOf(be,Y+ae.length);if(Y!=-1&&le!=-1&&le+be.length!=w.ch)return!1;le=j.indexOf(be,P.ch);var Ee=j.slice(P.ch).lastIndexOf(ae,le-P.ch);return Y=le==-1||Ee==-1?-1:P.ch+Ee,le!=-1&&Y!=-1&&Y!=P.ch?!1:(D.operation(function(){D.replaceRange("",p(V,ne-(O&&j.slice(ne-O.length,ne)==O?O.length:0)),p(V,ne+be.length));var Pe=Ae+ae.length;if(O&&ce.slice(Pe,Pe+O.length)==O&&(Pe+=O.length),D.replaceRange("",p(W,Ae),p(W,Pe)),me)for(var Be=W+1;Be<=V;++Be){var Ze=D.getLine(Be),Je=Ze.indexOf(me);if(!(Je==-1||d.test(Ze.slice(0,Je)))){var ht=Je+me.length;O&&Ze.slice(ht,ht+O.length)==O&&(ht+=O.length),D.replaceRange("",p(Be,Je),p(Be,ht))}}}),!0)})})})();var Fv={exports:{}};(function(o,l){(function(a){a(rr)})(function(a){function f(x,b,L,w){if(L&&L.call){var P=L;L=null}else var P=y(x,L,"rangeFinder");typeof b=="number"&&(b=a.Pos(b,0));var E=y(x,L,"minFoldSize");function D(M){var S=P(x,b);if(!S||S.to.line-S.from.linex.firstLine();)b=a.Pos(b.line-1,0),X=D(!1);if(!(!X||X.cleared||w==="unfold")){var V=d(x,L,X);a.on(V,"mousedown",function(M){W.clear(),a.e_preventDefault(M)});var W=x.markText(X.from,X.to,{replacedWith:V,clearOnEnter:y(x,L,"clearOnEnter"),__isFold:!0});W.on("clear",function(M,S){a.signal(x,"unfold",x,M,S)}),a.signal(x,"fold",x,X.from,X.to)}}function d(x,b,L){var w=y(x,b,"widget");if(typeof w=="function"&&(w=w(L.from,L.to)),typeof w=="string"){var P=document.createTextNode(w);w=document.createElement("span"),w.appendChild(P),w.className="CodeMirror-foldmarker"}else w&&(w=w.cloneNode(!0));return w}a.newFoldFunction=function(x,b){return function(L,w){f(L,w,{rangeFinder:x,widget:b})}},a.defineExtension("foldCode",function(x,b,L){f(this,x,b,L)}),a.defineExtension("isFolded",function(x){for(var b=this.findMarksAt(x),L=0;L=B){if(ae&&ce&&ae.test(ce.className))return;me=x(O.indicatorOpen)}}!me&&!ce||W.setGutterMarker(be,O.gutter,me)})}function L(W){return new RegExp("(^|\\s)"+W+"(?:$|\\s)\\s*")}function w(W){var M=W.getViewport(),S=W.state.foldGutter;S&&(W.operation(function(){b(W,M.from,M.to)}),S.from=M.from,S.to=M.to)}function P(W,M,S){var O=W.state.foldGutter;if(O){var R=O.options;if(S==R.gutter){var B=y(W,M);B?B.clear():W.foldCode(f(M,0),R)}}}function E(W,M){M=="mode"&&D(W)}function D(W){var M=W.state.foldGutter;if(M){var S=M.options;M.from=M.to=0,clearTimeout(M.changeUpdate),M.changeUpdate=setTimeout(function(){w(W)},S.foldOnChangeTimeSpan||600)}}function X(W){var M=W.state.foldGutter;if(M){var S=M.options;clearTimeout(M.changeUpdate),M.changeUpdate=setTimeout(function(){var O=W.getViewport();M.from==M.to||O.from-M.to>20||M.from-O.to>20?w(W):W.operation(function(){O.fromM.to&&(b(W,M.to,O.to),M.to=O.to)})},S.updateViewportTimeSpan||400)}}function V(W,M){var S=W.state.foldGutter;if(S){var O=M.line;O>=S.from&&Od.lastLine())return null;var D=d.getTokenAt(a.Pos(E,1));if(/\S/.test(D.string)||(D=d.getTokenAt(a.Pos(E,D.end+1))),D.type!="keyword"||D.string!="import")return null;for(var X=E,V=Math.min(d.lastLine(),E+10);X<=V;++X){var W=d.getLine(X),M=W.indexOf(";");if(M!=-1)return{startCh:D.end,end:a.Pos(X,M)}}}var x=p.line,b=y(x),L;if(!b||y(x-1)||(L=y(x-2))&&L.end.line==x-1)return null;for(var w=b.end;;){var P=y(w.line+1);if(P==null)break;w=P.end}return{from:d.clipPos(a.Pos(x,b.startCh+1)),to:w}}),a.registerHelper("fold","include",function(d,p){function y(P){if(Pd.lastLine())return null;var E=d.getTokenAt(a.Pos(P,1));if(/\S/.test(E.string)||(E=d.getTokenAt(a.Pos(P,E.end+1))),E.type=="meta"&&E.string.slice(0,8)=="#include")return E.start+8}var x=p.line,b=y(x);if(b==null||y(x-1)!=null)return null;for(var L=x;;){var w=y(L+1);if(w==null)break;++L}return{from:a.Pos(x,b+1),to:d.clipPos(a.Pos(L))}})})})();(function(o,l){(function(a){a(rr)})(function(a){function f(d,p){var y=d.getLine(p),x=y.search(/\S/);return x==-1||/\bcomment\b/.test(d.getTokenTypeAt(a.Pos(p,x+1)))?-1:a.countColumn(y,null,d.getOption("tabSize"))}a.registerHelper("fold","indent",function(d,p){var y=f(d,p.line);if(!(y<0)){for(var x=null,b=p.line+1,L=d.lastLine();b<=L;++b){var w=f(d,b);if(w!=-1)if(w>y)x=b;else break}if(x)return{from:a.Pos(p.line,d.getLine(p.line).length),to:a.Pos(x,d.getLine(x).length)}}})})})();(function(o,l){(function(a){a(rr)})(function(a){a.registerGlobalHelper("fold","comment",function(f){return f.blockCommentStart&&f.blockCommentEnd},function(f,d){var p=f.getModeAt(d),y=p.blockCommentStart,x=p.blockCommentEnd;if(!(!y||!x)){for(var b=d.line,L=f.getLine(b),w,P=d.ch,E=0;;){var D=P<=0?-1:L.lastIndexOf(y,P-1);if(D==-1){if(E==1)return;E=1,P=L.length;continue}if(E==1&&D{const p={autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},y=Nv(a.value,{value:"",mode:f.mode,readOnly:f.readonly,tabSize:2,lineWrapping:!0,lineNumbers:!0,...p});y.on("change",()=>{d("change",y.getValue())}),vf(()=>{y.setValue(f.value)}),vf(()=>{y.setOption("mode",f.mode)}),window.addEventListener("resize",()=>{y.refresh()}),setTimeout(()=>{y.refresh()},50)}),(p,y)=>(nt(),Ot("div",{class:"editor",ref_key:"el",ref:a},null,512))}}),rt=yi({urlParams:{demo:"basic"},demoStatus:"LOADING",layout:{showHeader:!0,showSider:!0,defaultEditorSplit:40}});Rv();function Rv(){new URLSearchParams(window.location.search).forEach((l,a)=>{rt.urlParams[a]=l}),typeof rt.urlParams["default-editor-split"]=="string"&&parseInt(rt.urlParams["default-editor-split"])>0&&(rt.layout.defaultEditorSplit=parseInt(rt.urlParams["default-editor-split"])),rt.urlParams.header==="false"&&(rt.layout.showHeader=!1),rt.urlParams.sider==="false"&&(rt.layout.showSider=!1)}function Ls(o){rt.demoStatus=o}const Vc=o=>(Tc("data-v-acfccb35"),o=o(),Lc(),o),zv={key:0},Bv=Uc('
',1),Kv=[Bv],jv={key:1,class:"error-status"},Uv=Vc(()=>et("div",{class:"error-status-logo"},[et("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[et("path",{d:"M517.818182 69.818182C765.207273 69.818182 965.818182 270.429091 965.818182 517.818182S765.207273 965.818182 517.818182 965.818182 69.818182 765.207273 69.818182 517.818182 270.429091 69.818182 517.818182 69.818182z m0 819.991273c205.405091 0 371.991273-166.586182 371.991273-371.991273S723.223273 145.826909 517.818182 145.826909 145.826909 312.413091 145.826909 517.818182s166.586182 371.991273 371.991273 371.991273z m-47.988364-195.979637a48.011636 48.011636 0 1 1 96 0 48.011636 48.011636 0 0 1-96 0zM493.800727 581.818182a8.029091 8.029091 0 0 1-7.982545-8.005818V301.847273c0-4.421818 3.607273-8.005818 8.005818-8.005818h47.988364c4.421818 0 8.005818 3.607273 8.005818 8.005818v271.988363c0 4.421818-3.607273 8.005818-8.005818 8.005819H493.847273z",fill:"#7dc5eb"})])],-1)),Gv=Vc(()=>et("div",{class:"error-status-title"},"Not Found",-1)),qv=[Uv,Gv],Xv={key:2,class:"error-status"},Yv=Uc('
Not Finished
It will take a while ...
',3),$v=[Yv],Jv=Kr({__name:"status",setup(o){return(l,a)=>(nt(),Ot(Dt,null,[_t(rt).demoStatus==="LOADING"?(nt(),Ot("div",zv,Kv)):so("",!0),_t(rt).demoStatus==="NOT_FOUND"?(nt(),Ot("div",jv,qv)):so("",!0),_t(rt).demoStatus==="NOT_FINISHED"?(nt(),Ot("div",Xv,$v)):so("",!0)],64))}}),Qc=bi(Jv,[["__scopeId","data-v-acfccb35"]]);let Zv=[];const Ue=yi({files:Zv,activeIndex:-1,errors:[]});function ed(o){Ue.activeIndex=o}function Vv(o){Ue.files[Ue.activeIndex]&&(Ue.files[Ue.activeIndex].code=o)}function Qv(o){for(;Ue.files.length>0;)Ue.files.pop();o.forEach(l=>{Ue.files.push(l)}),ed(0)}const em={class:"tab-list"},tm=["onClick"],rm={class:"label"},nm=Kr({__name:"tab",setup(o){return(l,a)=>(nt(),Ot("div",em,[(nt(!0),Ot(Dt,null,Ns(_t(Ue).files,(f,d)=>(nt(),Ot("div",{class:Br(["tab",{active:d===_t(Ue).activeIndex}]),onClick:p=>_t(ed)(d)},[et("span",rm,ll(f.name),1)],10,tm))),256))]))}}),im=bi(nm,[["__scopeId","data-v-83d63492"]]);function om(o,l=100){let a;return(...f)=>{a&&clearTimeout(a),a=setTimeout(()=>{o(...f)},l)}}const lm={key:0,class:"editor-container"},sm={class:"editor-main"},am=Kr({__name:"index",setup(o){var p;const l=om(y=>{Vv(y)},300),a=un(((p=Ue.files[Ue.activeIndex])==null?void 0:p.code)||""),f={js:"javascript",css:"css",html:"htmlmixed",json:"javascript"},d=Xc(()=>{var y;return f[(y=Ue.files[Ue.activeIndex])==null?void 0:y.type]});return ro(()=>Ue.activeIndex,()=>{var y;a.value=((y=Ue.files[Ue.activeIndex])==null?void 0:y.code)||""}),(y,x)=>_t(rt).demoStatus==="LOADED"?(nt(),Ot("div",lm,[Ct(im),et("div",sm,[Ct(Wv,{onChange:_t(l),value:a.value,mode:d.value},null,8,["onChange","value","mode"])])])):(nt(),En(Qc,{key:1}))}}),Xf=bi(am,[["__scopeId","data-v-247a57f2"]]);let um=1;class fm{constructor(l,a){Zi(this,"iframe");Zi(this,"handlers");Zi(this,"pending_cmds");Zi(this,"handle_event");this.iframe=l,this.handlers=a,this.pending_cmds=new Map,this.handle_event=f=>this.handle_repl_message(f),window.addEventListener("message",this.handle_event,!1)}destroy(){window.removeEventListener("message",this.handle_event)}iframe_command(l,a){return new Promise((f,d)=>{const p=um++;this.pending_cmds.set(p,{resolve:f,reject:d}),this.iframe.contentWindow.postMessage({action:l,cmd_id:p,args:a},"*")})}handle_command_message(l){let a=l.action,f=l.cmd_id,d=this.pending_cmds.get(f);if(d){if(this.pending_cmds.delete(f),a==="cmd_error"){let{message:p,stack:y}=l,x=new Error(p);x.stack=y,d.reject(x)}a==="cmd_ok"&&d.resolve(l.args)}else console.error("command not found",f,l,[...this.pending_cmds.keys()])}handle_repl_message(l){if(l.source!==this.iframe.contentWindow)return;const{action:a,args:f}=l.data;switch(a){case"cmd_error":case"cmd_ok":return this.handle_command_message(l.data);case"fetch_progress":return this.handlers.on_fetch_progress(f.remaining);case"error":return this.handlers.on_error(l.data);case"unhandledrejection":return this.handlers.on_unhandled_rejection(l.data);case"console":return this.handlers.on_console(l.data);case"console_group":return this.handlers.on_console_group(l.data);case"console_group_collapsed":return this.handlers.on_console_group_collapsed(l.data);case"console_group_end":return this.handlers.on_console_group_end(l.data)}}eval(l){return this.iframe_command("eval",{script:l})}handle_links(){return this.iframe_command("catch_clicks",{})}}const po=[{name:"Quick Started",list:[{name:"Basic",key:"basic"},{name:"Advanced Data",key:"advanced-data"},{name:"Options",key:"basic-options"}]},{name:"Elements' Types",list:[{name:"Text",key:"elem-text",exclude:["data.js"]},{name:"Rect",key:"elem-rect",exclude:["data.js"]},{name:"Circle",key:"elem-circle",exclude:["data.js"]},{name:"Group",key:"elem-group",exclude:["data.js"]},{name:"Image",key:"elem-image",exclude:["data.js"]},{name:"SVG",key:"elem-svg",exclude:["data.js"]},{name:"HTML",key:"elem-html",exclude:["data.js"]},{name:"Path",key:"elem-path",exclude:["data.js"]}]},{name:"Custom Styles",list:[{name:"Selector Style",key:"custom-style-selector"},{name:"Ruler Style",key:"custom-style-ruler"},{name:"Scroller Style",key:"custom-style-scroller"},{name:"Info Style",key:"custom-style-info"}]},{name:"Switching Mode",list:[{name:"Select Mode",key:"mode-select"},{name:"Drag Mode",key:"mode-drag"},{name:"Read-Only Mode",key:"mode-readOnly"}]},{name:"Features",list:[{name:"Ruler",key:"feature-ruler"},{name:"Scroll",key:"feature-scroll"},{name:"Info",key:"feature-info"},{name:"Select In Group",key:"feature-selectInGroup"},{name:"Snap To Grid",key:"feature-snapToGrid"}]},{name:"iDraw API",list:[{name:"setData",key:"api-setData"},{name:"getData",key:"api-getData"},{name:"setMode",key:"api-setMode"},{name:"selectElement",key:"api-selectElement"},{name:"addElement",key:"api-addElement"},{name:"updateElement",key:"api-updateElement"},{name:"deleteElement",key:"api-deleteElement"},{name:"moveElement",key:"api-moveElement"},{name:"resize",key:"api-resize"},{name:"centerContent",key:"api-centerContent"},{name:"destroy",key:"api-destroy"},{name:"disable",key:"api-disable"},{name:"enable",key:"api-enable"},{name:"getImageBlobURL",key:"api-getImageBlobURL"}]}],cm=` `).replace(//,` + diff --git a/docs/lib/idraw/0.4.0-beta.30/index.global.js b/docs/lib/idraw/0.4.0-beta.31/index.global.js similarity index 97% rename from docs/lib/idraw/0.4.0-beta.30/index.global.js rename to docs/lib/idraw/0.4.0-beta.31/index.global.js index f1fb75c..bba740f 100644 --- a/docs/lib/idraw/0.4.0-beta.30/index.global.js +++ b/docs/lib/idraw/0.4.0-beta.31/index.global.js @@ -5782,7 +5782,7 @@ var __privateMethod = (obj, member, method) => { const { data } = __classPrivateFieldGet$2(this, _Board_sharer, "f").getActiveStoreSnapshot(); return data; } - use(middleware) { + use(middleware, config) { var _a, _b, _c; if (__classPrivateFieldGet$2(this, _Board_middlewareMap, "f").has(middleware)) { const item = __classPrivateFieldGet$2(this, _Board_middlewareMap, "f").get(middleware); @@ -5799,13 +5799,14 @@ var __privateMethod = (obj, member, method) => { const viewer = __classPrivateFieldGet$2(this, _Board_viewer, "f"); const calculator = __classPrivateFieldGet$2(this, _Board_calculator, "f"); const eventHub = __classPrivateFieldGet$2(this, _Board_eventHub, "f"); - const obj = middleware({ boardContent, sharer, viewer, calculator, eventHub, container }); + const obj = middleware({ boardContent, sharer, viewer, calculator, eventHub, container }, config); (_c = obj.use) === null || _c === void 0 ? void 0 : _c.call(obj); __classPrivateFieldGet$2(this, _Board_middlewares, "f").push(middleware); __classPrivateFieldGet$2(this, _Board_activeMiddlewareObjs, "f").push(obj); __classPrivateFieldGet$2(this, _Board_middlewareMap, "f").set(middleware, { status: "enable", - middlewareObject: obj + middlewareObject: obj, + config }); __classPrivateFieldGet$2(this, _Board_instances, "m", _Board_resetActiveMiddlewareObjs).call(this); } @@ -6173,10 +6174,17 @@ var __privateMethod = (obj, member, method) => { const selectWrapperBorderWidth = 2; const resizeControllerBorderWidth = 4; const areaBorderWidth = 1; - const wrapperColor = "#1973ba"; - const lockColor = "#5b5959b5"; const controllerSize$1 = 10; + const activeColor = "#1973ba"; + const activeAreaColor = "#1976d21c"; + const lockedColor = "#5b5959b5"; const referenceColor = "#f7276e"; + const defaultStyle$2 = { + activeColor, + activeAreaColor, + lockedColor, + referenceColor + }; const middlewareEventSelect = "@middleware/select"; const middlewareEventSelectClear = "@middleware/select-clear"; const middlewareEventSelectInGroup = "@middleware/select-in-group"; @@ -6285,19 +6293,23 @@ var __privateMethod = (obj, member, method) => { if (!vertexes) { return; } - const wrapperOpts = { borderColor: wrapperColor, borderWidth: 1, background: "transparent", lineDash: [] }; + const { style } = opts; + const { activeColor: activeColor2 } = style; + const wrapperOpts = { borderColor: activeColor2, borderWidth: 1, background: "transparent", lineDash: [] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); } function drawLockVertexesWrapper(ctx, vertexes, opts) { if (!vertexes) { return; } - const wrapperOpts = { borderColor: lockColor, borderWidth: 1, background: "transparent", lineDash: [] }; + const { style } = opts; + const { lockedColor: lockedColor2 } = style; + const wrapperOpts = { borderColor: lockedColor2, borderWidth: 1, background: "transparent", lineDash: [] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); const { controller } = opts; if (controller) { const { topLeft, topRight, bottomLeft, bottomRight, topMiddle, bottomMiddle, leftMiddle, rightMiddle } = controller; - const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: 1, background: lockColor }); + const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: 1, background: lockedColor2 }); drawCrossVertexes(ctx, calcViewVertexes(topMiddle.vertexes, opts), ctrlOpts); drawCrossVertexes(ctx, calcViewVertexes(bottomMiddle.vertexes, opts), ctrlOpts); drawCrossVertexes(ctx, calcViewVertexes(leftMiddle.vertexes, opts), ctrlOpts); @@ -6312,9 +6324,10 @@ var __privateMethod = (obj, member, method) => { if (!controller) { return; } - const { hideControllers } = opts; + const { hideControllers, style } = opts; + const { activeColor: activeColor2 } = style; const { elementWrapper, topLeft, topRight, bottomLeft, bottomRight, top, rotate } = controller; - const wrapperOpts = { borderColor: wrapperColor, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [] }; + const wrapperOpts = { borderColor: activeColor2, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [] }; const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: resizeControllerBorderWidth, background: "#FFFFFF" }); drawVertexes(ctx, calcViewVertexes(elementWrapper, opts), wrapperOpts); if (!hideControllers) { @@ -6327,11 +6340,12 @@ var __privateMethod = (obj, member, method) => { } } function drawArea(ctx, opts) { - const { start, end } = opts; + const { start, end, style } = opts; + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2 } = style; ctx.setLineDash([]); ctx.lineWidth = areaBorderWidth; - ctx.strokeStyle = wrapperColor; - ctx.fillStyle = "#1976d24f"; + ctx.strokeStyle = activeColor2; + ctx.fillStyle = activeAreaColor2; ctx.beginPath(); ctx.moveTo(start.x, start.y); ctx.lineTo(end.x, start.y); @@ -6342,12 +6356,13 @@ var __privateMethod = (obj, member, method) => { ctx.fill(); } function drawListArea(ctx, opts) { - const { areaSize } = opts; + const { areaSize, style } = opts; + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2 } = style; const { x: x2, y: y2, w: w2, h: h2 } = areaSize; ctx.setLineDash([]); ctx.lineWidth = areaBorderWidth; - ctx.strokeStyle = wrapperColor; - ctx.fillStyle = "#1976d21c"; + ctx.strokeStyle = activeColor2; + ctx.fillStyle = activeAreaColor2; ctx.beginPath(); ctx.moveTo(x2, y2); ctx.lineTo(x2 + w2, y2); @@ -6358,16 +6373,19 @@ var __privateMethod = (obj, member, method) => { ctx.fill(); } function drawGroupQueueVertexesWrappers(ctx, vertexesList, opts) { + const { style } = opts; + const { activeColor: activeColor2 } = style; for (let i = 0; i < vertexesList.length; i++) { const vertexes = vertexesList[i]; - const wrapperOpts = { borderColor: wrapperColor, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [4, 4] }; + const wrapperOpts = { borderColor: activeColor2, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [4, 4] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); } } function drawReferenceLines(ctx, opts) { - const { xLines, yLines } = opts; + const { xLines, yLines, style } = opts; + const { referenceColor: referenceColor2 } = style; const lineOpts = { - borderColor: referenceColor, + borderColor: referenceColor2, borderWidth: 1, lineDash: [] }; @@ -8061,7 +8079,10 @@ var __privateMethod = (obj, member, method) => { } }; }; - const MiddlewareSelector = (opts) => { + const MiddlewareSelector = (opts, config) => { + const innerConfig = Object.assign(Object.assign({}, defaultStyle$2), config); + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2, lockedColor: lockedColor2, referenceColor: referenceColor2 } = innerConfig; + const style = { activeColor: activeColor2, activeAreaColor: activeAreaColor2, lockedColor: lockedColor2, referenceColor: referenceColor2 }; const { viewer, sharer, boardContent, calculator, eventHub } = opts; const { overlayContext } = boardContent; let prevPoint = null; @@ -8626,7 +8647,7 @@ var __privateMethod = (obj, member, method) => { const groupQueueVertexesList = sharedStore[keyGroupQueueVertexesList]; const isMoving = sharedStore[keyIsMoving]; const enableSnapToGrid = sharedStore[keyEnableSnapToGrid]; - const drawBaseOpts = { calculator, viewScaleInfo, viewSizeInfo }; + const drawBaseOpts = { calculator, viewScaleInfo, viewSizeInfo, style }; const selectedElementController = elem ? calcElementSizeController(elem, { groupQueue, controllerSize: 10, @@ -8641,13 +8662,13 @@ var __privateMethod = (obj, member, method) => { groupQueue, controllerSize: 10, viewScaleInfo - }) })); + }), style })); } else { drawHoverVertexesWrapper(overlayContext, hoverElementVertexes, drawBaseOpts); } } if (!isLock && elem && ["select", "drag", "resize"].includes(actionType)) { - drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag" })); + drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag", style })); if (actionType === "drag") { if (enableSnapToGrid === true) { const referenceInfo = calcReferenceInfo(elem.uuid, { @@ -8662,7 +8683,8 @@ var __privateMethod = (obj, member, method) => { if (offsetX === 0 || offsetY === 0) { drawReferenceLines(overlayContext, { xLines, - yLines + yLines, + style }); } } @@ -8676,13 +8698,13 @@ var __privateMethod = (obj, member, method) => { groupQueue, controllerSize: 10, viewScaleInfo - }) })); + }), style })); } else { drawHoverVertexesWrapper(overlayContext, hoverElementVertexes, drawBaseOpts); } } if (!isLock && elem && ["select", "drag", "resize"].includes(actionType)) { - drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag" })); + drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag", style })); if (actionType === "drag") { if (enableSnapToGrid === true) { const referenceInfo = calcReferenceInfo(elem.uuid, { @@ -8697,14 +8719,15 @@ var __privateMethod = (obj, member, method) => { if (offsetX === 0 || offsetY === 0) { drawReferenceLines(overlayContext, { xLines, - yLines + yLines, + style }); } } } } } else if (actionType === "area" && areaStart && areaEnd) { - drawArea(overlayContext, { start: areaStart, end: areaEnd }); + drawArea(overlayContext, { start: areaStart, end: areaEnd, style }); } else if (["drag-list", "drag-list-end"].includes(actionType)) { const listAreaSize = calcSelectedElementsArea(getActiveElements(), { viewScaleInfo: sharer2.getActiveViewScaleInfo(), @@ -8712,7 +8735,7 @@ var __privateMethod = (obj, member, method) => { calculator }); if (listAreaSize) { - drawListArea(overlayContext, { areaSize: listAreaSize }); + drawListArea(overlayContext, { areaSize: listAreaSize, style }); } } } @@ -8727,16 +8750,16 @@ var __privateMethod = (obj, member, method) => { const keyPrevPoint$1 = Symbol(`${key$1}_prevPoint`); const keyActivePoint = Symbol(`${key$1}_activePoint`); const keyActiveThumbType = Symbol(`${key$1}_activeThumbType`); - const minScrollerWidth = 12; - const scrollerLineWidth = 16; - const scrollerThumbAlpha = 0.3; - const scrollConfig = { - width: minScrollerWidth, - thumbColor: "#0000008A", - thumbHoverColor: "#000000EE", - scrollBarColor: "#FFFFFF60", - showScrollBar: false + const defaultStyle$1 = { + thumbBackground: "#0000003A", + thumbBorderColor: "#0000008A", + hoverThumbBackground: "#0000005F", + hoverThumbBorderColor: "#000000EE", + activeThumbBackground: "#0000005E", + activeThumbBorderColor: "#000000F0" }; + const scrollerLineWidth = 16; + const minThumbLength = scrollerLineWidth * 2.5; function isPointAtRect(overlayContext, p, rect) { const ctx = overlayContext; const { x: x2, y: y2, w: w2, h: h2 } = rect; @@ -8772,11 +8795,12 @@ var __privateMethod = (obj, member, method) => { return info; } function calcScrollerInfo(opts) { - const { viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb } = opts; + const { viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style } = opts; const { width, height } = viewSizeInfo; const { offsetTop, offsetBottom, offsetLeft, offsetRight } = viewScaleInfo; - const sliderMinSize = scrollerLineWidth * 2.5; + const sliderMinSize = minThumbLength; const lineSize2 = scrollerLineWidth; + const { thumbBackground, thumbBorderColor, hoverThumbBackground, hoverThumbBorderColor } = style; let xSize = 0; let ySize = 0; xSize = Math.max(sliderMinSize, width - lineSize2 * 2 - (Math.abs(offsetLeft) + Math.abs(offsetRight))); @@ -8827,23 +8851,24 @@ var __privateMethod = (obj, member, method) => { ySize, translateY, translateX, - xThumbColor: hoverXThumb ? scrollConfig.thumbHoverColor : scrollConfig.thumbColor, - yThumbColor: hoverYThumb ? scrollConfig.thumbHoverColor : scrollConfig.thumbColor, - scrollBarColor: scrollConfig.scrollBarColor, + xThumbBackground: hoverXThumb ? hoverThumbBackground : thumbBackground, + yThumbBackground: hoverYThumb ? hoverThumbBackground : thumbBackground, + xThumbBorderColor: hoverXThumb ? hoverThumbBorderColor : thumbBorderColor, + yThumbBorderColor: hoverYThumb ? hoverThumbBorderColor : thumbBorderColor, xThumbRect, yThumbRect }; return scrollWrapper; } function drawScrollerThumb(ctx, opts) { - let { x: x2, y: y2, h: h2, w: w2 } = opts; + let { x: x2, y: y2, h: h2, w: w2, background: background2, borderColor: borderColor2 } = opts; ctx.save(); ctx.shadowColor = "#FFFFFF"; ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.shadowBlur = 1; { - const { color: color2, axis } = opts; + const { axis } = opts; if (axis === "X") { y2 = y2 + h2 / 4 + 0; h2 = h2 / 2; @@ -8856,7 +8881,7 @@ var __privateMethod = (obj, member, method) => { if (w2 < r * 2 || h2 < r * 2) { r = 0; } - ctx.globalAlpha = scrollerThumbAlpha; + ctx.globalAlpha = 1; ctx.beginPath(); ctx.moveTo(x2 + r, y2); ctx.arcTo(x2 + w2, y2, x2 + w2, y2 + h2, r); @@ -8864,12 +8889,11 @@ var __privateMethod = (obj, member, method) => { ctx.arcTo(x2, y2 + h2, x2, y2, r); ctx.arcTo(x2, y2, x2 + w2, y2, r); ctx.closePath(); - ctx.fillStyle = color2; + ctx.fillStyle = background2; ctx.fill(); - ctx.globalAlpha = 1; ctx.beginPath(); ctx.lineWidth = 1; - ctx.strokeStyle = color2; + ctx.strokeStyle = borderColor2; ctx.setLineDash([]); ctx.moveTo(x2 + r, y2); ctx.arcTo(x2 + w2, y2, x2 + w2, y2 + h2, r); @@ -8883,9 +8907,9 @@ var __privateMethod = (obj, member, method) => { } function drawScrollerInfo(overlayContext, opts) { const ctx = overlayContext; - const { viewScaleInfo, viewSizeInfo, scrollInfo } = opts; + const { viewScaleInfo, viewSizeInfo, scrollInfo, style } = opts; const { activeThumbType, prevPoint, activePoint, hoverXThumb, hoverYThumb } = scrollInfo; - const wrapper = calcScrollerInfo({ viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb }); + const wrapper = calcScrollerInfo({ viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style }); let xThumbRect = Object.assign({}, wrapper.xThumbRect); let yThumbRect = Object.assign({}, wrapper.yThumbRect); if (activeThumbType && prevPoint && activePoint) { @@ -8897,28 +8921,37 @@ var __privateMethod = (obj, member, method) => { yThumbRect.y = yThumbRect.y + (activePoint.y - prevPoint.y); } } - drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "X" }, xThumbRect), { r: wrapper.lineSize / 2, color: wrapper.xThumbColor })); - drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "Y" }, yThumbRect), { r: wrapper.lineSize / 2, color: wrapper.yThumbColor })); - ctx.globalAlpha = 1; + drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "X" }, xThumbRect), { r: wrapper.lineSize / 2, background: wrapper.xThumbBackground, borderColor: wrapper.xThumbBorderColor })); + drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "Y" }, yThumbRect), { r: wrapper.lineSize / 2, background: wrapper.yThumbBackground, borderColor: wrapper.yThumbBorderColor })); return { xThumbRect, yThumbRect }; } function drawScroller(ctx, opts) { - const { snapshot } = opts; + const { snapshot, style } = opts; const viewSizeInfo = getViewSizeInfoFromSnapshot(snapshot); const viewScaleInfo = getViewScaleInfoFromSnapshot(snapshot); const scrollInfo = getScrollInfoFromSnapshot(snapshot); - const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo }); + const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo, style }); return { xThumbRect, yThumbRect }; } - const MiddlewareScroller = (opts) => { + const MiddlewareScroller = (opts, config) => { const { viewer, boardContent, sharer, eventHub } = opts; const { overlayContext } = boardContent; sharer.setSharedStorage(keyXThumbRect, null); sharer.setSharedStorage(keyYThumbRect, null); let isBusy = false; + const innerConfig = Object.assign(Object.assign({}, defaultStyle$1), config); + const { thumbBackground, thumbBorderColor, hoverThumbBackground, hoverThumbBorderColor, activeThumbBackground, activeThumbBorderColor } = innerConfig; + const style = { + thumbBackground, + thumbBorderColor, + hoverThumbBackground, + hoverThumbBorderColor, + activeThumbBackground, + activeThumbBorderColor + }; const clear = () => { sharer.setSharedStorage(keyPrevPoint$1, null); sharer.setSharedStorage(keyActivePoint, null); @@ -9022,7 +9055,7 @@ var __privateMethod = (obj, member, method) => { } }, beforeDrawFrame({ snapshot }) { - const { xThumbRect, yThumbRect } = drawScroller(overlayContext, { snapshot }); + const { xThumbRect, yThumbRect } = drawScroller(overlayContext, { snapshot, style }); sharer.setSharedStorage(keyXThumbRect, xThumbRect); sharer.setSharedStorage(keyYThumbRect, yThumbRect); } @@ -9056,17 +9089,26 @@ var __privateMethod = (obj, member, method) => { }; }; const rulerSize = 16; + const fontSize = 10; + const fontWeight = 100; + const lineSize = 1; + const fontFamily$1 = "monospace"; const background = "#FFFFFFA8"; const borderColor = "#00000080"; const scaleColor = "#000000"; const textColor = "#00000080"; - const fontFamily$1 = "monospace"; - const fontSize = 10; - const fontWeight = 100; const gridColor = "#AAAAAA20"; - const gridKeyColor = "#AAAAAA40"; - const lineSize = 1; + const gridPrimaryColor = "#AAAAAA40"; const selectedAreaColor = "#196097"; + const defaultStyle = { + background, + borderColor, + scaleColor, + textColor, + gridColor, + gridPrimaryColor, + selectedAreaColor + }; const limitRulerUnitList = [1, 2, 5, 10, 20, 50, 100, 200, 500]; function limitRulerUnit(unit) { unit = Math.max(limitRulerUnitList[0], Math.min(unit, limitRulerUnitList[limitRulerUnitList.length - 1])); @@ -9143,7 +9185,8 @@ var __privateMethod = (obj, member, method) => { }); } function drawXRuler(ctx, opts) { - const { scaleList } = opts; + const { scaleList, style } = opts; + const { scaleColor: scaleColor2, textColor: textColor2 } = style; const scaleDrawStart = rulerSize; const scaleDrawEnd = rulerSize * 4 / 5; const subKeyScaleDrawEnd = rulerSize * 2 / 5; @@ -9160,10 +9203,10 @@ var __privateMethod = (obj, member, method) => { ctx.closePath(); ctx.lineWidth = lineSize; ctx.setLineDash([]); - ctx.fillStyle = scaleColor; + ctx.fillStyle = scaleColor2; ctx.stroke(); if (item.isKeyNum) { - ctx.fillStyle = textColor; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.$setFont({ fontWeight, @@ -9175,7 +9218,8 @@ var __privateMethod = (obj, member, method) => { } } function drawYRuler(ctx, opts) { - const { scaleList } = opts; + const { scaleList, style } = opts; + const { scaleColor: scaleColor2, textColor: textColor2 } = style; const scaleDrawStart = rulerSize; const scaleDrawEnd = rulerSize * 4 / 5; const subKeyScaleDrawEnd = rulerSize * 2 / 5; @@ -9190,7 +9234,7 @@ var __privateMethod = (obj, member, method) => { ctx.moveTo(scaleDrawStart, item.position); ctx.lineTo(item.isKeyNum ? keyScaleDrawEnd : item.isSubKeyNum ? subKeyScaleDrawEnd : scaleDrawEnd, item.position); ctx.closePath(); - ctx.fillStyle = scaleColor; + ctx.fillStyle = scaleColor2; ctx.lineWidth = lineSize; ctx.setLineDash([]); ctx.stroke(); @@ -9199,7 +9243,7 @@ var __privateMethod = (obj, member, method) => { const textY = item.position + fontStart; const numText = `${item.num}`; rotateByCenter(ctx, -90, { x: textX, y: textY }, () => { - ctx.fillStyle = textColor; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.$setFont({ fontWeight, @@ -9212,8 +9256,9 @@ var __privateMethod = (obj, member, method) => { } } function drawRulerBackground(ctx, opts) { - const { viewSizeInfo } = opts; + const { viewSizeInfo, style } = opts; const { width, height } = viewSizeInfo; + const { background: background2, borderColor: borderColor2 } = style; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(width + 1, 0); @@ -9223,25 +9268,26 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(0, height + 1); ctx.lineTo(0, 0); ctx.closePath(); - ctx.fillStyle = background; + ctx.fillStyle = background2; ctx.fill(); ctx.lineWidth = lineSize; ctx.setLineDash([]); - ctx.strokeStyle = borderColor; + ctx.strokeStyle = borderColor2; ctx.stroke(); } function drawGrid(ctx, opts) { - const { xList, yList, viewSizeInfo } = opts; + const { xList, yList, viewSizeInfo, style } = opts; const { width, height } = viewSizeInfo; + const { gridColor: gridColor2, gridPrimaryColor: gridPrimaryColor2 } = style; for (let i = 0; i < xList.length; i++) { const item = xList[i]; ctx.beginPath(); ctx.moveTo(item.position, 0); ctx.lineTo(item.position, height); if (item.isKeyNum === true || item.isSubKeyNum === true) { - ctx.strokeStyle = gridKeyColor; + ctx.strokeStyle = gridPrimaryColor2; } else { - ctx.strokeStyle = gridColor; + ctx.strokeStyle = gridColor2; } ctx.closePath(); ctx.lineWidth = lineSize; @@ -9254,9 +9300,9 @@ var __privateMethod = (obj, member, method) => { ctx.moveTo(0, item.position); ctx.lineTo(width, item.position); if (item.isKeyNum === true || item.isSubKeyNum === true) { - ctx.strokeStyle = gridKeyColor; + ctx.strokeStyle = gridPrimaryColor2; } else { - ctx.strokeStyle = gridColor; + ctx.strokeStyle = gridColor2; } ctx.lineWidth = 1; ctx.closePath(); @@ -9264,8 +9310,9 @@ var __privateMethod = (obj, member, method) => { } } function drawScrollerSelectedArea(ctx, opts) { - const { snapshot, calculator } = opts; + const { snapshot, calculator, style } = opts; const { sharedStore } = snapshot; + const { selectedAreaColor: selectedAreaColor2 } = style; const selectedElementList = sharedStore[keySelectedElementList]; const actionType = sharedStore[keyActionType]; if (["select", "drag", "drag-list", "drag-list-end"].includes(actionType) && selectedElementList.length > 0) { @@ -9302,7 +9349,7 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(xAreaEnd, 0); ctx.lineTo(xAreaEnd, rulerSize); ctx.lineTo(xAreaStart, rulerSize); - ctx.fillStyle = selectedAreaColor; + ctx.fillStyle = selectedAreaColor2; ctx.closePath(); ctx.fill(); ctx.beginPath(); @@ -9310,15 +9357,26 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(rulerSize, yAreaStart); ctx.lineTo(rulerSize, yAreaEnd); ctx.lineTo(0, yAreaEnd); - ctx.fillStyle = selectedAreaColor; + ctx.fillStyle = selectedAreaColor2; ctx.closePath(); ctx.fill(); } } const middlewareEventRuler = "@middleware/show-ruler"; - const MiddlewareRuler = (opts) => { + const MiddlewareRuler = (opts, config) => { const { boardContent, viewer, eventHub, calculator } = opts; const { overlayContext, underlayContext } = boardContent; + const innerConfig = Object.assign(Object.assign({}, defaultStyle), config); + const { background: background2, borderColor: borderColor2, scaleColor: scaleColor2, textColor: textColor2, gridColor: gridColor2, gridPrimaryColor: gridPrimaryColor2, selectedAreaColor: selectedAreaColor2 } = innerConfig; + const style = { + background: background2, + borderColor: borderColor2, + scaleColor: scaleColor2, + textColor: textColor2, + gridColor: gridColor2, + gridPrimaryColor: gridPrimaryColor2, + selectedAreaColor: selectedAreaColor2 + }; let show = true; let showGrid = true; const rulerCallback = (e) => { @@ -9344,19 +9402,20 @@ var __privateMethod = (obj, member, method) => { if (show === true) { const viewScaleInfo = getViewScaleInfoFromSnapshot(snapshot); const viewSizeInfo = getViewSizeInfoFromSnapshot(snapshot); - drawScrollerSelectedArea(overlayContext, { snapshot, calculator }); - drawRulerBackground(overlayContext, { viewScaleInfo, viewSizeInfo }); + drawScrollerSelectedArea(overlayContext, { snapshot, calculator, style }); + drawRulerBackground(overlayContext, { viewScaleInfo, viewSizeInfo, style }); const { list: xList, rulerUnit } = calcXRulerScaleList({ viewScaleInfo, viewSizeInfo }); - drawXRuler(overlayContext, { scaleList: xList }); + drawXRuler(overlayContext, { scaleList: xList, style }); const { list: yList } = calcYRulerScaleList({ viewScaleInfo, viewSizeInfo }); - drawYRuler(overlayContext, { scaleList: yList }); + drawYRuler(overlayContext, { scaleList: yList, style }); if (showGrid === true) { const ctx = rulerUnit === 1 ? overlayContext : underlayContext; drawGrid(ctx, { xList, yList, viewScaleInfo, - viewSizeInfo + viewSizeInfo, + style }); } } @@ -9408,7 +9467,8 @@ var __privateMethod = (obj, member, method) => { }; const fontFamily = "monospace"; function drawSizeInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textColor: textColor2, textBackground } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9430,7 +9490,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9438,13 +9498,14 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } function drawPositionInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textBackground, textColor: textColor2 } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9466,7 +9527,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9474,13 +9535,14 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } function drawAngleInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textBackground, textColor: textColor2 } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9502,7 +9564,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9510,18 +9572,28 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } const infoBackground = "#1973bac6"; const infoTextColor = "#ffffff"; + const defaltStyle = { + textBackground: infoBackground, + textColor: infoTextColor + }; const infoFontSize = 10; const infoLineHeight = 16; - const MiddlewareInfo = (opts) => { + const MiddlewareInfo = (opts, config) => { const { boardContent, calculator } = opts; const { overlayContext } = boardContent; + const innerConfig = Object.assign(Object.assign({}, defaltStyle), config); + const { textBackground, textColor: textColor2 } = innerConfig; + const style = { + textBackground, + textColor: textColor2 + }; return { name: "@middleware/info", beforeDrawFrame({ snapshot }) { @@ -9587,8 +9659,7 @@ var __privateMethod = (obj, member, method) => { text: whText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); drawPositionInfoText(overlayContext, { point: { @@ -9600,8 +9671,7 @@ var __privateMethod = (obj, member, method) => { text: xyText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); drawAngleInfoText(overlayContext, { point: { @@ -9613,8 +9683,7 @@ var __privateMethod = (obj, member, method) => { text: angleText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); } } @@ -9675,8 +9744,8 @@ var __privateMethod = (obj, member, method) => { __classPrivateFieldGet(this, _Core_board, "f").destroy(); __classPrivateFieldGet(this, _Core_canvas, "f").remove(); } - use(middleware) { - __classPrivateFieldGet(this, _Core_board, "f").use(middleware); + use(middleware, config) { + __classPrivateFieldGet(this, _Core_board, "f").use(middleware, config); } disuse(middleware) { __classPrivateFieldGet(this, _Core_board, "f").disuse(middleware); @@ -9757,10 +9826,85 @@ var __privateMethod = (obj, member, method) => { enableSelect: false, enableTextEdit: false, enableDrag: false, - enableInfo: false + enableInfo: false, + middlewareStyles: { + selector: {}, + info: {}, + ruler: {}, + scroller: {} + } }; return storage; } + function parseStyles(opts) { + const styles = { + selector: {}, + ruler: {}, + info: {}, + scroller: {} + }; + if (opts.styles) { + const { selector, info, ruler, scroller } = opts.styles; + if (istype.string(selector == null ? void 0 : selector.activeColor)) { + styles.selector.activeColor = selector == null ? void 0 : selector.activeColor; + } + if (istype.string(selector == null ? void 0 : selector.activeAreaColor)) { + styles.selector.activeAreaColor = selector == null ? void 0 : selector.activeAreaColor; + } + if (istype.string(selector == null ? void 0 : selector.lockedColor)) { + styles.selector.lockedColor = selector == null ? void 0 : selector.lockedColor; + } + if (istype.string(selector == null ? void 0 : selector.referenceColor)) { + styles.selector.referenceColor = selector == null ? void 0 : selector.referenceColor; + } + if (istype.string(info == null ? void 0 : info.textBackground)) { + styles.info.textBackground = info == null ? void 0 : info.textBackground; + } + if (istype.string(info == null ? void 0 : info.textColor)) { + styles.info.textColor = info == null ? void 0 : info.textColor; + } + if (istype.string(ruler == null ? void 0 : ruler.background)) { + styles.ruler.background = ruler == null ? void 0 : ruler.background; + } + if (istype.string(ruler == null ? void 0 : ruler.borderColor)) { + styles.ruler.borderColor = ruler == null ? void 0 : ruler.borderColor; + } + if (istype.string(ruler == null ? void 0 : ruler.scaleColor)) { + styles.ruler.scaleColor = ruler == null ? void 0 : ruler.scaleColor; + } + if (istype.string(ruler == null ? void 0 : ruler.textColor)) { + styles.ruler.textColor = ruler == null ? void 0 : ruler.textColor; + } + if (istype.string(ruler == null ? void 0 : ruler.gridColor)) { + styles.ruler.gridColor = ruler == null ? void 0 : ruler.gridColor; + } + if (istype.string(ruler == null ? void 0 : ruler.gridPrimaryColor)) { + styles.ruler.gridPrimaryColor = ruler == null ? void 0 : ruler.gridPrimaryColor; + } + if (istype.string(ruler == null ? void 0 : ruler.selectedAreaColor)) { + styles.ruler.selectedAreaColor = ruler == null ? void 0 : ruler.selectedAreaColor; + } + if (istype.string(scroller == null ? void 0 : scroller.thumbBackground)) { + styles.scroller.thumbBackground = scroller == null ? void 0 : scroller.thumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.thumbBorderColor)) { + styles.scroller.thumbBorderColor = scroller == null ? void 0 : scroller.thumbBorderColor; + } + if (istype.string(scroller == null ? void 0 : scroller.hoverThumbBackground)) { + styles.scroller.hoverThumbBackground = scroller == null ? void 0 : scroller.hoverThumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.hoverThumbBorderColor)) { + styles.scroller.hoverThumbBorderColor = scroller == null ? void 0 : scroller.hoverThumbBorderColor; + } + if (istype.string(scroller == null ? void 0 : scroller.activeThumbBackground)) { + styles.scroller.activeThumbBackground = scroller == null ? void 0 : scroller.activeThumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.activeThumbBorderColor)) { + styles.scroller.activeThumbBorderColor = scroller == null ? void 0 : scroller.activeThumbBorderColor; + } + } + return styles; + } async function exportImageFileBlobURL(opts) { const { data, width, height, devicePixelRatio, viewScaleInfo, viewSizeInfo, loadItemMap } = opts; let viewContext = createOffscreenContext2D({ width, height, devicePixelRatio }); @@ -9814,14 +9958,15 @@ var __privateMethod = (obj, member, method) => { } function runMiddlewares(core, store) { const { enableRuler, enableScale, enableScroll, enableSelect, enableTextEdit, enableDrag, enableInfo } = store.getSnapshot(); + const styles = store.get("middlewareStyles"); if (enableScroll === true) { - core.use(MiddlewareScroller); + core.use(MiddlewareScroller, styles == null ? void 0 : styles.scroller); } else if (enableScroll === false) { core.disuse(MiddlewareScroller); } if (enableSelect === true) { core.use(MiddlewareLayoutSelector); - core.use(MiddlewareSelector); + core.use(MiddlewareSelector, styles == null ? void 0 : styles.selector); } else if (enableSelect === false) { core.disuse(MiddlewareLayoutSelector); core.disuse(MiddlewareSelector); @@ -9832,7 +9977,7 @@ var __privateMethod = (obj, member, method) => { core.disuse(MiddlewareScaler); } if (enableRuler === true) { - core.use(MiddlewareRuler); + core.use(MiddlewareRuler, styles == null ? void 0 : styles.ruler); } else if (enableRuler === false) { core.disuse(MiddlewareRuler); } @@ -9847,7 +9992,7 @@ var __privateMethod = (obj, member, method) => { core.disuse(MiddlewareDragger); } if (enableInfo === true) { - core.use(MiddlewareInfo); + core.use(MiddlewareInfo, styles == null ? void 0 : styles.info); } else if (enableInfo === false) { core.disuse(MiddlewareInfo); } @@ -9908,6 +10053,7 @@ var __privateMethod = (obj, member, method) => { defaultStorage: getDefaultStorage() })); const opts = { ...defaultSettings, ...options }; + __privateGet(this, _store).set("middlewareStyles", parseStyles(opts)); const { width, height, devicePixelRatio, createCustomContext2D } = opts; const core = new Core(mount, { width, height, devicePixelRatio, createCustomContext2D }); __privateSet(this, _core, core); diff --git a/package.json b/package.json index bef4760..12eb27e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "codemirror": "^5.65.16", - "idraw": "0.4.0-beta.30", + "idraw": "0.4.0-beta.31", "vue": "^3.4.15" }, "devDependencies": { diff --git a/public/demo/advanced-data/data.js b/public/demo/advanced-data/data.js new file mode 100644 index 0000000..93df9e7 --- /dev/null +++ b/public/demo/advanced-data/data.js @@ -0,0 +1,3236 @@ +export default { + elements: [ + { + uuid: 'c7941173-dd31-dda6-c74d-8a4a227742a8', + name: 'Note', + x: 299, + y: 444, + w: 60, + h: 14, + angle: 0, + type: 'text', + detail: { + text: 'Read 10:43', + fontFamily: 'SF Pro Text', + fontSize: 11, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 0.4000000059604645 + } + }, + { + uuid: 'd1922ae0-0a0a-10ae-ad8a-6160cbce1783', + name: 'BG', + x: 241, + y: 404, + w: 118, + h: 36, + angle: 0, + type: 'rect', + detail: { + background: '#007AFF', + borderRadius: 17 + } + }, + { + uuid: 'e7a7ec95-25da-c4f4-11a4-fe486bf3d1c8', + name: 'Text', + x: 253, + y: 411, + w: 94, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'Yes, it is 😄', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#FFFFFF', + opacity: 1 + } + }, + { + uuid: '9568e3f4-2348-a2c5-f2ff-f45a3ab9a7ef', + name: 'Message #5 Bubble', + x: 16, + y: 332, + w: 244, + h: 64, + angle: 0, + type: 'group', + detail: { + background: '#F3F3F3', + borderRadius: 17.5, + borderDash: [], + opacity: 1, + children: [] + } + }, + { + uuid: '1ec805d7-1be7-f234-d460-013eeb5164c4', + name: 'Media / Rounded r=10', + x: 206, + y: 342, + w: 44, + h: 44, + angle: 0, + type: 'rect', + detail: { + background: '#C8C8C8', + borderRadius: 10, + borderDash: [], + boxSizing: 'center-line', + opacity: 1 + } + }, + { + uuid: 'c9f8ab17-5abf-4e85-c5a2-d11eb394db5f', + name: 'Subtitle', + x: 31, + y: 366, + w: 47, + h: 18, + angle: 0, + type: 'text', + detail: { + text: 'JavaScript', + fontFamily: 'SF Pro Text', + fontSize: 13, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 18, + color: '#000000', + opacity: 0.4000000059604645 + } + }, + { + uuid: 'dde0e16c-519d-1da8-0590-c2eb4ea275cb', + name: 'Title', + x: 31, + y: 344, + w: 156, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'iDraw.js | A simple ...', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#000000', + opacity: 1 + } + }, + { + uuid: 'eaddcd12-2a48-78f0-2b6f-314dc00964d1', + name: 'BG', + x: 16, + y: 288, + w: 127, + h: 36, + angle: 0, + type: 'rect', + detail: { + background: '#F3F3F3', + borderRadius: 17, + borderDash: [], + boxSizing: 'center-line', + opacity: 1 + } + }, + { + uuid: '5abc131c-ac8b-37d9-ee3d-4b712427b5c5', + name: 'Text', + x: 28, + y: 295, + w: 103, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'Is this it?', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#000000', + opacity: 1 + } + }, + { + uuid: '967dbe4e-b466-dcf7-0184-695d27400e2f', + name: 'Note', + x: 299, + y: 267, + w: 60, + h: 14, + angle: 0, + type: 'text', + detail: { + text: 'Read 10:43', + fontFamily: 'SF Pro Text', + fontSize: 11, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 0.4000000059604645 + } + }, + { + uuid: 'b584222b-4488-88ee-6641-1995cac57d24', + name: 'BG', + x: 149, + y: 227, + w: 210, + h: 36, + angle: 0, + type: 'rect', + detail: { + background: '#007AFF', + borderRadius: 17 + } + }, + { + uuid: 'cfcf18cf-5270-8712-496c-89a166b84f73', + name: 'Text', + x: 161, + y: 234, + w: 186, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'iDraw.js is recommended', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#FFFFFF', + opacity: 1 + } + }, + { + uuid: '17f9e65f-4cdc-eac5-d897-5513863210de', + name: 'BG', + x: 142, + y: 116, + w: 217, + h: 103, + angle: 0, + type: 'rect', + detail: { + background: '#007AFF', + borderRadius: 17 + } + }, + { + uuid: '91203fa6-2808-bf8d-ca50-a36c0156b7ae', + name: 'Text', + x: 154, + y: 122, + w: 193, + h: 89, + angle: 0, + type: 'text', + detail: { + text: 'iDraw.js, a new JavaScript drawing framework, is exciting because it can parse Figma files', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#FFFFFF', + opacity: 1 + } + }, + { + uuid: 'd8c0e930-5153-d6aa-beb9-0d878361955a', + name: 'BG', + x: 16, + y: 4, + w: 237, + h: 103, + angle: 0, + type: 'rect', + detail: { + background: '#F8F8F8EB', + borderRadius: 17, + borderDash: [], + boxSizing: 'center-line', + opacity: 1 + } + }, + { + uuid: '699fc98c-0f6a-6b8b-3d6c-983be2147a73', + name: 'Text', + x: 28, + y: 11.800000190734863, + w: 213, + h: 88, + angle: 0, + type: 'text', + detail: { + text: 'Hey, I recently started a new project. Can you recommend any JavaScript framework for front-end drawing?', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#000000', + opacity: 1 + } + }, + { + uuid: 'e00bb3cb-671a-ef42-ca8f-8922a0db665a', + name: 'BG / Bars - Light Gray', + x: 0, + y: 0, + w: 375, + h: 88, + angle: 0, + type: 'rect', + detail: { + background: '#FFFFFFEB' + } + }, + { + uuid: '9fbacb75-ff41-a6df-0d28-65f3aa432c64', + name: 'Avatar', + x: 325, + y: 46, + w: 34, + h: 34, + angle: 0, + type: 'rect', + detail: { + background: '#C8C8C8', + borderRadius: 17 + } + }, + { + uuid: '56ce680f-328e-3fcf-34fb-18c4ed0e664d', + name: 'Arrow', + x: 8, + y: 55.5, + w: 12, + h: 20.5, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [9.537135124206543, 20.082666397094727] + }, + { + type: 'L', + params: [0.2921518385410309, 10.945804595947266] + }, + { + type: 'C', + params: [-0.09738397598266602, 10.561189651489258, -0.09738397598266602, 9.939809799194336, 0.2921518385410309, 9.554195404052734] + }, + { + type: 'L', + params: [9.537135124206543, 0.4173326790332794] + }, + { + type: 'C', + params: [10.099465370178223, -0.13911089301109314, 11.014374732971191, -0.13911089301109314, 11.577703475952148, 0.4173326790332794] + }, + { + type: 'C', + params: [12.140033721923828, 0.9737762212753296, 12.140033721923828, 1.8768731355667114, 11.577703475952148, 2.433316707611084] + }, + { + type: 'L', + params: [3.6691277027130127, 10.250499725341797] + }, + { + type: 'L', + params: [11.577703475952148, 18.065683364868164] + }, + { + type: 'C', + params: [12.140033721923828, 18.623125076293945, 12.140033721923828, 19.526222229003906, 11.577703475952148, 20.082666397094727] + }, + { + type: 'C', + params: [11.014374732971191, 20.639110565185547, 10.099465370178223, 20.639110565185547, 9.537135124206543, 20.082666397094727] + } + ], + fillRule: 'evenodd', + fill: '#007AFF', + originX: 0, + originY: 0, + originW: 12, + originH: 20.5 + } + }, + { + uuid: '044b95ac-b3d8-3753-be94-f00b42f5e690', + name: 'Label', + x: 22.513333320617676, + y: 55, + w: 38, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'Back', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#007AFF', + opacity: 1 + } + }, + { + uuid: 'f467f75a-4fa9-74fe-0dd2-68f0f5571e27', + name: 'Title', + x: 110, + y: 55, + w: 156, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'Developer', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'center', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#000000', + opacity: 1 + } + }, + { + uuid: '0ef0b9c5-4a80-095c-73c5-37bbbc8c2ed3', + name: 'Rectangle', + x: 336, + y: 16.159997940063477, + w: 24.5, + h: 11.5, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [3.5894391536712646, 0] + }, + { + type: 'L', + params: [18.410560607910156, 0] + }, + { + type: 'C', + params: [19.658687591552734, 0, 20.111286163330078, 0.12995584309101105, 20.567583084106445, 0.37398576736450195] + }, + { + type: 'C', + params: [21.023880004882812, 0.618015706539154, 21.38198471069336, 0.9761196374893188, 21.626014709472656, 1.4324159622192383] + }, + { + type: 'C', + params: [21.870044708251953, 1.8887122869491577, 22, 2.341312885284424, 22, 3.5894391536712646] + }, + { + type: 'L', + params: [22, 7.910560607910156] + }, + { + type: 'C', + params: [22, 9.158686637878418, 21.870044708251953, 9.611288070678711, 21.626014709472656, 10.067584037780762] + }, + { + type: 'C', + params: [21.38198471069336, 10.523880004882812, 21.023880004882812, 10.881983757019043, 20.567583084106445, 11.12601375579834] + }, + { + type: 'C', + params: [20.111286163330078, 11.370043754577637, 19.658687591552734, 11.5, 18.410560607910156, 11.5] + }, + { + type: 'L', + params: [3.5894391536712646, 11.5] + }, + { + type: 'C', + params: [2.341312885284424, 11.5, 1.8887122869491577, 11.370043754577637, 1.4324159622192383, 11.12601375579834] + }, + { + type: 'C', + params: [0.9761196374893188, 10.881983757019043, 0.618015706539154, 10.523880004882812, 0.37398576736450195, 10.067584037780762] + }, + { + type: 'C', + params: [0.12995584309101105, 9.611288070678711, 0, 9.158686637878418, 0, 7.910560607910156] + }, + { + type: 'L', + params: [0, 3.5894391536712646] + }, + { + type: 'C', + params: [0, 2.341312885284424, 0.12995584309101105, 1.8887122869491577, 0.37398576736450195, 1.4324159622192383] + }, + { + type: 'C', + params: [0.618015706539154, 0.9761196374893188, 0.9761196374893188, 0.618015706539154, 1.4324159622192383, 0.37398576736450195] + }, + { + type: 'C', + params: [1.8887122869491577, 0.12995584309101105, 2.341312885284424, 0, 3.5894391536712646, 0] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [3.5894391536712646, 1] + }, + { + type: 'C', + params: [2.6024606227874756, 1, 2.257904052734375, 1.0665369033813477, 1.9040148258209229, 1.2557989358901978] + }, + { + type: 'C', + params: [1.621986985206604, 1.4066290855407715, 1.4066290855407715, 1.621986985206604, 1.2557989358901978, 1.9040148258209229] + }, + { + type: 'C', + params: [1.0665369033813477, 2.257904052734375, 1, 2.6024606227874756, 1, 3.5894391536712646] + }, + { + type: 'L', + params: [1, 7.910560607910156] + }, + { + type: 'C', + params: [1, 8.897539138793945, 1.0665369033813477, 9.242095947265625, 1.2557989358901978, 9.595985412597656] + }, + { + type: 'C', + params: [1.4066290855407715, 9.878013610839844, 1.621986985206604, 10.09337043762207, 1.9040148258209229, 10.244200706481934] + }, + { + type: 'C', + params: [2.257904052734375, 10.433463096618652, 2.6024606227874756, 10.5, 3.5894391536712646, 10.5] + }, + { + type: 'L', + params: [18.410560607910156, 10.5] + }, + { + type: 'C', + params: [19.397539138793945, 10.5, 19.742095947265625, 10.433463096618652, 20.095985412597656, 10.244200706481934] + }, + { + type: 'C', + params: [20.378013610839844, 10.09337043762207, 20.593372344970703, 9.878013610839844, 20.74420166015625, 9.595985412597656] + }, + { + type: 'C', + params: [20.93346405029297, 9.242095947265625, 21, 8.897539138793945, 21, 7.910560607910156] + }, + { + type: 'L', + params: [21, 3.5894391536712646] + }, + { + type: 'C', + params: [21, 2.6024606227874756, 20.93346405029297, 2.257904052734375, 20.74420166015625, 1.9040148258209229] + }, + { + type: 'C', + params: [20.593372344970703, 1.621986985206604, 20.378013610839844, 1.4066290855407715, 20.095985412597656, 1.2557989358901978] + }, + { + type: 'C', + params: [19.742095947265625, 1.0665369033813477, 19.397539138793945, 1, 18.410560607910156, 1] + }, + { + type: 'L', + params: [3.5894391536712646, 1] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [24.5, 5.69000244140625] + }, + { + type: 'C', + params: [24.5, 6.92657470703125, 23, 7.69000244140625, 23, 7.69000244140625] + }, + { + type: 'L', + params: [23, 3.69000244140625] + }, + { + type: 'C', + params: [23, 3.69000244140625, 24.5, 4.45343017578125, 24.5, 5.69000244140625] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#0000005C', + originX: 0, + originY: 0, + originW: 24.5, + originH: 11.5 + } + }, + { + uuid: 'ddc0823d-5e18-a180-8391-ecf4aa8ccb02', + name: 'Rectangle', + x: 338, + y: 18.076664686203003, + w: 18, + h: 7.666666507720947, + angle: 0, + type: 'rect', + detail: { + background: '#000000', + borderRadius: 1.600000023841858, + borderDash: [], + boxSizing: 'center-line', + borderColor: 'transparent', + borderWidth: 0, + opacity: 1 + } + }, + { + uuid: '16283223-40c3-dc22-040a-cf6d3b9caf17', + name: 'Combined Shape', + x: 293.5, + y: 16.600000381469727, + w: 17.099990844726562, + h: 10.700004577636719, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [14.123048782348633, 0.9658917188644409] + }, + { + type: 'C', + params: [14.099990844726562, 1.0818103551864624, 14.099990844726562, 1.2212064266204834, 14.099990844726562, 1.4999985694885254] + }, + { + type: 'L', + params: [14.099990844726562, 9.199999809265137] + }, + { + type: 'C', + params: [14.099990844726562, 9.478793144226074, 14.099990844726562, 9.618189811706543, 14.123048782348633, 9.734107971191406] + }, + { + type: 'C', + params: [14.21773624420166, 10.210136413574219, 14.58985424041748, 10.582254409790039, 15.065882682800293, 10.676941871643066] + }, + { + type: 'C', + params: [15.181800842285156, 10.699999809265137, 15.321197509765625, 10.699999809265137, 15.599990844726562, 10.699999809265137] + }, + { + type: 'C', + params: [15.8787841796875, 10.699999809265137, 16.01818084716797, 10.699999809265137, 16.13409996032715, 10.676941871643066] + }, + { + type: 'C', + params: [16.61012840270996, 10.582254409790039, 16.98224449157715, 10.210136413574219, 17.076932907104492, 9.734107971191406] + }, + { + type: 'C', + params: [17.099990844726562, 9.618189811706543, 17.099990844726562, 9.478793144226074, 17.099990844726562, 9.200000762939453] + }, + { + type: 'L', + params: [17.099990844726562, 1.4999998807907104] + }, + { + type: 'C', + params: [17.099990844726562, 1.2212069034576416, 17.099990844726562, 1.0818103551864624, 17.076932907104492, 0.9658917188644409] + }, + { + type: 'C', + params: [16.98224449157715, 0.48986291885375977, 16.61012840270996, 0.11774563789367676, 16.13409996032715, 0.02305765077471733] + }, + { + type: 'C', + params: [16.01818084716797, 0, 15.8787841796875, 0, 15.599990844726562, 0] + }, + { + type: 'C', + params: [15.321197509765625, 0, 15.181800842285156, 0, 15.065882682800293, 0.02305765077471733] + }, + { + type: 'C', + params: [14.58985424041748, 0.11774563789367676, 14.21773624420166, 0.48986291885375977, 14.123048782348633, 0.9658917188644409] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [9.399993896484375, 3.9000015258789062] + }, + { + type: 'C', + params: [9.399993896484375, 3.621208429336548, 9.399993896484375, 3.481812000274658, 9.423051834106445, 3.3658933639526367] + }, + { + type: 'C', + params: [9.517739295959473, 2.889864444732666, 9.889857292175293, 2.517747163772583, 10.365885734558105, 2.4230592250823975] + }, + { + type: 'C', + params: [10.481803894042969, 2.4000015258789062, 10.621200561523438, 2.4000015258789062, 10.899993896484375, 2.4000015258789062] + }, + { + type: 'C', + params: [11.178787231445312, 2.4000015258789062, 11.318183898925781, 2.4000015258789062, 11.434102058410645, 2.4230592250823975] + }, + { + type: 'C', + params: [11.910130500793457, 2.517747163772583, 12.282248497009277, 2.889864444732666, 12.376935958862305, 3.3658933639526367] + }, + { + type: 'C', + params: [12.399993896484375, 3.481812000274658, 12.399993896484375, 3.621208429336548, 12.399993896484375, 3.900001287460327] + }, + { + type: 'L', + params: [12.399993896484375, 9.200004577636719] + }, + { + type: 'C', + params: [12.399993896484375, 9.478797912597656, 12.399993896484375, 9.618194580078125, 12.376935958862305, 9.734112739562988] + }, + { + type: 'C', + params: [12.282248497009277, 10.2101411819458, 11.910130500793457, 10.582259178161621, 11.434102058410645, 10.676946640014648] + }, + { + type: 'C', + params: [11.318183898925781, 10.700004577636719, 11.178787231445312, 10.700004577636719, 10.899993896484375, 10.700004577636719] + }, + { + type: 'C', + params: [10.621200561523438, 10.700004577636719, 10.481803894042969, 10.700004577636719, 10.365885734558105, 10.676946640014648] + }, + { + type: 'C', + params: [9.889857292175293, 10.582259178161621, 9.517739295959473, 10.2101411819458, 9.423051834106445, 9.734112739562988] + }, + { + type: 'C', + params: [9.399993896484375, 9.618194580078125, 9.399993896484375, 9.478797912597656, 9.399993896484375, 9.200004577636719] + }, + { + type: 'L', + params: [9.399993896484375, 3.9000015258789062] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [4.823045253753662, 5.665896415710449] + }, + { + type: 'C', + params: [4.79998779296875, 5.781815052032471, 4.79998779296875, 5.9212117195129395, 4.79998779296875, 6.200004577636719] + }, + { + type: 'L', + params: [4.79998779296875, 9.200004577636719] + }, + { + type: 'C', + params: [4.79998779296875, 9.478797912597656, 4.79998779296875, 9.618194580078125, 4.823045253753662, 9.734112739562988] + }, + { + type: 'C', + params: [4.917733192443848, 10.2101411819458, 5.28985071182251, 10.582259178161621, 5.7658796310424805, 10.676946640014648] + }, + { + type: 'C', + params: [5.881798267364502, 10.700004577636719, 6.021194934844971, 10.700004577636719, 6.29998779296875, 10.700004577636719] + }, + { + type: 'C', + params: [6.578780651092529, 10.700004577636719, 6.718177318572998, 10.700004577636719, 6.8340959548950195, 10.676946640014648] + }, + { + type: 'C', + params: [7.31012487411499, 10.582259178161621, 7.682242393493652, 10.2101411819458, 7.776930332183838, 9.734112739562988] + }, + { + type: 'C', + params: [7.79998779296875, 9.618194580078125, 7.79998779296875, 9.478797912597656, 7.79998779296875, 9.200004577636719] + }, + { + type: 'L', + params: [7.79998779296875, 6.200004577636719] + }, + { + type: 'C', + params: [7.79998779296875, 5.921211242675781, 7.79998779296875, 5.781815052032471, 7.776930332183838, 5.665896415710449] + }, + { + type: 'C', + params: [7.682242393493652, 5.1898674964904785, 7.31012487411499, 4.817749977111816, 6.8340959548950195, 4.723062038421631] + }, + { + type: 'C', + params: [6.718177318572998, 4.700004577636719, 6.578780651092529, 4.700004577636719, 6.29998779296875, 4.700004577636719] + }, + { + type: 'C', + params: [6.021194934844971, 4.700004577636719, 5.881798267364502, 4.700004577636719, 5.7658796310424805, 4.723062038421631] + }, + { + type: 'C', + params: [5.28985071182251, 4.817749977111816, 4.917733192443848, 5.1898674964904785, 4.823045253753662, 5.665896415710449] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [0.02305765077471733, 7.665896415710449] + }, + { + type: 'C', + params: [0, 7.781815052032471, 0, 7.9212117195129395, 0, 8.200004577636719] + }, + { + type: 'L', + params: [0, 9.200004577636719] + }, + { + type: 'C', + params: [0, 9.478797912597656, 0, 9.618194580078125, 0.02305765077471733, 9.734112739562988] + }, + { + type: 'C', + params: [0.11774563789367676, 10.2101411819458, 0.48986291885375977, 10.582259178161621, 0.9658917188644409, 10.676946640014648] + }, + { + type: 'C', + params: [1.0818103551864624, 10.700004577636719, 1.2212069034576416, 10.700004577636719, 1.5, 10.700004577636719] + }, + { + type: 'C', + params: [1.7787930965423584, 10.700004577636719, 1.9181896448135376, 10.700004577636719, 2.0341081619262695, 10.676946640014648] + }, + { + type: 'C', + params: [2.5101370811462402, 10.582259178161621, 2.8822543621063232, 10.2101411819458, 2.976942300796509, 9.734112739562988] + }, + { + type: 'C', + params: [3, 9.618194580078125, 3, 9.478797912597656, 3, 9.200004577636719] + }, + { + type: 'L', + params: [3, 8.200004577636719] + }, + { + type: 'C', + params: [3, 7.921211242675781, 3, 7.781815052032471, 2.976942300796509, 7.665896415710449] + }, + { + type: 'C', + params: [2.8822543621063232, 7.1898674964904785, 2.5101370811462402, 6.817749977111816, 2.0341081619262695, 6.723062038421631] + }, + { + type: 'C', + params: [1.9181896448135376, 6.700004577636719, 1.7787930965423584, 6.700004577636719, 1.5, 6.700004577636719] + }, + { + type: 'C', + params: [1.2212069034576416, 6.700004577636719, 1.0818103551864624, 6.700004577636719, 0.9658917188644409, 6.723062038421631] + }, + { + type: 'C', + params: [0.48986291885375977, 6.817749977111816, 0.11774563789367676, 7.1898674964904785, 0.02305765077471733, 7.665896415710449] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#000000', + originX: 0, + originY: 0, + originW: 17.099990844726562, + originH: 10.700004577636719 + } + }, + { + uuid: '115da672-be3d-9b7b-624c-a30bccf5dae0', + name: 'Wi-Fi', + x: 315.6000061035156, + y: 16.399999618530273, + w: 15.399999618530273, + h: 11.057209968566895, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [7.7004241943359375, 2.296360492706299] + }, + { + type: 'C', + params: [9.934831619262695, 2.2964582443237305, 12.08380126953125, 3.1550111770629883, 13.703171730041504, 4.694569110870361] + }, + { + type: 'C', + params: [13.825112342834473, 4.8134284019470215, 14.020017623901367, 4.811929225921631, 14.14012336730957, 4.691207408905029] + }, + { + type: 'L', + params: [15.30578327178955, 3.514791965484619] + }, + { + type: 'C', + params: [15.366597175598145, 3.453561544418335, 15.400498390197754, 3.3706233501434326, 15.399993896484375, 3.2843270301818848] + }, + { + type: 'C', + params: [15.399489402770996, 3.1980319023132324, 15.36462116241455, 3.115494966506958, 15.303091049194336, 3.054981231689453] + }, + { + type: 'C', + params: [11.052766799926758, -1.0183271169662476, 4.347395896911621, -1.0183271169662476, 0.09707161784172058, 3.054981231689453] + }, + { + type: 'C', + params: [0.03550135716795921, 3.115450382232666, 0.0005718813044950366, 3.1979622840881348, 0.000007201545031421119, 3.284257411956787] + }, + { + type: 'C', + params: [-0.0005675617721863091, 3.370553731918335, 0.03328297287225723, 3.453517198562622, 0.09404654800891876, 3.514791965484619] + }, + { + type: 'L', + params: [1.260049819946289, 4.691207408905029] + }, + { + type: 'C', + params: [1.3800644874572754, 4.8121113777160645, 1.5751309394836426, 4.81361198425293, 1.6970009803771973, 4.694569110870361] + }, + { + type: 'C', + params: [3.316573143005371, 3.1549103260040283, 5.465795040130615, 2.2963552474975586, 7.7004241943359375, 2.296360492706299] + }, + { + type: 'L', + params: [7.7004241943359375, 2.296360492706299] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [7.700424671173096, 6.123746871948242] + }, + { + type: 'C', + params: [8.928089141845703, 6.123671054840088, 10.111939430236816, 6.579985618591309, 11.021951675415039, 7.404024124145508] + }, + { + type: 'C', + params: [11.145031929016113, 7.520973205566406, 11.33891773223877, 7.518438339233398, 11.458902359008789, 7.398309707641602] + }, + { + type: 'L', + params: [12.623222351074219, 6.221892833709717] + }, + { + type: 'C', + params: [12.684530258178711, 6.160186767578125, 12.718552589416504, 6.07647705078125, 12.71767520904541, 5.989490985870361] + }, + { + type: 'C', + params: [12.716787338256836, 5.902505397796631, 12.681071281433105, 5.819504261016846, 12.618513107299805, 5.75905704498291] + }, + { + type: 'C', + params: [9.847347259521484, 3.181312322616577, 5.555840969085693, 3.181312322616577, 2.7846851348876953, 5.75905704498291] + }, + { + type: 'C', + params: [2.7220864295959473, 5.819504261016846, 2.686370372772217, 5.902546405792236, 2.685553789138794, 5.989560604095459] + }, + { + type: 'C', + params: [2.6847267150878906, 6.076573371887207, 2.718869686126709, 6.160276412963867, 2.780308961868286, 6.221892833709717] + }, + { + type: 'L', + params: [3.9442954063415527, 7.398309707641602] + }, + { + type: 'C', + params: [4.064269542694092, 7.518438339233398, 4.258166790008545, 7.520973205566406, 4.381246566772461, 7.404024124145508] + }, + { + type: 'C', + params: [5.290653228759766, 6.580530166625977, 6.473567008972168, 6.124255180358887, 7.700424671173096, 6.123746871948242] + }, + { + type: 'L', + params: [7.700424671173096, 6.123746871948242] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [9.937968254089355, 8.931347846984863] + }, + { + type: 'C', + params: [10.00023365020752, 8.870235443115234, 10.034527778625488, 8.78613567352295, 10.032743453979492, 8.698905944824219] + }, + { + type: 'C', + params: [10.03095817565918, 8.611676216125488, 9.993266105651855, 8.529047966003418, 9.928549766540527, 8.470528602600098] + }, + { + type: 'C', + params: [8.64232063293457, 7.382628440856934, 6.758518218994141, 7.382628440856934, 5.472288608551025, 8.470528602600098] + }, + { + type: 'C', + params: [5.40753173828125, 8.529001235961914, 5.369769096374512, 8.611603736877441, 5.367923736572266, 8.698833465576172] + }, + { + type: 'C', + params: [5.3660783767700195, 8.786064147949219, 5.4003119468688965, 8.870189666748047, 5.46253776550293, 8.931347846984863] + }, + { + type: 'L', + params: [7.476902008056641, 10.963858604431152] + }, + { + type: 'C', + params: [7.535941123962402, 11.023592948913574, 7.616427898406982, 11.057209968566895, 7.7004241943359375, 11.057209968566895] + }, + { + type: 'C', + params: [7.784409999847412, 11.057209968566895, 7.86489725112915, 11.023592948913574, 7.923936367034912, 10.963858604431152] + }, + { + type: 'L', + params: [9.937968254089355, 8.931347846984863] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#000000', + originX: 0, + originY: 0, + originW: 15.399999618530273, + originH: 11.057209968566895 + } + }, + { + uuid: '71e02f04-8453-a31b-410e-fe3d41cef2f5', + name: 'Time', + x: 20, + y: 13, + w: 54, + h: 18, + angle: 0, + type: 'text', + detail: { + text: '9:41', + fontFamily: 'SF Pro Text', + fontSize: 15, + textAlign: 'center', + verticalAlign: 'top', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1 + } + }, + { + uuid: '94f89146-38e6-0572-7965-b98e02f9d39f', + name: 'Oval', + x: 348, + y: 47, + w: 12, + h: 12, + angle: 0, + type: 'circle', + detail: { + background: '#FFFFFF', + radius: 12 + } + }, + { + uuid: '88bfb95e-3c01-da61-6db5-64ced8ff86bb', + name: 'Oval', + x: 349, + y: 48, + w: 10, + h: 10, + angle: 0, + type: 'circle', + detail: { + radius: 10, + background: '#4CD964' + } + }, + { + uuid: '0f84fa9c-f6e1-5d88-aa7a-46df0a1bbf22', + name: 'BG', + x: 1.8189894035458565e-12, + y: 521, + w: 375, + h: 291, + angle: 0, + type: 'rect', + detail: { + background: '#D2D5DBF0' + } + }, + { + uuid: 'c1031ef5-2b6d-d53e-71dd-6356aa574870', + name: '123', + x: 3, + y: 690, + w: 88, + h: 42, + angle: 0, + type: 'text', + detail: { + text: '123', + fontFamily: 'SF Pro Text', + fontSize: 16, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#C6CCD2', + borderRadius: 5, + borderDash: [], + boxSizing: 'center-line', + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '13494459-b332-944b-4afa-2082cc254b6a', + name: 'Space', + x: 96, + y: 690, + w: 185, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'space', + fontFamily: 'SF Pro Text', + fontSize: 16, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 5, + borderDash: [], + boxSizing: 'center-line', + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '013d1c53-5062-ca3f-5de7-577cad9c5dcc', + name: 'Label', + x: 285, + y: 690, + w: 87, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'Label', + fontFamily: 'SF Pro Text', + fontSize: 16, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#C6CCD2', + borderRadius: 5, + borderDash: [], + boxSizing: 'center-line', + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'a5a9b0a7-ba68-4c79-06ea-42aa4578c867', + name: 'Emoji Glyph', + x: 25, + y: 761, + w: 27, + h: 27, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [27, 13.5] + }, + { + type: 'C', + params: [27, 6.044156074523926, 20.95584487915039, 0, 13.5, 0] + }, + { + type: 'C', + params: [6.044156074523926, 0, 0, 6.044156074523926, 0, 13.5] + }, + { + type: 'C', + params: [0, 20.95584487915039, 6.044156074523926, 27, 13.5, 27] + }, + { + type: 'C', + params: [20.95584487915039, 27, 27, 20.95584487915039, 27, 13.5] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [25.425899505615234, 13.500900268554688] + }, + { + type: 'C', + params: [25.4263973236084, 6.913837909698486, 20.08706283569336, 1.573495626449585, 13.5, 1.5727499723434448] + }, + { + type: 'C', + params: [10.336490631103516, 1.5724815130233765, 7.302452564239502, 2.8289694786071777, 5.065386772155762, 5.065782070159912] + }, + { + type: 'C', + params: [2.8283209800720215, 7.3025946617126465, 1.5714895725250244, 10.3364896774292, 1.5714000463485718, 13.5] + }, + { + type: 'C', + params: [1.5714000463485718, 20.08706283569336, 6.911137580871582, 25.427001953125, 13.498199462890625, 25.427249908447266] + }, + { + type: 'C', + params: [20.085262298583984, 25.42749786376953, 25.425403594970703, 20.087963104248047, 25.425899505615234, 13.500900268554688] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [9.22927474975586, 7.644374847412109] + }, + { + type: 'C', + params: [8.812005043029785, 7.639403343200684, 8.41016960144043, 7.8019700050354, 8.113734245300293, 8.095678329467773] + }, + { + type: 'C', + params: [7.81729793548584, 8.389386177062988, 7.6510233879089355, 8.789702415466309, 7.652137756347656, 9.206999778747559] + }, + { + type: 'C', + params: [7.652137756347656, 10.078028678894043, 8.358245849609375, 10.784137725830078, 9.22927474975586, 10.784137725830078] + }, + { + type: 'C', + params: [10.100303649902344, 10.784137725830078, 10.806412696838379, 10.078028678894043, 10.806412696838379, 9.206999778747559] + }, + { + type: 'C', + params: [10.807526588439941, 8.789702415466309, 10.641252517700195, 8.389386177062988, 10.344816207885742, 8.095678329467773] + }, + { + type: 'C', + params: [10.048380851745605, 7.8019700050354, 9.646544456481934, 7.639403343200684, 9.22927474975586, 7.644374847412109] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [16.66383934020996, 8.095658302307129] + }, + { + type: 'C', + params: [16.960329055786133, 7.801960468292236, 17.362197875976562, 7.639404296875, 17.779499053955078, 7.644374847412109] + }, + { + type: 'C', + params: [18.196741104125977, 7.639495372772217, 18.59852409362793, 7.802091598510742, 18.894939422607422, 8.095780372619629] + }, + { + type: 'C', + params: [19.191354751586914, 8.3894681930542, 19.35765838623047, 8.789730072021484, 19.35663604736328, 9.206999778747559] + }, + { + type: 'C', + params: [19.364959716796875, 9.776016235351562, 19.066162109375, 10.30540657043457, 18.574718475341797, 10.592344284057617] + }, + { + type: 'C', + params: [18.083276748657227, 10.879281997680664, 17.475383758544922, 10.879281997680664, 16.98394203186035, 10.592344284057617] + }, + { + type: 'C', + params: [16.49250030517578, 10.30540657043457, 16.193700790405273, 9.776016235351562, 16.202024459838867, 9.206999778747559] + }, + { + type: 'C', + params: [16.201000213623047, 8.789670944213867, 16.36734962463379, 8.38935661315918, 16.66383934020996, 8.095658302307129] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [22.496736526489258, 15.825374603271484] + }, + { + type: 'C', + params: [21.777862548828125, 19.709999084472656, 18.028575897216797, 22.9533748626709, 13.498311996459961, 22.9533748626709] + }, + { + type: 'C', + params: [9.004161834716797, 22.9533748626709, 5.276812553405762, 19.75724983215332, 4.515749931335449, 15.916500091552734] + }, + { + type: 'C', + params: [4.361512184143066, 14.958000183105469, 5.1465373039245605, 14.731874465942383, 5.88599967956543, 14.910749435424805] + }, + { + type: 'C', + params: [8.359728813171387, 15.62601375579834, 10.925119400024414, 15.973978996276855, 13.5, 15.943499565124512] + }, + { + type: 'C', + params: [16.069059371948242, 15.973286628723145, 18.628620147705078, 15.626477241516113, 21.097124099731445, 14.914124488830566] + }, + { + type: 'C', + params: [21.81599998474121, 14.731874465942383, 22.58583641052246, 14.937749862670898, 22.496736526489258, 15.825374603271484] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [20.02881622314453, 16.375595092773438] + }, + { + type: 'C', + params: [20.037986755371094, 16.37228775024414, 20.047138214111328, 16.368886947631836, 20.0562744140625, 16.365373611450195] + }, + { + type: 'C', + params: [21.304012298583984, 15.916499137878418, 21.15146255493164, 17.246248245239258, 20.37993621826172, 17.742374420166016] + }, + { + type: 'C', + params: [18.749475479125977, 18.575998306274414, 16.2810001373291, 19.220624923706055, 13.510799407958984, 19.220624923706055] + }, + { + type: 'C', + params: [11.18195915222168, 19.247617721557617, 8.87575626373291, 18.761348724365234, 6.756074905395508, 17.79637336730957] + }, + { + type: 'C', + params: [5.927512168884277, 17.371124267578125, 5.701387405395508, 15.983999252319336, 6.880274772644043, 16.334999084472656] + }, + { + type: 'C', + params: [8.506349563598633, 16.918874740600586, 10.869187355041504, 17.212499618530273, 13.511137008666992, 17.212499618530273] + }, + { + type: 'C', + params: [15.712106704711914, 17.238019943237305, 17.90581512451172, 16.956317901611328, 20.02881622314453, 16.375595092773438] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [20.059860229492188, 16.367080688476562] + }, + { + type: 'C', + params: [20.04313087463379, 16.372207641601562, 19.995996475219727, 16.387399673461914, 19.949907302856445, 16.40225601196289] + }, + { + type: 'C', + params: [19.89385986328125, 16.420324325561523, 19.839359283447266, 16.43789291381836, 19.842975616455078, 16.436248779296875] + }, + { + type: 'C', + params: [19.865192413330078, 16.42894744873047, 19.887344360351562, 16.421968460083008, 19.909421920776367, 16.41501235961914] + }, + { + type: 'C', + params: [19.949485778808594, 16.40239143371582, 19.989303588867188, 16.389848709106445, 20.02881622314453, 16.375595092773438] + }, + { + type: 'C', + params: [20.039167404174805, 16.37276268005371, 20.049510955810547, 16.36992645263672, 20.059860229492188, 16.367080688476562] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [20.059860229492188, 16.367080688476562] + }, + { + type: 'C', + params: [20.064559936523438, 16.36564064025879, 20.06686019897461, 16.364994049072266, 20.066062927246094, 16.365373611450195] + }, + { + type: 'C', + params: [20.063995361328125, 16.365942001342773, 20.061927795410156, 16.366512298583984, 20.059860229492188, 16.367080688476562] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#50555C', + originX: 0, + originY: 0, + originW: 27, + originH: 27 + } + }, + { + uuid: 'c0062177-8e8d-1dbb-12a2-c59019f1d45f', + name: 'Dictation Glyph', + x: 330, + y: 762, + w: 15, + h: 25, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [11.99333381652832, 11.878632545471191] + }, + { + type: 'C', + params: [11.99333381652832, 12.382018089294434, 11.99333381652832, 12.912074089050293, 11.966667175292969, 13.415459632873535] + }, + { + type: 'C', + params: [11.946197509765625, 13.869404792785645, 11.876909255981445, 14.319826126098633, 11.760001182556152, 14.758933067321777] + }, + { + type: 'C', + params: [11.49913215637207, 15.680591583251953, 10.942858695983887, 16.491077423095703, 10.176668167114258, 17.065839767456055] + }, + { + type: 'C', + params: [8.605131149291992, 18.305910110473633, 6.388207912445068, 18.305910110473633, 4.8166704177856445, 17.065839767456055] + }, + { + type: 'C', + params: [4.048486709594727, 16.492856979370117, 3.491525888442993, 15.681710243225098, 3.232671022415161, 14.758933067321777] + }, + { + type: 'C', + params: [3.1152260303497314, 14.319950103759766, 3.0460386276245117, 13.869458198547363, 3.0263378620147705, 13.415459632873535] + }, + { + type: 'C', + params: [2.999582529067993, 12.951037406921387, 2.999781370162964, 12.463913917541504, 2.9999725818634033, 11.995977401733398] + }, + { + type: 'L', + params: [3.000004529953003, 11.878632545471191] + }, + { + type: 'L', + params: [3.000004529953003, 7.664860725402832] + }, + { + type: 'L', + params: [3.0004079341888428, 6.985935211181641] + }, + { + type: 'L', + params: [3.00040864944458, 6.985437393188477] + }, + { + type: 'C', + params: [3.0010342597961426, 6.134744644165039, 3.001974105834961, 4.85697078704834, 3.000004529953003, 4.58120584487915] + }, + { + type: 'C', + params: [3.013178825378418, 4.124529838562012, 3.0917561054229736, 3.672102212905884, 3.233337640762329, 3.2377326488494873] + }, + { + type: 'C', + params: [3.766977310180664, 1.323840618133545, 5.510300159454346, 0, 7.497002601623535, 0] + }, + { + type: 'C', + params: [9.483705520629883, 0, 11.227028846740723, 1.323840618133545, 11.76066780090332, 3.2377326488494873] + }, + { + type: 'C', + params: [11.885985374450684, 3.6759867668151855, 11.964204788208008, 4.126358509063721, 11.994000434875488, 4.58120584487915] + }, + { + type: 'C', + params: [12.016161918640137, 4.953053951263428, 12.00558090209961, 6.185329437255859, 11.998538970947266, 7.005504131317139] + }, + { + type: 'L', + params: [11.998538970947266, 7.005604267120361] + }, + { + type: 'C', + params: [11.996047973632812, 7.295687675476074, 11.994000434875488, 7.534209251403809, 11.994000434875488, 7.664860725402832] + }, + { + type: 'L', + params: [11.994000434875488, 11.878632545471191] + }, + { + type: 'L', + params: [11.99333381652832, 11.878632545471191] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [11.466668128967285, 24.999345779418945] + }, + { + type: 'L', + params: [11.466668128967285, 25] + }, + { + type: 'L', + params: [3.5300042629241943, 25] + }, + { + type: 'L', + params: [3.5300042629241943, 24.999469757080078] + }, + { + type: 'C', + params: [3.520047664642334, 24.99982261657715, 3.5100467205047607, 25, 3.500004291534424, 25] + }, + { + type: 'C', + params: [3.039767265319824, 25, 2.6666712760925293, 24.62686538696289, 2.6666712760925293, 24.166580200195312] + }, + { + type: 'C', + params: [2.6666712760925293, 23.706295013427734, 3.039767265319824, 23.333160400390625, 3.500004291534424, 23.333160400390625] + }, + { + type: 'C', + params: [3.5100467205047607, 23.333160400390625, 3.520047664642334, 23.333337783813477, 3.5300042629241943, 23.333690643310547] + }, + { + type: 'L', + params: [3.5300042629241943, 23.323158264160156] + }, + { + type: 'L', + params: [6.676669597625732, 23.323158264160156] + }, + { + type: 'L', + params: [6.676669597625732, 20.789562225341797] + }, + { + type: 'C', + params: [2.8672707080841064, 20.346805572509766, -0.004632009193301201, 17.1175479888916, 0.000005608663741440978, 13.282112121582031] + }, + { + type: 'C', + params: [0.000005608663741440978, 13.262168884277344, 0.0016816698480397463, 13.24321174621582, 0.003317970549687743, 13.22470474243164] + }, + { + type: 'C', + params: [0.004690391011536121, 13.209181785583496, 0.0060348412953317165, 13.193974494934082, 0.006338939536362886, 13.178768157958984] + }, + { + type: 'L', + params: [0.006338939536362886, 11.268485069274902] + }, + { + type: 'C', + params: [0.002158499788492918, 11.234651565551758, 0.000005608663741440978, 11.200189590454102, 0.000005608663741440978, 11.1652250289917] + }, + { + type: 'C', + params: [0.000005608663741440978, 10.704939842224121, 0.37310150265693665, 10.331805229187012, 0.8333386182785034, 10.331805229187012] + }, + { + type: 'C', + params: [1.2935757637023926, 10.331805229187012, 1.666671633720398, 10.704939842224121, 1.666671633720398, 11.1652250289917] + }, + { + type: 'C', + params: [1.666671633720398, 11.19295597076416, 1.6653175354003906, 11.220369338989258, 1.662671685218811, 11.247405052185059] + }, + { + type: 'L', + params: [1.662671685218811, 13.542140007019043] + }, + { + type: 'L', + params: [1.6583383083343506, 13.542140007019043] + }, + { + type: 'L', + params: [1.6583383083343506, 13.548807144165039] + }, + { + type: 'C', + params: [1.6583383083343506, 13.564460754394531, 1.6594271659851074, 13.580114364624023, 1.6605160236358643, 13.595767974853516] + }, + { + type: 'C', + params: [1.661514163017273, 13.61011791229248, 1.6625123023986816, 13.624466896057129, 1.662671685218811, 13.638816833496094] + }, + { + type: 'L', + params: [1.662671685218811, 13.95218276977539] + }, + { + type: 'L', + params: [1.6783382892608643, 13.95218276977539] + }, + { + type: 'C', + params: [1.9260369539260864, 16.91619300842285, 4.3514204025268555, 19.22639274597168, 7.32366943359375, 19.329410552978516] + }, + { + type: 'L', + params: [7.660336017608643, 19.329410552978516] + }, + { + type: 'C', + params: [10.633536338806152, 19.228090286254883, 13.06025218963623, 16.91716766357422, 13.307000160217285, 13.95218276977539] + }, + { + type: 'L', + params: [13.327000617980957, 13.95218276977539] + }, + { + type: 'L', + params: [13.327000617980957, 11.175226211547852] + }, + { + type: 'L', + params: [13.333392143249512, 11.175182342529297] + }, + { + type: 'L', + params: [13.333333969116211, 11.1652250289917] + }, + { + type: 'C', + params: [13.333333969116211, 10.704939842224121, 13.706429481506348, 10.331805229187012, 14.166666984558105, 10.331805229187012] + }, + { + type: 'C', + params: [14.626904487609863, 10.331805229187012, 15, 10.704939842224121, 15, 11.1652250289917] + }, + { + type: 'C', + params: [15, 11.189215660095215, 14.99898624420166, 11.212968826293945, 14.996999740600586, 11.236444473266602] + }, + { + type: 'L', + params: [14.996999740600586, 13.282112121582031] + }, + { + type: 'L', + params: [14.987000465393066, 13.282112121582031] + }, + { + type: 'L', + params: [14.986666679382324, 13.282112121582031] + }, + { + type: 'C', + params: [14.989282608032227, 17.110748291015625, 12.127965927124023, 20.336153030395508, 8.326668739318848, 20.789562225341797] + }, + { + type: 'L', + params: [8.326668739318848, 23.323158264160156] + }, + { + type: 'L', + params: [11.466668128967285, 23.323158264160156] + }, + { + type: 'L', + params: [11.466668128967285, 23.33381462097168] + }, + { + type: 'C', + params: [11.4777250289917, 23.3333797454834, 11.488837242126465, 23.333160400390625, 11.500000953674316, 23.333160400390625] + }, + { + type: 'C', + params: [11.960238456726074, 23.333160400390625, 12.333333969116211, 23.706295013427734, 12.333333969116211, 24.166580200195312] + }, + { + type: 'C', + params: [12.333333969116211, 24.62686538696289, 11.960238456726074, 25, 11.500000953674316, 25] + }, + { + type: 'C', + params: [11.488837242126465, 25, 11.4777250289917, 24.999780654907227, 11.466668128967285, 24.999345779418945] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [10.335037231445312, 7.842906951904297] + }, + { + type: 'C', + params: [10.331318855285645, 9.16012191772461, 10.326667785644531, 10.808087348937988, 10.326667785644531, 12.66538143157959] + }, + { + type: 'C', + params: [10.326667785644531, 12.985414505004883, 10.320001602172852, 13.092093467712402, 10.30000114440918, 13.412126541137695] + }, + { + type: 'C', + params: [10.288498878479004, 13.702738761901855, 10.244900703430176, 13.991188049316406, 10.170001983642578, 14.272215843200684] + }, + { + type: 'C', + params: [10.010360717773438, 14.862264633178711, 9.662817001342773, 15.384218215942383, 9.180002212524414, 15.759037017822266] + }, + { + type: 'C', + params: [8.190726280212402, 16.52801513671875, 6.805946350097656, 16.52801513671875, 5.8166704177856445, 15.759037017822266] + }, + { + type: 'C', + params: [5.3319830894470215, 15.385318756103516, 4.9830756187438965, 14.86307430267334, 4.823337078094482, 14.272215843200684] + }, + { + type: 'C', + params: [4.750053405761719, 13.990853309631348, 4.706481456756592, 13.702580451965332, 4.693337440490723, 13.412126541137695] + }, + { + type: 'C', + params: [4.676670551300049, 13.092093467712402, 4.673336982727051, 12.985414505004883, 4.673336982727051, 12.66538143157959] + }, + { + type: 'C', + params: [4.673336982727051, 11.134665489196777, 4.670953273773193, 9.74063491821289, 4.668929100036621, 8.556816101074219] + }, + { + type: 'C', + params: [4.6650896072387695, 6.311642646789551, 4.662543296813965, 4.822580337524414, 4.680003643035889, 4.591207027435303] + }, + { + type: 'C', + params: [4.699285984039307, 4.300482749938965, 4.747297763824463, 4.012381553649902, 4.823337078094482, 3.7311177253723145] + }, + { + type: 'C', + params: [4.9830756187438965, 3.1402587890625, 5.3319830894470215, 2.618013858795166, 5.8166704177856445, 2.244295835494995] + }, + { + type: 'C', + params: [6.805946350097656, 1.4753178358078003, 8.190726280212402, 1.4753178358078003, 9.180002212524414, 2.244295835494995] + }, + { + type: 'C', + params: [9.662817001342773, 2.619114398956299, 10.010360717773438, 3.141068935394287, 10.170001983642578, 3.7311177253723145] + }, + { + type: 'C', + params: [10.254679679870605, 4.011086463928223, 10.308335304260254, 4.299514293670654, 10.330001831054688, 4.591207027435303] + }, + { + type: 'C', + params: [10.34359073638916, 4.812527656555176, 10.340221405029297, 6.006163597106934, 10.335037231445312, 7.842906951904297] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#50555C', + originX: 0, + originY: 0, + originW: 15, + originH: 25 + } + }, + { + uuid: '1c58b323-5095-b513-8b8f-6b287d187fec', + name: 'P', + x: 340, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'P', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '473f4cb0-6908-c895-df09-65d83f8615a2', + name: 'O', + x: 303, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'O', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'a63019ce-e5c6-ef48-b76e-84650eca4765', + name: 'I', + x: 265, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'I', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '87d6f5c5-5e20-6d5a-4173-30c09ce54db5', + name: 'U', + x: 228, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'U', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '9ac60452-3ae5-4062-d482-99a60370d48f', + name: 'Y', + x: 190, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'Y', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'bc04ac5d-416a-defe-7328-a99a40dfe258', + name: 'T', + x: 153, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'T', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '5c83262f-e642-c4c5-df82-9050262174b8', + name: 'R', + x: 115, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'R', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '4c6b8990-df1a-afa9-2ae9-c534b6263961', + name: 'E', + x: 78, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'E', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '8fe073c8-c3f6-35c4-c69d-f114c7c6c67d', + name: 'W', + x: 40, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'W', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '46beb67c-8efc-dbc3-265c-1540b50d1c84', + name: 'Q', + x: 3, + y: 530, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'Q', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'e3c9ea22-fc56-4e2e-fca2-5cf292a2e374', + name: 'L', + x: 322, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'L', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '31e7fe43-421f-6f57-cb56-2025de73febf', + name: 'K', + x: 284, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'K', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '0f9eb83f-11d4-35da-602e-f3717b707c09', + name: 'J', + x: 247, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'J', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '1cd61976-8d5d-4604-3ba8-7b004a1497fa', + name: 'H', + x: 209, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'H', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'f9aad779-1b59-c88c-1f3f-c8bda2d34423', + name: 'G', + x: 172, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'G', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'f7036d21-8877-41b1-4a2a-fadd009a77d6', + name: 'F', + x: 134, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'F', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'e110cb3e-411a-a0ce-992b-3e8386790f2a', + name: 'D', + x: 96, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'D', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '9d55c0bc-f768-36fa-af79-ce0e80eef19f', + name: 'S', + x: 59, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'S', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'efef679f-91a3-96bd-ebb0-89014a7fe291', + name: 'A', + x: 21, + y: 584, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'A', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#191919', + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '989d1b25-c6ef-e834-3c84-9f19d298d011', + name: 'M', + x: 284, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'M', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '9108c0a9-2128-5b4c-bab2-cf13edffdeb5', + name: 'N', + x: 247, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'N', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '7117aa9c-cb45-082d-fba8-f0d229be936a', + name: 'B', + x: 209, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'B', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '8125ba47-aeec-7349-a0a5-37f3c53d1d81', + name: 'V', + x: 172, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'V', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '16a84249-1e85-fd7a-7adc-a031319bded5', + name: 'C', + x: 134, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'C', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'e1c50ba2-297a-7a6e-6318-5aa4be8ceb0c', + name: 'X', + x: 97, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'X', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '3608fca8-a8c6-956c-f5fa-f1b66b612d63', + name: 'Z', + x: 59, + y: 638, + w: 32, + h: 42, + angle: 0, + type: 'text', + detail: { + text: 'Z', + fontFamily: 'SF Pro Display', + fontSize: 23, + textAlign: 'center', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + color: '#000000', + opacity: 1, + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'f80037f8-0c7f-0049-6c6d-cc9b8a1c5b1d', + name: 'BG', + x: 3, + y: 638, + w: 41, + h: 42, + angle: 0, + type: 'rect', + detail: { + background: '#FFFFFF', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: '173f9c8e-b051-cfd8-50a6-603e8dbd2bf4', + name: 'Vector', + x: 14, + y: 651, + w: 19.069454193115234, + h: 16.087444305419922, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [10.239265441894531, 0.2926830053329468] + }, + { + type: 'C', + params: [9.849772453308105, -0.09680959582328796, 9.219781875610352, -0.09831169247627258, 8.828786849975586, 0.2926830053329468] + }, + { + type: 'L', + params: [0.45010271668434143, 8.671367645263672] + }, + { + type: 'C', + params: [-0.3319747745990753, 9.453445434570312, -0.06771409511566162, 10.087444305419922, 1.0319384336471558, 10.087444305419922] + }, + { + type: 'L', + params: [5.034025192260742, 10.087444305419922] + }, + { + type: 'L', + params: [5.034025192260742, 15.09666633605957] + }, + { + type: 'C', + params: [5.034025192260742, 15.643857955932617, 5.480337142944336, 16.087444305419922, 6.0315704345703125, 16.087444305419922] + }, + { + type: 'L', + params: [13.036481857299805, 16.087444305419922] + }, + { + type: 'C', + params: [13.587410926818848, 16.087444305419922, 14.034025192260742, 15.636468887329102, 14.034025192260742, 15.09666633605957] + }, + { + type: 'L', + params: [14.034025192260742, 10.087444305419922] + }, + { + type: 'L', + params: [18.03611183166504, 10.087444305419922] + }, + { + type: 'C', + params: [19.139528274536133, 10.087444305419922, 19.400848388671875, 9.454268455505371, 18.617948532104492, 8.671367645263672] + }, + { + type: 'L', + params: [10.239265441894531, 0.2926830053329468] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#000000', + originX: 0, + originY: 0, + originW: 19.069454193115234, + originH: 16.087444305419922 + } + }, + { + uuid: '48a2b62a-6c5d-85be-2196-5325c0408887', + name: 'BG', + x: 330, + y: 638, + w: 42, + h: 42, + angle: 0, + type: 'rect', + detail: { + background: '#C6CCD2', + borderRadius: 4, + shadowColor: '#00000059', + shadowBlur: 0, + shadowOffsetX: 0, + shadowOffsetY: 1 + } + }, + { + uuid: 'ca954bc1-14fe-d4d1-50bf-a4c5d10379dc', + name: 'Back', + x: 340, + y: 651, + w: 22.87680435180664, + h: 17, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [0.436149001121521, 9.559345245361328] + }, + { + type: 'C', + params: [-0.14891082048416138, 8.974285125732422, -0.14184445142745972, 8.018648147583008, 0.436149001121521, 7.440654754638672] + }, + { + type: 'L', + params: [7.166719913482666, 0.7100849151611328] + }, + { + type: 'C', + params: [7.558889389038086, 0.3179156184196472, 8.325724601745605, 0, 8.884288787841797, 0] + }, + { + type: 'L', + params: [19.378902435302734, 0] + }, + { + type: 'C', + params: [21.310741424560547, 0, 22.87680435180664, 1.5688480138778687, 22.87680435180664, 3.501798629760742] + }, + { + type: 'L', + params: [22.87680435180664, 13.498201370239258] + }, + { + type: 'C', + params: [22.87680435180664, 15.432190895080566, 21.29989242553711, 17, 19.378902435302734, 17] + }, + { + type: 'L', + params: [8.884288787841797, 17] + }, + { + type: 'C', + params: [8.32787036895752, 17, 7.553974628448486, 16.677169799804688, 7.166719913482666, 16.289915084838867] + }, + { + type: 'L', + params: [0.436149001121521, 9.559345245361328] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [15.019468307495117, 8.477689743041992] + }, + { + type: 'L', + params: [17.843599319458008, 5.653558731079102] + }, + { + type: 'C', + params: [18.13690948486328, 5.360247611999512, 18.14078712463379, 4.881495475769043, 17.8478946685791, 4.588602066040039] + }, + { + type: 'C', + params: [17.552959442138672, 4.293666839599609, 17.078205108642578, 4.297631740570068, 16.782939910888672, 4.592897415161133] + }, + { + type: 'L', + params: [13.958806991577148, 7.417030334472656] + }, + { + type: 'L', + params: [11.134675979614258, 4.592897415161133] + }, + { + type: 'C', + params: [10.841364860534668, 4.299586296081543, 10.3626127243042, 4.295708656311035, 10.069719314575195, 4.588602066040039] + }, + { + type: 'C', + params: [9.774784088134766, 4.883537292480469, 9.778749465942383, 5.358293056488037, 10.074014663696289, 5.653558731079102] + }, + { + type: 'L', + params: [12.898147583007812, 8.477689743041992] + }, + { + type: 'L', + params: [10.074014663696289, 11.301822662353516] + }, + { + type: 'C', + params: [9.7807035446167, 11.595133781433105, 9.776825904846191, 12.073884010314941, 10.069719314575195, 12.366777420043945] + }, + { + type: 'C', + params: [10.364654541015625, 12.661712646484375, 10.839410781860352, 12.657747268676758, 11.134675979614258, 12.362482070922852] + }, + { + type: 'L', + params: [13.958806991577148, 9.538351058959961] + }, + { + type: 'L', + params: [16.782939910888672, 12.362482070922852] + }, + { + type: 'C', + params: [17.076250076293945, 12.655793190002441, 17.555002212524414, 12.65967082977295, 17.8478946685791, 12.366777420043945] + }, + { + type: 'C', + params: [18.14282989501953, 12.071842193603516, 18.138864517211914, 11.597087860107422, 17.843599319458008, 11.301822662353516] + }, + { + type: 'L', + params: [15.019468307495117, 8.477689743041992] + }, + { + type: 'Z', + params: [] + }, + { + type: 'M', + params: [2.086524486541748, 9.209718704223633] + }, + { + type: 'C', + params: [1.6945571899414062, 8.817750930786133, 1.695770025253296, 8.181035995483398, 2.086524486541748, 7.790281295776367] + }, + { + type: 'L', + params: [8.020050048828125, 1.8567543029785156] + }, + { + type: 'C', + params: [8.217080116271973, 1.6597241163253784, 8.602444648742676, 1.5, 8.870546340942383, 1.5] + }, + { + type: 'L', + params: [19.37404441833496, 1.5] + }, + { + type: 'C', + params: [20.480138778686523, 1.5, 21.37680435180664, 2.3970608711242676, 21.37680435180664, 3.505859375] + }, + { + type: 'L', + params: [21.37680435180664, 13.494140625] + }, + { + type: 'C', + params: [21.37680435180664, 14.601945877075195, 20.483261108398438, 15.5, 19.37404441833496, 15.5] + }, + { + type: 'L', + params: [8.870546340942383, 15.5] + }, + { + type: 'C', + params: [8.597860336303711, 15.5, 8.217448234558105, 15.340642929077148, 8.020050048828125, 15.143245697021484] + }, + { + type: 'L', + params: [2.086524486541748, 9.209718704223633] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#000000', + originX: 0, + originY: 0, + originW: 22.87680435180664, + originH: 17 + } + }, + { + uuid: '7f6d424a-d072-a6ca-9af5-21be86723fc2', + name: 'Field', + x: 47, + y: 477, + w: 316, + h: 36, + angle: 0, + type: 'rect', + detail: { + background: '#FAFAFA', + borderRadius: 17, + borderDash: [], + boxSizing: 'border-box', + borderColor: '#0000000F', + borderWidth: 1, + opacity: 1 + } + }, + { + uuid: 'fe71b4dc-db59-e5b8-b6c3-d2ee19c7b4e3', + name: 'Field', + x: 47, + y: 477, + w: 316, + h: 36, + angle: 0, + type: 'rect', + detail: { + background: '#FAFAFA', + borderRadius: 17, + borderDash: [], + boxSizing: 'border-box', + borderColor: '#0000000F', + borderWidth: 1, + opacity: 1 + } + }, + { + uuid: '9d8d8808-2674-0031-0229-5f293c7a032d', + name: 'Text', + x: 59, + y: 483.99995040893555, + w: 168, + h: 22, + angle: 0, + type: 'text', + detail: { + text: 'Simple and easy to use', + fontFamily: 'SF Pro Text', + fontSize: 17, + textAlign: 'left', + verticalAlign: 'middle', + wordBreak: 'normal', + overflow: 'visible', + minInlineSize: 'auto', + lineHeight: 22, + color: '#000000', + opacity: 1 + } + }, + { + uuid: 'abd71bc0-9366-3f35-fece-1bcbdd7766b6', + name: 'Color', + x: 322, + y: 482, + w: 26, + h: 26, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [13, 26] + }, + { + type: 'C', + params: [20.179500579833984, 26, 26, 20.179500579833984, 26, 13] + }, + { + type: 'C', + params: [26, 5.820499897003174, 20.179500579833984, 0, 13, 0] + }, + { + type: 'C', + params: [5.820499897003174, 0, 0, 5.820499897003174, 0, 13] + }, + { + type: 'C', + params: [0, 20.179500579833984, 5.820499897003174, 26, 13, 26] + } + ], + fillRule: 'evenodd', + fill: '#007AFF', + originX: 0, + originY: 0, + originW: 26, + originH: 26 + } + }, + { + uuid: '3042105f-9400-146d-42d5-91d6ba500776', + name: 'Shape', + x: 329.5, + y: 488, + w: 11, + h: 14, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [10.7105131149292, 4.828426361083984] + }, + { + type: 'C', + params: [10.7105131149292, 4.828426361083984, 6.276906490325928, 0.3843449354171753, 6.239840507507324, 0.3415846824645996] + }, + { + type: 'C', + params: [6.059452056884766, 0.13275562226772308, 5.796034812927246, 0, 5.5, 0] + }, + { + type: 'C', + params: [5.1916093826293945, 0, 4.918802261352539, 0.1446887105703354, 4.7384138107299805, 0.3689313530921936] + }, + { + type: 'C', + params: [4.699864864349365, 0.41716092824935913, 0.28948667645454407, 4.828426361083984, 0.28948667645454407, 4.828426361083984] + }, + { + type: 'C', + params: [-0.09649556875228882, 5.21674919128418, -0.09649556875228882, 5.846716403961182, 0.28948667645454407, 6.234541893005371] + }, + { + type: 'C', + params: [0.675468921661377, 6.622864723205566, 1.3016399145126343, 6.622864723205566, 1.687127947807312, 6.234541893005371] + }, + { + type: 'L', + params: [4.511569023132324, 3.39347243309021] + }, + { + type: 'L', + params: [4.511569023132324, 13.000603675842285] + }, + { + type: 'C', + params: [4.511569023132324, 13.552509307861328, 4.954386234283447, 14, 5.5, 14] + }, + { + type: 'C', + params: [6.046108245849609, 14, 6.488430976867676, 13.552509307861328, 6.488430976867676, 13.000603675842285] + }, + { + type: 'L', + params: [6.488430976867676, 3.39347243309021] + }, + { + type: 'L', + params: [9.312871932983398, 6.234541893005371] + }, + { + type: 'C', + params: [9.698360443115234, 6.622864723205566, 10.324530601501465, 6.622864723205566, 10.7105131149292, 6.234541893005371] + }, + { + type: 'C', + params: [11.096495628356934, 5.846716403961182, 11.096495628356934, 5.21674919128418, 10.7105131149292, 4.828426361083984] + } + ], + fillRule: 'evenodd', + fill: '#FFFFFF', + originX: 0, + originY: 0, + originW: 11, + originH: 14 + } + }, + { + uuid: '7c0475dd-9840-2975-c142-c6f07f4d9049', + name: 'Circle', + x: 12, + y: 482, + w: 26, + h: 26, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [13, 26] + }, + { + type: 'C', + params: [20.179702758789062, 26, 26, 20.179702758789062, 26, 13] + }, + { + type: 'C', + params: [26, 5.820298194885254, 20.179702758789062, 0, 13, 0] + }, + { + type: 'C', + params: [5.820298194885254, 0, 0, 5.820298194885254, 0, 13] + }, + { + type: 'C', + params: [0, 20.179702758789062, 5.820298194885254, 26, 13, 26] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#4CD964', + originX: 0, + originY: 0, + originW: 26, + originH: 26 + } + }, + { + uuid: '98e4b2da-c57d-366b-03dc-6719f619bd4c', + name: 'Plus', + x: 17, + y: 487, + w: 16, + h: 16, + angle: 0, + type: 'path', + detail: { + commands: [ + { + type: 'M', + params: [9, 7] + }, + { + type: 'L', + params: [9, 1] + }, + { + type: 'C', + params: [9, 0.44771522283554077, 8.552285194396973, 0, 8, 0] + }, + { + type: 'C', + params: [7.4477152824401855, 0, 7, 0.44771522283554077, 7, 1] + }, + { + type: 'L', + params: [7, 7] + }, + { + type: 'L', + params: [1, 7] + }, + { + type: 'C', + params: [0.44771525263786316, 7, 0, 7.4477152824401855, 0, 8] + }, + { + type: 'C', + params: [0, 8.552285194396973, 0.44771525263786316, 9, 1, 9] + }, + { + type: 'L', + params: [7, 9] + }, + { + type: 'L', + params: [7, 15] + }, + { + type: 'C', + params: [7, 15.552285194396973, 7.4477152824401855, 16, 8, 16] + }, + { + type: 'C', + params: [8.552285194396973, 16, 9, 15.552285194396973, 9, 15] + }, + { + type: 'L', + params: [9, 9] + }, + { + type: 'L', + params: [15, 9] + }, + { + type: 'C', + params: [15.552285194396973, 9, 16, 8.552285194396973, 16, 8] + }, + { + type: 'C', + params: [16, 7.4477152824401855, 15.552285194396973, 7, 15, 7] + }, + { + type: 'L', + params: [9, 7] + }, + { + type: 'Z', + params: [] + } + ], + fillRule: 'evenodd', + fill: '#FFFFFF', + originX: 0, + originY: 0, + originW: 16, + originH: 16, + svg: '' + } + }, + { + uuid: '5b5c1359-4212-e9c2-b417-0e115770961c', + name: 'Line', + x: 120, + y: 799, + w: 135, + h: 5, + angle: 0, + type: 'rect', + detail: { + background: '#000000', + borderRadius: 100, + borderDash: [], + boxSizing: 'center-line', + opacity: 1 + } + } + ], + layout: { x: 0, y: 0, w: 375, h: 812, detail: { overflow: 'hidden', background: '#FFFFFF' }, operations: { position: 'relative' } }, + global: { + background: '#323232' + } +}; diff --git a/public/demo/advanced-data/import-map.json b/public/demo/advanced-data/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/advanced-data/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/advanced-data/index.css b/public/demo/advanced-data/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/advanced-data/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/advanced-data/index.html b/public/demo/advanced-data/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/advanced-data/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/advanced-data/index.js b/public/demo/advanced-data/index.js new file mode 100644 index 0000000..fe6db82 --- /dev/null +++ b/public/demo/advanced-data/index.js @@ -0,0 +1,12 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 500, + height: 600, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); diff --git a/public/demo/api-getImageBlobURL/data.js b/public/demo/api-getImageBlobURL/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/api-getImageBlobURL/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/api-getImageBlobURL/import-map.json b/public/demo/api-getImageBlobURL/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/api-getImageBlobURL/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/api-getImageBlobURL/index.css b/public/demo/api-getImageBlobURL/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/api-getImageBlobURL/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/api-getImageBlobURL/index.html b/public/demo/api-getImageBlobURL/index.html new file mode 100644 index 0000000..c121810 --- /dev/null +++ b/public/demo/api-getImageBlobURL/index.html @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/public/demo/api-getImageBlobURL/index.js b/public/demo/api-getImageBlobURL/index.js new file mode 100644 index 0000000..387c237 --- /dev/null +++ b/public/demo/api-getImageBlobURL/index.js @@ -0,0 +1,31 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.setMode('select'); + +const btn = document.querySelector('#btn-getImageBlobURL'); +const preview = document.querySelector('#box-preview'); + +btn.addEventListener('click', () => { + idraw + .getImageBlobURL({ devicePixelRatio: 1 }) + .then((res) => { + const { blobURL, width, height, devicePixelRatio } = res; + preview.innerHTML = ` +
${JSON.stringify(res, null, 2)}
+ + `; + }) + .catch((err) => { + console.error(err); + window.alert(JSON.stringify(err)); + }); +}); diff --git a/public/demo/custom-style-info/data.js b/public/demo/custom-style-info/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/custom-style-info/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/custom-style-info/import-map.json b/public/demo/custom-style-info/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/custom-style-info/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/custom-style-info/index.css b/public/demo/custom-style-info/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/custom-style-info/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/custom-style-info/index.html b/public/demo/custom-style-info/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/custom-style-info/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/custom-style-info/index.js b/public/demo/custom-style-info/index.js new file mode 100644 index 0000000..8471de0 --- /dev/null +++ b/public/demo/custom-style-info/index.js @@ -0,0 +1,19 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2, + styles: { + info: { + textBackground: '#9c27b0', + textColor: '#ffeb3b' + } + } +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); +idraw.selectElements([data.elements[1].uuid]); diff --git a/public/demo/custom-style-ruler/data.js b/public/demo/custom-style-ruler/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/custom-style-ruler/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/custom-style-ruler/import-map.json b/public/demo/custom-style-ruler/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/custom-style-ruler/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/custom-style-ruler/index.css b/public/demo/custom-style-ruler/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/custom-style-ruler/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/custom-style-ruler/index.html b/public/demo/custom-style-ruler/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/custom-style-ruler/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/custom-style-ruler/index.js b/public/demo/custom-style-ruler/index.js new file mode 100644 index 0000000..7bb9ab5 --- /dev/null +++ b/public/demo/custom-style-ruler/index.js @@ -0,0 +1,24 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2, + styles: { + ruler: { + background: '#0000FF1A', + borderColor: '#0000FF', + scaleColor: '#FF0000', + textColor: '#000000', + gridColor: '#0000FF1C', + gridPrimaryColor: '#0000FF6C', + selectedAreaColor: '#FF0000CC' + } + } +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); +idraw.selectElements([data.elements[1].uuid]); diff --git a/public/demo/custom-style-scroller/data.js b/public/demo/custom-style-scroller/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/custom-style-scroller/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/custom-style-scroller/import-map.json b/public/demo/custom-style-scroller/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/custom-style-scroller/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/custom-style-scroller/index.css b/public/demo/custom-style-scroller/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/custom-style-scroller/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/custom-style-scroller/index.html b/public/demo/custom-style-scroller/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/custom-style-scroller/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/custom-style-scroller/index.js b/public/demo/custom-style-scroller/index.js new file mode 100644 index 0000000..2cb00f8 --- /dev/null +++ b/public/demo/custom-style-scroller/index.js @@ -0,0 +1,23 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2, + styles: { + scroller: { + thumbBackground: '#FF00003A', + thumbBorderColor: '#FF00008A', + hoverThumbBackground: '#FF00006E', + hoverThumbBorderColor: '#FF0000E0', + activeThumbBackground: '#FF0000E0', + activeThumbBorderColor: '#FF0000F0' + } + } +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); +idraw.selectElements([data.elements[1].uuid]); diff --git a/public/demo/custom-style-selector/data.js b/public/demo/custom-style-selector/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/custom-style-selector/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/custom-style-selector/import-map.json b/public/demo/custom-style-selector/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/custom-style-selector/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/custom-style-selector/index.css b/public/demo/custom-style-selector/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/custom-style-selector/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/custom-style-selector/index.html b/public/demo/custom-style-selector/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/custom-style-selector/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/custom-style-selector/index.js b/public/demo/custom-style-selector/index.js new file mode 100644 index 0000000..1138a37 --- /dev/null +++ b/public/demo/custom-style-selector/index.js @@ -0,0 +1,21 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2, + styles: { + selector: { + activeColor: '#FF0000', + activeAreaColor: '#FF00001C', + lockedColor: '#009688', + referenceColor: '#9c27b0' + } + } +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); +idraw.selectElements([data.elements[1].uuid]); diff --git a/public/demo/feature-info/data.js b/public/demo/feature-info/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/feature-info/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/feature-info/import-map.json b/public/demo/feature-info/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/feature-info/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/feature-info/index.css b/public/demo/feature-info/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/feature-info/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/feature-info/index.html b/public/demo/feature-info/index.html new file mode 100644 index 0000000..b1ff06b --- /dev/null +++ b/public/demo/feature-info/index.html @@ -0,0 +1,4 @@ +
+
+ + diff --git a/public/demo/feature-info/index.js b/public/demo/feature-info/index.js new file mode 100644 index 0000000..b1af4cd --- /dev/null +++ b/public/demo/feature-info/index.js @@ -0,0 +1,23 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); +idraw.selectElement(data.elements[1].uuid); + +const btnEnable = document.querySelector('#btn-enable'); +const btnDisable = document.querySelector('#btn-disable'); + +btnEnable.addEventListener('click', () => { + idraw.enable('info'); +}); +btnDisable.addEventListener('click', () => { + idraw.disable('info'); +}); diff --git a/public/demo/feature-ruler/data.js b/public/demo/feature-ruler/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/feature-ruler/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/feature-ruler/import-map.json b/public/demo/feature-ruler/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/feature-ruler/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/feature-ruler/index.css b/public/demo/feature-ruler/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/feature-ruler/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/feature-ruler/index.html b/public/demo/feature-ruler/index.html new file mode 100644 index 0000000..b1ff06b --- /dev/null +++ b/public/demo/feature-ruler/index.html @@ -0,0 +1,4 @@ +
+
+ + diff --git a/public/demo/feature-ruler/index.js b/public/demo/feature-ruler/index.js new file mode 100644 index 0000000..40f5215 --- /dev/null +++ b/public/demo/feature-ruler/index.js @@ -0,0 +1,22 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); + +const btnEnable = document.querySelector('#btn-enable'); +const btnDisable = document.querySelector('#btn-disable'); + +btnEnable.addEventListener('click', () => { + idraw.enable('ruler'); +}); +btnDisable.addEventListener('click', () => { + idraw.disable('ruler'); +}); diff --git a/public/demo/feature-scroll/data.js b/public/demo/feature-scroll/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/feature-scroll/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/feature-scroll/import-map.json b/public/demo/feature-scroll/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/feature-scroll/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/feature-scroll/index.css b/public/demo/feature-scroll/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/feature-scroll/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/feature-scroll/index.html b/public/demo/feature-scroll/index.html new file mode 100644 index 0000000..b1ff06b --- /dev/null +++ b/public/demo/feature-scroll/index.html @@ -0,0 +1,4 @@ +
+
+ + diff --git a/public/demo/feature-scroll/index.js b/public/demo/feature-scroll/index.js new file mode 100644 index 0000000..696f689 --- /dev/null +++ b/public/demo/feature-scroll/index.js @@ -0,0 +1,22 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); + +const btnEnable = document.querySelector('#btn-enable'); +const btnDisable = document.querySelector('#btn-disable'); + +btnEnable.addEventListener('click', () => { + idraw.enable('scroll'); +}); +btnDisable.addEventListener('click', () => { + idraw.disable('scroll'); +}); diff --git a/public/demo/feature-selectInGroup/data.js b/public/demo/feature-selectInGroup/data.js new file mode 100644 index 0000000..4c27c16 --- /dev/null +++ b/public/demo/feature-selectInGroup/data.js @@ -0,0 +1,49 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 50, + y: 50, + w: 200, + h: 150, + type: 'group', + detail: { + background: '#d5f5f9', + borderWidth: 2, + borderColor: '#3f51b5', + children: [ + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 50, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 10, + borderWidth: 4, + borderColor: '#386a3a' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'circle-001', + x: 100, + y: 80, + w: 100, + h: 100, + angle: 0, + type: 'circle', + detail: { + background: '#ff9800' + } + } + ] + } + } + ] +}; diff --git a/public/demo/feature-selectInGroup/import-map.json b/public/demo/feature-selectInGroup/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/feature-selectInGroup/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/feature-selectInGroup/index.css b/public/demo/feature-selectInGroup/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/feature-selectInGroup/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/feature-selectInGroup/index.html b/public/demo/feature-selectInGroup/index.html new file mode 100644 index 0000000..b1ff06b --- /dev/null +++ b/public/demo/feature-selectInGroup/index.html @@ -0,0 +1,4 @@ +
+
+ + diff --git a/public/demo/feature-selectInGroup/index.js b/public/demo/feature-selectInGroup/index.js new file mode 100644 index 0000000..615e184 --- /dev/null +++ b/public/demo/feature-selectInGroup/index.js @@ -0,0 +1,22 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); + +const btnEnable = document.querySelector('#btn-enable'); +const btnDisable = document.querySelector('#btn-disable'); + +btnEnable.addEventListener('click', () => { + idraw.enable('selectInGroup'); +}); +btnDisable.addEventListener('click', () => { + idraw.disable('selectInGroup'); +}); diff --git a/public/demo/feature-snapToGrid/data.js b/public/demo/feature-snapToGrid/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/feature-snapToGrid/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/feature-snapToGrid/import-map.json b/public/demo/feature-snapToGrid/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/feature-snapToGrid/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/feature-snapToGrid/index.css b/public/demo/feature-snapToGrid/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/feature-snapToGrid/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/feature-snapToGrid/index.html b/public/demo/feature-snapToGrid/index.html new file mode 100644 index 0000000..b1ff06b --- /dev/null +++ b/public/demo/feature-snapToGrid/index.html @@ -0,0 +1,4 @@ +
+
+ + diff --git a/public/demo/feature-snapToGrid/index.js b/public/demo/feature-snapToGrid/index.js new file mode 100644 index 0000000..6d8f8bb --- /dev/null +++ b/public/demo/feature-snapToGrid/index.js @@ -0,0 +1,22 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.centerContent(); + +const btnEnable = document.querySelector('#btn-enable'); +const btnDisable = document.querySelector('#btn-disable'); + +btnEnable.addEventListener('click', () => { + idraw.enable('snapToGrid'); +}); +btnDisable.addEventListener('click', () => { + idraw.disable('snapToGrid'); +}); diff --git a/public/demo/mode-drag/data.js b/public/demo/mode-drag/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/mode-drag/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/mode-drag/import-map.json b/public/demo/mode-drag/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/mode-drag/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/mode-drag/index.css b/public/demo/mode-drag/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/mode-drag/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/mode-drag/index.html b/public/demo/mode-drag/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/mode-drag/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/mode-drag/index.js b/public/demo/mode-drag/index.js new file mode 100644 index 0000000..2981d9c --- /dev/null +++ b/public/demo/mode-drag/index.js @@ -0,0 +1,12 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.setMode('drag'); diff --git a/public/demo/mode-readOnly/data.js b/public/demo/mode-readOnly/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/mode-readOnly/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/mode-readOnly/import-map.json b/public/demo/mode-readOnly/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/mode-readOnly/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/mode-readOnly/index.css b/public/demo/mode-readOnly/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/mode-readOnly/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/mode-readOnly/index.html b/public/demo/mode-readOnly/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/mode-readOnly/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/mode-readOnly/index.js b/public/demo/mode-readOnly/index.js new file mode 100644 index 0000000..e3c5f7f --- /dev/null +++ b/public/demo/mode-readOnly/index.js @@ -0,0 +1,12 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.setMode('readOnly'); diff --git a/public/demo/mode-select/data.js b/public/demo/mode-select/data.js new file mode 100644 index 0000000..3061ce7 --- /dev/null +++ b/public/demo/mode-select/data.js @@ -0,0 +1,54 @@ +export default { + // background: '#f0f0f0', + elements: [ + { + uuid: '98e31597-b745-7d6f-4164-920b8a4e8f36', + name: 'rect-001', + x: 20, + y: 20, + w: 100, + h: 100, + type: 'rect', + detail: { + background: '#d5f5f9', + borderRadius: 20, + borderWidth: 10, + borderColor: '#3f51b5' + } + }, + { + uuid: '28774435-b994-1016-1c17-95912f719bab', + name: 'rect-002', + x: 140, + y: 100, + w: 200, + h: 200, + // angle: 30, + type: 'rect', + detail: { + background: '#8bc34a', + borderRadius: 20, + borderWidth: 10, + borderColor: '#009688' + } + }, + { + uuid: '44dbb2c1-3588-385c-6b46-327c6adb438a', + name: 'rect-004', + x: 400, + y: 250, + w: 200, + h: 200, + type: 'rect', + detail: { + background: '#ffeb3b', + borderRadius: 20, + borderWidth: 10, + borderColor: '#ff9800' + }, + operations: { + lock: true + } + } + ] +}; diff --git a/public/demo/mode-select/import-map.json b/public/demo/mode-select/import-map.json new file mode 100644 index 0000000..defa5a5 --- /dev/null +++ b/public/demo/mode-select/import-map.json @@ -0,0 +1,6 @@ +{ + "imports": { + "idraw": "./lib/idraw.esm.js", + "./data": "./demo/basic/data.js" + } +} \ No newline at end of file diff --git a/public/demo/mode-select/index.css b/public/demo/mode-select/index.css new file mode 100644 index 0000000..97efe3d --- /dev/null +++ b/public/demo/mode-select/index.css @@ -0,0 +1,12 @@ +html, +body { + margin: 0; + padding: 0; + height: 100%; + width: 100%; +} + +#app { + margin-top: 20px; + text-align: center; +} diff --git a/public/demo/mode-select/index.html b/public/demo/mode-select/index.html new file mode 100644 index 0000000..865e670 --- /dev/null +++ b/public/demo/mode-select/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/demo/mode-select/index.js b/public/demo/mode-select/index.js new file mode 100644 index 0000000..0c91506 --- /dev/null +++ b/public/demo/mode-select/index.js @@ -0,0 +1,12 @@ +import { iDraw } from 'idraw'; +import data from './data'; + +const app = document.querySelector('#app'); +const options = { + width: 320, + height: 320, + devicePixelRatio: 2 +}; +const idraw = new iDraw(app, options); +idraw.setData(data); +idraw.setMode('select'); diff --git a/public/lib/idraw/0.4.0-beta.30/index.global.js b/public/lib/idraw/0.4.0-beta.31/index.global.js similarity index 97% rename from public/lib/idraw/0.4.0-beta.30/index.global.js rename to public/lib/idraw/0.4.0-beta.31/index.global.js index f1fb75c..bba740f 100644 --- a/public/lib/idraw/0.4.0-beta.30/index.global.js +++ b/public/lib/idraw/0.4.0-beta.31/index.global.js @@ -5782,7 +5782,7 @@ var __privateMethod = (obj, member, method) => { const { data } = __classPrivateFieldGet$2(this, _Board_sharer, "f").getActiveStoreSnapshot(); return data; } - use(middleware) { + use(middleware, config) { var _a, _b, _c; if (__classPrivateFieldGet$2(this, _Board_middlewareMap, "f").has(middleware)) { const item = __classPrivateFieldGet$2(this, _Board_middlewareMap, "f").get(middleware); @@ -5799,13 +5799,14 @@ var __privateMethod = (obj, member, method) => { const viewer = __classPrivateFieldGet$2(this, _Board_viewer, "f"); const calculator = __classPrivateFieldGet$2(this, _Board_calculator, "f"); const eventHub = __classPrivateFieldGet$2(this, _Board_eventHub, "f"); - const obj = middleware({ boardContent, sharer, viewer, calculator, eventHub, container }); + const obj = middleware({ boardContent, sharer, viewer, calculator, eventHub, container }, config); (_c = obj.use) === null || _c === void 0 ? void 0 : _c.call(obj); __classPrivateFieldGet$2(this, _Board_middlewares, "f").push(middleware); __classPrivateFieldGet$2(this, _Board_activeMiddlewareObjs, "f").push(obj); __classPrivateFieldGet$2(this, _Board_middlewareMap, "f").set(middleware, { status: "enable", - middlewareObject: obj + middlewareObject: obj, + config }); __classPrivateFieldGet$2(this, _Board_instances, "m", _Board_resetActiveMiddlewareObjs).call(this); } @@ -6173,10 +6174,17 @@ var __privateMethod = (obj, member, method) => { const selectWrapperBorderWidth = 2; const resizeControllerBorderWidth = 4; const areaBorderWidth = 1; - const wrapperColor = "#1973ba"; - const lockColor = "#5b5959b5"; const controllerSize$1 = 10; + const activeColor = "#1973ba"; + const activeAreaColor = "#1976d21c"; + const lockedColor = "#5b5959b5"; const referenceColor = "#f7276e"; + const defaultStyle$2 = { + activeColor, + activeAreaColor, + lockedColor, + referenceColor + }; const middlewareEventSelect = "@middleware/select"; const middlewareEventSelectClear = "@middleware/select-clear"; const middlewareEventSelectInGroup = "@middleware/select-in-group"; @@ -6285,19 +6293,23 @@ var __privateMethod = (obj, member, method) => { if (!vertexes) { return; } - const wrapperOpts = { borderColor: wrapperColor, borderWidth: 1, background: "transparent", lineDash: [] }; + const { style } = opts; + const { activeColor: activeColor2 } = style; + const wrapperOpts = { borderColor: activeColor2, borderWidth: 1, background: "transparent", lineDash: [] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); } function drawLockVertexesWrapper(ctx, vertexes, opts) { if (!vertexes) { return; } - const wrapperOpts = { borderColor: lockColor, borderWidth: 1, background: "transparent", lineDash: [] }; + const { style } = opts; + const { lockedColor: lockedColor2 } = style; + const wrapperOpts = { borderColor: lockedColor2, borderWidth: 1, background: "transparent", lineDash: [] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); const { controller } = opts; if (controller) { const { topLeft, topRight, bottomLeft, bottomRight, topMiddle, bottomMiddle, leftMiddle, rightMiddle } = controller; - const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: 1, background: lockColor }); + const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: 1, background: lockedColor2 }); drawCrossVertexes(ctx, calcViewVertexes(topMiddle.vertexes, opts), ctrlOpts); drawCrossVertexes(ctx, calcViewVertexes(bottomMiddle.vertexes, opts), ctrlOpts); drawCrossVertexes(ctx, calcViewVertexes(leftMiddle.vertexes, opts), ctrlOpts); @@ -6312,9 +6324,10 @@ var __privateMethod = (obj, member, method) => { if (!controller) { return; } - const { hideControllers } = opts; + const { hideControllers, style } = opts; + const { activeColor: activeColor2 } = style; const { elementWrapper, topLeft, topRight, bottomLeft, bottomRight, top, rotate } = controller; - const wrapperOpts = { borderColor: wrapperColor, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [] }; + const wrapperOpts = { borderColor: activeColor2, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [] }; const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: resizeControllerBorderWidth, background: "#FFFFFF" }); drawVertexes(ctx, calcViewVertexes(elementWrapper, opts), wrapperOpts); if (!hideControllers) { @@ -6327,11 +6340,12 @@ var __privateMethod = (obj, member, method) => { } } function drawArea(ctx, opts) { - const { start, end } = opts; + const { start, end, style } = opts; + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2 } = style; ctx.setLineDash([]); ctx.lineWidth = areaBorderWidth; - ctx.strokeStyle = wrapperColor; - ctx.fillStyle = "#1976d24f"; + ctx.strokeStyle = activeColor2; + ctx.fillStyle = activeAreaColor2; ctx.beginPath(); ctx.moveTo(start.x, start.y); ctx.lineTo(end.x, start.y); @@ -6342,12 +6356,13 @@ var __privateMethod = (obj, member, method) => { ctx.fill(); } function drawListArea(ctx, opts) { - const { areaSize } = opts; + const { areaSize, style } = opts; + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2 } = style; const { x: x2, y: y2, w: w2, h: h2 } = areaSize; ctx.setLineDash([]); ctx.lineWidth = areaBorderWidth; - ctx.strokeStyle = wrapperColor; - ctx.fillStyle = "#1976d21c"; + ctx.strokeStyle = activeColor2; + ctx.fillStyle = activeAreaColor2; ctx.beginPath(); ctx.moveTo(x2, y2); ctx.lineTo(x2 + w2, y2); @@ -6358,16 +6373,19 @@ var __privateMethod = (obj, member, method) => { ctx.fill(); } function drawGroupQueueVertexesWrappers(ctx, vertexesList, opts) { + const { style } = opts; + const { activeColor: activeColor2 } = style; for (let i = 0; i < vertexesList.length; i++) { const vertexes = vertexesList[i]; - const wrapperOpts = { borderColor: wrapperColor, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [4, 4] }; + const wrapperOpts = { borderColor: activeColor2, borderWidth: selectWrapperBorderWidth, background: "transparent", lineDash: [4, 4] }; drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts); } } function drawReferenceLines(ctx, opts) { - const { xLines, yLines } = opts; + const { xLines, yLines, style } = opts; + const { referenceColor: referenceColor2 } = style; const lineOpts = { - borderColor: referenceColor, + borderColor: referenceColor2, borderWidth: 1, lineDash: [] }; @@ -8061,7 +8079,10 @@ var __privateMethod = (obj, member, method) => { } }; }; - const MiddlewareSelector = (opts) => { + const MiddlewareSelector = (opts, config) => { + const innerConfig = Object.assign(Object.assign({}, defaultStyle$2), config); + const { activeColor: activeColor2, activeAreaColor: activeAreaColor2, lockedColor: lockedColor2, referenceColor: referenceColor2 } = innerConfig; + const style = { activeColor: activeColor2, activeAreaColor: activeAreaColor2, lockedColor: lockedColor2, referenceColor: referenceColor2 }; const { viewer, sharer, boardContent, calculator, eventHub } = opts; const { overlayContext } = boardContent; let prevPoint = null; @@ -8626,7 +8647,7 @@ var __privateMethod = (obj, member, method) => { const groupQueueVertexesList = sharedStore[keyGroupQueueVertexesList]; const isMoving = sharedStore[keyIsMoving]; const enableSnapToGrid = sharedStore[keyEnableSnapToGrid]; - const drawBaseOpts = { calculator, viewScaleInfo, viewSizeInfo }; + const drawBaseOpts = { calculator, viewScaleInfo, viewSizeInfo, style }; const selectedElementController = elem ? calcElementSizeController(elem, { groupQueue, controllerSize: 10, @@ -8641,13 +8662,13 @@ var __privateMethod = (obj, member, method) => { groupQueue, controllerSize: 10, viewScaleInfo - }) })); + }), style })); } else { drawHoverVertexesWrapper(overlayContext, hoverElementVertexes, drawBaseOpts); } } if (!isLock && elem && ["select", "drag", "resize"].includes(actionType)) { - drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag" })); + drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag", style })); if (actionType === "drag") { if (enableSnapToGrid === true) { const referenceInfo = calcReferenceInfo(elem.uuid, { @@ -8662,7 +8683,8 @@ var __privateMethod = (obj, member, method) => { if (offsetX === 0 || offsetY === 0) { drawReferenceLines(overlayContext, { xLines, - yLines + yLines, + style }); } } @@ -8676,13 +8698,13 @@ var __privateMethod = (obj, member, method) => { groupQueue, controllerSize: 10, viewScaleInfo - }) })); + }), style })); } else { drawHoverVertexesWrapper(overlayContext, hoverElementVertexes, drawBaseOpts); } } if (!isLock && elem && ["select", "drag", "resize"].includes(actionType)) { - drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag" })); + drawSelectedElementControllersVertexes(overlayContext, selectedElementController, Object.assign(Object.assign({}, drawBaseOpts), { element: elem, calculator, hideControllers: !!isMoving && actionType === "drag", style })); if (actionType === "drag") { if (enableSnapToGrid === true) { const referenceInfo = calcReferenceInfo(elem.uuid, { @@ -8697,14 +8719,15 @@ var __privateMethod = (obj, member, method) => { if (offsetX === 0 || offsetY === 0) { drawReferenceLines(overlayContext, { xLines, - yLines + yLines, + style }); } } } } } else if (actionType === "area" && areaStart && areaEnd) { - drawArea(overlayContext, { start: areaStart, end: areaEnd }); + drawArea(overlayContext, { start: areaStart, end: areaEnd, style }); } else if (["drag-list", "drag-list-end"].includes(actionType)) { const listAreaSize = calcSelectedElementsArea(getActiveElements(), { viewScaleInfo: sharer2.getActiveViewScaleInfo(), @@ -8712,7 +8735,7 @@ var __privateMethod = (obj, member, method) => { calculator }); if (listAreaSize) { - drawListArea(overlayContext, { areaSize: listAreaSize }); + drawListArea(overlayContext, { areaSize: listAreaSize, style }); } } } @@ -8727,16 +8750,16 @@ var __privateMethod = (obj, member, method) => { const keyPrevPoint$1 = Symbol(`${key$1}_prevPoint`); const keyActivePoint = Symbol(`${key$1}_activePoint`); const keyActiveThumbType = Symbol(`${key$1}_activeThumbType`); - const minScrollerWidth = 12; - const scrollerLineWidth = 16; - const scrollerThumbAlpha = 0.3; - const scrollConfig = { - width: minScrollerWidth, - thumbColor: "#0000008A", - thumbHoverColor: "#000000EE", - scrollBarColor: "#FFFFFF60", - showScrollBar: false + const defaultStyle$1 = { + thumbBackground: "#0000003A", + thumbBorderColor: "#0000008A", + hoverThumbBackground: "#0000005F", + hoverThumbBorderColor: "#000000EE", + activeThumbBackground: "#0000005E", + activeThumbBorderColor: "#000000F0" }; + const scrollerLineWidth = 16; + const minThumbLength = scrollerLineWidth * 2.5; function isPointAtRect(overlayContext, p, rect) { const ctx = overlayContext; const { x: x2, y: y2, w: w2, h: h2 } = rect; @@ -8772,11 +8795,12 @@ var __privateMethod = (obj, member, method) => { return info; } function calcScrollerInfo(opts) { - const { viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb } = opts; + const { viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style } = opts; const { width, height } = viewSizeInfo; const { offsetTop, offsetBottom, offsetLeft, offsetRight } = viewScaleInfo; - const sliderMinSize = scrollerLineWidth * 2.5; + const sliderMinSize = minThumbLength; const lineSize2 = scrollerLineWidth; + const { thumbBackground, thumbBorderColor, hoverThumbBackground, hoverThumbBorderColor } = style; let xSize = 0; let ySize = 0; xSize = Math.max(sliderMinSize, width - lineSize2 * 2 - (Math.abs(offsetLeft) + Math.abs(offsetRight))); @@ -8827,23 +8851,24 @@ var __privateMethod = (obj, member, method) => { ySize, translateY, translateX, - xThumbColor: hoverXThumb ? scrollConfig.thumbHoverColor : scrollConfig.thumbColor, - yThumbColor: hoverYThumb ? scrollConfig.thumbHoverColor : scrollConfig.thumbColor, - scrollBarColor: scrollConfig.scrollBarColor, + xThumbBackground: hoverXThumb ? hoverThumbBackground : thumbBackground, + yThumbBackground: hoverYThumb ? hoverThumbBackground : thumbBackground, + xThumbBorderColor: hoverXThumb ? hoverThumbBorderColor : thumbBorderColor, + yThumbBorderColor: hoverYThumb ? hoverThumbBorderColor : thumbBorderColor, xThumbRect, yThumbRect }; return scrollWrapper; } function drawScrollerThumb(ctx, opts) { - let { x: x2, y: y2, h: h2, w: w2 } = opts; + let { x: x2, y: y2, h: h2, w: w2, background: background2, borderColor: borderColor2 } = opts; ctx.save(); ctx.shadowColor = "#FFFFFF"; ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.shadowBlur = 1; { - const { color: color2, axis } = opts; + const { axis } = opts; if (axis === "X") { y2 = y2 + h2 / 4 + 0; h2 = h2 / 2; @@ -8856,7 +8881,7 @@ var __privateMethod = (obj, member, method) => { if (w2 < r * 2 || h2 < r * 2) { r = 0; } - ctx.globalAlpha = scrollerThumbAlpha; + ctx.globalAlpha = 1; ctx.beginPath(); ctx.moveTo(x2 + r, y2); ctx.arcTo(x2 + w2, y2, x2 + w2, y2 + h2, r); @@ -8864,12 +8889,11 @@ var __privateMethod = (obj, member, method) => { ctx.arcTo(x2, y2 + h2, x2, y2, r); ctx.arcTo(x2, y2, x2 + w2, y2, r); ctx.closePath(); - ctx.fillStyle = color2; + ctx.fillStyle = background2; ctx.fill(); - ctx.globalAlpha = 1; ctx.beginPath(); ctx.lineWidth = 1; - ctx.strokeStyle = color2; + ctx.strokeStyle = borderColor2; ctx.setLineDash([]); ctx.moveTo(x2 + r, y2); ctx.arcTo(x2 + w2, y2, x2 + w2, y2 + h2, r); @@ -8883,9 +8907,9 @@ var __privateMethod = (obj, member, method) => { } function drawScrollerInfo(overlayContext, opts) { const ctx = overlayContext; - const { viewScaleInfo, viewSizeInfo, scrollInfo } = opts; + const { viewScaleInfo, viewSizeInfo, scrollInfo, style } = opts; const { activeThumbType, prevPoint, activePoint, hoverXThumb, hoverYThumb } = scrollInfo; - const wrapper = calcScrollerInfo({ viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb }); + const wrapper = calcScrollerInfo({ viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style }); let xThumbRect = Object.assign({}, wrapper.xThumbRect); let yThumbRect = Object.assign({}, wrapper.yThumbRect); if (activeThumbType && prevPoint && activePoint) { @@ -8897,28 +8921,37 @@ var __privateMethod = (obj, member, method) => { yThumbRect.y = yThumbRect.y + (activePoint.y - prevPoint.y); } } - drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "X" }, xThumbRect), { r: wrapper.lineSize / 2, color: wrapper.xThumbColor })); - drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "Y" }, yThumbRect), { r: wrapper.lineSize / 2, color: wrapper.yThumbColor })); - ctx.globalAlpha = 1; + drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "X" }, xThumbRect), { r: wrapper.lineSize / 2, background: wrapper.xThumbBackground, borderColor: wrapper.xThumbBorderColor })); + drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: "Y" }, yThumbRect), { r: wrapper.lineSize / 2, background: wrapper.yThumbBackground, borderColor: wrapper.yThumbBorderColor })); return { xThumbRect, yThumbRect }; } function drawScroller(ctx, opts) { - const { snapshot } = opts; + const { snapshot, style } = opts; const viewSizeInfo = getViewSizeInfoFromSnapshot(snapshot); const viewScaleInfo = getViewScaleInfoFromSnapshot(snapshot); const scrollInfo = getScrollInfoFromSnapshot(snapshot); - const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo }); + const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo, style }); return { xThumbRect, yThumbRect }; } - const MiddlewareScroller = (opts) => { + const MiddlewareScroller = (opts, config) => { const { viewer, boardContent, sharer, eventHub } = opts; const { overlayContext } = boardContent; sharer.setSharedStorage(keyXThumbRect, null); sharer.setSharedStorage(keyYThumbRect, null); let isBusy = false; + const innerConfig = Object.assign(Object.assign({}, defaultStyle$1), config); + const { thumbBackground, thumbBorderColor, hoverThumbBackground, hoverThumbBorderColor, activeThumbBackground, activeThumbBorderColor } = innerConfig; + const style = { + thumbBackground, + thumbBorderColor, + hoverThumbBackground, + hoverThumbBorderColor, + activeThumbBackground, + activeThumbBorderColor + }; const clear = () => { sharer.setSharedStorage(keyPrevPoint$1, null); sharer.setSharedStorage(keyActivePoint, null); @@ -9022,7 +9055,7 @@ var __privateMethod = (obj, member, method) => { } }, beforeDrawFrame({ snapshot }) { - const { xThumbRect, yThumbRect } = drawScroller(overlayContext, { snapshot }); + const { xThumbRect, yThumbRect } = drawScroller(overlayContext, { snapshot, style }); sharer.setSharedStorage(keyXThumbRect, xThumbRect); sharer.setSharedStorage(keyYThumbRect, yThumbRect); } @@ -9056,17 +9089,26 @@ var __privateMethod = (obj, member, method) => { }; }; const rulerSize = 16; + const fontSize = 10; + const fontWeight = 100; + const lineSize = 1; + const fontFamily$1 = "monospace"; const background = "#FFFFFFA8"; const borderColor = "#00000080"; const scaleColor = "#000000"; const textColor = "#00000080"; - const fontFamily$1 = "monospace"; - const fontSize = 10; - const fontWeight = 100; const gridColor = "#AAAAAA20"; - const gridKeyColor = "#AAAAAA40"; - const lineSize = 1; + const gridPrimaryColor = "#AAAAAA40"; const selectedAreaColor = "#196097"; + const defaultStyle = { + background, + borderColor, + scaleColor, + textColor, + gridColor, + gridPrimaryColor, + selectedAreaColor + }; const limitRulerUnitList = [1, 2, 5, 10, 20, 50, 100, 200, 500]; function limitRulerUnit(unit) { unit = Math.max(limitRulerUnitList[0], Math.min(unit, limitRulerUnitList[limitRulerUnitList.length - 1])); @@ -9143,7 +9185,8 @@ var __privateMethod = (obj, member, method) => { }); } function drawXRuler(ctx, opts) { - const { scaleList } = opts; + const { scaleList, style } = opts; + const { scaleColor: scaleColor2, textColor: textColor2 } = style; const scaleDrawStart = rulerSize; const scaleDrawEnd = rulerSize * 4 / 5; const subKeyScaleDrawEnd = rulerSize * 2 / 5; @@ -9160,10 +9203,10 @@ var __privateMethod = (obj, member, method) => { ctx.closePath(); ctx.lineWidth = lineSize; ctx.setLineDash([]); - ctx.fillStyle = scaleColor; + ctx.fillStyle = scaleColor2; ctx.stroke(); if (item.isKeyNum) { - ctx.fillStyle = textColor; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.$setFont({ fontWeight, @@ -9175,7 +9218,8 @@ var __privateMethod = (obj, member, method) => { } } function drawYRuler(ctx, opts) { - const { scaleList } = opts; + const { scaleList, style } = opts; + const { scaleColor: scaleColor2, textColor: textColor2 } = style; const scaleDrawStart = rulerSize; const scaleDrawEnd = rulerSize * 4 / 5; const subKeyScaleDrawEnd = rulerSize * 2 / 5; @@ -9190,7 +9234,7 @@ var __privateMethod = (obj, member, method) => { ctx.moveTo(scaleDrawStart, item.position); ctx.lineTo(item.isKeyNum ? keyScaleDrawEnd : item.isSubKeyNum ? subKeyScaleDrawEnd : scaleDrawEnd, item.position); ctx.closePath(); - ctx.fillStyle = scaleColor; + ctx.fillStyle = scaleColor2; ctx.lineWidth = lineSize; ctx.setLineDash([]); ctx.stroke(); @@ -9199,7 +9243,7 @@ var __privateMethod = (obj, member, method) => { const textY = item.position + fontStart; const numText = `${item.num}`; rotateByCenter(ctx, -90, { x: textX, y: textY }, () => { - ctx.fillStyle = textColor; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.$setFont({ fontWeight, @@ -9212,8 +9256,9 @@ var __privateMethod = (obj, member, method) => { } } function drawRulerBackground(ctx, opts) { - const { viewSizeInfo } = opts; + const { viewSizeInfo, style } = opts; const { width, height } = viewSizeInfo; + const { background: background2, borderColor: borderColor2 } = style; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(width + 1, 0); @@ -9223,25 +9268,26 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(0, height + 1); ctx.lineTo(0, 0); ctx.closePath(); - ctx.fillStyle = background; + ctx.fillStyle = background2; ctx.fill(); ctx.lineWidth = lineSize; ctx.setLineDash([]); - ctx.strokeStyle = borderColor; + ctx.strokeStyle = borderColor2; ctx.stroke(); } function drawGrid(ctx, opts) { - const { xList, yList, viewSizeInfo } = opts; + const { xList, yList, viewSizeInfo, style } = opts; const { width, height } = viewSizeInfo; + const { gridColor: gridColor2, gridPrimaryColor: gridPrimaryColor2 } = style; for (let i = 0; i < xList.length; i++) { const item = xList[i]; ctx.beginPath(); ctx.moveTo(item.position, 0); ctx.lineTo(item.position, height); if (item.isKeyNum === true || item.isSubKeyNum === true) { - ctx.strokeStyle = gridKeyColor; + ctx.strokeStyle = gridPrimaryColor2; } else { - ctx.strokeStyle = gridColor; + ctx.strokeStyle = gridColor2; } ctx.closePath(); ctx.lineWidth = lineSize; @@ -9254,9 +9300,9 @@ var __privateMethod = (obj, member, method) => { ctx.moveTo(0, item.position); ctx.lineTo(width, item.position); if (item.isKeyNum === true || item.isSubKeyNum === true) { - ctx.strokeStyle = gridKeyColor; + ctx.strokeStyle = gridPrimaryColor2; } else { - ctx.strokeStyle = gridColor; + ctx.strokeStyle = gridColor2; } ctx.lineWidth = 1; ctx.closePath(); @@ -9264,8 +9310,9 @@ var __privateMethod = (obj, member, method) => { } } function drawScrollerSelectedArea(ctx, opts) { - const { snapshot, calculator } = opts; + const { snapshot, calculator, style } = opts; const { sharedStore } = snapshot; + const { selectedAreaColor: selectedAreaColor2 } = style; const selectedElementList = sharedStore[keySelectedElementList]; const actionType = sharedStore[keyActionType]; if (["select", "drag", "drag-list", "drag-list-end"].includes(actionType) && selectedElementList.length > 0) { @@ -9302,7 +9349,7 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(xAreaEnd, 0); ctx.lineTo(xAreaEnd, rulerSize); ctx.lineTo(xAreaStart, rulerSize); - ctx.fillStyle = selectedAreaColor; + ctx.fillStyle = selectedAreaColor2; ctx.closePath(); ctx.fill(); ctx.beginPath(); @@ -9310,15 +9357,26 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(rulerSize, yAreaStart); ctx.lineTo(rulerSize, yAreaEnd); ctx.lineTo(0, yAreaEnd); - ctx.fillStyle = selectedAreaColor; + ctx.fillStyle = selectedAreaColor2; ctx.closePath(); ctx.fill(); } } const middlewareEventRuler = "@middleware/show-ruler"; - const MiddlewareRuler = (opts) => { + const MiddlewareRuler = (opts, config) => { const { boardContent, viewer, eventHub, calculator } = opts; const { overlayContext, underlayContext } = boardContent; + const innerConfig = Object.assign(Object.assign({}, defaultStyle), config); + const { background: background2, borderColor: borderColor2, scaleColor: scaleColor2, textColor: textColor2, gridColor: gridColor2, gridPrimaryColor: gridPrimaryColor2, selectedAreaColor: selectedAreaColor2 } = innerConfig; + const style = { + background: background2, + borderColor: borderColor2, + scaleColor: scaleColor2, + textColor: textColor2, + gridColor: gridColor2, + gridPrimaryColor: gridPrimaryColor2, + selectedAreaColor: selectedAreaColor2 + }; let show = true; let showGrid = true; const rulerCallback = (e) => { @@ -9344,19 +9402,20 @@ var __privateMethod = (obj, member, method) => { if (show === true) { const viewScaleInfo = getViewScaleInfoFromSnapshot(snapshot); const viewSizeInfo = getViewSizeInfoFromSnapshot(snapshot); - drawScrollerSelectedArea(overlayContext, { snapshot, calculator }); - drawRulerBackground(overlayContext, { viewScaleInfo, viewSizeInfo }); + drawScrollerSelectedArea(overlayContext, { snapshot, calculator, style }); + drawRulerBackground(overlayContext, { viewScaleInfo, viewSizeInfo, style }); const { list: xList, rulerUnit } = calcXRulerScaleList({ viewScaleInfo, viewSizeInfo }); - drawXRuler(overlayContext, { scaleList: xList }); + drawXRuler(overlayContext, { scaleList: xList, style }); const { list: yList } = calcYRulerScaleList({ viewScaleInfo, viewSizeInfo }); - drawYRuler(overlayContext, { scaleList: yList }); + drawYRuler(overlayContext, { scaleList: yList, style }); if (showGrid === true) { const ctx = rulerUnit === 1 ? overlayContext : underlayContext; drawGrid(ctx, { xList, yList, viewScaleInfo, - viewSizeInfo + viewSizeInfo, + style }); } } @@ -9408,7 +9467,8 @@ var __privateMethod = (obj, member, method) => { }; const fontFamily = "monospace"; function drawSizeInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textColor: textColor2, textBackground } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9430,7 +9490,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9438,13 +9498,14 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } function drawPositionInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textBackground, textColor: textColor2 } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9466,7 +9527,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9474,13 +9535,14 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } function drawAngleInfoText(ctx, opts) { - const { point, rotateCenter, angle: angle2, text: text2, color: color2, background: background2, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { point, rotateCenter, angle: angle2, text: text2, style, fontSize: fontSize2, lineHeight: lineHeight2 } = opts; + const { textBackground, textColor: textColor2 } = style; rotateByCenter(ctx, angle2, rotateCenter, () => { ctx.$setFont({ fontWeight: "300", @@ -9502,7 +9564,7 @@ var __privateMethod = (obj, member, method) => { y: point.y }; ctx.setLineDash([]); - ctx.fillStyle = background2; + ctx.fillStyle = textBackground; ctx.beginPath(); ctx.moveTo(bgStart.x, bgStart.y); ctx.lineTo(bgEnd.x, bgStart.y); @@ -9510,18 +9572,28 @@ var __privateMethod = (obj, member, method) => { ctx.lineTo(bgStart.x, bgEnd.y); ctx.closePath(); ctx.fill(); - ctx.fillStyle = color2; + ctx.fillStyle = textColor2; ctx.textBaseline = "top"; ctx.fillText(text2, textStart.x, textStart.y + padding); }); } const infoBackground = "#1973bac6"; const infoTextColor = "#ffffff"; + const defaltStyle = { + textBackground: infoBackground, + textColor: infoTextColor + }; const infoFontSize = 10; const infoLineHeight = 16; - const MiddlewareInfo = (opts) => { + const MiddlewareInfo = (opts, config) => { const { boardContent, calculator } = opts; const { overlayContext } = boardContent; + const innerConfig = Object.assign(Object.assign({}, defaltStyle), config); + const { textBackground, textColor: textColor2 } = innerConfig; + const style = { + textBackground, + textColor: textColor2 + }; return { name: "@middleware/info", beforeDrawFrame({ snapshot }) { @@ -9587,8 +9659,7 @@ var __privateMethod = (obj, member, method) => { text: whText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); drawPositionInfoText(overlayContext, { point: { @@ -9600,8 +9671,7 @@ var __privateMethod = (obj, member, method) => { text: xyText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); drawAngleInfoText(overlayContext, { point: { @@ -9613,8 +9683,7 @@ var __privateMethod = (obj, member, method) => { text: angleText, fontSize: infoFontSize, lineHeight: infoLineHeight, - color: infoTextColor, - background: infoBackground + style }); } } @@ -9675,8 +9744,8 @@ var __privateMethod = (obj, member, method) => { __classPrivateFieldGet(this, _Core_board, "f").destroy(); __classPrivateFieldGet(this, _Core_canvas, "f").remove(); } - use(middleware) { - __classPrivateFieldGet(this, _Core_board, "f").use(middleware); + use(middleware, config) { + __classPrivateFieldGet(this, _Core_board, "f").use(middleware, config); } disuse(middleware) { __classPrivateFieldGet(this, _Core_board, "f").disuse(middleware); @@ -9757,10 +9826,85 @@ var __privateMethod = (obj, member, method) => { enableSelect: false, enableTextEdit: false, enableDrag: false, - enableInfo: false + enableInfo: false, + middlewareStyles: { + selector: {}, + info: {}, + ruler: {}, + scroller: {} + } }; return storage; } + function parseStyles(opts) { + const styles = { + selector: {}, + ruler: {}, + info: {}, + scroller: {} + }; + if (opts.styles) { + const { selector, info, ruler, scroller } = opts.styles; + if (istype.string(selector == null ? void 0 : selector.activeColor)) { + styles.selector.activeColor = selector == null ? void 0 : selector.activeColor; + } + if (istype.string(selector == null ? void 0 : selector.activeAreaColor)) { + styles.selector.activeAreaColor = selector == null ? void 0 : selector.activeAreaColor; + } + if (istype.string(selector == null ? void 0 : selector.lockedColor)) { + styles.selector.lockedColor = selector == null ? void 0 : selector.lockedColor; + } + if (istype.string(selector == null ? void 0 : selector.referenceColor)) { + styles.selector.referenceColor = selector == null ? void 0 : selector.referenceColor; + } + if (istype.string(info == null ? void 0 : info.textBackground)) { + styles.info.textBackground = info == null ? void 0 : info.textBackground; + } + if (istype.string(info == null ? void 0 : info.textColor)) { + styles.info.textColor = info == null ? void 0 : info.textColor; + } + if (istype.string(ruler == null ? void 0 : ruler.background)) { + styles.ruler.background = ruler == null ? void 0 : ruler.background; + } + if (istype.string(ruler == null ? void 0 : ruler.borderColor)) { + styles.ruler.borderColor = ruler == null ? void 0 : ruler.borderColor; + } + if (istype.string(ruler == null ? void 0 : ruler.scaleColor)) { + styles.ruler.scaleColor = ruler == null ? void 0 : ruler.scaleColor; + } + if (istype.string(ruler == null ? void 0 : ruler.textColor)) { + styles.ruler.textColor = ruler == null ? void 0 : ruler.textColor; + } + if (istype.string(ruler == null ? void 0 : ruler.gridColor)) { + styles.ruler.gridColor = ruler == null ? void 0 : ruler.gridColor; + } + if (istype.string(ruler == null ? void 0 : ruler.gridPrimaryColor)) { + styles.ruler.gridPrimaryColor = ruler == null ? void 0 : ruler.gridPrimaryColor; + } + if (istype.string(ruler == null ? void 0 : ruler.selectedAreaColor)) { + styles.ruler.selectedAreaColor = ruler == null ? void 0 : ruler.selectedAreaColor; + } + if (istype.string(scroller == null ? void 0 : scroller.thumbBackground)) { + styles.scroller.thumbBackground = scroller == null ? void 0 : scroller.thumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.thumbBorderColor)) { + styles.scroller.thumbBorderColor = scroller == null ? void 0 : scroller.thumbBorderColor; + } + if (istype.string(scroller == null ? void 0 : scroller.hoverThumbBackground)) { + styles.scroller.hoverThumbBackground = scroller == null ? void 0 : scroller.hoverThumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.hoverThumbBorderColor)) { + styles.scroller.hoverThumbBorderColor = scroller == null ? void 0 : scroller.hoverThumbBorderColor; + } + if (istype.string(scroller == null ? void 0 : scroller.activeThumbBackground)) { + styles.scroller.activeThumbBackground = scroller == null ? void 0 : scroller.activeThumbBackground; + } + if (istype.string(scroller == null ? void 0 : scroller.activeThumbBorderColor)) { + styles.scroller.activeThumbBorderColor = scroller == null ? void 0 : scroller.activeThumbBorderColor; + } + } + return styles; + } async function exportImageFileBlobURL(opts) { const { data, width, height, devicePixelRatio, viewScaleInfo, viewSizeInfo, loadItemMap } = opts; let viewContext = createOffscreenContext2D({ width, height, devicePixelRatio }); @@ -9814,14 +9958,15 @@ var __privateMethod = (obj, member, method) => { } function runMiddlewares(core, store) { const { enableRuler, enableScale, enableScroll, enableSelect, enableTextEdit, enableDrag, enableInfo } = store.getSnapshot(); + const styles = store.get("middlewareStyles"); if (enableScroll === true) { - core.use(MiddlewareScroller); + core.use(MiddlewareScroller, styles == null ? void 0 : styles.scroller); } else if (enableScroll === false) { core.disuse(MiddlewareScroller); } if (enableSelect === true) { core.use(MiddlewareLayoutSelector); - core.use(MiddlewareSelector); + core.use(MiddlewareSelector, styles == null ? void 0 : styles.selector); } else if (enableSelect === false) { core.disuse(MiddlewareLayoutSelector); core.disuse(MiddlewareSelector); @@ -9832,7 +9977,7 @@ var __privateMethod = (obj, member, method) => { core.disuse(MiddlewareScaler); } if (enableRuler === true) { - core.use(MiddlewareRuler); + core.use(MiddlewareRuler, styles == null ? void 0 : styles.ruler); } else if (enableRuler === false) { core.disuse(MiddlewareRuler); } @@ -9847,7 +9992,7 @@ var __privateMethod = (obj, member, method) => { core.disuse(MiddlewareDragger); } if (enableInfo === true) { - core.use(MiddlewareInfo); + core.use(MiddlewareInfo, styles == null ? void 0 : styles.info); } else if (enableInfo === false) { core.disuse(MiddlewareInfo); } @@ -9908,6 +10053,7 @@ var __privateMethod = (obj, member, method) => { defaultStorage: getDefaultStorage() })); const opts = { ...defaultSettings, ...options }; + __privateGet(this, _store).set("middlewareStyles", parseStyles(opts)); const { width, height, devicePixelRatio, createCustomContext2D } = opts; const core = new Core(mount, { width, height, devicePixelRatio, createCustomContext2D }); __privateSet(this, _core, core); diff --git a/src/config.json b/src/config.json index 5442fbe..4a53e1b 100644 --- a/src/config.json +++ b/src/config.json @@ -1,3 +1,3 @@ { - "hash": "537c949afbcfa8cf624b4564b3" + "hash": "317ff967831c148761d96c825d" } \ No newline at end of file diff --git a/src/constant/demo-list.ts b/src/constant/demo-list.ts index d91a9ae..2e9f55a 100644 --- a/src/constant/demo-list.ts +++ b/src/constant/demo-list.ts @@ -11,12 +11,16 @@ type TypeDemoList = { const demoList: TypeDemoList = [ { - name: 'Quick Start', + name: 'Quick Started', list: [ { name: 'Basic', key: 'basic' }, + { + name: 'Advanced Data', + key: 'advanced-data' + }, { name: 'Options', key: 'basic-options' @@ -72,6 +76,69 @@ const demoList: TypeDemoList = [ } ] }, + { + name: 'Custom Styles', + list: [ + { + name: 'Selector Style', + key: 'custom-style-selector' + }, + { + name: 'Ruler Style', + key: 'custom-style-ruler' + }, + { + name: 'Scroller Style', + key: 'custom-style-scroller' + }, + { + name: 'Info Style', + key: 'custom-style-info' + } + ] + }, + { + name: 'Switching Mode', + list: [ + { + name: 'Select Mode', + key: 'mode-select' + }, + { + name: 'Drag Mode', + key: 'mode-drag' + }, + { + name: 'Read-Only Mode', + key: 'mode-readOnly' + } + ] + }, + { + name: 'Features', + list: [ + { + name: 'Ruler', + key: 'feature-ruler' + }, + { + name: 'Scroll', + key: 'feature-scroll' + }, + { + name: 'Info', + key: 'feature-info' + }, + { + name: 'Select In Group', + key: 'feature-selectInGroup' + }, + { + name: 'Snap To Grid', + key: 'feature-snapToGrid' + } + ] + }, { name: 'iDraw API', list: [ @@ -126,12 +193,12 @@ const demoList: TypeDemoList = [ { name: 'enable', key: 'api-enable' + }, + { + name: 'getImageBlobURL', + key: 'api-getImageBlobURL' } // { - // name: 'getSelectedElements', - // key: 'api-getSelectedElements', - // }, - // { // name: 'moveDownElement', // key: 'api-moveDownElement', // },