string-remove-widows 4.0.10 → 4.0.12
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 string-remove-widows
|
|
3
3
|
* @fileoverview Helps to prevent widow words in a text
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.12
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-remove-widows/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{matchRightIncl as Q}from"string-match-left-right";import{left as T,right as D}from"string-left-right";import{Ranges as X}from"ranges-push";import{rApply as q}from"ranges-apply";import{rawNbsp as w,rawNDash as ee,rawMDash as te}from"codsen-utils";var R="4.0.
|
|
10
|
+
import{matchRightIncl as Q}from"string-match-left-right";import{left as T,right as D}from"string-left-right";import{Ranges as X}from"ranges-push";import{rApply as q}from"ranges-apply";import{rawNbsp as w,rawNDash as ee,rawMDash as te}from"codsen-utils";var R="4.0.12";var f=" ",E="\\00A0",S="\\u00A0",j="–",M="\\2013",J="\\u2013",U="—",k="\\2014",I="\\u2014",C=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],B=[{heads:"{{",tails:"}}"}],P=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],_=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var ce=R,oe={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function me(t,h){let G=Date.now();if(typeof t!="string")throw t===void 0?new Error("string-remove-widows: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`string-remove-widows: [THROW_ID_02] the first input argument must be string! It was given as "${typeof t}", equal to:
|
|
11
11
|
${JSON.stringify(t,null,4)}`);if(h&&typeof h!="object")throw new Error(`string-remove-widows: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof h}, equal to ${JSON.stringify(h,null,4)}`);let b=Array.isArray,L=t.length,a=new X({mergeType:2}),K=["."],Z=/[A-Z]{1,2}[0-9][0-9A-Z]?$/,Y=/^[0-9][A-Z]{2}/,V=.06,$,A=0,g=0,W=0,y,N,d,c,r,l,s,p,o={...oe,...h},m={removeWidows:!1,convertEntities:!1};if(!o.ignore||!b(o.ignore)&&typeof o.ignore!="string")o.ignore=[];else if(typeof o.ignore=="string"&&(o.ignore=[o.ignore]),o.ignore.includes("all"))o.ignore=o.ignore.concat(C.concat(P));else if(o.ignore.some(e=>typeof e=="string")){let e=[];o.ignore=o.ignore.filter(i=>typeof i=="string"&&i.length?(["nunjucks","jinja","liquid"].includes(i.trim().toLowerCase())?e=e.concat(C):["hugo"].includes(i.trim().toLowerCase())?e=e.concat(B):["hexo"].includes(i.trim().toLowerCase())&&(e=e.concat(P)),!1):typeof i=="object"),e.length&&(o.ignore=o.ignore.concat(e))}let x;o.reportProgressFunc&&(x=Math.floor(o.reportProgressFuncTo-(o.reportProgressFuncTo-o.reportProgressFuncFrom)*V-o.reportProgressFuncFrom));function v(e,i){let n=w;o.removeWidowPreventionMeasures?n=" ":o.convertEntities&&(n=f,typeof o.targetLanguage=="string"&&(o.targetLanguage.trim().toLowerCase()==="css"?n=E:o.targetLanguage.trim().toLowerCase()==="js"&&(n=S))),t.slice(e,i)!==n&&a.push(e,i,n)}function O(){g=0,W=0,y=void 0,N=void 0,d=void 0,c=void 0,r=void 0,l=void 0}O();for(let e=0;e<=L;e++){if(!s&&b(o.ignore)&&o.ignore.length&&o.ignore.some((n,u)=>{if(b(n.heads)&&n.heads.some(H=>t.startsWith(H,e))||typeof n.heads=="string"&&t.startsWith(n.heads,e))return g+=1,s=o.ignore[u].tails,!0}),!s&&p&&p===e&&(g+=1,p=void 0),typeof o.reportProgressFunc=="function"&&($=o.reportProgressFuncFrom+Math.floor(e/L*(x||1)),$!==A&&(A=$,o.reportProgressFunc($))),!s&&e&&t[e]&&t[e].trim()&&(!t[e-1]||t[e-1]&&!t[e-1].trim())&&(c=e),!s&&t[e]&&t[e].trim()&&(W+=1),!s&&o.hyphens&&(`-${te}${ee}`.includes(t[e])||t.startsWith(j,e)||t.startsWith(M,e)||t.startsWith(J,e)||t.startsWith(U,e)||t.startsWith(k,e)||t.startsWith(I,e))&&t[e+1]&&(!t[e+1].trim()||t[e]==="&")&&t[e-1]&&!t[e-1].trim()&&t[T(t,e)]&&(v(T(t,e)+1,e),m.removeWidows=!0),!s&&(t.startsWith(" ",e)||t.startsWith(" ",e))&&(r=e,l=e+6,t[e+6]&&t[e+6].trim()&&(p=e+6),o.convertEntities?(o.targetLanguage==="css"||o.targetLanguage==="js")&&(a.push(e,e+6,o.targetLanguage==="css"?E:S),m.convertEntities=!0):(a.push(e,e+6,w),m.convertEntities=!0)),!s&&t[e+4]&&t[e]==="\\"&&t[e+1]==="0"&&t[e+2]==="0"&&t[e+3].toUpperCase()==="A"&&t[e+4]==="0"&&(r=e,l=e+5,t[e+5]&&t[e+5].trim()&&(p=e+5),o.convertEntities?(o.targetLanguage==="html"||o.targetLanguage==="js")&&(a.push(e,e+5,o.targetLanguage==="html"?f:S),m.convertEntities=!0):(a.push(e,e+5,w),m.convertEntities=!0)),!s&&t[e]==="\\"&&t[e+1]&&t[e+1].toLowerCase()==="u"&&t[e+2]==="0"&&t[e+3]==="0"&&t[e+4]&&t[e+4].toUpperCase()==="A"&&t[e+5]==="0"&&(r=e,l=e+6,t[e+6]&&t[e+6].trim()&&(p=e+6),o.convertEntities?(o.targetLanguage==="html"||o.targetLanguage==="css")&&a.push(e,e+6,o.targetLanguage==="html"?f:E):a.push(e,e+6,w)),!s&&t[e]===w&&(r=e,l=e+1,o.convertEntities&&a.push(e,e+1,o.targetLanguage==="css"?E:o.targetLanguage==="js"?S:f)),!s&&t[e]&&t[e].trim()&&(!t[e-1]||!t[e-1].trim())&&(g+=1),!s&&(!t[e]||`\r
|
|
12
12
|
`.includes(t[e])||(t[e]===`
|
|
13
13
|
`||t[e]==="\r"||t[e]==="\r"&&t[e+1]===`
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-remove-widows
|
|
3
3
|
* @fileoverview Helps to prevent widow words in a text
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.12
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-remove-widows/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var stringRemoveWidows=(()=>{var Kt=Object.create;var G=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var Zt=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,zt=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable;var fe=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))je.call(t,r)&&fe(e,r,t[r]);if(Le)for(var r of Le(t))Yt.call(t,r)&&fe(e,r,t[r]);return e};var Xt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),er=(e,t)=>{for(var r in t)G(e,r,{get:t[r],enumerable:!0})},Fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Zt(t))!je.call(e,u)&&u!==r&&G(e,u,{get:()=>t[u],enumerable:!(o=Qt(t,u))||o.enumerable});return e};var tr=(e,t,r)=>(r=e!=null?Kt(zt(e)):{},Fe(t||!e||!e.__esModule?G(r,"default",{value:e,enumerable:!0}):r,e)),rr=e=>Fe(G({},"__esModule",{value:!0}),e);var de=(e,t,r)=>(fe(e,typeof t!="symbol"?t+"":t,r),r);var Rt=Xt((Q,P)=>{var ir=200,rt="__lodash_hash_undefined__",nt=9007199254740991,Ee="[object Arguments]",ar="[object Array]",ot="[object Boolean]",st="[object Date]",ur="[object Error]",Ae="[object Function]",it="[object GeneratorFunction]",re="[object Map]",at="[object Number]",Te="[object Object]",Ue="[object Promise]",ut="[object RegExp]",ne="[object Set]",lt="[object String]",ct="[object Symbol]",pe="[object WeakMap]",gt="[object ArrayBuffer]",oe="[object DataView]",ft="[object Float32Array]",dt="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",mt="[object Int32Array]",$t="[object Uint8Array]",bt="[object Uint8ClampedArray]",yt="[object Uint16Array]",wt="[object Uint32Array]",lr=/[\\^$.*+?()[\]{}|]/g,cr=/\w*$/,gr=/^\[object .+?Constructor\]$/,fr=/^(?:0|[1-9]\d*)$/,A={};A[Ee]=A[ar]=A[gt]=A[oe]=A[ot]=A[st]=A[ft]=A[dt]=A[ht]=A[pt]=A[mt]=A[re]=A[at]=A[Te]=A[ut]=A[ne]=A[lt]=A[ct]=A[$t]=A[bt]=A[yt]=A[wt]=!0;A[ur]=A[Ae]=A[pe]=!1;var dr=typeof global=="object"&&global&&global.Object===Object&&global,hr=typeof self=="object"&&self&&self.Object===Object&&self,x=dr||hr||Function("return this")(),Et=typeof Q=="object"&&Q&&!Q.nodeType&&Q,qe=Et&&typeof P=="object"&&P&&!P.nodeType&&P,pr=qe&&qe.exports===Et;function mr(e,t){return e.set(t[0],t[1]),e}function $r(e,t){return e.add(t),e}function br(e,t){for(var r=-1,o=e?e.length:0;++r<o&&t(e[r],r,e)!==!1;);return e}function yr(e,t){for(var r=-1,o=t.length,u=e.length;++r<o;)e[u+r]=t[r];return e}function At(e,t,r,o){var u=-1,n=e?e.length:0;for(o&&n&&(r=e[++u]);++u<n;)r=t(r,e[u],u,e);return r}function wr(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}function Er(e,t){return e==null?void 0:e[t]}function Tt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function Ge(e){var t=-1,r=Array(e.size);return e.forEach(function(o,u){r[++t]=[u,o]}),r}function ve(e,t){return function(r){return e(t(r))}}function Ke(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}var Ar=Array.prototype,Tr=Function.prototype,se=Object.prototype,he=x["__core-js_shared__"],Qe=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),vt=Tr.toString,I=se.hasOwnProperty,ie=se.toString,vr=RegExp("^"+vt.call(I).replace(lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=pr?x.Buffer:void 0,ze=x.Symbol,Ye=x.Uint8Array,Sr=ve(Object.getPrototypeOf,Object),_r=Object.create,Cr=se.propertyIsEnumerable,Nr=Ar.splice,Xe=Object.getOwnPropertySymbols,Dr=Ze?Ze.isBuffer:void 0,Or=ve(Object.keys,Object),me=J(x,"DataView"),Z=J(x,"Map"),$e=J(x,"Promise"),be=J(x,"Set"),ye=J(x,"WeakMap"),z=J(Object,"create"),Wr=F(me),Rr=F(Z),xr=F($e),Mr=F(be),Ir=F(ye),et=ze?ze.prototype:void 0,tt=et?et.valueOf:void 0;function j(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}function Lr(){this.__data__=z?z(null):{}}function jr(e){return this.has(e)&&delete this.__data__[e]}function Fr(e){var t=this.__data__;if(z){var r=t[e];return r===rt?void 0:r}return I.call(t,e)?t[e]:void 0}function Hr(e){var t=this.__data__;return z?t[e]!==void 0:I.call(t,e)}function Pr(e,t){var r=this.__data__;return r[e]=z&&t===void 0?rt:t,this}j.prototype.clear=Lr;j.prototype.delete=jr;j.prototype.get=Fr;j.prototype.has=Hr;j.prototype.set=Pr;function M(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}function Vr(){this.__data__=[]}function Br(e){var t=this.__data__,r=ae(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():Nr.call(t,r,1),!0}function Jr(e){var t=this.__data__,r=ae(t,e);return r<0?void 0:t[r][1]}function kr(e){return ae(this.__data__,e)>-1}function Ur(e,t){var r=this.__data__,o=ae(r,e);return o<0?r.push([e,t]):r[o][1]=t,this}M.prototype.clear=Vr;M.prototype.delete=Br;M.prototype.get=Jr;M.prototype.has=kr;M.prototype.set=Ur;function V(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}function qr(){this.__data__={hash:new j,map:new(Z||M),string:new j}}function Gr(e){return ue(this,e).delete(e)}function Kr(e){return ue(this,e).get(e)}function Qr(e){return ue(this,e).has(e)}function Zr(e,t){return ue(this,e).set(e,t),this}V.prototype.clear=qr;V.prototype.delete=Gr;V.prototype.get=Kr;V.prototype.has=Qr;V.prototype.set=Zr;function B(e){this.__data__=new M(e)}function zr(){this.__data__=new M}function Yr(e){return this.__data__.delete(e)}function Xr(e){return this.__data__.get(e)}function en(e){return this.__data__.has(e)}function tn(e,t){var r=this.__data__;if(r instanceof M){var o=r.__data__;if(!Z||o.length<ir-1)return o.push([e,t]),this;r=this.__data__=new V(o)}return r.set(e,t),this}B.prototype.clear=zr;B.prototype.delete=Yr;B.prototype.get=Xr;B.prototype.has=en;B.prototype.set=tn;function rn(e,t){var r=_e(e)||Cn(e)?wr(e.length,String):[],o=r.length,u=!!o;for(var n in e)(t||I.call(e,n))&&!(u&&(n=="length"||Tn(n,o)))&&r.push(n);return r}function St(e,t,r){var o=e[t];(!(I.call(e,t)&&Dt(o,r))||r===void 0&&!(t in e))&&(e[t]=r)}function ae(e,t){for(var r=e.length;r--;)if(Dt(e[r][0],t))return r;return-1}function nn(e,t){return e&&_t(t,Ce(t),e)}function we(e,t,r,o,u,n,c){var a;if(o&&(a=n?o(e,u,n,c):o(e)),a!==void 0)return a;if(!le(e))return e;var g=_e(e);if(g){if(a=wn(e),!t)return $n(e,a)}else{var i=L(e),h=i==Ae||i==it;if(Dn(e))return cn(e,t);if(i==Te||i==Ee||h&&!n){if(Tt(e))return n?e:{};if(a=En(h?{}:e),!t)return bn(e,nn(a,e))}else{if(!A[i])return n?e:{};a=An(e,i,we,t)}}c||(c=new B);var $=c.get(e);if($)return $;if(c.set(e,a),!g)var p=r?yn(e):Ce(e);return br(p||e,function(f,d){p&&(d=f,f=e[d]),St(a,d,we(f,t,r,o,d,e,c))}),a}function on(e){return le(e)?_r(e):{}}function sn(e,t,r){var o=t(e);return _e(e)?o:yr(o,r(e))}function an(e){return ie.call(e)}function un(e){if(!le(e)||Sn(e))return!1;var t=Wt(e)||Tt(e)?vr:gr;return t.test(F(e))}function ln(e){if(!Nt(e))return Or(e);var t=[];for(var r in Object(e))I.call(e,r)&&r!="constructor"&&t.push(r);return t}function cn(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Se(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function gn(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function fn(e,t,r){var o=t?r(Ge(e),!0):Ge(e);return At(o,mr,new e.constructor)}function dn(e){var t=new e.constructor(e.source,cr.exec(e));return t.lastIndex=e.lastIndex,t}function hn(e,t,r){var o=t?r(Ke(e),!0):Ke(e);return At(o,$r,new e.constructor)}function pn(e){return tt?Object(tt.call(e)):{}}function mn(e,t){var r=t?Se(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function $n(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}function _t(e,t,r,o){r||(r={});for(var u=-1,n=t.length;++u<n;){var c=t[u],a=o?o(r[c],e[c],c,r,e):void 0;St(r,c,a===void 0?e[c]:a)}return r}function bn(e,t){return _t(e,Ct(e),t)}function yn(e){return sn(e,Ce,Ct)}function ue(e,t){var r=e.__data__;return vn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function J(e,t){var r=Er(e,t);return un(r)?r:void 0}var Ct=Xe?ve(Xe,Object):Rn,L=an;(me&&L(new me(new ArrayBuffer(1)))!=oe||Z&&L(new Z)!=re||$e&&L($e.resolve())!=Ue||be&&L(new be)!=ne||ye&&L(new ye)!=pe)&&(L=function(e){var t=ie.call(e),r=t==Te?e.constructor:void 0,o=r?F(r):void 0;if(o)switch(o){case Wr:return oe;case Rr:return re;case xr:return Ue;case Mr:return ne;case Ir:return pe}return t});function wn(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&I.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function En(e){return typeof e.constructor=="function"&&!Nt(e)?on(Sr(e)):{}}function An(e,t,r,o){var u=e.constructor;switch(t){case gt:return Se(e);case ot:case st:return new u(+e);case oe:return gn(e,o);case ft:case dt:case ht:case pt:case mt:case $t:case bt:case yt:case wt:return mn(e,o);case re:return fn(e,o,r);case at:case lt:return new u(e);case ut:return dn(e);case ne:return hn(e,o,r);case ct:return pn(e)}}function Tn(e,t){return t=t==null?nt:t,!!t&&(typeof e=="number"||fr.test(e))&&e>-1&&e%1==0&&e<t}function vn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Sn(e){return!!Qe&&Qe in e}function Nt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||se;return e===r}function F(e){if(e!=null){try{return vt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function _n(e){return we(e,!0,!0)}function Dt(e,t){return e===t||e!==e&&t!==t}function Cn(e){return Nn(e)&&I.call(e,"callee")&&(!Cr.call(e,"callee")||ie.call(e)==Ee)}var _e=Array.isArray;function Ot(e){return e!=null&&On(e.length)&&!Wt(e)}function Nn(e){return Wn(e)&&Ot(e)}var Dn=Dr||xn;function Wt(e){var t=le(e)?ie.call(e):"";return t==Ae||t==it}function On(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nt}function le(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Wn(e){return!!e&&typeof e=="object"}function Ce(e){return Ot(e)?rn(e):ln(e)}function Rn(){return[]}function xn(){return!1}P.exports=_n});var kn={};er(kn,{defaults:()=>Gt,removeWidows:()=>Jn,version:()=>Bn});function He(e){return typeof e!="string"?e:e.length?[e]:[]}var Pe="\u2013",Ve="\u2014",H="\xA0";function K(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function N(e){return typeof e=="string"}function W(e){return Number.isSafeInteger(e)&&e>=0}function R(e){return e!=null}function Be(e,t){return K(e)&&N(t)&&Object.prototype.hasOwnProperty.call(e,t)}var Je={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},nr=e=>e+1;function or(e,t,r,o,u=!1,n=nr){let c=typeof r=="function"?r():r;if(+t<0&&u&&c==="EOL")return c;let a=T(T({},Je),o);if(t>=e.length&&!u)return!1;let g=u?1:r.length,i=0,h=!1,$=!1,p=!1,f=a.maxMismatches,d=t,S=!1,y=!1,v=!1;function w(){return i===1&&f<a.maxMismatches-1}for(;e[d];){let b=n(d);if(a.trimBeforeMatching&&e[d].trim()===""){if(!e[b]&&u&&r==="EOL")return!0;d=n(d);continue}if(a&&!a.i&&a.trimCharsBeforeMatching&&a.trimCharsBeforeMatching.includes(e[d])||a!=null&&a.i&&a.trimCharsBeforeMatching&&a.trimCharsBeforeMatching.map(_=>_.toLowerCase()).includes(e[d].toLowerCase())){if(u&&r==="EOL"&&!e[b])return!0;d=n(d);continue}let E=b>d?r[r.length-g]:r[g-1];if(!a.i&&e[d]===E||a.i&&e[d].toLowerCase()===E.toLowerCase()){if(S||(S=!0),p||(p=!0),g===r.length){if(y=!0,f!==a.maxMismatches)return!1}else g===1&&(v=!0);if(g-=1,i++,w())return!1;if(!g)return i!==r.length||f===a.maxMismatches||!h?d:!1}else if(!h&&!i&&(h=!0),a.maxMismatches&&f&&d){f-=1;for(let _=0;_<=f;_++){let l=b>d?r[r.length-g+1+_]:r[g-2-_],D=e[n(d)];if(l&&(!a.i&&e[d]===l||a.i&&e[d].toLowerCase()===l.toLowerCase())&&(!a.firstMustMatch||g!==r.length)){if(i++,w())return!1;g-=2,S=!0;break}else if(D&&l&&(!a.i&&D===l||a.i&&D.toLowerCase()===l.toLowerCase())&&(!a.firstMustMatch||g!==r.length)){if(!i&&!a.hungry)return!1;g-=1,S=!0;break}else if(l===void 0&&f>=0&&S&&(!a.firstMustMatch||y)&&(!a.lastMustMatch||v))return d}S||($=d)}else return d===0&&g===1&&!a.lastMustMatch&&p?0:!1;if($!==!1&&$!==d&&($=!1),g<1)return d;d=n(d)}if(g>0)return u&&c==="EOL"?!0:a&&a.maxMismatches>=g&&p?$||0:!1}function sr(e,t,r,o,u){var h,$;if(K(u)&&Be(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let n=T(T({},Je),u);if(typeof n.trimCharsBeforeMatching=="string"&&(n.trimCharsBeforeMatching=He(n.trimCharsBeforeMatching)),n.trimCharsBeforeMatching=n.trimCharsBeforeMatching.map(p=>N(p)?p:String(p)),!N(t)||!t.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
|
|
11
|
-
${JSON.stringify(
|
|
12
|
-
${JSON.stringify(
|
|
13
|
-
${JSON.stringify(u,null,4)}`);let g=0,
|
|
14
|
-
\r`.includes(e[
|
|
15
|
-
\r`.includes(e[
|
|
16
|
-
\r`.includes(e[u])||
|
|
17
|
-
\r`.includes(e[~-
|
|
18
|
-
\r`.includes(e[
|
|
19
|
-
\r`.includes(e[u])||
|
|
20
|
-
`:"\r",
|
|
21
|
-
`;if(!
|
|
22
|
-
`.includes(
|
|
23
|
-
${JSON.stringify(
|
|
24
|
-
${JSON.stringify(
|
|
25
|
-
${JSON.stringify(
|
|
26
|
-
${JSON.stringify(e,null,4)}`);if(
|
|
10
|
+
"use strict";var stringRemoveWidows=(()=>{var We=Object.create;var j=Object.defineProperty;var Ce=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,Re=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var q=(e,r,a)=>r in e?j(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,A=(e,r)=>{for(var a in r||(r={}))re.call(r,a)&&q(e,a,r[a]);if(te)for(var a of te(r))Me.call(r,a)&&q(e,a,r[a]);return e};var xe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Le=(e,r)=>{for(var a in r)j(e,a,{get:r[a],enumerable:!0})},ne=(e,r,a,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Oe(r))!re.call(e,u)&&u!==a&&j(e,u,{get:()=>r[u],enumerable:!(i=Ce(r,u))||i.enumerable});return e};var Ie=(e,r,a)=>(a=e!=null?We(Re(e)):{},ne(r||!e||!e.__esModule?j(a,"default",{value:e,enumerable:!0}):a,e)),Ve=e=>ne(j({},"__esModule",{value:!0}),e);var k=(e,r,a)=>(q(e,typeof r!="symbol"?r+"":r,a),a);var fe=xe((it,ge)=>{"use strict";ge.exports=He;function x(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function He(e){if(e=e||{},e.circles)return Pe(e);return e.proto?i:a;function r(u,t){for(var l=Object.keys(u),o=new Array(l.length),g=0;g<l.length;g++){var n=l[g],c=u[n];typeof c!="object"||c===null?o[n]=c:c instanceof Date?o[n]=new Date(c):ArrayBuffer.isView(c)?o[n]=x(c):o[n]=t(c)}return o}function a(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,a);if(u instanceof Map)return new Map(r(Array.from(u),a));if(u instanceof Set)return new Set(r(Array.from(u),a));var t={};for(var l in u)if(Object.hasOwnProperty.call(u,l)!==!1){var o=u[l];typeof o!="object"||o===null?t[l]=o:o instanceof Date?t[l]=new Date(o):o instanceof Map?t[l]=new Map(r(Array.from(o),a)):o instanceof Set?t[l]=new Set(r(Array.from(o),a)):ArrayBuffer.isView(o)?t[l]=x(o):t[l]=a(o)}return t}function i(u){if(typeof u!="object"||u===null)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,i);if(u instanceof Map)return new Map(r(Array.from(u),i));if(u instanceof Set)return new Set(r(Array.from(u),i));var t={};for(var l in u){var o=u[l];typeof o!="object"||o===null?t[l]=o:o instanceof Date?t[l]=new Date(o):o instanceof Map?t[l]=new Map(r(Array.from(o),i)):o instanceof Set?t[l]=new Set(r(Array.from(o),i)):ArrayBuffer.isView(o)?t[l]=x(o):t[l]=i(o)}return t}}function Pe(e){var r=[],a=[];return e.proto?t:u;function i(l,o){for(var g=Object.keys(l),n=new Array(g.length),c=0;c<g.length;c++){var p=g[c],h=l[p];if(typeof h!="object"||h===null)n[p]=h;else if(h instanceof Date)n[p]=new Date(h);else if(ArrayBuffer.isView(h))n[p]=x(h);else{var m=r.indexOf(h);m!==-1?n[p]=a[m]:n[p]=o(h)}}return n}function u(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return i(l,u);if(l instanceof Map)return new Map(i(Array.from(l),u));if(l instanceof Set)return new Set(i(Array.from(l),u));var o={};r.push(l),a.push(o);for(var g in l)if(Object.hasOwnProperty.call(l,g)!==!1){var n=l[g];if(typeof n!="object"||n===null)o[g]=n;else if(n instanceof Date)o[g]=new Date(n);else if(n instanceof Map)o[g]=new Map(i(Array.from(n),u));else if(n instanceof Set)o[g]=new Set(i(Array.from(n),u));else if(ArrayBuffer.isView(n))o[g]=x(n);else{var c=r.indexOf(n);c!==-1?o[g]=a[c]:o[g]=u(n)}}return r.pop(),a.pop(),o}function t(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return i(l,t);if(l instanceof Map)return new Map(i(Array.from(l),t));if(l instanceof Set)return new Set(i(Array.from(l),t));var o={};r.push(l),a.push(o);for(var g in l){var n=l[g];if(typeof n!="object"||n===null)o[g]=n;else if(n instanceof Date)o[g]=new Date(n);else if(n instanceof Map)o[g]=new Map(i(Array.from(n),t));else if(n instanceof Set)o[g]=new Set(i(Array.from(n),t));else if(ArrayBuffer.isView(n))o[g]=x(n);else{var c=r.indexOf(n);c!==-1?o[g]=a[c]:o[g]=t(n)}}return r.pop(),a.pop(),o}}});var ze={};Le(ze,{defaults:()=>Ne,removeWidows:()=>Ze,version:()=>Ke});function se(e){return typeof e!="string"?e:e.length?[e]:[]}var ie="\u2013",oe="\u2014",M="\xA0";function F(e){if(e==null||typeof e!="object")return!1;let r=Object.getPrototypeOf(e);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function N(e){return typeof e=="string"}function O(e){return Number.isSafeInteger(e)&&e>=0}function R(e){return e!=null}function ae(e,r){return F(e)&&N(r)&&r in e}var le={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},je=e=>e+1;function Fe(e,r,a,i,u=!1,t=je){let l=typeof a=="function"?a():a;if(+r<0&&u&&l==="EOL")return l;let o=A(A({},le),i);if(r>=e.length&&!u)return!1;let g=u?1:a.length,n=0,c=!1,p=!1,h=!1,m=o.maxMismatches,d=r,v=!1,y=!1,T=!1;function w(){return n===1&&m<o.maxMismatches-1}for(;e[d];){let b=t(d);if(o.trimBeforeMatching&&e[d].trim()===""){if(!e[b]&&u&&a==="EOL")return!0;d=t(d);continue}if(o&&!o.i&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.includes(e[d])||o!=null&&o.i&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.map(S=>S.toLowerCase()).includes(e[d].toLowerCase())){if(u&&a==="EOL"&&!e[b])return!0;d=t(d);continue}let E=b>d?a[a.length-g]:a[g-1];if(!o.i&&e[d]===E||o.i&&e[d].toLowerCase()===E.toLowerCase()){if(v||(v=!0),h||(h=!0),g===a.length){if(y=!0,m!==o.maxMismatches)return!1}else g===1&&(T=!0);if(g-=1,n++,w())return!1;if(!g)return n!==a.length||m===o.maxMismatches||!c?d:!1}else if(!c&&!n&&(c=!0),o.maxMismatches&&m&&d){m-=1;for(let S=0;S<=m;S++){let f=b>d?a[a.length-g+1+S]:a[g-2-S],W=e[t(d)];if(f&&(!o.i&&e[d]===f||o.i&&e[d].toLowerCase()===f.toLowerCase())&&(!o.firstMustMatch||g!==a.length)){if(n++,w())return!1;g-=2,v=!0;break}else if(W&&f&&(!o.i&&W===f||o.i&&W.toLowerCase()===f.toLowerCase())&&(!o.firstMustMatch||g!==a.length)){if(!n&&!o.hungry)return!1;g-=1,v=!0;break}else if(f===void 0&&m>=0&&v&&(!o.firstMustMatch||y)&&(!o.lastMustMatch||T))return d}v||(p=d)}else return d===0&&g===1&&!o.lastMustMatch&&h?0:!1;if(p!==!1&&p!==d&&(p=!1),g<1)return d;d=t(d)}if(g>0)return u&&l==="EOL"?!0:o&&o.maxMismatches>=g&&h?p||0:!1}function _e(e,r,a,i,u){var c,p;if(F(u)&&ae(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let t=A(A({},le),u);if(typeof t.trimCharsBeforeMatching=="string"&&(t.trimCharsBeforeMatching=se(t.trimCharsBeforeMatching)),t.trimCharsBeforeMatching=t.trimCharsBeforeMatching.map(h=>N(h)?h:String(h)),!N(r)||!r.length)return!1;if(!Number.isInteger(a)||a<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof a}, equal to:
|
|
11
|
+
${JSON.stringify(a,null,4)}`);let l,o;if(N(i))l=[i];else if(Array.isArray(i))l=i;else if(!i)l=i;else if(typeof i=="function")l=[],l.push(i);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof i}, equal to:
|
|
12
|
+
${JSON.stringify(i,null,4)}`);if(u&&!F(u))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 u}", and equal to:
|
|
13
|
+
${JSON.stringify(u,null,4)}`);let g=0,n="";if(t!=null&&t.trimCharsBeforeMatching&&t.trimCharsBeforeMatching.some((h,m)=>h.length>1?(g=m,n=h,!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 ${g} is longer than 1 character, ${n.length} (equals to ${n}). Please split it into separate characters and put into array as separate elements.`);if(!l||!Array.isArray(l)||Array.isArray(l)&&!l.length||Array.isArray(l)&&l.length===1&&N(l[0])&&!l[0].trim()){if(typeof t.cb=="function"){let m,d=a;if((e==="matchLeftIncl"||e==="matchRight")&&(d+=1),e[5]==="L")for(let w=d;w--;){let b=r[w];if((!t.trimBeforeMatching||t.trimBeforeMatching&&b!==void 0&&b.trim())&&(!((c=t.trimCharsBeforeMatching)!=null&&c.length)||b!==void 0&&!t.trimCharsBeforeMatching.includes(b))){m=w;break}}else if(e.startsWith("matchRight"))for(let w=d;w<r.length;w++){let b=r[w];if((!t.trimBeforeMatching||t.trimBeforeMatching&&b.trim())&&(!((p=t.trimCharsBeforeMatching)!=null&&p.length)||!t.trimCharsBeforeMatching.includes(b))){m=w;break}}if(m===void 0)return!1;let v=r[m],y=m+1,T="";return y&&y>0&&(T=r.slice(0,y)),e[5]==="L"||m&&m>0&&(T=r.slice(m)),t.cb(v,T,m)}let h="";throw u||(h=" 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!${h}`)}for(let h=0,m=l.length;h<m;h++){o=typeof l[h]=="function";let d=l[h],v,y,T="",w=a;e==="matchRight"?w+=1:e==="matchLeft"&&(w-=1);let b=Fe(r,w,d,t,o,E=>e[5]==="L"?E-1:E+1);if(b&&o&&typeof d=="function"&&d()==="EOL")return d()&&(!t.cb||t.cb(v,T,y))?d():!1;if(Number.isInteger(b)&&(y=e.startsWith("matchLeft")?b-1:b+1,e[5]==="L"?T=r.slice(0,b):T=r.slice(y)),y<0&&(y=void 0),r[y]&&(v=r[y]),Number.isInteger(b)&&(!t.cb||t.cb(v,T,y)))return d}return!1}function ue(e,r,a,i){return _e("matchRightIncl",e,r,a,i)}var ce=Ie(fe(),1);var at=(0,ce.default)();var L="\xA0";function Be({str:e,idx:r=0,stopAtNewlines:a=!1,stopAtRawNbsp:i=!1}){if(typeof e!="string"||!e.length||((!r||typeof r!="number")&&(r=0),!e[r+1]))return null;if(e[r+1]&&(e[r+1].trim()||a&&`
|
|
14
|
+
\r`.includes(e[r+1])||i&&e[r+1]===L))return r+1;if(e[r+2]&&(e[r+2].trim()||a&&`
|
|
15
|
+
\r`.includes(e[r+2])||i&&e[r+2]===L))return r+2;for(let u=r+1,t=e.length;u<t;u++)if(e[u].trim()||a&&`
|
|
16
|
+
\r`.includes(e[u])||i&&e[u]===L)return u;return null}function I(e,r=0){return Be({str:e,idx:r,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Je({str:e,idx:r,stopAtNewlines:a,stopAtRawNbsp:i}){if(typeof e!="string"||!e.length||((!r||typeof r!="number")&&(r=0),r<1))return null;if(e[~-r]&&(e[~-r].trim()||a&&`
|
|
17
|
+
\r`.includes(e[~-r])||i&&e[~-r]===L))return~-r;if(e[r-2]&&(e[r-2].trim()||a&&`
|
|
18
|
+
\r`.includes(e[r-2])||i&&e[r-2]===L))return r-2;for(let u=r;u--;)if(e[u]&&(e[u].trim()||a&&`
|
|
19
|
+
\r`.includes(e[u])||i&&e[u]===L))return u;return null}function _(e,r=0){return Je({str:e,idx:r,stopAtNewlines:!1,stopAtRawNbsp:!1})}function J(e,r=1){let a="\xA0";function i(t){return Array.from(t).reverse().join("")}function u(t,l,o){let g=o?`
|
|
20
|
+
`:"\r",n=o?"\r":`
|
|
21
|
+
`;if(!t)return t;let c=0,p=0,h="";for(let m=0,d=t.length;m<d;m++)(t[m]===g||t[m]===n&&t[m-1]!==g)&&p++,`\r
|
|
22
|
+
`.includes(t[m])||t[m]===a?(c=0,t[m]===a?h+=t[m]:t[m]===g?p<=l&&(h+=t[m],t[m+1]===n&&(h+=t[m+1],m++)):t[m]===n&&(t==null?void 0:t[m-1])!==g&&p<=l&&(h+=t[m])):(c++,!t[m+1]&&!p&&(h+=" "));return h}if(typeof e=="string"&&e.length){let t=1;typeof+r=="number"&&Number.isInteger(+r)&&+r>=0&&(t=+r);let l="",o="";if(!e.trim())l=e;else if(!e[0].trim()){for(let g=0,n=e.length;g<n;g++)if(e[g].trim()){l=e.slice(0,g);break}}if(e.trim()&&(e.slice(-1).trim()===""||e.slice(-1)===a)){for(let g=e.length;g--;)if(e[g].trim()){o=e.slice(g+1);break}}return`${u(l,t,!1)}${e.trim()}${i(u(i(o),t,!0))}`}return e}var Ue={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function V(e,r){if(!Array.isArray(e)||!e.length)return e;let a=A(A({},Ue),r),i,u;if(a.strictlyTwoElementsInRangeArrays&&!e.every((o,g)=>!Array.isArray(o)||o.length!==2?(i=g,u=o.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, ${i}th range (${JSON.stringify(e[i],null,4)}) has not two but ${u} elements!`);if(!e.every((o,g)=>!Array.isArray(o)||!Number.isInteger(o[0])||o[0]<0||!Number.isInteger(o[1])||o[1]<0?(i=g,!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, ${i}th range (${JSON.stringify(e[i],null,4)}) does not consist of only natural numbers!`);let t=e.length**2,l=0;return Array.from(e).sort((o,g)=>(a.progressFn&&(l+=1,a.progressFn(Math.floor(l*100/t))),o[0]===g[0]?o[1]<g[1]?-1:o[1]>g[1]?1:0:o[0]<g[0]?-1:1))}var me={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function qe(e,r){function a(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}if(!Array.isArray(e)||!e.length)return null;let i;if(r)if(a(r)){if(i=A(A({},me),r),i.progressFn&&a(i.progressFn)&&!Object.keys(i.progressFn).length)i.progressFn=null;else if(i.progressFn&&typeof i.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof i.progressFn}", equal to ${JSON.stringify(i.progressFn,null,4)}`);if(![1,2,"1","2"].includes(i.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof i.mergeType}", equal to ${JSON.stringify(i.mergeType,null,4)}`);if(typeof i.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof i.joinRangesThatTouchEdges}", equal to ${JSON.stringify(i.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
23
|
+
${JSON.stringify(r,null,4)} (type ${typeof r})`);else i=A({},me);let u=e.filter(n=>Array.isArray(n)).map(n=>[...n]).filter(n=>n[2]!==void 0||n[0]!==n[1]),t,l,o;i.progressFn?t=V(u,{progressFn:n=>{o=Math.floor(n/5),o!==l&&(l=o,i.progressFn(o))}}):t=V(u);let g=t.length-1;for(let n=g;n>0;n--)i.progressFn&&(o=Math.floor((1-n/g)*78)+21,o!==l&&o>l&&(l=o,i.progressFn(o))),(t[n][0]<=t[n-1][0]||!i.joinRangesThatTouchEdges&&t[n][0]<t[n-1][1]||i.joinRangesThatTouchEdges&&t[n][0]<=t[n-1][1])&&(t[n-1][0]=Math.min(t[n][0],t[n-1][0]),t[n-1][1]=Math.max(t[n][1],t[n-1][1]),t[n][2]!==void 0&&(t[n-1][0]>=t[n][0]||t[n-1][1]<=t[n][1])&&t[n-1][2]!==null&&(t[n][2]===null&&t[n-1][2]!==null?t[n-1][2]=null:t[n-1][2]!=null?+i.mergeType==2&&t[n-1][0]===t[n][0]?t[n-1][2]=t[n][2]:t[n-1][2]+=t[n][2]:t[n-1][2]=t[n][2]),t.splice(n,1),n=t.length);return t.length?t:null}var ke={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},de=class{constructor(e){k(this,"ranges");k(this,"opts");let r=A(A({},ke),e);if(r.mergeType&&r.mergeType!==1&&r.mergeType!==2)if(N(r.mergeType)&&r.mergeType.trim()==="1")r.mergeType=1;else if(N(r.mergeType)&&r.mergeType.trim()==="2")r.mergeType=2;else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r.mergeType}", equal to ${JSON.stringify(r.mergeType,null,4)}`);this.opts=r,this.ranges=[]}add(e,r,a){var t;if(e==null&&r==null)return;if(R(e)&&!R(r)){if(Array.isArray(e)){if(e.length){if(e.some(l=>Array.isArray(l))){e.forEach(l=>{Array.isArray(l)&&this.add(...l)});return}e.length&&O(+e[0])&&O(+e[1])&&this.add(...e)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(e,null,0)}) but second-one, "to" is not (${JSON.stringify(r,null,0)})`)}else if(!R(e)&&R(r))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(r,null,0)}) but first-one, "from" is not (${JSON.stringify(e,null,0)})`);let i=+e,u=+r;if(O(a)&&(a=String(a)),O(i)&&O(u)){if(R(a)&&!N(a)&&!O(a))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof a}, equal to:
|
|
24
|
+
${JSON.stringify(a,null,4)}`);if(R(this.ranges)&&Array.isArray(this.last())&&i===this.last()[1]){if(this.last()[1]=u,this.last()[2],this.last()[2]!==null&&R(a)){let l=this.last()[2]&&this.last()[2].length&&(!((t=this.opts)!=null&&t.mergeType)||this.opts.mergeType===1)?`${this.last()[2]}${a}`:a;this.opts.limitToBeAddedWhitespace&&(l=J(l,this.opts.limitLinebreaksCount)),N(l)&&!l.length||(this.last()[2]=l)}}else{this.ranges||(this.ranges=[]);let l=a!==void 0&&!(N(a)&&!a.length)?[i,u,a&&this.opts.limitToBeAddedWhitespace?J(a,this.opts.limitLinebreaksCount):a]:[i,u];this.ranges.push(l)}}else throw O(i)&&i>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof u}" equal to: ${JSON.stringify(u,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof i}" equal to: ${JSON.stringify(i,null,4)}`)}push(e,r,a){this.add(e,r,a)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=qe(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>R(e[2])?[e[0],e[1],J(e[2],this.opts.limitLinebreaksCount)]:e):this.ranges):null}wipe(){this.ranges=[]}replace(e){if(Array.isArray(e)&&e.length)if(Array.isArray(e[0])&&O(e[0][0]))this.ranges=Array.from(e);else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(e[0],null,4)} should be an array and its first element should be an integer, a string index.`);else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};var he={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function pe(e,r){function a(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}if(!Array.isArray(e)||!e.length)return null;let i;if(r)if(a(r)){if(i=A(A({},he),r),i.progressFn&&a(i.progressFn)&&!Object.keys(i.progressFn).length)i.progressFn=null;else if(i.progressFn&&typeof i.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof i.progressFn}", equal to ${JSON.stringify(i.progressFn,null,4)}`);if(![1,2,"1","2"].includes(i.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof i.mergeType}", equal to ${JSON.stringify(i.mergeType,null,4)}`);if(typeof i.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 i.joinRangesThatTouchEdges}", equal to ${JSON.stringify(i.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
25
|
+
${JSON.stringify(r,null,4)} (type ${typeof r})`);else i=A({},he);let u=e.filter(n=>Array.isArray(n)).map(n=>[...n]).filter(n=>n[2]!==void 0||n[0]!==n[1]),t,l,o;i.progressFn?t=V(u,{progressFn:n=>{o=Math.floor(n/5),o!==l&&(l=o,i.progressFn(o))}}):t=V(u);let g=t.length-1;for(let n=g;n>0;n--)i.progressFn&&(o=Math.floor((1-n/g)*78)+21,o!==l&&o>l&&(l=o,i.progressFn(o))),(t[n][0]<=t[n-1][0]||!i.joinRangesThatTouchEdges&&t[n][0]<t[n-1][1]||i.joinRangesThatTouchEdges&&t[n][0]<=t[n-1][1])&&(t[n-1][0]=Math.min(t[n][0],t[n-1][0]),t[n-1][1]=Math.max(t[n][1],t[n-1][1]),t[n][2]!==void 0&&(t[n-1][0]>=t[n][0]||t[n-1][1]<=t[n][1])&&t[n-1][2]!==null&&(t[n][2]===null&&t[n-1][2]!==null?t[n-1][2]=null:t[n-1][2]!=null?+i.mergeType==2&&t[n-1][0]===t[n][0]?t[n-1][2]=t[n][2]:t[n-1][2]+=t[n][2]:t[n-1][2]=t[n][2]),t.splice(n,1),n=t.length);return t.length?t:null}var Qe=!0,Q="Invariant failed";function $e(e,r){if(!e){if(Qe)throw new Error(Q);var a=typeof r=="function"?r():r,i=a?"".concat(Q,": ").concat(a):Q;throw new Error(i)}}function G(e,r,a){let i=0,u=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(r&&!Array.isArray(r))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(a&&typeof a!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof a}, equal to: ${JSON.stringify(a,null,4)}`);if(!(r!=null&&r.filter(c=>c).length))return e;let t;Array.isArray(r)&&Number.isInteger(r[0])&&Number.isInteger(r[1])?t=[Array.from(r)]:t=Array.from(r);let l=t.length,o=0;t.filter(c=>c).forEach((c,p)=>{if(a&&(i=Math.floor(o/l*10),i!==u&&(u=i,a(i))),!Array.isArray(c))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${p}th element not an array: ${JSON.stringify(c,null,4)}, which is ${typeof c}`);if(!Number.isInteger(c[0])){if(!Number.isInteger(+c[0])||+c[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(c,null,0)}. Its first element is not an integer, string index, but ${typeof c[0]}, equal to: ${JSON.stringify(c[0],null,4)}.`);t[p][0]=+t[p][0]}if(!Number.isInteger(c[1])){if(!Number.isInteger(+c[1])||+c[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(c,null,0)}. Its second element is not an integer, string index, but ${typeof c[1]}, equal to: ${JSON.stringify(c[1],null,4)}.`);t[p][1]=+t[p][1]}o+=1});let g=pe(t,{progressFn:c=>{a&&(i=10+Math.floor(c/10),i!==u&&(u=i,a(i)))}});$e(g);let n=g.length;if(n>0){let c=e.slice(g[n-1][1]);e=g.reduce((p,h,m,d)=>{a&&(i=20+Math.floor(m/n*80),i!==u&&(u=i,a(i)));let v=m===0?0:d[m-1][1],y=d[m][0];return`${p}${e.slice(v,y)}${d[m][2]||""}`},""),e+=c}return e}var be="4.0.12";var H=" ",P="\\00A0",B="\\u00A0",ye="–",we="\\2013",Ee="\\u2013",Ae="—",Te="\\2014",ve="\\u2014",K=[{heads:"{{",tails:"}}"},{heads:["{% if","{%- if"],tails:["{% endif","{%- endif"]},{heads:["{% for","{%- for"],tails:["{% endfor","{%- endfor"]},{heads:["{%","{%-"],tails:["%}","-%}"]},{heads:"{#",tails:"#}"}],Se=[{heads:"{{",tails:"}}"}],Z=[{heads:["<%","<%=","<%-"],tails:["%>","=%>","-%>"]}],De=["abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"];var Ke=be,Ne={removeWidowPreventionMeasures:!1,convertEntities:!0,targetLanguage:"html",UKPostcodes:!1,hyphens:!0,minWordCount:4,minCharCount:5,ignore:[],reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,tagRanges:[]};function Ze(e,r){let a=Date.now();if(typeof e!="string")throw e===void 0?new Error("string-remove-widows: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`string-remove-widows: [THROW_ID_02] the first input argument must be string! It was given as "${typeof e}", equal to:
|
|
26
|
+
${JSON.stringify(e,null,4)}`);if(r&&typeof r!="object")throw new Error(`string-remove-widows: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof r}, equal to ${JSON.stringify(r,null,4)}`);let i=Array.isArray,u=e.length,t=new de({mergeType:2}),l=["."],o=/[A-Z]{1,2}[0-9][0-9A-Z]?$/,g=/^[0-9][A-Z]{2}/,n=.06,c,p=0,h=0,m=0,d,v,y,T,w,b,E,S,f=A(A({},Ne),r),W={removeWidows:!1,convertEntities:!1};if(!f.ignore||!i(f.ignore)&&typeof f.ignore!="string")f.ignore=[];else if(typeof f.ignore=="string"&&(f.ignore=[f.ignore]),f.ignore.includes("all"))f.ignore=f.ignore.concat(K.concat(Z));else if(f.ignore.some(s=>typeof s=="string")){let s=[];f.ignore=f.ignore.filter(D=>typeof D=="string"&&D.length?(["nunjucks","jinja","liquid"].includes(D.trim().toLowerCase())?s=s.concat(K):["hugo"].includes(D.trim().toLowerCase())?s=s.concat(Se):["hexo"].includes(D.trim().toLowerCase())&&(s=s.concat(Z)),!1):typeof D=="object"),s.length&&(f.ignore=f.ignore.concat(s))}let z;f.reportProgressFunc&&(z=Math.floor(f.reportProgressFuncTo-(f.reportProgressFuncTo-f.reportProgressFuncFrom)*n-f.reportProgressFuncFrom));function U(s,D){let $=M;f.removeWidowPreventionMeasures?$=" ":f.convertEntities&&($=H,typeof f.targetLanguage=="string"&&(f.targetLanguage.trim().toLowerCase()==="css"?$=P:f.targetLanguage.trim().toLowerCase()==="js"&&($=B))),e.slice(s,D)!==$&&t.push(s,D,$)}function Y(){h=0,m=0,d=void 0,v=void 0,y=void 0,T=void 0,w=void 0,b=void 0}Y();for(let s=0;s<=u;s++){if(!E&&i(f.ignore)&&f.ignore.length&&f.ignore.some(($,C)=>{if(i($.heads)&&$.heads.some(X=>e.startsWith(X,s))||typeof $.heads=="string"&&e.startsWith($.heads,s))return h+=1,E=f.ignore[C].tails,!0}),!E&&S&&S===s&&(h+=1,S=void 0),typeof f.reportProgressFunc=="function"&&(c=f.reportProgressFuncFrom+Math.floor(s/u*(z||1)),c!==p&&(p=c,f.reportProgressFunc(c))),!E&&s&&e[s]&&e[s].trim()&&(!e[s-1]||e[s-1]&&!e[s-1].trim())&&(T=s),!E&&e[s]&&e[s].trim()&&(m+=1),!E&&f.hyphens&&(`-${oe}${ie}`.includes(e[s])||e.startsWith(ye,s)||e.startsWith(we,s)||e.startsWith(Ee,s)||e.startsWith(Ae,s)||e.startsWith(Te,s)||e.startsWith(ve,s))&&e[s+1]&&(!e[s+1].trim()||e[s]==="&")&&e[s-1]&&!e[s-1].trim()&&e[_(e,s)]&&(U(_(e,s)+1,s),W.removeWidows=!0),!E&&(e.startsWith(" ",s)||e.startsWith(" ",s))&&(w=s,b=s+6,e[s+6]&&e[s+6].trim()&&(S=s+6),f.convertEntities?(f.targetLanguage==="css"||f.targetLanguage==="js")&&(t.push(s,s+6,f.targetLanguage==="css"?P:B),W.convertEntities=!0):(t.push(s,s+6,M),W.convertEntities=!0)),!E&&e[s+4]&&e[s]==="\\"&&e[s+1]==="0"&&e[s+2]==="0"&&e[s+3].toUpperCase()==="A"&&e[s+4]==="0"&&(w=s,b=s+5,e[s+5]&&e[s+5].trim()&&(S=s+5),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="js")&&(t.push(s,s+5,f.targetLanguage==="html"?H:B),W.convertEntities=!0):(t.push(s,s+5,M),W.convertEntities=!0)),!E&&e[s]==="\\"&&e[s+1]&&e[s+1].toLowerCase()==="u"&&e[s+2]==="0"&&e[s+3]==="0"&&e[s+4]&&e[s+4].toUpperCase()==="A"&&e[s+5]==="0"&&(w=s,b=s+6,e[s+6]&&e[s+6].trim()&&(S=s+6),f.convertEntities?(f.targetLanguage==="html"||f.targetLanguage==="css")&&t.push(s,s+6,f.targetLanguage==="html"?H:P):t.push(s,s+6,M)),!E&&e[s]===M&&(w=s,b=s+1,f.convertEntities&&t.push(s,s+1,f.targetLanguage==="css"?P:f.targetLanguage==="js"?B:H)),!E&&e[s]&&e[s].trim()&&(!e[s-1]||!e[s-1].trim())&&(h+=1),!E&&(!e[s]||`\r
|
|
27
27
|
`.includes(e[s])||(e[s]===`
|
|
28
28
|
`||e[s]==="\r"||e[s]==="\r"&&e[s+1]===`
|
|
29
|
-
`)&&
|
|
30
|
-
`.includes(e[s])&&(
|
|
29
|
+
`)&&_(e,s)&&l.includes(e[_(e,s)]))){if((!f.minWordCount||h>=f.minWordCount)&&(!f.minCharCount||m>=f.minCharCount)){let $,C;y!==void 0&&T!==void 0&&w!==void 0&&b!==void 0?y>w?($=y,C=T):($=w,C=b):y!==void 0&&T!==void 0?($=y,C=T):w!==void 0&&b!==void 0&&($=w,C=b),!($&&C)&&d&&v&&($=d,C=v),$&&C&&(U($,C),W.removeWidows=!0)}Y()}f.UKPostcodes&&e[s]&&!e[s].trim()&&e[s-1]&&e[s-1].trim()&&o.test(e.slice(0,s))&&e[I(e,s)]&&g.test(e.slice(I(e,s)))&&(U(s,I(e,s)),W.removeWidows=!0),!E&&e[s]&&!e[s].trim()&&e[s-1]&&e[s-1].trim()&&(y===void 0||e[y-1]&&e[y-1].trim())&&!"/>".includes(e[I(e,s)])&&!e.slice(0,s).trim().endsWith("br")&&!e.slice(0,s).trim().endsWith("hr")&&!(e.slice(0,s).endsWith("<")&&De.some($=>e.startsWith($,I(e,s))))&&(d=y,v=T,y=s,T=void 0,(w!==void 0||b!==void 0)&&(w=void 0,b=void 0));let D;E&&(typeof E=="string"&&(!E.length||e.startsWith(E,s))?E=void 0:i(E)&&(!E.length||E.some($=>{if(e.startsWith($,s))return D=$,!0}))&&(E=void 0,s+=D.length,i(f.ignore)&&f.ignore.length&&e[s+1]&&f.ignore.some($=>ue(e,s,$.tails,{trimBeforeMatching:!0,cb:(C,X,ee)=>(ee&&(s=ee-1,e[s+1]&&e[s+1].trim()&&(h+=1)),!0)})))),e[s]&&`\r
|
|
30
|
+
`.includes(e[s])&&(h=0,m=0),i(f.tagRanges)&&f.tagRanges.length&&f.tagRanges.some($=>{if(s>=$[0]&&s<=$[1]&&$[1]-1>s)return s=$[1]-1,!0})}return G(e,t.current()).split("").forEach((s,D)=>{}),{res:G(e,t.current(),f.reportProgressFunc?s=>{c=Math.floor((f.reportProgressFuncTo-f.reportProgressFuncFrom)*(1-n)+s/100*(f.reportProgressFuncTo-f.reportProgressFuncFrom)*n),c!==p&&(p=c,f.reportProgressFunc(c))}:void 0),ranges:t.current(),log:{timeTakenInMilliseconds:Date.now()-a},whatWasDone:W}}return Ve(ze);})();
|
|
31
31
|
/**
|
|
32
32
|
* @name arrayiffy-if-string
|
|
33
33
|
* @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
|
|
@@ -39,7 +39,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
39
39
|
/**
|
|
40
40
|
* @name codsen-utils
|
|
41
41
|
* @fileoverview Various utility functions
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.5.0
|
|
43
43
|
* @author Roy Revelt, Codsen Ltd
|
|
44
44
|
* @license MIT
|
|
45
45
|
* {@link https://codsen.com/os/codsen-utils/}
|
|
@@ -47,7 +47,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
47
47
|
/**
|
|
48
48
|
* @name string-match-left-right
|
|
49
49
|
* @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
|
|
50
|
-
* @version 9.0.
|
|
50
|
+
* @version 9.0.12
|
|
51
51
|
* @author Roy Revelt, Codsen Ltd
|
|
52
52
|
* @license MIT
|
|
53
53
|
* {@link https://codsen.com/os/string-match-left-right/}
|
|
@@ -55,7 +55,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
55
55
|
/**
|
|
56
56
|
* @name string-left-right
|
|
57
57
|
* @fileoverview Looks up the first non-whitespace character to the left/right of a given index
|
|
58
|
-
* @version 6.0.
|
|
58
|
+
* @version 6.0.12
|
|
59
59
|
* @author Roy Revelt, Codsen Ltd
|
|
60
60
|
* @license MIT
|
|
61
61
|
* {@link https://codsen.com/os/string-left-right/}
|
|
@@ -71,7 +71,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
71
71
|
/**
|
|
72
72
|
* @name ranges-sort
|
|
73
73
|
* @fileoverview Sort string index ranges
|
|
74
|
-
* @version 6.0.
|
|
74
|
+
* @version 6.0.8
|
|
75
75
|
* @author Roy Revelt, Codsen Ltd
|
|
76
76
|
* @license MIT
|
|
77
77
|
* {@link https://codsen.com/os/ranges-sort/}
|
|
@@ -79,7 +79,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
79
79
|
/**
|
|
80
80
|
* @name ranges-push
|
|
81
81
|
* @fileoverview Gather string index ranges
|
|
82
|
-
* @version 7.0.
|
|
82
|
+
* @version 7.0.9
|
|
83
83
|
* @author Roy Revelt, Codsen Ltd
|
|
84
84
|
* @license MIT
|
|
85
85
|
* {@link https://codsen.com/os/ranges-push/}
|
|
@@ -87,7 +87,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
87
87
|
/**
|
|
88
88
|
* @name ranges-merge
|
|
89
89
|
* @fileoverview Merge and sort string index ranges
|
|
90
|
-
* @version 9.0.
|
|
90
|
+
* @version 9.0.9
|
|
91
91
|
* @author Roy Revelt, Codsen Ltd
|
|
92
92
|
* @license MIT
|
|
93
93
|
* {@link https://codsen.com/os/ranges-merge/}
|
|
@@ -95,7 +95,7 @@ ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`string-r
|
|
|
95
95
|
/**
|
|
96
96
|
* @name ranges-apply
|
|
97
97
|
* @fileoverview Take an array of string index ranges, delete/replace the string according to them
|
|
98
|
-
* @version 7.0.
|
|
98
|
+
* @version 7.0.9
|
|
99
99
|
* @author Roy Revelt, Codsen Ltd
|
|
100
100
|
* @license MIT
|
|
101
101
|
* {@link https://codsen.com/os/ranges-apply/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "string-remove-widows",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"description": "Helps to prevent widow words in a text",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"against",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"codsen-utils": "^1.
|
|
79
|
-
"ranges-apply": "^7.0.
|
|
80
|
-
"ranges-push": "^7.0.
|
|
81
|
-
"string-left-right": "^6.0.
|
|
82
|
-
"string-match-left-right": "^9.0.
|
|
78
|
+
"codsen-utils": "^1.5.0",
|
|
79
|
+
"ranges-apply": "^7.0.9",
|
|
80
|
+
"ranges-push": "^7.0.9",
|
|
81
|
+
"string-left-right": "^6.0.12",
|
|
82
|
+
"string-match-left-right": "^9.0.12"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"string-strip-html": "^13.2.
|
|
85
|
+
"string-strip-html": "^13.2.4"
|
|
86
86
|
}
|
|
87
87
|
}
|