is-html-tag-opening 3.1.2 → 3.1.4

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/CHANGELOG.md CHANGED
@@ -12,7 +12,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
12
12
 
13
13
  ## 3.0.15 (2022-04-18)
14
14
 
15
- ### Bug Fixes
15
+ ### Fixed
16
16
 
17
17
  - tweak types ([6e721d2](https://github.com/codsen/codsen/commit/6e721d2872d07182718d0ab4e54e213e62a88b17))
18
18
 
@@ -40,14 +40,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
40
40
 
41
41
  ## 2.0.9 (2021-03-23)
42
42
 
43
- ### Bug Fixes
43
+ ### Fixed
44
44
 
45
45
  - address the `opts.allowCustomTagNames` in context of malformed closing tags ([0a785fa](https://github.com/codsen/codsen/commit/0a785faa2a0e7821007fa9c9665bc247ac4cc6b2))
46
46
  - better detection of missing opening bracket when slash + known tag name follows ([b569953](https://github.com/codsen/codsen/commit/b56995356d6b449851ba1fc4a9e4e1b7bc220770))
47
47
 
48
48
  ## 2.0.1 (2021-01-28)
49
49
 
50
- ### Bug Fixes
50
+ ### Fixed
51
51
 
52
52
  - add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
53
53
 
@@ -85,7 +85,7 @@ Accidental version bump during migration to sourcehut. Sorry about that.
85
85
 
86
86
  ## 1.7.0 (2020-03-16)
87
87
 
88
- ### Bug Fixes
88
+ ### Fixed
89
89
 
90
90
  - require that tag name would not be followed by equal sign ([9081082](https://gitlab.com/codsen/codsen/commit/9081082c8f0a4142c6c4941405b4b1b400d1e390))
91
91
 
@@ -137,4 +137,4 @@ Accidental version bump during migration to sourcehut. Sorry about that.
137
137
 
138
138
  ## 1.0.0 (2019-11-01)
139
139
 
140
- - First public release
140
+ - First public release
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 3.1.2
4
+ * @version 3.1.4
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- import{matchRight as N,matchRightIncl as S}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="3.1.2";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},r="[\\\\ \\t\\r\\n/]*",i="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}\\w+${r}\\/?${r}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}[${i}]+[-${i}]*${r}>`,"g"),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${i}]+[-${i}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${i}]+[-${i}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}[${i}]+[-${i}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${r}[${i}]+)+${r}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
10
+ import{matchRight as N,matchRightIncl as S}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="3.1.4";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},r="[\\\\ \\t\\r\\n/]*",i="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}\\w+${r}\\/?${r}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}[${i}]+[-${i}]*${r}>`,"g"),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${i}]+[-${i}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${i}]+[-${i}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${r}[${i}]+[-${i}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${r}[${i}]+)+${r}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
11
  `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]&&s[1].trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||E.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]&&s[1].trim())&&$.test(s)||w.test(s)&&p(e,t)||y.test(s)||D.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&S(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]&&e[t+1].trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
12
  `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]&&e[t+1].trim()&&N(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 3.1.2
4
+ * @version 3.1.4
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- "use strict";var isHtmlTagOpening=(()=>{var _e=Object.create;var L=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames,mt=Object.getOwnPropertySymbols,Ce=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var dt=(t,e,r)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&dt(t,r,e[r]);if(mt)for(var r of mt(e))Ae.call(e,r)&&dt(t,r,e[r]);return t};var yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ee=(t,e)=>{for(var r in e)L(t,r,{get:e[r],enumerable:!0})},wt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!bt.call(t,i)&&i!==r&&L(t,i,{get:()=>e[i],enumerable:!(n=ve(e,i))||n.enumerable});return t};var $t=(t,e,r)=>(r=t!=null?_e(Ce(t)):{},wt(e||!t||!t.__esModule?L(r,"default",{value:t,enumerable:!0}):r,t)),Te=t=>wt(L({},"__esModule",{value:!0}),t);var Rt=yt((An,St)=>{var Re="[object Object]";function xe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function je(t,e){return function(r){return t(e(r))}}var Be=Function.prototype,Tt=Object.prototype,Mt=Be.toString,De=Tt.hasOwnProperty,Ie=Mt.call(Object),Le=Tt.toString,Ne=je(Object.getPrototypeOf,Object);function ke(t){return!!t&&typeof t=="object"}function Ve(t){if(!ke(t)||Le.call(t)!=Re||xe(t))return!1;var e=Ne(t);if(e===null)return!0;var r=De.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Mt.call(r)==Ie}St.exports=Ve});var ye=yt((N,x)=>{var He=200,Ft="__lodash_hash_undefined__",qt=9007199254740991,it="[object Arguments]",Pe="[object Array]",Wt="[object Boolean]",Gt="[object Date]",Fe="[object Error]",ot="[object Function]",Jt="[object GeneratorFunction]",F="[object Map]",Ut="[object Number]",st="[object Object]",xt="[object Promise]",Kt="[object RegExp]",q="[object Set]",Yt="[object String]",Xt="[object Symbol]",z="[object WeakMap]",Zt="[object ArrayBuffer]",W="[object DataView]",zt="[object Float32Array]",Qt="[object Float64Array]",te="[object Int8Array]",ee="[object Int16Array]",re="[object Int32Array]",ne="[object Uint8Array]",ie="[object Uint8ClampedArray]",oe="[object Uint16Array]",se="[object Uint32Array]",qe=/[\\^$.*+?()[\]{}|]/g,We=/\w*$/,Ge=/^\[object .+?Constructor\]$/,Je=/^(?:0|[1-9]\d*)$/,h={};h[it]=h[Pe]=h[Zt]=h[W]=h[Wt]=h[Gt]=h[zt]=h[Qt]=h[te]=h[ee]=h[re]=h[F]=h[Ut]=h[st]=h[Kt]=h[q]=h[Yt]=h[Xt]=h[ne]=h[ie]=h[oe]=h[se]=!0;h[Fe]=h[ot]=h[z]=!1;var Ue=typeof global=="object"&&global&&global.Object===Object&&global,Ke=typeof self=="object"&&self&&self.Object===Object&&self,O=Ue||Ke||Function("return this")(),ae=typeof N=="object"&&N&&!N.nodeType&&N,jt=ae&&typeof x=="object"&&x&&!x.nodeType&&x,Ye=jt&&jt.exports===ae;function Xe(t,e){return t.set(e[0],e[1]),t}function Ze(t,e){return t.add(e),t}function ze(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Qe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ue(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function tr(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function er(t,e){return t==null?void 0:t[e]}function le(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Bt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function at(t,e){return function(r){return t(e(r))}}function Dt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var rr=Array.prototype,nr=Function.prototype,G=Object.prototype,Z=O["__core-js_shared__"],It=function(){var t=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ce=nr.toString,A=G.hasOwnProperty,J=G.toString,ir=RegExp("^"+ce.call(A).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ye?O.Buffer:void 0,Nt=O.Symbol,kt=O.Uint8Array,or=at(Object.getPrototypeOf,Object),sr=Object.create,ar=G.propertyIsEnumerable,ur=rr.splice,Vt=Object.getOwnPropertySymbols,lr=Lt?Lt.isBuffer:void 0,cr=at(Object.keys,Object),Q=D(O,"DataView"),k=D(O,"Map"),tt=D(O,"Promise"),et=D(O,"Set"),rt=D(O,"WeakMap"),V=D(Object,"create"),fr=R(Q),hr=R(k),gr=R(tt),pr=R(et),mr=R(rt),Ht=Nt?Nt.prototype:void 0,Pt=Ht?Ht.valueOf:void 0;function S(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dr(){this.__data__=V?V(null):{}}function br(t){return this.has(t)&&delete this.__data__[t]}function yr(t){var e=this.__data__;if(V){var r=e[t];return r===Ft?void 0:r}return A.call(e,t)?e[t]:void 0}function wr(t){var e=this.__data__;return V?e[t]!==void 0:A.call(e,t)}function $r(t,e){var r=this.__data__;return r[t]=V&&e===void 0?Ft:e,this}S.prototype.clear=dr;S.prototype.delete=br;S.prototype.get=yr;S.prototype.has=wr;S.prototype.set=$r;function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function _r(){this.__data__=[]}function vr(t){var e=this.__data__,r=U(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ur.call(e,r,1),!0}function Or(t){var e=this.__data__,r=U(e,t);return r<0?void 0:e[r][1]}function Cr(t){return U(this.__data__,t)>-1}function Ar(t,e){var r=this.__data__,n=U(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}C.prototype.clear=_r;C.prototype.delete=vr;C.prototype.get=Or;C.prototype.has=Cr;C.prototype.set=Ar;function j(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Er(){this.__data__={hash:new S,map:new(k||C),string:new S}}function Tr(t){return K(this,t).delete(t)}function Mr(t){return K(this,t).get(t)}function Sr(t){return K(this,t).has(t)}function Rr(t,e){return K(this,t).set(t,e),this}j.prototype.clear=Er;j.prototype.delete=Tr;j.prototype.get=Mr;j.prototype.has=Sr;j.prototype.set=Rr;function B(t){this.__data__=new C(t)}function xr(){this.__data__=new C}function jr(t){return this.__data__.delete(t)}function Br(t){return this.__data__.get(t)}function Dr(t){return this.__data__.has(t)}function Ir(t,e){var r=this.__data__;if(r instanceof C){var n=r.__data__;if(!k||n.length<He-1)return n.push([t,e]),this;r=this.__data__=new j(n)}return r.set(t,e),this}B.prototype.clear=xr;B.prototype.delete=jr;B.prototype.get=Br;B.prototype.has=Dr;B.prototype.set=Ir;function Lr(t,e){var r=lt(t)||an(t)?tr(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||A.call(t,o))&&!(i&&(o=="length"||rn(o,n)))&&r.push(o);return r}function fe(t,e,r){var n=t[e];(!(A.call(t,e)&&me(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function U(t,e){for(var r=t.length;r--;)if(me(t[r][0],e))return r;return-1}function Nr(t,e){return t&&he(e,ct(e),t)}function nt(t,e,r,n,i,o,u){var s;if(n&&(s=o?n(t,i,o,u):n(t)),s!==void 0)return s;if(!Y(t))return t;var g=lt(t);if(g){if(s=Qr(t),!e)return Xr(t,s)}else{var d=M(t),_=d==ot||d==Jt;if(ln(t))return qr(t,e);if(d==st||d==it||_&&!o){if(le(t))return o?t:{};if(s=tn(_?{}:t),!e)return Zr(t,Nr(s,t))}else{if(!h[d])return o?t:{};s=en(t,d,nt,e)}}u||(u=new B);var w=u.get(t);if(w)return w;if(u.set(t,s),!g)var p=r?zr(t):ct(t);return ze(p||t,function(f,a){p&&(a=f,f=t[a]),fe(s,a,nt(f,e,r,n,a,t,u))}),s}function kr(t){return Y(t)?sr(t):{}}function Vr(t,e,r){var n=e(t);return lt(t)?n:Qe(n,r(t))}function Hr(t){return J.call(t)}function Pr(t){if(!Y(t)||on(t))return!1;var e=be(t)||le(t)?ir:Ge;return e.test(R(t))}function Fr(t){if(!pe(t))return cr(t);var e=[];for(var r in Object(t))A.call(t,r)&&r!="constructor"&&e.push(r);return e}function qr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ut(t){var e=new t.constructor(t.byteLength);return new kt(e).set(new kt(t)),e}function Wr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Gr(t,e,r){var n=e?r(Bt(t),!0):Bt(t);return ue(n,Xe,new t.constructor)}function Jr(t){var e=new t.constructor(t.source,We.exec(t));return e.lastIndex=t.lastIndex,e}function Ur(t,e,r){var n=e?r(Dt(t),!0):Dt(t);return ue(n,Ze,new t.constructor)}function Kr(t){return Pt?Object(Pt.call(t)):{}}function Yr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Xr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function he(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;fe(r,u,s===void 0?t[u]:s)}return r}function Zr(t,e){return he(t,ge(t),e)}function zr(t){return Vr(t,ct,ge)}function K(t,e){var r=t.__data__;return nn(e)?r[typeof e=="string"?"string":"hash"]:r.map}function D(t,e){var r=er(t,e);return Pr(r)?r:void 0}var ge=Vt?at(Vt,Object):hn,M=Hr;(Q&&M(new Q(new ArrayBuffer(1)))!=W||k&&M(new k)!=F||tt&&M(tt.resolve())!=xt||et&&M(new et)!=q||rt&&M(new rt)!=z)&&(M=function(t){var e=J.call(t),r=e==st?t.constructor:void 0,n=r?R(r):void 0;if(n)switch(n){case fr:return W;case hr:return F;case gr:return xt;case pr:return q;case mr:return z}return e});function Qr(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&A.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function tn(t){return typeof t.constructor=="function"&&!pe(t)?kr(or(t)):{}}function en(t,e,r,n){var i=t.constructor;switch(e){case Zt:return ut(t);case Wt:case Gt:return new i(+t);case W:return Wr(t,n);case zt:case Qt:case te:case ee:case re:case ne:case ie:case oe:case se:return Yr(t,n);case F:return Gr(t,n,r);case Ut:case Yt:return new i(t);case Kt:return Jr(t);case q:return Ur(t,n,r);case Xt:return Kr(t)}}function rn(t,e){return e=e==null?qt:e,!!e&&(typeof t=="number"||Je.test(t))&&t>-1&&t%1==0&&t<e}function nn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function on(t){return!!It&&It in t}function pe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||G;return t===r}function R(t){if(t!=null){try{return ce.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function sn(t){return nt(t,!0,!0)}function me(t,e){return t===e||t!==t&&e!==e}function an(t){return un(t)&&A.call(t,"callee")&&(!ar.call(t,"callee")||J.call(t)==it)}var lt=Array.isArray;function de(t){return t!=null&&cn(t.length)&&!be(t)}function un(t){return fn(t)&&de(t)}var ln=lr||gn;function be(t){var e=Y(t)?J.call(t):"";return e==ot||e==Jt}function cn(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=qt}function Y(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fn(t){return!!t&&typeof t=="object"}function ct(t){return de(t)?Lr(t):Fr(t)}function hn(){return[]}function gn(){return!1}x.exports=sn});var $n={};Ee($n,{defaults:()=>ht,isOpening:()=>wn,version:()=>yn});function _t(t){return typeof t!="string"?t:t.length?[t]:[]}function vt(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function P(t){return typeof t=="string"}var Ot={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Me=t=>t+1;function Se(t,e,r,n,i=!1,o=Me){let u=typeof r=="function"?r():r;if(+e<0&&i&&u==="EOL")return u;let s=v(v({},Ot),n);if(e>=t.length&&!i)return!1;let g=i?1:r.length,d=0,_=!1,w=!1,p=!1,f=s.maxMismatches,a=e,y=!1,l=!1,b=!1;function m(){return d===1&&f<s.maxMismatches-1}for(;t[a];){let c=o(a);if(s.trimBeforeMatching&&t[a].trim()===""){if(!t[c]&&i&&r==="EOL")return!0;a=o(a);continue}if(s&&!s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.includes(t[a])||(s==null?void 0:s.i)&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(T=>T.toLowerCase()).includes(t[a].toLowerCase())){if(i&&r==="EOL"&&!t[c])return!0;a=o(a);continue}let E=c>a?r[r.length-g]:r[g-1];if(!s.i&&t[a]===E||s.i&&t[a].toLowerCase()===E.toLowerCase()){if(y||(y=!0),p||(p=!0),g===r.length){if(l=!0,f!==s.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,d++,m())return!1;if(!g)return d!==r.length||f===s.maxMismatches||!_?a:!1}else if(!_&&!d&&(_=!0),s.maxMismatches&&f&&a){f-=1;for(let T=0;T<=f;T++){let $=c>a?r[r.length-g+1+T]:r[g-2-T],X=t[o(a)];if($&&(!s.i&&t[a]===$||s.i&&t[a].toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(d++,m())return!1;g-=2,y=!0;break}else if(X&&$&&(!s.i&&X===$||s.i&&X.toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(!d&&!s.hungry)return!1;g-=1,y=!0;break}else if($===void 0&&f>=0&&y&&(!s.firstMustMatch||l)&&(!s.lastMustMatch||b))return a}y||(w=a)}else return a===0&&g===1&&!s.lastMustMatch&&p?0:!1;if(w!==!1&&w!==a&&(w=!1),g<1)return a;a=o(a)}if(g>0)return i&&u==="EOL"?!0:s&&s.maxMismatches>=g&&p?w||0:!1}function Ct(t,e,r,n,i){var _,w;if(vt(i)&&Object.prototype.hasOwnProperty.call(i,"trimBeforeMatching")&&i&&typeof i.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(i.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let o=v(v({},Ot),i);if(typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=_t(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(p=>P(p)?p:String(p)),!P(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
10
+ "use strict";var isHtmlTagOpening=(()=>{var _e=Object.create;var L=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames,mt=Object.getOwnPropertySymbols,Ce=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var dt=(t,e,r)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))bt.call(e,r)&&dt(t,r,e[r]);if(mt)for(var r of mt(e))Ae.call(e,r)&&dt(t,r,e[r]);return t};var yt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ee=(t,e)=>{for(var r in e)L(t,r,{get:e[r],enumerable:!0})},wt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!bt.call(t,i)&&i!==r&&L(t,i,{get:()=>e[i],enumerable:!(n=ve(e,i))||n.enumerable});return t};var $t=(t,e,r)=>(r=t!=null?_e(Ce(t)):{},wt(e||!t||!t.__esModule?L(r,"default",{value:t,enumerable:!0}):r,t)),Te=t=>wt(L({},"__esModule",{value:!0}),t);var Rt=yt((En,St)=>{var Re="[object Object]";function xe(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function je(t,e){return function(r){return t(e(r))}}var Be=Function.prototype,Tt=Object.prototype,Mt=Be.toString,De=Tt.hasOwnProperty,Ie=Mt.call(Object),Le=Tt.toString,Ne=je(Object.getPrototypeOf,Object);function ke(t){return!!t&&typeof t=="object"}function Ve(t){if(!ke(t)||Le.call(t)!=Re||xe(t))return!1;var e=Ne(t);if(e===null)return!0;var r=De.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Mt.call(r)==Ie}St.exports=Ve});var ye=yt((N,x)=>{var He=200,Ft="__lodash_hash_undefined__",qt=9007199254740991,it="[object Arguments]",Pe="[object Array]",Wt="[object Boolean]",Gt="[object Date]",Fe="[object Error]",ot="[object Function]",Jt="[object GeneratorFunction]",F="[object Map]",Ut="[object Number]",st="[object Object]",xt="[object Promise]",Kt="[object RegExp]",q="[object Set]",Yt="[object String]",Xt="[object Symbol]",z="[object WeakMap]",Zt="[object ArrayBuffer]",W="[object DataView]",zt="[object Float32Array]",Qt="[object Float64Array]",te="[object Int8Array]",ee="[object Int16Array]",re="[object Int32Array]",ne="[object Uint8Array]",ie="[object Uint8ClampedArray]",oe="[object Uint16Array]",se="[object Uint32Array]",qe=/[\\^$.*+?()[\]{}|]/g,We=/\w*$/,Ge=/^\[object .+?Constructor\]$/,Je=/^(?:0|[1-9]\d*)$/,h={};h[it]=h[Pe]=h[Zt]=h[W]=h[Wt]=h[Gt]=h[zt]=h[Qt]=h[te]=h[ee]=h[re]=h[F]=h[Ut]=h[st]=h[Kt]=h[q]=h[Yt]=h[Xt]=h[ne]=h[ie]=h[oe]=h[se]=!0;h[Fe]=h[ot]=h[z]=!1;var Ue=typeof global=="object"&&global&&global.Object===Object&&global,Ke=typeof self=="object"&&self&&self.Object===Object&&self,O=Ue||Ke||Function("return this")(),ae=typeof N=="object"&&N&&!N.nodeType&&N,jt=ae&&typeof x=="object"&&x&&!x.nodeType&&x,Ye=jt&&jt.exports===ae;function Xe(t,e){return t.set(e[0],e[1]),t}function Ze(t,e){return t.add(e),t}function ze(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function Qe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function ue(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function tr(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function er(t,e){return t==null?void 0:t[e]}function le(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}function Bt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function at(t,e){return function(r){return t(e(r))}}function Dt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var rr=Array.prototype,nr=Function.prototype,G=Object.prototype,Z=O["__core-js_shared__"],It=function(){var t=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ce=nr.toString,A=G.hasOwnProperty,J=G.toString,ir=RegExp("^"+ce.call(A).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ye?O.Buffer:void 0,Nt=O.Symbol,kt=O.Uint8Array,or=at(Object.getPrototypeOf,Object),sr=Object.create,ar=G.propertyIsEnumerable,ur=rr.splice,Vt=Object.getOwnPropertySymbols,lr=Lt?Lt.isBuffer:void 0,cr=at(Object.keys,Object),Q=D(O,"DataView"),k=D(O,"Map"),tt=D(O,"Promise"),et=D(O,"Set"),rt=D(O,"WeakMap"),V=D(Object,"create"),fr=R(Q),hr=R(k),gr=R(tt),pr=R(et),mr=R(rt),Ht=Nt?Nt.prototype:void 0,Pt=Ht?Ht.valueOf:void 0;function S(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dr(){this.__data__=V?V(null):{}}function br(t){return this.has(t)&&delete this.__data__[t]}function yr(t){var e=this.__data__;if(V){var r=e[t];return r===Ft?void 0:r}return A.call(e,t)?e[t]:void 0}function wr(t){var e=this.__data__;return V?e[t]!==void 0:A.call(e,t)}function $r(t,e){var r=this.__data__;return r[t]=V&&e===void 0?Ft:e,this}S.prototype.clear=dr;S.prototype.delete=br;S.prototype.get=yr;S.prototype.has=wr;S.prototype.set=$r;function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function _r(){this.__data__=[]}function vr(t){var e=this.__data__,r=U(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ur.call(e,r,1),!0}function Or(t){var e=this.__data__,r=U(e,t);return r<0?void 0:e[r][1]}function Cr(t){return U(this.__data__,t)>-1}function Ar(t,e){var r=this.__data__,n=U(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}C.prototype.clear=_r;C.prototype.delete=vr;C.prototype.get=Or;C.prototype.has=Cr;C.prototype.set=Ar;function j(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Er(){this.__data__={hash:new S,map:new(k||C),string:new S}}function Tr(t){return K(this,t).delete(t)}function Mr(t){return K(this,t).get(t)}function Sr(t){return K(this,t).has(t)}function Rr(t,e){return K(this,t).set(t,e),this}j.prototype.clear=Er;j.prototype.delete=Tr;j.prototype.get=Mr;j.prototype.has=Sr;j.prototype.set=Rr;function B(t){this.__data__=new C(t)}function xr(){this.__data__=new C}function jr(t){return this.__data__.delete(t)}function Br(t){return this.__data__.get(t)}function Dr(t){return this.__data__.has(t)}function Ir(t,e){var r=this.__data__;if(r instanceof C){var n=r.__data__;if(!k||n.length<He-1)return n.push([t,e]),this;r=this.__data__=new j(n)}return r.set(t,e),this}B.prototype.clear=xr;B.prototype.delete=jr;B.prototype.get=Br;B.prototype.has=Dr;B.prototype.set=Ir;function Lr(t,e){var r=lt(t)||an(t)?tr(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||A.call(t,o))&&!(i&&(o=="length"||rn(o,n)))&&r.push(o);return r}function fe(t,e,r){var n=t[e];(!(A.call(t,e)&&me(n,r))||r===void 0&&!(e in t))&&(t[e]=r)}function U(t,e){for(var r=t.length;r--;)if(me(t[r][0],e))return r;return-1}function Nr(t,e){return t&&he(e,ct(e),t)}function nt(t,e,r,n,i,o,u){var s;if(n&&(s=o?n(t,i,o,u):n(t)),s!==void 0)return s;if(!Y(t))return t;var g=lt(t);if(g){if(s=Qr(t),!e)return Xr(t,s)}else{var d=M(t),_=d==ot||d==Jt;if(ln(t))return qr(t,e);if(d==st||d==it||_&&!o){if(le(t))return o?t:{};if(s=tn(_?{}:t),!e)return Zr(t,Nr(s,t))}else{if(!h[d])return o?t:{};s=en(t,d,nt,e)}}u||(u=new B);var w=u.get(t);if(w)return w;if(u.set(t,s),!g)var p=r?zr(t):ct(t);return ze(p||t,function(f,a){p&&(a=f,f=t[a]),fe(s,a,nt(f,e,r,n,a,t,u))}),s}function kr(t){return Y(t)?sr(t):{}}function Vr(t,e,r){var n=e(t);return lt(t)?n:Qe(n,r(t))}function Hr(t){return J.call(t)}function Pr(t){if(!Y(t)||on(t))return!1;var e=be(t)||le(t)?ir:Ge;return e.test(R(t))}function Fr(t){if(!pe(t))return cr(t);var e=[];for(var r in Object(t))A.call(t,r)&&r!="constructor"&&e.push(r);return e}function qr(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ut(t){var e=new t.constructor(t.byteLength);return new kt(e).set(new kt(t)),e}function Wr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Gr(t,e,r){var n=e?r(Bt(t),!0):Bt(t);return ue(n,Xe,new t.constructor)}function Jr(t){var e=new t.constructor(t.source,We.exec(t));return e.lastIndex=t.lastIndex,e}function Ur(t,e,r){var n=e?r(Dt(t),!0):Dt(t);return ue(n,Ze,new t.constructor)}function Kr(t){return Pt?Object(Pt.call(t)):{}}function Yr(t,e){var r=e?ut(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Xr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function he(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;fe(r,u,s===void 0?t[u]:s)}return r}function Zr(t,e){return he(t,ge(t),e)}function zr(t){return Vr(t,ct,ge)}function K(t,e){var r=t.__data__;return nn(e)?r[typeof e=="string"?"string":"hash"]:r.map}function D(t,e){var r=er(t,e);return Pr(r)?r:void 0}var ge=Vt?at(Vt,Object):hn,M=Hr;(Q&&M(new Q(new ArrayBuffer(1)))!=W||k&&M(new k)!=F||tt&&M(tt.resolve())!=xt||et&&M(new et)!=q||rt&&M(new rt)!=z)&&(M=function(t){var e=J.call(t),r=e==st?t.constructor:void 0,n=r?R(r):void 0;if(n)switch(n){case fr:return W;case hr:return F;case gr:return xt;case pr:return q;case mr:return z}return e});function Qr(t){var e=t.length,r=t.constructor(e);return e&&typeof t[0]=="string"&&A.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function tn(t){return typeof t.constructor=="function"&&!pe(t)?kr(or(t)):{}}function en(t,e,r,n){var i=t.constructor;switch(e){case Zt:return ut(t);case Wt:case Gt:return new i(+t);case W:return Wr(t,n);case zt:case Qt:case te:case ee:case re:case ne:case ie:case oe:case se:return Yr(t,n);case F:return Gr(t,n,r);case Ut:case Yt:return new i(t);case Kt:return Jr(t);case q:return Ur(t,n,r);case Xt:return Kr(t)}}function rn(t,e){return e=e==null?qt:e,!!e&&(typeof t=="number"||Je.test(t))&&t>-1&&t%1==0&&t<e}function nn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function on(t){return!!It&&It in t}function pe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||G;return t===r}function R(t){if(t!=null){try{return ce.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function sn(t){return nt(t,!0,!0)}function me(t,e){return t===e||t!==t&&e!==e}function an(t){return un(t)&&A.call(t,"callee")&&(!ar.call(t,"callee")||J.call(t)==it)}var lt=Array.isArray;function de(t){return t!=null&&cn(t.length)&&!be(t)}function un(t){return fn(t)&&de(t)}var ln=lr||gn;function be(t){var e=Y(t)?J.call(t):"";return e==ot||e==Jt}function cn(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=qt}function Y(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fn(t){return!!t&&typeof t=="object"}function ct(t){return de(t)?Lr(t):Fr(t)}function hn(){return[]}function gn(){return!1}x.exports=sn});var $n={};Ee($n,{defaults:()=>ht,isOpening:()=>wn,version:()=>yn});function _t(t){return typeof t!="string"?t:t.length?[t]:[]}function vt(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function P(t){return typeof t=="string"}var Ot={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},Me=t=>t+1;function Se(t,e,r,n,i=!1,o=Me){let u=typeof r=="function"?r():r;if(+e<0&&i&&u==="EOL")return u;let s=v(v({},Ot),n);if(e>=t.length&&!i)return!1;let g=i?1:r.length,d=0,_=!1,w=!1,p=!1,f=s.maxMismatches,a=e,y=!1,l=!1,b=!1;function m(){return d===1&&f<s.maxMismatches-1}for(;t[a];){let c=o(a);if(s.trimBeforeMatching&&t[a].trim()===""){if(!t[c]&&i&&r==="EOL")return!0;a=o(a);continue}if(s&&!s.i&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.includes(t[a])||(s==null?void 0:s.i)&&s.trimCharsBeforeMatching&&s.trimCharsBeforeMatching.map(T=>T.toLowerCase()).includes(t[a].toLowerCase())){if(i&&r==="EOL"&&!t[c])return!0;a=o(a);continue}let E=c>a?r[r.length-g]:r[g-1];if(!s.i&&t[a]===E||s.i&&t[a].toLowerCase()===E.toLowerCase()){if(y||(y=!0),p||(p=!0),g===r.length){if(l=!0,f!==s.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,d++,m())return!1;if(!g)return d!==r.length||f===s.maxMismatches||!_?a:!1}else if(!_&&!d&&(_=!0),s.maxMismatches&&f&&a){f-=1;for(let T=0;T<=f;T++){let $=c>a?r[r.length-g+1+T]:r[g-2-T],X=t[o(a)];if($&&(!s.i&&t[a]===$||s.i&&t[a].toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(d++,m())return!1;g-=2,y=!0;break}else if(X&&$&&(!s.i&&X===$||s.i&&X.toLowerCase()===$.toLowerCase())&&(!s.firstMustMatch||g!==r.length)){if(!d&&!s.hungry)return!1;g-=1,y=!0;break}else if($===void 0&&f>=0&&y&&(!s.firstMustMatch||l)&&(!s.lastMustMatch||b))return a}y||(w=a)}else return a===0&&g===1&&!s.lastMustMatch&&p?0:!1;if(w!==!1&&w!==a&&(w=!1),g<1)return a;a=o(a)}if(g>0)return i&&u==="EOL"?!0:s&&s.maxMismatches>=g&&p?w||0:!1}function Ct(t,e,r,n,i){var _,w;if(vt(i)&&Object.prototype.hasOwnProperty.call(i,"trimBeforeMatching")&&i&&typeof i.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${t}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(i.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let o=v(v({},Ot),i);if(typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=_t(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(p=>P(p)?p:String(p)),!P(e)||!e.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${t}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
11
11
  ${JSON.stringify(r,null,4)}`);let u,s;if(P(n))u=[n];else if(Array.isArray(n))u=n;else if(!n)u=n;else if(typeof n=="function")u=[],u.push(n);else throw new Error(`string-match-left-right/${t}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof n}, equal to:
12
12
  ${JSON.stringify(n,null,4)}`);if(i&&!vt(i))throw new Error(`string-match-left-right/${t}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof i}", and equal to:
13
13
  ${JSON.stringify(i,null,4)}`);let g=0,d="";if((o==null?void 0:o.trimCharsBeforeMatching)&&o.trimCharsBeforeMatching.some((p,f)=>p.length>1?(g=f,d=p,!0):!1))throw new Error(`string-match-left-right/${t}(): [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, ${d.length} (equals to ${d}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&P(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let f,a=r;if((t==="matchLeftIncl"||t==="matchRight")&&(a+=1),t[5]==="L")for(let m=a;m--;){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c!==void 0&&c.trim())&&(!((_=o.trimCharsBeforeMatching)!=null&&_.length)||c!==void 0&&!o.trimCharsBeforeMatching.includes(c))){f=m;break}}else if(t.startsWith("matchRight"))for(let m=a;m<e.length;m++){let c=e[m];if((!o.trimBeforeMatching||o.trimBeforeMatching&&c.trim())&&(!((w=o.trimCharsBeforeMatching)!=null&&w.length)||!o.trimCharsBeforeMatching.includes(c))){f=m;break}}if(f===void 0)return!1;let y=e[f],l=f+1,b="";return l&&l>0&&(b=e.slice(0,l)),t[5]==="L"||f&&f>0&&(b=e.slice(f)),o.cb(y,b,f)}let p="";throw i||(p=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${t}(): [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!${p}`)}for(let p=0,f=u.length;p<f;p++){s=typeof u[p]=="function";let a=u[p],y,l,b="",m=r;t==="matchRight"?m+=1:t==="matchLeft"&&(m-=1);let c=Se(e,m,a,o,s,E=>t[5]==="L"?E-1:E+1);if(c&&s&&typeof a=="function"&&a()==="EOL")return a()&&(o.cb?o.cb(y,b,l):!0)?a():!1;if(Number.isInteger(c)&&(l=t.startsWith("matchLeft")?c-1:c+1,t[5]==="L"?b=e.slice(0,c):b=e.slice(l)),l<0&&(l=void 0),e[l]&&(y=e[l]),Number.isInteger(c)&&(o.cb?o.cb(y,b,l):!0))return a}return!1}function At(t,e,r,n){return Ct("matchRightIncl",t,e,r,n)}function Et(t,e,r,n){return Ct("matchRight",t,e,r,n)}var pn=$t(Rt(),1),mn=$t(ye(),1);var ft="\xA0";function dn({str:t,idx:e,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof t!="string"||!t.length||((!e||typeof e!="number")&&(e=0),e<1))return null;if(t[~-e]&&(t[~-e].trim()||r&&`
14
14
  \r`.includes(t[~-e])||n&&t[~-e]===ft))return~-e;if(t[e-2]&&(t[e-2].trim()||r&&`
15
15
  \r`.includes(t[e-2])||n&&t[e-2]===ft))return e-2;for(let i=e;i--;)if(t[i]&&(t[i].trim()||r&&`
16
- \r`.includes(t[i])||n&&t[i]===ft))return i;return null}function I(t,e=0){return dn({str:t,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}var ht={allowCustomTagNames:!1,skipOpeningBracket:!1},gt="\\",pt=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function we(t){return t===void 0||t.toUpperCase()===t.toLowerCase()&&!/\d/.test(t)&&t!=="="}function H(t,e){return t[e]==="<"||t[I(t,e)]==="<"}var $e="3.1.2";var yn=$e;function wn(t,e=0,r){if(typeof t!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);if(!Number.isInteger(e)||e<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);let n=v(v({},ht),r),i="[\\\\ \\t\\r\\n/]*",o="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",u=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),s=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*${i}>`,"g"),g=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),d=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${o}]+[-${o}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),_=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),w=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${o}]+[-${o}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${o}]+)+${i}[\\\\/=>]`,""),y=new RegExp("^\\/\\s*\\w+s*>"),l=e?t.slice(e):t,b=I(t,e),m=!1,c=!1,E={cb:we,i:!0,trimCharsBeforeMatching:["/",gt,"!"," "," ",`
16
+ \r`.includes(t[i])||n&&t[i]===ft))return i;return null}function I(t,e=0){return dn({str:t,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}var ht={allowCustomTagNames:!1,skipOpeningBracket:!1},gt="\\",pt=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function we(t){return t===void 0||t.toUpperCase()===t.toLowerCase()&&!/\d/.test(t)&&t!=="="}function H(t,e){return t[e]==="<"||t[I(t,e)]==="<"}var $e="3.1.4";var yn=$e;function wn(t,e=0,r){if(typeof t!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);if(!Number.isInteger(e)||e<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);let n=v(v({},ht),r),i="[\\\\ \\t\\r\\n/]*",o="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",u=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),s=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*${i}>`,"g"),g=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),d=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${o}]+[-${o}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),_=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),w=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${o}]+[-${o}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${o}]+[-${o}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),a=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${o}]+)+${i}[\\\\/=>]`,""),y=new RegExp("^\\/\\s*\\w+s*>"),l=e?t.slice(e):t,b=I(t,e),m=!1,c=!1,E={cb:we,i:!0,trimCharsBeforeMatching:["/",gt,"!"," "," ",`
17
17
  `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[I(t,b)]==="<")||l[0]==="<"&&l[1]&&l[1].trim())&&(a.test(l)||/^<\w+$/.test(l))||s.test(l)&&H(t,e)||d.test(l)||w.test(l)&&H(t,e)||f.test(l)||t[e]==="/"&&t[b]!=="<"&&y.test(l))&&(c=!0):(((n.skipOpeningBracket&&(t[e-1]==="<"||t[e-1]==="/"&&t[I(t,b)]==="<")||(l[0]==="<"||l[0]==="/"&&(!t[b]||t[b]!=="<"))&&l[1]&&l[1].trim())&&a.test(l)||u.test(l)&&H(t,e)||g.test(l)||_.test(l)&&H(t,e)||p.test(l))&&(m=!0),m&&At(t,e,pt,{cb:$=>$===void 0?((t[e]==="<"&&t[e+1]&&t[e+1].trim()||t[e-1]==="<")&&(c=!0),!0):$.toUpperCase()===$.toLowerCase()&&!/\d/.test($)&&$!=="=",i:!0,trimCharsBeforeMatching:["<","/",gt,"!"," "," ",`
18
18
  `,"\r"]})&&(c=!0)),!c&&t[e]==="<"&&t[e+1]&&t[e+1].trim()&&Et(t,e,pt,E)&&(c=!0),typeof t=="string"&&e<t.length&&c}return Te($n);})();
19
19
  /**
20
20
  * @name arrayiffy-if-string
21
21
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
22
- * @version 4.1.1
22
+ * @version 4.1.3
23
23
  * @author Roy Revelt, Codsen Ltd
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -27,7 +27,7 @@ ${JSON.stringify(i,null,4)}`);let g=0,d="";if((o==null?void 0:o.trimCharsBeforeM
27
27
  /**
28
28
  * @name string-left-right
29
29
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
30
- * @version 5.1.2
30
+ * @version 5.1.4
31
31
  * @author Roy Revelt, Codsen Ltd
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/string-left-right/}
@@ -35,7 +35,7 @@ ${JSON.stringify(i,null,4)}`);let g=0,d="";if((o==null?void 0:o.trimCharsBeforeM
35
35
  /**
36
36
  * @name string-match-left-right
37
37
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
38
- * @version 8.2.2
38
+ * @version 8.2.4
39
39
  * @author Roy Revelt, Codsen Ltd
40
40
  * @license MIT
41
41
  * {@link https://codsen.com/os/string-match-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-html-tag-opening",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -71,10 +71,10 @@
71
71
  }
72
72
  },
73
73
  "dependencies": {
74
- "string-left-right": "^5.1.2",
75
- "string-match-left-right": "^8.2.2"
74
+ "string-left-right": "^5.1.4",
75
+ "string-match-left-right": "^8.2.4"
76
76
  },
77
77
  "devDependencies": {
78
- "test-mixer": "^3.1.1"
78
+ "test-mixer": "^3.1.3"
79
79
  }
80
80
  }