(function e(t){"use strict";try{module&&(t=module)}catch{}t._factory=e;function b(e){return"undefined"==typeof e||e}function S(e){const t=Array(e);for(let s=0;s=this.B&&(m||!d[p])){var i,r,l,a=y(h,o,g),c="";switch(this.G){case"full":if(2a;i--)i-a>=this.B&&(l=y(h,o,g,r,a),c=p.substring(a,i),u(this,d,c,l,e,s));break}case"reverse":if(1=this.B&&u(this,d,c,y(h,o,g,r,i),e,s);c=""}case"forward":if(1=this.B&&u(this,d,c,a,e,s);break}default:if(this.C&&(a=Math.min(a/this.C(t,p,g)|0,h-1)),u(this,d,p,a,e,s),m&&1=this.B&&!r[p]){r[p]=1;const t=this.l&&p>a;u(this,f,t?a:p,y(c+(o/2>c?0:1),o,g,i-1,l-1),e,s,t?p:a)}}}}this.m||(this.register[e]=1)}}return this};function y(e,t,n,s,o){return n&&1=this.B&&!s[t])if(this.s||r||this.map[t])l[a++]=t,s[t]=1;else return i;e=l,o=e.length}if(!o)return i;t||(t=100),c=this.depth&&1=s))))break;if(n){if(i)return z(l,s,0);t[t.length]=l;return}}return!n&&l}function z(e,t,n){return e=1===e.length?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function D(e,t,n,s){return n?(s=s&&t>n,e=(e=e[s?t:n])&&e[s?n:t]):e=e[t],e}s.contain=function(e){return!!this.register[e]},s.update=function(e,t){return this.remove(e).add(e,t)},s.remove=function(e,t){const n=this.register[e];if(n){if(this.m)for(let t=0,s;tt||n)&&(o=o.slice(n,n+t)),s&&(o=q.call(this,o)),{tag:e,result:o}}function q(e){const t=Array(e.length);for(let n=0,s;n