@yerkopalma/cursor
Version:
Custom cursor component
1 lines • 345 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Cursor={})}(this,(function(t){"use strict";function e(){}function i(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(i)}function s(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function o(t,i,n){t.$$.on_destroy.push(function(t,...i){if(null==t)return e;const n=t.subscribe(...i);return n.unsubscribe?()=>n.unsubscribe():n}(i,n))}const h="undefined"!=typeof window;let u=h?()=>window.performance.now():()=>Date.now(),c=h?t=>requestAnimationFrame(t):e;const l=new Set;function d(t){l.forEach(e=>{e.c(t)||(l.delete(e),e.f())}),0!==l.size&&c(d)}function f(t,e){t.appendChild(e)}function p(t,e,i){t.insertBefore(e,i||null)}function g(t){t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function v(){return function(t){return document.createTextNode(t)}(" ")}function m(t,e,i){null==i?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function y(t,e,i,n){t.style.setProperty(e,i,n?"important":"")}function x(t,e,i){t.classList[i?"add":"remove"](e)}let w;function b(t){w=t}function C(t){(function(){if(!w)throw new Error("Function called outside component initialization");return w})().$$.on_mount.push(t)}const S=[],k=[],I=[],A=[],P=Promise.resolve();let E=!1;function T(t){I.push(t)}let M=!1;const L=new Set;function O(){if(!M){M=!0;do{for(let t=0;t<S.length;t+=1){const e=S[t];b(e),N(e.$$)}for(S.length=0;k.length;)k.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];L.has(e)||(L.add(e),e())}I.length=0}while(S.length);for(;A.length;)A.pop()();E=!1,M=!1,L.clear()}}function N(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(T)}}const V=new Set;const B="undefined"!=typeof window?window:global;function z(t,e){-1===t.$$.dirty[0]&&(S.push(t),E||(E=!0,P.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function R(t,a,o,h,u,c,l=[-1]){const d=w;b(t);const f=a.props||{},p=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:u,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:n(),dirty:l};let g=!1;var _,v;p.ctx=o?o(t,f,(e,i,...n)=>{const r=n.length?n[0]:i;return p.ctx&&u(p.ctx[e],p.ctx[e]=r)&&(p.bound[e]&&p.bound[e](r),g&&z(t,e)),i}):[],p.update(),g=!0,r(p.before_update),p.fragment=!!h&&h(p.ctx),a.target&&(a.hydrate?p.fragment&&p.fragment.l(function(t){return Array.from(t.childNodes)}(a.target)):p.fragment&&p.fragment.c(),a.intro&&((_=t.$$.fragment)&&_.i&&(V.delete(_),_.i(v))),function(t,e,n){const{fragment:a,on_mount:o,on_destroy:h,after_update:u}=t.$$;a&&a.m(e,n),T(()=>{const e=o.map(i).filter(s);h?h.push(...e):r(e),t.$$.on_mount=[]}),u.forEach(T)}(t,a.target,a.anchor),O()),b(d)}const D=[];function F(t){return"[object Date]"===Object.prototype.toString.call(t)}function j(t,i={}){const n=function(t,i=e){let n;const r=[];function s(e){if(a(t,e)&&(t=e,n)){const e=!D.length;for(let e=0;e<r.length;e+=1){const i=r[e];i[1](),D.push(i,t)}if(e){for(let t=0;t<D.length;t+=2)D[t][0](D[t+1]);D.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(a,o=e){const h=[a,o];return r.push(h),1===r.length&&(n=i(s)||e),a(t),()=>{const t=r.indexOf(h);-1!==t&&r.splice(t,1),0===r.length&&(n(),n=null)}}}}(t),{stiffness:r=.15,damping:s=.8,precision:o=.01}=i;let h,f,p,g=t,_=t,v=1,m=0,y=!1;function x(e,i={}){_=e;const r=p={};if(null==t||i.hard||w.stiffness>=1&&w.damping>=1)return y=!0,h=u(),g=e,n.set(t=_),Promise.resolve();if(i.soft){const t=!0===i.soft?.5:+i.soft;m=1/(60*t),v=0}return f||(h=u(),y=!1,f=function(t){let e;return 0===l.size&&c(d),{promise:new Promise(i=>{l.add(e={c:t,f:i})}),abort(){l.delete(e)}}}(e=>{if(y)return y=!1,f=null,!1;v=Math.min(v+m,1);const i={inv_mass:v,opts:w,settled:!0,dt:60*(e-h)/1e3},r=function t(e,i,n,r){if("number"==typeof n||F(n)){const t=r-n,s=(n-i)/(e.dt||1/60),a=(s+(e.opts.stiffness*t-e.opts.damping*s)*e.inv_mass)*e.dt;return Math.abs(a)<e.opts.precision&&Math.abs(t)<e.opts.precision?r:(e.settled=!1,F(n)?new Date(n.getTime()+a):n+a)}if(Array.isArray(n))return n.map((s,a)=>t(e,i[a],n[a],r[a]));if("object"==typeof n){const s={};for(const a in n)s[a]=t(e,i[a],n[a],r[a]);return s}throw new Error(`Cannot spring ${typeof n} values`)}(i,g,t,_);return h=e,g=t,n.set(t=r),i.settled&&(f=null),!i.settled})),new Promise(t=>{f.promise.then(()=>{r===p&&t()})})}const w={set:x,update:(e,i)=>x(e(_,t),i),subscribe:n.subscribe,stiffness:r,damping:s,precision:o};return w}var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function U(t){return t&&t.default||t}var H=Object.freeze({__proto__:null,default:{}}),W={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},G="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",$={5:G,"5module":G+" export import",6:G+" const class extends export import super"},Z=/^in(stanceof)?$/,K="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Q="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",X=new RegExp("["+K+"]"),J=new RegExp("["+K+Q+"]");K=Q=null;var Y=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541],tt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function et(t,e){for(var i=65536,n=0;n<e.length;n+=2){if((i+=e[n])>t)return!1;if((i+=e[n+1])>=t)return!0}}function it(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&X.test(String.fromCharCode(t)):!1!==e&&et(t,Y)))}function nt(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&J.test(String.fromCharCode(t)):!1!==e&&(et(t,Y)||et(t,tt)))))}var rt=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function st(t,e){return new rt(t,{beforeExpr:!0,binop:e})}var at={beforeExpr:!0},ot={startsExpr:!0},ht={};function ut(t,e){return void 0===e&&(e={}),e.keyword=t,ht[t]=new rt(t,e)}var ct={num:new rt("num",ot),regexp:new rt("regexp",ot),string:new rt("string",ot),name:new rt("name",ot),eof:new rt("eof"),bracketL:new rt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new rt("]"),braceL:new rt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new rt("}"),parenL:new rt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new rt(")"),comma:new rt(",",at),semi:new rt(";",at),colon:new rt(":",at),dot:new rt("."),question:new rt("?",at),arrow:new rt("=>",at),template:new rt("template"),invalidTemplate:new rt("invalidTemplate"),ellipsis:new rt("...",at),backQuote:new rt("`",ot),dollarBraceL:new rt("${",{beforeExpr:!0,startsExpr:!0}),eq:new rt("=",{beforeExpr:!0,isAssign:!0}),assign:new rt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new rt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new rt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:st("||",1),logicalAND:st("&&",2),bitwiseOR:st("|",3),bitwiseXOR:st("^",4),bitwiseAND:st("&",5),equality:st("==/!=/===/!==",6),relational:st("</>/<=/>=",7),bitShift:st("<</>>/>>>",8),plusMin:new rt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:st("%",10),star:st("*",10),slash:st("/",10),starstar:new rt("**",{beforeExpr:!0}),_break:ut("break"),_case:ut("case",at),_catch:ut("catch"),_continue:ut("continue"),_debugger:ut("debugger"),_default:ut("default",at),_do:ut("do",{isLoop:!0,beforeExpr:!0}),_else:ut("else",at),_finally:ut("finally"),_for:ut("for",{isLoop:!0}),_function:ut("function",ot),_if:ut("if"),_return:ut("return",at),_switch:ut("switch"),_throw:ut("throw",at),_try:ut("try"),_var:ut("var"),_const:ut("const"),_while:ut("while",{isLoop:!0}),_with:ut("with"),_new:ut("new",{beforeExpr:!0,startsExpr:!0}),_this:ut("this",ot),_super:ut("super",ot),_class:ut("class",ot),_extends:ut("extends",at),_export:ut("export"),_import:ut("import",ot),_null:ut("null",ot),_true:ut("true",ot),_false:ut("false",ot),_in:ut("in",{beforeExpr:!0,binop:7}),_instanceof:ut("instanceof",{beforeExpr:!0,binop:7}),_typeof:ut("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ut("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ut("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lt=/\r\n?|\n|\u2028|\u2029/,dt=new RegExp(lt.source,"g");function ft(t,e){return 10===t||13===t||!e&&(8232===t||8233===t)}var pt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_t=Object.prototype,vt=_t.hasOwnProperty,mt=_t.toString;function yt(t,e){return vt.call(t,e)}var xt=Array.isArray||function(t){return"[object Array]"===mt.call(t)};function wt(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var bt=function(t,e){this.line=t,this.column=e};bt.prototype.offset=function(t){return new bt(this.line,this.column+t)};var Ct=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function St(t,e){for(var i=1,n=0;;){dt.lastIndex=n;var r=dt.exec(t);if(!(r&&r.index<e))return new bt(i,e-n);++i,n=r.index+r[0].length}}var kt={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function It(t){var e={};for(var i in kt)e[i]=t&&yt(t,i)?t[i]:kt[i];if(e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),xt(e.onToken)){var n=e.onToken;e.onToken=function(t){return n.push(t)}}return xt(e.onComment)&&(e.onComment=function(t,e){return function(i,n,r,s,a,o){var h={type:i?"Block":"Line",value:n,start:r,end:s};t.locations&&(h.loc=new Ct(this,a,o)),t.ranges&&(h.range=[r,s]),e.push(h)}}(e,e.onComment)),e}function At(t,e){return 2|(t?4:0)|(e?8:0)}var Pt=function(t,e,i){this.options=t=It(t),this.sourceFile=t.sourceFile,this.keywords=wt($[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var n="";if(!0!==t.allowReserved){for(var r=t.ecmaVersion;!(n=W[r]);r--);"module"===t.sourceType&&(n+=" await")}this.reservedWords=wt(n);var s=(n?n+" ":"")+W.strict;this.reservedWordsStrict=wt(s),this.reservedWordsStrictBind=wt(s+" "+W.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=ct.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},Et={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};Pt.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},Et.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Et.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Et.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Et.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},Et.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Et.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Pt.prototype.inNonArrowFunction=function(){return(2&this.currentThisScope().flags)>0},Pt.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,n=0;n<t.length;n++)i=t[n](i);return i},Pt.parse=function(t,e){return new this(e,t).parse()},Pt.parseExpressionAt=function(t,e,i){var n=new this(i,t,e);return n.nextToken(),n.parseExpression()},Pt.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(Pt.prototype,Et);var Tt=Pt.prototype,Mt=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/;function Lt(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}Tt.strictDirective=function(t){for(;;){gt.lastIndex=t,t+=gt.exec(this.input)[0].length;var e=Mt.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2]))return!0;t+=e[0].length,gt.lastIndex=t,t+=gt.exec(this.input)[0].length,";"===this.input[t]&&t++}},Tt.eat=function(t){return this.type===t&&(this.next(),!0)},Tt.isContextual=function(t){return this.type===ct.name&&this.value===t&&!this.containsEsc},Tt.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},Tt.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},Tt.canInsertSemicolon=function(){return this.type===ct.eof||this.type===ct.braceR||lt.test(this.input.slice(this.lastTokEnd,this.start))},Tt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Tt.semicolon=function(){this.eat(ct.semi)||this.insertSemicolon()||this.unexpected()},Tt.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},Tt.expect=function(t){this.eat(t)||this.unexpected()},Tt.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")},Tt.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,"Parenthesized pattern")}},Tt.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,n=t.doubleProto;if(!e)return i>=0||n>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")},Tt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Tt.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var Ot=Pt.prototype;Ot.parseTopLevel=function(t){var e={};for(t.body||(t.body=[]);this.type!==ct.eof;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var n=0,r=Object.keys(this.undefinedExports);n<r.length;n+=1){var s=r[n];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var Nt={kind:"loop"},Vt={kind:"switch"};Ot.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;gt.lastIndex=this.pos;var e=gt.exec(this.input),i=this.pos+e[0].length,n=this.input.charCodeAt(i);if(91===n)return!0;if(t)return!1;if(123===n)return!0;if(it(n,!0)){for(var r=i+1;nt(this.input.charCodeAt(r),!0);)++r;var s=this.input.slice(i,r);if(!Z.test(s))return!0}return!1},Ot.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;gt.lastIndex=this.pos;var t=gt.exec(this.input),e=this.pos+t[0].length;return!(lt.test(this.input.slice(this.pos,e))||"function"!==this.input.slice(e,e+8)||e+8!==this.input.length&&nt(this.input.charAt(e+8)))},Ot.parseStatement=function(t,e,i){var n,r=this.type,s=this.startNode();switch(this.isLet(t)&&(r=ct._var,n="let"),r){case ct._break:case ct._continue:return this.parseBreakContinueStatement(s,r.keyword);case ct._debugger:return this.parseDebuggerStatement(s);case ct._do:return this.parseDoStatement(s);case ct._for:return this.parseForStatement(s);case ct._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case ct._class:return t&&this.unexpected(),this.parseClass(s,!0);case ct._if:return this.parseIfStatement(s);case ct._return:return this.parseReturnStatement(s);case ct._switch:return this.parseSwitchStatement(s);case ct._throw:return this.parseThrowStatement(s);case ct._try:return this.parseTryStatement(s);case ct._const:case ct._var:return n=n||this.value,t&&"var"!==n&&this.unexpected(),this.parseVarStatement(s,n);case ct._while:return this.parseWhileStatement(s);case ct._with:return this.parseWithStatement(s);case ct.braceL:return this.parseBlock(!0,s);case ct.semi:return this.parseEmptyStatement(s);case ct._export:case ct._import:if(this.options.ecmaVersion>10&&r===ct._import){gt.lastIndex=this.pos;var a=gt.exec(this.input),o=this.pos+a[0].length;if(40===this.input.charCodeAt(o))return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===ct._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var h=this.value,u=this.parseExpression();return r===ct.name&&"Identifier"===u.type&&this.eat(ct.colon)?this.parseLabeledStatement(s,h,u,t):this.parseExpressionStatement(s,u)}},Ot.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(ct.semi)||this.insertSemicolon()?t.label=null:this.type!==ct.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var r=this.labels[n];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(i||"loop"===r.kind))break;if(t.label&&i)break}}return n===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},Ot.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},Ot.parseDoStatement=function(t){return this.next(),this.labels.push(Nt),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(ct._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(ct.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},Ot.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Nt),this.enterScope(0),this.expect(ct.parenL),this.type===ct.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===ct._var||this.type===ct._const||i){var n=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),(this.type===ct._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===n.declarations.length?(this.options.ecmaVersion>=9&&(this.type===ct._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,n)):(e>-1&&this.unexpected(e),this.parseFor(t,n))}var s=new Lt,a=this.parseExpression(!0,s);return this.type===ct._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===ct._in?e>-1&&this.unexpected(e):t.await=e>-1),this.toAssignable(a,!1,s),this.checkLVal(a),this.parseForIn(t,a)):(this.checkExpressionErrors(s,!0),e>-1&&this.unexpected(e),this.parseFor(t,a))},Ot.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,zt|(i?0:Rt),!1,e)},Ot.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(ct._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},Ot.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(ct.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},Ot.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(ct.braceL),this.labels.push(Vt),this.enterScope(0);for(var i=!1;this.type!==ct.braceR;)if(this.type===ct._case||this.type===ct._default){var n=this.type===ct._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),n?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(ct.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},Ot.parseThrowStatement=function(t){return this.next(),lt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Bt=[];Ot.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===ct._catch){var e=this.startNode();if(this.next(),this.eat(ct.parenL)){e.param=this.parseBindingAtom();var i="Identifier"===e.param.type;this.enterScope(i?32:0),this.checkLVal(e.param,i?4:2),this.expect(ct.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(ct._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},Ot.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},Ot.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(Nt),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},Ot.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},Ot.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},Ot.parseLabeledStatement=function(t,e,i,n){for(var r=0,s=this.labels;r<s.length;r+=1){s[r].name===e&&this.raise(i.start,"Label '"+e+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===ct._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=a}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(n?-1===n.indexOf("label")?n+"label":n:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},Ot.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},Ot.parseBlock=function(t,e){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(ct.braceL),t&&this.enterScope(0);!this.eat(ct.braceR);){var i=this.parseStatement(null);e.body.push(i)}return t&&this.exitScope(),this.finishNode(e,"BlockStatement")},Ot.parseFor=function(t,e){return t.init=e,this.expect(ct.semi),t.test=this.type===ct.semi?null:this.parseExpression(),this.expect(ct.semi),t.update=this.type===ct.parenR?null:this.parseExpression(),this.expect(ct.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},Ot.parseForIn=function(t,e){var i=this.type===ct._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)?this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"):"AssignmentPattern"===e.type&&this.raise(e.start,"Invalid left-hand side in for-loop"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(ct.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},Ot.parseVar=function(t,e,i){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(ct.eq)?n.init=this.parseMaybeAssign(e):"const"!==i||this.type===ct._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===n.id.type||e&&(this.type===ct._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(ct.comma))break}return t},Ot.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?1:2,!1)};var zt=1,Rt=2;Ot.parseFunction=function(t,e,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===ct.star&&e&Rt&&this.unexpected(),t.generator=this.eat(ct.star)),this.options.ecmaVersion>=8&&(t.async=!!n),e&zt&&(t.id=4&e&&this.type!==ct.name?null:this.parseIdent(),!t.id||e&Rt||this.checkLVal(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(At(t.async,t.generator)),e&zt||(t.id=this.type===ct.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(t,e&zt?"FunctionDeclaration":"FunctionExpression")},Ot.parseFunctionParams=function(t){this.expect(ct.parenL),t.params=this.parseBindingList(ct.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ot.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var n=this.startNode(),r=!1;for(n.body=[],this.expect(ct.braceL);!this.eat(ct.braceR);){var s=this.parseClassElement(null!==t.superClass);s&&(n.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(r&&this.raise(s.start,"Duplicate constructor in the same class"),r=!0))}return t.body=this.finishNode(n,"ClassBody"),this.strict=i,this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},Ot.parseClassElement=function(t){var e=this;if(this.eat(ct.semi))return null;var i=this.startNode(),n=function(t,n){void 0===n&&(n=!1);var r=e.start,s=e.startLoc;return!!e.eatContextual(t)&&(!(e.type===ct.parenL||n&&e.canInsertSemicolon())||(i.key&&e.unexpected(),i.computed=!1,i.key=e.startNodeAt(r,s),i.key.name=t,e.finishNode(i.key,"Identifier"),!1))};i.kind="method",i.static=n("static");var r=this.eat(ct.star),s=!1;r||(this.options.ecmaVersion>=8&&n("async",!0)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(ct.star)):n("get")?i.kind="get":n("set")&&(i.kind="set")),i.key||this.parsePropertyName(i);var a=i.key,o=!1;return i.computed||i.static||!("Identifier"===a.type&&"constructor"===a.name||"Literal"===a.type&&"constructor"===a.value)?i.static&&"Identifier"===a.type&&"prototype"===a.name&&this.raise(a.start,"Classes may not have a static property named prototype"):("method"!==i.kind&&this.raise(a.start,"Constructor can't have get/set modifier"),r&&this.raise(a.start,"Constructor can't be a generator"),s&&this.raise(a.start,"Constructor can't be an async method"),i.kind="constructor",o=t),this.parseClassMethod(i,r,s,o),"get"===i.kind&&0!==i.value.params.length&&this.raiseRecoverable(i.value.start,"getter should have no params"),"set"===i.kind&&1!==i.value.params.length&&this.raiseRecoverable(i.value.start,"setter should have exactly one param"),"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params"),i},Ot.parseClassMethod=function(t,e,i,n){return t.value=this.parseMethod(e,i,n),this.finishNode(t,"MethodDefinition")},Ot.parseClassId=function(t,e){this.type===ct.name?(t.id=this.parseIdent(),e&&this.checkLVal(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},Ot.parseClassSuper=function(t){t.superClass=this.eat(ct._extends)?this.parseExprSubscripts():null},Ot.parseExport=function(t,e){if(this.next(),this.eat(ct.star))return this.expectContextual("from"),this.type!==ct.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(ct._default)){var i;if(this.checkExport(e,"default",this.lastTokStart),this.type===ct._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),t.declaration=this.parseFunction(n,4|zt,!1,i)}else if(this.type===ct._class){var r=this.startNode();t.declaration=this.parseClass(r,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==ct.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var s=0,a=t.specifiers;s<a.length;s+=1){var o=a[s];this.checkUnreserved(o.local),this.checkLocalExport(o.local)}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},Ot.checkExport=function(t,e,i){t&&(yt(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},Ot.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e.name,e.start);else if("ObjectPattern"===i)for(var n=0,r=e.properties;n<r.length;n+=1){var s=r[n];this.checkPatternExport(t,s)}else if("ArrayPattern"===i)for(var a=0,o=e.elements;a<o.length;a+=1){var h=o[a];h&&this.checkPatternExport(t,h)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i?this.checkPatternExport(t,e.argument):"ParenthesizedExpression"===i&&this.checkPatternExport(t,e.expression)},Ot.checkVariableExport=function(t,e){if(t)for(var i=0,n=e;i<n.length;i+=1){var r=n[i];this.checkPatternExport(t,r.id)}},Ot.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Ot.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(ct.braceL);!this.eat(ct.braceR);){if(i)i=!1;else if(this.expect(ct.comma),this.afterTrailingComma(ct.braceR))break;var n=this.startNode();n.local=this.parseIdent(!0),n.exported=this.eatContextual("as")?this.parseIdent(!0):n.local,this.checkExport(t,n.exported.name,n.exported.start),e.push(this.finishNode(n,"ExportSpecifier"))}return e},Ot.parseImport=function(t){return this.next(),this.type===ct.string?(t.specifiers=Bt,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===ct.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},Ot.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===ct.name){var i=this.startNode();if(i.local=this.parseIdent(),this.checkLVal(i.local,2),t.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(ct.comma))return t}if(this.type===ct.star){var n=this.startNode();return this.next(),this.expectContextual("as"),n.local=this.parseIdent(),this.checkLVal(n.local,2),t.push(this.finishNode(n,"ImportNamespaceSpecifier")),t}for(this.expect(ct.braceL);!this.eat(ct.braceR);){if(e)e=!1;else if(this.expect(ct.comma),this.afterTrailingComma(ct.braceR))break;var r=this.startNode();r.imported=this.parseIdent(!0),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLVal(r.local,2),t.push(this.finishNode(r,"ImportSpecifier"))}return t},Ot.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},Ot.isDirectiveCandidate=function(t){return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var Dt=Pt.prototype;Dt.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var n=0,r=t.properties;n<r.length;n+=1){var s=r[n];this.toAssignable(s,e),"RestElement"!==s.type||"ArrayPattern"!==s.argument.type&&"ObjectPattern"!==s.argument.type||this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},Dt.toAssignableList=function(t,e){for(var i=t.length,n=0;n<i;n++){var r=t[n];r&&this.toAssignable(r,e)}if(i){var s=t[i-1];6===this.options.ecmaVersion&&e&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return t},Dt.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},Dt.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==ct.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},Dt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case ct.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(ct.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case ct.braceL:return this.parseObj(!0)}return this.parseIdent()},Dt.parseBindingList=function(t,e,i){for(var n=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(ct.comma),e&&this.type===ct.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===ct.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===ct.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),n.push(a)}return n},Dt.parseBindingListItem=function(t){return t},Dt.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(ct.eq))return i;var n=this.startNodeAt(t,e);return n.left=i,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},Dt.checkLVal=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Identifier":2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(e?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(yt(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),0!==e&&5!==e&&this.declareName(t.name,e,t.start);break;case"MemberExpression":e&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ObjectPattern":for(var n=0,r=t.properties;n<r.length;n+=1){var s=r[n];this.checkLVal(s,e,i)}break;case"Property":this.checkLVal(t.value,e,i);break;case"ArrayPattern":for(var a=0,o=t.elements;a<o.length;a+=1){var h=o[a];h&&this.checkLVal(h,e,i)}break;case"AssignmentPattern":this.checkLVal(t.left,e,i);break;case"RestElement":this.checkLVal(t.argument,e,i);break;case"ParenthesizedExpression":this.checkLVal(t.expression,e,i);break;default:this.raise(t.start,(e?"Binding":"Assigning to")+" rvalue")}};var Ft=Pt.prototype;Ft.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var n,r=t.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===s&&(e.proto&&(i&&i.doubleProto<0?i.doubleProto=r.start:this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var a=e[n="$"+n];if(a)("init"===s?this.strict&&a.init||a.get||a.set:a.init||a[s])&&this.raiseRecoverable(r.start,"Redefinition of property");else a=e[n]={init:!1,get:!1,set:!1};a[s]=!0}}},Ft.parseExpression=function(t,e){var i=this.start,n=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===ct.comma){var s=this.startNodeAt(i,n);for(s.expressions=[r];this.eat(ct.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return r},Ft.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var n=!1,r=-1,s=-1,a=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,a=e.shorthandAssign,e.parenthesizedAssign=e.trailingComma=e.shorthandAssign=-1):(e=new Lt,n=!0);var o=this.start,h=this.startLoc;this.type!==ct.parenL&&this.type!==ct.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(t,e);if(i&&(u=i.call(this,u,o,h)),this.type.isAssign){var c=this.startNodeAt(o,h);return c.operator=this.value,c.left=this.type===ct.eq?this.toAssignable(u,!1,e):u,n||Lt.call(e),e.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(t),this.finishNode(c,"AssignmentExpression")}return n&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),a>-1&&(e.shorthandAssign=a),u},Ft.parseMaybeConditional=function(t,e){var i=this.start,n=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(ct.question)){var s=this.startNodeAt(i,n);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(ct.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r},Ft.parseExprOps=function(t,e){var i=this.start,n=this.startLoc,r=this.parseMaybeUnary(e,!1);return this.checkExpressionErrors(e)?r:r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,n,-1,t)},Ft.parseExprOp=function(t,e,i,n,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==ct._in)&&s>n){var a=this.type===ct.logicalOR||this.type===ct.logicalAND,o=this.value;this.next();var h=this.start,u=this.startLoc,c=this.parseExprOp(this.parseMaybeUnary(null,!1),h,u,s,r),l=this.buildBinary(e,i,t,c,o,a);return this.parseExprOp(l,e,i,n,r)}return t},Ft.buildBinary=function(t,e,i,n,r,s){var a=this.startNodeAt(t,e);return a.left=i,a.operator=r,a.right=n,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},Ft.parseMaybeUnary=function(t,e){var i,n=this.start,r=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))i=this.parseAwait(),e=!0;else if(this.type.prefix){var s=this.startNode(),a=this.type===ct.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),a?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):e=!0,i=this.finishNode(s,a?"UpdateExpression":"UnaryExpression")}else{if(i=this.parseExprSubscripts(t),this.checkExpressionErrors(t))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(n,r);o.operator=this.value,o.prefix=!1,o.argument=i,this.checkLVal(i),this.next(),i=this.finishNode(o,"UpdateExpression")}}return!e&&this.eat(ct.starstar)?this.buildBinary(n,r,i,this.parseMaybeUnary(null,!1),"**",!1):i},Ft.parseExprSubscripts=function(t){var e=this.start,i=this.startLoc,n=this.parseExprAtom(t),r="ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(t)||r)return n;var s=this.parseSubscripts(n,e,i);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1)),s},Ft.parseSubscripts=function(t,e,i,n){for(var r=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end);;){var s=this.parseSubscript(t,e,i,n,r);if(s===t||"ArrowFunctionExpression"===s.type)return s;t=s}},Ft.parseSubscript=function(t,e,i,n,r){var s=this.eat(ct.bracketL);if(s||this.eat(ct.dot)){var a=this.startNodeAt(e,i);a.object=t,a.property=s?this.parseExpression():this.parseIdent("never"!==this.options.allowReserved),a.computed=!!s,s&&this.expect(ct.bracketR),t=this.finishNode(a,"MemberExpression")}else if(!n&&this.eat(ct.parenL)){var o=new Lt,h=this.yieldPos,u=this.awaitPos,c=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(ct.parenR,this.options.ecmaVersion>=8,!1,o);if(r&&!this.canInsertSemicolon()&&this.eat(ct.arrow))return this.checkPatternErrors(o,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=u,this.awaitIdentPos=c,this.parseArrowExpression(this.startNodeAt(e,i),l,!0);this.checkExpressionErrors(o,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=c||this.awaitIdentPos;var d=this.startNodeAt(e,i);d.callee=t,d.arguments=l,t=this.finishNode(d,"CallExpression")}else if(this.type===ct.backQuote){var f=this.startNodeAt(e,i);f.tag=t,f.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(f,"TaggedTemplateExpression")}return t},Ft.parseExprAtom=function(t){this.type===ct.slash&&this.readRegexp();var e,i=this.potentialArrowAt===this.start;switch(this.type){case ct._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),e=this.startNode(),this.next(),this.type!==ct.parenL||this.allowDirectSuper||this.raise(e.start,"super() call outside constructor of a subclass"),this.type!==ct.dot&&this.type!==ct.bracketL&&this.type!==ct.parenL&&this.unexpected(),this.finishNode(e,"Super");case ct._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case ct.name:var n=this.start,r=this.startLoc,s=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(ct._function))return this.parseFunction(this.startNodeAt(n,r),0,!1,!0);if(i&&!this.canInsertSemicolon()){if(this.eat(ct.arrow))return this.parseArrowExpression(this.startNodeAt(n,r),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===ct.name&&!s)return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(ct.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,r),[a],!0)}return a;case ct.regexp:var o=this.value;return(e=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},e;case ct.num:case ct.string:return this.parseLiteral(this.value);case ct._null:case ct._true:case ct._false:return(e=this.startNode()).value=this.type===ct._null?null:this.type===ct._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case ct.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(i);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(t.parenthesizedAssign=h),t.parenthesizedBind<0&&(t.parenthesizedBind=h)),u;case ct.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(ct.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case ct.braceL:return this.parseObj(!1,t);case ct._function:return e=this.startNode(),this.next(),this.parseFunction(e,0);case ct._class:return this.parseClass(this.startNode(),!1);case ct._new:return this.parseNew();case ct.backQuote:return this.parseTemplate();case ct._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},Ft.parseExprImport=function(){var t=this.startNode();switch(this.next(),this.type){case ct.parenL:return this.parseDynamicImport(t);default:this.unexpected()}},Ft.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(ct.parenR)){var e=this.start;this.eat(ct.comma)&&this.eat(ct.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},Ft.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=e.raw.slice(0,-1)),this.next(),this.finishNode(e,"Literal")},Ft.parseParenExpression=function(){this.expect(ct.parenL);var t=this.parseExpression();return this.expect(ct.parenR),t},Ft.parseParenAndDistinguishE