mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-26 01:16:56 +01:00
56 lines
502 KiB
JavaScript
56 lines
502 KiB
JavaScript
|
function e(e,t){if(null==e)return{};var n,r,o={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function t(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var n={name:"prettier",version:"2.2.1",description:"Prettier is an opinionated code formatter",bin:"./bin/prettier.js",repository:"prettier/prettier",homepage:"https://prettier.io",author:"James Long",license:"MIT",main:"./index.js",browser:"./standalone.js",unpkg:"./standalone.js",engines:{node:">=10.13.0"},files:["index.js","standalone.js","src","bin"],dependencies:{"@angular/compiler":"10.2.3","@babel/code-frame":"7.10.4","@babel/parser":"7.12.5","@glimmer/syntax":"0.66.0","@iarna/toml":"2.2.5","@typescript-eslint/typescript-estree":"4.8.1","angular-estree-parser":"2.2.1","angular-html-parser":"1.7.1",camelcase:"6.2.0",chalk:"4.1.0","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","cjk-regex":"2.0.0",cosmiconfig:"7.0.0",dashify:"2.0.0",diff:"5.0.0",editorconfig:"0.15.3","editorconfig-to-prettier":"0.2.0","escape-string-regexp":"4.0.0",espree:"7.3.0",esutils:"2.0.3","fast-glob":"3.2.4","fast-json-stable-stringify":"2.1.0","find-parent-dir":"0.3.0","flow-parser":"0.138.0","get-stdin":"8.0.0",globby:"11.0.1",graphql:"15.4.0","html-element-attributes":"2.3.0","html-styles":"1.0.0","html-tag-names":"1.1.5","html-void-elements":"1.0.5",ignore:"4.0.6","jest-docblock":"26.0.0",json5:"2.1.3",leven:"3.1.0","lines-and-columns":"1.1.6","linguist-languages":"7.12.1",lodash:"4.17.20",mem:"8.0.0",meriyah:"3.1.6",minimatch:"3.0.4",minimist:"1.2.5","n-readlines":"1.0.1",outdent:"0.7.1","parse-srcset":"ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee","please-upgrade-node":"3.2.0","postcss-less":"3.1.4","postcss-media-query-parser":"0.2.3","postcss-scss":"2.1.1","postcss-selector-parser":"2.2.3","postcss-values-parser":"2.0.1","regexp-util":"1.2.2","remark-footnotes":"2.0.0","remark-math":"3.0.1","remark-parse":"8.0.3",resolve:"1.19.0",semver:"7.3.2","string-width":"4.2.0",typescript:"4.1.2","unicode-regex":"3.0.0",unified:"9.2.0",vnopts:"1.0.2","yaml-unist-parser":"1.3.1"},devDependencies:{"@babel/core":"7.12.3","@babel/preset-env":"7.12.1","@babel/types":"7.12.6","@glimmer/reference":"0.66.0","@rollup/plugin-alias":"3.1.1","@rollup/plugin-babel":"5.2.1","@rollup/plugin-commonjs":"16.0.0","@rollup/plugin-json":"4.1.0","@rollup/plugin-node-resolve":"10.0.0","@rollup/plugin-replace":"2.3.4","@types/estree":"0.0.45","@types/node":"14.14.0","@typescript-eslint/types":"4.8.1","babel-jest":"26.6.3","babel-loader":"8.2.1",benchmark:"2.1.4","builtin-modules":"3.1.0","cross-env":"7.0.2",cspell:"4.2.2",eslint:"7.13.0","eslint-config-prettier":"6.15.0","eslint-formatter-friendly":"7.0.0","eslint-plugin-import":"2.22.1","eslint-plugin-jest":"24.1.3","eslint-plugin-prettier-internal-rules":"file:scripts/tools/eslint-plugin-prettier-internal-rules","eslint-plugin-react":"7.21.5","eslint-plugin-unicorn":"23.0.0",execa:"4.1.0",jest:"26.6.3","jest-snapshot-serializer-ansi":"1.0.0","jest-snapshot-serializer-raw":"1.1.0","jest-watch-typeahead":"0.6.1","npm-run-all":"4.1.5","path-browserify":"1.0.1",prettier:"2.2.0",rimraf:"3.0.2",rollup:"2.33.3","rollup-plugin-node-globals":"1.4.0","rollup-plugin-terser":"7.0.2",shelljs:"0.8.4","snapshot-diff":"0.8.1","strip-ansi":"6.0.0","synchronous-promise":"2.0.15",tempy:"1.0.0","terser-webpack-plugin":"5.0.3",webpack:"5.5.1"},scripts:{prepublishOnly:'echo "Error: must publish from dist/" && exit 1',"prepare-release":"yarn && yarn build && yarn test:dist",test:"jest","test:dev-package":"cross-env INSTALL_PACKAGE=1 jest","test:dist":"cross-env NODE_ENV=production jest","test:dist-standalone":"cross-env NODE_ENV=production TEST_STANDALONE=1 jest","test:integration":"jest tests_integration","perf:repeat":"yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null","perf:repeat-inspect":"yarn && yarn build && cross-env NODE_ENV=produc
|
||
|
/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var yr=function(){return(yr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Er(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,u=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=u.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}return i}function br(e){return this instanceof br?(this.v=e,this):new br(e)}var vr=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}Dr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return yr},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},__decorate:function(e,t,n,r){var o,u=arguments.length,i=u<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(u<3?o(i):u>3?o(t,n,i):o(t,n))||i);return u>3&&i&&Object.defineProperty(t,n,i),i},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{s(r.next(e))}catch(e){u(e)}}function a(e){try{s(r.throw(e))}catch(e){u(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}s((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}},__createBinding:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__exportStar:function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])},__values:Er,__read:Cr,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Cr(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var u=arguments[t],i=0,a=u.length;i<a;i++,o++)r[o]=u[i];return r},__await:br,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),u=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright Google Inc. All Rights Reserved.
|
||
|
*
|
||
|
* Use of this source code is governed by an MIT-style license that can be
|
||
|
* found in the LICENSE file at https://angular.io/license
|
||
|
*/
|
||
|
Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})),IS=je((function(e,t){
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright Google Inc. All Rights Reserved.
|
||
|
*
|
||
|
* Use of this source code is governed by an MIT-style license that can be
|
||
|
* found in the LICENSE file at https://angular.io/license
|
||
|
*/
|
||
|
Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t,n){this.filePath=e,this.name=t,this.members=n}assertNoMembers(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}t.StaticSymbol=n;t.StaticSymbolCache=class{constructor(){this.cache=new Map}get(e,t,r){const o=(r=r||[]).length?".".concat(r.join(".")):"",u='"'.concat(e,'".').concat(t).concat(o);let i=this.cache.get(u);return i||(i=new n(e,t,r),this.cache.set(u,i)),i}}})),LS=je((function(e,t){
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright Google Inc. All Rights Reserved.
|
||
|
*
|
||
|
* Use of this source code is governed by an MIT-style license that can be
|
||
|
* found in the LICENSE file at https://angular.io/license
|
||
|
*/
|
||
|
Object.defineProperty(t,"__esModule",{value:!0});const n=/-+([a-z0-9])/g;function r(e,t,n){const r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function o(e,t,n){return Array.isArray(e)?t.visitArray(e,n):"object"==typeof(r=e)&&null!==r&&Object.getPrototypeOf(r)===a?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n);var r}t.dashCaseToCamelCase=function(e){return e.replace(n,((...e)=>e[1].toUpperCase()))},t.splitAtColon=function(e,t){return r(e,":",t)},t.splitAtPeriod=function(e,t){return r(e,".",t)},t.visitValue=o,t.isDefined=function(e){return null!=e},t.noUndefined=function(e){return void 0===e?null:e};t.ValueTransformer=class{visitArray(e,t){return e.map((e=>o(e,this,t)))}visitStringMap(e,t){const n={};return Object.keys(e).forEach((r=>{n[r]=o(e[r],this,t)})),n}visitPrimitive(e,t){return e}visitOther(e,t){return e}},t.SyncAsync={assertSync:e=>{if(s(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>s(e)?e.then(t):t(e),all:e=>e.some(s)?Promise.all(e):e},t.error=function(e){throw new Error("Internal Error: ".concat(e))},t.syntaxError=function(e,t){const n=Error(e);return n[u]=!0,t&&(n[i]=t),n};const u="ngSyntaxError",i="ngParseErrors";t.isSyntaxError=function(e){return e[u]},t.getParseErrors=function(e){return e[i]||[]},t.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const a=Object.getPrototypeOf({});function s(e){return!!e&&"function"==typeof e.then}t.utf8Encode=function(e){let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=55296&&r<=56319&&e.length>n+1){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(n++,r=(r-55296<<10)+t-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t},t.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);if(!t.toString)return"object";const n=t.toString();if(null==n)return""+n;const r=n.indexOf("\n");return-1===r?n:n.substring(0,r)},t.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},t.isPromise=s;t.Version=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const l="undefined"!=typeof window&&window,c="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,p=void 0!==Me&&Me||l||c;t.global=p})),MS=je((function(e,t){
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright Google Inc. All Rights Reserved.
|
||
|
*
|
||
|
* Use of this source code is governed by an MIT-style license that can be
|
||
|
* found in the LICENSE file at https://angular.io/license
|
||
|
*/
|
||
|
Object.defineProperty(t,"__esModule",{value:!0});const n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function r(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=r;let o=0;function u(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof IS.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let n=LS.stringify(t);return n.indexOf("(")>=0?(n="anonymous_".concat(o++),t.__anonymousType=n):n=r(n),n}var i;t.identifierName=u,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof IS.StaticSymbol?t.filePath:"./".concat(LS.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(u({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(u({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(u({reference:e}))},t.componentFactoryName=function(e){return"".concat(u({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(i=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?r(e.value):u(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:n}={}){this.moduleUrl=e||null,this.styles=s(t),this.styleUrls=s(n)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:n,htmlAst:r,styles:o,styleUrls:u,externalStylesheets:i,animations:a,ngContentSelectors:c,interpolation:p,isInline:d,preserveWhitespaces:f}){if(this.encapsulation=e,this.template=t,this.templateUrl=n,this.htmlAst=r,this.styles=s(o),this.styleUrls=s(u),this.externalStylesheets=s(i),this.animations=a?l(a):[],this.ngContentSelectors=c||[],p&&2!=p.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=p,this.isInline=d,this.preserveWhitespaces=f}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class a{static create({isHost:e,type:t,isComponent:r,selector:o,exportAs:u,changeDetection:i,inputs:s,outputs:l,host:c,providers:p,viewProviders:d,queries:f,guards:h,viewQueries:m,entryComponents:g,template:D,componentViewType:y,rendererType:E,componentFactory:C}){const b={},v={},A={};null!=c&&Object.keys(c).forEach((e=>{const t=c[e],r=e.match(n);null===r?A[e]=t:null!=r[1]?v[r[1]]=t:null!=r[2]&&(b[r[2]]=t)}));const F={};null!=s&&s.forEach((e=>{const t=LS.splitAtColon(e,[e,e]);F[t[0]]=t[1]}));const x={};return null!=l&&l.forEach((e=>{const t=LS.splitAtColon(e,[e,e]);x[t[0]]=t[1]})),new a({isHost:e,type:t,isComponent:!!r,selector:o,exportAs:u,changeDetection:i,inputs:F,outputs:x,hostListeners:b,hostProperties:v,hostAttributes:A,providers:p,viewProviders:d,queries:f,guards:h,viewQueries:m,entryComponents:g,template:D,componentViewType:y,rendererType:E,componentFactory:C})}constructor({isHost:e,type:t,isComponent:n,selector:r,exportAs:o,changeDetection:u,inputs:i,outputs:a,hostListeners:l,hostProperties:c,hostAttributes:p,providers:d,viewProviders:f,queries:h,guards:m,viewQueries:g,entryComponents:D,template:y,componentViewType:E,rendererType:C,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=n,this.selector=r,this.exportAs=o,this.changeDetection=u,this.inputs=i,this.outputs=a,this.hostListeners=l,this.hostProperties=c,this.hostAttributes=p,this.providers=s(d),this.viewProviders=s(f),this.queries=s(h),this.guards=m,this.viewQueries=s(g),this.entryComponents=s(D),this.template=y,this.componentViewType=E,this.rendererType=C,this.componentFactory=b}toSummary(){return{summaryKind:i.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.vie
|
||
|
/**
|
||
|
* @license
|
||
|
* Copyright Google Inc. All Rights Reserved.
|
||
|
*
|
||
|
* Use of this source code is governed by an MIT-style license that can be
|
||
|
* found in the LICENSE file at https://angular.io/license
|
||
|
*/
|
||
|
class n{constructor(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}moveBy(e){const t=this.file.content,r=t.length;let o=this.offset,u=this.line,i=this.col;for(;o>0&&e<0;){o--,e++;if(t.charCodeAt(o)==OS.$LF){u--;const e=t.substr(0,o-1).lastIndexOf(String.fromCharCode(OS.$LF));i=e>0?o-e:o}else i--}for(;o<r&&e>0;){const n=t.charCodeAt(o);o++,e--,n==OS.$LF?(u++,i=0):i++}return new n(this.file,o,u,i)}getContext(e,t){const n=this.file.content;let r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);let o=r,u=0,i=0;for(;u<e&&r>0&&(r--,u++,"\n"!=n[r]||++i!=t););for(u=0,i=0;u<e&&o<n.length-1&&(o++,u++,"\n"!=n[o]||++i!=t););return{before:n.substring(r,this.offset),after:n.substring(this.offset,o+1)}}return null}}t.ParseLocation=n;class r{constructor(e,t){this.content=e,this.url=t}}t.ParseSourceFile=r;class o{constructor(e,t,n=null){this.start=e,this.end=t,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}var u;t.ParseSourceSpan=o,t.EMPTY_PARSE_LOCATION=new n(new r("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new o(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(u=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,n=u.ERROR){this.span=e,this.msg=t,this.level=n}contextualMessage(){const e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(u[this.level]," ->]").concat(e.after,'")'):this.msg}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}},t.typeSourceSpan=function(e,t){const u=MS.identifierModuleUrl(t),i=null!=u?"in ".concat(e," ").concat(MS.identifierName(t)," in ").concat(u):"in ".concat(e," ").concat(MS.identifierName(t)),a=new r("",i);return new o(new n(a,-1,-1,-1),new n(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,u){const i="in ".concat(e," ").concat(t," in ").concat(u),a=new r("",i);return new o(new n(a,-1,-1,-1),new n(a,-1,-1,-1))}}));const{ParseSourceSpan:_S}=jS,{htmlTrim:RS,getLeadingAndTrailingHtmlWhitespace:VS,hasHtmlWhitespace:$S,canHaveInterpolation:qS,getNodeCssStyleDisplay:WS,isDanglingSpaceSensitiveNode:US,isIndentationSensitiveNode:JS,isLeadingSpaceSensitiveNode:zS,isTrailingSpaceSensitiveNode:GS,isWhitespaceSensitiveNode:HS}=PS,XS=[function(e){return e.map((e=>{if("element"===e.type&&e.tagDefinition.ignoreFirstLf&&0!==e.children.length&&"text"===e.children[0].type&&"\n"===e.children[0].value[0]){const[t,...n]=e.children;return e.clone({children:1===t.value.length?n:[t.clone({value:t.value.slice(1)}),...n]})}return e}))},function(e){const t=e=>"element"===e.type&&e.prev&&"ieConditionalStartComment"===e.prev.type&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild&&"ieConditionalEndComment"===e.firstChild.type&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset;return e.map((e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r<e.children.length;r++){const o=e.children[r];if(!n[r+1])if(n[r]){const e=o.prev,n=o.firstChild,r=new _S(e.sourceSpan.start,n.sourceSpan.end),u=new _S(r.start,o.sourceSpan.end);t.push(o.clone({condition:e.condition,sourceSpan:u,startSourceSpan:r,children:o.children.slice(1)}))}else t.push(o)}return e.clone({children:t})}}return e}))},function(e){return function(e,t,n){return e.map((e=>{if(e.children){const r=e.children.map(t);if(r.some(Boolean)){const t=[];for(let o=0;o<e.children.length;o++){const u=e.children[o];if("text"!==u.type&&!r[o]){t.push(u);continue}const i="text"===u.type?u:u.clone({type:"text",value:n(u)});if(0===t.length||"text"!==t[t.length-1].type){t.push(i);continue}const a=t.pop();t.push(a.clone({value:a.value+i.value,sourceSpan:new _S(a.sourceSpan.start,i.sourceSpan.end)}))}return e.clone({children:t})}}return e}))}(e,(e=>"cdata"===e.type),(e=>"<![CDATA[".concat(e.value,"]]>")))},function(e,t){
|