is-html-tag-opening 4.2.5 → 4.2.6

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,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 4.2.5
4
+ * @version 4.2.6
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- import{formatDiagnosticValue as h}from"codsen-utils";import{left as c}from"string-left-right";import{matchRight as q,matchRightIncl as F}from"string-match-left-right";var d="4.2.5";import{left as j}from"string-left-right";function p(e,t){return e[t]==="<"||e[j(e,t)]==="<"}function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}var f={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"];var W=d;function P(e,t=0,k){if(typeof e!="string")throw new Error(`is-html-tag-opening/isOpening(): [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${h(e,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening/isOpening(): [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${h(t,4)}`);let n={...f,...k},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),V=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),B=/^\/\s*\w+s*>/,s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,C={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
10
+ import{formatDiagnosticValue as h}from"codsen-utils";import{left as c}from"string-left-right";import{matchRight as q,matchRightIncl as F}from"string-match-left-right";var d="4.2.6";import{left as j}from"string-left-right";function p(e,t){return e[t]==="<"||e[j(e,t)]==="<"}function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}var f={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"];var W=d;function P(e,t=0,k){if(typeof e!="string")throw new Error(`is-html-tag-opening/isOpening(): [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${h(e,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening/isOpening(): [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${h(t,4)}`);let n={...f,...k},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),V=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),B=/^\/\s*\w+s*>/,s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,C={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]?.trim())&&($.test(s)||/^<\w+$/.test(s))||E.test(s)&&p(e,t)||D.test(s)||v.test(s)&&p(e,t)||V.test(s)||e[t]==="/"&&e[a]!=="<"&&B.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]?.trim())&&$.test(s)||w.test(s)&&p(e,t)||y.test(s)||O.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&F(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&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]?.trim()&&q(e,t,g,C)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{f as defaults,P as isOpening,W as version};
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.2.5
4
+ * @version 4.2.6
5
5
  * @author Roy Revelt
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 j=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames,P=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var V=(e,r,t)=>r in e?j(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,R=(e,r)=>{for(var t in r||(r={}))q.call(r,t)&&V(e,t,r[t]);if(P)for(var t of P(r))se.call(r,t)&&V(e,t,r[t]);return e};var ae=(e,r)=>{for(var t in r)j(e,t,{get:r[t],enumerable:!0})},ue=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of oe(r))!q.call(e,a)&&a!==t&&j(e,a,{get:()=>r[a],enumerable:!(n=le(r,a))||n.enumerable});return e};var fe=e=>ue(j({},"__esModule",{value:!0}),e);var Re={};ae(Re,{defaults:()=>I,isOpening:()=>ke,version:()=>Ce});function ce(){let e=[],r=0,t=!1;return{append(n){return t?!1:r+n.length>1999?(e.push("\u2026"),r+=1,t=!0,!1):(e.push(n),r+=n.length,!0)},result(){return e.join("")},stopped(){return t}}}function pe(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function E(e,r){if(e.append('"')){for(let t=0;t<r.length&&!e.stopped();t+=1){let n=r.charCodeAt(t);n===34?e.append('\\"'):n===92?e.append("\\\\"):n===8?e.append("\\b"):n===9?e.append("\\t"):n===10?e.append("\\n"):n===12?e.append("\\f"):n===13?e.append("\\r"):n<32||n===8232||n===8233||n>=55296&&n<=57343?e.append(pe(n)):e.append(r[t])}e.append('"')}}function he(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function H(e,r){e.append("Symbol(");let t=String(r);t.length>8&&E(e,t.slice(7,-1)),e.append(")")}function F(e,r){typeof r=="symbol"?H(e,r):E(e,String(r))}function k(e,r=0){let t=ce(),n=r===4?4:0,a=new WeakSet,i=0;function f(_){n&&t.append(" ".repeat(_*n))}function c(_,u){_&&t.append(","),n&&(t.append("\n"),f(u+1))}function w(_,u,s){n&&u&&(t.append("\n"),f(s)),t.append(_)}function $(_,u){Object.prototype.hasOwnProperty.call(_,"value")?y(_.value,u):t.append(he(_))}function O(_,u){let s;try{s=Reflect.getOwnPropertyDescriptor(_,"length")}catch(o){t.append("[Uninspectable]");return}let p=s==null?void 0:s.value;if(!Number.isSafeInteger(p)||p<0){t.append("[Uninspectable]");return}t.append("[");let l=!1;for(let o=0;o<p&&!t.stopped();o+=1){if(c(l,u),l=!0,i>=50){t.append("[MaxEntries]");break}i+=1;let g;try{g=Reflect.getOwnPropertyDescriptor(_,String(o))}catch(v){t.append("[Uninspectable]");continue}g!=null&&g.enumerable?$(g,u+1):t.append("[Empty]")}w("]",l,u)}function A(_,u){let s;try{s=Reflect.ownKeys(_)}catch(l){t.append("[Uninspectable]");return}t.append("{");let p=!1;for(let l of s){if(t.stopped())break;if(i>=50){c(p,u),p=!0,E(t,"\u2026"),t.append(n?": ":":"),t.append("[MaxEntries]");break}i+=1;let o;try{o=Reflect.getOwnPropertyDescriptor(_,l)}catch(g){c(p,u),p=!0,F(t,l),t.append(n?": ":":"),t.append("[Uninspectable]");continue}o!=null&&o.enumerable&&(c(p,u),p=!0,F(t,l),t.append(n?": ":":"),$(o,u+1))}w("}",p,u)}function b(_,u){if(a.has(_)){t.append("[Circular]");return}if(u>=5){t.append("[MaxDepth]");return}let s;try{s=Array.isArray(_)}catch(p){t.append("[Uninspectable]");return}a.add(_);try{s?O(_,u):A(_,u)}finally{a.delete(_)}}function y(_,u){_===null?t.append("null"):typeof _=="string"?E(t,_):typeof _=="number"?t.append(Object.is(_,-0)?"-0":String(_)):typeof _=="boolean"?t.append(_?"true":"false"):typeof _>"u"?t.append("undefined"):typeof _=="bigint"?t.append("".concat(_,"n")):typeof _=="symbol"?H(t,_):typeof _=="function"?t.append("[Function]"):b(_,u)}try{return y(e,0),t.result()}catch(_){return"[Uninspectable]"}}var ge=["_16_0_a_0_4_0_5_m_1_u_1_cp_4_b_e_4_7_0_1_0_3l_4_1_1_2_3_1_0_6_0_1_2_1_0_1_j_1_2a_1_3u_8_4l_1_11_2_0_","6_14_1z_q_4_3_19_16_z_1_1_2q_1_0_f_1_7_1_a_2_2_0_g_0_1_t_t_2g_b_0_o_w_9_1_4_0_5_l_4_0_9_0_3_0_n_o_7_","a_5_n_1_6_g_15_1m_1h_3_0_i_0_7_9_f_f_4_7_2_1_2_l_1_6_1_0_3_3_3_0_g_0_d_1_1_2_e_1_a_0_8_5_4_1_2_l_1_6","_1_1_1_1_1_1_v_3_1_0_j_2_g_8_1_2_1_l_1_6_1_1_1_4_3_0_i_0_f_1_n_0_b_7_2_1_2_l_1_6_1_1_1_4_3_0_u_1_1_2","_f_0_h_0_1_5_3_2_1_3_3_1_1_0_1_1_3_1_3_2_3_b_m_0_1g_7_1_2_1_m_1_f_3_0_q_2_1_1_2_1_u_0_4_7_1_2_1_m_1_","9_1_4_3_0_u_2_1_1_f_1_h_8_1_2_1_14_2_0_g_0_5_2_8_2_o_5_5_h_3_n_1_8_1_0_2_6_1m_1b_1_1_c_6_1m_1_1_0_1_","4_1_n_1_0_1_9_1_1_9_0_2_4_1_0_l_3_w_0_1r_7_1_z_r_4_37_16_k_0_g_5_4_3_3_0_3_1_7_2_4_c_c_0_h_11_1_0_5_","0_2_16_1_98_1_3_2_6_1_0_1_3_2_14_1_3_2_w_1_3_2_6_1_0_1_3_2_e_1_1k_1_3_2_1u_11_f_g_2d_2_5_3_h7_2_g_1_","p_5_22_6_7_7_h_d_i_e_h_e_c_1_2_f_1f_z_0_4_0_1v_2g_7_4_2_x_1_0_5_1x_a_u_1d_t_2_4_b_17_4_p_1i_m_9_1g_2","a_0_2l_1a_h_7_1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=0;e<L.length;e+=2){let r=z+1+Number.parseInt(L[e],36),t=r+Number.parseInt(L[e+1],36);me.push([r,t]),z=t}var Ee=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),de=Object.prototype.hasOwnProperty,G=Function.prototype.toString,be=G.call(Object);var Se=Map.prototype.entries,Le=Set.prototype.values;var U,Be=(U=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:U.get,J,Ie=(J=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:J.get,K,Ne=(K=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:K.get,Q,We=(Q=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:Q.get,Te=RegExp.prototype.test;function S(e){var n;if(e==null||typeof e!="object")return!1;let r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;let t=Object.getOwnPropertyDescriptor(r,"constructor");return!t||!("value"in t)||typeof t.value!="function"?!1:((n=Object.getOwnPropertyDescriptor(t.value,"prototype"))==null?void 0:n.value)===r&&G.call(t.value)===be}function D(e){return typeof e=="string"}var Pe=Date.prototype.getTime;function Z(e,r){return e!=null&&de.call(e,r)}function B(e){return e===32||e>=9&&e<=13||e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function ye(e,r){return r==null?0:typeof r!="number"||!Number.isInteger(r)||r<0?null:r>e?e:r}function x(e,r=0){if(typeof e!="string"||!e.length)return null;let t=ye(e.length,r);if(t===null||t<1)return null;let n=t-1;if(!B(e.charCodeAt(n)))return n;if(n-=1,n<0)return null;if(!B(e.charCodeAt(n)))return n;for(n-=1;n>=0;n--)if(!B(e.charCodeAt(n)))return n;return null}function Y(e){return typeof e!="string"?e:e.length?[e]:[]}var X={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},ee=e=>e+1,we=e=>e-1;function ve(e,r,t,n,a=()=>!1,i=!1,f=ee){if(+r<0&&i&&t==="EOL")return t;if(r>=e.length&&!i)return!1;let c=i?1:t.length,w=0,$=!1,O=!1,A=!1,b=Math.min(n.maxMismatches,e.length+t.length),y=b,_=r,u=!1,s=!1,p=!1;function l(){return w===1&&y<b-1}for(;e[_];){let o=f(_);if(n.trimBeforeMatching&&e[_].trim()===""){if(!e[o]&&i&&t==="EOL")return!0;_=f(_);continue}if(a(e[_])){if(i&&t==="EOL"&&!e[o])return!0;_=f(_);continue}if(i)return!1;let g=o>_?t[t.length-c]:t[c-1];if(!n.i&&e[_]===g||n.i&&g!==void 0&&e[_].toLowerCase()===g.toLowerCase()){if(u||(u=!0),A||(A=!0),c===t.length){if(s=!0,y!==b)return!1}else c===1&&(p=!0);if(c-=1,w++,l())return!1;if(!c)return w!==t.length||y===b||!$?_:!1}else if(!$&&!w&&($=!0),b&&y&&_){y-=1;for(let v=0;v<=y;v++){let m=o>_?t[t.length-c+1+v]:t[c-2-v],h=e[f(_)];if(m&&(!n.i&&e[_]===m||n.i&&e[_].toLowerCase()===m.toLowerCase())&&(!n.firstMustMatch||c!==t.length)){if(w++,l())return!1;c-=2,u=!0;break}else if(h&&m&&(!n.i&&h===m||n.i&&h.toLowerCase()===m.toLowerCase())&&(!n.firstMustMatch||c!==t.length)){if(!w&&!n.hungry)return!1;c-=1,u=!0;break}else if(m===void 0&&y>=0&&u&&(!n.firstMustMatch||s)&&(!n.lastMustMatch||p))return _}u||(O=_)}else return _===0&&c===1&&b>0&&y>0&&(!n.firstMustMatch||s)&&!n.lastMustMatch&&A?0:!1;if(O!==!1&&O!==_&&(O=!1),c<1)return _;_=f(_)}if(c>0)return i&&t==="EOL"?!0:n&&b>=c&&A?O||0:!1}function te(e,r,t,n,a){var _,u,s,p;if(S(a)&&Z(a,"trimBeforeMatching")&&a&&typeof a.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(a.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let i=R(R({},X),a);if(i.maxMismatches=(_=a==null?void 0:a.maxMismatches)!=null?_:X.maxMismatches,$e(i.maxMismatches,e),typeof i.trimCharsBeforeMatching=="string"&&(i.trimCharsBeforeMatching=Y(i.trimCharsBeforeMatching)),i.trimCharsBeforeMatching=i.trimCharsBeforeMatching.map(l=>D(l)?l:String(l)),!D(r)||!r.length)return!1;if(!Number.isInteger(t)||t<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof t,", equal to:\n").concat(k(t,4)));let f,c;if(D(n))f=[n];else if(Array.isArray(n))f=n;else if(!n)f=n;else if(typeof n=="function")f=[],f.push(n);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof n,", equal to:\n").concat(k(n,4)));if(Oe(f,e),a&&!S(a))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof a,'", and equal to:\n').concat(k(a,4)));let w=0,$="";if((u=i==null?void 0:i.trimCharsBeforeMatching)!=null&&u.some((l,o)=>l.length>1?(w=o,$=l,!0):!1))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(w," is longer than 1 character, ").concat($.length," (equals to ").concat($,"). Please split it into separate characters and put into array as separate elements."));if(t>=r.length)return!1;let O=i.i?i.trimCharsBeforeMatching.map(l=>l.toLowerCase()):i.trimCharsBeforeMatching,A=i.i?l=>O.includes(l.toLowerCase()):l=>O.includes(l);if(!f||!Array.isArray(f)||Array.isArray(f)&&!f.length||Array.isArray(f)&&f.length===1&&D(f[0])&&!f[0].trim()){if(typeof i.cb=="function"){let o,g=t;if((e==="matchLeftIncl"||e==="matchRight")&&(g+=1),e[5]==="L")for(let h=g;h--;){let d=r[h];if((!i.trimBeforeMatching||i.trimBeforeMatching&&(d!=null&&d.trim()))&&(!((s=i.trimCharsBeforeMatching)!=null&&s.length)||d!==void 0&&!A(d))){o=h;break}}else if(e.startsWith("matchRight"))for(let h=g;h<r.length;h++){let d=r[h];if((!i.trimBeforeMatching||i.trimBeforeMatching&&d.trim())&&(!((p=i.trimCharsBeforeMatching)!=null&&p.length)||!A(d))){o=h;break}}if(o===void 0)return!1;let v=r[o],m=e[5]==="L"?r.slice(0,o+1):r.slice(o);return e[5],i.cb(v,m,o)}let l="";throw a||(l=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(e,'(): [THROW_ID_06] 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!').concat(l))}if(!i.cb&&!i.i&&!i.trimBeforeMatching&&!i.trimCharsBeforeMatching.length&&i.maxMismatches===0&&!i.firstMustMatch&&!i.lastMustMatch&&!i.hungry&&f.every(D)){for(let l of f){if(!l.length)continue;let o=t;if(e==="matchRight"?o+=1:e==="matchLeft"?o-=l.length:e==="matchLeftIncl"&&(o-=l.length-1),o>=0&&r.startsWith(l,o))return l}return!1}let b=t;e==="matchRight"?b+=1:e==="matchLeft"&&(b-=1);let y=e[5]==="L"?we:ee;for(let l=0,o=f.length;l<o;l++){c=typeof f[l]=="function";let g=f[l],v=typeof g=="function"?g():g;if(c&&v!=="EOL")throw new Error("string-match-left-right/".concat(e,'(): [THROW_ID_09] EOL marker functions must return "EOL". The function at index ').concat(l," returned:\n").concat(k(v,4)));if(c&&e.endsWith("Incl"))continue;let m,h,d="",C=ve(r,b,v,i,A,c,y);if(C&&c)return!i.cb||i.cb(m,d,h)?v:!1;if(Number.isInteger(C)&&(h=e.startsWith("matchLeft")?C-1:C+1,e[5]==="L"?d=r.slice(0,C):d=r.slice(h)),h<0&&(h=void 0),r[h]&&(m=r[h]),Number.isInteger(C)&&(!i.cb||i.cb(m,d,h)))return v}return!1}function $e(e,r){if(!Number.isSafeInteger(e)||e<0)throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_07] opts.maxMismatches must be a non-negative safe integer. Currently it's of a type: ").concat(typeof e,", equal to:\n").concat(k(e,4)))}function Oe(e,r){if(e)for(let t=0;t<e.length;t+=1){let n=e[t];if(typeof n!="string"&&typeof n!="function")throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_08] matcher alternatives must be strings or EOL marker functions. The value at index ").concat(t," is of a type: ").concat(typeof n,", equal to:\n").concat(k(n,4)))}}function re(e,r,t,n){return te("matchRightIncl",e,r,t,n)}function ne(e,r,t,n){return te("matchRight",e,r,t,n)}var _e="4.2.5";function M(e,r){return e[r]==="<"||e[x(e,r)]==="<"}function ie(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}var I={allowCustomTagNames:!1,skipOpeningBracket:!1},N="\\",W=["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"];var Ce=_e;function ke(e,r=0,t){var m,h,d;if(typeof e!="string")throw new Error('is-html-tag-opening/isOpening(): [THROW_ID_01] the first input argument should have been a string but it was given as "'.concat(typeof e,'", value being ').concat(k(e,4)));if(!Number.isInteger(r)||r<0)throw new Error('is-html-tag-opening/isOpening(): [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "'.concat(typeof r,'", value being ').concat(k(r,4)));let n=R(R({},I),t),a="[\\\\ \\t\\r\\n/]*",i="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",f=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"\\w+").concat(a,"\\/?").concat(a,">"),"g"),c=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"[").concat(i,"]+[-").concat(i,"]*").concat(a,">"),"g"),w=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['\"\\w]"),"g"),$=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\w+\\s+[").concat(i,"]+[-").concat(i,"]*(?:-\\w+)?\\s*=\\s*['\"\\w]")),O=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\/?\\s*\\w+\\s*\\/?\\s*>"),"g"),A=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\/?\\s*[").concat(i,"]+[-").concat(i,"]*\\s*\\/?\\s*>"),"g"),b=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"\\w+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),y=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"[").concat(i,"]+[-").concat(i,"]*\\s+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),_=new RegExp("^<".concat(n.skipOpeningBracket?"?\\/?":"","(").concat(a,"[").concat(i,"]+)+").concat(a,"[\\\\/=>]"),""),u=/^\/\s*\w+s*>/,s=r?e.slice(r):e,p=x(e,r),l=!1,o=!1,g={cb:ie,i:!0,trimCharsBeforeMatching:["/",N,"!"," "," ","\n","\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[r-1]==="<"||e[r-1]==="/"&&e[x(e,p)]==="<")||s[0]==="<"&&((m=s[1])!=null&&m.trim()))&&(_.test(s)||/^<\w+$/.test(s))||c.test(s)&&M(e,r)||$.test(s)||A.test(s)&&M(e,r)||y.test(s)||e[r]==="/"&&e[p]!=="<"&&u.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[r-1]==="<"||e[r-1]==="/"&&e[x(e,p)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[p]||e[p]!=="<"))&&((h=s[1])!=null&&h.trim()))&&_.test(s)||f.test(s)&&M(e,r)||w.test(s)||O.test(s)&&M(e,r)||b.test(s))&&(l=!0),l&&re(e,r,W,{cb:C=>{var T;return C===void 0?((e[r]==="<"&&((T=e[r+1])!=null&&T.trim())||e[r-1]==="<")&&(o=!0),!0):C.toUpperCase()===C.toLowerCase()&&!/\d/.test(C)&&C!=="="},i:!0,trimCharsBeforeMatching:["<","/",N,"!"," "," ","\n","\r"]})&&(o=!0)),!o&&e[r]==="<"&&((d=e[r+1])!=null&&d.trim())&&ne(e,r,W,g)&&(o=!0),typeof e=="string"&&r<e.length&&o}return fe(Re);})();
10
+ "use strict";var isHtmlTagOpening=(()=>{var j=Object.defineProperty;var lt=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames,P=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var V=(t,r,e)=>r in t?j(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,R=(t,r)=>{for(var e in r||(r={}))q.call(r,e)&&V(t,e,r[e]);if(P)for(var e of P(r))st.call(r,e)&&V(t,e,r[e]);return t};var at=(t,r)=>{for(var e in r)j(t,e,{get:r[e],enumerable:!0})},ut=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ot(r))!q.call(t,a)&&a!==e&&j(t,a,{get:()=>r[a],enumerable:!(n=lt(r,a))||n.enumerable});return t};var ft=t=>ut(j({},"__esModule",{value:!0}),t);var Rt={};at(Rt,{defaults:()=>I,isOpening:()=>kt,version:()=>Ct});function ct(){let t=[],r=0,e=!1;return{append(n){return e?!1:r+n.length>1999?(t.push("\u2026"),r+=1,e=!0,!1):(t.push(n),r+=n.length,!0)},result(){return t.join("")},stopped(){return e}}}function ht(t){return"\\u".concat(t.toString(16).padStart(4,"0"))}function E(t,r){if(t.append('"')){for(let e=0;e<r.length&&!t.stopped();e+=1){let n=r.charCodeAt(e);n===34?t.append('\\"'):n===92?t.append("\\\\"):n===8?t.append("\\b"):n===9?t.append("\\t"):n===10?t.append("\\n"):n===12?t.append("\\f"):n===13?t.append("\\r"):n<32||n===8232||n===8233||n>=55296&&n<=57343?t.append(ht(n)):t.append(r[e])}t.append('"')}}function pt(t){return t.get&&t.set?"[Getter/Setter]":t.get?"[Getter]":t.set?"[Setter]":"[Accessor]"}function H(t,r){t.append("Symbol(");let e=String(r);e.length>8&&E(t,e.slice(7,-1)),t.append(")")}function F(t,r){typeof r=="symbol"?H(t,r):E(t,String(r))}function k(t,r=0){let e=ct(),n=r===4?4:0,a=new WeakSet,i=0;function f(_){n&&e.append(" ".repeat(_*n))}function c(_,u){_&&e.append(","),n&&(e.append("\n"),f(u+1))}function w(_,u,s){n&&u&&(e.append("\n"),f(s)),e.append(_)}function $(_,u){Object.prototype.hasOwnProperty.call(_,"value")?y(_.value,u):e.append(pt(_))}function O(_,u){let s;try{s=Reflect.getOwnPropertyDescriptor(_,"length")}catch(o){e.append("[Uninspectable]");return}let h=s==null?void 0:s.value;if(!Number.isSafeInteger(h)||h<0){e.append("[Uninspectable]");return}e.append("[");let l=!1;for(let o=0;o<h&&!e.stopped();o+=1){if(c(l,u),l=!0,i>=50){e.append("[MaxEntries]");break}i+=1;let g;try{g=Reflect.getOwnPropertyDescriptor(_,String(o))}catch(v){e.append("[Uninspectable]");continue}g!=null&&g.enumerable?$(g,u+1):e.append("[Empty]")}w("]",l,u)}function A(_,u){let s;try{s=Reflect.ownKeys(_)}catch(l){e.append("[Uninspectable]");return}e.append("{");let h=!1;for(let l of s){if(e.stopped())break;if(i>=50){c(h,u),h=!0,E(e,"\u2026"),e.append(n?": ":":"),e.append("[MaxEntries]");break}i+=1;let o;try{o=Reflect.getOwnPropertyDescriptor(_,l)}catch(g){c(h,u),h=!0,F(e,l),e.append(n?": ":":"),e.append("[Uninspectable]");continue}o!=null&&o.enumerable&&(c(h,u),h=!0,F(e,l),e.append(n?": ":":"),$(o,u+1))}w("}",h,u)}function b(_,u){if(a.has(_)){e.append("[Circular]");return}if(u>=5){e.append("[MaxDepth]");return}let s;try{s=Array.isArray(_)}catch(h){e.append("[Uninspectable]");return}a.add(_);try{s?O(_,u):A(_,u)}finally{a.delete(_)}}function y(_,u){_===null?e.append("null"):typeof _=="string"?E(e,_):typeof _=="number"?e.append(Object.is(_,-0)?"-0":String(_)):typeof _=="boolean"?e.append(_?"true":"false"):typeof _>"u"?e.append("undefined"):typeof _=="bigint"?e.append("".concat(_,"n")):typeof _=="symbol"?H(e,_):typeof _=="function"?e.append("[Function]"):b(_,u)}try{return y(t,0),e.result()}catch(_){return"[Uninspectable]"}}var gt=["_16_0_a_0_4_0_5_m_1_u_1_cp_4_b_e_4_7_0_1_0_3l_4_1_1_2_3_1_0_6_0_1_2_1_0_1_j_1_2a_1_3u_8_4l_1_11_2_0_","6_14_1z_q_4_3_19_16_z_1_1_2q_1_0_f_1_7_1_a_2_2_0_g_0_1_t_t_2g_b_0_o_w_9_1_4_0_5_l_4_0_9_0_3_0_n_o_7_","a_5_n_1_6_g_15_1m_1h_3_0_i_0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_1_1_1_v_e_0_n_17_78_i_f_0_1_c_1_x_3g_0_27_pl_6e_5f_218_2o_f_tr_h_5_p_32y_5_g6_5a","1_t_1cy_fs_7_u_h_26_h_t_i_1b_g_3_v_k_5_i_c0_18_5v_1r_w_o_2_o_18_22_5_0_1u_c_1s_1_1_0_e_1_c_5p1_15_v_","2p_36_6pp_3_1_6_1_1_1_82_f_0_t_2_2_0_e_3_8_az_1s4_2y_5_c_3_8_7_9_4me_2c_1_1y_1_1_2_0_2_1_2_3_1_b_1_0","_1_6_1_1s_1_3_2_7_1_6_1_r_1_3_1_4_1_0_3_6_1_9f_2_o_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_7_1f8_u_6_5","_79_1p_42_18_a_6_g_0_8x_t_i_17_dg_r_6c_t_2_0_5r_u_1_2_1_1_1_6_2_4_9_1_68_6_1_3_1_1_1_e_1_5g_1n_1v_7_","0_xg_3_1_q_1_1_1_0_2_0_1_9_1_3_1_0_1_0_6_0_4_0_1_0_1_0_1_2_1_1_1_0_2_0_1_0_1_0_1_0_1_0_1_1_1_0_2_3_1","_6_1_3_1_3_1_0_1_9_1_g_5_2_1_4_1_g_3es_wyn_w_3dp_2_4gd_2_5rk_f_h9_1wi_f1_15u_3t6_5_6jt"].join(""),L=gt.slice(1).split("_"),dt=[],z=127;for(let t=0;t<L.length;t+=2){let r=z+1+Number.parseInt(L[t],36),e=r+Number.parseInt(L[t+1],36);dt.push([r,e]),z=e}var Et=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),mt=Object.prototype.hasOwnProperty,G=Function.prototype.toString,bt=G.call(Object);var St=Map.prototype.entries,Lt=Set.prototype.values;var U,Bt=(U=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:U.get,J,It=(J=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:J.get,K,Nt=(K=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:K.get,Q,Wt=(Q=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:Q.get,Tt=RegExp.prototype.test;function S(t){var n;if(t==null||typeof t!="object")return!1;let r=Object.getPrototypeOf(t);if(r===null||r===Object.prototype)return!0;let e=Object.getOwnPropertyDescriptor(r,"constructor");return!e||!("value"in e)||typeof e.value!="function"?!1:((n=Object.getOwnPropertyDescriptor(e.value,"prototype"))==null?void 0:n.value)===r&&G.call(e.value)===bt}function D(t){return typeof t=="string"}var Pt=Date.prototype.getTime;function Z(t,r){return t!=null&&mt.call(t,r)}function B(t){return t===32||t>=9&&t<=13||t===160||t===5760||t>=8192&&t<=8202||t===8232||t===8233||t===8239||t===8287||t===12288||t===65279}function yt(t,r){return r==null?0:typeof r!="number"||!Number.isInteger(r)||r<0?null:r>t?t:r}function x(t,r=0){if(typeof t!="string"||!t.length)return null;let e=yt(t.length,r);if(e===null||e<1)return null;let n=e-1;if(!B(t.charCodeAt(n)))return n;if(n-=1,n<0)return null;if(!B(t.charCodeAt(n)))return n;for(n-=1;n>=0;n--)if(!B(t.charCodeAt(n)))return n;return null}function Y(t){return typeof t!="string"?t:t.length?[t]:[]}var X={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},tt=t=>t+1,wt=t=>t-1;function vt(t,r,e,n,a=()=>!1,i=!1,f=tt){if(+r<0&&i&&e==="EOL")return e;if(r>=t.length&&!i)return!1;let c=i?1:e.length,w=0,$=!1,O=!1,A=!1,b=Math.min(n.maxMismatches,t.length+e.length),y=b,_=r,u=!1,s=!1,h=!1;function l(){return w===1&&y<b-1}for(;t[_];){let o=f(_);if(n.trimBeforeMatching&&t[_].trim()===""){if(!t[o]&&i&&e==="EOL")return!0;_=f(_);continue}if(a(t[_])){if(i&&e==="EOL"&&!t[o])return!0;_=f(_);continue}if(i)return!1;let g=o>_?e[e.length-c]:e[c-1];if(!n.i&&t[_]===g||n.i&&g!==void 0&&t[_].toLowerCase()===g.toLowerCase()){if(u||(u=!0),A||(A=!0),c===e.length){if(s=!0,y!==b)return!1}else c===1&&(h=!0);if(c-=1,w++,l())return!1;if(!c)return w!==e.length||y===b||!$?_:!1}else if(!$&&!w&&($=!0),b&&y&&_){y-=1;for(let v=0;v<=y;v++){let d=o>_?e[e.length-c+1+v]:e[c-2-v],p=t[f(_)];if(d&&(!n.i&&t[_]===d||n.i&&t[_].toLowerCase()===d.toLowerCase())&&(!n.firstMustMatch||c!==e.length)){if(w++,l())return!1;c-=2,u=!0;break}else if(p&&d&&(!n.i&&p===d||n.i&&p.toLowerCase()===d.toLowerCase())&&(!n.firstMustMatch||c!==e.length)){if(!w&&!n.hungry)return!1;c-=1,u=!0;break}else if(d===void 0&&y>=0&&u&&(!n.firstMustMatch||s)&&(!n.lastMustMatch||h))return _}u||(O=_)}else return _===0&&c===1&&b>0&&y>0&&(!n.firstMustMatch||s)&&!n.lastMustMatch&&A?0:!1;if(O!==!1&&O!==_&&(O=!1),c<1)return _;_=f(_)}if(c>0)return i&&e==="EOL"?!0:n&&b>=c&&A?O||0:!1}function et(t,r,e,n,a){var _,u,s,h;if(S(a)&&Z(a,"trimBeforeMatching")&&a&&typeof a.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(t,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(a.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let i=R(R({},X),a);if(i.maxMismatches=(_=a==null?void 0:a.maxMismatches)!=null?_:X.maxMismatches,$t(i.maxMismatches,t),typeof i.trimCharsBeforeMatching=="string"&&(i.trimCharsBeforeMatching=Y(i.trimCharsBeforeMatching)),i.trimCharsBeforeMatching=i.trimCharsBeforeMatching.map(l=>D(l)?l:String(l)),!D(r)||!r.length)return!1;if(!Number.isInteger(e)||e<0)throw new Error("string-match-left-right/".concat(t,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof e,", equal to:\n").concat(k(e,4)));let f,c;if(D(n))f=[n];else if(Array.isArray(n))f=n;else if(!n)f=n;else if(typeof n=="function")f=[],f.push(n);else throw new Error("string-match-left-right/".concat(t,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof n,", equal to:\n").concat(k(n,4)));if(Ot(f,t),a&&!S(a))throw new Error("string-match-left-right/".concat(t,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof a,'", and equal to:\n').concat(k(a,4)));let w=0,$="";if((u=i==null?void 0:i.trimCharsBeforeMatching)!=null&&u.some((l,o)=>l.length>1?(w=o,$=l,!0):!1))throw new Error("string-match-left-right/".concat(t,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(w," is longer than 1 character, ").concat($.length," (equals to ").concat($,"). Please split it into separate characters and put into array as separate elements."));if(e>=r.length)return!1;let O=i.i?i.trimCharsBeforeMatching.map(l=>l.toLowerCase()):i.trimCharsBeforeMatching,A=i.i?l=>O.includes(l.toLowerCase()):l=>O.includes(l);if(!f||!Array.isArray(f)||Array.isArray(f)&&!f.length||Array.isArray(f)&&f.length===1&&D(f[0])&&!f[0].trim()){if(typeof i.cb=="function"){let o,g=e;if((t==="matchLeftIncl"||t==="matchRight")&&(g+=1),t[5]==="L")for(let p=g;p--;){let m=r[p];if((!i.trimBeforeMatching||i.trimBeforeMatching&&(m!=null&&m.trim()))&&(!((s=i.trimCharsBeforeMatching)!=null&&s.length)||m!==void 0&&!A(m))){o=p;break}}else if(t.startsWith("matchRight"))for(let p=g;p<r.length;p++){let m=r[p];if((!i.trimBeforeMatching||i.trimBeforeMatching&&m.trim())&&(!((h=i.trimCharsBeforeMatching)!=null&&h.length)||!A(m))){o=p;break}}if(o===void 0)return!1;let v=r[o],d=t[5]==="L"?r.slice(0,o+1):r.slice(o);return t[5],i.cb(v,d,o)}let l="";throw a||(l=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(t,'(): [THROW_ID_06] 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!').concat(l))}if(!i.cb&&!i.i&&!i.trimBeforeMatching&&!i.trimCharsBeforeMatching.length&&i.maxMismatches===0&&!i.firstMustMatch&&!i.lastMustMatch&&!i.hungry&&f.every(D)){for(let l of f){if(!l.length)continue;let o=e;if(t==="matchRight"?o+=1:t==="matchLeft"?o-=l.length:t==="matchLeftIncl"&&(o-=l.length-1),o>=0&&r.startsWith(l,o))return l}return!1}let b=e;t==="matchRight"?b+=1:t==="matchLeft"&&(b-=1);let y=t[5]==="L"?wt:tt;for(let l=0,o=f.length;l<o;l++){c=typeof f[l]=="function";let g=f[l],v=typeof g=="function"?g():g;if(c&&v!=="EOL")throw new Error("string-match-left-right/".concat(t,'(): [THROW_ID_09] EOL marker functions must return "EOL". The function at index ').concat(l," returned:\n").concat(k(v,4)));if(c&&t.endsWith("Incl"))continue;let d,p,m="",C=vt(r,b,v,i,A,c,y);if(C&&c)return!i.cb||i.cb(d,m,p)?v:!1;if(Number.isInteger(C)&&(p=t.startsWith("matchLeft")?C-1:C+1,t[5]==="L"?m=r.slice(0,C):m=r.slice(p)),p<0&&(p=void 0),r[p]&&(d=r[p]),Number.isInteger(C)&&(!i.cb||i.cb(d,m,p)))return v}return!1}function $t(t,r){if(!Number.isSafeInteger(t)||t<0)throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_07] opts.maxMismatches must be a non-negative safe integer. Currently it's of a type: ").concat(typeof t,", equal to:\n").concat(k(t,4)))}function Ot(t,r){if(t)for(let e=0;e<t.length;e+=1){let n=t[e];if(typeof n!="string"&&typeof n!="function")throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_08] matcher alternatives must be strings or EOL marker functions. The value at index ").concat(e," is of a type: ").concat(typeof n,", equal to:\n").concat(k(n,4)))}}function rt(t,r,e,n){return et("matchRightIncl",t,r,e,n)}function nt(t,r,e,n){return et("matchRight",t,r,e,n)}var _t="4.2.6";function M(t,r){return t[r]==="<"||t[x(t,r)]==="<"}function it(t){return t===void 0||t.toUpperCase()===t.toLowerCase()&&!/\d/.test(t)&&t!=="="}var I={allowCustomTagNames:!1,skipOpeningBracket:!1},N="\\",W=["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"];var Ct=_t;function kt(t,r=0,e){var d,p,m;if(typeof t!="string")throw new Error('is-html-tag-opening/isOpening(): [THROW_ID_01] the first input argument should have been a string but it was given as "'.concat(typeof t,'", value being ').concat(k(t,4)));if(!Number.isInteger(r)||r<0)throw new Error('is-html-tag-opening/isOpening(): [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "'.concat(typeof r,'", value being ').concat(k(r,4)));let n=R(R({},I),e),a="[\\\\ \\t\\r\\n/]*",i="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",f=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"\\w+").concat(a,"\\/?").concat(a,">"),"g"),c=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"[").concat(i,"]+[-").concat(i,"]*").concat(a,">"),"g"),w=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['\"\\w]"),"g"),$=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\w+\\s+[").concat(i,"]+[-").concat(i,"]*(?:-\\w+)?\\s*=\\s*['\"\\w]")),O=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\/?\\s*\\w+\\s*\\/?\\s*>"),"g"),A=new RegExp("^<".concat(n.skipOpeningBracket?"?":"","\\s*\\/?\\s*[").concat(i,"]+[-").concat(i,"]*\\s*\\/?\\s*>"),"g"),b=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"\\w+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),y=new RegExp("^<".concat(n.skipOpeningBracket?"?":"").concat(a,"[").concat(i,"]+[-").concat(i,"]*\\s+(?:\\s*\\w+)?\\s*\\w+=['\"]"),"g"),_=new RegExp("^<".concat(n.skipOpeningBracket?"?\\/?":"","(").concat(a,"[").concat(i,"]+)+").concat(a,"[\\\\/=>]"),""),u=/^\/\s*\w+s*>/,s=r?t.slice(r):t,h=x(t,r),l=!1,o=!1,g={cb:it,i:!0,trimCharsBeforeMatching:["/",N,"!"," "," ","\n","\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(t[r-1]==="<"||t[r-1]==="/"&&t[x(t,h)]==="<")||s[0]==="<"&&((d=s[1])!=null&&d.trim()))&&(_.test(s)||/^<\w+$/.test(s))||c.test(s)&&M(t,r)||$.test(s)||A.test(s)&&M(t,r)||y.test(s)||t[r]==="/"&&t[h]!=="<"&&u.test(s))&&(o=!0):(((n.skipOpeningBracket&&(t[r-1]==="<"||t[r-1]==="/"&&t[x(t,h)]==="<")||(s[0]==="<"||s[0]==="/"&&(!t[h]||t[h]!=="<"))&&((p=s[1])!=null&&p.trim()))&&_.test(s)||f.test(s)&&M(t,r)||w.test(s)||O.test(s)&&M(t,r)||b.test(s))&&(l=!0),l&&rt(t,r,W,{cb:C=>{var T;return C===void 0?((t[r]==="<"&&((T=t[r+1])!=null&&T.trim())||t[r-1]==="<")&&(o=!0),!0):C.toUpperCase()===C.toLowerCase()&&!/\d/.test(C)&&C!=="="},i:!0,trimCharsBeforeMatching:["<","/",N,"!"," "," ","\n","\r"]})&&(o=!0)),!o&&t[r]==="<"&&((m=t[r+1])!=null&&m.trim())&&nt(t,r,W,g)&&(o=!0),typeof t=="string"&&r<t.length&&o}return ft(Rt);})();
11
11
  /**
12
12
  * @name codsen-format-diagnostic-value
13
13
  * @fileoverview Safely format untrusted JavaScript values for diagnostics
@@ -19,7 +19,7 @@
19
19
  /**
20
20
  * @name codsen-utils
21
21
  * @fileoverview Various utility functions
22
- * @version 1.10.2
22
+ * @version 1.10.3
23
23
  * @author Roy Revelt
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/codsen-utils/}
@@ -27,7 +27,7 @@
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 6.2.4
30
+ * @version 6.2.5
31
31
  * @author Roy Revelt
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/string-left-right/}
@@ -43,7 +43,7 @@
43
43
  /**
44
44
  * @name string-match-left-right
45
45
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
46
- * @version 9.2.5
46
+ * @version 9.2.6
47
47
  * @author Roy Revelt
48
48
  * @license MIT
49
49
  * {@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": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -69,12 +69,12 @@
69
69
  }
70
70
  },
71
71
  "dependencies": {
72
- "codsen-utils": "^1.10.2",
73
- "string-left-right": "^6.2.4",
74
- "string-match-left-right": "^9.2.5"
72
+ "codsen-utils": "^1.10.3",
73
+ "string-left-right": "^6.2.5",
74
+ "string-match-left-right": "^9.2.6"
75
75
  },
76
76
  "devDependencies": {
77
- "test-mixer": "^4.4.2"
77
+ "test-mixer": "^4.4.3"
78
78
  },
79
79
  "engines": {
80
80
  "node": ">=18.20.8"