@jsjoeio/code-server
Version:
Run VS Code on a remote server.
1 lines • 223 kB
JavaScript
!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return u})),n.d(t,"i",(function(){return a}));function r(e){return e>47&&e<58}function o(e,t,n){return n=n||90,(e&=-33)>=(t=t||65)&&e<=n}function i(e){return r(e)||s(e)}function s(e){return 95===e||o(e)}function a(e){return 32===e||9===e||160===e}function u(e){return a(e)||10===e||13===e}function c(e){return 39===e||34===e}class l{constructor(e,t,n){null==n&&"string"==typeof e&&(n=e.length),this.string=e,this.pos=this.start=t||0,this.end=n||0}eof(){return this.pos>=this.end}limit(e,t){return new l(this.string,e,t)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(e){const t=this.peek(),n="function"==typeof e?e(t):t===e;return n&&this.next(),n}eatWhile(e){const t=this.pos;for(;!this.eof()&&this.eat(e););return this.pos!==t}backUp(e){this.pos-=e||1}current(){return this.substring(this.start,this.pos)}substring(e,t){return this.string.slice(e,t)}error(e,t=this.pos){return new f(`${e} at ${t+1}`,t,this.string)}}class f extends Error{constructor(e,t,n){super(e),this.pos=t,this.string=n}}t.b=l},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"f",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return f}));const r={escape:92,throws:!1};var o=function(e,t){t=t?Object.assign({},r,t):r;const n=e.pos,o=e.peek();if(e.eat(i)){for(;!e.eof();)switch(e.next()){case o:return e.start=n,!0;case t.escape:e.next()}if(e.pos=n,t.throws)throw e.error("Unable to consume quoted string")}return!1};function i(e){return 39===e||34===e}function s(e){return e>47&&e<58}function a(e,t,n){return n=n||90,(e&=-33)>=(t=t||65)&&e<=n}function u(e){return s(e)||a(e)}function c(e){return function(e){return 32===e||9===e||160===e}(e)||10===e||13===e}const l={escape:92,throws:!1};function f(e,t,n,r){r=r?Object.assign({},l,r):l;const i=e.pos;if(e.eat(t)){let s,a=1;for(;!e.eof();)if(!o(e,r))if(s=e.next(),s===t)a++;else if(s===n){if(a--,!a)return e.start=i,!0}else s===r.escape&&e.next();if(e.pos=i,r.throws)throw e.error("Unable to find matching pair for "+String.fromCharCode(t))}return!1}},function(e,t){e.exports=require("vscode")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSyntaxes=t.getPathBaseName=t.toLSTextDocument=t.isNumber=t.isStyleAttribute=t.getEmbeddedCssNodeIfAny=t.getCssPropertyFromDocument=t.getCssPropertyFromRule=t.iterateCSSToken=t.getEmmetConfiguration=t.sameNodes=t.getNodesInBetween=t.findPrevWord=t.findNextWord=t.getDeepestFlatNode=t.offsetRangeToVsRange=t.offsetRangeToSelection=t.isOffsetInsideOpenOrCloseTag=t.setupCdataNodeSubtree=t.setupScriptNodeSubtree=t.getHtmlFlatNode=t.allowedMimeTypesInScriptTag=t.getFlatNode=t.parsePartialStylesheet=t.getEmmetMode=t.getMappingForIncludedLanguages=t.validate=t.isStyleSheet=t.LANGUAGE_MODES=t.migrateEmmetExtensionsPath=t.updateEmmetExtensionsPath=t.getEmmetHelper=t.setHomeDir=void 0;const r=n(2),o=n(14),i=n(8),s=n(30),a=n(31),u=n(4);let c,l,f;function d(){return c||(c=n(56)),c}function p(e){return["css","scss","sass","less","stylus"].includes(e)}t.setHomeDir=function(e){f=e},t.getEmmetHelper=d,t.updateEmmetExtensionsPath=function(e=!1){var t;const n=d();let o=r.workspace.getConfiguration("emmet").get("extensionsPath");if(o||(o=[]),e||l!==o){l=o;const e=(null===(t=r.workspace.workspaceFolders)||void 0===t?void 0:t.length)?r.workspace.workspaceFolders[0].uri:void 0,i=r.workspace.fs;n.updateExtensionsPath(o,i,e,f).catch(e=>{Array.isArray(o)&&o.length&&r.window.showErrorMessage(e.message)})}},t.migrateEmmetExtensionsPath=function(){let e=r.workspace.getConfiguration().inspect("emmet.extensionsPath");"string"==typeof(null==e?void 0:e.globalValue)?r.workspace.getConfiguration().update("emmet.extensionsPath",[e.globalValue],!0):null===(null==e?void 0:e.globalValue)&&r.workspace.getConfiguration().update("emmet.extensionsPath",[],!0),"string"==typeof(null==e?void 0:e.workspaceValue)?r.workspace.getConfiguration().update("emmet.extensionsPath",[e.workspaceValue],!1):null===(null==e?void 0:e.workspaceValue)&&r.workspace.getConfiguration().update("emmet.extensionsPath",[],!1),"string"==typeof(null==e?void 0:e.workspaceFolderValue)?r.workspace.getConfiguration().update("emmet.extensionsPath",[e.workspaceFolderValue]):null===(null==e?void 0:e.workspaceFolderValue)&&r.workspace.getConfiguration().update("emmet.extensionsPath",[])},t.LANGUAGE_MODES={html:["!",".","}",":","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],jade:["!",".","}",":","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],slim:["!",".","}",":","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],haml:["!",".","}",":","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],xml:[".","}","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],xsl:["!",".","}","*","$","/","]","0","1","2","3","4","5","6","7","8","9"],css:[":","!","-","0","1","2","3","4","5","6","7","8","9"],scss:[":","!","-","0","1","2","3","4","5","6","7","8","9"],sass:[":","!","0","1","2","3","4","5","6","7","8","9"],less:[":","!","-","0","1","2","3","4","5","6","7","8","9"],stylus:[":","!","0","1","2","3","4","5","6","7","8","9"],javascriptreact:["!",".","}","*","$","]","/","0","1","2","3","4","5","6","7","8","9"],typescriptreact:["!",".","}","*","$","]","/","0","1","2","3","4","5","6","7","8","9"]},t.isStyleSheet=p,t.validate=function(e=!0){let t=r.window.activeTextEditor;return t?!(!e&&p(t.document.languageId)):(r.window.showInformationMessage("No editor is active"),!1)},t.getMappingForIncludedLanguages=function(){const e=Object.create(null);let n=r.workspace.getConfiguration("emmet").includeLanguages,o=Object.assign({},{handlebars:"html",php:"html"},n||{});return Object.keys(o).forEach(n=>{"string"==typeof o[n]&&t.LANGUAGE_MODES[o[n]]&&(e[n]=o[n])}),e},t.getEmmetMode=function(e,t){if(!e||t.indexOf(e)>-1)return;if(/\b(typescriptreact|javascriptreact|jsx-tags)\b/.test(e))return"jsx";if("sass-indented"===e)return"sass";if("jade"===e)return"pug";const n={markup:["html","xml","xsl","jsx","js","pug","slim","haml"],stylesheet:["css","sass","scss","less","sss","stylus"]};return n.markup.includes(e)||n.stylesheet.includes(e)?e:void 0};function m(e,t,n){if(e)return o(e.children);function r(e){var r;if(!e)return;const i=e.start,s=e.end;if(i<t&&s>t||n&&i<=t&&s>=t)return null!==(r=o(e.children))&&void 0!==r?r:e;if("close"in e){const t=e;if(t.open&&!t.close)return o(t.children)}}function o(e){for(let t=0;t<e.length;t++){const n=r(e[t]);if(n)return n}}}function h(e,n){if("script"===n.name&&n.attributes&&n.attributes.some(e=>"type"===e.name.toString()&&t.allowedMimeTypesInScriptTag.includes(e.value.toString()))&&n.open){const t=" ".repeat(n.open.end),r=n.close?n.close.start:n.end,i=t+e.substring(n.open.end,r);return o.default(i).children.forEach(e=>{n.children.push(e),e.parent=n}),i}return""}function g(e,t){const n=t.start+"<![CDATA[".length,r=t.end-"]]>".length,i=" ".repeat(n)+e.substring(n,r);return o.default(i).children.forEach(e=>{t.children.push(e),e.parent=t}),i}function b(e,t){return!e&&!t||!(!e||!t)&&(e.start===t.start&&e.end===t.end)}function v(){return{markup:["html","xml","xsl","jsx","js","pug","slim","haml"],stylesheet:["css","sass","scss","less","sss","stylus"]}}t.parsePartialStylesheet=function(e,t){const n="css"===e.languageId,o=e.offsetAt(t);let a=0,u=e.getText().length;const c=o-5e3,l=c>0?c:a,f=new s.DocumentStreamReader(e,o);function d(){const t=e.positionAt(f.pos).line;if(!n&&g!==t){g=t;const n=e.lineAt(g).text.indexOf("//");n>-1&&(f.pos=e.offsetAt(new r.Position(g,n)))}}function p(){var t;47===f.peek()&&(42===f.backUp(1)?f.pos=null!==(t=function(t){let n=e.getText().substring(0,t).lastIndexOf("/*");if(-1!==n)return n}(f.pos))&&void 0!==t?t:a:f.next())}function m(){var t;if(f.eat(47))if(f.eat(47)&&!n){const t=e.positionAt(f.pos).line;f.pos=e.offsetAt(new r.Position(t+1,0))}else f.eat(42)&&(f.pos=null!==(t=function(t){let n=e.getText().substring(t).indexOf("*/");if(-1!==n)return n+=2+t,n}(f.pos))&&void 0!==t?t:u)}for(;!f.eof()&&!f.eat(125);)47===f.peek()?m():f.next();f.eof()||(u=f.pos),f.pos=o;let h=1,g=t.line,b=!1;for(;!b&&h>0&&!f.sof();){switch(d(),f.backUp(1)){case 123:h--;break;case 125:n?(f.next(),a=f.pos,b=!0):h++;break;case 47:p()}(t.line-e.positionAt(f.pos).line>100||f.pos<=l)&&(b=!0)}g=e.positionAt(f.pos).line,h=0;let v=!1;for(;!b&&!f.sof()&&!v&&h>=0;){d();const e=f.backUp(1);if(!/\s/.test(String.fromCharCode(e))){switch(e){case 47:p();break;case 125:h++;break;case 123:h--;break;default:h||(v=!0)}!f.sof()&&v&&(a=f.pos)}}try{const t=" ".repeat(a)+e.getText().substring(a,u);return i.default(t)}catch(e){return}},t.getFlatNode=m,t.allowedMimeTypesInScriptTag=["text/html","text/plain","text/x-template","text/template","text/ng-template"],t.getHtmlFlatNode=function e(t,n,r,o){var i,s;let a=m(n,r,o);if(a){if("script"===a.name&&0===a.children.length){const n=h(t,a);n&&(a=null!==(i=e(n,a,r,o))&&void 0!==i?i:a)}else if("cdata"===a.type){a=null!==(s=e(g(t,a),a,r,o))&&void 0!==s?s:a}return a}},t.setupScriptNodeSubtree=h,t.setupCdataNodeSubtree=g,t.isOffsetInsideOpenOrCloseTag=function(e,t){const n=e;return!!(n.open&&t>n.open.start&&t<n.open.end||n.close&&t>n.close.start&&t<n.close.end)},t.offsetRangeToSelection=function(e,t,n){const o=e.positionAt(t),i=e.positionAt(n);return new r.Selection(o,i)},t.offsetRangeToVsRange=function(e,t,n){const o=e.positionAt(t),i=e.positionAt(n);return new r.Range(o,i)},t.getDeepestFlatNode=function e(t){if(!t||!t.children||0===t.children.length||!t.children.find(e=>"comment"!==e.type))return t;for(let n=t.children.length-1;n>=0;n--)if("comment"!==t.children[n].type)return e(t.children[n])},t.findNextWord=function(e,t){let n,r,o=-1===t,i=!1,s=!1;for(;t<e.length-1;)if(t++,o){if(!o||i||" "!==e[t])if(i){if(" "===e[t]){r=t,s=!0;break}}else n=t,i=!0}else" "===e[t]&&(o=!0);return i&&!s&&(r=e.length),[n,r]},t.findPrevWord=function(e,t){let n,r,o=t===e.length,i=!1,s=!1;for(;t>-1;)if(t--,o){if(!o||s||" "!==e[t])if(s){if(" "===e[t]){n=t+1,i=!0;break}}else r=t+1,s=!0}else" "===e[t]&&(o=!0);return s&&!i&&(n=0),[n,r]},t.getNodesInBetween=function(e,t){if(b(e,t))return[e];if(!b(e.parent,t.parent)){if(t.start<e.start)return[t];if(t.start<e.end)return[e];for(;e.parent&&e.parent.end<t.start;)e=e.parent;for(;t.parent&&t.parent.start>e.start;)t=t.parent}const n=[];let r=e;const o=t.end;for(;r&&o>r.start;)n.push(r),r=r.nextSibling;return n},t.sameNodes=b,t.getEmmetConfiguration=function(e){const t=r.workspace.getConfiguration("emmet"),n=Object.assign({},t.syntaxProfiles||{}),o=Object.assign({},t.preferences||{});return"jsx"!==e&&"xml"!==e&&"xsl"!==e||(n[e]=n[e]||{},"object"!=typeof n[e]||n[e].hasOwnProperty("self_closing_tag")||n[e].hasOwnProperty("selfClosingStyle")||(n[e]={...n[e],selfClosingStyle:"jsx"===e?"xhtml":"xml"})),{preferences:o,showExpandedAbbreviation:t.showExpandedAbbreviation,showAbbreviationSuggestions:t.showAbbreviationSuggestions,syntaxProfiles:n,variables:t.variables,excludeLanguages:t.excludeLanguages,showSuggestionsAsSnippets:t.showSuggestionsAsSnippets}},t.iterateCSSToken=function e(t,n){for(let r=0,o=t.size;r<o;r++)if(!1===n(t.item(r))||!1===e(t.item(r),n))return!1;return!0},t.getCssPropertyFromRule=function(e,t){return e.children.find(e=>"property"===e.type&&e.name===t)},t.getCssPropertyFromDocument=function(e,t){const n=e.document,r=u.getRootNode(n,!0),o=n.offsetAt(t),s=m(r,o,!0);if(p(e.document.languageId))return s&&"property"===s.type?s:null;const a=s;if(a&&"style"===a.name&&a.open&&a.close&&a.open.end<o&&a.close.start>o){const e=" ".repeat(a.start)+n.getText().substring(a.start,a.end),t=m(i.default(e),o,!0);return t&&"property"===t.type?t:null}return null},t.getEmbeddedCssNodeIfAny=function(e,t,n){if(!t)return;const r=t;if(r&&r.open&&r.close){const t=e.offsetAt(n);if(r.open.end<t&&t<=r.close.start&&"style"===r.name){const t=" ".repeat(r.open.end)+e.getText().substring(r.open.end,r.close.start);return i.default(t)}}},t.isStyleAttribute=function(e,t){if(!e)return!1;const n=e,r=(n.attributes||[]).findIndex(e=>"style"===e.name.toString());if(-1===r)return!1;const o=n.attributes[r];return t>=o.value.start&&t<=o.value.end},t.isNumber=function(e){return"number"==typeof e},t.toLSTextDocument=function(e){return a.TextDocument.create(e.uri.toString(),e.languageId,e.version,e.getText())},t.getPathBaseName=function(e){const t=e.split("/").pop(),n=t?t.split("\\").pop():"";return null!=n?n:""},t.getSyntaxes=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearParseCache=t.removeFileFromParseCache=t.addFileToParseCache=t.getRootNode=void 0;const r=n(14),o=n(8),i=n(3),s=new Map;t.getRootNode=function(e,t){const n=e.uri.toString(),a=s.get(n),u=e.version;if(t&&a&&u===a.key)return a.value;const c=(i.isStyleSheet(e.languageId)?o.default:r.default)(e.getText());return t&&s.set(n,{key:u,value:c}),c},t.addFileToParseCache=function(e){const t=e.uri.toString();s.set(t,void 0)},t.removeFileFromParseCache=function(e){const t=e.uri.toString();s.delete(t)},t.clearParseCache=function(){s.clear()}},function(e,t,n){"use strict";t.a=class{constructor(e,t,n){null==n&&"string"==typeof e&&(n=e.length),this.string=e,this.pos=this.start=t||0,this.end=n}eof(){return this.pos>=this.end}limit(e,t){return new this.constructor(this.string,e,t)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(e){const t=this.peek(),n="function"==typeof e?e(t):t===e;return n&&this.next(),n}eatWhile(e){const t=this.pos;for(;!this.eof()&&this.eat(e););return this.pos!==t}backUp(e){this.pos-=e||1}current(){return this.substring(this.start,this.pos)}substring(e,t){return this.string.slice(e,t)}error(e){const t=new Error(`${e} at char ${this.pos+1}`);return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t}}},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("fs")},function(e,t,n){"use strict";n.r(t),n.d(t,"lexer",(function(){return Ce})),n.d(t,"Token",(function(){return m})),n.d(t,"any",(function(){return ue})),n.d(t,"selector",(function(){return ce})),n.d(t,"value",(function(){return le})),n.d(t,"keyword",(function(){return fe})),n.d(t,"variable",(function(){return oe})),n.d(t,"formatting",(function(){return de})),n.d(t,"comment",(function(){return N})),n.d(t,"whitespace",(function(){return M})),n.d(t,"ident",(function(){return k})),n.d(t,"string",(function(){return $})),n.d(t,"url",(function(){return ne})),n.d(t,"interpolation",(function(){return j})),n.d(t,"backtick",(function(){return W})),n.d(t,"parseMediaExpression",(function(){return ge})),n.d(t,"parsePropertyName",(function(){return me})),n.d(t,"parsePropertyValue",(function(){return he})),n.d(t,"parseSelector",(function(){return pe})),n.d(t,"createProperty",(function(){return ke})),n.d(t,"createRule",(function(){return ve})),n.d(t,"createAtRule",(function(){return xe}));var r=n(5),o=n(1);class i{constructor(e){this.type=e,this.children=[],this.parent=null}get firstChild(){return this.children[0]}get nextSibling(){const e=this.index();return-1!==e?this.parent.children[e+1]:null}get previousSibling(){const e=this.index();return-1!==e?this.parent.children[e-1]:null}index(){return this.parent?this.parent.children.indexOf(this):-1}add(e){return e&&(e.remove(),this.children.push(e),e.parent=this),this}remove(){if(this.parent){const e=this.index();-1!==e&&(this.parent.children.splice(e,1),this.parent=null)}return this}}class s extends i{constructor(){super("stylesheet"),this.comments=[]}get start(){const e=this.firstChild;return e&&e.start}get end(){const e=this.children[this.children.length-1];return e&&e.end}addComment(e){this.comments.push(e)}}function a(e){return function(e){let t;for(e=e.slice();t!==e.length;)t=e.length,u(e[0])&&e.shift(),u(d(e))&&e.pop();return e}(e)}function u(e){const t=e&&e.type;return"whitespace"===t||"comment"===t}function c(e,t){const n=e.pos;for(let r=0,o=t.length;r<o;r++)if(!e.eat(t.charCodeAt(r)))return e.pos=n,!1;return!0}function l(e,t){const n=e.pos;return!!e.eat(t)&&(e.start=n,!0)}function f(e,t){const n=e.pos;return!!e.eatWhile(t)&&(e.start=n,!0)}function d(e){return e[e.length-1]}function p(e){return e&&e.valueOf()}class m{constructor(e,t,n,r){this.stream=e,this.start=null!=n?n:e.start,this.end=null!=r?r:e.pos,this.type=t,this._props=null,this._value=null,this._items=null}get size(){return this._items?this._items.length:0}get items(){return this._items}clone(e,t){return new this.constructor(this.stream,this.type,null!=e?e:this.start,null!=t?t:this.end)}add(e){if(Array.isArray(e))for(let t=0,n=e.length;t<n;t++)this.add(e[t]);else e&&(this._items?this._items.push(e):this._items=[e]);return this}remove(e){if(this._items){const t=this._items.indexOf(e);-1!==t&&this._items.splice(t,1)}return this}item(e){const t=this.size;return this._items&&this._items[(t+e)%t]}limit(){return this.stream.limit(this.start,this.end)}slice(e,t){const n=this.clone(),r=this._items&&this._items.slice(e,t);return r&&r.length?(n.start=r[0].start,n.end=r[r.length-1].end,n.add(r)):r&&(n.start=n.end),n}property(e,t){return void 0!==t&&(this._props||(this._props={}),this._props[e]=t),this._props&&this._props[e]}toString(){return`${this.valueOf()} [${this.start}, ${this.end}] (${this.type})`}valueOf(){return null===this._value&&(this._value=this.stream.substring(this.start,this.end)),this._value}}const h=(new Map).set(44,"comma").set(58,"propertyDelimiter").set(59,"propertyTerminator").set(123,"ruleStart").set(125,"ruleEnd");function g(e){if(44===(t=e.peek())||58===t||59===t||123===t||125===t){const t=e.pos,n=h.get(e.next()),r=new m(e,"separator",t);return r.property("type",n),r}var t}var b=function(e,t){if(40===e.peek()){const r=e.pos;e.next();const o=[];let i,s=!1;for(;!e.eof()&&123!==(n=e.peek())&&125!==n&&!e.eat(41)&&(i=t(e),i);)w(i)&&(s=!0),o.push(i);return e.start=r,function(e,t,n){const r=new m(e,"arguments"),o=n?w:x;let i=[];for(let n,s=0,a=t.length;s<a;s++)n=t[s],o(n)?(r.add(v(e,i)||y(e,n.start)),i.length=0):i.push(n);i.length&&r.add(v(e,i));return r}(e,o,s)}var n};function v(e,t){if((t=a(t)).length){const n=new m(e,"argument",t[0].start,d(t).end);for(let e=0;e<t.length;e++)n.add(t[e]);return n}}function y(e,t){const n=new m(e,"argument",t,t);return n.property("empty",!0),n}function x(e){return"comma"===e.property("type")}function w(e){return"propertyTerminator"===e.property("type")}function k(e){return T(e)&&new m(e,"ident")}function T(e){const t=e.pos;return e.eat(45),e.eat(C)?(e.eatWhile(E),e.start=t,!0):(e.pos=t,!1)}function C(e){return 95===e||45===e||Object(o.c)(e)||e>=128}function E(e){return Object(o.e)(e)||C(e)}function S(e,t,n,r,o){const i=e.pos;if(e.eat(n)){const n=r(e,i);if(n||o)return e.start=i,new m(e,t,i).add(n)}e.pos=i}function A(e){return S(e,"at-keyword",64,k)}function j(e,t){const n=e.pos;if(t=t||O,(e.eat(35)||e.eat(64))&&e.eat(123)){const r=new m(e,"interpolation",n);let o,i=1;for(;!e.eof();)if(e.eat(123))i++;else if(e.eat(125)){if(i--,!i)return r.end=e.pos,r}else{if(!(o=t(e)))break;r.add(o)}}e.pos=n}function _(e){const t=e.pos;return(e.eat(35)||e.eat(64))&&Object(o.a)(e,123,125)?(e.start=t,!0):(e.pos=t,!1)}function O(e){const t=e.pos;for(;!e.eof()&&125!==e.peek();)I(e)||e.next();if(t!==e.pos)return new m(e,"expression",t)}function $(e){return I(e,!0)}function I(e,t){let n,r,i,s=e.peek();if(Object(o.f)(s)){e.start=e.pos,e.next();const o=s,a=e.pos;for(;!e.eof()&&(n=e.pos,!e.eat(o)&&!e.eat(P));)e.eat(92)?e.eat(P):t&&(i=j(e))&&(r?r.push(i):r=[i]),e.next();if(t){const t=new m(e,"string"),i=new m(e,"unquoted",a,n);return i.add(r),t.add(i),t.property("quote",o),t}return!0}return!1}function P(e){return 10===e||13===e}var N=function(e){return function(e){if(R(e)){const t=new m(e,"comment");return t.property("type","single-line"),t}}(e)||function(e){if(F(e)){const t=new m(e,"comment");return t.property("type","multiline"),t}}(e)};function z(e){return R(e)||F(e)}function R(e){const t=e.pos;if(e.eat(47)&&e.eat(47)){for(e.start=t;!e.eof()&&10!==(n=e.next())&&13!==n;);return!0}var n;return e.pos=t,!1}function F(e){const t=e.pos;if(e.eat(47)&&e.eat(42)){for(;!(e.eof()||42===e.next()&&e.eat(47)););return e.start=t,!0}return e.pos=t,!1}function M(e){return L(e)&&new m(e,"whitespace")}function L(e){return f(e,o.g)}function U(e){const t=e.pos;if(e.eat(91)){q(e);const n=k(e);q(e);const r=function(e){return f(e,B)&&new m(e,"operator")}(e);q(e);const o=$(e)||k(e);return q(e),e.eat(93),new m(e,"attribute",t).add(n).add(r).add(o)}}function q(e){for(;!e.eof();)if(!L(e)&&!z(e))return!0}function B(e){return 126===e||124===e||94===e||36===e||42===e||61===e}function W(e){if(V(e))return new m(e,"backtick")}function V(e){const t=e.pos;return!!Object(o.a)(e,96,96)&&(e.start=t,!0)}const D={43:"adjacentSibling",126:"generalSibling",62:"child",38:"nesting"};var H=function(e){if(43===(t=e.peek())||126===t||38===t||62===t){const t=e.pos,n=D[e.next()],r=new m(e,"combinator",t);return r.property("type",n),r}var t};function G(e){if(function(e){return f(e,Q)}(e))return new m(e,"hash-value")}function Q(e){return Object(o.e)(e)||Object(o.c)(e,65,70)||95===e||45===e||e>128}function X(e){if(function(e){const t=e.pos;if(e.eat(J),e.eatWhile(o.e)){e.start=t;const n=e.pos;return e.eat(46)&&e.eatWhile(o.e)||(e.pos=n),!0}if(e.eat(46)&&e.eatWhile(o.e))return e.start=t,!0;return e.pos=t,!1}(e)){const t=e.start,n=new m(e,"value"),r=function(e){return T(e)||function(e){return l(e,37)}(e)}(e)?new m(e,"unit"):null;return new m(e,"number",t).add(n).add(r)}}function J(e){return 45===e||43===e}function Z(e){return function(e){if(l(e,K))return e.eatWhile(61),!0;if(l(e,Y))return!0;return!1}(e)&&new m(e,"operator")}function K(e){return 33===e||60===e||61===e||62===e}function Y(e){return 42===e||43===e||45===e||47===e||K(e)}function ee(e){return f(e,te)}function te(e){return!(isNaN(e)||Object(o.f)(e)||Object(o.g)(e)||40===e||41===e||92===e||function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}(e))}function ne(e){const t=e.pos;if(c(e,"url(")){L(e);const n=$(e)||function(e){return ee(e)&&new m(e,"unquoted")}(e);return L(e),e.eat(41),new m(e,"url",t).add(n)}e.pos=t}function re(e){const t=e.pos;return c(e,"url(")?(L(e),I(e)||ee(e),L(e),e.eat(41),e.start=t,!0):(e.pos=t,!1)}function oe(e){return S(e,"variable",36,ie)}function ie(e){if(function(e){return f(e,se)}(e))return new m(e,"name")}function se(e){return 36===e||E(e)}function ae(e){const t=ue(e)||b(e,ae);if(t&&"ident"===t.type){const n=b(e,ae);if(n)return new m(e,"function",t.start,n.end).add(t).add(n)}return t||function(e){e.start=e.pos;if(null!=e.next())return new m(e,"unknown")}(e)}function ue(e){return de(e)||ne(e)||ce(e)||le(e)||g(e)}function ce(e){return j(e)||W(e)||k(e)||A(e)||function(e){return S(e,"class",46,k)}(e)||function(e){return S(e,"id",35,k)}(e)||function(e){const t=e.pos;if(e.eatWhile(58)){const n=k(e);if(n)return new m(e,"pseudo",t).add(n)}e.pos=t}(e)||U(e)||H(e)}function le(e){return ne(e)||$(e)||j(e)||W(e)||X(e)||function(e){return S(e,"hash",35,G,!0)}(e)||fe(e)||function(e){return S(e,"important",33,k)}(e)||Z(e)}function fe(e){return W(e)||oe(e)||A(e)||k(e)}function de(e){return N(e)||M(e)}function pe(e){return be(e,"selector")}function me(e){const t="string"==typeof e?new r.a(e):e,n=[];for(;!t.eof();)n.push(ae(t));let o;if(1===n.length)o=n[0];else{o=new m(t,"property-name",t.start,t.end);for(let e=0,t=n.length;e<t;e++)o.add(n[e])}return o}function he(e){return be(e)}function ge(e){return be(e)}function be(e,t){t=t||"item";const n="string"==typeof e?new r.a(e):e,o=[],i=[],s=()=>{const e=a(i);if(e.length){const r=new m(n,t,e[0].start,d(e).end);for(let t=0;t<e.length;t++)r.add(e[t]);o.push(r)}i.length=0};let u;for(;!n.eof();)if(n.eat(44))s();else{if(!(u=ae(n)))throw n.error("Unexpected character");"comment"!==u.type&&i.push(u)}return s(),o}function ve(e,t,n,r){if(!t.length)return null;const o=t[0];return o.end=d(t).end,new ye(e,o,n,r)}class ye extends i{constructor(e,t,n,r){super("rule"),this.stream=e,this.selectorToken=t,this.contentStartToken=n,this.contentEndToken=r||n,this._parsedSelector=null}get selector(){return p(this.selectorToken)}get parsedSelector(){return this._parsedSelector||(this._parsedSelector=pe(this.selectorToken.limit())),this._parsedSelector}get start(){return this.selectorToken&&this.selectorToken.start}get end(){const e=this.contentEndToken||this.contentStartToken||this.nameToken;return e&&e.end}}function xe(e,t,n,r){if(!t.length)return null;let o,i=0;const s=t[i++];return i<t.length?(o=t[i++],o.type="expression",o.end=d(t).end):o=new m(e,"expression",s.end,s.end),new we(e,s,o,n,r)}class we extends i{constructor(e,t,n,r,o){super("at-rule"),this.stream=e,this.nameToken=t,this.expressionToken=n,this.contentStartToken=r,this.contentEndToken=o||r,this._parsedExpression=null}get name(){return p(this.nameToken&&this.nameToken.item(0))}get expression(){return p(this.expressionToken)}get parsedExpression(){return this._parsedExpression||(this._parsedExpression=ge(this.expressionToken.limit())),this._parsedExpression}get start(){return this.nameToken&&this.nameToken.start}get end(){const e=this.contentEndToken||this.contentStartToken||this.nameToken;return e&&e.end}}function ke(e,t,n){if(!t.length)return null;let r,o,i=0;const s=t[i++];return i<t.length&&(o=t[i++],o.type="value",o.end=d(t).end),s&&o&&(r=new m(e,"separator",s.end,o.start)),new Te(e,s,o,r,n)}class Te extends i{constructor(e,t,n,r,o){super("property"),this.stream=e,this.nameToken=t,this.valueToken=n,this._parsedName=null,this._parsedValue=null,this.separatorToken=r,this.terminatorToken=o}get name(){return p(this.nameToken)}get parsedName(){return this._parsedName||(this._parsedName=me(this.nameToken.limit())),this._parsedName}get value(){return p(this.valueToken)}get parsedValue(){return this._parsedValue||(this._parsedValue=he(this.valueToken.limit())),this._parsedValue}get separator(){return p(this.separatorToken)}get terminator(){return p(this.terminatorToken)}get start(){const e=this.nameToken||this.separatorToken||this.valueToken||this.terminatorToken;return e&&e.start}get end(){const e=this.terminatorToken||this.valueToken||this.separatorToken||this.nameToken;return e&&e.end}}function Ce(e,t){t=t||ae;const n="string"==typeof e?new r.a(e):e,o=[];let i;for(;!n.eof()&&(i=t(n));)o.push(i);return o}function Ee(e,t){if(e.eat(40)){let n,r=1;for(;!e.eof();)if(e.eat(41)){if(r--,!r)break}else if(e.eat(40))r++;else{if(re(e)||I(e))continue;if(n=N(e)){t.addComment(n);continue}e.next()}return!0}return!1}t.default=function(e){const t="string"==typeof e?new r.a(e):e,n=new s;let o,i,a,u=n,c=[];const l=()=>{i&&(c.push(i),i=null)};for(;!t.eof();)if(!L(t))if(a=N(t))n.addComment(a);else if(t.start=t.pos,t.eatWhile(58))c.length||(i?l():i=new m(t,"preparse"));else if(t.eat(59))l(),u.add(ke(t,c,new m(t,"termintator"))),c.length=0;else if(t.eat(123))l(),c.length>0&&(o="at-keyword"===c[0].type?xe(t,c,new m(t,"body-start")):ve(t,c,new m(t,"body-start")),u.add(o),u=o,c.length=0);else if(t.eat(125))l(),u.add(ke(t,c)),"stylesheet"!==u.type&&(u.contentEndToken=new m(t,"body-end"),u=u.parent),c.length=0;else if(a=A(t))l(),c.push(a);else{if(!(re(t)||_(t)||V(t)||Ee(t,n)||I(t)||t.next()))throw new Error("Unexpected end-of-stream at "+t.pos);i=i||new m(t,"preparse"),i.end=t.pos}for(i&&c.push(i),u.add(ke(t,c)),t.start=t.pos;u&&u!==n;)u.contentEndToken=new m(t,"body-end"),u=u.parent;return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var r=n(6),o=n(7),i=n(12),s=n(13),a=n(13);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var u,c,l=Object.prototype.toString;function f(e){return"[object Number]"===l.call(e)}function d(e){return"[object String]"===l.call(e)}function p(e){return JSON.parse(o.readFileSync(e,"utf8"))}function m(e){return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return f(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],r):d(n)?(console.warn("Message "+n+" didn't get externalized correctly."),s.format(n,r)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function h(e,t){return u[e]=t,t}function g(e,t){var n,i,s,a=r.join(c.cacheRoot,e.id+"-"+e.hash+".json"),u=!1,l=!1;try{return n=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),u=!0}}if(!(n=function(e,t){var n=c.translationsConfig[e.id];if(n){var o=p(n).contents,i=p(r.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var u=i[a],l=o[e.outDir+"/"+a];if(l){for(var f=[],m=0;m<u.keys.length;m++){var h=u.keys[m],g=l[d(h)?h:h.key];void 0===g&&(g=u.messages[m]),f.push(g)}s[a]=f}else s[a]=u.messages}return s}}(e,t))||u)return n;if(l)try{o.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}function b(e){try{return function(e){var t=p(r.join(e,"nls.metadata.json")),n=Object.create(null);for(var o in t){var i=t[o];n[o]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function v(e,t){var n;if(!0===c.languagePackSupport&&void 0!==c.cacheRoot&&void 0!==c.languagePackId&&void 0!==c.translationsConfigFile&&void 0!==c.translationsConfig)try{n=g(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(c.languagePackSupport)return b(t);var i=function(e){for(var t=c.language;t;){var n=r.join(e,"nls.bundle."+t+".json");if(o.existsSync(n))return n;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t){n=r.join(e,"nls.bundle.json");if(o.existsSync(n))return n}}(t);if(i)try{return p(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=b(t)}return n}function y(e){if(!e)return s.localize;var t=r.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),c.messageFormat===s.MessageFormat.both||c.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=r.dirname(e);t=r.join(n,"nls.metadata.header.json"),!o.existsSync(t);){var i=r.dirname(n);if(i===n){t=void 0;break}n=i}return t}(e);if(n){var i=r.dirname(n),a=u[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(n,"utf8"));try{var f=v(l,i);a=h(i,f?{header:l,nlsBundle:f}:null)}catch(e){console.error("Failed to load nls bundle",e),a=h(i,null)}}catch(e){console.error("Failed to read header file",e),a=h(i,null)}if(a){var d=e.substr(i.length+1).replace(/\\/g,"/"),g=a.nlsBundle[d];return void 0===g?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):m(g)}}}if(c.messageFormat===s.MessageFormat.both||c.messageFormat===s.MessageFormat.file)try{var b=p(function(e){var t;if(c.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!c.language)t=".nls.json";else for(var n=c.language;n;){var r=".nls."+n+".json";if(o.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}c.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(b)?m(b):s.isDefined(b.messages)&&s.isDefined(b.keys)?m(b.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function x(e){return e&&(d(e.locale)&&(c.locale=e.locale.toLowerCase(),c.language=c.locale,u=Object.create(null)),void 0!==e.messageFormat&&(c.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===c.languagePackSupport&&(c.languagePackSupport=!1)),s.setPseudo("pseudo"===c.locale),y}!function(){if(c={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];d(n)&&(t=n)}if(d(e.locale)&&(c.locale=e.locale.toLowerCase()),void 0===t?c.language=c.locale:"en"!==t&&(c.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(c.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(c.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(c.languagePackId=e._languagePackId),d(e._translationsConfigFile)){c.translationsConfigFile=e._translationsConfigFile;try{c.translationsConfig=p(c.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=r.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===c.locale),u=Object.create(null)}(),t.loadMessageBundle=y,t.config=x,i.default.install(Object.freeze({loadMessageBundle:y,config:x}))},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSyntaxFromArgs=t.isValidLocationForEmmetAbbreviation=t.expandEmmetAbbreviation=t.wrapWithAbbreviation=void 0;const r=n(2),o=n(9),i=n(3),s=n(4),a=o.loadMessageBundle(n(6).join(__dirname,"abbreviationActions.ts")),u=/[\u00a0]*[\d#\-\*\u2022]+\.?/,c=/^#[\da-fA-F]{0,6}$/;function l(){return!0===r.workspace.getConfiguration("emmet").triggerExpansionOnTab?r.commands.executeCommand("tab"):Promise.resolve(!0)}function f(e,t,n,o,s,a){if(i.isStyleSheet(o)){const i=t;if(i&&(i.comments||[]).some(e=>s>=e.start&&s<=e.end))return!1;if(!n)return!0;const u=e.getText(new r.Range(a.start.line,a.start.character,a.end.line,a.end.character));if(u.startsWith("@"))return!0;if("sass"!==o&&"stylus"!==o&&"property"===n.type){if(n.parent&&"rule"!==n.parent.type&&"at-rule"!==n.parent.type)return!1;const e=n;if(e.terminatorToken&&e.separator&&s>=e.separatorToken.end&&s<=e.terminatorToken.start&&-1===u.indexOf(":"))return c.test(u)||"!"===u;if(!e.terminatorToken&&e.separator&&s>=e.separatorToken.end&&-1===u.indexOf(":"))return c.test(u)||"!"===u;if(c.test(u)||"!"===u)return!1}if("rule"!==n.type&&"at-rule"!==n.type)return!0;const l=n;if(s>l.contentStartToken.end)return!0;if(l.parent&&("rule"===l.parent.type||"at-rule"===l.parent.type)&&l.selectorToken){const t=e.positionAt(s),n=e.positionAt(l.selectorToken.start),r=e.positionAt(l.selectorToken.end);if(t.line!==r.line&&n.character===a.start.character&&n.line===a.start.line)return!0}return!1}const u=n;let l=0;if(u){if("script"===u.name){const e=(u.attributes||[]).filter(e=>"type"===e.name.toString())[0],t=e?e.value.toString():"";if(i.allowedMimeTypesInScriptTag.indexOf(t)>-1)return!0;return!!(!t||"application/javascript"===t||"text/javascript"===t)&&!!m({language:"javascript"})}if(!u.open||!u.close||!(u.open.end<=s&&s<=u.close.start))return!1;l=u.open.end;let e=u.firstChild;for(;e&&!(e.end>s);)l=e.end,e=e.nextSibling}const f=e.positionAt(l);let d=e.getText(new r.Range(f.line,f.character,a.start.line,a.start.character));if(d.length>500&&(d=d.substr(d.length-500)),!d.trim())return!0;let p=!0,h=!1,g=d.length-1;if("<"===d[g])return!1;for(;g>=0;){const e=d[g];if(g--,h||!/\s/.test(e))if("?"!==e||"<"!==d[g]){if(/\s/.test(e)&&"<"===d[g])g--;else if("<"===e||">"===e)if(g>=0&&"\\"===d[g])g--;else{if(">"===e){if(g>=0&&"="===d[g])continue;break}if("<"===e){p=!h;break}}}else g--;else h=!0}return p}function d(e,t,n){if(!t||0===t.length)return Promise.resolve(!1);const o=[];if(!n)return t.sort((e,t)=>t.rangeToReplace.start.compareTo(e.rangeToReplace.start)).forEach(t=>{const n=p(t);n&&o.push(e.insertSnippet(new r.SnippetString(n),t.rangeToReplace,{undoStopBefore:!1,undoStopAfter:!1}))}),0===o.length?Promise.resolve(!1):Promise.all(o).then(()=>Promise.resolve(!0));const i=p(t[0]),s=t.map(e=>e.rangeToReplace);return i?e.insertSnippet(new r.SnippetString(i),s):Promise.resolve(!1)}function p(e){const t=i.getEmmetHelper(),n=t.getExpandOptions(e.syntax,i.getEmmetConfiguration(e.syntax),e.filter);let o;e.textToWrap&&(e.textToWrap=e.textToWrap.map(e=>e.replace(/\$\{/g,"\\${")),e.filter&&e.filter.includes("t")&&(e.textToWrap=e.textToWrap.map(e=>e.replace(u,"").trim())),n.text=e.textToWrap,n.options&&(e.rangeToReplace.isSingleLine||(n.options["output.inlineBreak"]=1),e.indent&&(n.options["output.indent"]=e.indent),e.baseIndent&&(n.options["output.baseIndent"]=e.baseIndent)));try{o=t.expandAbbreviation(e.abbreviation,n)}catch(e){r.window.showErrorMessage("Failed to expand abbreviation")}return o}function m(e){const t=i.getMappingForIncludedLanguages(),n=e.language,o=e.parentMode,s=r.workspace.getConfiguration("emmet").excludeLanguages?r.workspace.getConfiguration("emmet").excludeLanguages:[];if(s.indexOf(n)>-1)return;let a=i.getEmmetMode(t[n]?t[n]:n,s);return a||(a=i.getEmmetMode(t[o]?t[o]:o,s)),a}t.wrapWithAbbreviation=async function(e){if(!i.validate(!1))return!1;const t=r.window.activeTextEditor,n=t.document;(e=e||{}).language||(e.language=n.languageId);const o=m(e)||"html",u=s.getRootNode(n,!0),c=i.getEmmetHelper(),l=t.selections.sort((e,t)=>e.start.compareTo(t.start)).map(e=>{let t=e;{let{start:e,end:o}=t;const s=n.offsetAt(e),a=n.getText(),c=i.getHtmlFlatNode(a,u,s,!0);if(c&&i.isOffsetInsideOpenOrCloseTag(c,s)){e=n.positionAt(c.start);const t=n.positionAt(c.end);o=t.isAfter(o)?t:o}const l=n.offsetAt(o),f=i.getHtmlFlatNode(a,u,l,!0);if(f&&i.isOffsetInsideOpenOrCloseTag(f,l)){const t=n.positionAt(f.start);e=t.isBefore(e)?t:e;const r=n.positionAt(f.end);o=r.isAfter(o)?r:o}t=new r.Range(e,o)}if(!t.isSingleLine&&0===t.end.character){const e=t.end.line-1;t=new r.Range(t.start,n.lineAt(e).range.end)}t.isEmpty&&(t=n.lineAt(t.start).range);const o=n.lineAt(t.start);return!o.isEmptyOrWhitespace&&o.firstNonWhitespaceCharacterIndex>t.start.character&&(t=t.with(new r.Position(t.start.line,o.firstNonWhitespaceCharacterIndex))),t}).reduce((e,t)=>(e.length>0&&t.intersection(e[e.length-1])?e.push(t.union(e.pop())):e.push(t),e),[]),f=t.selections;t.selections=l.map(e=>new r.Selection(e.start,e.end));const h=l.map(e=>{let t;const r=n.getText(e),o=n.lineAt(e.start).text.match(/^(\s*)/),i=o?o[1]:"";return t=e.isSingleLine?[r]:r.split("\n"+i).map(e=>e.trimEnd()),t=t.map(e=>e.replace(/(\$\d)/g,"\\$1")),{previewRange:e,originalRange:e,originalContent:r,textToWrapInPreview:t,baseIndent:i}}),{tabSize:g,insertSpaces:b}=t.options,v=b?" ".repeat(g):"\t";function y(){return t.edit(e=>{for(const t of h)e.replace(t.previewRange,t.originalContent),t.previewRange=t.originalRange},{undoStopBefore:!1,undoStopAfter:!1})}let x=!1;async function w(e,n){const i=!!e&&!!e.trim()&&c.isAbbreviationValid(o,e)?c.extractAbbreviationFromText(e,o):void 0;if(!i)return x&&(x=!1,await y()),!1;const{abbreviation:s,filter:a}=i;if(n){const e=h.map(e=>({syntax:o,abbreviation:s,rangeToReplace:e.originalRange,textToWrap:e.textToWrapInPreview,filter:a,indent:v,baseIndent:e.baseIndent}));return x=!0,function(e){let n=new r.Range(0,0,0,0),o=new r.Range(0,0,0,0),i=0;return t.edit(t=>{for(let s=0;s<h.length;s++){const a=p(e[s])||"";if(!a)break;const u=h[s].previewRange,c=a.replace(/\$\{[\d]*\}/g,"|").replace(/\$\{[\d]*:([^}]*)\}/g,(e,t)=>t).replace(/\\\$/g,"$");t.replace(u,c);const l=c.split("\n"),f=u.end.line-u.start.line+1,d=l.length-f,m=u.start.line+i;let g=u.start.character;const b=u.end.line+i+d;let v=l[l.length-1].length;s>0&&b===o.end.line?(g=o.end.character+(u.start.character-n.end.character),v+=g):s>0&&m===o.end.line?g=o.end.character+(u.start.character-n.end.character):1===l.length&&(v+=u.start.character),n=h[s].previewRange,o=new r.Range(m,g,b,v),h[s].previewRange=o,i+=d}},{undoStopBefore:!1,undoStopAfter:!1})}(e)}const u=h.map(e=>({syntax:o,abbreviation:s,rangeToReplace:e.originalRange,textToWrap:e.textToWrapInPreview,filter:a,indent:v}));return x&&(x=!1,await y()),d(t,u,!1)}let k="";const T=a(0,null),C=e&&e.abbreviation?e.abbreviation:await r.window.showInputBox({prompt:T,validateInput:function(e){return e!==k&&(k=e,w(e,!0)),""}}),E=await w(C,!1);return E||(t.selections=f),E},t.expandEmmetAbbreviation=function(e){if(!i.validate()||!r.window.activeTextEditor)return l();if(1===r.window.activeTextEditor.selections.length&&r.window.activeTextEditor.selection.isEmpty){const e=r.window.activeTextEditor.selection.anchor;if(0===e.character)return l();const t=e.translate(0,-1),n=r.window.activeTextEditor.document.getText(new r.Range(t,e));if(" "===n||"\t"===n)return l()}if((e=e||{}).language){if((r.workspace.getConfiguration("emmet").excludeLanguages?r.workspace.getConfiguration("emmet").excludeLanguages:[]).indexOf(r.window.activeTextEditor.document.languageId)>-1)return l()}else e.language=r.window.activeTextEditor.document.languageId;const t=m(e);if(!t)return l();const n=r.window.activeTextEditor;if(!0===r.workspace.getConfiguration("emmet").triggerExpansionOnTab&&n.selections.find(e=>!e.isEmpty))return l();const o=[];let a,u=!0;const c=i.getEmmetHelper(),p=n.selections.slice(0);let h;function g(){if(h)return h;const e=!0===r.workspace.getConfiguration("emmet").optimizeStylesheetParsing;return h=1===n.selections.length&&i.isStyleSheet(n.document.languageId)&&e&&n.document.lineCount>1e3?i.parsePartialStylesheet(n.document,n.selection.isReversed?n.selection.anchor:n.selection.active):s.getRootNode(n.document,!0),h}return p.sort((e,t)=>{const n=e.isReversed?e.anchor:e.active,r=t.isReversed?t.anchor:t.active;return-1*n.compareTo(r)}),p.forEach(e=>{const s=e.isReversed?e.anchor:e.active,[l,d,p]=((e,t,o,s)=>{o=e.validatePosition(o);let a=t,u=e.getText(a);if(!a.isEmpty){const e=c.extractAbbreviationFromText(u,s);return e?[a,e.abbreviation,e.filter]:[null,"",""]}const l=n.document.lineAt(o.line).text.substr(0,o.character);if("html"===s){const e=l.match(/<(\w+)$/);if(e)return u=e[1],a=new r.Range(o.translate(0,-(u.length+1)),o),[a,u,""]}const f=c.extractAbbreviation(i.toLSTextDocument(n.document),o,{lookAhead:!1});if(!f)return[null,"",""];const{abbreviationRange:d,abbreviation:p,filter:m}=f;return[new r.Range(d.start.line,d.start.character,d.end.line,d.end.character),p,m]})(n.document,e,s,t);if(!l)return;if(!c.isAbbreviationValid(t,d))return;if(i.isStyleSheet(t)&&d.endsWith(":"))return;const m=n.document.offsetAt(s);let h=i.getFlatNode(g(),m,!0),b=!0,v=t;if("html"===n.document.languageId)if(i.isStyleAttribute(h,m))v="css",b=!1;else{const e=i.getEmbeddedCssNodeIfAny(n.document,h,s);e&&(h=i.getFlatNode(e,m,!0),v="css")}b&&!f(n.document,g(),h,v,m,l)||(a?u&&a!==d&&(u=!1):a=d,o.push({syntax:v,abbreviation:d,rangeToReplace:l,filter:p}))}),d(n,o,u).then(e=>e?Promise.resolve(void 0):l())},t.isValidLocationForEmmetAbbreviation=f,t.getSyntaxFromArgs=m},function(e,t,n){"use strict";var r;function o(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(o||(o={})),t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var r,o=n(12);function i(e){return void 0!==e}function s(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var r=t[0],o=n[r],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(t.MessageFormat||(t.MessageFormat={})),function(e){e.standalone="standalone",e.languagePack="languagePack"}(t.BundleFormat||(t.BundleFormat={})),function(e){e.is=function(e){var t=e;return t&&i(t.key)&&i(t.comment)}}(r||(r={})),t.isDefined=i,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=s,t.localize=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return s(t,n)},t.loadMessageBundle=function(e){return o.default().loadMessageBundle(e)},t.config=function(e){return o.default().config(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultOptions",(function(){return C})),n.d(t,"match",(function(){return E}));var r=n(5),o=n(1);class i{constructor(e,t,n,r){this.stream=e,this.type=t,this.open=n,this.close=r,this.children=[],this.parent=null}get name(){return"tag"===this.type&&this.open?this.open&&this.open.name&&this.open.name.value:"#"+this.type}get attributes(){return this.open&&this.open.attributes}get start(){return this.open&&this.open.start}get end(){return this.close?this.close.end:this.open&&this.open.end}get firstChild(){return this.children[0]}get nextSibling(){const e=this.getIndex();return-1!==e?this.parent.children[e+1]:null}get previousSibling(){const e=this.getIndex();return-1!==e?this.parent.children[e-1]:null}getIndex(){return this.parent?this.parent.children.indexOf(this):-1}addChild(e){return this.removeChild(e),this.children.push(e),e.parent=this,this}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&(this.children.splice(t,1),e.parent=null),this}}var s=function(e,t,n){return"function"==typeof t?function(e,t){const n=e.pos;if(e.eatWhile(t))return new a(e,n,e.pos);e.pos=n}(e,t):new a(e,t,n)};class a{constructor(e,t,n){this.stream=e,this.start=null!=t?t:e.start,this.end=null!=n?n:e.pos,this._value=null}get value(){if(null===this._value){const e=this.stream.start,t=this.stream.pos;this.stream.start=this.start,this.stream.pos=this.end,this._value=this.stream.current(),this.stream.start=e,this.stream.pos=t}return this._value}toString(){return this.value}valueOf(){return`${this.value} [${this.start}; ${this.end}]`}}const u={throws:!0};var c=function(e){const t=e.pos;if(Object(o.a)(e,60,62,u)||Object(o.a)(e,91,93,u)||Object(o.a)(e,40,41,u)||Object(o.a)(e,123,125,u))return s(e,t)};function l(e){return c(e)||s(e,d)}function f(e){const t=e.pos;if(Object(o.b)(e)){const n=e.pos;let r,o;e.pos=t,e.next(),r=e.start=e.pos,e.pos=n,e.backUp(1),o=e.pos;const i=s(e,r,o);return e.pos=n,i}return c(e)||function(e){return s(e,m)}(e)}function d(e){return 61!==e&&!p(e)&&!Object(o.g)(e)}function p(e){return 62===e||47===e}function m(e){return!(isNaN(e)||Object(o.f)(e)||Object(o.g)(e)||p(e))}var h=function(e){const t=e.pos;if(e.eat(60)){const n={type:e.eat(47)?"close":"open"};if((n.name=function(e){return s(e,g)}(e))&&("close"!==n.type&&(n.attributes=function(e){const t=[];let n;for(;!e.eof();)if(e.eatWhile(o.g),n={start:e.pos},n.name=l(e))e.eat(61)?n.value=f(e):n.boolean=!0,n.end=e.pos,t.push(n);else{if(p(e.peek()))break;e.next()}return t}(e),e.eatWhile(o.g),n.selfClosing=e.eat(47)),e.eat(62)))return Object.assign(s(e,t),n)}return e.pos=t,null};function g(e){return Object(o.d)(e)||58===e||46===e||45===e||95===e}function b(e,t){const n=e.pos;for(let r=0;r<t.length;r++)if(!e.eat(t[r]))return e.pos=n,!1;return e.start=n,!0}function v(e,t,n,r){const o=e.pos;if(b(e,t)){for(;!e.eof();){if(b(e,n))return!0;e.next()}return!!r||(e.pos=o,!1)}return e.pos=o,null}function y(e){return e.split("").map(e=>e.charCodeAt(0))}const x=y("\x3c!--"),w=y("--\x3e");const k=y("<![CDATA["),T=y("]]>");const C={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};function E(e){if(60===e.peek())return function(e){const t=e.pos;if(v(e,x,w,!0)){const n=s(e,t);return n.type="comment",n}return null}(e)||function(e){const t=e.pos;if(v(e,k,T,!0)){const n=s(e,t);return n.type="cdata",n}return null}(e)||h(e)}function S(e,t){const n=e.pos;for(;!e.eof();){if(b(e,t))return e.pos=e.start,h(e);e.next()}return e.pos=n,null}function A(e){return e[e.length-1]}t.default=function(e,t){t=Object.assign({},C,t);const n="string"==typeof e?new r.a(e):e,o=new i(n,"root"),s=new Set(t.empty),a=t.special.reduce((e,t)=>e.set(t,y(`</${t}>`)),new Map),u=(e,n)=>e.selfClosing||!t.xml&&s.has(n);let c,l,f,d=[o];for(;!n.eof();)if(c=E(n))if(f=(p=c).name?p.name.value.toLowerCase():"#"+p.type,"open"===c.type)l=new i(n,"tag",c),A(d).addChild(l),a.has(f)?l.close=S(n,a.get(f)):u(c,f)||d.push(l);else if("close"===c.type){for(let e=d.length-1;e>0;e--)if(d[e].name.toLowerCase()===f){d[e].close=c,d=d.slice(0,e);break}}else A(d).addChild(new i(n,c.type,c));else n.next();var p;return o}},function(e,t,n){"use strict";e.exports=["bmp","gif","jpg","png","psd","svg","tiff","webp","dds"]},function(e,t,n){var r={"./bmp":17,"./bmp.js":17,"./dds":18,"./dds.js":18,"./gif":19,"./gif.js":19,"./j