Socket
Socket
Sign inDemoInstall

monaco-editor-vue3

Package Overview
Dependencies
23
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.8 to 0.1.9

typings/monaco-editor.d.ts

20

CHANGELOG.md

@@ -1,20 +0,14 @@

## [0.1.7](https://github.com/bazingaedward/monaco-editor-vue3/compare/v0.1.6...v0.1.7) (2023-08-08)
## [0.1.6](https://github.com/bazingaedward/monaco-editor-vue3/compare/v0.1.4...v0.1.6) (2022-08-08)
* fix [v-model:value support](https://github.com/bazingaedward/monaco-editor-vue3/issues/5)
* Docs added Vite Stackblitz Demo
## 0.1.1 (2021-07-01)
### Features
* add ts support ([4332962](https://github.com/bazingaedward/monaco-editor-vue3/commit/433296250f1223da388450fcfe7f53030f3c9c08))
* 测试打包组件 ([6a4aebf](https://github.com/bazingaedward/monaco-editor-vue3/commit/6a4aebfcc28d8878a3aa001eab5930e9610724f2))
* add emits ([807e279](https://github.com/bazingaedward/monaco-editor-vue3/commit/807e279f4fa22471c15123f2b37e4980845b33ea))
## [0.1.6](https://github.com/bazingaedward/monaco-editor-vue3/compare/v0.1.4...v0.1.6) (2022-08-08)
- fix [v-model:value support](https://github.com/bazingaedward/monaco-editor-vue3/issues/5)
- Docs added Vite Stackblitz Demo
## 0.1.1 (2021-07-01)
### Features
- 测试打包组件 ([6a4aebf](https://github.com/bazingaedward/monaco-editor-vue3/commit/6a4aebfcc28d8878a3aa001eab5930e9610724f2))
- add emits ([807e279](https://github.com/bazingaedward/monaco-editor-vue3/commit/807e279f4fa22471c15123f2b37e4980845b33ea))

@@ -1,162 +0,5 @@

(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("vue"), require("monaco-editor")) : typeof define === "function" && define.amd ? define(["vue", "monaco-editor"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global["monaco-editor-vue3"] = factory(global.Vue, global["monaco-editor"]));
})(this, function(vue, monaco) {
"use strict";
function _interopNamespace(e) {
if (e && e.__esModule)
return e;
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
if (e) {
for (const k in e) {
if (k !== "default") {
const d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: () => e[k]
});
}
}
}
n.default = e;
return Object.freeze(n);
}
const monaco__namespace = /* @__PURE__ */ _interopNamespace(monaco);
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main = vue.defineComponent({
name: "MonacoEditor",
props: {
diffEditor: { type: Boolean, default: false },
width: { type: [String, Number], default: "100%" },
height: { type: [String, Number], default: "100%" },
original: String,
value: String,
language: { type: String, default: "javascript" },
theme: { type: String, default: "vs" },
options: {
type: Object,
default() {
return {};
}
}
},
emits: ["editorWillMount", "editorDidMount", "change", "update:value"],
setup(props) {
const { width, height } = vue.toRefs(props);
const style = vue.computed(() => {
const fixedWidth = width.value.toString().includes("%") ? width.value : `${width.value}px`;
const fixedHeight = height.value.toString().includes("%") ? height.value : `${height.value}px`;
return {
width: fixedWidth,
height: fixedHeight,
"text-align": "left"
};
});
return {
style
};
},
mounted() {
this.initMonaco();
},
beforeUnmount() {
this.editor && this.editor.dispose();
},
methods: {
initMonaco() {
this.$emit("editorWillMount", monaco__namespace);
const { value, language, theme, options } = this;
this.editor = monaco__namespace.editor[this.diffEditor ? "createDiffEditor" : "create"](this.$el, {
value,
language,
theme,
...options
});
this.diffEditor && this._setModel(this.value, this.original);
const editor = this._getEditor();
editor && editor.onDidChangeModelContent((event) => {
const value2 = editor.getValue();
if (this.value !== value2) {
this.$emit("change", value2, event);
this.$emit("update:value", value2);
}
});
this.$emit("editorDidMount", this.editor);
},
_setModel(value, original) {
const { language } = this;
const originalModel = monaco__namespace.editor.createModel(original, language);
const modifiedModel = monaco__namespace.editor.createModel(value, language);
this.editor.setModel({
original: originalModel,
modified: modifiedModel
});
},
_setValue(value) {
let editor = this._getEditor();
if (editor)
return editor.setValue(value);
},
_getValue() {
let editor = this._getEditor();
if (!editor)
return "";
return editor.getValue();
},
_getEditor() {
if (!this.editor)
return null;
return this.diffEditor ? this.editor.modifiedEditor : this.editor;
},
_setOriginal() {
const { original } = this.editor.getModel();
original.setValue(this.original);
}
},
watch: {
options: {
deep: true,
handler(options) {
this.editor.updateOptions(options);
}
},
value() {
this.value !== this._getValue() && this._setValue(this.value);
},
original() {
this._setOriginal();
},
language() {
if (!this.editor)
return;
if (this.diffEditor) {
const { original, modified } = this.editor.getModel();
monaco__namespace.editor.setModelLanguage(original, this.language);
monaco__namespace.editor.setModelLanguage(modified, this.language);
} else
monaco__namespace.editor.setModelLanguage(this.editor.getModel(), this.language);
},
theme() {
monaco__namespace.editor.setTheme(this.theme);
}
}
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("div", {
class: "monaco-editor-vue3",
style: vue.normalizeStyle(_ctx.style)
}, null, 4);
}
const MonacoEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
const main = {
install: (app) => {
app.component(MonacoEditor.name, MonacoEditor);
}
};
return main;
});
(function(Y,te){typeof exports=="object"&&typeof module<"u"?module.exports=te(require("monaco-editor")):typeof define=="function"&&define.amd?define(["monaco-editor"],te):(Y=typeof globalThis<"u"?globalThis:Y||self,Y["monaco-editor-vue3"]=te(Y["monaco-editor"]))})(this,function(Y){"use strict";function te(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=te(Y);function Jt(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?o=>!!n[o.toLowerCase()]:o=>!!n[o]}function ae(e){if(h(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=M(r)?Zt(r):ae(r);if(o)for(const s in o)t[s]=o[s]}return t}else{if(M(e))return e;if(S(e))return e}}const Yt=/;(?![^(]*\))/g,Xt=/:(.+)/;function Zt(e){const t={};return e.split(Yt).forEach(n=>{if(n){const r=n.split(Xt);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Me(e){let t="";if(M(e))t=e;else if(h(e))for(let n=0;n<e.length;n++){const r=Me(e[n]);r&&(t+=r+" ")}else if(S(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const V=process.env.NODE_ENV!=="production"?Object.freeze({}):{},Qt=process.env.NODE_ENV!=="production"?Object.freeze([]):[],Re=()=>{},kt=()=>!1,en=/^on[^a-z]/,tn=e=>en.test(e),D=Object.assign,nn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},rn=Object.prototype.hasOwnProperty,g=(e,t)=>rn.call(e,t),h=Array.isArray,X=e=>ue(e)==="[object Map]",on=e=>ue(e)==="[object Set]",E=e=>typeof e=="function",M=e=>typeof e=="string",Ie=e=>typeof e=="symbol",S=e=>e!==null&&typeof e=="object",sn=e=>S(e)&&E(e.then)&&E(e.catch),cn=Object.prototype.toString,ue=e=>cn.call(e),et=e=>ue(e).slice(8,-1),ln=e=>ue(e)==="[object Object]",$e=e=>M(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,an=(e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))})(e=>e.charAt(0).toUpperCase()+e.slice(1)),fe=(e,t)=>!Object.is(e,t),un=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})};let tt;const fn=()=>tt||(tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function nt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let dn;function pn(e,t=dn){t&&t.active&&t.effects.push(e)}const ne=e=>{const t=new Set(e);return t.w=0,t.n=0,t},rt=e=>(e.w&P)>0,ot=e=>(e.n&P)>0,hn=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=P},gn=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const o=t[r];rt(o)&&!ot(o)?o.delete(e):t[n++]=o,o.w&=~P,o.n&=~P}t.length=n}},Te=new WeakMap;let re=0,P=1;const Ce=30;let N;const H=Symbol(process.env.NODE_ENV!=="production"?"iterate":""),Pe=Symbol(process.env.NODE_ENV!=="production"?"Map key iterate":"");class st{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,pn(this,r)}run(){if(!this.active)return this.fn();let t=N,n=F;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=N,N=this,F=!0,P=1<<++re,re<=Ce?hn(this):it(this),this.fn()}finally{re<=Ce&&gn(this),P=1<<--re,N=this.parent,F=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){N===this?this.deferStop=!0:this.active&&(it(this),this.onStop&&this.onStop(),this.active=!1)}}function it(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let F=!0;const ct=[];function lt(){ct.push(F),F=!1}function at(){const e=ct.pop();F=e===void 0?!0:e}function y(e,t,n){if(F&&N){let r=Te.get(e);r||Te.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=ne());const s=process.env.NODE_ENV!=="production"?{effect:N,target:e,type:t,key:n}:void 0;Fe(o,s)}}function Fe(e,t){let n=!1;re<=Ce?ot(e)||(e.n|=P,n=!rt(e)):n=!e.has(N),n&&(e.add(N),N.deps.push(e),process.env.NODE_ENV!=="production"&&N.onTrack&&N.onTrack(Object.assign({effect:N},t)))}function j(e,t,n,r,o,s){const i=Te.get(e);if(!i)return;let c=[];if(t==="clear")c=[...i.values()];else if(n==="length"&&h(e))i.forEach((d,p)=>{(p==="length"||p>=r)&&c.push(d)});else switch(n!==void 0&&c.push(i.get(n)),t){case"add":h(e)?$e(n)&&c.push(i.get("length")):(c.push(i.get(H)),X(e)&&c.push(i.get(Pe)));break;case"delete":h(e)||(c.push(i.get(H)),X(e)&&c.push(i.get(Pe)));break;case"set":X(e)&&c.push(i.get(H));break}const a=process.env.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0;if(c.length===1)c[0]&&(process.env.NODE_ENV!=="production"?Z(c[0],a):Z(c[0]));else{const d=[];for(const p of c)p&&d.push(...p);process.env.NODE_ENV!=="production"?Z(ne(d),a):Z(ne(d))}}function Z(e,t){const n=h(e)?e:[...e];for(const r of n)r.computed&&ut(r,t);for(const r of n)r.computed||ut(r,t)}function ut(e,t){(e!==N||e.allowRecurse)&&(process.env.NODE_ENV!=="production"&&e.onTrigger&&e.onTrigger(D({effect:e},t)),e.scheduler?e.scheduler():e.run())}const _n=Jt("__proto__,__v_isRef,__isVue"),ft=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ie)),mn=je(),En=je(!0),wn=je(!0,!0),dt=Nn();function Nn(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=f(this);for(let s=0,i=this.length;s<i;s++)y(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(f)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){lt();const r=f(this)[t].apply(this,n);return at(),r}}),e}function je(e=!1,t=!1){return function(r,o,s){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&s===(e?t?bt:Nt:t?Fn:wt).get(r))return r;const i=h(r);if(!e&&i&&g(dt,o))return Reflect.get(dt,o,s);const c=Reflect.get(r,o,s);return(Ie(o)?ft.has(o):_n(o))||(e||y(r,"get",o),t)?c:b(c)?i&&$e(o)?c:c.value:S(c)?e?vt(c):Ot(c):c}}const bn=On();function On(e=!1){return function(n,r,o,s){let i=n[r];if(W(i)&&b(i)&&!b(o))return!1;if(!e&&!W(o)&&(Ke(o)||(o=f(o),i=f(i)),!h(n)&&b(i)&&!b(o)))return i.value=o,!0;const c=h(n)&&$e(r)?Number(r)<n.length:g(n,r),a=Reflect.set(n,r,o,s);return n===f(s)&&(c?fe(o,i)&&j(n,"set",r,o,i):j(n,"add",r,o)),a}}function vn(e,t){const n=g(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&j(e,"delete",t,void 0,r),o}function Vn(e,t){const n=Reflect.has(e,t);return(!Ie(t)||!ft.has(t))&&y(e,"has",t),n}function Sn(e){return y(e,"iterate",h(e)?"length":H),Reflect.ownKeys(e)}const yn={get:mn,set:bn,deleteProperty:vn,has:Vn,ownKeys:Sn},pt={get:En,set(e,t){return process.env.NODE_ENV!=="production"&&nt(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return process.env.NODE_ENV!=="production"&&nt(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},xn=D({},pt,{get:wn}),Ae=e=>e,de=e=>Reflect.getPrototypeOf(e);function pe(e,t,n=!1,r=!1){e=e.__v_raw;const o=f(e),s=f(t);n||(t!==s&&y(o,"get",t),y(o,"get",s));const{has:i}=de(o),c=r?Ae:n?Ue:We;if(i.call(o,t))return c(e.get(t));if(i.call(o,s))return c(e.get(s));e!==o&&e.get(t)}function he(e,t=!1){const n=this.__v_raw,r=f(n),o=f(e);return t||(e!==o&&y(r,"has",e),y(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ge(e,t=!1){return e=e.__v_raw,!t&&y(f(e),"iterate",H),Reflect.get(e,"size",e)}function ht(e){e=f(e);const t=f(this);return de(t).has.call(t,e)||(t.add(e),j(t,"add",e,e)),this}function gt(e,t){t=f(t);const n=f(this),{has:r,get:o}=de(n);let s=r.call(n,e);s?process.env.NODE_ENV!=="production"&&Et(n,r,e):(e=f(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?fe(t,i)&&j(n,"set",e,t,i):j(n,"add",e,t),this}function _t(e){const t=f(this),{has:n,get:r}=de(t);let o=n.call(t,e);o?process.env.NODE_ENV!=="production"&&Et(t,n,e):(e=f(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&j(t,"delete",e,void 0,s),i}function mt(){const e=f(this),t=e.size!==0,n=process.env.NODE_ENV!=="production"?X(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&j(e,"clear",void 0,void 0,n),r}function _e(e,t){return function(r,o){const s=this,i=s.__v_raw,c=f(i),a=t?Ae:e?Ue:We;return!e&&y(c,"iterate",H),i.forEach((d,p)=>r.call(o,a(d),a(p),s))}}function me(e,t,n){return function(...r){const o=this.__v_raw,s=f(o),i=X(s),c=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,d=o[e](...r),p=n?Ae:t?Ue:We;return!t&&y(s,"iterate",a?Pe:H),{next(){const{value:l,done:u}=d.next();return u?{value:l,done:u}:{value:c?[p(l[0]),p(l[1])]:p(l),done:u}},[Symbol.iterator](){return this}}}}function A(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${an(e)} operation ${n}failed: target is readonly.`,f(this))}return e==="delete"?!1:this}}function Dn(){const e={get(s){return pe(this,s)},get size(){return ge(this)},has:he,add:ht,set:gt,delete:_t,clear:mt,forEach:_e(!1,!1)},t={get(s){return pe(this,s,!1,!0)},get size(){return ge(this)},has:he,add:ht,set:gt,delete:_t,clear:mt,forEach:_e(!1,!0)},n={get(s){return pe(this,s,!0)},get size(){return ge(this,!0)},has(s){return he.call(this,s,!0)},add:A("add"),set:A("set"),delete:A("delete"),clear:A("clear"),forEach:_e(!0,!1)},r={get(s){return pe(this,s,!0,!0)},get size(){return ge(this,!0)},has(s){return he.call(this,s,!0)},add:A("add"),set:A("set"),delete:A("delete"),clear:A("clear"),forEach:_e(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=me(s,!1,!1),n[s]=me(s,!0,!1),t[s]=me(s,!1,!0),r[s]=me(s,!0,!0)}),[e,n,t,r]}const[Mn,Rn,In,$n]=Dn();function ze(e,t){const n=t?e?$n:In:e?Rn:Mn;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(g(n,o)&&o in r?n:r,o,s)}const Tn={get:ze(!1,!1)},Cn={get:ze(!0,!1)},Pn={get:ze(!0,!0)};function Et(e,t,n){const r=f(n);if(r!==n&&t.call(e,r)){const o=et(e);console.warn(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const wt=new WeakMap,Fn=new WeakMap,Nt=new WeakMap,bt=new WeakMap;function jn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function An(e){return e.__v_skip||!Object.isExtensible(e)?0:jn(et(e))}function Ot(e){return W(e)?e:He(e,!1,yn,Tn,wt)}function vt(e){return He(e,!0,pt,Cn,Nt)}function Ee(e){return He(e,!0,xn,Pn,bt)}function He(e,t,n,r,o){if(!S(e))return process.env.NODE_ENV!=="production"&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=An(e);if(i===0)return e;const c=new Proxy(e,i===2?r:n);return o.set(e,c),c}function K(e){return W(e)?K(e.__v_raw):!!(e&&e.__v_isReactive)}function W(e){return!!(e&&e.__v_isReadonly)}function Ke(e){return!!(e&&e.__v_isShallow)}function we(e){return K(e)||W(e)}function f(e){const t=e&&e.__v_raw;return t?f(t):e}function zn(e){return un(e,"__v_skip",!0),e}const We=e=>S(e)?Ot(e):e,Ue=e=>S(e)?vt(e):e;function Hn(e){F&&N&&(e=f(e),process.env.NODE_ENV!=="production"?Fe(e.dep||(e.dep=ne()),{target:e,type:"get",key:"value"}):Fe(e.dep||(e.dep=ne())))}function Kn(e,t){e=f(e),e.dep&&(process.env.NODE_ENV!=="production"?Z(e.dep,{target:e,type:"set",key:"value",newValue:t}):Z(e.dep))}function b(e){return!!(e&&e.__v_isRef===!0)}function Wn(e){return b(e)?e.value:e}const Un={get:(e,t,n)=>Wn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return b(o)&&!b(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Bn(e){return K(e)?e:new Proxy(e,Un)}function qn(e){process.env.NODE_ENV!=="production"&&!we(e)&&console.warn("toRefs() expects a reactive object but received a plain one.");const t=h(e)?new Array(e.length):{};for(const n in e)t[n]=Gn(e,n);return t}class Ln{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Gn(e,t,n){const r=e[t];return b(r)?r:new Ln(e,t,n)}class Jn{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new st(t,()=>{this._dirty||(this._dirty=!0,Kn(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=f(this);return Hn(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Yn(e,t,n=!1){let r,o;const s=E(e);s?(r=e,o=process.env.NODE_ENV!=="production"?()=>{console.warn("Write operation failed: computed value is readonly")}:Re):(r=e.get,o=e.set);const i=new Jn(r,o,s||!o,n);return process.env.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}const U=[];function Xn(e){U.push(e)}function Zn(){U.pop()}function v(e,...t){lt();const n=U.length?U[U.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=Qn();if(r)B(r,n,11,[e+t.join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Lt(n,s.type)}>`).join(`
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
`,...kn(o)),console.warn(...s)}at()}function Qn(){let e=U[U.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function kn(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
`],...er(n))}),t}function er({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Lt(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...tr(e.props),s]:[o+s]}function tr(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Vt(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Vt(e,t,n){return M(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:b(t)?(t=Vt(e,f(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):E(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=f(t),n?t:[`${e}=`,t])}const St={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function B(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){yt(s,t,n)}return o}function Be(e,t,n,r){if(E(e)){const s=B(e,t,n,r);return s&&sn(s)&&s.catch(i=>{yt(i,t,n)}),s}const o=[];for(let s=0;s<e.length;s++)o.push(Be(e[s],t,n,r));return o}function yt(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,c=process.env.NODE_ENV!=="production"?St[n]:n;for(;s;){const d=s.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,i,c)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){B(a,null,10,[e,i,c]);return}}nr(e,n,o,r)}function nr(e,t,n,r=!0){if(process.env.NODE_ENV!=="production"){const o=St[t];if(n&&Xn(n),v(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Zn(),r)throw e;console.error(e)}else console.error(e)}let Ne=!1,qe=!1;const R=[];let z=0;const oe=[];let Q=null,q=0;const se=[];let T=null,L=0;const xt=Promise.resolve();let Le=null,Ge=null;const rr=100;function or(e){const t=Le||xt;return e?t.then(this?e.bind(this):e):t}function sr(e){let t=z+1,n=R.length;for(;t<n;){const r=t+n>>>1;ie(R[r])<e?t=r+1:n=r}return t}function Dt(e){(!R.length||!R.includes(e,Ne&&e.allowRecurse?z+1:z))&&e!==Ge&&(e.id==null?R.push(e):R.splice(sr(e.id),0,e),Mt())}function Mt(){!Ne&&!qe&&(qe=!0,Le=xt.then($t))}function Rt(e,t,n,r){h(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),Mt()}function ir(e){Rt(e,Q,oe,q)}function It(e){Rt(e,T,se,L)}function Je(e,t=null){if(oe.length){for(Ge=t,Q=[...new Set(oe)],oe.length=0,process.env.NODE_ENV!=="production"&&(e=e||new Map),q=0;q<Q.length;q++)process.env.NODE_ENV!=="production"&&Ye(e,Q[q])||Q[q]();Q=null,q=0,Ge=null,Je(e,t)}}function cr(e){if(Je(),se.length){const t=[...new Set(se)];if(se.length=0,T){T.push(...t);return}for(T=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),T.sort((n,r)=>ie(n)-ie(r)),L=0;L<T.length;L++)process.env.NODE_ENV!=="production"&&Ye(e,T[L])||T[L]();T=null,L=0}}const ie=e=>e.id==null?1/0:e.id;function $t(e){qe=!1,Ne=!0,process.env.NODE_ENV!=="production"&&(e=e||new Map),Je(e),R.sort((n,r)=>ie(n)-ie(r));const t=process.env.NODE_ENV!=="production"?n=>Ye(e,n):Re;try{for(z=0;z<R.length;z++){const n=R[z];if(n&&n.active!==!1){if(process.env.NODE_ENV!=="production"&&t(n))continue;B(n,null,14)}}}finally{z=0,R.length=0,cr(e),Ne=!1,Le=null,(R.length||oe.length||se.length)&&$t(e)}}function Ye(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>rr){const r=t.ownerInstance,o=r&&qt(r.type);return v(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}const ce=new Set;process.env.NODE_ENV!=="production"&&(fn().__VUE_HMR_RUNTIME__={createRecord:Xe(lr),rerender:Xe(ar),reload:Xe(ur)});const be=new Map;function lr(e,t){return be.has(e)?!1:(be.set(e,{initialDef:le(t),instances:new Set}),!0)}function le(e){return Gt(e)?e.__vccOpts:e}function ar(e,t){const n=be.get(e);!n||(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,le(r.type).render=t),r.renderCache=[],r.update()}))}function ur(e,t){const n=be.get(e);if(!n)return;t=le(t),Tt(n.initialDef,t);const r=[...n.instances];for(const o of r){const s=le(o.type);ce.has(s)||(s!==n.initialDef&&Tt(s,t),ce.add(s)),o.appContext.optionsCache.delete(o.type),o.ceReload?(ce.add(s),o.ceReload(t.styles),ce.delete(s)):o.parent?(Dt(o.parent.update),o.parent.type.__asyncLoader&&o.parent.ceReload&&o.parent.ceReload(t.styles)):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}It(()=>{for(const o of r)ce.delete(le(o.type))})}function Tt(e,t){D(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Xe(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let G=null,fr=null;function eo(){}const dr=e=>e.__isSuspense;function pr(e,t){t&&t.pendingBranch?h(e)?t.effects.push(...e):t.effects.push(e):It(e)}const Ct={};function hr(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:i}=V){process.env.NODE_ENV!=="production"&&!t&&(n!==void 0&&v('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&v('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const c=_=>{v("Invalid watch source: ",_,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=ee;let d,p=!1,l=!1;if(b(e)?(d=()=>e.value,p=Ke(e)):K(e)?(d=()=>e,r=!0):h(e)?(l=!0,p=e.some(_=>K(_)||Ke(_)),d=()=>e.map(_=>{if(b(_))return _.value;if(K(_))return k(_);if(E(_))return B(_,a,2);process.env.NODE_ENV!=="production"&&c(_)})):E(e)?t?d=()=>B(e,a,2):d=()=>{if(!(a&&a.isUnmounted))return u&&u(),Be(e,a,3,[m])}:(d=Re,process.env.NODE_ENV!=="production"&&c(e)),t&&r){const _=d;d=()=>k(_())}let u,m=_=>{u=x.onStop=()=>{B(_,a,4)}},w=l?[]:Ct;const $=()=>{if(!!x.active)if(t){const _=x.run();(r||p||(l?_.some((Zr,Qr)=>fe(Zr,w[Qr])):fe(_,w)))&&(u&&u(),Be(t,a,3,[_,w===Ct?void 0:w,m]),w=_)}else x.run()};$.allowRecurse=!!t;let De;o==="sync"?De=$:o==="post"?De=()=>jt($,a&&a.suspense):De=()=>ir($);const x=new st(d,De);return process.env.NODE_ENV!=="production"&&(x.onTrack=s,x.onTrigger=i),t?n?$():w=x.run():o==="post"?jt(x.run.bind(x),a&&a.suspense):x.run(),()=>{x.stop(),a&&a.scope&&nn(a.scope.effects,x)}}function gr(e,t,n){const r=this.proxy,o=M(e)?e.includes(".")?_r(r,e):()=>r[e]:e.bind(r,r);let s;E(t)?s=t:(s=t.handler,n=t);const i=ee;Bt(this);const c=hr(o,s.bind(r),n);return i?Bt(i):zr(),c}function _r(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function k(e,t){if(!S(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),b(e))k(e.value,t);else if(h(e))for(let n=0;n<e.length;n++)k(e[n],t);else if(on(e)||X(e))e.forEach(n=>{k(n,t)});else if(ln(e))for(const n in e)k(e[n],t);return e}function mr(e){return E(e)?{setup:e,name:e.name}:e}const Er=Symbol(),Ze=e=>e?Hr(e)?Wr(e)||e.proxy:Ze(e.parent):null,Oe=D(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>process.env.NODE_ENV!=="production"?Ee(e.props):e.props,$attrs:e=>process.env.NODE_ENV!=="production"?Ee(e.attrs):e.attrs,$slots:e=>process.env.NODE_ENV!=="production"?Ee(e.slots):e.slots,$refs:e=>process.env.NODE_ENV!=="production"?Ee(e.refs):e.refs,$parent:e=>Ze(e.parent),$root:e=>Ze(e.root),$emit:e=>e.emit,$options:e=>br(e),$forceUpdate:e=>e.f||(e.f=()=>Dt(e.update)),$nextTick:e=>e.n||(e.n=or.bind(e.proxy)),$watch:e=>gr.bind(e)}),wr=e=>e==="_"||e==="$",Nr={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:c,appContext:a}=e;if(process.env.NODE_ENV!=="production"&&t==="__isVue")return!0;if(process.env.NODE_ENV!=="production"&&r!==V&&r.__isScriptSetup&&g(r,t))return r[t];let d;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(r!==V&&g(r,t))return i[t]=1,r[t];if(o!==V&&g(o,t))return i[t]=2,o[t];if((d=e.propsOptions[0])&&g(d,t))return i[t]=3,s[t];if(n!==V&&g(n,t))return i[t]=4,n[t];i[t]=0}}const p=Oe[t];let l,u;if(p)return t==="$attrs"&&(y(e,"get",t),process.env.NODE_ENV!=="production"&&void 0),p(e);if((l=c.__cssModules)&&(l=l[t]))return l;if(n!==V&&g(n,t))return i[t]=4,n[t];if(u=a.config.globalProperties,g(u,t))return u[t];process.env.NODE_ENV!=="production"&&G&&(!M(t)||t.indexOf("__v")!==0)&&(o!==V&&wr(t[0])&&g(o,t)?v(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===G&&v(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return o!==V&&g(o,t)?(o[t]=n,!0):r!==V&&g(r,t)?(r[t]=n,!0):g(e.props,t)?(process.env.NODE_ENV!=="production"&&v(`Attempting to mutate prop "${t}". Props are readonly.`,e),!1):t[0]==="$"&&t.slice(1)in e?(process.env.NODE_ENV!=="production"&&v(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`,e),!1):(process.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let c;return!!n[i]||e!==V&&g(e,i)||t!==V&&g(t,i)||(c=s[0])&&g(c,i)||g(r,i)||g(Oe,i)||g(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:g(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};process.env.NODE_ENV!=="production"&&(Nr.ownKeys=e=>(v("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function br(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,c=s.get(t);let a;return c?a=c:!o.length&&!n&&!r?a=t:(a={},o.length&&o.forEach(d=>ve(a,d,i,!0)),ve(a,t,i)),s.set(t,a),a}function ve(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&ve(e,s,n,!0),o&&o.forEach(i=>ve(e,i,n,!0));for(const i in t)if(r&&i==="expose")process.env.NODE_ENV!=="production"&&v('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const c=Or[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Or={data:Pt,props:J,emits:J,methods:J,computed:J,beforeCreate:O,created:O,beforeMount:O,mounted:O,beforeUpdate:O,updated:O,beforeDestroy:O,beforeUnmount:O,destroyed:O,unmounted:O,activated:O,deactivated:O,errorCaptured:O,serverPrefetch:O,components:J,directives:J,watch:Vr,provide:Pt,inject:vr};function Pt(e,t){return t?e?function(){return D(E(e)?e.call(this,this):e,E(t)?t.call(this,this):t)}:t:e}function vr(e,t){return J(Ft(e),Ft(t))}function Ft(e){if(h(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function O(e,t){return e?[...new Set([].concat(e,t))]:t}function J(e,t){return e?D(D(Object.create(null),e),t):t}function Vr(e,t){if(!e)return t;if(!t)return e;const n=D(Object.create(null),e);for(const r in t)n[r]=O(e[r],t[r]);return n}function Sr(){return{app:null,config:{isNativeTag:kt,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}const jt=pr,yr=e=>e.__isTeleport,At=Symbol(process.env.NODE_ENV!=="production"?"Fragment":void 0),xr=Symbol(process.env.NODE_ENV!=="production"?"Text":void 0),Dr=Symbol(process.env.NODE_ENV!=="production"?"Comment":void 0);Symbol(process.env.NODE_ENV!=="production"?"Static":void 0);const Ve=[];let I=null;function Mr(e=!1){Ve.push(I=e?null:[])}function Rr(){Ve.pop(),I=Ve[Ve.length-1]||null}function Ir(e){return e.dynamicChildren=I||Qt,Rr(),I&&I.push(e),e}function $r(e,t,n,r,o,s){return Ir(Kt(e,t,n,r,o,s,!0))}function Tr(e){return e?e.__v_isVNode===!0:!1}const Cr=(...e)=>Wt(...e),zt="__vInternal",Ht=({key:e})=>e!=null?e:null,Se=({ref:e,ref_key:t,ref_for:n})=>e!=null?M(e)||b(e)||E(e)?{i:G,r:e,k:t,f:!!n}:e:null;function Kt(e,t=null,n=null,r=0,o=null,s=e===At?0:1,i=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ht(t),ref:t&&Se(t),scopeId:fr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return c?(Qe(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=M(n)?8:16),process.env.NODE_ENV!=="production"&&a.key!==a.key&&v("VNode created with invalid key (NaN). VNode type:",a.type),!i&&I&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&I.push(a),a}const Pr=process.env.NODE_ENV!=="production"?Cr:Wt;function Wt(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Er)&&(process.env.NODE_ENV!=="production"&&!e&&v(`Invalid vnode type when creating vnode: ${e}.`),e=Dr),Tr(e)){const c=ye(e,t,!0);return n&&Qe(c,n),!s&&I&&(c.shapeFlag&6?I[I.indexOf(e)]=c:I.push(c)),c.patchFlag|=-2,c}if(Gt(e)&&(e=e.__vccOpts),t){t=Fr(t);let{class:c,style:a}=t;c&&!M(c)&&(t.class=Me(c)),S(a)&&(we(a)&&!h(a)&&(a=D({},a)),t.style=ae(a))}const i=M(e)?1:dr(e)?128:yr(e)?64:S(e)?4:E(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&we(e)&&(e=f(e),v("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
Component that was made reactive: `,e)),Kt(e,t,n,r,o,i,s,!0)}function Fr(e){return e?we(e)||zt in e?D({},e):e:null}function ye(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,c=t?Ar(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ht(c),ref:t&&t.ref?n&&o?h(o)?o.concat(Se(t)):[o,Se(t)]:Se(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&s===-1&&h(i)?i.map(Ut):i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==At?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ye(e.ssContent),ssFallback:e.ssFallback&&ye(e.ssFallback),el:e.el,anchor:e.anchor}}function Ut(e){const t=ye(e);return h(e.children)&&(t.children=e.children.map(Ut)),t}function jr(e=" ",t=0){return Pr(xr,null,e,t)}function Qe(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(h(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Qe(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(zt in t)?t._ctx=G:o===3&&G&&(G.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else E(t)?(t={default:t,_ctx:G},n=32):(t=String(t),r&64?(n=16,t=[jr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ar(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=Me([t.class,r.class]));else if(o==="style")t.style=ae([t.style,r.style]);else if(tn(o)){const s=t[o],i=r[o];i&&s!==i&&!(h(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}Sr();let ee=null;const Bt=e=>{ee=e,e.scope.on()},zr=()=>{ee&&ee.scope.off(),ee=null};function Hr(e){return e.vnode.shapeFlag&4}let Kr=!1;function Wr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Bn(zn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Oe)return Oe[n](e)}}))}const Ur=/(?:^|[-_])(\w)/g,Br=e=>e.replace(Ur,t=>t.toUpperCase()).replace(/[-_]/g,"");function qt(e,t=!0){return E(e)?e.displayName||e.name:e.name||t&&e.__name}function Lt(e,t,n=!1){let r=qt(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Br(r):n?"App":"Anonymous"}function Gt(e){return E(e)&&"__vccOpts"in e}const qr=(e,t)=>Yn(e,t,Kr);Symbol(process.env.NODE_ENV!=="production"?"ssrContext":"");function ke(e){return!!(e&&e.__v_isShallow)}function Lr(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},r={style:"color:#9d288c"},o={header(l){return S(l)?l.__isVue?["div",e,"VueInstance"]:b(l)?["div",{},["span",e,p(l)],"<",c(l.value),">"]:K(l)?["div",{},["span",e,ke(l)?"ShallowReactive":"Reactive"],"<",c(l),`>${W(l)?" (readonly)":""}`]:W(l)?["div",{},["span",e,ke(l)?"ShallowReadonly":"Readonly"],"<",c(l),">"]:null:null},hasBody(l){return l&&l.__isVue},body(l){if(l&&l.__isVue)return["div",{},...s(l.$)]}};function s(l){const u=[];l.type.props&&l.props&&u.push(i("props",f(l.props))),l.setupState!==V&&u.push(i("setup",l.setupState)),l.data!==V&&u.push(i("data",f(l.data)));const m=a(l,"computed");m&&u.push(i("computed",m));const w=a(l,"inject");return w&&u.push(i("injected",w)),u.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:l}]]),u}function i(l,u){return u=D({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},l],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(m=>["div",{},["span",r,m+": "],c(u[m],!1)])]]:["span",{}]}function c(l,u=!0){return typeof l=="number"?["span",t,l]:typeof l=="string"?["span",n,JSON.stringify(l)]:typeof l=="boolean"?["span",r,l]:S(l)?["object",{object:u?f(l):l}]:["span",n,String(l)]}function a(l,u){const m=l.type;if(E(m))return;const w={};for(const $ in l.ctx)d(m,$,u)&&(w[$]=l.ctx[$]);return w}function d(l,u,m){const w=l[m];if(h(w)&&w.includes(u)||S(w)&&u in w||l.extends&&d(l.extends,u,m)||l.mixins&&l.mixins.some($=>d($,u,m)))return!0}function p(l){return ke(l)?"ShallowRef":l.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}function Gr(){Lr()}process.env.NODE_ENV!=="production"&&Gr();const Jr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Yr=mr({name:"MonacoEditor",props:{diffEditor:{type:Boolean,default:!1},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},original:String,value:String,language:{type:String,default:"javascript"},theme:{type:String,default:"vs"},options:{type:Object,default(){return{}}}},emits:["editorWillMount","editorDidMount","change","update:value"],setup(e){const{width:t,height:n}=qn(e);return{style:qr(()=>{const o=t.value.toString().includes("%")?t.value:`${t.value}px`,s=n.value.toString().includes("%")?n.value:`${n.value}px`;return{width:o,height:s,"text-align":"left"}})}},mounted(){this.initMonaco()},beforeUnmount(){this.editor&&this.editor.dispose()},methods:{initMonaco(){this.$emit("editorWillMount",C);const{value:e,language:t,theme:n,options:r}=this;this.editor=C.editor[this.diffEditor?"createDiffEditor":"create"](this.$el,{value:e,language:t,theme:n,...r}),this.diffEditor&&this._setModel(this.value,this.original);const o=this._getEditor();o&&o.onDidChangeModelContent(s=>{const i=o.getValue();this.value!==i&&(this.$emit("change",i,s),this.$emit("update:value",i))}),this.$emit("editorDidMount",this.editor)},_setModel(e,t){const{language:n}=this,r=C.editor.createModel(t,n),o=C.editor.createModel(e,n);this.editor.setModel({original:r,modified:o})},_setValue(e){let t=this._getEditor();if(t)return t.setValue(e)},_getValue(){let e=this._getEditor();return e?e.getValue():""},_getEditor(){return this.editor?this.diffEditor?this.editor.modifiedEditor:this.editor:null},_setOriginal(){const{original:e}=this.editor.getModel();e.setValue(this.original)}},watch:{options:{deep:!0,handler(e){this.editor.updateOptions(e)}},value(){this.value!==this._getValue()&&this._setValue(this.value)},original(){this._setOriginal()},language(){if(!!this.editor)if(this.diffEditor){const{original:e,modified:t}=this.editor.getModel();C.editor.setModelLanguage(e,this.language),C.editor.setModelLanguage(t,this.language)}else C.editor.setModelLanguage(this.editor.getModel(),this.language)},theme(){C.editor.setTheme(this.theme)}}});function Xr(e,t,n,r,o,s){return Mr(),$r("div",{class:"monaco-editor-vue3",style:ae(e.style)},null,4)}const xe=Jr(Yr,[["render",Xr]]);return xe.install=e=>{e.component(xe.name,xe)},xe});
{
"name": "monaco-editor-vue3",
"version": "0.1.8",
"version": "0.1.9",
"keywords": [

@@ -10,4 +10,4 @@ "Vue3",

"main": "./dist/monaco-editor-vue3.umd.js",
"module": "./dist/monaco-editor-vue3.mjs",
"types": "./dist/MonacoEditor.vue.d.ts",
"module": "./dist/monaco-editor-vue3.es.js",
"types": "./typings/monaco-editor.d.ts",
"author": {

@@ -26,4 +26,3 @@ "name": "邱凯翔",

"start": "pnpm dev",
"build": "vite build && pnpm type",
"type": "vue-tsc -p tsconfig.d.json",
"build": "vite build",
"test": "jest",

@@ -33,3 +32,3 @@ "version": "conventional-changelog -p angular -i CHANGELOG.md -s"

"dependencies": {
"monaco-editor": "^0.41.0",
"monaco-editor": "^0.33.0",
"vite-plugin-monaco-editor": "^1.1.0",

@@ -59,6 +58,4 @@ "vue": "^3.2.37"

"vite": "^3.2.7",
"vite-plugin-dts": "^3.5.1",
"vue-jest": "^5.0.0-alpha.10",
"vue-tsc": "^1.8.8"
"vue-jest": "^5.0.0-alpha.10"
}
}

@@ -1,10 +0,6 @@

import { App } from 'vue'
import MonacoEditor from './MonacoEditor.vue'
// export { MonacoEditor }
export default {
install: (app: App) => {
app.component(MonacoEditor.name, MonacoEditor)
}
}
MonacoEditor.install = (app) => {
app.component(MonacoEditor.name, MonacoEditor)
}
export default MonacoEditor
# Todo List
1. TS support
2. v-show/v-if test case

@@ -8,3 +9,2 @@ 3. vite update

6. 如何获取示例
7. 文档 github.io docuraus 部署
8. 添加测试用例
7. 文档 github.io docuraus部署
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
// 这样就可以对 `this` 上的数据属性进行更严格的推断
"strict": true,
"jsx": "preserve",
"moduleResolution": "node"
}
}
"compilerOptions": {
"target": "esnext",
"module": "esnext",
// 这样就可以对 `this` 上的数据属性进行更严格的推断
"strict": true,
"jsx": "preserve",
"moduleResolution": "node"
}
}

@@ -1,2 +0,1 @@

/// <reference types="vite/client" />
declare module '*.vue' {

@@ -20,2 +19,4 @@ import { App, defineComponent } from 'vue'

declare type TimeoutHandle = ReturnType<typeof global.setTimeout>
declare type ComponentSize = 'large' | 'medium' | 'small' | 'mini'

@@ -5,3 +5,2 @@ // vite.config.js

import vue from '@vitejs/plugin-vue'
import dts from 'vite-plugin-dts'

@@ -13,3 +12,2 @@ /**

build: {
minify: false,
lib: {

@@ -21,7 +19,6 @@ entry: path.resolve(__dirname, 'src/main.ts'),

rollupOptions: {
external: ['monaco-editor', 'vue'],
external: ['monaco-editor'],
output: {
globals: {
"monaco-editor": "monaco-editor",
"vue": "Vue"
"monaco-editor": "monaco-editor"
}

@@ -33,5 +30,4 @@ }

vue(),
dts()
],
}
export default config

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc