webhook-action/node_modules/prettier/parser-glimmer.js

2 lines
137 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):((t="undefined"!=typeof globalThis?globalThis:t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e())}(this,(function(){"use strict";var t=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){var r="\n",n=function(){function t(t){this.string=t;for(var e=[0],n=0;n<t.length;)switch(t[n]){case r:n+=r.length,e.push(n);break;case"\r":t[n+="\r".length]===r&&(n+=r.length),e.push(n);break;default:n++}this.offsets=e}return t.prototype.locationForIndex=function(t){if(t<0||t>this.string.length)return null;for(var e=0,r=this.offsets;r[e+1]<=t;)e++;return{line:e,column:t-r[e]}},t.prototype.indexForLocation=function(t){var e=t.line,r=t.column;return e<0||e>=this.offsets.length||r<0||r>this.lengthOfLine(e)?null:this.offsets[e]+r},t.prototype.lengthOfLine=function(t){var e=this.offsets[t];return(t===this.offsets.length-1?this.string.length:this.offsets[t+1])-e},t}();e.__esModule=!0,e.default=n}));var e=function(t,e){const r=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return r.loc=e,r};var r={locStart:function(t){return t.loc.start.offset},locEnd:function(t){return t.loc.end.offset}};Object.freeze([]);function n(){return Object.create(null)}const{keys:s}=Object;function a(t){for(let e=1;e<arguments.length;e++){let r=arguments[e];if(null===r||"object"!=typeof r)continue;let n=s(r);for(let e=0;e<n.length;e++){let s=n[e];t[s]=r[s]}}return t}const i=(...t)=>t;function o(t){return t.length>0}function l(t,e="unexpected empty list"){if(!o(t))throw new Error(e)}const c=console;const h=Object.freeze({line:1,column:0}),u=Object.freeze({source:"(synthetic)",start:h,end:h}),p=(Object.freeze({source:"(temporary)",start:h,end:h}),Object.freeze({source:"(nonexistent)",start:h,end:h})),d=Object.freeze({source:"(broken)",start:h,end:h});class m{constructor(t){this.loc=t.loc,this.chars=t.chars}static synthetic(t){let e=M.synthetic(t);return new m({loc:e,chars:t})}static load(t,e){return new m({loc:M.load(t,e[1]),chars:e[0]})}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}}var f,g,b,y=function(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r},k=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const v="MATCH_ANY",w="IS_INVISIBLE";class S{constructor(t){f.set(this,void 0),y(this,f,t)}first(t){for(let e of k(this,f)){let r=e.match(t);if(o(r))return r[0]}return null}}f=new WeakMap;class E{constructor(){g.set(this,new Map)}get(t,e){let r=k(this,g).get(t);return r||(r=e(),k(this,g).set(t,r),r)}add(t,e){k(this,g).set(t,e)}match(t){let e=function(t){switch(t){case"Broken":case"InternalsSynthetic":case"NonExistent":return w;default:return t}}(t),r=[],n=k(this,g).get(e),s=k(this,g).get(v);return n&&r.push(n),s&&r.push(s),r}}function x(t){return t(new N).check()}g=new WeakMap;class N{constructor(){b.set(this,new E)}check(){return(t,e)=>this.matchFor(t.kind,e.kind)(t,e)}matchFor(t,e){let r=k(this,b).match(t);return new S(r).first(e)}when(t,e,r){return k(this,b).get(t,(()=>new E)).add(e,r),this}}b=new WeakMap;var T,P,A=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},C=function(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r};const L="BROKEN";class B{constructor(t){this.data=t}static forHbsPos(t,e){return new O(t,e,null).wrap()}static broken(t=h){return new _("Broken",t).wrap()}get offset(){let t=this.data.toCharPos();return null===t?null:t.offset}eql(t){return D(this.data,t.data)}until(t){return j(this.data,t.data)}move(t){let e=this.data.toCharPos();if(null===e)return B.broken();{let r=e.offset+t;return e.source.check(r)?new q(e.source,