html-crush 5.1.0 → 5.1.1

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # html-crush
2
2
 
3
- > A non-parsing, mixed-HTML email-template minifier
3
+ > Minify email templates
4
4
 
5
5
  <div class="package-badges">
6
6
  <a href="https://www.npmjs.com/package/html-crush" rel="nofollow noreferrer noopener">
@@ -55,10 +55,9 @@ assert.equal(
55
55
  );
56
56
  ```
57
57
 
58
-
59
58
  ## Documentation
60
59
 
61
- Please [visit codsen.com](https://codsen.com/os/html-crush/) for a full description of the API.
60
+ Please [visit codsen.com](https://codsen.com/os/html-crush/) for a full description of the API. Also, try the [GUI playground](https://codsen.com/os/html-crush/play).
62
61
 
63
62
  ## Contributing
64
63
 
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name html-crush
3
3
  * @fileoverview Minify email templates
4
- * @version 5.1.0
4
+ * @version 5.1.1
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="5.1.0";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 N(n){return typeof n=="string"}function A(n){return typeof n=="string"&&n.toUpperCase()!==n.toLowerCase()}function ce(n,E){let W=Date.now();if(!N(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="5.1.1";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 N(n){return typeof n=="string"}function A(n){return typeof n=="string"&&n.toUpperCase()!==n.toLowerCase()}function ce(n,E){let W=Date.now();if(!N(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(!N(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="<",B="{},:;<>~+",k=B,J=B,C=!0,h=n.length,Q=Math.floor(h/2),x=.01,j;l.reportProgressFunc&&(j=Math.floor(l.reportProgressFuncTo-(l.reportProgressFuncTo-l.reportProgressFuncFrom)*x-l.reportProgressFuncFrom));let d,R=0,b=`
13
13
  `;if(n.includes(`\r
@@ -1,13 +1,13 @@
1
- "use strict";/**
1
+ /**
2
2
  * @name html-crush
3
3
  * @fileoverview Minify email templates
4
- * @version 5.1.0
4
+ * @version 5.1.1
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
- var htmlCrush=(()=>{var on=Object.create;var ee=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var ln=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,an=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty,un=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))un.call(t,r)&&ye(e,r,t[r]);return e};var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Ge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ln(t))!Be.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(n=sn(t,a))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?on(an(e)):{},Ge(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),cn=e=>Ge(ee({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var at=Ue((Ai,lt)=>{var yn="[object Object]";function En(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Sn(e,t){return function(r){return e(t(r))}}var On=Function.prototype,ot=Object.prototype,st=On.toString,wn=ot.hasOwnProperty,Ln=st.call(Object),Dn=ot.toString,An=Sn(Object.getPrototypeOf,Object);function Cn(e){return!!e&&typeof e=="object"}function In(e){if(!Cn(e)||Dn.call(e)!=yn||En(e))return!1;var t=An(e);if(t===null)return!0;var r=wn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&st.call(r)==Ln}lt.exports=In});var Xt=Ue((ne,B)=>{var vn=200,yt="__lodash_hash_undefined__",Et=9007199254740991,Ve="[object Arguments]",_n="[object Array]",St="[object Boolean]",Ot="[object Date]",Nn="[object Error]",Re="[object Function]",wt="[object GeneratorFunction]",ue="[object Map]",Lt="[object Number]",Me="[object Object]",ut="[object Promise]",Dt="[object RegExp]",ge="[object Set]",At="[object String]",Ct="[object Symbol]",Ae="[object WeakMap]",It="[object ArrayBuffer]",ce="[object DataView]",vt="[object Float32Array]",_t="[object Float64Array]",Nt="[object Int8Array]",Vt="[object Int16Array]",Rt="[object Int32Array]",Mt="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Ht="[object Uint16Array]",Ft="[object Uint32Array]",Vn=/[\\^$.*+?()[\]{}|]/g,Rn=/\w*$/,Mn=/^\[object .+?Constructor\]$/,Pn=/^(?:0|[1-9]\d*)$/,O={};O[Ve]=O[_n]=O[It]=O[ce]=O[St]=O[Ot]=O[vt]=O[_t]=O[Nt]=O[Vt]=O[Rt]=O[ue]=O[Lt]=O[Me]=O[Dt]=O[ge]=O[At]=O[Ct]=O[Mt]=O[Pt]=O[Ht]=O[Ft]=!0;O[Nn]=O[Re]=O[Ae]=!1;var Hn=typeof global=="object"&&global&&global.Object===Object&&global,Fn=typeof self=="object"&&self&&self.Object===Object&&self,_=Hn||Fn||Function("return this")(),xt=typeof ne=="object"&&ne&&!ne.nodeType&&ne,gt=xt&&typeof B=="object"&&B&&!B.nodeType&&B,xn=gt&&gt.exports===xt;function Wn(e,t){return e.set(t[0],t[1]),e}function jn(e,t){return e.add(t),e}function Jn(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function kn(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Wt(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 Bn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Un(e,t){return e==null?void 0:e[t]}function jt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function ct(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 ft(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Gn=Array.prototype,qn=Function.prototype,fe=Object.prototype,De=_["__core-js_shared__"],mt=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Jt=qn.toString,H=fe.hasOwnProperty,me=fe.toString,Kn=RegExp("^"+Jt.call(H).replace(Vn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=xn?_.Buffer:void 0,$t=_.Symbol,pt=_.Uint8Array,Yn=Pe(Object.getPrototypeOf,Object),Xn=Object.create,zn=fe.propertyIsEnumerable,Zn=Gn.splice,dt=Object.getOwnPropertySymbols,Qn=ht?ht.isBuffer:void 0,er=Pe(Object.keys,Object),Ce=q(_,"DataView"),re=q(_,"Map"),Ie=q(_,"Promise"),ve=q(_,"Set"),_e=q(_,"WeakMap"),ie=q(Object,"create"),tr=W(Ce),nr=W(re),rr=W(Ie),ir=W(ve),or=W(_e),bt=$t?$t.prototype:void 0,Tt=bt?bt.valueOf:void 0;function x(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 sr(){this.__data__=ie?ie(null):{}}function lr(e){return this.has(e)&&delete this.__data__[e]}function ar(e){var t=this.__data__;if(ie){var r=t[e];return r===yt?void 0:r}return H.call(t,e)?t[e]:void 0}function ur(e){var t=this.__data__;return ie?t[e]!==void 0:H.call(t,e)}function gr(e,t){var r=this.__data__;return r[e]=ie&&t===void 0?yt:t,this}x.prototype.clear=sr;x.prototype.delete=lr;x.prototype.get=ar;x.prototype.has=ur;x.prototype.set=gr;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 cr(){this.__data__=[]}function fr(e){var t=this.__data__,r=he(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Zn.call(t,r,1),!0}function mr(e){var t=this.__data__,r=he(t,e);return r<0?void 0:t[r][1]}function hr(e){return he(this.__data__,e)>-1}function $r(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=cr;N.prototype.delete=fr;N.prototype.get=mr;N.prototype.has=hr;N.prototype.set=$r;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 pr(){this.__data__={hash:new x,map:new(re||N),string:new x}}function dr(e){return $e(this,e).delete(e)}function br(e){return $e(this,e).get(e)}function Tr(e){return $e(this,e).has(e)}function yr(e,t){return $e(this,e).set(e,t),this}U.prototype.clear=pr;U.prototype.delete=dr;U.prototype.get=br;U.prototype.has=Tr;U.prototype.set=yr;function G(e){this.__data__=new N(e)}function Er(){this.__data__=new N}function Sr(e){return this.__data__.delete(e)}function Or(e){return this.__data__.get(e)}function wr(e){return this.__data__.has(e)}function Lr(e,t){var r=this.__data__;if(r instanceof N){var n=r.__data__;if(!re||n.length<vn-1)return n.push([e,t]),this;r=this.__data__=new U(n)}return r.set(e,t),this}G.prototype.clear=Er;G.prototype.delete=Sr;G.prototype.get=Or;G.prototype.has=wr;G.prototype.set=Lr;function Dr(e,t){var r=Fe(e)||Xr(e)?Bn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||H.call(e,o))&&!(a&&(o=="length"||Gr(o,n)))&&r.push(o);return r}function kt(e,t,r){var n=e[t];(!(H.call(e,t)&&qt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function he(e,t){for(var r=e.length;r--;)if(qt(e[r][0],t))return r;return-1}function Ar(e,t){return e&&Bt(t,xe(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=Fe(e);if(c){if(l=kr(e),!t)return Wr(e,l)}else{var s=F(e),$=s==Re||s==wt;if(Zr(e))return Vr(e,t);if(s==Me||s==Ve||$&&!o){if(jt(e))return o?e:{};if(l=Br($?{}:e),!t)return jr(e,Ar(l,e))}else{if(!O[s])return o?e:{};l=Ur(e,s,Ne,t)}}u||(u=new G);var h=u.get(e);if(h)return h;if(u.set(e,l),!c)var T=r?Jr(e):xe(e);return Jn(T||e,function(m,f){T&&(f=m,m=e[f]),kt(l,f,Ne(m,t,r,n,f,e,u))}),l}function Cr(e){return pe(e)?Xn(e):{}}function Ir(e,t,r){var n=t(e);return Fe(e)?n:kn(n,r(e))}function vr(e){return me.call(e)}function _r(e){if(!pe(e)||Kr(e))return!1;var t=Yt(e)||jt(e)?Kn:Mn;return t.test(W(e))}function Nr(e){if(!Gt(e))return er(e);var t=[];for(var r in Object(e))H.call(e,r)&&r!="constructor"&&t.push(r);return t}function Vr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function He(e){var t=new e.constructor(e.byteLength);return new pt(t).set(new pt(e)),t}function Rr(e,t){var r=t?He(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Mr(e,t,r){var n=t?r(ct(e),!0):ct(e);return Wt(n,Wn,new e.constructor)}function Pr(e){var t=new e.constructor(e.source,Rn.exec(e));return t.lastIndex=e.lastIndex,t}function Hr(e,t,r){var n=t?r(ft(e),!0):ft(e);return Wt(n,jn,new e.constructor)}function Fr(e){return Tt?Object(Tt.call(e)):{}}function xr(e,t){var r=t?He(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Wr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Bt(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;kt(r,u,l===void 0?e[u]:l)}return r}function jr(e,t){return Bt(e,Ut(e),t)}function Jr(e){return Ir(e,xe,Ut)}function $e(e,t){var r=e.__data__;return qr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function q(e,t){var r=Un(e,t);return _r(r)?r:void 0}var Ut=dt?Pe(dt,Object):ti,F=vr;(Ce&&F(new Ce(new ArrayBuffer(1)))!=ce||re&&F(new re)!=ue||Ie&&F(Ie.resolve())!=ut||ve&&F(new ve)!=ge||_e&&F(new _e)!=Ae)&&(F=function(e){var t=me.call(e),r=t==Me?e.constructor:void 0,n=r?W(r):void 0;if(n)switch(n){case tr:return ce;case nr:return ue;case rr:return ut;case ir:return ge;case or:return Ae}return t});function kr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&H.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Br(e){return typeof e.constructor=="function"&&!Gt(e)?Cr(Yn(e)):{}}function Ur(e,t,r,n){var a=e.constructor;switch(t){case It:return He(e);case St:case Ot:return new a(+e);case ce:return Rr(e,n);case vt:case _t:case Nt:case Vt:case Rt:case Mt:case Pt:case Ht:case Ft:return xr(e,n);case ue:return Mr(e,n,r);case Lt:case At:return new a(e);case Dt:return Pr(e);case ge:return Hr(e,n,r);case Ct:return Fr(e)}}function Gr(e,t){return t=t==null?Et:t,!!t&&(typeof e=="number"||Pn.test(e))&&e>-1&&e%1==0&&e<t}function qr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kr(e){return!!mt&&mt in e}function Gt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fe;return e===r}function W(e){if(e!=null){try{return Jt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Yr(e){return Ne(e,!0,!0)}function qt(e,t){return e===t||e!==e&&t!==t}function Xr(e){return zr(e)&&H.call(e,"callee")&&(!zn.call(e,"callee")||me.call(e)==Ve)}var Fe=Array.isArray;function Kt(e){return e!=null&&Qr(e.length)&&!Yt(e)}function zr(e){return ei(e)&&Kt(e)}var Zr=Qn||ni;function Yt(e){var t=pe(e)?me.call(e):"";return t==Re||t==wt}function Qr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Et}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ei(e){return!!e&&typeof e=="object"}function xe(e){return Kt(e)?Dr(e):Nr(e)}function ti(){return[]}function ni(){return!1}B.exports=Yr});var gi={};gn(gi,{crush:()=>ui,defaults:()=>Zt,version:()=>ai});var fn={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function Se(e,t){if(!Array.isArray(e)||!e.length)return e;let r=S(S({},fn),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 Ke={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Ye(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({},Ke),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 on=Object.create;var ee=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var ln=Object.getOwnPropertyNames,ke=Object.getOwnPropertySymbols,an=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty,un=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))un.call(t,r)&&ye(e,r,t[r]);return e};var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Ge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ln(t))!Be.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(n=sn(t,a))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?on(an(e)):{},Ge(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),cn=e=>Ge(ee({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var at=Ue((Ai,lt)=>{var yn="[object Object]";function En(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Sn(e,t){return function(r){return e(t(r))}}var On=Function.prototype,ot=Object.prototype,st=On.toString,wn=ot.hasOwnProperty,Ln=st.call(Object),Dn=ot.toString,An=Sn(Object.getPrototypeOf,Object);function Cn(e){return!!e&&typeof e=="object"}function In(e){if(!Cn(e)||Dn.call(e)!=yn||En(e))return!1;var t=An(e);if(t===null)return!0;var r=wn.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&st.call(r)==Ln}lt.exports=In});var Xt=Ue((ne,B)=>{var vn=200,yt="__lodash_hash_undefined__",Et=9007199254740991,Ve="[object Arguments]",_n="[object Array]",St="[object Boolean]",Ot="[object Date]",Nn="[object Error]",Re="[object Function]",wt="[object GeneratorFunction]",ue="[object Map]",Lt="[object Number]",Me="[object Object]",ut="[object Promise]",Dt="[object RegExp]",ge="[object Set]",At="[object String]",Ct="[object Symbol]",Ae="[object WeakMap]",It="[object ArrayBuffer]",ce="[object DataView]",vt="[object Float32Array]",_t="[object Float64Array]",Nt="[object Int8Array]",Vt="[object Int16Array]",Rt="[object Int32Array]",Mt="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Ht="[object Uint16Array]",Ft="[object Uint32Array]",Vn=/[\\^$.*+?()[\]{}|]/g,Rn=/\w*$/,Mn=/^\[object .+?Constructor\]$/,Pn=/^(?:0|[1-9]\d*)$/,O={};O[Ve]=O[_n]=O[It]=O[ce]=O[St]=O[Ot]=O[vt]=O[_t]=O[Nt]=O[Vt]=O[Rt]=O[ue]=O[Lt]=O[Me]=O[Dt]=O[ge]=O[At]=O[Ct]=O[Mt]=O[Pt]=O[Ht]=O[Ft]=!0;O[Nn]=O[Re]=O[Ae]=!1;var Hn=typeof global=="object"&&global&&global.Object===Object&&global,Fn=typeof self=="object"&&self&&self.Object===Object&&self,_=Hn||Fn||Function("return this")(),xt=typeof ne=="object"&&ne&&!ne.nodeType&&ne,gt=xt&&typeof B=="object"&&B&&!B.nodeType&&B,xn=gt&&gt.exports===xt;function Wn(e,t){return e.set(t[0],t[1]),e}function jn(e,t){return e.add(t),e}function Jn(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function kn(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Wt(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 Bn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Un(e,t){return e==null?void 0:e[t]}function jt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function ct(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 ft(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Gn=Array.prototype,qn=Function.prototype,fe=Object.prototype,De=_["__core-js_shared__"],mt=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Jt=qn.toString,H=fe.hasOwnProperty,me=fe.toString,Kn=RegExp("^"+Jt.call(H).replace(Vn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=xn?_.Buffer:void 0,$t=_.Symbol,pt=_.Uint8Array,Yn=Pe(Object.getPrototypeOf,Object),Xn=Object.create,zn=fe.propertyIsEnumerable,Zn=Gn.splice,dt=Object.getOwnPropertySymbols,Qn=ht?ht.isBuffer:void 0,er=Pe(Object.keys,Object),Ce=q(_,"DataView"),re=q(_,"Map"),Ie=q(_,"Promise"),ve=q(_,"Set"),_e=q(_,"WeakMap"),ie=q(Object,"create"),tr=W(Ce),nr=W(re),rr=W(Ie),ir=W(ve),or=W(_e),bt=$t?$t.prototype:void 0,Tt=bt?bt.valueOf:void 0;function x(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 sr(){this.__data__=ie?ie(null):{}}function lr(e){return this.has(e)&&delete this.__data__[e]}function ar(e){var t=this.__data__;if(ie){var r=t[e];return r===yt?void 0:r}return H.call(t,e)?t[e]:void 0}function ur(e){var t=this.__data__;return ie?t[e]!==void 0:H.call(t,e)}function gr(e,t){var r=this.__data__;return r[e]=ie&&t===void 0?yt:t,this}x.prototype.clear=sr;x.prototype.delete=lr;x.prototype.get=ar;x.prototype.has=ur;x.prototype.set=gr;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 cr(){this.__data__=[]}function fr(e){var t=this.__data__,r=he(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Zn.call(t,r,1),!0}function mr(e){var t=this.__data__,r=he(t,e);return r<0?void 0:t[r][1]}function hr(e){return he(this.__data__,e)>-1}function $r(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=cr;N.prototype.delete=fr;N.prototype.get=mr;N.prototype.has=hr;N.prototype.set=$r;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 pr(){this.__data__={hash:new x,map:new(re||N),string:new x}}function dr(e){return $e(this,e).delete(e)}function br(e){return $e(this,e).get(e)}function Tr(e){return $e(this,e).has(e)}function yr(e,t){return $e(this,e).set(e,t),this}U.prototype.clear=pr;U.prototype.delete=dr;U.prototype.get=br;U.prototype.has=Tr;U.prototype.set=yr;function G(e){this.__data__=new N(e)}function Er(){this.__data__=new N}function Sr(e){return this.__data__.delete(e)}function Or(e){return this.__data__.get(e)}function wr(e){return this.__data__.has(e)}function Lr(e,t){var r=this.__data__;if(r instanceof N){var n=r.__data__;if(!re||n.length<vn-1)return n.push([e,t]),this;r=this.__data__=new U(n)}return r.set(e,t),this}G.prototype.clear=Er;G.prototype.delete=Sr;G.prototype.get=Or;G.prototype.has=wr;G.prototype.set=Lr;function Dr(e,t){var r=Fe(e)||Xr(e)?Bn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||H.call(e,o))&&!(a&&(o=="length"||Gr(o,n)))&&r.push(o);return r}function kt(e,t,r){var n=e[t];(!(H.call(e,t)&&qt(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function he(e,t){for(var r=e.length;r--;)if(qt(e[r][0],t))return r;return-1}function Ar(e,t){return e&&Bt(t,xe(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=Fe(e);if(c){if(l=kr(e),!t)return Wr(e,l)}else{var s=F(e),$=s==Re||s==wt;if(Zr(e))return Vr(e,t);if(s==Me||s==Ve||$&&!o){if(jt(e))return o?e:{};if(l=Br($?{}:e),!t)return jr(e,Ar(l,e))}else{if(!O[s])return o?e:{};l=Ur(e,s,Ne,t)}}u||(u=new G);var h=u.get(e);if(h)return h;if(u.set(e,l),!c)var T=r?Jr(e):xe(e);return Jn(T||e,function(m,f){T&&(f=m,m=e[f]),kt(l,f,Ne(m,t,r,n,f,e,u))}),l}function Cr(e){return pe(e)?Xn(e):{}}function Ir(e,t,r){var n=t(e);return Fe(e)?n:kn(n,r(e))}function vr(e){return me.call(e)}function _r(e){if(!pe(e)||Kr(e))return!1;var t=Yt(e)||jt(e)?Kn:Mn;return t.test(W(e))}function Nr(e){if(!Gt(e))return er(e);var t=[];for(var r in Object(e))H.call(e,r)&&r!="constructor"&&t.push(r);return t}function Vr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function He(e){var t=new e.constructor(e.byteLength);return new pt(t).set(new pt(e)),t}function Rr(e,t){var r=t?He(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Mr(e,t,r){var n=t?r(ct(e),!0):ct(e);return Wt(n,Wn,new e.constructor)}function Pr(e){var t=new e.constructor(e.source,Rn.exec(e));return t.lastIndex=e.lastIndex,t}function Hr(e,t,r){var n=t?r(ft(e),!0):ft(e);return Wt(n,jn,new e.constructor)}function Fr(e){return Tt?Object(Tt.call(e)):{}}function xr(e,t){var r=t?He(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Wr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Bt(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;kt(r,u,l===void 0?e[u]:l)}return r}function jr(e,t){return Bt(e,Ut(e),t)}function Jr(e){return Ir(e,xe,Ut)}function $e(e,t){var r=e.__data__;return qr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function q(e,t){var r=Un(e,t);return _r(r)?r:void 0}var Ut=dt?Pe(dt,Object):ti,F=vr;(Ce&&F(new Ce(new ArrayBuffer(1)))!=ce||re&&F(new re)!=ue||Ie&&F(Ie.resolve())!=ut||ve&&F(new ve)!=ge||_e&&F(new _e)!=Ae)&&(F=function(e){var t=me.call(e),r=t==Me?e.constructor:void 0,n=r?W(r):void 0;if(n)switch(n){case tr:return ce;case nr:return ue;case rr:return ut;case ir:return ge;case or:return Ae}return t});function kr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&H.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Br(e){return typeof e.constructor=="function"&&!Gt(e)?Cr(Yn(e)):{}}function Ur(e,t,r,n){var a=e.constructor;switch(t){case It:return He(e);case St:case Ot:return new a(+e);case ce:return Rr(e,n);case vt:case _t:case Nt:case Vt:case Rt:case Mt:case Pt:case Ht:case Ft:return xr(e,n);case ue:return Mr(e,n,r);case Lt:case At:return new a(e);case Dt:return Pr(e);case ge:return Hr(e,n,r);case Ct:return Fr(e)}}function Gr(e,t){return t=t==null?Et:t,!!t&&(typeof e=="number"||Pn.test(e))&&e>-1&&e%1==0&&e<t}function qr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kr(e){return!!mt&&mt in e}function Gt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fe;return e===r}function W(e){if(e!=null){try{return Jt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Yr(e){return Ne(e,!0,!0)}function qt(e,t){return e===t||e!==e&&t!==t}function Xr(e){return zr(e)&&H.call(e,"callee")&&(!zn.call(e,"callee")||me.call(e)==Ve)}var Fe=Array.isArray;function Kt(e){return e!=null&&Qr(e.length)&&!Yt(e)}function zr(e){return ei(e)&&Kt(e)}var Zr=Qn||ni;function Yt(e){var t=pe(e)?me.call(e):"";return t==Re||t==wt}function Qr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Et}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ei(e){return!!e&&typeof e=="object"}function xe(e){return Kt(e)?Dr(e):Nr(e)}function ti(){return[]}function ni(){return!1}B.exports=Yr});var gi={};gn(gi,{crush:()=>ui,defaults:()=>Zt,version:()=>ai});var fn={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function Se(e,t){if(!Array.isArray(e)||!e.length)return e;let r=S(S({},fn),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 Ke={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Ye(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({},Ke),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({},Ke);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 mn=!0,Oe="Invariant failed";function Xe(e,t){if(!e){if(mn)throw new Error(Oe);var r=typeof t=="function"?t():t,n=r?Oe+": "+r:Oe;throw new Error(n)}}function ze(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($=>$).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($=>$).forEach(($,h)=>{if(r&&(n=Math.floor(l/u*10),n!==a&&(a=n,r(n))),!Array.isArray($))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${h}th element not an array: ${JSON.stringify($,null,4)}, which is ${typeof $}`);if(!Number.isInteger($[0])){if(!Number.isInteger(+$[0])||+$[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${h}th element, array ${JSON.stringify($,null,0)}. Its first element is not an integer, string index, but ${typeof $[0]}, equal to: ${JSON.stringify($[0],null,4)}.`);o[h][0]=+o[h][0]}if(!Number.isInteger($[1])){if(!Number.isInteger(+$[1])||+$[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${h}th element, array ${JSON.stringify($,null,0)}. Its second element is not an integer, string index, but ${typeof $[1]}, equal to: ${JSON.stringify($[1],null,4)}.`);o[h][1]=+o[h][1]}l+=1});let c=Ye(o,{progressFn:$=>{r&&(n=10+Math.floor($/10),n!==a&&(a=n,r(n)))}});Xe(c);let s=c.length;if(s>0){let $=e.slice(c[s-1][1]);e=c.reduce((h,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`${h}${e.slice(w,L)}${f[m][2]||""}`},""),e+=$}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 $=0,h=0,T="";for(let m=0,f=o.length;m<f;m++)(o[m]===c||o[m]===s&&o[m-1]!==c)&&h++,`\r
@@ -24,7 +24,7 @@ ${JSON.stringify(a.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that arr
24
24
  \r`.includes(e[a])||n&&e[a]===K)return a;return null}function D(e,t=0){return oi({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function si({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 si({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var zt="5.1.0";var ai=zt,y=new et({limitToBeAddedWhitespace:!0}),Zt={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 ui(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 si({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var zt="5.1.1";var ai=zt,y=new et({limitToBeAddedWhitespace:!0}),Zt={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 ui(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,Q=t.breakToTheLeftOf.length;i<Q;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({},Zt),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,$=0,h=!1,T=!1,m=null,f=null,w=null,L=null,p,d=null,b=null,E=null,A=null,I=null,V=null,z=">};",Z="<",Qt="!",en=">",tn="<",We="{},:;<>~+",be=We,Te=We,j=!0,v=e.length,nn=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,C=`
30
30
  `;if(e.includes(`\r
@@ -42,7 +42,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
42
42
  /**
43
43
  * @name arrayiffy-if-string
44
44
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
45
- * @version 4.1.0
45
+ * @version 4.1.1
46
46
  * @author Roy Revelt, Codsen Ltd
47
47
  * @license MIT
48
48
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -50,7 +50,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
50
50
  /**
51
51
  * @name ranges-apply
52
52
  * @fileoverview Take an array of string index ranges, delete/replace the string according to them
53
- * @version 6.2.0
53
+ * @version 6.2.1
54
54
  * @author Roy Revelt, Codsen Ltd
55
55
  * @license MIT
56
56
  * {@link https://codsen.com/os/ranges-apply/}
@@ -58,7 +58,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
58
58
  /**
59
59
  * @name ranges-merge
60
60
  * @fileoverview Merge and sort string index ranges
61
- * @version 8.2.0
61
+ * @version 8.2.1
62
62
  * @author Roy Revelt, Codsen Ltd
63
63
  * @license MIT
64
64
  * {@link https://codsen.com/os/ranges-merge/}
@@ -66,7 +66,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
66
66
  /**
67
67
  * @name ranges-push
68
68
  * @fileoverview Gather string index ranges
69
- * @version 6.2.0
69
+ * @version 6.2.1
70
70
  * @author Roy Revelt, Codsen Ltd
71
71
  * @license MIT
72
72
  * {@link https://codsen.com/os/ranges-push/}
@@ -74,7 +74,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
74
74
  /**
75
75
  * @name ranges-sort
76
76
  * @fileoverview Sort string index ranges
77
- * @version 5.1.0
77
+ * @version 5.1.1
78
78
  * @author Roy Revelt, Codsen Ltd
79
79
  * @license MIT
80
80
  * {@link https://codsen.com/os/ranges-sort/}
@@ -82,7 +82,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
82
82
  /**
83
83
  * @name string-collapse-leading-whitespace
84
84
  * @fileoverview Collapse the leading and trailing whitespace of a string
85
- * @version 6.1.0
85
+ * @version 6.1.1
86
86
  * @author Roy Revelt, Codsen Ltd
87
87
  * @license MIT
88
88
  * {@link https://codsen.com/os/string-collapse-leading-whitespace/}
@@ -90,7 +90,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
90
90
  /**
91
91
  * @name string-left-right
92
92
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
93
- * @version 5.1.0
93
+ * @version 5.1.1
94
94
  * @author Roy Revelt, Codsen Ltd
95
95
  * @license MIT
96
96
  * {@link https://codsen.com/os/string-left-right/}
@@ -98,7 +98,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
98
98
  /**
99
99
  * @name string-match-left-right
100
100
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
101
- * @version 8.2.0
101
+ * @version 8.2.1
102
102
  * @author Roy Revelt, Codsen Ltd
103
103
  * @license MIT
104
104
  * {@link https://codsen.com/os/string-match-left-right/}
@@ -106,7 +106,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=S(S({},Zt),t);typeof n.r
106
106
  /**
107
107
  * @name string-range-expander
108
108
  * @fileoverview Expands string index ranges within whitespace boundaries until letters are met
109
- * @version 3.1.0
109
+ * @version 3.1.1
110
110
  * @author Roy Revelt, Codsen Ltd
111
111
  * @license MIT
112
112
  * {@link https://codsen.com/os/string-range-expander/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-crush",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Minify email templates",
5
5
  "keywords": [
6
6
  "breaks",
@@ -24,7 +24,7 @@
24
24
  "tool",
25
25
  "utility"
26
26
  ],
27
- "homepage": "https://codsen.com/os/html-crush/",
27
+ "homepage": "https://codsen.com/os/html-crush",
28
28
  "repository": {
29
29
  "type": "git",
30
30
  "url": "https://github.com/codsen/codsen.git",
@@ -78,11 +78,11 @@
78
78
  }
79
79
  },
80
80
  "dependencies": {
81
- "ranges-apply": "^6.2.0",
82
- "ranges-push": "^6.2.0",
83
- "string-left-right": "^5.1.0",
84
- "string-match-left-right": "^8.2.0",
85
- "string-range-expander": "^3.1.0",
86
- "test-mixer": "^3.1.0"
81
+ "ranges-apply": "^6.2.1",
82
+ "ranges-push": "^6.2.1",
83
+ "string-left-right": "^5.1.1",
84
+ "string-match-left-right": "^8.2.1",
85
+ "string-range-expander": "^3.1.1",
86
+ "test-mixer": "^3.1.1"
87
87
  }
88
88
  }