html-crush 6.0.3 → 6.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name html-crush
3
3
  * @fileoverview Minify email templates
4
- * @version 6.0.3
4
+ * @version 6.0.5
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/html-crush/}
8
8
  */
9
9
 
10
- import{rApply as ne}from"ranges-apply";import{Ranges as le}from"ranges-push";import{matchLeft as oe,matchRight as F,matchRightIncl as X}from"string-match-left-right";import{expander as _}from"string-range-expander";import{left as G,right as a}from"string-left-right";var Y="6.0.3";var ge=Y,$=new le({limitToBeAddedWhitespace:!0}),te={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","</script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function y(n){return typeof n=="string"}function A(n){return typeof n=="string"&&n.toUpperCase()!==n.toLowerCase()}function ce(n,E){let x=Date.now();if(!y(n))throw n===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof n}", equal to:
10
+ import{rApply as ne}from"ranges-apply";import{Ranges as le}from"ranges-push";import{matchLeft as oe,matchRight as F,matchRightIncl as X}from"string-match-left-right";import{expander as _}from"string-range-expander";import{left as G,right as a}from"string-left-right";var Y="6.0.5";var ge=Y,$=new le({limitToBeAddedWhitespace:!0}),te={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","</script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function y(n){return typeof n=="string"}function A(n){return typeof n=="string"&&n.toUpperCase()!==n.toLowerCase()}function ce(n,E){let x=Date.now();if(!y(n))throw n===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof n}", equal to:
11
11
  ${JSON.stringify(n,null,4)}`);if(E&&typeof E!="object")throw new Error(`html-crush: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof E}, equal to ${JSON.stringify(E,null,4)}`);if(E&&Array.isArray(E.breakToTheLeftOf)&&E.breakToTheLeftOf.length){for(let e=0,w=E.breakToTheLeftOf.length;e<w;e++)if(!y(E.breakToTheLeftOf[e]))throw new TypeError(`html-crush: [THROW_ID_05] the resolvedOpts.breakToTheLeftOf array contains non-string elements! For example, element at index ${e} is of a type "${typeof E.breakToTheLeftOf[e]}" and is equal to:
12
12
  ${JSON.stringify(E.breakToTheLeftOf[e],null,4)}`)}let l={...te,...E};typeof l.removeHTMLComments=="boolean"&&(l.removeHTMLComments=l.removeHTMLComments?1:0);let v="";Array.isArray(l.breakToTheLeftOf)&&l.breakToTheLeftOf.length&&(v=[...new Set(l.breakToTheLeftOf.map(e=>e[0]))].join(""));let L={removeHTMLComments:!1,removeCSSComments:!1},p=null,i=null,S=!1,m=0,H=0,g=!1,O=!1,c=null,f=null,V=null,U=null,u,t=null,s=null,r=null,T=null,D=null,M=null,P=">};",I="<",K="!",q=">",z="<",W="{},:;<>~+",k=W,J=W,C=!0,h=n.length,Q=Math.floor(h/2),B=.01,j;l.reportProgressFunc&&(j=Math.floor(l.reportProgressFuncTo-(l.reportProgressFuncTo-l.reportProgressFuncFrom)*B-l.reportProgressFuncFrom));let d,R=0,b=`
13
13
  `;if(n.includes(`\r
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name html-crush
3
3
  * @fileoverview Minify email templates
4
- * @version 6.0.3
4
+ * @version 6.0.5
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/html-crush/}
8
8
  */
9
9
 
10
- "use strict";var htmlCrush=(()=>{var zt=Object.create;var ee=Object.defineProperty;var Zt=Object.getOwnPropertyDescriptor;var en=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,tn=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable;var ye=(e,t,r)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))Be.call(t,r)&&ye(e,r,t[r]);if(ke)for(var r of ke(t))nn.call(t,r)&&ye(e,r,t[r]);return e};var rn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),on=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Ue=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of en(t))!Be.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(n=Zt(t,a))||n.enumerable});return e};var sn=(e,t,r)=>(r=e!=null?zt(tn(e)):{},Ue(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),ln=e=>Ue(ee({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var Bt=rn((ne,B)=>{var pn=200,ht="__lodash_hash_undefined__",$t=9007199254740991,Ve="[object Arguments]",dn="[object Array]",pt="[object Boolean]",dt="[object Date]",bn="[object Error]",Re="[object Function]",bt="[object GeneratorFunction]",ue="[object Map]",Tt="[object Number]",Me="[object Object]",rt="[object Promise]",yt="[object RegExp]",ge="[object Set]",Et="[object String]",St="[object Symbol]",Ce="[object WeakMap]",Ot="[object ArrayBuffer]",ce="[object DataView]",wt="[object Float32Array]",Lt="[object Float64Array]",Dt="[object Int8Array]",Ct="[object Int16Array]",At="[object Int32Array]",It="[object Uint8Array]",vt="[object Uint8ClampedArray]",_t="[object Uint16Array]",Nt="[object Uint32Array]",Tn=/[\\^$.*+?()[\]{}|]/g,yn=/\w*$/,En=/^\[object .+?Constructor\]$/,Sn=/^(?:0|[1-9]\d*)$/,O={};O[Ve]=O[dn]=O[Ot]=O[ce]=O[pt]=O[dt]=O[wt]=O[Lt]=O[Dt]=O[Ct]=O[At]=O[ue]=O[Tt]=O[Me]=O[yt]=O[ge]=O[Et]=O[St]=O[It]=O[vt]=O[_t]=O[Nt]=!0;O[bn]=O[Re]=O[Ce]=!1;var On=typeof global=="object"&&global&&global.Object===Object&&global,wn=typeof self=="object"&&self&&self.Object===Object&&self,_=On||wn||Function("return this")(),Vt=typeof ne=="object"&&ne&&!ne.nodeType&&ne,it=Vt&&typeof B=="object"&&B&&!B.nodeType&&B,Ln=it&&it.exports===Vt;function Dn(e,t){return e.set(t[0],t[1]),e}function Cn(e,t){return e.add(t),e}function An(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function In(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Rt(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function vn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function _n(e,t){return e==null?void 0:e[t]}function Mt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function ot(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Pe(e,t){return function(r){return e(t(r))}}function st(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Nn=Array.prototype,Vn=Function.prototype,me=Object.prototype,De=_["__core-js_shared__"],lt=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pt=Vn.toString,x=me.hasOwnProperty,fe=me.toString,Rn=RegExp("^"+Pt.call(x).replace(Tn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),at=Ln?_.Buffer:void 0,ut=_.Symbol,gt=_.Uint8Array,Mn=Pe(Object.getPrototypeOf,Object),Pn=Object.create,xn=me.propertyIsEnumerable,Hn=Nn.splice,ct=Object.getOwnPropertySymbols,Fn=at?at.isBuffer:void 0,Wn=Pe(Object.keys,Object),Ae=q(_,"DataView"),re=q(_,"Map"),Ie=q(_,"Promise"),ve=q(_,"Set"),_e=q(_,"WeakMap"),ie=q(Object,"create"),Jn=W(Ae),jn=W(re),kn=W(Ie),Bn=W(ve),Un=W(_e),mt=ut?ut.prototype:void 0,ft=mt?mt.valueOf:void 0;function F(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gn(){this.__data__=ie?ie(null):{}}function qn(e){return this.has(e)&&delete this.__data__[e]}function Kn(e){var t=this.__data__;if(ie){var r=t[e];return r===ht?void 0:r}return x.call(t,e)?t[e]:void 0}function Yn(e){var t=this.__data__;return ie?t[e]!==void 0:x.call(t,e)}function Xn(e,t){var r=this.__data__;return r[e]=ie&&t===void 0?ht:t,this}F.prototype.clear=Gn;F.prototype.delete=qn;F.prototype.get=Kn;F.prototype.has=Yn;F.prototype.set=Xn;function N(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qn(){this.__data__=[]}function zn(e){var t=this.__data__,r=he(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Hn.call(t,r,1),!0}function Zn(e){var t=this.__data__,r=he(t,e);return r<0?void 0:t[r][1]}function er(e){return he(this.__data__,e)>-1}function tr(e,t){var r=this.__data__,n=he(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}N.prototype.clear=Qn;N.prototype.delete=zn;N.prototype.get=Zn;N.prototype.has=er;N.prototype.set=tr;function U(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nr(){this.__data__={hash:new F,map:new(re||N),string:new F}}function rr(e){return $e(this,e).delete(e)}function ir(e){return $e(this,e).get(e)}function or(e){return $e(this,e).has(e)}function sr(e,t){return $e(this,e).set(e,t),this}U.prototype.clear=nr;U.prototype.delete=rr;U.prototype.get=ir;U.prototype.has=or;U.prototype.set=sr;function G(e){this.__data__=new N(e)}function lr(){this.__data__=new N}function ar(e){return this.__data__.delete(e)}function ur(e){return this.__data__.get(e)}function gr(e){return this.__data__.has(e)}function cr(e,t){var r=this.__data__;if(r instanceof N){var n=r.__data__;if(!re||n.length<pn-1)return n.push([e,t]),this;r=this.__data__=new U(n)}return r.set(e,t),this}G.prototype.clear=lr;G.prototype.delete=ar;G.prototype.get=ur;G.prototype.has=gr;G.prototype.set=cr;function mr(e,t){var r=He(e)||Pr(e)?vn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||x.call(e,o))&&!(a&&(o=="length"||Nr(o,n)))&&r.push(o);return r}function xt(e,t,r){var n=e[t];(!(x.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function he(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}function fr(e,t){return e&&Ht(t,Fe(t),e)}function Ne(e,t,r,n,a,o,u){var l;if(n&&(l=o?n(e,a,o,u):n(e)),l!==void 0)return l;if(!pe(e))return e;var c=He(e);if(c){if(l=Ir(e),!t)return Dr(e,l)}else{var s=H(e),d=s==Re||s==bt;if(Hr(e))return Tr(e,t);if(s==Me||s==Ve||d&&!o){if(Mt(e))return o?e:{};if(l=vr(d?{}:e),!t)return Cr(e,fr(l,e))}else{if(!O[s])return o?e:{};l=_r(e,s,Ne,t)}}u||(u=new G);var p=u.get(e);if(p)return p;if(u.set(e,l),!c)var T=r?Ar(e):Fe(e);return An(T||e,function(m,f){T&&(f=m,m=e[f]),xt(l,f,Ne(m,t,r,n,f,e,u))}),l}function hr(e){return pe(e)?Pn(e):{}}function $r(e,t,r){var n=t(e);return He(e)?n:In(n,r(e))}function pr(e){return fe.call(e)}function dr(e){if(!pe(e)||Rr(e))return!1;var t=kt(e)||Mt(e)?Rn:En;return t.test(W(e))}function br(e){if(!Wt(e))return Wn(e);var t=[];for(var r in Object(e))x.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function xe(e){var t=new e.constructor(e.byteLength);return new gt(t).set(new gt(e)),t}function yr(e,t){var r=t?xe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Er(e,t,r){var n=t?r(ot(e),!0):ot(e);return Rt(n,Dn,new e.constructor)}function Sr(e){var t=new e.constructor(e.source,yn.exec(e));return t.lastIndex=e.lastIndex,t}function Or(e,t,r){var n=t?r(st(e),!0):st(e);return Rt(n,Cn,new e.constructor)}function wr(e){return ft?Object(ft.call(e)):{}}function Lr(e,t){var r=t?xe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Dr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Ht(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],l=n?n(r[u],e[u],u,r,e):void 0;xt(r,u,l===void 0?e[u]:l)}return r}function Cr(e,t){return Ht(e,Ft(e),t)}function Ar(e){return $r(e,Fe,Ft)}function $e(e,t){var r=e.__data__;return Vr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function q(e,t){var r=_n(e,t);return dr(r)?r:void 0}var Ft=ct?Pe(ct,Object):Jr,H=pr;(Ae&&H(new Ae(new ArrayBuffer(1)))!=ce||re&&H(new re)!=ue||Ie&&H(Ie.resolve())!=rt||ve&&H(new ve)!=ge||_e&&H(new _e)!=Ce)&&(H=function(e){var t=fe.call(e),r=t==Me?e.constructor:void 0,n=r?W(r):void 0;if(n)switch(n){case Jn:return ce;case jn:return ue;case kn:return rt;case Bn:return ge;case Un:return Ce}return t});function Ir(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&x.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function vr(e){return typeof e.constructor=="function"&&!Wt(e)?hr(Mn(e)):{}}function _r(e,t,r,n){var a=e.constructor;switch(t){case Ot:return xe(e);case pt:case dt:return new a(+e);case ce:return yr(e,n);case wt:case Lt:case Dt:case Ct:case At:case It:case vt:case _t:case Nt:return Lr(e,n);case ue:return Er(e,n,r);case Tt:case Et:return new a(e);case yt:return Sr(e);case ge:return Or(e,n,r);case St:return wr(e)}}function Nr(e,t){return t=t==null?$t:t,!!t&&(typeof e=="number"||Sn.test(e))&&e>-1&&e%1==0&&e<t}function Vr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Rr(e){return!!lt&&lt in e}function Wt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||me;return e===r}function W(e){if(e!=null){try{return Pt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Mr(e){return Ne(e,!0,!0)}function Jt(e,t){return e===t||e!==e&&t!==t}function Pr(e){return xr(e)&&x.call(e,"callee")&&(!xn.call(e,"callee")||fe.call(e)==Ve)}var He=Array.isArray;function jt(e){return e!=null&&Fr(e.length)&&!kt(e)}function xr(e){return Wr(e)&&jt(e)}var Hr=Fn||jr;function kt(e){var t=pe(e)?fe.call(e):"";return t==Re||t==bt}function Fr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$t}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Wr(e){return!!e&&typeof e=="object"}function Fe(e){return jt(e)?mr(e):br(e)}function Jr(){return[]}function jr(){return!1}B.exports=Mr});var Yr={};on(Yr,{crush:()=>Kr,defaults:()=>Gt,version:()=>qr});var an={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function Se(e,t){if(!Array.isArray(e)||!e.length)return e;let r=S(S({},an),t),n,a;if(r.strictlyTwoElementsInRangeArrays&&!e.every((l,c)=>!Array.isArray(l)||l.length!==2?(n=c,a=l.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${n}th range (${JSON.stringify(e[n],null,4)}) has not two but ${a} elements!`);if(!e.every((l,c)=>!Array.isArray(l)||!Number.isInteger(l[0])||l[0]<0||!Number.isInteger(l[1])||l[1]<0?(n=c,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${n}th range (${JSON.stringify(e[n],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,u=0;return Array.from(e).sort((l,c)=>(r.progressFn&&(u+=1,r.progressFn(Math.floor(u*100/o))),l[0]===c[0]?l[1]<c[1]?-1:l[1]>c[1]?1:0:l[0]<c[0]?-1:1))}var Ge={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function qe(e,t){function r(s){return!!s&&typeof s=="object"&&!Array.isArray(s)}if(!Array.isArray(e)||!e.length)return null;let n;if(t)if(r(t)){if(n=S(S({},Ge),t),n.progressFn&&r(n.progressFn)&&!Object.keys(n.progressFn).length)n.progressFn=null;else if(n.progressFn&&typeof n.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn,null,4)}`);if(![1,2,"1","2"].includes(n.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType,null,4)}`);if(typeof n.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
10
+ "use strict";var htmlCrush=(()=>{var zt=Object.create;var ee=Object.defineProperty;var Zt=Object.getOwnPropertyDescriptor;var en=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,tn=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable;var ye=(e,t,r)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))Ue.call(t,r)&&ye(e,r,t[r]);if(ke)for(var r of ke(t))nn.call(t,r)&&ye(e,r,t[r]);return e};var rn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),on=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Be=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of en(t))!Ue.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(n=Zt(t,a))||n.enumerable});return e};var sn=(e,t,r)=>(r=e!=null?zt(tn(e)):{},Be(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),ln=e=>Be(ee({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var Ut=rn((ne,U)=>{var pn=200,ht="__lodash_hash_undefined__",$t=9007199254740991,Ve="[object Arguments]",dn="[object Array]",pt="[object Boolean]",dt="[object Date]",bn="[object Error]",Re="[object Function]",bt="[object GeneratorFunction]",ue="[object Map]",Tt="[object Number]",Me="[object Object]",rt="[object Promise]",yt="[object RegExp]",ge="[object Set]",Et="[object String]",St="[object Symbol]",Ce="[object WeakMap]",Ot="[object ArrayBuffer]",ce="[object DataView]",wt="[object Float32Array]",Lt="[object Float64Array]",Dt="[object Int8Array]",Ct="[object Int16Array]",At="[object Int32Array]",It="[object Uint8Array]",vt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",_t="[object Uint32Array]",Tn=/[\\^$.*+?()[\]{}|]/g,yn=/\w*$/,En=/^\[object .+?Constructor\]$/,Sn=/^(?:0|[1-9]\d*)$/,O={};O[Ve]=O[dn]=O[Ot]=O[ce]=O[pt]=O[dt]=O[wt]=O[Lt]=O[Dt]=O[Ct]=O[At]=O[ue]=O[Tt]=O[Me]=O[yt]=O[ge]=O[Et]=O[St]=O[It]=O[vt]=O[Nt]=O[_t]=!0;O[bn]=O[Re]=O[Ce]=!1;var On=typeof global=="object"&&global&&global.Object===Object&&global,wn=typeof self=="object"&&self&&self.Object===Object&&self,N=On||wn||Function("return this")(),Vt=typeof ne=="object"&&ne&&!ne.nodeType&&ne,it=Vt&&typeof U=="object"&&U&&!U.nodeType&&U,Ln=it&&it.exports===Vt;function Dn(e,t){return e.set(t[0],t[1]),e}function Cn(e,t){return e.add(t),e}function An(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function In(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Rt(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function vn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Nn(e,t){return e==null?void 0:e[t]}function Mt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function ot(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Pe(e,t){return function(r){return e(t(r))}}function st(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var _n=Array.prototype,Vn=Function.prototype,me=Object.prototype,De=N["__core-js_shared__"],lt=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pt=Vn.toString,x=me.hasOwnProperty,fe=me.toString,Rn=RegExp("^"+Pt.call(x).replace(Tn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),at=Ln?N.Buffer:void 0,ut=N.Symbol,gt=N.Uint8Array,Mn=Pe(Object.getPrototypeOf,Object),Pn=Object.create,xn=me.propertyIsEnumerable,Fn=_n.splice,ct=Object.getOwnPropertySymbols,Hn=at?at.isBuffer:void 0,Wn=Pe(Object.keys,Object),Ae=q(N,"DataView"),re=q(N,"Map"),Ie=q(N,"Promise"),ve=q(N,"Set"),Ne=q(N,"WeakMap"),ie=q(Object,"create"),Jn=W(Ae),jn=W(re),kn=W(Ie),Un=W(ve),Bn=W(Ne),mt=ut?ut.prototype:void 0,ft=mt?mt.valueOf:void 0;function H(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gn(){this.__data__=ie?ie(null):{}}function qn(e){return this.has(e)&&delete this.__data__[e]}function Kn(e){var t=this.__data__;if(ie){var r=t[e];return r===ht?void 0:r}return x.call(t,e)?t[e]:void 0}function Yn(e){var t=this.__data__;return ie?t[e]!==void 0:x.call(t,e)}function Xn(e,t){var r=this.__data__;return r[e]=ie&&t===void 0?ht:t,this}H.prototype.clear=Gn;H.prototype.delete=qn;H.prototype.get=Kn;H.prototype.has=Yn;H.prototype.set=Xn;function _(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qn(){this.__data__=[]}function zn(e){var t=this.__data__,r=he(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Fn.call(t,r,1),!0}function Zn(e){var t=this.__data__,r=he(t,e);return r<0?void 0:t[r][1]}function er(e){return he(this.__data__,e)>-1}function tr(e,t){var r=this.__data__,n=he(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}_.prototype.clear=Qn;_.prototype.delete=zn;_.prototype.get=Zn;_.prototype.has=er;_.prototype.set=tr;function B(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nr(){this.__data__={hash:new H,map:new(re||_),string:new H}}function rr(e){return $e(this,e).delete(e)}function ir(e){return $e(this,e).get(e)}function or(e){return $e(this,e).has(e)}function sr(e,t){return $e(this,e).set(e,t),this}B.prototype.clear=nr;B.prototype.delete=rr;B.prototype.get=ir;B.prototype.has=or;B.prototype.set=sr;function G(e){this.__data__=new _(e)}function lr(){this.__data__=new _}function ar(e){return this.__data__.delete(e)}function ur(e){return this.__data__.get(e)}function gr(e){return this.__data__.has(e)}function cr(e,t){var r=this.__data__;if(r instanceof _){var n=r.__data__;if(!re||n.length<pn-1)return n.push([e,t]),this;r=this.__data__=new B(n)}return r.set(e,t),this}G.prototype.clear=lr;G.prototype.delete=ar;G.prototype.get=ur;G.prototype.has=gr;G.prototype.set=cr;function mr(e,t){var r=Fe(e)||Pr(e)?vn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||x.call(e,o))&&!(a&&(o=="length"||_r(o,n)))&&r.push(o);return r}function xt(e,t,r){var n=e[t];(!(x.call(e,t)&&Jt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function he(e,t){for(var r=e.length;r--;)if(Jt(e[r][0],t))return r;return-1}function fr(e,t){return e&&Ft(t,He(t),e)}function _e(e,t,r,n,a,o,u){var l;if(n&&(l=o?n(e,a,o,u):n(e)),l!==void 0)return l;if(!pe(e))return e;var c=Fe(e);if(c){if(l=Ir(e),!t)return Dr(e,l)}else{var s=F(e),d=s==Re||s==bt;if(Fr(e))return Tr(e,t);if(s==Me||s==Ve||d&&!o){if(Mt(e))return o?e:{};if(l=vr(d?{}:e),!t)return Cr(e,fr(l,e))}else{if(!O[s])return o?e:{};l=Nr(e,s,_e,t)}}u||(u=new G);var p=u.get(e);if(p)return p;if(u.set(e,l),!c)var T=r?Ar(e):He(e);return An(T||e,function(m,f){T&&(f=m,m=e[f]),xt(l,f,_e(m,t,r,n,f,e,u))}),l}function hr(e){return pe(e)?Pn(e):{}}function $r(e,t,r){var n=t(e);return Fe(e)?n:In(n,r(e))}function pr(e){return fe.call(e)}function dr(e){if(!pe(e)||Rr(e))return!1;var t=kt(e)||Mt(e)?Rn:En;return t.test(W(e))}function br(e){if(!Wt(e))return Wn(e);var t=[];for(var r in Object(e))x.call(e,r)&&r!="constructor"&&t.push(r);return t}function Tr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function xe(e){var t=new e.constructor(e.byteLength);return new gt(t).set(new gt(e)),t}function yr(e,t){var r=t?xe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Er(e,t,r){var n=t?r(ot(e),!0):ot(e);return Rt(n,Dn,new e.constructor)}function Sr(e){var t=new e.constructor(e.source,yn.exec(e));return t.lastIndex=e.lastIndex,t}function Or(e,t,r){var n=t?r(st(e),!0):st(e);return Rt(n,Cn,new e.constructor)}function wr(e){return ft?Object(ft.call(e)):{}}function Lr(e,t){var r=t?xe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Dr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Ft(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],l=n?n(r[u],e[u],u,r,e):void 0;xt(r,u,l===void 0?e[u]:l)}return r}function Cr(e,t){return Ft(e,Ht(e),t)}function Ar(e){return $r(e,He,Ht)}function $e(e,t){var r=e.__data__;return Vr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function q(e,t){var r=Nn(e,t);return dr(r)?r:void 0}var Ht=ct?Pe(ct,Object):Jr,F=pr;(Ae&&F(new Ae(new ArrayBuffer(1)))!=ce||re&&F(new re)!=ue||Ie&&F(Ie.resolve())!=rt||ve&&F(new ve)!=ge||Ne&&F(new Ne)!=Ce)&&(F=function(e){var t=fe.call(e),r=t==Me?e.constructor:void 0,n=r?W(r):void 0;if(n)switch(n){case Jn:return ce;case jn:return ue;case kn:return rt;case Un:return ge;case Bn:return Ce}return t});function Ir(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&x.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function vr(e){return typeof e.constructor=="function"&&!Wt(e)?hr(Mn(e)):{}}function Nr(e,t,r,n){var a=e.constructor;switch(t){case Ot:return xe(e);case pt:case dt:return new a(+e);case ce:return yr(e,n);case wt:case Lt:case Dt:case Ct:case At:case It:case vt:case Nt:case _t:return Lr(e,n);case ue:return Er(e,n,r);case Tt:case Et:return new a(e);case yt:return Sr(e);case ge:return Or(e,n,r);case St:return wr(e)}}function _r(e,t){return t=t==null?$t:t,!!t&&(typeof e=="number"||Sn.test(e))&&e>-1&&e%1==0&&e<t}function Vr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Rr(e){return!!lt&&lt in e}function Wt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||me;return e===r}function W(e){if(e!=null){try{return Pt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Mr(e){return _e(e,!0,!0)}function Jt(e,t){return e===t||e!==e&&t!==t}function Pr(e){return xr(e)&&x.call(e,"callee")&&(!xn.call(e,"callee")||fe.call(e)==Ve)}var Fe=Array.isArray;function jt(e){return e!=null&&Hr(e.length)&&!kt(e)}function xr(e){return Wr(e)&&jt(e)}var Fr=Hn||jr;function kt(e){var t=pe(e)?fe.call(e):"";return t==Re||t==bt}function Hr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$t}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Wr(e){return!!e&&typeof e=="object"}function He(e){return jt(e)?mr(e):br(e)}function Jr(){return[]}function jr(){return!1}U.exports=Mr});var Yr={};on(Yr,{crush:()=>Kr,defaults:()=>Gt,version:()=>qr});var an={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function Se(e,t){if(!Array.isArray(e)||!e.length)return e;let r=S(S({},an),t),n,a;if(r.strictlyTwoElementsInRangeArrays&&!e.every((l,c)=>!Array.isArray(l)||l.length!==2?(n=c,a=l.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${n}th range (${JSON.stringify(e[n],null,4)}) has not two but ${a} elements!`);if(!e.every((l,c)=>!Array.isArray(l)||!Number.isInteger(l[0])||l[0]<0||!Number.isInteger(l[1])||l[1]<0?(n=c,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${n}th range (${JSON.stringify(e[n],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,u=0;return Array.from(e).sort((l,c)=>(r.progressFn&&(u+=1,r.progressFn(Math.floor(u*100/o))),l[0]===c[0]?l[1]<c[1]?-1:l[1]>c[1]?1:0:l[0]<c[0]?-1:1))}var Ge={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function qe(e,t){function r(s){return!!s&&typeof s=="object"&&!Array.isArray(s)}if(!Array.isArray(e)||!e.length)return null;let n;if(t)if(r(t)){if(n=S(S({},Ge),t),n.progressFn&&r(n.progressFn)&&!Object.keys(n.progressFn).length)n.progressFn=null;else if(n.progressFn&&typeof n.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn,null,4)}`);if(![1,2,"1","2"].includes(n.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType,null,4)}`);if(typeof n.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
11
11
  ${JSON.stringify(t,null,4)} (type ${typeof t})`);else n=S({},Ge);let a=e.filter(s=>Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,u,l;n.progressFn?o=Se(a,{progressFn:s=>{l=Math.floor(s/5),l!==u&&(u=l,n.progressFn(l))}}):o=Se(a);let c=o.length-1;for(let s=c;s>0;s--)n.progressFn&&(l=Math.floor((1-s/c)*78)+21,l!==u&&l>u&&(u=l,n.progressFn(l))),(o[s][0]<=o[s-1][0]||!n.joinRangesThatTouchEdges&&o[s][0]<o[s-1][1]||n.joinRangesThatTouchEdges&&o[s][0]<=o[s-1][1])&&(o[s-1][0]=Math.min(o[s][0],o[s-1][0]),o[s-1][1]=Math.max(o[s][1],o[s-1][1]),o[s][2]!==void 0&&(o[s-1][0]>=o[s][0]||o[s-1][1]<=o[s][1])&&o[s-1][2]!==null&&(o[s][2]===null&&o[s-1][2]!==null?o[s-1][2]=null:o[s-1][2]!=null?+n.mergeType==2&&o[s-1][0]===o[s][0]?o[s-1][2]=o[s][2]:o[s-1][2]+=o[s][2]:o[s-1][2]=o[s][2]),o.splice(s,1),s=o.length);return o.length?o:null}var un=!0,Oe="Invariant failed";function Ke(e,t){if(!e){if(un)throw new Error(Oe);var r=typeof t=="function"?t():t,n=r?"".concat(Oe,": ").concat(r):Oe;throw new Error(n)}}function Ye(e,t,r){let n=0,a=0;if(arguments.length===0)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if(typeof e!="string")throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(t&&!Array.isArray(t))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(r&&typeof r!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!t||!t.filter(d=>d).length)return e;let o;Array.isArray(t)&&Number.isInteger(t[0])&&Number.isInteger(t[1])?o=[Array.from(t)]:o=Array.from(t);let u=o.length,l=0;o.filter(d=>d).forEach((d,p)=>{if(r&&(n=Math.floor(l/u*10),n!==a&&(a=n,r(n))),!Array.isArray(d))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${p}th element not an array: ${JSON.stringify(d,null,4)}, which is ${typeof d}`);if(!Number.isInteger(d[0])){if(!Number.isInteger(+d[0])||+d[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its first element is not an integer, string index, but ${typeof d[0]}, equal to: ${JSON.stringify(d[0],null,4)}.`);o[p][0]=+o[p][0]}if(!Number.isInteger(d[1])){if(!Number.isInteger(+d[1])||+d[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its second element is not an integer, string index, but ${typeof d[1]}, equal to: ${JSON.stringify(d[1],null,4)}.`);o[p][1]=+o[p][1]}l+=1});let c=qe(o,{progressFn:d=>{r&&(n=10+Math.floor(d/10),n!==a&&(a=n,r(n)))}});Ke(c);let s=c.length;if(s>0){let d=e.slice(c[s-1][1]);e=c.reduce((p,T,m,f)=>{r&&(n=20+Math.floor(m/s*80),n!==a&&(a=n,r(n)));let w=m===0?0:f[m-1][1],L=f[m][0];return`${p}${e.slice(w,L)}${f[m][2]||""}`},""),e+=d}return e}function se(e,t=1){let r="\xA0";function n(o){return Array.from(o).reverse().join("")}function a(o,u,l){let c=l?`
12
12
  `:"\r",s=l?"\r":`
13
13
  `;if(!o)return o;let d=0,p=0,T="";for(let m=0,f=o.length;m<f;m++)(o[m]===c||o[m]===s&&o[m-1]!==c)&&p++,`\r
@@ -18,13 +18,13 @@ ${JSON.stringify(r,null,4)}`);let u,l;if(le(n))u=[n];else if(Array.isArray(n))u=
18
18
  ${JSON.stringify(n,null,4)}`);if(a&&!et(a))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof a}", and equal to:
19
19
  ${JSON.stringify(a,null,4)}`);let c=0,s="";if(o!=null&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.some((T,m)=>T.length>1?(c=m,s=T,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${c} is longer than 1 character, ${s.length} (equals to ${s}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&le(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let m,f=r;if((e==="matchLeftIncl"||e==="matchRight")&&(f+=1),e[5]==="L")for(let h=f;h--;){let $=t[h];if((!o.trimBeforeMatching||o.trimBeforeMatching&&$!==void 0&&$.trim())&&(!((d=o.trimCharsBeforeMatching)!=null&&d.length)||$!==void 0&&!o.trimCharsBeforeMatching.includes($))){m=h;break}}else if(e.startsWith("matchRight"))for(let h=f;h<t.length;h++){let $=t[h];if((!o.trimBeforeMatching||o.trimBeforeMatching&&$.trim())&&(!((p=o.trimCharsBeforeMatching)!=null&&p.length)||!o.trimCharsBeforeMatching.includes($))){m=h;break}}if(m===void 0)return!1;let w=t[m],L=m+1,b="";return L&&L>0&&(b=t.slice(0,L)),e[5]==="L"||m&&m>0&&(b=t.slice(m)),o.cb(w,b,m)}let T="";throw a||(T=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${T}`)}for(let T=0,m=u.length;T<m;T++){l=typeof u[T]=="function";let f=u[T],w,L,b="",h=r;e==="matchRight"?h+=1:e==="matchLeft"&&(h-=1);let $=hn(t,h,f,o,l,y=>e[5]==="L"?y-1:y+1);if($&&l&&typeof f=="function"&&f()==="EOL")return f()&&(!o.cb||o.cb(w,b,L))?f():!1;if(Number.isInteger($)&&(L=e.startsWith("matchLeft")?$-1:$+1,e[5]==="L"?b=t.slice(0,$):b=t.slice(L)),L<0&&(L=void 0),t[L]&&(w=t[L]),Number.isInteger($)&&(!o.cb||o.cb(w,b,L)))return f}return!1}function nt(e,t,r,n){return we("matchLeft",e,t,r,n)}function Le(e,t,r,n){return we("matchRightIncl",e,t,r,n)}function k(e,t,r,n){return we("matchRight",e,t,r,n)}var $n={str:"",from:0,to:0,ifLeftSideIncludesThisThenCropTightly:"",ifLeftSideIncludesThisCropItToo:"",ifRightSideIncludesThisThenCropTightly:"",ifRightSideIncludesThisCropItToo:"",extendToOneSide:!1,wipeAllWhitespaceOnLeft:!1,wipeAllWhitespaceOnRight:!1,addSingleSpaceToPreventAccidentalConcatenation:!1};function ae(e){var c;let t=/^[0-9a-zA-Z]+$/;function r(s){return!s||typeof s!="string"?!1:!s.trim()}function n(s){return typeof s=="string"}if(!e||typeof e!="object"||Array.isArray(e)){let s;throw e===void 0?s="but it is missing completely.":e===null?s="but it was given as null.":s=`but it was given as ${typeof e}, equal to:
20
20
  ${JSON.stringify(e,null,4)}.`,new Error(`string-range-expander: [THROW_ID_01] Input must be a plain object ${s}`)}else if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&!Object.keys(e).length)throw new Error("string-range-expander: [THROW_ID_02] Input must be a plain object but it was given as a plain object without any keys.");if(typeof e.from!="number")throw new Error(`string-range-expander: [THROW_ID_03] The input's "from" value resolvedOpts.from, is not a number! Currently it's given as ${typeof e.from}, equal to ${JSON.stringify(e.from,null,0)}`);if(typeof e.to!="number")throw new Error(`string-range-expander: [THROW_ID_04] The input's "to" value resolvedOpts.to, is not a number! Currently it's given as ${typeof e.to}, equal to ${JSON.stringify(e.to,null,0)}`);if(e!=null&&e.str&&!e.str[e.from]&&e.from!==e.to)throw new Error(`string-range-expander: [THROW_ID_05] The given input string resolvedOpts.str ("${e.str}") must contain the character at index "from" ("${e.from}")`);if(e!=null&&e.str&&!e.str[e.to-1])throw new Error(`string-range-expander: [THROW_ID_06] The given input string, resolvedOpts.str ("${e.str}") must contain the character at index before "to" ("${e.to-1}")`);if(e.from>e.to)throw new Error(`string-range-expander: [THROW_ID_07] The given "from" index, "${e.from}" is greater than "to" index, "${e.to}". That's wrong!`);if(n(e.extendToOneSide)&&e.extendToOneSide!=="left"&&e.extendToOneSide!=="right"||!n(e.extendToOneSide)&&e.extendToOneSide!==void 0&&e.extendToOneSide!==!1)throw new Error(`string-range-expander: [THROW_ID_08] The resolvedOpts.extendToOneSide value is not recognisable! It's set to: "${e.extendToOneSide}" (${typeof e.extendToOneSide}). It has to be either Boolean "false" or strings "left" or "right"`);let a=S(S({},$n),e);if(Array.isArray(a.ifLeftSideIncludesThisThenCropTightly)){let s,d;if(a.ifLeftSideIncludesThisThenCropTightly.every((p,T)=>n(p)?!0:(s=T,d=p,!1)))a.ifLeftSideIncludesThisThenCropTightly=a.ifLeftSideIncludesThisThenCropTightly.join("");else throw new Error(`string-range-expander: [THROW_ID_09] The resolvedOpts.ifLeftSideIncludesThisThenCropTightly was set to an array:
21
- ${JSON.stringify(a.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that array contains not only string elements. For example, an element at index ${s} is of a type ${typeof d} (equal to ${JSON.stringify(d,null,0)}).`)}let o=a.str,u=a.from,l=a.to;if(a.extendToOneSide!=="right"&&(r(o[u-1])&&(r(o[u-2])||a.ifLeftSideIncludesThisCropItToo.includes(o[u-2]))||o[u-1]&&a.ifLeftSideIncludesThisCropItToo.includes(o[u-1])||a.wipeAllWhitespaceOnLeft&&r(o[u-1]))){for(let s=u;s--;)if(!a.ifLeftSideIncludesThisCropItToo.includes(o[s])){if(o[s].trim()){a.wipeAllWhitespaceOnLeft||a.ifLeftSideIncludesThisCropItToo.includes(o[s+1])?u=s+1:u=s+2;break}else if(s===0){a.wipeAllWhitespaceOnLeft?u=0:u=1;break}}}if(a.extendToOneSide!=="left"&&(r(o[l])&&(a.wipeAllWhitespaceOnRight||r(o[l+1]))||a.ifRightSideIncludesThisCropItToo.includes(o[l]))){for(let s=l,d=o.length;s<d;s++)if(!a.ifRightSideIncludesThisCropItToo.includes(o[s])&&((c=o[s])!=null&&c.trim())){a.wipeAllWhitespaceOnRight||a.ifRightSideIncludesThisCropItToo.includes(o[s-1])?l=s:l=s-1;break}}return(a.extendToOneSide!=="right"&&n(a.ifLeftSideIncludesThisThenCropTightly)&&a.ifLeftSideIncludesThisThenCropTightly&&(o[u-2]&&a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-2])||o[u-1]&&a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-1]))||a.extendToOneSide!=="left"&&n(a.ifRightSideIncludesThisThenCropTightly)&&a.ifRightSideIncludesThisThenCropTightly&&(o[l+1]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l+1])||o[l]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l])))&&(a.extendToOneSide!=="right"&&r(o[u-1])&&!a.wipeAllWhitespaceOnLeft&&(u-=1),a.extendToOneSide!=="left"&&r(o[l])&&!a.wipeAllWhitespaceOnRight&&(l+=1)),a.addSingleSpaceToPreventAccidentalConcatenation&&o[u-1]&&o[u-1].trim()&&o[l]&&o[l].trim()&&(!a.ifLeftSideIncludesThisThenCropTightly&&!a.ifRightSideIncludesThisThenCropTightly||!((!a.ifLeftSideIncludesThisThenCropTightly||a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-1]))&&(!a.ifRightSideIncludesThisThenCropTightly||o[l]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l]))))&&(t.test(o[u-1])||t.test(o[l]))?[u,l," "]:[u,l]}var kr=sn(Bt(),1);var K="\xA0";function Br({str:e,idx:t=0,stopAtNewlines:r=!1,stopAtRawNbsp:n=!1}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),!e[t+1]))return null;if(e[t+1]&&(e[t+1].trim()||r&&`
21
+ ${JSON.stringify(a.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that array contains not only string elements. For example, an element at index ${s} is of a type ${typeof d} (equal to ${JSON.stringify(d,null,0)}).`)}let o=a.str,u=a.from,l=a.to;if(a.extendToOneSide!=="right"&&(r(o[u-1])&&(r(o[u-2])||a.ifLeftSideIncludesThisCropItToo.includes(o[u-2]))||o[u-1]&&a.ifLeftSideIncludesThisCropItToo.includes(o[u-1])||a.wipeAllWhitespaceOnLeft&&r(o[u-1]))){for(let s=u;s--;)if(!a.ifLeftSideIncludesThisCropItToo.includes(o[s])){if(o[s].trim()){a.wipeAllWhitespaceOnLeft||a.ifLeftSideIncludesThisCropItToo.includes(o[s+1])?u=s+1:u=s+2;break}else if(s===0){a.wipeAllWhitespaceOnLeft?u=0:u=1;break}}}if(a.extendToOneSide!=="left"&&(r(o[l])&&(a.wipeAllWhitespaceOnRight||r(o[l+1]))||a.ifRightSideIncludesThisCropItToo.includes(o[l]))){for(let s=l,d=o.length;s<d;s++)if(!a.ifRightSideIncludesThisCropItToo.includes(o[s])&&((c=o[s])!=null&&c.trim())){a.wipeAllWhitespaceOnRight||a.ifRightSideIncludesThisCropItToo.includes(o[s-1])?l=s:l=s-1;break}}return(a.extendToOneSide!=="right"&&n(a.ifLeftSideIncludesThisThenCropTightly)&&a.ifLeftSideIncludesThisThenCropTightly&&(o[u-2]&&a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-2])||o[u-1]&&a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-1]))||a.extendToOneSide!=="left"&&n(a.ifRightSideIncludesThisThenCropTightly)&&a.ifRightSideIncludesThisThenCropTightly&&(o[l+1]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l+1])||o[l]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l])))&&(a.extendToOneSide!=="right"&&r(o[u-1])&&!a.wipeAllWhitespaceOnLeft&&(u-=1),a.extendToOneSide!=="left"&&r(o[l])&&!a.wipeAllWhitespaceOnRight&&(l+=1)),a.addSingleSpaceToPreventAccidentalConcatenation&&o[u-1]&&o[u-1].trim()&&o[l]&&o[l].trim()&&(!a.ifLeftSideIncludesThisThenCropTightly&&!a.ifRightSideIncludesThisThenCropTightly||!((!a.ifLeftSideIncludesThisThenCropTightly||a.ifLeftSideIncludesThisThenCropTightly.includes(o[u-1]))&&(!a.ifRightSideIncludesThisThenCropTightly||o[l]&&a.ifRightSideIncludesThisThenCropTightly.includes(o[l]))))&&(t.test(o[u-1])||t.test(o[l]))?[u,l," "]:[u,l]}var kr=sn(Ut(),1);var K="\xA0";function Ur({str:e,idx:t=0,stopAtNewlines:r=!1,stopAtRawNbsp:n=!1}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),!e[t+1]))return null;if(e[t+1]&&(e[t+1].trim()||r&&`
22
22
  \r`.includes(e[t+1])||n&&e[t+1]===K))return t+1;if(e[t+2]&&(e[t+2].trim()||r&&`
23
23
  \r`.includes(e[t+2])||n&&e[t+2]===K))return t+2;for(let a=t+1,o=e.length;a<o;a++)if(e[a].trim()||r&&`
24
- \r`.includes(e[a])||n&&e[a]===K)return a;return null}function D(e,t=0){return Br({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Ur({str:e,idx:t,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||r&&`
24
+ \r`.includes(e[a])||n&&e[a]===K)return a;return null}function D(e,t=0){return Ur({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Br({str:e,idx:t,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||r&&`
25
25
  \r`.includes(e[~-t])||n&&e[~-t]===K))return~-t;if(e[t-2]&&(e[t-2].trim()||r&&`
26
26
  \r`.includes(e[t-2])||n&&e[t-2]===K))return t-2;for(let a=t;a--;)if(e[a]&&(e[a].trim()||r&&`
27
- \r`.includes(e[a])||n&&e[a]===K))return a;return null}function de(e,t=0){return Ur({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var Ut="6.0.3";var qr=Ut,E=new ze({limitToBeAddedWhitespace:!0}),Gt={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","<\/script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function Y(e){return typeof e=="string"}function X(e){return typeof e=="string"&&e.toUpperCase()!==e.toLowerCase()}function Kr(e,t){let r=Date.now();if(!Y(e))throw e===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof e}", equal to:
27
+ \r`.includes(e[a])||n&&e[a]===K))return a;return null}function de(e,t=0){return Br({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var Bt="6.0.5";var qr=Bt,E=new ze({limitToBeAddedWhitespace:!0}),Gt={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","<\/script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function Y(e){return typeof e=="string"}function X(e){return typeof e=="string"&&e.toUpperCase()!==e.toLowerCase()}function Kr(e,t){let r=Date.now();if(!Y(e))throw e===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof e}", equal to:
28
28
  ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`html-crush: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof t}, equal to ${JSON.stringify(t,null,4)}`);if(t&&Array.isArray(t.breakToTheLeftOf)&&t.breakToTheLeftOf.length){for(let i=0,Z=t.breakToTheLeftOf.length;i<Z;i++)if(!Y(t.breakToTheLeftOf[i]))throw new TypeError(`html-crush: [THROW_ID_05] the resolvedOpts.breakToTheLeftOf array contains non-string elements! For example, element at index ${i} is of a type "${typeof t.breakToTheLeftOf[i]}" and is equal to:
29
29
  ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Gt),t);typeof n.removeHTMLComments=="boolean"&&(n.removeHTMLComments=n.removeHTMLComments?1:0);let a="";Array.isArray(n.breakToTheLeftOf)&&n.breakToTheLeftOf.length&&(a=[...new Set(n.breakToTheLeftOf.map(i=>i[0]))].join(""));let o={removeHTMLComments:!1,removeCSSComments:!1},u=null,l=null,c=!1,s=0,d=0,p=!1,T=!1,m=null,f=null,w=null,L=null,b,h=null,$=null,y=null,C=null,I=null,V=null,Q=">};",z="<",qt="!",Kt=">",Yt="<",We="{},:;<>~+",be=We,Te=We,J=!0,v=e.length,Xt=Math.floor(v/2),Je=.01,je;n.reportProgressFunc&&(je=Math.floor(n.reportProgressFuncTo-(n.reportProgressFuncTo-n.reportProgressFuncFrom)*Je-n.reportProgressFuncFrom));let R,oe=0,A=`
30
30
  `;if(e.includes(`\r
@@ -90,7 +90,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Gt),t);typeof n.r
90
90
  /**
91
91
  * @name string-match-left-right
92
92
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
93
- * @version 9.0.3
93
+ * @version 9.0.5
94
94
  * @author Roy Revelt, Codsen Ltd
95
95
  * @license MIT
96
96
  * {@link https://codsen.com/os/string-match-left-right/}
@@ -106,7 +106,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Gt),t);typeof n.r
106
106
  /**
107
107
  * @name codsen-utils
108
108
  * @fileoverview Various utility functions
109
- * @version 1.0.1
109
+ * @version 1.1.1
110
110
  * @author Roy Revelt, Codsen Ltd
111
111
  * @license MIT
112
112
  * {@link https://codsen.com/os/codsen-utils/}
@@ -114,7 +114,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Gt),t);typeof n.r
114
114
  /**
115
115
  * @name string-left-right
116
116
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
117
- * @version 6.0.3
117
+ * @version 6.0.5
118
118
  * @author Roy Revelt, Codsen Ltd
119
119
  * @license MIT
120
120
  * {@link https://codsen.com/os/string-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-crush",
3
- "version": "6.0.3",
3
+ "version": "6.0.5",
4
4
  "description": "Minify email templates",
5
5
  "keywords": [
6
6
  "breaks",
@@ -82,9 +82,9 @@
82
82
  "dependencies": {
83
83
  "ranges-apply": "^7.0.3",
84
84
  "ranges-push": "^7.0.3",
85
- "string-left-right": "^6.0.3",
86
- "string-match-left-right": "^9.0.3",
85
+ "string-left-right": "^6.0.5",
86
+ "string-match-left-right": "^9.0.5",
87
87
  "string-range-expander": "^4.0.3",
88
- "test-mixer": "^4.1.0"
88
+ "test-mixer": "^4.1.2"
89
89
  }
90
90
  }