diff --git a/src/HotChocolate/AspNetCore/.vscode/launch.json b/src/HotChocolate/AspNetCore/.vscode/launch.json index 9e46d543607..49ba1e72d9b 100644 --- a/src/HotChocolate/AspNetCore/.vscode/launch.json +++ b/src/HotChocolate/AspNetCore/.vscode/launch.json @@ -1,34 +1,30 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (web)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/sample/StarWars/bin/Debug/netcoreapp3.1/StarWars.dll", - "args": [], - "cwd": "${workspaceFolder}/sample/StarWars", - "stopAtEntry": false, - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - }, - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "sourceFileMap": { - "/Views": "${workspaceFolder}/Views" - } - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - } - ] -} \ No newline at end of file + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/sample/StarWars/bin/Debug/netcoreapp5.0/StarWars.dll", + "args": [], + "cwd": "${workspaceFolder}/sample/StarWars", + "stopAtEntry": false, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} diff --git a/src/HotChocolate/AspNetCore/sample/StarWars/Startup.cs b/src/HotChocolate/AspNetCore/sample/StarWars/Startup.cs index b4698559af0..7bbb845ae47 100644 --- a/src/HotChocolate/AspNetCore/sample/StarWars/Startup.cs +++ b/src/HotChocolate/AspNetCore/sample/StarWars/Startup.cs @@ -38,14 +38,14 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseDeveloperExceptionPage(); } - app.UseRouting(); - - app.UseEndpoints(endpoints => - { - endpoints.MapGraphQL(); - endpoints.MapGraphQL("/hello", schemaName: "hello_world"); - endpoints.MapGraphQL("/filtering", schemaName: "filtering"); - }); + app + .UseRouting() + .UseEndpoints(endpoints => + { + endpoints.MapGraphQL(); + endpoints.MapGraphQL("/hello", schemaName: "hello_world"); + endpoints.MapGraphQL("/filtering", schemaName: "filtering"); + }); } } diff --git a/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.Development.json b/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.Development.json index dba68eb1243..8983e0fc1c5 100644 --- a/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.Development.json +++ b/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.Development.json @@ -1,9 +1,9 @@ { "Logging": { "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" } } } diff --git a/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.json b/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.json index 81ff877711d..d9d9a9bff6f 100644 --- a/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.json +++ b/src/HotChocolate/AspNetCore/sample/StarWars/appsettings.json @@ -1,10 +1,10 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Subscriptions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Subscriptions.cs index 331aefc505e..836bddaf026 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Subscriptions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Subscriptions.cs @@ -2,10 +2,7 @@ using HotChocolate.AspNetCore.Subscriptions; using HotChocolate.AspNetCore.Subscriptions.Messages; using HotChocolate.AspNetCore.Utilities; -using HotChocolate.Execution; using HotChocolate.Execution.Configuration; -using HotChocolate.Language; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpEndpointRouteBuilderExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpEndpointRouteBuilderExtensions.cs index 86653936619..ef8976cbf2b 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpEndpointRouteBuilderExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpEndpointRouteBuilderExtensions.cs @@ -1,10 +1,10 @@ using System; using HotChocolate; using HotChocolate.AspNetCore; -using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing.Patterns; +using Microsoft.Extensions.FileProviders; namespace Microsoft.AspNetCore.Builder { @@ -12,31 +12,33 @@ public static class HttpEndpointRouteBuilderExtensions { public static IEndpointConventionBuilder MapGraphQL( this IEndpointRouteBuilder endpointRouteBuilder, - string pattern = "/graphql", + string path = "/graphql", NameString schemaName = default) => - MapGraphQL(endpointRouteBuilder, RoutePatternFactory.Parse(pattern), schemaName); + MapGraphQL(endpointRouteBuilder, new PathString(path), schemaName); public static IEndpointConventionBuilder MapGraphQL( this IEndpointRouteBuilder endpointRouteBuilder, - RoutePattern pattern, + PathString path, NameString schemaName = default) { - if (endpointRouteBuilder == null) + if (endpointRouteBuilder is null) { throw new ArgumentNullException(nameof(endpointRouteBuilder)); } - IApplicationBuilder requestPipeline = - endpointRouteBuilder.CreateApplicationBuilder(); + path = path.ToString().TrimEnd('/'); - requestPipeline.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - requestPipeline.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - requestPipeline.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - requestPipeline.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); + RoutePattern pattern = RoutePatternFactory.Parse(path + "/{**slug}"); + IApplicationBuilder requestPipeline = endpointRouteBuilder.CreateApplicationBuilder(); + NameString schemaNameOrDefault = schemaName.HasValue ? schemaName : Schema.DefaultName; + IFileProvider fileProvider = CreateFileProvider(); + + requestPipeline.UseMiddleware(schemaNameOrDefault); + requestPipeline.UseMiddleware(schemaNameOrDefault); + requestPipeline.UseMiddleware(schemaNameOrDefault); + requestPipeline.UseMiddleware(fileProvider, path); + requestPipeline.UseMiddleware(fileProvider, path); + requestPipeline.UseMiddleware(schemaNameOrDefault); return endpointRouteBuilder .Map(pattern, requestPipeline.Build()) @@ -49,24 +51,30 @@ public static class HttpEndpointRouteBuilderExtensions PathString pathMatch = default, NameString schemaName = default) { - if (applicationBuilder == null) + if (applicationBuilder is null) { throw new ArgumentNullException(nameof(applicationBuilder)); } + NameString schemaNameOrDefault = schemaName.HasValue ? schemaName : Schema.DefaultName; + return applicationBuilder.Map( pathMatch, app => { - app.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - app.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - app.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); - app.UseMiddleware( - schemaName.HasValue ? schemaName : Schema.DefaultName); + app.UseMiddleware(schemaNameOrDefault); + app.UseMiddleware(schemaNameOrDefault); + app.UseMiddleware(schemaNameOrDefault); + app.UseMiddleware(schemaNameOrDefault); }); } + + private static IFileProvider CreateFileProvider() + { + Type type = typeof(HttpEndpointRouteBuilderExtensions); + string resourceNamespace = typeof(MiddlewareBase).Namespace + ".Resources"; + + return new EmbeddedFileProvider(type.Assembly, resourceNamespace); + } } } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/HotChocolate.AspNetCore.csproj b/src/HotChocolate/AspNetCore/src/AspNetCore/HotChocolate.AspNetCore.csproj index 2a048d4f613..257c7ae0606 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/HotChocolate.AspNetCore.csproj +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/HotChocolate.AspNetCore.csproj @@ -19,4 +19,9 @@ + + + + + diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/asset-manifest.json b/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/asset-manifest.json new file mode 100644 index 00000000000..511f62221cc --- /dev/null +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/asset-manifest.json @@ -0,0 +1,106 @@ +{ + "files": { + "static/js/0.5fec78fb.chunk.js": "./static/js/0.5fec78fb.chunk.js", + "static/js/1.087675eb.chunk.js": "./static/js/1.087675eb.chunk.js", + "static/js/2.dd7d449b.chunk.js": "./static/js/2.dd7d449b.chunk.js", + "main.css": "./static/css/main.cc3afb38.chunk.css", + "main.js": "./static/js/main.0605b397.chunk.js", + "runtime-main.js": "./static/js/runtime-main.e5a2cdf5.js", + "runtime-schema.worker.js": "./static/js/runtime-schema.worker.620115f9.js", + "schema.worker.js": "./schema.worker.js", + "static/css/7.82f2daa0.chunk.css": "./static/css/7.82f2daa0.chunk.css", + "static/js/7.1dd7a0a2.chunk.js": "./static/js/7.1dd7a0a2.chunk.js", + "static/js/8.7fd097f7.chunk.js": "./static/js/8.7fd097f7.chunk.js", + "static/js/9.ad25d044.chunk.js": "./static/js/9.ad25d044.chunk.js", + "static/js/10.5db60641.chunk.js": "./static/js/10.5db60641.chunk.js", + "static/js/11.6e6e2f2d.chunk.js": "./static/js/11.6e6e2f2d.chunk.js", + "static/js/12.71d55545.chunk.js": "./static/js/12.71d55545.chunk.js", + "static/js/13.eeaf08bf.chunk.js": "./static/js/13.eeaf08bf.chunk.js", + "static/js/14.e65fa1df.chunk.js": "./static/js/14.e65fa1df.chunk.js", + "static/js/15.c7ac0dfe.chunk.js": "./static/js/15.c7ac0dfe.chunk.js", + "static/js/16.e4ec7d01.chunk.js": "./static/js/16.e4ec7d01.chunk.js", + "static/js/17.2eabab40.chunk.js": "./static/js/17.2eabab40.chunk.js", + "static/js/18.e5da9742.chunk.js": "./static/js/18.e5da9742.chunk.js", + "static/js/19.7afcd7ad.chunk.js": "./static/js/19.7afcd7ad.chunk.js", + "static/js/20.6843bc8e.chunk.js": "./static/js/20.6843bc8e.chunk.js", + "static/js/21.6b5ff9d3.chunk.js": "./static/js/21.6b5ff9d3.chunk.js", + "static/js/22.32a7a263.chunk.js": "./static/js/22.32a7a263.chunk.js", + "static/js/23.d4dbd3b7.chunk.js": "./static/js/23.d4dbd3b7.chunk.js", + "static/js/24.589a5007.chunk.js": "./static/js/24.589a5007.chunk.js", + "static/js/25.fd8edece.chunk.js": "./static/js/25.fd8edece.chunk.js", + "static/js/26.b53d329a.chunk.js": "./static/js/26.b53d329a.chunk.js", + "static/js/27.457cfc7b.chunk.js": "./static/js/27.457cfc7b.chunk.js", + "static/js/28.6af565aa.chunk.js": "./static/js/28.6af565aa.chunk.js", + "static/js/29.8bc46dc3.chunk.js": "./static/js/29.8bc46dc3.chunk.js", + "static/js/30.cd1c7bc4.chunk.js": "./static/js/30.cd1c7bc4.chunk.js", + "static/js/31.40c825de.chunk.js": "./static/js/31.40c825de.chunk.js", + "static/js/32.7b284257.chunk.js": "./static/js/32.7b284257.chunk.js", + "static/js/33.8aa11618.chunk.js": "./static/js/33.8aa11618.chunk.js", + "static/js/34.6d79282a.chunk.js": "./static/js/34.6d79282a.chunk.js", + "static/js/35.ac1cef18.chunk.js": "./static/js/35.ac1cef18.chunk.js", + "static/js/36.7cc35780.chunk.js": "./static/js/36.7cc35780.chunk.js", + "static/js/37.9a0fa663.chunk.js": "./static/js/37.9a0fa663.chunk.js", + "static/js/38.38a4fc1c.chunk.js": "./static/js/38.38a4fc1c.chunk.js", + "static/js/39.f82b47e6.chunk.js": "./static/js/39.f82b47e6.chunk.js", + "static/js/40.b340d583.chunk.js": "./static/js/40.b340d583.chunk.js", + "static/js/41.5a800b04.chunk.js": "./static/js/41.5a800b04.chunk.js", + "static/js/42.b82cbf32.chunk.js": "./static/js/42.b82cbf32.chunk.js", + "static/js/43.49714bd3.chunk.js": "./static/js/43.49714bd3.chunk.js", + "static/js/44.0610ef82.chunk.js": "./static/js/44.0610ef82.chunk.js", + "static/js/45.5288fbb8.chunk.js": "./static/js/45.5288fbb8.chunk.js", + "static/js/46.eef65dad.chunk.js": "./static/js/46.eef65dad.chunk.js", + "static/js/47.ffeb2115.chunk.js": "./static/js/47.ffeb2115.chunk.js", + "static/js/48.58b30d2d.chunk.js": "./static/js/48.58b30d2d.chunk.js", + "static/js/49.d97f97ea.chunk.js": "./static/js/49.d97f97ea.chunk.js", + "static/js/50.cabae275.chunk.js": "./static/js/50.cabae275.chunk.js", + "static/js/51.32f41a56.chunk.js": "./static/js/51.32f41a56.chunk.js", + "static/js/52.f0059fa2.chunk.js": "./static/js/52.f0059fa2.chunk.js", + "static/js/53.4fc844bd.chunk.js": "./static/js/53.4fc844bd.chunk.js", + "static/js/54.c93490c7.chunk.js": "./static/js/54.c93490c7.chunk.js", + "static/js/55.6712ed93.chunk.js": "./static/js/55.6712ed93.chunk.js", + "static/js/56.da61cf62.chunk.js": "./static/js/56.da61cf62.chunk.js", + "static/js/57.e1a67ad2.chunk.js": "./static/js/57.e1a67ad2.chunk.js", + "static/js/58.a7af1415.chunk.js": "./static/js/58.a7af1415.chunk.js", + "static/js/59.590a1059.chunk.js": "./static/js/59.590a1059.chunk.js", + "static/js/60.b8514a46.chunk.js": "./static/js/60.b8514a46.chunk.js", + "static/js/61.f34e04ea.chunk.js": "./static/js/61.f34e04ea.chunk.js", + "static/js/62.05979145.chunk.js": "./static/js/62.05979145.chunk.js", + "static/js/63.38d34785.chunk.js": "./static/js/63.38d34785.chunk.js", + "static/js/64.5cd3e280.chunk.js": "./static/js/64.5cd3e280.chunk.js", + "static/js/65.5e8a6c68.chunk.js": "./static/js/65.5e8a6c68.chunk.js", + "static/js/66.140eb170.chunk.js": "./static/js/66.140eb170.chunk.js", + "static/js/67.edd6ecc9.chunk.js": "./static/js/67.edd6ecc9.chunk.js", + "static/js/68.9ae0a905.chunk.js": "./static/js/68.9ae0a905.chunk.js", + "static/js/69.2ef1ba59.chunk.js": "./static/js/69.2ef1ba59.chunk.js", + "static/js/70.eed36e20.chunk.js": "./static/js/70.eed36e20.chunk.js", + "static/js/71.fccc7c93.chunk.js": "./static/js/71.fccc7c93.chunk.js", + "static/js/72.d9705d79.chunk.js": "./static/js/72.d9705d79.chunk.js", + "static/js/73.f884e2d5.chunk.js": "./static/js/73.f884e2d5.chunk.js", + "static/js/74.7ad55ae4.chunk.js": "./static/js/74.7ad55ae4.chunk.js", + "static/js/75.b701bc2a.chunk.js": "./static/js/75.b701bc2a.chunk.js", + "static/js/76.91deb0d6.chunk.js": "./static/js/76.91deb0d6.chunk.js", + "css.worker.js": "./css.worker.js", + "editor.worker.js": "./editor.worker.js", + "html.worker.js": "./html.worker.js", + "index.html": "./index.html", + "json.worker.js": "./json.worker.js", + "precache-manifest.2513bae5eac7346a25b703a4352a1fbe.js": "./precache-manifest.2513bae5eac7346a25b703a4352a1fbe.js", + "schema.worker.js.LICENSE.txt": "./schema.worker.js.LICENSE.txt", + "service-worker.js": "./service-worker.js", + "static/js/0.5fec78fb.chunk.js.LICENSE.txt": "./static/js/0.5fec78fb.chunk.js.LICENSE.txt", + "static/js/69.2ef1ba59.chunk.js.LICENSE.txt": "./static/js/69.2ef1ba59.chunk.js.LICENSE.txt", + "static/js/7.1dd7a0a2.chunk.js.LICENSE.txt": "./static/js/7.1dd7a0a2.chunk.js.LICENSE.txt", + "static/js/8.7fd097f7.chunk.js.LICENSE.txt": "./static/js/8.7fd097f7.chunk.js.LICENSE.txt", + "static/media/codicon.css": "./static/media/codicon.22349029.ttf", + "ts.worker.js": "./ts.worker.js", + "ts.worker.js.LICENSE.txt": "./ts.worker.js.LICENSE.txt" + }, + "entrypoints": [ + "static/js/runtime-main.e5a2cdf5.js", + "static/js/0.5fec78fb.chunk.js", + "static/css/7.82f2daa0.chunk.css", + "static/js/7.1dd7a0a2.chunk.js", + "static/css/main.cc3afb38.chunk.css", + "static/js/main.0605b397.chunk.js" + ] +} \ No newline at end of file diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/css.worker.js b/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/css.worker.js new file mode 100644 index 00000000000..ff582011f92 --- /dev/null +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Resources/css.worker.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=7)}([function(e,t,n){e.exports=n(5)},function(e,t,n){"use strict";(function(e,r){n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"a",(function(){return g})),n.d(t,"e",(function(){return b}));var i=!1,o=!1,a=!1,s=!1,l=void 0,c="undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.electron&&"renderer"===e.type;if("object"!==typeof navigator||c){if("object"===typeof e){i="win32"===e.platform,o="darwin"===e.platform,a="linux"===e.platform,"en","en";var d=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).VSCODE_NLS_CONFIG;if(d)try{var h=JSON.parse(d),p=h.availableLanguages["*"];h.locale,p||"en",h._translationsConfigFile}catch(v){}!0}}else i=(l=navigator.userAgent).indexOf("Windows")>=0,o=l.indexOf("Macintosh")>=0,(l.indexOf("Macintosh")>=0||l.indexOf("iPad")>=0||l.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,a=l.indexOf("Linux")>=0,s=!0,navigator.language;var u=i,m=o,f=s,g="object"===typeof self?self:"object"===typeof r?r:{},b=function(){if(g.setImmediate)return g.setImmediate.bind(g);if("function"===typeof g.postMessage&&!g.importScripts){var t=[];g.addEventListener("message",(function(e){if(e.data&&e.data.vscodeSetImmediateId)for(var n=0,r=t.length;n=0}var s=/^\w[\w\d+.-]*$/,l=/^\//,c=/^\/\//;var d="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,r,i,o){void 0===o&&(o=!1),"object"===typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||""),this.query=r||"",this.fragment=i||"",function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!s.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme&&"function"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return v(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===r?r=this.path:null===r&&(r=""),void 0===i?i=this.query:null===i&&(i=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new m(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=h.exec(e);return n?new m(n[2]||"",x(n[4]||""),x(n[5]||""),x(n[7]||""),x(n[9]||""),t):new m("","","","","")},e.file=function(e){var t="";if(i&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new m("file",t,e,"","")},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),y(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new m(t);return n._formatted=t.external,n._fsPath=t._sep===u?t.fsPath:null,n}return t},e}(),u=i?1:void 0,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return o(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(p),f=((r={})[58]="%3A",r[47]="%2F",r[63]="%3F",r[35]="%23",r[91]="%5B",r[93]="%5D",r[64]="%40",r[33]="%21",r[36]="%24",r[38]="%26",r[39]="%27",r[40]="%28",r[41]="%29",r[42]="%2A",r[43]="%2B",r[44]="%2C",r[59]="%3B",r[61]="%3D",r[32]="%20",r);function g(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=f[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function b(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,"\\")),n}function y(e,t){var n=t?b:g,r="",i=e.scheme,o=e.authority,a=e.path,s=e.query,l=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=d,r+=d),o){var c=o.indexOf("@");if(-1!==c){var h=o.substr(0,c);o=o.substr(c+1),-1===(c=h.indexOf(":"))?r+=n(h,!1):(r+=n(h.substr(0,c),!1),r+=":",r+=n(h.substr(c+1),!1)),r+="@"}-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(p=a.charCodeAt(1))>=65&&p<=90&&(a="/"+String.fromCharCode(p+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var p;(p=a.charCodeAt(0))>=65&&p<=90&&(a=String.fromCharCode(p+32)+":"+a.substr(2))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),l&&(r+="#",r+=t?l:g(l,!1)),r}var w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(w)?e.replace(w,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(r){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}}).call(this,n(4))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],d=!1,h=-1;function p(){d&&l&&(d=!1,l.length?c=l.concat(c):h=-1,c.length&&u())}function u(){if(!d){var e=s(p);d=!0;for(var t=c.length;t;){for(l=c,c=[];++h1)for(var n=1;n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return function(){var t,n=o(e);if(a()){var r=o(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return l(this,t)}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function w(e,t,n){return(w=a()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o}).apply(null,arguments)}function x(e){var t="function"===typeof Map?new Map:void 0;return(x=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return w(e,arguments,o(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r(i,e)})(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k,C=n(0),E=n.n(C);!function(e){var t=E.a.mark(a),n=E.a.mark(s),r=E.a.mark(l),i=E.a.mark(c);e.is=function(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]};var o=Object.freeze([]);function a(e){return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:case"end":return t.stop()}}),t)}function s(e,t){var r,i,o;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=y(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=10;break}if(o=i.value,!t(o)){n.next=8;break}return n.next=8,o;case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),r.e(n.t0);case 15:return n.prev=15,r.f(),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[1,12,15,18]])}function l(e,t){var n,i,o;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=y(e),r.prev=1,n.s();case 3:if((i=n.n()).done){r.next=9;break}return o=i.value,r.next=7,t(o);case 7:r.next=3;break;case 9:r.next=14;break;case 11:r.prev=11,r.t0=r.catch(1),n.e(r.t0);case 14:return r.prev=14,n.f(),r.finish(14);case 17:case"end":return r.stop()}}),r,null,[[1,11,14,17]])}function c(){var e,t,n,r,o,a,s,l,c,d=arguments;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(e=d.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,r=[];if(0===n)return[r,t];for(var i=t[Symbol.iterator](),o=0;o1)throw new F(n);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function T(){for(var e=arguments.length,t=new Array(e),n=0;nr?e[c]=o[s++]:s>i?e[c]=o[a++]:t(o[s],o[a])<0?e[c]=o[s++]:e[c]=o[a++]}(t,n,r,a,i,o)}(e,t,0,e.length-1,[]),e}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var U=function(){function e(t,n,r,i){d(this,e),this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}return p(e,[{key:"getOriginalEnd",value:function(){return this.originalStart+this.originalLength}},{key:"getModifiedEnd",value:function(){return this.modifiedStart+this.modifiedLength}}]),e}();function j(e){return 55296<=e&&e<=56319}function V(e){return 56320<=e&&e<=57343}function B(e,t){return t-56320+(e-55296<<10)+65536}String.fromCharCode(65279);var K=function(){function e(){d(this,e),this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}return p(e,[{key:"getGraphemeBreakType",value:function(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;for(var t=this._data,n=t.length/3,r=1;r<=n;)if(et[3*r+1]))return t[3*r+2];r=2*r+1}return 0}}],[{key:"getInstance",value:function(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE}}]),e}();function q(e,t){return(t<<5)-t+e|0}function $(e,t){t=q(149417,t);for(var n=0,r=e.length;n2&&void 0!==arguments[2]?arguments[2]:32,r=n-t,i=~((1<>>r)>>>0}function H(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=0;i2&&void 0!==arguments[2]?arguments[2]:"0";e.length1&&void 0!==arguments[1]?arguments[1]:32;return Y((e>>>0).toString(16),t/4)}K._INSTANCE=null,(function(){function e(){d(this,e),this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}return p(e,[{key:"update",value:function(e){var t=e.length;if(0!==t){var n,r,i=this._buff,o=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(n=a,r=-1,a=0):(n=e.charCodeAt(0),r=0);;){var s=n;if(j(n)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}},{key:"digest",value:function(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),J(this._h0)+J(this._h1)+J(this._h2)+J(this._h3)+J(this._h4)}},{key:"_wrapUp",value:function(){this._buff[this._buffLen++]=128,H(this._buff,this._buffLen),this._buffLen>56&&(this._step(),H(this._buff));var e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}},{key:"_step",value:function(){for(var t=e._bigBlock32,n=this._buffDV,r=0;r<64;r+=4)t.setUint32(r,n.getUint32(r,!1),!1);for(var i=64;i<320;i+=4)t.setUint32(i,G(t.getUint32(i-12,!1)^t.getUint32(i-32,!1)^t.getUint32(i-56,!1)^t.getUint32(i-64,!1),1),!1);for(var o,a,s,l=this._h0,c=this._h1,d=this._h2,h=this._h3,p=this._h4,u=0;u<80;u++)u<20?(o=c&d|~c&h,a=1518500249):u<40?(o=c^d^h,a=1859775393):u<60?(o=c&d|c&h|d&h,a=2400959708):(o=c^d^h,a=3395469782),s=G(l,5)+o+p+a+t.getUint32(4*u,!1)&4294967295,p=h,h=d,d=G(c,30),c=l,l=s;this._h0=this._h0+l&4294967295,this._h1=this._h1+c&4294967295,this._h2=this._h2+d&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+p&4294967295}}]),e}())._bigBlock32=new DataView(new ArrayBuffer(320));var X=function(){function e(t){d(this,e),this.source=t}return p(e,[{key:"getElements",value:function(){for(var e=this.source,t=new Int32Array(e.length),n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new U(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}},{key:"AddOriginalElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}},{key:"AddModifiedElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}},{key:"getChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}},{key:"getReverseChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}]),e}(),ne=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;d(this,e),this.ContinueProcessingPredicate=r;var i=e._getElements(t),o=W(i,3),a=o[0],s=o[1],l=o[2],c=e._getElements(n),h=W(c,3),p=h[0],u=h[1],m=h[2];this._hasStrings=l&&m,this._originalStringElements=a,this._originalElementsOrHash=s,this._modifiedStringElements=p,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}return p(e,[{key:"ElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}},{key:"OriginalElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}},{key:"ModifiedElementsAreEqual",value:function(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}},{key:"ComputeDiff",value:function(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}},{key:"_ComputeDiff",value:function(e,t,n,r,i){var o=[!1],a=this.ComputeDiffRecursive(e,t,n,r,o);return i&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}},{key:"ComputeDiffRecursive",value:function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;var o;if(e>t||n>r)return n<=r?(Z.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new U(e,0,n,r-n+1)]):e<=t?(Z.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new U(e,t-e+1,n,0)]):(Z.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Z.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o;var a=[0],s=[0],l=this.ComputeRecursionPoint(e,t,n,r,a,s,i),c=a[0],d=s[0];if(null!==l)return l;if(!i[0]){var h=this.ComputeDiffRecursive(e,c,n,d,i),p=[];return p=i[0]?[new U(c+1,t-(c+1)+1,d+1,r-(d+1)+1)]:this.ComputeDiffRecursive(c+1,t,d+1,r,i),this.ConcatenateChanges(h,p)}return[new U(e,t-e+1,n,r-n+1)]}},{key:"WALKTRACE",value:function(e,t,n,r,i,o,a,s,l,c,d,h,p,u,m,f,g,b){var v,y=null,w=new te,x=t,S=n,k=p[0]-f[0]-r,C=-1073741824,E=this.m_forwardHistory.length-1;do{var _=k+e;_===x||_=0&&(e=(l=this.m_forwardHistory[E])[0],x=1,S=l.length-1)}while(--E>=-1);if(v=w.getReverseChanges(),b[0]){var F=p[0]+1,D=f[0]+1;if(null!==v&&v.length>0){var T=v[v.length-1];F=Math.max(F,T.getOriginalEnd()),D=Math.max(D,T.getModifiedEnd())}y=[new U(F,h-F+1,D,m-D+1)]}else{w=new te,x=o,S=a,k=p[0]-f[0]-s,C=1073741824,E=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var R=k+i;R===x||R=c[R+1]?(u=(d=c[R+1]-1)-k-s,d>C&&w.MarkNextChange(),C=d+1,w.AddOriginalElement(d+1,u+1),k=R+1-i):(u=(d=c[R-1])-k-s,d>C&&w.MarkNextChange(),C=d,w.AddModifiedElement(d+1,u+1),k=R-1-i),E>=0&&(i=(c=this.m_reverseHistory[E])[0],x=1,S=c.length-1)}while(--E>=-1);y=w.getChanges()}return this.ConcatenateChanges(v,y)}},{key:"ComputeRecursionPoint",value:function(e,t,n,r,i,o,a){var s=0,l=0,c=0,d=0,h=0,p=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var u=t-e+(r-n),m=u+1,f=new Int32Array(m),g=new Int32Array(m),b=r-n,v=t-e,y=e-n,w=t-r,x=(v-b)%2===0;f[b]=e,g[v]=t,a[0]=!1;for(var S=1;S<=u/2+1;S++){var k=0,C=0;c=this.ClipDiagonalBound(b-S,S,b,m),d=this.ClipDiagonalBound(b+S,S,b,m);for(var E=c;E<=d;E+=2){l=(s=E===c||Ek+C&&(k=s,C=l),!x&&Math.abs(E-v)<=S-1&&s>=g[E])return i[0]=s,o[0]=l,_<=g[E]&&S<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,s,t,i,l,r,o,x,a):null}var F=(k-e+(C-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(k,F))return a[0]=!0,i[0]=k,o[0]=C,F>0&&S<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,s,t,i,l,r,o,x,a):(e++,n++,[new U(e,t-e+1,n,r-n+1)]);h=this.ClipDiagonalBound(v-S,S,v,m),p=this.ClipDiagonalBound(v+S,S,v,m);for(var D=h;D<=p;D+=2){l=(s=D===h||D=g[D+1]?g[D+1]-1:g[D-1])-(D-v)-w;for(var T=s;s>e&&l>n&&this.ElementsAreEqual(s,l);)s--,l--;if(g[D]=s,x&&Math.abs(D-b)<=S&&s<=f[D])return i[0]=s,o[0]=l,T>=f[D]&&S<=1448?this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,s,t,i,l,r,o,x,a):null}if(S<=1447){var R=new Int32Array(d-c+2);R[0]=b-c+1,ee.Copy2(f,c,R,1,d-c+1),this.m_forwardHistory.push(R),(R=new Int32Array(p-h+2))[0]=v-h+1,ee.Copy2(g,h,R,1,p-h+1),this.m_reverseHistory.push(R)}}return this.WALKTRACE(b,c,d,y,v,h,p,w,f,g,s,t,i,l,r,o,x,a)}},{key:"PrettifyChanges",value:function(e){for(var t=0;t0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;l--){var c=e[l],d=0,h=0;if(l>0){var p=e[l-1];p.originalLength>0&&(d=p.originalStart+p.originalLength),p.modifiedLength>0&&(h=p.modifiedStart+p.modifiedLength)}for(var u=c.originalLength>0,m=c.modifiedLength>0,f=0,g=this._boundaryScore(c.originalStart,c.originalLength,c.modifiedStart,c.modifiedLength),b=1;;b++){var v=c.originalStart-b,y=c.modifiedStart-b;if(vg&&(g=w,f=b)}c.originalStart-=f,c.modifiedStart-=f}return e}},{key:"_OriginalIsBoundary",value:function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}},{key:"_OriginalRegionIsBoundary",value:function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}},{key:"_ModifiedIsBoundary",value:function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}},{key:"_ModifiedRegionIsBoundary",value:function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}},{key:"_boundaryScore",value:function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}},{key:"ConcatenateChanges",value:function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return ee.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],ee.Copy(t,1,r,e.length,t.length-1),r}var i=new Array(e.length+t.length);return ee.Copy(e,0,i,0,e.length),ee.Copy(t,0,i,e.length,t.length),i}},{key:"ChangesOverlap",value:function(e,t,n){if(Z.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Z.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var r=e.originalStart,i=e.originalLength,o=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new U(r,i,o,a),!0}return n[0]=null,!1}},{key:"ClipDiagonalBound",value:function(e,t,n,r){if(e>=0&&e0&&"string"===typeof e[0]}},{key:"_getElements",value:function(t){var n=t.getElements();if(e._isStringArray(n)){for(var r=new Int32Array(n.length),i=0,o=n.length;i=65&&e<=90||e>=97&&e<=122}function ce(e,t,n,r){for(var i="",o=0,a=-1,s=0,l=0,c=0;c<=e.length;++c){if(c2){var d=i.lastIndexOf(n);-1===d?(i="",o=0):o=(i=i.slice(0,d)).length-1-i.lastIndexOf(n),a=c,s=0;continue}if(0!==i.length){i="",o=0,a=c,s=0;continue}}t&&(i+=i.length>0?"".concat(n,".."):"..",o=2)}else i.length>0?i+="".concat(n).concat(e.slice(a+1,c)):i=e.slice(a+1,c),o=c-a-1;a=c,s=0}else 46===l&&-1!==s?++s:s=-1}return i}function de(e,t){if(null===t||"object"!==typeof t)throw new ie("pathObject","Object",t);var n=t.dir||t.root,r=t.base||"".concat(t.name||"").concat(t.ext||"");return n?n===t.root?"".concat(n).concat(r):"".concat(n).concat(e).concat(r):r}var he={resolve:function(){for(var e="",t="",n=!1,r=arguments.length-1;r>=-1;r--){var i=void 0;if(r>=0){if(oe(i=r<0||arguments.length<=r?void 0:arguments[r],"path"),0===i.length)continue}else 0===e.length?i=re.a():(void 0===(i=re.b["=".concat(e)]||re.a())||i.slice(0,2).toLowerCase()!==e.toLowerCase()&&92===i.charCodeAt(2))&&(i="".concat(e,"\\"));var o=i.length,a=0,s="",l=!1,c=i.charCodeAt(0);if(1===o)ae(c)&&(a=1,l=!0);else if(ae(c))if(l=!0,ae(i.charCodeAt(1))){for(var d=2,h=d;d2&&ae(i.charCodeAt(2))&&(l=!0,a=3));if(s.length>0)if(e.length>0){if(s.toLowerCase()!==e.toLowerCase())continue}else e=s;if(n){if(e.length>0)break}else if(t="".concat(i.slice(a),"\\").concat(t),n=l,l&&e.length>0)break}return t=ce(t,!n,"\\",ae),n?"".concat(e,"\\").concat(t):"".concat(e).concat(t)||"."},normalize:function(e){oe(e,"path");var t=e.length;if(0===t)return".";var n,r=0,i=!1,o=e.charCodeAt(0);if(1===t)return se(o)?"\\":e;if(ae(o))if(i=!0,ae(e.charCodeAt(1))){for(var a=2,s=a;a2&&ae(e.charCodeAt(2))&&(i=!0,r=3));var c=r0&&ae(e.charCodeAt(t-1))&&(c+="\\"),void 0===n?i?"\\".concat(c):c:i?"".concat(n,"\\").concat(c):"".concat(n).concat(c)},isAbsolute:function(e){oe(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return ae(n)||t>2&&le(n)&&58===e.charCodeAt(1)&&ae(e.charCodeAt(2))},join:function(){if(0===arguments.length)return".";for(var e,t,n=0;n0&&(void 0===e?e=t=r:e+="\\".concat(r))}if(void 0===e)return".";var i=!0,o=0;if("string"===typeof t&&ae(t.charCodeAt(0))){++o;var a=t.length;a>1&&ae(t.charCodeAt(1))&&(++o,a>2&&(ae(t.charCodeAt(2))?++o:i=!1))}if(i){for(;o=2&&(e="\\".concat(e.slice(o)))}return he.normalize(e)},relative:function(e,t){if(oe(e,"from"),oe(t,"to"),e===t)return"";var n=he.resolve(e),r=he.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";for(var i=0;ii&&92===e.charCodeAt(o-1);)o--;for(var a=o-i,s=0;ss&&92===t.charCodeAt(l-1);)l--;for(var c=l-s,d=ad){if(92===t.charCodeAt(s+p))return r.slice(s+p+1);if(2===p)return r.slice(s+p)}a>d&&(92===e.charCodeAt(i+p)?h=p:2===p&&(h=3)),-1===h&&(h=0)}var m="";for(p=i+h+1;p<=o;++p)p!==o&&92!==e.charCodeAt(p)||(m+=0===m.length?"..":"\\..");return s+=h,m.length>0?"".concat(m).concat(r.slice(s,l)):(92===r.charCodeAt(s)&&++s,r.slice(s,l))},toNamespacedPath:function(e){if("string"!==typeof e)return e;if(0===e.length)return"";var t=he.resolve(e);if(t.length<=2)return e;if(92===t.charCodeAt(0)){if(92===t.charCodeAt(1)){var n=t.charCodeAt(2);if(63!==n&&46!==n)return"\\\\?\\UNC\\".concat(t.slice(2))}}else if(le(t.charCodeAt(0))&&58===t.charCodeAt(1)&&92===t.charCodeAt(2))return"\\\\?\\".concat(t);return e},dirname:function(e){oe(e,"path");var t=e.length;if(0===t)return".";var n=-1,r=0,i=e.charCodeAt(0);if(1===t)return ae(i)?e:".";if(ae(i)){if(n=r=1,ae(e.charCodeAt(1))){for(var o=2,a=o;o2&&ae(e.charCodeAt(2))?3:2);for(var s=-1,l=!0,c=t-1;c>=r;--c)if(ae(e.charCodeAt(c))){if(!l){s=c;break}}else l=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename:function(e,t){void 0!==t&&oe(t,"ext"),oe(e,"path");var n,r=0,i=-1,o=!0;if(e.length>=2&&le(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=r;--n){var l=e.charCodeAt(n);if(ae(l)){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(ae(e.charCodeAt(n))){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){oe(e,"path");var t=0,n=-1,r=0,i=-1,o=!0,a=0;e.length>=2&&58===e.charCodeAt(1)&&le(e.charCodeAt(0))&&(t=r=2);for(var s=e.length-1;s>=t;--s){var l=e.charCodeAt(s);if(ae(l)){if(!o){r=s+1;break}}else-1===i&&(o=!1,i=s+1),46===l?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1)}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:de.bind(null,"\\"),parse:function(e){oe(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n=e.length,r=0,i=e.charCodeAt(0);if(1===n)return ae(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(ae(i)){if(r=1,ae(e.charCodeAt(1))){for(var o=2,a=o;o0&&(t.root=e.slice(0,r));for(var s=-1,l=r,c=-1,d=!0,h=e.length-1,p=0;h>=r;--h)if(ae(i=e.charCodeAt(h))){if(!d){l=h+1;break}}else-1===c&&(d=!1,c=h+1),46===i?-1===s?s=h:1!==p&&(p=1):-1!==s&&(p=-1);return-1!==c&&(-1===s||0===p||1===p&&s===c-1&&s===l+1?t.base=t.name=e.slice(l,c):(t.name=e.slice(l,s),t.base=e.slice(l,c),t.ext=e.slice(s,c))),t.dir=l>0&&l!==r?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},pe={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:re.a();oe(r,"path"),0!==r.length&&(e="".concat(r,"/").concat(e),t=47===r.charCodeAt(0))}return e=ce(e,!t,"/",se),t?"/".concat(e):e.length>0?e:"."},normalize:function(e){if(oe(e,"path"),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0===(e=ce(e,!t,"/",se)).length?t?"/":n?"./":".":(n&&(e+="/"),t?"/".concat(e):e)},isAbsolute:function(e){return oe(e,"path"),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/".concat(n))}return void 0===e?".":pe.normalize(e)},relative:function(e,t){if(oe(e,"from"),oe(t,"to"),e===t)return"";if((e=pe.resolve(e))===(t=pe.resolve(t)))return"";for(var n=e.length,r=n-1,i=t.length-1,o=ro){if(47===t.charCodeAt(1+s))return t.slice(1+s+1);if(0===s)return t.slice(1+s)}else r>o&&(47===e.charCodeAt(1+s)?a=s:0===s&&(a=0));var c="";for(s=1+a+1;s<=n;++s)s!==n&&47!==e.charCodeAt(s)||(c+=0===c.length?"..":"/..");return"".concat(c).concat(t.slice(1+a))},toNamespacedPath:function(e){return e},dirname:function(e){if(oe(e,"path"),0===e.length)return".";for(var t=47===e.charCodeAt(0),n=-1,r=!0,i=e.length-1;i>=1;--i)if(47===e.charCodeAt(i)){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&oe(t,"ext"),oe(e,"path");var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){oe(e,"path");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:de.bind(null,"/"),parse:function(e){oe(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=47===e.charCodeAt(0);r?(t.root="/",n=1):n=0;for(var i=-1,o=0,a=-1,s=!0,l=e.length-1,c=0;l>=n;--l){var d=e.charCodeAt(l);if(47!==d)-1===a&&(s=!1,a=l+1),46===d?-1===i?i=l:1!==c&&(c=1):-1!==i&&(c=-1);else if(!s){o=l+1;break}}if(-1!==a){var h=0===o&&r?1:o;-1===i||0===c||1===c&&i===a-1&&i===o+1?t.base=t.name=e.slice(h,a):(t.name=e.slice(h,i),t.base=e.slice(h,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};pe.win32=he.win32=he,pe.posix=he.posix=pe;"win32"===re.c?he.normalize:pe.normalize,"win32"===re.c?he.resolve:pe.resolve,"win32"===re.c?he.relative:pe.relative,"win32"===re.c?he.dirname:pe.dirname,"win32"===re.c?he.basename:pe.basename,"win32"===re.c?he.extname:pe.extname,"win32"===re.c?he.sep:pe.sep;var ue,me=/^\w[\w\d+.-]*$/,fe=/^\//,ge=/^\/\//;function be(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!me.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!fe.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(ge.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function ve(e,t){return e||t?e:"file"}function ye(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==we&&(t=we+t):t=we}return t}var we="/",xe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Se=function(){function e(t,n,r,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];d(this,e),"object"===typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=ve(t,a),this.authority=n||"",this.path=ye(this.scheme,r||""),this.query=i||"",this.fragment=o||"",be(this,a))}return p(e,[{key:"with",value:function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===r?r=this.path:null===r&&(r=""),void 0===i?i=this.query:null===i&&(i=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new Ce(t,n,r,i,o)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Te(this,e)}},{key:"toJSON",value:function(){return this}},{key:"fsPath",get:function(){return De(this,!1)}}],[{key:"isUri",value:function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme&&"function"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)}},{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=xe.exec(e);return n?new Ce(n[2]||"",Ne(n[4]||""),Ne(n[5]||""),Ne(n[7]||""),Ne(n[9]||""),t):new Ce("","","","","")}},{key:"file",value:function(e){var t="";if(z.d&&(e=e.replace(/\\/g,we)),e[0]===we&&e[1]===we){var n=e.indexOf(we,2);-1===n?(t=e.substring(2),e=we):(t=e.substring(2,n),e=e.substring(n)||we)}return new Ce("file",t,e,"","")}},{key:"from",value:function(e){return new Ce(e.scheme,e.authority,e.path,e.query,e.fragment)}},{key:"joinPath",value:function(t){if(!t.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");for(var n,r,i,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];return e?Te(this,!0):(this._formatted||(this._formatted=Te(this,!1)),this._formatted)}},{key:"toJSON",value:function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=ke),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},{key:"fsPath",get:function(){return this._fsPath||(this._fsPath=De(this,!1)),this._fsPath}}]),n}(Se),Ee=(S(ue={},58,"%3A"),S(ue,47,"%2F"),S(ue,63,"%3F"),S(ue,35,"%23"),S(ue,91,"%5B"),S(ue,93,"%5D"),S(ue,64,"%40"),S(ue,33,"%21"),S(ue,36,"%24"),S(ue,38,"%26"),S(ue,39,"%27"),S(ue,40,"%28"),S(ue,41,"%29"),S(ue,42,"%2A"),S(ue,43,"%2B"),S(ue,44,"%2C"),S(ue,59,"%3B"),S(ue,61,"%3D"),S(ue,32,"%20"),ue);function _e(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=Ee[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function Fe(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,z.d&&(n=n.replace(/\//g,"\\")),n}function Te(e,t){var n=t?Fe:_e,r="",i=e.scheme,o=e.authority,a=e.path,s=e.query,l=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=we,r+=we),o){var c=o.indexOf("@");if(-1!==c){var d=o.substr(0,c);o=o.substr(c+1),-1===(c=d.indexOf(":"))?r+=n(d,!1):(r+=n(d.substr(0,c),!1),r+=":",r+=n(d.substr(c+1),!1)),r+="@"}-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){var h=a.charCodeAt(1);h>=65&&h<=90&&(a="/".concat(String.fromCharCode(h+32),":").concat(a.substr(3)))}else if(a.length>=2&&58===a.charCodeAt(1)){var p=a.charCodeAt(0);p>=65&&p<=90&&(a="".concat(String.fromCharCode(p+32),":").concat(a.substr(2)))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),l&&(r+="#",r+=t?l:_e(l,!1)),r}var Re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ne(e){return e.match(Re)?e.replace(Re,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}var ze=function(){function e(t,n){d(this,e),this.lineNumber=t,this.column=n}return p(e,[{key:"with",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return t===this.lineNumber&&n===this.column?this:new e(t,n)}},{key:"delta",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}},{key:"equals",value:function(t){return e.equals(this,t)}},{key:"isBefore",value:function(t){return e.isBefore(this,t)}},{key:"isBeforeOrEqual",value:function(t){return e.isBeforeOrEqual(this,t)}},{key:"clone",value:function(){return new e(this.lineNumber,this.column)}},{key:"toString",value:function(){return"("+this.lineNumber+","+this.column+")"}}],[{key:"equals",value:function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}},{key:"isBefore",value:function(e,t){return e.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}return p(e,[{key:"isEmpty",value:function(){return e.isEmpty(this)}},{key:"containsPosition",value:function(t){return e.containsPosition(this,t)}},{key:"containsRange",value:function(t){return e.containsRange(this,t)}},{key:"strictContainsRange",value:function(t){return e.strictContainsRange(this,t)}},{key:"plusRange",value:function(t){return e.plusRange(this,t)}},{key:"intersectRanges",value:function(t){return e.intersectRanges(this,t)}},{key:"equalsRange",value:function(t){return e.equalsRange(this,t)}},{key:"getEndPosition",value:function(){return e.getEndPosition(this)}},{key:"getStartPosition",value:function(){return e.getStartPosition(this)}},{key:"toString",value:function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}},{key:"setEndPosition",value:function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}},{key:"setStartPosition",value:function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}},{key:"collapseToStart",value:function(){return e.collapseToStart(this)}}],[{key:"isEmpty",value:function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}},{key:"containsPosition",value:function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}},{key:"containsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}},{key:"strictContainsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}},{key:"plusRange",value:function(t,n){var r,i,o,a;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,a=t.endColumn),new e(r,i,o,a)}},{key:"intersectRanges",value:function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,a=t.endColumn,s=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(o=c,a=d):o===c&&(a=Math.min(a,d)),r>o||r===o&&i>a?null:new e(r,i,o,a)}},{key:"equalsRange",value:function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}},{key:"getEndPosition",value:function(e){return new ze(e.endLineNumber,e.endColumn)}},{key:"getStartPosition",value:function(e){return new ze(e.startLineNumber,e.startColumn)}},{key:"collapseToStart",value:function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}},{key:"fromPositions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"lift",value:function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}},{key:"isIRange",value:function(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}},{key:"areIntersectingOrTouching",value:function(e,t){return!(e.endLineNumbere.startLineNumber}}]),e}();function Ae(e,t,n,r){return new ne(e,t,n).ComputeDiff(r)}var Me=function(){function e(t){d(this,e);for(var n=[],r=[],i=0,o=t.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&o()){var u=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),m=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),f=Ae(u,m,o,!0).changes;s&&(f=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r1&&b>1;){if(m.charCodeAt(g-2)!==f.charCodeAt(b-2))break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(a,s+1,1,g,l+1,1,b);for(var v=je(m,1),y=je(f,1),w=m.length+1,x=f.length+1;v1&&void 0!==arguments[1]?arguments[1]:e.length-1,n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1}(e);return-1===n?t:n+2}function Ve(e){if(0===e)return function(){return!0};var t=Date.now();return function(){return Date.now()-t255?255:0|e}function Ke(e){return e<0?0:e>4294967295?4294967295:0|e}var qe=function e(t,n){d(this,e),this.index=t,this.remainder=n},$e=function(){function e(t){d(this,e),this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return p(e,[{key:"insertValues",value:function(e,t){e=Ke(e);var n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"changeValue",value:function(e,t){return e=Ke(e),t=Ke(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"getTotalValue",value:function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}},{key:"getAccumulatedValue",value:function(e){return e<0?0:(e=Ke(e),this._getAccumulatedValue(e))}},{key:"_getAccumulatedValue",value:function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}},{key:"getIndexOf",value:function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,r=0,i=0,o=0;t<=n;)if(r=t+(n-t)/2|0,e<(o=(i=this.prefixSum[r])-this.values[r]))n=r-1;else{if(!(e>=i))break;t=r+1}return new qe(r,e-o)}}]),e}(),Ge=function(){function e(t,n,r,i){d(this,e),this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}return p(e,[{key:"dispose",value:function(){this._lines.length=0}},{key:"getText",value:function(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}},{key:"onEvents",value:function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);var t,n=y(e.changes);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._acceptDeleteRange(r.range),this._acceptInsertText(new ze(r.range.startLineNumber,r.range.startColumn),r.text)}}catch(i){n.e(i)}finally{n.f()}this._versionId=e.versionId,this._cachedTextValue=null}},{key:"_ensureLineStarts",value:function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,n=new Uint32Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:"",n="(-?\\d*\\.\\d\\w*)|([^",r=y("`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?");try{for(r.s();!(e=r.n()).done;){var i=e.value;t.indexOf(i)>=0||(n+="\\"+i)}}catch(o){r.e(o)}finally{r.f()}return n+="\\s]+)",new RegExp(n,"g")}();var Ye={maxLen:1e3,windowSize:15,timeBudget:150};function Je(e,t,n,r){for(var i;i=e.exec(t);){var o=i.index||0;if(o<=n&&e.lastIndex>=n)return i;if(r>0&&o>r)return null}return null}var Xe=function(){function e(t){d(this,e);var n=Be(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return p(e,[{key:"set",value:function(e,t){var n=Be(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}},{key:"get",value:function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}],[{key:"_createAsciiMap",value:function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t}}]),e}(),Qe=function(){function e(t,n,r){d(this,e);for(var i=new Uint8Array(t*n),o=0,a=t*n;on&&(n=l),s>r&&(r=s),c>r&&(r=c)}n++,r++;for(var h=new Qe(r,n,0),p=0,u=t.length;p=this._maxCharCode?0:this._states.get(e,t)}}]),e}(),et=null;function tt(){return null===et&&(et=new Ze([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),et}var nt=null;function rt(){if(null===nt){nt=new Xe(0);for(var e=0;e<" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u3011\u300f\u300d\u300b\u3009\u201d\u2019\uff40\uff5e\u2026".length;e++)nt.set(" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u3011\u300f\u300d\u300b\u3009\u201d\u2019\uff40\uff5e\u2026".charCodeAt(e),1);for(var t=0;t<".,;".length;t++)nt.set(".,;".charCodeAt(t),2)}return nt}var it=function(){function e(){d(this,e)}return p(e,null,[{key:"_createLink",value:function(e,t,n,r,i){var o=i-1;do{var a=t.charCodeAt(o);if(2!==e.get(a))break;o--}while(o>r);if(r>0){var s=t.charCodeAt(r-1),l=t.charCodeAt(o);(40===s&&41===l||91===s&&93===l||123===s&&125===l)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}}},{key:"computeLinks",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt(),r=rt(),i=[],o=1,a=t.getLineCount();o<=a;o++){for(var s=t.getLineContent(o),l=s.length,c=0,d=0,h=0,p=1,u=!1,m=!1,f=!1,g=!1;c=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null}}]),e}();at.INSTANCE=new at;var st=function e(t){d(this,e),this.element=t,this.next=e.Undefined,this.prev=e.Undefined};st.Undefined=new st(void 0);var lt,ct=function(){function e(){d(this,e),this._first=st.Undefined,this._last=st.Undefined,this._size=0}return p(e,[{key:"isEmpty",value:function(){return this._first===st.Undefined}},{key:"clear",value:function(){this._first=st.Undefined,this._last=st.Undefined,this._size=0}},{key:"unshift",value:function(e){return this._insert(e,!1)}},{key:"push",value:function(e){return this._insert(e,!0)}},{key:"_insert",value:function(e,t){var n=this,r=new st(e);if(this._first===st.Undefined)this._first=r,this._last=r;else if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}}},{key:"shift",value:function(){if(this._first!==st.Undefined){var e=this._first.element;return this._remove(this._first),e}}},{key:"pop",value:function(){if(this._last!==st.Undefined){var e=this._last.element;return this._remove(this._last),e}}},{key:"_remove",value:function(e){if(e.prev!==st.Undefined&&e.next!==st.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===st.Undefined&&e.next===st.Undefined?(this._first=st.Undefined,this._last=st.Undefined):e.next===st.Undefined?(this._last=this._last.prev,this._last.next=st.Undefined):e.prev===st.Undefined&&(this._first=this._first.next,this._first.prev=st.Undefined);this._size-=1}},{key:Symbol.iterator,value:E.a.mark((function e(){var t;return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._first;case 1:if(t===st.Undefined){e.next=7;break}return e.next=4,t.element;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"toArray",value:function(){for(var e=[],t=this._first;t!==st.Undefined;t=t.next)e.push(t.element);return e}},{key:"size",get:function(){return this._size}}]),e}();!function(e){function t(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,o=!1;return n=e((function(e){if(!o)return n?n.dispose():o=!0,t.call(r,e)}),null,i),o&&n.dispose(),n}}function n(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){return n.call(r,t(e))}),null,i)}))}function r(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){t(e),n.call(r,e)}),null,i)}))}function i(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){return t(e)&&n.call(r,e)}),null,i)}))}function o(e,t,r){var i=r;return n(e,(function(e){return i=t(i,e)}))}function a(e){var t,n=new dt({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function s(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=void 0,s=void 0,l=0,c=new dt({leakWarningThreshold:o,onFirstListenerAdd:function(){n=e((function(e){l++,a=t(a,e),i&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var e=a;a=void 0,s=void 0,(!i||l>1)&&c.fire(e),l=0}),r)}))},onLastListenerRemove:function(){n.dispose()}});return c.event}function l(e){var t,n=!0;return i(e,(function(e){var r=n||e!==t;return n=!1,t=e,r}))}e.None=function(){return N.None},e.once=t,e.map=n,e.forEach=r,e.filter=i,e.signal=function(e){return e},e.any=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;return T.apply(void 0,O(t.map((function(t){return t((function(t){return e.call(n,t)}),null,r)}))))}},e.reduce=o,e.snapshot=a,e.debounce=s,e.stopwatch=function(e){var r=(new Date).getTime();return n(t(e),(function(e){return(new Date).getTime()-r}))},e.latch=l,e.buffer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=n.slice(),i=e((function(e){r?r.push(e):a.fire(e)})),o=function(){r&&r.forEach((function(e){return a.fire(e)})),r=null},a=new dt({onFirstListenerAdd:function(){i||(i=e((function(e){return a.fire(e)})))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i&&i.dispose(),i=null}});return a.event};var c=function(){function e(t){d(this,e),this.event=t}return p(e,[{key:"map",value:function(t){return new e(n(this.event,t))}},{key:"forEach",value:function(t){return new e(r(this.event,t))}},{key:"filter",value:function(t){return new e(i(this.event,t))}},{key:"reduce",value:function(t,n){return new e(o(this.event,t,n))}},{key:"latch",value:function(){return new e(l(this.event))}},{key:"debounce",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return new e(s(this.event,t,n,r,i))}},{key:"on",value:function(e,t,n){return this.event(e,t,n)}},{key:"once",value:function(e,n,r){return t(this.event)(e,n,r)}}]),e}();e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return a.fire(n.apply(void 0,arguments))},i=function(){return e.on(t,r)},o=function(){return e.removeListener(t,r)},a=new dt({onFirstListenerAdd:i,onLastListenerRemove:o});return a.event},e.fromDOMEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return a.fire(n.apply(void 0,arguments))},i=function(){return e.addEventListener(t,r)},o=function(){return e.removeEventListener(t,r)},a=new dt({onFirstListenerAdd:i,onLastListenerRemove:o});return a.event},e.fromPromise=function(e){var t=new dt,n=!1;return e.then(void 0,(function(){return null})).then((function(){n?t.fire(void 0):setTimeout((function(){return t.fire(void 0)}),0)})),n=!0,t.event},e.toPromise=function(e){return new Promise((function(n){return t(e)(n)}))}}(lt||(lt={}));var dt=function(){function e(t){d(this,e),this._disposed=!1,this._options=t,this._leakageMon=void 0}return p(e,[{key:"fire",value:function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ct);var t,n=y(this._listeners);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._deliveryQueue.push([r,e])}}catch(s){n.e(s)}finally{n.f()}for(;this._deliveryQueue.size>0;){var i=W(this._deliveryQueue.shift(),2),o=i[0],a=i[1];try{"function"===typeof o?o.call(void 0,a):o[0].call(o[1],a)}catch(l){m(l)}}}}},{key:"dispose",value:function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}},{key:"event",get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new ct);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var a,s,l=t._listeners.push(r?[n,r]:n);return o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r),t._leakageMon&&(a=t._leakageMon.check(t._listeners.size)),s={dispose:function(){(a&&a(),s.dispose=e._noop,t._disposed)||(l(),t._options&&t._options.onLastListenerRemove&&(t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)))}},i instanceof R?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}}]),e}();dt._noop=function(){};var ht,pt,ut=Object.freeze((function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));(pt=ht||(ht={})).isCancellationToken=function(e){return e===pt.None||e===pt.Cancelled||e instanceof ft||!(!e||"object"!==typeof e)&&"boolean"===typeof e.isCancellationRequested&&"function"===typeof e.onCancellationRequested},pt.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:lt.None}),pt.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ut});var mt,ft=function(){function e(){d(this,e),this._isCancelled=!1,this._emitter=null}return p(e,[{key:"cancel",value:function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}},{key:"dispose",value:function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},{key:"isCancellationRequested",get:function(){return this._isCancelled}},{key:"onCancellationRequested",get:function(){return this._isCancelled?ut:(this._emitter||(this._emitter=new dt),this._emitter.event)}}]),e}(),gt=function(){function e(t){d(this,e),this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}return p(e,[{key:"cancel",value:function(){this._token?this._token instanceof ft&&this._token.cancel():this._token=ht.Cancelled}},{key:"dispose",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof ft&&this._token.dispose():this._token=ht.None}},{key:"token",get:function(){return this._token||(this._token=new ft),this._token}}]),e}(),bt=function(){function e(){d(this,e),this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return p(e,[{key:"define",value:function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}},{key:"keyCodeToStr",value:function(e){return this._keyCodeToStr[e]}},{key:"strToKeyCode",value:function(e){return this._strToKeyCode[e.toLowerCase()]||0}}]),e}(),vt=new bt,yt=new bt,wt=new bt;!function(){function e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;vt.define(e,t),yt.define(e,n),wt.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return vt.keyCodeToStr(e)},e.fromString=function(e){return vt.strToKeyCode(e)},e.toUserSettingsUS=function(e){return yt.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return wt.keyCodeToStr(e)},e.fromUserSettings=function(e){return yt.strToKeyCode(e)||wt.strToKeyCode(e)}}(mt||(mt={}));var xt,St,kt,Ct,Et,_t,Ft,Dt,Tt,Rt,Nt,zt,It,At,Mt,Pt,Ot,Lt,Wt,Ut,jt,Vt,Bt,Kt,qt,$t,Gt,Ht,Yt,Jt,Xt,Qt,Zt,en=function(e){i(n,e);var t=c(n);function n(e,r,i,o){var a;return d(this,n),(a=t.call(this,e,r,i,o)).selectionStartLineNumber=e,a.selectionStartColumn=r,a.positionLineNumber=i,a.positionColumn=o,a}return p(n,[{key:"toString",value:function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}},{key:"equalsSelection",value:function(e){return n.selectionsEqual(this,e)}},{key:"getDirection",value:function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}},{key:"setEndPosition",value:function(e,t){return 0===this.getDirection()?new n(this.startLineNumber,this.startColumn,e,t):new n(e,t,this.startLineNumber,this.startColumn)}},{key:"getPosition",value:function(){return new ze(this.positionLineNumber,this.positionColumn)}},{key:"setStartPosition",value:function(e,t){return 0===this.getDirection()?new n(e,t,this.endLineNumber,this.endColumn):new n(this.endLineNumber,this.endColumn,e,t)}}],[{key:"selectionsEqual",value:function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}},{key:"fromPositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new n(e.lineNumber,e.column,t.lineNumber,t.column)}},{key:"liftSelection",value:function(e){return new n(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}},{key:"selectionsArrEqual",value:function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n>>0)>>>0}(e,t)}}]),e}();nn.CtrlCmd=2048,nn.Shift=1024,nn.Alt=512,nn.WinCtrl=256;var rn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},on=function(e){i(n,e);var t=c(n);function n(){return d(this,n),t.apply(this,arguments)}return p(n,[{key:"getValue",value:function(){return this.getText()}},{key:"getLinesContent",value:function(){return this._lines.slice(0)}},{key:"getLineCount",value:function(){return this._lines.length}},{key:"getLineContent",value:function(e){return this._lines[e-1]}},{key:"getWordAtPosition",value:function(e,t){var n=function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Ye;if(r.length>o.maxLen){var a=t-o.maxLen/2;return a<0?(i+=t,a=0):i+=a,e(t,n,r=r.substring(a,t+o.maxLen/2),i,o)}Date.now();for(var s=t-1-i,l=-1,c=null,d=1;;d++){Date.now(),o.timeBudget;var h=s-o.windowSize*d;n.lastIndex=Math.max(0,h);var p=Je(n,r,s,l);if(!p&&c)break;if(c=p,h<=0)break;l=h}if(c){var u={word:c[0],startColumn:i+1+c.index,endColumn:i+1+c.index+c[0].length};return n.lastIndex=0,u}return null}(e.column,function(e){var t=He;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}(t),this._lines[e.lineNumber-1],0);return n?new Ie(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}},{key:"words",value:function(e){var t=this._lines,n=this._wordenize.bind(this),r=0,i="",o=0,a=[];return S({},Symbol.iterator,E.a.mark((function s(){var l;return E.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!(othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e}},{key:"uri",get:function(){return this._uri}},{key:"version",get:function(){return this._versionId}},{key:"eol",get:function(){return this._eol}}]),n}(Ge),an=function(){function e(t,n){d(this,e),this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}return p(e,[{key:"dispose",value:function(){this._models=Object.create(null)}},{key:"_getModel",value:function(e){return this._models[e]}},{key:"_getModels",value:function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t}},{key:"acceptNewModel",value:function(e){this._models[e.url]=new on(Se.parse(e.url),e.lines,e.EOL,e.versionId)}},{key:"acceptModelChanged",value:function(e,t){this._models[e]&&this._models[e].onEvents(t)}},{key:"acceptRemovedModel",value:function(e){this._models[e]&&delete this._models[e]}},{key:"computeDiff",value:function(e,t,n,r){return rn(this,void 0,void 0,E.a.mark((function i(){var o,a,s,l,c,d,h;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e),a=this._getModel(t),o&&a){i.next=4;break}return i.abrupt("return",null);case 4:return s=o.getLinesContent(),l=a.getLinesContent(),c=new We(s,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}),d=c.computeDiff(),h=!(d.changes.length>0)&&this._modelsAreIdentical(o,a),i.abrupt("return",{quitEarly:d.quitEarly,identical:h,changes:d.changes});case 10:case"end":return i.stop()}}),i,this)})))}},{key:"_modelsAreIdentical",value:function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0}},{key:"computeMoreMinimalEdits",value:function(t,n){return rn(this,void 0,void 0,E.a.mark((function r(){var i,o,a,s,l,c,d,h,p,u,m,f,g,b,v,w,x,S;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this._getModel(t)){r.next=3;break}return r.abrupt("return",n);case 3:o=[],a=void 0,n=L(n,(function(e,t){return e.range&&t.range?Ie.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)})),s=y(n),r.prev=7,s.s();case 9:if((l=s.n()).done){r.next=27;break}if(c=l.value,d=c.range,h=c.text,"number"===typeof(p=c.eol)&&(a=p),!Ie.isEmpty(d)||h){r.next=14;break}return r.abrupt("continue",25);case 14:if(u=i.getValueInRange(d),h=h.replace(/\r\n|\n|\r/g,i.eol),u!==h){r.next=18;break}return r.abrupt("continue",25);case 18:if(!(Math.max(h.length,u.length)>e._diffLimit)){r.next=21;break}return o.push({range:d,text:h}),r.abrupt("continue",25);case 21:m=Q(u,h,!1),f=i.offsetAt(Ie.lift(d).getStartPosition()),g=y(m);try{for(g.s();!(b=g.n()).done;)v=b.value,w=i.positionAt(f+v.originalStart),x=i.positionAt(f+v.originalStart+v.originalLength),S={text:h.substr(v.modifiedStart,v.modifiedLength),range:{startLineNumber:w.lineNumber,startColumn:w.column,endLineNumber:x.lineNumber,endColumn:x.column}},i.getValueInRange(S.range)!==S.text&&o.push(S)}catch(k){g.e(k)}finally{g.f()}case 25:r.next=9;break;case 27:r.next=32;break;case 29:r.prev=29,r.t0=r.catch(7),s.e(r.t0);case 32:return r.prev=32,s.f(),r.finish(32);case 35:return"number"===typeof a&&o.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r.abrupt("return",o);case 37:case"end":return r.stop()}}),r,this,[[7,29,32,35]])})))}},{key:"computeLinks",value:function(e){return rn(this,void 0,void 0,E.a.mark((function t(){var n;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._getModel(e)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",ot(n));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"textualSuggest",value:function(t,n,r,i){return rn(this,void 0,void 0,E.a.mark((function o(){var a,s,l,c,d,h,p,u;return E.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=this._getModel(t)){o.next=3;break}return o.abrupt("return",null);case 3:s=[],l=new Set,c=new RegExp(r,i),(d=a.getWordAtPosition(n,c))&&l.add(a.getValueInRange(d)),h=y(a.words(c)),o.prev=9,h.s();case 11:if((p=h.n()).done){o.next=23;break}if(u=p.value,!l.has(u)){o.next=15;break}return o.abrupt("continue",21);case 15:if(l.add(u),isNaN(Number(u))){o.next=18;break}return o.abrupt("continue",21);case 18:if(s.push(u),!(l.size>e._suggestionsLimit)){o.next=21;break}return o.abrupt("break",23);case 21:o.next=11;break;case 23:o.next=28;break;case 25:o.prev=25,o.t0=o.catch(9),h.e(o.t0);case 28:return o.prev=28,h.f(),o.finish(28);case 31:return o.abrupt("return",s);case 32:case"end":return o.stop()}}),o,this,[[9,25,28,31]])})))}},{key:"computeWordRanges",value:function(e,t,n,r){return rn(this,void 0,void 0,E.a.mark((function i(){var o,a,s,l,c,d,h,p,u;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e)){i.next=3;break}return i.abrupt("return",Object.create(null));case 3:a=new RegExp(n,r),s=Object.create(null),l=t.startLineNumber;case 6:if(!(lthis.source.length)return!1;for(var t=0;t=bn&&e<=vn&&(this.stream.advance(t+1),this.stream.advanceWhileChar((function(e){return e>=bn&&e<=vn||0===t&&e===Jn})),!0)},e.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case On:case Ln:case Pn:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===On&&this.stream.advanceIfChar(Pn)&&e.push("\n"),!0}return!1},e.prototype._escape=function(e,t){var n=this.stream.peekChar();if(n===An){this.stream.advance(1),n=this.stream.peekChar();for(var r=0;r<6&&(n>=bn&&n<=vn||n>=hn&&n<=pn||n>=mn&&n<=fn);)this.stream.advance(1),n=this.stream.peekChar(),r++;if(r>0){try{var i=parseInt(this.stream.substring(this.stream.pos()-r),16);i&&e.push(String.fromCharCode(i))}catch(o){}return n===jn||n===Vn?this.stream.advance(1):this._newline([]),!0}if(n!==On&&n!==Ln&&n!==Pn)return this.stream.advance(1),e.push(String.fromCharCode(n)),!0;if(t)return this._newline(e)}return!1},e.prototype._stringChar=function(e,t){var n=this.stream.peekChar();return 0!==n&&n!==e&&n!==An&&n!==On&&n!==Ln&&n!==Pn&&(this.stream.advance(1),t.push(String.fromCharCode(n)),!0)},e.prototype._string=function(e){if(this.stream.peekChar()===Un||this.stream.peekChar()===Wn){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),sn.String):sn.BadString}return null},e.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return 0!==t&&t!==An&&t!==Un&&t!==Wn&&t!==Fn&&t!==Dn&&t!==jn&&t!==Vn&&t!==Pn&&t!==Ln&&t!==On&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},e.prototype._whitespace=function(){return this.stream.advanceWhileChar((function(e){return e===jn||e===Vn||e===Pn||e===Ln||e===On}))>0},e.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},e.prototype.ident=function(e){var t=this.stream.pos();if(this._minus(e)&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1},e.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return(t===Cn||t>=hn&&t<=un||t>=mn&&t<=gn||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._minus=function(e){var t=this.stream.peekChar();return t===kn&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e.prototype._identChar=function(e){var t=this.stream.peekChar();return(t===Cn||t===kn||t>=hn&&t<=un||t>=mn&&t<=gn||t>=bn&&t<=vn||t>=128&&t<=65535)&&(this.stream.advance(1),e.push(String.fromCharCode(t)),!0)},e}();function tr(e,t){if(e.length0?e.lastIndexOf(t)===n:0===n&&e===t}function rr(e,t){return void 0===t&&(t=!0),e?e.length<140?e:e.slice(0,140)+(t?"\u2026":""):""}var ir,or,ar=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function sr(e,t){var n=null;return!e||te.end?null:(e.accept((function(e){return-1===e.offset&&-1===e.length||e.offset<=t&&e.end>=t&&(n?e.length<=n.length&&(n=e):n=e,!0)})),n)}function lr(e,t){for(var n=sr(e,t),r=[];n;)r.unshift(n),n=n.parent;return r}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",e[e.Page=12]="Page",e[e.PageBoxMarginBox=13]="PageBoxMarginBox",e[e.ClassSelector=14]="ClassSelector",e[e.IdentifierSelector=15]="IdentifierSelector",e[e.ElementNameSelector=16]="ElementNameSelector",e[e.PseudoSelector=17]="PseudoSelector",e[e.AttributeSelector=18]="AttributeSelector",e[e.Declaration=19]="Declaration",e[e.Declarations=20]="Declarations",e[e.Property=21]="Property",e[e.Expression=22]="Expression",e[e.BinaryExpression=23]="BinaryExpression",e[e.Term=24]="Term",e[e.Operator=25]="Operator",e[e.Value=26]="Value",e[e.StringLiteral=27]="StringLiteral",e[e.URILiteral=28]="URILiteral",e[e.EscapedValue=29]="EscapedValue",e[e.Function=30]="Function",e[e.NumericValue=31]="NumericValue",e[e.HexColorValue=32]="HexColorValue",e[e.MixinDeclaration=33]="MixinDeclaration",e[e.MixinReference=34]="MixinReference",e[e.VariableName=35]="VariableName",e[e.VariableDeclaration=36]="VariableDeclaration",e[e.Prio=37]="Prio",e[e.Interpolation=38]="Interpolation",e[e.NestedProperties=39]="NestedProperties",e[e.ExtendsReference=40]="ExtendsReference",e[e.SelectorPlaceholder=41]="SelectorPlaceholder",e[e.Debug=42]="Debug",e[e.If=43]="If",e[e.Else=44]="Else",e[e.For=45]="For",e[e.Each=46]="Each",e[e.While=47]="While",e[e.MixinContentReference=48]="MixinContentReference",e[e.MixinContentDeclaration=49]="MixinContentDeclaration",e[e.Media=50]="Media",e[e.Keyframe=51]="Keyframe",e[e.FontFace=52]="FontFace",e[e.Import=53]="Import",e[e.Namespace=54]="Namespace",e[e.Invocation=55]="Invocation",e[e.FunctionDeclaration=56]="FunctionDeclaration",e[e.ReturnStatement=57]="ReturnStatement",e[e.MediaQuery=58]="MediaQuery",e[e.FunctionParameter=59]="FunctionParameter",e[e.FunctionArgument=60]="FunctionArgument",e[e.KeyframeSelector=61]="KeyframeSelector",e[e.ViewPort=62]="ViewPort",e[e.Document=63]="Document",e[e.AtApplyRule=64]="AtApplyRule",e[e.CustomPropertyDeclaration=65]="CustomPropertyDeclaration",e[e.CustomPropertySet=66]="CustomPropertySet",e[e.ListEntry=67]="ListEntry",e[e.Supports=68]="Supports",e[e.SupportsCondition=69]="SupportsCondition",e[e.NamespacePrefix=70]="NamespacePrefix",e[e.GridLine=71]="GridLine",e[e.Plugin=72]="Plugin",e[e.UnknownAtRule=73]="UnknownAtRule",e[e.Use=74]="Use",e[e.ModuleConfiguration=75]="ModuleConfiguration",e[e.Forward=76]="Forward",e[e.ForwardVisibility=77]="ForwardVisibility",e[e.Module=78]="Module"}(ir||(ir={})),function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown",e[e.Module=6]="Module",e[e.Forward=7]="Forward",e[e.ForwardVisibility=8]="ForwardVisibility"}(or||(or={}));var cr,dr=function(){function e(e,t,n){void 0===e&&(e=-1),void 0===t&&(t=-1),this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}return Object.defineProperty(e.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.nodeType||ir.Undefined},set:function(e){this.nodeType=e},enumerable:!0,configurable:!0}),e.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},e.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},e.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},e.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},e.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},e.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,n=this.children;t=0&&e.parent.children.splice(n,1)}e.parent=this;var r=this.children;return r||(r=this.children=[]),-1!==t?r.splice(t,0,e):r.push(e),e},e.prototype.attachTo=function(e,t){return void 0===t&&(t=-1),e&&e.adoptChild(this,t),this},e.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},e.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},e.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some((function(t){return t.getRule()===e}))},e.prototype.isErroneous=function(e){return void 0===e&&(e=!1),!!(this.issues&&this.issues.length>0)||e&&Array.isArray(this.children)&&this.children.some((function(e){return e.isErroneous(!0)}))},e.prototype.setNode=function(e,t,n){return void 0===n&&(n=-1),!!t&&(t.attachTo(this,n),this[e]=t,!0)},e.prototype.addChild=function(e){return!!e&&(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0)},e.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||-1===this.length)&&(this.length=t-this.offset)},e.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},e.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},e.prototype.getChild=function(e){return this.children&&e=0;n--)if((t=this.children[n]).offset<=e)return t;return null},e.prototype.findChildAtOffset=function(e,t){var n=this.findFirstChildBeforeOffset(e);return n&&n.end>=e?t&&n.findChildAtOffset(e,!0)||n:null},e.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},e.prototype.getParent=function(){for(var e=this.parent;e instanceof hr;)e=e.parent;return e},e.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},e.prototype.findAParent=function(){for(var e=[],t=0;t/g,">")}function Ii(e){if(!e.description||""===e.description)return"";if("string"!==typeof e.description)return e.description.value;var t="";e.status&&(t+=Ri(e.status)),t+=e.description;var n=Mi(e.browsers);return n&&(t+="\n("+n+")"),"syntax"in e&&(t+="\n\nSyntax: "+e.syntax),e.references&&e.references.length>0&&(t+="\n\n",t+=e.references.map((function(e){return e.name+": "+e.url})).join(" | ")),t}function Ai(e){if(!e.description||""===e.description)return"";var t="";e.status&&(t+=Ri(e.status)),t+=zi("string"===typeof e.description?e.description:e.description.value);var n=Mi(e.browsers);return n&&(t+="\n\n("+zi(n)+")"),"syntax"in e&&e.syntax&&(t+="\n\nSyntax: "+zi(e.syntax)),e.references&&e.references.length>0&&(t+="\n\n",t+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | ")),t}function Mi(e){return void 0===e&&(e=[]),0===e.length?null:e.map((function(e){var t="",n=e.match(/([A-Z]+)(\d+)?/),r=n[1],i=n[2];return r in Ti&&(t+=Ti[r]),i&&(t+=" "+i),t})).join(", ")}var Pi=Ei(),Oi=[{func:"rgb($red, $green, $blue)",desc:Pi("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:Pi("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:Pi("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:Pi("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],Li={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Wi={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function Ui(e,t){var n=e.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(n){n[2]&&(t=100);var r=parseFloat(n[1])/t;if(r>=0&&r<=1)return r}throw new Error}function ji(e){var t=e.getName();return!!t&&/^(rgb|rgba|hsl|hsla)$/gi.test(t)}function Vi(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Bi(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Vi(e.charCodeAt(1))/255,green:17*Vi(e.charCodeAt(2))/255,blue:17*Vi(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Vi(e.charCodeAt(1))/255,green:17*Vi(e.charCodeAt(2))/255,blue:17*Vi(e.charCodeAt(3))/255,alpha:17*Vi(e.charCodeAt(4))/255};case 7:return{red:(16*Vi(e.charCodeAt(1))+Vi(e.charCodeAt(2)))/255,green:(16*Vi(e.charCodeAt(3))+Vi(e.charCodeAt(4)))/255,blue:(16*Vi(e.charCodeAt(5))+Vi(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Vi(e.charCodeAt(1))+Vi(e.charCodeAt(2)))/255,green:(16*Vi(e.charCodeAt(3))+Vi(e.charCodeAt(4)))/255,blue:(16*Vi(e.charCodeAt(5))+Vi(e.charCodeAt(6)))/255,alpha:(16*Vi(e.charCodeAt(7))+Vi(e.charCodeAt(8)))/255}}return null}function Ki(e){if(e.type===ir.HexColorValue)return Bi(e.getText());if(e.type===ir.Function){var t=e,n=t.getName(),r=t.getArguments().getChildren();if(!n||r.length<3||r.length>4)return null;try{var i=4===r.length?Ui(r[3],1):1;if("rgb"===n||"rgba"===n)return{red:Ui(r[0],255),green:Ui(r[1],255),blue:Ui(r[2],255),alpha:i};if("hsl"===n||"hsla"===n)return function(e,t,n,r){if(void 0===r&&(r=1),0===t)return{red:n,green:n,blue:n,alpha:r};var i=function(e,t,n){for(;n<0;)n+=6;for(;n>=6;)n-=6;return n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e},o=n<=.5?n*(t+1):n+t-n*t,a=2*n-o;return{red:i(a,o,(e/=60)+2),green:i(a,o,e),blue:i(a,o,e-2),alpha:r}}(function(e){var t=e.getText();if(t.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/))return parseFloat(t)%360;throw new Error}(r[0]),Ui(r[1],100),Ui(r[2],100),i)}catch(c){return null}}else if(e.type===ir.Identifier){if(e.parent&&e.parent.type!==ir.Term)return null;var o=e.parent;if(o&&o.parent&&o.parent.type===ir.BinaryExpression){var a=o.parent;if(a.parent&&a.parent.type===ir.ListEntry&&a.parent.key===a)return null}var s=e.getText().toLowerCase();if("none"===s)return null;var l=Li[s];if(l)return Bi(l)}return null}var qi={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},$i={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Gi={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Hi=["medium","thick","thin"],Yi={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Ji={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Xi={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Qi={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},Zi={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201cstart\u201d or \u201cend\u201d.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},eo={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},to={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},no=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],ro=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],io=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function oo(e){return Object.keys(e).map((function(t){return e[t]}))}function ao(e){return"undefined"!==typeof e}var so=function(){for(var e=0,t=0,n=arguments.length;te.offset?i-e.offset:0}return e},e.prototype.markError=function(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new xi(e,t,cr.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)},e.prototype.parseStylesheet=function(e){var t=e.version,n=e.getText();return this.internalParse(n,this._parseStylesheet,(function(r,i){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return n.substr(r,i)}))},e.prototype.internalParse=function(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();var r=t.bind(this)();return r&&(r.textProvider=n||function(t,n){return e.substr(t,n)}),r},e.prototype._parseStylesheet=function(){for(var e=this.create(ur);e.addChild(this._parseStylesheetStart()););var t=!1;do{var n=!1;do{n=!1;var r=this._parseStylesheetStatement();for(r&&(e.addChild(r),n=!0,t=!1,this.peek(sn.EOF)||!this._needsSemicolonAfter(r)||this.accept(sn.SemiColon)||this.markError(e,Di.SemiColonExpected));this.accept(sn.SemiColon)||this.accept(sn.CDO)||this.accept(sn.CDC);)n=!0,t=!1}while(n);if(this.peek(sn.EOF))break;t||(this.peek(sn.AtKeyword)?this.markError(e,Di.UnknownAtRule):this.markError(e,Di.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(sn.EOF));return this.finish(e)},e.prototype._parseStylesheetStart=function(){return this._parseCharset()},e.prototype._parseStylesheetStatement=function(e){return void 0===e&&(e=!1),this.peek(sn.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},e.prototype._parseStylesheetAtStatement=function(e){return void 0===e&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},e.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(sn.Comma)&&this._parseSelector(e););if(this.accept(sn.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},e.prototype._parseRuleset=function(e){void 0===e&&(e=!1);var t=this.create(gr),n=t.getSelectors();if(!n.addChild(this._parseSelector(e)))return null;for(;this.accept(sn.Comma);)if(!n.addChild(this._parseSelector(e)))return this.finish(t,Di.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseAtApply()||this._parseUnknownAtRule()},e.prototype._parseRuleSetDeclaration=function(){return this.peek(sn.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._tryParseCustomPropertyDeclaration()||this._parseDeclaration()},e.prototype._parseAtApply=function(){if(!this.peekKeyword("@apply"))return null;var e=this.create(yr);return this.consumeToken(),e.setIdentifier(this._parseIdent([or.Variable]))?this.finish(e):this.finish(e,Di.IdentifierExpected)},e.prototype._needsSemicolonAfter=function(e){switch(e.type){case ir.Keyframe:case ir.ViewPort:case ir.Media:case ir.Ruleset:case ir.Namespace:case ir.If:case ir.For:case ir.Each:case ir.While:case ir.MixinDeclaration:case ir.FunctionDeclaration:case ir.MixinContentDeclaration:return!1;case ir.ExtendsReference:case ir.MixinContentReference:case ir.ReturnStatement:case ir.MediaQuery:case ir.Debug:case ir.Import:case ir.AtApplyRule:case ir.CustomPropertyDeclaration:return!0;case ir.VariableDeclaration:return e.needsSemicolon;case ir.MixinReference:return!e.getContent();case ir.Declaration:return!e.getNestedProperties()}return!1},e.prototype._parseDeclarations=function(e){var t=this.create(mr);if(!this.accept(sn.CurlyL))return null;for(var n=e();t.addChild(n)&&!this.peek(sn.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(sn.SemiColon))return this.finish(t,Di.SemiColonExpected,[sn.SemiColon,sn.CurlyR]);for(n&&this.prevToken&&this.prevToken.type===sn.SemiColon&&(n.semicolonPosition=this.prevToken.offset);this.accept(sn.SemiColon););n=e()}return this.accept(sn.CurlyR)?this.finish(t):this.finish(t,Di.RightCurlyExpected,[sn.CurlyR,sn.SemiColon])},e.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,Di.LeftCurlyExpected,[sn.CurlyR,sn.SemiColon])},e.prototype._parseSelector=function(e){var t=this.create(br),n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)n=!0,t.addChild(this._parseCombinator());return n?this.finish(t):null},e.prototype._parseDeclaration=function(e){var t=this.create(kr);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(sn.Colon)){var n=e?so(e,[sn.SemiColon]):[sn.SemiColon];return this.finish(t,Di.ColonExpected,[sn.Colon],n)}return this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseExpr())?(t.addChild(this._parsePrio()),this.peek(sn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):this.finish(t,Di.PropertyValueExpected)},e.prototype._tryParseCustomPropertyDeclaration=function(){if(!this.peekRegExp(sn.Ident,/^--/))return null;var e=this.create(xr);if(!e.setProperty(this._parseProperty()))return null;if(!this.accept(sn.Colon))return this.finish(e,Di.ColonExpected,[sn.Colon]);this.prevToken&&(e.colonPosition=this.prevToken.offset);var t=this.mark();if(this.peek(sn.CurlyL)){var n=this.create(Sr),r=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(n.setDeclarations(r)&&!r.isErroneous(!0)&&(n.addChild(this._parsePrio()),this.peek(sn.SemiColon)))return this.finish(n),e.setPropertySet(n),e.semicolonPosition=this.token.offset,this.finish(e);this.restoreAtMark(t)}var i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peek(sn.SemiColon))?(e.setValue(i),e.semicolonPosition=this.token.offset,this.finish(e)):(this.restoreAtMark(t),e.addChild(this._parseCustomPropertyValue()),e.addChild(this._parsePrio()),ao(e.colonPosition)&&this.token.offset===e.colonPosition+1?this.finish(e,Di.PropertyValueExpected):this.finish(e))},e.prototype._parseCustomPropertyValue=function(){var e=this.create(dr),t=function(){return 0===n&&0===r&&0===i},n=0,r=0,i=0;e:for(;;){switch(this.token.type){case sn.SemiColon:case sn.Exclamation:if(t())break e;break;case sn.CurlyL:n++;break;case sn.CurlyR:if(--n<0){if(0===r&&0===i)break e;return this.finish(e,Di.LeftCurlyExpected)}break;case sn.ParenthesisL:r++;break;case sn.ParenthesisR:if(--r<0)return this.finish(e,Di.LeftParenthesisExpected);break;case sn.BracketL:i++;break;case sn.BracketR:if(--i<0)return this.finish(e,Di.LeftSquareBracketExpected);break;case sn.BadString:break e;case sn.EOF:var o=Di.RightCurlyExpected;return i>0?o=Di.RightSquareBracketExpected:r>0&&(o=Di.RightParenthesisExpected),this.finish(e,o)}this.consumeToken()}return this.finish(e)},e.prototype._tryToParseDeclaration=function(){var e=this.mark();return this._parseProperty()&&this.accept(sn.Colon)?(this.restoreAtMark(e),this._parseDeclaration()):(this.restoreAtMark(e),null)},e.prototype._parseProperty=function(){var e=this.create(Cr),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},e.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},e.prototype._parseCharset=function(){if(!this.peek(sn.Charset))return null;var e=this.create(dr);return this.consumeToken(),this.accept(sn.String)?this.accept(sn.SemiColon)?this.finish(e):this.finish(e,Di.SemiColonExpected):this.finish(e,Di.IdentifierExpected)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(Wr);return this.consumeToken(),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(sn.SemiColon)||this.peek(sn.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,Di.URIOrStringExpected)},e.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Kr);return this.consumeToken(),e.addChild(this._parseURILiteral())||(e.addChild(this._parseIdent()),e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral()))?this.accept(sn.SemiColon)?this.finish(e):this.finish(e,Di.SemiColonExpected):this.finish(e,Di.URIExpected,[sn.SemiColon])},e.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(Mr);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Ar);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseKeyframe=function(){if(!this.peekRegExp(sn.AtKeyword,this.keyframeRegex))return null;var e=this.create(Or),t=this.create(dr);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,Di.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,Di.IdentifierExpected,[sn.CurlyR])},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([or.Keyframe])},e.prototype._parseKeyframeSelector=function(){var e=this.create(Lr);if(!e.addChild(this._parseIdent())&&!this.accept(sn.Percentage))return null;for(;this.accept(sn.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(sn.Percentage))return this.finish(e,Di.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._tryParseKeyframeSelector=function(){var e=this.create(Lr),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(sn.Percentage))return null;for(;this.accept(sn.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(sn.Percentage))return this.restoreAtMark(t),null;return this.peek(sn.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},e.prototype._parseSupports=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create($r);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},e.prototype._parseSupportsDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseSupportsCondition=function(){var e=this.create(Jr);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(sn.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},e.prototype._parseSupportsConditionInParens=function(){var e=this.create(Jr);if(this.accept(sn.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),e.addChild(this._tryToParseDeclaration())||this._parseSupportsCondition()?this.accept(sn.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,Di.RightParenthesisExpected,[sn.ParenthesisR],[]):this.finish(e,Di.ConditionExpected);if(this.peek(sn.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(sn.ParenthesisL)){for(var n=1;this.token.type!==sn.EOF&&0!==n;)this.token.type===sn.ParenthesisL?n++:this.token.type===sn.ParenthesisR&&n--,this.consumeToken();return this.finish(e)}this.restoreAtMark(t)}return this.finish(e,Di.LeftParenthesisExpected,[],[sn.ParenthesisL])},e.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},e.prototype._parseMedia=function(e){if(void 0===e&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(qr);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,Di.MediaQueryExpected)},e.prototype._parseMediaQueryList=function(){var e=this.create(Hr);if(!e.addChild(this._parseMediaQuery([sn.CurlyL])))return this.finish(e,Di.MediaQueryExpected);for(;this.accept(sn.Comma);)if(!e.addChild(this._parseMediaQuery([sn.CurlyL])))return this.finish(e,Di.MediaQueryExpected);return this.finish(e)},e.prototype._parseMediaQuery=function(e){var t=this.create(Yr),n=!0,r=!1;if(!this.peek(sn.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!t.addChild(this._parseIdent()))return null;r=!0,n=this.acceptIdent("and")}for(;n;)if(t.addChild(this._parseMediaContentStart()))n=this.acceptIdent("and");else{if(!this.accept(sn.ParenthesisL))return r?this.finish(t,Di.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,Di.IdentifierExpected,[],e);if(this.accept(sn.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,Di.TermExpected,[],e);if(!this.accept(sn.ParenthesisR))return this.finish(t,Di.RightParenthesisExpected,[],e);n=this.acceptIdent("and")}return this.finish(t)},e.prototype._parseMediaContentStart=function(){return null},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()},e.prototype._parseMedium=function(){var e=this.create(dr);return e.addChild(this._parseIdent())?this.finish(e):null},e.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},e.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(Xr);if(this.consumeToken(),e.addChild(this._parsePageSelector()))for(;this.accept(sn.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,Di.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))},e.prototype._parsePageMarginBox=function(){if(!this.peek(sn.AtKeyword))return null;var e=this.create(Qr);return this.acceptOneKeyword(io)||this.markError(e,Di.UnknownAtRule,[],[sn.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parsePageSelector=function(){if(!this.peek(sn.Ident)&&!this.peek(sn.Colon))return null;var e=this.create(dr);return e.addChild(this._parseIdent()),this.accept(sn.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,Di.IdentifierExpected):this.finish(e)},e.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Gr);return this.consumeToken(),this.resync([],[sn.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},e.prototype._parseUnknownAtRule=function(){if(!this.peek(sn.AtKeyword))return null;var e=this.create(gi);e.addChild(this._parseUnknownAtRuleName());var t=0,n=0,r=0,i=0;e:for(;;){switch(this.token.type){case sn.SemiColon:if(0===n&&0===r&&0===i)break e;break;case sn.EOF:return n>0?this.finish(e,Di.RightCurlyExpected):i>0?this.finish(e,Di.RightSquareBracketExpected):r>0?this.finish(e,Di.RightParenthesisExpected):this.finish(e);case sn.CurlyL:t++,n++;break;case sn.CurlyR:if(n--,t>0&&0===n){if(this.consumeToken(),i>0)return this.finish(e,Di.RightSquareBracketExpected);if(r>0)return this.finish(e,Di.RightParenthesisExpected);break e}if(n<0){if(0===r&&0===i)break e;return this.finish(e,Di.LeftCurlyExpected)}break;case sn.ParenthesisL:r++;break;case sn.ParenthesisR:if(--r<0)return this.finish(e,Di.LeftParenthesisExpected);break;case sn.BracketL:i++;break;case sn.BracketR:if(--i<0)return this.finish(e,Di.LeftSquareBracketExpected)}this.consumeToken()}return e},e.prototype._parseUnknownAtRuleName=function(){var e=this.create(dr);return this.accept(sn.AtKeyword)?this.finish(e):e},e.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(sn.Dashmatch)||this.peek(sn.Includes)||this.peek(sn.SubstringOperator)||this.peek(sn.PrefixOperator)||this.peek(sn.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(ir.Operator);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(dr);return this.consumeToken(),this.finish(e)},e.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(dr);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=ir.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=ir.SelectorCombinatorParent,this.finish(e)}if(this.peekDelim("+")){e=this.create(dr);return this.consumeToken(),e.type=ir.SelectorCombinatorSibling,this.finish(e)}if(this.peekDelim("~")){e=this.create(dr);return this.consumeToken(),e.type=ir.SelectorCombinatorAllSiblings,this.finish(e)}if(this.peekDelim("/")){e=this.create(dr);this.consumeToken();t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=ir.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},e.prototype._parseSimpleSelector=function(){var e=this.create(vr),t=0;for(e.addChild(this._parseElementName())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},e.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},e.prototype._parseSelectorIdent=function(){return this._parseIdent()},e.prototype._parseHash=function(){if(!this.peek(sn.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(ir.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,Di.IdentifierExpected)}else this.consumeToken();return this.finish(e)},e.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(ir.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,Di.IdentifierExpected):this.finish(e)},e.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(ir.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),t.addChild(this._parseSelectorIdent())||this.acceptDelim("*")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(ir.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},e.prototype._parseAttrib=function(){if(!this.peek(sn.BracketL))return null;var e=this.create(ni);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(sn.BracketR)?this.finish(e):this.finish(e,Di.RightSquareBracketExpected)):this.finish(e,Di.IdentifierExpected)},e.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(sn.ParenthesisL)){if(t.addChild(this.try((function(){var t=e.create(dr);if(!t.addChild(e._parseSelector(!1)))return null;for(;e.accept(sn.Comma)&&t.addChild(e._parseSelector(!1)););return e.peek(sn.ParenthesisR)?e.finish(t):null}))||this._parseBinaryExpr()),!this.accept(sn.ParenthesisR))return this.finish(t,Di.RightParenthesisExpected)}return this.finish(t)}return null},e.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(sn.Colon))return null;var e=this.mark(),t=this.createNode(ir.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(sn.Colon)&&this.hasWhitespace()&&this.markError(t,Di.IdentifierExpected),t.addChild(this._parseIdent())||this.markError(t,Di.IdentifierExpected),t)},e.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},e.prototype._parsePrio=function(){if(!this.peek(sn.Exclamation))return null;var e=this.createNode(ir.Prio);return this.accept(sn.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},e.prototype._parseExpr=function(e){void 0===e&&(e=!1);var t=this.create(Zr);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(sn.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},e.prototype._parseNamedLine=function(){if(!this.peek(sn.BracketL))return null;var e=this.createNode(ir.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(sn.BracketR)?this.finish(e):this.finish(e,Di.RightSquareBracketExpected)},e.prototype._parseBinaryExpr=function(e,t){var n=this.create(ei);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,Di.TermExpected);n=this.finish(n);var r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)},e.prototype._parseTerm=function(){var e=this.create(ti);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},e.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},e.prototype._parseOperation=function(){if(!this.peek(sn.ParenthesisL))return null;var e=this.create(dr);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(sn.ParenthesisR)?this.finish(e):this.finish(e,Di.RightParenthesisExpected)},e.prototype._parseNumeric=function(){if(this.peek(sn.Num)||this.peek(sn.Percentage)||this.peek(sn.Resolution)||this.peek(sn.Length)||this.peek(sn.EMS)||this.peek(sn.EXS)||this.peek(sn.Angle)||this.peek(sn.Time)||this.peek(sn.Dimension)||this.peek(sn.Freq)){var e=this.create(si);return this.consumeToken(),this.finish(e)}return null},e.prototype._parseStringLiteral=function(){if(!this.peek(sn.String)&&!this.peek(sn.BadString))return null;var e=this.createNode(ir.StringLiteral);return this.consumeToken(),this.finish(e)},e.prototype._parseURILiteral=function(){if(!this.peekRegExp(sn.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(ir.URILiteral);return this.accept(sn.Ident),this.hasWhitespace()||!this.peek(sn.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(sn.ParenthesisR)?this.finish(t):this.finish(t,Di.RightParenthesisExpected))},e.prototype._parseURLArgument=function(){var e=this.create(dr);return this.accept(sn.String)||this.accept(sn.BadString)||this.acceptUnquotedString()?this.finish(e):null},e.prototype._parseIdent=function(e){if(!this.peek(sn.Ident))return null;var t=this.create(pr);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(sn.Ident,/^--/),this.consumeToken(),this.finish(t)},e.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Er);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(sn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,Di.ExpressionExpected);return this.accept(sn.ParenthesisR)?this.finish(t):this.finish(t,Di.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(!this.peek(sn.Ident))return null;var e=this.create(pr);if(e.referenceTypes=[or.Function],this.acceptIdent("progid")){if(this.accept(sn.Colon))for(;this.accept(sn.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},e.prototype._parseFunctionArgument=function(){var e=this.create(Fr);return e.setValue(this._parseExpr(!0))?this.finish(e):null},e.prototype._parseHexColor=function(){if(this.peekRegExp(sn.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(ri);return this.consumeToken(),this.finish(e)}return null},e}();function co(e,t){return-1!==e.indexOf(t)}function ho(){for(var e=[],t=0;te+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},e.prototype.findInScope=function(e,t){void 0===t&&(t=0);var n=e+t,r=function(e,t){var n=0,r=e.length;if(0===r)return 0;for(;nn}));if(0===r)return this;var i=this.children[r-1];return i.offset<=e&&i.offset+i.length>=e+t?i.findInScope(e,t):this},e.prototype.addSymbol=function(e){this.symbols.push(e)},e.prototype.getSymbol=function(e,t){for(var n=0;n0&&(i.arguments=n),i},e.is=function(e){var t=e;return ba.defined(t)&&ba.string(t.title)&&ba.string(t.command)}}(Do||(Do={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ba.objectLiteral(t)&&ba.string(t.newText)&&mo.is(t.range)}}(To||(To={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ba.defined(t)&&Vo.is(t.textDocument)&&Array.isArray(t.edits)}}(Ro||(Ro={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ba.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ba.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ba.boolean(t.options.ignoreIfExists)))}}(No||(No={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ba.string(t.oldUri)&&ba.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ba.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ba.boolean(t.options.ignoreIfExists)))}}(zo||(zo={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ba.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ba.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ba.boolean(t.options.ignoreIfNotExists)))}}(Io||(Io={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ba.string(e.kind)?No.is(e)||zo.is(e)||Io.is(e):Ro.is(e)})))}}(Ao||(Ao={}));var jo,Vo,Bo,Ko,qo,$o,Go,Ho,Yo,Jo,Xo,Qo,Zo,ea,ta,na,ra,ia,oa,aa,sa,la,ca,da,ha,pa,ua,ma,fa=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(To.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(To.replace(e,t))},e.prototype.delete=function(e){this.edits.push(To.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(Ro.is(e)){var n=new fa(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new fa(e.changes[n]);t._textEditChanges[n]=r})))}Object.defineProperty(e.prototype,"edit",{get:function(){return void 0===this._workspaceEdit?{documentChanges:[]}:this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(Vo.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new fa(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new fa(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(No.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(zo.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Io.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ba.defined(t)&&ba.string(t.uri)}}(jo||(jo={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ba.defined(t)&&ba.string(t.uri)&&(null===t.version||ba.number(t.version))}}(Vo||(Vo={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return ba.defined(t)&&ba.string(t.uri)&&ba.string(t.languageId)&&ba.number(t.version)&&ba.string(t.text)}}(Bo||(Bo={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(Ko||(Ko={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(Ko||(Ko={})),function(e){e.is=function(e){var t=e;return ba.objectLiteral(e)&&Ko.is(t.kind)&&ba.string(t.value)}}(qo||(qo={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}($o||($o={})),function(e){e.PlainText=1,e.Snippet=2}(Go||(Go={})),function(e){e.Deprecated=1}(Ho||(Ho={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&ba.string(t.newText)&&mo.is(t.insert)&&mo.is(t.replace)}}(Yo||(Yo={})),function(e){e.create=function(e){return{label:e}}}(Jo||(Jo={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Xo||(Xo={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ba.string(t)||ba.objectLiteral(t)&&ba.string(t.language)&&ba.string(t.value)}}(Qo||(Qo={})),function(e){e.is=function(e){var t=e;return!!t&&ba.objectLiteral(t)&&(qo.is(t.contents)||Qo.is(t.contents)||ba.typedArray(t.contents,Qo.is))&&(void 0===e.range||mo.is(e.range))}}(Zo||(Zo={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(ea||(ea={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;o--){var a=r[o],s=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=i))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(l,n.length),i=s}return n}}(ga||(ga={}));var ba,va=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return po.create(0,e);for(;ne?r=i:n=i+1}var o=n-1;return po.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1e?r=i:n=i+1}var o=n-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ea(e){var t=Ca(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Sa(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Sa)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,i=[],o=0,a=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,i=t.slice(0,r),o=t.slice(r);e(i,n),e(o,n);var a=0,s=0,l=0;for(;ar&&i.push(n.substring(r,l)),s.newText.length&&i.push(s.newText),r=e.offsetAt(s.range.end)}return i.push(n.substr(r)),i.join("")}}(ya||(ya={})),(wa||(wa={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ko.Markdown,Ko.PlainText]}},hover:{contentFormat:[Ko.Markdown,Ko.PlainText]}}},function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(xa||(xa={}));var _a=n(3),Fa="/".charCodeAt(0),Da=".".charCodeAt(0);function Ta(e){var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t):""}function Ra(e){for(var t=[],n=0,r=e;n1&&0===e[e.length-1].length&&t.push("");var o=t.join("/");return 0===e[0].length&&(o="/"+o),o}function Na(e){for(var t=[],n=1;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0&&-1===' \t\n\r":{[()]},*>+'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}(e,this.offset),this.defaultReplaceRange=mo.create(po.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=n;try{var r={isIncomplete:!1,items:[]};this.nodePath=lr(this.styleSheet,this.offset);for(var i=this.nodePath.length-1;i>=0;i--){var o=this.nodePath[i];if(o instanceof Cr)this.getCompletionsForDeclarationProperty(o.getParent(),r);else if(o instanceof Zr)o.parent instanceof ci?this.getVariableProposals(null,r):this.getCompletionsForExpression(o,r);else if(o instanceof vr){var a=o.findAParent(ir.ExtendsReference,ir.Ruleset);if(a)if(a.type===ir.ExtendsReference)this.getCompletionsForExtendsReference(a,o,r);else{var s=a;this.getCompletionsForSelector(s,s&&s.isNested(),r)}}else if(o instanceof Fr)this.getCompletionsForFunctionArgument(o,o.getParent(),r);else if(o instanceof mr)this.getCompletionsForDeclarations(o,r);else if(o instanceof li)this.getCompletionsForVariableDeclaration(o,r);else if(o instanceof gr)this.getCompletionsForRuleSet(o,r);else if(o instanceof ci)this.getCompletionsForInterpolation(o,r);else if(o instanceof Ir)this.getCompletionsForFunctionDeclaration(o,r);else if(o instanceof mi)this.getCompletionsForMixinReference(o,r);else if(o instanceof Er)this.getCompletionsForFunctionArgument(null,o,r);else if(o instanceof $r)this.getCompletionsForSupports(o,r);else if(o instanceof Jr)this.getCompletionsForSupportsCondition(o,r);else if(o instanceof hi)this.getCompletionsForExtendsReference(o,null,r);else if(o.type===ir.URILiteral)this.getCompletionForUriLiteralValue(o,r);else if(null===o.parent)this.getCompletionForTopLevel(r);else{if(o.type!==ir.StringLiteral||!this.isImportPathParent(o.parent.type))continue;this.getCompletionForImportPath(o,r)}if(r.items.length>0||this.offset>o.offset)return this.finalize(r)}return this.getCompletionsForStylesheet(r),0===r.items.length&&this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&this.getVariableProposals(null,r),this.finalize(r)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},e.prototype.isImportPathParent=function(e){return e===ir.Import},e.prototype.finalize=function(e){return e},e.prototype.findInNodePath=function(){for(var e=[],t=0;t=0;n--){var r=this.nodePath[n];if(-1!==e.indexOf(r.type))return r}return null},e.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},e.prototype.getPropertyProposals=function(e,t){var n=this,r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach((function(o){var a,s,l=!1;e?(a=n.getCompletionRange(e.getProperty()),s=o.name,ao(e.colonPosition)||(s+=": ",l=!0)):(a=n.getCompletionRange(null),s=o.name+": ",l=!0),!e&&i&&(s+="$0;"),e&&!e.semicolonPosition&&i&&n.offset>=n.textDocument.offsetAt(a.end)&&(s+="$0;");var c={label:o.name,documentation:Ni(o,n.doesSupportMarkdown()),tags:$a(o)?[Ho.Deprecated]:[],textEdit:To.replace(a,s),insertTextFormat:Go.Snippet,kind:$o.Property};o.restrictions||(l=!1),r&&l&&(c.command={title:"Suggest",command:"editor.action.triggerSuggest"});var d=(255-("number"===typeof o.relevance?Math.min(Math.max(o.relevance,0),99):50)).toString(16),h=tr(o.name,"-")?Ua.VendorPrefixed:Ua.Normal;c.sortText=h+"_"+d,t.items.push(c)})),this.completionParticipants.forEach((function(e){e.onCssProperty&&e.onCssProperty({propertyName:n.currentWord,range:n.defaultReplaceRange})})),t},Object.defineProperty(e.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){return!this.settings||!this.settings.completion||void 0===this.settings.completion.triggerPropertyValueCompletion||this.settings.completion.triggerPropertyValueCompletion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){return!this.settings||!this.settings.completion||void 0===this.settings.completion.completePropertyWithSemicolon||this.settings.completion.completePropertyWithSemicolon},enumerable:!0,configurable:!0}),e.prototype.getCompletionsForDeclarationValue=function(e,t){for(var n=this,r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r),o=e.getValue()||null;o&&o.hasChildren();)o=o.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach((function(e){e.onCssPropertyValue&&e.onCssPropertyValue({propertyName:r,propertyValue:n.currentWord,range:n.getCompletionRange(o)})})),i){if(i.restrictions)for(var a=0,s=i.restrictions;a=e.offset+2&&this.getVariableProposals(null,t),t},e.prototype.getVariableProposals=function(e,t){for(var n=0,r=this.getSymbolContext().findSymbolsAtOffset(this.offset,or.Variable);n0){var i=this.currentWord.match(/^-?\d[\.\d+]*/);i&&(r=i[0],n.isIncomplete=r.length===this.currentWord.length)}else 0===this.currentWord.length&&(n.isIncomplete=!0);if(t&&t.parent&&t.parent.type===ir.Term&&(t=t.getParent()),e.restrictions)for(var o=0,a=e.restrictions;o=n.end?this.getCompletionForTopLevel(t):!n||this.offset<=n.offset?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},e.prototype.getCompletionsForSelector=function(e,t,n){var r=this,i=this.findInNodePath(ir.PseudoSelector,ir.IdentifierSelector,ir.ClassSelector,ir.ElementNameSelector);if(!i&&this.offset-this.currentWord.length>0&&":"===this.textDocument.getText()[this.offset-this.currentWord.length-1]&&(this.currentWord=":"+this.currentWord,this.defaultReplaceRange=mo.create(po.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach((function(e){var t=Ha(e.name),o={label:e.name,textEdit:To.replace(r.getCompletionRange(i),t),documentation:Ni(e,r.doesSupportMarkdown()),tags:$a(e)?[Ho.Deprecated]:[],kind:$o.Function,insertTextFormat:e.name!==t?Ka:void 0};tr(e.name,":-")&&(o.sortText=Ua.VendorPrefixed),n.items.push(o)})),this.cssDataManager.getPseudoElements().forEach((function(e){var t=Ha(e.name),o={label:e.name,textEdit:To.replace(r.getCompletionRange(i),t),documentation:Ni(e,r.doesSupportMarkdown()),tags:$a(e)?[Ho.Deprecated]:[],kind:$o.Function,insertTextFormat:e.name!==t?Ka:void 0};tr(e.name,"::-")&&(o.sortText=Ua.VendorPrefixed),n.items.push(o)})),!t){for(var o=0,a=no;o0){var t=h.substr(e.offset,e.length);return"."!==t.charAt(0)||d[t]||(d[t]=!0,n.items.push({label:t,textEdit:To.replace(r.getCompletionRange(i),t),kind:$o.Keyword})),!1}return!0})),e&&e.isNested()){var p=e.getSelectors().findFirstChildBeforeOffset(this.offset);p&&0===e.getSelectors().getChildren().indexOf(p)&&this.getPropertyProposals(null,n)}return n},e.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var n=e.findFirstChildBeforeOffset(this.offset);if(!n)return this.getCompletionsForDeclarationProperty(null,t);if(n instanceof wr){var r=n;if(!ao(r.colonPosition)||this.offset<=r.colonPosition)return this.getCompletionsForDeclarationProperty(r,t);if(ao(r.semicolonPosition)&&r.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),t),t},e.prototype.getCompletionsForExpression=function(e,t){var n=e.getParent();if(n instanceof Fr)return this.getCompletionsForFunctionArgument(n,n.getParent(),t),t;var r=e.findParent(ir.Declaration);if(!r)return this.getTermProposals(void 0,null,t),t;var i=e.findChildAtOffset(this.offset,!0);return i?i instanceof si||i instanceof pr?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)},e.prototype.getCompletionsForFunctionArgument=function(e,t,n){var r=t.getIdentifier();return r&&r.matches("var")&&(t.getArguments().hasChildren()&&t.getArguments().getChild(0)!==e||this.getVariableProposalsForCSSVarFunction(n)),n},e.prototype.getCompletionsForFunctionDeclaration=function(e,t){var n=e.getDeclarations();return n&&this.offset>n.offset&&this.offsete.lParent&&(!ao(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},e.prototype.getCompletionsForSupports=function(e,t){var n=e.getDeclarations();if(!n||this.offset<=n.offset){var r=e.findFirstChildBeforeOffset(this.offset);return r instanceof Jr?this.getCompletionsForSupportsCondition(r,t):t}return this.getCompletionForTopLevel(t)},e.prototype.getCompletionsForExtendsReference=function(e,t,n){return n},e.prototype.getCompletionForUriLiteralValue=function(e,t){var n,r,i;if(e.hasChildren()){var o=e.getChild(0);n=o.getText(),r=this.position,i=this.getCompletionRange(o)}else{n="",r=this.position;var a=this.textDocument.positionAt(e.offset+"url(".length);i=mo.create(a,a)}return this.completionParticipants.forEach((function(e){e.onCssURILiteralValue&&e.onCssURILiteralValue({uriValue:n,position:r,range:i})})),t},e.prototype.getCompletionForImportPath=function(e,t){var n=this;return this.completionParticipants.forEach((function(t){t.onCssImportPath&&t.onCssImportPath({pathValue:e.getText(),position:n.position,range:n.getCompletionRange(e)})})),t},e.prototype.doesSupportMarkdown=function(){var e,t,n;if(!ao(this.supportsMarkdown)){if(!ao(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var r=null===(n=null===(t=null===(e=this.lsOptions.clientCapabilities.textDocument)||void 0===e?void 0:e.completion)||void 0===t?void 0:t.completionItem)||void 0===n?void 0:n.documentationFormat;this.supportsMarkdown=Array.isArray(r)&&-1!==r.indexOf(Ko.Markdown)}return this.supportsMarkdown},e}();function $a(e){return!(!e.status||"nonstandard"!==e.status&&"obsolete"!==e.status)}var Ga=function(){function e(){this.entries={}}return e.prototype.add=function(e){this.entries[e]=!0},e.prototype.getEntries=function(){return Object.keys(this.entries)},e}();function Ha(e){return e.replace(/\(\)$/,"($1)")}var Ya=function(){function e(e,t){this.entries=e,this.currentOffset=t}return e.prototype.visitNode=function(e){return(e instanceof ri||e instanceof Er&&ji(e))&&(this.currentOffset"),this.writeLine(t,r.join(""))}},e}();!function(e){function t(e){var t=e.match(/^['"](.*)["']$/);return t?t[1]:e}e.ensure=function(e,n){return n+t(e)+n},e.remove=t}(Xa||(Xa={}));var is=function(){this.id=0,this.attr=0,this.tag=0};function os(e,t){for(var n=new es,r=0,i=e.getChildren();r1){var l=t.cloneWithParent();n.addChild(l.findRoot()),n=l}n.append(a[s])}}break;case ir.SelectorPlaceholder:if(o.matches("@at-root"))return n;case ir.ElementNameSelector:var c=o.getText();n.addAttr("name","*"===c?"element":as(c));break;case ir.ClassSelector:n.addAttr("class",as(o.getText().substring(1)));break;case ir.IdentifierSelector:n.addAttr("id",as(o.getText().substring(1)));break;case ir.MixinDeclaration:n.addAttr("class",o.getName());break;case ir.PseudoSelector:n.addAttr(as(o.getText()),"");break;case ir.AttributeSelector:var d=o,h=d.getIdentifier();if(h){var p=d.getValue(),u=d.getOperator(),m=void 0;if(p&&u)switch(as(u.getText())){case"|=":m=Xa.remove(as(p.getText()))+"-\u2026";break;case"^=":m=Xa.remove(as(p.getText()))+"\u2026";break;case"$=":m="\u2026"+Xa.remove(as(p.getText()));break;case"~=":m=" \u2026 "+Xa.remove(as(p.getText()))+" \u2026 ";break;case"*=":m="\u2026"+Xa.remove(as(p.getText()))+"\u2026";break;default:m=Xa.remove(as(p.getText()))}n.addAttr(as(h.getText()),m)}}}return n}function as(e){var t=new er;t.setSource(e);var n=t.scanUnquotedString();return n?n.text:e}var ss=function(){function e(e){this.cssDataManager=e}return e.prototype.selectorToMarkedString=function(e){var t=function(e){if(e.matches("@at-root"))return null;var t=new ts,n=[],r=e.getParent();if(r instanceof gr)for(var i=r.getParent();i&&!cs(i);){if(i instanceof gr){if(i.getSelectors().matches("@at-root"))break;n.push(i)}i=i.getParent()}for(var o=new ls(t),a=n.length-1;a>=0;a--){var s=n[a].getSelectors().getChild(0);s&&o.processSelector(s)}return o.processSelector(e),t}(e);if(t){var n=new rs('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n}return[]},e.prototype.simpleSelectorToMarkedString=function(e){var t=os(e),n=new rs('"').print(t);return n.push(this.selectorToSpecificityMarkedString(e)),n},e.prototype.isPseudoElementIdentifier=function(e){var t=e.match(/^::?([\w-]+)/);return!!t&&!!this.cssDataManager.getPseudoElement("::"+t[1])},e.prototype.selectorToSpecificityMarkedString=function(e){var t=this,n=new is;return function e(r){for(var i=0,o=r.getChildren();i0&&e(a)}}(e),Za("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",n.id,n.attr,n.tag)},e}(),ls=function(){function e(e){this.prev=null,this.element=e}return e.prototype.processSelector=function(e){var t=null;if(!(this.element instanceof ts)&&e.getChildren().some((function(e){return e.hasChildren()&&e.getChild(0).type===ir.SelectorCombinator}))){var n=this.element.findRoot();n.parent instanceof ts&&(t=this.element,this.element=n.parent,this.element.removeChild(n),this.prev=null)}for(var r=0,i=e.getChildren();r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),o){case t:s=(n-r)/d+(nn)return 0;var i,o,a=[],s=[];for(i=0;i=i.length/2&&o.push({property:e.name,score:t})})),o.sort((function(e,t){return t.score-e.score||e.property.localeCompare(t.property)}));for(var a=3,s=0,l=o;s=0;s--){var l=a[s];if(l instanceof kr){var c=l.getProperty();if(c&&c.offset===i&&c.end===o)return void this.getFixesForUnknownProperty(e,c,n,r)}}},e}(),Ts=function(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e};function Rs(e,t,n,r){var i=e[t];i.value=n,n&&(co(i.properties,r)||i.properties.push(r))}function Ns(e,t,n,r){"top"===t||"right"===t||"bottom"===t||"left"===t?Rs(e,t,n,r):function(e,t,n){Rs(e,"top",t,n),Rs(e,"right",t,n),Rs(e,"bottom",t,n),Rs(e,"left",t,n)}(e,n,r)}function zs(e,t,n){switch(t.length){case 1:Ns(e,void 0,t[0],n);break;case 2:Ns(e,"top",t[0],n),Ns(e,"bottom",t[0],n),Ns(e,"right",t[1],n),Ns(e,"left",t[1],n);break;case 3:Ns(e,"top",t[0],n),Ns(e,"right",t[1],n),Ns(e,"left",t[1],n),Ns(e,"bottom",t[2],n);break;case 4:Ns(e,"top",t[0],n),Ns(e,"right",t[1],n),Ns(e,"bottom",t[2],n),Ns(e,"left",t[3],n)}}function Is(e,t){for(var n=0,r=t;n0)for(var m=0,f=["width","height","margin-top","margin-bottom","float"];m0)for(b=this.fetch(r,"float"),v=0;v0)for(b=this.fetch(r,"vertical-align"),v=0;v1)for(var _=0;_")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(ir.Operator);return this.consumeToken(),this.finish(t)}return e.prototype._parseOperator.call(this)},t.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(dr);return this.consumeToken(),this.finish(t)}return e.prototype._parseUnaryOperator.call(this)},t.prototype._parseRuleSetDeclaration=function(){return this.peek(sn.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseDeclaration=function(e){var t=this.create(kr);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(sn.Colon))return this.finish(t,Di.ColonExpected,[sn.Colon],e);this.prevToken&&(t.colonPosition=this.prevToken.offset);var n=!1;if(t.setValue(this._parseExpr())&&(n=!0,t.addChild(this._parsePrio())),this.peek(sn.CurlyL))t.setNestedProperties(this._parseNestedProperties());else if(!n)return this.finish(t,Di.PropertyValueExpected);return this.peek(sn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseNestedProperties=function(){var e=this.create(Pr);return this._parseBody(e,this._parseDeclaration.bind(this))},t.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var e=this.create(hi);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,Di.SelectorExpected);for(;this.accept(sn.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(sn.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,Di.UnknownKeyword):this.finish(e)}return null},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(ir.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(sn.Num)||this.accept(sn.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null},t.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var e=this.createNode(ir.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}if(this.peekKeyword("@at-root")){e=this.createNode(ir.SelectorPlaceholder);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseElementName=function(){var t=this.mark(),n=e.prototype._parseElementName.call(this);return n&&!this.hasWhitespace()&&this.peek(sn.ParenthesisL)?(this.restoreAtMark(t),null):n},t.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||e.prototype._tryParsePseudoIdentifier.call(this)},t.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var e=this.createNode(ir.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)},t.prototype._parseControlStatement=function(e){return void 0===e&&(e=this._parseRuleSetDeclaration.bind(this)),this.peek(sn.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null},t.prototype._parseIfStatement=function(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null},t.prototype._internalParseIfStatement=function(e){var t=this.create(Dr);if(this.consumeToken(),!t.setExpression(this._parseExpr(!0)))return this.finish(t,Di.ExpressionExpected);if(this._parseBody(t,e),this.acceptKeyword("@else"))if(this.peekIdent("if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(sn.CurlyL)){var n=this.create(zr);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)},t.prototype._parseForStatement=function(e){if(!this.peekKeyword("@for"))return null;var t=this.create(Tr);return this.consumeToken(),t.setVariable(this._parseVariable())?this.acceptIdent("from")?t.addChild(this._parseBinaryExpr())?this.acceptIdent("to")||this.acceptIdent("through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Di.ExpressionExpected,[sn.CurlyR]):this.finish(t,ul.ThroughOrToExpected,[sn.CurlyR]):this.finish(t,Di.ExpressionExpected,[sn.CurlyR]):this.finish(t,ul.FromExpected,[sn.CurlyR]):this.finish(t,Di.VariableNameExpected,[sn.CurlyR])},t.prototype._parseEachStatement=function(e){if(!this.peekKeyword("@each"))return null;var t=this.create(Rr);this.consumeToken();var n=t.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(t,Di.VariableNameExpected,[sn.CurlyR]);for(;this.accept(sn.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(t,Di.VariableNameExpected,[sn.CurlyR]);return this.finish(n),this.acceptIdent("in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,Di.ExpressionExpected,[sn.CurlyR]):this.finish(t,ul.InExpected,[sn.CurlyR])},t.prototype._parseWhileStatement=function(e){if(!this.peekKeyword("@while"))return null;var t=this.create(Nr);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,Di.ExpressionExpected,[sn.CurlyR])},t.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},t.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var e=this.create(Ir);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([or.Function])))return this.finish(e,Di.IdentifierExpected,[sn.CurlyR]);if(!this.accept(sn.ParenthesisL))return this.finish(e,Di.LeftParenthesisExpected,[sn.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Di.VariableNameExpected);return this.accept(sn.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,Di.RightParenthesisExpected,[sn.CurlyR])},t.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var e=this.createNode(ir.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,Di.ExpressionExpected)},t.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var e=this.create(fi);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([or.Mixin])))return this.finish(e,Di.IdentifierExpected,[sn.CurlyR]);if(this.accept(sn.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Di.VariableNameExpected);if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected,[sn.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseParameterDeclaration=function(){var e=this.create(_r);return e.setIdentifier(this._parseVariable())?(this.accept(cl),this.accept(sn.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,Di.VariableValueExpected,[],[sn.Comma,sn.ParenthesisR]):this.finish(e)):null},t.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var e=this.create(pi);if(this.consumeToken(),this.accept(sn.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Di.ExpressionExpected);if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected)}return this.finish(e)},t.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var e=this.create(mi);this.consumeToken();var t=this._parseIdent([or.Mixin]);if(!e.setIdentifier(t))return this.finish(e,Di.IdentifierExpected,[sn.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([or.Mixin]);if(!n)return this.finish(e,Di.IdentifierExpected,[sn.CurlyR]);var r=this.create(wi);t.referenceTypes=[or.Module],r.setIdentifier(t),e.setIdentifier(n),e.addChild(r)}if(this.accept(sn.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,Di.ExpressionExpected);if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(sn.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)},t.prototype._parseMixinContentDeclaration=function(){var e=this.create(ui);if(this.acceptIdent("using")){if(!this.accept(sn.ParenthesisL))return this.finish(e,Di.LeftParenthesisExpected,[sn.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,Di.VariableNameExpected);if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected,[sn.CurlyL])}return this.peek(sn.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)},t.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._parseFunctionArgument=function(){var e=this.create(Fr),t=this.mark(),n=this._parseVariable();if(n)if(this.accept(sn.Colon))e.setIdentifier(n);else{if(this.accept(cl))return e.setValue(n),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?(this.accept(cl),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(sn.ParenthesisR)){this.restoreAtMark(t);var r=this.create(dr);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n},t.prototype._parseOperation=function(){if(!this.peek(sn.ParenthesisL))return null;var e=this.create(dr);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(sn.Comma);return this.accept(sn.ParenthesisR)?this.finish(e):this.finish(e,Di.RightParenthesisExpected)},t.prototype._parseListElement=function(){var e=this.create(bi),t=this._parseBinaryExpr();if(!t)return null;if(this.accept(sn.Colon)){if(e.setKey(t),!e.setValue(this._parseBinaryExpr()))return this.finish(e,Di.ExpressionExpected)}else e.setValue(t);return this.finish(e)},t.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var e=this.create(Ur);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Di.StringLiteralExpected);if(!this.peek(sn.SemiColon)&&!this.peek(sn.EOF)){if(!this.peekRegExp(sn.Ident,/as|with/))return this.finish(e,Di.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([or.Module]))&&!this.acceptDelim("*"))return this.finish(e,Di.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(sn.ParenthesisL))return this.finish(e,Di.LeftParenthesisExpected,[sn.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Di.VariableNameExpected);for(;this.accept(sn.Comma)&&!this.peek(sn.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,Di.VariableNameExpected);if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected)}}return this.accept(sn.SemiColon)||this.accept(sn.EOF)?this.finish(e):this.finish(e,Di.SemiColonExpected)},t.prototype._parseModuleConfigDeclaration=function(){var e=this.create(jr);return e.setIdentifier(this._parseVariable())?this.accept(sn.Colon)&&e.setValue(this._parseExpr(!0))?this.finish(e):this.finish(e,Di.VariableValueExpected,[],[sn.Comma,sn.ParenthesisR]):null},t.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var e=this.create(Vr);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,Di.StringLiteralExpected);if(!this.peek(sn.SemiColon)&&!this.peek(sn.EOF)){if(!this.peekRegExp(sn.Ident,/as|hide|show/))return this.finish(e,Di.UnknownKeyword);if(this.acceptIdent("as")){var t=this._parseIdent([or.Forward]);if(!e.setIdentifier(t))return this.finish(e,Di.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,Di.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,Di.IdentifierOrVariableExpected)}return this.accept(sn.SemiColon)||this.accept(sn.EOF)?this.finish(e):this.finish(e,Di.SemiColonExpected)},t.prototype._parseForwardVisibility=function(){var e=this.create(Br);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent()););return e.getChildren().length>1?e:null},t.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||e.prototype._parseSupportsCondition.call(this)},t}(lo),gl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bl=Ei(),vl=function(e){function t(n,r){var i=e.call(this,"$",n,r)||this;return yl(t.scssModuleLoaders),yl(t.scssModuleBuiltIns),i}return gl(t,e),t.prototype.isImportPathParent=function(t){return t===ir.Forward||t===ir.Use||e.prototype.isImportPathParent.call(this,t)},t.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===ir.Forward||i===ir.Use)for(var o=0,a=t.scssModuleBuiltIns;o0){var t="string"===typeof e.documentation?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+="\n\n",t.value+=e.references.map((function(e){return"["+e.name+"]("+e.url+")"})).join(" | "),e.documentation=t}}))}var wl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xl="/".charCodeAt(0),Sl="\n".charCodeAt(0),kl="\r".charCodeAt(0),Cl="\f".charCodeAt(0),El="`".charCodeAt(0),_l=".".charCodeAt(0),Fl=sn.CustomToken,Dl=Fl++,Tl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wl(t,e),t.prototype.scanNext=function(t){var n=this.escapedJavaScript();return null!==n?this.finishToken(t,n):this.stream.advanceIfChars([_l,_l,_l])?this.finishToken(t,Dl):e.prototype.scanNext.call(this,t)},t.prototype.comment=function(){return!!e.prototype.comment.call(this)||!(this.inURL||!this.stream.advanceIfChars([xl,xl]))&&(this.stream.advanceWhileChar((function(e){switch(e){case Sl:case kl:case Cl:return!1;default:return!0}})),!0)},t.prototype.escapedJavaScript=function(){return this.stream.peekChar()===El?(this.stream.advance(1),this.stream.advanceWhileChar((function(e){return e!==El})),this.stream.advanceIfChar(El)?sn.EscapedJavaScript:sn.BadEscapedJavaScript):null},t}(er),Rl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nl=function(e){function t(){return e.call(this,new Tl)||this}return Rl(t,e),t.prototype._parseStylesheetStatement=function(t){return void 0===t&&(t=!1),this.peek(sn.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||e.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var e=this.create(Wr);if(this.consumeToken(),this.accept(sn.ParenthesisL)){if(!this.accept(sn.Ident))return this.finish(e,Di.IdentifierExpected,[sn.SemiColon]);do{if(!this.accept(sn.Comma))break}while(this.accept(sn.Ident));if(!this.accept(sn.ParenthesisR))return this.finish(e,Di.RightParenthesisExpected,[sn.SemiColon])}return e.addChild(this._parseURILiteral())||e.addChild(this._parseStringLiteral())?(this.peek(sn.SemiColon)||this.peek(sn.EOF)||e.setMedialist(this._parseMediaQueryList()),this.finish(e)):this.finish(e,Di.URIOrStringExpected,[sn.SemiColon])},t.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var e=this.createNode(ir.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(sn.SemiColon)?this.finish(e):this.finish(e,Di.SemiColonExpected):this.finish(e,Di.StringLiteralExpected)},t.prototype._parseMediaQuery=function(t){var n=e.prototype._parseMediaQuery.call(this,t);if(!n){var r=this.create(Yr);return r.addChild(this._parseVariable())?this.finish(r):null}return n},t.prototype._parseMediaDeclaration=function(e){return void 0===e&&(e=!1),this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},t.prototype._parseVariableDeclaration=function(e){void 0===e&&(e=[]);var t=this.create(li),n=this.mark();if(!t.setVariable(this._parseVariable(!0)))return null;if(!this.accept(sn.Colon))return this.restoreAtMark(n),null;if(this.prevToken&&(t.colonPosition=this.prevToken.offset),t.setValue(this._parseDetachedRuleSet()))t.needsSemicolon=!1;else if(!t.setValue(this._parseExpr()))return this.finish(t,Di.VariableValueExpected,[],e);return t.addChild(this._parsePrio()),this.peek(sn.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseDetachedRuleSet=function(){var e=this.mark();if(this.peekDelim("#")||this.peekDelim(".")){if(this.consumeToken(),this.hasWhitespace()||!this.accept(sn.ParenthesisL))return this.restoreAtMark(e),null;var t=this.create(fi);if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(sn.Comma)||this.accept(sn.SemiColon))&&!this.peek(sn.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Di.IdentifierExpected,[],[sn.ParenthesisR]);if(!this.accept(sn.ParenthesisR))return this.restoreAtMark(e),null}if(!this.peek(sn.CurlyL))return null;var n=this.create(fr);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},t.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},t.prototype._addLookupChildren=function(e){if(!e.addChild(this._parseLookupValue()))return!1;for(var t=!1;this.peek(sn.BracketL)&&(t=!0),e.addChild(this._parseLookupValue());)t=!1;return!t},t.prototype._parseLookupValue=function(){var e=this.create(dr),t=this.mark();return this.accept(sn.BracketL)&&((e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(sn.BracketR)||this.accept(sn.BracketR))?e:(this.restoreAtMark(t),null)},t.prototype._parseVariable=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(sn.AtKeyword))return null;for(var r=this.create(di),i=this.mark();this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(i),null;return(this.accept(sn.AtKeyword)||this.accept(sn.Ident))&&(t||!this.peek(sn.BracketL)||this._addLookupChildren(r))?r:(this.restoreAtMark(i),null)},t.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||e.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},t.prototype._parseEscaped=function(){if(this.peek(sn.EscapedJavaScript)||this.peek(sn.BadEscapedJavaScript)){var e=this.createNode(ir.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){e=this.createNode(ir.EscapedValue);return this.consumeToken(),this.accept(sn.String)||this.accept(sn.EscapedJavaScript)?this.finish(e):this.finish(e,Di.TermExpected)}return null},t.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||e.prototype._parseOperator.call(this)},t.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var e=this.createNode(ir.Operator);return this.consumeToken(),this.acceptDelim("="),e}if(this.peekDelim("=")){e=this.createNode(ir.Operator);return this.consumeToken(),this.acceptDelim("<"),e}if(this.peekDelim("<")){e=this.createNode(ir.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null},t.prototype._parseRuleSetDeclaration=function(){return this.peek(sn.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||e.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||e.prototype._parseRuleSetDeclaration.call(this)},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([or.Keyframe])||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||e.prototype._parseKeyframeSelector.call(this)},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelector=function(e){var t=this.create(br),n=!1;for(e&&(n=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());){n=!0;var r=this.mark();if(t.addChild(this._parseGuard())&&this.peek(sn.CurlyL))break;this.restoreAtMark(r),t.addChild(this._parseCombinator())}return n?this.finish(t):null},t.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var e=this.createNode(ir.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(sn.Num)||this.accept(sn.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null},t.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var e=this.createNode(ir.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(e){void 0===e&&(e=!1);var t=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,t))return null;var n=this.mark(),r=this.create(pr);r.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");return(e?r.isCustomProperty?r.addChild(this._parseIdent()):r.addChild(this._parseRegexp(t)):r.isCustomProperty?this._acceptInterpolatedIdent(r):this._acceptInterpolatedIdent(r,t))?(e||this.hasWhitespace()||(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(r)):(this.restoreAtMark(n),null)},t.prototype.peekInterpolatedIdent=function(){return this.peek(sn.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},t.prototype._acceptInterpolatedIdent=function(e,t){for(var n=this,r=!1,i=function(){var e=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(e),null):n._parseInterpolation()},o=t?function(){return n.acceptRegexp(t)}:function(){return n.accept(sn.Ident)};(o()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r},t.prototype._parseInterpolation=function(){var e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var t=this.createNode(ir.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(sn.CurlyL)?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.accept(sn.CurlyR)?this.finish(t):this.finish(t,Di.RightCurlyExpected):this.finish(t,Di.IdentifierExpected)}return null},t.prototype._tryParseMixinDeclaration=function(){var e=this.mark(),t=this.create(fi);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(sn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(sn.Comma)||this.accept(sn.SemiColon))&&!this.peek(sn.ParenthesisR);)t.getParameters().addChild(this._parseMixinParameter())||this.markError(t,Di.IdentifierExpected,[],[sn.ParenthesisR]);return this.accept(sn.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(sn.CurlyL)?this._parseBody(t,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)},t.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},t.prototype._parseMixinDeclarationIdentifier=function(){var e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(pr),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else{if(!this.peek(sn.Hash))return null;e=this.create(pr),this.consumeToken()}return e.referenceTypes=[or.Mixin],this.finish(e)},t.prototype._parsePseudo=function(){if(!this.peek(sn.Colon))return null;var t=this.mark(),n=this.create(hi);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(t),e.prototype._parsePseudo.call(this))},t.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var e=this.mark(),t=this.create(hi);return this.consumeToken(),!this.hasWhitespace()&&this.accept(sn.Colon)&&this.acceptIdent("extend")?this._completeExtends(t):(this.restoreAtMark(e),null)},t.prototype._completeExtends=function(e){if(!this.accept(sn.ParenthesisL))return this.finish(e,Di.LeftParenthesisExpected);var t=e.getSelectors();if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Di.SelectorExpected);for(;this.accept(sn.Comma);)if(!t.addChild(this._parseSelector(!0)))return this.finish(e,Di.SelectorExpected);return this.accept(sn.ParenthesisR)?this.finish(e):this.finish(e,Di.RightParenthesisExpected)},t.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(sn.AtKeyword))return null;var e=this.mark(),t=this.create(mi);return!t.addChild(this._parseVariable(!0))||!this.hasWhitespace()&&this.accept(sn.ParenthesisL)?this.accept(sn.ParenthesisR)?this.finish(t):this.finish(t,Di.RightParenthesisExpected):(this.restoreAtMark(e),null)},t.prototype._tryParseMixinReference=function(e){void 0===e&&(e=!0);for(var t=this.mark(),n=this.create(mi),r=this._parseMixinDeclarationIdentifier();r;){this.acceptDelim(">");var i=this._parseMixinDeclarationIdentifier();if(!i)break;n.getNamespaces().addChild(r),r=i}if(!n.setIdentifier(r))return this.restoreAtMark(t),null;var o=!1;if(this.accept(sn.ParenthesisL)){if(o=!0,n.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(sn.Comma)||this.accept(sn.SemiColon))&&!this.peek(sn.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,Di.ExpressionExpected);if(!this.accept(sn.ParenthesisR))return this.finish(n,Di.RightParenthesisExpected);r.referenceTypes=[or.Mixin]}else r.referenceTypes=[or.Mixin,or.Rule];return this.peek(sn.BracketL)?e||this._addLookupChildren(n):n.addChild(this._parsePrio()),o||this.peek(sn.SemiColon)||this.peek(sn.CurlyR)||this.peek(sn.EOF)?this.finish(n):(this.restoreAtMark(t),null)},t.prototype._parseMixinArgument=function(){var e=this.create(Fr),t=this.mark(),n=this._parseVariable();return n&&(this.accept(sn.Colon)?e.setIdentifier(n):this.restoreAtMark(t)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(t),null)},t.prototype._parseMixinParameter=function(){var e=this.create(_r);if(this.peekKeyword("@rest")){var t=this.create(dr);return this.consumeToken(),this.accept(Dl)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,Di.DotExpected,[],[sn.Comma,sn.ParenthesisR])}if(this.peek(Dl)){var n=this.create(dr);return this.consumeToken(),e.setIdentifier(this.finish(n)),this.finish(e)}var r=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(sn.Colon),r=!0),e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))||r?this.finish(e):null},t.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var e=this.create(vi);if(this.consumeToken(),e.isNegated=this.acceptIdent("not"),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Di.ConditionExpected);for(;this.acceptIdent("and")||this.accept(sn.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,Di.ConditionExpected);return this.finish(e)},t.prototype._parseGuardCondition=function(){if(!this.peek(sn.ParenthesisL))return null;var e=this.create(yi);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(sn.ParenthesisR)?this.finish(e):this.finish(e,Di.RightParenthesisExpected)},t.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Er);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(sn.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseMixinArgument()))for(;(this.accept(sn.Comma)||this.accept(sn.SemiColon))&&!this.peek(sn.ParenthesisR);)if(!t.getArguments().addChild(this._parseMixinArgument()))return this.finish(t,Di.ExpressionExpected);return this.accept(sn.ParenthesisR)?this.finish(t):this.finish(t,Di.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(pr);return t.referenceTypes=[or.Function],this.consumeToken(),this.finish(t)}return e.prototype._parseFunctionIdentifier.call(this)},t.prototype._parseURLArgument=function(){var t=this.mark(),n=e.prototype._parseURLArgument.call(this);if(!n||!this.peek(sn.ParenthesisR)){this.restoreAtMark(t);var r=this.create(dr);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n},t}(lo),zl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Il=Ei(),Al=function(e){function t(t,n){return e.call(this,"@",t,n)||this}return zl(t,e),t.prototype.createFunctionProposals=function(e,t,n,r){for(var i=0,o=e;i 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Il("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Il("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Il("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:Il("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:Il("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Il("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:Il("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Il("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Il("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Il("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],t.colorProposals=[{name:"argb",example:"argb(@color);",description:Il("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Il("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Il("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Il("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Il("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:Il("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Il("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Il("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Il("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Il("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Il("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Il("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Il("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Il("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Il("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Il("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Il("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Il("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Il("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Il("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Il("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Il("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Il("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Il("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Il("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Il("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Il("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],t}(qa);function Ml(e,t){return function(e,t){var n=t&&t.rangeLimit||Number.MAX_VALUE,r=e.sort((function(e,t){var n=e.startLine-t.startLine;return 0===n&&(n=e.endLine-t.endLine),n})),i=[],o=-1;return r.forEach((function(e){e.startLine=0;n--)if(e[n].type===t&&e[n].isStart)return e.splice(n,1)[0];return null}var Ol={version:1.1,properties:[{name:"additive-symbols",browsers:["FF33"],syntax:"[ && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:59,description:"Aligns a flex container\u2019s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:81,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:50,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:52,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element\u2019s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:69,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:51,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:79,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"