From daf7be26f428c2a90cc4595465e2ea54dfe16fa5 Mon Sep 17 00:00:00 2001 From: lizhiyuan Date: Mon, 19 Aug 2024 18:58:25 +0800 Subject: [PATCH] chore: add base path in vite config --- .../{index-32jvP77A.js => index-Bex626j_.js} | 4 ++-- ...dex-32jvP77A.js.map => index-Bex626j_.js.map} | 2 +- .../{large-pTPmIg4s.js => large-DdnQ63On.js} | 4 ++-- ...rge-pTPmIg4s.js.map => large-DdnQ63On.js.map} | 2 +- docs/index.html | 16 ++++++++-------- vite.config.ts | 4 +++- 6 files changed, 17 insertions(+), 15 deletions(-) rename docs/assets/{index-32jvP77A.js => index-Bex626j_.js} (96%) rename docs/assets/{index-32jvP77A.js.map => index-Bex626j_.js.map} (99%) rename docs/assets/{large-pTPmIg4s.js => large-DdnQ63On.js} (99%) rename docs/assets/{large-pTPmIg4s.js.map => large-DdnQ63On.js.map} (99%) diff --git a/docs/assets/index-32jvP77A.js b/docs/assets/index-Bex626j_.js similarity index 96% rename from docs/assets/index-32jvP77A.js rename to docs/assets/index-Bex626j_.js index 50bbc08..5974bb7 100644 --- a/docs/assets/index-32jvP77A.js +++ b/docs/assets/index-Bex626j_.js @@ -1,4 +1,4 @@ -import{m as ct,c as W,o as f,a as g,b as de,u as me,d as pe,r as mt,h as ge,g as fe,e as ve,f as Ct,i as rt,j as Q,k as A,l as at,n as z,p as Y,q as j,w as B,F as Dt,s as Lt,t as Xt,v as Nt,x as Vt,y as ht,z as be,A as we,B as ye,C as yt,D as ze,E as Ae}from"./vendor-moUb9exr.js";import{c as xe}from"./large-pTPmIg4s.js";import"./index-32jvP77A.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function i(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(s){if(s.ep)return;s.ep=!0;const n=i(s);fetch(s.href,n)}})();const Re={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Me=g("path",{fill:"currentColor",d:"M11.548 25.752c9.056 0 14.01-7.503 14.01-14.01c0-.213 0-.425-.015-.636A10 10 0 0 0 28 8.556a9.8 9.8 0 0 1-2.828.776a4.94 4.94 0 0 0 2.164-2.724a9.9 9.9 0 0 1-3.126 1.195a4.929 4.929 0 0 0-8.392 4.491A13.98 13.98 0 0 1 5.67 7.15a4.93 4.93 0 0 0 1.525 6.573a4.9 4.9 0 0 1-2.235-.617v.063a4.926 4.926 0 0 0 3.95 4.827a4.9 4.9 0 0 1-2.223.084a4.93 4.93 0 0 0 4.6 3.42A9.88 9.88 0 0 1 4 23.54a13.94 13.94 0 0 0 7.547 2.209"},null,-1),Se=[Me];function Ce(t,e){return f(),W("svg",Re,[...Se])}const Ee=ct({name:"carbon-logo-twitter",render:Ce}),_e={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Te=g("path",{fill:"currentColor","fill-rule":"evenodd",d:"M16 2a14 14 0 0 0-4.43 27.28c.7.13 1-.3 1-.67v-2.38c-3.89.84-4.71-1.88-4.71-1.88a3.7 3.7 0 0 0-1.62-2.05c-1.27-.86.1-.85.1-.85a2.94 2.94 0 0 1 2.14 1.45a3 3 0 0 0 4.08 1.16a2.93 2.93 0 0 1 .88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4 5.4 0 0 1 1.44-3.76a5 5 0 0 1 .14-3.7s1.17-.38 3.85 1.43a13.3 13.3 0 0 1 7 0c2.67-1.81 3.84-1.43 3.84-1.43a5 5 0 0 1 .14 3.7a5.4 5.4 0 0 1 1.44 3.76c0 5.38-3.27 6.56-6.39 6.91a3.33 3.33 0 0 1 .95 2.59v3.84c0 .46.25.81 1 .67A14 14 0 0 0 16 2"},null,-1),We=[Te];function De(t,e){return f(),W("svg",_e,[...We])}const Le=ct({name:"carbon-logo-github",render:De}),He={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},$e=g("path",{fill:"currentColor",d:"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z"},null,-1),Oe=[$e];function Pe(t,e){return f(),W("svg",He,[...Oe])}const Ie=ct({name:"carbon-sun",render:Pe}),je={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},ke=g("path",{fill:"currentColor",d:"M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3"},null,-1),Be=[ke];function Fe(t,e){return f(),W("svg",je,[...Be])}const Ye=ct({name:"carbon-moon",render:Fe}),Ue=(t,e)=>{const i=t.__vccOpts||t;for(const[o,s]of e)i[o]=s;return i},Xe={},Ne={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 134 134"},Ve=de('',8),Ze=[Ve];function qe(t,e){return f(),W("svg",Ne,Ze)}const Ge=Ue(Xe,[["render",qe]]),Qe="modulepreload",Ke=function(t){return"/"+t},Ht={},Rn=function(e,i,o){let s=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),a=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));s=Promise.all(i.map(h=>{if(h=Ke(h),h in Ht)return;Ht[h]=!0;const r=h.endsWith(".css"),c=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${c}`))return;const l=document.createElement("link");if(l.rel=r?"stylesheet":Qe,r||(l.as="script",l.crossOrigin=""),l.href=h,a&&l.setAttribute("nonce",a),document.head.appendChild(l),r)return new Promise((u,d)=>{l.addEventListener("load",u),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${h}`)))})}))}return s.then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},Zt=me(),Je=pe(Zt);function ti(t){return fe()?(ve(t),!0):!1}function ei(){const t=new Set,e=i=>{t.delete(i)};return{on:i=>{t.add(i);const o=()=>e(i);return ti(o),{off:o}},off:e,trigger:(...i)=>Promise.all(Array.from(t).map(o=>o(...i)))}}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function $t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,o)}return i}function w(t){for(var e=1;e=0||(l[r]=a[r]);return l}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}function F(t){return function(e){if(Array.isArray(e))return pt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,i){if(e){if(typeof e=="string")return pt(e,i);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return pt(e,i)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +import{m as ct,c as W,o as f,a as g,b as de,u as me,d as pe,r as mt,h as ge,g as fe,e as ve,f as Ct,i as rt,j as Q,k as A,l as at,n as z,p as Y,q as j,w as B,F as Dt,s as Lt,t as Xt,v as Nt,x as Vt,y as ht,z as be,A as we,B as ye,C as yt,D as ze,E as Ae}from"./vendor-moUb9exr.js";import{c as xe}from"./large-DdnQ63On.js";import"./index-Bex626j_.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function i(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(s){if(s.ep)return;s.ep=!0;const n=i(s);fetch(s.href,n)}})();const Re={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Me=g("path",{fill:"currentColor",d:"M11.548 25.752c9.056 0 14.01-7.503 14.01-14.01c0-.213 0-.425-.015-.636A10 10 0 0 0 28 8.556a9.8 9.8 0 0 1-2.828.776a4.94 4.94 0 0 0 2.164-2.724a9.9 9.9 0 0 1-3.126 1.195a4.929 4.929 0 0 0-8.392 4.491A13.98 13.98 0 0 1 5.67 7.15a4.93 4.93 0 0 0 1.525 6.573a4.9 4.9 0 0 1-2.235-.617v.063a4.926 4.926 0 0 0 3.95 4.827a4.9 4.9 0 0 1-2.223.084a4.93 4.93 0 0 0 4.6 3.42A9.88 9.88 0 0 1 4 23.54a13.94 13.94 0 0 0 7.547 2.209"},null,-1),Se=[Me];function Ce(t,e){return f(),W("svg",Re,[...Se])}const Ee=ct({name:"carbon-logo-twitter",render:Ce}),_e={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Te=g("path",{fill:"currentColor","fill-rule":"evenodd",d:"M16 2a14 14 0 0 0-4.43 27.28c.7.13 1-.3 1-.67v-2.38c-3.89.84-4.71-1.88-4.71-1.88a3.7 3.7 0 0 0-1.62-2.05c-1.27-.86.1-.85.1-.85a2.94 2.94 0 0 1 2.14 1.45a3 3 0 0 0 4.08 1.16a2.93 2.93 0 0 1 .88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4 5.4 0 0 1 1.44-3.76a5 5 0 0 1 .14-3.7s1.17-.38 3.85 1.43a13.3 13.3 0 0 1 7 0c2.67-1.81 3.84-1.43 3.84-1.43a5 5 0 0 1 .14 3.7a5.4 5.4 0 0 1 1.44 3.76c0 5.38-3.27 6.56-6.39 6.91a3.33 3.33 0 0 1 .95 2.59v3.84c0 .46.25.81 1 .67A14 14 0 0 0 16 2"},null,-1),We=[Te];function De(t,e){return f(),W("svg",_e,[...We])}const Le=ct({name:"carbon-logo-github",render:De}),He={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},$e=g("path",{fill:"currentColor",d:"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z"},null,-1),Oe=[$e];function Pe(t,e){return f(),W("svg",He,[...Oe])}const Ie=ct({name:"carbon-sun",render:Pe}),je={viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},ke=g("path",{fill:"currentColor",d:"M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3"},null,-1),Be=[ke];function Fe(t,e){return f(),W("svg",je,[...Be])}const Ye=ct({name:"carbon-moon",render:Fe}),Ue=(t,e)=>{const i=t.__vccOpts||t;for(const[o,s]of e)i[o]=s;return i},Xe={},Ne={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 134 134"},Ve=de('',8),Ze=[Ve];function qe(t,e){return f(),W("svg",Ne,Ze)}const Ge=Ue(Xe,[["render",qe]]),Qe="modulepreload",Ke=function(t){return"/we-cropper/"+t},Ht={},Rn=function(e,i,o){let s=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),a=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));s=Promise.all(i.map(h=>{if(h=Ke(h),h in Ht)return;Ht[h]=!0;const r=h.endsWith(".css"),c=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${c}`))return;const l=document.createElement("link");if(l.rel=r?"stylesheet":Qe,r||(l.as="script",l.crossOrigin=""),l.href=h,a&&l.setAttribute("nonce",a),document.head.appendChild(l),r)return new Promise((u,d)=>{l.addEventListener("load",u),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${h}`)))})}))}return s.then(()=>e()).catch(n=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=n,window.dispatchEvent(a),!a.defaultPrevented)throw n})},Zt=me(),Je=pe(Zt);function ti(t){return fe()?(ve(t),!0):!1}function ei(){const t=new Set,e=i=>{t.delete(i)};return{on:i=>{t.add(i);const o=()=>e(i);return ti(o),{off:o}},off:e,trigger:(...i)=>Promise.all(Array.from(t).map(o=>o(...i)))}}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function $t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,o)}return i}function w(t){for(var e=1;e=0||(l[r]=a[r]);return l}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(s[i]=t[i])}return s}function F(t){return function(e){if(Array.isArray(e))return pt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,i){if(e){if(typeof e=="string")return pt(e,i);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return pt(e,i)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function pt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i=a.height||d===1?"width":"height"),m==="width"){var v=l/d-a.height;if(c.top&&c.bottom){var b=r.top,E=r.bottom;r.bottom=nt(v,E,b),r.top=nt(v,b,E)}else c.bottom?r.bottom=v:c.top?r.top=v:c.right?r.right=0:c.left&&(r.left=0)}else if(m==="height"){var O=a.width-u*d;if(c.left&&c.right){var Z=r.left,J=r.right;r.left=-nt(O,Z,J),r.right=-nt(O,J,Z)}else c.left?r.left=-O:c.right?r.right=-O:c.top?r.top=0:c.bottom&&(r.bottom=0)}r=Yt({directions:r,coordinates:a,sizeRestrictions:n,positionRestrictions:s,preserveRatio:!0,compensate:h.compensate})}return l=L(a,r).width,u=L(a,r).height,(d=h.preserveRatio?y(a):ft(l/u,o))&&Math.abs(d-l/u)>.001&&H.forEach(function(q){c[q]||(r[q]=0)}),Mt({event:new Et({left:-r.left,top:-r.top}),coordinates:{width:i.width+r.right+r.left,height:i.height+r.top+r.bottom,left:i.left,top:i.top},positionRestrictions:s})}},moveAlgorithm:{type:Function,default:Mt},initStretcher:{type:Function,default:function(t){var e=t.stretcher,i=t.imageSize,o=y(i);e.style.width=i.width+"px",e.style.height=e.clientWidth/o+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,i=t.coordinates,o=t.aspectRatio,s=t.sizeRestrictions,n=t.positionRestrictions,a=p(p({},i),I({width:i.width,height:i.height,aspectRatio:o,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,s.minHeight),minWidth:Math.min(e.width,s.minWidth)}}));return a=S(a=C(a,X(M(i),M(a))),dt($(e),n))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,i=t.boundaries,o=t.getAreaRestrictions,s=t.coordinates,n=p({},e);n.height=n.width/y(i),n.top+=(e.height-n.height)/2,(s.height-n.height>0||s.width-n.width>0)&&(n=T(n,Math.max(s.height/n.height,s.width/n.width)));var a=lt(V(s,$(n=T(n,ut(n,o({visibleArea:n,type:"resize"}))))));return n.widthy(o)?(a={top:0,bottom:o.height},e&&n==="move"&&(e.width>o.width?(a.left=-(e.width-o.width)/2,a.right=o.width-a.left):(a.left=0,a.right=o.width))):(a={left:0,right:o.width},e&&n==="move"&&(e.height>o.height?(a.top=-(e.height-o.height)/2,a.bottom=o.height-a.top):(a.top=0,a.bottom=o.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,i={};return t.imageRestriction!=="none"&&(i={left:0,top:0,right:e.width,bottom:e.height}),i}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:w({},jt)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=xt(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:xt(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:R(this.minWidth)?0:et(this.minWidth),minHeight:R(this.minHeight)?0:et(this.minHeight),maxWidth:R(this.maxWidth)?1/0:et(this.maxWidth),maxHeight:R(this.maxHeight)?1/0:et(this.maxHeight)});if(t=function(o){var s=o.areaRestrictions,n=o.sizeRestrictions,a=o.boundaries,h=o.positionRestrictions,r=p(p({},n),{minWidth:n.minWidth!==void 0?n.minWidth:0,minHeight:n.minHeight!==void 0?n.minHeight:0,maxWidth:n.maxWidth!==void 0?n.maxWidth:1/0,maxHeight:n.maxHeight!==void 0?n.maxHeight:1/0});h.left!==void 0&&h.right!==void 0&&(r.maxWidth=Math.min(r.maxWidth,h.right-h.left)),h.bottom!==void 0&&h.top!==void 0&&(r.maxHeight=Math.min(r.maxHeight,h.bottom-h.top));var c=Rt(s),l=ee(a,c);return c.width<1/0&&(!r.maxWidth||r.maxWidth>l.width)&&(r.maxWidth=Math.min(r.maxWidth,l.width)),c.height<1/0&&(!r.maxHeight||r.maxHeight>l.height)&&(r.maxHeight=Math.min(r.maxHeight,l.height)),r.minWidth>r.maxWidth&&(r.minWidth=r.maxWidth,r.widthFrozen=!0),r.minHeight>r.maxHeight&&(r.minHeight=r.maxHeight,r.heightFrozen=!0),r}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),i=Rt(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,i.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,i.height*e.height/this.boundaries.height),t.maxWidththis.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},i={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},o=w(w({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),s={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-i.left-this.imageTransforms.translateX,"px, ").concat(-e.top-i.top-this.imageTransforms.translateY,"px)")+re(o)};return this.transitionsOptions.enabled&&(s.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),s}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(i){return t[i]!==e[i]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=At(this.update,this.debounce),this.debouncedDisableTransitions=At(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(w({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:w({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var i=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?w({},this.visibleArea):null,imageTransforms:e,get canvas(){return i.canvas?i.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?w({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,s=o===void 0||o;this.onManipulateImage(new G({},{factor:1/t,center:e}),{normalize:!1,transitions:s})},move:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,s=o===void 0||o;this.onManipulateImage(new G({left:t||0,top:e||0}),{normalize:!1,transitions:s})},setCoordinates:function(t){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.autoZoom,s=o===void 0||o,n=i.transitions,a=n===void 0||n;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),s&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var i=e.coordinates,o=e.sizeRestrictions,s=e.positionRestrictions,n={width:Math.round(i.width),height:Math.round(i.height),left:Math.round(i.left),top:Math.round(i.top)};return n.width>o.maxWidth?n.width=Math.floor(i.width):n.widtho.maxHeight?n.height=Math.floor(i.height):n.height1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i!==void 0&&i,s=ii(e,Di),n=this.processAutoZoom(t,this.visibleArea,this.coordinates,s),a=n.visibleArea,h=n.coordinates,r=n.changed;o&&r&&this.enableTransitions(),this.visibleArea=a,this.coordinates=h,o&&r&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var i=e.event,o=e.visibleArea,s=e.coefficient;if(i.type==="manipulateImage")return p(p({},i),{move:{left:i.move&&i.move.left?s*i.move.left:0,top:i.move&&i.move.top?s*i.move.top:0},scale:{factor:i.scale&&i.scale.factor?i.scale.factor:1,center:i.scale&&i.scale.center?{left:i.scale.center.left*s+o.left,top:i.scale.center.top*s+o.top}:null}});if(i.type==="resize"){var n=p(p({},i),{directions:p({},i.directions)});return H.forEach(function(h){n.directions[h]*=s}),n}if(i.type==="move"){var a=p(p({},i),{directions:p({},i.directions)});return ci.forEach(function(h){a.directions[h]*=s}),a}return i}(w(w({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,i=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(h,r,c){var l=c.rotate,u=c.flip,d={width:r.naturalWidth,height:r.naturalHeight},m=ie(d,l),v=h.getContext("2d");h.height=m.height,h.width=m.width,v.save();var b=k(M(p({left:0,top:0},d)),l);return v.translate(-(b.left-m.width/2),-(b.top-m.height/2)),v.rotate(l*Math.PI/180),v.translate(u.horizontal?d.width:0,u.vertical?d.height:0),v.scale(u.horizontal?-1:1,u.vertical?-1:1),v.drawImage(r,0,0,d.width,d.height),v.restore(),h}(this.$refs.sourceCanvas,e,this.imageTransforms):e,o=w({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),s=function(h){return h.find(function(r){return c=r,!Number.isNaN(parseFloat(c))&&isFinite(c);var c})},n=I({sizeRestrictions:{minWidth:s([o.width,o.minWidth])||0,minHeight:s([o.height,o.minHeight])||0,maxWidth:s([o.width,o.maxWidth])||1/0,maxHeight:s([o.height,o.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(o.maxArea&&n.width*n.height>o.maxArea){var a=Math.sqrt(o.maxArea/(n.width*n.height));n={width:Math.round(a*n.width),height:Math.round(a*n.height)}}return function(h,r,c,l,u){h.width=l?l.width:c.width,h.height=l?l.height:c.height;var d=h.getContext("2d");d.clearRect(0,0,h.width,h.height),u&&(u.imageSmoothingEnabled&&(d.imageSmoothingEnabled=u.imageSmoothingEnabled),u.imageSmoothingQuality&&(d.imageSmoothingQuality=u.imageSmoothingQuality),u.fillColor&&(d.fillStyle=u.fillColor,d.fillRect(0,0,h.width,h.height),d.save()));var m=c.left<0?-c.left:0,v=c.top<0?-c.top:0;d.drawImage(r,c.left+m,c.top+v,c.width,c.height,m*(h.width/c.width),v*(h.height/c.height),h.width,h.height)}(t,i,this.coordinates,n,o),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.visibleArea&&e?ui(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,o=this.visibleArea&&e?it(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return di({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:i,positionRestrictions:o,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?bi:vi);var i=this.sizeRestrictions;i.minWidth,i.minHeight,i.maxWidth,i.maxHeight;var o=U(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,s=this.defaultPosition||fi,n=[o,function(a){var h=a.coordinates;return w({},U(s)?s({coordinates:h,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&n.push.apply(n,F(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(n,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,i=this.$refs.cropper;return this.initStretcher({cropper:i,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var o={cropper:i,imageSize:t.imageSize};if(U(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(o):t.defaultBoundaries==="fit"?t.boundaries=function(s){var n=s.cropper,a=s.imageSize,h=n.clientHeight,r=n.clientWidth,c=h,l=a.width*h/a.height;return l>r&&(l=r,c=a.height*r/a.width),{width:l,height:c}}(o):t.boundaries=function(s){var n=s.cropper;return{width:n.clientWidth,height:n.clientHeight}}(o),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=w(w({},this.defaultImageTransforms),{},{flip:w({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,i,o,s,n,a,h=t.defaultVisibleArea||wi;t.visibleArea=U(h)?h({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},i=e.visibleArea,o=e.boundaries,s=e.getAreaRestrictions,n=p({},i),a=y(o),n.width/n.height!==a&&(n.height=n.width/a),S(n,s({visibleArea:n,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(s){if(Pt(s))return!1;var n=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(s)||[],h={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},r=function(c){return c.port||((c.protocol||n.protocol)==="http"?80:433)};return!(!h.protocol&&!h.host&&!h.port||h.protocol&&h.protocol==n.protocol&&h.host&&h.host==n.host&&h.host&&r(h)==r(n))}(this.src)){var i=R(this.crossOrigin)?this.canvas:this.crossOrigin;i===!0&&(i="anonymous"),this.imageAttributes.crossOrigin=i||null}if(this.checkOrientation){var o=(t=this.src,new Promise(function(s){Ti(t).then(function(n){var a=Wi(n);s(n?{source:t,arrayBuffer:n,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(n){console.warn(n),s({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){o.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,i=t.source,o=t.arrayBuffer,s=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,o&&s&&s>1?Gt(i)||!Pt(i)?(this.imageAttributes.src=URL.createObjectURL(new Blob([o])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(n){for(var a=[],h=new Uint8Array(n);h.length>0;){var r=h.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(r):r.slice())),h=h.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(o):this.imageAttributes.src=i,U(this.defaultTransforms)?this.appliedImageTransforms=bt(this.defaultTransforms()):st(this.defaultTransforms)?this.appliedImageTransforms=bt(this.defaultTransforms):this.appliedImageTransforms=function(n){var a=bt({});if(n)switch(n){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(s),this.defaultImageTransforms=w(w({},this.appliedImageTransforms),{},{flip:w({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var n=e.$refs.image;n&&n.complete&&(function(a){return!!a.naturalWidth}(n)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(w(w({},e.getPublicProperties()),{},{positionRestrictions:it(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var i=e.sizeRestrictions,o=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(w(w({},e.getPublicProperties()),{},{positionRestrictions:it(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(i.maxWidth,e.visibleArea.width),maxHeight:Math.min(i.maxHeight,e.visibleArea.height),minWidth:Math.max(i.minWidth,o),minHeight:Math.max(i.minHeight,o)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var i=e.transitions,o=i!==void 0&&i,s=e.normalize,n=s===void 0||s;o&&this.enableTransitions();var a=yi(w(w({},this.getPublicProperties()),{},{event:n?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),h=a.visibleArea,r=a.coordinates;this.visibleArea=h,this.coordinates=r,this.runAutoZoom("manipulateImage"),this.onChange(),o&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,i=t.type,o=i===void 0?"move":i;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:o})},getAspectRatio:function(t){var e,i,o=this.stencilProps,s=o.aspectRatio,n=o.minAspectRatio,a=o.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var h=this.$refs.stencil.aspectRatios();e=h.minimum,i=h.maximum}if(R(e)&&(e=R(s)?n:s),R(i)&&(i=R(s)?a:s),!t&&(R(e)||R(i))){var r=this.getStencilSize(),c=r?y(r):null;R(e)&&(e=It(c)?c:void 0),R(i)&&(i=It(c)?c:void 0)}return{minimum:e,maximum:i}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,i=t.stencilSize,o=t.aspectRatio,ft(y(s=U(i)?i({boundaries:e,aspectRatio:o}):i),o)&&(s=I({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:s.width,height:s.height,aspectRatio:{minimum:o.minimum,maximum:o.maximum}})),(s.width>e.width||s.height>e.height)&&(s=I({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:s.width,height:s.height,aspectRatio:{minimum:y(s),maximum:y(s)}})),s;var t,e,i,o,s},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return w({},jt)},flip:function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.transitions,s=o===void 0||o;if(!this.transitionsActive){s&&this.enableTransitions();var n=w({},this.imageTransforms.flip),a=Ai({flip:{horizontal:t?!n.horizontal:n.horizontal,vertical:e?!n.vertical:n.vertical},previousFlip:n,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),h=a.visibleArea,r=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=h,this.coordinates=r,this.onChange(),s&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=e.transitions,o=i===void 0||i;if(!this.transitionsActive){o&&this.enableTransitions();var s=w({},this.imageSize);this.appliedImageTransforms.rotate+=t;var n=zi({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:s,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=n.visibleArea,h=n.coordinates,r=this.processAutoZoom("rotateImage",a,h);a=r.visibleArea,h=r.coordinates,this.visibleArea=a,this.coordinates=h,this.onChange(),o&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Li={key:0,ref:"canvas",style:{display:"none"}},Hi={key:1,ref:"sourceCanvas",style:{display:"none"}};ue.render=function(t,e,i,o,s,n){return f(),z("div",{ref:"cropper",class:n.classes.cropper},[A("div",{ref:"stretcher",class:n.classes.stretcher},null,2),A("div",{class:n.classes.boundaries,style:n.boundariesStyle},[(f(),z(ht(i.backgroundWrapperComponent),{class:n.classes.cropperWrapper,"wheel-resize":n.settings.resizeImage.wheel,"touch-resize":n.settings.resizeImage.touch,"touch-move":n.settings.moveImage.touch,"mouse-move":n.settings.moveImage.mouse,onMove:n.onManipulateImage,onResize:n.onManipulateImage},{default:B(function(){return[A("div",{class:n.classes.background,style:n.boundariesStyle},null,6),A("div",{class:n.classes.imageWrapper},[A("img",{ref:"image",crossorigin:s.imageAttributes.crossOrigin,src:s.imageAttributes.src,class:n.classes.image,style:n.imageStyle,onMousedown:e[1]||(e[1]=be(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),A("div",{class:n.classes.foreground,style:n.boundariesStyle},null,6),Xt((f(),z(ht(i.stencilComponent),Vt({ref:"stencil",image:n.image,coordinates:s.coordinates,"stencil-coordinates":n.stencilCoordinates,transitions:n.transitionsOptions},i.stencilProps,{onResize:n.onResize,onResizeEnd:n.onResizeEnd,onMove:n.onMove,onMoveEnd:n.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Nt,s.imageLoaded]]),i.canvas?(f(),z("canvas",Li,null,512)):Q("",!0),i.canvas?(f(),z("canvas",Hi,null,512)):Q("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const $i={key:0,class:"uno-rgfbq5"},Oi={key:0,class:"uno-ilmauu"},Pi=g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24"},[g("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:"0.5"}),g("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[g("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})])],-1),Ii=g("span",null,"加载中...",-1),ji=[Pi,Ii],ki={class:"uno-91fill"},Bi={class:"uno-rzw4mv"},Fi={class:"uno-ynbxwu",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Yi=Ct({__name:"cropper",props:{modelValue:{type:Boolean,default:!1},src:{},aspectRatio:{default:1/1}},emits:["update:modelValue","crop"],setup(t,{emit:e}){const i=t,o=e,s=rt(),n=rt(!0);function a(){n.value=!1}function h(){const{canvas:u}=s.value.getResult(),d=u.toDataURL();o("crop",d),o("update:modelValue",!1)}function r(u){s.value.rotate(u)}function c(){s.value.reset()}function l(){o("update:modelValue",!1)}return(u,d)=>i.modelValue?(f(),W("div",$i,[n.value?(f(),W("div",Oi,ji)):Q("",!0),A(at(ue),{ref_key:"cropper",ref:s,class:"uno-g5i2o3",bsrc:"https://0.z.wiki/autoupload/20240708/BSGF/1130X750/65535_53035727810_fce2af1c7e_h_750_1130_nofilter.jp",src:u.src,"auto-zoom":!0,"stencil-props":{movable:!1,aspectRatio:i.aspectRatio,handlers:{eastNorth:!0,north:!1,westNorth:!0,west:!1,westSouth:!0,south:!1,eastSouth:!0,east:!1}},"image-restriction":"stencil","resize-image":{touch:!1,wheel:!1},"min-width":300,"min-height":300,onReady:a},null,8,["src","stencil-props"]),g("div",ki,[g("div",Bi,[(f(),W("svg",Fi,[g("path",{fill:"currentColor",d:"M18 14v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2M13.914 2.914L11.828 5H14a8 8 0 0 1 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5L8 6l1.414-1.414L12.5 1.5z",onClick:d[0]||(d[0]=m=>r(-90))})])),g("div",{onClick:c}," 还原 ")]),g("div",{class:"uno-rzw4mv"},[g("div",{onClick:l}," 取消 "),g("div",{onClick:h}," 确定 ")])])])):Q("",!0)}});function Ui(t){if(!t)throw new Error("file is required");return new Promise((e,i)=>{const o=new FileReader;o.readAsDataURL(t),o.onload=()=>e(o.result),o.onerror=()=>i(o.error)})}const{on:Xi,trigger:Ni}=ei();function Vi(t){const e=document.body,i={src:t.src,modelValue:!0,"onUpdate:modelValue":s=>{s||mt(null,e)},onCrop:s=>{Ni(s)},...t};async function o(s){const n=ge(Yi,s);mt(n,e)}return o(i),()=>{mt(null,e)}}function Zi(t={}){return{onCrop:Xi,showCropper:e=>{const i={src:e,...t};Vi(i)}}}const qi={class:"space-y-4 p-6 bg-gray-100 dark:bg-[#262335] rounded-lg"},Gi={class:"flex gap-2"},Qi={key:0,class:"border-2 border-green border-solid bg-gray-300 p-1 size-50"},Ki=["src"],Ji=Ct({__name:"Playground",setup(t){const{showCropper:e,onCrop:i}=Zi({aspectRatio:1}),{open:o,onChange:s}=we({multiple:!1,accept:"image/*"}),n=rt("");s(async h=>{if(!h)return;const r=await Ui(h[0]);e(r)}),i(h=>{n.value=h});function a(){n.value=""}return(h,r)=>(f(),W("div",qi,[g("div",Gi,[g("button",{type:"button",class:"bg-[color:#44bd87] text-white border-b-[#249252] rounded align-middle px-[15px] py-[3px] border-b-2 border-none border-solid outline-none text-shadow-[1px_1px_1px_#249252] hover:bg-[#19633b] active:border-b-0 active:border-t-2 active:border-t-[#19633b]",onClick:r[0]||(r[0]=c=>at(o)())}," Choose file "),g("button",{type:"button",class:"bg-[color:#44bd87] text-white border-b-[#249252] rounded align-middle px-[15px] py-[3px] border-b-2 border-none border-solid outline-none text-shadow-[1px_1px_1px_#249252] hover:bg-[#19633b] active:border-b-0 active:border-t-2 active:border-t-[#19633b]",onClick:r[1]||(r[1]=c=>a())}," Reset ")]),n.value?(f(),W("div",Qi,[g("img",{src:n.value,class:"w-full h-full object-center object-cover",alt:"图片"},null,8,Ki)])):Q("",!0)]))}}),tn={class:"w-full h-full min-h-screen bg-neutral-50 dark:bg-neutral-900"},en={class:"container mx-auto max-w-5xl relative"},nn={class:"h-20 px-4 sm:px-0 py-4 flex-between text-primary"},on={class:"font-semibold text-xl flex-center gap-2"},sn={class:"flex-center gap-4"},rn={class:"opacity-50 hover:opacity-100 transition",href:"https://github.com/lizyChy0329"},an=g("header",{class:"px-4 sm:px-0 py-10"},[g("div",{class:"font-extrabold space-y-4"},[g("span",{class:"text-6xl text-primary"},"Simply Cropping"),g("div",{class:"text-6xl text-primary"},[yt(" Like "),g("span",{"text-neon":""},"WeChat!")])]),g("div",{class:"text-2xl font-semibold text-slate-700 py-4 dark:text-slate-200"}," A wechat style image cropper wrapped with vue-advanced-cropper ")],-1),hn={"space-y-4":"","px-4":"","sm:px-0":""},cn=g("h2",{class:"text-2xl font-bold my-4 text-primary"}," Demo ",-1),ln=g("h2",{class:"text-2xl font-bold text-primary"}," Install ",-1),un=["innerHTML"],dn={class:"py-16 w-full flex-center text-primary",text:"slate-900 dark:slate-300 opacity-60 sm"},mn={class:"copyright flex flex-col justify-center items-center"},pn=g("a",{class:"text-neon",href:"https://github.com/lizyChy0329"}," @lizyChy0329 ",-1),gn={class:"flex items-center space-x-1"},fn=g("span",null,[g("a",{href:"https://x.com/lizyChy0329",class:"text-neon",target:"_blank"}," Follow me on Twitter ")],-1),vn=g("div",{class:"w-full mx-auto"},null,-1),bn=`# install > pnpm i @lizychy0329/we-cropper `,wn=Ct({__name:"App",setup(t){const e=rt("");return ye(async()=>{e.value=await xe(bn,{lang:"shell",themes:{light:"min-light",dark:"synthwave-84"}})}),(i,o)=>{const s=Ge,n=Ye,a=Ie,h=Le,r=Ee;return f(),W("div",tn,[g("div",en,[g("nav",nn,[g("div",on,[A(s,{class:"h-6 w-6"}),yt(" we-cropper ")]),g("div",sn,[g("button",{class:"!bg-transparent opacity-50 hover:opacity-100 transition",onClick:o[0]||(o[0]=c=>at(Je)())},[at(Zt)?(f(),z(n,{key:0,class:"w-6 h-6"})):(f(),z(a,{key:1,class:"w-6 h-6"}))]),g("a",rn,[A(h,{class:"h-6 w-6"})])])]),an,g("div",hn,[cn,A(Ji),ln,g("main",{class:"text-xs 2xl:text-sm drop-shadow-sm dark:drop-shadow-color-gray-700 [&>pre]:p-4 [&>pre]:rounded-xl [&>pre]:bg-transparent",innerHTML:e.value},null,8,un)]),g("footer",dn,[g("div",mn,[g("p",null,[yt(" Code with ❤ & ☕️ by "),pn,g("span",null," © "+ze(new Date().getFullYear()),1)]),g("p",gn,[A(r,{class:"text-emerald-500"}),fn])])]),vn])])}}}),yn=Ae(wn);yn.mount("#app");export{Rn as _}; -//# sourceMappingURL=index-32jvP77A.js.map +//# sourceMappingURL=index-Bex626j_.js.map diff --git a/docs/assets/index-32jvP77A.js.map b/docs/assets/index-Bex626j_.js.map similarity index 99% rename from docs/assets/index-32jvP77A.js.map rename to docs/assets/index-Bex626j_.js.map index 12d7799..4095b88 100644 --- a/docs/assets/index-32jvP77A.js.map +++ b/docs/assets/index-Bex626j_.js.map @@ -1 +1 @@ -{"version":3,"file":"index-32jvP77A.js","sources":["../../src/components/Logo.vue","../../src/composables/useDarkmode.ts","../../dist/index.js","../../src/components/Playground.vue","../../src/App.vue","../../src/main.ts"],"sourcesContent":["\n","import { useDark, useToggle } from '@vueuse/core'\n\nexport const isDark = useDark()\nexport const toggleDarkmode = useToggle(isDark)\n","import \"./style.css\";\nimport { getCurrentScope as re, onScopeDispose as ae, openBlock as w, createBlock as y, renderSlot as X, resolveComponent as j, createVNode as S, withCtx as k, Fragment as Ct, renderList as Et, resolveDynamicComponent as ot, withDirectives as kt, vShow as Ut, mergeProps as Xt, withModifiers as he, createCommentVNode as st, defineComponent as ce, ref as Tt, createElementBlock as ct, unref as le, createElementVNode as E, render as lt, h as ue } from \"vue\";\nfunction de(t) {\n return re() ? (ae(t), !0) : !1;\n}\nfunction me() {\n const t = /* @__PURE__ */ new Set(), e = (s) => {\n t.delete(s);\n };\n return {\n on: (s) => {\n t.add(s);\n const n = () => e(s);\n return de(n), {\n off: n\n };\n },\n off: e,\n trigger: (...s) => Promise.all(Array.from(t).map((n) => n(...s)))\n };\n}\ntypeof WorkerGlobalScope != \"undefined\" && globalThis instanceof WorkerGlobalScope;\nfunction Wt(t, e) {\n var i = Object.keys(t);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(t);\n e && (o = o.filter(function(s) {\n return Object.getOwnPropertyDescriptor(t, s).enumerable;\n })), i.push.apply(i, o);\n }\n return i;\n}\nfunction v(t) {\n for (var e = 1; e < arguments.length; e++) {\n var i = arguments[e] != null ? arguments[e] : {};\n e % 2 ? Wt(Object(i), !0).forEach(function(o) {\n T(t, o, i[o]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Wt(Object(i)).forEach(function(o) {\n Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(i, o));\n });\n }\n return t;\n}\nfunction T(t, e, i) {\n return e in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;\n}\nfunction fe(t, e) {\n if (t == null) return {};\n var i, o, s = function(a, h) {\n if (a == null) return {};\n var r, c, u = {}, l = Object.keys(a);\n for (c = 0; c < l.length; c++) r = l[c], h.indexOf(r) >= 0 || (u[r] = a[r]);\n return u;\n }(t, e);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(t);\n for (o = 0; o < n.length; o++) i = n[o], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (s[i] = t[i]);\n }\n return s;\n}\nfunction U(t) {\n return function(e) {\n if (Array.isArray(e)) return ut(e);\n }(t) || function(e) {\n if (typeof Symbol != \"undefined\" && e[Symbol.iterator] != null || e[\"@@iterator\"] != null) return Array.from(e);\n }(t) || function(e, i) {\n if (e) {\n if (typeof e == \"string\") return ut(e, i);\n var o = Object.prototype.toString.call(e).slice(8, -1);\n if (o === \"Object\" && e.constructor && (o = e.constructor.name), o === \"Map\" || o === \"Set\") return Array.from(e);\n if (o === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return ut(e, i);\n }\n }(t) || function() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n}\nfunction ut(t, e) {\n (e == null || e > t.length) && (e = t.length);\n for (var i = 0, o = new Array(e); i < e; i++) o[i] = t[i];\n return o;\n}\nvar Dt, pe, K, z = (Dt = function(t) {\n /*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n */\n (function() {\n var e = {}.hasOwnProperty;\n function i() {\n for (var o = [], s = 0; s < arguments.length; s++) {\n var n = arguments[s];\n if (n) {\n var a = typeof n;\n if (a === \"string\" || a === \"number\") o.push(n);\n else if (Array.isArray(n)) {\n if (n.length) {\n var h = i.apply(null, n);\n h && o.push(h);\n }\n } else if (a === \"object\") if (n.toString === Object.prototype.toString) for (var r in n) e.call(n, r) && n[r] && o.push(r);\n else o.push(n.toString());\n }\n }\n return o.join(\" \");\n }\n t.exports ? (i.default = i, t.exports = i) : window.classNames = i;\n })();\n}, Dt(K = { path: pe, exports: {}, require: function(t, e) {\n return function() {\n throw new Error(\"Dynamic requires are not currently supported by @rollup/plugin-commonjs\");\n }(e == null && K.path);\n} }, K.exports), K.exports), D = function(t) {\n return function(e, i) {\n if (!e) return t;\n var o;\n typeof e == \"string\" ? o = e : i = e;\n var s = t;\n return o && (s += \"__\" + o), s + (i ? Object.keys(i).reduce(function(n, a) {\n var h = i[a];\n return h && (n += \" \" + (typeof h == \"boolean\" ? s + \"--\" + a : s + \"--\" + a + \"_\" + h)), n;\n }, \"\") : \"\");\n };\n};\nfunction vt(t, e, i) {\n var o, s, n, a, h;\n function r() {\n var u = Date.now() - a;\n u < e && u >= 0 ? o = setTimeout(r, e - u) : (o = null, i || (h = t.apply(n, s), n = s = null));\n }\n e == null && (e = 100);\n var c = function() {\n n = this, s = arguments, a = Date.now();\n var u = i && !o;\n return o || (o = setTimeout(r, e)), u && (h = t.apply(n, s), n = s = null), h;\n };\n return c.clear = function() {\n o && (clearTimeout(o), o = null);\n }, c.flush = function() {\n o && (h = t.apply(n, s), n = s = null, clearTimeout(o), o = null);\n }, c;\n}\nvt.debounce = vt;\nvar bt = vt, f = function() {\n return f = Object.assign || function(t) {\n for (var e, i = 1, o = arguments.length; i < o; i++) for (var s in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);\n return t;\n }, f.apply(this, arguments);\n};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction Yt(t, e) {\n var i, o;\n return t && e ? (i = \"\" + t + e[0].toUpperCase() + e.slice(1), o = t + \"-\" + e) : (i = t || e, o = t || e), { name: i, classname: o };\n}\nfunction Ft(t) {\n return /^blob:/.test(t);\n}\nfunction Ht(t) {\n return Ft(t) || function(e) {\n return /^data:/.test(e);\n }(t);\n}\nfunction Y(t) {\n return !!(t && t.constructor && t.call && t.apply);\n}\nfunction A(t) {\n return t === void 0;\n}\nfunction nt(t) {\n return typeof t == \"object\" && t !== null;\n}\nfunction wt(t, e, i) {\n var o = {};\n return nt(t) ? (Object.keys(e).forEach(function(s) {\n A(t[s]) ? o[s] = e[s] : nt(e[s]) ? nt(t[s]) ? o[s] = wt(t[s], e[s], i[s]) : o[s] = t[s] ? e[s] : i[s] : e[s] === !0 || e[s] === !1 ? o[s] = !!t[s] : o[s] = t[s];\n }), o) : t ? e : i;\n}\nfunction J(t) {\n var e = Number(t);\n return Number.isNaN(e) ? t : e;\n}\nfunction Ot(t) {\n return typeof (t == \"number\" || /* @__PURE__ */ function(e) {\n return typeof e == \"object\" && e !== null;\n }(t) && toString.call(t) == \"[object Number]\") && !_t(t);\n}\nfunction _t(t) {\n return t != t;\n}\nfunction Nt(t, e) {\n return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));\n}\nvar Z = function(t, e) {\n t === void 0 && (t = {}), e === void 0 && (e = {}), this.type = \"manipulateImage\", this.move = t, this.scale = e;\n}, ge = function(t, e) {\n e === void 0 && (e = {}), this.type = \"resize\", this.directions = t, this.params = e;\n}, Rt = function(t) {\n this.type = \"move\", this.directions = t;\n}, ve = function() {\n function t(e, i, o, s, n) {\n this.type = \"drag\", this.nativeEvent = e, this.position = o, this.previousPosition = s, this.element = i, this.anchor = n;\n }\n return t.prototype.shift = function() {\n var e = this, i = e.element, o = e.anchor, s = e.position;\n if (i) {\n var n = i.getBoundingClientRect(), a = n.left, h = n.top;\n return { left: s.left - a - o.left, top: s.top - h - o.top };\n }\n return { left: 0, top: 0 };\n }, t;\n}(), Mt = { name: \"DraggableElement\", props: { classname: { type: String } }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n if (!this.$refs.draggable) throw new Error('You should add ref \"draggable\" to your root element to use draggable mixin');\n this.touches = [], this.hovered = !1;\n}, methods: { onMouseOver: function() {\n this.hovered || (this.hovered = !0, this.$emit(\"enter\"));\n}, onMouseLeave: function() {\n this.hovered && !this.touches.length && (this.hovered = !1, this.$emit(\"leave\"));\n}, onTouchStart: function(t) {\n t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = U(t.touches), this.hovered || (this.$emit(\"enter\"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {\n return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };\n }, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());\n}, onTouchEnd: function() {\n this.processEnd();\n}, onTouchMove: function(t) {\n this.touches.length && (this.processMove(t, t.touches), t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation());\n}, onMouseDown: function(t) {\n if (!this.disabled) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.initAnchor(e), t.stopPropagation();\n }\n}, onMouseMove: function(t) {\n this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.preventDefault());\n}, onMouseUp: function() {\n this.processEnd();\n}, initAnchor: function(t) {\n var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, o = e.right, s = e.bottom, n = e.top;\n this.anchor = { left: t.clientX - i, top: t.clientY - n, bottom: s - t.clientY, right: o - t.clientX };\n}, processMove: function(t, e) {\n var i = U(e);\n if (this.touches.length) {\n if (this.touches.length === 1 && i.length === 1) {\n var o = this.$refs.draggable;\n this.$emit(\"drag\", new ve(t, o, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));\n }\n this.touches = i;\n }\n}, processEnd: function() {\n this.touches.length && this.$emit(\"drag-end\"), this.hovered && (this.$emit(\"leave\"), this.hovered = !1), this.touches = [];\n} }, emits: [\"drag\", \"drag-end\", \"leave\", \"enter\"] };\nMt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"draggable\", class: i.classname, onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }), onMouseover: e[3] || (e[3] = function() {\n return n.onMouseOver && n.onMouseOver.apply(n, arguments);\n }), onMouseleave: e[4] || (e[4] = function() {\n return n.onMouseLeave && n.onMouseLeave.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 34);\n};\nvar dt = D(\"vue-handler-wrapper\"), Vt = { name: \"HandlerWrapper\", components: { DraggableElement: Mt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {\n var t;\n if (this.horizontalPosition || this.verticalPosition) {\n var e, i = Yt(this.horizontalPosition, this.verticalPosition);\n t = dt((T(e = {}, i.classname, !0), T(e, \"disabled\", this.disabled), e));\n } else t = dt({ disabled: this.disabled });\n return { root: t, draggable: dt(\"draggable\") };\n} }, emits: [\"leave\", \"enter\", \"drag\", \"drag-end\"] };\nVt.render = function(t, e, i, o, s, n) {\n var a = j(\"DraggableElement\");\n return w(), y(\"div\", { class: n.classes.root }, [S(a, { class: n.classes.draggable, onDrag: e[1] || (e[1] = function(h) {\n return t.$emit(\"drag\", h);\n }), onDragEnd: e[2] || (e[2] = function(h) {\n return t.$emit(\"drag-end\");\n }), onLeave: e[3] || (e[3] = function(h) {\n return t.$emit(\"leave\");\n }), onEnter: e[4] || (e[4] = function(h) {\n return t.$emit(\"enter\");\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"class\"])], 2);\n};\nvar be = D(\"vue-line-wrapper\"), qt = { name: \"LineWrapper\", components: { DraggableElement: Mt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {\n var t;\n return be((T(t = {}, this.position, !0), T(t, \"disabled\", this.disabled), t));\n} }, emits: [\"leave\", \"enter\", \"drag\", \"drag-end\"] };\nqt.render = function(t, e, i, o, s, n) {\n var a = j(\"DraggableElement\");\n return w(), y(a, { class: n.classname, onDrag: e[1] || (e[1] = function(h) {\n return t.$emit(\"drag\", h);\n }), onDragEnd: e[2] || (e[2] = function(h) {\n return t.$emit(\"drag-end\");\n }), onLeave: e[3] || (e[3] = function(h) {\n return t.$emit(\"leave\");\n }), onEnter: e[4] || (e[4] = function(h) {\n return t.$emit(\"enter\");\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"class\"]);\n};\nvar O = [\"left\", \"right\", \"top\", \"bottom\"], we = [\"left\", \"right\"], ye = [\"top\", \"bottom\"], ze = [\"left\", \"top\"], Ae = [\"fill-area\", \"fit-area\", \"stencil\", \"none\"], Lt = { left: 0, top: 0, width: 0, height: 0 };\nfunction Pt(t, e, i) {\n return !(i = i || [\"width\", \"height\", \"left\", \"top\"]).some(function(o) {\n return t[o] !== e[o];\n });\n}\nfunction L(t) {\n return { left: t.left, top: t.top, right: t.left + t.width, bottom: t.top + t.height };\n}\nfunction F(t, e) {\n return { left: t.left - e.left, top: t.top - e.top };\n}\nfunction R(t) {\n return { left: t.left + t.width / 2, top: t.top + t.height / 2 };\n}\nfunction G(t, e) {\n var i = { left: 0, top: 0, right: 0, bottom: 0 };\n return O.forEach(function(o) {\n var s = e[o], n = L(t)[o];\n i[o] = s !== void 0 && n !== void 0 ? o === \"left\" || o === \"top\" ? Math.max(0, s - n) : Math.max(0, n - s) : 0;\n }), i;\n}\nfunction H(t, e) {\n return { left: t.left - e.left, top: t.top - e.top, width: t.width + e.left + e.right, height: t.height + e.top + e.bottom };\n}\nfunction rt(t) {\n return { left: -t.left, top: -t.top };\n}\nfunction x(t, e) {\n return f(f({}, t), { left: t.left + e.left, top: t.top + e.top });\n}\nfunction W(t, e, i, o) {\n if (e !== 1) {\n if (i) {\n var s = R(t);\n return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - s.left) * (1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - s.top) * (1 - e) };\n }\n return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2, top: t.top + t.height * (1 - e) / 2 };\n }\n return t;\n}\nfunction b(t) {\n return t.width / t.height;\n}\nfunction _(t, e) {\n return Math.min(e.right !== void 0 && e.left !== void 0 ? (e.right - e.left) / t.width : 1 / 0, e.bottom !== void 0 && e.top !== void 0 ? (e.bottom - e.top) / t.height : 1 / 0);\n}\nfunction N(t, e) {\n var i = { left: 0, top: 0 }, o = G(t, e);\n return o.left && o.left > 0 ? i.left = o.left : o.right && o.right > 0 && (i.left = -o.right), o.top && o.top > 0 ? i.top = o.top : o.bottom && o.bottom > 0 && (i.top = -o.bottom), i;\n}\nfunction mt(t, e) {\n var i;\n return e.minimum && t < e.minimum ? i = e.minimum : e.maximum && t > e.maximum && (i = e.maximum), i;\n}\nfunction Zt(t, e) {\n var i = b(t), o = b(e);\n return e.width < 1 / 0 && e.height < 1 / 0 ? i > o ? { width: e.width, height: e.width / i } : { width: e.height * i, height: e.height } : e.width < 1 / 0 ? { width: e.width, height: e.width / i } : e.height < 1 / 0 ? { width: e.height * i, height: e.height } : t;\n}\nfunction Gt(t, e) {\n var i = e * Math.PI / 180;\n return { width: Math.abs(t.width * Math.cos(i)) + Math.abs(t.height * Math.sin(i)), height: Math.abs(t.width * Math.sin(i)) + Math.abs(t.height * Math.cos(i)) };\n}\nfunction B(t, e) {\n var i = e * Math.PI / 180;\n return { left: t.left * Math.cos(i) - t.top * Math.sin(i), top: t.left * Math.sin(i) + t.top * Math.cos(i) };\n}\nfunction at(t, e) {\n var i = G(M(t, e), e);\n return i.left + i.right + i.top + i.bottom ? i.left + i.right > i.top + i.bottom ? Math.min((t.width + i.left + i.right) / t.width, _(t, e)) : Math.min((t.height + i.top + i.bottom) / t.height, _(t, e)) : 1;\n}\nfunction M(t, e, i) {\n i === void 0 && (i = !1);\n var o = N(t, e);\n return x(t, i ? rt(o) : o);\n}\nfunction yt(t) {\n return { width: t.right !== void 0 && t.left !== void 0 ? t.right - t.left : 1 / 0, height: t.bottom !== void 0 && t.top !== void 0 ? t.bottom - t.top : 1 / 0 };\n}\nfunction Re(t, e) {\n return f(f({}, t), { minWidth: Math.min(e.width, t.minWidth), minHeight: Math.min(e.height, t.minHeight), maxWidth: Math.min(e.width, t.maxWidth), maxHeight: Math.min(e.height, t.maxHeight) });\n}\nfunction Qt(t, e, i) {\n i === void 0 && (i = !0);\n var o = {};\n return O.forEach(function(s) {\n var n = t[s], a = e[s];\n n !== void 0 && a !== void 0 ? o[s] = s === \"left\" || s === \"top\" ? i ? Math.max(n, a) : Math.min(n, a) : i ? Math.min(n, a) : Math.max(n, a) : a !== void 0 ? o[s] = a : n !== void 0 && (o[s] = n);\n }), o;\n}\nfunction ht(t, e) {\n return Qt(t, e, !0);\n}\nfunction It(t) {\n var e = t.size, i = t.aspectRatio, o = t.ignoreMinimum, s = t.sizeRestrictions;\n return !!((e.correctRatio || b(e) >= i.minimum && b(e) <= i.maximum) && e.height <= s.maxHeight && e.width <= s.maxWidth && e.width && e.height && (o || e.height >= s.minHeight && e.width >= s.minWidth));\n}\nfunction $t(t, e) {\n return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);\n}\nfunction $(t) {\n var e = t.width, i = t.height, o = t.sizeRestrictions, s = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, n = { width: Math.max(o.minWidth, Math.min(o.maxWidth, e)), height: Math.max(o.minHeight, Math.min(o.maxHeight, i)) };\n function a(c, u) {\n return u === void 0 && (u = !1), c.reduce(function(l, d) {\n return It({ size: d, aspectRatio: s, sizeRestrictions: o, ignoreMinimum: u }) && (!l || $t(d, { width: e, height: i }) < $t(l, { width: e, height: i })) ? d : l;\n }, null);\n }\n var h = [];\n s && [s.minimum, s.maximum].forEach(function(c) {\n c && h.push({ width: n.width, height: n.width / c, correctRatio: !0 }, { width: n.height * c, height: n.height, correctRatio: !0 });\n }), It({ size: n, aspectRatio: s, sizeRestrictions: o }) && h.push(n);\n var r = a(h) || a(h, !0);\n return r && { width: r.width, height: r.height };\n}\nfunction zt(t) {\n var e = t.event, i = t.coordinates, o = t.positionRestrictions, s = o === void 0 ? {} : o, n = x(i, e.directions);\n return x(n, N(n, s));\n}\nfunction Me(t) {\n var e = t.coordinates, i = t.transform, o = t.imageSize, s = t.sizeRestrictions, n = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(u, l) {\n return zt({ coordinates: u, positionRestrictions: n, event: new Rt({ left: l.left - u.left, top: l.top - u.top }) });\n }, c = f({}, e);\n return (Array.isArray(i) ? i : [i]).forEach(function(u) {\n var l = {};\n A((l = typeof u == \"function\" ? u({ coordinates: c, imageSize: o, visibleArea: h }) : u).width) && A(l.height) || (c = function(d, m) {\n var p = f(f(f({}, d), $({ width: m.width, height: m.height, sizeRestrictions: s, aspectRatio: a })), { left: 0, top: 0 });\n return r(p, { left: d.left, top: d.top });\n }(c, f(f({}, c), l))), A(l.left) && A(l.top) || (c = r(c, f(f({}, c), l)));\n }), c;\n}\nfunction Se(t) {\n t.event;\n var e = t.getAreaRestrictions, i = t.boundaries, o = t.coordinates, s = t.visibleArea;\n t.aspectRatio;\n var n = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;\n t.stencilReference;\n var r, c, u, l = f({}, o), d = f({}, s), m = f({}, n);\n r = b(m), c = b(l), u === void 0 && (u = 1e-3), (r === 0 || c === 0 ? Math.abs(c - r) < u : Math.abs(c / r) < 1 + u && Math.abs(c / r) > 1 - u) || (l = f(f({}, l), $({ sizeRestrictions: a, width: l.width, height: l.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));\n var p = at(d = W(d, l.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: \"resize\" }));\n return p !== 1 && (d = W(d, p), l = W(l, p)), d = M(d = x(d, F(R(l), R(d))), e({ visibleArea: d, type: \"move\" })), { coordinates: l = M(l, ht(L(d), h)), visibleArea: d };\n}\nfunction xe(t) {\n var e = t.event, i = t.getAreaRestrictions, o = t.boundaries, s = t.coordinates, n = t.visibleArea;\n t.aspectRatio, t.stencilSize, t.sizeRestrictions;\n var a = t.positionRestrictions;\n t.stencilReference;\n var h = f({}, s), r = f({}, n);\n if (s && n && e.type !== \"manipulateImage\") {\n var c = { width: 0, height: 0 };\n r.width, o.width, b(o) > b(h) ? (c.height = 0.8 * o.height, c.width = c.height * b(h)) : (c.width = 0.8 * o.width, c.height = c.width * b(h));\n var u = at(r = W(r, h.width * o.width / (r.width * c.width)), i({ visibleArea: r, type: \"resize\" }));\n r = W(r, u), u !== 1 && (c.height /= u, c.width /= u), r = M(r = x(r, F(R(h), R(r))), i({ visibleArea: r, type: \"move\" })), h = M(h, ht(L(r), a));\n }\n return { coordinates: h, visibleArea: r };\n}\nfunction Ce(t) {\n var e = t.event, i = t.coordinates, o = t.visibleArea, s = t.getAreaRestrictions, n = f({}, o), a = f({}, i);\n if (e.type === \"setCoordinates\") {\n var h = Math.max(0, a.width - n.width), r = Math.max(0, a.height - n.height);\n h > r ? n = W(n, Math.min(a.width / n.width, _(n, s({ visibleArea: n, type: \"resize\" })))) : r > h && (n = W(n, Math.min(a.height / n.height, _(n, s({ visibleArea: n, type: \"resize\" }))))), n = M(n = x(n, rt(N(a, L(n)))), s({ visibleArea: n, type: \"move\" }));\n }\n return { visibleArea: n, coordinates: a };\n}\nfunction Ee(t) {\n var e = t.imageSize, i = t.visibleArea, o = t.coordinates, s = i || e;\n return { left: (i ? i.left : 0) + s.width / 2 - o.width / 2, top: (i ? i.top : 0) + s.height / 2 - o.height / 2 };\n}\nfunction Te(t) {\n var e = t.imageSize, i = t.visibleArea, o = t.aspectRatio, s = t.sizeRestrictions, n = i || e, a = Math.min(o.maximum || 1 / 0, Math.max(o.minimum || 0, b(n))), h = n.width < n.height ? { width: 0.8 * n.width, height: 0.8 * n.width / a } : { height: 0.8 * n.height, width: 0.8 * n.height * a };\n return $(f(f({}, h), { aspectRatio: o, sizeRestrictions: s }));\n}\nfunction We(t) {\n var e, i, o = t.imageSize, s = t.visibleArea, n = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = s || o;\n return b(c) > b(n) ? i = (e = r.height * c.height / n.height) * b(r) : e = (i = r.width * c.width / n.width) / b(r), $({ width: i, height: e, aspectRatio: a, sizeRestrictions: h });\n}\nfunction De(t) {\n var e = t.getAreaRestrictions, i = t.coordinates, o = t.imageSize, s = b(t.boundaries);\n if (i) {\n var n = { height: Math.max(i.height, o.height), width: Math.max(i.width, o.width) }, a = Zt({ width: b(n) > s ? n.width : n.height * s, height: b(n) > s ? n.width / s : n.height }, yt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = G(i, L(f({ left: 0, top: 0 }, o))), c = {};\n return !r.left && !r.right && h.width <= o.width && (c.left = 0, c.right = o.width), !r.top && !r.bottom && h.height <= o.height && (c.top = 0, c.bottom = o.height), M(h, c);\n }\n var u = b(o);\n return a = { height: u > s ? o.height : o.width / s, width: u > s ? o.height * s : o.width }, { left: o.width / 2 - a.width / 2, top: o.height / 2 - a.height / 2, width: a.width, height: a.height };\n}\nfunction tt(t, e) {\n return Qt(t, L(e));\n}\nfunction He(t) {\n var e = t.event, i = t.coordinates, o = t.visibleArea, s = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, u = f({}, o), l = f({}, i), d = 1, m = 1, p = r.factor && Math.abs(r.factor - 1) > 1e-3;\n u = x(u, { left: c.left || 0, top: c.top || 0 });\n var g = { stencil: { minimum: Math.max(s.minWidth ? s.minWidth / l.width : 0, s.minHeight ? s.minHeight / l.height : 0), maximum: Math.min(s.maxWidth ? s.maxWidth / l.width : 1 / 0, s.maxHeight ? s.maxHeight / l.height : 1 / 0, _(l, a)) }, area: { maximum: _(u, n({ visibleArea: u, type: \"resize\" })) } };\n r.factor && p && (r.factor < 1 ? (m = Math.max(r.factor, g.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(g.area.maximum, g.stencil.maximum))) < 1 && (m = 1)), m && (u = W(u, m, r.center));\n var C = i.left - o.left, P = o.width + o.left - (i.width + i.left), V = i.top - o.top, Q = o.height + o.top - (i.height + i.top);\n return u = M(u = x(u, N(u, { left: a.left !== void 0 ? a.left - C * m : void 0, top: a.top !== void 0 ? a.top - V * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + Q * m : void 0, right: a.right !== void 0 ? a.right + P * m : void 0 })), n({ visibleArea: u, type: \"move\" })), l.width = l.width * m, l.height = l.height * m, l.left = u.left + C * m, l.top = u.top + V * m, l = M(l, ht(L(u), a)), r.factor && p && h && (r.factor > 1 ? d = Math.min(g.area.maximum, r.factor) / m : r.factor < 1 && (d = Math.max(l.height / u.height, l.width / u.width, r.factor / m)), d !== 1 && (u = x(u = M(u = W(u, d, r.factor > 1 ? r.center : R(l)), n({ visibleArea: u, type: \"move\" })), rt(N(l, L(u)))))), { coordinates: l, visibleArea: u };\n}\nfunction Oe(t) {\n var e = t.aspectRatio, i = t.getAreaRestrictions, o = t.coordinates, s = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, u = f({}, o), l = f({}, s), d = B(R(f({ left: 0, top: 0 }, r)), c);\n return (u = f(f({}, $({ sizeRestrictions: n, aspectRatio: e, width: u.width, height: u.height })), B(R(u), c))).left -= d.left - h.width / 2 + u.width / 2, u.top -= d.top - h.height / 2 + u.height / 2, l = W(l, at(l, i({ visibleArea: l, type: \"resize\" }))), { coordinates: u = M(u, a), visibleArea: l = M(l = x(l, F(R(u), R(o))), i({ visibleArea: l, type: \"move\" })) };\n}\nfunction Le(t) {\n var e = t.flip, i = t.previousFlip, o = t.rotate, s = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r = f({}, n), c = f({}, a), u = i.horizontal !== e.horizontal, l = i.vertical !== e.vertical;\n if (u || l) {\n var d = B({ left: h.width / 2, top: h.height / 2 }, -o), m = B(R(r), -o), p = B({ left: u ? d.left - (m.left - d.left) : m.left, top: l ? d.top - (m.top - d.top) : m.top }, o);\n r = x(r, F(p, R(r))), m = B(R(c), -o), c = M(c = x(c, F(p = B({ left: u ? d.left - (m.left - d.left) : m.left, top: l ? d.top - (m.top - d.top) : m.top }, o), R(c))), s({ visibleArea: c, type: \"move\" }));\n }\n return { coordinates: r, visibleArea: c };\n}\nfunction jt(t) {\n var e = t.directions, i = t.coordinates, o = t.positionRestrictions, s = o === void 0 ? {} : o, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = f({}, e), c = H(i, r).width, u = H(i, r).height;\n c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - n.minWidth) / (r.left / r.right), r.right = -(i.width - n.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - n.minWidth) : r.right < 0 && (r.right = -(i.width - n.minWidth))), u < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - n.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - n.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - n.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - n.minHeight)));\n var l = G(H(i, r), s);\n h && (l.left && l.left > 0 && l.right === 0 ? (r.right += l.left, r.left -= l.left) : l.right && l.right > 0 && l.left === 0 && (r.left += l.right, r.right -= l.right), l.top && l.top > 0 && l.bottom === 0 ? (r.bottom += l.top, r.top -= l.top) : l.bottom && l.bottom > 0 && l.top === 0 && (r.top += l.bottom, r.bottom -= l.bottom), l = G(H(i, r), s));\n var d = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };\n if (O.forEach(function(g) {\n var C = l[g];\n C && r[g] && (d[g] = Math.max(0, 1 - C / r[g]));\n }), a) {\n var m = Math.min.apply(null, O.map(function(g) {\n return d[g];\n }));\n m !== 1 / 0 && O.forEach(function(g) {\n r[g] *= m;\n });\n } else O.forEach(function(g) {\n d[g] !== 1 / 0 && (r[g] *= d[g]);\n });\n if (c = H(i, r).width, u = H(i, r).height, r.right + r.left && (c > n.maxWidth ? d.width = (n.maxWidth - i.width) / (r.right + r.left) : c < n.minWidth && (d.width = (n.minWidth - i.width) / (r.right + r.left))), r.bottom + r.top && (u > n.maxHeight ? d.height = (n.maxHeight - i.height) / (r.bottom + r.top) : u < n.minHeight && (d.height = (n.minHeight - i.height) / (r.bottom + r.top))), a) {\n var p = Math.min(d.width, d.height);\n p !== 1 / 0 && O.forEach(function(g) {\n r[g] *= p;\n });\n } else d.width !== 1 / 0 && we.forEach(function(g) {\n r[g] *= d.width;\n }), d.height !== 1 / 0 && ye.forEach(function(g) {\n r[g] *= d.height;\n });\n return r;\n}\nfunction et(t, e, i) {\n return e == 0 && i == 0 ? t / 2 : e == 0 ? 0 : i == 0 ? t : t * Math.abs(e / (e + i));\n}\nvar Pe = D(\"vue-simple-handler\"), Ie = D(\"vue-simple-handler-wrapper\"), St = { name: \"SimpleHandler\", components: { HandlerWrapper: Vt }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {\n return { hover: !1 };\n}, computed: { classes: function() {\n var t, e = (T(t = {}, this.horizontalPosition, !!this.horizontalPosition), T(t, this.verticalPosition, !!this.verticalPosition), T(t, \"\".concat(this.horizontalPosition, \"-\").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), T(t, \"hover\", this.hover), t);\n return { default: z(Pe(e), this.defaultClass, this.hover && this.hoverClass), wrapper: z(Ie(e), this.wrapperClass) };\n} }, methods: { onDrag: function(t) {\n this.$emit(\"drag\", t);\n}, onEnter: function() {\n this.hover = !0;\n}, onLeave: function() {\n this.hover = !1;\n}, onDragEnd: function() {\n this.$emit(\"drag-end\");\n} }, emits: [\"drag\", \"drag-end\"] };\nSt.render = function(t, e, i, o, s, n) {\n var a = j(\"HandlerWrapper\");\n return w(), y(a, { class: n.classes.wrapper, \"vertical-position\": i.verticalPosition, \"horizontal-position\": i.horizontalPosition, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: k(function() {\n return [S(\"div\", { class: n.classes.default }, null, 2)];\n }), _: 1 }, 8, [\"class\", \"vertical-position\", \"horizontal-position\", \"disabled\", \"onDrag\", \"onDragEnd\", \"onEnter\", \"onLeave\"]);\n};\nvar $e = D(\"vue-simple-line\"), je = D(\"vue-simple-line-wrapper\"), xt = { name: \"SimpleLine\", components: { LineWrapper: qt }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {\n return { hover: !1 };\n}, computed: { classes: function() {\n return { root: z($e(T({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: z(je(T({}, this.position, !0)), this.wrapperClass) };\n} }, methods: { onDrag: function(t) {\n this.$emit(\"drag\", t);\n}, onEnter: function() {\n this.hover = !0;\n}, onLeave: function() {\n this.hover = !1;\n}, onDragEnd: function() {\n this.$emit(\"drag-end\");\n} }, emits: [\"drag\", \"drag-end\"] };\nxt.render = function(t, e, i, o, s, n) {\n var a = j(\"LineWrapper\");\n return w(), y(a, { class: n.classes.wrapper, position: i.position, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: k(function() {\n return [S(\"div\", { class: n.classes.root }, null, 2)];\n }), _: 1 }, 8, [\"class\", \"position\", \"disabled\", \"onDrag\", \"onDragEnd\", \"onEnter\", \"onLeave\"]);\n};\nvar ft = D(\"vue-bounding-box\"), Be = [\"east\", \"west\", null], ke = [\"south\", \"north\", null], Kt = { name: \"BoundingBox\", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {\n return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };\n} }, handlersComponent: { type: [Object, String], default: function() {\n return St;\n} }, handlersClasses: { type: Object, default: function() {\n return {};\n} }, handlersWrappersClasses: { type: Object, default: function() {\n return {};\n} }, lines: { type: Object, default: function() {\n return { west: !0, north: !0, east: !0, south: !0 };\n} }, linesComponent: { type: [Object, String], default: function() {\n return xt;\n} }, linesClasses: { type: Object, default: function() {\n return {};\n} }, linesWrappersClasses: { type: Object, default: function() {\n return {};\n} }, resizable: { type: Boolean, default: !0 } }, data: function() {\n var t = [];\n return Be.forEach(function(e) {\n ke.forEach(function(i) {\n if (e !== i) {\n var o = Yt(e, i), s = o.name, n = o.classname;\n t.push({ name: s, classname: n, verticalDirection: i, horizontalDirection: e });\n }\n });\n }), { points: t };\n}, computed: { style: function() {\n var t = {};\n return this.width && this.height && (t.width = \"\".concat(this.width, \"px\"), t.height = \"\".concat(this.height, \"px\"), this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction))), t;\n}, classes: function() {\n var t = this.handlersClasses, e = this.handlersWrappersClasses, i = this.linesClasses, o = this.linesWrappersClasses;\n return { root: ft(), handlers: t, handlersWrappers: e, lines: i, linesWrappers: o };\n}, lineNodes: function() {\n var t = this, e = [];\n return this.points.forEach(function(i) {\n i.horizontalDirection && i.verticalDirection || !t.lines[i.name] || e.push({ name: i.name, component: t.linesComponent, class: z(t.classes.lines.default, t.classes.lines[i.name], !t.resizable && t.classes.lines.disabled), wrapperClass: z(t.classes.linesWrappers.default, t.classes.linesWrappers[i.name], !t.resizable && t.classes.linesWrappers.disabled), hoverClass: t.classes.lines.hover, verticalDirection: i.verticalDirection, horizontalDirection: i.horizontalDirection, disabled: !t.resizable });\n }), e;\n}, handlerNodes: function() {\n var t = this, e = [], i = this.width, o = this.height;\n return this.points.forEach(function(s) {\n if (t.handlers[s.name]) {\n var n = { name: s.name, component: t.handlersComponent, class: z(t.classes.handlers.default, t.classes.handlers[s.name]), wrapperClass: z(t.classes.handlersWrappers.default, t.classes.handlersWrappers[s.name]), hoverClass: t.classes.handlers.hover, verticalDirection: s.verticalDirection, horizontalDirection: s.horizontalDirection, disabled: !t.resizable };\n if (i && o) {\n var a = s.horizontalDirection, h = s.verticalDirection, r = a === \"east\" ? i : a === \"west\" ? 0 : i / 2, c = h === \"south\" ? o : h === \"north\" ? 0 : o / 2;\n n.wrapperClass = ft(\"handler\"), n.wrapperStyle = { transform: \"translate(\".concat(r, \"px, \").concat(c, \"px)\") }, t.transitions && t.transitions.enabled && (n.wrapperStyle.transition = \"\".concat(t.transitions.time, \"ms \").concat(t.transitions.timingFunction));\n } else n.wrapperClass = ft(\"handler\", T({}, s.classname, !0));\n e.push(n);\n }\n }), e;\n} }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n this.touches = [];\n}, methods: { onEnd: function() {\n this.$emit(\"resize-end\");\n}, onHandlerDrag: function(t, e, i) {\n var o, s = t.shift(), n = s.left, a = s.top, h = { left: 0, right: 0, top: 0, bottom: 0 };\n e === \"west\" ? h.left -= n : e === \"east\" && (h.right += n), i === \"north\" ? h.top -= a : i === \"south\" && (h.bottom += a), !i && e ? o = \"width\" : i && !e && (o = \"height\"), this.resizable && this.$emit(\"resize\", new ge(h, { allowedDirections: { left: e === \"west\" || !e, right: e === \"east\" || !e, bottom: i === \"south\" || !i, top: i === \"north\" || !i }, preserveAspectRatio: t.nativeEvent && t.nativeEvent.shiftKey, respectDirection: o }));\n} }, emits: [\"resize\", \"resize-end\"] };\nKt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"box\", class: n.classes.root, style: n.style }, [X(t.$slots, \"default\"), S(\"div\", null, [(w(!0), y(Ct, null, Et(n.lineNodes, function(a) {\n return w(), y(ot(a.component), { key: a.name, \"default-class\": a.class, \"hover-class\": a.hoverClass, \"wrapper-class\": a.wrapperClass, position: a.name, disabled: a.disabled, onDrag: function(h) {\n return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);\n }, onDragEnd: e[1] || (e[1] = function(h) {\n return n.onEnd();\n }) }, null, 8, [\"default-class\", \"hover-class\", \"wrapper-class\", \"position\", \"disabled\", \"onDrag\"]);\n }), 128))]), (w(!0), y(Ct, null, Et(n.handlerNodes, function(a) {\n return w(), y(\"div\", { key: a.name, style: a.wrapperStyle, class: a.wrapperClass }, [(w(), y(ot(a.component), { \"default-class\": a.class, \"hover-class\": a.hoverClass, \"wrapper-class\": a.wrapperClass, \"horizontal-position\": a.horizontalDirection, \"vertical-position\": a.verticalDirection, disabled: a.disabled, onDrag: function(h) {\n return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);\n }, onDragEnd: e[2] || (e[2] = function(h) {\n return n.onEnd();\n }) }, null, 8, [\"default-class\", \"hover-class\", \"wrapper-class\", \"horizontal-position\", \"vertical-position\", \"disabled\", \"onDrag\"]))], 6);\n }), 128))], 6);\n};\nvar Ue = D(\"vue-draggable-area\"), Jt = { name: \"DraggableArea\", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {\n return { default: Ue() };\n} }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n this.touches = [], this.touchStarted = !1;\n}, methods: { onTouchStart: function(t) {\n if (t.cancelable) {\n var e = this.movable && t.touches.length === 1;\n e && (this.touches = U(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());\n }\n}, onTouchEnd: function() {\n this.touchStarted = !1, this.processEnd();\n}, onTouchMove: function(t) {\n this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : Nt({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: t.touches[0].clientX, y: t.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }), this.touchStarted = !0));\n}, onMouseDown: function(t) {\n if (this.movable && t.button === 0) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.initAnchor(e), t.stopPropagation();\n }\n}, onMouseMove: function(t) {\n this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.cancelable && t.preventDefault(), t.stopPropagation());\n}, onMouseUp: function() {\n this.processEnd();\n}, initAnchor: function(t) {\n var e = this.$refs.container.getBoundingClientRect(), i = e.left, o = e.top;\n this.anchor = { x: t.clientX - i, y: t.clientY - o };\n}, processMove: function(t, e) {\n var i = U(e);\n if (this.touches.length) {\n var o = this.$refs.container.getBoundingClientRect(), s = o.left, n = o.top;\n this.touches.length === 1 && i.length === 1 && this.$emit(\"move\", new Rt({ left: i[0].clientX - (s + this.anchor.x), top: i[0].clientY - (n + this.anchor.y) }));\n }\n}, processEnd: function() {\n this.touches.length && this.$emit(\"move-end\"), this.touches = [];\n} }, emits: [\"move\", \"move-end\"] };\nJt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"container\", onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 544);\n};\nfunction pt(t) {\n var e, i;\n return { rotate: t.rotate || 0, flip: { horizontal: ((e = t == null ? void 0 : t.flip) === null || e === void 0 ? void 0 : e.horizontal) || !1, vertical: ((i = t == null ? void 0 : t.flip) === null || i === void 0 ? void 0 : i.vertical) || !1 } };\n}\nfunction Xe(t) {\n return new Promise(function(e, i) {\n try {\n if (t) if (/^data:/i.test(t)) e(function(r) {\n r = r.replace(/^data:([^;]+);base64,/gim, \"\");\n for (var c = atob(r), u = c.length, l = new ArrayBuffer(u), d = new Uint8Array(l), m = 0; m < u; m++) d[m] = c.charCodeAt(m);\n return l;\n }(t));\n else if (/^blob:/i.test(t)) {\n var o = new FileReader();\n o.onload = function(r) {\n e(r.target.result);\n }, n = t, a = function(r) {\n o.readAsArrayBuffer(r);\n }, (h = new XMLHttpRequest()).open(\"GET\", n, !0), h.responseType = \"blob\", h.onload = function() {\n this.status != 200 && this.status !== 0 || a(this.response);\n }, h.send();\n } else {\n var s = new XMLHttpRequest();\n s.onreadystatechange = function() {\n s.readyState === 4 && (s.status === 200 || s.status === 0 ? e(s.response) : i(\"Warning: could not load an image to parse its orientation\"), s = null);\n }, s.onprogress = function() {\n s.getResponseHeader(\"content-type\") !== \"image/jpeg\" && s.abort();\n }, s.withCredentials = !1, s.open(\"GET\", t, !0), s.responseType = \"arraybuffer\", s.send(null);\n }\n else i(\"Error: the image is empty\");\n } catch (r) {\n i(r);\n }\n var n, a, h;\n });\n}\nfunction te(t) {\n var e = t.rotate, i = t.flip, o = t.scaleX, s = t.scaleY, n = \"\";\n return n += \" rotate(\" + e + \"deg) \", n += \" scaleX(\" + o * (i.horizontal ? -1 : 1) + \") \", n += \" scaleY(\" + s * (i.vertical ? -1 : 1) + \") \";\n}\nfunction Ye(t) {\n try {\n var e, i = new DataView(t), o = void 0, s = void 0, n = void 0, a = void 0;\n if (i.getUint8(0) === 255 && i.getUint8(1) === 216) for (var h = i.byteLength, r = 2; r + 1 < h; ) {\n if (i.getUint8(r) === 255 && i.getUint8(r + 1) === 225) {\n n = r;\n break;\n }\n r++;\n }\n if (n && (o = n + 10, function(m, p, g) {\n var C, P = \"\";\n for (C = p, g += p; C < g; C++) P += String.fromCharCode(m.getUint8(C));\n return P;\n }(i, n + 4, 4) === \"Exif\")) {\n var c = i.getUint16(o);\n if (((s = c === 18761) || c === 19789) && i.getUint16(o + 2, s) === 42) {\n var u = i.getUint32(o + 4, s);\n u >= 8 && (a = o + u);\n }\n }\n if (a) {\n for (var l = i.getUint16(a, s), d = 0; d < l; d++)\n if (r = a + 12 * d + 2, i.getUint16(r, s) === 274) {\n r += 8, e = i.getUint16(r, s), i.setUint16(r, 1, s);\n break;\n }\n }\n return e;\n } catch {\n return null;\n }\n}\nfunction Bt(t, e) {\n var i = e.getBoundingClientRect(), o = i.left, s = i.top, n = { left: 0, top: 0 }, a = 0;\n return t.forEach(function(h) {\n n.left += (h.clientX - o) / t.length, n.top += (h.clientY - s) / t.length;\n }), t.forEach(function(h) {\n a += Nt({ x: n.left, y: n.top }, { x: h.clientX - o, y: h.clientY - s });\n }), { centerMass: n, spread: a, count: t.length };\n}\nvar ee = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, created: function() {\n this.transforming = !1, this.debouncedProcessEnd = bt(this.processEnd), this.touches = [];\n}, methods: { processMove: function(t, e) {\n if (this.touches.length) {\n if (this.touches.length === 1 && e.length === 1) this.$emit(\"move\", new Z({ left: this.touches[0].clientX - e[0].clientX, top: this.touches[0].clientY - e[0].clientY }));\n else if (this.touches.length > 1 && this.touchResize) {\n var i = Bt(e, this.$refs.container), o = this.oldGeometricProperties;\n o.count === i.count && o.count > 1 && this.$emit(\"resize\", new Z({ left: o.centerMass.left - i.centerMass.left, top: o.centerMass.top - i.centerMass.top }, { factor: o.spread / i.spread, center: i.centerMass })), this.oldGeometricProperties = i;\n }\n this.touches = e;\n }\n}, processEnd: function() {\n this.transforming && (this.transforming = !1, this.$emit(\"transform-end\"));\n}, processStart: function() {\n this.transforming = !0, this.debouncedProcessEnd.clear();\n}, processEvent: function(t) {\n return this.eventsFilter ? this.eventsFilter(t, this.transforming) !== !1 : (t.preventDefault(), t.stopPropagation(), !0);\n}, onTouchStart: function(t) {\n if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {\n var e = this.$refs.container, i = e.getBoundingClientRect(), o = i.left, s = i.top, n = i.bottom, a = i.right;\n this.touches = U(t.touches).filter(function(h) {\n return h.clientX > o && h.clientX < a && h.clientY > s && h.clientY < n;\n }), this.oldGeometricProperties = Bt(this.touches, e);\n }\n}, onTouchEnd: function(t) {\n t.touches.length === 0 && (this.touches = [], this.processEnd());\n}, onTouchMove: function(t) {\n var e = this;\n if (this.touches.length) {\n var i = U(t.touches).filter(function(o) {\n return !o.identifier || e.touches.find(function(s) {\n return s.identifier === o.identifier;\n });\n });\n this.processEvent(t) && (this.processMove(t, i), this.processStart());\n }\n}, onMouseDown: function(t) {\n if (this.mouseMove && \"buttons\" in t && t.buttons === 1 && this.processEvent(t)) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.processStart();\n }\n}, onMouseMove: function(t) {\n this.touches.length && this.processEvent(t) && this.processMove(t, [{ clientX: t.clientX, clientY: t.clientY }]);\n}, onMouseUp: function() {\n this.touches = [], this.processEnd();\n}, onWheel: function(t) {\n if (this.wheelResize && this.processEvent(t)) {\n var e = this.$refs.container.getBoundingClientRect(), i = e.left, o = e.top, s = 1 + this.wheelResize.ratio * (a = t.deltaY || t.detail || t.wheelDelta, (h = +a) == 0 || _t(h) ? h : h > 0 ? 1 : -1), n = { left: t.clientX - i, top: t.clientY - o };\n this.$emit(\"resize\", new Z({}, { factor: s, center: n })), this.touches.length || this.debouncedProcessEnd();\n }\n var a, h;\n} }, emits: [\"resize\", \"move\", \"transform-end\"] };\nee.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"container\", onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }), onWheel: e[3] || (e[3] = function() {\n return n.onWheel && n.onWheel.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 544);\n};\nvar At = { components: { TransformableImage: ee }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: [\"resize\", \"move\"] };\nAt.render = function(t, e, i, o, s, n) {\n var a = j(\"transformable-image\");\n return w(), y(a, { \"touch-move\": i.touchMove, \"touch-resize\": i.touchResize, \"mouse-move\": i.mouseMove, \"wheel-resize\": i.wheelResize, onMove: e[1] || (e[1] = function(h) {\n return t.$emit(\"move\", h);\n }), onResize: e[2] || (e[2] = function(h) {\n return t.$emit(\"resize\", h);\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"touch-move\", \"touch-resize\", \"mouse-move\", \"wheel-resize\"]);\n};\nvar it = D(\"vue-preview\"), ie = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {\n return {};\n} }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {\n return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };\n}, computed: { classes: function() {\n return { root: it({ fill: this.fill }), wrapper: it(\"wrapper\"), imageWrapper: it(\"image-wrapper\"), image: z(it(\"image\"), this.imageClass) };\n}, style: function() {\n if (this.fill) return {};\n var t = {};\n return this.width && (t.width = \"\".concat(this.size.width, \"px\")), this.height && (t.height = \"\".concat(this.size.height, \"px\")), this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), t;\n}, wrapperStyle: function() {\n var t = { width: \"\".concat(this.size.width, \"px\"), height: \"\".concat(this.size.height, \"px\"), left: \"calc(50% - \".concat(this.size.width / 2, \"px)\"), top: \"calc(50% - \".concat(this.size.height / 2, \"px)\") };\n return this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), t;\n}, imageStyle: function() {\n if (this.coordinates && this.image) {\n var t = this.coordinates.width / this.size.width, e = v(v({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, o = this.imageSize.height, s = Gt({ width: i, height: o }, e.rotate), n = { width: \"\".concat(i, \"px\"), height: \"\".concat(o, \"px\"), left: \"0px\", top: \"0px\" }, a = { rotate: { left: (i - s.width) * e.scaleX / 2, top: (o - s.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * o / 2 } };\n return n.transform = \"translate(\\n\t\t\t\t\".concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, \"px,\").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, \"px) \") + te(e), this.transitions && this.transitions.enabled && (n.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), n;\n }\n return {};\n}, size: function() {\n return { width: this.width || this.calculatedSize.width, height: this.height || this.calculatedSize.height };\n}, imageSize: function() {\n return { width: this.image.width || this.calculatedImageSize.width, height: this.image.height || this.calculatedImageSize.height };\n} }, watch: { image: function(t) {\n (t.width || t.height) && this.onChangeImage();\n} }, mounted: function() {\n var t = this;\n this.onChangeImage(), this.$refs.image.addEventListener(\"load\", function() {\n t.refreshImage();\n }), window.addEventListener(\"resize\", this.refresh), window.addEventListener(\"orientationchange\", this.refresh);\n}, unmounted: function() {\n window.removeEventListener(\"resize\", this.refresh), window.removeEventListener(\"orientationchange\", this.refresh);\n}, methods: { refreshImage: function() {\n var t = this.$refs.image;\n this.calculatedImageSize.height = t.naturalHeight, this.calculatedImageSize.width = t.naturalWidth;\n}, refresh: function() {\n var t = this.$refs.root;\n this.width || (this.calculatedSize.width = t.clientWidth), this.height || (this.calculatedSize.height = t.clientHeight);\n}, onChangeImage: function() {\n var t = this.$refs.image;\n t && t.complete && this.refreshImage(), this.refresh();\n} } };\nie.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"root\", class: n.classes.root, style: n.style }, [S(\"div\", { ref: \"wrapper\", class: n.classes.wrapper, style: n.wrapperStyle }, [kt(S(\"img\", { ref: \"image\", src: i.image && i.image.src, class: n.classes.image, style: n.imageStyle }, null, 14, [\"src\"]), [[Ut, i.image && i.image.src]])], 6)], 6);\n};\nvar ne = { components: { Preview: ie }, inheritAttrs: !1 };\nne.render = function(t, e, i, o, s, n) {\n var a = j(\"preview\");\n return w(), y(a, Xt(t.$attrs, { fill: !0 }), null, 16);\n};\nvar gt = D(\"vue-rectangle-stencil\"), oe = { name: \"RectangleStencil\", components: { StencilPreview: ne, BoundingBox: Kt, DraggableArea: Jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {\n return St;\n} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {\n return xt;\n} }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {\n return {};\n} }, linesWrappersClasses: { type: Object, default: function() {\n return {};\n} }, handlersClasses: { type: Object, default: function() {\n return {};\n} }, handlersWrappersClasses: { type: Object, default: function() {\n return {};\n} } }, data: function() {\n return { moving: !1, resizing: !1 };\n}, computed: { classes: function() {\n return { stencil: z(gt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: z(gt(\"preview\"), this.previewClass), boundingBox: z(gt(\"bounding-box\"), this.boundingBoxClass) };\n}, style: function() {\n var t = this.stencilCoordinates, e = t.height, i = t.width, o = t.left, s = t.top, n = { width: \"\".concat(i, \"px\"), height: \"\".concat(e, \"px\"), transform: \"translate(\".concat(o, \"px, \").concat(s, \"px)\") };\n return this.transitions && this.transitions.enabled && (n.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), n;\n} }, methods: { onMove: function(t) {\n this.$emit(\"move\", t), this.moving = !0;\n}, onMoveEnd: function() {\n this.$emit(\"move-end\"), this.moving = !1;\n}, onResize: function(t) {\n this.$emit(\"resize\", t), this.resizing = !0;\n}, onResizeEnd: function() {\n this.$emit(\"resize-end\"), this.resizing = !1;\n}, aspectRatios: function() {\n return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };\n} }, emits: [\"resize\", \"resize-end\", \"move\", \"move-end\"] };\noe.render = function(t, e, i, o, s, n) {\n var a = j(\"stencil-preview\"), h = j(\"draggable-area\"), r = j(\"bounding-box\");\n return w(), y(\"div\", { class: n.classes.stencil, style: n.style }, [S(r, { width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, transitions: i.transitions, class: n.classes.boundingBox, handlers: i.handlers, \"handlers-component\": i.handlersComponent, \"handlers-classes\": i.handlersClasses, \"handlers-wrappers-classes\": i.handlersWrappersClasses, lines: i.lines, \"lines-component\": i.linesComponent, \"lines-classes\": i.linesClasses, \"lines-wrappers-classes\": i.linesWrappersClasses, resizable: i.resizable, onResize: n.onResize, onResizeEnd: n.onResizeEnd }, { default: k(function() {\n return [S(h, { movable: i.movable, onMove: n.onMove, onMoveEnd: n.onMoveEnd }, { default: k(function() {\n return [S(a, { image: i.image, coordinates: i.coordinates, width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, class: n.classes.preview, transitions: i.transitions }, null, 8, [\"image\", \"coordinates\", \"width\", \"height\", \"class\", \"transitions\"])];\n }), _: 1 }, 8, [\"movable\", \"onMove\", \"onMoveEnd\"])];\n }), _: 1 }, 8, [\"width\", \"height\", \"transitions\", \"class\", \"handlers\", \"handlers-component\", \"handlers-classes\", \"handlers-wrappers-classes\", \"lines\", \"lines-component\", \"lines-classes\", \"lines-wrappers-classes\", \"resizable\", \"onResize\", \"onResizeEnd\"])], 6);\n};\nvar Fe = [\"transitions\"], I = D(\"vue-advanced-cropper\"), se = { name: \"Cropper\", components: { BackgroundWrapper: At }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {\n return oe;\n} }, backgroundWrapperComponent: { type: [Object, String], default: function() {\n return At;\n} }, stencilProps: { type: Object, default: function() {\n return {};\n} }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: \"fit-area\", validator: function(t) {\n return Ae.indexOf(t) !== -1;\n} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {\n return !(typeof t == \"string\" && t !== \"fill\" && t !== \"fit\");\n} }, priority: { type: String, default: \"coordinates\" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {\n var e = t.event, i = t.coordinates, o = t.aspectRatio, s = t.positionRestrictions, n = t.sizeRestrictions, a = f(f({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = f({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };\n n.widthFrozen && (r.left = 0, r.right = 0), n.heightFrozen && (r.top = 0, r.bottom = 0), O.forEach(function(q) {\n c[q] || (r[q] = 0);\n });\n var u = H(a, r = jt({ coordinates: a, directions: r, sizeRestrictions: n, positionRestrictions: s })).width, l = H(a, r).height, d = h.preserveRatio ? b(a) : mt(u / l, o);\n if (d) {\n var m = h.respectDirection;\n if (m || (m = a.width >= a.height || d === 1 ? \"width\" : \"height\"), m === \"width\") {\n var p = u / d - a.height;\n if (c.top && c.bottom) {\n var g = r.top, C = r.bottom;\n r.bottom = et(p, C, g), r.top = et(p, g, C);\n } else c.bottom ? r.bottom = p : c.top ? r.top = p : c.right ? r.right = 0 : c.left && (r.left = 0);\n } else if (m === \"height\") {\n var P = a.width - l * d;\n if (c.left && c.right) {\n var V = r.left, Q = r.right;\n r.left = -et(P, V, Q), r.right = -et(P, Q, V);\n } else c.left ? r.left = -P : c.right ? r.right = -P : c.top ? r.top = 0 : c.bottom && (r.bottom = 0);\n }\n r = jt({ directions: r, coordinates: a, sizeRestrictions: n, positionRestrictions: s, preserveRatio: !0, compensate: h.compensate });\n }\n return u = H(a, r).width, l = H(a, r).height, (d = h.preserveRatio ? b(a) : mt(u / l, o)) && Math.abs(d - u / l) > 1e-3 && O.forEach(function(q) {\n c[q] || (r[q] = 0);\n }), zt({ event: new Rt({ left: -r.left, top: -r.top }), coordinates: { width: i.width + r.right + r.left, height: i.height + r.top + r.bottom, left: i.left, top: i.top }, positionRestrictions: s });\n} }, moveAlgorithm: { type: Function, default: zt }, initStretcher: { type: Function, default: function(t) {\n var e = t.stretcher, i = t.imageSize, o = b(i);\n e.style.width = i.width + \"px\", e.style.height = e.clientWidth / o + \"px\", e.style.width = e.clientWidth + \"px\";\n} }, fitCoordinates: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.coordinates, o = t.aspectRatio, s = t.sizeRestrictions, n = t.positionRestrictions, a = f(f({}, i), $({ width: i.width, height: i.height, aspectRatio: o, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, s.minHeight), minWidth: Math.min(e.width, s.minWidth) } }));\n return a = M(a = x(a, F(R(i), R(a))), ht(L(e), n));\n} }, fitVisibleArea: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.boundaries, o = t.getAreaRestrictions, s = t.coordinates, n = f({}, e);\n n.height = n.width / b(i), n.top += (e.height - n.height) / 2, (s.height - n.height > 0 || s.width - n.width > 0) && (n = W(n, Math.max(s.height / n.height, s.width / n.width)));\n var a = rt(N(s, L(n = W(n, at(n, o({ visibleArea: n, type: \"resize\" }))))));\n return n.width < s.width && (a.left = 0), n.height < s.height && (a.top = 0), n = M(n = x(n, a), o({ visibleArea: n, type: \"move\" }));\n} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.boundaries, o = t.imageSize, s = t.imageRestriction, n = t.type, a = {};\n return s === \"fill-area\" ? a = { left: 0, top: 0, right: o.width, bottom: o.height } : s === \"fit-area\" && (b(i) > b(o) ? (a = { top: 0, bottom: o.height }, e && n === \"move\" && (e.width > o.width ? (a.left = -(e.width - o.width) / 2, a.right = o.width - a.left) : (a.left = 0, a.right = o.width))) : (a = { left: 0, right: o.width }, e && n === \"move\" && (e.height > o.height ? (a.top = -(e.height - o.height) / 2, a.bottom = o.height - a.top) : (a.top = 0, a.bottom = o.height)))), a;\n} }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {\n return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };\n} }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {\n var e = t.imageSize, i = {};\n return t.imageRestriction !== \"none\" && (i = { left: 0, top: 0, right: e.width, bottom: e.height }), i;\n} } }, data: function() {\n return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: v({}, Lt) };\n}, computed: { image: function() {\n return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };\n}, imageTransforms: function() {\n return { rotate: this.appliedImageTransforms.rotate, flip: { horizontal: this.appliedImageTransforms.flip.horizontal, vertical: this.appliedImageTransforms.flip.vertical }, translateX: this.visibleArea ? this.visibleArea.left / this.coefficient : 0, translateY: this.visibleArea ? this.visibleArea.top / this.coefficient : 0, scaleX: 1 / this.coefficient, scaleY: 1 / this.coefficient };\n}, imageSize: function() {\n var t = function(e) {\n return e * Math.PI / 180;\n }(this.imageTransforms.rotate);\n return { width: Math.abs(this.imageAttributes.width * Math.cos(t)) + Math.abs(this.imageAttributes.height * Math.sin(t)), height: Math.abs(this.imageAttributes.width * Math.sin(t)) + Math.abs(this.imageAttributes.height * Math.cos(t)) };\n}, initialized: function() {\n return !!(this.visibleArea && this.imageLoaded);\n}, settings: function() {\n var t = wt(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });\n return { moveImage: wt(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: t };\n}, coefficient: function() {\n return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;\n}, areaRestrictions: function() {\n return this.imageLoaded ? this.areaRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction, boundaries: this.boundaries }) : {};\n}, transitionsOptions: function() {\n return { enabled: this.transitionsActive, timingFunction: \"ease-in-out\", time: 350 };\n}, sizeRestrictions: function() {\n if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {\n var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: A(this.minWidth) ? 0 : J(this.minWidth), minHeight: A(this.minHeight) ? 0 : J(this.minHeight), maxWidth: A(this.maxWidth) ? 1 / 0 : J(this.maxWidth), maxHeight: A(this.maxHeight) ? 1 / 0 : J(this.maxHeight) });\n if (t = function(o) {\n var s = o.areaRestrictions, n = o.sizeRestrictions, a = o.boundaries, h = o.positionRestrictions, r = f(f({}, n), { minWidth: n.minWidth !== void 0 ? n.minWidth : 0, minHeight: n.minHeight !== void 0 ? n.minHeight : 0, maxWidth: n.maxWidth !== void 0 ? n.maxWidth : 1 / 0, maxHeight: n.maxHeight !== void 0 ? n.maxHeight : 1 / 0 });\n h.left !== void 0 && h.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, h.right - h.left)), h.bottom !== void 0 && h.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, h.bottom - h.top));\n var c = yt(s), u = Zt(a, c);\n return c.width < 1 / 0 && (!r.maxWidth || r.maxWidth > u.width) && (r.maxWidth = Math.min(r.maxWidth, u.width)), c.height < 1 / 0 && (!r.maxHeight || r.maxHeight > u.height) && (r.maxHeight = Math.min(r.maxHeight, u.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;\n }({ sizeRestrictions: t, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: \"resize\" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {\n var e = this.getStencilSize(), i = yt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: \"resize\" }));\n t.maxWidth = Math.min(t.maxWidth, i.width * e.width / this.boundaries.width), t.maxHeight = Math.min(t.maxHeight, i.height * e.height / this.boundaries.height), t.maxWidth < t.minWidth && (t.minWidth = t.maxWidth), t.maxHeight < t.minHeight && (t.minHeight = t.maxHeight);\n }\n return t;\n }\n return { minWidth: 0, minHeight: 0, maxWidth: 0, maxHeight: 0 };\n}, positionRestrictions: function() {\n return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });\n}, classes: function() {\n return { cropper: I(), image: z(I(\"image\"), this.imageClass), stencil: I(\"stencil\"), boundaries: z(I(\"boundaries\"), this.boundariesClass), stretcher: z(I(\"stretcher\")), background: z(I(\"background\"), this.backgroundClass), foreground: z(I(\"foreground\"), this.foregroundClass), imageWrapper: z(I(\"image-wrapper\")), cropperWrapper: z(I(\"cropper-wrapper\")) };\n}, stencilCoordinates: function() {\n if (this.initialized) {\n var t = this.coordinates, e = t.width, i = t.height, o = t.left, s = t.top;\n return { width: e / this.coefficient, height: i / this.coefficient, left: (o - this.visibleArea.left) / this.coefficient, top: (s - this.visibleArea.top) / this.coefficient };\n }\n return this.defaultCoordinates();\n}, boundariesStyle: function() {\n var t = { width: this.boundaries.width ? \"\".concat(Math.round(this.boundaries.width), \"px\") : \"auto\", height: this.boundaries.height ? \"\".concat(Math.round(this.boundaries.height), \"px\") : \"auto\", transition: \"opacity \".concat(this.transitionTime, \"ms\"), pointerEvents: this.imageLoaded ? \"all\" : \"none\" };\n return this.imageLoaded || (t.opacity = \"0\"), t;\n}, imageStyle: function() {\n var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, i = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, o = v(v({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), s = { width: \"\".concat(t.width, \"px\"), height: \"\".concat(t.height, \"px\"), left: \"0px\", top: \"0px\", transform: \"translate(\".concat(-e.left - i.left - this.imageTransforms.translateX, \"px, \").concat(-e.top - i.top - this.imageTransforms.translateY, \"px)\") + te(o) };\n return this.transitionsOptions.enabled && (s.transition = \"\".concat(this.transitionsOptions.time, \"ms \").concat(this.transitionsOptions.timingFunction)), s;\n} }, watch: { src: function() {\n this.onChangeImage();\n}, stencilComponent: function() {\n var t = this;\n this.$nextTick(function() {\n t.resetCoordinates(), t.runAutoZoom(\"setCoordinates\"), t.onChange();\n });\n}, minWidth: function() {\n this.onPropsChange();\n}, maxWidth: function() {\n this.onPropsChange();\n}, minHeight: function() {\n this.onPropsChange();\n}, maxHeight: function() {\n this.onPropsChange();\n}, imageRestriction: function() {\n this.reset();\n}, stencilProps: function(t, e) {\n [\"aspectRatio\", \"minAspectRatio\", \"maxAspectRatio\"].find(function(i) {\n return t[i] !== e[i];\n }) && this.$nextTick(this.onPropsChange);\n} }, created: function() {\n this.debouncedUpdate = bt(this.update, this.debounce), this.debouncedDisableTransitions = bt(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;\n}, mounted: function() {\n this.$refs.image.addEventListener(\"load\", this.onSuccessLoadImage), this.$refs.image.addEventListener(\"error\", this.onFailLoadImage), this.onChangeImage(), window.addEventListener(\"resize\", this.refresh), window.addEventListener(\"orientationchange\", this.refresh);\n}, unmounted: function() {\n window.removeEventListener(\"resize\", this.refresh), window.removeEventListener(\"orientationchange\", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();\n}, methods: { getResult: function() {\n var t = this.initialized ? this.prepareResult(v({}, this.coordinates)) : this.defaultCoordinates(), e = { rotate: this.imageTransforms.rotate % 360, flip: v({}, this.imageTransforms.flip) };\n if (this.src && this.imageLoaded) {\n var i = this;\n return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? v({}, this.visibleArea) : null, imageTransforms: e, get canvas() {\n return i.canvas ? i.getCanvas() : void 0;\n } };\n }\n return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? v({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };\n}, zoom: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n this.onManipulateImage(new Z({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: s });\n}, move: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n this.onManipulateImage(new Z({ left: t || 0, top: e || 0 }), { normalize: !1, transitions: s });\n}, setCoordinates: function(t) {\n var e = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = i.autoZoom, s = o === void 0 || o, n = i.transitions, a = n === void 0 || n;\n this.$nextTick(function() {\n e.imageLoaded ? (e.transitionsActive || (a && e.enableTransitions(), e.coordinates = e.applyTransform(t), s && e.runAutoZoom(\"setCoordinates\"), a && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;\n });\n}, refresh: function() {\n var t = this, e = this.$refs.image;\n if (this.src && e) return this.initialized ? this.updateVisibleArea().then(function() {\n t.onChange();\n }) : this.resetVisibleArea().then(function() {\n t.onChange();\n });\n}, reset: function() {\n var t = this;\n return this.resetVisibleArea().then(function() {\n t.onChange(!1);\n });\n}, awaitRender: function(t) {\n var e = this;\n this.awaiting || (this.awaiting = !0, this.$nextTick(function() {\n t(), e.awaiting = !1;\n }));\n}, prepareResult: function(t) {\n return this.roundResult ? function(e) {\n var i = e.coordinates, o = e.sizeRestrictions, s = e.positionRestrictions, n = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };\n return n.width > o.maxWidth ? n.width = Math.floor(i.width) : n.width < o.minWidth && (n.width = Math.ceil(i.width)), n.height > o.maxHeight ? n.height = Math.floor(i.height) : n.height < o.minHeight && (n.height = Math.ceil(i.height)), M(n, s);\n }(v(v({}, this.getPublicProperties()), {}, { positionRestrictions: tt(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;\n}, processAutoZoom: function(t, e, i, o) {\n var s = this.autoZoomAlgorithm;\n s || (s = this.stencilSize ? Se : this.autoZoom ? xe : Ce);\n var n = s({ event: { type: t, params: o }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });\n return v(v({}, n), {}, { changed: !Pt(n.visibleArea, e) || !Pt(n.coordinates, i) });\n}, runAutoZoom: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, o = i !== void 0 && i, s = fe(e, Fe), n = this.processAutoZoom(t, this.visibleArea, this.coordinates, s), a = n.visibleArea, h = n.coordinates, r = n.changed;\n o && r && this.enableTransitions(), this.visibleArea = a, this.coordinates = h, o && r && this.debouncedDisableTransitions();\n}, normalizeEvent: function(t) {\n return function(e) {\n var i = e.event, o = e.visibleArea, s = e.coefficient;\n if (i.type === \"manipulateImage\") return f(f({}, i), { move: { left: i.move && i.move.left ? s * i.move.left : 0, top: i.move && i.move.top ? s * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * s + o.left, top: i.scale.center.top * s + o.top } : null } });\n if (i.type === \"resize\") {\n var n = f(f({}, i), { directions: f({}, i.directions) });\n return O.forEach(function(h) {\n n.directions[h] *= s;\n }), n;\n }\n if (i.type === \"move\") {\n var a = f(f({}, i), { directions: f({}, i.directions) });\n return ze.forEach(function(h) {\n a.directions[h] *= s;\n }), a;\n }\n return i;\n }(v(v({}, this.getPublicProperties()), {}, { event: t }));\n}, getCanvas: function() {\n if (this.$refs.canvas) {\n var t = this.$refs.canvas, e = this.$refs.image, i = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(h, r, c) {\n var u = c.rotate, l = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = Gt(d, u), p = h.getContext(\"2d\");\n h.height = m.height, h.width = m.width, p.save();\n var g = B(R(f({ left: 0, top: 0 }, d)), u);\n return p.translate(-(g.left - m.width / 2), -(g.top - m.height / 2)), p.rotate(u * Math.PI / 180), p.translate(l.horizontal ? d.width : 0, l.vertical ? d.height : 0), p.scale(l.horizontal ? -1 : 1, l.vertical ? -1 : 1), p.drawImage(r, 0, 0, d.width, d.height), p.restore(), h;\n }(this.$refs.sourceCanvas, e, this.imageTransforms) : e, o = v({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: \"high\", fillColor: \"transparent\" }, this.canvas), s = function(h) {\n return h.find(function(r) {\n return c = r, !Number.isNaN(parseFloat(c)) && isFinite(c);\n var c;\n });\n }, n = $({ sizeRestrictions: { minWidth: s([o.width, o.minWidth]) || 0, minHeight: s([o.height, o.minHeight]) || 0, maxWidth: s([o.width, o.maxWidth]) || 1 / 0, maxHeight: s([o.height, o.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });\n if (o.maxArea && n.width * n.height > o.maxArea) {\n var a = Math.sqrt(o.maxArea / (n.width * n.height));\n n = { width: Math.round(a * n.width), height: Math.round(a * n.height) };\n }\n return function(h, r, c, u, l) {\n h.width = u ? u.width : c.width, h.height = u ? u.height : c.height;\n var d = h.getContext(\"2d\");\n d.clearRect(0, 0, h.width, h.height), l && (l.imageSmoothingEnabled && (d.imageSmoothingEnabled = l.imageSmoothingEnabled), l.imageSmoothingQuality && (d.imageSmoothingQuality = l.imageSmoothingQuality), l.fillColor && (d.fillStyle = l.fillColor, d.fillRect(0, 0, h.width, h.height), d.save()));\n var m = c.left < 0 ? -c.left : 0, p = c.top < 0 ? -c.top : 0;\n d.drawImage(r, c.left + m, c.top + p, c.width, c.height, m * (h.width / c.width), p * (h.height / c.height), h.width, h.height);\n }(t, i, this.coordinates, n, o), t;\n }\n}, update: function() {\n this.$emit(\"change\", this.getResult());\n}, applyTransform: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.visibleArea && e ? Re(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, o = this.visibleArea && e ? tt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;\n return Me({ transform: t, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: i, positionRestrictions: o, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });\n}, resetCoordinates: function() {\n var t = this;\n if (this.$refs.image) {\n this.$refs.cropper, this.$refs.image;\n var e = this.defaultSize;\n e || (e = this.stencilSize ? We : Te);\n var i = this.sizeRestrictions;\n i.minWidth, i.minHeight, i.maxWidth, i.maxHeight;\n var o = Y(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, s = this.defaultPosition || Ee, n = [o, function(a) {\n var h = a.coordinates;\n return v({}, Y(s) ? s({ coordinates: h, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);\n }];\n this.delayedTransforms && n.push.apply(n, U(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(n, !0), this.delayedTransforms = null;\n }\n}, clearImage: function() {\n var t = this;\n this.imageLoaded = !1, setTimeout(function() {\n var e = t.$refs.stretcher;\n e && (e.style.height = \"auto\", e.style.width = \"auto\"), t.coordinates = t.defaultCoordinates(), t.boundaries = { width: 0, height: 0 };\n }, this.transitionTime);\n}, enableTransitions: function() {\n this.transitions && (this.transitionsActive = !0);\n}, disableTransitions: function() {\n this.transitionsActive = !1;\n}, updateBoundaries: function() {\n var t = this, e = this.$refs.stretcher, i = this.$refs.cropper;\n return this.initStretcher({ cropper: i, stretcher: e, imageSize: this.imageSize }), this.$nextTick().then(function() {\n var o = { cropper: i, imageSize: t.imageSize };\n if (Y(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(o) : t.defaultBoundaries === \"fit\" ? t.boundaries = function(s) {\n var n = s.cropper, a = s.imageSize, h = n.clientHeight, r = n.clientWidth, c = h, u = a.width * h / a.height;\n return u > r && (u = r, c = a.height * r / a.width), { width: u, height: c };\n }(o) : t.boundaries = function(s) {\n var n = s.cropper;\n return { width: n.clientWidth, height: n.clientHeight };\n }(o), !t.boundaries.width || !t.boundaries.height) throw new Error(\"It's impossible to fit the cropper in the current container\");\n });\n}, resetVisibleArea: function() {\n var t = this;\n return this.appliedImageTransforms = v(v({}, this.defaultImageTransforms), {}, { flip: v({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {\n t.priority !== \"visible-area\" && (t.visibleArea = null, t.resetCoordinates());\n var e, i, o, s, n, a, h = t.defaultVisibleArea || De;\n t.visibleArea = Y(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== \"visible-area\" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, o = e.boundaries, s = e.getAreaRestrictions, n = f({}, i), a = b(o), n.width / n.height !== a && (n.height = n.width / a), M(n, s({ visibleArea: n, type: \"move\" }))), t.priority === \"visible-area\" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom(\"resetVisibleArea\");\n }).catch(function() {\n t.visibleArea = null;\n });\n}, updateVisibleArea: function() {\n var t = this;\n return this.updateBoundaries().then(function() {\n t.visibleArea = t.fitVisibleArea({ imageSize: t.imageSize, boundaries: t.boundaries, visibleArea: t.visibleArea, coordinates: t.coordinates, getAreaRestrictions: t.getAreaRestrictions }), t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom(\"updateVisibleArea\");\n }).catch(function() {\n t.visibleArea = null;\n });\n}, onChange: function() {\n var t = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];\n t && this.debounce ? this.debouncedUpdate() : this.update();\n}, onChangeImage: function() {\n var t, e = this;\n if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {\n if (function(s) {\n if (Ht(s)) return !1;\n var n = window.location, a = /(\\w+:)?(?:\\/\\/)([\\w.-]+)?(?::(\\d+))?\\/?/.exec(s) || [], h = { protocol: a[1] || \"\", host: a[2] || \"\", port: a[3] || \"\" }, r = function(c) {\n return c.port || ((c.protocol || n.protocol) === \"http\" ? 80 : 433);\n };\n return !(!h.protocol && !h.host && !h.port || h.protocol && h.protocol == n.protocol && h.host && h.host == n.host && h.host && r(h) == r(n));\n }(this.src)) {\n var i = A(this.crossOrigin) ? this.canvas : this.crossOrigin;\n i === !0 && (i = \"anonymous\"), this.imageAttributes.crossOrigin = i || null;\n }\n if (this.checkOrientation) {\n var o = (t = this.src, new Promise(function(s) {\n Xe(t).then(function(n) {\n var a = Ye(n);\n s(n ? { source: t, arrayBuffer: n, orientation: a } : { source: t, arrayBuffer: null, orientation: null });\n }).catch(function(n) {\n console.warn(n), s({ source: t, arrayBuffer: null, orientation: null });\n });\n }));\n setTimeout(function() {\n o.then(e.onParseImage);\n }, this.transitionTime);\n } else setTimeout(function() {\n e.onParseImage({ source: e.src });\n }, this.transitionTime);\n } else this.clearImage();\n}, onFailLoadImage: function() {\n this.imageAttributes.src && (this.clearImage(), this.$emit(\"error\"));\n}, onSuccessLoadImage: function() {\n var t = this, e = this.$refs.image;\n e && !this.imageLoaded && (this.imageAttributes.height = e.naturalHeight, this.imageAttributes.width = e.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {\n t.$emit(\"ready\"), t.onChange(!1);\n }));\n}, onParseImage: function(t) {\n var e = this, i = t.source, o = t.arrayBuffer, s = t.orientation;\n this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && s && s > 1 ? Ft(i) || !Ht(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([o])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(n) {\n for (var a = [], h = new Uint8Array(n); h.length > 0; ) {\n var r = h.subarray(0, 8192);\n a.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), h = h.subarray(8192);\n }\n return \"data:image/jpeg;base64,\" + btoa(a.join(\"\"));\n }(o) : this.imageAttributes.src = i, Y(this.defaultTransforms) ? this.appliedImageTransforms = pt(this.defaultTransforms()) : nt(this.defaultTransforms) ? this.appliedImageTransforms = pt(this.defaultTransforms) : this.appliedImageTransforms = function(n) {\n var a = pt({});\n if (n) switch (n) {\n case 2:\n a.flip.horizontal = !0;\n break;\n case 3:\n a.rotate = -180;\n break;\n case 4:\n a.flip.vertical = !0;\n break;\n case 5:\n a.rotate = 90, a.flip.vertical = !0;\n break;\n case 6:\n a.rotate = 90;\n break;\n case 7:\n a.rotate = 90, a.flip.horizontal = !0;\n break;\n case 8:\n a.rotate = -90;\n }\n return a;\n }(s), this.defaultImageTransforms = v(v({}, this.appliedImageTransforms), {}, { flip: v({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {\n var n = e.$refs.image;\n n && n.complete && (function(a) {\n return !!a.naturalWidth;\n }(n) ? e.onSuccessLoadImage() : e.onFailLoadImage());\n });\n}, onResizeEnd: function() {\n this.runAutoZoom(\"resize\", { transitions: !0 });\n}, onMoveEnd: function() {\n this.runAutoZoom(\"move\", { transitions: !0 });\n}, onMove: function(t) {\n var e = this;\n this.transitionsOptions.enabled || this.awaitRender(function() {\n e.coordinates = e.moveAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: tt(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();\n });\n}, onResize: function(t) {\n var e = this;\n this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {\n var i = e.sizeRestrictions, o = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);\n e.coordinates = e.resizeAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: tt(e.positionRestrictions, e.visibleArea), sizeRestrictions: { maxWidth: Math.min(i.maxWidth, e.visibleArea.width), maxHeight: Math.min(i.maxHeight, e.visibleArea.height), minWidth: Math.max(i.minWidth, o), minHeight: Math.max(i.minHeight, o) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = !1;\n });\n}, onManipulateImage: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n if (!this.transitionsOptions.enabled) {\n var i = e.transitions, o = i !== void 0 && i, s = e.normalize, n = s === void 0 || s;\n o && this.enableTransitions();\n var a = He(v(v({}, this.getPublicProperties()), {}, { event: n ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), h = a.visibleArea, r = a.coordinates;\n this.visibleArea = h, this.coordinates = r, this.runAutoZoom(\"manipulateImage\"), this.onChange(), o && this.debouncedDisableTransitions();\n }\n}, onPropsChange: function() {\n this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);\n}, getAreaRestrictions: function() {\n var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.visibleArea, i = t.type, o = i === void 0 ? \"move\" : i;\n return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: e, type: o });\n}, getAspectRatio: function(t) {\n var e, i, o = this.stencilProps, s = o.aspectRatio, n = o.minAspectRatio, a = o.maxAspectRatio;\n if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {\n var h = this.$refs.stencil.aspectRatios();\n e = h.minimum, i = h.maximum;\n }\n if (A(e) && (e = A(s) ? n : s), A(i) && (i = A(s) ? a : s), !t && (A(e) || A(i))) {\n var r = this.getStencilSize(), c = r ? b(r) : null;\n A(e) && (e = Ot(c) ? c : void 0), A(i) && (i = Ot(c) ? c : void 0);\n }\n return { minimum: e, maximum: i };\n}, getStencilSize: function() {\n if (this.stencilSize) return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, i = t.stencilSize, o = t.aspectRatio, mt(b(s = Y(i) ? i({ boundaries: e, aspectRatio: o }) : i), o) && (s = $({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: o.minimum, maximum: o.maximum } })), (s.width > e.width || s.height > e.height) && (s = $({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: b(s), maximum: b(s) } })), s;\n var t, e, i, o, s;\n}, getPublicProperties: function() {\n return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };\n}, defaultCoordinates: function() {\n return v({}, Lt);\n}, flip: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n if (!this.transitionsActive) {\n s && this.enableTransitions();\n var n = v({}, this.imageTransforms.flip), a = Le({ flip: { horizontal: t ? !n.horizontal : n.horizontal, vertical: e ? !n.vertical : n.vertical }, previousFlip: n, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), h = a.visibleArea, r = a.coordinates;\n t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = h, this.coordinates = r, this.onChange(), s && this.debouncedDisableTransitions();\n }\n}, rotate: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, o = i === void 0 || i;\n if (!this.transitionsActive) {\n o && this.enableTransitions();\n var s = v({}, this.imageSize);\n this.appliedImageTransforms.rotate += t;\n var n = Oe({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: s, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = n.visibleArea, h = n.coordinates, r = this.processAutoZoom(\"rotateImage\", a, h);\n a = r.visibleArea, h = r.coordinates, this.visibleArea = a, this.coordinates = h, this.onChange(), o && this.debouncedDisableTransitions();\n }\n} }, emits: [\"change\", \"error\", \"ready\"] }, _e = { key: 0, ref: \"canvas\", style: { display: \"none\" } }, Ne = { key: 1, ref: \"sourceCanvas\", style: { display: \"none\" } };\nse.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"cropper\", class: n.classes.cropper }, [S(\"div\", { ref: \"stretcher\", class: n.classes.stretcher }, null, 2), S(\"div\", { class: n.classes.boundaries, style: n.boundariesStyle }, [(w(), y(ot(i.backgroundWrapperComponent), { class: n.classes.cropperWrapper, \"wheel-resize\": n.settings.resizeImage.wheel, \"touch-resize\": n.settings.resizeImage.touch, \"touch-move\": n.settings.moveImage.touch, \"mouse-move\": n.settings.moveImage.mouse, onMove: n.onManipulateImage, onResize: n.onManipulateImage }, { default: k(function() {\n return [S(\"div\", { class: n.classes.background, style: n.boundariesStyle }, null, 6), S(\"div\", { class: n.classes.imageWrapper }, [S(\"img\", { ref: \"image\", crossorigin: s.imageAttributes.crossOrigin, src: s.imageAttributes.src, class: n.classes.image, style: n.imageStyle, onMousedown: e[1] || (e[1] = he(function() {\n }, [\"prevent\"])) }, null, 46, [\"crossorigin\", \"src\"])], 2), S(\"div\", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), kt((w(), y(ot(i.stencilComponent), Xt({ ref: \"stencil\", image: n.image, coordinates: s.coordinates, \"stencil-coordinates\": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, [\"image\", \"coordinates\", \"stencil-coordinates\", \"transitions\", \"onResize\", \"onResizeEnd\", \"onMove\", \"onMoveEnd\"])), [[Ut, s.imageLoaded]]), i.canvas ? (w(), y(\"canvas\", _e, null, 512)) : st(\"\", !0), i.canvas ? (w(), y(\"canvas\", Ne, null, 512)) : st(\"\", !0)];\n }), _: 1 }, 8, [\"class\", \"wheel-resize\", \"touch-resize\", \"touch-move\", \"mouse-move\", \"onMove\", \"onResize\"]))], 6)], 2);\n};\nconst Ve = {\n key: 0,\n class: \"uno-rgfbq5\"\n}, qe = {\n key: 0,\n class: \"uno-ilmauu\"\n}, Ze = /* @__PURE__ */ E(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 24 24\"\n}, [\n /* @__PURE__ */ E(\"path\", {\n fill: \"currentColor\",\n d: \"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z\",\n opacity: \"0.5\"\n }),\n /* @__PURE__ */ E(\"path\", {\n fill: \"currentColor\",\n d: \"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z\"\n }, [\n /* @__PURE__ */ E(\"animateTransform\", {\n attributeName: \"transform\",\n dur: \"1s\",\n from: \"0 12 12\",\n repeatCount: \"indefinite\",\n to: \"360 12 12\",\n type: \"rotate\"\n })\n ])\n], -1), Ge = /* @__PURE__ */ E(\"span\", null, \"加载中...\", -1), Qe = [\n Ze,\n Ge\n], Ke = { class: \"uno-91fill\" }, Je = { class: \"uno-rzw4mv\" }, ti = {\n class: \"uno-ynbxwu\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, ei = /* @__PURE__ */ ce({\n __name: \"cropper\",\n props: {\n modelValue: { type: Boolean, default: !1 },\n src: {},\n aspectRatio: { default: 1 / 1 }\n },\n emits: [\"update:modelValue\", \"crop\"],\n setup(t, { emit: e }) {\n const i = t, o = e, s = Tt(), n = Tt(!0);\n function a() {\n n.value = !1;\n }\n function h() {\n const { canvas: l } = s.value.getResult(), d = l.toDataURL();\n o(\"crop\", d), o(\"update:modelValue\", !1);\n }\n function r(l) {\n s.value.rotate(l);\n }\n function c() {\n s.value.reset();\n }\n function u() {\n o(\"update:modelValue\", !1);\n }\n return (l, d) => i.modelValue ? (w(), ct(\"div\", Ve, [\n n.value ? (w(), ct(\"div\", qe, Qe)) : st(\"\", !0),\n S(le(se), {\n ref_key: \"cropper\",\n ref: s,\n class: \"uno-g5i2o3\",\n bsrc: \"https://0.z.wiki/autoupload/20240708/BSGF/1130X750/65535_53035727810_fce2af1c7e_h_750_1130_nofilter.jp\",\n src: l.src,\n \"auto-zoom\": !0,\n \"stencil-props\": {\n movable: !1,\n aspectRatio: i.aspectRatio,\n handlers: {\n eastNorth: !0,\n north: !1,\n westNorth: !0,\n west: !1,\n westSouth: !0,\n south: !1,\n eastSouth: !0,\n east: !1\n }\n },\n \"image-restriction\": \"stencil\",\n \"resize-image\": { touch: !1, wheel: !1 },\n \"min-width\": 300,\n \"min-height\": 300,\n onReady: a\n }, null, 8, [\"src\", \"stencil-props\"]),\n E(\"div\", Ke, [\n E(\"div\", Je, [\n (w(), ct(\"svg\", ti, [\n E(\"path\", {\n fill: \"currentColor\",\n d: \"M18 14v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2M13.914 2.914L11.828 5H14a8 8 0 0 1 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5L8 6l1.414-1.414L12.5 1.5z\",\n onClick: d[0] || (d[0] = (m) => r(-90))\n })\n ])),\n E(\"div\", { onClick: c }, \" 还原 \")\n ]),\n E(\"div\", { class: \"uno-rzw4mv\" }, [\n E(\"div\", { onClick: u }, \" 取消 \"),\n E(\"div\", { onClick: h }, \" 确定 \")\n ])\n ])\n ])) : st(\"\", !0);\n }\n});\nfunction ri(t) {\n if (!t)\n throw new Error(\"file is required\");\n return new Promise((e, i) => {\n const o = new FileReader();\n o.readAsDataURL(t), o.onload = () => e(o.result), o.onerror = () => i(o.error);\n });\n}\nfunction ai(t) {\n if (!t)\n throw new Error(\"base64String is required\");\n return new Promise((e, i) => {\n try {\n const o = t.split(\",\"), n = o[0].match(/:(.*?);/)[1], a = atob(o[1]);\n let h = a.length;\n const r = new Uint8Array(h);\n for (; h--; )\n r[h] = a.charCodeAt(h);\n e(new Blob([r], { type: n }));\n } catch (o) {\n i(o);\n }\n });\n}\nfunction hi(t, e) {\n if (!t)\n throw new Error(\"url is required\");\n return new Promise((i, o) => {\n let s = document.createElement(\"canvas\");\n const n = s.getContext(\"2d\"), a = new Image();\n a.crossOrigin = \"\", a.onerror = function() {\n return o(new Error(\"Loading image failure\"));\n }, a.onload = function() {\n if (!s || !n)\n return o(new Error(\"Canvas create failure\"));\n s.height = a.height, s.width = a.width, n.drawImage(a, 0, 0);\n const h = s.toDataURL(e || \"image/png\");\n s = null, i(h);\n }, a.src = t;\n });\n}\nconst { on: ii, trigger: ni } = me();\nfunction oi(t) {\n const e = document.body, o = {\n ...{\n src: t.src,\n modelValue: !0,\n \"onUpdate:modelValue\": (n) => {\n n || lt(null, e);\n },\n onCrop: (n) => {\n ni(n);\n }\n },\n ...t\n };\n async function s(n) {\n const a = ue(ei, n);\n lt(a, e);\n }\n return s(o), () => {\n lt(null, e);\n };\n}\nfunction ci(t = {}) {\n return {\n onCrop: ii,\n showCropper: (i) => {\n const o = {\n src: i,\n ...t\n };\n oi(o);\n }\n };\n}\nexport {\n ai as base64ToBlob,\n ri as fileToBase64,\n hi as urlToBase64,\n ci as useCropper\n};\n","\n\n\n","\n\n\n\n\n","import { createApp } from 'vue'\nimport 'uno.css'\nimport '@unocss/reset/tailwind-compat.css'\n\nimport App from './App.vue'\n\nconst app = createApp(App)\n\napp.mount('#app')\n"],"names":["_hoisted_1","_hoisted_10","_cache","isDark","useDark","toggleDarkmode","useToggle","de","re","ae","me","s","n","Wt","v","T","fe","u","l","U","ut","Dt","pe","K","z","vt","bt","f","Yt","Ft","Ht","Y","A","nt","wt","J","Ot","_t","Nt","Z","ge","Rt","ve","Mt","w","y","X","dt","Vt","j","S","k","be","qt","O","we","ye","ze","Ae","Lt","Pt","L","F","R","G","H","rt","x","W","b","_","N","mt","Zt","Gt","B","at","M","yt","Re","Qt","ht","It","$t","$","zt","Me","p","Se","xe","Ce","Ee","Te","We","De","tt","He","g","C","P","V","Q","Oe","Le","jt","et","Pe","Ie","St","$e","je","xt","ft","Be","ke","Kt","Ct","Et","ot","Ue","Jt","pt","Xe","te","Ye","Bt","ee","At","it","ie","kt","Ut","ne","Xt","gt","oe","Fe","I","se","_e","Ne","he","st","Ve","qe","Ze","E","Ge","Qe","Ke","Je","ti","ei","ce","Tt","ct","le","ri","ii","ni","oi","o","lt","a","ue","ci","i","showCropper","onCrop","useCropper","open","onChange","useFileDialog","cropedImage","ref","files","base64String","fileToBase64","reset","demoCode0","html","onBeforeMount","codeToHtml","app","createApp","App"],"mappings":"o9GACOA,GAAkC,CAAC,MAAM,6BAAK,WAAY,iCADjE,8mCACoIC,GAAA,mBAAihCC,EAAA,o9BCCxoCC,GAASC,GAAQ,EACjBC,GAAiBC,GAAUH,EAAM,ECD9C,SAASI,GAAG,EAAG,CACb,OAAOC,GAAI,GAAIC,GAAG,CAAC,EAAG,IAAM,EAC9B,CACA,SAASC,IAAK,CACZ,MAAM,EAAoB,IAAI,IAAO,EAAKC,GAAM,CAC9C,EAAE,OAAOA,CAAC,CACd,EACE,MAAO,CACL,GAAKA,GAAM,CACT,EAAE,IAAIA,CAAC,EACP,MAAMC,EAAI,IAAM,EAAED,CAAC,EACnB,OAAOJ,GAAGK,CAAC,EAAG,CACZ,IAAKA,CACb,CACK,EACD,IAAK,EACL,QAAS,IAAID,IAAM,QAAQ,IAAI,MAAM,KAAK,CAAC,EAAE,IAAKC,GAAMA,EAAE,GAAGD,CAAC,CAAC,CAAC,CACpE,CACA,CACA,OAAO,kBAAqB,KAAe,sBAAsB,kBACjE,SAASE,GAAG,EAAG,EAAG,CAChB,IAAI,EAAI,OAAO,KAAK,CAAC,EACrB,GAAI,OAAO,sBAAuB,CAChC,IAAI,EAAI,OAAO,sBAAsB,CAAC,EACtC,IAAM,EAAI,EAAE,OAAO,SAAS,EAAG,CAC7B,OAAO,OAAO,yBAAyB,EAAG,CAAC,EAAE,UACn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,EAAEsJ,CAAC,EAAG,IAAM,CACjBC,GAAG,KAAM,CAAC,CACd,CACA,CACA,SAASG,GAAG,EAAI,GAAI,CAClB,MAAO,CACL,OAAQP,GACR,YAAcQ,GAAM,CAClB,MAAML,EAAI,CACR,IAAKK,EACL,GAAG,CACX,EACMN,GAAGC,CAAC,CACL,CACL,CACA,gOCviDA,KAAM,CAAE,YAAAM,EAAa,OAAAC,CAAO,EAAIC,GAAW,CACzC,YAAa,CAAI,CAClB,EAGK,CAAE,KAAAC,EAAM,SAAAC,CAAS,EAAIC,GAAc,CACvC,SAAU,GACV,OAAQ,SAAA,CACT,EAGKC,EAAcC,GAAI,EAAE,EAC1BH,EAAS,MAAOI,GAAU,CACxB,GAAI,CAACA,EACH,OAGF,MAAMC,EAAe,MAAMC,GAAaF,EAAM,CAAC,CAAC,EAChDR,EAAYS,CAAY,CAAA,CACzB,EAEDR,EAAQQ,GAAyB,CAC/BH,EAAY,MAAQG,CAAA,CAGrB,EAED,SAASE,GAAc,CACrBL,EAAY,MAAQ,EACtB,mtEC7BMM,GAAY;AAAA;AAAA,+BAIZ,MAAAC,EAAON,GAAI,EAAE,EACnB,OAAAO,GAAc,SAAY,CACnBD,EAAA,MAAQ,MAAME,GAAWH,GAAW,CACvC,KAAM,QACN,OAAQ,CACN,MAAO,YACP,KAAM,cACR,CAAA,CACD,CAAA,CACF,iwBCbKI,GAAMC,GAAUC,EAAG,EAEzBF,GAAI,MAAM,MAAM"} \ No newline at end of file +{"version":3,"file":"index-Bex626j_.js","sources":["../../src/components/Logo.vue","../../src/composables/useDarkmode.ts","../../dist/index.js","../../src/components/Playground.vue","../../src/App.vue","../../src/main.ts"],"sourcesContent":["\n","import { useDark, useToggle } from '@vueuse/core'\n\nexport const isDark = useDark()\nexport const toggleDarkmode = useToggle(isDark)\n","import \"./style.css\";\nimport { getCurrentScope as re, onScopeDispose as ae, openBlock as w, createBlock as y, renderSlot as X, resolveComponent as j, createVNode as S, withCtx as k, Fragment as Ct, renderList as Et, resolveDynamicComponent as ot, withDirectives as kt, vShow as Ut, mergeProps as Xt, withModifiers as he, createCommentVNode as st, defineComponent as ce, ref as Tt, createElementBlock as ct, unref as le, createElementVNode as E, render as lt, h as ue } from \"vue\";\nfunction de(t) {\n return re() ? (ae(t), !0) : !1;\n}\nfunction me() {\n const t = /* @__PURE__ */ new Set(), e = (s) => {\n t.delete(s);\n };\n return {\n on: (s) => {\n t.add(s);\n const n = () => e(s);\n return de(n), {\n off: n\n };\n },\n off: e,\n trigger: (...s) => Promise.all(Array.from(t).map((n) => n(...s)))\n };\n}\ntypeof WorkerGlobalScope != \"undefined\" && globalThis instanceof WorkerGlobalScope;\nfunction Wt(t, e) {\n var i = Object.keys(t);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(t);\n e && (o = o.filter(function(s) {\n return Object.getOwnPropertyDescriptor(t, s).enumerable;\n })), i.push.apply(i, o);\n }\n return i;\n}\nfunction v(t) {\n for (var e = 1; e < arguments.length; e++) {\n var i = arguments[e] != null ? arguments[e] : {};\n e % 2 ? Wt(Object(i), !0).forEach(function(o) {\n T(t, o, i[o]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Wt(Object(i)).forEach(function(o) {\n Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(i, o));\n });\n }\n return t;\n}\nfunction T(t, e, i) {\n return e in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;\n}\nfunction fe(t, e) {\n if (t == null) return {};\n var i, o, s = function(a, h) {\n if (a == null) return {};\n var r, c, u = {}, l = Object.keys(a);\n for (c = 0; c < l.length; c++) r = l[c], h.indexOf(r) >= 0 || (u[r] = a[r]);\n return u;\n }(t, e);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(t);\n for (o = 0; o < n.length; o++) i = n[o], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (s[i] = t[i]);\n }\n return s;\n}\nfunction U(t) {\n return function(e) {\n if (Array.isArray(e)) return ut(e);\n }(t) || function(e) {\n if (typeof Symbol != \"undefined\" && e[Symbol.iterator] != null || e[\"@@iterator\"] != null) return Array.from(e);\n }(t) || function(e, i) {\n if (e) {\n if (typeof e == \"string\") return ut(e, i);\n var o = Object.prototype.toString.call(e).slice(8, -1);\n if (o === \"Object\" && e.constructor && (o = e.constructor.name), o === \"Map\" || o === \"Set\") return Array.from(e);\n if (o === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return ut(e, i);\n }\n }(t) || function() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n}\nfunction ut(t, e) {\n (e == null || e > t.length) && (e = t.length);\n for (var i = 0, o = new Array(e); i < e; i++) o[i] = t[i];\n return o;\n}\nvar Dt, pe, K, z = (Dt = function(t) {\n /*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n */\n (function() {\n var e = {}.hasOwnProperty;\n function i() {\n for (var o = [], s = 0; s < arguments.length; s++) {\n var n = arguments[s];\n if (n) {\n var a = typeof n;\n if (a === \"string\" || a === \"number\") o.push(n);\n else if (Array.isArray(n)) {\n if (n.length) {\n var h = i.apply(null, n);\n h && o.push(h);\n }\n } else if (a === \"object\") if (n.toString === Object.prototype.toString) for (var r in n) e.call(n, r) && n[r] && o.push(r);\n else o.push(n.toString());\n }\n }\n return o.join(\" \");\n }\n t.exports ? (i.default = i, t.exports = i) : window.classNames = i;\n })();\n}, Dt(K = { path: pe, exports: {}, require: function(t, e) {\n return function() {\n throw new Error(\"Dynamic requires are not currently supported by @rollup/plugin-commonjs\");\n }(e == null && K.path);\n} }, K.exports), K.exports), D = function(t) {\n return function(e, i) {\n if (!e) return t;\n var o;\n typeof e == \"string\" ? o = e : i = e;\n var s = t;\n return o && (s += \"__\" + o), s + (i ? Object.keys(i).reduce(function(n, a) {\n var h = i[a];\n return h && (n += \" \" + (typeof h == \"boolean\" ? s + \"--\" + a : s + \"--\" + a + \"_\" + h)), n;\n }, \"\") : \"\");\n };\n};\nfunction vt(t, e, i) {\n var o, s, n, a, h;\n function r() {\n var u = Date.now() - a;\n u < e && u >= 0 ? o = setTimeout(r, e - u) : (o = null, i || (h = t.apply(n, s), n = s = null));\n }\n e == null && (e = 100);\n var c = function() {\n n = this, s = arguments, a = Date.now();\n var u = i && !o;\n return o || (o = setTimeout(r, e)), u && (h = t.apply(n, s), n = s = null), h;\n };\n return c.clear = function() {\n o && (clearTimeout(o), o = null);\n }, c.flush = function() {\n o && (h = t.apply(n, s), n = s = null, clearTimeout(o), o = null);\n }, c;\n}\nvt.debounce = vt;\nvar bt = vt, f = function() {\n return f = Object.assign || function(t) {\n for (var e, i = 1, o = arguments.length; i < o; i++) for (var s in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);\n return t;\n }, f.apply(this, arguments);\n};\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction Yt(t, e) {\n var i, o;\n return t && e ? (i = \"\" + t + e[0].toUpperCase() + e.slice(1), o = t + \"-\" + e) : (i = t || e, o = t || e), { name: i, classname: o };\n}\nfunction Ft(t) {\n return /^blob:/.test(t);\n}\nfunction Ht(t) {\n return Ft(t) || function(e) {\n return /^data:/.test(e);\n }(t);\n}\nfunction Y(t) {\n return !!(t && t.constructor && t.call && t.apply);\n}\nfunction A(t) {\n return t === void 0;\n}\nfunction nt(t) {\n return typeof t == \"object\" && t !== null;\n}\nfunction wt(t, e, i) {\n var o = {};\n return nt(t) ? (Object.keys(e).forEach(function(s) {\n A(t[s]) ? o[s] = e[s] : nt(e[s]) ? nt(t[s]) ? o[s] = wt(t[s], e[s], i[s]) : o[s] = t[s] ? e[s] : i[s] : e[s] === !0 || e[s] === !1 ? o[s] = !!t[s] : o[s] = t[s];\n }), o) : t ? e : i;\n}\nfunction J(t) {\n var e = Number(t);\n return Number.isNaN(e) ? t : e;\n}\nfunction Ot(t) {\n return typeof (t == \"number\" || /* @__PURE__ */ function(e) {\n return typeof e == \"object\" && e !== null;\n }(t) && toString.call(t) == \"[object Number]\") && !_t(t);\n}\nfunction _t(t) {\n return t != t;\n}\nfunction Nt(t, e) {\n return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));\n}\nvar Z = function(t, e) {\n t === void 0 && (t = {}), e === void 0 && (e = {}), this.type = \"manipulateImage\", this.move = t, this.scale = e;\n}, ge = function(t, e) {\n e === void 0 && (e = {}), this.type = \"resize\", this.directions = t, this.params = e;\n}, Rt = function(t) {\n this.type = \"move\", this.directions = t;\n}, ve = function() {\n function t(e, i, o, s, n) {\n this.type = \"drag\", this.nativeEvent = e, this.position = o, this.previousPosition = s, this.element = i, this.anchor = n;\n }\n return t.prototype.shift = function() {\n var e = this, i = e.element, o = e.anchor, s = e.position;\n if (i) {\n var n = i.getBoundingClientRect(), a = n.left, h = n.top;\n return { left: s.left - a - o.left, top: s.top - h - o.top };\n }\n return { left: 0, top: 0 };\n }, t;\n}(), Mt = { name: \"DraggableElement\", props: { classname: { type: String } }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n if (!this.$refs.draggable) throw new Error('You should add ref \"draggable\" to your root element to use draggable mixin');\n this.touches = [], this.hovered = !1;\n}, methods: { onMouseOver: function() {\n this.hovered || (this.hovered = !0, this.$emit(\"enter\"));\n}, onMouseLeave: function() {\n this.hovered && !this.touches.length && (this.hovered = !1, this.$emit(\"leave\"));\n}, onTouchStart: function(t) {\n t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = U(t.touches), this.hovered || (this.$emit(\"enter\"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {\n return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };\n }, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());\n}, onTouchEnd: function() {\n this.processEnd();\n}, onTouchMove: function(t) {\n this.touches.length && (this.processMove(t, t.touches), t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation());\n}, onMouseDown: function(t) {\n if (!this.disabled) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.initAnchor(e), t.stopPropagation();\n }\n}, onMouseMove: function(t) {\n this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.preventDefault());\n}, onMouseUp: function() {\n this.processEnd();\n}, initAnchor: function(t) {\n var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, o = e.right, s = e.bottom, n = e.top;\n this.anchor = { left: t.clientX - i, top: t.clientY - n, bottom: s - t.clientY, right: o - t.clientX };\n}, processMove: function(t, e) {\n var i = U(e);\n if (this.touches.length) {\n if (this.touches.length === 1 && i.length === 1) {\n var o = this.$refs.draggable;\n this.$emit(\"drag\", new ve(t, o, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));\n }\n this.touches = i;\n }\n}, processEnd: function() {\n this.touches.length && this.$emit(\"drag-end\"), this.hovered && (this.$emit(\"leave\"), this.hovered = !1), this.touches = [];\n} }, emits: [\"drag\", \"drag-end\", \"leave\", \"enter\"] };\nMt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"draggable\", class: i.classname, onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }), onMouseover: e[3] || (e[3] = function() {\n return n.onMouseOver && n.onMouseOver.apply(n, arguments);\n }), onMouseleave: e[4] || (e[4] = function() {\n return n.onMouseLeave && n.onMouseLeave.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 34);\n};\nvar dt = D(\"vue-handler-wrapper\"), Vt = { name: \"HandlerWrapper\", components: { DraggableElement: Mt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {\n var t;\n if (this.horizontalPosition || this.verticalPosition) {\n var e, i = Yt(this.horizontalPosition, this.verticalPosition);\n t = dt((T(e = {}, i.classname, !0), T(e, \"disabled\", this.disabled), e));\n } else t = dt({ disabled: this.disabled });\n return { root: t, draggable: dt(\"draggable\") };\n} }, emits: [\"leave\", \"enter\", \"drag\", \"drag-end\"] };\nVt.render = function(t, e, i, o, s, n) {\n var a = j(\"DraggableElement\");\n return w(), y(\"div\", { class: n.classes.root }, [S(a, { class: n.classes.draggable, onDrag: e[1] || (e[1] = function(h) {\n return t.$emit(\"drag\", h);\n }), onDragEnd: e[2] || (e[2] = function(h) {\n return t.$emit(\"drag-end\");\n }), onLeave: e[3] || (e[3] = function(h) {\n return t.$emit(\"leave\");\n }), onEnter: e[4] || (e[4] = function(h) {\n return t.$emit(\"enter\");\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"class\"])], 2);\n};\nvar be = D(\"vue-line-wrapper\"), qt = { name: \"LineWrapper\", components: { DraggableElement: Mt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {\n var t;\n return be((T(t = {}, this.position, !0), T(t, \"disabled\", this.disabled), t));\n} }, emits: [\"leave\", \"enter\", \"drag\", \"drag-end\"] };\nqt.render = function(t, e, i, o, s, n) {\n var a = j(\"DraggableElement\");\n return w(), y(a, { class: n.classname, onDrag: e[1] || (e[1] = function(h) {\n return t.$emit(\"drag\", h);\n }), onDragEnd: e[2] || (e[2] = function(h) {\n return t.$emit(\"drag-end\");\n }), onLeave: e[3] || (e[3] = function(h) {\n return t.$emit(\"leave\");\n }), onEnter: e[4] || (e[4] = function(h) {\n return t.$emit(\"enter\");\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"class\"]);\n};\nvar O = [\"left\", \"right\", \"top\", \"bottom\"], we = [\"left\", \"right\"], ye = [\"top\", \"bottom\"], ze = [\"left\", \"top\"], Ae = [\"fill-area\", \"fit-area\", \"stencil\", \"none\"], Lt = { left: 0, top: 0, width: 0, height: 0 };\nfunction Pt(t, e, i) {\n return !(i = i || [\"width\", \"height\", \"left\", \"top\"]).some(function(o) {\n return t[o] !== e[o];\n });\n}\nfunction L(t) {\n return { left: t.left, top: t.top, right: t.left + t.width, bottom: t.top + t.height };\n}\nfunction F(t, e) {\n return { left: t.left - e.left, top: t.top - e.top };\n}\nfunction R(t) {\n return { left: t.left + t.width / 2, top: t.top + t.height / 2 };\n}\nfunction G(t, e) {\n var i = { left: 0, top: 0, right: 0, bottom: 0 };\n return O.forEach(function(o) {\n var s = e[o], n = L(t)[o];\n i[o] = s !== void 0 && n !== void 0 ? o === \"left\" || o === \"top\" ? Math.max(0, s - n) : Math.max(0, n - s) : 0;\n }), i;\n}\nfunction H(t, e) {\n return { left: t.left - e.left, top: t.top - e.top, width: t.width + e.left + e.right, height: t.height + e.top + e.bottom };\n}\nfunction rt(t) {\n return { left: -t.left, top: -t.top };\n}\nfunction x(t, e) {\n return f(f({}, t), { left: t.left + e.left, top: t.top + e.top });\n}\nfunction W(t, e, i, o) {\n if (e !== 1) {\n if (i) {\n var s = R(t);\n return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - s.left) * (1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - s.top) * (1 - e) };\n }\n return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2, top: t.top + t.height * (1 - e) / 2 };\n }\n return t;\n}\nfunction b(t) {\n return t.width / t.height;\n}\nfunction _(t, e) {\n return Math.min(e.right !== void 0 && e.left !== void 0 ? (e.right - e.left) / t.width : 1 / 0, e.bottom !== void 0 && e.top !== void 0 ? (e.bottom - e.top) / t.height : 1 / 0);\n}\nfunction N(t, e) {\n var i = { left: 0, top: 0 }, o = G(t, e);\n return o.left && o.left > 0 ? i.left = o.left : o.right && o.right > 0 && (i.left = -o.right), o.top && o.top > 0 ? i.top = o.top : o.bottom && o.bottom > 0 && (i.top = -o.bottom), i;\n}\nfunction mt(t, e) {\n var i;\n return e.minimum && t < e.minimum ? i = e.minimum : e.maximum && t > e.maximum && (i = e.maximum), i;\n}\nfunction Zt(t, e) {\n var i = b(t), o = b(e);\n return e.width < 1 / 0 && e.height < 1 / 0 ? i > o ? { width: e.width, height: e.width / i } : { width: e.height * i, height: e.height } : e.width < 1 / 0 ? { width: e.width, height: e.width / i } : e.height < 1 / 0 ? { width: e.height * i, height: e.height } : t;\n}\nfunction Gt(t, e) {\n var i = e * Math.PI / 180;\n return { width: Math.abs(t.width * Math.cos(i)) + Math.abs(t.height * Math.sin(i)), height: Math.abs(t.width * Math.sin(i)) + Math.abs(t.height * Math.cos(i)) };\n}\nfunction B(t, e) {\n var i = e * Math.PI / 180;\n return { left: t.left * Math.cos(i) - t.top * Math.sin(i), top: t.left * Math.sin(i) + t.top * Math.cos(i) };\n}\nfunction at(t, e) {\n var i = G(M(t, e), e);\n return i.left + i.right + i.top + i.bottom ? i.left + i.right > i.top + i.bottom ? Math.min((t.width + i.left + i.right) / t.width, _(t, e)) : Math.min((t.height + i.top + i.bottom) / t.height, _(t, e)) : 1;\n}\nfunction M(t, e, i) {\n i === void 0 && (i = !1);\n var o = N(t, e);\n return x(t, i ? rt(o) : o);\n}\nfunction yt(t) {\n return { width: t.right !== void 0 && t.left !== void 0 ? t.right - t.left : 1 / 0, height: t.bottom !== void 0 && t.top !== void 0 ? t.bottom - t.top : 1 / 0 };\n}\nfunction Re(t, e) {\n return f(f({}, t), { minWidth: Math.min(e.width, t.minWidth), minHeight: Math.min(e.height, t.minHeight), maxWidth: Math.min(e.width, t.maxWidth), maxHeight: Math.min(e.height, t.maxHeight) });\n}\nfunction Qt(t, e, i) {\n i === void 0 && (i = !0);\n var o = {};\n return O.forEach(function(s) {\n var n = t[s], a = e[s];\n n !== void 0 && a !== void 0 ? o[s] = s === \"left\" || s === \"top\" ? i ? Math.max(n, a) : Math.min(n, a) : i ? Math.min(n, a) : Math.max(n, a) : a !== void 0 ? o[s] = a : n !== void 0 && (o[s] = n);\n }), o;\n}\nfunction ht(t, e) {\n return Qt(t, e, !0);\n}\nfunction It(t) {\n var e = t.size, i = t.aspectRatio, o = t.ignoreMinimum, s = t.sizeRestrictions;\n return !!((e.correctRatio || b(e) >= i.minimum && b(e) <= i.maximum) && e.height <= s.maxHeight && e.width <= s.maxWidth && e.width && e.height && (o || e.height >= s.minHeight && e.width >= s.minWidth));\n}\nfunction $t(t, e) {\n return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);\n}\nfunction $(t) {\n var e = t.width, i = t.height, o = t.sizeRestrictions, s = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, n = { width: Math.max(o.minWidth, Math.min(o.maxWidth, e)), height: Math.max(o.minHeight, Math.min(o.maxHeight, i)) };\n function a(c, u) {\n return u === void 0 && (u = !1), c.reduce(function(l, d) {\n return It({ size: d, aspectRatio: s, sizeRestrictions: o, ignoreMinimum: u }) && (!l || $t(d, { width: e, height: i }) < $t(l, { width: e, height: i })) ? d : l;\n }, null);\n }\n var h = [];\n s && [s.minimum, s.maximum].forEach(function(c) {\n c && h.push({ width: n.width, height: n.width / c, correctRatio: !0 }, { width: n.height * c, height: n.height, correctRatio: !0 });\n }), It({ size: n, aspectRatio: s, sizeRestrictions: o }) && h.push(n);\n var r = a(h) || a(h, !0);\n return r && { width: r.width, height: r.height };\n}\nfunction zt(t) {\n var e = t.event, i = t.coordinates, o = t.positionRestrictions, s = o === void 0 ? {} : o, n = x(i, e.directions);\n return x(n, N(n, s));\n}\nfunction Me(t) {\n var e = t.coordinates, i = t.transform, o = t.imageSize, s = t.sizeRestrictions, n = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(u, l) {\n return zt({ coordinates: u, positionRestrictions: n, event: new Rt({ left: l.left - u.left, top: l.top - u.top }) });\n }, c = f({}, e);\n return (Array.isArray(i) ? i : [i]).forEach(function(u) {\n var l = {};\n A((l = typeof u == \"function\" ? u({ coordinates: c, imageSize: o, visibleArea: h }) : u).width) && A(l.height) || (c = function(d, m) {\n var p = f(f(f({}, d), $({ width: m.width, height: m.height, sizeRestrictions: s, aspectRatio: a })), { left: 0, top: 0 });\n return r(p, { left: d.left, top: d.top });\n }(c, f(f({}, c), l))), A(l.left) && A(l.top) || (c = r(c, f(f({}, c), l)));\n }), c;\n}\nfunction Se(t) {\n t.event;\n var e = t.getAreaRestrictions, i = t.boundaries, o = t.coordinates, s = t.visibleArea;\n t.aspectRatio;\n var n = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;\n t.stencilReference;\n var r, c, u, l = f({}, o), d = f({}, s), m = f({}, n);\n r = b(m), c = b(l), u === void 0 && (u = 1e-3), (r === 0 || c === 0 ? Math.abs(c - r) < u : Math.abs(c / r) < 1 + u && Math.abs(c / r) > 1 - u) || (l = f(f({}, l), $({ sizeRestrictions: a, width: l.width, height: l.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));\n var p = at(d = W(d, l.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: \"resize\" }));\n return p !== 1 && (d = W(d, p), l = W(l, p)), d = M(d = x(d, F(R(l), R(d))), e({ visibleArea: d, type: \"move\" })), { coordinates: l = M(l, ht(L(d), h)), visibleArea: d };\n}\nfunction xe(t) {\n var e = t.event, i = t.getAreaRestrictions, o = t.boundaries, s = t.coordinates, n = t.visibleArea;\n t.aspectRatio, t.stencilSize, t.sizeRestrictions;\n var a = t.positionRestrictions;\n t.stencilReference;\n var h = f({}, s), r = f({}, n);\n if (s && n && e.type !== \"manipulateImage\") {\n var c = { width: 0, height: 0 };\n r.width, o.width, b(o) > b(h) ? (c.height = 0.8 * o.height, c.width = c.height * b(h)) : (c.width = 0.8 * o.width, c.height = c.width * b(h));\n var u = at(r = W(r, h.width * o.width / (r.width * c.width)), i({ visibleArea: r, type: \"resize\" }));\n r = W(r, u), u !== 1 && (c.height /= u, c.width /= u), r = M(r = x(r, F(R(h), R(r))), i({ visibleArea: r, type: \"move\" })), h = M(h, ht(L(r), a));\n }\n return { coordinates: h, visibleArea: r };\n}\nfunction Ce(t) {\n var e = t.event, i = t.coordinates, o = t.visibleArea, s = t.getAreaRestrictions, n = f({}, o), a = f({}, i);\n if (e.type === \"setCoordinates\") {\n var h = Math.max(0, a.width - n.width), r = Math.max(0, a.height - n.height);\n h > r ? n = W(n, Math.min(a.width / n.width, _(n, s({ visibleArea: n, type: \"resize\" })))) : r > h && (n = W(n, Math.min(a.height / n.height, _(n, s({ visibleArea: n, type: \"resize\" }))))), n = M(n = x(n, rt(N(a, L(n)))), s({ visibleArea: n, type: \"move\" }));\n }\n return { visibleArea: n, coordinates: a };\n}\nfunction Ee(t) {\n var e = t.imageSize, i = t.visibleArea, o = t.coordinates, s = i || e;\n return { left: (i ? i.left : 0) + s.width / 2 - o.width / 2, top: (i ? i.top : 0) + s.height / 2 - o.height / 2 };\n}\nfunction Te(t) {\n var e = t.imageSize, i = t.visibleArea, o = t.aspectRatio, s = t.sizeRestrictions, n = i || e, a = Math.min(o.maximum || 1 / 0, Math.max(o.minimum || 0, b(n))), h = n.width < n.height ? { width: 0.8 * n.width, height: 0.8 * n.width / a } : { height: 0.8 * n.height, width: 0.8 * n.height * a };\n return $(f(f({}, h), { aspectRatio: o, sizeRestrictions: s }));\n}\nfunction We(t) {\n var e, i, o = t.imageSize, s = t.visibleArea, n = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = s || o;\n return b(c) > b(n) ? i = (e = r.height * c.height / n.height) * b(r) : e = (i = r.width * c.width / n.width) / b(r), $({ width: i, height: e, aspectRatio: a, sizeRestrictions: h });\n}\nfunction De(t) {\n var e = t.getAreaRestrictions, i = t.coordinates, o = t.imageSize, s = b(t.boundaries);\n if (i) {\n var n = { height: Math.max(i.height, o.height), width: Math.max(i.width, o.width) }, a = Zt({ width: b(n) > s ? n.width : n.height * s, height: b(n) > s ? n.width / s : n.height }, yt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = G(i, L(f({ left: 0, top: 0 }, o))), c = {};\n return !r.left && !r.right && h.width <= o.width && (c.left = 0, c.right = o.width), !r.top && !r.bottom && h.height <= o.height && (c.top = 0, c.bottom = o.height), M(h, c);\n }\n var u = b(o);\n return a = { height: u > s ? o.height : o.width / s, width: u > s ? o.height * s : o.width }, { left: o.width / 2 - a.width / 2, top: o.height / 2 - a.height / 2, width: a.width, height: a.height };\n}\nfunction tt(t, e) {\n return Qt(t, L(e));\n}\nfunction He(t) {\n var e = t.event, i = t.coordinates, o = t.visibleArea, s = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, u = f({}, o), l = f({}, i), d = 1, m = 1, p = r.factor && Math.abs(r.factor - 1) > 1e-3;\n u = x(u, { left: c.left || 0, top: c.top || 0 });\n var g = { stencil: { minimum: Math.max(s.minWidth ? s.minWidth / l.width : 0, s.minHeight ? s.minHeight / l.height : 0), maximum: Math.min(s.maxWidth ? s.maxWidth / l.width : 1 / 0, s.maxHeight ? s.maxHeight / l.height : 1 / 0, _(l, a)) }, area: { maximum: _(u, n({ visibleArea: u, type: \"resize\" })) } };\n r.factor && p && (r.factor < 1 ? (m = Math.max(r.factor, g.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(g.area.maximum, g.stencil.maximum))) < 1 && (m = 1)), m && (u = W(u, m, r.center));\n var C = i.left - o.left, P = o.width + o.left - (i.width + i.left), V = i.top - o.top, Q = o.height + o.top - (i.height + i.top);\n return u = M(u = x(u, N(u, { left: a.left !== void 0 ? a.left - C * m : void 0, top: a.top !== void 0 ? a.top - V * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + Q * m : void 0, right: a.right !== void 0 ? a.right + P * m : void 0 })), n({ visibleArea: u, type: \"move\" })), l.width = l.width * m, l.height = l.height * m, l.left = u.left + C * m, l.top = u.top + V * m, l = M(l, ht(L(u), a)), r.factor && p && h && (r.factor > 1 ? d = Math.min(g.area.maximum, r.factor) / m : r.factor < 1 && (d = Math.max(l.height / u.height, l.width / u.width, r.factor / m)), d !== 1 && (u = x(u = M(u = W(u, d, r.factor > 1 ? r.center : R(l)), n({ visibleArea: u, type: \"move\" })), rt(N(l, L(u)))))), { coordinates: l, visibleArea: u };\n}\nfunction Oe(t) {\n var e = t.aspectRatio, i = t.getAreaRestrictions, o = t.coordinates, s = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, u = f({}, o), l = f({}, s), d = B(R(f({ left: 0, top: 0 }, r)), c);\n return (u = f(f({}, $({ sizeRestrictions: n, aspectRatio: e, width: u.width, height: u.height })), B(R(u), c))).left -= d.left - h.width / 2 + u.width / 2, u.top -= d.top - h.height / 2 + u.height / 2, l = W(l, at(l, i({ visibleArea: l, type: \"resize\" }))), { coordinates: u = M(u, a), visibleArea: l = M(l = x(l, F(R(u), R(o))), i({ visibleArea: l, type: \"move\" })) };\n}\nfunction Le(t) {\n var e = t.flip, i = t.previousFlip, o = t.rotate, s = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r = f({}, n), c = f({}, a), u = i.horizontal !== e.horizontal, l = i.vertical !== e.vertical;\n if (u || l) {\n var d = B({ left: h.width / 2, top: h.height / 2 }, -o), m = B(R(r), -o), p = B({ left: u ? d.left - (m.left - d.left) : m.left, top: l ? d.top - (m.top - d.top) : m.top }, o);\n r = x(r, F(p, R(r))), m = B(R(c), -o), c = M(c = x(c, F(p = B({ left: u ? d.left - (m.left - d.left) : m.left, top: l ? d.top - (m.top - d.top) : m.top }, o), R(c))), s({ visibleArea: c, type: \"move\" }));\n }\n return { coordinates: r, visibleArea: c };\n}\nfunction jt(t) {\n var e = t.directions, i = t.coordinates, o = t.positionRestrictions, s = o === void 0 ? {} : o, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = f({}, e), c = H(i, r).width, u = H(i, r).height;\n c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - n.minWidth) / (r.left / r.right), r.right = -(i.width - n.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - n.minWidth) : r.right < 0 && (r.right = -(i.width - n.minWidth))), u < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - n.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - n.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - n.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - n.minHeight)));\n var l = G(H(i, r), s);\n h && (l.left && l.left > 0 && l.right === 0 ? (r.right += l.left, r.left -= l.left) : l.right && l.right > 0 && l.left === 0 && (r.left += l.right, r.right -= l.right), l.top && l.top > 0 && l.bottom === 0 ? (r.bottom += l.top, r.top -= l.top) : l.bottom && l.bottom > 0 && l.top === 0 && (r.top += l.bottom, r.bottom -= l.bottom), l = G(H(i, r), s));\n var d = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };\n if (O.forEach(function(g) {\n var C = l[g];\n C && r[g] && (d[g] = Math.max(0, 1 - C / r[g]));\n }), a) {\n var m = Math.min.apply(null, O.map(function(g) {\n return d[g];\n }));\n m !== 1 / 0 && O.forEach(function(g) {\n r[g] *= m;\n });\n } else O.forEach(function(g) {\n d[g] !== 1 / 0 && (r[g] *= d[g]);\n });\n if (c = H(i, r).width, u = H(i, r).height, r.right + r.left && (c > n.maxWidth ? d.width = (n.maxWidth - i.width) / (r.right + r.left) : c < n.minWidth && (d.width = (n.minWidth - i.width) / (r.right + r.left))), r.bottom + r.top && (u > n.maxHeight ? d.height = (n.maxHeight - i.height) / (r.bottom + r.top) : u < n.minHeight && (d.height = (n.minHeight - i.height) / (r.bottom + r.top))), a) {\n var p = Math.min(d.width, d.height);\n p !== 1 / 0 && O.forEach(function(g) {\n r[g] *= p;\n });\n } else d.width !== 1 / 0 && we.forEach(function(g) {\n r[g] *= d.width;\n }), d.height !== 1 / 0 && ye.forEach(function(g) {\n r[g] *= d.height;\n });\n return r;\n}\nfunction et(t, e, i) {\n return e == 0 && i == 0 ? t / 2 : e == 0 ? 0 : i == 0 ? t : t * Math.abs(e / (e + i));\n}\nvar Pe = D(\"vue-simple-handler\"), Ie = D(\"vue-simple-handler-wrapper\"), St = { name: \"SimpleHandler\", components: { HandlerWrapper: Vt }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {\n return { hover: !1 };\n}, computed: { classes: function() {\n var t, e = (T(t = {}, this.horizontalPosition, !!this.horizontalPosition), T(t, this.verticalPosition, !!this.verticalPosition), T(t, \"\".concat(this.horizontalPosition, \"-\").concat(this.verticalPosition), !!(this.verticalPosition && this.horizontalPosition)), T(t, \"hover\", this.hover), t);\n return { default: z(Pe(e), this.defaultClass, this.hover && this.hoverClass), wrapper: z(Ie(e), this.wrapperClass) };\n} }, methods: { onDrag: function(t) {\n this.$emit(\"drag\", t);\n}, onEnter: function() {\n this.hover = !0;\n}, onLeave: function() {\n this.hover = !1;\n}, onDragEnd: function() {\n this.$emit(\"drag-end\");\n} }, emits: [\"drag\", \"drag-end\"] };\nSt.render = function(t, e, i, o, s, n) {\n var a = j(\"HandlerWrapper\");\n return w(), y(a, { class: n.classes.wrapper, \"vertical-position\": i.verticalPosition, \"horizontal-position\": i.horizontalPosition, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: k(function() {\n return [S(\"div\", { class: n.classes.default }, null, 2)];\n }), _: 1 }, 8, [\"class\", \"vertical-position\", \"horizontal-position\", \"disabled\", \"onDrag\", \"onDragEnd\", \"onEnter\", \"onLeave\"]);\n};\nvar $e = D(\"vue-simple-line\"), je = D(\"vue-simple-line-wrapper\"), xt = { name: \"SimpleLine\", components: { LineWrapper: qt }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {\n return { hover: !1 };\n}, computed: { classes: function() {\n return { root: z($e(T({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: z(je(T({}, this.position, !0)), this.wrapperClass) };\n} }, methods: { onDrag: function(t) {\n this.$emit(\"drag\", t);\n}, onEnter: function() {\n this.hover = !0;\n}, onLeave: function() {\n this.hover = !1;\n}, onDragEnd: function() {\n this.$emit(\"drag-end\");\n} }, emits: [\"drag\", \"drag-end\"] };\nxt.render = function(t, e, i, o, s, n) {\n var a = j(\"LineWrapper\");\n return w(), y(a, { class: n.classes.wrapper, position: i.position, disabled: i.disabled, onDrag: n.onDrag, onDragEnd: n.onDragEnd, onEnter: n.onEnter, onLeave: n.onLeave }, { default: k(function() {\n return [S(\"div\", { class: n.classes.root }, null, 2)];\n }), _: 1 }, 8, [\"class\", \"position\", \"disabled\", \"onDrag\", \"onDragEnd\", \"onEnter\", \"onLeave\"]);\n};\nvar ft = D(\"vue-bounding-box\"), Be = [\"east\", \"west\", null], ke = [\"south\", \"north\", null], Kt = { name: \"BoundingBox\", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {\n return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };\n} }, handlersComponent: { type: [Object, String], default: function() {\n return St;\n} }, handlersClasses: { type: Object, default: function() {\n return {};\n} }, handlersWrappersClasses: { type: Object, default: function() {\n return {};\n} }, lines: { type: Object, default: function() {\n return { west: !0, north: !0, east: !0, south: !0 };\n} }, linesComponent: { type: [Object, String], default: function() {\n return xt;\n} }, linesClasses: { type: Object, default: function() {\n return {};\n} }, linesWrappersClasses: { type: Object, default: function() {\n return {};\n} }, resizable: { type: Boolean, default: !0 } }, data: function() {\n var t = [];\n return Be.forEach(function(e) {\n ke.forEach(function(i) {\n if (e !== i) {\n var o = Yt(e, i), s = o.name, n = o.classname;\n t.push({ name: s, classname: n, verticalDirection: i, horizontalDirection: e });\n }\n });\n }), { points: t };\n}, computed: { style: function() {\n var t = {};\n return this.width && this.height && (t.width = \"\".concat(this.width, \"px\"), t.height = \"\".concat(this.height, \"px\"), this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction))), t;\n}, classes: function() {\n var t = this.handlersClasses, e = this.handlersWrappersClasses, i = this.linesClasses, o = this.linesWrappersClasses;\n return { root: ft(), handlers: t, handlersWrappers: e, lines: i, linesWrappers: o };\n}, lineNodes: function() {\n var t = this, e = [];\n return this.points.forEach(function(i) {\n i.horizontalDirection && i.verticalDirection || !t.lines[i.name] || e.push({ name: i.name, component: t.linesComponent, class: z(t.classes.lines.default, t.classes.lines[i.name], !t.resizable && t.classes.lines.disabled), wrapperClass: z(t.classes.linesWrappers.default, t.classes.linesWrappers[i.name], !t.resizable && t.classes.linesWrappers.disabled), hoverClass: t.classes.lines.hover, verticalDirection: i.verticalDirection, horizontalDirection: i.horizontalDirection, disabled: !t.resizable });\n }), e;\n}, handlerNodes: function() {\n var t = this, e = [], i = this.width, o = this.height;\n return this.points.forEach(function(s) {\n if (t.handlers[s.name]) {\n var n = { name: s.name, component: t.handlersComponent, class: z(t.classes.handlers.default, t.classes.handlers[s.name]), wrapperClass: z(t.classes.handlersWrappers.default, t.classes.handlersWrappers[s.name]), hoverClass: t.classes.handlers.hover, verticalDirection: s.verticalDirection, horizontalDirection: s.horizontalDirection, disabled: !t.resizable };\n if (i && o) {\n var a = s.horizontalDirection, h = s.verticalDirection, r = a === \"east\" ? i : a === \"west\" ? 0 : i / 2, c = h === \"south\" ? o : h === \"north\" ? 0 : o / 2;\n n.wrapperClass = ft(\"handler\"), n.wrapperStyle = { transform: \"translate(\".concat(r, \"px, \").concat(c, \"px)\") }, t.transitions && t.transitions.enabled && (n.wrapperStyle.transition = \"\".concat(t.transitions.time, \"ms \").concat(t.transitions.timingFunction));\n } else n.wrapperClass = ft(\"handler\", T({}, s.classname, !0));\n e.push(n);\n }\n }), e;\n} }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n this.touches = [];\n}, methods: { onEnd: function() {\n this.$emit(\"resize-end\");\n}, onHandlerDrag: function(t, e, i) {\n var o, s = t.shift(), n = s.left, a = s.top, h = { left: 0, right: 0, top: 0, bottom: 0 };\n e === \"west\" ? h.left -= n : e === \"east\" && (h.right += n), i === \"north\" ? h.top -= a : i === \"south\" && (h.bottom += a), !i && e ? o = \"width\" : i && !e && (o = \"height\"), this.resizable && this.$emit(\"resize\", new ge(h, { allowedDirections: { left: e === \"west\" || !e, right: e === \"east\" || !e, bottom: i === \"south\" || !i, top: i === \"north\" || !i }, preserveAspectRatio: t.nativeEvent && t.nativeEvent.shiftKey, respectDirection: o }));\n} }, emits: [\"resize\", \"resize-end\"] };\nKt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"box\", class: n.classes.root, style: n.style }, [X(t.$slots, \"default\"), S(\"div\", null, [(w(!0), y(Ct, null, Et(n.lineNodes, function(a) {\n return w(), y(ot(a.component), { key: a.name, \"default-class\": a.class, \"hover-class\": a.hoverClass, \"wrapper-class\": a.wrapperClass, position: a.name, disabled: a.disabled, onDrag: function(h) {\n return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);\n }, onDragEnd: e[1] || (e[1] = function(h) {\n return n.onEnd();\n }) }, null, 8, [\"default-class\", \"hover-class\", \"wrapper-class\", \"position\", \"disabled\", \"onDrag\"]);\n }), 128))]), (w(!0), y(Ct, null, Et(n.handlerNodes, function(a) {\n return w(), y(\"div\", { key: a.name, style: a.wrapperStyle, class: a.wrapperClass }, [(w(), y(ot(a.component), { \"default-class\": a.class, \"hover-class\": a.hoverClass, \"wrapper-class\": a.wrapperClass, \"horizontal-position\": a.horizontalDirection, \"vertical-position\": a.verticalDirection, disabled: a.disabled, onDrag: function(h) {\n return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);\n }, onDragEnd: e[2] || (e[2] = function(h) {\n return n.onEnd();\n }) }, null, 8, [\"default-class\", \"hover-class\", \"wrapper-class\", \"horizontal-position\", \"vertical-position\", \"disabled\", \"onDrag\"]))], 6);\n }), 128))], 6);\n};\nvar Ue = D(\"vue-draggable-area\"), Jt = { name: \"DraggableArea\", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {\n return { default: Ue() };\n} }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, mounted: function() {\n this.touches = [], this.touchStarted = !1;\n}, methods: { onTouchStart: function(t) {\n if (t.cancelable) {\n var e = this.movable && t.touches.length === 1;\n e && (this.touches = U(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());\n }\n}, onTouchEnd: function() {\n this.touchStarted = !1, this.processEnd();\n}, onTouchMove: function(t) {\n this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : Nt({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: t.touches[0].clientX, y: t.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }), this.touchStarted = !0));\n}, onMouseDown: function(t) {\n if (this.movable && t.button === 0) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.initAnchor(e), t.stopPropagation();\n }\n}, onMouseMove: function(t) {\n this.touches.length && (this.processMove(t, [{ fake: !0, clientX: t.clientX, clientY: t.clientY }]), t.preventDefault && t.cancelable && t.preventDefault(), t.stopPropagation());\n}, onMouseUp: function() {\n this.processEnd();\n}, initAnchor: function(t) {\n var e = this.$refs.container.getBoundingClientRect(), i = e.left, o = e.top;\n this.anchor = { x: t.clientX - i, y: t.clientY - o };\n}, processMove: function(t, e) {\n var i = U(e);\n if (this.touches.length) {\n var o = this.$refs.container.getBoundingClientRect(), s = o.left, n = o.top;\n this.touches.length === 1 && i.length === 1 && this.$emit(\"move\", new Rt({ left: i[0].clientX - (s + this.anchor.x), top: i[0].clientY - (n + this.anchor.y) }));\n }\n}, processEnd: function() {\n this.touches.length && this.$emit(\"move-end\"), this.touches = [];\n} }, emits: [\"move\", \"move-end\"] };\nJt.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"container\", onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 544);\n};\nfunction pt(t) {\n var e, i;\n return { rotate: t.rotate || 0, flip: { horizontal: ((e = t == null ? void 0 : t.flip) === null || e === void 0 ? void 0 : e.horizontal) || !1, vertical: ((i = t == null ? void 0 : t.flip) === null || i === void 0 ? void 0 : i.vertical) || !1 } };\n}\nfunction Xe(t) {\n return new Promise(function(e, i) {\n try {\n if (t) if (/^data:/i.test(t)) e(function(r) {\n r = r.replace(/^data:([^;]+);base64,/gim, \"\");\n for (var c = atob(r), u = c.length, l = new ArrayBuffer(u), d = new Uint8Array(l), m = 0; m < u; m++) d[m] = c.charCodeAt(m);\n return l;\n }(t));\n else if (/^blob:/i.test(t)) {\n var o = new FileReader();\n o.onload = function(r) {\n e(r.target.result);\n }, n = t, a = function(r) {\n o.readAsArrayBuffer(r);\n }, (h = new XMLHttpRequest()).open(\"GET\", n, !0), h.responseType = \"blob\", h.onload = function() {\n this.status != 200 && this.status !== 0 || a(this.response);\n }, h.send();\n } else {\n var s = new XMLHttpRequest();\n s.onreadystatechange = function() {\n s.readyState === 4 && (s.status === 200 || s.status === 0 ? e(s.response) : i(\"Warning: could not load an image to parse its orientation\"), s = null);\n }, s.onprogress = function() {\n s.getResponseHeader(\"content-type\") !== \"image/jpeg\" && s.abort();\n }, s.withCredentials = !1, s.open(\"GET\", t, !0), s.responseType = \"arraybuffer\", s.send(null);\n }\n else i(\"Error: the image is empty\");\n } catch (r) {\n i(r);\n }\n var n, a, h;\n });\n}\nfunction te(t) {\n var e = t.rotate, i = t.flip, o = t.scaleX, s = t.scaleY, n = \"\";\n return n += \" rotate(\" + e + \"deg) \", n += \" scaleX(\" + o * (i.horizontal ? -1 : 1) + \") \", n += \" scaleY(\" + s * (i.vertical ? -1 : 1) + \") \";\n}\nfunction Ye(t) {\n try {\n var e, i = new DataView(t), o = void 0, s = void 0, n = void 0, a = void 0;\n if (i.getUint8(0) === 255 && i.getUint8(1) === 216) for (var h = i.byteLength, r = 2; r + 1 < h; ) {\n if (i.getUint8(r) === 255 && i.getUint8(r + 1) === 225) {\n n = r;\n break;\n }\n r++;\n }\n if (n && (o = n + 10, function(m, p, g) {\n var C, P = \"\";\n for (C = p, g += p; C < g; C++) P += String.fromCharCode(m.getUint8(C));\n return P;\n }(i, n + 4, 4) === \"Exif\")) {\n var c = i.getUint16(o);\n if (((s = c === 18761) || c === 19789) && i.getUint16(o + 2, s) === 42) {\n var u = i.getUint32(o + 4, s);\n u >= 8 && (a = o + u);\n }\n }\n if (a) {\n for (var l = i.getUint16(a, s), d = 0; d < l; d++)\n if (r = a + 12 * d + 2, i.getUint16(r, s) === 274) {\n r += 8, e = i.getUint16(r, s), i.setUint16(r, 1, s);\n break;\n }\n }\n return e;\n } catch {\n return null;\n }\n}\nfunction Bt(t, e) {\n var i = e.getBoundingClientRect(), o = i.left, s = i.top, n = { left: 0, top: 0 }, a = 0;\n return t.forEach(function(h) {\n n.left += (h.clientX - o) / t.length, n.top += (h.clientY - s) / t.length;\n }), t.forEach(function(h) {\n a += Nt({ x: n.left, y: n.top }, { x: h.clientX - o, y: h.clientY - s });\n }), { centerMass: n, spread: a, count: t.length };\n}\nvar ee = { props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 }, eventsFilter: { type: Function, required: !1 } }, beforeMount: function() {\n window.addEventListener(\"mouseup\", this.onMouseUp, { passive: !1 }), window.addEventListener(\"mousemove\", this.onMouseMove, { passive: !1 }), window.addEventListener(\"touchmove\", this.onTouchMove, { passive: !1 }), window.addEventListener(\"touchend\", this.onTouchEnd, { passive: !1 });\n}, beforeUnmount: function() {\n window.removeEventListener(\"mouseup\", this.onMouseUp), window.removeEventListener(\"mousemove\", this.onMouseMove), window.removeEventListener(\"touchmove\", this.onTouchMove), window.removeEventListener(\"touchend\", this.onTouchEnd);\n}, created: function() {\n this.transforming = !1, this.debouncedProcessEnd = bt(this.processEnd), this.touches = [];\n}, methods: { processMove: function(t, e) {\n if (this.touches.length) {\n if (this.touches.length === 1 && e.length === 1) this.$emit(\"move\", new Z({ left: this.touches[0].clientX - e[0].clientX, top: this.touches[0].clientY - e[0].clientY }));\n else if (this.touches.length > 1 && this.touchResize) {\n var i = Bt(e, this.$refs.container), o = this.oldGeometricProperties;\n o.count === i.count && o.count > 1 && this.$emit(\"resize\", new Z({ left: o.centerMass.left - i.centerMass.left, top: o.centerMass.top - i.centerMass.top }, { factor: o.spread / i.spread, center: i.centerMass })), this.oldGeometricProperties = i;\n }\n this.touches = e;\n }\n}, processEnd: function() {\n this.transforming && (this.transforming = !1, this.$emit(\"transform-end\"));\n}, processStart: function() {\n this.transforming = !0, this.debouncedProcessEnd.clear();\n}, processEvent: function(t) {\n return this.eventsFilter ? this.eventsFilter(t, this.transforming) !== !1 : (t.preventDefault(), t.stopPropagation(), !0);\n}, onTouchStart: function(t) {\n if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {\n var e = this.$refs.container, i = e.getBoundingClientRect(), o = i.left, s = i.top, n = i.bottom, a = i.right;\n this.touches = U(t.touches).filter(function(h) {\n return h.clientX > o && h.clientX < a && h.clientY > s && h.clientY < n;\n }), this.oldGeometricProperties = Bt(this.touches, e);\n }\n}, onTouchEnd: function(t) {\n t.touches.length === 0 && (this.touches = [], this.processEnd());\n}, onTouchMove: function(t) {\n var e = this;\n if (this.touches.length) {\n var i = U(t.touches).filter(function(o) {\n return !o.identifier || e.touches.find(function(s) {\n return s.identifier === o.identifier;\n });\n });\n this.processEvent(t) && (this.processMove(t, i), this.processStart());\n }\n}, onMouseDown: function(t) {\n if (this.mouseMove && \"buttons\" in t && t.buttons === 1 && this.processEvent(t)) {\n var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };\n this.touches = [e], this.processStart();\n }\n}, onMouseMove: function(t) {\n this.touches.length && this.processEvent(t) && this.processMove(t, [{ clientX: t.clientX, clientY: t.clientY }]);\n}, onMouseUp: function() {\n this.touches = [], this.processEnd();\n}, onWheel: function(t) {\n if (this.wheelResize && this.processEvent(t)) {\n var e = this.$refs.container.getBoundingClientRect(), i = e.left, o = e.top, s = 1 + this.wheelResize.ratio * (a = t.deltaY || t.detail || t.wheelDelta, (h = +a) == 0 || _t(h) ? h : h > 0 ? 1 : -1), n = { left: t.clientX - i, top: t.clientY - o };\n this.$emit(\"resize\", new Z({}, { factor: s, center: n })), this.touches.length || this.debouncedProcessEnd();\n }\n var a, h;\n} }, emits: [\"resize\", \"move\", \"transform-end\"] };\nee.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"container\", onTouchstart: e[1] || (e[1] = function() {\n return n.onTouchStart && n.onTouchStart.apply(n, arguments);\n }), onMousedown: e[2] || (e[2] = function() {\n return n.onMouseDown && n.onMouseDown.apply(n, arguments);\n }), onWheel: e[3] || (e[3] = function() {\n return n.onWheel && n.onWheel.apply(n, arguments);\n }) }, [X(t.$slots, \"default\")], 544);\n};\nvar At = { components: { TransformableImage: ee }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } }, emits: [\"resize\", \"move\"] };\nAt.render = function(t, e, i, o, s, n) {\n var a = j(\"transformable-image\");\n return w(), y(a, { \"touch-move\": i.touchMove, \"touch-resize\": i.touchResize, \"mouse-move\": i.mouseMove, \"wheel-resize\": i.wheelResize, onMove: e[1] || (e[1] = function(h) {\n return t.$emit(\"move\", h);\n }), onResize: e[2] || (e[2] = function(h) {\n return t.$emit(\"resize\", h);\n }) }, { default: k(function() {\n return [X(t.$slots, \"default\")];\n }), _: 3 }, 8, [\"touch-move\", \"touch-resize\", \"mouse-move\", \"wheel-resize\"]);\n};\nvar it = D(\"vue-preview\"), ie = { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {\n return {};\n} }, imageClass: { type: String }, width: { type: Number }, height: { type: Number }, fill: { type: Boolean } }, data: function() {\n return { calculatedImageSize: { width: 0, height: 0 }, calculatedSize: { width: 0, height: 0 } };\n}, computed: { classes: function() {\n return { root: it({ fill: this.fill }), wrapper: it(\"wrapper\"), imageWrapper: it(\"image-wrapper\"), image: z(it(\"image\"), this.imageClass) };\n}, style: function() {\n if (this.fill) return {};\n var t = {};\n return this.width && (t.width = \"\".concat(this.size.width, \"px\")), this.height && (t.height = \"\".concat(this.size.height, \"px\")), this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), t;\n}, wrapperStyle: function() {\n var t = { width: \"\".concat(this.size.width, \"px\"), height: \"\".concat(this.size.height, \"px\"), left: \"calc(50% - \".concat(this.size.width / 2, \"px)\"), top: \"calc(50% - \".concat(this.size.height / 2, \"px)\") };\n return this.transitions && this.transitions.enabled && (t.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), t;\n}, imageStyle: function() {\n if (this.coordinates && this.image) {\n var t = this.coordinates.width / this.size.width, e = v(v({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, o = this.imageSize.height, s = Gt({ width: i, height: o }, e.rotate), n = { width: \"\".concat(i, \"px\"), height: \"\".concat(o, \"px\"), left: \"0px\", top: \"0px\" }, a = { rotate: { left: (i - s.width) * e.scaleX / 2, top: (o - s.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * o / 2 } };\n return n.transform = \"translate(\\n\t\t\t\t\".concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, \"px,\").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, \"px) \") + te(e), this.transitions && this.transitions.enabled && (n.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), n;\n }\n return {};\n}, size: function() {\n return { width: this.width || this.calculatedSize.width, height: this.height || this.calculatedSize.height };\n}, imageSize: function() {\n return { width: this.image.width || this.calculatedImageSize.width, height: this.image.height || this.calculatedImageSize.height };\n} }, watch: { image: function(t) {\n (t.width || t.height) && this.onChangeImage();\n} }, mounted: function() {\n var t = this;\n this.onChangeImage(), this.$refs.image.addEventListener(\"load\", function() {\n t.refreshImage();\n }), window.addEventListener(\"resize\", this.refresh), window.addEventListener(\"orientationchange\", this.refresh);\n}, unmounted: function() {\n window.removeEventListener(\"resize\", this.refresh), window.removeEventListener(\"orientationchange\", this.refresh);\n}, methods: { refreshImage: function() {\n var t = this.$refs.image;\n this.calculatedImageSize.height = t.naturalHeight, this.calculatedImageSize.width = t.naturalWidth;\n}, refresh: function() {\n var t = this.$refs.root;\n this.width || (this.calculatedSize.width = t.clientWidth), this.height || (this.calculatedSize.height = t.clientHeight);\n}, onChangeImage: function() {\n var t = this.$refs.image;\n t && t.complete && this.refreshImage(), this.refresh();\n} } };\nie.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"root\", class: n.classes.root, style: n.style }, [S(\"div\", { ref: \"wrapper\", class: n.classes.wrapper, style: n.wrapperStyle }, [kt(S(\"img\", { ref: \"image\", src: i.image && i.image.src, class: n.classes.image, style: n.imageStyle }, null, 14, [\"src\"]), [[Ut, i.image && i.image.src]])], 6)], 6);\n};\nvar ne = { components: { Preview: ie }, inheritAttrs: !1 };\nne.render = function(t, e, i, o, s, n) {\n var a = j(\"preview\");\n return w(), y(a, Xt(t.$attrs, { fill: !0 }), null, 16);\n};\nvar gt = D(\"vue-rectangle-stencil\"), oe = { name: \"RectangleStencil\", components: { StencilPreview: ne, BoundingBox: Kt, DraggableArea: Jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {\n return St;\n} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {\n return xt;\n} }, aspectRatio: { type: [Number, String] }, minAspectRatio: { type: [Number, String] }, maxAspectRatio: { type: [Number, String] }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String }, linesClasses: { type: Object, default: function() {\n return {};\n} }, linesWrappersClasses: { type: Object, default: function() {\n return {};\n} }, handlersClasses: { type: Object, default: function() {\n return {};\n} }, handlersWrappersClasses: { type: Object, default: function() {\n return {};\n} } }, data: function() {\n return { moving: !1, resizing: !1 };\n}, computed: { classes: function() {\n return { stencil: z(gt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: z(gt(\"preview\"), this.previewClass), boundingBox: z(gt(\"bounding-box\"), this.boundingBoxClass) };\n}, style: function() {\n var t = this.stencilCoordinates, e = t.height, i = t.width, o = t.left, s = t.top, n = { width: \"\".concat(i, \"px\"), height: \"\".concat(e, \"px\"), transform: \"translate(\".concat(o, \"px, \").concat(s, \"px)\") };\n return this.transitions && this.transitions.enabled && (n.transition = \"\".concat(this.transitions.time, \"ms \").concat(this.transitions.timingFunction)), n;\n} }, methods: { onMove: function(t) {\n this.$emit(\"move\", t), this.moving = !0;\n}, onMoveEnd: function() {\n this.$emit(\"move-end\"), this.moving = !1;\n}, onResize: function(t) {\n this.$emit(\"resize\", t), this.resizing = !0;\n}, onResizeEnd: function() {\n this.$emit(\"resize-end\"), this.resizing = !1;\n}, aspectRatios: function() {\n return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };\n} }, emits: [\"resize\", \"resize-end\", \"move\", \"move-end\"] };\noe.render = function(t, e, i, o, s, n) {\n var a = j(\"stencil-preview\"), h = j(\"draggable-area\"), r = j(\"bounding-box\");\n return w(), y(\"div\", { class: n.classes.stencil, style: n.style }, [S(r, { width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, transitions: i.transitions, class: n.classes.boundingBox, handlers: i.handlers, \"handlers-component\": i.handlersComponent, \"handlers-classes\": i.handlersClasses, \"handlers-wrappers-classes\": i.handlersWrappersClasses, lines: i.lines, \"lines-component\": i.linesComponent, \"lines-classes\": i.linesClasses, \"lines-wrappers-classes\": i.linesWrappersClasses, resizable: i.resizable, onResize: n.onResize, onResizeEnd: n.onResizeEnd }, { default: k(function() {\n return [S(h, { movable: i.movable, onMove: n.onMove, onMoveEnd: n.onMoveEnd }, { default: k(function() {\n return [S(a, { image: i.image, coordinates: i.coordinates, width: i.stencilCoordinates.width, height: i.stencilCoordinates.height, class: n.classes.preview, transitions: i.transitions }, null, 8, [\"image\", \"coordinates\", \"width\", \"height\", \"class\", \"transitions\"])];\n }), _: 1 }, 8, [\"movable\", \"onMove\", \"onMoveEnd\"])];\n }), _: 1 }, 8, [\"width\", \"height\", \"transitions\", \"class\", \"handlers\", \"handlers-component\", \"handlers-classes\", \"handlers-wrappers-classes\", \"lines\", \"lines-component\", \"lines-classes\", \"lines-wrappers-classes\", \"resizable\", \"onResize\", \"onResizeEnd\"])], 6);\n};\nvar Fe = [\"transitions\"], I = D(\"vue-advanced-cropper\"), se = { name: \"Cropper\", components: { BackgroundWrapper: At }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {\n return oe;\n} }, backgroundWrapperComponent: { type: [Object, String], default: function() {\n return At;\n} }, stencilProps: { type: Object, default: function() {\n return {};\n} }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: \"fit-area\", validator: function(t) {\n return Ae.indexOf(t) !== -1;\n} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {\n return !(typeof t == \"string\" && t !== \"fill\" && t !== \"fit\");\n} }, priority: { type: String, default: \"coordinates\" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {\n var e = t.event, i = t.coordinates, o = t.aspectRatio, s = t.positionRestrictions, n = t.sizeRestrictions, a = f(f({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = f({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };\n n.widthFrozen && (r.left = 0, r.right = 0), n.heightFrozen && (r.top = 0, r.bottom = 0), O.forEach(function(q) {\n c[q] || (r[q] = 0);\n });\n var u = H(a, r = jt({ coordinates: a, directions: r, sizeRestrictions: n, positionRestrictions: s })).width, l = H(a, r).height, d = h.preserveRatio ? b(a) : mt(u / l, o);\n if (d) {\n var m = h.respectDirection;\n if (m || (m = a.width >= a.height || d === 1 ? \"width\" : \"height\"), m === \"width\") {\n var p = u / d - a.height;\n if (c.top && c.bottom) {\n var g = r.top, C = r.bottom;\n r.bottom = et(p, C, g), r.top = et(p, g, C);\n } else c.bottom ? r.bottom = p : c.top ? r.top = p : c.right ? r.right = 0 : c.left && (r.left = 0);\n } else if (m === \"height\") {\n var P = a.width - l * d;\n if (c.left && c.right) {\n var V = r.left, Q = r.right;\n r.left = -et(P, V, Q), r.right = -et(P, Q, V);\n } else c.left ? r.left = -P : c.right ? r.right = -P : c.top ? r.top = 0 : c.bottom && (r.bottom = 0);\n }\n r = jt({ directions: r, coordinates: a, sizeRestrictions: n, positionRestrictions: s, preserveRatio: !0, compensate: h.compensate });\n }\n return u = H(a, r).width, l = H(a, r).height, (d = h.preserveRatio ? b(a) : mt(u / l, o)) && Math.abs(d - u / l) > 1e-3 && O.forEach(function(q) {\n c[q] || (r[q] = 0);\n }), zt({ event: new Rt({ left: -r.left, top: -r.top }), coordinates: { width: i.width + r.right + r.left, height: i.height + r.top + r.bottom, left: i.left, top: i.top }, positionRestrictions: s });\n} }, moveAlgorithm: { type: Function, default: zt }, initStretcher: { type: Function, default: function(t) {\n var e = t.stretcher, i = t.imageSize, o = b(i);\n e.style.width = i.width + \"px\", e.style.height = e.clientWidth / o + \"px\", e.style.width = e.clientWidth + \"px\";\n} }, fitCoordinates: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.coordinates, o = t.aspectRatio, s = t.sizeRestrictions, n = t.positionRestrictions, a = f(f({}, i), $({ width: i.width, height: i.height, aspectRatio: o, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, s.minHeight), minWidth: Math.min(e.width, s.minWidth) } }));\n return a = M(a = x(a, F(R(i), R(a))), ht(L(e), n));\n} }, fitVisibleArea: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.boundaries, o = t.getAreaRestrictions, s = t.coordinates, n = f({}, e);\n n.height = n.width / b(i), n.top += (e.height - n.height) / 2, (s.height - n.height > 0 || s.width - n.width > 0) && (n = W(n, Math.max(s.height / n.height, s.width / n.width)));\n var a = rt(N(s, L(n = W(n, at(n, o({ visibleArea: n, type: \"resize\" }))))));\n return n.width < s.width && (a.left = 0), n.height < s.height && (a.top = 0), n = M(n = x(n, a), o({ visibleArea: n, type: \"move\" }));\n} }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {\n var e = t.visibleArea, i = t.boundaries, o = t.imageSize, s = t.imageRestriction, n = t.type, a = {};\n return s === \"fill-area\" ? a = { left: 0, top: 0, right: o.width, bottom: o.height } : s === \"fit-area\" && (b(i) > b(o) ? (a = { top: 0, bottom: o.height }, e && n === \"move\" && (e.width > o.width ? (a.left = -(e.width - o.width) / 2, a.right = o.width - a.left) : (a.left = 0, a.right = o.width))) : (a = { left: 0, right: o.width }, e && n === \"move\" && (e.height > o.height ? (a.top = -(e.height - o.height) / 2, a.bottom = o.height - a.top) : (a.top = 0, a.bottom = o.height)))), a;\n} }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {\n return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };\n} }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {\n var e = t.imageSize, i = {};\n return t.imageRestriction !== \"none\" && (i = { left: 0, top: 0, right: e.width, bottom: e.height }), i;\n} } }, data: function() {\n return { transitionsActive: !1, imageLoaded: !1, imageAttributes: { width: null, height: null, crossOrigin: null, src: null }, defaultImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, appliedImageTransforms: { rotate: 0, flip: { horizontal: !1, vertical: !1 } }, boundaries: { width: 0, height: 0 }, visibleArea: null, coordinates: v({}, Lt) };\n}, computed: { image: function() {\n return { src: this.imageAttributes.src, width: this.imageAttributes.width, height: this.imageAttributes.height, transforms: this.imageTransforms };\n}, imageTransforms: function() {\n return { rotate: this.appliedImageTransforms.rotate, flip: { horizontal: this.appliedImageTransforms.flip.horizontal, vertical: this.appliedImageTransforms.flip.vertical }, translateX: this.visibleArea ? this.visibleArea.left / this.coefficient : 0, translateY: this.visibleArea ? this.visibleArea.top / this.coefficient : 0, scaleX: 1 / this.coefficient, scaleY: 1 / this.coefficient };\n}, imageSize: function() {\n var t = function(e) {\n return e * Math.PI / 180;\n }(this.imageTransforms.rotate);\n return { width: Math.abs(this.imageAttributes.width * Math.cos(t)) + Math.abs(this.imageAttributes.height * Math.sin(t)), height: Math.abs(this.imageAttributes.width * Math.sin(t)) + Math.abs(this.imageAttributes.height * Math.cos(t)) };\n}, initialized: function() {\n return !!(this.visibleArea && this.imageLoaded);\n}, settings: function() {\n var t = wt(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });\n return { moveImage: wt(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: t };\n}, coefficient: function() {\n return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;\n}, areaRestrictions: function() {\n return this.imageLoaded ? this.areaRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction, boundaries: this.boundaries }) : {};\n}, transitionsOptions: function() {\n return { enabled: this.transitionsActive, timingFunction: \"ease-in-out\", time: 350 };\n}, sizeRestrictions: function() {\n if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {\n var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: A(this.minWidth) ? 0 : J(this.minWidth), minHeight: A(this.minHeight) ? 0 : J(this.minHeight), maxWidth: A(this.maxWidth) ? 1 / 0 : J(this.maxWidth), maxHeight: A(this.maxHeight) ? 1 / 0 : J(this.maxHeight) });\n if (t = function(o) {\n var s = o.areaRestrictions, n = o.sizeRestrictions, a = o.boundaries, h = o.positionRestrictions, r = f(f({}, n), { minWidth: n.minWidth !== void 0 ? n.minWidth : 0, minHeight: n.minHeight !== void 0 ? n.minHeight : 0, maxWidth: n.maxWidth !== void 0 ? n.maxWidth : 1 / 0, maxHeight: n.maxHeight !== void 0 ? n.maxHeight : 1 / 0 });\n h.left !== void 0 && h.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, h.right - h.left)), h.bottom !== void 0 && h.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, h.bottom - h.top));\n var c = yt(s), u = Zt(a, c);\n return c.width < 1 / 0 && (!r.maxWidth || r.maxWidth > u.width) && (r.maxWidth = Math.min(r.maxWidth, u.width)), c.height < 1 / 0 && (!r.maxHeight || r.maxHeight > u.height) && (r.maxHeight = Math.min(r.maxHeight, u.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;\n }({ sizeRestrictions: t, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: \"resize\" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {\n var e = this.getStencilSize(), i = yt(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: \"resize\" }));\n t.maxWidth = Math.min(t.maxWidth, i.width * e.width / this.boundaries.width), t.maxHeight = Math.min(t.maxHeight, i.height * e.height / this.boundaries.height), t.maxWidth < t.minWidth && (t.minWidth = t.maxWidth), t.maxHeight < t.minHeight && (t.minHeight = t.maxHeight);\n }\n return t;\n }\n return { minWidth: 0, minHeight: 0, maxWidth: 0, maxHeight: 0 };\n}, positionRestrictions: function() {\n return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });\n}, classes: function() {\n return { cropper: I(), image: z(I(\"image\"), this.imageClass), stencil: I(\"stencil\"), boundaries: z(I(\"boundaries\"), this.boundariesClass), stretcher: z(I(\"stretcher\")), background: z(I(\"background\"), this.backgroundClass), foreground: z(I(\"foreground\"), this.foregroundClass), imageWrapper: z(I(\"image-wrapper\")), cropperWrapper: z(I(\"cropper-wrapper\")) };\n}, stencilCoordinates: function() {\n if (this.initialized) {\n var t = this.coordinates, e = t.width, i = t.height, o = t.left, s = t.top;\n return { width: e / this.coefficient, height: i / this.coefficient, left: (o - this.visibleArea.left) / this.coefficient, top: (s - this.visibleArea.top) / this.coefficient };\n }\n return this.defaultCoordinates();\n}, boundariesStyle: function() {\n var t = { width: this.boundaries.width ? \"\".concat(Math.round(this.boundaries.width), \"px\") : \"auto\", height: this.boundaries.height ? \"\".concat(Math.round(this.boundaries.height), \"px\") : \"auto\", transition: \"opacity \".concat(this.transitionTime, \"ms\"), pointerEvents: this.imageLoaded ? \"all\" : \"none\" };\n return this.imageLoaded || (t.opacity = \"0\"), t;\n}, imageStyle: function() {\n var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, i = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, o = v(v({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), s = { width: \"\".concat(t.width, \"px\"), height: \"\".concat(t.height, \"px\"), left: \"0px\", top: \"0px\", transform: \"translate(\".concat(-e.left - i.left - this.imageTransforms.translateX, \"px, \").concat(-e.top - i.top - this.imageTransforms.translateY, \"px)\") + te(o) };\n return this.transitionsOptions.enabled && (s.transition = \"\".concat(this.transitionsOptions.time, \"ms \").concat(this.transitionsOptions.timingFunction)), s;\n} }, watch: { src: function() {\n this.onChangeImage();\n}, stencilComponent: function() {\n var t = this;\n this.$nextTick(function() {\n t.resetCoordinates(), t.runAutoZoom(\"setCoordinates\"), t.onChange();\n });\n}, minWidth: function() {\n this.onPropsChange();\n}, maxWidth: function() {\n this.onPropsChange();\n}, minHeight: function() {\n this.onPropsChange();\n}, maxHeight: function() {\n this.onPropsChange();\n}, imageRestriction: function() {\n this.reset();\n}, stencilProps: function(t, e) {\n [\"aspectRatio\", \"minAspectRatio\", \"maxAspectRatio\"].find(function(i) {\n return t[i] !== e[i];\n }) && this.$nextTick(this.onPropsChange);\n} }, created: function() {\n this.debouncedUpdate = bt(this.update, this.debounce), this.debouncedDisableTransitions = bt(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;\n}, mounted: function() {\n this.$refs.image.addEventListener(\"load\", this.onSuccessLoadImage), this.$refs.image.addEventListener(\"error\", this.onFailLoadImage), this.onChangeImage(), window.addEventListener(\"resize\", this.refresh), window.addEventListener(\"orientationchange\", this.refresh);\n}, unmounted: function() {\n window.removeEventListener(\"resize\", this.refresh), window.removeEventListener(\"orientationchange\", this.refresh), this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.debouncedUpdate.clear(), this.debouncedDisableTransitions.clear();\n}, methods: { getResult: function() {\n var t = this.initialized ? this.prepareResult(v({}, this.coordinates)) : this.defaultCoordinates(), e = { rotate: this.imageTransforms.rotate % 360, flip: v({}, this.imageTransforms.flip) };\n if (this.src && this.imageLoaded) {\n var i = this;\n return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? v({}, this.visibleArea) : null, imageTransforms: e, get canvas() {\n return i.canvas ? i.getCanvas() : void 0;\n } };\n }\n return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? v({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };\n}, zoom: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n this.onManipulateImage(new Z({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: s });\n}, move: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n this.onManipulateImage(new Z({ left: t || 0, top: e || 0 }), { normalize: !1, transitions: s });\n}, setCoordinates: function(t) {\n var e = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = i.autoZoom, s = o === void 0 || o, n = i.transitions, a = n === void 0 || n;\n this.$nextTick(function() {\n e.imageLoaded ? (e.transitionsActive || (a && e.enableTransitions(), e.coordinates = e.applyTransform(t), s && e.runAutoZoom(\"setCoordinates\"), a && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;\n });\n}, refresh: function() {\n var t = this, e = this.$refs.image;\n if (this.src && e) return this.initialized ? this.updateVisibleArea().then(function() {\n t.onChange();\n }) : this.resetVisibleArea().then(function() {\n t.onChange();\n });\n}, reset: function() {\n var t = this;\n return this.resetVisibleArea().then(function() {\n t.onChange(!1);\n });\n}, awaitRender: function(t) {\n var e = this;\n this.awaiting || (this.awaiting = !0, this.$nextTick(function() {\n t(), e.awaiting = !1;\n }));\n}, prepareResult: function(t) {\n return this.roundResult ? function(e) {\n var i = e.coordinates, o = e.sizeRestrictions, s = e.positionRestrictions, n = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };\n return n.width > o.maxWidth ? n.width = Math.floor(i.width) : n.width < o.minWidth && (n.width = Math.ceil(i.width)), n.height > o.maxHeight ? n.height = Math.floor(i.height) : n.height < o.minHeight && (n.height = Math.ceil(i.height)), M(n, s);\n }(v(v({}, this.getPublicProperties()), {}, { positionRestrictions: tt(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;\n}, processAutoZoom: function(t, e, i, o) {\n var s = this.autoZoomAlgorithm;\n s || (s = this.stencilSize ? Se : this.autoZoom ? xe : Ce);\n var n = s({ event: { type: t, params: o }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });\n return v(v({}, n), {}, { changed: !Pt(n.visibleArea, e) || !Pt(n.coordinates, i) });\n}, runAutoZoom: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, o = i !== void 0 && i, s = fe(e, Fe), n = this.processAutoZoom(t, this.visibleArea, this.coordinates, s), a = n.visibleArea, h = n.coordinates, r = n.changed;\n o && r && this.enableTransitions(), this.visibleArea = a, this.coordinates = h, o && r && this.debouncedDisableTransitions();\n}, normalizeEvent: function(t) {\n return function(e) {\n var i = e.event, o = e.visibleArea, s = e.coefficient;\n if (i.type === \"manipulateImage\") return f(f({}, i), { move: { left: i.move && i.move.left ? s * i.move.left : 0, top: i.move && i.move.top ? s * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * s + o.left, top: i.scale.center.top * s + o.top } : null } });\n if (i.type === \"resize\") {\n var n = f(f({}, i), { directions: f({}, i.directions) });\n return O.forEach(function(h) {\n n.directions[h] *= s;\n }), n;\n }\n if (i.type === \"move\") {\n var a = f(f({}, i), { directions: f({}, i.directions) });\n return ze.forEach(function(h) {\n a.directions[h] *= s;\n }), a;\n }\n return i;\n }(v(v({}, this.getPublicProperties()), {}, { event: t }));\n}, getCanvas: function() {\n if (this.$refs.canvas) {\n var t = this.$refs.canvas, e = this.$refs.image, i = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(h, r, c) {\n var u = c.rotate, l = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = Gt(d, u), p = h.getContext(\"2d\");\n h.height = m.height, h.width = m.width, p.save();\n var g = B(R(f({ left: 0, top: 0 }, d)), u);\n return p.translate(-(g.left - m.width / 2), -(g.top - m.height / 2)), p.rotate(u * Math.PI / 180), p.translate(l.horizontal ? d.width : 0, l.vertical ? d.height : 0), p.scale(l.horizontal ? -1 : 1, l.vertical ? -1 : 1), p.drawImage(r, 0, 0, d.width, d.height), p.restore(), h;\n }(this.$refs.sourceCanvas, e, this.imageTransforms) : e, o = v({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: \"high\", fillColor: \"transparent\" }, this.canvas), s = function(h) {\n return h.find(function(r) {\n return c = r, !Number.isNaN(parseFloat(c)) && isFinite(c);\n var c;\n });\n }, n = $({ sizeRestrictions: { minWidth: s([o.width, o.minWidth]) || 0, minHeight: s([o.height, o.minHeight]) || 0, maxWidth: s([o.width, o.maxWidth]) || 1 / 0, maxHeight: s([o.height, o.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });\n if (o.maxArea && n.width * n.height > o.maxArea) {\n var a = Math.sqrt(o.maxArea / (n.width * n.height));\n n = { width: Math.round(a * n.width), height: Math.round(a * n.height) };\n }\n return function(h, r, c, u, l) {\n h.width = u ? u.width : c.width, h.height = u ? u.height : c.height;\n var d = h.getContext(\"2d\");\n d.clearRect(0, 0, h.width, h.height), l && (l.imageSmoothingEnabled && (d.imageSmoothingEnabled = l.imageSmoothingEnabled), l.imageSmoothingQuality && (d.imageSmoothingQuality = l.imageSmoothingQuality), l.fillColor && (d.fillStyle = l.fillColor, d.fillRect(0, 0, h.width, h.height), d.save()));\n var m = c.left < 0 ? -c.left : 0, p = c.top < 0 ? -c.top : 0;\n d.drawImage(r, c.left + m, c.top + p, c.width, c.height, m * (h.width / c.width), p * (h.height / c.height), h.width, h.height);\n }(t, i, this.coordinates, n, o), t;\n }\n}, update: function() {\n this.$emit(\"change\", this.getResult());\n}, applyTransform: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.visibleArea && e ? Re(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, o = this.visibleArea && e ? tt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;\n return Me({ transform: t, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: i, positionRestrictions: o, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });\n}, resetCoordinates: function() {\n var t = this;\n if (this.$refs.image) {\n this.$refs.cropper, this.$refs.image;\n var e = this.defaultSize;\n e || (e = this.stencilSize ? We : Te);\n var i = this.sizeRestrictions;\n i.minWidth, i.minHeight, i.maxWidth, i.maxHeight;\n var o = Y(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, s = this.defaultPosition || Ee, n = [o, function(a) {\n var h = a.coordinates;\n return v({}, Y(s) ? s({ coordinates: h, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);\n }];\n this.delayedTransforms && n.push.apply(n, U(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(n, !0), this.delayedTransforms = null;\n }\n}, clearImage: function() {\n var t = this;\n this.imageLoaded = !1, setTimeout(function() {\n var e = t.$refs.stretcher;\n e && (e.style.height = \"auto\", e.style.width = \"auto\"), t.coordinates = t.defaultCoordinates(), t.boundaries = { width: 0, height: 0 };\n }, this.transitionTime);\n}, enableTransitions: function() {\n this.transitions && (this.transitionsActive = !0);\n}, disableTransitions: function() {\n this.transitionsActive = !1;\n}, updateBoundaries: function() {\n var t = this, e = this.$refs.stretcher, i = this.$refs.cropper;\n return this.initStretcher({ cropper: i, stretcher: e, imageSize: this.imageSize }), this.$nextTick().then(function() {\n var o = { cropper: i, imageSize: t.imageSize };\n if (Y(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(o) : t.defaultBoundaries === \"fit\" ? t.boundaries = function(s) {\n var n = s.cropper, a = s.imageSize, h = n.clientHeight, r = n.clientWidth, c = h, u = a.width * h / a.height;\n return u > r && (u = r, c = a.height * r / a.width), { width: u, height: c };\n }(o) : t.boundaries = function(s) {\n var n = s.cropper;\n return { width: n.clientWidth, height: n.clientHeight };\n }(o), !t.boundaries.width || !t.boundaries.height) throw new Error(\"It's impossible to fit the cropper in the current container\");\n });\n}, resetVisibleArea: function() {\n var t = this;\n return this.appliedImageTransforms = v(v({}, this.defaultImageTransforms), {}, { flip: v({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {\n t.priority !== \"visible-area\" && (t.visibleArea = null, t.resetCoordinates());\n var e, i, o, s, n, a, h = t.defaultVisibleArea || De;\n t.visibleArea = Y(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== \"visible-area\" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, o = e.boundaries, s = e.getAreaRestrictions, n = f({}, i), a = b(o), n.width / n.height !== a && (n.height = n.width / a), M(n, s({ visibleArea: n, type: \"move\" }))), t.priority === \"visible-area\" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom(\"resetVisibleArea\");\n }).catch(function() {\n t.visibleArea = null;\n });\n}, updateVisibleArea: function() {\n var t = this;\n return this.updateBoundaries().then(function() {\n t.visibleArea = t.fitVisibleArea({ imageSize: t.imageSize, boundaries: t.boundaries, visibleArea: t.visibleArea, coordinates: t.coordinates, getAreaRestrictions: t.getAreaRestrictions }), t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom(\"updateVisibleArea\");\n }).catch(function() {\n t.visibleArea = null;\n });\n}, onChange: function() {\n var t = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];\n t && this.debounce ? this.debouncedUpdate() : this.update();\n}, onChangeImage: function() {\n var t, e = this;\n if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {\n if (function(s) {\n if (Ht(s)) return !1;\n var n = window.location, a = /(\\w+:)?(?:\\/\\/)([\\w.-]+)?(?::(\\d+))?\\/?/.exec(s) || [], h = { protocol: a[1] || \"\", host: a[2] || \"\", port: a[3] || \"\" }, r = function(c) {\n return c.port || ((c.protocol || n.protocol) === \"http\" ? 80 : 433);\n };\n return !(!h.protocol && !h.host && !h.port || h.protocol && h.protocol == n.protocol && h.host && h.host == n.host && h.host && r(h) == r(n));\n }(this.src)) {\n var i = A(this.crossOrigin) ? this.canvas : this.crossOrigin;\n i === !0 && (i = \"anonymous\"), this.imageAttributes.crossOrigin = i || null;\n }\n if (this.checkOrientation) {\n var o = (t = this.src, new Promise(function(s) {\n Xe(t).then(function(n) {\n var a = Ye(n);\n s(n ? { source: t, arrayBuffer: n, orientation: a } : { source: t, arrayBuffer: null, orientation: null });\n }).catch(function(n) {\n console.warn(n), s({ source: t, arrayBuffer: null, orientation: null });\n });\n }));\n setTimeout(function() {\n o.then(e.onParseImage);\n }, this.transitionTime);\n } else setTimeout(function() {\n e.onParseImage({ source: e.src });\n }, this.transitionTime);\n } else this.clearImage();\n}, onFailLoadImage: function() {\n this.imageAttributes.src && (this.clearImage(), this.$emit(\"error\"));\n}, onSuccessLoadImage: function() {\n var t = this, e = this.$refs.image;\n e && !this.imageLoaded && (this.imageAttributes.height = e.naturalHeight, this.imageAttributes.width = e.naturalWidth, this.imageLoaded = !0, this.resetVisibleArea().then(function() {\n t.$emit(\"ready\"), t.onChange(!1);\n }));\n}, onParseImage: function(t) {\n var e = this, i = t.source, o = t.arrayBuffer, s = t.orientation;\n this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, o && s && s > 1 ? Ft(i) || !Ht(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([o])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(n) {\n for (var a = [], h = new Uint8Array(n); h.length > 0; ) {\n var r = h.subarray(0, 8192);\n a.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), h = h.subarray(8192);\n }\n return \"data:image/jpeg;base64,\" + btoa(a.join(\"\"));\n }(o) : this.imageAttributes.src = i, Y(this.defaultTransforms) ? this.appliedImageTransforms = pt(this.defaultTransforms()) : nt(this.defaultTransforms) ? this.appliedImageTransforms = pt(this.defaultTransforms) : this.appliedImageTransforms = function(n) {\n var a = pt({});\n if (n) switch (n) {\n case 2:\n a.flip.horizontal = !0;\n break;\n case 3:\n a.rotate = -180;\n break;\n case 4:\n a.flip.vertical = !0;\n break;\n case 5:\n a.rotate = 90, a.flip.vertical = !0;\n break;\n case 6:\n a.rotate = 90;\n break;\n case 7:\n a.rotate = 90, a.flip.horizontal = !0;\n break;\n case 8:\n a.rotate = -90;\n }\n return a;\n }(s), this.defaultImageTransforms = v(v({}, this.appliedImageTransforms), {}, { flip: v({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {\n var n = e.$refs.image;\n n && n.complete && (function(a) {\n return !!a.naturalWidth;\n }(n) ? e.onSuccessLoadImage() : e.onFailLoadImage());\n });\n}, onResizeEnd: function() {\n this.runAutoZoom(\"resize\", { transitions: !0 });\n}, onMoveEnd: function() {\n this.runAutoZoom(\"move\", { transitions: !0 });\n}, onMove: function(t) {\n var e = this;\n this.transitionsOptions.enabled || this.awaitRender(function() {\n e.coordinates = e.moveAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: tt(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();\n });\n}, onResize: function(t) {\n var e = this;\n this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {\n var i = e.sizeRestrictions, o = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);\n e.coordinates = e.resizeAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: tt(e.positionRestrictions, e.visibleArea), sizeRestrictions: { maxWidth: Math.min(i.maxWidth, e.visibleArea.width), maxHeight: Math.min(i.maxHeight, e.visibleArea.height), minWidth: Math.max(i.minWidth, o), minHeight: Math.max(i.minHeight, o) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = !1;\n });\n}, onManipulateImage: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n if (!this.transitionsOptions.enabled) {\n var i = e.transitions, o = i !== void 0 && i, s = e.normalize, n = s === void 0 || s;\n o && this.enableTransitions();\n var a = He(v(v({}, this.getPublicProperties()), {}, { event: n ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), h = a.visibleArea, r = a.coordinates;\n this.visibleArea = h, this.coordinates = r, this.runAutoZoom(\"manipulateImage\"), this.onChange(), o && this.debouncedDisableTransitions();\n }\n}, onPropsChange: function() {\n this.coordinates = this.applyTransform(this.coordinates, !0), this.onChange(!1);\n}, getAreaRestrictions: function() {\n var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.visibleArea, i = t.type, o = i === void 0 ? \"move\" : i;\n return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: e, type: o });\n}, getAspectRatio: function(t) {\n var e, i, o = this.stencilProps, s = o.aspectRatio, n = o.minAspectRatio, a = o.maxAspectRatio;\n if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {\n var h = this.$refs.stencil.aspectRatios();\n e = h.minimum, i = h.maximum;\n }\n if (A(e) && (e = A(s) ? n : s), A(i) && (i = A(s) ? a : s), !t && (A(e) || A(i))) {\n var r = this.getStencilSize(), c = r ? b(r) : null;\n A(e) && (e = Ot(c) ? c : void 0), A(i) && (i = Ot(c) ? c : void 0);\n }\n return { minimum: e, maximum: i };\n}, getStencilSize: function() {\n if (this.stencilSize) return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, i = t.stencilSize, o = t.aspectRatio, mt(b(s = Y(i) ? i({ boundaries: e, aspectRatio: o }) : i), o) && (s = $({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: o.minimum, maximum: o.maximum } })), (s.width > e.width || s.height > e.height) && (s = $({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: b(s), maximum: b(s) } })), s;\n var t, e, i, o, s;\n}, getPublicProperties: function() {\n return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };\n}, defaultCoordinates: function() {\n return v({}, Lt);\n}, flip: function(t, e) {\n var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.transitions, s = o === void 0 || o;\n if (!this.transitionsActive) {\n s && this.enableTransitions();\n var n = v({}, this.imageTransforms.flip), a = Le({ flip: { horizontal: t ? !n.horizontal : n.horizontal, vertical: e ? !n.vertical : n.vertical }, previousFlip: n, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), h = a.visibleArea, r = a.coordinates;\n t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = h, this.coordinates = r, this.onChange(), s && this.debouncedDisableTransitions();\n }\n}, rotate: function(t) {\n var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, o = i === void 0 || i;\n if (!this.transitionsActive) {\n o && this.enableTransitions();\n var s = v({}, this.imageSize);\n this.appliedImageTransforms.rotate += t;\n var n = Oe({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: s, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = n.visibleArea, h = n.coordinates, r = this.processAutoZoom(\"rotateImage\", a, h);\n a = r.visibleArea, h = r.coordinates, this.visibleArea = a, this.coordinates = h, this.onChange(), o && this.debouncedDisableTransitions();\n }\n} }, emits: [\"change\", \"error\", \"ready\"] }, _e = { key: 0, ref: \"canvas\", style: { display: \"none\" } }, Ne = { key: 1, ref: \"sourceCanvas\", style: { display: \"none\" } };\nse.render = function(t, e, i, o, s, n) {\n return w(), y(\"div\", { ref: \"cropper\", class: n.classes.cropper }, [S(\"div\", { ref: \"stretcher\", class: n.classes.stretcher }, null, 2), S(\"div\", { class: n.classes.boundaries, style: n.boundariesStyle }, [(w(), y(ot(i.backgroundWrapperComponent), { class: n.classes.cropperWrapper, \"wheel-resize\": n.settings.resizeImage.wheel, \"touch-resize\": n.settings.resizeImage.touch, \"touch-move\": n.settings.moveImage.touch, \"mouse-move\": n.settings.moveImage.mouse, onMove: n.onManipulateImage, onResize: n.onManipulateImage }, { default: k(function() {\n return [S(\"div\", { class: n.classes.background, style: n.boundariesStyle }, null, 6), S(\"div\", { class: n.classes.imageWrapper }, [S(\"img\", { ref: \"image\", crossorigin: s.imageAttributes.crossOrigin, src: s.imageAttributes.src, class: n.classes.image, style: n.imageStyle, onMousedown: e[1] || (e[1] = he(function() {\n }, [\"prevent\"])) }, null, 46, [\"crossorigin\", \"src\"])], 2), S(\"div\", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), kt((w(), y(ot(i.stencilComponent), Xt({ ref: \"stencil\", image: n.image, coordinates: s.coordinates, \"stencil-coordinates\": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, [\"image\", \"coordinates\", \"stencil-coordinates\", \"transitions\", \"onResize\", \"onResizeEnd\", \"onMove\", \"onMoveEnd\"])), [[Ut, s.imageLoaded]]), i.canvas ? (w(), y(\"canvas\", _e, null, 512)) : st(\"\", !0), i.canvas ? (w(), y(\"canvas\", Ne, null, 512)) : st(\"\", !0)];\n }), _: 1 }, 8, [\"class\", \"wheel-resize\", \"touch-resize\", \"touch-move\", \"mouse-move\", \"onMove\", \"onResize\"]))], 6)], 2);\n};\nconst Ve = {\n key: 0,\n class: \"uno-rgfbq5\"\n}, qe = {\n key: 0,\n class: \"uno-ilmauu\"\n}, Ze = /* @__PURE__ */ E(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"40\",\n height: \"40\",\n viewBox: \"0 0 24 24\"\n}, [\n /* @__PURE__ */ E(\"path\", {\n fill: \"currentColor\",\n d: \"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z\",\n opacity: \"0.5\"\n }),\n /* @__PURE__ */ E(\"path\", {\n fill: \"currentColor\",\n d: \"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z\"\n }, [\n /* @__PURE__ */ E(\"animateTransform\", {\n attributeName: \"transform\",\n dur: \"1s\",\n from: \"0 12 12\",\n repeatCount: \"indefinite\",\n to: \"360 12 12\",\n type: \"rotate\"\n })\n ])\n], -1), Ge = /* @__PURE__ */ E(\"span\", null, \"加载中...\", -1), Qe = [\n Ze,\n Ge\n], Ke = { class: \"uno-91fill\" }, Je = { class: \"uno-rzw4mv\" }, ti = {\n class: \"uno-ynbxwu\",\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, ei = /* @__PURE__ */ ce({\n __name: \"cropper\",\n props: {\n modelValue: { type: Boolean, default: !1 },\n src: {},\n aspectRatio: { default: 1 / 1 }\n },\n emits: [\"update:modelValue\", \"crop\"],\n setup(t, { emit: e }) {\n const i = t, o = e, s = Tt(), n = Tt(!0);\n function a() {\n n.value = !1;\n }\n function h() {\n const { canvas: l } = s.value.getResult(), d = l.toDataURL();\n o(\"crop\", d), o(\"update:modelValue\", !1);\n }\n function r(l) {\n s.value.rotate(l);\n }\n function c() {\n s.value.reset();\n }\n function u() {\n o(\"update:modelValue\", !1);\n }\n return (l, d) => i.modelValue ? (w(), ct(\"div\", Ve, [\n n.value ? (w(), ct(\"div\", qe, Qe)) : st(\"\", !0),\n S(le(se), {\n ref_key: \"cropper\",\n ref: s,\n class: \"uno-g5i2o3\",\n bsrc: \"https://0.z.wiki/autoupload/20240708/BSGF/1130X750/65535_53035727810_fce2af1c7e_h_750_1130_nofilter.jp\",\n src: l.src,\n \"auto-zoom\": !0,\n \"stencil-props\": {\n movable: !1,\n aspectRatio: i.aspectRatio,\n handlers: {\n eastNorth: !0,\n north: !1,\n westNorth: !0,\n west: !1,\n westSouth: !0,\n south: !1,\n eastSouth: !0,\n east: !1\n }\n },\n \"image-restriction\": \"stencil\",\n \"resize-image\": { touch: !1, wheel: !1 },\n \"min-width\": 300,\n \"min-height\": 300,\n onReady: a\n }, null, 8, [\"src\", \"stencil-props\"]),\n E(\"div\", Ke, [\n E(\"div\", Je, [\n (w(), ct(\"svg\", ti, [\n E(\"path\", {\n fill: \"currentColor\",\n d: \"M18 14v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2M13.914 2.914L11.828 5H14a8 8 0 0 1 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5L8 6l1.414-1.414L12.5 1.5z\",\n onClick: d[0] || (d[0] = (m) => r(-90))\n })\n ])),\n E(\"div\", { onClick: c }, \" 还原 \")\n ]),\n E(\"div\", { class: \"uno-rzw4mv\" }, [\n E(\"div\", { onClick: u }, \" 取消 \"),\n E(\"div\", { onClick: h }, \" 确定 \")\n ])\n ])\n ])) : st(\"\", !0);\n }\n});\nfunction ri(t) {\n if (!t)\n throw new Error(\"file is required\");\n return new Promise((e, i) => {\n const o = new FileReader();\n o.readAsDataURL(t), o.onload = () => e(o.result), o.onerror = () => i(o.error);\n });\n}\nfunction ai(t) {\n if (!t)\n throw new Error(\"base64String is required\");\n return new Promise((e, i) => {\n try {\n const o = t.split(\",\"), n = o[0].match(/:(.*?);/)[1], a = atob(o[1]);\n let h = a.length;\n const r = new Uint8Array(h);\n for (; h--; )\n r[h] = a.charCodeAt(h);\n e(new Blob([r], { type: n }));\n } catch (o) {\n i(o);\n }\n });\n}\nfunction hi(t, e) {\n if (!t)\n throw new Error(\"url is required\");\n return new Promise((i, o) => {\n let s = document.createElement(\"canvas\");\n const n = s.getContext(\"2d\"), a = new Image();\n a.crossOrigin = \"\", a.onerror = function() {\n return o(new Error(\"Loading image failure\"));\n }, a.onload = function() {\n if (!s || !n)\n return o(new Error(\"Canvas create failure\"));\n s.height = a.height, s.width = a.width, n.drawImage(a, 0, 0);\n const h = s.toDataURL(e || \"image/png\");\n s = null, i(h);\n }, a.src = t;\n });\n}\nconst { on: ii, trigger: ni } = me();\nfunction oi(t) {\n const e = document.body, o = {\n ...{\n src: t.src,\n modelValue: !0,\n \"onUpdate:modelValue\": (n) => {\n n || lt(null, e);\n },\n onCrop: (n) => {\n ni(n);\n }\n },\n ...t\n };\n async function s(n) {\n const a = ue(ei, n);\n lt(a, e);\n }\n return s(o), () => {\n lt(null, e);\n };\n}\nfunction ci(t = {}) {\n return {\n onCrop: ii,\n showCropper: (i) => {\n const o = {\n src: i,\n ...t\n };\n oi(o);\n }\n };\n}\nexport {\n ai as base64ToBlob,\n ri as fileToBase64,\n hi as urlToBase64,\n ci as useCropper\n};\n","\n\n\n","\n\n\n\n\n","import { createApp } from 'vue'\nimport 'uno.css'\nimport '@unocss/reset/tailwind-compat.css'\n\nimport App from './App.vue'\n\nconst app = createApp(App)\n\napp.mount('#app')\n"],"names":["_hoisted_1","_hoisted_10","_cache","isDark","useDark","toggleDarkmode","useToggle","de","re","ae","me","s","n","Wt","v","T","fe","u","l","U","ut","Dt","pe","K","z","vt","bt","f","Yt","Ft","Ht","Y","A","nt","wt","J","Ot","_t","Nt","Z","ge","Rt","ve","Mt","w","y","X","dt","Vt","j","S","k","be","qt","O","we","ye","ze","Ae","Lt","Pt","L","F","R","G","H","rt","x","W","b","_","N","mt","Zt","Gt","B","at","M","yt","Re","Qt","ht","It","$t","$","zt","Me","p","Se","xe","Ce","Ee","Te","We","De","tt","He","g","C","P","V","Q","Oe","Le","jt","et","Pe","Ie","St","$e","je","xt","ft","Be","ke","Kt","Ct","Et","ot","Ue","Jt","pt","Xe","te","Ye","Bt","ee","At","it","ie","kt","Ut","ne","Xt","gt","oe","Fe","I","se","_e","Ne","he","st","Ve","qe","Ze","E","Ge","Qe","Ke","Je","ti","ei","ce","Tt","ct","le","ri","ii","ni","oi","o","lt","a","ue","ci","i","showCropper","onCrop","useCropper","open","onChange","useFileDialog","cropedImage","ref","files","base64String","fileToBase64","reset","demoCode0","html","onBeforeMount","codeToHtml","app","createApp","App"],"mappings":"o9GACOA,GAAkC,CAAC,MAAM,6BAAK,WAAY,iCADjE,8mCACoIC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I,CAACA,EACH,OAGF,MAAMC,EAAe,MAAMC,GAAaF,EAAM,CAAC,CAAC,EAChDR,EAAYS,CAAY,CAAA,CACzB,EAEDR,EAAQQ,GAAyB,CAC/BH,EAAY,MAAQG,CAAA,CAGrB,EAED,SAASE,GAAc,CACrBL,EAAY,MAAQ,EACtB,mtEC7BMM,GAAY;AAAA;AAAA,+BAIZ,MAAAC,EAAON,GAAI,EAAE,EACnB,OAAAO,GAAc,SAAY,CACnBD,EAAA,MAAQ,MAAME,GAAWH,GAAW,CACvC,KAAM,QACN,OAAQ,CACN,MAAO,YACP,KAAM,cACR,CAAA,CACD,CAAA,CACF,iwBCbKI,GAAMC,GAAUC,EAAG,EAEzBF,GAAI,MAAM,MAAM"} \ No newline at end of file diff --git a/docs/assets/large-pTPmIg4s.js b/docs/assets/large-DdnQ63On.js similarity index 99% rename from docs/assets/large-pTPmIg4s.js rename to docs/assets/large-DdnQ63On.js index 7e65bc8..9314cf8 100644 --- a/docs/assets/large-pTPmIg4s.js +++ b/docs/assets/large-DdnQ63On.js @@ -1,4 +1,4 @@ -var UA=Object.defineProperty;var qA=(t,e,n)=>e in t?UA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var d=(t,e,n)=>qA(t,typeof e!="symbol"?e+"":e,n);import{_ as l}from"./index-32jvP77A.js";const YA=async t=>l(()=>Promise.resolve().then(()=>Po),void 0).then(e=>e.default(t));var P;(function(t){t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline"})(P||(P={}));var oe;(function(t){function e(u){return u.toString(2).padStart(32,"0")}t.toBinaryStr=e;function n(u){const p=t.getLanguageId(u),g=t.getTokenType(u),b=t.getFontStyle(u),f=t.getForeground(u),m=t.getBackground(u);console.log({languageId:p,tokenType:g,fontStyle:b,foreground:f,background:m})}t.print=n;function A(u){return(u&255)>>>0}t.getLanguageId=A;function a(u){return(u&768)>>>8}t.getTokenType=a;function o(u){return(u&1024)!==0}t.containsBalancedBrackets=o;function r(u){return(u&30720)>>>11}t.getFontStyle=r;function s(u){return(u&16744448)>>>15}t.getForeground=s;function i(u){return(u&4278190080)>>>24}t.getBackground=i;function c(u,p,g,b,f,m,h){let w=t.getLanguageId(u),y=t.getTokenType(u),C=t.containsBalancedBrackets(u)?1:0,Q=t.getFontStyle(u),E=t.getForeground(u),_=t.getBackground(u);return p!==0&&(w=p),g!==8&&(y=g),b!==null&&(C=b?1:0),f!==-1&&(Q=f),m!==0&&(E=m),h!==0&&(_=h),(w<<0|y<<8|C<<10|Q<<11|E<<15|_<<24)>>>0}t.set=c})(oe||(oe={}));function xe(t,e){const n=[],A=OA(t);let a=A.next();for(;a!==null;){let i=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":i=1;break;case"L":i=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=A.next()}let c=r();if(n.push({matcher:c,priority:i}),a!==",")break;a=A.next()}return n;function o(){if(a==="-"){a=A.next();const i=o();return c=>!!i&&!i(c)}if(a==="("){a=A.next();const i=s();return a===")"&&(a=A.next()),i}if(_n(a)){const i=[];do i.push(a),a=A.next();while(_n(a));return c=>e(i,c)}return null}function r(){const i=[];let c=o();for(;c;)i.push(c),c=o();return u=>i.every(p=>p(u))}function s(){const i=[];let c=r();for(;c&&(i.push(c),a==="|"||a===",");){do a=A.next();while(a==="|"||a===",");c=r()}return u=>i.some(p=>p(u))}}function _n(t){return!!t&&!!t.match(/[\w\.:]+/)}function OA(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const A=n[0];return n=e.exec(t),A}}}function Tn(t){typeof t.dispose=="function"&&t.dispose()}function TA(t){return cn(t)}function cn(t){return Array.isArray(t)?KA(t):typeof t=="object"?WA(t):t}function KA(t){let e=[];for(let n=0,A=t.length;n{for(let A in n)t[A]=n[A]}),t}function Wn(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Wn(t.substring(0,t.length-1)):t.substr(~e+1)}let Je=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class ye{static hasCaptures(e){return e===null?!1:(Je.lastIndex=0,Je.test(e))}static replaceCaptures(e,n,A){return e.replace(Je,(a,o,r,s)=>{let i=A[parseInt(o||r,10)];if(i){let c=n.substring(i.start,i.end);for(;c[0]===".";)c=c.substring(1);switch(s){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return a})}}function Jn(t,e){return te?1:0}function zn(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,A=e.length;if(n===A){for(let a=0;a`);return}const o=n.lookup(e);t instanceof ge?De({baseGrammar:o,selfGrammar:a},A):An(t.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},A);const r=n.injections(t.scopeName);if(r)for(const s of r)A.add(new ge(s))}function An(t,e,n){if(e.repository&&e.repository[t]){const A=e.repository[t];Fe([A],e,n)}}function De(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Fe(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Fe(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Fe(t,e,n){for(const A of t){if(n.visitedRule.has(A))continue;n.visitedRule.add(A);const a=A.repository?Kn({},e.repository,A.repository):e.repository;Array.isArray(A.patterns)&&Fe(A.patterns,{...e,repository:a},n);const o=A.include;if(!o)continue;const r=Xn(o);switch(r.kind){case 0:De({...e,selfGrammar:e.baseGrammar},n);break;case 1:De(e,n);break;case 2:An(r.ruleName,{...e,repository:a},n);break;case 3:case 4:const s=r.scopeName===e.selfGrammar.scopeName?e.selfGrammar:r.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(s){const i={baseGrammar:e.baseGrammar,selfGrammar:s,repository:a};r.kind===4?An(r.ruleName,i,n):De(i,n)}else r.kind===4?n.add(new JA(r.scopeName,r.ruleName)):n.add(new ge(r.scopeName));break}}}class XA{constructor(){d(this,"kind",0)}}class et{constructor(){d(this,"kind",1)}}class nt{constructor(e){d(this,"ruleName");d(this,"kind",2);this.ruleName=e}}class At{constructor(e){d(this,"scopeName");d(this,"kind",3);this.scopeName=e}}class tt{constructor(e,n){d(this,"scopeName");d(this,"ruleName");d(this,"kind",4);this.scopeName=e,this.ruleName=n}}function Xn(t){if(t==="$base")return new XA;if(t==="$self")return new et;const e=t.indexOf("#");if(e===-1)return new At(t);if(e===0)return new nt(t.substring(1));{const n=t.substring(0,e),A=t.substring(e+1);return new tt(n,A)}}const at=/\\(\d+)/,Dn=/\\(\d+)/g,ot=-1,eA=-2;class be{constructor(e,n,A,a){d(this,"$location");d(this,"id");d(this,"_nameIsCapturing");d(this,"_name");d(this,"_contentNameIsCapturing");d(this,"_contentName");this.$location=e,this.id=n,this._name=A||null,this._nameIsCapturing=ye.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=ye.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Wn(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return!this._nameIsCapturing||this._name===null||e===null||n===null?this._name:ye.replaceCaptures(this._name,e,n)}getContentName(e,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ye.replaceCaptures(this._contentName,e,n)}}class rt extends be{constructor(n,A,a,o,r){super(n,A,a,o);d(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(n,A){throw new Error("Not supported!")}compile(n,A){throw new Error("Not supported!")}compileAG(n,A,a,o){throw new Error("Not supported!")}}class it extends be{constructor(n,A,a,o,r){super(n,A,a,null);d(this,"_match");d(this,"captures");d(this,"_cachedCompiledPatterns");this._match=new V(o,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,A){A.push(this._match)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class xn extends be{constructor(n,A,a,o,r){super(n,A,a,o);d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,A){for(const a of this.patterns)n.getRule(a).collectPatterns(n,A)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class tn extends be{constructor(n,A,a,o,r,s,i,c,u,p){super(n,A,a,o);d(this,"_begin");d(this,"beginCaptures");d(this,"_end");d(this,"endHasBackReferences");d(this,"endCaptures");d(this,"applyEndPatternLast");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this._begin=new V(r,this.id),this.beginCaptures=s,this._end=new V(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=u||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,A){return this._end.resolveBackReferences(n,A)}collectPatterns(n,A){A.push(this._begin)}compile(n,A){return this._getCachedCompiledPatterns(n,A).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n,A).compileAG(n,a,o)}_getCachedCompiledPatterns(n,A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const a of this.patterns)n.getRule(a).collectPatterns(n,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,A):this._cachedCompiledPatterns.setSource(0,A)),this._cachedCompiledPatterns}}class ve extends be{constructor(n,A,a,o,r,s,i,c,u){super(n,A,a,o);d(this,"_begin");d(this,"beginCaptures");d(this,"whileCaptures");d(this,"_while");d(this,"whileHasBackReferences");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");d(this,"_cachedCompiledWhilePatterns");this._begin=new V(r,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new V(i,eA),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,A){return this._while.resolveBackReferences(n,A)}collectPatterns(n,A){A.push(this._begin)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const A of this.patterns)n.getRule(A).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,A){return this._getCachedCompiledWhilePatterns(n,A).compile(n)}compileWhileAG(n,A,a,o){return this._getCachedCompiledWhilePatterns(n,A).compileAG(n,a,o)}_getCachedCompiledWhilePatterns(n,A){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,A||"￿"),this._cachedCompiledWhilePatterns}}class M{static createCaptureRule(e,n,A,a,o){return e.registerRule(r=>new rt(n,r,A,a,o))}static getCompiledRuleId(e,n,A){return e.id||n.registerRule(a=>{if(e.id=a,e.match)return new it(e.$vscodeTextmateLocation,e.id,e.name,e.match,M._compileCaptures(e.captures,n,A));if(typeof e.begin>"u"){e.repository&&(A=Kn({},A,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new xn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,M._compilePatterns(o,n,A))}return e.while?new ve(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,A),e.while,M._compileCaptures(e.whileCaptures||e.captures,n,A),M._compilePatterns(e.patterns,n,A)):new tn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,A),e.end,M._compileCaptures(e.endCaptures||e.captures,n,A),e.applyEndPatternLast,M._compilePatterns(e.patterns,n,A))}),e.id}static _compileCaptures(e,n,A){let a=[];if(e){let o=0;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const s=parseInt(r,10);s>o&&(o=s)}for(let r=0;r<=o;r++)a[r]=null;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const s=parseInt(r,10);let i=0;e[r].patterns&&(i=M.getCompiledRuleId(e[r],n,A)),a[s]=M.createCaptureRule(n,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,i)}}return a}static _compilePatterns(e,n,A){let a=[];if(e)for(let o=0,r=e.length;oe.substring(a.start,a.end));return Dn.lastIndex=0,this.source.replace(Dn,(a,o)=>Zn(A[parseInt(o,10)]||""))}_buildAnchorCache(){let e=[],n=[],A=[],a=[],o,r,s,i;for(o=0,r=this.source.length;oA.source);this._cached=new Fn(e,n,this._items.map(A=>A.ruleId))}return this._cached}compileAG(e,n,A){return this._hasAnchors?n?A?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,n,A)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,n,A)),this._anchorCache.A1_G0):A?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,n,A)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,n,A)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,n,A){let a=this._items.map(o=>o.resolveAnchors(n,A));return new Fn(e,a,this._items.map(o=>o.ruleId))}}class Fn{constructor(e,n,A){d(this,"regExps");d(this,"rules");d(this,"scanner");this.regExps=n,this.rules=A,this.scanner=e.createOnigScanner(n)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let n=0,A=this.rules.length;ne in t?UA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var d=(t,e,n)=>qA(t,typeof e!="symbol"?e+"":e,n);import{_ as l}from"./index-Bex626j_.js";const YA=async t=>l(()=>Promise.resolve().then(()=>Po),void 0).then(e=>e.default(t));var P;(function(t){t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline"})(P||(P={}));var oe;(function(t){function e(u){return u.toString(2).padStart(32,"0")}t.toBinaryStr=e;function n(u){const p=t.getLanguageId(u),g=t.getTokenType(u),b=t.getFontStyle(u),f=t.getForeground(u),m=t.getBackground(u);console.log({languageId:p,tokenType:g,fontStyle:b,foreground:f,background:m})}t.print=n;function A(u){return(u&255)>>>0}t.getLanguageId=A;function a(u){return(u&768)>>>8}t.getTokenType=a;function o(u){return(u&1024)!==0}t.containsBalancedBrackets=o;function r(u){return(u&30720)>>>11}t.getFontStyle=r;function s(u){return(u&16744448)>>>15}t.getForeground=s;function i(u){return(u&4278190080)>>>24}t.getBackground=i;function c(u,p,g,b,f,m,h){let w=t.getLanguageId(u),y=t.getTokenType(u),C=t.containsBalancedBrackets(u)?1:0,Q=t.getFontStyle(u),E=t.getForeground(u),_=t.getBackground(u);return p!==0&&(w=p),g!==8&&(y=g),b!==null&&(C=b?1:0),f!==-1&&(Q=f),m!==0&&(E=m),h!==0&&(_=h),(w<<0|y<<8|C<<10|Q<<11|E<<15|_<<24)>>>0}t.set=c})(oe||(oe={}));function xe(t,e){const n=[],A=OA(t);let a=A.next();for(;a!==null;){let i=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":i=1;break;case"L":i=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=A.next()}let c=r();if(n.push({matcher:c,priority:i}),a!==",")break;a=A.next()}return n;function o(){if(a==="-"){a=A.next();const i=o();return c=>!!i&&!i(c)}if(a==="("){a=A.next();const i=s();return a===")"&&(a=A.next()),i}if(_n(a)){const i=[];do i.push(a),a=A.next();while(_n(a));return c=>e(i,c)}return null}function r(){const i=[];let c=o();for(;c;)i.push(c),c=o();return u=>i.every(p=>p(u))}function s(){const i=[];let c=r();for(;c&&(i.push(c),a==="|"||a===",");){do a=A.next();while(a==="|"||a===",");c=r()}return u=>i.some(p=>p(u))}}function _n(t){return!!t&&!!t.match(/[\w\.:]+/)}function OA(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const A=n[0];return n=e.exec(t),A}}}function Tn(t){typeof t.dispose=="function"&&t.dispose()}function TA(t){return cn(t)}function cn(t){return Array.isArray(t)?KA(t):typeof t=="object"?WA(t):t}function KA(t){let e=[];for(let n=0,A=t.length;n{for(let A in n)t[A]=n[A]}),t}function Wn(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Wn(t.substring(0,t.length-1)):t.substr(~e+1)}let Je=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class ye{static hasCaptures(e){return e===null?!1:(Je.lastIndex=0,Je.test(e))}static replaceCaptures(e,n,A){return e.replace(Je,(a,o,r,s)=>{let i=A[parseInt(o||r,10)];if(i){let c=n.substring(i.start,i.end);for(;c[0]===".";)c=c.substring(1);switch(s){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return a})}}function Jn(t,e){return te?1:0}function zn(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,A=e.length;if(n===A){for(let a=0;a`);return}const o=n.lookup(e);t instanceof ge?De({baseGrammar:o,selfGrammar:a},A):An(t.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},A);const r=n.injections(t.scopeName);if(r)for(const s of r)A.add(new ge(s))}function An(t,e,n){if(e.repository&&e.repository[t]){const A=e.repository[t];Fe([A],e,n)}}function De(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Fe(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Fe(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Fe(t,e,n){for(const A of t){if(n.visitedRule.has(A))continue;n.visitedRule.add(A);const a=A.repository?Kn({},e.repository,A.repository):e.repository;Array.isArray(A.patterns)&&Fe(A.patterns,{...e,repository:a},n);const o=A.include;if(!o)continue;const r=Xn(o);switch(r.kind){case 0:De({...e,selfGrammar:e.baseGrammar},n);break;case 1:De(e,n);break;case 2:An(r.ruleName,{...e,repository:a},n);break;case 3:case 4:const s=r.scopeName===e.selfGrammar.scopeName?e.selfGrammar:r.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(s){const i={baseGrammar:e.baseGrammar,selfGrammar:s,repository:a};r.kind===4?An(r.ruleName,i,n):De(i,n)}else r.kind===4?n.add(new JA(r.scopeName,r.ruleName)):n.add(new ge(r.scopeName));break}}}class XA{constructor(){d(this,"kind",0)}}class et{constructor(){d(this,"kind",1)}}class nt{constructor(e){d(this,"ruleName");d(this,"kind",2);this.ruleName=e}}class At{constructor(e){d(this,"scopeName");d(this,"kind",3);this.scopeName=e}}class tt{constructor(e,n){d(this,"scopeName");d(this,"ruleName");d(this,"kind",4);this.scopeName=e,this.ruleName=n}}function Xn(t){if(t==="$base")return new XA;if(t==="$self")return new et;const e=t.indexOf("#");if(e===-1)return new At(t);if(e===0)return new nt(t.substring(1));{const n=t.substring(0,e),A=t.substring(e+1);return new tt(n,A)}}const at=/\\(\d+)/,Dn=/\\(\d+)/g,ot=-1,eA=-2;class be{constructor(e,n,A,a){d(this,"$location");d(this,"id");d(this,"_nameIsCapturing");d(this,"_name");d(this,"_contentNameIsCapturing");d(this,"_contentName");this.$location=e,this.id=n,this._name=A||null,this._nameIsCapturing=ye.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=ye.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Wn(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return!this._nameIsCapturing||this._name===null||e===null||n===null?this._name:ye.replaceCaptures(this._name,e,n)}getContentName(e,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ye.replaceCaptures(this._contentName,e,n)}}class rt extends be{constructor(n,A,a,o,r){super(n,A,a,o);d(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(n,A){throw new Error("Not supported!")}compile(n,A){throw new Error("Not supported!")}compileAG(n,A,a,o){throw new Error("Not supported!")}}class it extends be{constructor(n,A,a,o,r){super(n,A,a,null);d(this,"_match");d(this,"captures");d(this,"_cachedCompiledPatterns");this._match=new V(o,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,A){A.push(this._match)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class xn extends be{constructor(n,A,a,o,r){super(n,A,a,o);d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,A){for(const a of this.patterns)n.getRule(a).collectPatterns(n,A)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new le,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class tn extends be{constructor(n,A,a,o,r,s,i,c,u,p){super(n,A,a,o);d(this,"_begin");d(this,"beginCaptures");d(this,"_end");d(this,"endHasBackReferences");d(this,"endCaptures");d(this,"applyEndPatternLast");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");this._begin=new V(r,this.id),this.beginCaptures=s,this._end=new V(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=u||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,A){return this._end.resolveBackReferences(n,A)}collectPatterns(n,A){A.push(this._begin)}compile(n,A){return this._getCachedCompiledPatterns(n,A).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n,A).compileAG(n,a,o)}_getCachedCompiledPatterns(n,A){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const a of this.patterns)n.getRule(a).collectPatterns(n,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,A):this._cachedCompiledPatterns.setSource(0,A)),this._cachedCompiledPatterns}}class ve extends be{constructor(n,A,a,o,r,s,i,c,u){super(n,A,a,o);d(this,"_begin");d(this,"beginCaptures");d(this,"whileCaptures");d(this,"_while");d(this,"whileHasBackReferences");d(this,"hasMissingPatterns");d(this,"patterns");d(this,"_cachedCompiledPatterns");d(this,"_cachedCompiledWhilePatterns");this._begin=new V(r,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new V(i,eA),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,A){return this._while.resolveBackReferences(n,A)}collectPatterns(n,A){A.push(this._begin)}compile(n,A){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,A,a,o){return this._getCachedCompiledPatterns(n).compileAG(n,a,o)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new le;for(const A of this.patterns)n.getRule(A).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,A){return this._getCachedCompiledWhilePatterns(n,A).compile(n)}compileWhileAG(n,A,a,o){return this._getCachedCompiledWhilePatterns(n,A).compileAG(n,a,o)}_getCachedCompiledWhilePatterns(n,A){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,A||"￿"),this._cachedCompiledWhilePatterns}}class M{static createCaptureRule(e,n,A,a,o){return e.registerRule(r=>new rt(n,r,A,a,o))}static getCompiledRuleId(e,n,A){return e.id||n.registerRule(a=>{if(e.id=a,e.match)return new it(e.$vscodeTextmateLocation,e.id,e.name,e.match,M._compileCaptures(e.captures,n,A));if(typeof e.begin>"u"){e.repository&&(A=Kn({},A,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new xn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,M._compilePatterns(o,n,A))}return e.while?new ve(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,A),e.while,M._compileCaptures(e.whileCaptures||e.captures,n,A),M._compilePatterns(e.patterns,n,A)):new tn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,A),e.end,M._compileCaptures(e.endCaptures||e.captures,n,A),e.applyEndPatternLast,M._compilePatterns(e.patterns,n,A))}),e.id}static _compileCaptures(e,n,A){let a=[];if(e){let o=0;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const s=parseInt(r,10);s>o&&(o=s)}for(let r=0;r<=o;r++)a[r]=null;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const s=parseInt(r,10);let i=0;e[r].patterns&&(i=M.getCompiledRuleId(e[r],n,A)),a[s]=M.createCaptureRule(n,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,i)}}return a}static _compilePatterns(e,n,A){let a=[];if(e)for(let o=0,r=e.length;oe.substring(a.start,a.end));return Dn.lastIndex=0,this.source.replace(Dn,(a,o)=>Zn(A[parseInt(o,10)]||""))}_buildAnchorCache(){let e=[],n=[],A=[],a=[],o,r,s,i;for(o=0,r=this.source.length;oA.source);this._cached=new Fn(e,n,this._items.map(A=>A.ruleId))}return this._cached}compileAG(e,n,A){return this._hasAnchors?n?A?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,n,A)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,n,A)),this._anchorCache.A1_G0):A?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,n,A)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,n,A)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,n,A){let a=this._items.map(o=>o.resolveAnchors(n,A));return new Fn(e,a,this._items.map(o=>o.ruleId))}}class Fn{constructor(e,n,A){d(this,"regExps");d(this,"rules");d(this,"scanner");this.regExps=n,this.rules=A,this.scanner=e.createOnigScanner(n)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let n=0,A=this.rules.length;nthis._root.match(e)));this._colorMap=e,this._defaults=n,this._root=A}static createFromRawTheme(e,n){return this.createFromParsedTheme(ut(e),n)}static createFromParsedTheme(e,n){return pt(e,n)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const n=e.scopeName,a=this._cachedMatchRoot.get(n).find(o=>st(e.parent,o.parentScopes));return a?new nA(a.fontStyle,a.foreground,a.background):null}}class Z{constructor(e,n){d(this,"parent");d(this,"scopeName");this.parent=e,this.scopeName=n}static push(e,n){for(const A of n)e=new Z(e,A);return e}static from(...e){let n=null;for(let A=0;A1&&(h=f.slice(0,f.length-1),h.reverse()),n[A++]=new dt(m,h,a,i,c,u)}}return n}class dt{constructor(e,n,A,a,o,r){d(this,"scope");d(this,"parentScopes");d(this,"index");d(this,"fontStyle");d(this,"foreground");d(this,"background");this.scope=e,this.parentScopes=n,this.index=A,this.fontStyle=a,this.foreground=o,this.background=r}}function pt(t,e){t.sort((i,c)=>{let u=Jn(i.scope,c.scope);return u!==0||(u=zn(i.parentScopes,c.parentScopes),u!==0)?u:i.index-c.index});let n=0,A="#000000",a="#ffffff";for(;t.length>=1&&t[0].scope==="";){let i=t.shift();i.fontStyle!==-1&&(n=i.fontStyle),i.foreground!==null&&(A=i.foreground),i.background!==null&&(a=i.background)}let o=new gt(e),r=new nA(n,o.getId(A),o.getId(a)),s=new pe(new me(0,null,-1,0,0),[]);for(let i=0,c=t.length;ie?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),A!==0&&(this.foreground=A),a!==0&&(this.background=a)}}class pe{constructor(e,n=[],A={}){d(this,"_mainRule");d(this,"_children");d(this,"_rulesWithParentScopes");this._mainRule=e,this._children=A,this._rulesWithParentScopes=n}static _sortBySpecificity(e){return e.length===1||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,n){if(e.scopeDepth===n.scopeDepth){const A=e.parentScopes,a=n.parentScopes;let o=A===null?0:A.length,r=a===null?0:a.length;if(o===r)for(let s=0;s{const n=this._scopeToLanguage(e),A=this._toStandardTokenType(e);return new ze(n,A)}));this._defaultAttributes=new ze(e,8),this._embeddedLanguagesMatcher=new lt(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ae._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ae.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}};d(Ae,"_NULL_SCOPE_METADATA",new ze(0,0)),d(Ae,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/);let an=Ae;class lt{constructor(e){d(this,"values");d(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const n=e.map(([A,a])=>Zn(A));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const n=e.match(this.scopesRegExp);if(n)return this.values.get(n[1])}}class vn{constructor(e,n){d(this,"stack");d(this,"stoppedEarly");this.stack=e,this.stoppedEarly=n}}function AA(t,e,n,A,a,o,r,s){const i=e.content.length;let c=!1,u=-1;if(r){const b=mt(t,e,n,A,a,o);a=b.stack,A=b.linePos,n=b.isFirstLine,u=b.anchorPosition}const p=Date.now();for(;!c;){if(s!==0&&Date.now()-p>s)return new vn(a,!0);g()}return new vn(a,!1);function g(){const b=ft(t,e,n,A,a,u);if(!b){o.produce(a,i),c=!0;return}const f=b.captureIndices,m=b.matchedRuleId,h=f&&f.length>0?f[0].end>A:!1;if(m===ot){const w=a.getRule(t);o.produce(a,f[0].start),a=a.withContentNameScopesList(a.nameScopesList),de(t,e,n,a,o,w.endCaptures,f),o.produce(a,f[0].end);const y=a;if(a=a.parent,u=y.getAnchorPos(),!h&&y.getEnterPos()===A){a=y,o.produce(a,i),c=!0;return}}else{const w=t.getRule(m);o.produce(a,f[0].start);const y=a,C=w.getName(e.content,f),Q=a.contentNameScopesList.pushAttributed(C,t);if(a=a.push(m,A,u,f[0].end===i,null,Q,Q),w instanceof tn){const E=w;de(t,e,n,a,o,E.beginCaptures,f),o.produce(a,f[0].end),u=f[0].end;const _=E.getContentName(e.content,f),R=Q.pushAttributed(_,t);if(a=a.withContentNameScopesList(R),E.endHasBackReferences&&(a=a.withEndRule(E.getEndWithResolvedBackReferences(e.content,f))),!h&&y.hasSameRuleAs(a)){a=a.pop(),o.produce(a,i),c=!0;return}}else if(w instanceof ve){const E=w;de(t,e,n,a,o,E.beginCaptures,f),o.produce(a,f[0].end),u=f[0].end;const _=E.getContentName(e.content,f),R=Q.pushAttributed(_,t);if(a=a.withContentNameScopesList(R),E.whileHasBackReferences&&(a=a.withEndRule(E.getWhileWithResolvedBackReferences(e.content,f))),!h&&y.hasSameRuleAs(a)){a=a.pop(),o.produce(a,i),c=!0;return}}else if(de(t,e,n,a,o,w.captures,f),o.produce(a,f[0].end),a=a.pop(),!h){a=a.safePop(),o.produce(a,i),c=!0;return}}f[0].end>A&&(A=f[0].end,n=!1)}}function mt(t,e,n,A,a,o){let r=a.beginRuleCapturedEOL?0:-1;const s=[];for(let i=a;i;i=i.pop()){const c=i.getRule(t);c instanceof ve&&s.push({rule:c,stack:i})}for(let i=s.pop();i;i=s.pop()){const{ruleScanner:c,findOptions:u}=ht(i.rule,t,i.stack.endRule,n,A===r),p=c.findNextMatchSync(e,A,u);if(p){if(p.ruleId!==eA){a=i.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(i.stack,p.captureIndices[0].start),de(t,e,n,i.stack,o,i.rule.whileCaptures,p.captureIndices),o.produce(i.stack,p.captureIndices[0].end),r=p.captureIndices[0].end,p.captureIndices[0].end>A&&(A=p.captureIndices[0].end,n=!1))}else{a=i.stack.pop();break}}return{stack:a,linePos:A,anchorPosition:r,isFirstLine:n}}function ft(t,e,n,A,a,o){const r=bt(t,e,n,A,a,o),s=t.getInjections();if(s.length===0)return r;const i=Bt(s,t,e,n,A,a,o);if(!i)return r;if(!r)return i;const c=r.captureIndices[0].start,u=i.captureIndices[0].start;return u=s)&&(s=C,i=y.captureIndices,c=y.ruleId,u=f.priority,s===a))break}return i?{priorityMatch:u===-1,captureIndices:i,matchedRuleId:c}:null}function tA(t,e,n,A,a){return{ruleScanner:t.compileAG(e,n,A,a),findOptions:0}}function ht(t,e,n,A,a){return{ruleScanner:t.compileWhileAG(e,n,A,a),findOptions:0}}function de(t,e,n,A,a,o,r){if(o.length===0)return;const s=e.content,i=Math.min(o.length,r.length),c=[],u=r[0].end;for(let p=0;pu)break;for(;c.length>0&&c[c.length-1].endPos<=b.start;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?a.produceFromScopes(c[c.length-1].scopes,b.start):a.produce(A,b.start),g.retokenizeCapturedWithRuleId){const m=g.getName(s,r),h=A.contentNameScopesList.pushAttributed(m,t),w=g.getContentName(s,r),y=h.pushAttributed(w,t),C=A.push(g.retokenizeCapturedWithRuleId,b.start,-1,!1,null,h,y),Q=t.createOnigString(s.substring(0,b.end));AA(t,Q,n&&b.start===0,b.start,C,a,!1,0),Tn(Q);continue}const f=g.getName(s,r);if(f!==null){const h=(c.length>0?c[c.length-1].scopes:A.contentNameScopesList).pushAttributed(f,t);c.push(new Ct(h,b.end))}}for(;c.length>0;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}class Ct{constructor(e,n){d(this,"scopes");d(this,"endPos");this.scopes=e,this.endPos=n}}function Et(t,e,n,A,a,o,r,s){return new wt(t,e,n,A,a,o,r,s)}function Mn(t,e,n,A,a){const o=xe(e,Ne),r=M.getCompiledRuleId(n,A,a.repository);for(const s of o)t.push({debugSelector:e,matcher:s.matcher,ruleId:r,grammar:a,priority:s.priority})}function Ne(t,e){if(e.length{for(let a=n;an&&t.substr(0,n)===e&&t[n]==="."}class wt{constructor(e,n,A,a,o,r,s,i){d(this,"_rootScopeName");d(this,"balancedBracketSelectors");d(this,"_onigLib");d(this,"_rootId");d(this,"_lastRuleId");d(this,"_ruleId2desc");d(this,"_includedGrammars");d(this,"_grammarRepository");d(this,"_grammar");d(this,"_injections");d(this,"_basicScopeAttributesProvider");d(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=r,this._onigLib=i,this._basicScopeAttributesProvider=new an(A,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Nn(n,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const c of Object.keys(o)){const u=xe(c,Ne);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},n=[],A=this._rootScopeName,a=e.lookup(A);if(a){const o=a.injections;if(o)for(let s in o)Mn(n,s,o[s],this,a);const r=this._grammarRepository.injections(A);r&&r.forEach(s=>{const i=this.getExternalGrammar(s);if(i){const c=i.injectionSelector;c&&Mn(n,c,i,this,i)}})}return n.sort((o,r)=>o.priority-r.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const n=++this._lastRuleId,A=e(n);return this._ruleId2desc[n]=A,A}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,n){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const A=this._grammarRepository.lookup(e);if(A)return this._includedGrammars[e]=Nn(A,n&&n.$base),this._includedGrammars[e]}}tokenizeLine(e,n,A=0){const a=this._tokenize(e,n,!1,A);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(e,n,A=0){const a=this._tokenize(e,n,!0,A);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(e,n,A,a){this._rootId===-1&&(this._rootId=M.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!n||n===fe.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),g=oe.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),b=this.getRule(this._rootId).getName(null,null);let f;b?f=G.createRootAndLookUpScopeName(b,g,this):f=G.createRoot("unknown",g),n=new fe(null,this._rootId,-1,-1,!1,null,f,f)}else o=!1,n.reset();e=e+` `;const r=this.createOnigString(e),s=r.content.length,i=new kt(A,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=AA(this,r,o,0,n,i,!0,a);return Tn(r),{lineLength:s,lineTokens:i,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}}function Nn(t,e){return t=TA(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}class G{constructor(e,n,A){d(this,"parent");d(this,"scopePath");d(this,"tokenAttributes");this.parent=e,this.scopePath=n,this.tokenAttributes=A}static fromExtension(e,n){let A=e,a=(e==null?void 0:e.scopePath)??null;for(const o of n)a=Z.push(a,o.scopeNames),A=new G(A,a,o.encodedTokenAttributes);return A}static createRoot(e,n){return new G(null,new Z(null,e),n)}static createRootAndLookUpScopeName(e,n,A){const a=A.getMetadataForScope(e),o=new Z(null,e),r=A.themeProvider.themeMatch(o),s=G.mergeAttributes(n,a,r);return new G(null,o,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return G.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,A){let a=-1,o=0,r=0;return A!==null&&(a=A.fontStyle,o=A.foregroundId,r=A.backgroundId),oe.set(e,n.languageId,n.tokenType,null,a,o,r)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return G._pushAttributed(this,e,n);const A=e.split(/ /g);let a=this;for(const o of A)a=G._pushAttributed(a,o,n);return a}static _pushAttributed(e,n,A){const a=A.getMetadataForScope(n),o=e.scopePath.push(n),r=A.themeProvider.themeMatch(o),s=G.mergeAttributes(e.tokenAttributes,a,r);return new G(e,o,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var a;const n=[];let A=this;for(;A&&A!==e;)n.push({encodedTokenAttributes:A.tokenAttributes,scopeNames:A.scopePath.getExtensionIfDefined(((a=A.parent)==null?void 0:a.scopePath)??null)}),A=A.parent;return A===e?n.reverse():void 0}}const T=class T{constructor(e,n,A,a,o,r,s,i){d(this,"parent");d(this,"ruleId");d(this,"beginRuleCapturedEOL");d(this,"endRule");d(this,"nameScopesList");d(this,"contentNameScopesList");d(this,"_stackElementBrand");d(this,"_enterPos");d(this,"_anchorPos");d(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=r,this.nameScopesList=s,this.contentNameScopesList=i,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=A,this._anchorPos=a}equals(e){return e===null?!1:T._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?G.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){T._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,A,a,o,r,s){return new T(this,e,n,A,a,o,r,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var A,a;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(A=this.nameScopesList)==null?void 0:A.toString()}, ${(a=this.contentNameScopesList)==null?void 0:a.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new T(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,A;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((A=this.contentNameScopesList)==null?void 0:A.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const A=G.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new T(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,A,G.fromExtension(A,n.contentNameScopesList))}};d(T,"NULL",new T(null,0,0,0,!1,null,null,null));let fe=T;class yt{constructor(e,n){d(this,"balancedBracketScopes");d(this,"unbalancedBracketScopes");d(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(A=>A==="*"?(this.allowAny=!0,[]):xe(A,Ne).map(a=>a.matcher)),this.unbalancedBracketScopes=n.flatMap(A=>xe(A,Ne).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const n of this.unbalancedBracketScopes)if(n(e))return!1;for(const n of this.balancedBracketScopes)if(n(e))return!0;return this.allowAny}}class kt{constructor(e,n,A,a){d(this,"balancedBracketSelectors");d(this,"_emitBinaryTokens");d(this,"_lineText");d(this,"_tokens");d(this,"_binaryTokens");d(this,"_lastTokenEndIndex");d(this,"_tokenTypeOverrides");this.balancedBracketSelectors=a,this._emitBinaryTokens=e,this._tokenTypeOverrides=A,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,n){this.produceFromScopes(e.contentNameScopesList,n)}produceFromScopes(e,n){var a;if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let o=(e==null?void 0:e.tokenAttributes)??0,r=!1;if((a=this.balancedBracketSelectors)!=null&&a.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(e==null?void 0:e.getScopeNames())??[];for(const i of this._tokenTypeOverrides)i.matcher(s)&&(o=oe.set(o,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(s))}if(r&&(o=oe.set(o,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===o){this._lastTokenEndIndex=n;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(o),this._lastTokenEndIndex=n;return}const A=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:A}),this._lastTokenEndIndex=n}getResult(e,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,n),this._binaryTokens[this._binaryTokens.length-2]=0);const A=new Uint32Array(this._binaryTokens.length);for(let a=0,o=this._binaryTokens.length;a0;)await Promise.all(r.Q.map(s=>this._loadSingleGrammar(s.scopeName))),r.processQueue();return this._grammarForScopeName(e,n,A,a,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const n=await this._options.loadGrammar(e);if(n){const A=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,A)}}async addGrammar(e,n=[],A=0,a=null){return this._syncRegistry.addGrammar(e,n),await this._grammarForScopeName(e.scopeName,A,a)}_grammarForScopeName(e,n=0,A=null,a=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,A,a,o)}};const aA=fe.NULL,j={LANGUAGEID_MASK:255,TOKEN_TYPE_MASK:768,BALANCED_BRACKETS_MASK:1024,FONT_STYLE_MASK:14336,FOREGROUND_MASK:8372224,BACKGROUND_MASK:4286578688,LANGUAGEID_OFFSET:0,TOKEN_TYPE_OFFSET:8,BALANCED_BRACKETS_OFFSET:10,FONT_STYLE_OFFSET:11,FOREGROUND_OFFSET:15,BACKGROUND_OFFSET:24};class K{static toBinaryStr(e){let n=e.toString(2);for(;n.length<32;)n=`0${n}`;return n}static getLanguageId(e){return(e&j.LANGUAGEID_MASK)>>>j.LANGUAGEID_OFFSET}static getTokenType(e){return(e&j.TOKEN_TYPE_MASK)>>>j.TOKEN_TYPE_OFFSET}static getFontStyle(e){return(e&j.FONT_STYLE_MASK)>>>j.FONT_STYLE_OFFSET}static getForeground(e){return(e&j.FOREGROUND_MASK)>>>j.FOREGROUND_OFFSET}static getBackground(e){return(e&j.BACKGROUND_MASK)>>>j.BACKGROUND_OFFSET}static containsBalancedBrackets(e){return(e&j.BALANCED_BRACKETS_MASK)!==0}static set(e,n,A,a,o,r){let s=K.getLanguageId(e),i=K.getTokenType(e),c=K.getFontStyle(e),u=K.getForeground(e),p=K.getBackground(e);const g=K.containsBalancedBrackets(e)?1:0;return n!==0&&(s=n),A!==0&&(i=A===8?0:A),a!==P.NotSet&&(c=a),o!==0&&(u=o),r!==0&&(p=r),(s<>>0}}function $e(t,e=!1){var o;const n=t.split(/(\r?\n)/g);let A=0;const a=[];for(let r=0;rn&&A.push({...t,content:t.content.slice(n,a),offset:t.offset+n}),n=a;return nA-a);return n.length?t.map(A=>A.flatMap(a=>{const o=n.filter(r=>a.offsetr-a.offset).sort((r,s)=>r-s);return o.length?Dt(a,o):a})):t}function je(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},A=typeof t=="string"?t:t.name;for(const[a,o]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof o=="string"?n[a]=o:a===A&&Object.assign(n,o);return n}function J(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function sA(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&P.Italic&&(e["font-style"]="italic"),t.fontStyle&P.Bold&&(e["font-weight"]="bold"),t.fontStyle&P.Underline&&(e["text-decoration"]="underline")),e}function cA(t){return Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function Ft(t){const e=$e(t,!0).map(([a])=>a);function n(a){if(a===t.length)return{line:e.length-1,character:e[e.length-1].length};let o=a,r=0;for(const s of e){if(oNumber.parseInt(r));o.length===3&&!o.some(r=>Number.isNaN(r))&&(a={type:"rgb",rgb:o})}else if(A==="5"){const o=Number.parseInt(t[e+n]);Number.isNaN(o)||(a={type:"table",index:Number(o)})}return[n,a]}function Mt(t){const e=[];for(let n=0;n=90&&a<=97?e.push({type:"setForegroundColor",value:{type:"named",name:z[a-90+8]}}):a>=100&&a<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:z[a-100+8]}})}return e}function Nt(){let t=null,e=null,n=new Set;return{parse(A){const a=[];let o=0;do{const r=vt(A,o),s=r.sequence?A.substring(o,r.startPosition):A.substring(o);if(s.length>0&&a.push({value:s,foreground:t,background:e,decorations:new Set(n)}),r.sequence){const i=Mt(r.sequence);for(const c of i)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of i)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=r.position}while(oMath.max(0,Math.min(i,255)).toString(16).padStart(2,"0")).join("")}`}let A;function a(){if(A)return A;A=[];for(let c=0;c{var i;return[s,(i=t.colors)==null?void 0:i[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]}))),r=Nt();return a.map(s=>r.parse(s[0]).map(i=>{let c,u;i.decorations.has("reverse")?(c=i.background?o.value(i.background):t.bg,u=i.foreground?o.value(i.foreground):t.fg):(c=i.foreground?o.value(i.foreground):t.fg,u=i.background?o.value(i.background):void 0),c=J(c,A),u=J(u,A),i.decorations.has("dim")&&(c=Lt(c));let p=P.None;return i.decorations.has("bold")&&(p|=P.Bold),i.decorations.has("italic")&&(p|=P.Italic),i.decorations.has("underline")&&(p|=P.Underline),{content:i.value,offset:s[1],color:c,bgColor:u,fontStyle:p}}))}function Lt(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const A=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${A}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(A=>`${A}${A}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}class D extends Error{constructor(e){super(e),this.name="ShikiError"}}class He{constructor(e,n,A){d(this,"_stack");d(this,"lang");d(this,"theme");this._stack=e,this.lang=n,this.theme=A}static initial(e,n){return new He(aA,e,n)}get scopes(){return Rt(this._stack)}toJSON(){return{lang:this.lang,theme:this.theme,scopes:this.scopes}}}function Rt(t){const e=[],n=new Set;function A(a){var r;if(n.has(a))return;n.add(a);const o=(r=a==null?void 0:a.nameScopesList)==null?void 0:r.scopeName;o&&e.push(o),a.parent&&A(a.parent)}return A(t),e}function $t(t){if(!(t instanceof He))throw new D("Invalid grammar state");return t._stack}function pn(t,e,n={}){const{lang:A="text",theme:a=t.getLoadedThemes()[0]}=n;if(un(A)||dn(a))return $e(e).map(i=>[{content:i[0],offset:i[1]}]);const{theme:o,colorMap:r}=t.setTheme(a);if(A==="ansi")return St(o,e,n);const s=t.getLanguage(A);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new D(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(n.grammarState.theme!==a)throw new D(`Grammar state theme "${n.grammarState.theme}" does not match highlight theme "${a}"`)}return Pt(e,s,o,r,n)}function Ht(t,e,n={}){const{lang:A="text",theme:a=t.getLoadedThemes()[0]}=n;if(un(A)||dn(a))throw new D("Plain language does not have grammar state");if(A==="ansi")throw new D("ANSI language does not have grammar state");const{theme:o,colorMap:r}=t.setTheme(a),s=t.getLanguage(A);return new He(gn(e,s,o,r,n).stateStack,s.name,o.name)}function Pt(t,e,n,A,a){return gn(t,e,n,A,a).tokens}function gn(t,e,n,A,a){const o=je(n,a),{tokenizeMaxLineLength:r=0,tokenizeTimeLimit:s=500}=a,i=$e(t);let c=a.grammarState?$t(a.grammarState):a.grammarContextCode!=null?gn(a.grammarContextCode,e,n,A,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:aA,u=[];const p=[];for(let g=0,b=i.length;g0&&f.length>=r){u=[],p.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}let h,w,y;a.includeExplanation&&(h=e.tokenizeLine(f,c),w=h.tokens,y=0);const C=e.tokenizeLine2(f,c,s),Q=C.tokens.length/2;for(let E=0;EWe.trim());break;case"object":ne=O.scope;break;default:continue}yn.push({settings:O,selectors:ne.map(We=>We.split(/ /))})}Ke.explanation=[];let kn=0;for(;_+kn({scopeName:e}))}function qt(t,e){const n=[];for(let A=0,a=e.length;A=0&&a>=0;)Gn(t[A],n[a])&&(A-=1),a-=1;return A===-1}function Ot(t,e,n){const A=[];for(const{selectors:a,settings:o}of t)for(const r of a)if(Yt(r,e,n)){A.push(o);break}return A}function uA(t,e,n){const A=Object.entries(n.themes).filter(r=>r[1]).map(r=>({color:r[0],theme:r[1]})),a=Tt(...A.map(r=>pn(t,e,{...n,theme:r.theme})));return a[0].map((r,s)=>r.map((i,c)=>{const u={content:i.content,variants:{},offset:i.offset};return"includeExplanation"in n&&n.includeExplanation&&(u.explanation=i.explanation),a.forEach((p,g)=>{const{content:b,explanation:f,offset:m,...h}=p[s][c];u.variants[A[g].color]=h}),u}))}function Tt(...t){const e=t.map(()=>[]),n=t.length;for(let A=0;Ai[A]),o=e.map(()=>[]);e.forEach((i,c)=>i.push(o[c]));const r=a.map(()=>0),s=a.map(i=>i[0]);for(;s.every(i=>i);){const i=Math.min(...s.map(c=>c.content.length));for(let c=0;cm[1]).map(m=>({color:m[0],theme:m[1]})).sort((m,h)=>m.color===i?-1:h.color===i?1:0);if(u.length===0)throw new D("`themes` option must not be empty");const p=uA(t,e,n);if(i&&!u.find(m=>m.color===i))throw new D(`\`themes\` option must contain the defaultColor key \`${i}\``);const g=u.map(m=>t.getTheme(m.theme)),b=u.map(m=>m.color);o=p.map(m=>m.map(h=>Kt(h,b,c,i)));const f=u.map(m=>je(m.theme,n));a=u.map((m,h)=>(h===0&&i?"":`${c+m.color}:`)+(J(g[h].fg,f[h])||"inherit")).join(";"),A=u.map((m,h)=>(h===0&&i?"":`${c+m.color}-bg:`)+(J(g[h].bg,f[h])||"inherit")).join(";"),r=`shiki-themes ${g.map(m=>m.name).join(" ")}`,s=i?void 0:[a,A].join(";")}else if("theme"in n){const i=je(n.theme,n);o=pn(t,e,n);const c=t.getTheme(n.theme);A=J(c.bg,i),a=J(c.fg,i),r=c.name}else throw new D("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:a,bg:A,themeName:r,rootStyle:s}}function Kt(t,e,n,A){const a={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(i=>sA(t.variants[i])),r=new Set(o.flatMap(i=>Object.keys(i))),s=o.reduce((i,c,u)=>{for(const p of r){const g=c[p]||"inherit";if(u===0&&A)i[p]=g;else{const b=p==="color"?"":p==="background-color"?"-bg":`-${p}`,f=n+e[u]+(p==="color"?"":b);i[p]?i[p]+=`;${f}:${g}`:i[p]=`${f}:${g}`}}return i},{});return a.htmlStyle=A?cA(s):Object.values(s).join(";"),a}function Wt(){const t=new WeakMap;function e(A){if(!t.has(A.meta)){let o=function(s){if(typeof s=="number"){if(s<0||s>A.source.length)throw new D(`Invalid decoration offset: ${s}. Code length: ${A.source.length}`);return{...a.indexToPos(s),offset:s}}else{const i=a.lines[s.line];if(i===void 0)throw new D(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${a.lines.length}`);if(s.character<0||s.character>i.length)throw new D(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${i.length}`);return{...s,offset:a.posToIndex(s.line,s.character)}}};const a=Ft(A.source),r=(A.options.decorations||[]).map(s=>({...s,start:o(s.start),end:o(s.end)}));n(r),t.set(A.meta,{decorations:r,converter:a,source:A.source})}return t.get(A.meta)}function n(A){for(let a=0;ao.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(o.start)} - ${JSON.stringify(o.end)}`);for(let r=a+1;r[i.start.offset,i.end.offset]);return xt(A,o)},code(A){var p;if(!((p=this.options.decorations)!=null&&p.length))return;const a=e(this),o=Array.from(A.children).filter(g=>g.type==="element"&&g.tagName==="span");if(o.length!==a.converter.lines.length)throw new D(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function r(g,b,f,m){const h=o[g];let w="",y=-1,C=-1;function Q(_){return _.type==="text"?_.value:_.type==="element"?_.children.map(Q).join(""):""}if(b===0&&(y=0),f===0&&(C=0),f===Number.POSITIVE_INFINITY&&(C=h.children.length),y===-1||C===-1)for(let _=0;_y);return g.tagName=b.tagName||"span",g.properties={...g.properties,...m,class:g.properties.class},(w=b.properties)!=null&&w.class&&iA(g,b.properties.class),g=h(g,f)||g,g}const c=[],u=a.decorations.sort((g,b)=>b.start.offset-g.start.offset);for(const g of u){const{start:b,end:f}=g;if(b.line===f.line)r(b.line,b.character,f.character,g);else if(b.lines(m,g));r(f.line,0,f.character,g)}}c.forEach(g=>g())}}}const Jt=[Wt()];function Se(t){return[...t.transformers||[],...Jt]}function Le(t,e,n,A={meta:{},options:n,codeToHast:(a,o)=>Le(t,a,o),codeToTokens:(a,o)=>Ge(t,a,o)}){var g,b;let a=e;for(const f of Se(n))a=((g=f.preprocess)==null?void 0:g.call(A,a,n))||a;let{tokens:o,fg:r,bg:s,themeName:i,rootStyle:c}=Ge(t,a,n);const{mergeWhitespaces:u=!0}=n;u===!0?o=Zt(o):u==="never"&&(o=Vt(o));const p={...A,get source(){return a}};for(const f of Se(n))o=((b=f.tokens)==null?void 0:b.call(p,o))||o;return zt(o,{...n,fg:r,bg:s,themeName:i,rootStyle:c},p)}function zt(t,e,n){var g,b,f;const A=Se(e),a=[],o={type:"root",children:[]},{structure:r="classic"}=e;let s={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,tabindex:"0",...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([m])=>!m.startsWith("_")))},children:[]},i={type:"element",tagName:"code",properties:{},children:a};const c=[],u={...n,structure:r,addClassToHast:iA,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return s},get code(){return i},get lines(){return c}};if(t.forEach((m,h)=>{var C,Q;h&&(r==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):r==="classic"&&a.push({type:"text",value:` `}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const E of m){let _={type:"element",tagName:"span",properties:{},children:[{type:"text",value:E.content}]};const R=E.htmlStyle||cA(sA(E));R&&(_.properties.style=R);for(const Y of A)_=((C=Y==null?void 0:Y.span)==null?void 0:C.call(u,_,h+1,y,w))||_;r==="inline"?o.children.push(_):r==="classic"&&w.children.push(_),y+=E.content.length}if(r==="classic"){for(const E of A)w=((Q=E==null?void 0:E.line)==null?void 0:Q.call(u,w,h+1))||w;c.push(w),a.push(w)}}),r==="classic"){for(const m of A)i=((g=m==null?void 0:m.code)==null?void 0:g.call(u,i))||i;s.children.push(i);for(const m of A)s=((b=m==null?void 0:m.pre)==null?void 0:b.call(u,s))||s;o.children.push(s)}let p=o;for(const m of A)p=((f=m==null?void 0:m.root)==null?void 0:f.call(u,p))||p;return p}function Zt(t){return t.map(e=>{const n=[];let A="",a=0;return e.forEach((o,r)=>{const i=!(o.fontStyle&&o.fontStyle&P.Underline);i&&o.content.match(/^\s+$/)&&e[r+1]?(a||(a=o.offset),A+=o.content):A?(i?n.push({...o,offset:a,content:A+o.content}):n.push({content:A,offset:a},o),a=0,A=""):n.push(o)}),n})}function Vt(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const A=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!A)return n;const[,a,o,r]=A;if(!a&&!r)return n;const s=[{...n,offset:n.offset+a.length,content:o}];return a&&s.unshift({content:a,offset:n.offset}),r&&s.push({content:r,offset:n.offset+a.length+o.length}),s}))}const Xt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Be{constructor(e,n,A){this.property=e,this.normal=n,A&&(this.space=A)}}Be.prototype.property={};Be.prototype.normal={};Be.prototype.space=null;function dA(t,e){const n={},A={};let a=-1;for(;++a4&&n.slice(0,4)==="data"&&aa.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Ln,sa);A="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Ln.test(o)){let r=o.replace(oa,ia);r.charAt(0)!=="-"&&(r="-"+r),e="data"+r}}a=ln}return new a(A,e)}function ia(t){return"-"+t.toLowerCase()}function sa(t){return t.charAt(1).toUpperCase()}const ca=dA([lA,gA,bA,BA,Aa],"html"),hA=dA([lA,gA,bA,BA,ta],"svg"),Rn={}.hasOwnProperty;function ua(t,e){const n=e||{};function A(a,...o){let r=A.invalid;const s=A.handlers;if(a&&Rn.call(a,t)){const i=String(a[t]);r=Rn.call(s,i)?s[i]:A.unknown}if(r)return r.call(this,a,...o)}return A.handlers=n.handlers||{},A.invalid=n.invalid,A.unknown=n.unknown,A}function da(t,e){if(t=t.replace(e.subset?pa(e.subset):/["&'<>`]/g,A),e.subset||e.escapeOnly)return t;return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,A);function n(a,o,r){return e.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,r.charCodeAt(o+2),e)}function A(a,o,r){return e.format(a.charCodeAt(0),r.charCodeAt(o+1),e)}}function pa(t){const e=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},fa=["cent","copy","divide","gt","lt","not","para","times"],CA={}.hasOwnProperty,sn={};let ke;for(ke in Xe)CA.call(Xe,ke)&&(sn[Xe[ke]]=ke);function ba(t,e,n,A){const a=String.fromCharCode(t);if(CA.call(sn,a)){const o=sn[a],r="&"+o;return n&&ma.includes(o)&&!fa.includes(o)&&(!A||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?r:r+";"}return""}function Ba(t,e,n){let A=ga(t,e,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=ba(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const o=la(t,e,n.omitOptionalSemicolons);o.length|^->||--!>|"],Ea=["<",">"];function Qa(t,e,n,A){return A.settings.bogusComments?"":"";function a(o){return ae(o,Object.assign({},A.settings.characterReferences,{subset:Ea}))}}function wa(t,e,n,A){return""}function $n(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let A=0,a=n.indexOf(e);for(;a!==-1;)A++,a=n.indexOf(e,a+e.length);return A}function ya(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ka(t){return t.join(" ").trim()}const _a=/[ \t\n\f\r]/g;function mn(t){return typeof t=="object"?t.type==="text"?Hn(t.value):!1:Hn(t)}function Hn(t){return t.replace(_a,"")===""}const v=QA(1),EA=QA(-1),Ia=[];function QA(t){return e;function e(n,A,a){const o=n?n.children:Ia;let r=(A||0)+t,s=o[r];if(!a)for(;s&&mn(s);)r+=t,s=o[r];return s}}const Da={}.hasOwnProperty;function wA(t){return e;function e(n,A,a){return Da.call(t,n.tagName)&&t[n.tagName](n,A,a)}}const fn=wA({body:Fa,caption:en,colgroup:en,dd:ja,dt:Na,head:en,html:xa,li:Ma,optgroup:Ga,option:Sa,p:va,rp:Pn,rt:Pn,tbody:Ra,td:Un,tfoot:$a,th:Un,thead:La,tr:Ha});function en(t,e,n){const A=v(n,e,!0);return!A||A.type!=="comment"&&!(A.type==="text"&&mn(A.value.charAt(0)))}function xa(t,e,n){const A=v(n,e);return!A||A.type!=="comment"}function Fa(t,e,n){const A=v(n,e);return!A||A.type!=="comment"}function va(t,e,n){const A=v(n,e);return A?A.type==="element"&&(A.tagName==="address"||A.tagName==="article"||A.tagName==="aside"||A.tagName==="blockquote"||A.tagName==="details"||A.tagName==="div"||A.tagName==="dl"||A.tagName==="fieldset"||A.tagName==="figcaption"||A.tagName==="figure"||A.tagName==="footer"||A.tagName==="form"||A.tagName==="h1"||A.tagName==="h2"||A.tagName==="h3"||A.tagName==="h4"||A.tagName==="h5"||A.tagName==="h6"||A.tagName==="header"||A.tagName==="hgroup"||A.tagName==="hr"||A.tagName==="main"||A.tagName==="menu"||A.tagName==="nav"||A.tagName==="ol"||A.tagName==="p"||A.tagName==="pre"||A.tagName==="section"||A.tagName==="table"||A.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Ma(t,e,n){const A=v(n,e);return!A||A.type==="element"&&A.tagName==="li"}function Na(t,e,n){const A=v(n,e);return!!(A&&A.type==="element"&&(A.tagName==="dt"||A.tagName==="dd"))}function ja(t,e,n){const A=v(n,e);return!A||A.type==="element"&&(A.tagName==="dt"||A.tagName==="dd")}function Pn(t,e,n){const A=v(n,e);return!A||A.type==="element"&&(A.tagName==="rp"||A.tagName==="rt")}function Ga(t,e,n){const A=v(n,e);return!A||A.type==="element"&&A.tagName==="optgroup"}function Sa(t,e,n){const A=v(n,e);return!A||A.type==="element"&&(A.tagName==="option"||A.tagName==="optgroup")}function La(t,e,n){const A=v(n,e);return!!(A&&A.type==="element"&&(A.tagName==="tbody"||A.tagName==="tfoot"))}function Ra(t,e,n){const A=v(n,e);return!A||A.type==="element"&&(A.tagName==="tbody"||A.tagName==="tfoot")}function $a(t,e,n){return!v(n,e)}function Ha(t,e,n){const A=v(n,e);return!A||A.type==="element"&&A.tagName==="tr"}function Un(t,e,n){const A=v(n,e);return!A||A.type==="element"&&(A.tagName==="td"||A.tagName==="th")}const Pa=wA({body:Ya,colgroup:Oa,head:qa,html:Ua,tbody:Ta});function Ua(t){const e=v(t,-1);return!e||e.type!=="comment"}function qa(t){const e=t.children,n=[];let A=-1;for(;++A0}function Ya(t){const e=v(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&mn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Oa(t,e,n){const A=EA(n,e),a=v(t,-1,!0);return n&&A&&A.type==="element"&&A.tagName==="colgroup"&&fn(A,n.children.indexOf(A),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function Ta(t,e,n){const A=EA(n,e),a=v(t,-1);return n&&A&&A.type==="element"&&(A.tagName==="thead"||A.tagName==="tbody")&&fn(A,n.children.indexOf(A),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const _e={name:[[` @@ -7864,4 +7864,4 @@ Z (?:[-a-zA-Z0-9_] | [^\\x00-\\x7F] |\\\\(?:[0-9a-fA-F]{1,6}|.) )*`,name:"variable.css"},{begin:"(?]*>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"support.class.component.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"support.class.component.html"},5:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(<)([a-z][a-zA-Z0-9:-]*)(?=[^>]*>)",beginCaptures:{1:{name:"punctuation.definition.tag.begin.html"},2:{name:"entity.name.tag.html"}},end:"(>)(<)(/)(\\2)(>)",endCaptures:{1:{name:"punctuation.definition.tag.end.html"},2:{name:"punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"},3:{name:"punctuation.definition.tag.begin.html"},4:{name:"entity.name.tag.html"},5:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"(<\\?)(xml)",captures:{1:{name:"punctuation.definition.tag.html"},2:{name:"entity.name.tag.xml.html"}},end:"(\\?>)",name:"meta.tag.preprocessor.xml.html",patterns:[{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"}]},{begin:"",name:"comment.block.html"},{begin:"",name:"meta.tag.sgml.html",patterns:[{begin:"(?i:DOCTYPE)",captures:{1:{name:"entity.name.tag.doctype.html"}},end:"(?=>)",name:"meta.tag.sgml.doctype.html",patterns:[{match:'"[^">]*"',name:"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{begin:"\\[CDATA\\[",end:"]](?=>)",name:"constant.other.inline-data.html"},{match:"(\\s*)(?!--|>)\\S(\\s*)",name:"invalid.illegal.bad-comments-or-CDATA.html"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.structure.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.block.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.inline.any.html",patterns:[{include:"#tag-stuff"}]},{begin:"()",endCaptures:{1:{name:"punctuation.definition.tag.end.html"}},name:"meta.tag.other.html",patterns:[{include:"#tag-stuff"}]},{include:"#entities"},{match:"<>",name:"invalid.illegal.incomplete.html"},{match:"<",name:"invalid.illegal.bad-angle-bracket.html"}],repository:{entities:{patterns:[{captures:{1:{name:"punctuation.definition.entity.html"},3:{name:"punctuation.definition.entity.html"}},match:"(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",name:"constant.character.entity.html"},{match:"&",name:"invalid.illegal.bad-ampersand.html"}]},"string-double-quoted":{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.double.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"string-single-quoted":{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.single.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},"tag-generic-attribute":{match:"(?<=[^=])\\b([a-zA-Z0-9:\\-_]+)",name:"entity.other.attribute-name.html"},"tag-id-attribute":{begin:"\\b(id)\\b\\s*(=)",captures:{1:{name:"entity.other.attribute-name.id.html"},2:{name:"punctuation.separator.key-value.html"}},end:`(?!\\G)(?<='|"|[^\\s<>/])`,name:"meta.attribute-with-value.id.html",patterns:[{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},contentName:"meta.toc-list.id.html",end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.double.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},contentName:"meta.toc-list.id.html",end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"string.quoted.single.html",patterns:[{include:"source.vue#vue-interpolations"},{include:"#entities"}]},{captures:{0:{name:"meta.toc-list.id.html"}},match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`,name:"string.unquoted.html"}]},"tag-stuff":{patterns:[{include:"#vue-directives"},{include:"#tag-id-attribute"},{include:"#tag-generic-attribute"},{include:"#string-double-quoted"},{include:"#string-single-quoted"},{include:"#unquoted-attribute"}]},"unquoted-attribute":{match:`(?<==)(?:[^\\s<>/'"]|/(?!>))+`,name:"string.unquoted.html"},"vue-directives":{begin:"(?:\\b(v-)|(:|@|#))([a-zA-Z0-9\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",captures:{1:{name:"entity.other.attribute-name.html"},2:{name:"punctuation.separator.key-value.html"},3:{name:"entity.other.attribute-name.html"},4:{name:"entity.other.attribute-name.html"},5:{name:"entity.other.attribute-name.html"},6:{name:"punctuation.separator.key-value.html"}},end:"(?<='|\")|(?=[\\s<>`])",name:"meta.directive.vue",patterns:[{begin:"`",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"`",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]},{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]},{begin:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin.html"}},end:"'",endCaptures:{0:{name:"punctuation.definition.string.end.html"}},name:"source.directive.vue",patterns:[{include:"source.js#expression"}]}]}},scopeName:"text.html.vue-html",embeddedLangs:["vue","javascript"]});var yu=[...$A,...x,wu];const ku=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),_u=Object.freeze({displayName:"WebAssembly",name:"wasm",patterns:[{include:"#comments"},{include:"#strings"},{include:"#instructions"},{include:"#types"},{include:"#modules"},{include:"#constants"},{include:"#invalid"}],repository:{comments:{patterns:[{captures:{1:{name:"punctuation.definition.comment.wat"}},comment:"Line comment",match:"(;;).*$",name:"comment.line.wat"},{begin:"\\(;",beginCaptures:{0:{name:"punctuation.definition.comment.wat"}},comment:"Block comment",end:";\\)",endCaptures:{0:{name:"punctuation.definition.comment.wat"}},name:"comment.block.wat"}]},constants:{patterns:[{comment:"Fixed-width SIMD",patterns:[{captures:{1:{name:"support.type.wat"}},comment:"Vector literal (i8x16) [simd]",match:"\\b(i8x16)(?:\\s+0x[0-9a-fA-F]{1,2}){16}\\b",name:"constant.numeric.vector.wat"},{captures:{1:{name:"support.type.wat"}},comment:"Vector literal (i16x8) [simd]",match:"\\b(i16x8)(?:\\s+0x[0-9a-fA-F]{1,4}){8}\\b",name:"constant.numeric.vector.wat"},{captures:{1:{name:"support.type.wat"}},comment:"Vector literal (i32x4) [simd]",match:"\\b(i32x4)(?:\\s+0x[0-9a-fA-F]{1,8}){4}\\b",name:"constant.numeric.vector.wat"},{captures:{1:{name:"support.type.wat"}},comment:"Vector literal (i64x2) [simd]",match:"\\b(i64x2)(?:\\s+0x[0-9a-fA-F]{1,16}){2}\\b",name:"constant.numeric.vector.wat"}]},{comment:"MVP",patterns:[{comment:"Floating point literal",match:"[+-]?\\b[0-9][0-9]*(?:\\.[0-9][0-9]*)?(?:[eE][+-]?[0-9]+)?\\b",name:"constant.numeric.float.wat"},{comment:"Floating point hexadecimal literal",match:"[+-]?\\b0x([0-9a-fA-F]*\\.[0-9a-fA-F]+|[0-9a-fA-F]+\\.?)[Pp][+-]?[0-9]+\\b",name:"constant.numeric.float.wat"},{comment:"Floating point infinity",match:"[+-]?\\binf\\b",name:"constant.numeric.float.wat"},{comment:"Floating point literal (NaN)",match:"[+-]?\\bnan:0x[0-9a-fA-F][0-9a-fA-F]*\\b",name:"constant.numeric.float.wat"},{comment:"Integer literal",match:"[+-]?\\b(?:0x[0-9a-fA-F][0-9a-fA-F]*|\\d[\\d]*)\\b",name:"constant.numeric.integer.wat"}]}]},instructions:{patterns:[{comment:"Non-trapping float-to-int conversions",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Conversion instruction [nontrapping-float-to-int-conversions]",match:"\\b(i32|i64)\\.trunc_sat_f(?:32|64)_[su]\\b",name:"keyword.operator.word.wat"}]},{comment:"Sign-extension operators",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Numeric instruction (i32) [sign-extension-ops]",match:"\\b(i32)\\.(?:extend(?:8|16)_s)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Numeric instruction (i64) [sign-extension-ops]",match:"\\b(i64)\\.(?:extend(?:8|16|32)_s)\\b",name:"keyword.operator.word.wat"}]},{comment:"Bulk memory operations",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Memory instruction [bulk-memory-operations]",match:"\\b(memory)\\.(?:copy|fill|init|drop)\\b",name:"keyword.operator.word.wat"}]},{comment:"Fixed-width SIMD",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (v128) [simd]",match:"\\b(v128)\\.(?:const|and|or|xor|not|andnot|bitselect|load|store)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (i8x16) [simd]",match:"\\b(i8x16)\\.(?:shuffle|swizzle|splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane_[su]|add_saturate_[su]|sub_saturate_[su]|avgr_u|narrow_i16x8_[su])\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (i16x8) [simd]",match:"\\b(i16x8)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane_[su]|add_saturate_[su]|sub_saturate_[su]|avgr_u|load8x8_[su]|narrow_i32x4_[su]|widen_(low|high)_i8x16_[su])\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (i32x4) [simd]",match:"\\b(i32x4)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|eq|ne|lt_[su]|le_[su]|gt_[su]|ge_[su]|min_[su]|max_[su]|any_true|all_true|extract_lane|load16x4_[su]|trunc_sat_f32x4_[su]|widen_(low|high)_i16x8_[su])\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (i64x2) [simd]",match:"\\b(i64x2)\\.(?:splat|replace_lane|add|sub|mul|neg|shl|shr_[su]|extract_lane|load32x2_[su])\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (f32x4) [simd]",match:"\\b(f32x4)\\.(?:splat|replace_lane|add|sub|mul|neg|extract_lane|eq|ne|lt|le|gt|ge|abs|min|max|div|sqrt|convert_i32x4_[su])\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (f64x2) [simd]",match:"\\b(f64x2)\\.(?:splat|replace_lane|add|sub|mul|neg|extract_lane|eq|ne|lt|le|gt|ge|abs|min|max|div|sqrt)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (v8x16) [simd]",match:"\\b(v8x16)\\.(?:load_splat|shuffle|swizzle)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (v16x8) [simd]",match:"\\b(v16x8)\\.load_splat\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (v32x4) [simd]",match:"\\b(v32x4)\\.load_splat\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Vector instruction (v64x2) [simd]",match:"\\b(v64x2)\\.load_splat\\b",name:"keyword.operator.word.wat"}]},{comment:"Threads",patterns:[{captures:{1:{name:"support.class.wat"},2:{name:"support.class.wat"},3:{name:"support.class.wat"},4:{name:"support.class.wat"}},comment:"Atomic instruction (i32) [threads]",match:"\\b(i32)\\.(atomic)\\.(?:load(?:8_u|16_u)?|store(?:8|16)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"},2:{name:"support.class.wat"},3:{name:"support.class.wat"},4:{name:"support.class.wat"}},comment:"Atomic instruction (i64) [threads]",match:"\\b(i64)\\.(atomic)\\.(?:load(?:8_u|16_u|32_u)?|store(?:8|16|32)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16|rmw32)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Atomic instruction [threads]",match:"\\b(atomic)\\.(?:notify|fence)\\b",name:"keyword.operator.word.wat"},{comment:"Shared modifier [threads]",match:"\\bshared\\b",name:"storage.modifier.wat"}]},{comment:"Reference types",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Reference instruction [reference-types]",match:"\\b(ref)\\.(?:null|is_null|func|extern)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Table instruction [reference-types]",match:"\\b(table)\\.(?:get|size|grow|fill|init|copy)\\b",name:"keyword.operator.word.wat"},{comment:"Type name [reference-types]",match:"\\b(?:externref|funcref|nullref)\\b",name:"entity.name.type.wat"}]},{comment:"Tail Call",patterns:[{comment:"Control instruction [tail-call]",match:"\\breturn_call(?:_indirect)?\\b",name:"keyword.control.wat"}]},{comment:"Exception handling",patterns:[{comment:"Control instruction [exception-handling]",match:"\\b(?:try|catch|throw|rethrow|br_on_exn)\\b",name:"keyword.control.wat"},{comment:"Module element [exception-handling]",match:"(?<=\\()event\\b",name:"storage.type.wat"}]},{comment:"Binaryen extensions",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Pseudo stack instruction [binaryen]",match:"\\b(i32|i64|f32|f64|externref|funcref|nullref|exnref)\\.(?:push|pop)\\b",name:"keyword.operator.word.wat"}]},{comment:"MVP",patterns:[{captures:{1:{name:"support.class.type.wat"}},comment:"Memory instruction (i32) [mvp]",match:"\\b(i32)\\.(?:load|load(?:8|16)(?:_[su])?|store(?:8|16)?)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Memory instruction (i64) [mvp]",match:"\\b(i64)\\.(?:load|load(?:8|16|32)(?:_[su])?|store(?:8|16|32)?)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Memory instruction (f32/f64) [mvp]",match:"\\b(f32|f64)\\.(?:load|store)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.memory.wat"}},comment:"Memory instruction [mvp]",match:"\\b(memory)\\.(?:size|grow)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"entity.other.attribute-name.wat"}},comment:"Memory instruction attribute [mvp]",match:"\\b(offset|align)=\\b"},{captures:{1:{name:"support.class.local.wat"}},comment:"Variable instruction (local) [mvp]",match:"\\b(local)\\.(?:get|set|tee)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.global.wat"}},comment:"Variable instruction (global) [mvp]",match:"\\b(global)\\.(?:get|set)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Numeric instruction (i32/i64) [mvp]",match:"\\b(i32|i64)\\.(const|eqz|eq|ne|lt_[su]|gt_[su]|le_[su]|ge_[su]|clz|ctz|popcnt|add|sub|mul|div_[su]|rem_[su]|and|or|xor|shl|shr_[su]|rotl|rotr)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Numeric instruction (f32/f64) [mvp]",match:"\\b(f32|f64)\\.(const|eq|ne|lt|gt|le|ge|abs|neg|ceil|floor|trunc|nearest|sqrt|add|sub|mul|div|min|max|copysign)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Conversion instruction (i32) [mvp]",match:"\\b(i32)\\.(wrap_i64|trunc_(f32|f64)_[su]|reinterpret_f32)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Conversion instruction (i64) [mvp]",match:"\\b(i64)\\.(extend_i32_[su]|trunc_f(32|64)_[su]|reinterpret_f64)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Conversion instruction (f32) [mvp]",match:"\\b(f32)\\.(convert_i(32|64)_[su]|demote_f64|reinterpret_i32)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.type.wat"}},comment:"Conversion instruction (f64) [mvp]",match:"\\b(f64)\\.(convert_i(32|64)_[su]|promote_f32|reinterpret_i64)\\b",name:"keyword.operator.word.wat"},{comment:"Control instruction [mvp]",match:"\\b(?:unreachable|nop|block|loop|if|then|else|end|br|br_if|br_table|return|call|call_indirect)\\b",name:"keyword.control.wat"},{comment:"Parametric instruction [mvp]",match:"\\b(?:drop|select)\\b",name:"keyword.operator.word.wat"}]},{comment:"GC Instructions",patterns:[{captures:{1:{name:"support.class.wat"}},comment:"Reference Instructions [GC]",match:"\\b(ref)\\.(?:eq|test|cast)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Struct Instructions [GC]",match:"\\b(struct)\\.(?:new_canon|new_canon_default|get|get_s|get_u|set)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Array Instructions [GC]",match:"\\b(array)\\.(?:new_canon|new_canon_default|get|get_s|get_u|set|len|new_canon_fixed|new_canon_data|new_canon_elem)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"i31 Instructions [GC]",match:"\\b(i31)\\.(?:new|get_s|get_u)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Branch Instructions [GC]",match:"\\b(?:br_on_non_null|br_on_cast|br_on_cast_fail)\\b",name:"keyword.operator.word.wat"},{captures:{1:{name:"support.class.wat"}},comment:"Reference Instructions [GC]",match:"\\b(extern)\\.(?:internalize|externalize)\\b",name:"keyword.operator.word.wat"}]}]},invalid:{patterns:[{match:"[^\\s()]+",name:"invalid.wat"}]},modules:{patterns:[{comment:"Bulk memory operations",patterns:[{captures:{1:{name:"storage.modifier.wat"}},comment:"Passive modifier [bulk-memory-operations]",match:"(?<=\\(data)\\s+(passive)\\b"}]},{comment:"MVP",patterns:[{comment:"Module element [mvp]",match:"(?<=\\()(?:module|import|export|memory|data|table|elem|start|func|type|param|result|global|local)\\b",name:"storage.type.wat"},{captures:{1:{name:"storage.modifier.wat"}},comment:"Mutable global modifier [mvp]",match:"(?<=\\()\\s*(mut)\\b",name:"storage.modifier.wat"},{captures:{1:{name:"entity.name.function.wat"}},comment:"Function name [mvp]",match:"(?<=\\(func|\\(start|call|return_call|ref\\.func)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)"},{begin:"\\)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)",beginCaptures:{1:{name:"entity.name.function.wat"}},comment:"Function name(s) (elem) [mvp]",end:"\\)",patterns:[{match:"(?<=\\s)\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*",name:"entity.name.function.wat"}]},{captures:{1:{name:"support.type.function.wat"}},comment:"Function type [mvp]",match:"(?<=\\(type)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)"},{comment:"Variable name or branch label [mvp]",match:"\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*\\b",name:"variable.other.wat"}]}]},strings:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},comment:"String literal",end:'"',endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double.wat",patterns:[{match:`\\\\(n|t|\\\\|'|"|[0-9a-fA-F]{2})`,name:"constant.character.escape.wat"}]},types:{patterns:[{comment:"Fixed-width SIMD",patterns:[{comment:"Type name [simd]",match:"\\bv128\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"Reference types",patterns:[{comment:"Type name [reference-types]",match:"\\b(?:externref|funcref|nullref)\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"Exception handling",patterns:[{comment:"Type name [exception-handling]",match:"\\bexnref\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"MVP",patterns:[{comment:"Type name [mvp]",match:"\\b(?:i32|i64|f32|f64)\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"GC Types",patterns:[{comment:"Type name [GC]",match:"\\b(?:i8|i16|ref|funcref|externref|anyref|eqref|i31ref|nullfuncref|nullexternref|structref|arrayref|nullref)\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"GC Heap Types",patterns:[{comment:"Type name [GC]",match:"\\b(?:type|func|extern|any|eq|nofunc|noextern|struct|array|none)\\b(?!\\.)",name:"entity.name.type.wat"}]},{comment:"GC Structured and sub Types",patterns:[{comment:"Type name [GC]",match:"\\b(?:struct|array|sub|final|rec|field|mut)\\b(?!\\.)",name:"entity.name.type.wat"}]}]}},scopeName:"source.wat"});var Iu=[_u];const Du=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),xu=Object.freeze({displayName:"WGSL",name:"wgsl",patterns:[{include:"#line_comments"},{include:"#block_comments"},{include:"#keywords"},{include:"#attributes"},{include:"#functions"},{include:"#function_calls"},{include:"#constants"},{include:"#types"},{include:"#variables"},{include:"#punctuation"}],repository:{attributes:{patterns:[{captures:{1:{name:"keyword.operator.attribute.at"},2:{name:"entity.name.attribute.wgsl"}},comment:"attribute declaration",match:"(@)([A-Za-z_]+)",name:"meta.attribute.wgsl"}]},block_comments:{patterns:[{comment:"empty block comments",match:"/\\*\\*/",name:"comment.block.wgsl"},{begin:"/\\*\\*",comment:"block documentation comments",end:"\\*/",name:"comment.block.documentation.wgsl",patterns:[{include:"#block_comments"}]},{begin:"/\\*(?!\\*)",comment:"block comments",end:"\\*/",name:"comment.block.wgsl",patterns:[{include:"#block_comments"}]}]},constants:{patterns:[{comment:"decimal float literal",match:"(-?\\b[0-9][0-9]*\\.[0-9][0-9]*)([eE][+-]?[0-9]+)?\\b",name:"constant.numeric.float.wgsl"},{comment:"int literal",match:"-?\\b0x[0-9a-fA-F]+\\b|\\b0\\b|-?\\b[1-9][0-9]*\\b",name:"constant.numeric.decimal.wgsl"},{comment:"uint literal",match:"\\b0x[0-9a-fA-F]+u\\b|\\b0u\\b|\\b[1-9][0-9]*u\\b",name:"constant.numeric.decimal.wgsl"},{comment:"boolean constant",match:"\\b(true|false)\\b",name:"constant.language.boolean.wgsl"}]},function_calls:{patterns:[{begin:"([A-Za-z0-9_]+)(\\()",beginCaptures:{1:{name:"entity.name.function.wgsl"},2:{name:"punctuation.brackets.round.wgsl"}},comment:"function/method calls",end:"\\)",endCaptures:{0:{name:"punctuation.brackets.round.wgsl"}},name:"meta.function.call.wgsl",patterns:[{include:"#line_comments"},{include:"#block_comments"},{include:"#keywords"},{include:"#attributes"},{include:"#function_calls"},{include:"#constants"},{include:"#types"},{include:"#variables"},{include:"#punctuation"}]}]},functions:{patterns:[{begin:"\\b(fn)\\s+([A-Za-z0-9_]+)((\\()|(<))",beginCaptures:{1:{name:"keyword.other.fn.wgsl"},2:{name:"entity.name.function.wgsl"},4:{name:"punctuation.brackets.round.wgsl"}},comment:"function definition",end:"\\{",endCaptures:{0:{name:"punctuation.brackets.curly.wgsl"}},name:"meta.function.definition.wgsl",patterns:[{include:"#line_comments"},{include:"#block_comments"},{include:"#keywords"},{include:"#attributes"},{include:"#function_calls"},{include:"#constants"},{include:"#types"},{include:"#variables"},{include:"#punctuation"}]}]},keywords:{patterns:[{comment:"other keywords",match:"\\b(bitcast|block|break|case|continue|continuing|default|discard|else|elseif|enable|fallthrough|for|function|if|loop|private|read|read_write|return|storage|switch|uniform|while|workgroup|write)\\b",name:"keyword.control.wgsl"},{comment:"reserved keywords",match:"\\b(asm|const|do|enum|handle|mat|premerge|regardless|typedef|unless|using|vec|void)\\b",name:"keyword.control.wgsl"},{comment:"storage keywords",match:"\\b(let|var)\\b",name:"keyword.other.wgsl storage.type.wgsl"},{comment:"type keyword",match:"\\b(type)\\b",name:"keyword.declaration.type.wgsl storage.type.wgsl"},{comment:"enum keyword",match:"\\b(enum)\\b",name:"keyword.declaration.enum.wgsl storage.type.wgsl"},{comment:"struct keyword",match:"\\b(struct)\\b",name:"keyword.declaration.struct.wgsl storage.type.wgsl"},{comment:"fn",match:"\\bfn\\b",name:"keyword.other.fn.wgsl"},{comment:"logical operators",match:"(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)",name:"keyword.operator.logical.wgsl"},{comment:"logical AND, borrow references",match:"&(?![&=])",name:"keyword.operator.borrow.and.wgsl"},{comment:"assignment operators",match:"(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)",name:"keyword.operator.assignment.wgsl"},{comment:"single equal",match:"(?])=(?!=|>)",name:"keyword.operator.assignment.equal.wgsl"},{comment:"comparison operators",match:"(=(=)?(?!>)|!=|<=|(?=)",name:"keyword.operator.comparison.wgsl"},{comment:"math operators",match:"(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))",name:"keyword.operator.math.wgsl"},{comment:"dot access",match:"\\.(?!\\.)",name:"keyword.operator.access.dot.wgsl"},{comment:"dashrocket, skinny arrow",match:"->",name:"keyword.operator.arrow.skinny.wgsl"}]},line_comments:{comment:"single line comment",match:"\\s*//.*",name:"comment.line.double-slash.wgsl"},punctuation:{patterns:[{comment:"comma",match:",",name:"punctuation.comma.wgsl"},{comment:"curly braces",match:"[{}]",name:"punctuation.brackets.curly.wgsl"},{comment:"parentheses, round brackets",match:"[()]",name:"punctuation.brackets.round.wgsl"},{comment:"semicolon",match:";",name:"punctuation.semi.wgsl"},{comment:"square brackets",match:"[\\[\\]]",name:"punctuation.brackets.square.wgsl"},{comment:"angle brackets",match:"(?]",name:"punctuation.brackets.angle.wgsl"}]},types:{comment:"types",name:"storage.type.wgsl",patterns:[{comment:"scalar Types",match:"\\b(bool|i32|u32|f32)\\b",name:"storage.type.wgsl"},{comment:"reserved scalar Types",match:"\\b(i64|u64|f64)\\b",name:"storage.type.wgsl"},{comment:"vector type aliasses",match:"\\b(vec2i|vec3i|vec4i|vec2u|vec3u|vec4u|vec2f|vec3f|vec4f|vec2h|vec3h|vec4h)\\b",name:"storage.type.wgsl"},{comment:"matrix type aliasses",match:"\\b(mat2x2f|mat2x3f|mat2x4f|mat3x2f|mat3x3f|mat3x4f|mat4x2f|mat4x3f|mat4x4f|mat2x2h|mat2x3h|mat2x4h|mat3x2h|mat3x3h|mat3x4h|mat4x2h|mat4x3h|mat4x4h)\\b",name:"storage.type.wgsl"},{comment:"vector/matrix types",match:"\\b(vec[2-4]|mat[2-4]x[2-4])\\b",name:"storage.type.wgsl"},{comment:"atomic types",match:"\\b(atomic)\\b",name:"storage.type.wgsl"},{comment:"array types",match:"\\b(array)\\b",name:"storage.type.wgsl"},{comment:"Custom type",match:"\\b([A-Z][A-Za-z0-9]*)\\b",name:"entity.name.type.wgsl"}]},variables:{patterns:[{comment:"variables",match:"\\b(? {\n return import('shiki/wasm').then((wasm) => wasm.default(info));\n};\n\nexport { getWasmInlined as g };\n","var FontStyle;\n(function (FontStyle) {\n FontStyle[FontStyle[\"NotSet\"] = -1] = \"NotSet\";\n FontStyle[FontStyle[\"None\"] = 0] = \"None\";\n FontStyle[FontStyle[\"Italic\"] = 1] = \"Italic\";\n FontStyle[FontStyle[\"Bold\"] = 2] = \"Bold\";\n FontStyle[FontStyle[\"Underline\"] = 4] = \"Underline\";\n})(FontStyle || (FontStyle = {}));\n\nexport { FontStyle };\n","import { FontStyle } from './types.mjs';\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\n({\n InDebugMode: (typeof process !== 'undefined' && !!process.env['VSCODE_TEXTMATE_DEBUG'])\n});\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nvar EncodedTokenAttributes;\n(function (EncodedTokenAttributes) {\n function toBinaryStr(encodedTokenAttributes) {\n return encodedTokenAttributes.toString(2).padStart(32, \"0\");\n }\n EncodedTokenAttributes.toBinaryStr = toBinaryStr;\n function print(encodedTokenAttributes) {\n const languageId = EncodedTokenAttributes.getLanguageId(encodedTokenAttributes);\n const tokenType = EncodedTokenAttributes.getTokenType(encodedTokenAttributes);\n const fontStyle = EncodedTokenAttributes.getFontStyle(encodedTokenAttributes);\n const foreground = EncodedTokenAttributes.getForeground(encodedTokenAttributes);\n const background = EncodedTokenAttributes.getBackground(encodedTokenAttributes);\n console.log({\n languageId: languageId,\n tokenType: tokenType,\n fontStyle: fontStyle,\n foreground: foreground,\n background: background,\n });\n }\n EncodedTokenAttributes.print = print;\n function getLanguageId(encodedTokenAttributes) {\n return ((encodedTokenAttributes & 255 /* EncodedTokenDataConsts.LANGUAGEID_MASK */) >>>\n 0 /* EncodedTokenDataConsts.LANGUAGEID_OFFSET */);\n }\n EncodedTokenAttributes.getLanguageId = getLanguageId;\n function getTokenType(encodedTokenAttributes) {\n return ((encodedTokenAttributes & 768 /* EncodedTokenDataConsts.TOKEN_TYPE_MASK */) >>>\n 8 /* EncodedTokenDataConsts.TOKEN_TYPE_OFFSET */);\n }\n EncodedTokenAttributes.getTokenType = getTokenType;\n function containsBalancedBrackets(encodedTokenAttributes) {\n return (encodedTokenAttributes & 1024 /* EncodedTokenDataConsts.BALANCED_BRACKETS_MASK */) !== 0;\n }\n EncodedTokenAttributes.containsBalancedBrackets = containsBalancedBrackets;\n function getFontStyle(encodedTokenAttributes) {\n return ((encodedTokenAttributes & 30720 /* EncodedTokenDataConsts.FONT_STYLE_MASK */) >>>\n 11 /* EncodedTokenDataConsts.FONT_STYLE_OFFSET */);\n }\n EncodedTokenAttributes.getFontStyle = getFontStyle;\n function getForeground(encodedTokenAttributes) {\n return ((encodedTokenAttributes & 16744448 /* EncodedTokenDataConsts.FOREGROUND_MASK */) >>>\n 15 /* EncodedTokenDataConsts.FOREGROUND_OFFSET */);\n }\n EncodedTokenAttributes.getForeground = getForeground;\n function getBackground(encodedTokenAttributes) {\n return ((encodedTokenAttributes & 4278190080 /* EncodedTokenDataConsts.BACKGROUND_MASK */) >>>\n 24 /* EncodedTokenDataConsts.BACKGROUND_OFFSET */);\n }\n EncodedTokenAttributes.getBackground = getBackground;\n /**\n * Updates the fields in `metadata`.\n * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.\n */\n function set(encodedTokenAttributes, languageId, tokenType, containsBalancedBrackets, fontStyle, foreground, background) {\n let _languageId = EncodedTokenAttributes.getLanguageId(encodedTokenAttributes);\n let _tokenType = EncodedTokenAttributes.getTokenType(encodedTokenAttributes);\n let _containsBalancedBracketsBit = EncodedTokenAttributes.containsBalancedBrackets(encodedTokenAttributes) ? 1 : 0;\n let _fontStyle = EncodedTokenAttributes.getFontStyle(encodedTokenAttributes);\n let _foreground = EncodedTokenAttributes.getForeground(encodedTokenAttributes);\n let _background = EncodedTokenAttributes.getBackground(encodedTokenAttributes);\n if (languageId !== 0) {\n _languageId = languageId;\n }\n if (tokenType !== 8 /* OptionalStandardTokenType.NotSet */) {\n _tokenType = fromOptionalTokenType(tokenType);\n }\n if (containsBalancedBrackets !== null) {\n _containsBalancedBracketsBit = containsBalancedBrackets ? 1 : 0;\n }\n if (fontStyle !== -1 /* FontStyle.NotSet */) {\n _fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n _foreground = foreground;\n }\n if (background !== 0) {\n _background = background;\n }\n return (((_languageId << 0 /* EncodedTokenDataConsts.LANGUAGEID_OFFSET */) |\n (_tokenType << 8 /* EncodedTokenDataConsts.TOKEN_TYPE_OFFSET */) |\n (_containsBalancedBracketsBit <<\n 10 /* EncodedTokenDataConsts.BALANCED_BRACKETS_OFFSET */) |\n (_fontStyle << 11 /* EncodedTokenDataConsts.FONT_STYLE_OFFSET */) |\n (_foreground << 15 /* EncodedTokenDataConsts.FOREGROUND_OFFSET */) |\n (_background << 24 /* EncodedTokenDataConsts.BACKGROUND_OFFSET */)) >>>\n 0);\n }\n EncodedTokenAttributes.set = set;\n})(EncodedTokenAttributes || (EncodedTokenAttributes = {}));\nfunction toOptionalTokenType(standardType) {\n return standardType;\n}\nfunction fromOptionalTokenType(standardType) {\n return standardType;\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nfunction createMatchers(selector, matchesName) {\n const results = [];\n const tokenizer = newTokenizer(selector);\n let token = tokenizer.next();\n while (token !== null) {\n let priority = 0;\n if (token.length === 2 && token.charAt(1) === ':') {\n switch (token.charAt(0)) {\n case 'R':\n priority = 1;\n break;\n case 'L':\n priority = -1;\n break;\n default:\n console.log(`Unknown priority ${token} in scope selector`);\n }\n token = tokenizer.next();\n }\n let matcher = parseConjunction();\n results.push({ matcher, priority });\n if (token !== ',') {\n break;\n }\n token = tokenizer.next();\n }\n return results;\n function parseOperand() {\n if (token === '-') {\n token = tokenizer.next();\n const expressionToNegate = parseOperand();\n return matcherInput => !!expressionToNegate && !expressionToNegate(matcherInput);\n }\n if (token === '(') {\n token = tokenizer.next();\n const expressionInParents = parseInnerExpression();\n if (token === ')') {\n token = tokenizer.next();\n }\n return expressionInParents;\n }\n if (isIdentifier(token)) {\n const identifiers = [];\n do {\n identifiers.push(token);\n token = tokenizer.next();\n } while (isIdentifier(token));\n return matcherInput => matchesName(identifiers, matcherInput);\n }\n return null;\n }\n function parseConjunction() {\n const matchers = [];\n let matcher = parseOperand();\n while (matcher) {\n matchers.push(matcher);\n matcher = parseOperand();\n }\n return matcherInput => matchers.every(matcher => matcher(matcherInput)); // and\n }\n function parseInnerExpression() {\n const matchers = [];\n let matcher = parseConjunction();\n while (matcher) {\n matchers.push(matcher);\n if (token === '|' || token === ',') {\n do {\n token = tokenizer.next();\n } while (token === '|' || token === ','); // ignore subsequent commas\n }\n else {\n break;\n }\n matcher = parseConjunction();\n }\n return matcherInput => matchers.some(matcher => matcher(matcherInput)); // or\n }\n}\nfunction isIdentifier(token) {\n return !!token && !!token.match(/[\\w\\.:]+/);\n}\nfunction newTokenizer(input) {\n let regex = /([LR]:|[\\w\\.:][\\w\\.:\\-]*|[\\,\\|\\-\\(\\)])/g;\n let match = regex.exec(input);\n return {\n next: () => {\n if (!match) {\n return null;\n }\n const res = match[0];\n match = regex.exec(input);\n return res;\n }\n };\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nfunction disposeOnigString(str) {\n if (typeof str.dispose === 'function') {\n str.dispose();\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nfunction clone(something) {\n return doClone(something);\n}\nfunction doClone(something) {\n if (Array.isArray(something)) {\n return cloneArray(something);\n }\n if (typeof something === 'object') {\n return cloneObj(something);\n }\n return something;\n}\nfunction cloneArray(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = doClone(arr[i]);\n }\n return r;\n}\nfunction cloneObj(obj) {\n let r = {};\n for (let key in obj) {\n r[key] = doClone(obj[key]);\n }\n return r;\n}\nfunction mergeObjects(target, ...sources) {\n sources.forEach(source => {\n for (let key in source) {\n target[key] = source[key];\n }\n });\n return target;\n}\nfunction basename(path) {\n const idx = ~path.lastIndexOf('/') || ~path.lastIndexOf('\\\\');\n if (idx === 0) {\n return path;\n }\n else if (~idx === path.length - 1) {\n return basename(path.substring(0, path.length - 1));\n }\n else {\n return path.substr(~idx + 1);\n }\n}\nlet CAPTURING_REGEX_SOURCE = /\\$(\\d+)|\\${(\\d+):\\/(downcase|upcase)}/g;\nclass RegexSource {\n static hasCaptures(regexSource) {\n if (regexSource === null) {\n return false;\n }\n CAPTURING_REGEX_SOURCE.lastIndex = 0;\n return CAPTURING_REGEX_SOURCE.test(regexSource);\n }\n static replaceCaptures(regexSource, captureSource, captureIndices) {\n return regexSource.replace(CAPTURING_REGEX_SOURCE, (match, index, commandIndex, command) => {\n let capture = captureIndices[parseInt(index || commandIndex, 10)];\n if (capture) {\n let result = captureSource.substring(capture.start, capture.end);\n // Remove leading dots that would make the selector invalid\n while (result[0] === '.') {\n result = result.substring(1);\n }\n switch (command) {\n case 'downcase':\n return result.toLowerCase();\n case 'upcase':\n return result.toUpperCase();\n default:\n return result;\n }\n }\n else {\n return match;\n }\n });\n }\n}\nfunction strcmp(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nfunction strArrCmp(a, b) {\n if (a === null && b === null) {\n return 0;\n }\n if (!a) {\n return -1;\n }\n if (!b) {\n return 1;\n }\n let len1 = a.length;\n let len2 = b.length;\n if (len1 === len2) {\n for (let i = 0; i < len1; i++) {\n let res = strcmp(a[i], b[i]);\n if (res !== 0) {\n return res;\n }\n }\n return 0;\n }\n return len1 - len2;\n}\nfunction isValidHexColor(hex) {\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n // #rrggbb\n return true;\n }\n if (/^#[0-9a-f]{8}$/i.test(hex)) {\n // #rrggbbaa\n return true;\n }\n if (/^#[0-9a-f]{3}$/i.test(hex)) {\n // #rgb\n return true;\n }\n if (/^#[0-9a-f]{4}$/i.test(hex)) {\n // #rgba\n return true;\n }\n return false;\n}\n/**\n * Escapes regular expression characters in a given string\n */\nfunction escapeRegExpCharacters(value) {\n return value.replace(/[\\-\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&');\n}\nclass CachedFn {\n fn;\n cache = new Map();\n constructor(fn) {\n this.fn = fn;\n }\n get(key) {\n if (this.cache.has(key)) {\n return this.cache.get(key);\n }\n const value = this.fn(key);\n this.cache.set(key, value);\n return value;\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\n/**\n * References the top level rule of a grammar with the given scope name.\n*/\nclass TopLevelRuleReference {\n scopeName;\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n toKey() {\n return this.scopeName;\n }\n}\n/**\n * References a rule of a grammar in the top level repository section with the given name.\n*/\nclass TopLevelRepositoryRuleReference {\n scopeName;\n ruleName;\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n toKey() {\n return `${this.scopeName}#${this.ruleName}`;\n }\n}\nclass ExternalReferenceCollector {\n _references = [];\n _seenReferenceKeys = new Set();\n get references() {\n return this._references;\n }\n visitedRule = new Set();\n add(reference) {\n const key = reference.toKey();\n if (this._seenReferenceKeys.has(key)) {\n return;\n }\n this._seenReferenceKeys.add(key);\n this._references.push(reference);\n }\n}\nclass ScopeDependencyProcessor {\n repo;\n initialScopeName;\n seenFullScopeRequests = new Set();\n seenPartialScopeRequests = new Set();\n Q;\n constructor(repo, initialScopeName) {\n this.repo = repo;\n this.initialScopeName = initialScopeName;\n this.seenFullScopeRequests.add(this.initialScopeName);\n this.Q = [new TopLevelRuleReference(this.initialScopeName)];\n }\n processQueue() {\n const q = this.Q;\n this.Q = [];\n const deps = new ExternalReferenceCollector();\n for (const dep of q) {\n collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps);\n }\n for (const dep of deps.references) {\n if (dep instanceof TopLevelRuleReference) {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n // already processed\n continue;\n }\n this.seenFullScopeRequests.add(dep.scopeName);\n this.Q.push(dep);\n }\n else {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n // already processed in full\n continue;\n }\n if (this.seenPartialScopeRequests.has(dep.toKey())) {\n // already processed\n continue;\n }\n this.seenPartialScopeRequests.add(dep.toKey());\n this.Q.push(dep);\n }\n }\n }\n}\nfunction collectReferencesOfReference(reference, baseGrammarScopeName, repo, result) {\n const selfGrammar = repo.lookup(reference.scopeName);\n if (!selfGrammar) {\n if (reference.scopeName === baseGrammarScopeName) {\n throw new Error(`No grammar provided for <${baseGrammarScopeName}>`);\n }\n return;\n }\n const baseGrammar = repo.lookup(baseGrammarScopeName);\n if (reference instanceof TopLevelRuleReference) {\n collectExternalReferencesInTopLevelRule({ baseGrammar, selfGrammar }, result);\n }\n else {\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, { baseGrammar, selfGrammar, repository: selfGrammar.repository }, result);\n }\n const injections = repo.injections(reference.scopeName);\n if (injections) {\n for (const injection of injections) {\n result.add(new TopLevelRuleReference(injection));\n }\n }\n}\nfunction collectExternalReferencesInTopLevelRepositoryRule(ruleName, context, result) {\n if (context.repository && context.repository[ruleName]) {\n const rule = context.repository[ruleName];\n collectExternalReferencesInRules([rule], context, result);\n }\n}\nfunction collectExternalReferencesInTopLevelRule(context, result) {\n if (context.selfGrammar.patterns && Array.isArray(context.selfGrammar.patterns)) {\n collectExternalReferencesInRules(context.selfGrammar.patterns, { ...context, repository: context.selfGrammar.repository }, result);\n }\n if (context.selfGrammar.injections) {\n collectExternalReferencesInRules(Object.values(context.selfGrammar.injections), { ...context, repository: context.selfGrammar.repository }, result);\n }\n}\nfunction collectExternalReferencesInRules(rules, context, result) {\n for (const rule of rules) {\n if (result.visitedRule.has(rule)) {\n continue;\n }\n result.visitedRule.add(rule);\n const patternRepository = rule.repository ? mergeObjects({}, context.repository, rule.repository) : context.repository;\n if (Array.isArray(rule.patterns)) {\n collectExternalReferencesInRules(rule.patterns, { ...context, repository: patternRepository }, result);\n }\n const include = rule.include;\n if (!include) {\n continue;\n }\n const reference = parseInclude(include);\n switch (reference.kind) {\n case 0 /* IncludeReferenceKind.Base */:\n collectExternalReferencesInTopLevelRule({ ...context, selfGrammar: context.baseGrammar }, result);\n break;\n case 1 /* IncludeReferenceKind.Self */:\n collectExternalReferencesInTopLevelRule(context, result);\n break;\n case 2 /* IncludeReferenceKind.RelativeReference */:\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, { ...context, repository: patternRepository }, result);\n break;\n case 3 /* IncludeReferenceKind.TopLevelReference */:\n case 4 /* IncludeReferenceKind.TopLevelRepositoryReference */:\n const selfGrammar = reference.scopeName === context.selfGrammar.scopeName\n ? context.selfGrammar\n : reference.scopeName === context.baseGrammar.scopeName\n ? context.baseGrammar\n : undefined;\n if (selfGrammar) {\n const newContext = { baseGrammar: context.baseGrammar, selfGrammar, repository: patternRepository };\n if (reference.kind === 4 /* IncludeReferenceKind.TopLevelRepositoryReference */) {\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result);\n }\n else {\n collectExternalReferencesInTopLevelRule(newContext, result);\n }\n }\n else {\n if (reference.kind === 4 /* IncludeReferenceKind.TopLevelRepositoryReference */) {\n result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName));\n }\n else {\n result.add(new TopLevelRuleReference(reference.scopeName));\n }\n }\n break;\n }\n }\n}\nclass BaseReference {\n kind = 0 /* IncludeReferenceKind.Base */;\n}\nclass SelfReference {\n kind = 1 /* IncludeReferenceKind.Self */;\n}\nclass RelativeReference {\n ruleName;\n kind = 2 /* IncludeReferenceKind.RelativeReference */;\n constructor(ruleName) {\n this.ruleName = ruleName;\n }\n}\nclass TopLevelReference {\n scopeName;\n kind = 3 /* IncludeReferenceKind.TopLevelReference */;\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n}\nclass TopLevelRepositoryReference {\n scopeName;\n ruleName;\n kind = 4 /* IncludeReferenceKind.TopLevelRepositoryReference */;\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n}\nfunction parseInclude(include) {\n if (include === '$base') {\n return new BaseReference();\n }\n else if (include === '$self') {\n return new SelfReference();\n }\n const indexOfSharp = include.indexOf(\"#\");\n if (indexOfSharp === -1) {\n return new TopLevelReference(include);\n }\n else if (indexOfSharp === 0) {\n return new RelativeReference(include.substring(1));\n }\n else {\n const scopeName = include.substring(0, indexOfSharp);\n const ruleName = include.substring(indexOfSharp + 1);\n return new TopLevelRepositoryReference(scopeName, ruleName);\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nconst HAS_BACK_REFERENCES = /\\\\(\\d+)/;\nconst BACK_REFERENCING_END = /\\\\(\\d+)/g;\n// This is a special constant to indicate that the end regexp matched.\nconst endRuleId = -1;\n// This is a special constant to indicate that the while regexp matched.\nconst whileRuleId = -2;\nfunction ruleIdFromNumber(id) {\n return id;\n}\nfunction ruleIdToNumber(id) {\n return id;\n}\nclass Rule {\n $location;\n id;\n _nameIsCapturing;\n _name;\n _contentNameIsCapturing;\n _contentName;\n constructor($location, id, name, contentName) {\n this.$location = $location;\n this.id = id;\n this._name = name || null;\n this._nameIsCapturing = RegexSource.hasCaptures(this._name);\n this._contentName = contentName || null;\n this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);\n }\n get debugName() {\n const location = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : 'unknown';\n return `${this.constructor.name}#${this.id} @ ${location}`;\n }\n getName(lineText, captureIndices) {\n if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) {\n return this._name;\n }\n return RegexSource.replaceCaptures(this._name, lineText, captureIndices);\n }\n getContentName(lineText, captureIndices) {\n if (!this._contentNameIsCapturing || this._contentName === null) {\n return this._contentName;\n }\n return RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);\n }\n}\nclass CaptureRule extends Rule {\n retokenizeCapturedWithRuleId;\n constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {\n super($location, id, name, contentName);\n this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;\n }\n dispose() {\n // nothing to dispose\n }\n collectPatterns(grammar, out) {\n throw new Error('Not supported!');\n }\n compile(grammar, endRegexSource) {\n throw new Error('Not supported!');\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n throw new Error('Not supported!');\n }\n}\nclass MatchRule extends Rule {\n _match;\n captures;\n _cachedCompiledPatterns;\n constructor($location, id, name, match, captures) {\n super($location, id, name, null);\n this._match = new RegExpSource(match, this.id);\n this.captures = captures;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugMatchRegExp() {\n return `${this._match.source}`;\n }\n collectPatterns(grammar, out) {\n out.push(this._match);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n}\nclass IncludeOnlyRule extends Rule {\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, patterns) {\n super($location, id, name, contentName);\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n collectPatterns(grammar, out) {\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, out);\n }\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n}\nclass BeginEndRule extends Rule {\n _begin;\n beginCaptures;\n _end;\n endHasBackReferences;\n endCaptures;\n applyEndPatternLast;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, end, endCaptures, applyEndPatternLast, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this._end = new RegExpSource(end ? end : '\\uFFFF', -1);\n this.endHasBackReferences = this._end.hasBackReferences;\n this.endCaptures = endCaptures;\n this.applyEndPatternLast = applyEndPatternLast || false;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugEndRegExp() {\n return `${this._end.source}`;\n }\n getEndWithResolvedBackReferences(lineText, captureIndices) {\n return this._end.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end);\n }\n else {\n this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);\n }\n }\n if (this._end.hasBackReferences) {\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, endRegexSource);\n }\n else {\n this._cachedCompiledPatterns.setSource(0, endRegexSource);\n }\n }\n return this._cachedCompiledPatterns;\n }\n}\nclass BeginWhileRule extends Rule {\n _begin;\n beginCaptures;\n whileCaptures;\n _while;\n whileHasBackReferences;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n _cachedCompiledWhilePatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, _while, whileCaptures, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this.whileCaptures = whileCaptures;\n this._while = new RegExpSource(_while, whileRuleId);\n this.whileHasBackReferences = this._while.hasBackReferences;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n this._cachedCompiledWhilePatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n if (this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns.dispose();\n this._cachedCompiledWhilePatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugWhileRegExp() {\n return `${this._while.source}`;\n }\n getWhileWithResolvedBackReferences(lineText, captureIndices) {\n return this._while.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n }\n return this._cachedCompiledPatterns;\n }\n compileWhile(grammar, endRegexSource) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compile(grammar);\n }\n compileWhileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledWhilePatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns = new RegExpSourceList();\n this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while);\n }\n if (this._while.hasBackReferences) {\n this._cachedCompiledWhilePatterns.setSource(0, endRegexSource ? endRegexSource : '\\uFFFF');\n }\n return this._cachedCompiledWhilePatterns;\n }\n}\nclass RuleFactory {\n static createCaptureRule(helper, $location, name, contentName, retokenizeCapturedWithRuleId) {\n return helper.registerRule((id) => {\n return new CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId);\n });\n }\n static getCompiledRuleId(desc, helper, repository) {\n if (!desc.id) {\n helper.registerRule((id) => {\n desc.id = id;\n if (desc.match) {\n return new MatchRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.match, RuleFactory._compileCaptures(desc.captures, helper, repository));\n }\n if (typeof desc.begin === 'undefined') {\n if (desc.repository) {\n repository = mergeObjects({}, repository, desc.repository);\n }\n let patterns = desc.patterns;\n if (typeof patterns === 'undefined' && desc.include) {\n patterns = [{ include: desc.include }];\n }\n return new IncludeOnlyRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, RuleFactory._compilePatterns(patterns, helper, repository));\n }\n if (desc.while) {\n return new BeginWhileRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, desc.begin, RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository), desc.while, RuleFactory._compileCaptures(desc.whileCaptures || desc.captures, helper, repository), RuleFactory._compilePatterns(desc.patterns, helper, repository));\n }\n return new BeginEndRule(desc.$vscodeTextmateLocation, desc.id, desc.name, desc.contentName, desc.begin, RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository), desc.end, RuleFactory._compileCaptures(desc.endCaptures || desc.captures, helper, repository), desc.applyEndPatternLast, RuleFactory._compilePatterns(desc.patterns, helper, repository));\n });\n }\n return desc.id;\n }\n static _compileCaptures(captures, helper, repository) {\n let r = [];\n if (captures) {\n // Find the maximum capture id\n let maximumCaptureId = 0;\n for (const captureId in captures) {\n if (captureId === '$vscodeTextmateLocation') {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n if (numericCaptureId > maximumCaptureId) {\n maximumCaptureId = numericCaptureId;\n }\n }\n // Initialize result\n for (let i = 0; i <= maximumCaptureId; i++) {\n r[i] = null;\n }\n // Fill out result\n for (const captureId in captures) {\n if (captureId === '$vscodeTextmateLocation') {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n let retokenizeCapturedWithRuleId = 0;\n if (captures[captureId].patterns) {\n retokenizeCapturedWithRuleId = RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);\n }\n r[numericCaptureId] = RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);\n }\n }\n return r;\n }\n static _compilePatterns(patterns, helper, repository) {\n let r = [];\n if (patterns) {\n for (let i = 0, len = patterns.length; i < len; i++) {\n const pattern = patterns[i];\n let ruleId = -1;\n if (pattern.include) {\n const reference = parseInclude(pattern.include);\n switch (reference.kind) {\n case 0 /* IncludeReferenceKind.Base */:\n case 1 /* IncludeReferenceKind.Self */:\n ruleId = RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);\n break;\n case 2 /* IncludeReferenceKind.RelativeReference */:\n // Local include found in `repository`\n let localIncludedRule = repository[reference.ruleName];\n if (localIncludedRule) {\n ruleId = RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);\n }\n break;\n case 3 /* IncludeReferenceKind.TopLevelReference */:\n case 4 /* IncludeReferenceKind.TopLevelRepositoryReference */:\n const externalGrammarName = reference.scopeName;\n const externalGrammarInclude = reference.kind === 4 /* IncludeReferenceKind.TopLevelRepositoryReference */\n ? reference.ruleName\n : null;\n // External include\n const externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);\n if (externalGrammar) {\n if (externalGrammarInclude) {\n let externalIncludedRule = externalGrammar.repository[externalGrammarInclude];\n if (externalIncludedRule) {\n ruleId = RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);\n }\n }\n else {\n ruleId = RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);\n }\n }\n break;\n }\n }\n else {\n ruleId = RuleFactory.getCompiledRuleId(pattern, helper, repository);\n }\n if (ruleId !== -1) {\n const rule = helper.getRule(ruleId);\n let skipRule = false;\n if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {\n if (rule.hasMissingPatterns && rule.patterns.length === 0) {\n skipRule = true;\n }\n }\n if (skipRule) {\n // console.log('REMOVING RULE ENTIRELY DUE TO EMPTY PATTERNS THAT ARE MISSING');\n continue;\n }\n r.push(ruleId);\n }\n }\n }\n return {\n patterns: r,\n hasMissingPatterns: ((patterns ? patterns.length : 0) !== r.length)\n };\n }\n}\nclass RegExpSource {\n source;\n ruleId;\n hasAnchor;\n hasBackReferences;\n _anchorCache;\n constructor(regExpSource, ruleId) {\n if (regExpSource) {\n const len = regExpSource.length;\n let lastPushedPos = 0;\n let output = [];\n let hasAnchor = false;\n for (let pos = 0; pos < len; pos++) {\n const ch = regExpSource.charAt(pos);\n if (ch === '\\\\') {\n if (pos + 1 < len) {\n const nextCh = regExpSource.charAt(pos + 1);\n if (nextCh === 'z') {\n output.push(regExpSource.substring(lastPushedPos, pos));\n output.push('$(?!\\\\n)(? ' + this.source + ', ' + this.hasAnchor);\n }\n clone() {\n return new RegExpSource(this.source, this.ruleId);\n }\n setSource(newSource) {\n if (this.source === newSource) {\n return;\n }\n this.source = newSource;\n if (this.hasAnchor) {\n this._anchorCache = this._buildAnchorCache();\n }\n }\n resolveBackReferences(lineText, captureIndices) {\n let capturedValues = captureIndices.map((capture) => {\n return lineText.substring(capture.start, capture.end);\n });\n BACK_REFERENCING_END.lastIndex = 0;\n return this.source.replace(BACK_REFERENCING_END, (match, g1) => {\n return escapeRegExpCharacters(capturedValues[parseInt(g1, 10)] || '');\n });\n }\n _buildAnchorCache() {\n let A0_G0_result = [];\n let A0_G1_result = [];\n let A1_G0_result = [];\n let A1_G1_result = [];\n let pos, len, ch, nextCh;\n for (pos = 0, len = this.source.length; pos < len; pos++) {\n ch = this.source.charAt(pos);\n A0_G0_result[pos] = ch;\n A0_G1_result[pos] = ch;\n A1_G0_result[pos] = ch;\n A1_G1_result[pos] = ch;\n if (ch === '\\\\') {\n if (pos + 1 < len) {\n nextCh = this.source.charAt(pos + 1);\n if (nextCh === 'A') {\n A0_G0_result[pos + 1] = '\\uFFFF';\n A0_G1_result[pos + 1] = '\\uFFFF';\n A1_G0_result[pos + 1] = 'A';\n A1_G1_result[pos + 1] = 'A';\n }\n else if (nextCh === 'G') {\n A0_G0_result[pos + 1] = '\\uFFFF';\n A0_G1_result[pos + 1] = 'G';\n A1_G0_result[pos + 1] = '\\uFFFF';\n A1_G1_result[pos + 1] = 'G';\n }\n else {\n A0_G0_result[pos + 1] = nextCh;\n A0_G1_result[pos + 1] = nextCh;\n A1_G0_result[pos + 1] = nextCh;\n A1_G1_result[pos + 1] = nextCh;\n }\n pos++;\n }\n }\n }\n return {\n A0_G0: A0_G0_result.join(''),\n A0_G1: A0_G1_result.join(''),\n A1_G0: A1_G0_result.join(''),\n A1_G1: A1_G1_result.join('')\n };\n }\n resolveAnchors(allowA, allowG) {\n if (!this.hasAnchor || !this._anchorCache) {\n return this.source;\n }\n if (allowA) {\n if (allowG) {\n return this._anchorCache.A1_G1;\n }\n else {\n return this._anchorCache.A1_G0;\n }\n }\n else {\n if (allowG) {\n return this._anchorCache.A0_G1;\n }\n else {\n return this._anchorCache.A0_G0;\n }\n }\n }\n}\nclass RegExpSourceList {\n _items;\n _hasAnchors;\n _cached;\n _anchorCache;\n constructor() {\n this._items = [];\n this._hasAnchors = false;\n this._cached = null;\n this._anchorCache = {\n A0_G0: null,\n A0_G1: null,\n A1_G0: null,\n A1_G1: null\n };\n }\n dispose() {\n this._disposeCaches();\n }\n _disposeCaches() {\n if (this._cached) {\n this._cached.dispose();\n this._cached = null;\n }\n if (this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0.dispose();\n this._anchorCache.A0_G0 = null;\n }\n if (this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1.dispose();\n this._anchorCache.A0_G1 = null;\n }\n if (this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0.dispose();\n this._anchorCache.A1_G0 = null;\n }\n if (this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1.dispose();\n this._anchorCache.A1_G1 = null;\n }\n }\n push(item) {\n this._items.push(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n unshift(item) {\n this._items.unshift(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n length() {\n return this._items.length;\n }\n setSource(index, newSource) {\n if (this._items[index].source !== newSource) {\n // bust the cache\n this._disposeCaches();\n this._items[index].setSource(newSource);\n }\n }\n compile(onigLib) {\n if (!this._cached) {\n let regExps = this._items.map(e => e.source);\n this._cached = new CompiledRule(onigLib, regExps, this._items.map(e => e.ruleId));\n }\n return this._cached;\n }\n compileAG(onigLib, allowA, allowG) {\n if (!this._hasAnchors) {\n return this.compile(onigLib);\n }\n else {\n if (allowA) {\n if (allowG) {\n if (!this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G1;\n }\n else {\n if (!this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G0;\n }\n }\n else {\n if (allowG) {\n if (!this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G1;\n }\n else {\n if (!this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G0;\n }\n }\n }\n }\n _resolveAnchors(onigLib, allowA, allowG) {\n let regExps = this._items.map(e => e.resolveAnchors(allowA, allowG));\n return new CompiledRule(onigLib, regExps, this._items.map(e => e.ruleId));\n }\n}\nclass CompiledRule {\n regExps;\n rules;\n scanner;\n constructor(onigLib, regExps, rules) {\n this.regExps = regExps;\n this.rules = rules;\n this.scanner = onigLib.createOnigScanner(regExps);\n }\n dispose() {\n if (typeof this.scanner.dispose === \"function\") {\n this.scanner.dispose();\n }\n }\n toString() {\n const r = [];\n for (let i = 0, len = this.rules.length; i < len; i++) {\n r.push(\" - \" + this.rules[i] + \": \" + this.regExps[i]);\n }\n return r.join(\"\\n\");\n }\n findNextMatchSync(string, startPosition, options) {\n const result = this.scanner.findNextMatchSync(string, startPosition, options);\n if (!result) {\n return null;\n }\n return {\n ruleId: this.rules[result.index],\n captureIndices: result.captureIndices,\n };\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nclass Theme {\n _colorMap;\n _defaults;\n _root;\n static createFromRawTheme(source, colorMap) {\n return this.createFromParsedTheme(parseTheme(source), colorMap);\n }\n static createFromParsedTheme(source, colorMap) {\n return resolveParsedThemeRules(source, colorMap);\n }\n _cachedMatchRoot = new CachedFn((scopeName) => this._root.match(scopeName));\n constructor(_colorMap, _defaults, _root) {\n this._colorMap = _colorMap;\n this._defaults = _defaults;\n this._root = _root;\n }\n getColorMap() {\n return this._colorMap.getColorMap();\n }\n getDefaults() {\n return this._defaults;\n }\n match(scopePath) {\n if (scopePath === null) {\n return this._defaults;\n }\n const scopeName = scopePath.scopeName;\n const matchingTrieElements = this._cachedMatchRoot.get(scopeName);\n const effectiveRule = matchingTrieElements.find((v) => _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes));\n if (!effectiveRule) {\n return null;\n }\n return new StyleAttributes(effectiveRule.fontStyle, effectiveRule.foreground, effectiveRule.background);\n }\n}\nclass ScopeStack {\n parent;\n scopeName;\n static push(path, scopeNames) {\n for (const name of scopeNames) {\n path = new ScopeStack(path, name);\n }\n return path;\n }\n static from(...segments) {\n let result = null;\n for (let i = 0; i < segments.length; i++) {\n result = new ScopeStack(result, segments[i]);\n }\n return result;\n }\n constructor(parent, scopeName) {\n this.parent = parent;\n this.scopeName = scopeName;\n }\n push(scopeName) {\n return new ScopeStack(this, scopeName);\n }\n getSegments() {\n let item = this;\n const result = [];\n while (item) {\n result.push(item.scopeName);\n item = item.parent;\n }\n result.reverse();\n return result;\n }\n toString() {\n return this.getSegments().join(' ');\n }\n extends(other) {\n if (this === other) {\n return true;\n }\n if (this.parent === null) {\n return false;\n }\n return this.parent.extends(other);\n }\n getExtensionIfDefined(base) {\n const result = [];\n let item = this;\n while (item && item !== base) {\n result.push(item.scopeName);\n item = item.parent;\n }\n return item === base ? result.reverse() : undefined;\n }\n}\nfunction _scopePathMatchesParentScopes(scopePath, parentScopes) {\n if (parentScopes === null) {\n return true;\n }\n let index = 0;\n let scopePattern = parentScopes[index];\n while (scopePath) {\n if (_matchesScope(scopePath.scopeName, scopePattern)) {\n index++;\n if (index === parentScopes.length) {\n return true;\n }\n scopePattern = parentScopes[index];\n }\n scopePath = scopePath.parent;\n }\n return false;\n}\nfunction _matchesScope(scopeName, scopePattern) {\n return scopePattern === scopeName || (scopeName.startsWith(scopePattern) && scopeName[scopePattern.length] === '.');\n}\nclass StyleAttributes {\n fontStyle;\n foregroundId;\n backgroundId;\n constructor(fontStyle, foregroundId, backgroundId) {\n this.fontStyle = fontStyle;\n this.foregroundId = foregroundId;\n this.backgroundId = backgroundId;\n }\n}\n/**\n * Parse a raw theme into rules.\n */\nfunction parseTheme(source) {\n if (!source) {\n return [];\n }\n if (!source.settings || !Array.isArray(source.settings)) {\n return [];\n }\n let settings = source.settings;\n let result = [], resultLen = 0;\n for (let i = 0, len = settings.length; i < len; i++) {\n let entry = settings[i];\n if (!entry.settings) {\n continue;\n }\n let scopes;\n if (typeof entry.scope === 'string') {\n let _scope = entry.scope;\n // remove leading commas\n _scope = _scope.replace(/^[,]+/, '');\n // remove trailing commans\n _scope = _scope.replace(/[,]+$/, '');\n scopes = _scope.split(',');\n }\n else if (Array.isArray(entry.scope)) {\n scopes = entry.scope;\n }\n else {\n scopes = [''];\n }\n let fontStyle = -1 /* FontStyle.NotSet */;\n if (typeof entry.settings.fontStyle === 'string') {\n fontStyle = 0 /* FontStyle.None */;\n let segments = entry.settings.fontStyle.split(' ');\n for (let j = 0, lenJ = segments.length; j < lenJ; j++) {\n let segment = segments[j];\n switch (segment) {\n case 'italic':\n fontStyle = fontStyle | 1 /* FontStyle.Italic */;\n break;\n case 'bold':\n fontStyle = fontStyle | 2 /* FontStyle.Bold */;\n break;\n case 'underline':\n fontStyle = fontStyle | 4 /* FontStyle.Underline */;\n break;\n case 'strikethrough':\n fontStyle = fontStyle | 8 /* FontStyle.Strikethrough */;\n break;\n }\n }\n }\n let foreground = null;\n if (typeof entry.settings.foreground === 'string' && isValidHexColor(entry.settings.foreground)) {\n foreground = entry.settings.foreground;\n }\n let background = null;\n if (typeof entry.settings.background === 'string' && isValidHexColor(entry.settings.background)) {\n background = entry.settings.background;\n }\n for (let j = 0, lenJ = scopes.length; j < lenJ; j++) {\n let _scope = scopes[j].trim();\n let segments = _scope.split(' ');\n let scope = segments[segments.length - 1];\n let parentScopes = null;\n if (segments.length > 1) {\n parentScopes = segments.slice(0, segments.length - 1);\n parentScopes.reverse();\n }\n result[resultLen++] = new ParsedThemeRule(scope, parentScopes, i, fontStyle, foreground, background);\n }\n }\n return result;\n}\nclass ParsedThemeRule {\n scope;\n parentScopes;\n index;\n fontStyle;\n foreground;\n background;\n constructor(scope, parentScopes, index, fontStyle, foreground, background) {\n this.scope = scope;\n this.parentScopes = parentScopes;\n this.index = index;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n}\n/**\n * Resolve rules (i.e. inheritance).\n */\nfunction resolveParsedThemeRules(parsedThemeRules, _colorMap) {\n // Sort rules lexicographically, and then by index if necessary\n parsedThemeRules.sort((a, b) => {\n let r = strcmp(a.scope, b.scope);\n if (r !== 0) {\n return r;\n }\n r = strArrCmp(a.parentScopes, b.parentScopes);\n if (r !== 0) {\n return r;\n }\n return a.index - b.index;\n });\n // Determine defaults\n let defaultFontStyle = 0 /* FontStyle.None */;\n let defaultForeground = '#000000';\n let defaultBackground = '#ffffff';\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === '') {\n let incomingDefaults = parsedThemeRules.shift();\n if (incomingDefaults.fontStyle !== -1 /* FontStyle.NotSet */) {\n defaultFontStyle = incomingDefaults.fontStyle;\n }\n if (incomingDefaults.foreground !== null) {\n defaultForeground = incomingDefaults.foreground;\n }\n if (incomingDefaults.background !== null) {\n defaultBackground = incomingDefaults.background;\n }\n }\n let colorMap = new ColorMap(_colorMap);\n let defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));\n let root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* FontStyle.NotSet */, 0, 0), []);\n for (let i = 0, len = parsedThemeRules.length; i < len; i++) {\n let rule = parsedThemeRules[i];\n root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\n }\n return new Theme(colorMap, defaults, root);\n}\nclass ColorMap {\n _isFrozen;\n _lastColorId;\n _id2color;\n _color2id;\n constructor(_colorMap) {\n this._lastColorId = 0;\n this._id2color = [];\n this._color2id = Object.create(null);\n if (Array.isArray(_colorMap)) {\n this._isFrozen = true;\n for (let i = 0, len = _colorMap.length; i < len; i++) {\n this._color2id[_colorMap[i]] = i;\n this._id2color[i] = _colorMap[i];\n }\n }\n else {\n this._isFrozen = false;\n }\n }\n getId(color) {\n if (color === null) {\n return 0;\n }\n color = color.toUpperCase();\n let value = this._color2id[color];\n if (value) {\n return value;\n }\n if (this._isFrozen) {\n throw new Error(`Missing color in color map - ${color}`);\n }\n value = ++this._lastColorId;\n this._color2id[color] = value;\n this._id2color[value] = color;\n return value;\n }\n getColorMap() {\n return this._id2color.slice(0);\n }\n}\nclass ThemeTrieElementRule {\n scopeDepth;\n parentScopes;\n fontStyle;\n foreground;\n background;\n constructor(scopeDepth, parentScopes, fontStyle, foreground, background) {\n this.scopeDepth = scopeDepth;\n this.parentScopes = parentScopes;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n clone() {\n return new ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);\n }\n static cloneArr(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = arr[i].clone();\n }\n return r;\n }\n acceptOverwrite(scopeDepth, fontStyle, foreground, background) {\n if (this.scopeDepth > scopeDepth) {\n console.log('how did this happen?');\n }\n else {\n this.scopeDepth = scopeDepth;\n }\n // console.log('TODO -> my depth: ' + this.scopeDepth + ', overwriting depth: ' + scopeDepth);\n if (fontStyle !== -1 /* FontStyle.NotSet */) {\n this.fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n this.foreground = foreground;\n }\n if (background !== 0) {\n this.background = background;\n }\n }\n}\nclass ThemeTrieElement {\n _mainRule;\n _children;\n _rulesWithParentScopes;\n constructor(_mainRule, rulesWithParentScopes = [], _children = {}) {\n this._mainRule = _mainRule;\n this._children = _children;\n this._rulesWithParentScopes = rulesWithParentScopes;\n }\n static _sortBySpecificity(arr) {\n if (arr.length === 1) {\n return arr;\n }\n arr.sort(this._cmpBySpecificity);\n return arr;\n }\n static _cmpBySpecificity(a, b) {\n if (a.scopeDepth === b.scopeDepth) {\n const aParentScopes = a.parentScopes;\n const bParentScopes = b.parentScopes;\n let aParentScopesLen = aParentScopes === null ? 0 : aParentScopes.length;\n let bParentScopesLen = bParentScopes === null ? 0 : bParentScopes.length;\n if (aParentScopesLen === bParentScopesLen) {\n for (let i = 0; i < aParentScopesLen; i++) {\n const aLen = aParentScopes[i].length;\n const bLen = bParentScopes[i].length;\n if (aLen !== bLen) {\n return bLen - aLen;\n }\n }\n }\n return bParentScopesLen - aParentScopesLen;\n }\n return b.scopeDepth - a.scopeDepth;\n }\n match(scope) {\n if (scope === '') {\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\n }\n let dotIndex = scope.indexOf('.');\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = '';\n }\n else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n if (this._children.hasOwnProperty(head)) {\n return this._children[head].match(tail);\n }\n return ThemeTrieElement._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));\n }\n insert(scopeDepth, scope, parentScopes, fontStyle, foreground, background) {\n if (scope === '') {\n this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);\n return;\n }\n let dotIndex = scope.indexOf('.');\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = '';\n }\n else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n let child;\n if (this._children.hasOwnProperty(head)) {\n child = this._children[head];\n }\n else {\n child = new ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));\n this._children[head] = child;\n }\n child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);\n }\n _doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background) {\n if (parentScopes === null) {\n // Merge into the main rule\n this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n // Try to merge into existing rule\n for (let i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {\n let rule = this._rulesWithParentScopes[i];\n if (strArrCmp(rule.parentScopes, parentScopes) === 0) {\n // bingo! => we get to merge this into an existing one\n rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n }\n // Must add a new rule\n // Inherit from main rule\n if (fontStyle === -1 /* FontStyle.NotSet */) {\n fontStyle = this._mainRule.fontStyle;\n }\n if (foreground === 0) {\n foreground = this._mainRule.foreground;\n }\n if (background === 0) {\n background = this._mainRule.background;\n }\n this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nclass BasicScopeAttributes {\n languageId;\n tokenType;\n constructor(languageId, tokenType) {\n this.languageId = languageId;\n this.tokenType = tokenType;\n }\n}\nclass BasicScopeAttributesProvider {\n _defaultAttributes;\n _embeddedLanguagesMatcher;\n constructor(initialLanguageId, embeddedLanguages) {\n this._defaultAttributes = new BasicScopeAttributes(initialLanguageId, 8 /* OptionalStandardTokenType.NotSet */);\n this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(embeddedLanguages || {}));\n }\n getDefaultAttributes() {\n return this._defaultAttributes;\n }\n getBasicScopeAttributes(scopeName) {\n if (scopeName === null) {\n return BasicScopeAttributesProvider._NULL_SCOPE_METADATA;\n }\n return this._getBasicScopeAttributes.get(scopeName);\n }\n static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);\n _getBasicScopeAttributes = new CachedFn((scopeName) => {\n const languageId = this._scopeToLanguage(scopeName);\n const standardTokenType = this._toStandardTokenType(scopeName);\n return new BasicScopeAttributes(languageId, standardTokenType);\n });\n /**\n * Given a produced TM scope, return the language that token describes or null if unknown.\n * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null\n */\n _scopeToLanguage(scope) {\n return this._embeddedLanguagesMatcher.match(scope) || 0;\n }\n _toStandardTokenType(scopeName) {\n const m = scopeName.match(BasicScopeAttributesProvider.STANDARD_TOKEN_TYPE_REGEXP);\n if (!m) {\n return 8 /* OptionalStandardTokenType.NotSet */;\n }\n switch (m[1]) {\n case \"comment\":\n return 1 /* OptionalStandardTokenType.Comment */;\n case \"string\":\n return 2 /* OptionalStandardTokenType.String */;\n case \"regex\":\n return 3 /* OptionalStandardTokenType.RegEx */;\n case \"meta.embedded\":\n return 0 /* OptionalStandardTokenType.Other */;\n }\n throw new Error(\"Unexpected match for standard token type!\");\n }\n static STANDARD_TOKEN_TYPE_REGEXP = /\\b(comment|string|regex|meta\\.embedded)\\b/;\n}\nclass ScopeMatcher {\n values;\n scopesRegExp;\n constructor(values) {\n if (values.length === 0) {\n this.values = null;\n this.scopesRegExp = null;\n }\n else {\n this.values = new Map(values);\n // create the regex\n const escapedScopes = values.map(([scopeName, value]) => escapeRegExpCharacters(scopeName));\n escapedScopes.sort();\n escapedScopes.reverse(); // Longest scope first\n this.scopesRegExp = new RegExp(`^((${escapedScopes.join(\")|(\")}))($|\\\\.)`, \"\");\n }\n }\n match(scope) {\n if (!this.scopesRegExp) {\n return undefined;\n }\n const m = scope.match(this.scopesRegExp);\n if (!m) {\n // no scopes matched\n return undefined;\n }\n return this.values.get(m[1]);\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nclass TokenizeStringResult {\n stack;\n stoppedEarly;\n constructor(stack, stoppedEarly) {\n this.stack = stack;\n this.stoppedEarly = stoppedEarly;\n }\n}\n/**\n * Tokenize a string\n * @param grammar\n * @param lineText\n * @param isFirstLine\n * @param linePos\n * @param stack\n * @param lineTokens\n * @param checkWhileConditions\n * @param timeLimit Use `0` to indicate no time limit\n * @returns the StackElement or StackElement.TIME_LIMIT_REACHED if the time limit has been reached\n */\nfunction _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens, checkWhileConditions, timeLimit) {\n const lineLength = lineText.content.length;\n let STOP = false;\n let anchorPosition = -1;\n if (checkWhileConditions) {\n const whileCheckResult = _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens);\n stack = whileCheckResult.stack;\n linePos = whileCheckResult.linePos;\n isFirstLine = whileCheckResult.isFirstLine;\n anchorPosition = whileCheckResult.anchorPosition;\n }\n const startTime = Date.now();\n while (!STOP) {\n if (timeLimit !== 0) {\n const elapsedTime = Date.now() - startTime;\n if (elapsedTime > timeLimit) {\n return new TokenizeStringResult(stack, true);\n }\n }\n scanNext(); // potentially modifies linePos && anchorPosition\n }\n return new TokenizeStringResult(stack, false);\n function scanNext() {\n const r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n if (!r) {\n // No match\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n const captureIndices = r.captureIndices;\n const matchedRuleId = r.matchedRuleId;\n const hasAdvanced = captureIndices && captureIndices.length > 0\n ? captureIndices[0].end > linePos\n : false;\n if (matchedRuleId === endRuleId) {\n // We matched the `end` for this rule => pop it\n const poppedRule = stack.getRule(grammar);\n lineTokens.produce(stack, captureIndices[0].start);\n stack = stack.withContentNameScopesList(stack.nameScopesList);\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices);\n lineTokens.produce(stack, captureIndices[0].end);\n // pop\n const popped = stack;\n stack = stack.parent;\n anchorPosition = popped.getAnchorPos();\n if (!hasAdvanced && popped.getEnterPos() === linePos) {\n // See https://github.com/Microsoft/vscode-textmate/issues/12\n // Let's assume this was a mistake by the grammar author and the intent was to continue in this state\n stack = popped;\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n else {\n // We matched a rule!\n const _rule = grammar.getRule(matchedRuleId);\n lineTokens.produce(stack, captureIndices[0].start);\n const beforePush = stack;\n // push it on the stack rule\n const scopeName = _rule.getName(lineText.content, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);\n stack = stack.push(matchedRuleId, linePos, anchorPosition, captureIndices[0].end === lineLength, null, nameScopesList, nameScopesList);\n if (_rule instanceof BeginEndRule) {\n const pushedRule = _rule;\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(lineText.content, captureIndices);\n const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.endHasBackReferences) {\n stack = stack.withEndRule(pushedRule.getEndWithResolvedBackReferences(lineText.content, captureIndices));\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n else if (_rule instanceof BeginWhileRule) {\n const pushedRule = _rule;\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures, captureIndices);\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(lineText.content, captureIndices);\n const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.whileHasBackReferences) {\n stack = stack.withEndRule(pushedRule.getWhileWithResolvedBackReferences(lineText.content, captureIndices));\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n else {\n const matchingRule = _rule;\n handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures, captureIndices);\n lineTokens.produce(stack, captureIndices[0].end);\n // pop rule immediately since it is a MatchRule\n stack = stack.pop();\n if (!hasAdvanced) {\n stack = stack.safePop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n }\n if (captureIndices[0].end > linePos) {\n // Advance stream\n linePos = captureIndices[0].end;\n isFirstLine = false;\n }\n }\n}\n/**\n * Walk the stack from bottom to top, and check each while condition in this order.\n * If any fails, cut off the entire stack above the failed while condition. While conditions\n * may also advance the linePosition.\n */\nfunction _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\n let anchorPosition = (stack.beginRuleCapturedEOL ? 0 : -1);\n const whileRules = [];\n for (let node = stack; node; node = node.pop()) {\n const nodeRule = node.getRule(grammar);\n if (nodeRule instanceof BeginWhileRule) {\n whileRules.push({\n rule: nodeRule,\n stack: node\n });\n }\n }\n for (let whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {\n const { ruleScanner, findOptions } = prepareRuleWhileSearch(whileRule.rule, grammar, whileRule.stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (r) {\n const matchedRuleId = r.ruleId;\n if (matchedRuleId !== whileRuleId) {\n // we shouldn't end up here\n stack = whileRule.stack.pop();\n break;\n }\n if (r.captureIndices && r.captureIndices.length) {\n lineTokens.produce(whileRule.stack, r.captureIndices[0].start);\n handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);\n lineTokens.produce(whileRule.stack, r.captureIndices[0].end);\n anchorPosition = r.captureIndices[0].end;\n if (r.captureIndices[0].end > linePos) {\n linePos = r.captureIndices[0].end;\n isFirstLine = false;\n }\n }\n }\n else {\n stack = whileRule.stack.pop();\n break;\n }\n }\n return { stack: stack, linePos: linePos, anchorPosition: anchorPosition, isFirstLine: isFirstLine };\n}\nfunction matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n // Look for normal grammar rule\n const matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n // Look for injected rules\n const injections = grammar.getInjections();\n if (injections.length === 0) {\n // No injections whatsoever => early return\n return matchResult;\n }\n const injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n if (!injectionResult) {\n // No injections matched => early return\n return matchResult;\n }\n if (!matchResult) {\n // Only injections matched => early return\n return injectionResult;\n }\n // Decide if `matchResult` or `injectionResult` should win\n const matchResultScore = matchResult.captureIndices[0].start;\n const injectionResultScore = injectionResult.captureIndices[0].start;\n if (injectionResultScore < matchResultScore || (injectionResult.priorityMatch && injectionResultScore === matchResultScore)) {\n // injection won!\n return injectionResult;\n }\n return matchResult;\n}\nfunction matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n const rule = stack.getRule(grammar);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (r) {\n return {\n captureIndices: r.captureIndices,\n matchedRuleId: r.ruleId\n };\n }\n return null;\n}\nfunction matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n // The lower the better\n let bestMatchRating = Number.MAX_VALUE;\n let bestMatchCaptureIndices = null;\n let bestMatchRuleId;\n let bestMatchResultPriority = 0;\n const scopes = stack.contentNameScopesList.getScopeNames();\n for (let i = 0, len = injections.length; i < len; i++) {\n const injection = injections[i];\n if (!injection.matcher(scopes)) {\n // injection selector doesn't match stack\n continue;\n }\n const rule = grammar.getRule(injection.ruleId);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, null, isFirstLine, linePos === anchorPosition);\n const matchResult = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (!matchResult) {\n continue;\n }\n const matchRating = matchResult.captureIndices[0].start;\n if (matchRating >= bestMatchRating) {\n // Injections are sorted by priority, so the previous injection had a better or equal priority\n continue;\n }\n bestMatchRating = matchRating;\n bestMatchCaptureIndices = matchResult.captureIndices;\n bestMatchRuleId = matchResult.ruleId;\n bestMatchResultPriority = injection.priority;\n if (bestMatchRating === linePos) {\n // No more need to look at the rest of the injections.\n break;\n }\n }\n if (bestMatchCaptureIndices) {\n return {\n priorityMatch: bestMatchResultPriority === -1,\n captureIndices: bestMatchCaptureIndices,\n matchedRuleId: bestMatchRuleId\n };\n }\n return null;\n}\nfunction prepareRuleSearch(rule, grammar, endRegexSource, allowA, allowG) {\n const ruleScanner = rule.compileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* FindOption.None */ };\n}\nfunction prepareRuleWhileSearch(rule, grammar, endRegexSource, allowA, allowG) {\n const ruleScanner = rule.compileWhileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* FindOption.None */ };\n}\nfunction handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {\n if (captures.length === 0) {\n return;\n }\n const lineTextContent = lineText.content;\n const len = Math.min(captures.length, captureIndices.length);\n const localStack = [];\n const maxEnd = captureIndices[0].end;\n for (let i = 0; i < len; i++) {\n const captureRule = captures[i];\n if (captureRule === null) {\n // Not interested\n continue;\n }\n const captureIndex = captureIndices[i];\n if (captureIndex.length === 0) {\n // Nothing really captured\n continue;\n }\n if (captureIndex.start > maxEnd) {\n // Capture going beyond consumed string\n break;\n }\n // pop captures while needed\n while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {\n // pop!\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n if (localStack.length > 0) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);\n }\n else {\n lineTokens.produce(stack, captureIndex.start);\n }\n if (captureRule.retokenizeCapturedWithRuleId) {\n // the capture requires additional matching\n const scopeName = captureRule.getName(lineTextContent, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);\n const contentName = captureRule.getContentName(lineTextContent, captureIndices);\n const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);\n const stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList);\n const onigSubStr = grammar.createOnigString(lineTextContent.substring(0, captureIndex.end));\n _tokenizeString(grammar, onigSubStr, (isFirstLine && captureIndex.start === 0), captureIndex.start, stackClone, lineTokens, false, /* no time limit */ 0);\n disposeOnigString(onigSubStr);\n continue;\n }\n const captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices);\n if (captureRuleScopeName !== null) {\n // push\n const base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;\n const captureRuleScopesList = base.pushAttributed(captureRuleScopeName, grammar);\n localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));\n }\n }\n while (localStack.length > 0) {\n // pop!\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n}\nclass LocalStackElement {\n scopes;\n endPos;\n constructor(scopes, endPos) {\n this.scopes = scopes;\n this.endPos = endPos;\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nfunction createGrammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib) {\n return new Grammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib); //TODO\n}\nfunction collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {\n const matchers = createMatchers(selector, nameMatcher);\n const ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);\n for (const matcher of matchers) {\n result.push({\n debugSelector: selector,\n matcher: matcher.matcher,\n ruleId: ruleId,\n grammar: grammar,\n priority: matcher.priority\n });\n }\n}\nfunction nameMatcher(identifers, scopes) {\n if (scopes.length < identifers.length) {\n return false;\n }\n let lastIndex = 0;\n return identifers.every(identifier => {\n for (let i = lastIndex; i < scopes.length; i++) {\n if (scopesAreMatching(scopes[i], identifier)) {\n lastIndex = i + 1;\n return true;\n }\n }\n return false;\n });\n}\nfunction scopesAreMatching(thisScopeName, scopeName) {\n if (!thisScopeName) {\n return false;\n }\n if (thisScopeName === scopeName) {\n return true;\n }\n const len = scopeName.length;\n return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === '.';\n}\nclass Grammar {\n _rootScopeName;\n balancedBracketSelectors;\n _onigLib;\n _rootId;\n _lastRuleId;\n _ruleId2desc;\n _includedGrammars;\n _grammarRepository;\n _grammar;\n _injections;\n _basicScopeAttributesProvider;\n _tokenTypeMatchers;\n get themeProvider() { return this._grammarRepository; }\n constructor(_rootScopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, _onigLib) {\n this._rootScopeName = _rootScopeName;\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._onigLib = _onigLib;\n this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(initialLanguage, embeddedLanguages);\n this._rootId = -1;\n this._lastRuleId = 0;\n this._ruleId2desc = [null];\n this._includedGrammars = {};\n this._grammarRepository = grammarRepository;\n this._grammar = initGrammar(grammar, null);\n this._injections = null;\n this._tokenTypeMatchers = [];\n if (tokenTypes) {\n for (const selector of Object.keys(tokenTypes)) {\n const matchers = createMatchers(selector, nameMatcher);\n for (const matcher of matchers) {\n this._tokenTypeMatchers.push({\n matcher: matcher.matcher,\n type: tokenTypes[selector],\n });\n }\n }\n }\n }\n dispose() {\n for (const rule of this._ruleId2desc) {\n if (rule) {\n rule.dispose();\n }\n }\n }\n createOnigScanner(sources) {\n return this._onigLib.createOnigScanner(sources);\n }\n createOnigString(sources) {\n return this._onigLib.createOnigString(sources);\n }\n getMetadataForScope(scope) {\n return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);\n }\n _collectInjections() {\n const grammarRepository = {\n lookup: (scopeName) => {\n if (scopeName === this._rootScopeName) {\n return this._grammar;\n }\n return this.getExternalGrammar(scopeName);\n },\n injections: (scopeName) => {\n return this._grammarRepository.injections(scopeName);\n },\n };\n const result = [];\n const scopeName = this._rootScopeName;\n const grammar = grammarRepository.lookup(scopeName);\n if (grammar) {\n // add injections from the current grammar\n const rawInjections = grammar.injections;\n if (rawInjections) {\n for (let expression in rawInjections) {\n collectInjections(result, expression, rawInjections[expression], this, grammar);\n }\n }\n // add injection grammars contributed for the current scope\n const injectionScopeNames = this._grammarRepository.injections(scopeName);\n if (injectionScopeNames) {\n injectionScopeNames.forEach((injectionScopeName) => {\n const injectionGrammar = this.getExternalGrammar(injectionScopeName);\n if (injectionGrammar) {\n const selector = injectionGrammar.injectionSelector;\n if (selector) {\n collectInjections(result, selector, injectionGrammar, this, injectionGrammar);\n }\n }\n });\n }\n }\n result.sort((i1, i2) => i1.priority - i2.priority); // sort by priority\n return result;\n }\n getInjections() {\n if (this._injections === null) {\n this._injections = this._collectInjections();\n }\n return this._injections;\n }\n registerRule(factory) {\n const id = ++this._lastRuleId;\n const result = factory(ruleIdFromNumber(id));\n this._ruleId2desc[id] = result;\n return result;\n }\n getRule(ruleId) {\n return this._ruleId2desc[ruleIdToNumber(ruleId)];\n }\n getExternalGrammar(scopeName, repository) {\n if (this._includedGrammars[scopeName]) {\n return this._includedGrammars[scopeName];\n }\n else if (this._grammarRepository) {\n const rawIncludedGrammar = this._grammarRepository.lookup(scopeName);\n if (rawIncludedGrammar) {\n // console.log('LOADED GRAMMAR ' + pattern.include);\n this._includedGrammars[scopeName] = initGrammar(rawIncludedGrammar, repository && repository.$base);\n return this._includedGrammars[scopeName];\n }\n }\n return undefined;\n }\n tokenizeLine(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, false, timeLimit);\n return {\n tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly,\n };\n }\n tokenizeLine2(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, true, timeLimit);\n return {\n tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly,\n };\n }\n _tokenize(lineText, prevState, emitBinaryTokens, timeLimit) {\n if (this._rootId === -1) {\n this._rootId = RuleFactory.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository);\n // This ensures ids are deterministic, and thus equal in renderer and webworker.\n this.getInjections();\n }\n let isFirstLine;\n if (!prevState || prevState === StateStackImpl.NULL) {\n isFirstLine = true;\n const rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();\n const defaultStyle = this.themeProvider.getDefaults();\n const defaultMetadata = EncodedTokenAttributes.set(0, rawDefaultMetadata.languageId, rawDefaultMetadata.tokenType, null, defaultStyle.fontStyle, defaultStyle.foregroundId, defaultStyle.backgroundId);\n const rootScopeName = this.getRule(this._rootId).getName(null, null);\n let scopeList;\n if (rootScopeName) {\n scopeList = AttributedScopeStack.createRootAndLookUpScopeName(rootScopeName, defaultMetadata, this);\n }\n else {\n scopeList = AttributedScopeStack.createRoot(\"unknown\", defaultMetadata);\n }\n prevState = new StateStackImpl(null, this._rootId, -1, -1, false, null, scopeList, scopeList);\n }\n else {\n isFirstLine = false;\n prevState.reset();\n }\n lineText = lineText + \"\\n\";\n const onigLineText = this.createOnigString(lineText);\n const lineLength = onigLineText.content.length;\n const lineTokens = new LineTokens(emitBinaryTokens, lineText, this._tokenTypeMatchers, this.balancedBracketSelectors);\n const r = _tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens, true, timeLimit);\n disposeOnigString(onigLineText);\n return {\n lineLength: lineLength,\n lineTokens: lineTokens,\n ruleStack: r.stack,\n stoppedEarly: r.stoppedEarly,\n };\n }\n}\nfunction initGrammar(grammar, base) {\n grammar = clone(grammar);\n grammar.repository = grammar.repository || {};\n grammar.repository.$self = {\n $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,\n patterns: grammar.patterns,\n name: grammar.scopeName\n };\n grammar.repository.$base = base || grammar.repository.$self;\n return grammar;\n}\nclass AttributedScopeStack {\n parent;\n scopePath;\n tokenAttributes;\n static fromExtension(namesScopeList, contentNameScopesList) {\n let current = namesScopeList;\n let scopeNames = namesScopeList?.scopePath ?? null;\n for (const frame of contentNameScopesList) {\n scopeNames = ScopeStack.push(scopeNames, frame.scopeNames);\n current = new AttributedScopeStack(current, scopeNames, frame.encodedTokenAttributes);\n }\n return current;\n }\n static createRoot(scopeName, tokenAttributes) {\n return new AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);\n }\n static createRootAndLookUpScopeName(scopeName, tokenAttributes, grammar) {\n const rawRootMetadata = grammar.getMetadataForScope(scopeName);\n const scopePath = new ScopeStack(null, scopeName);\n const rootStyle = grammar.themeProvider.themeMatch(scopePath);\n const resolvedTokenAttributes = AttributedScopeStack.mergeAttributes(tokenAttributes, rawRootMetadata, rootStyle);\n return new AttributedScopeStack(null, scopePath, resolvedTokenAttributes);\n }\n get scopeName() { return this.scopePath.scopeName; }\n /**\n * Invariant:\n * ```\n * if (parent && !scopePath.extends(parent.scopePath)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(parent, scopePath, tokenAttributes) {\n this.parent = parent;\n this.scopePath = scopePath;\n this.tokenAttributes = tokenAttributes;\n }\n toString() {\n return this.getScopeNames().join(' ');\n }\n equals(other) {\n return AttributedScopeStack.equals(this, other);\n }\n static equals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n // End of list reached for both\n return true;\n }\n if (!a || !b) {\n // End of list reached only for one\n return false;\n }\n if (a.scopeName !== b.scopeName || a.tokenAttributes !== b.tokenAttributes) {\n return false;\n }\n // Go to previous pair\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n static mergeAttributes(existingTokenAttributes, basicScopeAttributes, styleAttributes) {\n let fontStyle = -1 /* FontStyle.NotSet */;\n let foreground = 0;\n let background = 0;\n if (styleAttributes !== null) {\n fontStyle = styleAttributes.fontStyle;\n foreground = styleAttributes.foregroundId;\n background = styleAttributes.backgroundId;\n }\n return EncodedTokenAttributes.set(existingTokenAttributes, basicScopeAttributes.languageId, basicScopeAttributes.tokenType, null, fontStyle, foreground, background);\n }\n pushAttributed(scopePath, grammar) {\n if (scopePath === null) {\n return this;\n }\n if (scopePath.indexOf(' ') === -1) {\n // This is the common case and much faster\n return AttributedScopeStack._pushAttributed(this, scopePath, grammar);\n }\n const scopes = scopePath.split(/ /g);\n let result = this;\n for (const scope of scopes) {\n result = AttributedScopeStack._pushAttributed(result, scope, grammar);\n }\n return result;\n }\n static _pushAttributed(target, scopeName, grammar) {\n const rawMetadata = grammar.getMetadataForScope(scopeName);\n const newPath = target.scopePath.push(scopeName);\n const scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);\n const metadata = AttributedScopeStack.mergeAttributes(target.tokenAttributes, rawMetadata, scopeThemeMatchResult);\n return new AttributedScopeStack(target, newPath, metadata);\n }\n getScopeNames() {\n return this.scopePath.getSegments();\n }\n getExtensionIfDefined(base) {\n const result = [];\n let self = this;\n while (self && self !== base) {\n result.push({\n encodedTokenAttributes: self.tokenAttributes,\n scopeNames: self.scopePath.getExtensionIfDefined(self.parent?.scopePath ?? null),\n });\n self = self.parent;\n }\n return self === base ? result.reverse() : undefined;\n }\n}\n/**\n * Represents a \"pushed\" state on the stack (as a linked list element).\n */\nclass StateStackImpl {\n parent;\n ruleId;\n beginRuleCapturedEOL;\n endRule;\n nameScopesList;\n contentNameScopesList;\n _stackElementBrand = undefined;\n // TODO remove me\n static NULL = new StateStackImpl(null, 0, 0, 0, false, null, null, null);\n /**\n * The position on the current line where this state was pushed.\n * This is relevant only while tokenizing a line, to detect endless loops.\n * Its value is meaningless across lines.\n */\n _enterPos;\n /**\n * The captured anchor position when this stack element was pushed.\n * This is relevant only while tokenizing a line, to restore the anchor position when popping.\n * Its value is meaningless across lines.\n */\n _anchorPos;\n /**\n * The depth of the stack.\n */\n depth;\n /**\n * Invariant:\n * ```\n * if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {\n * \tthrow new Error();\n * }\n * if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(\n /**\n * The previous state on the stack (or null for the root state).\n */\n parent, \n /**\n * The state (rule) that this element represents.\n */\n ruleId, enterPos, anchorPos, \n /**\n * The state has entered and captured \\n. This means that the next line should have an anchorPosition of 0.\n */\n beginRuleCapturedEOL, \n /**\n * The \"pop\" (end) condition for this state in case that it was dynamically generated through captured text.\n */\n endRule, \n /**\n * The list of scopes containing the \"name\" for this state.\n */\n nameScopesList, \n /**\n * The list of scopes containing the \"contentName\" (besides \"name\") for this state.\n * This list **must** contain as an element `scopeName`.\n */\n contentNameScopesList) {\n this.parent = parent;\n this.ruleId = ruleId;\n this.beginRuleCapturedEOL = beginRuleCapturedEOL;\n this.endRule = endRule;\n this.nameScopesList = nameScopesList;\n this.contentNameScopesList = contentNameScopesList;\n this.depth = this.parent ? this.parent.depth + 1 : 1;\n this._enterPos = enterPos;\n this._anchorPos = anchorPos;\n }\n equals(other) {\n if (other === null) {\n return false;\n }\n return StateStackImpl._equals(this, other);\n }\n static _equals(a, b) {\n if (a === b) {\n return true;\n }\n if (!this._structuralEquals(a, b)) {\n return false;\n }\n return AttributedScopeStack.equals(a.contentNameScopesList, b.contentNameScopesList);\n }\n /**\n * A structural equals check. Does not take into account `scopes`.\n */\n static _structuralEquals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n // End of list reached for both\n return true;\n }\n if (!a || !b) {\n // End of list reached only for one\n return false;\n }\n if (a.depth !== b.depth ||\n a.ruleId !== b.ruleId ||\n a.endRule !== b.endRule) {\n return false;\n }\n // Go to previous pair\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n clone() {\n return this;\n }\n static _reset(el) {\n while (el) {\n el._enterPos = -1;\n el._anchorPos = -1;\n el = el.parent;\n }\n }\n reset() {\n StateStackImpl._reset(this);\n }\n pop() {\n return this.parent;\n }\n safePop() {\n if (this.parent) {\n return this.parent;\n }\n return this;\n }\n push(ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {\n return new StateStackImpl(this, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList);\n }\n getEnterPos() {\n return this._enterPos;\n }\n getAnchorPos() {\n return this._anchorPos;\n }\n getRule(grammar) {\n return grammar.getRule(this.ruleId);\n }\n toString() {\n const r = [];\n this._writeString(r, 0);\n return \"[\" + r.join(\",\") + \"]\";\n }\n _writeString(res, outIndex) {\n if (this.parent) {\n outIndex = this.parent._writeString(res, outIndex);\n }\n res[outIndex++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`;\n return outIndex;\n }\n withContentNameScopesList(contentNameScopeStack) {\n if (this.contentNameScopesList === contentNameScopeStack) {\n return this;\n }\n return this.parent.push(this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, this.endRule, this.nameScopesList, contentNameScopeStack);\n }\n withEndRule(endRule) {\n if (this.endRule === endRule) {\n return this;\n }\n return new StateStackImpl(this.parent, this.ruleId, this._enterPos, this._anchorPos, this.beginRuleCapturedEOL, endRule, this.nameScopesList, this.contentNameScopesList);\n }\n // Used to warn of endless loops\n hasSameRuleAs(other) {\n let el = this;\n while (el && el._enterPos === other._enterPos) {\n if (el.ruleId === other.ruleId) {\n return true;\n }\n el = el.parent;\n }\n return false;\n }\n toStateStackFrame() {\n return {\n ruleId: ruleIdToNumber(this.ruleId),\n beginRuleCapturedEOL: this.beginRuleCapturedEOL,\n endRule: this.endRule,\n nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],\n contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? [],\n };\n }\n static pushFrame(self, frame) {\n const namesScopeList = AttributedScopeStack.fromExtension(self?.nameScopesList ?? null, frame.nameScopesList);\n return new StateStackImpl(self, ruleIdFromNumber(frame.ruleId), frame.enterPos ?? -1, frame.anchorPos ?? -1, frame.beginRuleCapturedEOL, frame.endRule, namesScopeList, AttributedScopeStack.fromExtension(namesScopeList, frame.contentNameScopesList));\n }\n}\nclass BalancedBracketSelectors {\n balancedBracketScopes;\n unbalancedBracketScopes;\n allowAny = false;\n constructor(balancedBracketScopes, unbalancedBracketScopes) {\n this.balancedBracketScopes = balancedBracketScopes.flatMap((selector) => {\n if (selector === '*') {\n this.allowAny = true;\n return [];\n }\n return createMatchers(selector, nameMatcher).map((m) => m.matcher);\n });\n this.unbalancedBracketScopes = unbalancedBracketScopes.flatMap((selector) => createMatchers(selector, nameMatcher).map((m) => m.matcher));\n }\n get matchesAlways() {\n return this.allowAny && this.unbalancedBracketScopes.length === 0;\n }\n get matchesNever() {\n return this.balancedBracketScopes.length === 0 && !this.allowAny;\n }\n match(scopes) {\n for (const excluder of this.unbalancedBracketScopes) {\n if (excluder(scopes)) {\n return false;\n }\n }\n for (const includer of this.balancedBracketScopes) {\n if (includer(scopes)) {\n return true;\n }\n }\n return this.allowAny;\n }\n}\nclass LineTokens {\n balancedBracketSelectors;\n _emitBinaryTokens;\n /**\n * defined only if `false`.\n */\n _lineText;\n /**\n * used only if `_emitBinaryTokens` is false.\n */\n _tokens;\n /**\n * used only if `_emitBinaryTokens` is true.\n */\n _binaryTokens;\n _lastTokenEndIndex;\n _tokenTypeOverrides;\n constructor(emitBinaryTokens, lineText, tokenTypeOverrides, balancedBracketSelectors) {\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._emitBinaryTokens = emitBinaryTokens;\n this._tokenTypeOverrides = tokenTypeOverrides;\n {\n this._lineText = null;\n }\n this._tokens = [];\n this._binaryTokens = [];\n this._lastTokenEndIndex = 0;\n }\n produce(stack, endIndex) {\n this.produceFromScopes(stack.contentNameScopesList, endIndex);\n }\n produceFromScopes(scopesList, endIndex) {\n if (this._lastTokenEndIndex >= endIndex) {\n return;\n }\n if (this._emitBinaryTokens) {\n let metadata = scopesList?.tokenAttributes ?? 0;\n let containsBalancedBrackets = false;\n if (this.balancedBracketSelectors?.matchesAlways) {\n containsBalancedBrackets = true;\n }\n if (this._tokenTypeOverrides.length > 0 || (this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever)) {\n // Only generate scope array when required to improve performance\n const scopes = scopesList?.getScopeNames() ?? [];\n for (const tokenType of this._tokenTypeOverrides) {\n if (tokenType.matcher(scopes)) {\n metadata = EncodedTokenAttributes.set(metadata, 0, toOptionalTokenType(tokenType.type), null, -1 /* FontStyle.NotSet */, 0, 0);\n }\n }\n if (this.balancedBracketSelectors) {\n containsBalancedBrackets = this.balancedBracketSelectors.match(scopes);\n }\n }\n if (containsBalancedBrackets) {\n metadata = EncodedTokenAttributes.set(metadata, 0, 8 /* OptionalStandardTokenType.NotSet */, containsBalancedBrackets, -1 /* FontStyle.NotSet */, 0, 0);\n }\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {\n // no need to push a token with the same metadata\n this._lastTokenEndIndex = endIndex;\n return;\n }\n this._binaryTokens.push(this._lastTokenEndIndex);\n this._binaryTokens.push(metadata);\n this._lastTokenEndIndex = endIndex;\n return;\n }\n const scopes = scopesList?.getScopeNames() ?? [];\n this._tokens.push({\n startIndex: this._lastTokenEndIndex,\n endIndex: endIndex,\n // value: lineText.substring(lastTokenEndIndex, endIndex),\n scopes: scopes\n });\n this._lastTokenEndIndex = endIndex;\n }\n getResult(stack, lineLength) {\n if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {\n // pop produced token for newline\n this._tokens.pop();\n }\n if (this._tokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._tokens[this._tokens.length - 1].startIndex = 0;\n }\n return this._tokens;\n }\n getBinaryResult(stack, lineLength) {\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {\n // pop produced token for newline\n this._binaryTokens.pop();\n this._binaryTokens.pop();\n }\n if (this._binaryTokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._binaryTokens[this._binaryTokens.length - 2] = 0;\n }\n const result = new Uint32Array(this._binaryTokens.length);\n for (let i = 0, len = this._binaryTokens.length; i < len; i++) {\n result[i] = this._binaryTokens[i];\n }\n return result;\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\nclass SyncRegistry {\n _onigLibPromise;\n _grammars = new Map();\n _rawGrammars = new Map();\n _injectionGrammars = new Map();\n _theme;\n constructor(theme, _onigLibPromise) {\n this._onigLibPromise = _onigLibPromise;\n this._theme = theme;\n }\n dispose() {\n for (const grammar of this._grammars.values()) {\n grammar.dispose();\n }\n }\n setTheme(theme) {\n this._theme = theme;\n }\n getColorMap() {\n return this._theme.getColorMap();\n }\n /**\n * Add `grammar` to registry and return a list of referenced scope names\n */\n addGrammar(grammar, injectionScopeNames) {\n this._rawGrammars.set(grammar.scopeName, grammar);\n if (injectionScopeNames) {\n this._injectionGrammars.set(grammar.scopeName, injectionScopeNames);\n }\n }\n /**\n * Lookup a raw grammar.\n */\n lookup(scopeName) {\n return this._rawGrammars.get(scopeName);\n }\n /**\n * Returns the injections for the given grammar\n */\n injections(targetScope) {\n return this._injectionGrammars.get(targetScope);\n }\n /**\n * Get the default theme settings\n */\n getDefaults() {\n return this._theme.getDefaults();\n }\n /**\n * Match a scope in the theme.\n */\n themeMatch(scopePath) {\n return this._theme.match(scopePath);\n }\n /**\n * Lookup a grammar.\n */\n async grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n if (!this._grammars.has(scopeName)) {\n let rawGrammar = this._rawGrammars.get(scopeName);\n if (!rawGrammar) {\n return null;\n }\n this._grammars.set(scopeName, createGrammar(scopeName, rawGrammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, this, await this._onigLibPromise));\n }\n return this._grammars.get(scopeName);\n }\n}\n\n/*---------------------------------------------------------\n * Copyright (C) Microsoft Corporation. All rights reserved.\n *--------------------------------------------------------*/\n/**\n * The registry that will hold all grammars.\n */\nlet Registry$1 = class Registry {\n _options;\n _syncRegistry;\n _ensureGrammarCache;\n constructor(options) {\n this._options = options;\n this._syncRegistry = new SyncRegistry(Theme.createFromRawTheme(options.theme, options.colorMap), options.onigLib);\n this._ensureGrammarCache = new Map();\n }\n dispose() {\n this._syncRegistry.dispose();\n }\n /**\n * Change the theme. Once called, no previous `ruleStack` should be used anymore.\n */\n setTheme(theme, colorMap) {\n this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, colorMap));\n }\n /**\n * Returns a lookup array for color ids.\n */\n getColorMap() {\n return this._syncRegistry.getColorMap();\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithEmbeddedLanguages(initialScopeName, initialLanguage, embeddedLanguages) {\n return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages });\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithConfiguration(initialScopeName, initialLanguage, configuration) {\n return this._loadGrammar(initialScopeName, initialLanguage, configuration.embeddedLanguages, configuration.tokenTypes, new BalancedBracketSelectors(configuration.balancedBracketSelectors || [], configuration.unbalancedBracketSelectors || []));\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n */\n loadGrammar(initialScopeName) {\n return this._loadGrammar(initialScopeName, 0, null, null, null);\n }\n async _loadGrammar(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n const dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName);\n while (dependencyProcessor.Q.length > 0) {\n await Promise.all(dependencyProcessor.Q.map((request) => this._loadSingleGrammar(request.scopeName)));\n dependencyProcessor.processQueue();\n }\n return this._grammarForScopeName(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors);\n }\n async _loadSingleGrammar(scopeName) {\n if (!this._ensureGrammarCache.has(scopeName)) {\n this._ensureGrammarCache.set(scopeName, this._doLoadSingleGrammar(scopeName));\n }\n return this._ensureGrammarCache.get(scopeName);\n }\n async _doLoadSingleGrammar(scopeName) {\n const grammar = await this._options.loadGrammar(scopeName);\n if (grammar) {\n const injections = typeof this._options.getInjections === \"function\" ? this._options.getInjections(scopeName) : undefined;\n this._syncRegistry.addGrammar(grammar, injections);\n }\n }\n /**\n * Adds a rawGrammar.\n */\n async addGrammar(rawGrammar, injections = [], initialLanguage = 0, embeddedLanguages = null) {\n this._syncRegistry.addGrammar(rawGrammar, injections);\n return (await this._grammarForScopeName(rawGrammar.scopeName, initialLanguage, embeddedLanguages));\n }\n /**\n * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.\n */\n _grammarForScopeName(scopeName, initialLanguage = 0, embeddedLanguages = null, tokenTypes = null, balancedBracketSelectors = null) {\n return this._syncRegistry.grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors);\n }\n};\nconst INITIAL = StateStackImpl.NULL;\n\n/**\n * Helpers to manage the \"collapsed\" metadata of an entire StackElement stack.\n * The following assumptions have been made:\n * - languageId < 256 => needs 8 bits\n * - unique color count < 512 => needs 9 bits\n *\n * The binary format is:\n * - -------------------------------------------\n * 3322 2222 2222 1111 1111 1100 0000 0000\n * 1098 7654 3210 9876 5432 1098 7654 3210\n * - -------------------------------------------\n * xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx\n * bbbb bbbb bfff ffff ffFF FTTT LLLL LLLL\n * - -------------------------------------------\n * - L = LanguageId (8 bits)\n * - T = StandardTokenType (3 bits)\n * - F = FontStyle (3 bits)\n * - f = foreground color (9 bits)\n * - b = background color (9 bits)\n */\nconst MetadataConsts = {\n LANGUAGEID_MASK: 0b00000000000000000000000011111111,\n TOKEN_TYPE_MASK: 0b00000000000000000000001100000000,\n BALANCED_BRACKETS_MASK: 0b00000000000000000000010000000000,\n FONT_STYLE_MASK: 0b00000000000000000011100000000000,\n FOREGROUND_MASK: 0b00000000011111111100000000000000,\n BACKGROUND_MASK: 0b11111111100000000000000000000000,\n LANGUAGEID_OFFSET: 0,\n TOKEN_TYPE_OFFSET: 8,\n BALANCED_BRACKETS_OFFSET: 10,\n FONT_STYLE_OFFSET: 11,\n FOREGROUND_OFFSET: 15,\n BACKGROUND_OFFSET: 24,\n};\nclass StackElementMetadata {\n static toBinaryStr(metadata) {\n let r = metadata.toString(2);\n while (r.length < 32)\n r = `0${r}`;\n return r;\n }\n // public static printMetadata(metadata: number): void {\n // const languageId = StackElementMetadata.getLanguageId(metadata)\n // const tokenType = StackElementMetadata.getTokenType(metadata)\n // const fontStyle = StackElementMetadata.getFontStyle(metadata)\n // const foreground = StackElementMetadata.getForeground(metadata)\n // const background = StackElementMetadata.getBackground(metadata)\n // console.log({\n // languageId,\n // tokenType,\n // fontStyle,\n // foreground,\n // background,\n // })\n // }\n static getLanguageId(metadata) {\n return (metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET;\n }\n static getTokenType(metadata) {\n return (metadata & MetadataConsts.TOKEN_TYPE_MASK) >>> MetadataConsts.TOKEN_TYPE_OFFSET;\n }\n static getFontStyle(metadata) {\n return (metadata & MetadataConsts.FONT_STYLE_MASK) >>> MetadataConsts.FONT_STYLE_OFFSET;\n }\n static getForeground(metadata) {\n return (metadata & MetadataConsts.FOREGROUND_MASK) >>> MetadataConsts.FOREGROUND_OFFSET;\n }\n static getBackground(metadata) {\n return (metadata & MetadataConsts.BACKGROUND_MASK) >>> MetadataConsts.BACKGROUND_OFFSET;\n }\n static containsBalancedBrackets(metadata) {\n return (metadata & MetadataConsts.BALANCED_BRACKETS_MASK) !== 0;\n }\n static set(metadata, languageId, tokenType, fontStyle, foreground, background) {\n let _languageId = StackElementMetadata.getLanguageId(metadata);\n let _tokenType = StackElementMetadata.getTokenType(metadata);\n let _fontStyle = StackElementMetadata.getFontStyle(metadata);\n let _foreground = StackElementMetadata.getForeground(metadata);\n let _background = StackElementMetadata.getBackground(metadata);\n const _containsBalancedBracketsBit = StackElementMetadata.containsBalancedBrackets(metadata)\n ? 1\n : 0;\n if (languageId !== 0)\n _languageId = languageId;\n if (tokenType !== 0 /* TemporaryStandardTokenType.Other */) {\n _tokenType\n = tokenType === 8 /* TemporaryStandardTokenType.MetaEmbedded */ ? 0 /* StandardTokenType.Other */ : tokenType;\n }\n if (fontStyle !== FontStyle.NotSet)\n _fontStyle = fontStyle;\n if (foreground !== 0)\n _foreground = foreground;\n if (background !== 0)\n _background = background;\n return (((_languageId << MetadataConsts.LANGUAGEID_OFFSET)\n | (_tokenType << MetadataConsts.TOKEN_TYPE_OFFSET)\n | (_fontStyle << MetadataConsts.FONT_STYLE_OFFSET)\n | (_containsBalancedBracketsBit << MetadataConsts.BALANCED_BRACKETS_OFFSET)\n | (_foreground << MetadataConsts.FOREGROUND_OFFSET)\n | (_background << MetadataConsts.BACKGROUND_OFFSET))\n >>> 0);\n }\n}\n\nexport { INITIAL, Registry$1 as Registry, StackElementMetadata, Theme };\n","import { INITIAL, StackElementMetadata, Registry as Registry$1, Theme } from './textmate.mjs';\nimport { FontStyle } from './types.mjs';\n\nfunction toArray(x) {\n return Array.isArray(x) ? x : [x];\n}\n/**\n * Split a string into lines, each line preserves the line ending.\n */\nfunction splitLines(code, preserveEnding = false) {\n const parts = code.split(/(\\r?\\n)/g);\n let index = 0;\n const lines = [];\n for (let i = 0; i < parts.length; i += 2) {\n const line = preserveEnding\n ? parts[i] + (parts[i + 1] || '')\n : parts[i];\n lines.push([line, index]);\n index += parts[i].length;\n index += parts[i + 1]?.length || 0;\n }\n return lines;\n}\n/**\n * Check if the language is plaintext that is ignored by Shiki.\n *\n * Hard-coded plain text languages: `plaintext`, `txt`, `text`, `plain`.\n */\nfunction isPlainLang(lang) {\n return !lang || ['plaintext', 'txt', 'text', 'plain'].includes(lang);\n}\n/**\n * Check if the language is specially handled or bypassed by Shiki.\n *\n * Hard-coded languages: `ansi` and plaintexts like `plaintext`, `txt`, `text`, `plain`.\n */\nfunction isSpecialLang(lang) {\n return lang === 'ansi' || isPlainLang(lang);\n}\n/**\n * Check if the theme is specially handled or bypassed by Shiki.\n *\n * Hard-coded themes: `none`.\n */\nfunction isNoneTheme(theme) {\n return theme === 'none';\n}\n/**\n * Check if the theme is specially handled or bypassed by Shiki.\n *\n * Hard-coded themes: `none`.\n */\nfunction isSpecialTheme(theme) {\n return isNoneTheme(theme);\n}\n/**\n * Utility to append class to a hast node\n *\n * If the `property.class` is a string, it will be splitted by space and converted to an array.\n */\nfunction addClassToHast(node, className) {\n if (!className)\n return node;\n node.properties ||= {};\n node.properties.class ||= [];\n if (typeof node.properties.class === 'string')\n node.properties.class = node.properties.class.split(/\\s+/g);\n if (!Array.isArray(node.properties.class))\n node.properties.class = [];\n const targets = Array.isArray(className) ? className : className.split(/\\s+/g);\n for (const c of targets) {\n if (c && !node.properties.class.includes(c))\n node.properties.class.push(c);\n }\n return node;\n}\n/**\n * Split a token into multiple tokens by given offsets.\n *\n * The offsets are relative to the token, and should be sorted.\n */\nfunction splitToken(token, offsets) {\n let lastOffset = 0;\n const tokens = [];\n for (const offset of offsets) {\n if (offset > lastOffset) {\n tokens.push({\n ...token,\n content: token.content.slice(lastOffset, offset),\n offset: token.offset + lastOffset,\n });\n }\n lastOffset = offset;\n }\n if (lastOffset < token.content.length) {\n tokens.push({\n ...token,\n content: token.content.slice(lastOffset),\n offset: token.offset + lastOffset,\n });\n }\n return tokens;\n}\n/**\n * Split 2D tokens array by given breakpoints.\n */\nfunction splitTokens(tokens, breakpoints) {\n const sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints))\n .sort((a, b) => a - b);\n if (!sorted.length)\n return tokens;\n return tokens.map((line) => {\n return line.flatMap((token) => {\n const breakpointsInToken = sorted\n .filter(i => token.offset < i && i < token.offset + token.content.length)\n .map(i => i - token.offset)\n .sort((a, b) => a - b);\n if (!breakpointsInToken.length)\n return token;\n return splitToken(token, breakpointsInToken);\n });\n });\n}\nfunction resolveColorReplacements(theme, options) {\n const replacements = typeof theme === 'string' ? {} : { ...theme.colorReplacements };\n const themeName = typeof theme === 'string' ? theme : theme.name;\n for (const [key, value] of Object.entries(options?.colorReplacements || {})) {\n if (typeof value === 'string')\n replacements[key] = value;\n else if (key === themeName)\n Object.assign(replacements, value);\n }\n return replacements;\n}\nfunction applyColorReplacements(color, replacements) {\n if (!color)\n return color;\n return replacements?.[color?.toLowerCase()] || color;\n}\nfunction getTokenStyleObject(token) {\n const styles = {};\n if (token.color)\n styles.color = token.color;\n if (token.bgColor)\n styles['background-color'] = token.bgColor;\n if (token.fontStyle) {\n if (token.fontStyle & FontStyle.Italic)\n styles['font-style'] = 'italic';\n if (token.fontStyle & FontStyle.Bold)\n styles['font-weight'] = 'bold';\n if (token.fontStyle & FontStyle.Underline)\n styles['text-decoration'] = 'underline';\n }\n return styles;\n}\nfunction stringifyTokenStyle(token) {\n return Object.entries(token).map(([key, value]) => `${key}:${value}`).join(';');\n}\n/**\n * Creates a converter between index and position in a code block.\n *\n * Overflow/underflow are unchecked.\n */\nfunction createPositionConverter(code) {\n const lines = splitLines(code, true).map(([line]) => line);\n function indexToPos(index) {\n if (index === code.length) {\n return {\n line: lines.length - 1,\n character: lines[lines.length - 1].length,\n };\n }\n let character = index;\n let line = 0;\n for (const lineText of lines) {\n if (character < lineText.length)\n break;\n character -= lineText.length;\n line++;\n }\n return { line, character };\n }\n function posToIndex(line, character) {\n let index = 0;\n for (let i = 0; i < line; i++)\n index += lines[i].length;\n index += character;\n return index;\n }\n return {\n lines,\n indexToPos,\n posToIndex,\n };\n}\n\n// src/colors.ts\nvar namedColors = [\n \"black\",\n \"red\",\n \"green\",\n \"yellow\",\n \"blue\",\n \"magenta\",\n \"cyan\",\n \"white\",\n \"brightBlack\",\n \"brightRed\",\n \"brightGreen\",\n \"brightYellow\",\n \"brightBlue\",\n \"brightMagenta\",\n \"brightCyan\",\n \"brightWhite\"\n];\n\n// src/decorations.ts\nvar decorations = {\n 1: \"bold\",\n 2: \"dim\",\n 3: \"italic\",\n 4: \"underline\",\n 7: \"reverse\",\n 9: \"strikethrough\"\n};\n\n// src/parser.ts\nfunction findSequence(value, position) {\n const nextEscape = value.indexOf(\"\\x1B[\", position);\n if (nextEscape !== -1) {\n const nextClose = value.indexOf(\"m\", nextEscape);\n return {\n sequence: value.substring(nextEscape + 2, nextClose).split(\";\"),\n startPosition: nextEscape,\n position: nextClose + 1\n };\n }\n return {\n position: value.length\n };\n}\nfunction parseColor(sequence, index) {\n let offset = 1;\n const colorMode = sequence[index + offset++];\n let color;\n if (colorMode === \"2\") {\n const rgb = [\n sequence[index + offset++],\n sequence[index + offset++],\n sequence[index + offset]\n ].map((x) => Number.parseInt(x));\n if (rgb.length === 3 && !rgb.some((x) => Number.isNaN(x))) {\n color = {\n type: \"rgb\",\n rgb\n };\n }\n } else if (colorMode === \"5\") {\n const colorIndex = Number.parseInt(sequence[index + offset]);\n if (!Number.isNaN(colorIndex)) {\n color = { type: \"table\", index: Number(colorIndex) };\n }\n }\n return [offset, color];\n}\nfunction parseSequence(sequence) {\n const commands = [];\n for (let i = 0; i < sequence.length; i++) {\n const code = sequence[i];\n const codeInt = Number.parseInt(code);\n if (Number.isNaN(codeInt))\n continue;\n if (codeInt === 0) {\n commands.push({ type: \"resetAll\" });\n } else if (codeInt <= 9) {\n const decoration = decorations[codeInt];\n if (decoration) {\n commands.push({\n type: \"setDecoration\",\n value: decorations[codeInt]\n });\n }\n } else if (codeInt <= 29) {\n const decoration = decorations[codeInt - 20];\n if (decoration) {\n commands.push({\n type: \"resetDecoration\",\n value: decoration\n });\n }\n } else if (codeInt <= 37) {\n commands.push({\n type: \"setForegroundColor\",\n value: { type: \"named\", name: namedColors[codeInt - 30] }\n });\n } else if (codeInt === 38) {\n const [offset, color] = parseColor(sequence, i);\n if (color) {\n commands.push({\n type: \"setForegroundColor\",\n value: color\n });\n }\n i += offset;\n } else if (codeInt === 39) {\n commands.push({\n type: \"resetForegroundColor\"\n });\n } else if (codeInt <= 47) {\n commands.push({\n type: \"setBackgroundColor\",\n value: { type: \"named\", name: namedColors[codeInt - 40] }\n });\n } else if (codeInt === 48) {\n const [offset, color] = parseColor(sequence, i);\n if (color) {\n commands.push({\n type: \"setBackgroundColor\",\n value: color\n });\n }\n i += offset;\n } else if (codeInt === 49) {\n commands.push({\n type: \"resetBackgroundColor\"\n });\n } else if (codeInt >= 90 && codeInt <= 97) {\n commands.push({\n type: \"setForegroundColor\",\n value: { type: \"named\", name: namedColors[codeInt - 90 + 8] }\n });\n } else if (codeInt >= 100 && codeInt <= 107) {\n commands.push({\n type: \"setBackgroundColor\",\n value: { type: \"named\", name: namedColors[codeInt - 100 + 8] }\n });\n }\n }\n return commands;\n}\nfunction createAnsiSequenceParser() {\n let foreground = null;\n let background = null;\n let decorations2 = /* @__PURE__ */ new Set();\n return {\n parse(value) {\n const tokens = [];\n let position = 0;\n do {\n const findResult = findSequence(value, position);\n const text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);\n if (text.length > 0) {\n tokens.push({\n value: text,\n foreground,\n background,\n decorations: new Set(decorations2)\n });\n }\n if (findResult.sequence) {\n const commands = parseSequence(findResult.sequence);\n for (const styleToken of commands) {\n if (styleToken.type === \"resetAll\") {\n foreground = null;\n background = null;\n decorations2.clear();\n } else if (styleToken.type === \"resetForegroundColor\") {\n foreground = null;\n } else if (styleToken.type === \"resetBackgroundColor\") {\n background = null;\n } else if (styleToken.type === \"resetDecoration\") {\n decorations2.delete(styleToken.value);\n }\n }\n for (const styleToken of commands) {\n if (styleToken.type === \"setForegroundColor\") {\n foreground = styleToken.value;\n } else if (styleToken.type === \"setBackgroundColor\") {\n background = styleToken.value;\n } else if (styleToken.type === \"setDecoration\") {\n decorations2.add(styleToken.value);\n }\n }\n }\n position = findResult.position;\n } while (position < value.length);\n return tokens;\n }\n };\n}\n\n// src/palette.ts\nvar defaultNamedColorsMap = {\n black: \"#000000\",\n red: \"#bb0000\",\n green: \"#00bb00\",\n yellow: \"#bbbb00\",\n blue: \"#0000bb\",\n magenta: \"#ff00ff\",\n cyan: \"#00bbbb\",\n white: \"#eeeeee\",\n brightBlack: \"#555555\",\n brightRed: \"#ff5555\",\n brightGreen: \"#00ff00\",\n brightYellow: \"#ffff55\",\n brightBlue: \"#5555ff\",\n brightMagenta: \"#ff55ff\",\n brightCyan: \"#55ffff\",\n brightWhite: \"#ffffff\"\n};\nfunction createColorPalette(namedColorsMap = defaultNamedColorsMap) {\n function namedColor(name) {\n return namedColorsMap[name];\n }\n function rgbColor(rgb) {\n return `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, \"0\")).join(\"\")}`;\n }\n let colorTable;\n function getColorTable() {\n if (colorTable) {\n return colorTable;\n }\n colorTable = [];\n for (let i = 0; i < namedColors.length; i++) {\n colorTable.push(namedColor(namedColors[i]));\n }\n let levels = [0, 95, 135, 175, 215, 255];\n for (let r = 0; r < 6; r++) {\n for (let g = 0; g < 6; g++) {\n for (let b = 0; b < 6; b++) {\n colorTable.push(rgbColor([levels[r], levels[g], levels[b]]));\n }\n }\n }\n let level = 8;\n for (let i = 0; i < 24; i++, level += 10) {\n colorTable.push(rgbColor([level, level, level]));\n }\n return colorTable;\n }\n function tableColor(index) {\n return getColorTable()[index];\n }\n function value(color) {\n switch (color.type) {\n case \"named\":\n return namedColor(color.name);\n case \"rgb\":\n return rgbColor(color.rgb);\n case \"table\":\n return tableColor(color.index);\n }\n }\n return {\n value\n };\n}\n\nfunction tokenizeAnsiWithTheme(theme, fileContents, options) {\n const colorReplacements = resolveColorReplacements(theme, options);\n const lines = splitLines(fileContents);\n const colorPalette = createColorPalette(Object.fromEntries(namedColors.map(name => [\n name,\n theme.colors?.[`terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`],\n ])));\n const parser = createAnsiSequenceParser();\n return lines.map(line => parser.parse(line[0]).map((token) => {\n let color;\n let bgColor;\n if (token.decorations.has('reverse')) {\n color = token.background ? colorPalette.value(token.background) : theme.bg;\n bgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n }\n else {\n color = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n bgColor = token.background ? colorPalette.value(token.background) : undefined;\n }\n color = applyColorReplacements(color, colorReplacements);\n bgColor = applyColorReplacements(bgColor, colorReplacements);\n if (token.decorations.has('dim'))\n color = dimColor(color);\n let fontStyle = FontStyle.None;\n if (token.decorations.has('bold'))\n fontStyle |= FontStyle.Bold;\n if (token.decorations.has('italic'))\n fontStyle |= FontStyle.Italic;\n if (token.decorations.has('underline'))\n fontStyle |= FontStyle.Underline;\n return {\n content: token.value,\n offset: line[1], // TODO: more accurate offset? might need to fork ansi-sequence-parser\n color,\n bgColor,\n fontStyle,\n };\n }));\n}\n/**\n * Adds 50% alpha to a hex color string or the \"-dim\" postfix to a CSS variable\n */\nfunction dimColor(color) {\n const hexMatch = color.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);\n if (hexMatch) {\n if (hexMatch[3]) {\n // convert from #rrggbbaa to #rrggbb(aa/2)\n const alpha = Math.round(Number.parseInt(hexMatch[3], 16) / 2)\n .toString(16)\n .padStart(2, '0');\n return `#${hexMatch[1]}${hexMatch[2]}${alpha}`;\n }\n else if (hexMatch[2]) {\n // convert from #rrggbb to #rrggbb80\n return `#${hexMatch[1]}${hexMatch[2]}80`;\n }\n else {\n // convert from #rgb to #rrggbb80\n return `#${Array.from(hexMatch[1])\n .map(x => `${x}${x}`)\n .join('')}80`;\n }\n }\n const cssVarMatch = color.match(/var\\((--[\\w-]+-ansi-[\\w-]+)\\)/);\n if (cssVarMatch)\n return `var(${cssVarMatch[1]}-dim)`;\n return color;\n}\n\nclass ShikiError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ShikiError';\n }\n}\n\n/**\n * GrammarState is a special reference object that holds the state of a grammar.\n *\n * It's used to highlight code snippets that are part of the target language.\n */\nclass GrammarState {\n _stack;\n lang;\n theme;\n /**\n * Static method to create a initial grammar state.\n */\n static initial(lang, theme) {\n return new GrammarState(INITIAL, lang, theme);\n }\n constructor(_stack, lang, theme) {\n this._stack = _stack;\n this.lang = lang;\n this.theme = theme;\n }\n get scopes() {\n return getScopes(this._stack);\n }\n toJSON() {\n return {\n lang: this.lang,\n theme: this.theme,\n scopes: this.scopes,\n };\n }\n}\nfunction getScopes(stack) {\n const scopes = [];\n const visited = new Set();\n function pushScope(stack) {\n if (visited.has(stack))\n return;\n visited.add(stack);\n const name = stack?.nameScopesList?.scopeName;\n if (name)\n scopes.push(name);\n if (stack.parent)\n pushScope(stack.parent);\n }\n pushScope(stack);\n return scopes;\n}\nfunction getGrammarStack(state) {\n if (!(state instanceof GrammarState))\n throw new ShikiError('Invalid grammar state');\n // @ts-expect-error _stack is private\n return state._stack;\n}\n\n/**\n * Code to tokens, with a simple theme.\n */\nfunction codeToTokensBase(internal, code, options = {}) {\n const { lang = 'text', theme: themeName = internal.getLoadedThemes()[0], } = options;\n if (isPlainLang(lang) || isNoneTheme(themeName))\n return splitLines(code).map(line => [{ content: line[0], offset: line[1] }]);\n const { theme, colorMap } = internal.setTheme(themeName);\n if (lang === 'ansi')\n return tokenizeAnsiWithTheme(theme, code, options);\n const _grammar = internal.getLanguage(lang);\n if (options.grammarState) {\n if (options.grammarState.lang !== _grammar.name) {\n throw new ShikiError(`Grammar state language \"${options.grammarState.lang}\" does not match highlight language \"${_grammar.name}\"`);\n }\n if (options.grammarState.theme !== themeName) {\n throw new ShikiError(`Grammar state theme \"${options.grammarState.theme}\" does not match highlight theme \"${themeName}\"`);\n }\n }\n return tokenizeWithTheme(code, _grammar, theme, colorMap, options);\n}\nfunction getLastGrammarState(internal, code, options = {}) {\n const { lang = 'text', theme: themeName = internal.getLoadedThemes()[0], } = options;\n if (isPlainLang(lang) || isNoneTheme(themeName))\n throw new ShikiError('Plain language does not have grammar state');\n if (lang === 'ansi')\n throw new ShikiError('ANSI language does not have grammar state');\n const { theme, colorMap } = internal.setTheme(themeName);\n const _grammar = internal.getLanguage(lang);\n return new GrammarState(_tokenizeWithTheme(code, _grammar, theme, colorMap, options).stateStack, _grammar.name, theme.name);\n}\nfunction tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n return _tokenizeWithTheme(code, grammar, theme, colorMap, options).tokens;\n}\nfunction _tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n const colorReplacements = resolveColorReplacements(theme, options);\n const { tokenizeMaxLineLength = 0, tokenizeTimeLimit = 500, } = options;\n const lines = splitLines(code);\n let stateStack = options.grammarState\n ? getGrammarStack(options.grammarState)\n : options.grammarContextCode != null\n ? _tokenizeWithTheme(options.grammarContextCode, grammar, theme, colorMap, {\n ...options,\n grammarState: undefined,\n grammarContextCode: undefined,\n }).stateStack\n : INITIAL;\n let actual = [];\n const final = [];\n for (let i = 0, len = lines.length; i < len; i++) {\n const [line, lineOffset] = lines[i];\n if (line === '') {\n actual = [];\n final.push([]);\n continue;\n }\n // Do not attempt to tokenize if the line length is longer than the `tokenizationMaxLineLength`\n if (tokenizeMaxLineLength > 0 && line.length >= tokenizeMaxLineLength) {\n actual = [];\n final.push([{\n content: line,\n offset: lineOffset,\n color: '',\n fontStyle: 0,\n }]);\n continue;\n }\n let resultWithScopes;\n let tokensWithScopes;\n let tokensWithScopesIndex;\n if (options.includeExplanation) {\n resultWithScopes = grammar.tokenizeLine(line, stateStack);\n tokensWithScopes = resultWithScopes.tokens;\n tokensWithScopesIndex = 0;\n }\n const result = grammar.tokenizeLine2(line, stateStack, tokenizeTimeLimit);\n const tokensLength = result.tokens.length / 2;\n for (let j = 0; j < tokensLength; j++) {\n const startIndex = result.tokens[2 * j];\n const nextStartIndex = j + 1 < tokensLength ? result.tokens[2 * j + 2] : line.length;\n if (startIndex === nextStartIndex)\n continue;\n const metadata = result.tokens[2 * j + 1];\n const color = applyColorReplacements(colorMap[StackElementMetadata.getForeground(metadata)], colorReplacements);\n const fontStyle = StackElementMetadata.getFontStyle(metadata);\n const token = {\n content: line.substring(startIndex, nextStartIndex),\n offset: lineOffset + startIndex,\n color,\n fontStyle,\n };\n if (options.includeExplanation) {\n const themeSettingsSelectors = [];\n if (options.includeExplanation !== 'scopeName') {\n for (const setting of theme.settings) {\n let selectors;\n switch (typeof setting.scope) {\n case 'string':\n selectors = setting.scope.split(/,/).map(scope => scope.trim());\n break;\n case 'object':\n selectors = setting.scope;\n break;\n default:\n continue;\n }\n themeSettingsSelectors.push({\n settings: setting,\n selectors: selectors.map(selector => selector.split(/ /)),\n });\n }\n }\n token.explanation = [];\n let offset = 0;\n while (startIndex + offset < nextStartIndex) {\n const tokenWithScopes = tokensWithScopes[tokensWithScopesIndex];\n const tokenWithScopesText = line.substring(tokenWithScopes.startIndex, tokenWithScopes.endIndex);\n offset += tokenWithScopesText.length;\n token.explanation.push({\n content: tokenWithScopesText,\n scopes: options.includeExplanation === 'scopeName'\n ? explainThemeScopesNameOnly(tokenWithScopes.scopes)\n : explainThemeScopesFull(themeSettingsSelectors, tokenWithScopes.scopes),\n });\n tokensWithScopesIndex += 1;\n }\n }\n actual.push(token);\n }\n final.push(actual);\n actual = [];\n stateStack = result.ruleStack;\n }\n return {\n tokens: final,\n stateStack,\n };\n}\nfunction explainThemeScopesNameOnly(scopes) {\n return scopes.map(scope => ({ scopeName: scope }));\n}\nfunction explainThemeScopesFull(themeSelectors, scopes) {\n const result = [];\n for (let i = 0, len = scopes.length; i < len; i++) {\n const scope = scopes[i];\n result[i] = {\n scopeName: scope,\n themeMatches: explainThemeScope(themeSelectors, scope, scopes.slice(0, i)),\n };\n }\n return result;\n}\nfunction matchesOne(selector, scope) {\n return selector === scope\n || (scope.substring(0, selector.length) === selector && scope[selector.length] === '.');\n}\nfunction matches(selectors, scope, parentScopes) {\n if (!matchesOne(selectors[selectors.length - 1], scope))\n return false;\n let selectorParentIndex = selectors.length - 2;\n let parentIndex = parentScopes.length - 1;\n while (selectorParentIndex >= 0 && parentIndex >= 0) {\n if (matchesOne(selectors[selectorParentIndex], parentScopes[parentIndex]))\n selectorParentIndex -= 1;\n parentIndex -= 1;\n }\n if (selectorParentIndex === -1)\n return true;\n return false;\n}\nfunction explainThemeScope(themeSettingsSelectors, scope, parentScopes) {\n const result = [];\n for (const { selectors, settings } of themeSettingsSelectors) {\n for (const selectorPieces of selectors) {\n if (matches(selectorPieces, scope, parentScopes)) {\n result.push(settings);\n break; // continue to the next theme settings\n }\n }\n }\n return result;\n}\n\n/**\n * Get tokens with multiple themes\n */\nfunction codeToTokensWithThemes(internal, code, options) {\n const themes = Object.entries(options.themes)\n .filter(i => i[1])\n .map(i => ({ color: i[0], theme: i[1] }));\n const tokens = syncThemesTokenization(...themes.map(t => codeToTokensBase(internal, code, {\n ...options,\n theme: t.theme,\n })));\n const mergedTokens = tokens[0]\n .map((line, lineIdx) => line\n .map((_token, tokenIdx) => {\n const mergedToken = {\n content: _token.content,\n variants: {},\n offset: _token.offset,\n };\n if ('includeExplanation' in options && options.includeExplanation) {\n mergedToken.explanation = _token.explanation;\n }\n tokens.forEach((t, themeIdx) => {\n const { content: _, explanation: __, offset: ___, ...styles } = t[lineIdx][tokenIdx];\n mergedToken.variants[themes[themeIdx].color] = styles;\n });\n return mergedToken;\n }));\n return mergedTokens;\n}\n/**\n * Break tokens from multiple themes into same tokenization.\n *\n * For example, given two themes that tokenize `console.log(\"hello\")` as:\n *\n * - `console . log (\" hello \")` (6 tokens)\n * - `console .log ( \"hello\" )` (5 tokens)\n *\n * This function will return:\n *\n * - `console . log ( \" hello \" )` (8 tokens)\n * - `console . log ( \" hello \" )` (8 tokens)\n */\nfunction syncThemesTokenization(...themes) {\n const outThemes = themes.map(() => []);\n const count = themes.length;\n for (let i = 0; i < themes[0].length; i++) {\n const lines = themes.map(t => t[i]);\n const outLines = outThemes.map(() => []);\n outThemes.forEach((t, i) => t.push(outLines[i]));\n const indexes = lines.map(() => 0);\n const current = lines.map(l => l[0]);\n while (current.every(t => t)) {\n const minLength = Math.min(...current.map(t => t.content.length));\n for (let n = 0; n < count; n++) {\n const token = current[n];\n if (token.content.length === minLength) {\n outLines[n].push(token);\n indexes[n] += 1;\n current[n] = lines[n][indexes[n]];\n }\n else {\n outLines[n].push({\n ...token,\n content: token.content.slice(0, minLength),\n });\n current[n] = {\n ...token,\n content: token.content.slice(minLength),\n offset: token.offset + minLength,\n };\n }\n }\n }\n }\n return outThemes;\n}\n\n/**\n * High-level code-to-tokens API.\n *\n * It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.\n */\nfunction codeToTokens(internal, code, options) {\n let bg;\n let fg;\n let tokens;\n let themeName;\n let rootStyle;\n if ('themes' in options) {\n const { defaultColor = 'light', cssVariablePrefix = '--shiki-', } = options;\n const themes = Object.entries(options.themes)\n .filter(i => i[1])\n .map(i => ({ color: i[0], theme: i[1] }))\n .sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);\n if (themes.length === 0)\n throw new ShikiError('`themes` option must not be empty');\n const themeTokens = codeToTokensWithThemes(internal, code, options);\n if (defaultColor && !themes.find(t => t.color === defaultColor))\n throw new ShikiError(`\\`themes\\` option must contain the defaultColor key \\`${defaultColor}\\``);\n const themeRegs = themes.map(t => internal.getTheme(t.theme));\n const themesOrder = themes.map(t => t.color);\n tokens = themeTokens\n .map(line => line.map(token => mergeToken(token, themesOrder, cssVariablePrefix, defaultColor)));\n const themeColorReplacements = themes.map(t => resolveColorReplacements(t.theme, options));\n fg = themes.map((t, idx) => (idx === 0 && defaultColor\n ? ''\n : `${cssVariablePrefix + t.color}:`) + (applyColorReplacements(themeRegs[idx].fg, themeColorReplacements[idx]) || 'inherit')).join(';');\n bg = themes.map((t, idx) => (idx === 0 && defaultColor\n ? ''\n : `${cssVariablePrefix + t.color}-bg:`) + (applyColorReplacements(themeRegs[idx].bg, themeColorReplacements[idx]) || 'inherit')).join(';');\n themeName = `shiki-themes ${themeRegs.map(t => t.name).join(' ')}`;\n rootStyle = defaultColor ? undefined : [fg, bg].join(';');\n }\n else if ('theme' in options) {\n const colorReplacements = resolveColorReplacements(options.theme, options);\n tokens = codeToTokensBase(internal, code, options);\n const _theme = internal.getTheme(options.theme);\n bg = applyColorReplacements(_theme.bg, colorReplacements);\n fg = applyColorReplacements(_theme.fg, colorReplacements);\n themeName = _theme.name;\n }\n else {\n throw new ShikiError('Invalid options, either `theme` or `themes` must be provided');\n }\n return {\n tokens,\n fg,\n bg,\n themeName,\n rootStyle,\n };\n}\nfunction mergeToken(merged, variantsOrder, cssVariablePrefix, defaultColor) {\n const token = {\n content: merged.content,\n explanation: merged.explanation,\n offset: merged.offset,\n };\n const styles = variantsOrder.map(t => getTokenStyleObject(merged.variants[t]));\n // Get all style keys, for themes that missing some style, we put `inherit` to override as needed\n const styleKeys = new Set(styles.flatMap(t => Object.keys(t)));\n const mergedStyles = styles.reduce((acc, cur, idx) => {\n for (const key of styleKeys) {\n const value = cur[key] || 'inherit';\n if (idx === 0 && defaultColor) {\n acc[key] = value;\n }\n else {\n const keyName = key === 'color' ? '' : key === 'background-color' ? '-bg' : `-${key}`;\n const varKey = cssVariablePrefix + variantsOrder[idx] + (key === 'color' ? '' : keyName);\n if (acc[key])\n acc[key] += `;${varKey}:${value}`;\n else\n acc[key] = `${varKey}:${value}`;\n }\n }\n return acc;\n }, {});\n token.htmlStyle = defaultColor\n ? stringifyTokenStyle(mergedStyles)\n : Object.values(mergedStyles).join(';');\n return token;\n}\n\n/**\n * A built-in transformer to add decorations to the highlighted code.\n */\nfunction transformerDecorations() {\n const map = new WeakMap();\n function getContext(shiki) {\n if (!map.has(shiki.meta)) {\n const converter = createPositionConverter(shiki.source);\n function normalizePosition(p) {\n if (typeof p === 'number') {\n if (p < 0 || p > shiki.source.length)\n throw new ShikiError(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);\n return {\n ...converter.indexToPos(p),\n offset: p,\n };\n }\n else {\n const line = converter.lines[p.line];\n if (line === undefined)\n throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);\n if (p.character < 0 || p.character > line.length)\n throw new ShikiError(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);\n return {\n ...p,\n offset: converter.posToIndex(p.line, p.character),\n };\n }\n }\n const decorations = (shiki.options.decorations || [])\n .map((d) => ({\n ...d,\n start: normalizePosition(d.start),\n end: normalizePosition(d.end),\n }));\n verifyIntersections(decorations);\n map.set(shiki.meta, {\n decorations,\n converter,\n source: shiki.source,\n });\n }\n return map.get(shiki.meta);\n }\n function verifyIntersections(items) {\n for (let i = 0; i < items.length; i++) {\n const foo = items[i];\n if (foo.start.offset > foo.end.offset)\n throw new ShikiError(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);\n for (let j = i + 1; j < items.length; j++) {\n const bar = items[j];\n const isFooHasBarStart = foo.start.offset < bar.start.offset && bar.start.offset < foo.end.offset;\n const isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset < foo.end.offset;\n const isBarHasFooStart = bar.start.offset < foo.start.offset && foo.start.offset < bar.end.offset;\n const isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset < bar.end.offset;\n if (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {\n if (isFooHasBarEnd && isFooHasBarEnd)\n continue; // nested\n if (isBarHasFooStart && isBarHasFooEnd)\n continue; // nested\n throw new ShikiError(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);\n }\n }\n }\n }\n return {\n name: 'shiki:decorations',\n tokens(tokens) {\n if (!this.options.decorations?.length)\n return;\n const ctx = getContext(this);\n const breakpoints = ctx.decorations.flatMap(d => [d.start.offset, d.end.offset]);\n const splitted = splitTokens(tokens, breakpoints);\n return splitted;\n },\n code(codeEl) {\n if (!this.options.decorations?.length)\n return;\n const ctx = getContext(this);\n const lines = Array.from(codeEl.children).filter(i => i.type === 'element' && i.tagName === 'span');\n if (lines.length !== ctx.converter.lines.length)\n throw new ShikiError(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);\n function applyLineSection(line, start, end, decoration) {\n const lineEl = lines[line];\n let text = '';\n let startIndex = -1;\n let endIndex = -1;\n function stringify(el) {\n if (el.type === 'text')\n return el.value;\n if (el.type === 'element')\n return el.children.map(stringify).join('');\n return '';\n }\n if (start === 0)\n startIndex = 0;\n if (end === 0)\n endIndex = 0;\n if (end === Number.POSITIVE_INFINITY)\n endIndex = lineEl.children.length;\n if (startIndex === -1 || endIndex === -1) {\n for (let i = 0; i < lineEl.children.length; i++) {\n text += stringify(lineEl.children[i]);\n if (startIndex === -1 && text.length === start)\n startIndex = i + 1;\n if (endIndex === -1 && text.length === end)\n endIndex = i + 1;\n }\n }\n if (startIndex === -1)\n throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);\n if (endIndex === -1)\n throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);\n const children = lineEl.children.slice(startIndex, endIndex);\n // Full line decoration\n if (!decoration.alwaysWrap && children.length === lineEl.children.length) {\n applyDecoration(lineEl, decoration, 'line');\n }\n // Single token decoration\n else if (!decoration.alwaysWrap && children.length === 1 && children[0].type === 'element') {\n applyDecoration(children[0], decoration, 'token');\n }\n // Create a wrapper for the decoration\n else {\n const wrapper = {\n type: 'element',\n tagName: 'span',\n properties: {},\n children,\n };\n applyDecoration(wrapper, decoration, 'wrapper');\n lineEl.children.splice(startIndex, children.length, wrapper);\n }\n }\n function applyLine(line, decoration) {\n lines[line] = applyDecoration(lines[line], decoration, 'line');\n }\n function applyDecoration(el, decoration, type) {\n const properties = decoration.properties || {};\n const transform = decoration.transform || (i => i);\n el.tagName = decoration.tagName || 'span';\n el.properties = {\n ...el.properties,\n ...properties,\n class: el.properties.class,\n };\n if (decoration.properties?.class)\n addClassToHast(el, decoration.properties.class);\n el = transform(el, type) || el;\n return el;\n }\n const lineApplies = [];\n // Apply decorations in reverse order so the nested ones get applied first.\n const sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset);\n for (const decoration of sorted) {\n const { start, end } = decoration;\n if (start.line === end.line) {\n applyLineSection(start.line, start.character, end.character, decoration);\n }\n else if (start.line < end.line) {\n applyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);\n for (let i = start.line + 1; i < end.line; i++)\n lineApplies.unshift(() => applyLine(i, decoration));\n applyLineSection(end.line, 0, end.character, decoration);\n }\n }\n lineApplies.forEach(i => i());\n },\n };\n}\n\nconst builtInTransformers = [\n /* @__PURE__ */ transformerDecorations(),\n];\nfunction getTransformers(options) {\n return [\n ...options.transformers || [],\n ...builtInTransformers,\n ];\n}\n\nfunction codeToHast(internal, code, options, transformerContext = {\n meta: {},\n options,\n codeToHast: (_code, _options) => codeToHast(internal, _code, _options),\n codeToTokens: (_code, _options) => codeToTokens(internal, _code, _options),\n}) {\n let input = code;\n for (const transformer of getTransformers(options))\n input = transformer.preprocess?.call(transformerContext, input, options) || input;\n let { tokens, fg, bg, themeName, rootStyle, } = codeToTokens(internal, input, options);\n const { mergeWhitespaces = true, } = options;\n if (mergeWhitespaces === true)\n tokens = mergeWhitespaceTokens(tokens);\n else if (mergeWhitespaces === 'never')\n tokens = splitWhitespaceTokens(tokens);\n const contextSource = {\n ...transformerContext,\n get source() {\n return input;\n },\n };\n for (const transformer of getTransformers(options))\n tokens = transformer.tokens?.call(contextSource, tokens) || tokens;\n return tokensToHast(tokens, {\n ...options,\n fg,\n bg,\n themeName,\n rootStyle,\n }, contextSource);\n}\nfunction tokensToHast(tokens, options, transformerContext) {\n const transformers = getTransformers(options);\n const lines = [];\n const root = {\n type: 'root',\n children: [],\n };\n const { structure = 'classic', } = options;\n let preNode = {\n type: 'element',\n tagName: 'pre',\n properties: {\n class: `shiki ${options.themeName || ''}`,\n style: options.rootStyle || `background-color:${options.bg};color:${options.fg}`,\n tabindex: '0',\n ...Object.fromEntries(Array.from(Object.entries(options.meta || {}))\n .filter(([key]) => !key.startsWith('_'))),\n },\n children: [],\n };\n let codeNode = {\n type: 'element',\n tagName: 'code',\n properties: {},\n children: lines,\n };\n const lineNodes = [];\n const context = {\n ...transformerContext,\n structure,\n addClassToHast,\n get source() {\n return transformerContext.source;\n },\n get tokens() {\n return tokens;\n },\n get options() {\n return options;\n },\n get root() {\n return root;\n },\n get pre() {\n return preNode;\n },\n get code() {\n return codeNode;\n },\n get lines() {\n return lineNodes;\n },\n };\n tokens.forEach((line, idx) => {\n if (idx) {\n if (structure === 'inline')\n root.children.push({ type: 'element', tagName: 'br', properties: {}, children: [] });\n else if (structure === 'classic')\n lines.push({ type: 'text', value: '\\n' });\n }\n let lineNode = {\n type: 'element',\n tagName: 'span',\n properties: { class: 'line' },\n children: [],\n };\n let col = 0;\n for (const token of line) {\n let tokenNode = {\n type: 'element',\n tagName: 'span',\n properties: {},\n children: [{ type: 'text', value: token.content }],\n };\n const style = token.htmlStyle || stringifyTokenStyle(getTokenStyleObject(token));\n if (style)\n tokenNode.properties.style = style;\n for (const transformer of transformers)\n tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode) || tokenNode;\n if (structure === 'inline')\n root.children.push(tokenNode);\n else if (structure === 'classic')\n lineNode.children.push(tokenNode);\n col += token.content.length;\n }\n if (structure === 'classic') {\n for (const transformer of transformers)\n lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;\n lineNodes.push(lineNode);\n lines.push(lineNode);\n }\n });\n if (structure === 'classic') {\n for (const transformer of transformers)\n codeNode = transformer?.code?.call(context, codeNode) || codeNode;\n preNode.children.push(codeNode);\n for (const transformer of transformers)\n preNode = transformer?.pre?.call(context, preNode) || preNode;\n root.children.push(preNode);\n }\n let result = root;\n for (const transformer of transformers)\n result = transformer?.root?.call(context, result) || result;\n return result;\n}\nfunction mergeWhitespaceTokens(tokens) {\n return tokens.map((line) => {\n const newLine = [];\n let carryOnContent = '';\n let firstOffset = 0;\n line.forEach((token, idx) => {\n const isUnderline = token.fontStyle && token.fontStyle & FontStyle.Underline;\n const couldMerge = !isUnderline;\n if (couldMerge && token.content.match(/^\\s+$/) && line[idx + 1]) {\n if (!firstOffset)\n firstOffset = token.offset;\n carryOnContent += token.content;\n }\n else {\n if (carryOnContent) {\n if (couldMerge) {\n newLine.push({\n ...token,\n offset: firstOffset,\n content: carryOnContent + token.content,\n });\n }\n else {\n newLine.push({\n content: carryOnContent,\n offset: firstOffset,\n }, token);\n }\n firstOffset = 0;\n carryOnContent = '';\n }\n else {\n newLine.push(token);\n }\n }\n });\n return newLine;\n });\n}\nfunction splitWhitespaceTokens(tokens) {\n return tokens.map((line) => {\n return line.flatMap((token) => {\n if (token.content.match(/^\\s+$/))\n return token;\n // eslint-disable-next-line regexp/no-super-linear-backtracking\n const match = token.content.match(/^(\\s*)(.*?)(\\s*)$/);\n if (!match)\n return token;\n const [, leading, content, trailing] = match;\n if (!leading && !trailing)\n return token;\n const expanded = [{\n ...token,\n offset: token.offset + leading.length,\n content,\n }];\n if (leading) {\n expanded.unshift({\n content: leading,\n offset: token.offset,\n });\n }\n if (trailing) {\n expanded.push({\n content: trailing,\n offset: token.offset + leading.length + content.length,\n });\n }\n return expanded;\n });\n });\n}\n\n/**\n * List of HTML void tag names.\n *\n * @type {Array}\n */\nconst htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n];\n\n/**\n * @typedef {import('./info.js').Info} Info\n * @typedef {Record} Properties\n * @typedef {Record} Normal\n */\n\nclass Schema {\n /**\n * @constructor\n * @param {Properties} property\n * @param {Normal} normal\n * @param {string} [space]\n */\n constructor(property, normal, space) {\n this.property = property;\n this.normal = normal;\n if (space) {\n this.space = space;\n }\n }\n}\n\n/** @type {Properties} */\nSchema.prototype.property = {};\n/** @type {Normal} */\nSchema.prototype.normal = {};\n/** @type {string|null} */\nSchema.prototype.space = null;\n\n/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n */\n\n\n/**\n * @param {Schema[]} definitions\n * @param {string} [space]\n * @returns {Schema}\n */\nfunction merge(definitions, space) {\n /** @type {Properties} */\n const property = {};\n /** @type {Normal} */\n const normal = {};\n let index = -1;\n\n while (++index < definitions.length) {\n Object.assign(property, definitions[index].property);\n Object.assign(normal, definitions[index].normal);\n }\n\n return new Schema(property, normal, space)\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction normalize(value) {\n return value.toLowerCase()\n}\n\nclass Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n */\n constructor(property, attribute) {\n /** @type {string} */\n this.property = property;\n /** @type {string} */\n this.attribute = attribute;\n }\n}\n\n/** @type {string|null} */\nInfo.prototype.space = null;\nInfo.prototype.boolean = false;\nInfo.prototype.booleanish = false;\nInfo.prototype.overloadedBoolean = false;\nInfo.prototype.number = false;\nInfo.prototype.commaSeparated = false;\nInfo.prototype.spaceSeparated = false;\nInfo.prototype.commaOrSpaceSeparated = false;\nInfo.prototype.mustUseProperty = false;\nInfo.prototype.defined = false;\n\nlet powers = 0;\n\nconst boolean = increment();\nconst booleanish = increment();\nconst overloadedBoolean = increment();\nconst number = increment();\nconst spaceSeparated = increment();\nconst commaSeparated = increment();\nconst commaOrSpaceSeparated = increment();\n\nfunction increment() {\n return 2 ** ++powers\n}\n\nvar types = /*#__PURE__*/Object.freeze({\n __proto__: null,\n boolean: boolean,\n booleanish: booleanish,\n commaOrSpaceSeparated: commaOrSpaceSeparated,\n commaSeparated: commaSeparated,\n number: number,\n overloadedBoolean: overloadedBoolean,\n spaceSeparated: spaceSeparated\n});\n\n/** @type {Array} */\n// @ts-expect-error: hush.\nconst checks = Object.keys(types);\n\nclass DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n * @param {number|null} [mask]\n * @param {string} [space]\n */\n constructor(property, attribute, mask, space) {\n let index = -1;\n\n super(property, attribute);\n\n mark(this, 'space', space);\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index];\n mark(this, checks[index], (mask & types[check]) === types[check]);\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true;\n\n/**\n * @param {DefinedInfo} values\n * @param {string} key\n * @param {unknown} value\n */\nfunction mark(values, key, value) {\n if (value) {\n // @ts-expect-error: assume `value` matches the expected value of `key`.\n values[key] = value;\n }\n}\n\n/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n *\n * @typedef {Record} Attributes\n *\n * @typedef {Object} Definition\n * @property {Record} properties\n * @property {(attributes: Attributes, property: string) => string} transform\n * @property {string} [space]\n * @property {Attributes} [attributes]\n * @property {Array} [mustUseProperty]\n */\n\n\nconst own$3 = {}.hasOwnProperty;\n\n/**\n * @param {Definition} definition\n * @returns {Schema}\n */\nfunction create(definition) {\n /** @type {Properties} */\n const property = {};\n /** @type {Normal} */\n const normal = {};\n /** @type {string} */\n let prop;\n\n for (prop in definition.properties) {\n if (own$3.call(definition.properties, prop)) {\n const value = definition.properties[prop];\n const info = new DefinedInfo(\n prop,\n definition.transform(definition.attributes || {}, prop),\n value,\n definition.space\n );\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(prop)\n ) {\n info.mustUseProperty = true;\n }\n\n property[prop] = info;\n\n normal[normalize(prop)] = prop;\n normal[normalize(info.attribute)] = prop;\n }\n }\n\n return new Schema(property, normal, definition.space)\n}\n\nconst xlink = create({\n space: 'xlink',\n transform(_, prop) {\n return 'xlink:' + prop.slice(5).toLowerCase()\n },\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n }\n});\n\nconst xml = create({\n space: 'xml',\n transform(_, prop) {\n return 'xml:' + prop.slice(3).toLowerCase()\n },\n properties: {xmlLang: null, xmlBase: null, xmlSpace: null}\n});\n\n/**\n * @param {Record} attributes\n * @param {string} attribute\n * @returns {string}\n */\nfunction caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n\n/**\n * @param {Record} attributes\n * @param {string} property\n * @returns {string}\n */\nfunction caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n\nconst xmlns = create({\n space: 'xmlns',\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n transform: caseInsensitiveTransform,\n properties: {xmlns: null, xmlnsXLink: null}\n});\n\nconst aria = create({\n transform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n },\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n }\n});\n\nconst html$3 = create({\n space: 'html',\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n transform: caseInsensitiveTransform,\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: boolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // ``. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // ``. List of URIs to archives\n axis: null, // `` and ``. Use `scope` on ``\n background: null, // ``. Use CSS `background-image` instead\n bgColor: null, // `` and table elements. Use CSS `background-color` instead\n border: number, // ``. Use CSS `border-width` instead,\n borderColor: null, // `
`. Use CSS `border-color` instead,\n bottomMargin: number, // ``\n cellPadding: null, // `
`\n cellSpacing: null, // `
`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // ``\n clear: null, // `
`. Use CSS `clear` instead\n code: null, // ``\n codeBase: null, // ``\n codeType: null, // ``\n color: null, // `` and `
`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // ``\n event: null, // ` - - - - - + + + + + +
- + \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index d12d58e..7cc76b3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,7 +11,9 @@ import dts from 'vite-plugin-dts' // https://vitejs.dev/config/ export default defineConfig(({ mode }) => { - const userConfig: UserConfig = {} + const userConfig: UserConfig = { + base: 'we-cropper', + } const defaultPlugins = [ vue(),