A better version of regex 101
| 1 | (()=>{var e,t,s,n,r,a={61607:(e,t,s)=>{"use strict";s.d(t,{CJ:()=>v,MX:()=>le,K_:()=>b,jb:()=>Y,jJ:()=>y,s1:()=>re,v0:()=>me,xv:()=>fe,Of:()=>M,zp:()=>D,sk:()=>_e,Ak:()=>Te,ew:()=>j,xz:()=>he,by:()=>W,Ot:()=>a,hK:()=>g,IU:()=>Ee,Dk:()=>X,tP:()=>ge,bL:()=>xe,kB:()=>ve,fd:()=>Ze,ak:()=>$,Ub:()=>Q,Bq:()=>H,zO:()=>K,uf:()=>T,G6:()=>R,QF:()=>w,Ez:()=>ae,dL:()=>I.Z,o6:()=>O,fU:()=>oe,JO:()=>ie,rS:()=>P,ML:()=>ue,_1:()=>de,Gj:()=>m,I2:()=>r,ZI:()=>L,E0:()=>E,Jh:()=>A,UZ:()=>C,vn:()=>B,Iu:()=>G,ux:()=>U,rI:()=>F,h5:()=>Z,dM:()=>o,UF:()=>i,NS:()=>Ne,Tr:()=>be,SD:()=>p,BF:()=>h,ZD:()=>Ce,og:()=>V,$9:()=>Se,_v:()=>je});var n=s(45703);const r=function(e){return{type:n.jo,value:e}},a=function(){return{type:n.rx}},i=function(){return{type:n.fB}},o=function(e){return{type:n.sk,value:e}};var l=s(31807),c=s.n(l),u=s(61724),d=s(86565);function h(e,t=!0){if(!c())return;const n=u[e]||u.ENGLISH;return()=>fetch(n.file).then((e=>e.json())).then(d.a).then((()=>{t&&s(16548).P()}))}const p=function(e){return{type:n.ro,value:{subsection:e}}},g=function(e){return{type:n.WV,value:e}},m=function(e){return{type:n.CJ,value:e}};var x=s(16386),f=s(96546);const v=function(e){return{type:n.lA,value:e||{description:null,testString:"",compareString:"",target:f.m,criteria:x.FS}}},b=function(e){return{type:n.rT,value:e}},j=function(e,t){return{type:n.mo,value:{oldIndex:e,newIndex:t}}},C=function(e,t,s,r){return{type:n.ES,value:{testKey:e,error:t,steps:s,time:r}}},Z=function(){return{type:n.p2}},y=function(){return{type:n.lZ}},E=function(e){return{type:n.Jb,value:e}},T=function(e){return{type:n.a0,value:e}};var k=s(75573),N=s(56538);const S=[N.Y8,N.D9,N.ik,N.VE,N.ek,N.Rp,N.Fo,N.ed,N.wm,N.Vu,N.e0,N.UA,N.Gv].map((e=>(""+e).toLowerCase().trim())),_=["recursive call could loop indefinitely","regular expression is too large","too much recursion"],w=function(e){const t=(""+e).toLowerCase().trim();if(e&&!S.includes(t)&&!_.some((e=>t.includes(e)))){const t=new Error("Unhandled error while matching regex. Code: "+e);k.O7(t)}return{type:n.Nl,value:e}},A=function(e){return{type:n.Cy,value:e}},O=function(e){return{type:n.hl,value:e}};var I=s(68692);const R=function(e){return{type:n.Sr,value:e}};function P(e){return{type:n.KE,value:e}}const L=function(e){return{type:n.u8,value:e}};function M(e,t){return(s,n)=>{if(!e)return Promise.resolve();const r=n().general.cookie;return fetch(`/api/regex/${e}/${t}`,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json",cookie:r}}).then((e=>e.json())).then((n=>{const r=n.regex,a=n.testString,i=void 0===a?"":a,o=n.flavor,l=n.delimiter,c=n.flags,u=n.substitution,d=n.listSubstitution,h=n.unitTests,p=n.isFavorite,g=n.isLibraryEntry,m=n.title,x=n.tags,f=n.libraryTitle,b=n.libraryDescription,j=n.libraryAuthor,C=n.isEditable,Z=n.isOwner;s(T(r)),s(A(null!=i?i:"")),s(O(o)),s(R(l)),s(I.Z("",c,o)),null!=d&&(s(B()),s($(null!=d?d:""))),null!=u&&(s(U()),s(L(null!=u?u:""))),h.forEach((e=>s(v(e)))),null==d&&null==u&&""===i&&h.length>0&&s(F()),s(ve(f,b,j)),s(H(e,t,null,null,g,m||f,x,Z)),s(Y(p)),s(K(C))}))}}function D(e){return t=>fetch("/api/regex/"+e,{method:"GET",credentials:"same-origin"}).then((e=>e.json())).then((({versions:e})=>t(function(e){return{type:n.r0,value:e}}(e))))}const U=function(){return{type:n.T_}},F=function(){return{type:n.YW}},G=function(){return{type:n.RS}};function V(e){return{type:n.NJ,value:e}}const B=function(){return{type:n.R8}};function $(e){return{type:n.r$,value:e}}const H=function(e,t,s,r,a,i="",o=[],l){return t=parseInt(t,10)||null,{type:n.nU,value:{permalinkFragment:e,version:t,regexDeleteCode:isNaN(s)?void 0:s,versionDeleteCode:r,isLibraryEntry:a,title:i,tags:o,isOwner:l}}};var q=s(69574),z=s(79615);function W(e=!1){return(t,s)=>{q.ZP.emit(q.P);const n=s(),r=n.unitTests.tests.map((e=>({criteria:e.criteria,description:e.description,target:e.target,testString:e.testString,compareString:e.compareString}))),a=n.regexEditor,i=a.regex,o=a.testString,l=a.flags,c=a.delimiter,u=a.flavor,d=a.substString,h=a.listSubstString,p=a.showSubstitutionArea,g=a.showListSubstitutionArea,m={regex:i,testString:o,flags:l,delimiter:c,flavor:u,unitTests:r,substitution:d||(p?"":null),listSubstitution:h||(g?"":null)};let x,f;return e&&(m.permalinkFragment=n.general.permalinkFragment),e&&(x=n.general.title,f=n.general.tags),fetch("/api/regex/",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(m)}).then((e=>e.json())).then((s=>{const n=s.permalinkFragment,r=s.version,a=s.isLibraryEntry,i=s.regexDeleteCode,o=s.versionDeleteCode;return null==i&&null==o||(0,z.m4)(n,r,{regexDeleteCode:i,versionDeleteCode:o}),t(H(n,r,i,o,a,x,f,!e||void 0)),{permalinkFragment:n,version:r,regexDeleteCode:i,versionDeleteCode:o}}))}}const Y=function(e){return{type:n.yF,value:e}},K=function(e){return{type:n._,value:e}};var J=s(26086);const X=function(e){return{type:n.ol,value:e||J.DEFAULT_PAGE_TITLE}},Q=function(e){return{type:n.lK,value:e||J.DEFAULT_META_DESCRIPTION}};var ee=s(77891),te=s(96881),se=s.n(te);const ne=function(e,t=!1){return{type:n.sH,value:Object.assign(Object.assign({},e),{},{staleData:t})}};function re(e=se().ALL,t=1,s=[]){return(n,r)=>{const a=r().general.cookie;return fetch(`/api/user/history/${e}/${t}/?${ee.B({filterTags:s})}`,{method:"GET",credentials:"same-origin",headers:{cookie:a}}).then((e=>e.json())).then((e=>n(ne(e))))}}function ae(e,t,s){return r=>fetch(`/api/user/favorite/${e}`,{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({isFavorite:s})}).then((()=>{null!=t&&r({type:n.Ht,value:{itemIndex:t,isFavorite:s}})}))}function ie(e,t,s){return r=>fetch(`/api/user/history/${e}/private`,{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({isPrivate:s})}).then((()=>r({type:n.Ht,value:{itemIndex:t,isPrivate:s}})))}function oe(e,t,s){return r=>fetch(`/api/user/history/${e}/lock`,{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({isLocked:s})}).then((()=>r({type:n.Ht,value:{itemIndex:t,isLocked:s}})))}function le(e,t,s){return()=>fetch(`/api/regex/${null!=t?t:""}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({deleteCode:s})}).then((()=>(0,z.rP)(e,t))).catch((s=>{var n;const r=(null==s||null==(n=s.response)?void 0:n.status)||0;if(r>=400&&r<=499)return(0,z.rP)(e,t);throw s}))}var ce=s(48186);function ue(e,t,s){const r=(0,ce.Z)(e);return(a,i)=>fetch(`/api/user/history/${s}/tags`,{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({tags:r})}).then((()=>{null!=t&&a(function(e,t){return{type:n.Xm,value:{tags:e,itemIndex:t}}}(e,t));const o=i().general.permalinkFragment;null!=o&&s===o&&a({type:n.CN,value:r})}))}function de(e,t,s){return(r,a)=>fetch(`/api/user/history/${s}/title`,{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({title:e})}).then((()=>{null!=t&&r({type:n.Ht,value:{itemIndex:t,title:e}});const i=a().general.permalinkFragment;null!=i&&s===i&&r({type:n.se,value:e})}))}function he(){return{type:n.go}}var pe=s(27782);const ge=function(e,t=0){return{type:n.b9,value:{libraryData:e,pages:t}}};function me(e=1,t="",s=pe.MOST_RECENT,n=[]){const r=ee.B({search:t,orderBy:s,filterFlavors:n});return(t,s)=>{const n=s().general.cookie;return fetch(`/api/library/${e}/?${r}`,{method:"GET",credentials:"same-origin",headers:{cookie:n}}).then((e=>e.json())).then((e=>t(ge(e.data,e.pages))))}}const xe=function(e){return{type:n.mX,value:e}};function fe(e){return(t,s)=>{const n=s().general.cookie;return fetch(`/api/library/details/${e}`,{method:"GET",credentials:"same-origin",headers:{cookie:n}}).then((e=>e.json())).then((e=>t(xe(e))))}}const ve=function(e,t,s){return{type:n.DE,value:{title:e,description:t,author:s}}};function be(e,t,s){return(n,r)=>{q.ZP.emit(q.P);const a=r(),i=a.unitTests.tests.map((e=>({criteria:e.criteria,description:e.description,target:e.target,testString:e.testString,compareString:e.compareString}))),o=a.regexEditor,l=o.regex,c=o.testString,u=o.flags,d=o.delimiter,h=o.flavor,p=o.showSubstitutionArea,g=o.substString;return fetch("/api/library/",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({regex:l,testString:c,flags:u,delimiter:d,flavor:h,unitTests:i,author:s,description:t,title:e,substitution:p?g||"":null})}).then((e=>e.json())).then((({permalinkFragment:r})=>(n(ve(e,t,s)),r)))}}function je(e,t){return s=>fetch(`/api/library/${e}/vote`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({vote:t})}).then((()=>s(function(e,t){return{type:n.BS,value:{permalinkFragment:t,vote:e}}}(t,e))))}function Ce(e,t,s){return(n,r)=>{const a=r();return fetch("/api/library/",{method:"PUT",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({permalinkFragment:a.general.permalinkFragment,author:s,description:t,title:e})}).then((e=>e.json())).then((({permalinkFragment:r,version:a})=>(n(ve(e,t,s)),{permalinkFragment:r,version:a})))}}function Ze(e,t){return s=>(s({type:n.Kg,value:{isFavorite:t,permalinkFragment:e}}),s(ae(e,null,t)))}var ye=s(40378);const Ee=function(e,t){if(!t)return{type:n.qI,value:{}};const s=Object.assign({firstSeen:new Date,lastSeen:new Date,allTimeCount:0,todayCount:0},e&&e[t.bannerid]||{});s.allTimeCount++,s.todayCount++;const r=Object.assign(Object.assign({},e),{},{[t.bannerid]:s});return ye.Z.save("regex101-sponsor",r),{type:n.qI,value:t}};function Te(){return(e,t)=>{const s=t().general.cookie;return fetch("/api/quiz/tasks",{method:"GET",credentials:"same-origin",headers:{cookie:s}}).then((e=>e.json())).then((t=>e(ke(t))))}}function ke(e){return{type:n.te,value:e}}function Ne(e,t){return s=>{const r={regex:t.regex,flags:t.flags,delimiter:t.delimiter,substitution:t.substitution};return fetch(`/api/quiz/verify/${e}`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((e=>e.json())).then((t=>{if(t.errorMessage)s(function(e,t){const s=t.errorMessage,r=t.totalTests,a=t.testNumber;return{type:n.nA,value:{taskNumber:e,errorMessage:s,totalTests:r,testNumber:a}}}(e-1,t));else{const r=t.successMessage,a=t.tasks;s(function(e,t){return{type:n.Sb,value:{taskNumber:e,successMessage:t}}}(e-1,r)),s(ke(a))}}))}}function Se(e,t){return{type:n.F,value:Object.assign({taskIdx:e},t)}}function _e(e,t){return(s,r)=>{const a=r().general.cookie;return fetch("/api/quiz/statistics/"+t,{method:"GET",credentials:"same-origin",headers:{cookie:a}}).then((e=>e.json())).then((t=>s(function(e,t){return{type:n.$Z,value:{taskIdx:e,stats:t}}}(e,t))))}}},45703:(e,t,s)=>{"use strict";s.d(t,{$Z:()=>ae,BS:()=>J,CJ:()=>k,CN:()=>l,Cy:()=>P,DA:()=>w,DE:()=>Q,ES:()=>q,F:()=>re,Ht:()=>m,Jb:()=>Y,KE:()=>O,Kg:()=>ee,LM:()=>$,NJ:()=>U,Nl:()=>I,R8:()=>F,RS:()=>_,RT:()=>r,Sb:()=>ne,Sr:()=>A,T_:()=>N,WV:()=>T,Xm:()=>x,YW:()=>S,_:()=>d,a0:()=>L,b9:()=>K,fB:()=>j,go:()=>f,hl:()=>y,jo:()=>v,lA:()=>V,lK:()=>p,lZ:()=>W,mX:()=>X,mo:()=>H,nA:()=>se,nU:()=>n,ol:()=>h,p2:()=>z,qI:()=>c,r$:()=>G,r0:()=>D,rT:()=>B,ro:()=>E,rx:()=>b,sH:()=>g,se:()=>o,sk:()=>C,tc:()=>M,te:()=>te,th:()=>i,u8:()=>R,xw:()=>Z,yF:()=>a,yM:()=>u});const n="SET_PERMALINK_FRAGMENT",r="SET_USER_DATA",a="FAVORITE_CURRENT_REGEX",i="SET_COOKIE",o="SET_GENERAL_TITLE",l="SET_GENERAL_TAGS",c="SET_CARBON_SPONSOR",u="SET_CURRENT_THEME",d="SET_PERMALINK_EDITABLE",h="SET_DOCUMENT_TITLE",p="SET_META_DESCRIPTION",g="SET_USER_HISTORY",m="UPDATE_ACCOUNT_DATA",x="SET_REGEX_TAGS",f="RESET_USER_HISTORY",v="SET_SETTINGS",b="SAVE_STORAGE",j="STORAGE_SAVED",C="STORAGE_LOADED",Z="SAVE_REGEX_EDITOR_STATE",y="SET_REGEX_FLAVOR",E="TOGGLE_RIGHT_SIDEBAR_SUBSECTION",T="SET_ACTIVE_SUBSECTION",k="SET_RIGHT_SIDEBAR_WIDTH",N="SHOW_SUBSTITUTION_AREA",S="SHOW_UNIT_TEST_AREA",_="SHOW_MATCH_AREA",w="SET_REGEX_FLAGS",A="SET_REGEX_DELIMITER",O="SET_REGEX_RESULT",I="SET_REGEX_ERROR",R="SET_SUBSTITUTION",P="SET_TEST_STRING",L="SET_REGEX",M="SET_UNIT_TESTS_ACTIVE",D="SET_REGEX_VERSIONS",U="UPDATE_REGEX_AREA_PARSER",F="SHOW_LIST_SUBSTITUTION_AREA",G="SET_LIST_SUBSTITUTION",V="ADD_UNIT_TEST",B="DELETE_UNIT_TEST",$="EDIT_UNIT_TEST",H="MOVE_UNIT_TEST",q="SET_UNIT_TEST_STATUS",z="START_UNIT_TESTING",W="FINISH_UNIT_TESTING",Y="SET_UNIT_TEST_FILTER",K="SET_LIBRARY_DATA",J="VOTE_LIBRARY_ENTRY",X="SET_LIBRARY_DETAILS",Q="SET_LIBRARY_ENTRY_METADATA",ee="SET_LIBRARY_FAVORITE",te="SET_QUIZ_TASKS",se="SET_QUIZ_TASK_ERROR",ne="SET_QUIZ_TASK_DONE",re="UPDATE_QUIZ_TASK_ENTRY",ae="SET_QUIZ_STATISTICS"},68692:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c,e:()=>u});var n=s(48186),r=s(45703),a=s(55511),i=s.n(a),o=s(61348),l=s.n(o);const c=function(e,t,s){let n=t;s!==l().PCRE&&s!==l().PCRE2||!e.includes("y")?s===l().JAVASCRIPT&&e.includes("A")&&(n=n.replace("A","y")):n=n.replace("y","A"),s===l().DOTNET&&(e.includes("N")&&t.includes("R")?n=n.replace("N",""):e.includes("R")&&t.includes("N")&&(n=n.replace("R","")));let a=u(n,s);if(s===l().PYTHON){const t=a.includes("u"),s=a.includes("a");e.includes("a")&&t?a=a.replace("a",""):(e.includes("u")&&s||t&&s)&&(a=a.replace("u",""))}return{type:r.DA,value:a}};function u(e,t){return(0,n.Z)(e.replace(new RegExp(`[^${i()[t]}]`,"g"),"")).join("")}},73963:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var n=s(45703);function r(e){return{type:n.yM,value:e}}},75558:(e,t,s)=>{"use strict";s.d(t,{Bt:()=>m,Go:()=>d,OH:()=>o,SX:()=>g,Wr:()=>v,aQ:()=>a,bU:()=>h,dg:()=>u,sh:()=>l,tZ:()=>i,tp:()=>c,uZ:()=>p,uv:()=>x,vI:()=>f});var n=s(61348),r=s.n(n);const a="javascript",i="php",o="python",l="csharp",c="java",u="ruby",d="rust",h="golang",p="perl",g="autoit",m="SED",x="swift5_2",f=[{value:a,string:"JavaScript",referencePage:"https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions"},{value:i,string:"PHP",referencePage:"http://php.net/manual/en/ref.pcre.php"},{value:o,string:"Python",referencePage:"https://docs.python.org/3/library/re.html"},{value:l,string:"C#",referencePage:"https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx"},{value:c,string:"Java",referencePage:"https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html"},{value:u,string:"Ruby",referencePage:"http://ruby-doc.org/core-2.2.0/Regexp.html"},{value:d,string:"Rust",referencePage:"https://docs.rs/regex/latest/regex/"},{value:h,string:"Golang",referencePage:"https://golang.org/pkg/regexp/"},{value:p,string:"Perl",referencePage:"http://perldoc.perl.org/perlre.html"},{value:g,string:"AutoIt",referencePage:"https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm"},{value:m,string:"SED",referencePage:"https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html"},{value:x,string:"Swift 5.2",referencePage:"https://developer.apple.com/documentation/foundation/nsregularexpression"}].sort(((e,t)=>e.string.localeCompare(t.string)));function v(e){switch(e){case r().PCRE2:case r().PCRE:return i;case r().GOLANG:return h;case r().JAVASCRIPT:return a;case r().PYTHON:return o;case r().JAVA:return c;case r().DOTNET:return l;case r().RUST:return d;default:return a}}},17650:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(85893);const l=["className","children"],c=e=>{let t=e.className,s=e.children,r=(0,n.Z)(e,l);return(0,o.jsx)("div",Object.assign(Object.assign({className:i()("WLU1r","BcuOd",t)},r),{},{children:s}))},u=(0,r.memo)(c),d=["icon","children"],h=e=>{let t=e.icon,s=e.children,r=(0,n.Z)(e,d);return(0,o.jsxs)(u,Object.assign(Object.assign({},r),{},{children:[t&&(0,o.jsx)(t,{size:14,className:"FvZHv"}),s]}))},p=(0,r.memo)(h)},45524:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(79352),l=s(85893);const c=["isActive","className","children"],u=e=>{let t=e.isActive,s=e.className,r=e.children,a=(0,n.Z)(e,c);return(0,l.jsxs)("div",Object.assign(Object.assign({className:i()("rocdx",t&&"wxNpu",s)},a),{},{children:[(0,l.jsx)("div",{className:"u_Q0A",children:r}),t&&(0,l.jsx)(o.xuy,{size:16,className:"zxc_j"})]}))},d=(0,r.memo)(u)},58294:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(45987),r=s(67294),a=s(46175),i=s(17650),o=s(85893);const l=["icon","children","className"],c=e=>{let t=e.icon,s=e.children,r=e.className,c=(0,n.Z)(e,l);return(0,o.jsx)(a.Z,Object.assign(Object.assign({},c),{},{children:(0,o.jsx)(i.Z,{icon:t,children:s,className:r})}))},u=(0,r.memo)(c)},46175:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(68821),l=s(85893);const c=["isDisabled","className","children","onClick"],u=e=>{let t=e.isDisabled,s=e.className,r=e.children,a=e.onClick,u=(0,n.Z)(e,c);const d=i()("tu7rF",s,t&&"QTYb3");return null!=a?(0,l.jsx)(o.Yd,Object.assign(Object.assign({tag:"li",disabled:t,className:d,onClick:a},u),{},{children:r})):(0,l.jsx)("li",Object.assign(Object.assign({className:d},u),{},{children:r}))},d=(0,r.memo)(u)},62238:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var n=s(45987),r=s(67294),a=s(68821),i=s(85893);const o=["className","children","header","headerChildren"],l=e=>{let t=e.className,s=e.children,r=e.header,l=e.headerChildren,c=(0,n.Z)(e,o);return(0,i.jsxs)("div",Object.assign(Object.assign({className:t},c),{},{children:[!!r&&(0,i.jsx)(a.__,{text:r,className:"bjLBV",children:l}),(0,i.jsx)("ul",{className:"yEXrR",children:s})]}))},c=(0,r.memo)(l)},6527:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(58294),l=s(85893);const c=["children","className","rightElement","monospace"],u=e=>{let t=e.children,s=e.className,r=e.rightElement,a=e.monospace,u=void 0===a||a,d=(0,n.Z)(e,c);return(0,l.jsxs)(o.Z,Object.assign(Object.assign({className:i()("VZGjx",s)},d),{},{children:[(0,l.jsx)("div",{className:"Lta24",children:t}),(0,l.jsx)("div",{className:i()("IVPLo",u&&"i8N8D"),children:r})]}))},d=(0,r.memo)(u)},80362:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(45987),r=s(67294),a=s(58294),i=s(45524),o=s(85893);const l=["isActive","children"],c=e=>{let t=e.isActive,s=e.children,r=(0,n.Z)(e,l);return(0,o.jsx)(a.Z,Object.assign(Object.assign({},r),{},{children:(0,o.jsx)(i.Z,{children:s,isActive:t})}))},u=(0,r.memo)(c)},42613:(e,t,s)=>{"use strict";s.d(t,{Z:()=>f});var n=s(67294),r=s(94184),a=s.n(r),i=s(79352),o=s(69574),l=s(86565),c=s(59747),u=s(14882),d=s(68821);const h="UGBuq",p="Mveik";var g=s(85893);const m=(0,c.Z)(u.E2),x={appear:h,appearActive:p,enter:h,enterActive:p,exit:"T8Z3r",exitActive:"sAd7O"},f=({children:e,isOpen:t,className:s,isLoading:r,onModalClose:c})=>{const u=(0,n.useCallback)((e=>{r||(e.stopPropagation(),c())}),[c,r]),h=(0,n.useCallback)((e=>e.stopPropagation()),[]);return(0,n.useEffect)((()=>(t&&o.ZP.on("key:escape",u),()=>o.ZP.off("key:escape",u))),[t,u]),(0,g.jsx)(d.h_,{isOpen:t,closeTimeout:m,children:(0,g.jsx)(d.uT,{className:"CL1DJ",classNames:x,timeout:m,in:t,children:(0,g.jsx)(d.iQ,{children:(0,g.jsx)("div",{className:"Uj2uD",role:"dialog",onClick:u,children:(0,g.jsxs)("div",{className:a()("pvMZe",s),onClick:h,children:[(0,g.jsx)(d.Yd,{className:a()("o1E1z",r&&"dIKNo"),onClick:u,"aria-label":(0,l.Z)("Close"),children:(0,g.jsx)(i.eSQ,{size:24,className:"ghZGL"})}),e]})})})})})}},45527:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(45987),r=s(94184),a=s.n(r),i=s(85893);const o=["children","className"],l=e=>{let t=e.children,s=e.className,r=(0,n.Z)(e,o);return(0,i.jsx)("div",Object.assign(Object.assign({className:a()("qC93k",s)},r),{},{children:t}))}},52936:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var n=s(45987),r=s(79352),a=s(68821),i=s(58090),o=s(85893);const l=["children","isLoading","hasError","errorText"],c=e=>{let t=e.children,s=e.isLoading,c=e.hasError,u=e.errorText,d=(0,n.Z)(e,l);return(0,o.jsxs)("div",Object.assign(Object.assign({className:"xJ9FN"},d),{},{children:[s&&(0,o.jsx)(a.$j,{className:"KxTrS",size:i.J7.TC}),c&&(0,o.jsx)(a.lx,{text:u,direction:i.qF.N,children:(0,o.jsx)("div",{className:"tjcDo",role:"alert",children:(0,o.jsx)(r.j6O,{size:20})})}),t]}))}},50006:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(45987),r=s(94184),a=s.n(r),i=s(85893);const o=["children","className"],l=e=>{let t=e.children,s=e.className,r=(0,n.Z)(e,o);return(0,i.jsx)("h3",Object.assign(Object.assign({className:a()("pIQMq",s)},r),{},{children:t}))}},61399:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var n=s(67294),r=s(86565),a=s(68821),i=s(58090),o=s(42613),l=s(50006),c=s(45527),u=s(52936),d=s(85893);const h=({shortcuts:e,onModalClose:t,isOpen:s})=>(0,d.jsxs)(o.Z,{onModalClose:t,isOpen:s,className:"Lc3cW",children:[(0,d.jsx)(l.Z,{children:(0,r.Z)("Keyboard Shortcuts")}),(0,d.jsx)(c.Z,{children:(0,d.jsxs)("table",{className:"Ooj_l",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"P07mv",children:(0,r.Z)("Shortcut")}),(0,d.jsx)("th",{className:"iXeHu",children:(0,r.Z)("Description")})]})}),(0,d.jsx)("tbody",{children:e.map((({description:e,shortcuts:t},s)=>(0,d.jsxs)("tr",{className:"tt9uJ",children:[(0,d.jsx)("td",{className:"wE5nz",children:t.map(((e,s)=>(0,d.jsxs)(n.Fragment,{children:[(0,d.jsx)("div",{className:"cGBV0",children:(0,d.jsx)(a.aX,{shortcut:e})}),s!==t.length-1&&` ${(0,r.Z)("or")} `]},`shortcut-${e}-${s}`)))}),(0,d.jsx)("td",{children:e})]},`shortcut-${s}`)))})]})}),(0,d.jsx)(u.Z,{children:(0,d.jsx)(a.zx,{text:(0,r.Z)("Close"),onClick:t,type:i.V5.n1})})]})},16386:(e,t,s)=>{"use strict";s.d(t,{DC:()=>u,FS:()=>i,GU:()=>h,VO:()=>p,Xg:()=>o,u0:()=>l,wU:()=>c,xz:()=>d});var n=s(86565),r=s(68821),a=s(85893);const i="DOES_MATCH",o="DOES_NOT_MATCH",l="STARTS_WITH",c="ENDS_WITH",u="CONTAINS",d="EQUALS",h="IS_NULL",p={[i]:(0,n.Z)("does match"),[o]:(0,a.jsx)(r.vV,{text:"does {1} match",ph1:(0,a.jsx)("em",{style:{textDecoration:"underline"},children:(0,n.Z)("not")})}),[l]:(0,n.Z)("starts with"),[c]:(0,n.Z)("ends with"),[u]:(0,n.Z)("contains"),[d]:(0,n.Z)("equals"),[h]:(0,n.Z)("is null")}},96546:(e,t,s)=>{"use strict";s.d(t,{H:()=>a,m:()=>r});var n=s(86565);const r="REGEX";function a(e,t={}){if(e===r)return(0,n.Z)("regex");if(0===e)return(0,n.Z)("full match");let s=e;const a=t[e];return null!=a&&e!=a&&(s+=` (${a})`),(0,n.Z)("capture group {1}",s)}},56264:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(70743),r=s(68821),a=s(69537),i=s(85893);const o=({className:e,children:t,to:s="debugger"})=>{const o=(0,n.v9)((e=>e.regexEditor.flavor));return(0,a.G)(o)?(0,i.jsx)(r.rU,{to:s,className:e,children:t}):null}},56315:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(68821),l=s(58090),c=s(68654),u=s(85893);const d=["tooltip","tooltipDirection","children","size","className","style"],h=e=>{let t=e.tooltip,s=e.tooltipDirection,a=void 0===s?l.qF.N:s,h=e.children,p=e.size,g=void 0===p?22:p,m=e.className,x=e.style,f=void 0===x?{}:x,v=(0,n.Z)(e,d);return!h||h.length>1?null:(0,u.jsx)(o.lx,{text:t,direction:a,children:(0,u.jsxs)(o.rU,Object.assign(Object.assign({className:i()(c.Z.iconButton,m),style:Object.assign(Object.assign({},f),{},{width:g,height:g})},v),{},{children:[(0,u.jsx)(o._G,{children:t}),(0,r.cloneElement)(h,Object.assign(Object.assign({},h.props),{},{className:i()(h.props.className,c.Z.icon)}))]}))})},p=(0,r.memo)(h)},34061:(e,t,s)=>{"use strict";s.d(t,{$0:()=>f,ZP:()=>v,mc:()=>x});var n=s(45987),r=s(67294),a=s(94184),i=s.n(a),o=s(31807),l=s.n(o),c=s(17159),u=s(11124),d=s(59747),h=s(14882),p=s(84682),g=s(85893);const m=["children","className","component","appear","enter","exit","unmountOnExit","mountOnEnter","timeout","classNames","style","in","forceAnimation","onMount"],x=(0,d.Z)(h.mc),f={appear:p.Z.enter,appearActive:p.Z.enterActive,enter:p.Z.enter,enterActive:p.Z.enterActive,exit:p.Z.leave,exitActive:p.Z.leaveActive},v=(0,r.forwardRef)(((e,t)=>{let s=e.children,a=e.className,o=e.component,d=void 0===o?"div":o,h=e.appear,v=void 0===h||h,b=e.enter,j=void 0===b||b,C=e.exit,Z=void 0===C||C,y=e.unmountOnExit,E=void 0===y||y,T=e.mountOnEnter,k=void 0===T||T,N=e.timeout,S=e.classNames,_=e.style,w=e.in,A=e.forceAnimation,O=e.onMount,I=(0,n.Z)(e,m),R=(0,u.Z)();A&&(R=!1);const P=(0,r.useRef)(null),L=(0,g.jsx)(d,{className:i()(a,R&&p.Z.reduceMotion),style:_,ref:t||P,children:s});return(0,r.useEffect)((()=>{null==O||O()}),[O]),l()?"visible"===document.visibilityState||!1===document.hidden||document.hasFocus()?(0,g.jsx)(c.Z,Object.assign(Object.assign({classNames:R?f:S,timeout:R?x:N,appear:v,enter:j,exit:Z,mountOnEnter:k,unmountOnExit:E,in:w,nodeRef:t||P},I),{},{children:L})):(0,g.jsx)(c.Z,Object.assign(Object.assign({className:i()(a,R&&p.Z.reduceMotion),classNames:R?f:S,timeout:R?x:N,appear:!1,enter:!1,exit:Z,mountOnEnter:k,unmountOnExit:E,in:w,nodeRef:t||P},I),{},{children:L})):L}))},47519:(e,t,s)=>{"use strict";s.d(t,{L:()=>h,Z:()=>g});var n=s(98152),r=s(45987),a=s(67294),i=s(94184),o=s.n(i),l=s(70743);const c="qjDbF";var u=s(85893);const d=["text","removeNewlines","className","markerClassName","minimal"],h={0:"NUL",1:"SOH",2:"STX",3:"ETX",4:"EOT",5:"ENQ",6:"ACK",7:"BEL",8:"BKSP",9:"HT",10:"LF",11:"VT",12:"FF",13:"CR",27:"ESC"},p=e=>{let t=e.text,s=e.removeNewlines,a=e.className,i=e.markerClassName,p=e.minimal,g=(0,r.Z)(e,d);const m=(0,l.v9)((e=>e.settings.displayWhitespace));if(!m&&!s)return(0,u.jsx)("span",Object.assign(Object.assign({className:a},g),{},{children:t}));const x=!m&&s?/\r\n?|\n/g:/\r\n?|[ \n\t\f\v\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,f=t.split(x);if(f.length<=1)return p?t:(0,u.jsx)("span",Object.assign(Object.assign({className:a},g),{},{children:t}));const v=t.match(x);return f.reduce(((e,t,r)=>{const l=v[r];if(!l)return[...e,t];const d="\n"===l||"\r"===l||"\r\n"===l,p=" "===l||d,g=function(e){if(/[\r\n]/.test(e))return[c,"\u21b5"];if(e.length>1)throw new Error(`Marker length greater than 1, string: "${e}"`);if(" "===e)return[c,"\u2022"];if("\t"===e)return["YHF8J"," "];const t=e.codePointAt(0);return["sej3F",h[t]||`U+${("0000"+t.toString(16).toUpperCase()).slice(-4)}`]}(l),m=(0,n.Z)(g,2),x=m[0],f=m[1],b=s&&d?(0,u.jsx)("span",{className:o()(a,i,x,"iHZok"),"data-whitespace":p,children:f},`special-char-${r}`):(0,u.jsx)("span",{className:o()(a,i,x,"Ue7my",d&&"XMwPP"),"data-content":f,"data-whitespace":p,children:d?"\n":l},`special-char-${r}`);return[...e,t,b]}),[])},g=(0,a.memo)(p)},68821:(e,t,s)=>{"use strict";s.d(t,{Yd:()=>L,zx:()=>F,FX:()=>Ce,gx:()=>ye,qi:()=>Se,Yi:()=>Ae.Z,SV:()=>Pe,Tv:()=>_e,iQ:()=>De,aX:()=>We,hU:()=>xe,x6:()=>Ue.Z,CP:()=>$e,__:()=>u,rU:()=>te,Po:()=>ve,A5:()=>we,qX:()=>m,h_:()=>V,l_:()=>Ge,_G:()=>Ie,I2:()=>Le,$j:()=>ae,vV:()=>A,Yv:()=>he,oi:()=>K,lx:()=>k,uT:()=>ie.ZP,K:()=>Oe.Z});var n=s(45987),r=s(94184),a=s.n(r),i=s(58090);const o={root:"dYInr",small:"z2wCE",medium:"yBUBH",large:"m46EU",overflow:"JOzNE",required:"uJMuU"};var l=s(85893);const c=["size","text","className","children","allowOverflow","required"],u=e=>{let t=e.size,s=void 0===t?i.J7.HC:t,r=e.text,u=e.className,d=e.children,h=e.allowOverflow,p=e.required,g=(0,n.Z)(e,c);return(0,l.jsxs)("h2",Object.assign(Object.assign({className:a()(o.root,!h&&o.overflow,o[s],u)},g),{},{children:[(0,l.jsx)("span",{className:a()(!h&&o.overflow),children:r}),p&&(0,l.jsx)("span",{className:o.required,children:" *"}),d]}))};var d=s(67294);const h={error:"zyVia",warn:"wxY97",info:"ZHUJ9",success:"QsetX",margin:"_2SqQ"},p=["type","children","className","noMargin"],g=e=>{let t=e.type,s=void 0===t?i.gr.H_:t,r=e.children,o=e.className,c=e.noMargin,u=(0,n.Z)(e,p);return s===i.gr.pn&&(u.role=u.role||"alert",c=!0),(0,l.jsx)("div",Object.assign(Object.assign({className:a()(h[s],!c&&h.margin,o)},u),{},{children:r}))},m=(0,d.memo)(g);var x=s(98152),f=s(31807),v=s.n(f),b=s(83950),j=s(59747),C=s(14882);const Z={portal:"B5ZQm",animation:"W1cZe",tooltipped:"VkxC6","tooltipped-s":"tpO8n","tooltipped-se":"rRIcU","tooltipped-sw":"rxR8J","tooltipped-n":"HEiJb","tooltipped-ne":"C8D6d","tooltipped-nw":"_LdAA","tooltipped-w":"ItfZm","tooltipped-e":"G0Q1B",multiline:"IE41R","tooltipped-sticky":"prZOI",enter:"_e9G1",enterActive:"cSwfV",leave:"y9o0V",leaveActive:"UuK9m"},y=v()&&("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),E=(0,j.Z)(C.DP),T={appear:Z.enter,appearActive:Z.enterActive,enter:Z.enter,enterActive:Z.enterActive,exit:Z.leave,exitActive:Z.leaveActive},k=({direction:e=i.qF.S,text:t,children:s,disableTooltip:n,multiline:r})=>{const o=(0,d.useRef)({}),c=(0,d.useState)(!1),u=(0,x.Z)(c,2),h=u[0],p=u[1],g=(0,d.useRef)(null),m=d.Children.only(s),f=m.ref||g,v=(0,b.Sf)((()=>p(!0)),175,"cancel");if((0,d.useEffect)((()=>{const e=f.current,t=()=>{var e,t;null!=(e=document)&&null!=(t=e.body)&&t.classList.contains("using-keyboard")&&p(!0)},s=()=>{var e,t;v.cancel(),null!=(e=document)&&null!=(t=e.body)&&t.classList.contains("using-keyboard")&&p(!1)},n=()=>{v.cancel(),p(!1)},r=t=>{null!=e&&e.contains(t.target)||e===t.target||n()};return e.addEventListener("focus",t,{passive:!0}),e.addEventListener("blur",s,{passive:!0}),e.addEventListener("mouseenter",v,{passive:!0}),e.addEventListener("mouseleave",n,{passive:!0}),document.body.addEventListener("click",r,{passive:!0}),()=>{v.cancel(),e.removeEventListener("focus",t,{passive:!0}),e.removeEventListener("blur",s,{passive:!0}),e.removeEventListener("mouseenter",v,{passive:!0}),e.removeEventListener("mouseleave",n,{passive:!0}),document.body.removeEventListener("click",r,{passive:!0})}}),[f,v]),(0,d.useEffect)((()=>{(m.props.disabled||m.props.isDisabled)&&(v.cancel(),p(!1))}),[m.props.disabled,m.props.isDisabled,v]),f.current&&h){const t=f.current.getBoundingClientRect();let s,n;switch(o.current={position:"absolute",height:t.height,width:t.width},e){case i.qF.SE:case i.qF.SW:case i.qF.S:s=t.top+t.height,n=t.left;break;case i.qF.NW:case i.qF.NE:case i.qF.N:s=t.top,n=t.left;break;case i.qF.W:case i.qF.E:s=t.top+t.height/2,n=t.left;break;default:throw new Error(`Unhandled tooltip direction ${e}`)}o.current.top=Math.round(s),o.current.left=Math.round(n)}const j=!n&&!y&&h;return(0,l.jsxs)(l.Fragment,{children:[(0,d.cloneElement)(m,{ref:f,"aria-label":m.props["aria-label"]||t}),(0,l.jsx)(V,{isOpen:j,closeTimeout:E,className:Z.portal,children:(0,l.jsx)(ie.ZP,{className:Z.animation,classNames:T,timeout:E,style:o.current,in:j,children:(0,l.jsx)("div",{className:a()(Z.tooltipped,r&&Z.multiline,Z[`tooltipped-${e}`]),role:"tooltip",children:(0,l.jsx)("span",{children:t})})})})]})};var N=s(86565);const S=["text","tag","className","style"],_=/{[1-9]\d*}/g,w=e=>{let t=e.text,s=e.tag,r=void 0===s?"span":s,a=e.className,i=e.style,o=(0,n.Z)(e,S);const c=t.match(_);if(!c)return(0,l.jsx)(r,{className:a,style:i,children:(0,N.Z)(t,...Object.values(o))});const u=t.split(_);return(0,l.jsx)(r,{className:a,style:i,children:u.reduce(((e,t,s)=>{if(!c[s])return[...e,t];const n=c[s].slice(1,-1),r=o[`ph${n}`];return[...e,t,(0,l.jsx)(d.Fragment,{children:r},t+s)]}),[])})},A=(0,d.memo)(w);var O=s(45697),I=s.n(O);const R=["tag","className","onClick","disabled"],P=(0,d.forwardRef)(((e,t)=>{let s=e.tag,r=void 0===s?"button":s,i=e.className,o=e.onClick,c=e.disabled,u=(0,n.Z)(e,R);const h=(0,d.useCallback)((e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o(e))}),[o]);return"button"!==r&&(u.role=u.role||"button",u.tabIndex=u.tabIndex||0,c||(u.onKeyUp=h)),c&&(u.tabIndex=-1,u.disabled=!0),"button"===r&&(u.type="button"),(0,l.jsx)(r,Object.assign({className:a()("b0Wk4",c&&"KOowz",i),onClick:c?void 0:o,ref:t,"aria-disabled":c},u))})),L=(0,d.memo)(P),M={okButton:"KlLjA",cancelButton:"o0XbU",dangerButton:"LHBOD",disabled:"TzGX0"},D=["text","type","className","disabled"],U=(0,d.forwardRef)(((e,t)=>{let s=e.text,r=e.type,o=void 0===r?i.V5.OK:r,c=e.className,u=e.disabled,d=(0,n.Z)(e,D);return(0,l.jsx)(L,Object.assign(Object.assign({className:a()(M[o],c,u&&M.disabled),"aria-label":s,disabled:u,ref:t},d),{},{children:s}))}));U.propTypes={text:I().string.isRequired,type:I().oneOf(i.V5.$6),className:I().string,disabled:I().bool};const F=(0,d.memo)(U);var G=s(73935);const V=({className:e,children:t,onPortalRef:s,isOpen:n=!0,closeTimeout:r=0,portalTarget:a})=>{const i=null==a&&v()?document.body:a,o=(0,d.useState)(!1),c=(0,x.Z)(o,2),u=c[0],h=c[1],p=(0,d.useRef)(),g=(0,d.useRef)();(0,d.useLayoutEffect)((()=>{u&&(null==s||s(p.current))}),[s,u]),(0,d.useEffect)((()=>(n&&(clearTimeout(g.current),null==p.current&&(p.current=document.createElement("div"),i.appendChild(p.current)),h(!0)),()=>{null!=p.current&&(clearTimeout(g.current),g.current=setTimeout((()=>{var e;h(!1),null==(e=p.current)||e.remove(),p.current=null,null==s||s(null)}),r))})),[n,i,r,s]),(0,d.useEffect)((()=>{null!=p.current&&null!=e&&(p.current.className=e)}),[n,e]),(0,d.useEffect)((()=>()=>{var e;clearTimeout(g.current),null==(e=p.current)||e.remove(),p.current=null,null==s||s(null)}),[s]);const m=d.Children.only(t);return v()?u&&null!=m&&null!=p.current?G.createPortal(m,p.current):null:(0,l.jsx)("div",{style:{display:"none"},children:m})};var B=s(79352),$=s(69574),H=s(35579);const q=({maxLength:e,currentLength:t=0,multiline:s})=>{const n=a()("MaQ5e",!s&&"kRYUB");return e?(0,l.jsx)("div",{className:n,children:`${t}/${e}`}):(0,l.jsx)("div",{className:n,children:t})},z=(0,d.memo)(q),W=["onChange","className","codeInput","value","defaultValue","multiline","readOnly","maxlength","validation","showLengthCounter","selectOnMount","selectOnFocus","focusOnMount","wrappedClassName","copyButton","clearButton"],Y=(0,d.forwardRef)(((e,t)=>{let s=e.onChange,r=e.className,o=e.codeInput,c=e.value,u=e.defaultValue,h=e.multiline,p=void 0!==h&&h,g=e.readOnly,m=e.maxlength,f=e.validation,v=e.showLengthCounter,b=e.selectOnMount,j=e.selectOnFocus,C=e.focusOnMount,Z=e.wrappedClassName,y=e.copyButton,E=e.clearButton,T=(0,n.Z)(e,W);const S=(0,d.useState)(""),_=(0,x.Z)(S,2),w=_[0],A=_[1],O=(0,d.useState)(!1),I=(0,x.Z)(O,2),R=I[0],P=I[1],M=(0,d.useState)(!1),D=(0,x.Z)(M,2),U=D[0],F=D[1],G=(0,d.useRef)(null),V=t||G;(0,d.useEffect)((()=>{let e=null;return R&&(e=setTimeout((()=>P(!1)),400)),()=>{clearTimeout(e)}}),[R]),(0,d.useEffect)((()=>{null!=c&&A(c)}),[c]);const q=(0,d.useCallback)((()=>{$.ZP.emit($.B3,H.LEFT_ARROW),$.ZP.emit($.B3,H.RIGHT_ARROW),$.ZP.emit($.B3,H.SHIFT_LEFT_ARROW),$.ZP.emit($.B3,H.SHIFT_RIGHT_ARROW),F(!0)}),[]),Y=(0,d.useCallback)((()=>{$.ZP.emit($.LG,H.LEFT_ARROW),$.ZP.emit($.LG,H.RIGHT_ARROW),$.ZP.emit($.LG,H.SHIFT_LEFT_ARROW),$.ZP.emit($.LG,H.SHIFT_RIGHT_ARROW),F(!1)}),[]),K=(0,d.useCallback)((e=>{if(g)return;const t=e.target.value;f&&!f.test(t)||m&&m<t.length?(P(!0),null==s||s(w)):(P(!1),A(t),null==s||s(t))}),[w,m,f,s,g]),J=(0,d.useCallback)((()=>{P(!1),A(""),null==s||s("")}),[s]);(0,d.useEffect)((()=>{null!=u&&A(u)}),[u]),(0,d.useEffect)((()=>{(b||C)&&setTimeout((()=>{var e;return null==(e=V.current)?void 0:e.focus()}))}),[]),(0,d.useEffect)((()=>{U&&j&&V.current.select()}),[V,j,U]);const X=p?"textarea":"input",Q=E&&!g&&!p&&!m&&!v&&w.length>0;return(0,l.jsxs)("div",{className:a()("OSM2Q",R&&"YUotv",U&&"E646T",g&&"qPEQx",Z),children:[(0,l.jsx)(X,Object.assign(Object.assign({},T),{},{className:a()("vNcES",o&&"zLfBM",y&&"L6fuH",Q&&"svJgY",(m||v)&&!p&&"Nih6H",r),onChange:K,onFocus:q,onBlur:Y,value:w,ref:V})),Q&&(0,l.jsx)(k,{text:(0,N.Z)("Clear"),direction:i.qF.NW,children:(0,l.jsx)(L,{onClick:J,className:"e8Fwv",children:(0,l.jsx)(B.eSQ,{size:20})})}),(m||v)&&(0,l.jsx)(z,{maxLength:m,currentLength:w.length,multiline:p}),y&&(0,l.jsx)(Se,{className:"mha2w",copyText:w,basic:!0})]})})),K=(0,d.memo)(Y);var J=s(89250),X=s(79655);const Q=["to","absolute","children","noTheme","className","activeClassName","activeRegex"],ee=(0,d.forwardRef)(((e,t)=>{let s=e.to,r=e.absolute,i=void 0!==r&&r,o=e.children,c=e.noTheme,u=void 0!==c&&c,d=e.className,h=e.activeClassName,p=e.activeRegex,g=(0,n.Z)(e,Q);const m=(0,J.TH)().pathname,x=null!=p&&p.test(m),f=a()("HnB3F",!u&&"kKIV1",x&&h,d);return i?(0,l.jsx)("a",Object.assign(Object.assign({href:s,className:f,rel:"noopener",ref:t},g),{},{children:o})):(0,l.jsx)(X.rU,Object.assign(Object.assign({to:s,className:f,ref:t},g),{},{children:o}))})),te=(0,d.memo)(ee),se={loading:"Pv6NV",large:"K5n25",medium:"uo2S1",small:"LbYg5",tiny:"u06aC"},ne=["className","size"],re=e=>{let t=e.className,s=e.size,r=void 0===s?i.J7.M2:s,o=(0,n.Z)(e,ne);return(0,l.jsx)("div",Object.assign({className:a()(se.loading,t,se[r]),"aria-label":(0,N.Z)("Loading...")},o))},ae=(0,d.memo)(re);var ie=s(34061),oe=s(37731),le=s(25913),ce=s(12541);const ue=["target","placement"],de={name:"applyMaxSize",enabled:!0,phase:"beforeWrite",requires:["maxSize"],fn({state:e}){const t=e.modifiersData.maxSize.height;e.styles.popper.maxHeight=`${t}px`}},he=e=>{let t=e.target,s=e.placement,r=(0,n.Z)(e,ue);const a=(0,d.useRef)(null);(0,d.useEffect)((()=>()=>{var e;return null==(e=a.current)?void 0:e.destroy()}),[]);const i=(0,d.useCallback)((e=>{var n;e?a.current=(0,oe.fi)(t,e,{placement:s,modifiers:[Object.assign(Object.assign({},ce.Z),{},{options:{padding:10}}),de,le.Z],rootBoundary:"viewport"}):null==(n=a.current)||n.destroy()}),[t,s]);return(0,l.jsx)(V,Object.assign(Object.assign({},r),{},{onPortalRef:i}))};var pe=s(68654);const ge=["tooltip","tooltipDirection","className","children","disabled","size","isLoading"],me=(0,d.forwardRef)(((e,t)=>{let s=e.tooltip,r=e.tooltipDirection,o=void 0===r?i.qF.N:r,c=e.className,u=e.children,h=e.disabled,p=e.size,g=void 0===p?22:p,m=e.isLoading,x=void 0!==m&&m,f=(0,n.Z)(e,ge);return!u||u.length>1?null:(0,l.jsx)(k,{text:s,direction:o,children:(0,l.jsxs)(L,Object.assign(Object.assign({className:a()(pe.Z.iconButton,h&&pe.Z.disabled,c),disabled:h},f),{},{style:{width:g,height:g},ref:t,children:[(0,d.cloneElement)(u,Object.assign(Object.assign({},u.props),{},{className:a()(u.props.className,pe.Z.icon)})),x&&(0,l.jsx)("div",{className:pe.Z.spinner,children:(0,l.jsx)(ae,{style:{width:g-12,height:g-12},size:i.J7.HC})})]}))})})),xe=(0,d.memo)(me),fe=["children","className"],ve=e=>{let t=e.children,s=e.className,r=(0,n.Z)(e,fe);return(0,l.jsx)(u,Object.assign(Object.assign({className:a()("icHQ0",s)},r),{},{children:(0,l.jsx)("div",{className:"hwtOd",children:t})}))},be=["collapsed","className","onClick"],je=e=>{let t=e.collapsed,s=e.className,r=e.onClick,i=(0,n.Z)(e,be);return(0,l.jsx)(L,{onClick:r,children:(0,l.jsx)(u,Object.assign(Object.assign({className:a()("MudcX",s)},i),{},{children:(0,l.jsx)("div",{className:"YTTWs",children:t?(0,l.jsx)(B.gcy,{}):(0,l.jsx)(B.ZXJ,{})})}))})},Ce=(0,d.memo)(je),Ze=["header","children","className","contentClassName","isVisible"],ye=e=>{let t=e.header,s=e.children,r=e.className,i=e.contentClassName,o=e.isVisible,c=void 0===o||o,u=(0,n.Z)(e,Ze);return(0,l.jsxs)("div",Object.assign(Object.assign({className:a()("gUc_7",r)},u),{},{children:[(0,d.cloneElement)(t,{className:a()("BrhQI",t.props.className)}),c&&(0,l.jsx)("div",{className:a()("D57o9",i),children:(0,d.cloneElement)(s,{className:a()(s.props.className,"KjF06")})})]}))};var Ee=s(55030);const Te=["className","basic","getCopyComponent","copyText"];let ke;v()&&(ke=s(42152));const Ne=e=>{let t=e.className,s=e.basic,r=e.getCopyComponent,o=e.copyText,c=(0,n.Z)(e,Te);const u=(0,d.useRef)(null),h=(0,d.useState)(null),p=(0,x.Z)(h,2),g=p[0],m=p[1];return(0,d.useEffect)((()=>{const e=new ke(u.current,{container:u.current,text(){if(null==r)return o;const e=r();return e.textContent||e.value||""}});let t;const s=e=>{var s;e.clearSelection(),m((0,N.Z)("Copied!")),null==(s=u.current)||s.focus(),clearTimeout(t),t=setTimeout((()=>m(null)),1e3)},n=()=>{m((0,N.Z)("Press {1} to copy",(0,Ee.W5)("c"))),clearTimeout(t),t=setTimeout((()=>m(null)),1e3)};return e.on("success",s),e.on("error",n),()=>{clearTimeout(t),e.off("success",s),e.off("error",n),e.destroy()}}),[r,o]),s?(0,l.jsx)(k,{direction:i.qF.NW,text:g||(0,N.Z)("Copy to clipboard"),children:(0,l.jsx)(L,Object.assign(Object.assign({className:a()("EOaQm",t),onMouseOut:()=>m(null),ref:u},c),{},{children:(0,l.jsx)(B.qA2,{size:16})}))}):(0,l.jsx)(xe,Object.assign(Object.assign({tooltip:g||(0,N.Z)("Copy to clipboard"),tooltipDirection:i.qF.NW,onMouseOut:()=>m(null),size:28,ref:u,className:t},c),{},{children:(0,l.jsx)(B.qA2,{size:14})}))},Se=(0,d.memo)(Ne),_e=({className:e,topPadding:t=0,rightPos:s=0,children:n})=>{const r=(0,d.useRef)(null);return(0,d.useEffect)((()=>{var e;let n;const a=null==(e=r.current)?void 0:e.parentNode,i=()=>{r.current&&(r.current.style.opacity=.01,clearTimeout(n),n=setTimeout((()=>{if(!a||!r.current)return;const e=a.scrollTop,n=a.scrollLeft;r.current.style.opacity=1,r.current.style.top=t+e+"px",r.current.style.left=`calc(100% + ${n-s}px)`}),250))};return a.addEventListener("scroll",i,{capture:!1,passive:!0}),()=>{clearTimeout(n),a.removeEventListener("scroll",i,{capture:!1,passive:!0})}}),[t,s]),(0,l.jsx)("div",{className:a()("WRRyg",e),ref:r,style:{top:t,left:`calc(100% - ${s}px)`},children:n})};function we(){return(0,l.jsx)("noscript",{children:(0,l.jsx)(te,{to:"https://turnonjs.com",absolute:!0,children:(0,N.Z)("Please enable JavaScript to use this web application.")})})}var Ae=s(56264),Oe=s(47519);const Ie=({children:e})=>(0,l.jsx)("span",{className:"M__Pz",children:e});class Re extends d.Component{constructor(...e){super(...e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){const e=this.props,t=e.fallback,s=e.children,n=e.className;return this.state.hasError?void 0===t?(0,l.jsx)(m,{type:i.gr.pn,className:n,children:(0,N.Z)("An error occurred while fetching the resource")}):t:s}}const Pe=Re,Le=({fallback:e,errorClassName:t,children:s,errorFallback:n})=>v()?(0,l.jsx)(Pe,{className:t,fallback:n,children:(0,l.jsx)(d.Suspense,{fallback:e,children:s})}):e;var Me=s(44291);const De=({children:e})=>{const t=d.Children.only(e),s=(0,d.useRef)(null),n=t.ref||s;return(0,d.useEffect)((()=>{let e;return n.current&&(e=(0,Me.v)(n.current,{returnFocusOnDeactivate:!0,allowOutsideClick:!0}),e.activate()),()=>{var t;clearTimeout(void 0),null==(t=e)||t.deactivate()}}),[n]),(0,d.cloneElement)(t,{ref:n})};var Ue=s(56315),Fe=s(64700);const Ge=e=>((0,d.useContext)(Fe.U),(0,l.jsx)(J.Fg,Object.assign({},e))),Ve=["className","children"],Be=(0,d.forwardRef)(((e,t)=>{let s=e.className,r=e.children,i=(0,n.Z)(e,Ve);return(0,l.jsxs)(L,Object.assign(Object.assign({className:a()("WtMVB",s),ref:t},i),{},{children:[r,(0,l.jsx)(B.ZXJ,{})]}))}));Be.propTypes={className:I().string,children:I().node};const $e=Be;var He=s(70743),qe=s(41664);const ze=({shortcut:e})=>{if((0,He.v9)((e=>e.settings.disableKeyboardShortcuts)))return null;const t=[];e.metaKey&&(Ee.yg&&Ee.yg!==qe.B?Ee.yg===qe.v&&t.push("\u2318"):t.push("ctrl")),e.shiftKey&&t.push("\u21e7"),e.altKey&&t.push("\u2325");let s=null;switch(e.key){case"ArrowLeft":s="\u2190";break;case"ArrowUp":s="\u2191";break;case"ArrowRight":s="\u2192";break;case"ArrowDown":s="\u2193";break;case"PageDown":s="PgDn";break;case"PageUp":s="PgUp";break;case"Enter":s="enter";break;default:s=e.key}return t.push(s),t.join("+")};ze.propTypes={shortcut:I().object.isRequired};const We=(0,d.memo)(ze);s(40378),(0,j.Z)(C.RA)},58090:(e,t,s)=>{"use strict";s.d(t,{qF:()=>r,gr:()=>c,J7:()=>n,V5:()=>a});var n={};s.r(n),s.d(n,{M2:()=>i,HC:()=>o,TC:()=>l});var r={};s.r(r),s.d(r,{E:()=>x,N:()=>m,NE:()=>p,NW:()=>g,S:()=>h,SE:()=>u,SW:()=>d,W:()=>f});var a={};s.r(a),s.d(a,{n1:()=>v,T:()=>j,OK:()=>b,$6:()=>C});const i="medium",o="small",l="tiny";var c=s(79192);const u="se",d="sw",h="s",p="ne",g="nw",m="n",x="e",f="w",v="cancelButton",b="okButton",j="dangerButton",C=[b,v,j]},79192:(e,t,s)=>{"use strict";s.d(t,{H_:()=>a,MR:()=>i,pn:()=>n,u_:()=>r});const n="error",r="warn",a="info",i="success"},26086:e=>{e.exports={ROOT_ELEMENT:"#regex-app",UPDATE_RESULT_DELAY:500,DONATION_LINK:"https://www.paypal.com/donate/?hosted_button_id=83QZGPDJEX4MN",WEBCHAT_LINK:"https://web.libera.chat/?nick=<NICKNAME>&chan=#regex",GROUP_COUNT:6,DELETE_CODES:"regex101-delete-codes",CACHE_NAME:"regex101-cache",SPONSOR_LINK:"https://github.com/sponsors/firasdib",STATE_STORAGE_KEY:"regex101-state",STATE_TEMP_REGEX_EDITOR_KEY:"regex101-temp",DEFAULT_PAGE_TITLE:"build, test, and debug regex",DEFAULT_META_DESCRIPTION:"Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.",LIBRARY_META_DESCRIPTION:"Search, filter and view user submitted regular expressions in the regex library. Over 20,000 entries, and counting!",QUIZ_META_DESCRIPTION:"Learn regex and challenge yourself in a unique regex quiz: play progressively harder levels and compete with orders in creating the shortest solutions.",SETTINGS_META_DESCRIPTION:"Customize your regex101 experience to suit your needs. Extensive options available: themes, default flavor, site language, and much more.",ACCOUNT_META_DESCRIPTION:"Manage all your regular expressions using your personal account. Add favorites, organize entries with titles and tags, make entries private, and more!"}},18757:(e,t,s)=>{const n=s(61348),r=["/","~","@",";","%","`","#"];e.exports={[n.PCRE2]:r,[n.PCRE]:r,[n.PYTHON]:['"',"'",'"""',"'''"],[n.JAVASCRIPT]:["/","`",'"',"'"],[n.GOLANG]:["`"],[n.JAVA]:['"'],[n.DOTNET]:['"'],[n.RUST]:['"',"#","##","###","####"]}},61348:e=>{const t="pcre",s="pcre2",n="javascript",r="python",a="golang",i="java",o="dotnet",l="rust",c=[t,s,n,r,a,i,o,l];e.exports={PCRE2:s,PCRE:t,PYTHON:r,JAVASCRIPT:n,GOLANG:a,JAVA:i,DOTNET:o,RUST:l,all:c}},35579:(e,t,s)=>{"use strict";s.r(t),s.d(t,{COMMA:()=>u,DOT:()=>d,END:()=>f,ESC:()=>n,HOME:()=>x,LEFT_ARROW:()=>i,META_LEFT_ARROW:()=>h,META_RIGHT_ARROW:()=>p,MINUS:()=>m,PAGE_DOWN:()=>b,PAGE_UP:()=>v,PLUS:()=>g,RIGHT_ARROW:()=>o,RUN_UNIT_TESTS:()=>j,SAVE_REGEX:()=>a,SHIFT_LEFT_ARROW:()=>l,SHIFT_RIGHT_ARROW:()=>c,SHOW_CODE_GEN:()=>N,SHOW_DEBUGGER:()=>k,SHOW_SHORTCUTS:()=>C,SWITCH_TO_LIST:()=>E,SWITCH_TO_MATCH:()=>Z,SWITCH_TO_SUBST:()=>y,SWITCH_TO_UNIT_TESTS:()=>T,UPDATE_REGEX:()=>r});const n={name:"escape",keyCode:[27],key:"Escape",overrideInput:!0},r={name:"updateRegex",key:"s",keyCode:[83],shiftKey:!0,metaKey:!0,alwaysConsume:!0,overrideInput:!0},a={name:"saveRegex",key:"s",keyCode:[83],metaKey:!0,alwaysConsume:!0,overrideInput:!0},i={name:"leftArrow",key:"ArrowLeft",keyCode:[37],overrideInput:!1},o={name:"rightArrow",key:"ArrowRight",keyCode:[39],overrideInput:!1},l={name:"shiftLeftArrow",key:"ArrowLeft",keyCode:[37],shiftKey:!0,overrideInput:!1},c={name:"shiftRightArrow",key:"ArrowRight",keyCode:[39],shiftKey:!0,overrideInput:!1},u={name:"comma",key:",",keyCode:[44],overrideInput:!1},d={name:"dot",key:".",keyCode:[46],overrideInput:!1},h={name:"metaArrowLeft",key:"ArrowLeft",keyCode:[37],metaKey:!0,overrideInput:!1},p={name:"metaArrowRight",key:"ArrowRight",keyCode:[39],metaKey:!0,overrideInput:!1},g={name:"plus",key:"+",keyCode:[107,171],overrideInput:!1},m={name:"minus",key:"-",keyCode:[109,173],overrideInput:!1},x={name:"home",key:"Home",keyCode:[36],overrideInput:!1},f={name:"end",key:"End",keyCode:[35],overrideInput:!1},v={name:"pageUp",key:"PageUp",keyCode:[33],overrideInput:!1},b={name:"pageDown",key:"PageDown",keyCode:[34],overrideInput:!1},j={name:"ctrlEnter",key:"Enter",keyCode:[13],metaKey:!0,overrideInput:!0},C={name:"question",key:"?",keyCode:[171],shiftKey:!0,overrideInput:!1},Z={name:"ctrl1",key:"1",keyCode:[49],metaKey:!0,overrideInput:!0},y={name:"ctrl2",key:"2",keyCode:[50],metaKey:!0,overrideInput:!0},E={name:"ctrl3",key:"3",keyCode:[51],metaKey:!0,overrideInput:!0},T={name:"ctrl4",key:"4",keyCode:[52],metaKey:!0,overrideInput:!0},k={name:"ctrlB",key:"b",keyCode:[66],metaKey:!0,overrideInput:!0},N={name:"ctrlG",key:"g",keyCode:[71],metaKey:!0,overrideInput:!0}},61724:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CHINESE:()=>v,DUTCH:()=>m,ENGLISH:()=>g,FRENCH:()=>x,GERMAN:()=>f,ITALIAN:()=>E,PORTOGUESE:()=>C,ROMANIAN:()=>y,RUSSIAN:()=>Z,SPANISH:()=>j,SWEDISH:()=>b});const n=s.p+"assets/english.ea2c10a3.json",r=s.p+"assets/dutch.369dac6d.json",a=s.p+"assets/french.d01d6013.json",i=s.p+"assets/german.5c9183b8.json",o=s.p+"assets/zh.bfc3cc89.json",l=s.p+"assets/sv.08a2194f.json",c=s.p+"assets/spanish.81673b81.json",u=s.p+"assets/pt_BR.a5542d5f.json",d=s.p+"assets/ru.b80c536b.json",h=s.p+"assets/ro.2477a61c.json",p=s.p+"assets/it.e9f24d1d.json",g={text:"English",file:n},m={text:"Dutch",file:r},x={text:"French",file:a},f={text:"German",file:i},v={text:"Chinese",file:o},b={text:"Swedish",file:l},j={text:"Spanish",file:c},C={text:"Portuguese (Brazil)",file:u},Z={text:"Russian",file:d},y={text:"Romanian",file:h},E={text:"Italian",file:p}},27782:e=>{const t="MOST_RECENT",s="MOST_POINTS",n="LEAST_POINTS",r="RELEVANCE",a=[t,s,n,r];e.exports={MOST_RECENT:t,MOST_POINTS:s,LEAST_POINTS:n,RELEVANCE:r,all:a}},56538:(e,t,s)=>{"use strict";s.d(t,{D9:()=>n,Fo:()=>h,Gv:()=>x,Hg:()=>i,Rp:()=>c,UA:()=>m,VE:()=>o,Vu:()=>g,Y8:()=>a,e0:()=>u,ed:()=>d,ek:()=>l,ik:()=>r,wm:()=>p});const n="PATTERN_ERROR",r="TIMEOUT_ERROR",a="FAILED_TO_INITIALIZE_ENGINE",i=-1,o=-8,l=-11,c=-21,u=-26,d=-33,h=-36,p=-47,g=-52,m=-53,x="JAVA_STACK_ERROR"},41664:(e,t,s)=>{"use strict";s.d(t,{B:()=>r,v:()=>n});const n="OSX",r="WINDOWS"},31360:(e,t,s)=>{"use strict";s.d(t,{$H:()=>A,Af:()=>O,As:()=>x,BC:()=>k,BL:()=>le,Bj:()=>v,CL:()=>r,Cc:()=>C,Ct:()=>de,Ey:()=>X,Gz:()=>p,HT:()=>ue,Hh:()=>j,IA:()=>y,Iu:()=>W,Jf:()=>U,K0:()=>G,KE:()=>ce,M3:()=>Q,O3:()=>F,Oy:()=>oe,Qc:()=>se,Qi:()=>f,RH:()=>L,RY:()=>b,Rf:()=>H,VM:()=>S,Vt:()=>Z,XD:()=>J,Xu:()=>a,Y4:()=>w,YY:()=>q,Yo:()=>V,bb:()=>R,bk:()=>c,cs:()=>l,d3:()=>_,eB:()=>u,f0:()=>n,fA:()=>N,gN:()=>m,i0:()=>T,jV:()=>d,jW:()=>he,jb:()=>K,jz:()=>I,kU:()=>o,mB:()=>ee,mi:()=>Y,n2:()=>g,nv:()=>P,oH:()=>$,of:()=>ne,rs:()=>re,sb:()=>ie,sw:()=>E,t0:()=>D,wW:()=>te,wY:()=>pe,wi:()=>i,wn:()=>h,xX:()=>ae,xi:()=>z,y1:()=>B,zX:()=>M});const n="UNMATCHED_PARENTHESIS",r="INCOMPLETE_GROUP",a="INVALID_CONDITION",i="DUPLICATE_SUBPATTERN_NAME",o="BAD_SUBPATTERN_NAME",l="TOO_MANY_ALTERNATIVES",c="TOO_LONG_SUBPATTERN_NAME",u="LOOKBEHIND_VARIABLE_WIDTH",d="TOKEN_NOT_ALLOWED_IN_LOOKBEHIND",h="DUPLICATE_SUBPATTERN_BAD_INDEX",p="INVALID_HYPHEN_INLINE_MODIFIERS",g="TOO_MANY_NESTED_GROUPS",m="UNKNOWN_VERB",x="VERB_NOT_AT_START",f="VERB_NAME_TOO_LONG",v="INVALID_REFERENCE",b="NOT_QUANTIFIABLE",j="QUANTIFIER_OUT_OF_ORDER",C="QUANTIFIER_LOOKBEHIND_DISALLOWED",Z="QUANTIFIER_TOO_LARGE",y="LONE_BRACKET",E="INCOMPLETE_CHARCLASS",T="CHARCLASS_RANGE_OUT_OF_ORDER",k="INVALID_CHARCLASS_RANGE_META",N="POSIX_OUTSIDE_CHARCLASS",S="UNKNOWN_POSIX_CLASS",_="INVALID_CHARCLASS_RANGE_PCRE_BUG",w="CHARCLASS_RANGE_INVALID",A="INVALID_POSIX_WORD_BOUNDARY",O="BAD_CHARCLASS_RANGE_SURROGATES",I="INVALID_CHARCLASS_INTERSECTION",R="INVALID_CHARCLASS_SUBTRACTION",P="INVALID_CHARCLASS_SYMMETRIC_DIFFERENCE",L="UNSUPPORTED_ESCAPE_SEQUENCE",M="TRAILING_BACKSLASH",D="UNESCAPED_DELIMITER",U="TOO_LARGE_NUMBER",F="NULL_BYTE_NOT_ALLOWED",G="INVALID_UNICODE_ESCAPE",V="INCOMPLETE_HEX_TOKEN",B="HEX_VALUE_TOO_LARGE",$="HEX_SURROGATES",H="OCTAL_VALUE_TOO_LARGE",q="INCOMPLETE_TOKEN",z="UNKNOWN_UNICODE_SCRIPT",W="INVALID_CONTROL_CHAR",Y="INVALID_ESCAPE_SEQUENCE",K="BACKSPACE_NOT_SUPPORTED",J="EMPTY_QUOTE",X="LONELY_END_QUOTE_ERROR",Q="PYTHON_INLINE_MODIFIERS_BAD_POS",ee="PYTHON_CONFLICTING_FLAGS_A_U",te="PYTHON_BOGUS_ESCAPE",se="GOLANG_INVALID_ESCAPE_BACKTICK",ne="JS_NOT_ALLOWED_IN_STRICT_MODE",re="UNMATCHED_BRACKET",ae="TOO_MANY_CONDITIONALS",ie="JAVA_BACKREF_PREMATURE_USE",oe="BACKREFERENCE_IN_CHAR_CLASS",le="INVALID_CHAR_RANGE_CLOSE_TOKEN",ce="DOTNET_RANGE_BRACKET",ue="INLINE_MODIFIERS_CONDITIONAL",de="NON_BACKTRACKING_ERROR",he="DUPLICATE_FLAG_DEFINITION",pe="RUST_BROKEN_UNICODE_SCRIPT"},55511:(e,t,s)=>{const n=s(31807),r=s(61348);let a="gmi";n||(a+="syud"),e.exports={[r.PCRE2]:"gmixsuUAJD",[r.PCRE]:"gmixXsuUAJD",[r.JAVASCRIPT]:a,[r.PYTHON]:"gmixsua",[r.GOLANG]:"gmisU",[r.JAVA]:"gmisxuU",[r.DOTNET]:"gimsnxRN",[r.RUST]:"gmisUx",extendFlags(t,s){e.exports[t]+=s}}},56468:(e,t,s)=>{"use strict";s.d(t,{$U:()=>o,Ao:()=>I,Az:()=>pe,Bi:()=>re,Bx:()=>ge,Cz:()=>ae,ET:()=>de,Eb:()=>x,Gs:()=>W,HI:()=>k,Jy:()=>B,L3:()=>d,MW:()=>n,O3:()=>j,PG:()=>K,Pg:()=>u,Qp:()=>l,RW:()=>p,Tf:()=>f,Ty:()=>z,U6:()=>N,Ud:()=>le,WE:()=>E,Wj:()=>a,Ws:()=>M,XR:()=>A,Xq:()=>ee,Yb:()=>h,Yz:()=>U,ZH:()=>T,_w:()=>b,aM:()=>te,bJ:()=>Z,bO:()=>v,be:()=>_,cF:()=>g,df:()=>F,dz:()=>c,eq:()=>y,fy:()=>J,gg:()=>me,hL:()=>oe,hb:()=>C,hs:()=>r,ix:()=>R,jf:()=>H,jl:()=>w,jt:()=>S,lA:()=>m,no:()=>V,oK:()=>D,py:()=>se,qh:()=>X,qi:()=>P,sS:()=>G,sr:()=>ue,t:()=>$,t0:()=>i,tI:()=>ie,tK:()=>he,ul:()=>ce,up:()=>Y,vU:()=>q,w_:()=>ne,xT:()=>L,zB:()=>O,zl:()=>Q});const n="META",r="ALTERNATOR",a="QUANTIFIER",i="ESCAPED_LITERAL",o="QUOTED_LITERALS",l="LONELY_END_QUOTE",c="UNICODE_PROPERTY",u="OCTAL",d="HEX",h="UNICODE_ESCAPE",p="INLINE_MODIFIERS",g="DELIMITER",m="CONTROL_SEQUENCE",x="GLOBAL_FLAGS",f="VERTICAL_TAB",v="SURROGATE_PAIR",b="SUBPATTERN_REFERENCE_GROUP",j="NAMED_BACKREFERENCE",C="BACKREFERENCE_G",Z="BACKREFERENCE_K",y="SUBPATTERN_REFERENCE_G",E="NUMERIC_BACKREFERENCE",T="BACKSPACE",k="OPEN_CHARCLASS",N="CLOSE_CHARCLASS",S="CHARCLASS_RANGE",_="POSIX",w="EMPTY_CHARCLASS",A="POSIX_WORD_BOUNDARY",O="CHARCLASS_INTERSECTION",I="CHARCLASS_SUBTRACTION",R="CHARCLASS_SYMMETRIC_DIFFERENCE",P="LINE_COMMENT",L="GROUP",M="DEFINE",D="CONDITIONAL",U="CONDITIONAL_CONDITION",F="MODIFIER_GROUP",G="NAMED_GROUP",V="BRANCH_RESET_GROUP",B="ATOMIC_GROUP",$="CAPTURING_GROUP",H="GROUP_COMMENT",q="VERB",z="NEGATIVE_LOOKBEHIND",W="POSITIVE_LOOKBEHIND",Y="NEGATIVE_LOOKAHEAD",K="POSITIVE_LOOKAHEAD",J="NON_ATOMIC_POSITIVE_LOOKAHEAD",X="NON_ATOMIC_POSITIVE_LOOKBEHIND",Q="PLAIN_TEXT",ee="ERROR_TOKEN",te="START_CASE_MODIFIER",se="END_CASE_MODIFIER",ne="SUBST_CONDITIONAL",re="INSERT_SUBST_MARK",ae="INSERT_PRECEDES_MATCH",ie="INSERT_FOLLOWS_MATCH",oe="INSERT_FULL_MATCH",le="INSERT_INPUT_STRING",ce="INSERT_LAST_GROUP",ue="NAMED_BALANCING_GROUP",de="BALANCING_GROUP";function he(e){return e===L||e===M||e===D||e===F||e===G||e===V||e===B||e===$||e===ue||e===de||e===ne||pe(e)}function pe(e){return e===z||e===W||e===Y||e===K||e===J||e===X}function ge(e){return e===k||e===r||he(e)}function me(e){return e===R||e===O||e===I}},2636:e=>{e.exports={GOOGLE:"google",TWITTER:"twitter",GITHUB:"github"}},14112:(e,t,s)=>{"use strict";s.d(t,{B7:()=>a,Py:()=>r,rp:()=>n});const n="light",r="dark",a="AUTO"},96881:e=>{e.exports={MINE:"mine",FAVORITES:"favorites",LIBRARY:"library"}},3641:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var n=s(45987),r=s(67294),a=s(45697),i=s.n(a),o=s(94184),l=s.n(o),c=s(85893);const u=["children","className"],d=(0,r.forwardRef)(((e,t)=>{let s=e.children,r=e.className,a=(0,n.Z)(e,u);return(0,c.jsx)("div",Object.assign(Object.assign({className:l()("ueGQi",r),ref:t},a),{},{children:s}))}));d.propTypes={children:i().node,className:i().string};const h=d},79615:(e,t,s)=>{"use strict";s.d(t,{Hz:()=>l,m4:()=>i,rP:()=>o});var n=s(10084),r=s(40378),a=s(26086);function i(e,t,s){const i=s.regexDeleteCode,o=s.versionDeleteCode,l=r.Z.get(a.DELETE_CODES)||[],c=l.find((t=>t.permalinkFragment===e)),u={permalinkFragment:e,deleteCode:i||(null==c?void 0:c.deleteCode)||null,versions:(null==c?void 0:c.versions)||[]};if(null!=t&&o&&u.versions.push({version:t,deleteCode:o}),null!=c){const e=l.indexOf(c);l[e]=u}else l.push(u);r.Z.save(a.DELETE_CODES,l),n.Z.info(`Saved new delete code for permalink fragment '${e}' and version ${t}`)}function o(e,t){try{const i=r.Z.get(a.DELETE_CODES,!1)||[],o=i.find((t=>t.permalinkFragment===e));if(null!=o){const l=i.indexOf(o);var s;return null==t?i.splice(l,1):i[l]=Object.assign(Object.assign({},i[l]),{},{versions:(null==(s=i[l].versions)?void 0:s.filter((e=>e.version!==t)))||[]}),n.Z.info(`Removed delete code for ${null!=t?`version ${t} of `:""}permalink fragment '${e}'`),r.Z.save(a.DELETE_CODES,i,!1)}throw new Error}catch(s){n.Z.warn(`Unable to remove delete code for permalink fragment '${e}' and version ${t}`,s)}}function l(e){try{const s=(r.Z.get(a.DELETE_CODES,!1)||[]).find((t=>t.permalinkFragment===e));if(null!=s){var t;const r=s.deleteCode;if(null!=r||(null==(t=s.versions)?void 0:t.length)>0)return n.Z.info(`Retrieved delete code for permalink fragment '${e}'`),{deleteCode:r,versions:s.versions||[]}}n.Z.warn(`Unable to get delete code for permalink fragment '${e}'`)}catch(t){n.Z.error(`Unable to get delete code for permalink fragment '${e}'`,t)}return null}},25613:(e,t,s)=>{"use strict";s.d(t,{i:()=>r,t:()=>n});const n=/^\\u[dD](?:[89]|[ABab])[\dA-Fa-f]{2}\\u[dD][C-Fc-f][\dA-Fa-f]{2}/,r=/^\\(?:[WwDdSsVvHhaefntrXBbRKCGAZzQEckgPpuLlUo]|N(?:{\w*}?)?)/},99506:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>G,FY:()=>F});var n=s(75573),r=s(56468),a=s(4779),i=s(64475);const o=e=>{const t=(0,a.ZP)(e,r.jl);return t.quantifiable=!0,t.length=1,(0,a.A_)(t,i.Z.charClass),t};var l=s(1974),c=s(7656),u=s(69678),d=s(9961),h=s(32428);const p=(e,t)=>{const s=(0,h.Z)(e,r.WE),n=t.replace(/\D/g,"");return s.reference=parseInt(n,10),(0,a.A_)(s,i.Z.backreference),s};var g=s(29856);const m=(e,t,s)=>{const n=s.indexOf(e),o=s[n+1];if(e.string.length<4&&(null==o?void 0:o.type)===r.zl&&!isNaN(null==o?void 0:o.string))return!1;const l=parseInt(e.string.slice(1),10);return l>0&&t.captureGroupCount>=l&&(e.type=r.WE,e.length=1,e.quantifiable=!0,e.reference=l,(0,a.A_)(e,i.Z.backreference)),!1},x=(e,t)=>{const s=(0,g.Z)(e,t);return e.inCharClass||(0,a.kV)(s,m),s};var f=s(92250),v=s(43453),b=s(62170),j=s(40916),C=s(92572),Z=s(38676),y=s(57093),E=s(91435),T=s(1274),k=s(31360),N=s(26850);const S=(e,t)=>{const s=(0,N.Z)(e,t);return("\\x"===t||e.isSubstitution&&!/^\\x..$/.test(t))&&(0,a.sT)(s,k.YY),s};var _=s(78347),w=s(98529),A=s(89570),O=s(79075),I=s(60438),R=s(750),P=s(90256);const L=e=>{const t=(0,a.ZP)(e,r.zl);return(0,a.sT)(t,k.IA),t};var M=s(27428),D=s(25613),U=s(68165);const F=(e,t,s)=>{if("\\"===t&&s.unicodeEnabled&&e.match(D.t))return T.Z},G=[(e,t,s)=>{if(!s.inCharClass&&"["===t&&e.match(/^\[\^?/))return e.eat("]")?o:l.Z},U.q1,(e,t,s)=>{if(s.inCharClass&&e.eat("-"))return c.ZP},(e,t,s)=>{if(s.unicodeEnabled&&"\\"===t)return!s.inCharClass&&e.match(/^\\[1-9]\d*/)?u.Z:e.match(/^\\0\d*/)?d.Z:void 0;let n;if("\\"===t&&(n=e.match(/^\\(\d{1,3})/))){const t=parseInt(n[1],10);if(!s.inCharClass&&t>0&&t<=s.captureGroupCount)return p;const r=n[1].match(/^(?:[0-3][0-7]{1,2}|[0-7]{1,2})/);let a=0;return r?(a=n[1].length-r[0].length,a>0&&e.backUp(a),x):(n[0].length>2&&e.backUp(n[0].length-2),f.Z)}},(e,t,s)=>{if(M.SC.namedGroup&&"\\"===t&&!s.inCharClass&&e.match(/^\\k(?:<\w+>)?/))return R.Z},(e,t,s)=>{if(!s.inCharClass&&"("===t){const t=new RegExp(`^\\((?:\\?(?:${M.SC.namedGroup?"<\\w+>|":""}[=!:]${M.SC.lookbehind?"|<[=!]":""}))?`),s=e.match(t);if(null!=s){const e=s[0].replace(/\w+/g,"");if("("===s[0])return _.Z;if("(?:"===s[0])return w.Z;if("(?="===e)return A.bO;if("(?!"===e)return A.y3;if("(?<>"===e)return O.Z;if(M.SC.lookbehind&&"(?<="===e)return I.nc;if(M.SC.lookbehind&&"(?<!"===e)return I.lw;n.O7(new Error(`Unknown group structure '${e}'`))}}},U.fF,U.MH,U.is,(e,t,s)=>{if("\\"===t){const t=s.unicodeEnabled?/^\\x(?:[0-9A-Fa-f]{2})?/:/^\\x[0-9A-Fa-f]{2}/;if(e.match(t))return S}},F,(e,t,s)=>{if("\\"===t){const t=s.unicodeEnabled?/^\\u(?:[0-9A-Fa-f]{4}|{[^}]*}?)/:/^\\u[0-9A-Fa-f]{4}/;if(e.match(t))return E.Z}},(e,t,s)=>{if(M.SC.unicodeProperty&&"\\"===t&&s.unicodeEnabled&&e.match(/^\\[pP](?:{[\w=]+}?)?/))return y.Z},(e,t,s)=>{if("\\"===t){if(e.match(/^\\c./)||s.unicodeEnabled&&e.match(/^\\c/))return Z.Z;if(e.match(/^\\(?=c)/))return C.Z}},U.Nk,(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\[WwDdSsvfntrBb]/)))return"\\v"===n[0]?j.Z:s.inCharClass?"\\b"===n[0]?b.Z:/^\\[trnfaedDsSwW]/.test(n[0])?v.Z:f.Z:v.Z},(0,U.eb)(f.Z),U.k_,(e,t,s)=>{if(!s.inCharClass&&e.eat(s.delimiter))return P.Z},(e,t,s)=>{if(!s.inCharClass&&s.unicodeEnabled&&"]{}".includes(t))return e.next(),L},U.NY]},62738:(e,t,s)=>{"use strict";s.d(t,{Z:()=>A,K:()=>w});var n=s(75573),r=s(750),a=s(29856),i=s(31360),o=s(69678),l=s(4779);const c=(e,t)=>{const s=(0,o.Z)(e,t);return e.inCharClass&&(0,l.sT)(s,i.wW),s};var u=s(52111);const d=(e,t,s)=>{const n=(0,u.Z)(e,t);return 0!==s.start?(0,l.sT)(n,i.M3):n.flags.includes("u")&&n.flags.includes("a")&&(0,l.sT)(n,i.mB),n};var h=s(78347),p=s(98529),g=s(79075),m=s(38325),x=s(89570),f=s(60438),v=s(16835);const b=(e,t,s)=>{const n=e.condition;return t.captureGroupMap[n]||(0,l.sT)(e,i.Bj),e.reference=isNaN(n)?n:parseInt(n,10),e.error},j=(e,t)=>{const s=(0,v.Z)(e,t);return s.condition||(0,l.sT)(s,i.CL),(0,l.kV)(s,b),s.backreference=!0,s};var C=s(24474),Z=s(26850);const y=(e,t)=>{const s=(0,Z.Z)(e,t);return"\\x"===t&&(0,l.sT)(s,i.YY),s};var E=s(80430),T=s(40916),k=s(62170),N=s(43453),S=s(51836),_=s(68165);const w=(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:[0-9A-Fa-f]{2})?/))return y},A=[_.iT,_.q1,_.VI,(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?P=\w+\)/))return r.Z},(0,_.UB)(2147483639),(e,t,s)=>{if("\\"===t&&(e.match(/^\\(?:0[0-7]?[0-7]?|[0-3][0-7]{2})/)||s.inCharClass&&e.match(/^\\[0-7][0-7]{0,2}/)))return a.Z},(e,t,s)=>{if("\\"===t&&e.match(/^\\\d{1,2}/))return c},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[imsuax-]*\)/))return d},_.mw,(e,t,s)=>{let r;if(!s.inCharClass&&"("===t&&(r=e.match(/^\((?:\?(?:<[!=]|[!=]|:|P<\w+>)?)?/))){const t=r[0].replace(/\w+/g,"");if("("===r[0])return h.Z;if("(?:"===r[0])return p.Z;if("(?<>"===t)return g.Z;if(/^\(\?[imsuax-]+:/.test(r[0]))return m.Z;if("(?="===t)return x.bO;if("(?!"===t)return x.y3;if("(?<="===t)return f.nc;if("(?<!"===t)return f.lw;if("(?"===t)return e.match(/^\(\w+\)/),j;n.O7(new Error(`Unknown group structure '${t}'`))}},_.fF,_.MH,(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{(?:\d+,?\d*|,\d+)})/))return C.Z},w,(e,t,s)=>{if("\\"===t&&e.match(/^\\(?:u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|[uU])/))return E.Z},_.Nk,(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\[WwDdSsvaefntrBbAZ]/)))return"\\v"===n[0]?T.Z:s.inCharClass?"\\b"===n[0]?k.Z:/^\\[trnfaedDsSvwW]/.test(n[0])?N.Z:S.Z:N.Z},(0,_.eb)(),_.tP,_.k_,_.sN,_.NY]},68165:(e,t,s)=>{"use strict";s.d(t,{eb:()=>L,UB:()=>M,MH:()=>N,VI:()=>F,q1:()=>U,fF:()=>k,tP:()=>_,oY:()=>P,_3:()=>V,mw:()=>w,Nk:()=>R,iT:()=>D,NY:()=>I,is:()=>S,k_:()=>A,sN:()=>O,fR:()=>G});var n=s(56468),r=s(41061),a=s(68072),i=s(18346);const o=e=>{const t=(0,i.Z)(e);return e.alternatives++,e.parents.push(t),t.alternativeNumber=e.alternatives,t};var l=s(82542),c=s(70520),u=s(4779),d=s(64475);const h=(e,t)=>{const s=e.previousToken,r=(0,u.ZP)(e,n.jf);return e.previousToken=s,r.comment=t.slice(3,-1),(0,u.A_)(r,d.Z.comment),r};var p=s(11497),g=s(90256),m=s(92572),x=s(43453),f=s(42066),v=s(51836),b=s(64610),j=s(1974);const C=e=>{const t=(0,u.ZP)(e,n.U6),s=t.parent;return e.charClasses.pop(),e.parents.pop(),e.inCharClass=0!==e.charClasses.length,t.openCharClass=s,s.closeCharClass=t,t.quantifiable=!0,t.length=1,(0,u.Cv)(s,t),(0,u.A_)(t,d.Z.charClass),t};var Z=s(7656),y=s(91435),E=s(25035);const T=e=>{const t=(0,E.Z)(e,n.zB);return t.parent.charClassIntersection=!0,t},k=(e,t,s)=>{if(!s.inCharClass&&e.eat(")"))return r.Z},N=(e,t,s)=>{if(!s.inCharClass&&e.eat("|"))return s.groups.length>0?a.Z:o},S=(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{\d+,?\d*})/))return l.Z},_=(e,t,s)=>{if(!s.inCharClass&&"#"===t&&s.flags.includes("x")&&"#"!==s.delimiter&&e.match(/^#.*/))return c.Z},w=(e,t,s)=>{if(!s.inCharClass&&"#"!==s.delimiter&&"("===t&&e.match(/^\(\?#[^)]*\)/))return h},A=(e,t,s)=>{if("\\"===t)return e.next(),p.Z},O=(e,t,s)=>{if(e.matchString(s.delimiter))return g.Z},I=(e,t,s)=>(e.next(),m.Z),R=(e,t,s)=>{if(!s.inCharClass&&e.match(/^[$^.]/))return x.Z},P=(e,t,s)=>{if("\\"===t&&e.match(/^\\c.?/))return f.Z},L=(e=v.Z)=>(t,s,n)=>{if("\\"===s&&t.position+1<=t.stringLength){const s=t.position;return t.next(),t.next(),t.position===s+1?(t.backUp(1),null):e}},M=e=>(t,s,n)=>{let r;if("\\"===s&&(r=t.match(/^\\\d+/))){if(parseInt(r[0].slice(1),10)>e)return b.Z;t.backUp(r[0].length)}},D=(e,t,s)=>{if(!s.inCharClass&&"["===t&&e.match(/^\[\^?/))return j.Z},U=(e,t,s)=>{if(s.inCharClass&&e.eat("]"))return s.previousToken.type===n.HI?m.Z:C},F=(e,t,s)=>{if(s.inCharClass&&e.eat("-"))return Z.ZP},G=(e,t,s)=>{if("\\"===t&&e.match(/^\\u[0-9A-Fa-f]{4}/))return y.Z},V=(e,t,s)=>{if(s.inCharClass&&e.matchString("&&"))return T}},30317:(e,t,s)=>{"use strict";s.d(t,{Z:()=>_t});var n=s(42568),r=s.n(n),a=s(99221),i=s(79090),o=s(61348),l=s.n(o),c=s(27428),u=s(29856),d=s(31360),h=s(4779),p=s(51836);const g=(e,t)=>{const s=e.flags,n=e.flavor,r=(0,p.Z)(e,t);return(n===l().PCRE2||s.includes("X"))&&/^\\[a-z]/i.test(t)&&(0,h.sT)(r,d.mi),"\0"===t.slice(1)&&(0,h.sT)(r,d.O3),r};var m=s(52111),x=s(42066),f=s(69678),v=s(91435),b=s(75573),j=s(56468);const C=e=>{const t=(0,h.ZP)(e,j.Qp);return(0,h.sT)(t,d.Ey),t};var Z=s(64475);const y=(e,t)=>{const s=(0,h.ZP)(e,j.$U);return"\\Q\\E"===t&&(0,h.sT)(s,d.XD),s.error||(s.startCharCode=t.charCodeAt(2),s.startCodePoint=t.codePointAt(2),s.endCharCode=t.charCodeAt(t.length-3),s.endCodePoint=t.codePointAt(t.length-3)),s.length=t.length-4,(0,h.A_)(s,Z.Z.quote),s},E=e=>{const t=(0,h.ZP)(e,j.XR);return t.quantifiable=!1,t.length=0,(0,h.A_)(t,Z.Z.charClass),t},T=/^(?:alnum|ascii|alpha|word|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit)$/,k=(e,t)=>{const s=e.flavor,n=e.inCharClass,r=(0,h.ZP)(e,j.be),a=s===l().PCRE||s===l().PCRE2,i=t.replace(/^\[:\^?|:\]$/g,"");return n?a&&/^[<>]$/.test(i)?(0,h.sT)(r,d.$H):T.test(i)||(0,h.sT)(r,d.VM):(0,h.sT)(r,d.fA),r.posixClass=i,(0,h.A_)(r,Z.Z.meta),r};var N=s(99309),S=s(7656);const _=(e,t,s)=>{const n=e.rightToken;return(null==n?void 0:n.type)===j.t0&&/^\\[a-z]/i.test(n.string)&&(0,h.sT)(e,d.d3),e.error},w=e=>{const t=(0,S.ZP)(e);return(0,h.U3)(t,_),t};var A=s(32428);const O=(e,t,s)=>{const n=e.string,r=e.reference,a=e.captureGroupCount;if("(?0)"===n||"(?R)"===n)return e.reference=null,!1;const i=r.charAt(0);let o;if("+"===i){const s=parseInt(r.slice(1),10);o=a+s,(0===s||a+s>t.captureGroupCount)&&(0,h.sT)(e,d.Bj)}else if("-"===i){const t=parseInt(r.slice(1),10);o=a-t+1,(0===t||a-t<0)&&(0,h.sT)(e,d.Bj)}else isNaN(r)||"&"===n.charAt(2)||"(?P>"===n.slice(0,4)?t.subpatterns.includes(r)||(0,h.sT)(e,d.Bj):(o=parseInt(r,10),t.captureGroupCount<o&&(0,h.sT)(e,d.Bj));return e.reference=o||r,e.error},I=(e,t)=>{const s=(0,A.Z)(e,j._w),n=t.replace(/^(?:\\g|\(\?P>)|[^\w\-+]/g,"");return n||(0,h.sT)(s,d.YY),s.reference=n,s.captureGroupCount=e.captureGroupCount,(0,h.kV)(s,O),(0,h.A_)(s,Z.Z.subpattern_reference),s};var R=s(750),P=s(98152);const L=/^(?:ACCEPT(?::[^)]*)?|F(?:AIL)?|COMMIT|PRUNE(?::[^)]*)?|SKIP(?::[^)]*)?|(?:MARK)?:[^)]+|THEN(?::[^)]*)?)$/,M=/^(?:LIMIT_MATCH=\d{1,9}|LIMIT_RECURSION=\d{1,9}|NO_AUTO_POSSESS|NO_START_OPT|CR|LF|CRLF|ANYCRLF|ANY|BSR_ANYCRLF|BSR_UNICODE|UTF(?:16)?|UCP)$/,D=/^(?:LIMIT_DEPTH=\d{1,9}|LIMIT_HEAP=\d{1,9}|NOTEMPTY|NOTEMPTY_ATSTART|NO_DOTSTAR_ANCHOR|NUL|NO_JIT)$/,U=(e,t,s)=>{const n=e.adjacentToken,r=(0,h.ZP)(e,j.vU),a=t.slice(2,-1),i=e.flavor===l().PCRE2,o=M.test(a)||i&&D.test(a);o||L.test(a)?!o||0===s.start||(null==n?void 0:n.type)===j.vU&&null==n.error&&n.isStartVerb||(0,h.sT)(r,d.As):(0,h.sT)(r,d.gN);const c=a.split(/[=:]/),u=(0,P.Z)(c,2),p=u[0],g=u[1];return null!=g&&g.length>65535&&(0,h.sT)(r,d.Qi),"CR"===a?e.lineTerminators=["\\r"]:"LF"===a?e.lineTerminators=["\\n"]:"CRLF"===a?e.lineTerminators=["\\r\\n"]:"ANYCRLF"===a?e.lineTerminators=["\\n","\\r","\\r\\n"]:"ANY"===a&&(e.lineTerminators=["\\n","\\r","\\r\\n","\\f","\\v","\\x85","\\u2028","\\u2029"]),r.error||"UCP"!==a||(e.unicodeEnabled=!0,e.ucpVerb=!0),a.startsWith("UTF")&&(e.unicodeEnabled=!0),r.isStartVerb=o,r.quantifiable=i&&"ACCEPT"===a,r.verb=a,r.verbType=p||"MARK",r.verbDetail=g,(0,h.A_)(r,Z.Z.verb),r};var F=s(24474),G=s(81669),V=s(62170),B=s(43453),$=s(98529),H=s(78347),q=s(48401);const z=e=>{const t=(0,q.Z)(e,j.Jy);return e.flavor===l().DOTNET&&e.flags.includes("N")&&(0,h.sT)(t,d.Ct),t.willBeQuantifiable=!0,t};var W=s(43406),Y=s(79075),K=s(38325),J=s(89570),X=s(60438);const Q=e=>{const t=(0,q.Z)(e,j.Ws);return e.inDEFINE=!0,t};var ee=s(16835);const te=(e,t)=>{const s=e.condition,n=e.closeGroup,r=e.captureGroupCount,a=t.captureGroupCount,i=t.subpatterns;if(!s||!n)return(0,h.sT)(e,d.CL),!0;if("string"!=typeof s)return!1;let o=!1,l=!1,c=null;if(/^R?\d+$/.test(s))c=parseInt(s.replace(/\D/g,""),10),c>a&&(0,h.sT)(e,d.Bj),"R"===s.charAt(0)?o=!0:(l=!0,0===c&&(0,h.sT)(e,d.Bj));else if("R"!==s||i.includes("R")){if(/^(?:<\w+>|'\w+'|\w+)$/.test(s))l=!0,c=s.replace(/\W/g,""),i.includes(c)||(0,h.sT)(e,d.Bj);else if(/^R&/.test(s))c=s.slice(2),o=!0,i.includes(c)||(0,h.sT)(e,d.Bj);else if(s.includes("+")){const t=parseInt(s.slice(1),10);c=r+t,l=!0,(0===t||c>a)&&(0,h.sT)(e,d.Bj)}else if(s.includes("-")){const t=parseInt(s.slice(1),10);c=r-t+1,l=!0,(0===t||c<1)&&(0,h.sT)(e,d.Bj)}}else c=null,o=!0;return e.subroutine=o,e.backreference=l,e.reference=c,e.error},se=(e,t)=>{const s=(0,ee.Z)(e,t);return(0,h.kV)(s,te),s};var ne=s(29215);const re=["Arabic","Armenian","Avestan","Balinese","Bamum","Bassa_Vah","Batak","Bengali","Bopomofo","Brahmi","Braille","Buginese","Buhid","Canadian_Aboriginal","Car-ian","Caucasian_Albanian","Chakma","Cham","Cherokee","Common","Coptic","Cunei-form","Cypriot","Cyrillic","Deseret","Devanagari","Duployan","Egyptian_Hiero-glyphs","Elbasan","Ethiopic","Georgian","Glagolitic","Gothic","Grantha","Greek","Gujarati","Gurmukhi","Han","Hangul","Hanunoo","Hebrew","Hiragana","Imperial_Aramaic","Inherited","Inscriptional_Pahlavi","Inscrip-tional_Parthian","Javanese","Kaithi","Kannada","Katakana","Kayah_Li","Kharoshthi","Khmer","Khojki","Khudawadi","Lao","Latin","Lepcha","Limbu","Lin-ear_A","Linear_B","Lisu","Lycian","Lydian","Mahajani","Malayalam","Mandaic","Manichaean","Meetei_Mayek","Mende_Kikakui","Meroitic_Cursive","Meroitic_Hieroglyphs","Miao","Modi","Mongolian","Mro","Myanmar","Nabataean","New_Tai_Lue","Nko","Ogham","Ol_Chiki","Old_Italic","Old_North_Arabian","Old_Permic","Old_Persian","Old_South_Arabian","Old_Turkic","Oriya","Osmanya","Pahawh_Hmong","Palmyrene","Pau_Cin_Hau","Phags_Pa","Phoenician","Psalter_Pahlavi","Rejang","Runic","Samaritan","Saurashtra","Sharada","Sha-vian","Siddham","Sinhala","Sora_Sompeng","Sundanese","Syloti_Nagri","Syriac","Tagalog","Tagbanwa","Tai_Le","Tai_Tham","Tai_Viet","Takri","Tamil","Telugu","Thaana","Thai","Tibetan","Tifinagh","Tirhuta","Ugaritic","Vai","Warang_Citi","Yi","C","Cc","Cf","Cn","Co","Cs","L","Ll","Lm","Lo","Lt","Lu","L&","M","Mc","Me","Mn","N","Nd","Nl","No","P","Pc","Pd","Pe","Pf","Pi","Po","Ps","S","Sc","Sk","Sm","So","Z","Zl","Zp","Zs"],ae=(e,t)=>{const s=(0,ne.Z)(e,t);return re.includes(s.script)||(0,h.sT)(s,d.xi),s};var ie=s(25613),oe=s(68165);const le=(e,t,s)=>{if("\\"===t&&e.matchString("\\E"))return C},ce=(e,t,s)=>{if("\\"===t&&e.match(/^\\Q(?:(?!\\E)[\s\S])*(?:\\E)?/))return y},ue=(e,t,s)=>{if("["===t&&!s.inCharClass&&e.match(/^\[\[:[<>]:]]/))return E},de=(e,t,s)=>{if("["===t&&e.match(/^\[:(?:(?!\[:[a-z]+:])(?:\\[\s\S]|[^\\\]]))*?\\?:]/))return k},he=(e,t,s)=>{if("["===t&&e.match(/^\[([.=])(?:\\[\s\S]|[^\]\\])*?\\?\1]/))return N.Z},pe=(e,t,s)=>{var n;if("-"===t&&s.inCharClass&&(null==(n=s.previousToken)||!n.partOfRange)&&null!=(0,S.oA)(s.previousToken,"end")&&e.eat("-"))return w},ge=(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?(?:[0R]|[+-]?[1-9]+\d*|P>\w+|&\w+)\)/))return I},me=(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?P=\w+\)/))return R.Z},xe=(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\*(?:[A-Z\d_]+(?:=\d+|:[^)]*)?|:[^)]+)\)/))return U},fe=(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?C\d*\)/))return N.Z},ve=(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{\d+,?\d*})/))return F.Z},be=(e,t,s)=>{if("\\"===t&&e.match(/^\\[pP]([CLMNPSZ]|{\^?(?:L&|\w+)}?)?/))return ae},je=(e,t,s)=>{if(!s.inCharClass&&"\\"===t&&e.match(/^(?:\\g{\w+}|\\k(?:'\w+'|<\w+>|{\w+})?)/))return R.Z},Ce=(e,t,s)=>{if(!s.inCharClass&&"\\"===t&&e.match(/^\\g(?:<\w+>|'\w+'|'[+-]\d+'|<[+-]\d+>)?/))return I},Ze=(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:{[0-9A-Fa-f]*}?|[0-9A-Fa-f]{0,2})/))return G.Z},ye=(e,t,s)=>{if("\\"===t&&e.match(/^\\o(?:{([0-7]+)}?)?/))return u._},Ee=(e,t,s)=>{let n;if("\\"===t&&(n=e.match(ie.i)))return/^\\[lu]/i.test(n[0])||"\\N"===n[0].slice(0,2)&&(n[0].length>2||s.inCharClass)?N.Z:s.inCharClass?"\\b"===n[0]?V.Z:/^\\[trnfaedDhHpPsSvVwWN]/.test(n[0])?B.Z:g:B.Z},Te=e=>(t,s,n)=>{let r;if(!n.inCharClass&&"("===s&&(r=t.match(e))){const e=r[0],s=e.replace(/\w+/g,"");if("("===e)return n.flags.includes("n")?$.Z:H.Z;if("(?:"===e)return $.Z;if("(?>"===e)return z;if("(?|"===e)return W.ZP;if("(?<>"===s||"(?''"===s)return Y.Z;if(/^\(\?[\^a-z-]+:/i.test(e))return K.Z;if("(?="===s||"(*pla:"===e||"(*positive_lookahead:"===e)return J.bO;if("(?!"===s||"(*nla:"===e||"(*negative_lookahead:"===e)return J.y3;if("(?<="===s||"(*plb:"===e||"(*positive_lookbehind:"===e)return X.nc;if("(?<!"===s||"(*nlb:"===e||"(*negative_lookbehind:"===e)return X.lw;if("(?*"===s||"(*napla:"===e||"(*non_atomic_positive_lookahead:"===e)return J.T0;if("(?<*"===s||"(*naplb:"===e||"(*non_atomic_positive_lookbehind:"===e)return X.fy;if("(?"===s){const e=t.match(/^\((?:R(?:&\w+)?|R?\d+|[+-]?\d+|\w+|'\w+'|<\w+>)\)/);return"(DEFINE)"!==(null==e?void 0:e[0])||n.subpatterns.includes("DEFINE")?(n.expectingCondition=!e&&!!t.match(/^\((?:\?<?[=!]|\*(?:[pn]l[ab]|(?:positive|negative)_lookahead|(?:positive|negative)_lookbehind):)/,!1),se):Q}b.O7(new Error(`Unknown group structure '${s}'`))}},ke=[le,ce,he,ue,de,oe.iT,oe.q1,pe,ge,me,(0,oe.UB)(2147483639),(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\(\d{1,3})/))){const t=parseInt(n[1],10);if(!s.inCharClass&&t>0&&"0"!==n[1].charAt(0)&&(t<10&&1===n[1].length||t<=s.captureGroupCount))return f.Z;const r=n[1].match(/^[0-7]{1,3}/);let a=0;return r?(a=n[1].length-r[0].length,a>0&&e.backUp(a),u.Z):(n[0].length>2&&e.backUp(n[0].length-2),p.Z)}},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[mixXsUJ-]*\)/))return m.Z},xe,oe.mw,fe,Te(/^\((?:\?(?:[mixXsUJ-]*:|[>!=|]|<[=!]|'\w+'|P?<\w+>)?)?/),oe.fF,oe.MH,ve,be,(e,t,s)=>{if(!s.inCharClass&&"\\"===t&&e.match(/^\\g(?:\d+|{-?\d+})/))return f.Z},je,Ce,Ze,ye,oe.oY,oe.Nk,Ee,(0,oe.eb)(g),oe.tP,oe.k_,oe.sN,oe.NY],Ne=[le,ce,he,ue,de,oe.iT,oe.q1,oe.VI,ge,me,(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\(\d{1,3})/))){const t=parseInt(n[1],10);if(!s.inCharClass&&t>0&&"0"!==n[1].charAt(0)){if(t<10&&1===n[1].length||t<=s.captureGroupCount)return f.Z;if(/^\\[89]\d/.test(n[0]))return e.backUp(n[0].length-3),f.Z}const r=n[1].match(/^[0-7]{1,3}/);let a=0;return r?(a=n[1].length-r[0].length,a>0&&e.backUp(a),u.Z):(n[0].length>2&&e.backUp(n[0].length-2),g)}},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?(?:\^[mixsUJn]*|[nmixsUJ-]*)\)/))return m.Z},xe,oe.mw,fe,Te(/^\((?:\?(?:[mixsUJn-]*:|\^[mixsUJn]*:|[>!=|]|<[=!]|'\w+'|P?<\w+>|<?\*)?|\*(?:napl[ab]|[pn]l[ab]|(?:positive|negative)_lookahead|(?:positive|negative)_lookbehind|non_atomic_positive_(?:lookbehind|lookahead)):)?/),oe.fF,oe.MH,ve,be,(e,t,s)=>{if(!s.inCharClass&&"\\"===t&&e.match(/^\\g(?:\d+|{[+-]?\d+})/))return f.Z},je,Ce,Ze,ye,(e,t,s)=>{if("\\"===t&&e.match(/^\\c[\x20-\x7f]?/))return x.Z},oe.Nk,(e,t,s)=>{if("\\"===t&&s.unicodeEnabled&&e.match(/^\\N{U\+[0-9A-Fa-f]+}/))return v.Z},Ee,(0,oe.eb)(g),oe.tP,oe.k_,oe.sN,oe.NY];var Se=s(99506),_e=s(82542);const we=(e,t)=>{const s=(0,_e.Z)(e,t),n=s.from,r=s.to;return(n>1e3||r!==1/0&&r>1e3)&&(0,h.sT)(s,d.Vt),s},Ae=["Ahom","Anatolian_Hieroglyphs","Arabic","Armenian","Avestan","Balinese","Bamum","Bassa_Vah","Batak","Bengali","Bopomofo","Brahmi","Braille","Buginese","Buhid","Canadian_Aboriginal","Carian","Caucasian_Albanian","Chakma","Cham","Cherokee","Common","Coptic","Cuneiform","Cypriot","Cyrillic","Deseret","Devanagari","Duployan","Egyptian_Hieroglyphs","Elbasan","Ethiopic","Georgian","Glagolitic","Gothic","Grantha","Greek","Gujarati","Gurmukhi","Han","Hangul","Hanunoo","Hatran","Hebrew","Hiragana","Imperial_Aramaic","Inherited","Inscriptional_Pahlavi","Inscriptional_Parthian","Javanese","Kaithi","Kannada","Katakana","Kayah_Li","Kharoshthi","Khmer","Khojki","Khudawadi","Lao","Latin","Lepcha","Limbu","Linear_A","Linear_B","Lisu","Lycian","Lydian","Mahajani","Malayalam","Mandaic","Manichaean","Meetei_Mayek","Mende_Kikakui","Meroitic_Cursive","Meroitic_Hieroglyphs","Miao","Modi","Mongolian","Mro","Multani","Myanmar","Nabataean","New_Tai_Lue","Nko","Ogham","Ol_Chiki","Old_Hungarian","Old_Italic","Old_North_Arabian","Old_Permic","Old_Persian","Old_South_Arabian","Old_Turkic","Oriya","Osmanya","Pahawh_Hmong","Palmyrene","Pau_Cin_Hau","Phags_Pa","Phoenician","Psalter_Pahlavi","Rejang","Runic","Samaritan","Saurashtra","Sharada","Shavian","Siddham","SignWriting","Sinhala","Sora_Sompeng","Sundanese","Syloti_Nagri","Syriac","Tagalog","Tagbanwa","Tai_Le","Tai_Tham","Tai_Viet","Takri","Tamil","Telugu","Thaana","Thai","Tibetan","Tifinagh","Tirhuta","Ugaritic","Vai","Warang_Citi","Yi","C","Cc","Cf","Co","Cs","L","Ll","Lm","Lo","Lt","Lu","M","Mc","Me","Mn","N","Nd","Nl","No","P","Pc","Pd","Pe","Pf","Pi","Po","Ps","S","Sc","Sk","Sm","So","Z","Zl","Zp","Zs"],Oe=(e,t)=>{const s=(0,ne.Z)(e,t);return Ae.includes(s.script)||(0,h.sT)(s,d.xi),s};var Ie=s(26850),Re=s(40916),Pe=s(62284);const Le=(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:[0-9A-Fa-f]{2}|{[0-9A-Fa-f]+}?)/))return Ie.Z},Me=(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\[WwDdSsABbzaftnrv]/)))return"\\v"===n[0]?Re.Z:s.inCharClass?/^\\[trnfaedDsSvwW]/.test(n[0])?B.Z:Pe.Z:B.Z},De=e=>{const t=new RegExp(`^\\((?:\\?(?:[${e}]*(?:-[${e}]+)?:|P<\\w+>))?`);return(e,s,n)=>{let r;if(!n.inCharClass&&"("===s&&(r=e.match(t))){const e=r[0];if("("===e)return H.Z;if("(?:"===e)return $.Z;if(e.startsWith("(?P<"))return Y.Z;if(e.startsWith("(?"))return K.Z;b.O7(new Error(`Unknown group structure '${e}'`))}}},Ue=[ce,oe.iT,oe.q1,(e,t,s)=>{if("["===t&&e.match(/^\[:\^?([^:]*):]/))return k},(e,t,s)=>{if(s.inCharClass&&e.eat("-"))return S.ZP},(e,t,s)=>{if("\\"===t&&e.match(/^\\(?:[1-7][0-7]{1,2}|[0-7]{2,3})/))return u.Z},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[imsU]*(?:-[imsU]+)?\)/))return m.Z},De("imsU"),oe.fF,oe.MH,(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{\d+,?\d*})/))return we},(e,t,s)=>{if("\\"===t&&e.match(/^\\[pP](?:C[cfos]?|L[lmotu]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?|{\^?\w*}?)?/))return Oe},Le,oe.Nk,Me,(0,oe.eb)(Pe.Z),oe.k_,oe.sN,oe.NY];var Fe=s(62738);const Ge=(e,t)=>{const s=(0,u.Z)(e,t);return"\\0"===t&&(0,h.sT)(s,d.mi),s},Ve=(e,t)=>{const s=(0,f.Z)(e,t);return e.inCharClass&&(0,h.sT)(s,d.Oy),s},Be=["LD","Lower","Upper","ASCII","Alpha","Digit","Alnum","Punct","Graph","Print","Blank","Cntrl","XDigit","Space","javaLowerCase","javaUpperCase","javaAlphabetic","javaIdeographic","javaTitleCase","javaDigit","javaDefined","javaLetter","javaLetterOrDigit","javaJavaIdentifierStart","javaJavaIdentifierPart","javaUnicodeIdentifierStart","javaUnicodeIdentifierPart","javaIdentifierIgnorable","javaSpaceChar","javaWhitespace","javaISOControl","javaMirrored","IsAlphabetic","IsIdeographic","IsLetter","IsLowercase","IsUppercase","IsTitlecase","IsPunctuation","IsControl","IsWhite_Space","IsDigit","IsHex_Digit","IsNoncharacter_Code_Point","IsAssigned"],$e=["Mc","Pc","Cc","Sc","Pd","Nd","L","S","Me","Pe","Pf","Cf","Pi","Nl","Zl","Ll","Sm","Lm","Sk","Mn","Lo","No","Po","So","Zp","Co","Zs","Ps","Cs","Lt","Cn","Lu"],He=["Arabic","Armenian","Avestan","Balinese","Bamum","Batak","Bengali","Bopomofo","Brahmi","Braille","Buginese","Buhid","Canadian_Aboriginal","Carian","Cham","Cherokee","Common","Coptic","Cuneiform","Cypriot","Cyrillic","Deseret","Devanagari","Egyptian_Hieroglyphs","Ethiopic","Georgian","Glagolitic","Gothic","Greek","Gujarati","Gurmukhi","Han","Hangul","Hanunoo","Hebrew","Hiragana","Imperial_Aramaic","Inherited","Inscriptional_Pahlavi","Inscriptional_Parthian","Javanese","Kaithi","Kannada","Katakana","Kayah_Li","Kharoshthi","Khmer","Lao","Latin","Lepcha","Limbu","Linear_B","Lisu","Lycian","Lydian","Malayalam","Mandaic","Meetei_Mayek","Mongolian","Myanmar","New_Tai_Lue","Nko","Ogham","Ol_Chiki","Old_Italic","Old_Persian","Old_South_Arabian","Old_Turkic","Oriya","Osmanya","Phags_Pa","Phoenician","Rejang","Runic","Samaritan","Saurashtra","Shavian","Sinhala","Sundanese","Syloti_Nagri","Syriac","Tagalog","Tagbanwa","Tai_Le","Tai_Tham","Tai_Viet","Tamil","Telugu","Thaana","Thai","Tibetan","Tifinagh","Ugaritic","Unknown","Vai","Yi"],qe=["Aegean_Numbers","Alchemical_Symbols","Alphabetic_Presentation_Forms","Ancient_Greek_Musical_Notation","Ancient_Greek_Numbers","Ancient_Symbols","Arabic","Arabic_Presentation_Forms_A","Arabic_Presentation_Forms_B","Arabic_Supplement","Armenian","Arrows","Avestan","Balinese","Bamum","Bamum_Supplement","Basic_Latin","Batak","Bengali","Block_Elements","Bopomofo","Bopomofo_Extended","Box_Drawing","Brahmi","Braille_Patterns","Buginese","Buhid","Byzantine_Musical_Symbols","Carian","Cham","Cherokee","CJK_Compatibility","CJK_Compatibility_Forms","CJK_Compatibility_Ideographs","CJK_Compatibility_Ideographs_Supplement","CJK_Radicals_Supplement","CJK_Strokes","CJK_Symbols_and_Punctuation","CJK_Unified_Ideographs","CJK_Unified_Ideographs_Extension_A","CJK_Unified_Ideographs_Extension_B","CJK_Unified_Ideographs_Extension_C","CJK_Unified_Ideographs_Extension_D","Combining_Diacritical_Marks","Combining_Diacritical_Marks_Supplement","Combining_Half_Marks","Common_Indic_Number_Forms","Control_Pictures","Coptic","Counting_Rod_Numerals","Cuneiform","Cuneiform_Numbers_and_Punctuation","Currency_Symbols","Cypriot_Syllabary","Cyrillic","Cyrillic_Extended_A","Cyrillic_Extended_B","Cyrillic_Supplementary","Deseret","Devanagari","Devanagari_Extended","Dingbats","Domino_Tiles","Egyptian_Hieroglyphs","Emoticons","Enclosed_Alphanumeric_Supplement","Enclosed_Alphanumerics","Enclosed_CJK_Letters_and_Months","Enclosed_Ideographic_Supplement","Ethiopic","Ethiopic_Extended","Ethiopic_Extended_A","Ethiopic_Supplement","General_Punctuation","Geometric_Shapes","Georgian","Georgian_Supplement","Glagolitic","Gothic","Greek_Extended","Gujarati","Gurmukhi","Halfwidth_and_Fullwidth_Forms","Hangul_Compatibility_Jamo","Hangul_Jamo","Hangul_Jamo_Extended_A","Hangul_Jamo_Extended_B","Hangul_Syllables","Hanunoo","Hebrew","High_Private_Use_Surrogates","High_Surrogates","Hiragana","Ideographic_Description_Characters","Imperial_Aramaic","Inscriptional_Pahlavi","Inscriptional_Parthian","IPA_Extensions","Javanese","Kaithi","Kana_Supplement","Kanbun","Kangxi_Radicals","Kannada","Katakana","Katakana_Phonetic_Extensions","Kayah_Li","Kharoshthi","Khmer","Khmer_Symbols","Lao","Latin-1_Supplement","Latin_Extended_A","Latin_Extended_Additional","Latin_Extended_B","Latin_Extended_C","Latin_Extended_D","Lepcha","Letterlike_Symbols","Limbu","Linear_B_Ideograms","Linear_B_Syllabary","Lisu","Low_Surrogates","Lycian","Lydian","Mahjong_Tiles","Malayalam","Mandaic","Mathematical_Alphanumeric_Symbols","Mathematical_Operators","Meetei_Mayek","Miscellaneous_Mathematical_Symbols_A","Miscellaneous_Mathematical_Symbols_B","Miscellaneous_Symbols","Miscellaneous_Symbols_and_Arrows","Miscellaneous_Symbols_And_Pictographs","Miscellaneous_Technical","Modifier_Tone_Letters","Mongolian","Musical_Symbols","Myanmar","Myanmar_Extended_A","New_Tai_Lue","NKo","Number_Forms","Ogham","Ol_Chiki","Old_Italic","Old_Persian","Old_South_Arabian","Old_Turkic","Optical_Character_Recognition","Oriya","Osmanya","Phags-pa","Phaistos_Disc","Phoenician","Phonetic_Extensions","Phonetic_Extensions_Supplement","Playing_Cards","Private_Use_Area","Rejang","Rumi_Numeral_Symbols","Runic","Samaritan","Saurashtra","Shavian","Sinhala","Small_Form_Variants","Spacing_Modifier_Letters","Specials","Sundanese","Superscripts_and_Subscripts","Supplemental_Arrows_A","Supplemental_Arrows_B","Supplemental_Mathematical_Operators","Supplemental_Punctuation","Supplementary_Private_Use_Area_A","Supplementary_Private_Use_Area_B","Syloti_Nagri","Syriac","Tagalog","Tagbanwa","Tags","Tai_Le","Tai_Tham","Tai_Viet","Tai_Xuan_Jing_Symbols","Tamil","Telugu","Thaana","Thai","Tibetan","Tifinagh","Transport_And_Map_Symbols","Ugaritic","Unified_Canadian_Aboriginal_Syllabics","Unified_Canadian_Aboriginal_Syllabics_Extended","Vai","Variation_Selectors","Variation_Selectors_Supplement","Vedic_Extensions","Vertical_Forms","Yi_Radicals","Yi_Syllables","Yijing_Hexagram_Symbols"],ze=(e,t)=>{const s=(0,ne.Z)(e,t),n=s.script.match(/^(?:(\w+)=(\w+)|(I[ns])(\w+)|()(\w+))$/)||[],r=(0,P.Z)(n,7),a=r[1],i=r[2],o=r[3],l=r[4],c=r[5],u=r[6],p=a||o||c,g=i||l||u;let m=!1;return"Is"===p?m=$e.includes(g)||He.includes(g)||Be.includes(p+g):"In"===p||"blk"===p||"block"===p?m=qe.includes(g):"script"===p||"sc"===p?m=He.includes(g):"general_category"===p||"gc"===p?m=$e.includes(g):p||(m=Be.includes(g)||$e.includes(g)),m||(0,h.sT)(s,d.xi),s.category=p,s.script=g,s},We=(e,t)=>{const s=(0,R.Z)(e,t);return e.subpatterns.includes(s.reference)||(0,h.sT)(s,d.sb),s};var Ye=s(1274),Ke=s(95790),Je=s(70520),Xe=s(1974);const Qe=(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{\d+,?\d*}|{)/))return F.Z},et=[ce,(e,t,s)=>{if("["===t&&e.match(/^\[\^?/))return Xe.Z},oe._3,oe.q1,pe,(e,t,s)=>{if("\\"===t&&e.match(/^\\0(?:[0-3]?[0-7]{1,2})?/))return Ge},(e,t,s)=>{if("\\"===t){const t=e.match(/^\\[1-9]\d*/);if(t){let n=parseInt(t[0].slice(1),10);for(;(""+n).length>0&&n>s.captureGroupCount;)n=Math.floor(n/10);return e.backUp(t[0].length-("\\"+n).length),Ve}}},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[misxu-]*\)/))return m.Z},(e,t,s)=>{let n;if(!s.inCharClass&&"("===t&&(n=e.match(/^\((?:\?(?:[misxu-]*:|[>!=]|<[=!]|<[a-zA-Z0-9]+>))?/))){const e=n[0].replace(/\w+/g,"");if("("===n[0])return H.Z;if("(?:"===n[0])return $.Z;if("(?>"===n[0])return z;if("(?="===e)return J.bO;if("(?!"===e)return J.y3;if("(?<>"===e)return Y.Z;if("(?<="===e)return X.nc;if("(?<!"===e)return X.lw;if(/^\(\?[misxu-]+:/.test(n[0]))return K.Z;b.O7(new Error(`Unknown group structure '${e}'`))}},oe.fF,oe.MH,Qe,(e,t,s)=>{if("\\"===t&&e.match(/^\\[Pp]{(?:\w+=)?\w*}?/))return ze},(e,t,s)=>{if(!s.inCharClass&&"\\"===t&&e.match(/^\\k<\w+>/))return We},Le,(e,t,s)=>{if("\\"===t&&e.match(ie.t))return Ye.Z},oe.oY,oe.Nk,(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\[dDsSwWbBAGZztrnfaeRhHvV]/)))return s.inCharClass?/^\\[trnfaedDsSwWhHvV]/.test(n[0])?B.Z:Ke.Z:B.Z},oe.fR,(0,oe.eb)(Ke.Z),(e,t,s)=>{if("#"===t&&s.flags.includes("x")&&e.match(/^#.*/))return Je.Z},oe.k_,oe.sN,oe.NY],tt=e=>{const t=e.parent.children;return t.indexOf(e)!==t.length-3&&(0,h.sT)(e,d.bb),e.error},st=e=>{const t=(0,h.ZP)(e,j.Ao);return t.parent.classModifier=!0,(0,h.kV)(t,tt),(0,h.A_)(t,Z.Z.meta),t},nt=(e,t)=>{const s=e.reference,n=e.string;return null==t.captureGroupMap[s]&&(/^\\[0-7]{2,3}$/.test(n)?(e.type=j.Pg,e.charCode=parseInt(n.slice(1),8)||0):(0,h.sT)(e,d.Bj)),e.error},rt=(e,t)=>{const s=(0,A.Z)(e,j.WE);return s.reference=parseInt(t.slice(1),10),(0,h.kV)(s,nt),(0,h.A_)(s,Z.Z.backreference),s};var at=s(38844);const it=(e,t)=>{const s=(0,_e.Z)(e,t),n=s.from,r=s.to;return(n>2147483647||r!==1/0&&r>2147483647)&&(0,h.sT)(s,d.Vt),s},ot=["IsBasicLatin","IsLatin-1Supplement","IsLatinExtended-A","IsLatinExtended-B","IsIPAExtensions","IsSpacingModifierLetters","IsCombiningDiacriticalMarks","IsGreek","IsGreekandCoptic","IsCyrillic","IsCyrillicSupplement","IsArmenian","IsHebrew","IsArabic","IsSyriac","IsThaana","IsDevanagari","IsBengali","IsGurmukhi","IsGujarati","IsOriya","IsTamil","IsTelugu","IsKannada","IsMalayalam","IsSinhala","IsThai","IsLao","IsTibetan","IsMyanmar","IsGeorgian","IsHangulJamo","IsEthiopic","IsCherokee","IsUnifiedCanadianAboriginalSyllabics","IsOgham","IsRunic","IsTagalog","IsHanunoo","IsBuhid","IsTagbanwa","IsKhmer","IsMongolian","IsLimbu","IsTaiLe","IsKhmerSymbols","IsPhoneticExtensions","IsLatinExtendedAdditional","IsGreekExtended","IsGeneralPunctuation","IsSuperscriptsandSubscripts","IsCurrencySymbols","IsCombiningDiacriticalMarksforSymbols","IsCombiningMarksforSymbols","IsLetterlikeSymbols","IsNumberForms","IsArrows","IsMathematicalOperators","IsMiscellaneousTechnical","IsControlPictures","IsOpticalCharacterRecognition","IsEnclosedAlphanumerics","IsBoxDrawing","IsBlockElements","IsGeometricShapes","IsMiscellaneousSymbols","IsDingbats","IsMiscellaneousMathematicalSymbols-A","IsSupplementalArrows-A","IsBraillePatterns","IsSupplementalArrows-B","IsMiscellaneousMathematicalSymbols-B","IsSupplementalMathematicalOperators","IsMiscellaneousSymbolsandArrows","IsCJKRadicalsSupplement","IsKangxiRadicals","IsIdeographicDescriptionCharacters","IsCJKSymbolsandPunctuation","IsHiragana","IsKatakana","IsBopomofo","IsHangulCompatibilityJamo","IsKanbun","IsBopomofoExtended","IsKatakanaPhoneticExtensions","IsEnclosedCJKLettersandMonths","IsCJKCompatibility","IsCJKUnifiedIdeographsExtensionA","IsYijingHexagramSymbols","IsCJKUnifiedIdeographs","IsYiSyllables","IsYiRadicals","IsHangulSyllables","IsHighSurrogates","IsHighPrivateUseSurrogates","IsLowSurrogates","IsPrivateUse","IsPrivateUseArea","IsCJKCompatibilityIdeographs","IsAlphabeticPresentationForms","IsArabicPresentationForms-A","IsVariationSelectors","IsCombiningHalfMarks","IsCJKCompatibilityForms","IsSmallFormVariants","IsArabicPresentationForms-B","IsHalfwidthandFullwidthForms","IsSpecials","Lu","Ll","Lt","Lm","Lo","L","Mn","Mc","Me","M","Nd","Nl","No","N","Pc","Pd","Ps","Pe","Pi","Pf","Po","P","Sm","Sc","Sk","So","S","Zs","Zl","Zp","Z","Cc","Cf","Cs","Co","Cn","C"],lt=(e,t)=>{const s=(0,ne.Z)(e,t),n=t.slice(2).replace(/[^\w-]+/g,"");return t.endsWith("}")?ot.includes(n)||(0,h.sT)(s,d.xi):(0,h.sT)(s,d.YY),s.script=n,s},ct=(e,t)=>(null==t.captureGroupMap[e.balancedGroup]&&(0,h.sT)(e,d.Bj),e.error),ut=(e,t)=>{const s=(0,q.Z)(e,j.ET),n=t.slice(3,-1).split("-"),r=(0,P.Z)(n,2)[1];return e.flavor===l().DOTNET&&e.flags.includes("N")&&(0,h.sT)(s,d.Ct),s.willBeQuantifiable=!0,s.balancedGroup=r,(0,h.kV)(s,ct),s},dt=(e,t)=>(null==t.captureGroupMap[e.balancedGroup]&&(0,h.sT)(e,d.Bj),e.error),ht=(e,t)=>{const s=(0,Y.Z)(e,t),n=t.slice(3,-1).split("-"),r=(0,P.Z)(n,2),a=r[0],i=r[1];return e.flavor===l().DOTNET&&e.flags.includes("N")&&(0,h.sT)(s,d.Ct),s.type=j.sr,s.subpattern=a,s.balancedGroup=i,(0,h.kV)(s,dt),s},pt=(e,t)=>{const s=e.backreference,n=e.condition,r=e.reference;return s||n?r&&null==t.captureGroupMap[r]&&(0,h.sT)(e,d.Bj):(0,h.sT)(e,d.CL),e.error},gt=(e,t)=>{const s=(0,ee.Z)(e,t),n="(?"!==t;return e.flavor===l().DOTNET&&e.flags.includes("N")&&(0,h.sT)(s,d.Ct),s.backreference=n,n&&(s.reference=s.condition),(0,h.kV)(s,pt),s};var mt=s(38676);const xt=(e,t,s)=>{if(2===e.children.length){const n=(0,P.Z)(e.children,1)[0];let r="";for(let e=0,t=n.children.length;e<t;e++){const t=n.children[e];if(t.type!==j.zl)return!1;r+=t.string}if(t.subpatterns.includes(r)){const n=e.parent,a=n.parent,i=`(${r})`;n.children.splice(0,1),a.string+=i,a.backreference=!0,a.lookaround=!1,a.subroutine=!1,a.position.end+=i.length,a.condition=r,a.reference=r;const o=s.findIndex((t=>t===e));for(let e=0,t=i.length;e<t;e++)s.splice(o,1);t.lookaroundCount--}}return!1},ft=e=>{const t=(0,J.bO)(e);return e.addImplicitLookahead=!1,(0,h.kV)(t,xt),t},vt=[(e,t,s)=>{if(s.addImplicitLookahead&&e.matchString("("))return ft},(e,t,s)=>{if((!s.inCharClass||s.previousToken.type===j.Ao)&&"["===t&&e.match(/^\[\^?/))return Xe.Z},(e,t,s)=>{if(s.inCharClass&&e.matchString("[::]"))return N.Z},oe.q1,(e,t,s)=>{if(s.inCharClass&&s.previousToken.type!==j.HI&&e.match(/^-(?=\[)/))return st},oe.VI,(e,t,s)=>{if(!s.inCharClass&&e.match(/^\\k?(?:<\w+>|'\w+')/))return R.Z},(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\(\d+)/))){if(!s.inCharClass&&"0"!==n[1].charAt(0))return rt;const t=n[1].match(/^[0-7]{2,3}/);let r=0;return t?(r=n[1].length-t[0].length,r>0&&e.backUp(r),u.Z):(n[0].length>2&&e.backUp(n[0].length-2),at.Z)}},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[imnsx]*(?:-[imnsx]+)?\)/))return m.Z},oe.mw,(e,t,s)=>{let n;if(!s.inCharClass&&"("===t&&(n=e.match(/^\((?:\?(?:[imnsx-]*:|[>!=]|<[=!]|'\w+'|'\w*-\w+'|<\w+>|<\w*-\w+>)?)?/))){const t=n[0];if("("===t)return s.flags.includes("n")?$.Z:H.Z;if("(?:"===t)return $.Z;if("(?>"===t)return z;if("(?="===t)return J.bO;if("(?!"===t)return J.y3;if("(?<="===t)return X.nc;if("(?<!"===t)return X.lw;if(/^\(\?[a-z-]+:/i.test(t))return K.Z;if(t.startsWith("(?<-")||t.startsWith("(?'-"))return ut;if(t.startsWith("(?<")||t.startsWith("(?'"))return t.includes("-")?ht:Y.Z;if("(?"===t){const t=e.match(/^\(\w+\)/);if(t){const n=t[0].slice(1,-1);if(null!=s.captureGroupMap[n]||/^\d/.test(n))return gt;e.backUp(t[0].length)}const n=e.match(/^\((?:\?<?[!=]|(?!\d))/,!1);return s.addImplicitLookahead="("===(null==n?void 0:n[0]),s.expectingCondition=!!n,gt}b.O7(new Error(`Unknown group structure '${t}'`))}},oe.fF,oe.MH,(e,t,s)=>{if(!s.inCharClass&&e.match(/^(?:[*+?]|{\d+,?\d*})/))return it},(e,t,s)=>{if("\\"===t&&e.match(/^\\[pP]{[-\w]+}?/))return lt},Fe.K,oe.fR,(e,t,s)=>{if(e.match(/^\\c[a-zA-Z]/))return mt.Z},oe.Nk,(e,t,s)=>{let n;if("\\"===t&&(n=e.match(/^\\[atrvfnewWsSdDAZzGbB]/)))return"\\v"===n[0]?Re.Z:s.inCharClass?"\\b"===n[0]?V.Z:/^\\[atrvfnewWsSdD]/.test(n[0])?B.Z:at.Z:B.Z},(e,t,s)=>{if('"'===t&&e.matchString('""'))return at.Z},(0,oe.eb)(at.Z),oe.tP,oe.k_,oe.sN,oe.NY];var bt=s(80430),jt=s(57093),Ct=s(25035);const Zt=e=>{const t=(0,Ct.Z)(e,j.ix);return t.parent.charClassSymmetricDifference=!0,t},yt=e=>{const t=(0,Ct.Z)(e,j.Ao);return t.parent.charClassSubtraction=!0,t};var Et=s(69741),Tt=s(63231);const kt=(e,t)=>{const s=(0,Ie.Z)(e,t);return(0,Tt.i)(s.hex)&&(0,h.sT)(s,d.oH),s},Nt=e=>{switch(e){case'"':return'"';case"#":return'"#';case"##":return'"##';case"###":return'"###';case"####":return'"####';default:throw new Error(`Unknown Rust delimiter '${e}'`)}},St=[(e,t,s)=>{if(s.inCharClass&&"["===t&&e.match(/^\[:\^?(?:alnum|alpha|ascii|blank|cntrl|digit|graph|lower|print|punct|space|upper|word|xdigit):]/))return k},(e,t,s)=>{var n;if("["===t&&(null==(n=s.previousToken)?void 0:n.type)!==j.jt&&e.match(/^\[\^?/))return Xe.Z},oe._3,(e,t,s)=>{if(s.inCharClass&&e.matchString("--"))return yt},(e,t,s)=>{if(s.inCharClass&&e.matchString("~~"))return Zt},oe.q1,(e,t,s)=>{var n,r;if("-"===t&&s.inCharClass&&!(null==(n=s.previousToken)?void 0:n.partOfRange)&&(null==(r=s.previousToken)?void 0:r.type)!==j.HI&&e.eat("-"))return S.ZP},(e,t,s)=>{if(!s.inCharClass&&"("===t&&e.match(/^\(\?[imsUx]*(?:-[imsUx]+)?\)/))return m.Z},De("imsUx"),oe.fF,oe.MH,Qe,(e,t,s)=>{if(s.unicodeEnabled&&"\\"===t&&e.match(/^\\[pP][LMNSPZC]/))return ne.Z},(e,t,s)=>{if(s.unicodeEnabled&&"\\"===t&&e.match(/^\\[pP]{(?:\w+!?[:=])?\w*}?/))return jt.Z},(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:[0-9A-Fa-f]{2}|{[0-9A-Fa-f]+}?)/))return kt},(e,t,s)=>{if("\\"===t&&e.match(/^\\(?:u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|[uU]{[0-9A-Fa-f]*}?)/))return bt.Z},oe.Nk,Me,(0,oe.eb)(Et.Z),(e,t,s)=>{const n=Nt(s.delimiter),r=new RegExp(`^#(?:(?!${n}).)*`);if("#"===t&&s.flags.includes("x")&&e.match(r))return Je.Z},oe.k_,(e,t,s)=>{const n=Nt(s.delimiter);if(('"'===t||"#"===t)&&e.matchString(n))return N.Z},oe.NY],_t=r()(((e,t={})=>{const s=((e={})=>Object.assign({alternatives:0,parents:[],previousToken:null,adjacentToken:null,lineTerminators:null,captureGroups:[],captureGroupCount:0,numericCaptureGroupCount:0,captureGroupMap:Object.create(null),dotnetCaptureMap:Object.create(null),subpatterns:[],definedSubpatterns:[],groups:[],conditionals:[],lookbehinds:[],lookbehindCount:0,lookaroundCount:0,inDEFINE:!1,branchResetGroups:[],inCharClass:!1,charClasses:[],ranges:[],condition:null,expectingCondition:!1,addImplicitLookahead:!1,unicodeEnabled:!1,ucpVerb:!1,flags:null,flavor:l().PCRE2,delimiter:null,isSubstitution:!1,patternError:!1,revalidateTokens:[],revalidateTokensNext:[]},e))(t);s.unicodeEnabled=(0,c.sH)(t.flags,t.flavor),s.lineTerminators=(0,c.m0)(t.flavor);const n=(0,a.Z)(s),r=(e=>{switch(e){case l().PCRE2:return Ne;case l().PCRE:return ke;case l().JAVASCRIPT:return Se.ZP;case l().GOLANG:return Ue;case l().PYTHON:return Fe.Z;case l().JAVA:return et;case l().DOTNET:return vt;case l().RUST:return St;default:throw new Error(`There is no tokenizer for '${e}'`)}})(t.flavor),o=(0,i.Q)(r,e,s);return o.unshift(n),{tokens:o,patternError:s.patternError,state:s}}))},27428:(e,t,s)=>{"use strict";s.d(t,{SC:()=>d,jj:()=>l,m0:()=>c,sH:()=>u,sx:()=>o});var n=s(98152),r=s(48186),a=s(61348),i=s.n(a);const o=(e,t)=>e.some((e=>t.includes(e))),l=(e,t,s=i().PCRE)=>{let a=t.match(/^\^?([^-]*)-?(.*)/),o=(0,n.Z)(a,3),l=o[1],c=o[2];if(s!==i().PCRE){if(c.includes("-"))return[null,null,null];if(t.includes("^")){const t="imsnx".replace(new RegExp(`[${l}]`,"g"),"");c+=e.replace(new RegExp(`[^${t}]`,"g"),"")}}c=c.replace(/-/g,"");const u=(0,r.Z)(e+l).join("").replace(new RegExp(`[${c}]`,"g"),"");if(s===i().PCRE2)return[l.includes("xx")||e.includes("xx")?u.replace("x","xx"):u,(0,r.Z)(l.includes("xx")?l.match(/xx|./g):l),(0,r.Z)(c.includes("xx")?c.match(/xx|./g):c)];const d=(0,r.Z)(l),h=(0,r.Z)(c);return[u,d,h,d.length!==l.length||h.length!==c.length]},c=e=>{switch(e){case i().JAVA:return["\\r\\n","\\n","\\r","\\u2028","\\u2029","\\u0085"];case i().RUST:case i().PCRE2:case i().PYTHON:case i().GOLANG:case i().PCRE:return["\\n"];case i().JAVASCRIPT:return["\\n","\\r","\\u2028","\\u2029"];case i().DOTNET:return["\\n","\\r"];default:throw new Error(`Unknown line terminator for ${e}`)}},u=(e="",t=i().PCRE2)=>t===i().GOLANG||t===i().RUST||!(t!==i().JAVA||!e.includes("U"))||e.includes("u"),d={lookbehind:!1,namedGroup:!1,unicodeProperty:!1}},12313:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n=(e,t,s,n)=>{if((null==e[n=""+n]||t[s]!==n)&&null!=t[s]){const r=t[n];for(let n=s+1;;n++)if(null==t[n]){e[r]=n,e[n]=r,t[n]=r;break}}t[s]=n}},38844:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(51836),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return/^(?:\\[!#$%&'()*+,\-./:;<=>?@[\\\]^`{|}~]$|"")/i.test(t)||(0,a.sT)(s,n.mi),s}},62284:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(51836),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return/^\\[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]$/i.test(t)?"\\`"===t?(0,a.sT)(s,n.Qc):e.isSubstitution&&!/^\\[\\"]$/.test(t)&&(0,a.sT)(s,n.mi):(0,a.sT)(s,n.mi),s}},95790:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(51836),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return/^\\[a-z]$/i.test(t)&&(0,a.sT)(s,n.mi),s}},9961:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(29856),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return"\\0"!==t&&(0,a.sT)(s,n.mi),s}},38676:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(42066),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return/^\\c[a-zA-Z]$/.test(t)||(0,a.sT)(s,n.Iu),s}},92250:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(51836),a=s(4779);const i=(e,t)=>{const s=e.unicodeEnabled,i=e.inCharClass,o=e.isSubstitution,l=(0,r.Z)(e,t);return!s||i&&"\\-"===t||/^\\[$()*+./?[\\\]^{|}]$/i.test(t)?i&&"\\k"===t?(0,a.sT)(l,n.mi):o&&/^\\[89]$/.test(t)&&(0,a.sT)(l,n.of):(0,a.sT)(l,n.mi),l}},81669:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(31360),r=s(26850),a=s(4779),i=s(63231);const o=(e,t)=>{const s=e.unicodeEnabled,o=(0,r.Z)(e,t),l=o.hex;return l.length>4&&!s?(0,a.sT)(o,n.y1):s&&(0,i.i)(l)?(0,a.sT)(o,n.oH):"\\x{}"===t&&(0,a.sT)(o,n.Yo),o}},24474:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(82542),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t),i=s.from,o=s.to;return(i>65535||o!==1/0&&o>65535)&&(0,a.sT)(s,n.Vt),e.flags.includes("U")&&(s.lazy=!s.lazy),s}},64610:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(31360),a=s(4779);const i=e=>{const t=(0,a.ZP)(e,n.MW);return(0,a.sT)(t,r.Jf),t}},80430:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(31360),r=s(91435),a=s(4779),i=s(63231);const o=(e,t)=>{const s=(0,r.Z)(e,t);return(0,i.i)(s.hex)&&(0,a.sT)(s,n.oH),s}},69741:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31360),r=s(51836),a=s(4779);const i=(e,t)=>{const s=(0,r.Z)(e,t);return(e.isSubstitution?/^\\["\\]/:/^\\[-\\.+*?()|[\]{}^$#]$/i).test(t)||(0,a.sT)(s,n.mi),s}},57093:(e,t,s)=>{"use strict";s.d(t,{F:()=>h,Z:()=>v});var n=s(98152),r=s(61348),a=s.n(r),i=s(31360),o=s(29215),l=s(4779);const c=["ASCII","ASCII_Hex_Digit","AHex","Alphabetic","Alpha","Any","Assigned","Bidi_Control","Bidi_C","Bidi_Mirrored","Bidi_M","Case_Ignorable","CI","Cased","Changes_When_Casefolded","CWCF","Changes_When_Casemapped","CWCM","Changes_When_Lowercased","CWL","Changes_When_NFKC_Casefolded","CWKCF","Changes_When_Titlecased","CWT","Changes_When_Uppercased","CWU","Dash","Default_Ignorable_Code_Point","DI","Deprecated","Dep","Diacritic","Dia","Emoji","Emoji_Component","EComp","Emoji_Modifier","EMod","Emoji_Modifier_Base","EBase","Emoji_Presentation","EPres","Extended_Pictographic","ExtPict","Extender","Ext","Grapheme_Base","Gr_Base","Grapheme_Extend","Gr_Ext","Hex_Digit","Hex","IDS_Binary_Operator","IDSB","IDS_Trinary_Operator","IDST","ID_Continue","IDC","ID_Start","IDS","Ideographic","Ideo","Join_Control","Join_C","Logical_Order_Exception","LOE","Lowercase","Lower","Math","Noncharacter_Code_Point","NChar","Pattern_Syntax","Pat_Syn","Pattern_White_Space","Pat_WS","Quotation_Mark","QMark","Radical","Regional_Indicator","RI","Sentence_Terminal","STerm","Soft_Dotted","SD","Terminal_Punctuation","Term","Unified_Ideograph","UIdeo","Uppercase","Upper","Variation_Selector","VS","White_Space","space","XID_Continue","XIDC","XID_Start","XIDS"],u=["Cased_Letter","LC","Close_Punctuation","Pe","Connector_Punctuation","Pc","Control","Cc","cntrl","Currency_Symbol","Sc","Dash_Punctuation","Pd","Decimal_Number","Nd","digit","Enclosing_Mark","Me","Final_Punctuation","Pf","Format","Cf","Initial_Punctuation","Pi","Letter","L","Letter_Number","Nl","Line_Separator","Zl","Lowercase_Letter","Ll","Mark","M","Combining_Mark","Math_Symbol","Sm","Modifier_Letter","Lm","Modifier_Symbol","Sk","Nonspacing_Mark","Mn","Number","N","Open_Punctuation","Ps","Other","C","Other_Letter","Lo","Other_Number","No","Other_Punctuation","Po","Other_Symbol","So","Paragraph_Separator","Zp","Private_Use","Co","Punctuation","P","punct","Separator","Z","Space_Separator","Zs","Spacing_Mark","Mc","Surrogate","Cs","Symbol","S","Titlecase_Letter","Lt","Unassigned","Cn","Uppercase_Letter","Lu"],d=["Adlam","Adlm","Ahom","Anatolian_Hieroglyphs","Hluw","Arabic","Arab","Armenian","Armn","Avestan","Avst","Balinese","Bali","Bamum","Bamu","Bassa_Vah","Bass","Batak","Batk","Bengali","Beng","Bhaiksuki","Bhks","Bopomofo","Bopo","Brahmi","Brah","Braille","Brai","Buginese","Bugi","Buhid","Buhd","Canadian_Aboriginal","Cans","Carian","Cari","Caucasian_Albanian","Aghb","Chakma","Cakm","Cham","Chorasmian","Chrs","Cherokee","Cher","Common","Zyyy","Coptic","Copt","Qaac","Cuneiform","Xsux","Cypriot","Cprt","Cyrillic","Cyrl","Deseret","Dsrt","Devanagari","Deva","Dives_Akuru","Diak","Dogra","Dogr","Duployan","Dupl","Egyptian_Hieroglyphs","Egyp","Elbasan","Elba","Elymaic","Elym","Ethiopic","Ethi","Georgian","Geor","Glagolitic","Glag","Gothic","Goth","Grantha","Gran","Greek","Grek","Gujarati","Gujr","Gunjala_Gondi","Gong","Gurmukhi","Guru","Han","Hani","Hangul","Hang","Hanifi_Rohingya","Rohg","Hanunoo","Hano","Hatran","Hatr","Hebrew","Hebr","Hiragana","Hira","Imperial_Aramaic","Armi","Inherited","Zinh","Qaai","Inscriptional_Pahlavi","Phli","Inscriptional_Parthian","Prti","Javanese","Java","Kaithi","Kthi","Kannada","Knda","Katakana","Kana","Kayah_Li","Kali","Kharoshthi","Khar","Khitan_Small_Script","Kits","Khmer","Khmr","Khojki","Khoj","Khudawadi","Sind","Lao","Laoo","Latin","Latn","Lepcha","Lepc","Limbu","Limb","Linear_A","Lina","Linear_B","Linb","Lisu","Lycian","Lyci","Lydian","Lydi","Mahajani","Mahj","Makasar","Maka","Malayalam","Mlym","Mandaic","Mand","Manichaean","Mani","Marchen","Marc","Medefaidrin","Medf","Masaram_Gondi","Gonm","Meetei_Mayek","Mtei","Mende_Kikakui","Mend","Meroitic_Cursive","Merc","Meroitic_Hieroglyphs","Mero","Miao","Plrd","Modi","Mongolian","Mong","Mro","Mroo","Multani","Mult","Myanmar","Mymr","Nabataean","Nbat","Nandinagari","Nand","New_Tai_Lue","Talu","Newa","Nko","Nkoo","Nushu","Nshu","Nyiakeng_Puachue_Hmong","Hmnp","Ogham","Ogam","Ol_Chiki","Olck","Old_Hungarian","Hung","Old_Italic","Ital","Old_North_Arabian","Narb","Old_Permic","Perm","Old_Persian","Xpeo","Old_Sogdian","Sogo","Old_South_Arabian","Sarb","Old_Turkic","Orkh","Oriya","Orya","Osage","Osge","Osmanya","Osma","Pahawh_Hmong","Hmng","Palmyrene","Palm","Pau_Cin_Hau","Pauc","Phags_Pa","Phag","Phoenician","Phnx","Psalter_Pahlavi","Phlp","Rejang","Rjng","Runic","Runr","Samaritan","Samr","Saurashtra","Saur","Sharada","Shrd","Shavian","Shaw","Siddham","Sidd","SignWriting","Sgnw","Sinhala","Sinh","Sogdian","Sogd","Sora_Sompeng","Sora","Soyombo","Soyo","Sundanese","Sund","Syloti_Nagri","Sylo","Syriac","Syrc","Tagalog","Tglg","Tagbanwa","Tagb","Tai_Le","Tale","Tai_Tham","Lana","Tai_Viet","Tavt","Takri","Takr","Tamil","Taml","Tangut","Tang","Telugu","Telu","Thaana","Thaa","Thai","Tibetan","Tibt","Tifinagh","Tfng","Tirhuta","Tirh","Ugaritic","Ugar","Vai","Vaii","Wancho","Wcho","Warang_Citi","Wara","Yezidi","Yezi","Yi","Yiii","Zanabazar_Square","Zanb"],h=(e,t=!1)=>null==e?null:t||e.length>2?e.replace(/[-_\s]/g,"").toLowerCase():e,p=["LC","Sc"],g=["Surrogate","Cs","Changes_When_NFKC_Casefolded","CWKCF"].map((e=>h(e)));let m,x,f;const v=(e,t)=>{const s=(0,o.Z)(e,t),r=e.flavor===a().RUST,v=r;v&&(m||(m=c.map((e=>h(e)))),x||(x=u.map((e=>h(e)))),f||(f=d.map((e=>h(e)))));const b=v?m:c,j=v?x:u,C=v?f:d;let Z=s.script.split(/[:=]/),y=(0,n.Z)(Z,2),E=y[0],T=y[1];null==T&&(T=E,E=null);const k=T,N=E;v&&(E=h(E,!0),T=h(T));let S=!1;return null==E?(S=b.includes(T)||j.includes(T),r&&(S=S||C.includes(T),p.includes(T)&&(0,l.sT)(s,i.wY))):"gc"===E||"General_Category"===E||v&&"generalcategory"===E?S=j.includes(T):("Script"===E||"Script_Extension"===E||"sc"===E||"scx"===E||v&&("script"===E||"scriptextensions"===E))&&(S=C.includes(T)),g.includes(T)?(0,l.sT)(s,i.wY):S||(0,l.sT)(s,i.xi),s.category=N,s.script=k,s}},18346:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=e=>{e.parents.pop();const t=(0,r.ZP)(e,n.hs);return t.parent&&(0,r.Cv)(t.parent,t),t.alternativeNumber=null,(0,r.A_)(t,a.Z.alternator),t}},62170:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=e=>{const t=(0,r.ZP)(e,n.ZH);return t.length=1,t.charCode="\b".charCodeAt(0),(0,r.A_)(t,a.Z.meta),t}},43406:(e,t,s)=>{"use strict";s.d(t,{Q_:()=>i,ZP:()=>l,lC:()=>o});var n=s(48186),r=s(56468),a=s(48401);const i=(e,t)=>{e.finalCaptureGroupCount=Math.max(e.finalCaptureGroupCount,t.captureGroupCount),e.captureGroupMap=Object.assign(Object.assign({},e.captureGroupMap),t.captureGroupMap),e.subpatterns=(0,n.Z)(e.subpatterns.concat(t.subpatterns))},o=e=>({finalCaptureGroupCount:e.finalCaptureGroupCount,captureGroupCount:e.captureGroupCount,captureGroupMap:e.captureGroupMap,subpatterns:e.subpatterns}),l=e=>{const t=(0,a.Z)(e,r.no);return e.branchResetGroups.push(t),t.willBeQuantifiable=!0,t.captureGroupCount=e.captureGroupCount,t.subpatterns=[],t.captureGroupMap={},t.finalCaptureGroupCount=0,i(t,e),t}},78347:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(56468),r=s(61348),a=s.n(r),i=s(12313),o=s(48401);const l=e=>{const t=e.definedSubpatterns,s=e.inDEFINE,r=e.captureGroups,l=e.captureGroupMap,c=e.flavor,u=e.captureGroupCount,d=e.numericCaptureGroupCount,h=e.dotnetCaptureMap,p=(0,o.Z)(e,n.t),g=c===a().DOTNET,m=(g?d:u)+1;if(s&&t.push(u),g){const e=""+m;(0,i.Z)(l,h,m,e),l[e]=m}else l[m]=m;return r.push(p),e.captureGroupCount++,e.numericCaptureGroupCount++,p.willBeQuantifiable=!0,p.groupNumber=m,p}},25035:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(4779),r=s(56468),a=s(31360),i=s(64475);const o=(e,t,s)=>{const i=e.previousToken,o=s[s.length-1];if(!i||!o||i.type===r.HI||i.type===r.zB||i.type===r.ix||i.type===r.Ao||o.type===r.U6||o.type===r.zB||o.type===r.ix||o.type===r.Ao){let t;switch(e.type){case r.Ao:t=a.bb;break;case r.zB:t=a.jz;break;case r.ix:t=a.nv;break;default:throw new Error(`Unknown charclass modifier '${e.string}'`)}(0,n.sT)(e,t)}return e.error},l=(e,t)=>{const s=e.previousToken,r=(0,n.ZP)(e,t);return r.previousToken=s,r.parent.classModifier=!0,(0,n.U3)(r,o),(0,n.A_)(r,i.Z.meta),r}},7656:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>g,oA:()=>h});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(4779),l=s(64475);const c=parseInt("0xd800",16),u=parseInt("0xdfff",16),d=(e,t,s)=>{const a=t.unicodeEnabled,l=t.flavor,d=e.previousToken,g=s[s.length-1],m=h(d,"end"),x=h(g,"start");let f=!1;return!g||g.type===n.U6&&l!==i().JAVA||d.type===n.HI||g.type===n.HI||d.type===n.jt||d.partOfRange||g.partOfRange?f=!0:(l!==i().JAVASCRIPT||a||null!=x)&&(l!==i().DOTNET&&l!==i().GOLANG||null!=m)||(f=!0),f||((null==g?void 0:g.type)===n.U6&&l===i().JAVA?(0,o.sT)(e,r.BL):null==m||null==x?(0,o.sT)(e,r.BC):m>x?(0,o.sT)(e,r.i0):!t.unicodeEnabled&&((null==d?void 0:d.type)===n.zl&&m>=c&&m<=u||(null==g?void 0:g.type)===n.zl&&x>=c&&x<=u)?(0,o.sT)(e,r.Af):(null!=d&&d.error||null!=g&&g.error)&&(0,o.sT)(e,r.Y4)),f?p(e,d,g):(d.rangeToken=e,g.rangeToken=e,d.partOfRange=!0,g.partOfRange=!0,e.leftToken=d,e.rightToken=g),e.error},h=(e,t)=>e?e.type===n.$U?"start"===t?e.startCodePoint||e.startCharCode:e.endCodePoint||e.endCharCode:e.codePoint||e.charCode:null,p=(e,t,s)=>{e.type=n.zl,e.length=1,e.charCode="-".charCodeAt(0),e.isPoorlyPlaced=(null==s?void 0:s.type)!==n.U6&&(null==t?void 0:t.type)!==n.HI,e.leftToken=null,e.rightToken=null,(0,o.A_)(e,"")},g=e=>{const t=e.previousToken,s=(0,o.ZP)(e,n.jt);return s.charCode="-".charCodeAt(0),s.codePoint="-".codePointAt(0),s.previousToken=t,(0,o.U3)(s,d),(0,o.A_)(s,l.Z.meta),s}},41061:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(31360),r=s(56468),a=s(4779),i=s(43406);const o=e=>{var t;e.parents.pop();const s=(0,a.ZP)(e,null),o=s.parent,l=null==o?void 0:o.type;if(o?o.error&&(0,a.sT)(s,o.error):(0,a.sT)(s,n.f0),e.flags=null!=(t=null==o?void 0:o.previousFlags)?t:e.flags,e.parents.pop(),e.groups.pop(),!s.error&&o&&(e.previousToken=o),l===r.Ws)e.inDEFINE=!1;else if(l===r.PG||l===r.up||l===r.fy)e.lookbehindCount=o.lookbehindCount,e.lookaroundCount--;else if(l===r.Gs||l===r.Ty||l===r.qh)e.lookbehindCount--,e.lookaroundCount--;else if(l===r.no){(0,i.Q_)(o,e),e.branchResetGroups.pop();const t=(0,i.lC)(o),s=t.finalCaptureGroupCount,n=t.captureGroupMap,r=t.subpatterns;e.captureGroupCount=s,e.captureGroupMap=n,e.subpatterns=r}if(s.type=l,o){const e=o.groupNumber,t=o.subpattern,n=o.willBeQuantifiable;s.openGroup=o,s.groupNumber=e,s.subpattern=t,s.quantifiable=n,o.closeGroup=s,o.quantifiable=n,(0,a.Cv)(o,s)}return o&&(0,a.A_)(s,o.style),s}},16835:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var n=s(56468),r=s(48401);const a=(e,t)=>{const s=(0,r.Z)(e,n.oK),a=t.slice(3,-1);return e.conditionals.push(s),s.willBeQuantifiable=!0,s.condition=a,s.reference=null,s.lookaround=!1,s.backreference=!1,s.subroutine=!1,s.captureGroupCount=e.captureGroupCount,s}},42066:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(56468),r=s(31360),a=s(4779),i=s(64475);const o=(e,t)=>{const s=(0,a.ZP)(e,n.lA),o=t.slice(2),l=o?64^o.toUpperCase().charCodeAt(0):null;return/^[\u0000-\u007F]$/.test(o)||(0,a.sT)(s,r.Iu),s.quantifiable=!0,s.length=1,s.charCode=l,(0,a.A_)(s,i.Z.meta),s}},51836:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=(e,t)=>{const s=(0,r.ZP)(e,n.t0);return s.quantifiable=!0,s.length=1,s.charCode=t.charCodeAt(1),s.codePoint=t.codePointAt(1),(0,r.A_)(s,a.Z.escaped_string),s}},68072:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(31360),r=s(56468),a=s(4779),i=s(18346),o=s(43406);const l=e=>{const t=(0,i.Z)(e),s=t.parent;return(s.type===r.Ws||s.type===r.oK&&s.alternatives>0)&&(0,a.sT)(t,n.cs),e.parents.push(t),s.type===r.no&&((0,o.Q_)(s,e),e.captureGroupCount=s.captureGroupCount),s.alternatives++,t.alternativeNumber=s.alternatives,(0,a.A_)(t,s.style),t}},48401:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(31360),r=s(99221),a=s(4779),i=s(64475);const o=e=>(e.closeGroup||(0,a.sT)(e,n.CL),e.error),l=(e,t)=>{const s=e.flags,l=e.groups,c=e.parents,u=(0,a.ZP)(e,t),d=`group-${Math.min(l.length,3)}`;return l.length>=250&&(0,a.sT)(u,n.n2),u.quantifiable=!1,u.alternatives=0,u.closeGroup=null,u.previousFlags=s,u.lookbehindCount=e.lookbehindCount,c.push(u),l.push(u),(0,a.kV)(u,o),(0,r.Z)(e),(0,a.A_)(u,i.Z[d]),u}},26850:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(4779),l=s(64475);const c=parseInt("0x10ffff",16),u=parseInt("0xfffff",16),d=(e,t)=>{const s=(0,o.ZP)(e,n.L3),a=e.flavor===i().GOLANG?u:c,d=t.slice(2).replace(/[{}]/g,"")||"00";let h=parseInt(d,16);return"{"===t.charAt(2)&&"}"!==t.slice(-1)?(0,o.sT)(s,r.YY):parseInt(d,16)>a&&((0,o.sT)(s,r.y1),h=null),s.quantifiable=!0,s.length=1,s.hex=d,s.charCode=h,(0,o.A_)(s,l.Z.meta),s}},52111:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(98152),r=s(56468),a=s(31360),i=s(27428),o=s(61348),l=s.n(o),c=s(4779),u=s(64475);const d=(e,t)=>{var s,o;const d=e.flavor,h=e.flags,p=(0,c.ZP)(e,r.RW);d===l().PCRE||d===l().PCRE2||"(?)"!==t?d===l().DOTNET&&(null==(s=p.parent)||null==(o=s.parent)?void 0:o.type)===r.oK&&(0,c.sT)(p,a.HT):(0,c.sT)(p,a.YY);const g=(0,i.jj)(h,t.slice(2,-1),d),m=(0,n.Z)(g,4),x=m[0],f=m[1],v=m[2],b=m[3];return null==x&&(0,c.sT)(p,a.Gz),d===l().RUST&&(b||(0,i.sx)(f,v))&&(0,c.sT)(p,a.jW),e.flags=null!=x?x:h,e.unicodeEnabled=(0,i.sH)(e.flags,d),p.flags=e.flags,p.onFlags=f,p.offFlags=v,(0,c.A_)(p,u.Z.inline_modifiers),p}},99221:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var n=s(56468),r=s(4779);const a=e=>{const t=e.previousToken,s=(0,r.ZP)(e,n.hs);return e.parents.push(s),e.previousToken=t,s.alternativeNumber=0,s.invisible=!0,s}},70520:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=(e,t)=>{const s=e.previousToken,i=(0,r.ZP)(e,n.qi);return e.previousToken=s,i.comment=t.slice(1),(0,r.A_)(i,a.Z.comment),i}},89570:(e,t,s)=>{"use strict";s.d(t,{T0:()=>o,bO:()=>a,y3:()=>i});var n=s(56468),r=s(43934);const a=e=>l(e,n.PG),i=e=>l(e,n.up),o=e=>l(e,n.fy),l=(e,t)=>{const s=(0,r.Z)(e,t);return e.lookbehindCount=0,s}},43934:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(61348),r=s.n(n),a=s(31360),i=s(48401),o=s(4779);const l=(e,t)=>{const s=e.expectingCondition,n=e.previousToken,l=e.flavor,c=(0,i.Z)(e,t);return e.flavor===r().DOTNET&&e.flags.includes("N")&&(0,o.sT)(c,a.Ct),s&&(n.lookaround=!0,n.condition=c,e.expectingCondition=!1),e.lookaroundCount++,c.isCondition=s,c.willBeQuantifiable=!s&&(l===r().PCRE||l===r().PCRE2||l===r().DOTNET),c}},60438:(e,t,s)=>{"use strict";s.d(t,{fy:()=>d,lw:()=>u,nc:()=>c});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(43934),l=s(4779);const c=e=>h(e,n.Gs),u=e=>h(e,n.Ty),d=e=>h(e,n.qh),h=(e,t)=>{const s=(0,o.Z)(e,t);return e.lookbehinds.push(s),e.lookbehindCount++,(0,l.kV)(s,p),s},p=(e,t)=>{const s=t.flavor;if(s===i().JAVA||s===i().JAVASCRIPT||s===i().DOTNET)return!1;const n={foundError:!1};if(s===i().PYTHON)g(e.children,n);else for(let t=0,s=e.children.length;t<s;t++)g(e.children[t].children,n);return n.foundError},g=(e,t)=>{let s=null,a=0;for(let i=0,o=e.length;i<o;i++){const o=e[i];if(o.type===n.hs){const e=g(o.children,t);null==s?(s=e,a+=e):s!==e&&((0,l.sT)(o.parent,r.eB),t.foundError=!0)}else if((0,n.tK)(o.type)&&!(0,n.Az)(o.type)){let s=g(o.children,t);const r=e[i+1];(null==r?void 0:r.type)===n.Wj&&(s*=r.length,i+=r.quantifier?2:1),a+=s}else a+=o.length}return a}},43453:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(4779),l=s(64475);const c=/^(?:\\[zZbBAGK]|[$^])$/,u=(e,t)=>{const s=e.flavor,a=e.lookbehindCount,u=e.lookaroundCount,d=e.unicodeEnabled,h=(0,o.ZP)(e,n.MW),p=s===i().PCRE2||s===i().PCRE,g=!c.test(t);let m;switch(p&&(a>0&&("\\X"===t||"\\R"===t||"\\C"===t&&d)||u>0&&"\\K"===t)&&(0,o.sT)(h,r.jV),e.flavor===i().DOTNET&&e.flags.includes("N")&&"\\G"===t&&(0,o.sT)(h,r.Ct),t){case"\\a":m=7;break;case"\\b":m=8;break;case"\\f":m=12;break;case"\\n":m=10;break;case"\\r":m=13;break;case"\\t":m=9;break;case"\\e":m=27;break;default:m=null}return s===i().JAVA&&e.inCharClass&&"\\v"===t&&(m=8),h.charCode=m,h.quantifiable=g,h.length=g?1:0,(0,o.A_)(h,l.Z.meta),h}},38325:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var n=s(98152),r=s(61348),a=s.n(r),i=s(56468),o=s(27428),l=s(31360),c=s(48401),u=s(4779);const d=(e,t)=>{const s=e.flags,r=e.flavor,d=(0,c.Z)(e,i.df),h=(0,o.jj)(s,t.slice(2,-1),r),p=(0,n.Z)(h,4),g=p[0],m=p[1],x=p[2],f=p[3];return null==g&&(0,u.sT)(d,l.Gz),r===a().RUST&&(f||(0,o.sx)(m,x))&&(0,u.sT)(d,l.jW),e.flags=null!=g?g:e.flags,e.unicodeEnabled=(0,o.sH)(e.flags,r),d.flags=e.flags,d.onFlags=m,d.offFlags=x,d.willBeQuantifiable=!0,d}},750:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var n=s(56468),r=s(31360),a=s(32428),i=s(4779),o=s(64475);const l=(e,t)=>(t.subpatterns.includes(e.reference)||(0,i.sT)(e,r.Bj),e.error),c=(e,t)=>{const s=(0,a.Z)(e,n.O3),c=t.replace(/^(?:\(\?P=|\\[kg])|\W/g,"");return c||(0,i.sT)(s,r.YY),(0,i.kV)(s,l),s.reference=c,(0,i.A_)(s,o.Z.backreference),s}},79075:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(61348),r=s.n(n),a=s(56468),i=s(31360),o=s(12313),l=s(48401),c=s(4779);const u=(e,t)=>{const s=e.flavor,n=e.flags,u=e.branchResetGroups,d=e.captureGroupCount,h=e.captureGroupMap,p=e.subpatterns,g=e.inDEFINE,m=e.dotnetCaptureMap,x=e.definedSubpatterns,f=e.captureGroups,v=(0,l.Z)(e,a.sS),b=s===r().DOTNET,j=s===r().PCRE||s===r().PCRE2||s===r().PYTHON,C=t.replace(/^\(\?P?|[<>']/g,""),Z=!isNaN(C),y=b&&Z?parseInt(C,10):d+1,E=b?/^(?:\d+\D|0)/:/^\d/,T=j?32:2147483647;C.length>T?(0,c.sT)(v,i.bk):(E.test(C)||b&&Z&&parseInt(C)>2147483647)&&(0,c.sT)(v,i.kU);let k=!1;return u.length>0&&("string"==typeof h[y]?(h[y]!==C&&(0,c.sT)(v,i.wn),k=!0):"number"==typeof h[y]&&(0,c.sT)(v,i.wn)),k||s===r().DOTNET||!p.includes(C)||n.includes("J")||(0,c.sT)(v,i.wi),g&&x.push(d),b?(null!=h[C]&&m[y]===C||e.captureGroupCount++,(0,o.Z)(h,m,y,C)):e.captureGroupCount++,h[y]=C,h[C]=y,f.push(v),p.push(C),v.subpattern=C,v.groupNumber=y,v.willBeQuantifiable=!0,v}},98529:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var n=s(56468),r=s(48401);const a=e=>{const t=(0,r.Z)(e,n.xT);return t.willBeQuantifiable=!0,t}},69678:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var n=s(56468),r=s(31360),a=s(4779),i=s(32428),o=s(64475);const l=(e,t)=>{const s=e.reference;return null!=s&&(s>t.captureGroupCount||s<1)&&(0,a.sT)(e,r.Bj),e.error},c=(e,t)=>{const s=e.captureGroupCount,c=(0,i.Z)(e,n.WE),u=t.replace(/\D/g,"");let d=null;if(u)if(e.isSubstitution&&"0"===u)d=0;else{const e=parseInt(u,10);t.includes("-")?(d=s-e+1,0===e&&(0,a.sT)(c,r.Bj)):t.includes("+")?(d=s+e,0===e&&(0,a.sT)(c,r.Bj)):d=e,(0,a.kV)(c,l)}else(0,a.sT)(c,r.YY);return c.reference=d,(0,a.A_)(c,o.Z.backreference),c}},29856:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c,_:()=>l});var n=s(56468),r=s(31360),a=s(4779),i=s(64475);const o=(e,t)=>{const s=(0,a.ZP)(e,n.Pg),o=parseInt(t.replace(/\D/g,""),8)||0;return e.unicodeEnabled&&o>=parseInt("0xd800",16)&&o<=parseInt("0xdfff",16)&&(0,a.sT)(s,r.oH),s.quantifiable=!0,s.length=1,s.charCode=o,(0,a.A_)(s,i.Z.meta),s},l=(e,t)=>{const s=e.unicodeEnabled,n=o(e,t);return"}"!==t.slice(-1)?(0,a.sT)(n,r.YY):(!s&&n.charCode>65535||s&&n.charCode>parseInt("0x10FFFF",16))&&(0,a.sT)(n,r.Rf),n},c=o},1974:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(56468),r=s(31360),a=s(4779),i=s(64475);const o=e=>(e.closeCharClass||(0,a.sT)(e,r.sw),e.error),l=e=>{const t=(0,a.ZP)(e,n.HI);return e.inCharClass=!0,e.charClasses.push(t),e.parents.push(t),t.closeCharClass=null,t.length=1,t.quantifiable=!0,(0,a.kV)(t,o),(0,a.A_)(t,i.Z.charClass),t}},92572:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(56468),r=s(61348),a=s.n(r),i=s(31360),o=s(4779);const l=(e,t)=>{const s=e.flavor,r=e.flags,l=e.inCharClass,c=e.previousToken,u=(0,o.ZP)(e,n.zl),d=t.charCodeAt(0),h=t.codePointAt(0),p=s===a().PCRE||s===a().PCRE2||s===a().PYTHON,g=s===a().JAVA,m=s===a().RUST;0===d&&p&&(0,o.sT)(u,i.O3);const x=(r.includes("x")&&(m||g||!l)||r.includes("xx"))&&/[ \t\r\n\f]/.test(t);return x&&(e.previousToken=c),u.quantifiable=!0,u.charCode=d,u.codePoint=h,x?(u.ignoreToken=!0,u.length=0):u.length=1,(0,o.A_)(u,""),u}},82542:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(27428),l=s(4779),c=s(64475);const u=(e,t)=>{const s=(0,l.ZP)(e,n.Wj),a=e.flavor,u=s.previousToken,d=a===i().PCRE||a===i().PCRE2||a===i().JAVA;(a===i().RUST||a===i().JAVA)&&"{"===t.charAt(0)&&"}"!==t.slice(-1)&&(0,l.sT)(s,r.YY);const h=((e,t,s)=>{const n=t.flavor,a=t.lookbehindCount,l=s.charAt(0),c=a>0;let u=null,d=null,h=null;const p=n===i().JAVASCRIPT&&o.SC.lookbehind||n===i().DOTNET;if("{"===l){const e=s.replace(/[^\d,]/g,"").split(",");u=e[0]?Math.min(Number.MAX_VALUE,parseInt(e[0],10)):0,d=void 0===e[1]?u:""===e[1]?1/0:Math.min(Number.MAX_VALUE,parseInt(e[1],10)),u>d?h=r.Hh:c&&!p&&(n===i().JAVA?d===1/0&&(h=r.Cc):u!==d?h=r.Cc:n!==i().PCRE&&n!==i().PYTHON||0!==d||(h=r.Cc))}else c&&!p&&(n===i().JAVA?"?"!==l&&(h=r.Cc):h=r.Cc),"*"===l?(u=0,d=1/0):"+"===l?(u=1,d=1/0):(u=0,d=1);return{error:h,to:d,from:u}})(0,e,t),p=h.to,g=h.from,m=h.error;let x=0,f=!0,v=!1,b=!1;if(null==u||!u.quantifiable||null!=u&&u.error)(0,l.sT)(s,r.RY);else if(m)(0,l.sT)(s,m);else{const e=u.type,a=u.length,i=u.lazy;e===n.Wj?(x=a,f=!1,"?"===t?v=!i:"+"===t&&d?b=!0:(0,l.sT)(s,r.RY)):x=g===p?g*Math.max(a,1)-a:1/0}return s.quantifiable=f,s.lazy=v,s.possessive=b,s.to=p,s.from=g,s.length=x,!s.error&&u&&(s.quantifiedToken=u,u.lazy=v,u.possessive=b,(0,l.vT)(u,s),(0,l.Cv)(u,s)),(0,l.A_)(s,u&&((0,n.tK)(u.type)||u.type===n.Wj)?u.style:c.Z.quantifier),s}},32428:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(61348),r=s.n(n),a=s(31360),i=s(4779);const o=(e,t)=>{const s=e.lookbehindCount,n=e.flavor,o=(0,i.ZP)(e,t);return s>0&&n!==r().JAVASCRIPT&&n!==r().DOTNET&&(0,i.sT)(o,a.jV),e.flavor===r().DOTNET&&e.flags.includes("N")&&(0,i.sT)(o,a.Ct),o.quantifiable=!0,o.length=0,o}},1274:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=(e,t)=>{const s=(0,r.ZP)(e,n.bO),i=t.slice(2,6),o=t.slice(8),l=parseInt("0x10000",16)+(parseInt(i,16)-parseInt("0xd800",16))*parseInt("0x400",16)+(parseInt(o,16)-parseInt("0xdc00",16));return s.highBits=i,s.lowBits=o,s.charCode=s.codePoint=l,s.length=1,s.quantifiable=!0,(0,r.A_)(s,a.Z.meta),s}},4779:(e,t,s)=>{"use strict";s.d(t,{A_:()=>o,Cv:()=>c,U3:()=>d,ZP:()=>h,kV:()=>u,sT:()=>i,vT:()=>l});var n=s(94184),r=s.n(n),a=s(64475);const i=(e,t)=>{e.error||(e.error=t,e.style=r()(a.Z.error,a.Z.token),e.quantifier&&i(e.quantifier,t),e.closeGroup&&i(e.closeGroup,t))},o=(e,t)=>{if(e.error)return;const s=t||e.inQuote||e.inCharClass;e.style=r()(t,e.inCharClass&&a.Z.inCharClass,e.inQuote&&a.Z.inQuote,s&&a.Z.token)},l=(e,t)=>{const s=e.quantifiable,n=e.willBeQuantifiable,r=e.openCharClass,a=e.closeGroup;if(!s&&!n)throw new Error("Trying to add quantifier to non-quantifiable token");t.error||(e.quantifier=t,r&&(r.quantifier=t),a&&(a.quantifier=t))},c=(e,t)=>{e.relatedTokens.includes(t)||(e.relatedTokens.push(t),c(t,e))},u=(e,t)=>{e.error||e.state.revalidateTokens.push({token:e,revalidateFn:t})},d=(e,t)=>{e.error||e.state.revalidateTokensNext.push({token:e,revalidateFn:t})},h=(e,t)=>{const s=e.lineTerminators,n=e.flavor,r=e.flags,a=e.parents,i=e.adjacentToken,o=e.previousToken,l=e.isSubstitution,c=e.inCharClass,u=e.inQuote,d=e.unicodeEnabled,h=null==a?void 0:a[a.length-1],p={state:e,type:t,string:"",error:null,parent:h,children:[],position:{},editorPosition:null,style:null,quantifiable:!1,quantifier:null,partOfRange:!1,rangeToken:null,relatedTokens:[],ignoreToken:!1,length:0,charCode:null,codePoint:null,isPoorlyPlaced:!1,charClassIntersection:!1,charClassSubtraction:!1,adjacentToken:i,previousToken:o,isSubstitution:l,unicodeEnabled:d,flags:r,inCharClass:c,inQuote:u,flavor:n,lineTerminators:null==s?void 0:s.slice()};if(h&&h.children.push(p),e.previousToken=p,e.adjacentToken=p,l){const t=e.lowercase,s=e.uppercase;p.lowercase=t,p.uppercase=s}return p}},11497:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(31360),a=s(4779);const i=e=>{const t=(0,a.ZP)(e,n.zl);return(0,a.sT)(t,r.zX),t}},90256:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(31360),a=s(4779);const i=e=>{const t=(0,a.ZP)(e,n.cF);return(0,a.sT)(t,r.t0),t}},91435:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var n=s(56468),r=s(31360),a=s(61348),i=s.n(a),o=s(4779),l=s(64475);const c=parseInt("10ffff",16),u=(e,t)=>{const s=(0,o.ZP)(e,n.Yb),a=t.replace(/^\\(?:u|N{U\+)|[{}]/gi,""),u="{"===t.charAt(2),d=parseInt(a,16);return u&&"}"!==t.slice(-1)||""===a?(0,o.sT)(s,r.YY):/[^a-f0-9]/i.test(a)?(0,o.sT)(s,r.K0):d>c?(0,o.sT)(s,r.y1):e.isSubstitution&&(!u&&!/^\\u.{4}$/.test(t)||e.flavor===i().JAVA&&"\\u0024"===t||e.flavor===i().RUST&&a.length>6)&&(0,o.sT)(s,r.K0),s.quantifiable=!0,s.length=1,s.hex=a,s.charCode=d,(0,o.A_)(s,l.Z.meta),s}},29215:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(56468),r=s(31360),a=s(4779),i=s(64475);const o=(e,t)=>{const s=(0,a.ZP)(e,n.dz),o=t.slice(2).replace(/[^&\w\-=]/g,"");return(!o||"{"===t.charAt(2)&&"}"!==t.slice(-1))&&(0,a.sT)(s,r.YY),s.script=o,s.length=1,s.quantifiable=!0,(0,a.A_)(s,i.Z.meta),s}},99309:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(31360),a=s(4779);const i=e=>{const t=(0,a.ZP)(e,n.MW);return(0,a.sT)(t,r.RH),t}},40916:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(56468),r=s(4779),a=s(64475);const i=e=>{const t=(0,r.ZP)(e,n.Tf);return t.quantifiable=!1,t.charCode="\v".charCodeAt(0),t.length=1,(0,r.A_)(t,a.Z.meta),t}},79090:(e,t,s)=>{"use strict";s.d(t,{Q:()=>r});var n=s(63231);const r=(e,t,s)=>{const r=[],o=new class{constructor(e="",t=!1){this.position=0,this.string=null,this.stringLength=0,this.string=e,this.stringLength=this.string.length,this.position=0,this.unicodeEnabled=t}eof(){return this.position>=this.stringLength}sof(){return 0===this.position}peek(){return this._getCharAt(this.position).ch}next(){if(this.position<this.stringLength){const e=this._getCharAt(this.position),t=e.ch,s=e.idx;return this.position=s+1,t}return null}eat(e){const t=this._getCharAt(this.position),s=t.ch,n=t.idx;return s===e?(this.position=n+1,s):null}backUp(e){this.position-=e}match(e,t=!0){const s=this.string.slice(this.position).match(e);if(s&&s.index>0)throw new Error(`Regex match did not happen at the beginning of string ${e.toString()}`);return s&&t&&(this.position+=s[0].length),s}matchString(e,t=!0){return!!e&&this.string.substr(this.position,e.length)===e&&(t&&(this.position+=e.length),!0)}_getCharAt(e){return this.unicodeEnabled?(0,n.t)(this.string,e):{ch:this.string.charAt(e),idx:e}}}(t,s.unicodeEnabled),l=[];for(;!o.eof();){const t=i(e,o,s);if(r.push(t),s.patternError=s.patternError||!!t.error,l.length>0&&!t.ignoreToken){const e=a(l.pop(),r,s);s.patternError=s.patternError||e}s.revalidateTokensNext.length>0&&(l.push(s.revalidateTokensNext.slice()),s.revalidateTokensNext=[])}for(let e=0,t=l.length;e<t;e++){const e=a(l.pop(),r,s);s.patternError=s.patternError||e}const c=a(s.revalidateTokens,r,s);return s.patternError=s.patternError||c,s.revalidateTokensNext=[],r},a=(e,t,s)=>{let n=s.patternError;for(let r=0,a=e.length;r<a;r++){const a=e[r],i=a.token;n=!!a.revalidateFn.call(void 0,i,s,t)||n}return n},i=(e,t,s)=>{const n=t.position;for(let r=0,a=e.length;r<a;r++){const a=e[r].call(void 0,t,t.peek(),s);if(null!=a){const e=t.position,r={start:n,end:e},i=t.string.slice(n,e),o=a(s,i,r);return o.string=i,o.position=r,o.state=null,o}}throw new Error(`There was no tokenizer that could parse the regex '${t.current}'`)}},63231:(e,t,s)=>{"use strict";s.d(t,{i:()=>a,t:()=>r});var n=s(10084);const r=(e,t)=>{const s=e.charCodeAt(t);if(isNaN(s))return{ch:null,idx:t};if(s<55296||s>57343)return{ch:e.charAt(t),idx:t};if(55296<=s&&s<=56319){if(e.length<=t+1)return n.Z.error("High surrogate without following low surrogate"),{ch:e.charAt(t),idx:t};const s=e.charCodeAt(t+1);return 56320>s||s>57343?(n.Z.error("High surrogate without following low surrogate"),{ch:e.charAt(t),idx:t}):{ch:e.charAt(t)+e.charAt(t+1),idx:t+1}}if(0===t)return n.Z.error("Low surrogate without preceding high surrogate"),{ch:e.charAt(t),idx:t};const r=e.charCodeAt(t-1);return 55296>r||r>56319?(n.Z.error("Low surrogate without preceding high surrogate"),{ch:e.charAt(t),idx:t}):{ch:e.charAt(t+1),idx:t+1}},a=e=>{const t=parseInt(e,16);return t>=parseInt("0xd800",16)&&t<=parseInt("0xdfff",16)}},14882:e=>{e.exports.JL="0.2s",e.exports.RA="0.6s",e.exports.mc="0.2s",e.exports.t2="0.25s",e.exports.E2="0.2s",e.exports.DP="0.1s",e.exports.ug="0.5s",e.exports.oA="0.3s",e.exports.s_="0.25s",e.exports.K0="1s"},97930:e=>{e.exports.zj="5px",e.exports.Pt="785px",e.exports.bP="900px",e.exports.D6="900px",e.exports.p4="1080px"},75573:(e,t,s)=>{"use strict";s.d(t,{O7:()=>m,uT:()=>x,S1:()=>p,PC:()=>g,fo:()=>f});var n=s(10084),r=s(69574),a=s(45987);const i=["regexAreaParser"];var o=s(2043),l=s.n(o);function c(e){const t=window.location.href;return"?"===e.function&&("<anonymous>"===e.filename||e.filename===t)}const u=function(e){var t,s,n,r;const a=null==(t=e.exception)||null==(s=t.values)?void 0:s[0];if(!a||!a.mechanism||"onerror"!==a.mechanism.type||a.mechanism.handled)return e;const i=null==(n=a.stacktrace)?void 0:n.frames,o=null==(r=a.type)?void 0:r.toLowerCase();return i&&o&&i.length<=2&&function(e){return["syntaxerror","referenceerror","typeerror"].includes(e)}(o)&&function(e){const t=e.every(c),s=2===e.length&&c(e[0]);return t||s}(i)?(l().warn("Dropping error due to suspicious stack frames."),null):e};let d=null,h=null;function p(){window.onerror=(e,t,s,r,a)=>{null==a?n.Z.error({message:e,url:t,line:s,column:r}):m(a)},window.onunhandledrejection=e=>m(e.reason,e.promise)}async function g(){return null==h&&(h=Promise.all([s.e(530).then(s.bind(s,61002)),s.e(530).then(s.bind(s,9867))]).then((([e,t])=>(window.onerror=null,window.onunhandledrejection=null,e.init({dsn:"https://5f9e813965e0433598973663dff85743@sentry.io/102476",release:"9.0.8",normalizeDepth:6,allowUrls:["regex101.com"],denyUrls:[/extensions\//i,/^chrome:\/\//i,/chrome-extension:/i,/moz-extension:/i,/analytics\.regex101\.com/i,/safari-extension:/i],ignoreErrors:["BetterJsPop","googletag","webkitExitFullScreen","chrome-extension","moz-extension","bannerNight","SpeedKit","HintedWidget","grecaptcha","plausible.js","Possible side-effect in debug-evaluate","Unexpected end of input","Invalid or unexpected token","Identifier 'originalPrompt' has already been declared","can't access dead object","suggestionDisplayed","jQuery","Not implemented on this platform"],integrations:[new t.BrowserTracing],tracesSampleRate:.1,autoSessionTracking:!1,beforeSend:u}),e)))),h}async function m(e,t=null){try{r.ZP.emit(r.P),n.Z.error(e);const s=await g();s.withScope((n=>{null!=d&&function(e,t,s){const n=s.regexEditor,r=n.regex,o=n.delimiter,l=n.flavor,c=n.flags,u=n.testString,d=n.substString,h=s.general,p=h.permalinkFragment,g=h.version,m=h.userId,x=h.email;e.setUser({id:m,email:x}),t.setContext("permalink",{permalinkFragment:p,version:g}),t.setContext("editor",{regex:r,delimiter:o,flavor:l,flags:c,testString:u,substString:d}),t.setTag("flavor",l),t.setTag("permalink",p),s.regexAreaParser;const f=(0,a.Z)(s,i);t.setContext("redux.state",f)}(s,n,d.getState()),null!=t?(n.setExtra("unhandledPromiseRejection",!0),s.captureException(e,{originalException:t})):s.captureException(e)}))}catch(e){n.Z.error("Unable to submit error report",e),window.onerror=null,window.onunhandledrejection=null}}async function x(e,t){(await g()).captureMessage(e,t)}function f(e){d=e}},40378:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(31807),r=s.n(n),a=s(10084);const i=new class{get(e,t=!0){if(!r())return{};try{if(!window.localStorage||"function"!=typeof window.localStorage.getItem)throw new Error("localStorage not accessible or function `getItem` missing. Aborting.");const t=window.localStorage.getItem(e);return JSON.parse(t)||null}catch(e){if(a.Z.error(e),!t)throw e}}save(e,t,s=!0){if(r())try{if(!window.localStorage||"function"!=typeof window.localStorage.setItem)throw new Error("localStorage not accessible or function `setItem` missing. Aborting.");const s=JSON.stringify(t);window.localStorage.setItem(e,s)}catch(e){if(a.Z.error(e),!s)throw e}}delete(e,t=!0){if(r())try{if(!window.localStorage||"function"!=typeof window.localStorage.removeItem)throw new Error("localStorage not accessible or function `removeItem` missing. Aborting.");window.localStorage.removeItem(e)}catch(e){if(a.Z.error(e),!t)throw e}}}},61939:(e,t,s)=>{"use strict";s.d(t,{C:()=>r});var n=s(42568);const r=s.n(n)()(((e,t,s)=>{if(!e)throw new Error("Missing first color");if(!e)throw new Error("Missing second color");if(isNaN(s))throw new Error(`Invalid amount '${s}'`);const n=a(e),r=a(t),i=s/100;return`rgb(${(r.r-n.r)*i+n.r}, ${(r.g-n.g)*i+n.g}, ${(r.b-n.b)*i+n.b})`}),{maxSize:50});function a(e){(e=e.trim()).length<7&&(e+=e.slice(1));const t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};throw new Error(`Invalid color '${e}'`)}},59747:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var n=s(10084);function r(e){const t=parseFloat(e);let s=e.match(/m?s/);switch(s&&(s=s[0]),s){case"s":return 1e3*t;case"ms":return t;default:return n.Z.error(new Error(`Unknown unit '${s}'`)),0}}},69574:(e,t,s)=>{"use strict";s.d(t,{B3:()=>d,En:()=>C,Fx:()=>v,LG:()=>h,P:()=>p,Rd:()=>m,UJ:()=>g,ZP:()=>u,fZ:()=>j,ji:()=>b,l2:()=>x,yM:()=>f});var n=s(31807),r=s.n(n),a=s(10084);class i{constructor(){this.hasStoppedPropagation=!1}stopPropagation(){this.hasStoppedPropagation=!0}}function o(e){return"string"==typeof e}function l(e){return"function"==typeof e}function c(e){return"object"==typeof e&&null!==e}const u=new class{constructor(){this._events={},this._maxListeners=10}setMaxListeners(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this}emit(e){let t;this._events||(this._events={});const s=this._events[e];if(void 0===s)return!1;const n=new i;if(l(s))switch(arguments.length){case 1:s.call(this,n);break;case 2:s.call(this,n,arguments[1]);break;case 3:s.call(this,n,arguments[1],arguments[2]);break;default:t=[n,...Array.prototype.slice.call(arguments,1)],s.apply(this,t)}else if(c(s)){t=[n,...Array.prototype.slice.call(arguments,1)];const e=s.slice();for(let s=e.length-1;s>=0&&(e[s].apply(this,t),!n.hasStoppedPropagation);s--);}return!0}addListener(e,t){if(r()){if(!l(t))throw TypeError("listener must be a function");return this._events[e]?c(this._events[e])?this._events[e].includes(t)?a.Z.error(new Error(`Listener for ${e} added multiple times. Name: '${t.name}'`)):this._events[e].push(t):this._events[e]===t?a.Z.error(new Error(`Listener for ${e} already added. Name: '${t.name}'`)):this._events[e]=[this._events[e],t]:this._events[e]=t,c(this._events[e])&&!this._events[e].warned&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,a.Z.error(new Error(`Possible EventEmitter memory leak detected. ${this._events[e].length} listeners added. Use setMaxListeners() to increase limit.`))),this}}on(e){if(o(e))return this.addListener.apply(this,arguments);for(const t in e)e.hasOwnProperty(t)&&this.addListener.call(this,t,e[t]);return this}once(e,t){if(!l(t))throw TypeError("listener must be a function");let s=!1;function n(){this.removeListener(e,n),s||(s=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this}removeListener(e,t){if(!l(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;const s=this._events[e];if(s===t||l(s.listener)&&s.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(c(s)){let n=-1;for(let e=s.length-1;e>=0;e--)if(s[e]===t||s[e].listener&&s[e].listener===t){n=e;break}if(n<0)return this;1===s.length?(s.length=0,delete this._events[e]):s.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this}off(e){if(o(e))return this.removeListener.apply(this,arguments);for(const t in e)e.hasOwnProperty(t)&&this.removeListener(t,e[t]);return this}removeAllListeners(e){if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(const e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}const t=this._events[e];if(l(t))this.removeListener(e,t);else if(t)for(;t.length;)this.removeListener(e,t[t.length-1]);return delete this._events[e],this}listeners(e){return this._events&&this._events[e]?l(this._events[e])?[this._events[e]]:this._events[e].slice():[]}listenerCount(e){if(this._events){const t=this._events[e];if(l(t))return 1;if(t)return t.length}return 0}},d="disable:shortcut",h="enable:shortcut",p="flush:state",g="rightSidebar:resize",m="closeLeftSidebar",x="set:substString",f="testlist:open",v="testlist:close",b="matchGroup:click",j="quickref:loadExample",C="loading:finish"},69537:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var n=s(61348),r=s.n(n);const a=e=>e===r().PCRE||e===r().PCRE2},20279:(e,t,s)=>{"use strict";s.d(t,{R:()=>o,n:()=>l});var n=s(42568),r=s.n(n),a=s(10084),i=s(26086);const o=r()((e=>{const t=getComputedStyle(document.documentElement).getPropertyValue(e);if(""===t){const t=new Error(`CSS Variable '${e}' was empty`);a.Z.error(t)}return t}),{maxSize:50}),l=(e,t)=>o(`--match-group-${(e-1)%i.GROUP_COUNT+1}${t?"-alt":""}`)},83950:(e,t,s)=>{"use strict";s.d(t,{Sf:()=>i.Z,vI:()=>r,$5:()=>o.Z,DB:()=>l,aL:()=>C.ZP,kF:()=>p,PS:()=>Z.Z,YX:()=>j,Sj:()=>a.Z});var n=s(67294);const r=(e,t)=>{const s=(0,n.useRef)(!1);(0,n.useEffect)((()=>{let t;return s.current?t=e():s.current=!0,()=>{var e;return null==(e=t)?void 0:e()}}),t),(0,n.useEffect)((()=>()=>s.current=!1),[])};var a=s(56458),i=s(20946),o=s(64700);const l=(e,t)=>{(0,n.useRef)(!1),(0,n.useLayoutEffect)(e,t)};var c=s(70743),u=s(89250),d=s(61607),h=s(26086);const p=(e,t=h.DEFAULT_META_DESCRIPTION)=>{const s=(0,c.I0)(),r=(0,u.TH)();(0,n.useEffect)((()=>{var n;document.title=`regex101: ${e||h.DEFAULT_PAGE_TITLE}`,null==(n=document.querySelector('meta[name="description"]'))||n.setAttribute("content",t),s((0,d.Dk)(e)),s((0,d.Ub)(t))}),[e,t,s,r])};var g=s(98152),m=s(61939),x=s(20279),f=s(73963),v=s(14112);function b(e){e.cache.keys.length=0,e.cache.values.length=0}const j=()=>{const e=(0,c.I0)(),t=(0,c.v9)((e=>e.general.currentTheme)),s=(0,c.v9)((e=>e.settings.theme)),r=(0,n.useState)(t),a=(0,g.Z)(r,2),i=a[0],o=a[1];(0,n.useEffect)((()=>o(t)),[t]),(0,n.useEffect)((()=>{var e,t,n;const r=e=>{var t;if(s!==v.B7||null!=(t=window)&&t.matchMedia("print").matches)return;const n=e.matches?v.Py:v.rp;o(n)};return null==(e=window)||null==(t=e.matchMedia("(prefers-color-scheme: dark)"))||null==(n=t.addEventListener)||n.call(t,"change",r),()=>{var e,t,s;return null==(e=window)||null==(t=e.matchMedia("(prefers-color-scheme: dark)"))||null==(s=t.removeEventListener)?void 0:s.call(t,"change",r)}}),[s,e]),(0,n.useEffect)((()=>{document.documentElement.setAttribute("data-theme",i),function(){const e=document.querySelector("meta[name=theme-color]");e&&e.setAttribute("content",(0,x.R)("--primary-color"))}(),b(x.R),b(m.C),e((0,f.Z)(i))}),[e,i])};var C=s(55030),Z=s(11124)},20946:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var n=s(67294),r=s(91296),a=s.n(r);const i=function(e,t,s="flush"){const r=(0,n.useCallback)(a()(((...t)=>e(...t)),t),[t]);return(0,n.useEffect)((()=>()=>{switch(s){case"flush":return r.flush();case"cancel":return r.cancel();default:throw new Error(`Unknown cleanup '${s}'`)}}),[r,s]),r}},64700:(e,t,s)=>{"use strict";s.d(t,{U:()=>c,Z:()=>u});var n=s(98152),r=s(67294),a=s(70743),i=s(31807),o=s.n(i),l=s(10084);const c=(0,r.createContext)({promises:[],resolvedData:{},redirect:{},addPromise:()=>{},setResolvedData:()=>{},getResolvedData:()=>{},setRedirectTo:()=>{},SSR:!1}),u=e=>{const t=(0,r.useRef)(null),s=(0,a.I0)(),i=(0,r.useContext)(c),u=i.getResolvedData(e),d=(0,r.useState)(u||{loading:!1,error:null}),h=(0,n.Z)(d,2),p=h[0],g=h[1],m=(0,r.useCallback)((n=>{var r,a,c;null==u&&(g({loading:!0,error:null}),null==(r=t.current)||null==(a=r.cancel)||a.call(r),t.current=s(n).then((()=>{t.current=null;const s={loading:!1,error:null};i.setResolvedData(e,s),g(s)})).catch((t=>{if(o()&&t.code===DOMException.ABORT_ERR)l.Z.warn(`Data fetch for '${e}' aborted because the parent has unmounted`),i.setResolvedData(e,{loading:!1,error:null});else{const s={loading:!1,error:t};i.setResolvedData(e,s),g(s)}})),o()&&null==(null==(c=t.current)?void 0:c.cancel)&&l.Z.error(`Fetch '${e}' has no cancel`),i.addPromise(t.current))}),[s,i,e,u]);return(0,r.useEffect)((()=>()=>{var e,s;null==(e=t.current)||null==(s=e.cancel)||s.call(e),t.current=null}),[]),[p.loading,p.error,m]}},55030:(e,t,s)=>{"use strict";s.d(t,{W5:()=>v,ZP:()=>b,yg:()=>f});var n,r,a,i,o,l,c,u=s(67294),d=s(70743),h=s(31807),p=s.n(h),g=s(69574),m=s(41664),x=s(35579);const f=p()&&(null!=(n=navigator)&&null!=(r=n.userAgentData)&&null!=(a=r.platform)&&null!=(i=a.toLowerCase())&&i.includes("mac")||null!=(o=navigator)&&null!=(l=o.userAgent)&&null!=(c=l.toLowerCase())&&c.includes("mac"))?m.v:m.B,v=e=>`${f===m.B?"Ctrl":"\u2318"}+${e}`,b=()=>{const e=(0,d.v9)((e=>e.settings.disableKeyboardShortcuts)),t=(0,u.useRef)([]),s=(0,u.useCallback)((e=>{var s,n,r,a,i,o;const l=e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||"input"===(null==(s=e.target)||null==(n=s.tagName)?void 0:n.toLowerCase())||"textarea"===(null==(r=e.target)||null==(a=r.tagName)?void 0:a.toLowerCase())||(null==(i=e.target)||null==(o=i.className)?void 0:o.includes("cm-content"));for(const s in x)if(Object.prototype.hasOwnProperty.call(x,s)){const n=x[s],r=!!n.metaKey==!!(f===m.v?e.metaKey:e.ctrlKey),a=!!n.altKey==!!e.altKey,i=!!n.shiftKey==!!e.shiftKey,o=n.overrideInput||!l;if((!e.key&&n.keyCode.includes(e.which)||e.key&&n.key.toLowerCase()===e.key.toLowerCase())&&r&&a&&i&&o&&!t.current.includes(n.name)){const t=`key:${n.name}`;(g.ZP.listeners(t).length>0||n.alwaysConsume)&&(e.preventDefault(),e.stopPropagation(),g.ZP.emit(t))}}}),[]);(0,u.useEffect)((()=>{const n=(e,s)=>{t.current=t.current.filter((e=>e!==s.name))},r=(e,s)=>t.current.push(s.name);return e||(document.addEventListener("keydown",s),g.ZP.on({[g.LG]:n,[g.B3]:r})),()=>{document.removeEventListener("keydown",s),g.ZP.off({[g.LG]:n,[g.B3]:r})}}),[e,s])}},11124:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var n=s(98152),r=s(67294),a=s(31807),i=s.n(a);const o=function(){var e,t;const s=(0,r.useState)(!!i()&&!(null==(e=window)||null==(t=e.matchMedia("(prefers-reduced-motion: reduce)"))||!t.matches)),a=(0,n.Z)(s,2),o=a[0],l=a[1];return(0,r.useEffect)((()=>{var e;const t=null==(e=window)?void 0:e.matchMedia("(prefers-reduced-motion: reduce)");if(null!=(null==t?void 0:t.addEventListener)){const e=()=>{l(null==t?void 0:t.matches)};return null==t||t.addEventListener("change",e),()=>null==t?void 0:t.removeEventListener("change",e)}}),[]),o}},56458:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(98152),r=s(67294),a=s(31807),i=s.n(a);const o=(0,r.createContext)({isMobile:!1}),l=(...e)=>{const t=(()=>{const e=(0,r.useContext)(o).isMobile;return i()?{width:window.innerWidth,height:window.innerHeight}:e?{width:414,height:896}:{width:1920,height:1080}})(),s=t.width,a=t.height,l=(0,r.useState)({width:s,height:a}),c=(0,n.Z)(l,2),u=c[0],d=c[1];return(0,r.useEffect)((()=>{let t,s=u.width;return window.addEventListener("resize",t=()=>{const t=window.innerWidth,n=window.innerHeight;for(let r=0,a=e.length;r<a;r++){const a=e[r];if(t<a&&a<s||t>=a&&s<=a){d({width:t,height:n}),s=t;break}}},{passive:!0}),()=>{window.removeEventListener("resize",t,{passive:!0})}}),[u,e]),u}},10084:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var n=s(2043);const r=s.n(n)()},32092:(e,t,s)=>{"use strict";s.d(t,{Et:()=>a,Gz:()=>r,uf:()=>n});const n=e=>e.toString().replace(/\B(?=(?:.{3})+$)/g,"\u2009");function r(e){const t=["th","st","nd","rd"],s=e%100;return e+(t[(s-20)%10]||t[s]||t[0])}const a=e=>Math.max(0,e+(e>0?.5:-.5)<<0)},77891:(e,t,s)=>{"use strict";s.d(t,{B:()=>r});var n=s(98152);const r=(e,t)=>{const s=new URLSearchParams(null!=t?Array.from(t.entries()):[]);for(const t of Object.entries(e)){var r=(0,n.Z)(t,2);const e=r[0],a=r[1];Array.isArray(a)?(s.delete(e),a.forEach((t=>s.append(e,t)))):s.set(e,a)}return s.toString()}},86565:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r,a:()=>a});let n={};const r=function(e){return(n[e]||e).replace(/#?{[1-9]\d*}/g,(t=>{if("#"===t.charAt(0))return t.slice(1);const s=parseInt(t.slice(1,-1),10);if(null==arguments[s])throw new Error(`Placeholder '${s}' referencing invalid argument: '${e}'`);if("string"!=typeof arguments[s]&&"number"!=typeof arguments[s])throw new Error(`Placeholder '${s}' is not a string: '${typeof arguments[s]}'`);return arguments[s]}))};function a(e){n=e}},48186:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n=e=>{const t="string"==typeof e?e.split(""):e;return t.filter(((e,s)=>t.indexOf(e)===s))}},67333:(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var n=s(61348),r=s.n(n);function a(){return new Worker(s.p+"golang.worker.24ce49bb639142208752.js")}function i(){return new Worker(s.p+"pcre2.worker.b129e26ccdd47409e923.js")}function o(){return new Worker(s.p+"pcre.worker.39384b9f7ddb082d6c60.js")}function l(){return new Worker(s.p+"javascript.worker.89fda8453390beb8cf38.js")}function c(){return new Worker(s.p+"java.worker.79ec1d1c8623e9b31ed6.js")}function u(){return new Worker(s.p+"dotnet.worker.51df172998c7a6ecfc31.js")}function d(){return new Worker(s.p+"rust.worker.54f002ade56812950ca8.js")}var h=s(30317),p=s(25613),g=s(56468);let m={regex:null,flags:null};function x(e,t,s){return t===g.MW&&"\\Z"===e?"\\z":t===g.MW&&"\\v"===e?"\\x{0B}":t===g.Wj&&"{,"===e.slice(0,2)?"{0,"+e.slice(2):t===g.Yb&&"\\u"===e.slice(0,2).toLowerCase()?"\\x{"+e.slice(2)+"}":t===g.t0&&p.i.test(e)?e.slice(1):s&&t===g.zl&&".=:".includes(e)?"\\"+e:t===g.RW?e.replace(/[au]/g,""):t===g.MW&&"\\v"===e?"\\x0B":e}var f=s(34426);class v extends f.Z{getWorker(e){switch(e){case r().PCRE2:return i;case r().PCRE:case r().PYTHON:return o;case r().JAVASCRIPT:return l;case r().GOLANG:return a;case r().JAVA:return c;case r().DOTNET:return u;case r().RUST:return d;default:throw new Error(`No worker file exists for flavor '${e}'`)}}runMatch(e,t,s,n,a={},i){let o={regex:null!=e?e:"",delimiter:null!=t?t:"",flags:null!=s?s:"",testString:null!=n?n:"",options:{isDebugging:!!a.debugging,calculateSteps:!!a.calculateRegexSteps}};return a.flavor===r().PYTHON&&(o=function(e){if(null!=m.regex&&null!=m.flags&&m.regex===e.regex&&m.flags===e.flags)return Object.assign(Object.assign({},e),{},{regex:m.cachedRegex,flags:m.cachedFlags,options:Object.assign(Object.assign({},e.options),{},{bumpalong:!0})});const t=(0,h.Z)(e.regex,{flavor:r().PYTHON,flags:e.flags}),s=t.tokens;if(t.patternError)throw new Error(`Python pattern error: ${e.regex}`);let n="",a="";for(let e=0,t=s.length;e<t;e++){const t=s[e],r=t.type;n+=x(t.string,r,t.inCharClass)}const i=(s[0].children.length>0?s[0].children[0]:s[0]).flags;a=i.includes("a")?i.replace(/[au]/g,"")+"P":i.replace(/a/g,"")+"u";const o=Object.assign(Object.assign({},e),{},{regex:n,flags:a,options:Object.assign(Object.assign({},e.options),{},{bumpalong:!0})});return m={regex:e.regex,flags:e.flags,cachedRegex:n,cachedFlags:a},o}(o)),super.runWorker(o,a,i)}}const b=v},34426:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(56538),r=s(26086),a=s(61348),i=s.n(a),o=s(10084);const l=class{constructor(){this._worker=null,this._timeout=null,this._currentFlavor=null,this._runTimeout=null,this._recentReset=!1}getWorker(){throw new Error("Method not implemented")}runWorker(e,t,s){this.isRunning()&&(this._recentReset=!0,this.resetWorker()),clearTimeout(this._runTimeout),this._runTimeout=setTimeout((()=>{this._recentReset=!1,this._runWorker(e,t,s)}),this._recentReset?r.UPDATE_RESULT_DELAY:1)}async _runWorker(e,t={},s){if(t.maxExecutionTime||(t.maxExecutionTime=2e3),t.flavor||(t.flavor=i().PCRE2),t.flavor!==this._currentFlavor&&(this._currentFlavor=t.flavor,this.resetWorker()),!this._worker)try{await this._createWorker(),this._worker.callback=s,this._worker.onmessage=e=>{clearTimeout(this._timeout),this._timeout=null,this._worker.callback(e.data,e.data.error||null)},this._worker.onerror=e=>{e.preventDefault(),o.Z.warn("Web worker encountered an unhandled error:",e.filename,"Line:",e.lineno,"Col:",e.colno,"Msg:",e.message),(this._worker.callback||s)(null,n.Y8)}}catch(e){return o.Z.error(e),void s(null,n.Y8)}this._worker&&(this._worker.callback=s),this._timeout=setTimeout((()=>{this._worker.callback(null,n.ik),this.resetWorker()}),t.maxExecutionTime),this._worker.postMessage(e)}isRunning(){return null!=this._timeout}resetWorker(){clearTimeout(this._runTimeout),clearTimeout(this._timeout),this._timeout=null,this._runTimeout=null,this._worker&&(this._worker.callback=()=>{},this._worker.terminate(),this._worker=null)}async _createWorker(){return clearTimeout(this._timeout),this._timeout=null,new Promise(((e,t)=>{const s=this.getWorker(this._currentFlavor);this._worker=new s,this._timeout=setTimeout((()=>(this.resetWorker(),t(new Error("Unable to load worker, timeout after 10s")))),1e4),this._worker.onmessage=t=>{"onload"===t.data&&(clearTimeout(this._timeout),e())},this._worker.onerror=e=>{e.stopPropagation(),e.preventDefault(),t(e)}}))}}},16548:(e,t,s)=>{"use strict";s.d(t,{P:()=>eh});var n={};s.r(n),s.d(n,{account:()=>G,general:()=>L,libraryEntry:()=>q,quiz:()=>Y,regexAreaParser:()=>J,regexEditor:()=>j,regexLibrary:()=>$,rightSidebar:()=>g,settings:()=>y,unitTests:()=>w});var r=s(20745);function a(e){if(e.status>=200&&e.status<300)return e;const t=new Error(e.statusText);throw t.response=e,t}var i=s(10084),o=s(14890),l=s(53894);const c="EXPLANATION",u="MATCH_INFO",d="QUICKREF";var h=s(45703);const p={activeSubsection:c,visibleSections:[c,u,d],hiddenSections:[],width:null},g=function(e=p,t={}){switch(t.type){case h.CJ:return Object.assign(Object.assign({},e),{},{width:t.value});case h.ro:const s=t.value.subsection;return e.visibleSections.includes(s)?Object.assign(Object.assign({},e),{},{visibleSections:e.visibleSections.filter((e=>e!==s)),hiddenSections:[...e.hiddenSections,s]}):Object.assign(Object.assign({},e),{},{visibleSections:[...e.visibleSections,s],hiddenSections:e.hiddenSections.filter((e=>e!==s))});case h.WV:return Object.assign(Object.assign({},e),{},{activeSubsection:t.value});case h.tc:return Object.assign(Object.assign({},e),{},{activeSubsection:c});default:return e}};var m=s(61348),x=s.n(m),f=s(18757),v=s.n(f);const b={flavor:m.PCRE2,delimiter:"/",flags:"gm",regex:"",testString:"",matchResult:[],error:null,substString:"",listSubstString:"",hasUnsavedData:!1,regexVersions:[],showMatchArea:!0,showSubstitutionArea:!1,showUnitTestArea:!1,showListSubstitutionArea:!1};function j(e=b,t={}){var s;switch(t.type){case h.r$:return Object.assign(Object.assign({},e),{},{listSubstString:t.value});case h.R8:return Object.assign(Object.assign({},e),{},{showMatchArea:!1,showSubstitutionArea:!1,showUnitTestArea:!1,showListSubstitutionArea:!0,hasUnsavedData:""!==e.regex||""!==e.testString});case h.YW:return Object.assign(Object.assign({},e),{},{showMatchArea:!1,showSubstitutionArea:!1,showUnitTestArea:!0,showListSubstitutionArea:!1});case h.T_:return Object.assign(Object.assign({},e),{},{showMatchArea:!1,showSubstitutionArea:!0,showUnitTestArea:!1,showListSubstitutionArea:!1,hasUnsavedData:""!==e.regex||""!==e.testString});case h.RS:return Object.assign(Object.assign({},e),{},{showMatchArea:!0,showSubstitutionArea:!1,showUnitTestArea:!1,showListSubstitutionArea:!1});case h.hl:return Object.assign(Object.assign({},e),{},{flavor:t.value,hasUnsavedData:!0});case h.DA:return Object.assign(Object.assign({},e),{},{flags:t.value,hasUnsavedData:!0});case h.Sr:return Object.assign(Object.assign({},e),{},{delimiter:t.value,hasUnsavedData:!0});case h.KE:const n=t.value;return 0!==n.length||0!==e.matchResult.length&&0===n.length?Object.assign(Object.assign({},e),{},{matchResult:n}):e;case h.u8:return Object.assign(Object.assign({},e),{},{substString:t.value,hasUnsavedData:t.value!==e.substString||e.hasUnsavedData});case h.a0:return Object.assign(Object.assign({},e),{},{regex:t.value,hasUnsavedData:t.value!==e.regex||e.hasUnsavedData});case h.Cy:return Object.assign(Object.assign({},e),{},{testString:t.value,hasUnsavedData:t.value!==e.testString||e.hasUnsavedData});case h.Nl:return Object.assign(Object.assign({},e),{},{error:t.value});case h.lA:case h.rT:case h.LM:case h.mo:return Object.assign(Object.assign({},e),{},{hasUnsavedData:!0});case h.nU:return Object.assign(Object.assign({},e),{},{hasUnsavedData:!t.value.permalinkFragment});case h.sk:let r=e.flavor||m.PCRE2;""===e.regex&&e.flavor===m.PCRE2&&null!=(s=t.value.settings)&&s.defaultFlavor&&(r=t.value.settings.defaultFlavor);let a=e.delimiter;return v()[r].includes(a)||(a=v()[r][0]),Object.assign(Object.assign({},e),{},{flavor:r,delimiter:a,hasUnsavedData:!1});case h.r0:return Object.assign(Object.assign({},e),{},{regexVersions:t.value});default:return e}}var C=s(14112);const Z={maxExecutionTime:2e3,theme:C.B7,nonParticipatingGroups:!1,displayWhitespace:!0,colorizeSyntax:!0,wrapLines:!0,testAreaLineNumbers:!1,regexAreaLineNumbers:!1,language:"ENGLISH",storageSaved:null,storageLoaded:null,editorTooltips:!0,alwaysCollapseLeftSidebar:!1,alwaysCollapseRightSidebar:!1,defaultFlavor:m.PCRE2,showWarningUnsavedProgress:!0,defaultCodeGenLanguage:"",calculateRegexSteps:!0,defaultTabBehavior:!0,disableKeyboardShortcuts:!1,lineSeparator:""},y=function(e=Z,t={}){switch(t.type){case h.jo:return Object.assign(Object.assign({},e),t.value);case h.sk:return Object.assign(Object.assign({},e),{},{storageLoaded:(new Date).getTime()});case h.fB:return Object.assign(Object.assign({},e),{},{storageSaved:(new Date).getTime()});default:return e}};var E=s(45987);const T="PASS",k="FAIL",N="ALL";function S(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var n=s.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}const _={tests:[],testResults:{},testsRunning:!1,testFilter:N},w=function(e=_,t={}){let s;switch(t.type){case h.lA:return Object.assign(Object.assign({},e),{},{tests:[...e.tests,Object.assign(Object.assign({},t.value),{},{key:Math.random().toString(36).slice(2)})]});case h.rT:const n=e.tests[t.value].key,r=e.testResults,a=(r[n],(0,E.Z)(r,[n].map(S)));return Object.assign(Object.assign({},e),{},{tests:[...e.tests.slice(0,t.value),...e.tests.slice(t.value+1)],testResults:a});case h.LM:{const s=t.value,n=s.testKey,r=s.test,a=e.tests.findIndex((e=>e.key===n));return null==a?(i.Z.warn(`Tried to update unit test with ${n} but could not find it`),e):Object.assign(Object.assign({},e),{},{tests:[...e.tests.slice(0,a),Object.assign(Object.assign({},e.tests[a]),r),...e.tests.slice(a+1)]})}case h.mo:const o=t.value.oldIndex,l=t.value.newIndex;return s=e.tests.slice(),s.splice(l,0,s.splice(o,1)[0]),Object.assign(Object.assign({},e),{},{tests:s});case h.p2:return Object.assign(Object.assign({},e),{},{testsRunning:!0});case h.lZ:return Object.assign(Object.assign({},e),{},{testsRunning:!1});case h.ES:{const s=t.value,n=s.testKey,r=s.error,a=s.steps,i=s.time;return Object.assign(Object.assign({},e),{},{testResults:Object.assign(Object.assign({},e.testResults),{},{[n]:{error:r,hasError:!!r,steps:a||null,time:i}})})}case h.Jb:return Object.assign(Object.assign({},e),{},{testFilter:t.value});default:return e}};var A=s(73963);function O(e){const t=e.getState().settings.theme;e.dispatch((0,A.Z)(t===C.B7?I():t))}function I(){var e,t,s;return null!=(e=window)&&null!=(t=e.matchMedia)&&null!=(s=t.call(e,"(prefers-color-scheme: dark)"))&&s.matches?C.Py:C.rp}var R=s(26086);const P={permalinkFragment:null,version:null,userId:null,email:null,profilePicture:null,serviceProvider:null,isFavorite:!1,isLibraryEntry:!1,title:null,documentTitle:R.DEFAULT_PAGE_TITLE,metaDescription:R.DEFAULT_META_DESCRIPTION,tags:[],cookie:"",sponsorData:null,currentTheme:C.B7,permalinkIsEditable:!0,isOwner:!1},L=function(e=P,t={}){switch(t.type){case h._:return Object.assign(Object.assign({},e),{},{permalinkIsEditable:t.value});case h.jo:return Object.assign(Object.assign({},e),{},{currentTheme:t.value.theme===C.B7?I():t.value.theme});case h.yM:return Object.assign(Object.assign({},e),{},{currentTheme:t.value});case h.qI:return Object.assign(Object.assign({},e),{},{sponsorData:t.value||null});case h.nU:const s=t.value,n=s.permalinkFragment,r=s.version,a=s.isLibraryEntry,i=void 0===a?e.isLibraryEntry:a,o=s.title,l=void 0===o?e.title:o,c=s.tags,u=void 0===c?e.tags:c,d=s.isOwner,p=void 0===d?e.isOwner:d;return Object.assign(Object.assign({},e),{},{error:null,isFavorite:n===e.permalinkFragment&&e.isFavorite,permalinkFragment:n,version:r,isLibraryEntry:i||n===e.permalinkFragment&&e.isLibraryEntry,title:l,tags:u,isOwner:p,permalinkIsEditable:!0});case h.RT:const g=t.value,m=g.userId,x=g.email,f=g.profilePicture,v=g.serviceProvider;return Object.assign(Object.assign({},e),{},{userId:m,email:x,profilePicture:f,serviceProvider:v});case h.yF:return Object.assign(Object.assign({},e),{},{isFavorite:t.value});case h.th:return Object.assign(Object.assign({},e),{},{cookie:t.value});case h.se:return Object.assign(Object.assign({},e),{},{title:t.value});case h.CN:return Object.assign(Object.assign({},e),{},{tags:t.value});case h.ol:return Object.assign(Object.assign({},e),{},{documentTitle:t.value});case h.lK:return Object.assign(Object.assign({},e),{},{metaDescription:t.value});default:return e}};var M=s(48186);const D=["itemIndex"],U={data:[],pages:0,allTags:[],staleData:!0};function F(e,t,s){return{data:[...e.data.slice(0,t),s,...e.data.slice(t+1)]}}const G=function(e=U,t={}){switch(t.type){case h.sH:return Object.assign(Object.assign({},e),t.value);case h.Ht:const s=t.value,n=s.itemIndex,r=(0,E.Z)(s,D),a=Object.assign(Object.assign({},e.data[n]),r);return Object.assign(Object.assign({},e),F(e,n,a));case h.Xm:const i=t.value,o=i.itemIndex,l=i.tags,c=Object.assign(Object.assign({},e.data[o]),{},{tags:[...l]}),u=(0,M.Z)(e.allTags.concat(l));return Object.assign(Object.assign(Object.assign({},e),F(e,o,c)),{},{allTags:u});case h.go:return U;default:return e}},V={libraryData:[],pages:0,details:null};function B(e,t){let s=e.userVote>0?e.upvotes-1:e.upvotes,n=e.userVote<0?e.downvotes-1:e.downvotes;return t>0?s++:t<0&&n++,Object.assign(Object.assign({},e),{},{userVote:t,upvotes:s,downvotes:n})}const $=function(e=V,t={}){switch(t.type){case h.b9:const n=t.value,r=n.libraryData,a=n.pages;return Object.assign(Object.assign({},e),{},{libraryData:r,pages:a});case h.BS:{const s=t.value,n=s.vote,r=s.permalinkFragment,a=e.libraryData.findIndex((e=>e.permalinkFragment===r));return-1===a||null==e.libraryData[a]?e:Object.assign(Object.assign({},e),{},{libraryData:[...e.libraryData.slice(0,a),B(e.libraryData[a],n),...e.libraryData.slice(a+1)]})}case h.mX:return Object.assign(Object.assign({},e),{},{details:t.value});case h.Kg:{var s;const n=t.value,r=n.permalinkFragment,a=n.isFavorite,i=e.libraryData.findIndex((e=>e.permalinkFragment===r));return Object.assign(Object.assign({},e),{},{libraryData:null==i?e.libraryData:[...e.libraryData.slice(0,i),Object.assign(Object.assign({},e.libraryData[i]),{},{isFavorite:a}),...e.libraryData.slice(i+1)],details:(null==(s=e.details)?void 0:s.permalinkFragment)===r?Object.assign(Object.assign({},e.details),{},{isFavorite:a}):e.details})}default:return e}},H={title:null,description:null,author:null},q=function(e=H,t={}){if(t.type===h.DE){const s=t.value,n=s.title,r=s.description,a=s.author;return Object.assign(Object.assign({},e),{},{title:n,description:r,author:a})}return e},z=["taskIdx"],W={allTasks:[]},Y=function(e=W,t={}){switch(t.type){case h.te:return Object.assign(Object.assign({},e),{},{allTasks:t.value.reduce(((t,s,n)=>e.allTasks[n]?[...t,Object.assign(Object.assign({},e.allTasks[n]),s)]:[...t,s]),[])});case h.nA:const s=t.value,n=s.errorMessage,r=s.testNumber,a=s.totalTests;return Object.assign(Object.assign({},e),{},{allTasks:[...e.allTasks.slice(0,t.value.taskNumber),Object.assign(Object.assign({},e.allTasks[t.value.taskNumber]),{},{errorMessage:n,failingTestNumber:r,totalTests:a}),...e.allTasks.slice(t.value.taskNumber+1)]});case h.Sb:const i=t.value,o=i.taskNumber,l=i.successMessage;return Object.assign(Object.assign({},e),{},{allTasks:[...e.allTasks.slice(0,o),Object.assign(Object.assign({},e.allTasks[o]),{},{successMessage:l,errorMessage:null,hasSolved:!0}),...e.allTasks.slice(o+1)]});case h.F:const c=t.value,u=c.taskIdx,d=(0,E.Z)(c,z);return Object.assign(Object.assign({},e),{},{allTasks:[...e.allTasks.slice(0,u),Object.assign(Object.assign({},e.allTasks[u]),{},{latest:Object.assign(Object.assign({},e.allTasks[u].latest),d)}),...e.allTasks.slice(u+1)]});case h.$Z:const p=t.value,g=p.taskIdx,m=p.stats;return Object.assign(Object.assign({},e),{},{allTasks:[...e.allTasks.slice(0,g),Object.assign(Object.assign({},e.allTasks[g]),{},{stats:m}),...e.allTasks.slice(g+1)]});default:return e}},K={tokens:[],subpatterns:[],captureGroupMap:{},captureGroupCount:0,status:null,definedSubpatterns:[]},J=function(e=K,t={}){return t.type===h.NJ?Object.assign(Object.assign({},e),t.value):e};var X=s(61607);const Q=function(e,t){const s={};return t.forEach((t=>s[t]=e[t])),s};var ee=s(40378),te=s(31807),se=s.n(te);const ne=(e,t)=>re(e,t);function re(...e){const t=e=>e&&"object"==typeof e;return e.reduce(((e,s)=>(Object.keys(s).forEach((n=>{const r=e[n],a=s[n];Array.isArray(a)?e[n]=a:t(r)&&t(a)?e[n]=re(r,a):e[n]=a})),e)),{})}const ae={[h.rx]:{reducersToSave:["settings","rightSidebar"],key:R.STATE_STORAGE_KEY},[h.xw]:{reducersToSave:["regexEditor"],key:R.STATE_TEMP_REGEX_EDITOR_KEY}};function ie(){se()&&(window.plausible=window.plausible||function(){(window.plausible.q=window.plausible.q||[]).push(arguments)})}var oe=s(2043),le=s.n(oe),ce=s(55511),ue=s.n(ce);function de(){const e=/test/,t=void 0!==e.unicode,s=void 0!==e.dotAll;let n=void 0!==e.sticky;const r=void 0!==e.hasIndices;try{"aaa".match(/^a/gy).length>1&&(n=!1,i.Z.warn("Sticky flag for JS has been disabled as behavior in this browser is non-standard"))}catch(e){i.Z.warn("Unable to test for sticky flag, continuing...")}ue().extendFlags(x().JAVASCRIPT,(n?"y":"")+(t?"u":"")+(s?"s":"")+(r?"d":""))}var he=s(27428);function pe(){try{new RegExp("(?<=test)regex").test("testregex")&&(he.SC.lookbehind=!0)}catch(e){i.Z.warn("This browser does not have lookbehind support for the javascript flavor")}try{new RegExp("(?<name>test)").test("test")&&(he.SC.namedGroup=!0)}catch(e){i.Z.warn("This browser does not have named group support for the javascript flavor")}try{new RegExp("\\p{Letter}","u").test("test")&&(he.SC.unicodeProperty=!0)}catch(e){i.Z.warn("This browser does not have named group support for the javascript flavor")}}function ge(){"serviceWorker"in navigator&&window.addEventListener("load",(()=>{navigator.serviceWorker.register("/sw.js").then((()=>i.Z.info("Successfully registered service worker")),(e=>i.Z.warn("Unable to initializer service worker, proceeding.",e)))}),{once:!0})}var me=s(14144),xe=s.n(me);function fe(e){window.addEventListener("load",(()=>ve(e)),{once:!0})}const ve=e=>{const t=ee.Z.get("regex101-sponsor"),s=!Array.isArray(t)&&t||null;if(s){const e=(new Date).toDateString();Object.keys(s).forEach((t=>{const n=s[t];new Date(n.lastSeen).toDateString()!==e&&(n.lastSeen=new Date,n.todayCount=0)}))}const n="https://srv.buysellads.com/ads/CESIEKJM.json"+(s?"?freqcap="+Object.keys(s).map((e=>{const t=s[e],n=t.allTimeCount;return`${e}:${t.todayCount},${n}`})).join(";"):"");new Promise((e=>setTimeout(e,500))).then((()=>xe()(n))).then((e=>e.json())).then((t=>{t&&t.ads&&Array.isArray(t.ads)&&e.dispatch((0,X.IU)(s,t.ads.find((e=>!(null==e||!e.statlink)))))})).catch((t=>{le().error("Unable to load sponsor data",t),e.dispatch({type:h.qI,value:{adBlock:!0}})}))};async function be(e){const t=e.getState().settings.language;null!=t&&"ENGLISH"!==t&&await e.dispatch((0,X.BF)(t,!1))}function je(){document.body.addEventListener("mousedown",(()=>{document.body.classList.remove("using-keyboard")})),document.body.addEventListener("keydown",(e=>{"Tab"!==e.key&&9!==e.which&&9!==e.keyCode||document.body.classList.add("using-keyboard")}))}function Ce(){ee.Z.delete(R.STATE_TEMP_REGEX_EDITOR_KEY)}var Ze=s(75573);async function ye(){var e;null!=(e=location)&&e.hostname.startsWith("regex101.com")||(0,Ze.uT)("Unknown location",{location:location.href})}var Ee=s(67294),Te=s(70743),ke=s(79655),Ne=s(89250),Se=s(94184),_e=s.n(Se),we=s(83950),Ae=s(86565),Oe=s(69574),Ie=s(68821),Re=s(98152),Pe=s(79352),Le=s(47516),Me=s(5434),De=s(56458),Ue=s(97930);const Fe="mNcTS",Ge="j_FSe";var Ve=s(85893);const Be=parseFloat(Ue.bP),$e=({noClick:e,className:t})=>{const s=(0,De.Z)(Be);return(0,Ve.jsx)("h1",{children:(0,Ve.jsxs)(Ie.rU,{className:_e()("djxIS",e&&"SZppj",t),to:"/",absolute:!0,tabIndex:e?-1:0,"aria-label":"regular expressions 101",children:[Be>=s.width?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",{className:Fe,children:"Reg"}),(0,Ve.jsx)("span",{className:Ge,children:"Ex"})]}):(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",{className:Fe,children:"Regular"})," ",(0,Ve.jsx)("span",{className:Ge,children:"Expressions"})," "]}),(0,Ve.jsx)("span",{className:"kkc8H",children:"101"})]})})};var He=s(58090);const qe=parseFloat(Ue.Pt),ze=(0,Ee.forwardRef)((({link:e,icon:t,text:s,label:n,className:r,direction:a=He.qF.S,onClick:i},o)=>{const l=(0,De.Z)(qe);return qe>=l.width?(0,Ve.jsx)(Ie.x6,{to:e,noTheme:!0,absolute:!0,target:"_blank",tooltip:n,onClick:i,tooltipDirection:a,size:28,className:_e()("jm3JB","v_pM0"),ref:o,children:(0,Ve.jsx)(t,{className:r,size:16})}):(0,Ve.jsxs)(Ie.rU,{className:"a4ddH",to:e,noTheme:!0,absolute:!0,target:"_blank","aria-label":n,onClick:i,children:[(0,Ve.jsx)(t,{className:_e()("xfXAE",r),size:14}),(0,Ve.jsx)("span",{className:"t1rej",children:s})]})})),We=(0,Ee.memo)(ze);var Ye=s(42613),Ke=s(50006),Je=s(45527),Xe=s(52936);const Qe=["fallback","className"],et=se()?(0,Ee.lazy)((()=>Promise.all([s.e(215),s.e(101)]).then(s.bind(s,71102)))):()=>{},tt=e=>{let t=e.fallback,s=e.className,n=(0,E.Z)(e,Qe);const r=(0,Ve.jsxs)("div",{className:_e()("GIfGY",s),children:[(0,Ve.jsx)(Ie.$j,{className:"V0n59",size:He.J7.TC}),(0,Ve.jsx)("div",{className:"TnH56",children:(0,Ae.Z)("Loading markdown...")})]});return(0,Ve.jsx)(Ie.I2,{fallback:t||r,children:(0,Ve.jsx)(et,Object.assign(Object.assign({},n),{},{className:s}))})},st=({isOpen:e,onModalClose:t,title:s,textUrl:n,maxLineCount:r=50})=>{const a=(0,Ee.useState)(""),o=(0,Re.Z)(a,2),l=o[0],c=o[1],u=(0,Ee.useState)(!1),d=(0,Re.Z)(u,2),h=d[0],p=d[1],g=(0,Ee.useState)({isFetching:!1,fetchError:!1}),m=(0,Re.Z)(g,2),x=m[0],f=m[1],v=(0,Ee.useCallback)((()=>p(!0)),[]);(0,Ee.useEffect)((()=>{let t=null;return e&&(c(""),f({isFetching:!0,fetchError:!1}),t=fetch(n).then((e=>e.text())).then((e=>{c(e),f({isFetching:!1,fetchError:!1})})).catch((e=>{e.code!==DOMException.ABORT_ERR&&(i.Z.error("Unable to fetch text",e),f({isFetching:!1,fetchError:!0}))}))),()=>{var e;null==(e=t)||e.cancel()}}),[e,n]),(0,Ee.useEffect)((()=>()=>p(!1)),[e]);const b=(0,Ve.jsxs)("div",{className:"e4TKI",children:[(0,Ve.jsx)(Ie.$j,{className:"emNHs"}),(0,Ve.jsx)("div",{className:"J0NvP",children:(0,Ae.Z)("Loading content...")})]}),j=l.split("\n").slice(0,r).join("\n"),C=j===l;return(0,Ve.jsxs)(Ye.Z,{onModalClose:t,isOpen:e,children:[(0,Ve.jsx)(Ke.Z,{children:s}),(0,Ve.jsxs)(Je.Z,{children:[x.isFetching&&b,x.fetchError&&(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,children:(0,Ae.Z)("Unable to fetch content, please try again later")}),!x.isFetching&&!x.fetchError&&(0,Ve.jsx)(tt,{className:"pWUrQ",fallback:b,children:h?l:j}),!h&&!C&&(0,Ve.jsx)(Ie.zx,{onClick:v,text:(0,Ae.Z)("Show all"),className:"rZtsn"})]}),(0,Ve.jsx)(Xe.Z,{children:(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:t,type:He.V5.n1})})]})},nt="Gceny",rt=parseFloat(Ue.p4),at=parseFloat(Ue.D6),it=({alwaysCollapseLeftSidebar:e,alwaysCollapseRightSidebar:t})=>{const s=(0,De.Z)(rt,at),n=(0,Ee.useState)(!1),r=(0,Re.Z)(n,2),a=r[0],i=r[1],o=(0,Ne.TH)(),l=!/^\/(?:account.*|settings.*|library.*|quiz\/?)$/.test(o.pathname),c=e||s.width<=rt,u=t||s.width<at;return(0,Ve.jsxs)("header",{className:_e()(nt,c&&"V13Sk",l&&u&&"wlvok"),children:[(0,Ve.jsx)($e,{className:"ZPud1"}),(0,Ve.jsxs)("div",{className:"YxYLF",children:[(0,Ve.jsx)(We,{className:"LTJnM",label:(0,Ae.Z)("Follow me on twitter!"),text:"@regex101",icon:Pe.x2F,link:"https://twitter.com/regex101"}),(0,Ve.jsx)(We,{className:"paRbz",label:(0,Ae.Z)("Like regex101? Support it by donating!"),text:(0,Ae.Z)("Donate"),icon:Le.pu9,link:R.DONATION_LINK}),(0,Ve.jsx)(We,{className:"FRRzx",label:(0,Ae.Z)("Become a sponsor!"),text:(0,Ae.Z)("Sponsor"),icon:Pe.iB2,link:R.SPONSOR_LINK}),(0,Ve.jsx)(We,{className:"azy0N",label:(0,Ae.Z)("Send me an email"),text:(0,Ae.Z)("Contact"),icon:Pe.YTS,link:"mailto:contact@regex101.com"}),(0,Ve.jsx)(We,{className:"h8KP1",label:(0,Ae.Z)("Bugs or suggestions go here"),text:(0,Ae.Z)("Bug Reports & Feedback"),icon:Me.mvF,link:"https://github.com/firasdib/Regex101/issues"}),(0,Ve.jsx)(We,{className:"x0HyW",label:(0,Ae.Z)("Wiki (Info & FAQ)"),text:(0,Ae.Z)("Wiki"),icon:Pe.qvv,link:"https://github.com/firasdib/Regex101/wiki"}),(0,Ve.jsx)(We,{direction:He.qF.SW,className:"OFFYM",label:(0,Ae.Z)("What's new?"),text:(0,Ae.Z)("What's new?"),icon:Pe.lBz,link:"/static/assets/changelog.md",onClick:e=>{e.preventDefault(),e.stopPropagation(),i(!0)}})]}),(0,Ve.jsx)(st,{isOpen:a,onModalClose:()=>i(!1),textUrl:"/static/assets/changelog.md",title:(0,Ae.Z)("What's new?")})]})},ot=(0,Ee.memo)(it);var lt=s(59747),ct=s(14882);const ut=(0,lt.Z)(ct.ug),dt={exit:"uKbj5",exitActive:"xPMjQ"},ht=()=>{const e=(0,Ee.useState)(!0),t=(0,Re.Z)(e,2),s=t[0],n=t[1],r=(0,Ee.useState)(!0),a=(0,Re.Z)(r,2),i=a[0],o=a[1];return(0,Ee.useEffect)((()=>(Oe.ZP.once(Oe.En,(()=>{n(!1),setTimeout((()=>o(!1)),ut)})),()=>clearTimeout(void 0))),[]),i?(0,Ve.jsx)(Ie.uT,{className:_e()("QzY4i",!s&&"sr6nN"),classNames:dt,appear:!1,enter:!1,timeout:ut,in:s,forceAnimation:!0,children:(0,Ve.jsxs)("div",{className:"sNjVA",children:[(0,Ve.jsx)("div",{className:nt,children:(0,Ve.jsx)($e,{noClick:!0})}),(0,Ve.jsxs)("div",{className:"GwqPG",children:[(0,Ve.jsx)(Ie.$j,{}),(0,Ve.jsx)("div",{className:"RIMEV",children:(0,Ae.Z)("Please wait while the app is loading...")})]}),(0,Ve.jsx)(Ie.A5,{})]})}):null},pt=(0,Ee.memo)(ht),gt=(e,t)=>{!se()&&window.plausible||window.plausible(e,t)};var mt=s(80362),xt=s(62238),ft=s(56315);const vt="wcfss",bt=[{flavor:x().PCRE2,text:"PCRE2 (PHP >=7.3)"},{flavor:x().PCRE,text:"PCRE (PHP <7.3)"},{flavor:x().JAVASCRIPT,text:"ECMAScript (JavaScript)"},{flavor:x().PYTHON,text:"Python"},{flavor:x().GOLANG,text:"Golang"},{flavor:x().JAVA,text:"Java 8"},{flavor:x().DOTNET,text:".NET (C#)"},{flavor:x().RUST,text:"Rust"}],jt=()=>{const e=(0,Te.I0)(),t=(0,Ee.useState)(!1),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(0,Te.v9)((e=>e.regexEditor.flavor)),i=(0,Te.v9)((e=>e.regexEditor.flags)),o=(0,Ee.useCallback)((t=>{gt("Change flavor",{props:{flavor:t}});const s=v()[t][0];e(X.o6(t)),e(X.G6(s)),e(X.dL(i,i,t))}),[e,i]),l=(0,Ee.useCallback)((e=>{e.preventDefault(),r(!0)}),[]),c=(0,Ee.useCallback)((()=>r(!1)),[]);return(0,Ve.jsxs)(xt.Z,{className:vt,header:(0,Ae.Z)("Flavor"),headerChildren:(0,Ve.jsx)(ft.Z,{to:"/static/assets/flavors.md",onClick:l,className:"IC7U1",tooltip:(0,Ae.Z)("Need help selecting flavor?"),size:16,children:(0,Ve.jsx)(Pe.zXH,{size:16})}),children:[bt.map((({flavor:e,text:t})=>(0,Ve.jsx)(mt.Z,{icon:Pe.mV1,onClick:()=>o(e),isActive:a===e,children:t},`flavor-item-${e}`))),(0,Ve.jsx)(st,{title:(0,Ae.Z)("Flavor Help"),onModalClose:c,textUrl:"/static/assets/flavors.md",isOpen:n})]})};var Ct=s(80471),Zt=s(35579),yt=s(56538),Et=s(46175),Tt=s(17650);const kt="PEVyC",Nt=["children","icon","absolute","to","className","isDisabled"],St=e=>{let t=e.children,s=e.icon,n=e.absolute,r=e.to,a=e.className,i=e.isDisabled,o=(0,E.Z)(e,Nt);return(0,Ve.jsx)(Et.Z,Object.assign(Object.assign({isDisabled:i,className:a},o),{},{children:(0,Ve.jsx)(Ie.rU,{tabIndex:i?-1:void 0,to:r,absolute:n,className:kt,noTheme:!0,children:(0,Ve.jsx)(Tt.Z,{icon:s,children:t,className:a})})}))},_t=(0,Ee.memo)(St);var wt=s(58294);function At(e,t=1){return e?`/r/${e}/${t}`:"/"}var Ot=s(77891);const It="SOmBr",Rt="UfPXv",Pt=({text:e,onDelete:t,clickable:s=!1,index:n,size:r=He.J7.M2,isSelected:a=!1,to:i})=>{const o=_e()("iFPCp",t&&"EvQAt",s&&"LNuoU",r===He.J7.M2&&"sDfVp",r===He.J7.HC&&"k7DPw",a&&"ociUu");return t?(0,Ve.jsx)(Ie.Yd,{className:o,onClick:()=>t(n),children:(0,Ve.jsxs)("div",{className:"i_U6u",children:[(0,Ve.jsx)("div",{className:Rt,children:e}),t&&(0,Ve.jsx)(Pe.eSQ,{className:It})]})}):s?(0,Ve.jsx)(Ie.rU,{className:o,to:i,noTheme:!0,children:e}):(0,Ve.jsxs)("span",{className:o,children:[(0,Ve.jsx)("span",{className:Rt,children:e}),t&&(0,Ve.jsx)(Pe.eSQ,{className:It})]})},Lt=(0,Ee.memo)(Pt),Mt=["className","tags","ignoreEmpty"],Dt=e=>{let t=e.className,s=e.tags,n=e.ignoreEmpty,r=(0,E.Z)(e,Mt);const a=(0,Ne.TH)(),i=(0,ke.lr)(),o=(0,Re.Z)(i,1)[0];if(0===s.length)return n?null:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("No tags to display for this entry.")});const l=[].concat(o.getAll("filterTags")||[]);return(0,Ve.jsx)("div",{className:_e()("e_47g",t),children:s.sort().map(((e,t)=>{const s=l.includes(e),n=Object.assign(Object.assign({},a),{},{search:Ot.B({filterTags:s?l.filter((t=>t!==e)):[...l,e]},o)});return(0,Ve.jsx)(Lt,Object.assign({text:e,index:t,isSelected:s,to:n},r),`tag-${t}`)}))})},Ut=(0,Ee.memo)(Dt),Ft="EHJke",Gt=({title:e="",libraryTitle:t,tags:s=[],onTagsChange:n,onTitleChange:r,disabled:a,className:i})=>{const o=(0,Ee.useState)(""),l=(0,Re.Z)(o,2),c=l[0],u=l[1],d=(0,Ee.useCallback)((e=>u(e)),[]),h=e=>{e.stopPropagation(),e.preventDefault(),c.length>0&&n([...s,c]),u("")};return(0,Ve.jsxs)("div",{className:_e()("b_UzD",a&&"ICuz5",i),children:[(0,Ve.jsxs)("div",{className:Ft,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Edit personal title")}),(0,Ve.jsx)(Ie.oi,{value:e,onChange:r,placeholder:t||(0,Ae.Z)("Insert a personal title"),maxlength:150})]}),(0,Ve.jsxs)("div",{className:Ft,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Tags")}),(0,Ve.jsx)(Ut,{tags:s,onDelete:e=>n([...s.slice(0,e),...s.slice(e+1)])})]}),(0,Ve.jsxs)("form",{className:"ECIrE",onSubmit:h,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Add tag")}),(0,Ve.jsxs)("div",{className:"MPX5Z",children:[(0,Ve.jsx)(Ie.oi,{onChange:d,placeholder:(0,Ae.Z)("Any word can be used as a tag"),value:c,maxlength:125,className:"GoqIP",validation:/^\w*$/u}),(0,Ve.jsx)(Ie.hU,{tooltip:(0,Ae.Z)("Add tag"),className:"fyf3i",disabled:0===c.length,size:28,onClick:h,children:(0,Ve.jsx)(Pe.p22,{size:22})})]})]})]})},Vt="LrAFA",Bt="Tpbre",$t="XXWwF",Ht=({permalink:e,error:t,userId:s,isOwner:n,regexDeleteUrl:r,versionDeleteUrl:a,isLoading:i})=>t?(0,Ve.jsx)("div",{className:Vt,children:(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,children:(0,Ae.Z)("There was an error trying to save your regex. Please try again later.")})}):i?(0,Ve.jsxs)("div",{className:Vt,children:[(0,Ve.jsx)(Ie.$j,{}),(0,Ve.jsx)("div",{className:"BjqNv",children:(0,Ae.Z)("Please wait while your request is being processed...")})]}):(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Link to regular expression")}),(0,Ve.jsx)(Ie.oi,{type:"text",value:e,selectOnMount:!0,selectOnFocus:!0,readOnly:!0,copyButton:!0}),(0,Ve.jsxs)(Ie.qX,{className:Bt,type:He.gr.MR,children:[(0,Ae.Z)("Your regex has been saved and may be accessed with this link by anybody you give it to.")," ",null!=s&&n&&(0,Ae.Z)("This entry has also been automatically been linked to your account for your convenience.")]}),null==s&&n&&null!=r&&(0,Ve.jsxs)("div",{className:$t,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Delete regular expression")}),(0,Ve.jsx)(Ie.oi,{type:"text",value:r,readOnly:!0,copyButton:!0,selectOnFocus:!0}),(0,Ve.jsx)(Ie.qX,{className:Bt,children:(0,Ae.Z)("Because you are not signed in this entry has not been linked to an account. It is recommended you sign in so that your entries are never lost and you can manage them from the account page whenever you like.")})]}),null==s&&null!=a&&(0,Ve.jsxs)("div",{className:$t,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Delete this version")}),(0,Ve.jsx)(Ie.oi,{type:"text",value:a,readOnly:!0,copyButton:!0,selectOnFocus:!0})]})]}),qt=(0,Ee.memo)(Ht),zt=[],Wt=e=>new Promise((t=>setTimeout(t,e))),Yt=({isUpdating:e,onModalClose:t,isOpen:s})=>{const n=(0,Ne.s0)(),r=(0,Te.I0)(),a=(0,Te.v9)((e=>e.general.permalinkFragment)),o=(0,Te.v9)((e=>e.general.userId)),l=(0,Te.v9)((e=>e.general.title))||"",c=(0,Te.v9)((e=>e.general.tags))||zt,u=(0,Te.v9)((e=>e.general.isOwner)),d=(0,Te.v9)((e=>e.general.isFavorite)),h=(0,Ee.useState)(!1),p=(0,Re.Z)(h,2),g=p[0],m=p[1],x=(0,Ee.useState)(l),f=(0,Re.Z)(x,2),v=f[0],b=f[1],j=(0,Ee.useState)(c),C=(0,Re.Z)(j,2),Z=C[0],y=C[1],E=(0,Ee.useState)({isLoadingRegex:!1,hasRegexError:!1,isLoadingAcc:!1,hasAccError:!1}),T=(0,Re.Z)(E,2),k=T[0],N=T[1],S=(0,Ee.useState)(null),_=(0,Re.Z)(S,2),w=_[0],A=_[1],O=(0,Ee.useState)(null),I=(0,Re.Z)(O,2),R=I[0],P=I[1],L=(0,Ee.useState)(null),M=(0,Re.Z)(L,2),D=M[0],U=M[1],F=(0,Ee.useState)(!1),G=(0,Re.Z)(F,2),V=G[0],B=G[1];(0,Ee.useEffect)((()=>{s&&(B(!1),m(!1),A(null),P(null),U(null))}),[s]);const $=(0,Ee.useCallback)((e=>{y(e),m(!0)}),[]),H=(0,Ee.useCallback)((e=>{b(e),m(!0)}),[]);(0,Ee.useEffect)((()=>{b(l),y(c)}),[c,l]),(0,Ee.useEffect)((()=>{s&&!V&&(B(!0),N({isLoadingRegex:!0,hasRegexError:!1,isLoadingAcc:!1,hasAccError:!1}),Promise.all([r((0,X.by)(e)),Wt(250)]).then((([e])=>{const t=e.permalinkFragment,s=e.version,r=e.regexDeleteCode,a=e.versionDeleteCode,i=`${window.location.protocol}//${window.location.hostname}`,o=At(t,s);n(o,{replace:!0}),A(`${i}${o}`),P(`${i}/delete/${r}`),U(`${i}/delete/${s}/${a}`),N({isLoadingAcc:!1,isLoadingRegex:!1,hasAccError:!1,hasRegexError:!1})})).catch((e=>{i.Z.error("Unable to save regex",e),N({isLoadingAcc:!1,isLoadingRegex:!1,hasAccError:!1,hasRegexError:!0})})))}),[s,r,n,e,V]);const q=e?(0,Ae.Z)("Update Regular Expression"):(0,Ae.Z)("Save Regular Expression"),z=!k.isLoadingRegex&&null!=o&&!k.hasRegexError&&(u||d);return(0,Ve.jsxs)(Ye.Z,{isOpen:s,onModalClose:t,isLoading:k.isLoadingRegex||k.isLoadingAcc,children:[(0,Ve.jsx)(Ke.Z,{children:q}),(0,Ve.jsxs)(Je.Z,{children:[(0,Ve.jsx)(qt,{error:k.hasRegexError,permalink:w,userId:o,isOwner:u,regexDeleteUrl:R,versionDeleteUrl:D,isLoading:k.isLoadingRegex}),z&&w&&(0,Ve.jsx)(Gt,{title:v,tags:Z,onTagsChange:$,onTitleChange:H,disabled:k.isLoadingAcc,className:"D7pB5"})]}),(0,Ve.jsxs)(Xe.Z,{isLoading:k.isLoadingAcc,hasError:k.hasAccError,errorText:(0,Ae.Z)("Unable to save changes, please try again"),children:[z&&(0,Ve.jsx)(Ie.zx,{onClick:async()=>{N({isLoadingRegex:!1,hasRegexError:!1,isLoadingAcc:!0,hasAccError:!1});try{await Promise.all([r((0,X.ML)(Z,null,a)),r((0,X._1)(v,null,a)),Wt(500)]),N({isLoadingRegex:!1,hasRegexError:!1,isLoadingAcc:!1,hasAccError:!1}),t()}catch(e){i.Z.error("Unable to save account data",e),N({isLoadingRegex:!1,hasRegexError:!1,isLoadingAcc:!1,hasAccError:!0})}},text:(0,Ae.Z)("Save title and tags"),className:"JySmX",disabled:!g||k.isLoadingAcc}),(0,Ve.jsx)(Ie.zx,{type:He.V5.n1,onClick:t,text:z&&g?(0,Ae.Z)("Cancel"):(0,Ae.Z)("Close"),disabled:k.isLoadingRegex||k.isLoadingAcc})]})]})};function Kt(e,t,s){let n=0;return Ee.Children.map(e,(e=>{if((0,Ee.isValidElement)(e)){const r=n;return n++,t.call(s,e,r)}return e}))}function Jt(e,t){let s;return function(e,t,s){let n=0;Ee.Children.forEach(e,(e=>{(0,Ee.isValidElement)(e)&&(t.call(void 0,e,n),n++)}))}(e,((n,r)=>{!s&&t(n,r,e)&&(s=n)})),s}var Xt=s(45697),Qt=s.n(Xt);const es=({children:e})=>e;es.propTypes={children:Qt().node.isRequired};const ts=es,ss=({children:e,className:t,tabs:s,renderToolbar:n})=>{const r=(0,Ee.useState)(0),a=(0,Re.Z)(r,2),i=a[0],o=a[1];return(0,Ve.jsxs)("div",{className:_e()("xcnvY",t),children:[(0,Ve.jsxs)("div",{className:"JIZX7",children:[s.map(((e,t)=>(0,Ve.jsx)(Ie.Yd,{className:_e()("KDcqY",t===i&&"hVcJX"),onClick:()=>o(t),children:e},`tabview-tab-${t}`))),n&&n(i)]}),Jt(e,((e,t)=>i===t))]})};var ns=s(89583);const rs={menuPortal:"tdkJ8",insideModal:"zXY8d",menuScroll:"NrXoa",menu:"f6YSB",enterBottom:"NrZNZ",enterTop:"MpxoU",enterActive:"uarNo",leave:"SSIhI",leaveActiveBottom:"oupK4",leaveActiveTop:"b8xoE"},as=["className","children","target","isOpen","onMenuClose","closeOnClick","insideModal","placement"],is=(0,lt.Z)(ct.t2),os=e=>{let t=e.className,s=e.children,n=e.target,r=e.isOpen,a=e.onMenuClose,i=e.closeOnClick,o=void 0!==i&&i,l=e.insideModal,c=e.placement,u=void 0===c?"bottom":c,d=(0,E.Z)(e,as);const h=(0,Ee.useRef)(null),p=(0,Ee.useCallback)((e=>{e.stopPropagation(),a()}),[a]);(0,Ee.useEffect)((()=>{let e;const t=e=>{var t;null!=(t=h.current)&&t.contains(e.target)||null!=n&&n.contains(e.target)||n===e.target||a()};return r&&(e=setTimeout((()=>{var e,s;Oe.ZP.once("key:escape",p),null==(e=document.body)||e.addEventListener("mousedown",t,{passive:!0}),null==(s=document.body)||s.addEventListener("touchend",t,{passive:!0})}),is)),()=>{var s,n;clearTimeout(e),Oe.ZP.off("key:escape",p),null==(s=document.body)||s.removeEventListener("mousedown",t,{passive:!0}),null==(n=document.body)||n.removeEventListener("touchend",t,{passive:!0})}}),[r,a,n,p]);const g={appear:"bottom"===u?rs.enterBottom:rs.enterTop,appearActive:rs.enterActive,enter:rs.enter,enterActive:rs.enterActive,exit:rs.leave,exitActive:"bottom"===u?rs.leaveActiveBottom:rs.leaveActiveTop};return(0,Ve.jsx)(Ie.Yv,{className:rs.menuPortal,target:n,isOpen:r,closeTimeout:is,placement:u,children:(0,Ve.jsx)(Ie.iQ,{children:(0,Ve.jsx)(Ie.uT,Object.assign(Object.assign({className:_e()(rs.menu,t,l&&rs.insideModal),classNames:g,timeout:is,in:r,ref:h},d),{},{children:Kt(s,(e=>{return(0,Ee.cloneElement)(e,{onClick:e.props.onClick&&(t=e.props.onClick,e=>{o&&a(),null==t||t(e)})});var t}))}))})})},ls="TjiR_",cs="IQ0Dq",us="i0q6u",ds="Ung4t",hs=["isActive","children","className"],ps=e=>{let t=e.isActive,s=e.children,n=e.className,r=(0,E.Z)(e,hs);return(0,Ve.jsxs)(Ie.Yd,Object.assign(Object.assign({className:_e()(ls,n)},r),{},{children:[(0,Ve.jsx)("div",{className:us,children:s}),(0,Ve.jsx)(Pe.xuy,{size:18,className:_e()(cs,!t&&ds)})]}))},gs=(0,Ee.memo)(ps),ms=["text"],xs=e=>{let t=e.text,s=(0,E.Z)(e,ms);return(0,Ve.jsx)("h4",Object.assign(Object.assign({className:"KMW6D"},s),{},{children:t}))},fs=(0,Ee.memo)(xs),vs=()=>(0,Ve.jsx)("hr",{className:"dYvK9"}),bs=["isActive","children","className","disabled"],js=e=>{let t=e.isActive,s=e.children,n=e.className,r=e.disabled,a=(0,E.Z)(e,bs);return(0,Ve.jsxs)(Ie.rU,Object.assign(Object.assign({className:_e()(ls,r&&"roQ4U",n),tabIndex:r?-1:void 0,"aria-disabled":r,noTheme:!0},a),{},{children:[(0,Ve.jsx)("div",{className:us,children:s}),(0,Ve.jsx)(Pe.xuy,{size:18,className:_e()(cs,!t&&ds)})]}))},Cs=(0,Ee.memo)(js),Zs=["onHeaderClick"],ys=e=>{let t=e.onHeaderClick,s=(0,E.Z)(e,Zs);return(0,Ve.jsxs)(os,Object.assign(Object.assign({closeOnClick:!0,insideModal:!0},s),{},{children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Headers")}),(0,Ve.jsx)(vs,{}),(0,Ve.jsx)(gs,{onClick:()=>t("# "),children:"H1"}),(0,Ve.jsx)(gs,{onClick:()=>t("## "),children:"H2"}),(0,Ve.jsx)(gs,{onClick:()=>t("### "),children:"H3"})]}))},Es=({children:e})=>(0,Ve.jsx)("div",{className:"sswmd",children:e}),Ts=["tooltip","lastGroup","icon","isMenu"],ks=(0,Ee.forwardRef)(((e,t)=>{let s=e.tooltip,n=e.lastGroup,r=e.icon,a=e.isMenu,i=(0,E.Z)(e,Ts);return(0,Ve.jsx)(Ie.lx,{text:s,direction:n?He.qF.NW:He.qF.N,children:(0,Ve.jsxs)(Ie.Yd,Object.assign(Object.assign({className:"rYU7E"},i),{},{ref:t,children:[(0,Ve.jsx)(r,{className:"HJfpj"}),a&&(0,Ve.jsx)(Pe.ZXJ,{className:"wTcsC"})]}))})}));ks.propTypes={tooltip:Qt().string.isRequired,icon:Qt().elementType.isRequired,onClick:Qt().func.isRequired,lastGroup:Qt().bool,isMenu:Qt().bool};const Ns=ks,Ss=({onTextChange:e,className:t,getStart:s,getEnd:n,value:r})=>{const a=(0,Ee.useRef)(),i=(0,Ee.useState)(!1),o=(0,Re.Z)(i,2),l=o[0],c=o[1],u=(t="",r="")=>{const a=t+p()+r;e(h(a),s()+t.length,n()+t.length)},d=t=>{const r=p(),a=r.split("\n").map(t).join("\n");e(h(a),s(),n()+a.length-r.length)},h=e=>r.substring(0,s())+e+r.substring(n()),p=()=>r.substring(s(),n());return(0,Ve.jsxs)("div",{className:_e()("CHR_O",t),children:[(0,Ve.jsxs)(Es,{children:[(0,Ve.jsx)(Ns,{icon:ns.YHB,tooltip:(0,Ae.Z)("Add header"),onClick:()=>c(!0),isMenu:!0,ref:a}),(0,Ve.jsx)(Ns,{icon:ns.PKR,tooltip:(0,Ae.Z)("Add bold text"),onClick:()=>u("**","**")}),(0,Ve.jsx)(Ns,{icon:ns.Mef,tooltip:(0,Ae.Z)("Add italic text"),onClick:()=>u("_","_")})]}),(0,Ve.jsxs)(Es,{children:[(0,Ve.jsx)(Ns,{icon:ns.fkU,tooltip:(0,Ae.Z)("Insert quote"),onClick:()=>d((e=>"> "+e))}),(0,Ve.jsx)(Ns,{icon:ns.tvD,tooltip:(0,Ae.Z)("Insert code snippet"),onClick:()=>{-1!==p().indexOf("\n")?d((e=>" ".repeat(4)+e)):u("`","`")}}),(0,Ve.jsx)(Ns,{icon:ns.gjK,tooltip:(0,Ae.Z)("Insert link"),onClick:()=>{const t=p(),n=`[${t}](url)`,r=s()+t.length+3,a=r+3;e(h(n),r,a)}})]}),(0,Ve.jsxs)(Es,{children:[(0,Ve.jsx)(Ns,{icon:ns.AeW,tooltip:(0,Ae.Z)("Add bulleted list"),onClick:()=>d((e=>"- "+e)),lastGroup:!0}),(0,Ve.jsx)(Ns,{icon:ns.Fe1,tooltip:(0,Ae.Z)("Add numbered list"),onClick:()=>d(((e,t)=>t+1+". "+e)),lastGroup:!0})]}),(0,Ve.jsx)(ys,{isOpen:l,onMenuClose:()=>c(!1),onHeaderClick:e=>u(e),target:a.current})]})},_s=(0,Ee.memo)(Ss),ws="YONkN",As="PhRac",Os="FVje3",Is=["defaultValue","value","onChange","containerClassName","className"],Rs=e=>{let t=e.defaultValue,s=e.value,n=e.onChange,r=(e.containerClassName,e.className),a=(0,E.Z)(e,Is);const i=(0,Ee.useRef)(),o=(0,Ee.useState)(t||s||""),l=(0,Re.Z)(o,2),c=l[0],u=l[1],d=(0,Ee.useCallback)((()=>{var e;return(null==(e=i.current)?void 0:e.selectionStart)||0}),[]),h=(0,Ee.useCallback)((()=>{var e;return(null==(e=i.current)?void 0:e.selectionEnd)||0}),[]),p=(0,Ee.useCallback)((e=>{u(e),n&&n(e)}),[n]),g=(0,Ee.useCallback)(((e,t,s)=>{n&&n(e),i.current&&(u(e),setTimeout((()=>{i.current&&(i.current.focus(),i.current.setSelectionRange(t,s))})))}),[n]),m=[(0,Ae.Z)("Write"),(0,Ae.Z)("Preview")];return(0,Ve.jsxs)(ss,{className:r,tabs:m,renderToolbar:e=>0!==e?null:(0,Ve.jsx)(_s,{className:"MafZJ",onTextChange:g,getStart:d,getEnd:h,value:c}),children:[(0,Ve.jsxs)(ts,{children:[(0,Ve.jsx)("div",{className:As,children:(0,Ve.jsx)(Ie.oi,Object.assign(Object.assign({},a),{},{onChange:p,className:Os,value:c,ref:i,multiline:!0}))}),(0,Ve.jsx)(Ie.rU,{to:"http://whatismarkdown.com/",absolute:!0,target:"_blank",className:ws,children:(0,Ae.Z)("Styling with Markdown is supported")})]}),(0,Ve.jsxs)(ts,{children:[(0,Ve.jsxs)("div",{className:As,children:[(0,Ve.jsx)(Ie.oi,Object.assign(Object.assign({},a),{},{className:Os,value:c,multiline:!0,disabled:!0})),(0,Ve.jsx)(tt,{className:"w0msh",children:c||(0,Ae.Z)("Nothing to preview")})]}),(0,Ve.jsx)(Ie.rU,{to:"http://whatismarkdown.com/",absolute:!0,target:"_blank",className:ws,children:(0,Ae.Z)("Styling with Markdown is supported")})]})]})},Ps=(0,Ee.memo)(Rs),Ls=({title:e,children:t,required:s})=>(0,Ve.jsxs)("div",{className:"WQ5ax",children:[(0,Ve.jsx)(Ie.__,{text:e,required:s}),t]}),Ms=(0,Ee.memo)(Ls),Ds=({onModalClose:e,isOpen:t})=>{const s=(0,Te.I0)(),n=(0,Te.v9)((e=>e.general.isLibraryEntry)),r=(0,Te.v9)((e=>e.libraryEntry.description))||"",a=(0,Te.v9)((e=>e.libraryEntry.title))||"",o=(0,Te.v9)((e=>e.libraryEntry.author))||"",l=(0,Te.v9)((e=>e.general.permalinkIsEditable)),c=n&&l,u=(0,Ee.useState)(!1),d=(0,Re.Z)(u,2),h=d[0],p=d[1],g=(0,Ee.useState)(c?a:""),m=(0,Re.Z)(g,2),x=m[0],f=m[1],v=(0,Ee.useState)(c?o:""),b=(0,Re.Z)(v,2),j=b[0],C=b[1],Z=(0,Ee.useState)(c?r:""),y=(0,Re.Z)(Z,2),E=y[0],T=y[1],k=(0,Ee.useState)(""),N=(0,Re.Z)(k,2),S=N[0],_=N[1],w=(0,Ee.useState)({isLoading:!1,hasError:!1,success:!1}),A=(0,Re.Z)(w,2),O=A[0],I=A[1],R=(0,Ee.useCallback)((e=>{f(e),p(!0)}),[]),P=(0,Ee.useCallback)((e=>{C(e),p(!0)}),[]),L=(0,Ee.useCallback)((e=>{T(e),p(!0)}),[]);return(0,Ee.useEffect)((()=>{t&&(c?(f(a),C(o),T(r)):(f(""),C(""),T("")),I({isLoading:!1,hasError:!1,success:!1}))}),[t,a,o,r,c]),(0,Ve.jsxs)(Ye.Z,{onModalClose:e,isOpen:t,isLoading:O.isLoading,children:[(0,Ve.jsx)(Ke.Z,{children:c?(0,Ae.Z)("Update Library Entry"):(0,Ae.Z)("Submit Workspace to Regex Library")}),(0,Ve.jsx)(Je.Z,{children:(0,Ve.jsxs)("div",{className:_e()("_GCcL",O.isLoading&&"sXKS3"),children:[O.success&&(0,Ve.jsxs)("div",{className:"tuaRV",children:[(0,Ve.jsx)("div",{className:"ns94K",children:(0,Ae.Z)("Your workspace has been successfully submitted to the library!")}),(0,Ve.jsx)(Ie.vV,{tag:"p",text:"You can find the library entry here: {1}",ph1:(0,Ve.jsx)(Ie.rU,{to:`/library/${S}`,absolute:!0,children:`/library/${S}`})}),(0,Ve.jsx)(Ie.vV,{tag:"p",text:"Any changes to the library entry, both the expression, as well as title/description/etc, can be made at the following url: {1}",ph1:(0,Ve.jsx)(Ie.rU,{to:At(S),absolute:!0,children:At(S)})}),(0,Ve.jsx)("p",{children:(0,Ae.Z)("You can continue to edit in this workspace without affecting the entry you just submitted.")}),(0,Ve.jsx)("strong",{children:(0,Ae.Z)("Thank you for your contribution")})]}),!O.success&&(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ms,{title:(0,Ae.Z)("Title"),required:!0,children:(0,Ve.jsx)(Ie.oi,{maxlength:150,onChange:R,defaultValue:x,placeholder:(0,Ae.Z)("Title of regular expression")})}),(0,Ve.jsx)(Ms,{title:(0,Ae.Z)("Description"),required:!0,children:(0,Ve.jsx)(Ps,{maxlength:5e3,onChange:L,placeholder:(0,Ae.Z)("Description of regular expression"),defaultValue:E})}),(0,Ve.jsx)(Ms,{title:(0,Ae.Z)("Author"),className:"H7aJ9",children:(0,Ve.jsx)(Ie.oi,{maxlength:150,onChange:P,defaultValue:j,placeholder:(0,Ae.Z)("Name or other identifier of the author")})})]})]})}),(0,Ve.jsxs)(Xe.Z,{children:[O.isLoading&&(0,Ve.jsx)(Ie.$j,{className:"GjCIr",size:He.J7.TC}),O.hasError&&(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("There was a problem while trying to submit your regex to the library. Please try again later."),direction:He.qF.N,children:(0,Ve.jsx)("div",{className:"QokGJ",role:"alert",children:(0,Ve.jsx)(Pe.j6O,{size:20})})}),!O.success&&(0,Ve.jsx)(Ie.zx,{text:n?(0,Ae.Z)("Update"):(0,Ae.Z)("Submit"),disabled:!h||0===x.length||0===E.length||O.isLoading,onClick:async()=>{I({isLoading:!0,hasError:!1,success:!1});try{const t=await s(n&&l?(0,X.ZD)(x,E,j):(0,X.Tr)(x,E,j));c?e():(_(t),I({isLoading:!1,hasError:!1,success:!0}))}catch(e){i.Z.error("Unable to create or update library entry",e),I({isLoading:!1,hasError:!0,success:!1})}},className:"ZmwNY"}),(0,Ve.jsx)(Ie.zx,{text:O.success?(0,Ae.Z)("Close"):(0,Ae.Z)("Cancel"),onClick:e,type:He.V5.n1,disabled:O.isLoading})]})]})},Us=["permalinkFragment","onConfirmClick","onModalClose","deleteCodes","className"],Fs="DELETE_ALL",Gs=e=>{let t=e.permalinkFragment,s=e.onConfirmClick,n=e.onModalClose,r=e.deleteCodes,a=e.className,i=(0,E.Z)(e,Us);const o=(0,Te.I0)(),l=(0,Ee.useState)(null),c=(0,Re.Z)(l,2),u=c[0],d=c[1],h=(0,Ee.useState)({isLoading:!1,hasError:!1}),p=(0,Re.Z)(h,2),g=p[0],m=p[1],x=(0,Ee.useCallback)((async()=>{m({isLoading:!0,error:!1});const e=u===Fs?r.deleteCode:r.versions.find((e=>e.version===u)).deleteCode;try{await o((0,X.MX)(t,u===Fs?null:u,e)),m({isLoading:!1,hasError:!1}),s(u)}catch(e){m({isLoading:!1,hasError:!0})}}),[s,u,r,o,t]),f=(0,Ee.useCallback)((e=>{const t=e.target.value;d(t===Fs?t:parseInt(t,10))}),[]),v=(0,Ee.useMemo)((()=>{const e=[];return r.deleteCode&&e.push({text:(0,Ae.Z)("All versions"),value:Fs}),e.push(...r.versions.map((e=>({text:`Version ${e.version}`,value:e.version})))),e}),[r]);return(0,Ve.jsxs)(Ye.Z,Object.assign(Object.assign({onModalClose:n,className:_e()("cLqcH",a),isLoading:g.isLoading},i),{},{children:[(0,Ve.jsx)(Ke.Z,{className:"WaRxJ",children:(0,Ae.Z)("Which version do you want to delete?")}),(0,Ve.jsxs)(Je.Z,{className:"KroVF",children:[(0,Ae.Z)("Are you sure you want to delete this regex? This action is non-reversible and will delete all versions of this regex."),(0,Ve.jsxs)("div",{className:"GavEV",children:[(0,Ae.Z)("Pick version to delete")," ",(0,Ve.jsxs)("select",{defaultValue:null,onChange:f,disabled:g.isLoading,children:[(0,Ve.jsx)("option",{value:null},"delete-code-null"),v.map((e=>{const t=e.text,s=e.value;return(0,Ve.jsx)("option",{value:s,children:t},`delete-code-${s}`)}))]})]}),(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:"GCjCg",children:(0,Ae.Z)("The data can never be recovered again!")})]}),(0,Ve.jsxs)(Xe.Z,{isLoading:g.isLoading,hasError:g.hasError,errorText:(0,Ae.Z)("Unable to delete entry, please try again"),children:[(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Yes, delete"),onClick:x,style:{marginRight:10},type:He.V5.T,disabled:!u||g.isLoading}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:n,type:He.V5.n1,disabled:g.isLoading})]})]}))};var Vs=s(6527),Bs=s(79615);const $s=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexEditor.regex)),s=(0,Te.v9)((e=>e.regexEditor.error)),n=(0,Te.v9)((e=>e.regexEditor.hasUnsavedData)),r=(0,Te.v9)((e=>{const t=e.unitTests.tests,s=e.regexEditor,n=s.regex,r=s.testString;return""!==n||""!==r||t.length>0})),a=(0,Te.v9)((e=>e.general.permalinkFragment)),i=(0,Te.v9)((e=>e.general.version)),o=(0,Te.v9)((e=>e.general.isOwner)),l=(0,Te.v9)((e=>e.general.userId)),c=(0,Te.v9)((e=>e.general.isFavorite)),u=(0,Te.v9)((e=>e.general.isLibraryEntry)),d=(0,Te.v9)((e=>e.general.permalinkIsEditable)),h=(0,Ee.useState)(!1),p=(0,Re.Z)(h,2),g=p[0],m=p[1],x=(0,Ee.useState)(!1),f=(0,Re.Z)(x,2),v=f[0],b=f[1],j=(0,Ee.useState)(!1),C=(0,Re.Z)(j,2),Z=C[0],y=C[1],E=(0,Ee.useState)(!1),T=(0,Re.Z)(E,2),k=T[0],N=T[1],S=(0,Ee.useCallback)((()=>y(!0)),[]),_=(0,Ee.useCallback)((e=>{e.preventDefault(),N(!0)}),[]),w=(0,Ee.useCallback)((()=>N(!1)),[]),A=(0,Ee.useCallback)((()=>y(!1)),[]),O=(0,Ee.useCallback)((e=>{N(!1),window.location.href=e===Fs?"/":At(a,"latest")}),[a]),I=(0,Ee.useCallback)((async()=>{await e(X.Ez(a,null,!c)),e(X.jb(!c))}),[e,c,a]),R=(0,Ee.useCallback)((()=>{m(!1),b(!1)}),[]),P=(0,Ee.useCallback)((e=>{gt("Save Regex"),e.stopPropagation(),r&&n&&m(!0)}),[r,n]),L=(0,Ee.useCallback)((e=>{gt("Update Regex"),e.stopPropagation(),r&&n&&null!=a&&d&&(b(!0),m(!0))}),[r,n,a,d]);(0,Ee.useEffect)((()=>(Oe.ZP.on({"key:updateRegex":L,"key:saveRegex":P}),()=>{Oe.ZP.off({"key:updateRegex":L,"key:saveRegex":P})})),[L,P]);const M=(0,Ee.useMemo)((()=>null!=a?(0,Bs.Hz)(a,i):null),[a,i]);return(0,Ve.jsxs)(xt.Z,{className:vt,header:(0,Ae.Z)("Save & Share"),children:[(0,Ve.jsx)(Vs.Z,{icon:Pe.d26,onClick:P,isDisabled:!r||!n,className:"wHTes",rightElement:(0,Ve.jsx)(Ie.aX,{shortcut:Zt.SAVE_REGEX}),monospace:!1,children:(0,Ae.Z)("Save Regex")}),null!=a&&d&&(0,Ve.jsx)(Vs.Z,{icon:Pe.PwW,onClick:L,isDisabled:!r||!n,rightElement:(0,Ve.jsx)(Ie.aX,{shortcut:Zt.UPDATE_REGEX}),monospace:!1,children:u?(0,Ae.Z)("Update Library Regex"):(0,Ae.Z)("Update Regex")}),null!=M&&(0,Ve.jsx)(_t,{to:"/delete/",icon:Pe.M$4,className:"QQcsx",onClick:_,absolute:!0,tabIndex:-1,children:(0,Ae.Z)("Delete Regex")}),u&&o&&(0,Ve.jsx)(wt.Z,{isDisabled:""===t||s===yt.D9,icon:Pe.tuW,onClick:S,children:(0,Ae.Z)("Edit Library Entry")}),!u&&null!=l&&(0,Ve.jsx)(wt.Z,{isDisabled:""===t||s===yt.D9,icon:Pe.tuW,onClick:S,children:(0,Ae.Z)("Add to Public Library")}),null!=l&&null!=a&&(0,Ve.jsx)(wt.Z,{icon:Pe.iB2,className:"XusZa",onClick:I,children:c?(0,Ae.Z)("Unfavorite Regex"):(0,Ae.Z)("Favorite Regex")}),u&&(0,Ve.jsx)(_t,{to:`/library/${a}`,icon:Ct.bwQ,children:(0,Ae.Z)("Go to library entry")}),(0,Ve.jsx)(Yt,{isUpdating:v,onModalClose:R,isOpen:g}),(0,Ve.jsx)(Ds,{isOpen:Z,onModalClose:A}),null!=M&&(0,Ve.jsx)(Gs,{permalinkFragment:a,isOpen:k,onModalClose:w,onConfirmClick:O,deleteCodes:M})]})},Hs=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexEditor.showMatchArea)),s=(0,Te.v9)((e=>e.regexEditor.showSubstitutionArea)),n=(0,Te.v9)((e=>e.regexEditor.showListSubstitutionArea)),r=(0,Te.v9)((e=>e.regexEditor.showUnitTestArea)),a=(0,Te.v9)((e=>e.unitTests.tests.length)),i=(0,Ee.useCallback)((t=>{t.stopPropagation(),gt("Change regex function",{props:{function:"match"}}),e(X.Iu())}),[e]),o=(0,Ee.useCallback)((t=>{t.stopPropagation(),gt("Change regex function",{props:{function:"subst"}}),e(X.ux())}),[e]),l=(0,Ee.useCallback)((t=>{t.stopPropagation(),gt("Change regex function",{props:{function:"unit-test"}}),e(X.rI())}),[e]),c=(0,Ee.useCallback)((t=>{t.stopPropagation(),gt("Change regex function",{props:{function:"list-subst"}}),e(X.vn())}),[e]);return(0,Ee.useEffect)((()=>(Oe.ZP.on({"key:ctrl1":i,"key:ctrl2":o,"key:ctrl3":c,"key:ctrl4":l}),()=>{Oe.ZP.off({"key:ctrl1":i,"key:ctrl2":o,"key:ctrl3":c,"key:ctrl4":l})})),[i,o,c,l]),(0,Ve.jsxs)(xt.Z,{className:vt,header:(0,Ae.Z)("Function"),children:[(0,Ve.jsx)(mt.Z,{icon:Pe.tJT,onClick:i,isActive:t,children:(0,Ae.Z)("Match")}),(0,Ve.jsx)(mt.Z,{icon:Pe.EgU,onClick:o,isActive:s&&!r,children:(0,Ae.Z)("Substitution")}),(0,Ve.jsx)(mt.Z,{icon:Pe.dR_,onClick:c,isActive:n,children:(0,Ae.Z)("List")}),(0,Ve.jsx)(mt.Z,{icon:Pe.aJY,onClick:l,isActive:r,children:(0,Ae.Z)("Unit Tests {1}",a>0?`(${a})`:"")})]})};var qs=s(14578),zs=s(69537),Ws=s(75558);const Ys=()=>{const e=(0,Ne.s0)(),t=(0,Te.v9)((e=>e.regexEditor.flavor)),s=(0,Te.v9)((e=>e.regexEditor.regex)),n=(0,Te.v9)((e=>e.regexEditor.error)),r=(0,Te.v9)((e=>e.regexEditor.showListSubstitutionArea)),a=(0,Te.v9)((e=>e.regexEditor.showUnitTestArea)),i=(0,Te.v9)((e=>e.settings.defaultCodeGenLanguage)),o=(0,Ee.useCallback)((n=>{n.stopPropagation(),""!==s&&e(`codegen?language=${i||(0,Ws.Wr)(t)}`)}),[s,i,t,e]),l=(0,Ee.useCallback)((t=>{t.stopPropagation(),""===s||n===yt.D9||a||e("debugger")}),[s,n,a,e]);return(0,Ee.useEffect)((()=>(Oe.ZP.on({"key:ctrlB":l,"key:ctrlG":o}),()=>{Oe.ZP.off({"key:ctrlB":l,"key:ctrlG":o})})),[l,o]),(0,Ve.jsxs)(xt.Z,{header:(0,Ae.Z)("Tools"),children:[(0,Ve.jsx)(_t,{icon:qs.xv9,isDisabled:""===s||r,to:`codegen?language=${i||(0,Ws.Wr)(t)}`,children:(0,Ae.Z)("Code Generator")}),(0,zs.G)(t)&&(0,Ve.jsx)(_t,{icon:Pe.RwU,isDisabled:""===s||n===yt.D9||a,to:"debugger",children:(0,Ae.Z)("Regex Debugger")})]})},Ks=()=>(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)($s,{}),(0,Ve.jsx)(jt,{}),(0,Ve.jsx)(Hs,{}),(0,Ve.jsx)(Ys,{})]});var Js=s(8193),Xs=s(45524);const Qs=["to","children","icon","isDisabled","isActive"],en=e=>{let t=e.to,s=e.children,n=e.icon,r=e.isDisabled,a=e.isActive,i=(0,E.Z)(e,Qs);const o=(0,Ne.bS)(t);return(0,Ve.jsx)(Et.Z,Object.assign(Object.assign({isDisabled:r},i),{},{children:(0,Ve.jsx)(Ie.rU,{tabIndex:r?-1:0,to:t,className:kt,noTheme:!0,children:(0,Ve.jsx)(Tt.Z,{icon:n,children:(0,Ve.jsx)(Xs.Z,{children:s,isActive:a||!!o})})})}))},tn=(0,Ee.memo)(en);var sn=s(27782),nn=s.n(sn);function rn(e){switch(e){case nn().MOST_RECENT:return(0,Ae.Z)("Most Recent");case nn().MOST_POINTS:return(0,Ae.Z)("Most Points");case nn().LEAST_POINTS:return(0,Ae.Z)("Fewest Points");case nn().RELEVANCE:return(0,Ae.Z)("Relevance");default:throw new Error(`Unknown order ${e}`)}}const an=[{flavor:x().PCRE2,string:"PCRE2"},{flavor:x().PCRE,string:"PCRE"},{flavor:x().JAVASCRIPT,string:"ECMAScript"},{flavor:x().PYTHON,string:"Python"},{flavor:x().GOLANG,string:"Golang"},{flavor:x().JAVA,string:"Java"},{flavor:x().DOTNET,string:".NET"}],on=e=>{switch(e){case nn().MOST_RECENT:return Js.dT6;case nn().MOST_POINTS:return Le.PNI;case nn().LEAST_POINTS:return Le.a7d;case nn().RELEVANCE:return Js.Ehc;default:throw new Error(`Unknown library sorting order "${e}"`)}},ln=()=>{const e=(0,ke.lr)(),t=(0,Re.Z)(e,1)[0],s=t.getAll("filterFlavors"),n=t.get("orderBy")||nn().MOST_RECENT,r=t.get("search")||"";return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(xt.Z,{header:(0,Ae.Z)("Order By"),className:vt,children:nn().all.filter((e=>!(e===nn().RELEVANCE&&0===r.length))).map((e=>(0,Ve.jsx)(tn,{to:`?${Ot.B({filterFlavors:s,search:r,orderBy:e},t)}`,isActive:n===e,icon:on(e),children:rn(e)},`library-order-menu-${e}`)))}),(0,Ve.jsx)(xt.Z,{header:(0,Ae.Z)("Filter by Flavor"),children:an.map((e=>{let a=[].concat(s);const i=a.includes(e.flavor);return i?a=a.filter((t=>t!==e.flavor)):a.push(e.flavor),(0,Ve.jsx)(tn,{icon:Pe.mV1,isActive:i,to:`?${Ot.B({search:r,orderBy:n,filterFlavors:a},t)}`,children:e.string},`library-flavor-${e.flavor}`)}))})]})},cn=()=>(0,Ve.jsxs)("div",{className:"sFanj",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Settings")}),(0,Ve.jsxs)("div",{children:[(0,Ae.Z)("All settings to control the application are located here."),(0,Ve.jsx)("br",{}),(0,Ve.jsx)("br",{}),(0,Ae.Z)("They are automatically saved as you change them and will be automatically loaded every time.")]})]}),un=(0,Ee.memo)(cn);var dn=s(60155),hn=s(96881),pn=s.n(hn),gn=s(2636),mn=s.n(gn);const xn=[{string:"Google",icon:Pe.D27,to:"/connect/google"},{string:"Github",icon:Pe.q7V,to:"/connect/github"},{string:"Twitter",icon:Pe.x2F,to:"/connect/twitter"}],fn=({onModalClose:e,isOpen:t,returnTo:s="/account/all"})=>{const n=(0,Te.I0)(),r=(0,Ee.useCallback)((()=>n({type:h.xw})),[n]);return(0,Ve.jsxs)(Ye.Z,{onModalClose:e,isOpen:t,className:"dyCRh",children:[(0,Ve.jsx)(Ke.Z,{children:(0,Ae.Z)("Sign In")}),(0,Ve.jsxs)(Je.Z,{className:"HLkfc",children:[(0,Ve.jsx)(xt.Z,{header:(0,Ae.Z)("Select a service provider"),className:"gT9Zk",children:xn.map((e=>(0,Ve.jsx)(_t,{to:`${e.to}?returnTo=${s}`,icon:e.icon,onClick:r,absolute:!0,children:e.string},`provider-${e.string}`)))}),(0,Ve.jsxs)("div",{className:"gYcOc",children:[(0,Ve.jsx)(Ie.qX,{noMargin:!0,children:(0,Ae.Z)("Only the bare minimum information is retrieved and saved in order to identify your account.")}),(0,Ve.jsx)(Ie.qX,{noMargin:!0,type:He.gr.u_,children:(0,Ae.Z)("Note that clicking any of the links above will refresh the page. Your data will be saved to local storage and restored once you return to the website.")})]})]}),(0,Ve.jsx)(Xe.Z,{children:(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:e,type:He.V5.n1})})]})},vn=()=>{const e=(0,Te.v9)((e=>e.account.allTags)),t=(0,Te.v9)((e=>e.account.staleData));return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Tags")}),t?(0,Ve.jsx)(Ie.$j,{size:He.J7.TC,style:{margin:"0 auto"}}):(0,Ve.jsx)(Ut,{tags:e,clickable:!0})]})},bn=({title:e,children:t,onModalClose:s,isOpen:n,onConfirmClick:r,confirmText:a=(0,Ae.Z)("Ok"),isDanger:i,isLoading:o,className:l,disabled:c})=>(0,Ve.jsxs)(Ye.Z,{onModalClose:s,isOpen:n,className:_e()("LZ_87",l),isLoading:o,children:[(0,Ve.jsx)(Ke.Z,{className:"CrJ1q",children:e}),(0,Ve.jsx)(Je.Z,{className:"EgtQt",children:t}),(0,Ve.jsxs)(Xe.Z,{children:[(0,Ve.jsx)(Ie.zx,{text:a,onClick:r,style:{marginRight:10},type:i?He.V5.T:He.V5.OK,disabled:c||o}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:s,type:He.V5.n1,disabled:o})]})]}),jn="qxoBe";function Cn(e){switch(e){case mn().GOOGLE:return Pe.D27;case mn().TWITTER:return Pe.x2F;case mn().GITHUB:return Pe.q7V;default:throw new Error("Unknown service provider "+e)}}const Zn=()=>{const e=(0,Te.v9)((e=>e.general.userId)),t=(0,Te.v9)((e=>e.general.email)),s=(0,Te.v9)((e=>e.general.serviceProvider)),n=(0,Ee.useState)(!1),r=(0,Re.Z)(n,2),a=r[0],i=r[1],o=(0,Ee.useState)(!1),l=(0,Re.Z)(o,2),c=l[0],u=l[1],d=(0,Ee.useState)(!1),h=(0,Re.Z)(d,2),p=h[0],g=h[1],m=(0,Ee.useCallback)((()=>i(!0)),[]),x=(0,Ee.useCallback)((()=>u(!0)),[]),f=(0,Ee.useCallback)((()=>{i(!1),u(!1)}),[]),v=(0,Ee.useCallback)((async()=>{g(!0);try{await fetch("/api/user/",{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}})}finally{window.location.href="/account"}}),[]),b=[{string:(0,Ae.Z)("My Expressions"),icon:Pe.U$J,scope:pn().MINE},{string:(0,Ae.Z)("My Favorites"),icon:Pe.iB2,scope:pn().FAVORITES},{string:(0,Ae.Z)("My Library Entries"),icon:dn.Q0w,scope:pn().LIBRARY}];return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)(xt.Z,{header:(0,Ae.Z)("Control"),className:jn,children:[null==e&&(0,Ve.jsx)(wt.Z,{onClick:m,icon:Pe.yrM,children:(0,Ae.Z)("Sign In")}),null!=e&&null!=t&&null!=s&&(0,Ve.jsx)(wt.Z,{className:"Hp8EU",icon:Cn(s),isDisabled:!0,children:t}),null!=e&&(0,Ve.jsx)(wt.Z,{icon:Pe.Xgw,className:"VsHye",onClick:x,children:(0,Ae.Z)("Delete account")}),null!=e&&(0,Ve.jsx)(_t,{to:"/login/destroy",absolute:!0,icon:Pe.Xgw,children:(0,Ae.Z)("Sign out")})]}),null!=e&&(0,Ve.jsx)(xt.Z,{header:(0,Ae.Z)("Category"),className:jn,children:b.map((e=>(0,Ve.jsx)(tn,{to:`/account/${e.scope}`,icon:e.icon,children:e.string},`account-category-${e.scope}`)))}),null!=e&&(0,Ve.jsx)(vn,{}),(0,Ve.jsx)(fn,{onModalClose:f,isOpen:a}),(0,Ve.jsx)(bn,{onModalClose:f,title:(0,Ae.Z)("Delete Account and Data"),isLoading:p,isOpen:c,onConfirmClick:v,isDanger:!0,confirmText:(0,Ae.Z)("Yes, delete everything"),children:(0,Ve.jsxs)("div",{className:"hvqpn",children:[(0,Ve.jsx)("strong",{children:(0,Ae.Z)("Are you sure you want to delete your account?")}),(0,Ve.jsx)("div",{children:(0,Ae.Z)("All associated data with your account will be permanently deleted, such as your saved expressions, your library entries, and your quiz progression.")}),(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:"A9fBo",children:(0,Ae.Z)("Your data can never be recovered again!")})]})})]})},yn="zcg3R",En=()=>null==(0,Te.v9)((e=>e.general.userId))?null:(0,Ve.jsxs)(xt.Z,{header:(0,Ae.Z)("Tasks"),className:yn,children:[(0,Ve.jsx)(tn,{icon:Pe.iB2,to:"/quiz",children:(0,Ae.Z)("Introduction")}),(0,Ve.jsx)(Tn,{})]}),Tn=()=>{const e=(0,Te.v9)((e=>e.general.userId)),t=(0,Te.v9)((e=>e.quiz.allTasks)),s=(0,we.$5)("getQuizTasks"),n=(0,Re.Z)(s,3),r=n[0],a=n[1],i=n[2];return(0,we.DB)((()=>{e&&0===t.length&&i((0,X.Ak)())}),[i,t.length,e]),null==e?null:r?(0,Ve.jsx)(Ie.$j,{size:He.J7.TC,className:"upLOL"}):a?(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:"UPygB",children:(0,Ae.Z)("There was an error fetching the quiz data. Please try again later.")}):t.map(((e,t)=>{const s=t+1;return(0,Ve.jsxs)(tn,{icon:Pe.XBp,to:`/quiz/${s}`,isDisabled:!e.canSolve,children:[s,". ",e.title," ",e.isOptional&&`(${(0,Ae.Z)("optional")})`]},`task-${e.taskNumber}`)}))},kn=()=>{const e=(0,Ee.useState)(!1),t=(0,Re.Z)(e,2),s=t[0],n=t[1],r=(0,Te.v9)((e=>e.general.userId)),a=(0,Ee.useCallback)((()=>n(!0)),[]),i=(0,Ee.useCallback)((()=>n(!1)),[]);return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(En,{}),(0,Ve.jsxs)(xt.Z,{header:(0,Ae.Z)("Control"),className:yn,children:[null==r&&(0,Ve.jsx)(wt.Z,{onClick:a,icon:Pe.yrM,children:(0,Ae.Z)("Sign In")}),null!=r&&(0,Ve.jsx)(_t,{to:"/login/destroy",absolute:!0,icon:Pe.Xgw,children:(0,Ae.Z)("Sign out")})]}),(0,Ve.jsx)(fn,{onModalClose:i,isOpen:s,returnTo:"/quiz"})]})};var Nn=s(70666);const Sn="VUMXN",_n="WIk_o",wn=(0,lt.Z)(ct.K0),An={appear:Sn,appearActive:_n,enter:Sn,enterActive:_n,exit:"gGhok",exitActive:"cQ7Yd"},On=({children:e,className:t})=>{const s=Ee.Children.toArray(e),n=(0,Ee.useState)((o=s.length,Math.floor(Math.random()*o))),r=(0,Re.Z)(n,2),a=r[0],i=r[1];var o;return(0,Ee.useEffect)((()=>{let e;return s.length>1&&(e=setTimeout((()=>i((a+1)%s.length)),3e4)),()=>clearTimeout(e)}),[a,s.length]),(0,Ve.jsx)(Nn.Z,{children:(0,Ve.jsx)(Ie.uT,{in:!0,classNames:An,className:_e()("byHyj",t),timeout:wn,children:s[a]},`carousel-child-${a}`)})},In="jyUE5",Rn="M4byA",Pn="tSxrO",Ln=({className:e})=>{var t;const s=(0,Ee.useState)(!1),n=(0,Re.Z)(s,2),r=n[0],a=n[1],i=(0,Te.v9)((e=>e.general.sponsorData)),o=(0,Ee.useCallback)((()=>gt("Click Sponsor",{props:{sponsor:"doppler"}})),[]),l=(0,Ee.useCallback)((()=>gt("Click Sponsor",{props:{sponsor:"carbon"}})),[]),c=(0,Ee.useCallback)((()=>a(!0)),[]),u=(0,Ee.useCallback)((()=>a(!1)),[]),d=null==i?void 0:i.statlink,h=null==i?void 0:i.adBlock,p=null==i&&!h;return h?(0,Ve.jsxs)("div",{className:_e()(In,e),children:[(0,Ve.jsx)("div",{className:Rn,children:(0,Ve.jsx)("div",{className:Pn,children:(0,Ae.Z)("Please support regex101")})}),(0,Ve.jsx)("div",{className:"_gHmG",children:(0,Ve.jsxs)(Ie.qX,{noMargin:!0,children:[(0,Ae.Z)("If you're running an ad blocker, consider whitelisting regex101 to support the website.")," ",(0,Ve.jsx)(Ie.Yd,{onClick:c,className:"Q1PRl",children:(0,Ae.Z)("Read more")}),"."]})}),(0,Ve.jsxs)(Ye.Z,{isOpen:r,onModalClose:u,className:"sM6Wv",children:[(0,Ve.jsx)(Ke.Z,{children:(0,Ae.Z)("Advertisements and your privacy")}),(0,Ve.jsxs)(Je.Z,{className:"hv1JN",children:[(0,Ve.jsxs)("p",{children:[(0,Ae.Z)("The advertisements are provided by Carbon, but implemented by regex101."),(0,Ve.jsx)("br",{}),(0,Ve.jsx)("strong",{children:(0,Ae.Z)("No cookies will be used for tracking and no third party scripts will be loaded.")})]}),(0,Ve.jsx)(Ie.vV,{text:"The information is fetched using a JSONP request, which contains the ad text and a link to the ad image. The JSON file and images are fetched from {1} or {2}.",ph1:(0,Ve.jsx)("em",{children:"buysellads.com"}),ph2:(0,Ve.jsx)("em",{children:"buysellads.net"}),tag:"p"}),(0,Ve.jsx)(Ie.vV,{text:"If you have any questions or concerns, please feel free to {1}.",ph1:(0,Ve.jsx)(Ie.rU,{to:"mailto:contact@regex101.com",absolute:!0,children:(0,Ae.Z)("send an email")}),tag:"p"})]}),(0,Ve.jsx)(Xe.Z,{children:(0,Ve.jsx)(Ie.zx,{onClick:u,text:(0,Ae.Z)("Close"),type:He.V5.n1})})]})]}):(0,Ve.jsxs)("div",{className:_e()(In,e),children:[(0,Ve.jsx)("div",{className:Rn,children:(0,Ve.jsx)("div",{className:Pn,children:(0,Ae.Z)("Sponsors")})}),(0,Ve.jsx)("div",{className:"Di8kW",children:(0,Ve.jsx)(On,{children:(0,Ve.jsxs)(Ie.rU,{className:"duRSK",to:"https://www.doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=regex101&utm_source=github",onClick:o,onAuxClick:o,target:"_blank",rel:"nofollow noopener",absolute:!0,children:[(0,Ve.jsx)("div",{className:"RhnCb"}),"All your environment variables, in one place"]})})}),d&&(0,Ve.jsxs)("div",{className:"G3BCS",children:[(0,Ve.jsxs)(Ie.rU,{className:"Ct5Li",to:`${i.statlink}?segment=placement:regex101com`,rel:"nofollow noopener",onClick:l,onAuxClick:l,target:"_blank",absolute:!0,children:[(0,Ve.jsx)("img",{src:i.smallImage,width:120,height:90,loading:"lazy",alt:i.description,children:i.title}),(0,Ve.jsx)("div",{className:"tgFFz",children:i.description}),null==(t=i.pixel)?void 0:t.split("||").map(((e,t)=>(0,Ve.jsx)("img",{src:e.replace("[timestamp]",i.timestamp),style:{display:"none"},height:0,width:0,alt:"",fetchpriority:"low"},`pixel-${t}`)))]}),(0,Ve.jsx)(Ie.rU,{to:i.ad_via_link,className:"JLQ9d",rel:"nofollow noopener",target:"_blank",absolute:!0,children:"Ads via Carbon"})]}),p&&(0,Ve.jsxs)("div",{className:"EJDHZ",children:[(0,Ve.jsx)("div",{className:"k0UBc"}),(0,Ve.jsxs)("div",{className:"IAz16",children:[(0,Ve.jsx)("div",{}),(0,Ve.jsx)("div",{}),(0,Ve.jsx)("div",{})]})]})]})},Mn=(0,Ee.memo)(Ln),Dn="regex101-nickname",Un="_eLp0",Fn="zOliV",Gn=34,Vn=({className:e})=>{const t=(0,Te.v9)((e=>e.general.permalinkFragment)),s=(0,Te.v9)((e=>e.general.version)),n=(0,Te.v9)((e=>e.general.profilePicture)),r=(0,Ee.useRef)(function(){let e=ee.Z.get(Dn);return(!e||"string"!=typeof e||e.length>16||e.includes("..."))&&(e=function(){const e=["Adelie","Hound","Civet","Ainu","Akbash","Akita","Ant","Fox","Hare","Wolf","Mist","Avocet","Baboon","Camel","Badger","Barb","Bat","Beagle","Bear","Collie","Beaver","Beetle","Bichon","Bird","Birman","Bison","Bobcat","Bombay","Bongo","Bonobo","Booby","Boykin","Budgie","Fish","Caiman","Lizard","Canaan","Cat","Cesky","Fousek","Coati","Coral","Cougar","Cow","Coyote","Crab","Crane","Cuscus","Frog","Deer","Bracke","Dhole","Dingo","Discus","Dodo","Dog","Dogo","Donkey","Drever","Duck","Dugong","Dunker","Dusky","Eagle","Mau","Emu","Falcon","Fennec","Ferret","Spitz","Fly","Fossa","Gar","Gecko","Gerbil","Gibbon","Goat","Oriole","Goose","Gopher","Grouse","Guppy","Shark","Heron","Horse","Human","Hyena","Ibis","Iguana","Impala","Indri","Insect","Setter","Jackal","Jaguar","Kakapo","Kiwi","Koala","Kudu","Lemur","Liger","Lion","Llama","Owl","Lynx","Macaw","Magpie","Mayfly","Mole","Molly","Monkey","Moose","Eel","Moray","Moth","Mouse","Mule","Newt","Numbat","Ocelot","Okapi","Olm","Otter","Oyster","Parrot","Pig","Pika","Pike","Poodle","Possum","Prawn","Puffin","Pug","Puma","Pygmy","Quail","Quokka","Quoll","Rabbit","Rat","Robin","Saola","Seal","Serval","Sheep","Shrimp","Skunk","Sloth","Snail","Snake","Somali","Sponge","Squid","Stoat","Swan","Tang","Tapir","Tetra","Tiger","Toucan","Turkey","Uakari","Uguisu","Walrus","Wasp","Weasel","Wombat","Wrasse","Yak","Yorkie","Zebra","Zebu","Zonkey","Zorse"];return`re101-${e[Math.floor(Math.random()*e.length)].toLowerCase()}-?`}(),ee.Z.save(Dn,e)),e}()||"re101-guest-?").current,a=(0,Ee.useCallback)((()=>{Oe.ZP.emit(Oe.Rd)}),[]);return(0,Ve.jsxs)("nav",{className:_e()("uOmOI",e),children:[(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Regex Editor"),tooltipDirection:He.qF.E,to:null!=t?At(t,s):"/",onClick:a,size:Gn,className:Un,activeClassName:Fn,activeRegex:/^\/(?!library|account|quiz|settings)/i,noTheme:!0,children:(0,Ve.jsx)(Pe.mV1,{size:18})}),(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Regex Library"),tooltipDirection:He.qF.E,to:"/library",onClick:a,size:Gn,className:Un,activeClassName:Fn,activeRegex:/^\/library/i,noTheme:!0,children:(0,Ve.jsx)(dn.Q0w,{size:18})}),(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Account"),tooltipDirection:He.qF.E,to:"/account/mine",onClick:a,size:Gn,className:n?"eDcsT":Un,activeClassName:Fn,activeRegex:/^\/account/i,noTheme:!0,children:n?(0,Ve.jsx)("img",{src:n,style:{height:Gn,width:Gn},alt:""}):(0,Ve.jsx)(Pe.dgb,{size:18})}),(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Regex Quiz"),tooltipDirection:He.qF.E,to:"/quiz",onClick:a,size:Gn,className:Un,activeClassName:Fn,activeRegex:/^\/quiz/i,noTheme:!0,children:(0,Ve.jsx)(Pe.Xhu,{size:18})}),(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Settings"),tooltipDirection:He.qF.E,to:"/settings",onClick:a,size:Gn,className:Un,activeClassName:Fn,activeRegex:/^\/settings/i,noTheme:!0,children:(0,Ve.jsx)(Me.b9P,{size:18})}),(0,Ve.jsx)(Ie.x6,{tooltip:(0,Ae.Z)("Live Help"),tooltipDirection:He.qF.E,to:R.WEBCHAT_LINK.replace("<NICKNAME>",r),target:"_blank",size:Gn,className:Un,noTheme:!0,absolute:!0,children:(0,Ve.jsx)(Pe.IGw,{})})]})},Bn=["tooltipDirection","tooltipText","onClick","className"],$n=e=>{let t=e.tooltipDirection,s=e.tooltipText,n=e.onClick,r=e.className,a=(0,E.Z)(e,Bn);return(0,Ve.jsx)(Ie.hU,Object.assign(Object.assign({tooltip:s,tooltipDirection:t,size:28,onClick:n,className:_e()("k3zrI",r),tag:"div"},a),{},{children:(0,Ve.jsx)("div",{className:"_wt32",children:(0,Ve.jsx)(Pe.B4m,{size:16,className:"wL3Ov"})})}))},Hn=(0,Ee.memo)($n),qn=["onClick"],zn=(0,lt.Z)(ct.s_),Wn=["key:updateRegex","key:saveRegex","key:ctrl1","key:ctrl2","key:ctrl3","key:ctrl4","key:ctrlB","key:ctrlG"],Yn=e=>{let t=e.onClick,s=(0,E.Z)(e,qn);return(0,Ee.useEffect)((()=>{const e=Wn.map((e=>{const s=(e=>(...s)=>{t(),setTimeout((()=>{Oe.ZP.listenerCount(e)>1&&Oe.ZP.emit(e,...s)}),zn)})(e);return Oe.ZP.on(e,s),{key:e,listener:s}}));return()=>e.forEach((({key:e,listener:t})=>Oe.ZP.off(e,t)))}),[t]),(0,Ve.jsx)(Hn,Object.assign({onClick:t},s))},Kn="MPQtP",Jn="XZcdB",Xn="Hf3vu",Qn=(0,lt.Z)(ct.s_),er={appear:Jn,appearActive:Xn,enter:Jn,enterActive:Xn,exit:"LSp5h",exitActive:"rMyiN"},tr=({children:e})=>{const t=(0,Ee.useState)(!1),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(0,Ee.useCallback)((e=>{e.stopPropagation(),r(!1)}),[]),i=(0,Ee.useCallback)((()=>r(!0)),[]),o=(0,Ee.useCallback)((e=>{e.stopPropagation(),e.preventDefault()}),[]);return(0,Ee.useEffect)((()=>(n&&(Oe.ZP.once("key:escape",a),Oe.ZP.once(Oe.Rd,a)),()=>{Oe.ZP.off("key:escape",a),Oe.ZP.off(Oe.Rd,a)})),[n,a]),(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)(Yn,{className:"SjbhX",tooltipDirection:He.qF.SE,tooltipText:(0,Ae.Z)("Show Sidebar"),onClick:i}),(0,Ve.jsx)(Ie.h_,{isOpen:n,closeTimeout:Qn,children:(0,Ve.jsx)(Ie.uT,{className:"cek5f",classNames:er,timeout:Qn,in:n,onMouseUp:a,children:(0,Ve.jsx)(Ie.iQ,{children:(0,Ve.jsxs)("div",{className:Kn,onMouseUp:o,children:[(0,Ve.jsx)($e,{className:"cfODq",noClick:!0}),e]})})})})]})},sr=parseFloat(Ue.p4),nr=({alwaysCollapseLeftSidebar:e})=>{const t=(0,we.Sj)(sr),s=(0,Ee.useState)(!se()||window.navigator.onLine),n=(0,Re.Z)(s,2),r=n[0],a=n[1];(0,Ee.useEffect)((()=>{const e=()=>a(!0),t=()=>a(!1);return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}),[]);const i=(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("div",{className:"AkJag",children:[(0,Ve.jsx)(Vn,{className:"i1N2B"}),(0,Ve.jsx)("div",{className:"hIvL6",children:(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:"library/*",element:(0,Ve.jsx)(ln,{})}),(0,Ve.jsx)(Ne.AW,{path:"/settings/*",element:(0,Ve.jsx)(un,{})}),(0,Ve.jsx)(Ne.AW,{path:"/quiz/*",element:(0,Ve.jsx)(kn,{})}),(0,Ve.jsx)(Ne.AW,{path:"/account/*",element:(0,Ve.jsx)(Zn,{})}),(0,Ve.jsx)(Ne.AW,{path:"/r/:permalinkFragment/:version/*",element:(0,Ve.jsx)(Ks,{})}),(0,Ve.jsx)(Ne.AW,{path:"/*",element:(0,Ve.jsx)(Ks,{})})]})})]}),(0,Ve.jsx)(Mn,{className:"XNbml"}),!r&&(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:"ELopF",children:(0,Ae.Z)("No Internet Connection")})]});return e||t.width<=sr?(0,Ve.jsx)(tr,{children:i}):(0,Ve.jsx)("div",{className:Kn,children:i})};var rr=s(3641);const ar=se()?(0,Ee.lazy)((()=>Promise.all([s.e(648),s.e(961)]).then(s.bind(s,81623)))):()=>{},ir=()=>{const e=(0,Te.v9)((e=>e.regexEditor.regex)),t=(0,Te.v9)((e=>e.regexEditor.flags)),s=(0,Te.v9)((e=>e.regexEditor.delimiter)),n=(0,Te.v9)((e=>e.regexEditor.testString)),r=(0,Te.v9)((e=>e.regexEditor.showSubstitutionArea||e.regexEditor.showListSubstitutionArea)),a=(0,Te.v9)((e=>e.regexEditor.substString)),i=(0,Te.v9)((e=>e.regexEditor.flavor)),o=(0,ke.lr)({language:Ws.aQ}),l=(0,Re.Z)(o,1)[0];if(!e)return(0,Ve.jsx)(Ie.l_,{to:"/"});const c=l.get("language"),u=Ws.vI.find((e=>e.value===c))||Ws.vI[0],d=(0,Ve.jsxs)("div",{className:"KRaGv",children:[(0,Ve.jsx)(Ie.$j,{className:"cvoeF",size:He.J7.TC}),(0,Ae.Z)("Loading code sample...")]});return(0,Ve.jsxs)("div",{className:"zOaGx",children:[(0,Ve.jsxs)("div",{className:"vkmye",children:[(0,Ve.jsx)(Ie.gx,{header:(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Language")}),className:"kolUL",children:(0,Ve.jsx)(xt.Z,{children:Ws.vI.map((e=>(0,Ve.jsx)(tn,{isActive:e.value===u.value,icon:Pe.mV1,to:`?language=${e.value}`,children:e.string},`codegen-${e.value}`)))})}),(0,Ve.jsx)(Ie.gx,{header:(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Generated Code")}),className:"EHsbj",children:(0,Ve.jsx)(rr.Z,{className:"tu4NX",children:(0,Ve.jsx)(Ie.I2,{fallback:d,children:(0,Ve.jsx)(ar,{regex:e,flags:t,delimiter:s,testString:n,isSubstituting:r,substString:a,flavor:i,isGlobal:t.includes("g"),language:u.value})})})})]}),(0,Ve.jsx)(Ie.qX,{className:"UB_yQ",children:(0,Ve.jsxs)("p",{children:[(0,Ae.Z)("Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report.")," ",(0,Ae.Z)("For a full regex reference for {1}, please visit:",u.string)," ",(0,Ve.jsx)(Ie.rU,{to:u.referencePage,absolute:!0,target:"_blank",children:u.referencePage})]})})]})},or=se()?(0,Ee.lazy)((()=>s.e(153).then(s.bind(s,4758)))):()=>{},lr=()=>{const e=(0,Ne.UO)(),t=e.permalinkFragment,s=e.version,n=(0,ke.lr)(),r=(0,Re.Z)(n,1)[0].get("testId"),a=(0,Te.v9)((e=>e.regexEditor.showUnitTestArea)),i=(0,Te.v9)((e=>isNaN(r)?null:e.unitTests.tests[r])),o=(0,Te.v9)((e=>e.regexEditor.regex)),l=(0,Te.v9)((e=>e.regexEditor.delimiter)),c=(0,Te.v9)((e=>e.regexEditor.flags)),u=(0,Te.v9)((e=>e.regexEditor.testString)),d=(0,Te.v9)((e=>e.regexEditor.flavor));if(!(0,zs.G)(d)||""===o||a&&null==i){const e=null!=t?`/r/${t}/${s}`:"/";return(0,Ve.jsx)(Ie.l_,{to:e})}const h=(0,Ve.jsxs)("div",{className:"pWsZe",children:[(0,Ve.jsx)(Ie.$j,{className:"q_luf"}),(0,Ve.jsx)("div",{className:"_6fv9",children:(0,Ae.Z)("Please wait while your expression is being debugged...")})]});return(0,Ve.jsx)(Ie.I2,{fallback:h,errorClassName:"LeB5S",children:(0,Ve.jsx)(or,{regex:o,flags:c,testString:(null==i?void 0:i.testString)||u,flavor:d,delimiter:l})})};var cr=s(17159),ur=s(12599),dr=s(34061),hr=s(84682);const pr="luWMx",gr="xYbLs",mr=(0,lt.Z)(ct.oA),xr={appear:pr,appearActive:gr,enter:pr,enterActive:gr,exit:"d0ccR",exitActive:"CZqGt"},fr=({children:e,title:t,preserveLocation:s,location:n})=>{const r=(0,Ne.s0)(),a=(0,we.PS)(),i=(0,Ee.useMemo)((()=>{const e=(0,ur.i3)("..",n.pathname);return s?Object.assign(Object.assign({},n),{},{pathname:e.pathname}):e}),[n,s]),o=(0,Ee.useCallback)((e=>{e.stopPropagation(),r(i)}),[r,i]);(0,Ee.useEffect)((()=>(Oe.ZP.once("key:escape",o),Oe.ZP.emit(Oe.B3,Zt.UPDATE_REGEX),Oe.ZP.emit(Oe.B3,Zt.SAVE_REGEX),()=>{Oe.ZP.off("key:escape",o),Oe.ZP.emit(Oe.LG,Zt.UPDATE_REGEX),Oe.ZP.emit(Oe.LG,Zt.SAVE_REGEX)})),[o]);const l=(0,Ee.useCallback)((e=>e.stopPropagation()),[]);return(0,Ve.jsx)(Ie.iQ,{children:(0,Ve.jsx)("div",{className:_e()("FAEdS",a&&hr.Z.reduceMotion),onClick:o,children:(0,Ve.jsx)("div",{className:"oc96W",children:(0,Ve.jsxs)("div",{className:"Q0dmP",onClick:l,children:[(0,Ve.jsxs)("div",{className:"OaNsb",children:[(0,Ve.jsx)("h1",{children:t}),(0,Ve.jsx)(Ie.Yd,{className:"MGagp",onClick:o,"aria-label":(0,Ae.Z)("Close"),children:(0,Ve.jsx)(Pe.eSQ,{size:24,className:"e1IQs"})})]}),(0,Ve.jsx)("div",{className:"wy53k",children:e})]})})})})},vr=({children:e,title:t,preserveLocation:s=!1,path:n})=>{const r=(0,Ne.TH)(),a=(0,we.PS)();return(0,Ve.jsx)(Ie.h_,{isOpen:!0,closeTimeout:mr,children:(0,Ve.jsx)(Nn.Z,{component:null,children:(0,Ve.jsx)(cr.Z,{classNames:a?dr.$0:xr,timeout:a?dr.mc:mr,children:(0,Ve.jsx)(Ne.Z5,{location:r,children:(0,Ve.jsx)(Ne.AW,{path:n,element:(0,Ve.jsx)(fr,{children:e,title:t,preserveLocation:s,location:r})})})},r.pathname)})})},br=()=>{const e=(0,Ne.UO)().permalinkFragment,t=(0,Te.v9)((e=>e.regexEditor.regexVersions)),s=(0,we.$5)("getRegexVersions"),n=(0,Re.Z)(s,3),r=n[0],a=n[1],i=n[2];if((0,we.DB)((()=>{i((0,X.zp)(e))}),[e]),r)return null;if(a)return(0,Ve.jsx)(Ie.l_,{to:"/"});const o=t[t.length-1];return(0,Ve.jsx)(Ie.l_,{to:`/r/${e}/${o}`})};var jr=s(20946);const Cr="PngQi",Zr=({onResize:e,className:t})=>{const s=(0,Ee.useState)(!1),n=(0,Re.Z)(s,2),r=n[0],a=n[1],i=(0,Ee.useState)(0),o=(0,Re.Z)(i,2),l=o[0],c=o[1],u=(0,Ee.useState)(0),d=(0,Re.Z)(u,2),h=d[0],p=d[1],g=(0,Ee.useCallback)((e=>{a(!0),c(e.clientX),p(e.clientY)}),[]);return(0,Ee.useEffect)((()=>{const t=t=>e({x:t.clientX,y:t.clientY,dx:Math.abs(l-t.clientX),dy:Math.abs(h-t.clientY)}),s=()=>{document.body.classList.remove(Cr),window.removeEventListener("mouseup",s,{passive:!0}),window.removeEventListener("mousemove",t,{passive:!0}),a(!1)};return r&&(document.body.classList.add(Cr),window.addEventListener("mouseup",s,{passive:!0}),window.addEventListener("mousemove",t,{passive:!0})),()=>{document.body.classList.remove(Cr),window.removeEventListener("mouseup",s,{passive:!0}),window.removeEventListener("mousemove",t,{passive:!0})}}),[r,e,l,h]),(0,Ve.jsx)("div",{className:_e()("Kmeux",t),onMouseDown:g})},yr=(0,Ee.memo)(Zr),Er=({children:e})=>{const t=(0,Te.I0)(),s=(0,Te.v9)((e=>e.rightSidebar.width)),n=(0,Ee.useState)(s),r=(0,Re.Z)(n,2),a=r[0],i=r[1],o=(0,Ee.useRef)(null),l=(0,jr.Z)((e=>{t((0,X.Gj)(e)),t((0,X.Ot)()),i(e)}),R.UPDATE_RESULT_DELAY),c=(0,Ee.useCallback)((e=>{var t;Oe.ZP.emit(Oe.UJ);const s=window.innerWidth-e.x;l(s),null!=(t=o.current)&&t.style&&(o.current.style.width=`${s}px`)}),[l]);return(0,Ee.useEffect)((()=>()=>l.cancel()),[l]),(0,Ve.jsxs)("div",{className:"IPjTl",style:{width:`${a}px`},ref:o,children:[(0,Ve.jsx)(yr,{className:"RyQaE",onResize:c}),e]})},Tr=["className","nodeLabel","children","defaultCollapsed","onClick"],kr=e=>{let t=e.className,s=e.nodeLabel,n=e.children,r=e.defaultCollapsed,a=void 0!==r&&r,i=e.onClick,o=(0,E.Z)(e,Tr);const l=(0,Ee.useState)(a),c=(0,Re.Z)(l,2),u=c[0],d=c[1],h=(0,Ee.useCallback)(((...e)=>{d((e=>!e)),i&&i(...e)}),[i]);return(0,Ve.jsxs)("div",Object.assign(Object.assign({className:_e()("UHIuh",t),onClick:i},o),{},{children:[(0,Ve.jsxs)("div",{className:"eZsI3",children:[(0,Ve.jsx)(Ie.Yd,{className:"ng0cj",onClick:h,"aria-label":u?(0,Ae.Z)("Expand Subtree"):(0,Ae.Z)("Collapse Subtree"),children:(0,Ve.jsx)("div",{className:_e()("NjK4I",u&&"qtFSJ")})}),s]}),!u&&(0,Ve.jsx)("div",{className:"UF5u5",children:n})]}))};var Nr=s(30317),Sr=s(56468),_r=s(31360),wr=s(68417);const Ar=e=>(0,Ve.jsx)("span",{className:wr.Z.tokenSample,children:(0,Ve.jsx)(Ie.K,{text:e})}),Or=e=>(0,Ve.jsx)("span",{className:wr.Z.keyword,children:e}),Ir=e=>(0,Ve.jsx)("span",{className:wr.Z.plainText,children:(0,Ve.jsx)(Ie.K,{text:e,removeNewlines:!0})}),Rr=e=>(0,Ve.jsx)(Ie.qX,{type:He.gr.u_,children:e?(0,Ae.Z)("This modifier may not be supported in all browsers"):(0,Ae.Z)("This construct may not be supported in all browsers")});function Pr(e){return e.map(((e,t)=>e.error?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("span",{className:_e()(wr.Z.token,e.style),children:e.string})," ",Lr(e.error)]},`error-explanation-${t}`):null))}function Lr(e){switch(e){case _r.CL:return(0,Ae.Z)("Incomplete group structure");case _r.Xu:return(0,Ae.Z)("The condition is invalid (you may be referencing a non-existent subpattern or group)");case _r.wi:return(0,Ae.Z)("A subpattern name must be unique");case _r.kU:return(0,Ae.Z)("Bad subpattern name. Ensure it is alpha numeric and does not begin with a digit");case _r.cs:return(0,Ae.Z)("There are too many alternatives within the parent structure");case _r.gN:return(0,Ae.Z)("This verb is unknown or invalid");case _r.As:return(0,Ae.Z)("This verb must be placed at the start of the regex");case _r.Bj:return(0,Ae.Z)("This token references a non-existent or invalid subpattern");case _r.RY:return(0,Ae.Z)("The preceding token is not quantifiable");case _r.Hh:return(0,Ae.Z)("The quantifier range is out of order");case _r.sw:return(0,Ae.Z)("Character class missing closing bracket");case _r.i0:return(0,Ae.Z)("Character range is out of order");case _r.fA:return(0,Ae.Z)("A posix character class may only appear inside a character class");case _r.VM:return(0,Ae.Z)("The posix class is unknown/invalid");case _r.RH:return(0,Ae.Z)("This token is either not supported by the selected flavor or by regex101");case _r.zX:return(0,Ae.Z)("Pattern may not end with a trailing backslash");case _r.t0:return(0,Ve.jsx)(Ie.vV,{text:"An unescaped delimiter must be escaped; in most languages with a backslash ({1})",ph1:Ar("\\")});case _r.Yo:return(0,Ae.Z)("No hex code was specified");case _r.y1:return(0,Ae.Z)("The character offset is too large");case _r.oH:return(0,Ae.Z)("Surrogate in unicode/hex escape is disallowed");case _r.Rf:return(0,Ae.Z)("The value specified is too large");case _r.XD:return(0,Ae.Z)("A quote without content has ambiguous behavior and should be avoided");case _r.YY:return(0,Ae.Z)("The token is incomplete");case _r.xi:return(0,Ae.Z)("This script is unknown/invalid");case _r.Iu:return(0,Ae.Z)("Invalid control character");case _r.mi:return(0,Ae.Z)("This token has no special meaning and has thus been rendered erroneous");case _r.bk:return(0,Ae.Z)("The name of this subpattern is too long");case _r.eB:return(0,Ae.Z)("A lookbehind assertion has to be fixed width");case _r.jV:return(0,Ae.Z)("This token can not be used in a lookaround due to either making it non-fixed width or interfering with the pattern matching");case _r.Cc:return(0,Ae.Z)("A quantifier inside a lookbehind makes it non-fixed width");case _r.M3:return(0,Ae.Z)("Regex101 only supports inline modifiers to be placed at the start of the regex for python (which is also best practice)");case _r.mB:return(0,Ve.jsx)(Ie.vV,{text:"You can not set both the {1} and {2} flag simultaneously",ph1:(0,Ve.jsx)("strong",{className:wr.Z.flags,children:"a"}),ph2:(0,Ve.jsx)("strong",{className:wr.Z.flags,children:"u"})});case _r.BC:return(0,Ae.Z)("You cannot create a range with shorthand escape sequences");case _r.jb:return(0,Ae.Z)("The escape sequence to match backspace is not supported in the selected flavor");case _r.d3:return(0,Ae.Z)("Due to a bug in PCRE creating ranges with an escaped literal is unsafe. To avoid this, simply use the literal representation instead");case _r.K0:return(0,Ae.Z)("Invalid unicode escape");case _r.Vt:return(0,Ae.Z)("Quantifier range is too large");case _r.wn:return(0,Ae.Z)("Groups with the same index must either have the same name or both be non-named groups");case _r.f0:return(0,Ae.Z)("Unmatched parenthesis");case _r.IA:return(0,Ve.jsx)(Ie.vV,{text:"This token must be escaped when the {1} flag is enabled unless they form a valid quantifier",ph1:(0,Ve.jsx)("strong",{className:wr.Z.flag,children:"u"})});case _r.Y4:return(0,Ae.Z)("The range is invalid because either the left or right token is erroneous");case _r.wW:return(0,Ae.Z)("Bogus escape: this escape is not recognized in the python flavor");case _r.Qc:return(0,Ve.jsx)(Ie.vV,{text:"Backticks can not be used in a raw string, use {1} instead",ph1:Ar("\\x60")});case _r.$H:return(0,Ae.Z)("POSIX Word Boundaries must be the only item inside a character class");case _r.Af:return(0,Ae.Z)("Character range with surrogate pairs without unicode enabled results in ambiguous behavior");case _r.of:return(0,Ve.jsx)(Ie.vV,{text:"This token is not valid under strict mode, and may cause certain browsers to throw errors. If you need to reference this subpattern, use the {1} syntax, otherwise use the token literally.",ph1:Ar("$n")});case _r.Gz:return(0,Ae.Z)("Invalid placement of hyphen; there may only be one inside the group");case _r.rs:return(0,Ae.Z)("Unmatched opening bracket");case _r.Jf:return(0,Ae.Z)("The number is too large");case _r.O3:return(0,Ae.Z)("You may not use a null byte in your regex, as that effectively terminates it at that position");case _r.sb:return(0,Ae.Z)("Named backreference may not be used before group definition");case _r.Oy:return(0,Ae.Z)("Backreferences may not be placed inside character classes. If you meant to create an octal escape, prefix the escape with a 0.");case _r.Ey:return(0,Ve.jsx)(Ie.vV,{text:"End quote literals without a corresponding open quote literal {1} match null, and only serve to create visual noise. If you meant to match the literal {2}, remove the backslash.",ph1:Ar("\\Q"),ph2:Ir("E")});case _r.xX:return(0,Ae.Z)("You cannot nest conditional replacements more than 10 levels deep");case _r.KE:return(0,Ae.Z)("You cannot create a range with an opening bracket");case _r.HT:return(0,Ae.Z)("Inline modifiers cannot be placed in the root of a conditional due to a bug in the .NET regex engine");case _r.BL:return(0,Ae.Z)("You cannot create character ranges with the terminating character class token");case _r.Qi:return(0,Ae.Z)("The name of the verb is too long");case _r.Ct:return(0,Ve.jsx)(Ie.vV,{text:"This construct cannot be used with the {1} option",ph1:Or("NonBacktracking")});case _r.jW:return(0,Ae.Z)("You cannot modify the same flag multiple times in the same definition");case _r.bb:return(0,Ae.Z)("Malplaced character class subtraction operator");case _r.jz:return(0,Ae.Z)("Malplaced character class intersection operator");case _r.nv:return(0,Ae.Z)("Malplaced symmetric character class difference operator");case _r.wY:return(0,Ae.Z)("Due to a bug in Rust this script is unavailable. Try specifying the category to work around this issue.");case _r.n2:return(0,Ae.Z)("Groups have been nested too deeply, consider simplifying your pattern");default:return Ze.O7(new Error(`Unknown error type '${e}'`)),null}}const Mr=function(e){const t=e.type,s=e.string;let n=null;if(t===Sr.Cz?n=(0,Ae.Z)("inserts the portion of the string that precedes the matched substring"):t===Sr.tI?n=(0,Ae.Z)("inserts the portion of the string that follows the matched substring"):t===Sr.hL?n=(0,Ae.Z)("inserts the matched substring"):t===Sr.ul?n=(0,Ae.Z)("inserts the last group that was most recently captured by the regex"):t===Sr.Ud&&(n=(0,Ae.Z)("inserts the entire input string")),n)return{explanation:(0,Ve.jsx)("span",{children:n})};throw new Error(`Unknown subst token '${s}' (${t})`)},Dr=e=>{if(!e)return null;const t=e.partOfRange,s=e.rangeToken,n=e.openCharClass,r=e.openGroup,a=e.quantifiedToken,i=e.error;return t?s:(null==a?void 0:a.type)===Sr.Wj?a:i?e:n||r||e};function Ur(e,t=!1,s=!1){const n=e.lineTerminators;let r="";t&&n.includes("\\r")&&n.includes("\\n")&&!n.includes("\\r\\n")&&(r=`(${(0,Ae.Z)("with no special consideration for the \\r\\n sequence")})`);let a="";return a=s?(0,Ae.Z)("Lines are delimited by: {1} {2}",n.join(", "),r):(0,Ae.Z)("Line terminator(s) are: {1} {2}",n.join(", "),r),(0,Ve.jsx)(Ie.lx,{text:a,direction:He.qF.NW,multiline:!0,children:(0,Ve.jsx)("div",{className:wr.Z.tooltip,role:"figure",children:(0,Ve.jsx)(Pe.zXH,{size:16,className:wr.Z.icon})})})}const Fr=function(e,t){const s=e.string,n=e.flags,r=e.flavor,a=e.type,i=e.isSubstitution,o=e.unicodeEnabled,l=s.length>1?s.charAt(1):s.charAt(0),c=o,u=n.includes("m"),d=n.includes("s"),h=n.includes("D"),p=r===x().JAVASCRIPT,g=r===x().PYTHON,m=r===x().DOTNET;if("w"===l)return c&&!p||m?{explanation:(0,Ve.jsx)(Ie.vV,{text:"match any word character in any script (equivalent to {1})",ph1:Ar(m?"[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]":"[\\p{L}\\p{N}_]")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any word character (equivalent to {1})",ph1:Ar("[a-zA-Z0-9_]")})};if("W"===l)return c&&!p||m?{explanation:(0,Ve.jsx)(Ie.vV,{text:"match any non-word character in any script (equivalent to {1})",ph1:Ar(m?"[^\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]":"[^\\p{L}\\p{N}_]")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any non-word character (equivalent to {1})",ph1:Ar("[^a-zA-Z0-9_]")})};if("d"===l)return c&&!p||m?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a digit zero through nine in any script except ideographic scripts (equivalent to {1})",ph1:Ar("\\p{Nd}")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a digit (equivalent to {1})",ph1:Ar("[0-9]")})};if("D"===l)return c&&!p||m?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any non-numeric character in any script (equivalent to {1})",ph1:Ar("\\P{Nd}")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any character that's not a digit (equivalent to {1})",ph1:Ar("[^0-9]")})};if("s"===l){if(p)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any whitespace character (equivalent to {1})",ph1:Ar("[\\r\\n\\t\\f\\v \\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]")})};if(c||m)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any kind of invisible character (equivalent to {1})",ph1:Ar(m?"[\\f\\n\\r\\t\\v\x85\\p{Z}]":"[\\p{Z}\\h\\v]")})};const e=Ar(g?"[\\r\\n\\t\\f\\v \xa0]":"[\\r\\n\\t\\f\\v ]");return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any whitespace character (equivalent to {1})",ph1:e})}}if("S"===l)return p?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any non-whitespace character (equivalent to {1})",ph1:Ar("[^\\r\\n\\t\\f\\v \\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]")})}:c||m?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any kind of visible character (equivalent to {1})",ph1:Ar(m?"[^\\f\\n\\r\\t\\v\x85\\p{Z}]":"[^\\p{Z}\\h\\v]")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any non-whitespace character (equivalent to {1})",ph1:Ar("[^\\r\\n\\t\\f\\v ]")})};if("h"===l)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any horizontal whitespace character (equivalent to {1})",ph1:Ar("[[:blank:]]")})};if("H"===l)return{explanation:(0,Ae.Z)("matches any character that's not a horizontal whitespace character")};if("v"===l)return{explanation:(0,Ae.Z)("matches any vertical whitespace character")};if("V"===l)return{explanation:(0,Ae.Z)("matches any character that's not a vertical whitespace character")};if("N"===l)return{explanation:(0,Ae.Z)("matches any non-newline character")};if("R"===l)return{explanation:(0,Ae.Z)("matches any Unicode newline sequence")};if("C"===l)return{explanation:(0,Ae.Z)("matches one data unit, even in UTF mode (best avoided)")};if("X"===l)return{explanation:(0,Ae.Z)("matches any number of Unicode characters that form an extended Unicode sequence")};if("t"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a tab character {1}",ph1:Or("(ASCII 9)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a tab character {1}",ph1:Or("(ASCII 9)")})};if("r"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a carriage return {1}",ph1:Or("(ASCII 13)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a carriage return {1}",ph1:Or("(ASCII 13)")})};if("n"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a line-feed (newline) character {1}",ph1:Or("(ASCII 10)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a line-feed (newline) character {1}",ph1:Or("(ASCII 10)")})};if("f"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a form-feed character {1}",ph1:Or("(ASCII 12)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a form-feed character {1}",ph1:Or("(ASCII 12)")})};if("a"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts the bell character {1}",ph1:Or("(ASCII 7)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the bell character {1}",ph1:Or("(ASCII 7)")})};if("e"===l)return i?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts esc {1}",ph1:Or("(ASCII 7)")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches esc {1}",ph1:Or("(ASCII 7)")})};if("b"===l){if(i)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a backspace character {1}",ph1:Or("(ASCII 8)")})};const e=(0,Ve.jsx)("span",{className:wr.Z.zeroWidth}),t=(0,Ve.jsxs)("span",{className:wr.Z.tokenSample,children:["(^",e,"\\w|\\w",e,"$|\\W",e,"\\w|\\w",e,"\\W)"]});return{explanation:(0,Ve.jsx)(Ie.vV,{text:"assert position at a word boundary: {1}",ph1:t})}}if("B"===l)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"assert position where {1} does not match",ph1:Ar("\\b")})};if("A"===l)return{explanation:(0,Ae.Z)("asserts position at start of the string")};if("z"===l)return{explanation:(0,Ae.Z)("asserts position at the end of the string")};if("G"===l)return{explanation:(0,Ae.Z)("asserts position at the end of the previous match or the start of the string for the first match")};if("K"===l)return{explanation:(0,Ae.Z)("resets the starting point of the reported match. Any previously consumed characters are no longer included in the final match")};if("."===l){let s="";return d||(s=(0,Ae.Z)("(except for line terminators)")),{explanation:(0,Ve.jsxs)("span",{children:[c&&(0,Ae.Z)("matches any character, including unicode {1}",s),!c&&(0,Ae.Z)("matches any character {1}",s),!d&&!t.brief&&Ur(e)]})}}if("^"===l){let s=(0,Ae.Z)("the string");return u&&(s=(0,Ae.Z)("a line")),{explanation:(0,Ve.jsxs)("span",{children:[(0,Ae.Z)("asserts position at start of {1}",s),u&&!t.brief&&Ur(e,!0,!0)]})}}if("Z"===l)return{explanation:(0,Ae.Z)("asserts position at the end of the string, or before the line terminator right at the end of the string (if any)")};if("$"===l){let s="";return s=u?(0,Ae.Z)("asserts position at the end of a line"):h||p||r===x().GOLANG?(0,Ae.Z)("asserts position at the end of the string"):(0,Ae.Z)("asserts position at the end of the string, or before the line terminator right at the end of the string (if any)"),{explanation:(0,Ve.jsxs)("span",{children:[s,!h&&!t.brief&&Ur(e,!0,u)]})}}return Ze.O7(new Error(`Unable to explain token '${a}': '${s}'`)),{explanation:null}};function Gr(e,t){return Vr(e,t)}function Vr(e,t,s=!1){const n=e.flags,r=e.flavor,a=e.inCharClass,i=e.type,o=e.codePoint,l=e.charCode,c=e.isSubstitution,u=e.isPoorlyPlaced,d=n.includes("x"),h=n.includes("xx"),p=n.includes("i");let g=t;if(s||(!d||a&&r!==x().JAVA&&r!==x().RUST)&&!h||i===Sr.$U||(g=g.replace(/[ \t\r\n\f]/g,"")),""===g)return{explanation:null};const m=o||l;if(c)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts the character {1} with index {2} ({3} or {4})",ph1:Ir(g),ph2:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m,(0,Ve.jsx)("sub",{children:"10"})]})),ph3:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m.toString(16).toUpperCase(),(0,Ve.jsx)("sub",{children:"16"})]})),ph4:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m.toString(8).toUpperCase(),(0,Ve.jsx)("sub",{children:8})]}))})};const f=a?(0,M.Z)(g).join(""):g,v=[...f].length,b=p?(0,Ae.Z)("case insensitive"):(0,Ae.Z)("case sensitive");if(a&&v>1)return{explanation:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ae.Z)("matches a single character in the list")," ",Ir(f)," (",b,")"]})};const j=a&&u&&"-"===t?(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("This hyphen is treated literally, which might be confusing for others. Consider escaping it or placing at the start or end of the class.")}):null;return 1===v&&i!==Sr.$U?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the character {1} with index {2} ({3} or {4}) literally ({5})",ph1:Ir(f),ph2:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m,(0,Ve.jsx)("sub",{children:"10"})]})),ph3:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m.toString(16).toUpperCase(),(0,Ve.jsx)("sub",{children:"16"})]})),ph4:Or((0,Ve.jsxs)(Ve.Fragment,{children:[m.toString(8).toUpperCase(),(0,Ve.jsx)("sub",{children:8})]})),ph5:b}),notice:j}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the characters {1} literally ({2})",ph1:Ir(g),ph2:b}),notice:j}}function Br(e){return 0===e?(0,Ae.Z)("zero"):1===e?(0,Ae.Z)("one"):e===1/0?(0,Ae.Z)("unlimited"):e}const $r=function(e){const t=e.previousToken.type;let s;"?"===e.string||"??"===e.string||e.flavor===x().DOTNET||t!==Sr.t&&t!==Sr.sS?(0,Sr.Az)(t)&&t!==Sr.qh&&t!==Sr.fy&&(s=(0,Ve.jsx)(Ie.qX,{type:He.gr.u_,children:(0,Ae.Z)("A quantifier following a lookaround serves no purpose, and can safely be removed from the regular expression")})):s=(0,Ve.jsx)(Ie.qX,{type:He.gr.u_,children:(0,Ae.Z)("A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data")});const n=e.to===1/0||e.to<=1?Br(e.to):e.to,r=e.to===1/0||e.to<=1?Br(e.from):e.from;if(e.from===e.to){let t;return 1===e.from?t=(0,Ae.Z)("meaningless quantifier"):0===e.from&&(t=(0,Ae.Z)("causes token to be ignored")),{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the previous token exactly {1} {2} {3}",ph1:Or(r),ph2:1!==e.from?(0,Ae.Z)("times"):(0,Ae.Z)("time"),ph3:t?`(${t})`:""}),notice:s}}let a,i;return e.possessive?(a=(0,Ae.Z)("as many times as possible, without giving back"),i=(0,Ae.Z)("possessive")):e.lazy?(a=(0,Ae.Z)("as few times as possible, expanding as needed"),i=(0,Ae.Z)("lazy")):(a=(0,Ae.Z)("as many times as possible, giving back as needed"),i=(0,Ae.Z)("greedy")),{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the previous token between {1} and {2} times, {3} {4}",ph1:Or(r),ph2:Or(n),ph3:a,ph4:(o="("+i+")",(0,Ve.jsx)("span",{className:wr.Z.info,children:o}))}),notice:s};var o};var Hr=s(32092);const qr=function(e,{alternatives:t,brief:s}){var n;if(s)return(null==(n=e.parent)?void 0:n.type)===Sr.oK?{explanation:(0,Ae.Z)("Separates the true and false case of the parent conditional.")}:{explanation:(0,Ae.Z)("Equivalent to boolean OR")};if(e.parent){if(e.parent.type===Sr.oK)return 0===e.alternativeNumber?{explanation:(0,Ae.Z)("If condition is met, match the following regex")}:{explanation:(0,Ae.Z)("Else match the following regex")};if(0===e.parent.alternatives)return{explanation:null}}else if(0===t)return{explanation:null};return{explanation:(0,Ae.Z)("{1} Alternative",(0,Hr.Gz)(e.alternativeNumber+1))}},zr=function(e){const t=e.string.replace(/^\\Q|\\E$/g,"");return""===t?{explanation:(0,Ae.Z)("matches an empty string (any position)")}:Gr(e,t)};function Wr(e,t,s,n){const r=function(e,t,s){if("g"===t)return(0,Ve.jsx)(Ie.vV,{text:"{1}. All matches (don't return after first match)",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"g"}),"lobal"]})});if("i"===t)return s?(0,Ve.jsx)(Ie.vV,{text:"{1}. Case insensitive match (ignores case of {2})",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"i"}),"nsensitive"]}),ph2:Ar("[a-zA-Z]")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Case sensitive match",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-",(0,Ve.jsx)("strong",{children:"i"}),"nsensitive"]})});if("J"===t)return s?(0,Ae.Z)("Allow duplicate subpattern names"):(0,Ae.Z)("Disallow duplicate subpattern names");if("s"===t)return s?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.vV,{text:"{1}. Dot matches newline characters",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"s"}),"ingle line"]})}),e===x().JAVASCRIPT&&Rr(!0)]}):(0,Ve.jsx)(Ie.vV,{text:"{1}. A dot won't match {2}",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-",(0,Ve.jsx)("strong",{children:"s"}),"ingle line"]}),ph2:Ar("\\n")});if("m"===t)return s?(0,Ve.jsx)(Ie.vV,{text:"{1}. Causes {2} and {3} to match the begin/end of each line (not only begin/end of string)",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"m"}),"ulti line"]}),ph2:Ar("^"),ph3:Ar("$")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Causes {2} and {3} to match begin/end of string",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-",(0,Ve.jsx)("strong",{children:"m"}),"ulti line"]}),ph2:Ar("^"),ph3:Ar("$")});if("xx"===t)return s?(0,Ve.jsx)(Ie.vV,{text:"{1}. Spaces and text after a {2} in the pattern are ignored (even whitespace inside character classes)",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["e",(0,Ve.jsx)("strong",{children:"x"}),"tra e",(0,Ve.jsx)("strong",{children:"x"}),"tended"]}),ph2:Or("#")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Whitespaces and {2} in the pattern are treated literally",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-e",(0,Ve.jsx)("strong",{children:"x"}),"tra e",(0,Ve.jsx)("strong",{children:"x"}),"tended"]}),ph2:Or("#")});if("x"===t)return s?(0,Ve.jsx)(Ie.vV,{text:"{1}. Spaces and text after a {2} in the pattern are ignored",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["e",(0,Ve.jsx)("strong",{children:"x"}),"tended"]}),ph2:Or("#")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Whitespaces and {2} in the pattern are treated literally",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-e",(0,Ve.jsx)("strong",{children:"x"}),"tended"]}),ph2:Or("#")});if("X"===t)return(0,Ve.jsx)(Ie.vV,{text:"{1}. A {2} followed by a letter with no special meaning is faulted",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["e",(0,Ve.jsx)("strong",{children:"X"}),"tra"]}),ph2:Or("\\")});if("A"===t)return(0,Ve.jsx)(Ie.vV,{text:"{1}. The pattern is forced to become anchored at the start of the search, or at the position of the last successful match, equivalent to a {2}",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"A"}),"nchored"]}),ph2:Ar("\\G")});if("U"===t)return e===x().JAVA?(0,Ve.jsx)(Ie.vV,{text:"{1}. Enable the built in character classes to also match unicode characters",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"U"}),"nicode"]})}):s?(0,Ve.jsx)(Ie.vV,{text:"{1}. The match becomes lazy by default. Now a {2} following a quantifier makes it greedy",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"U"}),"ngreedy"]}),ph2:Ar("?")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. The match becomes greedy by default",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-",(0,Ve.jsx)("strong",{children:"U"}),"ngreedy"]})});if("u"===t){const t=e===x().RUST;if(e===x().PCRE||e===x().PCRE2||t)return(0,Ve.jsx)(Ie.vV,{text:"{1}. Pattern strings are treated as {2}. Also causes escape sequences to match unicode characters",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode"]}),ph2:Or(t?"UTF-8":"UTF-16")});if(e===x().PYTHON)return(0,Ve.jsx)(Ie.vV,{text:"{1}. Make {2}, {3}, {4}, {5}, {6}, {7}, {8} and {9} perform matching with Unicode semantic (redundant in Python 3)",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode"]}),ph2:Ar("\\w"),ph3:Ar("\\W"),ph4:Ar("\\b"),ph5:Ar("\\B"),ph6:Ar("\\d"),ph7:Ar("\\D"),ph8:Ar("\\s"),ph9:Ar("\\S")});if(e===x().JAVASCRIPT)return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.vV,{text:"{1}. Enable all unicode features and interpret all unicode escape sequences as such",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode"]})}),Rr(!0)]});if(e===x().JAVA)return s?(0,Ve.jsx)(Ie.vV,{text:"{1}. Apply case insensitive matching to unicode characters in accordance with the unicode standard",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode case"]})}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Case insensitive matching is only applied to the US-ASCII character set",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["-",(0,Ve.jsx)("strong",{children:"u"}),"nicode case"]})})}return"a"===t?(0,Ve.jsx)(Ie.vV,{text:"{1}. Force the escape sequences {2}, {3}, {4}, {5}, {6}, {7}, {8} and {9} to perform ASCII-only matching instead of full Unicode matching",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"a"}),"scii"]}),ph2:Ar("\\w"),ph3:Ar("\\W"),ph4:Ar("\\b"),ph5:Ar("\\B"),ph6:Ar("\\d"),ph7:Ar("\\D"),ph8:Ar("\\s"),ph9:Ar("\\S")}):"D"===t?(0,Ve.jsx)(Ie.vV,{text:"{1}. Force the a dollar sign, {2}, to always match end of the string, instead of end of the line. This option is ignored if the {3}-flag is set",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"D"}),"ollar"]}),ph2:Ar("$"),ph3:Ar("m")}):"y"===t?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.vV,{text:"{1}. Force the pattern to only match consecutive matches from where the previous match ended.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["stick",(0,Ve.jsx)("strong",{children:"y"})]})}),Rr(!0)]}):"n"===t?s?(0,Ve.jsx)(Ie.vV,{text:"{1}. All capturing groups {2} are instead treated as if they were non-capturing groups {3}.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"n"}),"o capture"]}),ph2:Ar("()"),ph3:Ar("(?:)")}):(0,Ve.jsx)(Ie.vV,{text:"{1}. Capturing groups {2} are no longer treated as if they were non-capturing groups {3}.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"n"}),"o capture"]}),ph2:Ar("()"),ph3:Ar("(?:)")}):"d"===t?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.vV,{text:"{1}. The JavaScript regex engine now returns the indices at which the regex matched in the subject string.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:["in",(0,Ve.jsx)("strong",{children:"d"}),"ices"]})}),Rr(!0)]}):"R"===t?(0,Ve.jsx)(Ie.vV,{text:"{1}. The .NET regex engine now now performs matches from right to left, instead of left ro right.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"R"}),"ight to left"]})}):"N"===t?(0,Ve.jsx)(Ie.vV,{text:"{1}. Enable matching using an approach that avoids backtracking and guarantees linear-time processing in the length of the input.",ph1:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:"N"}),"o backtracking"]})}):void 0}(e,t,n);return r?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("span",{className:_e()(wr.Z.flag,!n&&wr.Z.flagDisabled),children:(0,Ae.Z)("{1} modifier:",t)})," ",r]},`flag-${t}-${n}-${s}`):(Ze.O7(new Error(`Unable to explain '${t}'`)),null)}const Yr=function(e,t,s){return[].concat(null==e?void 0:e.map(((e,t)=>Wr(s,e,t,!0))),null==t?void 0:t.map(((e,t)=>Wr(s,e,t,!1))))},Kr=function(e){return{explanation:(0,Ve.jsx)(Ie.vV,{text:"match the remainder of the pattern with the following effective flags: {1}",ph1:Or(e.flags)}),children:Yr(e.onFlags,e.offFlags,e.flavor)}},Jr=function(e){const t=e.flavor===x().JAVASCRIPT;switch(e.type){case Sr.t:return{explanation:(0,Ae.Z)("{1} Capturing Group",(0,Hr.Gz)(e.groupNumber))};case Sr.df:return{explanation:(0,Ve.jsx)(Ie.vV,{text:"Non-capturing Group. Matches the tokens contained with the following effective flags: {1}",ph1:Or(e.flags)}),children:Yr(e.onFlags,e.offFlags,e.flavor)};case Sr.xT:return{explanation:(0,Ae.Z)("Non-capturing group")};case Sr.Ws:return{explanation:(0,Ae.Z)("Subpattern definition construct"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("May only be used to define functions. No matching is done in this group.")})};case Sr.oK:return{explanation:(0,Ae.Z)("Conditional")};case Sr.Ty:return{explanation:(0,Ae.Z)("Negative Lookbehind"),notice:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below does not match")})," ",t&&Rr(!1)]})};case Sr.Gs:return{explanation:(0,Ae.Z)("Positive Lookbehind"),notice:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below matches")}),t&&Rr(!1)]})};case Sr.up:return{explanation:(0,Ae.Z)("Negative Lookahead"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below does not match")})};case Sr.PG:return{explanation:(0,Ae.Z)("Positive Lookahead"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below matches")})};case Sr.fy:return{explanation:(0,Ae.Z)("Non-atomic Positive Lookahead"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below matches")})};case Sr.qh:return{explanation:(0,Ae.Z)("Non-atomic Positive Lookbehind"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Assert that the Regex below matches")})};case Sr.sS:return{explanation:(0,Ve.jsx)(Ie.vV,{text:"Named Capture Group {1}",ph1:Or(e.subpattern)})};case Sr.no:return{explanation:(0,Ae.Z)("Branch Reset Group"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Subpatterns declared within each alternative of this construct will start over from the same index.")})};case Sr.Jy:return{explanation:(0,Ae.Z)("Atomic Group"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Non-capturing group that discards backtracking positions once matched.")})};case Sr.sr:return{explanation:(0,Ve.jsx)(Ie.vV,{text:"Balancing Named Capturing Group {1}",ph1:Or(e.subpattern)}),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ve.jsx)(Ie.vV,{text:"Removes the most recently matched text from the group {1} if the contained pattern matches, and captures the text between the two groups in {2}",ph1:Or(e.balancedGroup),ph2:Or(e.subpattern)})})};case Sr.ET:return{explanation:(0,Ae.Z)("Balancing Non-capturing Group"),notice:(0,Ve.jsx)(Ie.qX,{children:(0,Ve.jsx)(Ie.vV,{text:"Removes the most recently matched text from the group {1} if the contained pattern matches",ph1:Or(e.balancedGroup)})})};case Sr.w_:const s=isNaN(e.reference)?(0,Ve.jsx)(Ie.vV,{text:"subpattern {1}",ph1:Or(e.reference)}):(0,Ve.jsx)(Ie.vV,{text:"{1} subpattern",ph1:Or((0,Hr.Gz)(e.reference))});return{explanation:(0,Ve.jsx)(Ie.vV,{text:"Replaces the text conditionally depending on if the {1} matched",ph1:s})};default:return Ze.O7(new Error(`Unable to match group type '${e.type}' to a component: '${e.string}'`)),null}},Xr=function(e,t){const s=e.string.includes("^");let n,r;if(t.brief)n=s?(0,Ae.Z)("match a single character not present in the set"):(0,Ae.Z)("match a single character present in the set");else{if(e.parent.type===Sr.HI){var a;const t=null==(a=e.previousToken)?void 0:a.type;if((0,Sr.gg)(t))switch(t){case Sr.zB:n=s?(0,Ae.Z)("that is also present in complement of the sub-list below"):(0,Ae.Z)("that is also present in the sub-list below");break;case Sr.Ao:n=s?(0,Ae.Z)("that is also not present in the complement of the sub-list below"):(0,Ae.Z)("that is also not present in the sub-list below");break;case Sr.ix:n=s?(0,Ae.Z)("that is also present in either the sub-list above or in the complement of the sub-list below, but not in both"):(0,Ae.Z)("that is also present in either the sub-list above or below, but not in both");break;default:throw new Error(`Unable to explain '${e.type}'`)}else n=s?(0,Ae.Z)("including a single character not present in the list below"):(0,Ae.Z)("including a single character present in the list below");n=`\u2026 ${n}`}else n=s?(0,Ae.Z)("Match a single character not present in the list below"):(0,Ae.Z)("Match a single character present in the list below");e.classModifier&&(n+=" \u2026 ",r=(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("Class modifiers are computed from left to right, and the descriptions below (leading with three dots) must be interpreted with this in mind.")}))}return{explanation:n,notice:r}};var Qr=s(7656);const ea=function(e){const t=e.leftToken,s=e.rightToken,n=(0,Qr.oA)(t,"end"),r=(0,Qr.oA)(s,"start"),a=String.fromCodePoint(n),i=String.fromCodePoint(r),o=e.flags.includes("i")?(0,Ae.Z)("case insensitive"):(0,Ae.Z)("case sensitive");return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a single character in the range between {1} {2} and {3} {4} ({5})",ph1:Ir(a),ph2:Or("(index "+n+")"),ph3:Ir(i),ph4:Or("(index "+r+")"),ph5:o}),string:t.string+e.string+s.string}};var ta=s(57093);const sa=function(e){const t=e.flavor,s=e.string,n=e.script,r=e.category,a=(0,ta.F)(n),i=(0,ta.F)(r,!0),o=t===x().JAVASCRIPT?Rr(!1):null;if("\\P"===s.slice(0,2)||s.includes("^")){const e=s.includes("{")?`\\p{${n}}`:`\\p${n}`;return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any characters that {1} does not",ph1:Ar(e)}),notice:o}}const l=(e=>{switch(e){case"Letter":case"letter":case"L":return(0,Ae.Z)("matches any kind of letter from any language");case"Lowercase_Letter":case"lowercaseletter":case"Ll":return(0,Ae.Z)("matches a lowercase letter that has an uppercase variant");case"Uppercase_Letter":case"uppercaseletter":case"Lu":return(0,Ae.Z)("matches an uppercase letter that has a lowercase variant");case"Titlecase_Letter":case"titlecaseletter":case"Lt":return(0,Ae.Z)("matches a letter that appears at the start of a word when only the first letter of the word is capitalized");case"Cased_Letter":case"casedletter":case"LC":case"L&":return(0,Ve.jsx)(Ie.vV,{text:"matches a letter that exists in lowercase and uppercase variants (combination of {1}, {2} and {3})",ph1:Ar("Ll"),ph2:Ar("Lu"),ph3:Ar("Lt")});case"Modifier_Letter":case"modifierletter":case"Lm":return(0,Ae.Z)("matches a special character that is used like a letter");case"Other_Letter":case"otherletter":case"Lo":return(0,Ae.Z)("matches a letter or ideograph that does not have lowercase and uppercase variants");case"Mark":case"mark":case"M":return(0,Ae.Z)("matches a character intended to be combined with another character (e.g. accents, umlauts, enclosing boxes, etc.)");case"Nonspacing_Mark":case"nonspacingmark":case"Mn":return(0,Ae.Z)("matches a character intended to be combined with another character without taking up extra space (e.g. accents, umlauts, etc.)");case"Spacing_Mark":case"spacingmark":case"Mc":return(0,Ae.Z)("matches a character intended to be combined with another character that takes up extra space (vowel signs in many Eastern languages)");case"Enclosing_Mark":case"enclosingmark":case"Me":return(0,Ae.Z)("matches a character that encloses the character is is combined with (circle, square, keycap, etc.)");case"Separator":case"separator":case"Z":return(0,Ae.Z)("matches any kind of whitespace or invisible separator");case"Space_Separator":case"spaceseparator":case"Zs":return(0,Ae.Z)("matches a whitespace character that is invisible, but does take up space");case"Line_Separator":case"lineseparator":case"Zl":return(0,Ve.jsx)(Ie.vV,{text:"matches a line separator character {1}",ph1:Or("U+2028")});case"Paragraph_Separator":case"paragraphseparator":case"Zp":return(0,Ve.jsx)(Ie.vV,{text:"matches a paragraph separator character {1}",ph1:Or("U+2029")});case"Symbol":case"S":return(0,Ae.Z)("matches any math symbols, currency signs, dingbats, box-drawing characters, etc");case"Math_Symbol":case"mathsymbol":case"Sm":return(0,Ae.Z)("matches any mathematical symbol");case"Currency_Symbol":case"currencysymbol":case"Sc":return(0,Ae.Z)("matches any currency sign");case"Modifier_Symbol":case"modifiersymbol":case"Sk":return(0,Ae.Z)("matches a combining character (mark) as a full character on its own");case"Other_Symbol":case"othersymbol":case"So":return(0,Ae.Z)("matches various symbols that are not math symbols, currency signs, or combining characters");case"Number":case"number":case"N":return(0,Ae.Z)("matches any kind of numeric character in any script");case"Decimal_Number":case"decimalnumber":case"Nd":return(0,Ae.Z)("matches a digit zero through nine in any script except ideographic scripts");case"Letter_Number":case"letternumber":case"Nl":return(0,Ae.Z)("matches a number that looks like a letter, such as a Roman numeral");case"Other_Number":case"othernumber":case"No":return(0,Ae.Z)("matches a superscript or subscript digit, or a number that is not a digit (excluding numbers from ideographic scripts)");case"Punctuation":case"punctuation":case"P":return(0,Ae.Z)("matches any kind of punctuation character");case"Dash_Punctuation":case"dashpunctuation":case"Pd":return(0,Ae.Z)("matches any kind of hyphen or dash");case"Open_Punctuation":case"openpunctuation":case"Ps":return(0,Ae.Z)("matches any kind of opening bracket");case"Close_Punctuation":case"closepunctuation":case"Pe":return(0,Ae.Z)("matches any kind of closing bracket");case"Initial_Punctuation":case"initialpunctuation":case"Pi":return(0,Ae.Z)("matches any kind of opening quote");case"Final_Punctuation":case"finalpunctuation":case"Pf":return(0,Ae.Z)("matches any kind of closing quote");case"Connector_Punctuation":case"connectorpunctuation":case"Pc":return(0,Ae.Z)("matches a punctuation character such as an underscore that connects words");case"Other_Punctuation":case"otherpunctuation":case"Po":return(0,Ae.Z)("matches any kind of punctuation character that is not a dash, bracket, quote or connector");case"Other":case"other":case"C":return(0,Ae.Z)("matches invisible control characters and unused code points");case"Control":case"control":case"Cc":return(0,Ve.jsx)(Ie.vV,{text:"matches an ASCII {1} or Latin-1 {2} control character",ph1:Ar("[\\x00-\\x1F]"),ph2:Ar("[\\x80-\\x9F]")});case"Format":case"format":case"Cf":return(0,Ae.Z)("matches invisible formatting indicator");case"Private_Use":case"privateuse":case"Co":return(0,Ae.Z)("matches any code point reserved for private use");case"Surrogate":case"surrogate":case"Cs":return(0,Ve.jsx)(Ie.vV,{text:"matches one half of a surrogate pair in {1} encoding",ph1:Or("UTF-16")});case"Unassigned":case"unassigned":case"Cn":return(0,Ae.Z)("matches any code point to which no character has been assigned");default:return null}})(a);if(null!=l)return{explanation:(0,Ve.jsx)("span",{children:l}),notice:o};const c=null==r||"sc"===i||"script"===i?(0,Ae.Z)("script"):(0,Ae.Z)("script extension");return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches any characters in the {1} {2}",ph1:Or(n),ph2:c}),notice:o}},na=function(e){return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the control sequence {1} {2}",ph1:Ar("CTRL+"+e.controlChar),ph2:Or("(ASCII "+e.charCode+")")})}},ra=function(e){return{explanation:(0,Ae.Z)("Global pattern flags"),children:Yr(e.globalFlags.split(""),[],e.flavor)}},aa=function(e){return 0===e.reference?e.isSubstitution?{explanation:(0,Ae.Z)("inserts the same text as most recently matched by the entire pattern")}:{explanation:(0,Ae.Z)("matches the same text as most recently matched by the entire pattern")}:/^\d+$/.test(e.reference)?e.isSubstitution?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts the same text as most recently matched by the {1} capturing group",ph1:Or((0,Hr.Gz)(e.reference))})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the same text as most recently matched by the {1} capturing group",ph1:Or((0,Hr.Gz)(e.reference))})}:e.isSubstitution?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts the same text as most recently matched by the capturing group named {1}",ph1:Or(e.reference)})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the same text as most recently matched by the capturing group named {1}",ph1:Or(e.reference)})}},ia=function(e){return null===e.reference?{explanation:(0,Ae.Z)("matches the entire pattern")}:/^\d+$/.test(e.reference)?{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the expression defined in the {1} capture group",ph1:Or((0,Hr.Gz)(e.reference))})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:'matches the expression defined in the capture group "{1}"',ph1:Or(e.reference)})}};function oa(e,t,s){const n=e.codePoint||e.charCode,r=String.fromCodePoint(n);if(e.isSubstitution)return{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts the character {1} with index {2} ({3} or {4})",ph1:Ir(r),ph2:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n.toString(t).toUpperCase(),(0,Ve.jsx)("sub",{children:t})]})),ph3:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n,(0,Ve.jsx)("sub",{children:"10"})]})),ph4:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n.toString(s).toUpperCase(),(0,Ve.jsx)("sub",{children:s})]}))})};const a=e.flags.includes("i")?(0,Ae.Z)("case insensitive"):(0,Ae.Z)("case sensitive");return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the character {1} with index {2} ({3} or {4}) literally ({5})",ph1:Ir(r),ph2:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n.toString(t).toUpperCase(),(0,Ve.jsx)("sub",{children:t})]})),ph3:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n,(0,Ve.jsx)("sub",{children:"10"})]})),ph4:Or((0,Ve.jsxs)(Ee.Fragment,{children:[n.toString(s).toUpperCase(),(0,Ve.jsx)("sub",{children:s})]})),ph5:a})}}const la=function(e,t){return t.brief?{explanation:(0,Ve.jsx)("span",{children:(0,Ae.Z)("Inline comment, discarded by the engine when matching the regex")})}:{explanation:(0,Ve.jsxs)("span",{children:[" ",e.comment]}),string:(0,Ae.Z)("Comment")+":"}},ca=function(e){return"UTF"===e.verb.slice(0,3)?{explanation:(0,Ve.jsx)(Ie.vV,{text:"sets the property mode to {1}",ph1:Or("UTF-"+(e.verb.replace(/\D+/g,"")||"16"))})}:"UCP"===e.verb?{explanation:(0,Ae.Z)("sets the property mode to Unicode")}:"NO_START_OPT"===e.verb?{explanation:(0,Ae.Z)("suppresses the start-of-match optimizations that are otherwise run by Perl")}:"CR"===e.verb?{explanation:(0,Ae.Z)("specifies a newline convention: carriage return")}:"LF"===e.verb?{explanation:(0,Ae.Z)("specifies a newline convention: line-feed")}:"CRLF"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"specifies a newline convention: {1}, followed by {2}",ph1:Ar("(*CR)"),ph2:Ar("(*LF)")})}:"ANYCRLF"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"specifies a newline convention: {1}, {2} or {3}",ph1:Ar("(*CR)"),ph2:Ar("(*LF)"),ph3:Ar("(*CRLF)")})}:"ANY"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"specifies a newline convention: all unicode newline sequences {1}",ph1:Ar("(?:\\r\\n|[\\r\\n\\v\\f\\x85\\u2028\\u2029])")})}:"BSR_ANYCRLF"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"specifies a newline convention: {1}, {2} or {3} only",ph1:Ar("(*CR)"),ph2:Ar("(*LF)"),ph3:Ar("(*CRLF)")})}:"BSR_UNICODE"===e.verb?{explanation:(0,Ae.Z)("specifies a newline convention: any Unicode newline sequence")}:"MARK"===e.verbType?{explanation:(0,Ae.Z)("marker verb whose main purpose is to track how a match was arrived at")}:"FAIL"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"verb synonymous with {1}. Forces a matching failure at the given position in the pattern",ph1:Ar("(?!)")})}:"F"===e.verb?{explanation:(0,Ve.jsx)(Ie.vV,{text:"shorthand for {1}",ph1:Ar("(*FAIL)")})}:"PRUNE"===e.verbType?{explanation:(0,Ae.Z)("this verb causes the match to fail at the current starting position in the subject if the rest of the pattern does not match")}:"COMMIT"===e.verb?{explanation:(0,Ae.Z)("causes the whole match to fail outright if the rest of the pattern does not match")}:"THEN"===e.verbType?{explanation:(0,Ae.Z)("causes a skip to the next innermost alternative if the rest of the pattern does not match")}:"SKIP"===e.verbType?{explanation:(0,Ve.jsx)(Ie.vV,{text:"acts like {1}, except that if the pattern is unanchored, the bumpalong advance is not to the next character, but to the position in the subject where {2} was encountered",ph1:Ar("(*PRUNE)"),ph2:Ar("(*SKIP)")})}:"ACCEPT"===e.verbType?{explanation:(0,Ae.Z)("this verb causes the match to end successfully, skipping the remainder of the pattern")}:"LIMIT_RECURSION"===e.verbType?{explanation:(0,Ae.Z)("this verb sets the recursion limit (max depth) for the pattern")}:"LIMIT_MATCH"===e.verbType?{explanation:(0,Ae.Z)("this verb sets the match limit (max iterations) for the pattern")}:"NO_AUTO_POSSESS"===e.verb?{explanation:(0,Ae.Z)("this verb disables the internal `auto-possessification` optimization in PCRE")}:"NOTEMPTY"===e.verb?{explanation:(0,Ae.Z)("this verb disables matching of empty strings")}:"NOTEMPTY_ATSTART"===e.verb?{explanation:(0,Ae.Z)("this verb disables matching of empty strings at the start of the subject string")}:"NO_JIT"===e.verb?{explanation:(0,Ae.Z)("this verb disables JIT compilation of the pattern")}:{explanation:(0,Ae.Z)("Undescribed specific verb; No description for it yet (nothing's perfect)")}},ua=function(e){return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a backspace character {1}",ph1:Or("(ASCII 8)")})}},da=function(e){const t=e.string,s=e.posixClass,n=e.unicodeEnabled;if(t.includes("^"))return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches the negation of {1}",ph1:Ar(s)})};switch(s){case"ascii":return n?{explanation:(0,Ve.jsx)(Ie.vV,{text:"equivalent to {1}",ph1:Ar("\\p{InBasicLatin}")})}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a character with {1} value {2} through {3}",ph1:Or("ASCII"),ph2:Or("0"),ph3:Or("127")})};case"alnum":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a alphanumeric character {1}",ph1:Ar(n?"\\p{Xan}":"[a-zA-Z0-9]")})};case"word":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a alphanumeric character or {1} {2} (also written as {3})",ph1:Or("_"),ph2:Ar(n?"[\\p{Xwd}]":"[A-Za-z0-9_]"),ph3:Ar("\\w")})};case"alpha":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a alphabetic character {1}",ph1:Ar(n?"\\p{L}":"[a-zA-Z]")})};case"blank":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a whitespace character, excluding line breaks {1}",ph1:Ar(n?"\\h":"[ \\t]")})};case"cntrl":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a control character {1}",ph1:Ar(n?"\\p{Cc}":"[\\x00-\\x1F\\x7F]")})};case"digit":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a digit {1} (also written as {2})",ph1:Ar(n?"\\p{Nd}":"[0-9]"),ph2:Ar("\\d")})};case"graph":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a visible character {1}",ph1:Ar(n?"[\\pL\\pM\\pN\\pP\\pS\\p{Cf}]":"[\\x21-\\x7E]")})};case"lower":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a lowercase letter {1}",ph1:Ar(n?"\\p{Ll}":"[a-z]")})};case"print":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a visible character or the space character {1}",ph1:Ar(n?"[\\pL\\pM\\pN\\pP\\pS\\p{Cf}\\p{Zs}]":"[\\x20-\\x7E]")})};case"punct":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a punctuation character {1}",ph1:Ar(n?"[\\p{P}\\p{S}]":"[!\"#$%&'()*+,\\-./:;<=>?@[\\]^_`{|}~]")})};case"upper":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a uppercase letter {1}",ph1:Ar(n?"\\p{Lu}":"[A-Z]")})};case"xdigit":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a hexadecimal digit {1}",ph1:Ar("[A-Fa-f0-9]")})};case"space":return{explanation:(0,Ve.jsx)(Ie.vV,{text:"matches a whitespace character, including a line break {1} (also written as {2})",ph1:Ar(n?"[\\p{xps}]":"[ \\t\\r\\n\\v\\f]"),ph2:Ar("\\s")})};default:return Ze.O7(new Error(`Unknown posix class '${t}': '${s}'`)),{explanation:null}}};function ha(e){const t=isNaN(e.reference)||null==e.reference?e.reference:(0,Hr.Gz)(e.reference);if(e.backreference)return(0,Ve.jsx)(Ie.vV,{tag:"span",text:"Conditionally matches one of two options depending on whether the {1} capturing group matched",ph1:Or(t)});if(e.subroutine)return null===t&&"R"===e.condition?(0,Ve.jsx)(Ie.vV,{tag:"span",text:"Checks whether the whole pattern matches",ph1:Or(t)}):(0,Ve.jsx)(Ie.vV,{tag:"span",text:"Checks whether the {1} subroutine matches",ph1:Or(t)});throw new Error("Condition type is not specified")}const pa=function(e){const t=e.conditional;return t.lookaround?{explanation:(0,Ae.Z)("Conditionally matches one of two options depending on whether the lookaround matches")}:{explanation:ha(t)}},ga=function(e){return e.isSubstitution?{explanation:(0,Ve.jsx)(Ie.vV,{text:"inserts a vertical tab character {1}",ph1:Or("(ASCII 11)")})}:{explanation:(0,Ae.Z)("matches a vertical tab character")}},ma=function(e){return"\\E"===e.string?{explanation:(0,Ve.jsx)("span",{children:(0,Ae.Z)("Terminates any previous text transformation (initiated with either \\U or \\L)")})}:"\\l"===e.string||"\\u"===e.string?{explanation:(0,Ve.jsx)("span",{children:(0,Ae.Z)("Converts the subsequent token to their {1} equivalence","\\u"===e.string?(0,Ae.Z)("uppercase"):(0,Ae.Z)("lowercase"))})}:{explanation:(0,Ve.jsx)("span",{children:(0,Ve.jsx)(Ie.vV,{text:"Converts all subsequent tokens to their {1} equivalence until {2} is encountered",ph1:"\\U"===e.string?(0,Ae.Z)("uppercase"):(0,Ae.Z)("lowercase"),ph2:Or("\\E")})})}},xa=function(e){return e.string.includes("^")?{explanation:(0,Ae.Z)("matches any character, including newline")}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"empty character class \u2014 matches {1}",ph1:(0,Ve.jsx)("em",{children:(0,Ae.Z)("empty string")})})}};var fa=s(79192);const va=function(e){const t=(0,Ve.jsx)(Ie.qX,{type:fa.u_,children:(0,Ae.Z)("Avoid using this legacy syntax for any new patterns.")});return"[[:<:]]"===e.string?{explanation:(0,Ve.jsx)(Ie.vV,{text:"Matches start of word (POSIX syntax), equivalent to {1}",ph1:Ar("\\b(?=\\w)")}),notice:t}:{explanation:(0,Ve.jsx)(Ie.vV,{text:"Matches end of word (POSIX syntax), equivalent to {1}",ph1:Ar("\\b(?<=\\w)")}),notice:t}},ba=function(e,t){let s;switch(e.type){case Sr.zB:s=t.brief?(0,Ae.Z)("matches the intersection of the tokens to the left and right of this token"):(0,Ae.Z)("that is also present in the sub-list below");break;case Sr.Ao:s=t.brief?(0,Ae.Z)("matches the tokens to the left of this, minus any of the tokens present on the right"):(0,Ae.Z)("that is also not present in the sub-list below");break;case Sr.ix:s=t.brief?(0,Ae.Z)("matches the symmetric difference between the tokens to the left and right of this"):(0,Ae.Z)("that is also present in either the sub-list above or below, but not in both");break;default:throw new Error(`Unable to explain '${e.type}'`)}return t.brief||(s=`\u2026 ${s} \u2026`),{explanation:s}},ja=function(){return{explanation:(0,Ae.Z)("inserts the name from the last encountered backtracking control verb on the matching path that has a name")}};function Ca(e,t){const s=e.token,n=e.string,r=s.type;return r===Sr.MW?Fr(s,t):r===Sr.t0?function(e){return Vr(e,e.string.slice(1),!0)}(s):r===Sr.zl?Gr(s,n):r===Sr.hs?qr(s,t):r===Sr.$U?zr(s,t):r===Sr.RW?Kr(s,t):r===Sr.Pg?function(e){return oa(e,8,16)}(s):r===Sr.bO||r===Sr.L3||r===Sr.Yb?function(e){return oa(e,16,8)}(s):r===Sr.dz?sa(s):r===Sr.lA?na(s):r===Sr.Eb?ra(s):Sr.tK(r)?Jr(s):r===Sr.Wj?$r(s):r===Sr._w||r===Sr.eq?ia(s):r===Sr.WE||r===Sr.O3||r===Sr.bJ||r===Sr.hb?aa(s):r===Sr.qi||r===Sr.jf?la(s,t):r===Sr.vU?ca(s):r===Sr.Yz?pa(s):r===Sr.ZH?ua(s):r===Sr.Tf?ga(s):r===Sr.HI?Xr(s,t):r===Sr.jt?ea(s):r===Sr.be?da(s):r===Sr.jl?xa(s):r===Sr.aM||r===Sr.py?ma(s):r===Sr.XR?va(s):r===Sr.tI||r===Sr.hL||r===Sr.Cz||r===Sr.ul||r===Sr.Ud?Mr(s):r===Sr.zB||r===Sr.Ao||r===Sr.ix?ba(s,t):r===Sr.Bi?ja():(Ze.O7(new Error(`Unable to explain token '${r}': '${n}'`)),{explanation:null})}function Za(e,t={}){if(e.error)return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:(0,Ae.Z)("Error")})," \u2014 ",Lr(e.error)]});const s=Dr(e),n={string:s.string,children:[],nodeLabel:[],token:s};t.brief=!0;const r=s.type===Sr.oK?pa({conditional:s}).explanation:Ca(n,t).explanation;return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("strong",{children:ya(e)})," \u2014 ",r]})}function ya(e){switch(e.type){case Sr.$U:return(0,Ae.Z)("Quote");case Sr.MW:return(0,Ae.Z)("Meta Escape");case Sr.hs:return(0,Ae.Z)("Alternative");case Sr.Wj:return(0,Ae.Z)("Quantifier");case Sr.zl:case Sr.t0:return(0,Ae.Z)("Text");case Sr.Qp:return(0,Ae.Z)("Lonely End Quote");case Sr.dz:return(0,Ae.Z)("Unicode Property");case Sr.Pg:return(0,Ae.Z)("Octal");case Sr.L3:return(0,Ae.Z)("Hex");case Sr.Yb:return(0,Ae.Z)("Unicode");case Sr.RW:return(0,Ae.Z)("Modifier");case Sr.lA:return(0,Ae.Z)("Control Character");case Sr.Tf:return(0,Ae.Z)("Vertical Tab");case Sr.bO:return(0,Ae.Z)("Surrogate Pair");case Sr.eq:case Sr._w:return(0,Ae.Z)("Subroutine");case Sr.O3:case Sr.hb:case Sr.bJ:case Sr.WE:return(0,Ae.Z)("Backreference");case Sr.ZH:return(0,Ae.Z)("Backspace");case Sr.jl:case Sr.HI:case Sr.U6:return(0,Ae.Z)("Character Class");case Sr.jt:return(0,Ae.Z)("Range");case Sr.XR:case Sr.be:return(0,Ae.Z)("Posix Class");case Sr.jf:case Sr.qi:return(0,Ae.Z)("Comment");case Sr.df:case Sr.sS:case Sr.no:case Sr.xT:case Sr.Jy:case Sr.t:case Sr.sr:case Sr.ET:return(0,Ae.Z)("Group");case Sr.Ws:return(0,Ae.Z)("Definition");case Sr.oK:case Sr.w_:return(0,Ae.Z)("Conditional");case Sr.Bi:case Sr.vU:return(0,Ae.Z)("Verb");case Sr.Ty:case Sr.Gs:case Sr.up:case Sr.PG:case Sr.fy:case Sr.qh:return(0,Ae.Z)("Lookaround");case Sr.aM:case Sr.py:return(0,Ae.Z)("Case Modifier");case Sr.Cz:return(0,Ae.Z)("Before Match");case Sr.tI:return(0,Ae.Z)("After Match");case Sr.hL:return(0,Ae.Z)("Full Match");case Sr.zB:return(0,Ae.Z)("Class Intersection");case Sr.Ao:return(0,Ae.Z)("Class Subtraction");case Sr.ix:return(0,Ae.Z)("Class Symmetric Difference");case Sr.ul:return(0,Ae.Z)("Last Group");case Sr.Ud:return(0,Ae.Z)("Input String");default:Ze.O7(Error(`Unable to map title for '${e.type}'`))}}const Ea=e=>{const t=[];let s=null;for(let n=0,r=e.length;n<r;n++){const r=e[n],a=r.string,i=r.style,o=r.position;if(!a)continue;const l=o.start,c=o.end,u={string:a,style:i,position:{start:l,end:c}};s&&s.style===u.style?(s.string+=u.string,s.position.end=c):(t.push(u),s=u)}return t},Ta="N3KUM",ka="mBF1Z",Na=({className:e,tokens:t})=>{const s=Ea(t);return 0===s.length?null:(0,Ve.jsx)("div",{className:_e()("zlDez",e),children:s.map((({string:e,style:t},s)=>{const n=`node-label-token-${s}`;return t?(0,Ve.jsx)("span",{className:t,children:(0,Ve.jsx)(Ie.K,{text:e,minimal:!0})},n):(0,Ve.jsx)(Ie.K,{text:e,minimal:!0},n)}))})},Sa=(0,Ee.memo)(Na),_a=({tokenWrapper:e,explanation:t,notice:s,className:n})=>{const r=e.token;if(r.type===Sr.Yz)return(0,Ve.jsx)("strong",{children:t});const a=(0,Ve.jsx)(Sa,{tokens:e.nodeLabel,className:n});return Sr.Bx(r.type)||r.type===Sr.Eb?(0,Ve.jsxs)("span",{className:_e()(Ta,"bF_Mj"),children:[t," ",a,s]}):(0,Ve.jsxs)("span",{className:Ta,children:[a," ",t,s]})},wa=(0,Ee.memo)(_a),Aa=({tokens:e,tokenCounter:t,alternatives:s,maxExpandedTokens:n})=>e.map(((r,a)=>{const i=r.token,o=Ca(r,{alternatives:s}),l=o.explanation,c=o.children,u=o.notice,d=o.string;if(!l)return(0,Ve.jsx)(Aa,{tokens:r.children,tokenCounter:t,alternatives:s,maxExpandedTokens:n},`only-children-${a}`);if(i.children.length>0||Sr.Bx(i.type)){const e=r.children.length,t=r.children[0];if(0===e||1===e&&t.token.type===Sr.Wj||1===e&&t.token.type===Sr.hs&&0===t.children.length){const e=!Sr.Az(i.type),t=i.type===Sr.Ty||i.type===Sr.up?(0,Ae.Z)("{1} always fails to match","\u2014"):(0,Ae.Z)("{1} always finds a zero-length match","\u2014");return(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)(wa,{tokenWrapper:r,explanation:l})," ",t,e?u:""]},`null-match-${i.string}-${a}`)}}const h=i.type===Sr.zl,p=!!i.quantifier,g=d||r.string,m=h&&/^\s+$/.test(g);if(r.children.length>(h&&!p?1:0)||h&&p||Sr.Bx(i.type)||c&&0!==c.length)return(0,Ve.jsxs)(kr,{nodeLabel:(0,Ve.jsx)(wa,{tokenWrapper:r,explanation:l,notice:u,className:_e()(m&&ka)}),defaultCollapsed:h&&!p||t.count++>n,children:[c,(0,Ve.jsx)(Aa,{tokens:r.children,tokenCounter:t,alternatives:s,maxExpandedTokens:n})]},`treeview-parent-${i.children.length}-${a}`);if(Sr.gg(i.type)){const t=(e[a+1]||{}).token;return(null==t?void 0:t.type)===Sr.HI?null:(0,Ve.jsxs)("strong",{children:[l,u]},`token-explanation-${i.string}-${a}`)}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("span",{className:_e()(i.style,"uNm38",m&&ka),children:(0,Ve.jsx)(Ie.K,{text:g,removeNewlines:!0,minimal:!0})})," ",l,u]},`token-explanation-${i.string}-${a}`)})),Oa=Aa,Ia=({tokens:e})=>(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.qX,{children:(0,Ae.Z)("All the errors detected are listed below, from left to right, as they appear in the pattern.")}),Pr(e)]}),Ra=(e,t,s)=>{let n=null;for(let r=0,a=t.length;r<a;r++){const a=t[r];if(s.has(a))continue;if(s.set(a,!0),Ma(e,a),a.type===Sr.U6||a.type===Sr.Wj||Sr.tK(a.type)&&")"===a.string||a.partOfRange)continue;const i=Pa(e,a);if(a.quantifier){const e=Pa(i,a.quantifier);a.quantifier.quantifier&&(e.string+=a.quantifier.quantifier.string),i.children.push(e)}else if(La(a)){const e=n.token.ignoreToken&&!a.ignoreToken;if(e&&(n.token=a),0===n.children.length){const t=e?i:n;n.children.push(Object.assign(Object.assign({},t),{},{children:[]}))}!(e||a.ignoreToken||a.inCharClass&&n.string.includes(a.string))&&n.children.push(i),n.string+=a.string,n.nodeLabel.push(a);continue}if(e.children.push(i),a.type===Sr.oK){const e={children:[],conditional:a,type:Sr.Yz,string:"",state:a.state};a.lookaround&&e.children.push(a.condition),Ra(i,[e].concat(a.children),s)}else a.type!==Sr.zl&&Ra(i,a.children,s);n=i;const o=n.token;if(o.quantifier&&Sr.tK(o.type)){const a=o.quantifier.quantifier||o.quantifier;for(let i=r+1;i<t.length;i++){const r=t[i];if(Ma(n,r),s.set(r,!0),r.ignoreToken||r.type===Sr.Wj||e.children.push(Pa(e,r)),r===a)break}}}},Pa=(e,t)=>({parent:e,string:t.string,children:[],nodeLabel:t.type!==Sr.hs?[t]:[],token:t}),La=e=>{const t=e.adjacentToken;return t&&e.type===Sr.zl&&t.type===Sr.zl&&!e.quantifier&&!e.partOfRange&&!t.partOfRange&&!e.isPoorlyPlaced&&!t.isPoorlyPlaced},Ma=(e,t)=>{null!=e.parent&&Ma(e.parent,t),e.nodeLabel.push(t)},Da=(e,t)=>{switch(e){case x().PYTHON:return[`r${t}`,t];case x().RUST:const e='"'===t;return["r"+(e?'"':`${t}"`),e?'"':`"${t}`];case x().DOTNET:return[`@${t}`,t];default:return[t,t]}},Ua="XsOAS",Fa=({flavor:e,flags:t,tokens:s,delimiter:n})=>{const r=Da(e,n),a=(0,Re.Z)(r,2),i=a[0],o=a[1];return(0,Ve.jsxs)("div",{className:"NC6ky",children:[(0,Ve.jsx)("div",{className:_e()("taqI9",Ua),children:i}),(0,Ve.jsx)(Sa,{className:"kevho",tokens:s}),(0,Ve.jsx)("div",{className:_e()("V9YRK",Ua),children:o}),(0,Ve.jsx)("div",{className:"m1_F1",children:t})]})},Ga=(0,Ee.memo)(Fa),Va=["tokens"],Ba=e=>{let t=e.tokens,s=(0,E.Z)(e,Va);const n=t.reduce(((e,t)=>e.concat(t.token.type===Sr.hs?t.token:[],t.nodeLabel)),[]);return(0,Ve.jsx)(Ga,Object.assign({tokens:n},s))},$a=({regex:e,flags:t,delimiter:s,flavor:n,className:r})=>{const a=(0,Nr.Z)(e,{flags:t,delimiter:s,flavor:n}),i=a.tokens,o=a.state,l=a.patternError,c=((e,t)=>{const s=new WeakMap,n=Pa(null,{string:"",type:Sr.hs,children:[]});return Ra(n,e,s),t&&n.children.push({children:[],nodeLabel:[],token:{type:Sr.Eb,globalFlags:t,flavor:e[0].flavor,children:[]}}),n.children})(i,t);return(0,Ve.jsx)("div",{className:r,children:(0,Ve.jsx)(kr,{nodeLabel:(0,Ve.jsx)(Ba,{tokens:c,delimiter:s,flags:t,flavor:n}),children:l?(0,Ve.jsx)(Ia,{tokens:i}):(0,Ve.jsx)(Oa,{tokens:c,tokenCounter:{count:0},alternatives:o.alternatives,maxExpandedTokens:25})})})},Ha=(0,Ee.memo)($a),qa=({text:e})=>(0,Ve.jsx)("div",{className:"AOv9F",children:e}),za=(0,Ee.memo)(qa),Wa=({regex:e,flavor:t,delimiter:s,flags:n})=>null==e||0===e.length?(0,Ve.jsx)(za,{text:(0,Ae.Z)("An explanation of your regex will be automatically generated as you type.")}):(0,Ve.jsx)(Ha,{regex:e,flavor:t,delimiter:s,flags:n,className:"IrE8B"});var Ya=s(56264);const Ka={matchData:"amvtn",textTruncated:"MjTIZ",didNotParticipate:"aSQIC",groupNum:"TrT00",clickable:"N9b7Q",matchPos:"CPj3q",groupName:"fxJfD",row:"IoDqL",groupText:"Q8YiL","group-0":"BX3FE","group-1":"znTgg","group-2":"v1n1J","group-3":"CXLa2","group-4":"nmqJh","group-5":"T_XLc","group-6":"m94jE","group-0-alt":"KzxFx","group-1-alt":"dftGW","group-2-alt":"GDx0h","group-3-alt":"zOJvb","group-4-alt":"EMlAx","group-5-alt":"heE6F","group-6-alt":"UpMUh"},Ja=({group:e,evenMatch:t,showNonParticipatingGroups:s,matchNumber:n})=>{const r=(0,Ee.useState)(!1),a=(0,Re.Z)(r,2),i=a[0],o=a[1],l=(0,Ee.useCallback)((()=>Oe.ZP.emit(Oe.ji,e)),[e]),c=(0,Ee.useCallback)((()=>o((e=>!e))),[]),u=(0,Te.v9)((e=>e.regexAreaParser.captureGroupMap));if(!e.isParticipating&&!s)return null;const d=Ka[`group-${(e.groupNum-1)%R.GROUP_COUNT+1}${t?"":"-alt"}`],h=void 0!==e.start&&e.isParticipating?`${e.start}-${e.end}`:"n/a",p=i?e.content:function(e,t=20){if(null==e)return"";const s=e.match(new RegExp(`^.*${"\\n[^\\n]*".repeat(4)}\\n`));if(s){const t=Math.min(s.index+s[0].length-1,100);return e.slice(0,t)+"..."}return e.length>t+3?e.slice(0,t)+"...":e}(e.content,100),g=null!=e.content&&(e.content.length>100||(e.content.match(/\n/g)||[]).length>=5);return(0,Ve.jsxs)("tr",{className:_e()(Ka.row,!e.isParticipating&&Ka.didNotParticipate),children:[(0,Ve.jsx)(Ie.Yd,{tag:"td",disabled:null==e.start||!e.isParticipating,className:_e()(Ka.groupNum,null!=e.start&&e.isParticipating&&Ka.clickable),onClick:l,children:0===e.groupNum?(0,Ve.jsx)(Ie.vV,{text:"Match {1}",ph1:(0,Ve.jsx)("span",{className:Ka.groupName,children:n}),className:_e()(Ka.groupText,d)}):(0,Ve.jsx)(Ie.vV,{text:"Group {1}",ph1:(0,Ve.jsxs)("span",{className:Ka.groupName,children:[e.groupName||u[e.groupNum],null!=e.captureNum&&-1!==e.captureNum&&`.${e.captureNum+1}`]}),className:_e()(Ka.groupText,d)})}),(0,Ve.jsx)("td",{className:Ka.matchPos,children:h}),(0,Ve.jsx)("td",{className:_e()(Ka.matchData,g&&Ka.textTruncated),onClick:g?c:null,children:e.isParticipating?""===p?(0,Ve.jsx)("em",{children:(0,Ae.Z)("empty string")}):(0,Ve.jsx)(Ie.K,{text:p}):(0,Ae.Z)("group did not participate in match")})]})},Xa=(0,Ee.memo)(Ja),Qa=({groups:e,matchId:t,showNonParticipatingGroups:s,isLast:n})=>(0,Ve.jsx)("div",{className:_e()(!n&&"YXXyK"),children:(0,Ve.jsx)("table",{className:"EFPn1",children:(0,Ve.jsx)("tbody",{children:e.map(((e,n)=>(0,Ve.jsx)(Xa,{group:e,showNonParticipatingGroups:s,evenMatch:t%2==0,matchNumber:t+1},`match-${t}-group-${n}`)))})})}),ei="IRvGa",ti="LLQ0z",si=({matchError:e})=>{switch(e){case yt.Y8:return(0,Ve.jsx)(Ie.vV,{tag:"div",className:ti,text:"Unable to initialize the regex engine! Please try to reload the web page. If the issue persists, please open an issue here: {1}",ph1:(0,Ve.jsx)(Ie.rU,{to:"https://github.com/firasdib/Regex101/issues",absolute:!0,children:"https://github.com/firasdib/Regex101/issues"})});case yt.D9:return(0,Ve.jsx)("div",{className:ti,children:(0,Ae.Z)("Your pattern contains one or more errors, please see the explanation section above.")});case yt.ik:return(0,Ve.jsxs)("div",{className:ti,children:[(0,Ve.jsx)("div",{children:(0,Ae.Z)("Your expression took too long to finish and was terminated. Please increase the timeout and try again.")}),(0,Ve.jsx)("br",{}),(0,Ve.jsxs)("div",{children:[(0,Ae.Z)("This may be an indication of catastrophic backtracking. To find out more and what this is, please read the following article:")," ",(0,Ve.jsx)(Ie.rU,{to:"http://www.regular-expressions.info/catastrophic.html",absolute:!0,children:"Runaway Regular Expressions"})]})]});case yt.wm:case yt.VE:return(0,Ve.jsxs)("div",{className:ti,children:[(0,Ae.Z)("Catastrophic backtracking has been detected and the execution of your expression has been halted. To find out more and what this is, please read the following article:")," ",(0,Ve.jsx)(Ie.rU,{to:"http://www.regular-expressions.info/catastrophic.html",absolute:!0,children:"Runaway Regular Expressions"}),(0,Ve.jsx)("br",{}),(0,Ve.jsx)("br",{}),(0,Ve.jsx)(Ie.Yi,{className:ei,children:(0,Ae.Z)("Try launching the debugger to find out why.")})]});case yt.Fo:case yt.ek:return(0,Ve.jsx)("div",{className:ti,children:(0,Ae.Z)("The match was halted because the offset does not point to the beginning of a valid UTF-16 character.")});case yt.Vu:case yt.e0:return(0,Ve.jsx)("div",{className:ti,children:(0,Ae.Z)("The match was halted because your expression contains a recursive loop. This means either that the whole pattern, or a subpattern, has been called recursively for the second time at the same position in the subject string.")});case yt.UA:case yt.Rp:return(0,Ve.jsx)("div",{className:ti,children:(0,Ae.Z)("The internal recursion limit was reached.")});case yt.Gv:return(0,Ve.jsxs)("div",{className:ti,children:[(0,Ae.Z)("The Java regex engine reached the maximum call stack size."),(0,Ve.jsx)("br",{}),(0,Ve.jsx)("br",{}),(0,Ae.Z)("This is due to the fact that the regex engine is implemented using recursion, and is severely limited by it.")," ",(0,Ae.Z)("This indicates that your expression is not optimized for Java, and you are likely to run into similar issues in your Java code.")]});default:return(0,Ve.jsxs)("div",{className:ti,children:[(0,Ae.Z)("Your expression caused an unhandled error:"),(0,Ve.jsx)("br",{}),(0,Ve.jsx)("br",{})," ",(0,Ve.jsx)("strong",{children:e})]})}},ni=(0,Ee.memo)(si),ri=({className:e,children:t})=>(0,Ve.jsx)("label",{className:_e()("luECo",e),children:t}),ai=(0,Ee.memo)(ri),ii="JSON",oi="CSV",li="TEXT",ci=function(e,t,s){const n=function(e,t){return e.map((e=>e.map((e=>{const s=e.start,n=e.end,r=e.content,a=e.isParticipating,i=e.groupNum,o=e.groupName;if(!t&&0===i)return null;let l={content:r,isParticipating:a,groupNum:i,groupName:o};return null!=e.start&&(l=Object.assign(Object.assign({},l),{},{startPos:s,endPos:n})),l})).filter(Boolean)))}(t,s);switch(e){case ii:return JSON.stringify(n,null,2);case oi:return function(e){let t="",s=!1;return e.forEach(((e,n)=>{e.forEach((e=>{t+=n+1+","+(null!=e.groupName?e.groupName:e.groupNum)+","+(e.isParticipating?"yes":"no")+",",null!=e.startPos&&(t+=e.startPos+","+e.endPos+",",s=!0),null!=e.content&&(-1!==e.content.indexOf(",")?t+=`"${e.content.replace(/"/g,'""')}"`:t+=e.content),t+="\n"}))})),"match,group,is_participating"+(s?",start,end":"")+",content\n"+t}(n);default:return function(e){return e.map((e=>e.filter((e=>e.isParticipating)).map((e=>e.content)).join("\n"))).join("\n")}(n)}},ui=({matchData:e,isOpen:t,onModalClose:s})=>{const n=(0,Ee.useState)(ii),r=(0,Re.Z)(n,2),a=r[0],i=r[1],o=(0,Ee.useState)(!0),l=(0,Re.Z)(o,2),c=l[0],u=l[1],d=(0,Ee.useRef)(null);return(0,Ve.jsxs)(Ye.Z,{onModalClose:s,isOpen:t,className:"icDzB",children:[(0,Ve.jsx)(Ke.Z,{children:(0,Ae.Z)("Export Matches")}),(0,Ve.jsx)(Je.Z,{children:(0,Ve.jsxs)("div",{className:"xTEgj",children:[(0,Ve.jsx)(Ie.gx,{header:(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Export Method")}),className:"Nt7kG",children:(0,Ve.jsxs)(xt.Z,{children:[(0,Ve.jsx)(mt.Z,{isActive:a===ii,icon:"file-code",onClick:()=>i(ii),children:"JSON"}),(0,Ve.jsx)(mt.Z,{isActive:a===oi,icon:"file-excel",onClick:()=>i(oi),children:"CSV"}),(0,Ve.jsx)(mt.Z,{isActive:a===li,icon:"doc-text",onClick:()=>i(li),children:(0,Ae.Z)("Plain Text")})]})}),(0,Ve.jsx)(Ie.gx,{className:"CtTH_",header:(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Data")}),children:(0,Ve.jsxs)("div",{className:"zES36",children:[(0,Ve.jsxs)(rr.Z,{className:"uzmGU",ref:d,children:[t&&ci(a,e,c),(0,Ve.jsx)(Ie.Tv,{topPadding:5,rightPos:5,children:(0,Ve.jsx)(Ie.qi,{getCopyComponent:()=>d.current})})]}),(0,Ve.jsxs)(ai,{className:"NgTKU",children:[(0,Ve.jsx)("input",{type:"checkbox",checked:c,onChange:()=>u(!c)}),(0,Ae.Z)("Include full match in exported data")]})]})})]})}),(0,Ve.jsx)(Xe.Z,{children:(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:s,type:He.V5.n1})})]})},di=({matchData:e})=>{const t=(0,Ee.useState)(!1),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(0,Ee.useCallback)((()=>r(!0)),[]),i=(0,Ee.useCallback)((()=>r(!1)),[]);return(0,Ve.jsx)(Ie.Tv,{children:(0,Ve.jsxs)(Ie.Yd,{onClick:a,className:"eUlm1",children:[(0,Ve.jsx)("span",{className:"YIKin",children:(0,Ae.Z)("Export Matches")})," ",(0,Ve.jsx)(Ct.bwQ,{size:16}),(0,Ve.jsx)(ui,{isOpen:n,onModalClose:i,matchData:e})]})})},hi=()=>{const e=(0,Te.v9)((e=>e.regexEditor.matchResult)),t=(0,Te.v9)((e=>e.regexEditor.regex)),s=(0,Te.v9)((e=>e.regexEditor.error)),n=(0,Te.v9)((e=>e.settings.nonParticipatingGroups)),r=(0,Ee.useState)(25),a=(0,Re.Z)(r,2),i=a[0],o=a[1],l=(0,Ee.useRef)(),c=(0,Ee.useCallback)((()=>{if(null==l.current)return;const t=l.current,s=t.scrollTop,n=t.scrollHeight,r=t.offsetHeight;e.length>i&&s>=.9*(n-r)&&o((e=>2*e))}),[i,e.length]),u=(0,Ee.useMemo)((()=>{const t=[],s=Math.min(i,e.length);for(let r=0;r<s;r++){const a=e[r];t.push((0,Ve.jsx)(Qa,{groups:a,matchId:r,showNonParticipatingGroups:n,isLast:r===i||r+1===s},`match-${r}`))}return t}),[e,i,n]);return null!=s?(0,Ve.jsx)(ni,{matchError:s}):""===t?(0,Ve.jsx)(za,{text:(0,Ae.Z)("Detailed match information will be displayed here automatically.")}):0===e.length?(0,Ve.jsxs)("div",{className:"muBVf",children:[(0,Ae.Z)("Your regular expression does not match the subject string."),(0,Ve.jsx)(Ya.Z,{className:ei,children:(0,Ae.Z)("Try launching the debugger to find out why.")})]}):0===u.length?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{children:(0,Ae.Z)("No match groups were extracted.")}),(0,Ve.jsx)("div",{className:"FfuRb",children:(0,Ae.Z)("This means that your pattern did match but there were no capturing groups that matched anything in the subject string.")})]}):(0,Ve.jsxs)("div",{className:"b62Ye",onScroll:c,ref:l,children:[(0,Ve.jsx)(di,{matchData:e}),u]})},pi=se()?(0,Ee.lazy)((()=>Promise.all([s.e(483),s.e(653)]).then(s.bind(s,5036)))):()=>{},gi=e=>{const t=(0,Ve.jsx)("div",{children:(0,Ve.jsx)("div",{className:"_0eAtQ",children:(0,Ve.jsx)(Ie.$j,{})})});return(0,Ve.jsx)(Ie.I2,{fallback:t,children:(0,Ve.jsx)(pi,Object.assign({},e))})},mi=({subsection:e,children:t,title:s,resizable:n,id:r})=>{const a=(0,Te.I0)(),i=(0,Te.v9)((e=>e.rightSidebar.visibleSections)),o=(0,Ee.useCallback)((()=>{a((0,X.SD)(e)),a((0,X.Ot)())}),[a,e]),l=i.includes(e);return(0,Ve.jsx)(Ie.gx,{className:_e()("P3VvM",n&&"DIFDZ",!l&&"Z1_qK"),header:(0,Ve.jsx)(Ie.FX,{collapsed:!l,text:s,className:"fpGbf",onClick:o}),contentClassName:"a0ZUJ",isVisible:l,id:r,children:t})},xi="CsAbs",fi="_lvMT",vi=(0,lt.Z)(ct.s_),bi={appear:xi,appearActive:fi,enter:xi,enterActive:fi,exit:"mpimk",exitActive:"CTDda"},ji=({children:e})=>{const t=(0,Ee.useRef)(),s=(0,Ee.useState)(!1),n=(0,Re.Z)(s,2),r=n[0],a=n[1],i=(0,Ee.useCallback)((()=>a(!0)),[]),o=(0,Ee.useCallback)((e=>{null!=t.current&&t.current.contains(e.target)||a(!1)}),[]);return(0,Ee.useEffect)((()=>{const e=()=>a(!1);return Oe.ZP.on("key:escape",e),()=>Oe.ZP.off("key:escape",e)}),[]),(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)(Hn,{tooltipDirection:He.qF.SW,tooltipText:(0,Ae.Z)("Show Sidebar"),onClick:i,className:"Vg44D"}),(0,Ve.jsx)(Ie.h_,{isOpen:r,closeTimeout:vi,children:(0,Ve.jsx)(Ie.uT,{className:"NtTXe",classNames:bi,timeout:vi,in:r,children:(0,Ve.jsx)(Ie.iQ,{children:(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"jJmso",onClick:o,onTouchEnd:o}),(0,Ve.jsx)("nav",{ref:t,className:"KwIMW",children:e})]})})})})]})},Ci=["title","children"],Zi=e=>{let t=e.title,s=e.children,n=(0,E.Z)(e,Ci);return(0,Ve.jsxs)("div",Object.assign(Object.assign({className:"uYpkX"},n),{},{children:[(0,Ve.jsx)(Ie.__,{text:t,className:"F61ks"}),(0,Ve.jsx)("div",{className:"MY46R",children:s})]}))},yi=({subsections:e})=>{const t=(0,Te.I0)(),s=(0,Te.v9)((e=>e.rightSidebar.activeSubsection));return(0,Ve.jsx)("div",{className:"JPMcE",children:e.map((e=>{const n=e.tooltip,r=e.icon,a=e.key;return(0,Ve.jsx)(Ie.hU,{onClick:()=>t((0,X.hK)(a)),size:34,tooltip:n,tooltipDirection:He.qF.SE,className:_e()("CoQ5Y",s===a&&"Cikzv"),children:(0,Ve.jsx)(r,{size:18})},`smallRightSidebarBtn-${a}`)}))})},Ei=parseFloat(Ue.D6),Ti=()=>{const e=(0,Te.v9)((e=>e.rightSidebar.activeSubsection)),t=(0,Te.v9)((e=>e.regexEditor.delimiter)),s=(0,Te.v9)((e=>e.regexEditor.flags)),n=(0,Te.v9)((e=>e.regexEditor.regex)),r=(0,Te.v9)((e=>e.regexEditor.flavor));switch(e){case c:return(0,Ve.jsx)(Zi,{title:(0,Ae.Z)("Explanation"),children:(0,Ve.jsx)(Wa,{regex:n,flags:s,delimiter:t,flavor:r})});case u:return(0,Ve.jsx)(Zi,{title:(0,Ae.Z)("Match Information"),children:(0,Ve.jsx)(hi,{})});case d:return(0,Ve.jsx)(Zi,{title:(0,Ae.Z)("Quick Reference"),id:"quickrefParent",children:(0,Ve.jsx)(gi,{})});default:throw new Error(`Unknown subsection '${e}'`)}},ki=()=>{const e=(0,we.Sj)(Ei),t=(0,Te.v9)((e=>e.regexEditor.showUnitTestArea)),s=(0,Te.v9)((e=>e.settings.alwaysCollapseRightSidebar)),n=(0,Te.v9)((e=>e.regexEditor.delimiter)),r=(0,Te.v9)((e=>e.regexEditor.flags)),a=(0,Te.v9)((e=>e.regexEditor.regex)),i=(0,Te.v9)((e=>e.regexEditor.flavor));if(s||e.width<Ei){const e=[{tooltip:(0,Ae.Z)("View Explanation"),icon:Ct.UCm,key:c}];return t||e.push({tooltip:(0,Ae.Z)("View Match Information"),icon:qs.n2W,key:u}),e.push({tooltip:(0,Ae.Z)("View Regex Quick Reference"),icon:Pe.CA9,key:d,id:"quickrefParent"}),(0,Ve.jsxs)(ji,{children:[(0,Ve.jsx)(yi,{subsections:e}),(0,Ve.jsx)(Ti,{})]})}return(0,Ve.jsxs)(Er,{children:[(0,Ve.jsx)(mi,{title:(0,Ae.Z)("Explanation"),subsection:c,resizable:!0,children:(0,Ve.jsx)(Wa,{regex:a,flags:r,delimiter:n,flavor:i})}),!t&&(0,Ve.jsx)(mi,{title:(0,Ae.Z)("Match Information"),subsection:u,resizable:!0,children:(0,Ve.jsx)(hi,{})}),(0,Ve.jsx)(mi,{title:(0,Ae.Z)("Quick Reference"),subsection:d,id:"quickrefParent",children:(0,Ve.jsx)(gi,{})})]})},Ni=({result:e,className:t})=>{if(null==e.time&&null==e.steps)return null;const s=Math.round(1e3*e.time)/1e3;return(0,Ve.jsxs)("div",{className:t,children:[null!=e.error&&(0,Ve.jsx)("div",{className:"eFWYj",children:e.error}),(0,Ve.jsx)(Ie.vV,{tag:"div",text:"Test finished in {1}{2}",ph1:null!=e.steps?`${e.steps} ${1===e.steps?(0,Ae.Z)("step"):(0,Ae.Z)("steps")}`:(0,Ae.Z)("approximately {1} ms",s),ph2:null!=e.steps?`, ${(0,Ae.Z)("approximately {1} ms",s)}`:""})]})},Si="qI7UZ",_i="tfiLD",wi="eoxGV",Ai=({disabled:e,isFirstItem:t,isLastItem:s,testNumber:n,className:r})=>{const a=(0,Te.I0)(),i=(0,Ee.useCallback)((()=>a((0,X.ew)(n,n+1))),[n,a]),o=(0,Ee.useCallback)((()=>a((0,X.ew)(n,n-1))),[n,a]),l=(0,Ee.useCallback)((()=>a((0,X.K_)(n))),[n,a]),c=(0,Te.v9)((e=>(0,zs.G)(e.regexEditor.flavor)));return(0,Ve.jsxs)("div",{className:_e()("sdZCP",r),children:[(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Move down"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:i,disabled:s||e,className:_e()(Si,(s||e)&&_i),children:(0,Ve.jsx)(Pe.ebp,{size:22})})}),(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Move up"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:o,disabled:t||e,className:_e()(Si,(t||e)&&_i),children:(0,Ve.jsx)(Pe.Tvk,{size:22})})}),c&&(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Debug Test"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.rU,{to:`debugger?testId=${n}`,className:_e()(Si,wi),noTheme:!0,children:(0,Ve.jsx)(Pe.RwU,{size:18})})}),(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Delete"),direction:He.qF.NW,children:(0,Ve.jsx)(Ie.Yd,{onClick:l,disabled:e,className:_e()(Si,wi,e&&_i),children:(0,Ve.jsx)(Pe.M$4,{size:18})})})]})};var Oi=s(96546),Ii=s(16386);const Ri=(e,t)=>{let s;return null==e||e===Oi.m?s=[Ii.FS,Ii.Xg]:(s=[Ii.u0,Ii.wU,Ii.DC,Ii.xz],t!==x().GOLANG&&"0"!==e&&s.push(Ii.GU)),s.map((e=>({value:e,text:Ii.VO[e]})))},Pi=({onChange:e,currentTarget:t})=>{const s=(0,Ee.useRef)(null),n=(0,Te.v9)((e=>e.regexAreaParser.captureGroupCount)),r=(0,Te.v9)((e=>e.regexAreaParser.definedSubpatterns)),a=(0,Te.v9)((e=>e.regexAreaParser.captureGroupMap)),i=(0,Ee.useState)(!1),o=(0,Re.Z)(i,2),l=o[0],c=o[1],u=((e=0,t,s)=>{const n=[{value:Oi.m,text:Oi.H(Oi.m)},{value:0,text:Oi.H(0)}];for(let r=0;r<e;r++){const e=r+1;t.includes(r)||n.push({value:e,text:Oi.H(e,s)})}return n})(n,r,a);return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.CP,{onClick:()=>c(!0),ref:s,disabled:l,children:(0,Oi.H)(t,a)}),(0,Ve.jsxs)(os,{isOpen:l,onMenuClose:()=>c(!1),target:s.current,closeOnClick:!0,children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Select target")}),(0,Ve.jsx)(vs,{}),u.map((s=>(0,Ve.jsx)(gs,{isActive:s.value==t,onClick:()=>e(s.value),children:s.text},`test-target-${s.value}`)))]})]})},Li=({onChange:e,currentTarget:t,currentCriteria:s})=>{const n=(0,Te.v9)((e=>e.regexEditor.flavor)),r=(0,Ee.useRef)(null),a=Ri(t,n),i=(0,Ee.useState)(!1),o=(0,Re.Z)(i,2),l=o[0],c=o[1];return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.CP,{onClick:()=>c(!0),ref:r,disabled:l,children:Ii.VO[s]}),(0,Ve.jsxs)(os,{isOpen:l,onMenuClose:()=>c(!1),target:r.current,closeOnClick:!0,children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Select assertion")}),(0,Ve.jsx)(vs,{}),a.map((t=>(0,Ve.jsx)(gs,{isActive:t.value===s,onClick:()=>e(t.value),children:t.text},`test-criteria-${t.value}`)))]})]})},Mi="QChMj",Di=e=>{return 0===(e||"").length?(0,Ve.jsx)("em",{className:Mi,children:(0,Ae.Z)("empty string")}):(0,Ve.jsx)("span",{className:Mi,children:(0,Ve.jsx)(Ie.K,{text:(t=e||"",t.length>40?t.slice(0,40)+String.fromCharCode(8230):t)})});var t},Ui=({test:e})=>{const t=(0,Te.v9)((e=>e.regexAreaParser.captureGroupMap)),s=e.description,n=e.testString,r=e.target,a=e.criteria,i=e.compareString;return s||(0,Ve.jsx)(Ie.vV,{text:"given the string {1} assert that {2} {3} {4}",ph1:Di(n),ph2:Oi.H(r,t),ph3:Ii.VO[a],ph4:null==r||r===Oi.m?"":Di(i)})},Fi="RRgDA",Gi="wdfE9",Vi="zr88s",Bi="FHCCK",$i="n3dVL",Hi=({testKey:e,testNumber:t,viewDetails:s,onViewDetailsClick:n,existingTest:r={},isLastItem:a,isFirstItem:i,result:o={}})=>{const l=(0,Te.I0)(),c=(0,Te.v9)((e=>e.unitTests.testsRunning)),u=(0,Te.v9)((e=>e.settings.defaultTabBehavior)),d=r.description,p=r.testString,g=r.compareString,m=r.target,x=r.criteria,f=o.hasError,v=(0,Ee.useRef)(null),b=(0,Ee.useState)(d||""),j=(0,Re.Z)(b,2),C=j[0],Z=j[1],y=(0,Ee.useState)(p||""),E=(0,Re.Z)(y,2),T=E[0],k=E[1],N=(0,Ee.useState)(g||""),S=(0,Re.Z)(N,2),_=S[0],w=S[1],A=(0,Ee.useState)(m),O=(0,Re.Z)(A,2),I=O[0],R=O[1],P=(0,Ee.useState)(x),L=(0,Re.Z)(P,2),M=L[0],D=L[1],U=(0,we.Sf)(((e,t)=>l(function(e,t){return{type:h.LM,value:{testKey:e,test:t}}}(e,t))),500),F=(0,Ee.useCallback)((e=>{if(!u&&9===e.keyCode&&!e.shiftKey){e.preventDefault(),e.stopPropagation();const t=e.target,s=t.selectionStart,n=t.selectionEnd,r=t.value,a=r.substring(0,s)+"\t"+r.substring(n);e.target.selectionStart=e.target.selectionEnd=s+1,k(a)}}),[u]);(0,Ee.useEffect)((()=>{s&&v.current.focus()}),[s]),(0,we.vI)((()=>{U(e,{description:C,testString:T,compareString:_,target:I,criteria:M})}),[e,U,C,T,_,I,M]);const G=!1===f,V=f;return(0,Ve.jsxs)("div",{className:_e()("_mdci",V&&Gi,G&&Fi),children:[(0,Ve.jsx)(Ie.Yd,{className:"CIpAk",onClick:()=>n(e),tag:"div","aria-label":s?(0,Ae.Z)("Expand test"):(0,Ae.Z)("Collapse test"),children:s?(0,Ve.jsx)(Pe.ebp,{size:22}):(0,Ve.jsx)(Pe.jZo,{size:22})}),!s&&(0,Ve.jsxs)("div",{className:"bjIoO",children:[(0,Ve.jsx)("div",{className:Vi,children:(0,Ve.jsx)(Ui,{test:r})}),(0,Ve.jsxs)("div",{className:_e()(Bi,G&&Fi,V&&Gi),children:[G&&(0,Ve.jsx)(Pe.xuy,{size:18}),V&&(0,Ve.jsx)(Pe.eSQ,{size:18})]}),(0,Ve.jsx)(Ai,{isFirstItem:i,isLastItem:a,disabled:c,testNumber:t,className:$i})]}),s&&(0,Ve.jsxs)("div",{className:"oLvlF",children:[(0,Ve.jsxs)("div",{className:"nwj_2",children:[(0,Ve.jsx)("input",{placeholder:(0,Ae.Z)("insert test description"),className:Vi,onChange:e=>Z(e.target.value),value:C,ref:v,spellCheck:"false"}),(0,Ve.jsxs)("div",{className:_e()(Bi,G&&Fi,V&&Gi),children:[G&&(0,Ve.jsx)(Pe.xuy,{size:18}),V&&(0,Ve.jsx)(Pe.eSQ,{size:18})]}),(0,Ve.jsx)(Ai,{isFirstItem:i,isLastItem:a,disabled:c,testNumber:t,className:$i})]}),(0,Ve.jsx)("div",{className:"fo_Hl",children:(0,Ae.Z)("given the following test string")}),(0,Ve.jsx)("textarea",{placeholder:(0,Ae.Z)("insert test string"),className:"W7b7u",onChange:e=>k(e.target.value),value:T,rows:2,spellCheck:"false",onKeyDown:F}),(0,Ve.jsx)(Ie.vV,{tag:"div",className:"L5b8E",text:"assert that {1} {2}",ph1:(0,Ve.jsx)(Pi,{currentTarget:I,onChange:e=>{R(e);const t=Ri(e);t.find((e=>e.value===M))||D(t[0].value)}}),ph2:(0,Ve.jsx)(Li,{currentTarget:I,currentCriteria:M,onChange:D})}),null!=I&&I!==Oi.m&&M!==Ii.GU&&(0,Ve.jsx)("textarea",{placeholder:(0,Ae.Z)("insert comparison string"),className:"mbbk1",onChange:e=>w(e.target.value),value:_}),null!=o&&(0,Ve.jsx)(Ni,{result:o,className:"MwoOx"})]})]})},qi="Yz_VU",zi=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.unitTests.tests)),s=(0,Te.v9)((e=>e.unitTests.testResults)),n=(0,Te.v9)((e=>e.unitTests.testFilter)),r=(0,Ee.useState)([]),a=(0,Re.Z)(r,2),i=a[0],o=a[1],l=e=>{const t=i.filter((t=>t!==e));t.length===i.length&&t.push(e),o(t)};(0,Ee.useEffect)((()=>{const e=()=>o(t.map((e=>e.key))),s=()=>o([]);return Oe.ZP.on({[Oe.yM]:e,[Oe.Fx]:s}),()=>Oe.ZP.off({[Oe.yM]:e,[Oe.Fx]:s})}),[e,t]);const c=(0,Ee.useCallback)((()=>e((0,X.CJ)())),[e]),u=(0,Ee.useCallback)((()=>e((0,X.E0)(N))),[e]),d=(0,Ee.useMemo)((()=>n===N?t:t.filter((e=>{const t=s[e.key];return(null==t?void 0:t.hasError)===(n!==T)}))),[t,n,s]);return(0,Ve.jsx)(rr.Z,{className:"GuvgB",children:0===t.length?(0,Ve.jsx)(Ie.vV,{text:"There are no unit tests, click {1} to add some.",ph1:(0,Ve.jsx)(Ie.Yd,{onClick:c,className:qi,children:(0,Ae.Z)("here")})}):0===d.length?(0,Ve.jsx)(Ie.vV,{text:"No tests matched your filter, click {1} to show all.",ph1:(0,Ve.jsx)(Ie.Yd,{onClick:u,className:qi,children:(0,Ae.Z)("here")})}):d.map(((e,n)=>(0,Ve.jsx)(Hi,{existingTest:e,testKey:e.key,testNumber:n,viewDetails:i.includes(e.key),onViewDetailsClick:l,isLastItem:n===t.length-1,isFirstItem:0===n,result:s[e.key]},`unit-test-list-${e.key}`)))})};var Wi=s(67333);const Yi=({className:e})=>{const t=(0,Ee.useRef)(),s=(0,Ee.useState)(!1),n=(0,Re.Z)(s,2),r=n[0],a=n[1],i=(0,Te.I0)(),o=(0,Te.v9)((e=>e.unitTests.testFilter)),l=(0,Ee.useCallback)((()=>a(!0)),[]),c=(0,Ee.useCallback)((()=>a(!1)),[]),u=(0,Ee.useCallback)((()=>Oe.ZP.emit(Oe.yM)),[]),d=(0,Ee.useCallback)((()=>Oe.ZP.emit(Oe.Fx)),[]),h=(0,Ee.useCallback)((()=>i((0,X.E0)(N))),[i]),p=(0,Ee.useCallback)((()=>i((0,X.E0)(T))),[i]),g=(0,Ee.useCallback)((()=>i((0,X.E0)(k))),[i]);return(0,Ve.jsxs)("div",{className:e,children:[(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Tools and Filters"),direction:He.qF.NE,children:(0,Ve.jsx)(Ie.Yd,{onClick:l,className:"llECe",ref:t,children:(0,Ve.jsx)(Pe.LB8,{size:18})})}),(0,Ve.jsxs)(os,{onMenuClose:c,isOpen:r,target:t.current,placement:"top",closeOnClick:!0,children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Tools and Filters")}),(0,Ve.jsx)(vs,{}),(0,Ve.jsx)(gs,{onClick:u,children:(0,Ae.Z)("Expand all tests")}),(0,Ve.jsx)(gs,{onClick:d,children:(0,Ae.Z)("Collapse all tests")}),(0,Ve.jsx)(vs,{}),(0,Ve.jsx)(gs,{onClick:h,isActive:o===N,children:(0,Ae.Z)("Show all tests")}),(0,Ve.jsx)(gs,{onClick:p,isActive:o===T,children:(0,Ae.Z)("Show only passed tests")}),(0,Ve.jsx)(gs,{onClick:g,isActive:o===k,children:(0,Ae.Z)("Show only failed tests")})]})]})},Ki=(0,Ee.memo)(Yi),Ji=["criteria","target","testString","compareString"];function Xi(e,t){const s=t.criteria,n=t.compareString||"";if(s===Ii.GU)return e&&null!=e.content?(0,Ae.Z)("Group {1} was not expected to participate in the match but did anyway",t.target):null;if(!e)return(0,Ae.Z)("Group {1} no longer exists in the pattern or did not participate in the match",t.target);let r;switch(r=e.groupName?`${e.groupNum} (${e.groupName})`:0===e.groupNum?`${e.groupNum} (${(0,Ae.Z)("full match")})`:e.groupNum,s){case Ii.DC:return null!=e.content&&-1!==e.content.indexOf(n)?null:(0,Ae.Z)("Expected group {1} to contain `{2}` but did not",r,n);case Ii.xz:return e.content===n?null:(0,Ae.Z)("Expected group {1} to equal `{2}` but was instead `{3}`",r,n,e.content||"");case Ii.u0:const t=null==e.content?"":e.content.slice(0,n.length);return t===n?null:(0,Ae.Z)("Expected group {1} to start with `{2}` but was instead `{3}`",r,n,t);case Ii.wU:const a=null==e.content?"":e.content.slice(-1*n.length);return a===n?null:(0,Ae.Z)("Expected group {1} to end with `{2}` but was instead `{3}`",r,n,a);default:throw new Error(`Unknown unit test criteria '${s}'`)}}const Qi=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexEditor.flavor)),s=(0,Te.v9)((e=>e.regexEditor.regex)),n=(0,Te.v9)((e=>e.regexEditor.delimiter)),r=(0,Te.v9)((e=>e.regexEditor.flags)),a=(0,Te.v9)((e=>e.settings.maxExecutionTime)),i=(0,Te.v9)((e=>!!e.regexAreaParser.status)),o=(0,Te.v9)((e=>e.regexAreaParser.tokens.length>0)),l=(0,Te.v9)((e=>e.unitTests.tests),((e,t)=>{if(e.length!==t.length)return!1;const s=t.reduce(((e,t)=>{if(null==t.key)throw new Error("Invalid unit test");return e[t.key]=t,e}),{});return e.every((e=>(0,Te.wU)(Q(e,Ji),Q(s[e.key]||{},Ji))))})),c=(0,Ee.useRef)(new Wi.Z).current,u=(0,Ee.useState)(0),d=(0,Re.Z)(u,2),h=d[0],p=d[1],g=(0,Ee.useState)(!1),m=(0,Re.Z)(g,2),x=m[0],f=m[1],v=(0,Ee.useCallback)((()=>{c.resetWorker(),p(0),f(!1),e((0,X.jJ)())}),[e,c]),b=(0,Ee.useCallback)(((s,r,i,o,l)=>{const u={maxExecutionTime:a,flavor:t,calculateRegexSteps:!0};c.runMatch(r,n,i.replace(/g/g,""),o.testString,u,((t={},s)=>{e(s?(0,X.UZ)(o.key,(0,Ae.Z)("Internal engine error: {1}",s)):(0,X.UZ)(o.key,function(e,t){switch(e.criteria){case Ii.FS:return 0===t.length?(0,Ae.Z)("Expected regex to match, but did not."):null;case Ii.Xg:return t.length>0?(0,Ae.Z)("Expected regex to not match, but did."):null;default:return function(e,t){if(!t||0===t.length)return(0,Ae.Z)("The regex did not match the subject string.");const s=t.filter((t=>t.groupNum==e.target));0===s.length&&s.push({captureNum:-1,content:null,end:-1,groupName:isNaN(e.target)?e.target:null,groupNum:e.target,isParticipating:!1,match:-1,start:-1});for(let t=0,n=s.length;t<n;t++){const n=Xi(s[t],e);if(null!=n)return n}return null}(e,t[0])}}(o,t.matchResult),t.steps,t.time)),p((e=>e+1)),l.next()}))}),[a,n,t,e,c]),j=(0,Ee.useCallback)((()=>{c.resetWorker(),p(0),f(!0),e((0,X.h5)()),function(e,t,n){let a=0,i=!1;const o={next(){i||(a<e?(a++,(e=>{b(e.iteration(),s,r,l[e.iteration()],e)})(o)):(i=!0,n()))},iteration:()=>a-1,break(){i=!0,n()}};o.next()}(l.length,0,(()=>{f(!1),e((0,X.jJ)())}))}),[e,b,l,s,r,c]),C=v,Z=(0,Ee.useCallback)((()=>e((0,X.CJ)())),[e]);(0,Ee.useEffect)((()=>{const e=()=>{x&&v(),o&&!i&&j()};return Oe.ZP.on("key:ctrlEnter",e),()=>Oe.ZP.off("key:ctrlEnter",e)}),[o,i,j,x,v]),(0,Ee.useEffect)((()=>{""===s||i||j()}),[j,i]),(0,Ee.useEffect)((()=>v),[v]);const y=Math.max(0,l.length>0?(l.length-h)/l.length*100:100);return(0,Ve.jsxs)("div",{className:"bc_U_",children:[(0,Ve.jsxs)("div",{className:"bzSeP",children:[(0,Ve.jsx)(Ki,{className:"llbAo"}),(0,Ve.jsxs)("div",{className:"cfrN_",children:[!x&&(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Run tests"),disabled:0===l.length||""===s||i,onClick:()=>{!o||""===s||i||x||j(!0)}}),x&&(0,Ve.jsx)(Ie.zx,{type:He.V5.T,text:(0,Ae.Z)("Cancel"),onClick:C}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Add test"),onClick:Z,className:"KuRpm"})]})]}),(0,Ve.jsx)("div",{className:"W3HLH",style:{right:`${y}%`}})]})},eo=()=>{const e=(0,Te.v9)((e=>e.unitTests.testResults)),t=Object.values(e).reduce(((e,t)=>{const s=(0,Re.Z)(e,2),n=s[0],r=s[1];return[n+(!1===t.hasError?1:0),r+(t.hasError?1:0)]}),[0,0]),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(n>0||r>0)&&(r>0?(0,Ve.jsx)("span",{className:"ceywG",children:1===r?(0,Ae.Z)("{1} test failed",r):(0,Ae.Z)("{1} tests failed",r)}):(0,Ve.jsx)("span",{className:"BIsZ6",children:(0,Ae.Z)("All tests passed")}));return(0,Ve.jsx)(Ie.__,{className:"esMAk",text:(0,Ae.Z)("Unit Tests"),children:a})},to=(0,Ee.memo)(eo),so=()=>(0,Ve.jsxs)("div",{className:"Av0Zr",children:[(0,Ve.jsx)(to,{}),(0,Ve.jsxs)("div",{className:"YXYOI",children:[(0,Ve.jsx)(zi,{}),(0,Ve.jsx)(Qi,{})]})]});var no=s(32864),ro=s(78120),ao=s(94462),io=s(47519);const oo=no.p.mark({class:"A6o5R",attributes:{"data-widget":"true"}}),lo=no.p.mark({class:"E2csr",attributes:{"data-widget":"true"}}),co=new no.Y1({regexp:/[ \t]/g,decoration:e=>" "===e[0]?oo:lo,boundary:/[^ \t]/}),uo=no.lg.define((e=>({decorations:co.createDeco(e),update(e){this.decorations=co.updateDeco(e,this.decorations)}})),{decorations:e=>e.decorations});class ho extends no.l9{eq(e){return e===this}toDOM(){const e=document.createElement("span");return e.className="h6ohF",e.innerText="\u21b5",e.setAttribute("data-widget","true"),e}ignoreEvent(){return!1}}const po=e=>{const t=[];for(let s=0,n=e.viewportLineBlocks.length-1;s<n;s++){const n=e.viewportLineBlocks[s],r=no.p.widget({widget:new ho,side:1});t.push(r.range(n.to))}return no.p.set(t)},go=no.lg.fromClass(class{constructor(e){this.decorations=void 0,this.decorations=po(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=po(e.view))}},{decorations:e=>e.decorations}),mo=({onChange:e,onFocus:t,onBlur:s,onPaste:n,onCreate:r,onScroll:a,onEnterClick:i,defaultValue:o,singleLine:l,className:c,readOnly:u=!1,wrapLines:d=!0,showLineNumbers:h=!1,placeholder:p,extensions:g,autoFocus:m=!1,onMouseMove:x})=>{const f=(0,Te.v9)((e=>!e.settings.defaultTabBehavior)),v=(0,Te.v9)((e=>e.settings.displayWhitespace)),b=(0,Te.v9)((e=>e.settings.lineSeparator)),j=(0,Ee.useRef)(),C=(0,Ee.useRef)();return(0,Ee.useEffect)((()=>{const c=(({onChange:e,onFocus:t,onBlur:s,onPaste:n,onScroll:r,onMouseMove:a,onEnterClick:i,singleLine:o,readOnly:l,wrapLines:c,showLineNumbers:u,placeholderText:d,extraExtensions:h=[],enableInsertTab:p,visualizeWhitespace:g,lineSeparator:m})=>{const x="function"==typeof e,f=no.tk.updateListener.of((t=>{if(x&&t.docChanged){const s=t.state.doc.toString();e(s,t)}})),v=no.tk.domEventHandlers({focus:t,blur:s,scroll:r,paste:n,mousemove:a}),b=null!=d&&(0,no.W$)(d),j=u&&(0,no.Eu)(),C=c&&no.tk.lineWrapping,Z=(0,no.AE)({render:(e,t)=>{const s=document.createElement("span");let n;return g?(s.className="b7jim",n=io.L[e]||`U+${("0000"+e.toString(16).toUpperCase()).slice(-4)}`):n="\u25a1",s["aria-label"]=t,s.setAttribute("data-widget","true"),s.appendChild(document.createTextNode(n)),s}}),y=o&&ro.yy.transactionFilter.of((e=>{if(e.newDoc.lines>1){const t=e.startState.selection,s=t.ranges[t.mainIndex].from;return[{changes:{from:0,to:e.startState.doc.length,insert:e.newDoc.toString().split(/[\r\n]+/g).join("")},selection:{anchor:s,head:s}}]}return e})),E=l&&ro.yy.transactionFilter.of((e=>e.isUserEvent("select")||e.annotation(ro.YW.remote)?e:[]));let T;switch(m){case"\\r\\n":T="\r\n";break;case"\\r":T="\r";break;case"\\n":T="\n";break;default:T=null}return[...[f,(0,ao.m8)(),no.$f.of([{key:"Enter",run:null!=i?()=>(i(),[]):ao.PR,preventDefault:!0}]),p&&no.$f.of([{key:"Tab",run:ao.PN,preventDefault:!0}]),no.$f.of([...ao.wQ,...ao.f$]),E,C,b,j,y,v,Z,g&&uo,g&&go,(0,no.Uw)(),null!=T&&ro.yy.lineSeparator.of(T)].filter(Boolean),...h]})({onChange:e,readOnly:u,wrapLines:d,placeholderText:p,extraExtensions:g,showLineNumbers:h,enableInsertTab:f,onFocus:t,onBlur:s,onPaste:n,visualizeWhitespace:v,lineSeparator:b,onMouseMove:x,singleLine:l,onEnterClick:i,onScroll:a});if(null==C.current){const t=new no.tk({state:ro.yy.create({doc:o||"",extensions:c}),parent:j.current});C.current=t,null==r||r(t),null==e||e(o)}else{var m;null==(m=C.current)||m.dispatch({effects:ro.Py.reconfigure.of(c)})}}),[e,u,d,p,g,h,f,t,s,n,v,b,x,l,i,a,r,o]),(0,Ee.useEffect)((()=>{var e;m&&(null==(e=C.current)||e.focus())}),[m]),(0,Ee.useEffect)((()=>()=>{var e;return null==(e=C.current)?void 0:e.destroy()}),[]),(0,Ve.jsx)("div",{className:c,translate:"no",ref:j,"aria-label":p,dir:"ltr"})},xo=(e,t,s=!1)=>{const n=e.scrollDOM,r=e.state,a=e.dispatch,i=n.scrollTop,o=n.scrollLeft;a({changes:{from:0,to:r.doc.length,insert:t},annotations:ro.YW.remote.of(!0)}),s&&(n.scrollTop=i,n.scrollLeft=o)},fo=(0,Ee.memo)(mo),vo=(e,t)=>{if(null==t||t<0)return null;let s=0,n=e.length-1;for(;s<=n;){const r=s+n>>1;let a=e[r];a.invisible&&r>0&&(a=e[r-1]);const i=a.position,o=i.start,l=i.end;if(t>=o&&t<l)return a;t<o?n=r-1:s=r+1}return null};var bo=s(73935);const jo="vPQc6",Co="d5Sb2",Zo=(0,lt.Z)(ct.DP),yo={appear:jo,appearActive:Co,enter:jo,enterActive:Co,exit:"DF_iI",exitActive:"cgJc2"},Eo=({cmInstance:e,getContent:t,onShow:s,onHide:n})=>{const r=(0,Te.v9)((e=>e.settings.editorTooltips)),a=(0,Ee.useRef)(),i=(0,Ee.useRef)(),o=(0,Ee.useRef)({pos:-1,x:0,y:0}),l=(0,Ee.useState)(-1),c=(0,Re.Z)(l,2),u=c[0],d=c[1],h=(0,Ee.useState)(null),p=(0,Re.Z)(h,2),g=p[0],m=p[1],x=(0,Ee.useCallback)((()=>{const e=a.current,t=i.current;if(!e||!t)return;const s=o.current,n=s.x,r=s.y,l=e.offsetWidth,c=e.offsetHeight,u=Math.min(Math.max(5,Math.max(0,n-l/2)),window.innerWidth-l-5);e.style.left=`${u}px`,e.style.top=`${Math.max(0,r-c+5)}px`,e.style.visibility="visible",t.style.left=n-u+"px"}),[]),f=(0,Ee.useCallback)(((e,t)=>{(0,bo.flushSync)((()=>{d(e),m(t)})),null==s||s(e)}),[s]),v=(0,Ee.useCallback)((()=>{o.current={pos:-1,x:0,y:0},d(-1),null==n||n()}),[n]),b=(0,Ee.useCallback)((s=>{if(1==(1&(null!=s.buttons?s.buttons:s.which))||0!==e.updateState)return v();const n=s.clientX,r=s.clientY,a=s.target;let i,l=!1;var c;if(e.contentDOM.contains(a)&&(l="span"===(null==(c=a.tagName)?void 0:c.toLowerCase())&&"true"===a.getAttribute("data-widget"),i=l?e.posAtDOM(a):e.posAtCoords({x:n,y:r})),null==i||i<0||i>e.state.doc.length)return v();const u=e.coordsAtPos(i);if(null==u)return v();const d=e.bidiSpans(e.state.doc.lineAt(i)).find((e=>e.from<=i&&e.to>=i)),h=(null==d?void 0:d.dir)===no.Nm.RTL;let p,g,m,b=!1;h&&u.left<n||!h&&u.left>n?(m=-1,b=!0):m=1;const j=((e,t,s,n)=>{const r=e.state.doc.length;let a=t;for(;a+=n,!(a<0||a>r);){const t=e.coordsAtPos(a);if(null==t)break;if(t.left!==s.left)return{pos:a,posCoords:t}}return{pos:a,posCoords:null}})(e,i,u,m),C=j.pos,Z=j.posCoords;if(null==Z)return v();if(b?(p=Z.left,g=u.left,i=C):(p=u.left,g=Z.left),h){const e=p;p=g,g=e}if(p=(0,Hr.Et)(p),g=(0,Hr.Et)(g),!l&&(r<u.top||r>u.bottom||n<p||n>g))return v();const y=t(i);if(null==y)return v();const E=o.current.pos;o.current={pos:i,x:n,y:u.top},E!==i&&f(i,y),x()}),[t,e,v,f,x]);(0,Ee.useEffect)((()=>{const t={passive:!0,capture:!0},s=()=>v(),n=t=>{t.target!==e.dom&&e.dom.contains(t.target)||v()};return r&&(e.dom.addEventListener("mouseleave",n,t),e.dom.addEventListener("mousemove",b,t),e.scrollDOM.addEventListener("scroll",s,t)),()=>{v(),e.dom.removeEventListener("mouseleave",n,t),e.dom.removeEventListener("mousemove",b,t),e.scrollDOM.removeEventListener("scroll",s,t)}}),[r,e,b,v]);const j=-1!==u&&null!=g;return(0,Ee.useEffect)((()=>{const t=t=>{e.dom.contains(t.relatedTarget)||v()};return r&&j&&document.body.addEventListener("mouseout",t,{passive:!0}),()=>{document.body.removeEventListener("mouseout",t,{passive:!0})}}),[r,j,v,e]),(0,Ve.jsx)(Ie.h_,{isOpen:j,closeTimeout:Zo,children:(0,Ve.jsxs)(Ie.uT,{classNames:yo,timeout:Zo,in:j,className:"Cfg7u",ref:a,onMount:x,children:[(0,Ve.jsx)("div",{className:"y4yFm",children:g}),(0,Ve.jsx)("div",{className:"qzFlS",ref:i})]})})},To=({token:e})=>(0,Ve.jsx)("div",{className:"fnwkx",children:Za(e)}),ko=(0,Ee.memo)(To),No=e=>{const t=e.parent,s=e.type,n=e.error;if(s===Sr.jt){const t=e.leftToken,s=e.rightToken;return{primary:{start:(t||e).position.start,end:(s||e).position.end}}}if(e.partOfRange)return No(e.rangeToken);if(n)return{primary:e.position};if(s===Sr.Wj){var r;let t=e.quantifiedToken;t.type===Sr.Wj&&(t=t.quantifiedToken);const s=No(t).primary;let n=e,a=e;return e.quantifier?a=e.quantifier:(null==(r=e.quantifiedToken)?void 0:r.type)===Sr.Wj&&(n=e.quantifiedToken),{primary:{start:n.position.start,end:a.position.end},secondary:s}}if(s===Sr.zB||s===Sr.Ao||s===Sr.ix){const s=t?No(t).primary:null;return{primary:e.position,secondary:s}}if(s===Sr.HI||s===Sr.U6){const t=e.openCharClass,s=e.closeCharClass;return{primary:{start:(t||e).position.start,end:(s||e).position.end}}}if(Sr.tK(s)){const t=e.openGroup,s=e.closeGroup;return{primary:{start:(t||e).position.start,end:(s||e).position.end}}}return{primary:e.position}},So=No;var _o=s(64475);const wo=ro.Py.define(),Ao=ro.Py.define(),Oo=ro.QQ.define({create:()=>no.p.none,update(e,t){e=e.map(t.changes);for(const s of t.effects)s.is(wo)?e=e.update({add:s.value,sort:!0}):s.is(Ao)&&(e=e.update({filter:s.value}));return e},provide:e=>no.tk.decorations.from(e)}),Io=e=>e.dispatch({effects:Ao.of((()=>!1))}),Ro=(e,t,s=!1)=>{if(e+1===t)return[no.p.mark({class:s?_o.Z.mouseoverOutlineRelated:_o.Z.mouseoverOutline,inclusive:!0}).range(e,t)];const n="mouseover"+(s?"Related":""),r=no.p.mark({class:_o.Z[`${n}Left`]}),a=no.p.mark({class:_o.Z[n]}),i=no.p.mark({class:_o.Z[`${n}Right`]}),o=[r.range(e,e+1),i.range(t-1,t)];return e+2!==t&&o.push(a.range(e+1,t-1)),o},Po=Oo;var Lo=s(42568),Mo=s.n(Lo);function Do(e,t){for(let s=0,n=e.length;s<n;s++){const n=e[s];t.includes(n)||(t.push(n),Do(n.relatedTokens,t))}}const Uo=e=>{const t=[];return Do(e.relatedTokens,t),t},Fo=Mo()(Ea),Go=(e,t,s)=>no.lg.fromClass(class{constructor(e){this.view=void 0,this.marks=no.p.none,this.value="",this.tokens=[],this.patternError=null,this.state={},this.view=e,this._parseDoc(),this.marks=this._highlightTokens()}update(e){const t=e.startState.selection.main,s=t.from,n=t.to,r=e.state.selection.main,a=r.from,i=r.to,o=s!==n,l=a!==i;if(e.docChanged?(this._parseDoc(),this.marks=this._highlightTokens()):l?this.marks=this._highlightTokens({from:a,to:i}):o&&(this.marks=this._highlightTokens()),!l){const e=vo(this.tokens,a);if(null==e)return;const t=Uo(e),s=[];t.forEach((e=>{const t=e.position,n=t.start,r=t.end,a=no.p.mark({class:_o.Z.cursorover,cursorOver:!0}).range(n,r);s.push(a)})),this.marks=this.marks.update({add:s,filter:(e,t,s)=>!s.spec.cursorOver,sort:!0})}}_parseDoc(){const s=this.view.state.doc.toString(),n=e(s,t),r=n.tokens,a=n.patternError,i=n.state;this.value=s,this.tokens=r,this.patternError=a,this.state=i}_highlightTokens(e){if(!s)return no.p.none;const t=[],n=Fo(this.tokens),r=e||{from:Number.MAX_SAFE_INTEGER,to:Number.MAX_SAFE_INTEGER},a=r.from,i=r.to;for(let e=0,s=n.length;e<s;e++){const s=n[e],r=s.style,o=s.position,l=o.start,c=o.end,u=_e()(r,_o.Z.selected);if(c<a||l>i)t.push(no.p.mark({class:r}).range(l,c));else{a>l&&t.push(no.p.mark({class:r}).range(l,a));const e=a<l?l:a,s=i>c?c:i;e<s&&t.push(no.p.mark({class:u}).range(e,s)),i<c&&t.push(no.p.mark({class:r}).range(i,c))}}return no.p.set(t)}},{decorations:e=>e.marks}),Vo=["onCreate","onFocusChange","defaultValue","parser","onChange","parserOptions"],Bo=e=>{let t=e.onCreate,s=e.onFocusChange,n=e.defaultValue,r=e.parser,a=e.onChange,i=e.parserOptions,o=(0,E.Z)(e,Vo);const l=(0,Te.v9)((e=>e.settings.colorizeSyntax)),c=(0,Ee.useRef)(null),u=(0,Ee.useRef)(null),d=(0,Ee.useMemo)((()=>Go(r,i,l)),[r,i,l]),h=(0,Ee.useMemo)((()=>[d,Po]),[d]),p=(0,Ee.useCallback)((()=>{const e=u.current,t=e.value,s=e.tokens,n=e.patternError,r=e.state;a(t,n?yt.D9:null,s,i,r)}),[a,i]),g=(0,Ee.useCallback)((e=>{c.current=e,u.current=c.current.plugin(d),null==t||t(e)}),[t,d]),m=(0,Ee.useCallback)((()=>s(!0)),[s]),x=(0,Ee.useCallback)((()=>s(!1)),[s]),f=(0,Ee.useCallback)((e=>{const t=vo(u.current.tokens,e);if(null==t)return null;const s=Dr(t);return s.ignoreToken?null:(((e,t)=>{Io(e);const s=So(t),n=s.primary,r=s.secondary,a=Ro(n.start,n.end);null!=r&&a.push(...Ro(r.start,r.end,!0)),e.dispatch({effects:wo.of(a)})})(c.current,s),(0,Ve.jsx)(ko,{token:Dr(t)}))}),[]),v=(0,Ee.useCallback)((()=>Io(c.current)),[]);return(0,we.vI)((()=>{u.current=c.current.plugin(d),p()}),[d,p]),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(fo,Object.assign({onChange:p,onFocus:m,onBlur:x,onCreate:g,defaultValue:n,extensions:h},o)),null!=c.current&&(0,Ve.jsx)(Eo,{cmInstance:c.current,getContent:f,onHide:v})]})},$o=["availableDelimiters","delimiter","onChange"],Ho=e=>{let t=e.availableDelimiters,s=e.delimiter,n=e.onChange,r=(0,E.Z)(e,$o);return(0,Ve.jsxs)(os,Object.assign(Object.assign({closeOnClick:!0},r),{},{children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Delimiters")}),(0,Ve.jsx)(vs,{}),t.map((e=>(0,Ve.jsx)(gs,{isActive:e===s,onClick:()=>{e!==s&&n(e)},className:"G9G7z",children:e},`delimiter-${e}`)))]}))},qo=(0,Ee.memo)(Ho),zo=({flavor:e,delimiter:t,availableDelimiters:s,onChange:n})=>{const r=(0,Ee.useRef)(),a=(0,Ee.useState)(!1),i=(0,Re.Z)(a,2),o=i[0],l=i[1],c=(0,Ee.useCallback)((()=>l(!0)),[]),u=(0,Ee.useCallback)((()=>l(!1)),[]),d=s.length<2,h=Da(e,t),p=(0,Re.Z)(h,1)[0];return(0,Ve.jsx)(Ie.lx,{direction:He.qF.NE,text:(0,Ae.Z)("Change delimiter"),children:(0,Ve.jsxs)(Ie.Yd,{disabled:d,className:_e()("LEmfz",d&&"bwhBe"),onClick:c,tag:"div",children:[(0,Ve.jsxs)("div",{className:"RW_5t",ref:r,children:[(0,Ve.jsx)(ns.EAB,{className:"eb03W",size:12}),p]}),(0,Ve.jsx)(qo,{availableDelimiters:s,delimiter:t,isOpen:o,target:r.current,onMenuClose:u,onChange:n})]})})};function Wo(e,t,s){switch(e){case"g":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"g"}),"lobal",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Don't return after first match")})]});case"i":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"i"}),"nsensitive",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Case insensitive match")})]});case"m":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"m"}),"ulti line",(0,Ve.jsx)("div",{children:(0,Ae.Z)("^ and $ match start/end of line")})]});case"s":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"s"}),"ingle line",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Dot matches newline")})]});case"S":return null;case"x":return(0,Ve.jsxs)("div",{className:t,children:["e",(0,Ve.jsx)("strong",{children:"x"}),"tended",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Ignore whitespace")})]});case"J":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"J"}),"changed",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Allow duplicate subpattern names")})]});case"u":return s===x().JAVA?(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode case",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Case insensitive matching affects unicode characters as well")})]}):(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"u"}),"nicode",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Match with full unicode")})]});case"U":return s===x().JAVA?(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"U"}),"nicode matching",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Enables unicode support for predefined classes")})]}):(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"U"}),"ngreedy",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Make quantifiers lazy")})]});case"X":return(0,Ve.jsxs)("div",{className:t,children:["e",(0,Ve.jsx)("strong",{children:"X"}),"tra",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Disallow meaningless escapes")})]});case"A":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"A"}),"nchored",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Anchor to start of pattern, or at the end of the most recent match")})]});case"D":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"D"}),"ollar end only",(0,Ve.jsx)("div",{children:(0,Ae.Z)("$ matches only end of pattern")})]});case"a":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"a"}),"scii",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Make escape sequences perform ASCII-only matching")})]});case"y":return(0,Ve.jsxs)("div",{className:t,children:["stick",(0,Ve.jsx)("strong",{children:"y"}),(0,Ve.jsx)("div",{children:(0,Ae.Z)("Anchor to start of pattern, or at the end of the most recent match")})]});case"d":return(0,Ve.jsxs)("div",{className:t,children:["in",(0,Ve.jsx)("strong",{children:"d"}),"ices",(0,Ve.jsx)("div",{children:(0,Ae.Z)("The regex engine returns match indices")})]});case"n":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"n"}),"on-capturing",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Groups are no longer implicitly capturing")})]});case"R":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"R"}),"ight to left",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Perform matching from right to left")})]});case"N":return(0,Ve.jsxs)("div",{className:t,children:[(0,Ve.jsx)("strong",{children:"N"}),"o backtracking",(0,Ve.jsx)("div",{children:(0,Ae.Z)("Disable backtracking when matching")})]});default:return Ze.O7(new Error(`Unknown flag '${e}'`)),null}}const Yo=["isOpen","flavor","flags","onChange"],Ko=e=>{let t=e.isOpen,s=e.flavor,n=e.flags,r=e.onChange,a=(0,E.Z)(e,Yo);const i=(0,Ee.useCallback)(((e,t,s)=>{let a=n;s?a+=t:a=a.replace(t,""),r(a)}),[n,r]),o=(0,Ee.useCallback)((e=>{if(!e.ctrlKey&&!e.altKey&&!e.metaKey){const t=e.which||e.keyCode||e.charCode,s=e.char||e.key||String.fromCharCode(t);1===s.length&&(e.preventDefault(),i(e,s,-1===n.indexOf(s)))}}),[i,n]);(0,Ee.useEffect)((()=>(t&&window.addEventListener("keypress",o),()=>window.removeEventListener("keypress",o))),[t,o]);const l=ue()[s].split("");return(0,Ve.jsxs)(os,Object.assign(Object.assign({isOpen:t},a),{},{children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Regex Flags")}),(0,Ve.jsx)(vs,{}),l.map((e=>{const t=-1!==n.indexOf(e);return(0,Ve.jsx)(gs,{isActive:t,onClick:s=>i(s,e,!t),className:"ZsQZ7",children:Wo(e,"COW0E",s)},`flag-${e}`)}))]}))},Jo=({flags:e,delimiter:t,flavor:s,onChange:n})=>{const r=(0,Ee.useRef)(null),a=(0,Ee.useState)(!1),i=(0,Re.Z)(a,2),o=i[0],l=i[1],c=Da(s,t),u=(0,Re.Z)(c,2)[1];return(0,Ve.jsx)(Ie.lx,{direction:He.qF.NW,text:(0,Ae.Z)("Set Regex Options"),children:(0,Ve.jsxs)(Ie.Yd,{tag:"div",className:"AhIEh",onClick:()=>l(!0),children:[(0,Ve.jsxs)("div",{className:"lqj6M",ref:r,children:[(0,Ve.jsx)("div",{className:"n9qI6",children:u}),(0,Ve.jsx)("div",{className:"bcp8d",children:e})]}),(0,Ve.jsx)(Ko,{flags:e,flavor:s,isOpen:o,target:r.current,onMenuClose:()=>l(!1),onChange:n})]})})},Xo=(0,Ee.memo)(Jo),Qo=["onRegexPaste","onRegexChange","onDelimiterChange","onFlagsChange","flags","flavor","delimiter","regex"],el=e=>{let t=e.onRegexPaste,s=e.onRegexChange,n=e.onDelimiterChange,r=e.onFlagsChange,a=e.flags,o=e.flavor,l=e.delimiter,c=e.regex,u=(0,E.Z)(e,Qo);const d=(0,Te.v9)((e=>e.settings.wrapLines)),h=(0,Te.v9)((e=>e.settings.regexAreaLineNumbers)),p=(0,Ee.useState)(!1),g=(0,Re.Z)(p,2),m=g[0],x=g[1],f=(0,Ee.useRef)(null),b=(0,Ee.useMemo)((()=>({flavor:o,flags:a,delimiter:l})),[o,a,l]),j=(0,Ee.useCallback)((e=>x(e)),[]),C=(0,Ee.useCallback)(((e,s)=>{var n,r;const a=s.state.selection.main,l=a.from,c=a.to;if(0!==l||c!==s.state.doc.length)return;const u=(null==(n=window.clipboardData)?void 0:n.getData("Text"))||(null==(r=e.clipboardData)?void 0:r.getData("text/plain"));if(null==u)return void i.Z.warn("User pasted data but could not retrieve it");const d=v()[o],h=new RegExp(`^\\s*([sm]?)(${d.join("|")})([\\s\\S]+)\\2([a-zA-Z]*)\\s*$`),p=u.match(h);if(null!=p){const n=p[1],r=p[2];let a=p[3],i="";const o=p[4];if("s"===n){const e=((e,t)=>{let s=0,n=-1,r=!1;for(let a=e.length-1;0<=a;a--){const i=e.charAt(a);if(r)if("\\"===i)s++;else{if(s%2==0)return n;s=0,n=-1,r=!1}else i===t&&(n=a,r=!0)}return n})(a,r);if(-1===e)return;const t=a;a=t.slice(0,e),i=t.slice(e+1)}e.preventDefault(),e.stopPropagation(),xo(s,a),null==t||t({delimiter:r,flags:o,regex:a,isSub:"s"===n,substText:i})}}),[t,o]),Z=(0,Ee.useCallback)((e=>f.current=e),[]);return(0,Ee.useEffect)((()=>{const e=(e,t)=>xo(f.current,t);return Oe.ZP.on(Oe.fZ,e),()=>Oe.ZP.off(Oe.fZ,e)}),[f]),(0,Ve.jsxs)("div",{className:_e()("cO83v",m&&"KkBJC"),children:[(0,Ve.jsx)(zo,{availableDelimiters:v()[o],delimiter:l,flavor:o,onChange:n}),(0,Ve.jsx)(Bo,Object.assign({defaultValue:c,parser:Nr.Z,onFocusChange:j,onPaste:C,onChange:s,parserOptions:b,className:"T886D",onCreate:Z,showLineNumbers:h,placeholder:(0,Ae.Z)("insert your regular expression here"),wrapLines:d,autoFocus:!0},u)),(0,Ve.jsx)(Xo,{flags:a,delimiter:l,flavor:o,onChange:r}),(0,Ve.jsx)(Ie.qi,{basic:!0,className:_e()("OkWyQ",""===c&&"Si8g5"),disabled:""===c,copyText:l+c+l+a})]})},tl="odN4_",sl="J9uy0",nl="zM5RE",rl="Z8VZM",al="JFyYg",il="I7e3C";function ol(e){return e>999?+(e/1e3).toFixed(1)+"s":e.toFixed(1)+"ms"}const ll=({error:e,matchNum:t,isMatching:s,time:n,steps:r,flavor:a,hasRegex:i})=>{let o,l=!1,c=!1,u="",d="";if(s)o=nl,u=(0,Ae.Z)("Processing...");else if(e)switch(o=al,e){case yt.D9:u=(0,Ae.Z)("Pattern Error");break;case yt.ik:u=(0,Ae.Z)("Timeout"),l=!0;break;case yt.wm:case yt.VE:u=(0,Ae.Z)("Catastrophic Backtracking"),l=!0;break;default:u=(0,Ae.Z)("Engine Error"),c=!0}else t?(o=rl,u=t>1?(0,Ae.Z)("{1} matches",(0,Hr.uf)(t)):(0,Ae.Z)("{1} match",t)):(o=nl,u=(0,Ae.Z)("No Match"),l=!0),i&&(null!=r&&(d+=1!==r?(0,Ae.Z)("{1} steps",(0,Hr.uf)(r)):(0,Ae.Z)("{1} step",r)),null!=n&&(null!=r&&(d+=", "),d+=ol(n)));return l&&i&&(0,zs.G)(a)?(0,Ve.jsx)(Ie.Yi,{className:_e()(tl,"iRqgt"),children:(0,Ve.jsxs)("div",{className:_e()(sl,o),children:[u,d&&(0,Ve.jsxs)("span",{className:il,children:[" (",d,")"]}),(0,Ve.jsx)(Pe.RwU,{className:"Jfsx5"})]})}):(0,Ve.jsx)(Ie.lx,{disableTooltip:!c,direction:He.qF.N,text:null!=e?(0,Ae.Z)("Error reported by engine: {1}",e):"",children:(0,Ve.jsx)("div",{className:tl,children:(0,Ve.jsxs)("div",{className:_e()(sl,o),children:[u,d&&(0,Ve.jsxs)("span",{className:il,children:[" (",d,")"]})]})})})},cl=(0,Ee.memo)(ll),ul="NRMSt",dl="XKeHF",hl=({permalinkFragment:e,version:t,isOpen:s,target:n,onMenuClose:r})=>{const a=(0,Te.v9)((e=>e.regexEditor.regexVersions)),i=(0,we.$5)("getRegexVersions"),o=(0,Re.Z)(i,3),l=o[0],c=o[1],u=o[2];(0,we.DB)((()=>{s&&e&&u((0,X.zp)(e))}),[s,e]);let d="";return d=c?(0,Ve.jsx)("div",{className:ul,role:"alert",children:(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:dl,children:(0,Ae.Z)("Unable to fetch versions")})}):l?(0,Ve.jsxs)("div",{className:ul,children:[(0,Ve.jsx)("div",{className:dl,children:(0,Ae.Z)("Loading...")}),(0,Ve.jsx)(Ie.$j,{size:He.J7.TC,className:"JVYN7"})]}):a.map((s=>{const n=s===t;return(0,Ve.jsx)(Cs,{isActive:n,disabled:n,to:At(e,s),absolute:!0,children:(0,Ae.Z)("Version {1}",s)},`version-${s}`)})),(0,Ve.jsxs)(os,{target:n,isOpen:s,onMenuClose:r,closeOnClick:!0,className:"Mr8Af",children:[(0,Ve.jsx)(fs,{text:(0,Ae.Z)("Regex Versions"),tabIndex:0}),(0,Ve.jsx)(vs,{}),d]})},pl=({children:e})=>{const t=(0,Te.v9)((e=>e.general.version)),s=(0,Te.v9)((e=>e.general.permalinkFragment)),n=(0,Te.v9)((e=>e.general.title)),r=(0,Ee.useState)(!1),a=(0,Re.Z)(r,2),i=a[0],o=a[1],l=(0,Ee.useRef)(null),c=(0,Ee.useCallback)((()=>o(!0)),[]),u=(0,Ee.useCallback)((()=>o(!1)),[]);return(0,we.kF)(n),(0,Ve.jsx)("div",{className:"YZA2N",children:(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Regular Expression"),children:(0,Ve.jsxs)("div",{className:"XjlwO",children:[e,null!=s&&(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Select Regex Version"),direction:He.qF.NW,children:(0,Ve.jsxs)(Ie.CP,{className:"CwApB",onClick:c,ref:l,children:["v",t]})}),(0,Ve.jsx)(hl,{isOpen:i,onMenuClose:u,permalinkFragment:s,version:t,target:l.current})]})})})},gl=e=>{var t,s;const n=null!=(t=e.startUtf16)?t:e.start,r=null!=(s=e.endUtf16)?s:e.end;return{groupStart:Math.min(n,r),groupEnd:Math.max(n,r)}},ml=({matchNum:e,groupName:t,groupNum:s,start:n,end:r,content:a,captureNum:i})=>{const o=(0,Te.v9)((e=>e.regexAreaParser.captureGroupMap)),l=a.length>100?a.slice(0,100)+"\u2026":a,c=null!=i&&i>-1?`.${i+1}`:"",u=t||o[s]||s;return(0,Ve.jsxs)("div",{className:"Th_7x",children:[(0,Ve.jsx)(Ie.vV,{tag:"div",className:"rameg",text:"Match {1}",ph1:(0,Ve.jsx)("span",{children:e+1})}),(0,Ve.jsxs)("div",{className:"p5UZM",children:[(0,Ve.jsx)(Ie.vV,{text:"Group {1}",ph1:u+c,className:"_sUW4"}),":"," ",(0,Ve.jsx)("span",{children:""===a?(0,Ve.jsx)("em",{children:(0,Ae.Z)("empty string")}):(0,Ve.jsx)(Ie.K,{text:l,removeNewlines:!0})})]}),null!=n&&(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("strong",{children:"Pos:"})," ",n,"-",r]})]})},xl=(0,Ee.memo)(ml);var fl=s(20279),vl=s(61939);const bl=new Map,jl=parseFloat(Ue.zj),Cl=(e,t,s,n)=>({left:(0,Hr.Et)(e+jl),right:(0,Hr.Et)(s+jl),top:(0,Hr.Et)(t+1),bottom:(0,Hr.Et)(n-1)}),Zl=(e,t,s,n,r,a)=>{const i=Cl(s,n,r,a),o=i.left,l=i.right,c=i.top,u=i.bottom;e.beginPath(),e.lineWidth=2,e.setLineDash([]),e.moveTo(o-t.scrollX-1,u-t.scrollY+1),e.lineTo(l-t.scrollX+1,u-t.scrollY+1),e.moveTo(o-t.scrollX-1,c-t.scrollY-1),e.lineTo(l-t.scrollX+1,c-t.scrollY-1),e.moveTo(o-t.scrollX-1,c-t.scrollY-1),e.lineTo(o-t.scrollX-1,u-t.scrollY+1),e.moveTo(l-t.scrollX+1,c-t.scrollY-1),e.lineTo(l-t.scrollX+1,u-t.scrollY+1),e.closePath(),e.stroke()},yl=(e,t,s,n,r,a)=>{const i=e.fillStyle;e.fillStyle=(0,vl.C)(i,(0,fl.R)("--content-bg"),40),e.fillRect(s-t.scrollX,n-t.scrollY,r,a),e.fillStyle=i},El=(e,t,s,n,r,a,i,o)=>{const l=Cl(s,n,r,a),c=l.left,u=l.right,d=l.top,h=l.bottom,p=u-c;p<0||(i&&yl(e,t,c-jl,d,jl,h-d),o&&yl(e,t,u,d,jl,h-d),e.fillRect(c-t.scrollX,d-t.scrollY,p,h-d))},Tl=(e,t,s)=>{const n=Cl(s.left,s.top,0,s.bottom),r=n.left,a=n.top,i=n.bottom;e.strokeStyle=(0,fl.R)("--match-zero-width"),e.setLineDash([1,2]),e.beginPath(),e.moveTo(r-t.scrollX,a-t.scrollY),e.lineTo(r-t.scrollX,i-t.scrollY),e.closePath(),e.stroke()},kl=(e,t,s,n,r,a)=>{const i=Nl(t,s);if(!i)return;const o=(0,Re.Z)(i,2),l=o[0],c=o[1];if(e.fillStyle=r,e.strokeStyle=(0,vl.C)(r,(0,fl.R)("--match-mix-hex-color"),(0,fl.R)("--match-mix-amount")),l.bottom===c.bottom){const t=l.left===c.right||s.start===s.end;a(e,n,l.left,l.top,t?l.left+2:c.right,c.bottom)}else{const s=n.width-t.__gutterWidth+n.scrollX,r=t.defaultLineHeight;a(e,n,l.left,l.top,s,l.bottom,!1,!0);let i=l.top;for(;(i+=r)<c.top-1;)a(e,n,0,i,s,i+l.bottom-l.top,!0,!0);a(e,n,0,c.top,c.right,c.bottom,!0,!1)}},Nl=(e,t)=>{const s=bl.get(t);if(s)return s;const n=gl(t),r=n.groupStart,a=n.groupEnd,i=e.viewport,o=i.from,l=i.to;let c=Sl(e,Math.max(o,r),1),u=Sl(e,Math.min(l,a),-1);if(!c||!u)return console.warn(`Unable to paint group, startRect=${!!c}, endRect=${!!u}`,t),null;if(c.left>u.left&&c.top>=u.top||c.left>=u.left&&c.top>u.top){const e=c;c=u,u=e}const d=e.defaultLineHeight,h=c,p=h.top,g=h.left,m=u,x=m.top,f=m.left,v=x-p,b=(0,Hr.Et)(v/d),j=(0,Hr.Et)(p/d)*d,C=(0,Hr.Et)(x/d)*d,Z={top:j,left:g,right:g,bottom:j+d},y={top:b>0?C:j,left:f,right:f,bottom:j+d*(b+1)};return r>=o&&a<=l&&bl.set(t,[Z,y]),[Z,y]},Sl=(e,t,s)=>{const n=e.coordsAtPos(t,s);if(!n)return null;const r=e.__scrollRect,a=e.__gutterWidth,i=r.top-e.scrollDOM.scrollTop,o=r.left-e.scrollDOM.scrollLeft,l=n.top-i,c=n.bottom-i;return{left:n.left-o-a,top:l,right:n.right-o-a,bottom:c}},_l=parseFloat(Ue.zj),wl=function(){try{const e=document.createElement("canvas");if(!e||!e.getContext("2d")||!("setLineDash"in e.getContext("2d")))return!1}catch(e){return!1}return!0}()?({cmInstance:e,matchMap:t,waiting:s})=>{const n=(0,Te.v9)((e=>e.settings.wrapLines)),r=(0,Te.v9)((e=>e.settings.testAreaLineNumbers)),a=(0,Te.v9)((e=>e.general.currentTheme)),i=(0,Ee.useRef)(null),o=(0,Ee.useRef)(null),l=(0,Ee.useRef)(0),c=(0,Ee.useRef)(null),u=(0,Ee.useRef)(null),d=(0,Ee.useState)(!0),h=(0,Re.Z)(d,2),p=h[0],g=h[1],m=(0,Ee.useState)(!1),x=(0,Re.Z)(m,2),f=x[0],v=x[1],b=(0,Ee.useCallback)((()=>{const t=i.current,s=null==t?void 0:t.parentNode;if(null!=s){const n=s.getBoundingClientRect(),r=n.bottom-n.top,a=n.right-n.left-2;t.style.left=`${l.current}px`;const i=a-l.current|0,o=0|r;t.width===i&&t.height===o||(bl.clear(),t.width=i,t.height=o,e.__scrollRect=e.scrollDOM.getBoundingClientRect(),e.__gutterWidth=l.current)}}),[e]),j=(0,Ee.useCallback)((s=>{clearTimeout(u.current),u.current=setTimeout((()=>((e,t,s,n)=>{if(null==e||!e.canvas||!t.__scrollRect)return;const r=(e=>{var t;const s=e.__scrollRect,n=e.__gutterWidth,r=s.left,a=s.right,i=s.top,o=s.bottom,l=e.posAtCoords({x:r+n,y:i}),c=e.posAtCoords({x:a+n,y:o}),u=(null==(t=e.visibleRanges)?void 0:t[0])||{from:0,to:Number.MAX_SAFE_INTEGER},d=u.from,h=u.to;return{firstVisibleIndex:Math.max(d,l),lastVisibleIndex:Math.min(h,c)}})(t),a=r.firstVisibleIndex,i=r.lastVisibleIndex,o=t.scrollDOM,l=o.clientWidth,c=o.clientHeight,u=o.scrollTop,d={width:l,height:c,scrollX:0|o.scrollLeft,scrollY:u-jl|0};e.clearRect(0,0,e.canvas.width,e.canvas.height);const h={},p=[];for(let n=i;a<=n;n--){const r=s[n];if(null!=r)for(let s=0;s<r.length;s++){const n=r[s];if(null==n||!n.isParticipating)continue;const a=n.match,i=n.groupNum,o=n.captureNum,l=`${a}_${i}_${void 0===o?0:o}`;if(null!=h[l])continue;if(h[l]=!0,null!=n.start&&n.start===n.end){p.push(n);continue}const c=(0,fl.n)(n.groupNum,n.match%2!=0);kl(e,t,n,d,c,El)}}for(let s=0,n=p.length;s<n;s++){const n=p[s],r=Nl(t,n);if(!r)continue;const a=(0,Re.Z)(r,1)[0];Tl(e,d,a)}if(e.clearRect(0,0,e.canvas.width,jl),e.clearRect(0,e.canvas.height-jl,e.canvas.width,e.canvas.height),null!=n){const s=(0,fl.n)(n.groupNum,n.match%2!=0);kl(e,t,n,d,s,El),kl(e,t,n,d,s,Zl)}})(o.current,e,t,s)),1)}),[e,t]),C=(0,Ee.useCallback)((e=>{const s=function(e){if(!e||0===e.length)return null;for(let t=e.length-1;0<=t;t--){const s=e[t];if(s.start!==s.end)return s}return e[0]}(t[e]);return null==s?null:(j(s),(0,Ve.jsx)(xl,{matchNum:s.match,groupNum:s.groupNum,groupName:s.groupName,captureNum:s.captureNum,start:s.start,end:s.end,content:s.content}))}),[j,t]);return(0,Ee.useEffect)((()=>(o.current=i.current.getContext("2d",{alpha:!0,antialias:!1}),(e=>{["imageSmoothingEnabled","mozImageSmoothingEnabled","webkitImageSmoothingEnabled","msImageSmoothingEnabled"].some((t=>null!=e[t]&&(e[t]=!1,!0)))})(o),()=>{clearTimeout(u.current),clearTimeout(c.current)})),[]),(0,Ee.useEffect)((()=>{bl.clear(),j()}),[j,n,r,a]),(0,Ee.useEffect)((()=>{const t={passive:!0},s=()=>j();e.scrollDOM.addEventListener("scroll",s,t);const n=()=>e.dispatch({effects:Al.reconfigure(no.tk.editorAttributes.of({class:""}))}),r=(t,s)=>{const r=gl(s),a=r.groupStart,i=r.groupEnd;e.focus(),e.dispatch({effects:[Al.reconfigure(no.tk.editorAttributes.of({class:"LODXi"})),no.tk.scrollIntoView(a,{y:"center",x:"center"})],selection:{anchor:a,head:i}}),e.dom.addEventListener("mouseover",n,{once:!0})};return Oe.ZP.on(Oe.ji,r),()=>{e.scrollDOM.removeEventListener("scroll",s,t),e.dom.removeEventListener(n,{once:!0}),n&&Oe.ZP.off(Oe.ji,r)}}),[e,j]),(0,Ee.useEffect)((()=>{f&&(b(),j(),v(!1),g(!1),c.current=null)}),[f,b,j]),(0,Ee.useEffect)((()=>{if(r){const t=e.scrollDOM.firstChild,s=_l+(t.offsetWidth||0);s!==l.current&&(l.current=s,b())}})),(0,Ee.useEffect)((()=>{const e=i.current.parentNode,t=new ResizeObserver((()=>{clearTimeout(c.current),g(!0),c.current=setTimeout((()=>v(!0)),500)}));return t.observe(e),()=>{t.disconnect(),clearTimeout(c.current)}}),[b,e]),(0,Ee.useEffect)((()=>{const e=setTimeout((()=>{!s&&c.current||g(s)}),100);return()=>clearTimeout(e)}),[s]),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("canvas",{ref:i,className:_e()("MF2Zl",p&&"PepZ_")}),(0,Ve.jsx)(Eo,{cmInstance:e,getContent:C,onHide:j})]})}:()=>null,Al=new ro.F6,Ol=[Al.of(no.tk.editorAttributes.of({class:""}))],Il=({matchMap:e,onInput:t,waiting:s})=>{const n=(0,Te.v9)((e=>e.regexEditor.showSubstitutionArea)),r=(0,Te.v9)((e=>e.regexEditor.showListSubstitutionArea)),a=(0,Te.v9)((e=>e.regexEditor.testString)),i=(0,Te.v9)((e=>e.settings.wrapLines)),o=(0,Te.v9)((e=>e.settings.testAreaLineNumbers)),l=(0,Ee.useState)(!1),c=(0,Re.Z)(l,2),u=c[0],d=c[1],h=(0,Ee.useState)(null),p=(0,Re.Z)(h,2),g=p[0],m=p[1],x=(0,Ee.useCallback)((()=>d(!0)),[]),f=(0,Ee.useCallback)((()=>d(!1)),[]),v=(0,Ee.useCallback)((e=>m(e)),[]);return(0,Ee.useEffect)((()=>{const e=(e,t,s)=>xo(g,s);return Oe.ZP.on(Oe.fZ,e),()=>Oe.ZP.off(Oe.fZ,e)}),[g]),(0,Ve.jsxs)("div",{className:_e()("of6uh",(n||r)&&"qFwsQ"),children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Test String")}),(0,Ve.jsxs)("div",{className:_e()("s6TnK",u&&"AH8pc"),children:[(0,Ve.jsx)(fo,{onCreate:v,className:"Pk2Mn",onChange:t,onFocus:x,onBlur:f,defaultValue:a,showLineNumbers:o,placeholder:(0,Ae.Z)("insert your test string here"),wrapLines:i,extensions:Ol}),null!=g&&(0,Ve.jsx)(wl,{cmInstance:g,matchMap:e,waiting:s})]})]})};function Rl(){return new Worker(s.p+"pcre2.worker.3883509ee9c5e3f20934.js")}function Pl(){return new Worker(s.p+"generic.worker.e7ae3ee9e8b9b71f6a54.js")}function Ll(){return new Worker(s.p+"javascript.worker.a10e707dccb487a4e5b9.js")}function Ml(){return new Worker(s.p+"java.worker.eae84edd4389c042bae2.js")}function Dl(){return new Worker(s.p+"dotnet.worker.e2b799a3b13c8527bb83.js")}function Ul(){return new Worker(s.p+"rust.worker.b404ceba3b1140ac7f3a.js")}var Fl=s(34426);class Gl extends Fl.Z{getWorker(e){switch(e){case x().PCRE2:return Rl;case x().JAVASCRIPT:return Ll;case x().PYTHON:case x().PCRE:case x().GOLANG:return Pl;case x().JAVA:return Ml;case x().DOTNET:return Dl;case x().RUST:return Ul;default:throw new Error(`No worker file exists for flavor '${e}'`)}}runSubst(e,t,s,n,r,a,i,o){const l={regex:null!=e?e:"",delimiter:null!=t?t:"",flags:null!=s?s:"",testString:null!=n?n:"",substString:null!=r?r:"",listMode:i.listMode};if([x().PCRE,x().PYTHON,x().GOLANG].includes(i.flavor)){const e=Object.assign(Object.assign({},l),a);return super.runWorker(e,i,o)}return super.runWorker(l,i,o)}}const Vl=Gl;var Bl=s(79090),$l=s(4779);const Hl=e=>{const t=(0,$l.ZP)(e,Sr.Xq);return(0,$l.sT)(t,_r.YY),t};var ql=s(51836),zl=s(750),Wl=s(81669),Yl=s(68165),Kl=s(48401);const Jl=(e,t)=>{const s=t.subpatterns,n=t.captureGroupCount,r=e.reference;return("string"==typeof r?!s.includes(r):n<r)&&(0,$l.sT)(e,_r.Bj),e.error},Xl=(e,t)=>{const s=e.conditionals,n=e.allConditionals,r=(0,Kl.Z)(e,Sr.w_),a=t.includes("-");let i=t.replace(/\W/g,"");return isNaN(i)||(i=parseInt(i,10)),s.length>9&&(0,$l.sT)(r,_r.xX),s.push(r),n.push(r),r.hasAlternative=a,r.reference=i,(0,$l.kV)(r,Jl),r};var Ql=s(68072);const ec=e=>{const t=(0,Ql.Z)(e),s=t.parent;return s.hasAlternative=!0,t.conditional=s,t.type=s.type,t};var tc=s(41061);const sc=e=>{const t=(0,tc.Z)(e);return t.parent||(0,$l.sT)(t,_r.rs),e.conditionals.pop(),t},nc=(e,t)=>{const s=(0,$l.ZP)(e,Sr.Bi);return(0,$l.A_)(s,_o.Z.meta),s};var rc=s(69678),ac=s(62170),ic=s(26850);const oc=(e,t)=>{const s=(0,$l.ZP)(e,Sr.aM),n="\\U"===t,r=!n;return e.uppercase=n,e.lowercase=r,(0,$l.A_)(s,_o.Z.meta),s},lc=e=>{const t=(0,$l.ZP)(e,Sr.py);return e.uppercase=!1,e.lowercase=!1,(0,$l.A_)(t,_o.Z.meta),t};var cc=s(11497),uc=s(92572),dc=s(40916),hc=s(43453);const pc=(e,t,s)=>{if("$"===t&&e.matchString("$$"))return ql.Z},gc=(e,t,s)=>"\\"===e.next()?cc.Z:uc.Z,mc=(e,t,s)=>{if("\\"===t&&e.matchString("\\v"))return dc.Z},xc=(e,t,s)=>{if("\\"===t&&e.match(/^\\[trnfae]/))return hc.Z},fc=(e,t,s)=>{if("$"===t&&e.eat("$"))return Hl},vc=(e,t,s)=>"\\"===t&&e.match(/^\\[UL]/)?oc:"\\"===t&&e.matchString("\\E")?lc:void 0,bc=[(e,t,s)=>{const n=e.match(/^[\\$]\d+/);if(n){let t=parseInt(n[0].slice(1),10);for(;(""+t).length>0&&t>s.captureGroupCount;)t=Math.floor(t/10);return e.backUp(n[0].length-("$"+t).length),rc.Z}},(e,t,s)=>{if(("$"===t||"\\"===t)&&e.match(/^(?:\${\d+}|\\g<\d+>)/))return rc.Z},(e,t,s)=>{if(("$"===t||"\\"===t)&&e.match(/^(?:\${\w+}|\\g<\w+>)/))return zl.Z},xc,(e,t,s)=>{if("\\"===t&&e.matchString("\\b"))return ac.Z},mc,(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:[a-fA-F0-9]{2}|{[a-fA-F0-9]+})/))return ic.Z},vc,(0,Yl.eb)(),gc],jc=[(e,t,s)=>{if("$"===t&&(e.matchString("${*MARK}")||e.matchString("$*MARK")))return nc},(e,t,s)=>{if(s.conditionals.length>0&&e.matchString("{"))return Hl},pc,(e,t,s)=>{if("$"===t&&e.match(/^\$(?:[a-z]\w*|{[a-z]\w*})/i))return zl.Z},(e,t,s)=>{if("$"===t&&e.match(/^\${(?:\d{1,2}|[a-z]\w+):[+-]/i))return Xl},(e,t,s)=>{if("$"===t&&e.match(/^\$(?:\d+|{\d{1,2}})/))return rc.Z},(e,t,s)=>{const n=s.conditionals.length;if(n>0&&":"===t&&!s.conditionals[n-1].hasAlternative&&e.eat(":"))return ec},(e,t,s)=>{if(s.conditionals.length>0&&e.eat("}"))return sc},xc,(e,t,s)=>{if("\\"===t&&e.match(/^\\x(?:[a-fA-F0-9]{2}|{[a-fA-F0-9]*}?)/))return Wl.Z},vc,(0,Yl.eb)(((e,t)=>{const s=(0,ql.Z)(e,t);return/^\\[\da-z]/i.test(t)&&(0,$l.sT)(s,_r.mi),s})),fc,gc];var Cc=s(99506);const Zc=e=>{const t=(0,$l.ZP)(e,Sr.hL);return(0,$l.A_)(t,_o.Z.meta),t},yc=e=>{const t=(0,$l.ZP)(e,Sr.Cz);return(0,$l.A_)(t,_o.Z.meta),t},Ec=e=>{const t=(0,$l.ZP)(e,Sr.tI);return(0,$l.A_)(t,_o.Z.meta),t};var Tc=s(32428);const kc=(e,t)=>(t.subpatterns.includes(e.reference)||(0,$l.sT)(e,_r.Bj),e.error),Nc=(e,t)=>{const s=(0,Tc.Z)(e,Sr.O3);return t.replace(/^\\?\$</,"").slice(0,-1)||(0,$l.sT)(s,_r.YY),s.reference=t.replace(/^\\?\$</,"").slice(0,-1),(0,$l.kV)(s,kc),(0,$l.A_)(s,_o.Z.backreference),s};var Sc=s(9961),_c=s(99309),wc=s(91435),Ac=s(92250),Oc=s(62738);const Ic=(e,t,s)=>{const n=e.match(/^\\?\$([1-9]\d?)/);if(n){let t=parseInt(n[1],10);for(;(""+t).length>0&&t>s.captureGroupCount;)t=Math.floor(t/10);return e.backUp(n[1].length-(""+t).length),rc.Z}},Rc=(e,t,s)=>{if("\\"===t&&e.match(/^\\0\d*/))return Sc.Z},Pc=(e,t,s)=>{if("\\"===t&&e.match(/^\\(?:[0-3][0-7]{1,2}|[0-7]{1,2})/))return _c.Z},Lc=(e,t,s)=>{if("\\"===t&&e.match(/^\\[trnfab]/))return hc.Z},Mc=(e,t,s)=>{if("\\"===t&&e.matchString("\\v"))return dc.Z},Dc=(e,t,s)=>{if("\\"===t&&e.match(/^\\u[0-9A-Fa-f]{0,4}/))return wc.Z},Uc=[(e,t,s)=>{if(e.matchString("$$")||e.matchString("\\$$"))return ql.Z},(e,t,s)=>{if(e.matchString("$&")||e.matchString("\\$&"))return Zc},(e,t,s)=>{if(e.matchString("$`")||e.matchString("\\$`"))return yc},(e,t,s)=>{if(e.matchString("$'")||e.matchString("\\$'"))return Ec},(e,t,s)=>{if(he.SC.namedGroup&&e.match(/^\\?\$<[^>]*>/))return Nc},Ic,Rc,Pc,Lc,Mc,Oc.K,Cc.FY,Dc,(0,Yl.eb)(Ac.Z),gc];var Fc=s(29856);const Gc=(e,t)=>{const s=(0,Fc.Z)(e,t);return 4!==t.length&&(0,$l.sT)(s,_r.mi),s};var Vc=s(90256),Bc=s(62284);const $c=(e,t,s)=>{if(e.match(/^\$(?:\d+\b|{\d+})/))return rc.Z},Hc=(e,t,s)=>{if(e.match(/^\$(?:\w+|{\w+})/))return zl.Z},qc=(e,t,s)=>{if(e.matchString('"'))return Vc.Z},zc=[$c,Hc,(e,t,s)=>{if(e.match(/^\\[0-7]{1,3}/))return Gc},xc,mc,(e,t,s)=>{if(e.match(/^\\x[a-fA-F0-9]{0,2}/))return ic.Z},Cc.FY,Dc,(e,t,s)=>{if(e.matchString("\\U"))return _c.Z},qc,(0,Yl.eb)(Bc.Z),fc,gc],Wc=[(e,t,s)=>{if("\\"===t&&e.match(/^\\(?:[1-9]\d?|g<\d+>)/))return rc.Z},(e,t,s)=>{if("\\"===t&&e.match(/^\\g<\w+>/))return zl.Z},(e,t,s)=>{if("\\"===t&&e.matchString("\\g"))return Hl},xc,mc,(0,Yl.eb)(),gc];var Yc=s(95790);const Kc=(e,t,s)=>{if("$"===t&&e.match(/^\${\w+}/))return zl.Z},Jc=[Ic,Kc,(e,t,s)=>{if("\\"===t&&e.match(/^\\[trnfb]/))return hc.Z},Cc.FY,Dc,(e,t,s)=>{if("$"===t){if(e.matchString("$0"))return rc.Z;if(e.eat("$"))return Hl}},Pc,(0,Yl.eb)(Yc.Z),gc],Xc=e=>{const t=(0,$l.ZP)(e,Sr.Ud);return(0,$l.A_)(t,_o.Z.meta),t},Qc=e=>{const t=(0,$l.ZP)(e,Sr.ul);return(0,$l.A_)(t,_o.Z.meta),t};var eu=s(38844),tu=s(64610);const su=[pc,(e,t,s)=>{if("$"===t&&e.matchString("$&"))return Zc},(e,t,s)=>{if("$"===t&&e.matchString("$`"))return yc},(e,t,s)=>{if("$"===t&&e.matchString("$'"))return Ec},(e,t,s)=>{if("$"===t&&e.matchString("$_"))return Xc},(e,t,s)=>{if("$"===t&&e.matchString("$+"))return Qc},Kc,(e,t,s)=>{const n=e.match(/^\$(\d+)/);if(n){let t=parseInt(n[1],10);if(t>=2147483648)return tu.Z;for(;(""+t).length>0&&t>s.captureGroupCount;)t=Math.floor(t/10);return e.backUp(n[1].length-(""+t).length),rc.Z}},Rc,Lc,Mc,Oc.K,Yl.fR,(0,Yl.eb)(eu.Z),gc];var nu=s(69741),ru=s(80430);const au=[pc,$c,Hc,(e,t,s)=>{if("\\"===t&&e.match(/^\\[trn]/))return hc.Z},Oc.K,(e,t,s)=>{if("\\"===t&&e.match(/^\\0/))return Sc.Z},(e,t,s)=>{if("\\"===t&&e.match(/^\\u{[0-9A-Fa-f]*}?/))return ru.Z},qc,(0,Yl.eb)(nu.Z),fc,gc],iu=Mo()(((e,t={})=>{const s=t.flavor,n=((e={})=>Object.assign({uppercase:!1,lowercase:!1,inCharClass:!1,subpatterns:[],captureGroupCount:0,captureGroupMap:{},conditionals:[],allConditionals:[],groups:[],parents:[],unicodeEnabled:!1,flags:"",flavor:x().PCRE2,delimiter:null,isSubstitution:!0,patternError:!1,revalidateTokens:[],revalidateTokensNext:[]},e))(t);n.unicodeEnabled=s===x().GOLANG||s===x().DOTNET;const r=(e=>{switch(e){case x().PCRE2:return jc;case x().PCRE:return bc;case x().JAVASCRIPT:return Uc;case x().GOLANG:return zc;case x().PYTHON:return Wc;case x().JAVA:return Jc;case x().DOTNET:return su;case x().RUST:return au;default:throw new Error(`There is no tokenizer for '${e}'`)}})(s);return{tokens:(0,Bl.Q)(r,e,n),patternError:n.patternError,state:n}})),ou=["subpatterns","captureGroupCount","defaultValue","onChange","flavor","className"],lu=e=>{let t=e.subpatterns,s=e.captureGroupCount,n=e.defaultValue,r=e.onChange,a=e.flavor,i=e.className,o=(0,E.Z)(e,ou);const l=(0,Ee.useRef)(null),c=(0,Ee.useMemo)((()=>({flavor:a,subpatterns:t,captureGroupCount:s})),[t,s,a]),u=(0,Ee.useState)(!1),d=(0,Re.Z)(u,2),h=d[0],p=d[1],g=(0,Ee.useCallback)((e=>p(e)),[]),m=(0,Ee.useCallback)((e=>l.current=e),[]);return(0,Ee.useEffect)((()=>{const e=(e,t)=>xo(l.current,t);return Oe.ZP.on(Oe.l2,e),()=>Oe.ZP.off(Oe.l2,e)}),[]),(0,Ve.jsx)(Bo,Object.assign({onCreate:m,onChange:r,defaultValue:n,onFocusChange:g,parser:iu,parserOptions:c,className:_e()("Pgoeh",h&&"Vnkit",i),placeholder:(0,Ae.Z)("insert your replacement value here"),singleLine:!0,wrapLines:!1},o))},cu=({isSubst:e,error:t,time:s,hasResult:n})=>{let r=null,a=null,i=!1;if(e)r=nl,a=(0,Ae.Z)("Processing...");else if(t)switch(r=al,t){case yt.D9:a=(0,Ae.Z)("Pattern Error");break;case yt.ik:a=(0,Ae.Z)("Timeout");break;default:a=(0,Ae.Z)("Engine Error"),i=!0}else n?(a=(0,Ae.Z)("Success"),r=rl):(a=(0,Ae.Z)("No result"),r=nl);return(0,Ve.jsx)(Ie.lx,{disableTooltip:!i,direction:He.qF.N,text:null!=t?(0,Ae.Z)("Error reported by engine: {1}",t):"",children:(0,Ve.jsx)("div",{className:"Br6dk",children:(0,Ve.jsxs)("div",{className:_e()(sl,r),children:[a,null!=s&&(0,Ve.jsxs)("span",{className:il,children:[" (",ol(s),")"]})]})})})},uu=(0,Ee.memo)(cu),du=[yt.Y8,yt.wm,yt.Vu,yt.D9,yt.ik,yt.Gv],hu=({regex:e,substString:t,matchResult:s,testString:n,regexParserStatus:r,captureGroupMap:a,subpatterns:o,captureGroupCount:l,label:c,listMode:u,onValueChange:d})=>{const h=(0,Te.v9)((e=>e.settings.wrapLines)),p=(0,Te.v9)((e=>e.settings.testAreaLineNumbers)),g=(0,Te.v9)((e=>e.settings.maxExecutionTime)),m=(0,Te.v9)((e=>e.regexEditor.flavor)),x=(0,Te.v9)((e=>e.regexEditor.flags)),f=(0,Te.v9)((e=>e.regexEditor.delimiter)),v=(0,Ee.useRef)(null),b=(0,Ee.useRef)(new Vl),j=(0,Ee.useState)({substString:t,tokens:[],status:null}),C=(0,Re.Z)(j,2),Z=C[0],y=C[1],E=(0,Ee.useState)({isSubst:!0,time:null,substError:null,hasResult:!1}),T=(0,Re.Z)(E,2),k=T[0],N=T[1],S=(0,we.Sf)((e=>d(e)),R.UPDATE_RESULT_DELAY),_=(0,we.Sf)(((e,t)=>{null==t||du.includes(t)||(i.Z.error("Subst error reported by engine:",t),Ze.O7(new Error(t))),N({isSubst:!1,time:null==e?null:e.time,substError:t,hasResult:null!=(null==e?void 0:e.result)})}),R.UPDATE_RESULT_DELAY,"cancel"),w=(0,Ee.useCallback)(((e,t,s)=>y({substString:e,status:t,tokens:s})),[]),A=(0,Ee.useCallback)((e=>xo(v.current,e,!0)),[]);(0,Ee.useEffect)((()=>{if(S(Z.substString),_.cancel(),""===e||null!=Z.status||0===s.length||null!=r)b.current.resetWorker(),""===e?N({hasResult:!1,isSubst:!1,time:null,substError:null}):_({time:null,result:null},Z.status||r),A(n||"");else{N({hasResult:!1,isSubst:!0,time:null,substError:null});const t={maxExecutionTime:g,flavor:m,listMode:u},r={matchResult:s,tokens:Z.tokens,captureGroupMap:a};b.current.runSubst(e,f,x,n,Z.substString,r,t,((e,t)=>{_(e,t),A(null==(null==e?void 0:e.result)?n:e.result)}))}}),[g,s,Z.substString,Z.tokens,Z.status,x,f,r,_,S,u,A]);const O=(0,Ee.useCallback)((e=>v.current=e),[]);return(0,Ee.useEffect)((()=>{const e=()=>S.flush();return Oe.ZP.on(Oe.P,e),()=>Oe.ZP.off(Oe.P,e)}),[S]),(0,Ee.useEffect)((()=>()=>b.current.resetWorker()),[]),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.__,{text:c,className:"llpmv"}),(0,Ve.jsx)(uu,{isSubst:k.isSubst,error:k.substError,time:k.time,hasResult:k.hasResult}),(0,Ve.jsxs)("div",{className:"uP9GB",children:[(0,Ve.jsx)(fo,{className:"iuWEc",onCreate:O,wrapLines:h,showLineNumbers:p,readOnly:!0}),(0,Ve.jsx)(lu,{onChange:w,defaultValue:t,flavor:m,captureGroupCount:l,subpatterns:o})]})]})},pu=({matchResult:e,testString:t,regex:s,regexParserStatus:n,captureGroupMap:r,subpatterns:a,captureGroupCount:i})=>{const o=(0,Te.I0)(),l=(0,Te.v9)((e=>e.regexEditor.substString)),c=(0,Ee.useCallback)((e=>o((0,X.ZI)(e))),[o]);return(0,Ve.jsx)(hu,{label:(0,Ae.Z)("Substitution"),substString:l,testString:t,matchResult:e,regex:s,regexParserStatus:n,captureGroupMap:r,subpatterns:a,captureGroupCount:i,onValueChange:c})},gu=({matchResult:e,testString:t,regex:s,regexParserStatus:n,captureGroupMap:r,subpatterns:a,captureGroupCount:i})=>{const o=(0,Te.I0)(),l=(0,Te.v9)((e=>e.regexEditor.listSubstString)),c=(0,Ee.useCallback)((e=>o((0,X.ak)(e))),[o]);return(0,Ve.jsx)(hu,{label:(0,Ae.Z)("List"),substString:l,testString:t,matchResult:e,regex:s,regexParserStatus:n,captureGroupMap:r,subpatterns:a,captureGroupCount:i,onValueChange:c,listMode:!0})},mu=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexEditor.regex)),s=(0,Te.v9)((e=>e.regexEditor.flags)),n=(0,Te.v9)((e=>e.regexEditor.flavor)),r=(0,Te.v9)((e=>e.regexEditor.delimiter)),a=(0,Te.v9)((e=>e.regexEditor.testString)),i=(0,Te.v9)((e=>e.regexEditor.showUnitTestArea)),o=(0,Te.v9)((e=>e.settings.maxExecutionTime)),l=(0,Te.v9)((e=>e.settings.calculateRegexSteps)),c=(0,Te.v9)((e=>e.regexEditor.error)),u=(0,Te.v9)((e=>e.regexEditor.matchResult.length)),d=(0,Te.v9)((e=>e.regexEditor.showSubstitutionArea)),h=(0,Te.v9)((e=>e.regexEditor.showListSubstitutionArea)),p=(0,Ee.useRef)(new Wi.Z).current,g=(0,Ee.useState)(a),m=(0,Re.Z)(g,2),f=m[0],v=m[1],b=(0,Ee.useState)({regex:"",status:null,tokens:[],flavor:n,flags:s,captureGroupMap:{},subpatterns:[],captureGroupCount:0,definedSubpatterns:[],delimiter:""}),j=(0,Re.Z)(b,2),C=j[0],Z=j[1],y=(0,Ee.useState)({isMatching:!1,time:null,steps:null}),E=(0,Re.Z)(y,2),T=E[0],k=E[1],N=(0,Ee.useState)({matchResult:[],matchMap:{}}),S=(0,Re.Z)(N,2),_=S[0],w=S[1],A=(0,Ee.useRef)(0),O=(0,Ee.useState)(!1),I=(0,Re.Z)(O,2),P=I[0],L=I[1],M=(0,jr.Z)(((t,s)=>{const n=t||{},r=n.steps,a=n.time,i=n.matchResult,o=n.matchMap;null!=s?(k({isMatching:!1,time:null,steps:null}),e((0,X.QF)(s))):(e((0,X.QF)(null)),k({isMatching:!1,steps:r,time:a})),e((0,X.rS)(s?[]:i)),w(s?{matchResult:[],matchMap:{}}:{matchResult:i,matchMap:o})}),R.UPDATE_RESULT_DELAY,"cancel"),D=(0,jr.Z)(((t,s,n,r)=>{const a=r.subpatterns,i=r.captureGroupMap,o=r.definedSubpatterns,l=r.captureGroupCount;e((0,X.og)({status:s,tokens:n,subpatterns:a,captureGroupMap:i,captureGroupCount:l,definedSubpatterns:o})),e((0,X.uf)(t))}),R.UPDATE_RESULT_DELAY),U=(0,jr.Z)((t=>e((0,X.Jh)(t))),R.UPDATE_RESULT_DELAY),F=(0,Ee.useCallback)((t=>{const s=t.delimiter,r=t.flags,a=t.isSub,i=t.substText;[x().PCRE,x().PCRE2].includes(n)&&e((0,X.G6)(s)),e((0,X.dL)("",r,n)),a&&(e((0,X.ux)()),requestAnimationFrame((()=>Oe.ZP.emit(Oe.l2,i))))}),[n,e]),G=(0,Ee.useCallback)((t=>e((0,X.G6)(t))),[e]),V=(0,Ee.useCallback)((t=>e((0,X.dL)(s,t,n))),[s,n,e]),B=(0,Ee.useCallback)(((e,t,s,n,r)=>{const a=n.flavor,i=n.flags,o=n.delimiter,l=r.subpatterns,c=r.captureGroupMap,u=r.captureGroupCount,d=r.definedSubpatterns;Z({regex:e,status:t,tokens:s,flavor:a,flags:i,subpatterns:l,captureGroupMap:c,captureGroupCount:u,definedSubpatterns:d,delimiter:o}),D(e,t,s,r)}),[D]),$=(0,Ee.useCallback)((e=>{U(e),v(e)}),[U]);(0,Ee.useEffect)((()=>{M.cancel();const e=1e9*Math.random()|0;A.current=e;const t=C.regex,s=C.status,n=C.flavor,r=C.flags,a=C.delimiter;if(""===t||null!=s)w({matchResult:[],matchMap:{}}),M({matchResult:[],matchMap:{},steps:null,time:null},s),L(!1);else{k({isMatching:!0,time:null,steps:null}),L(!0);const s={maxExecutionTime:o,calculateRegexSteps:l,flavor:n};p.runMatch(t,a,r,f,s,((t,s)=>{e===A.current&&(w({matchResult:(null==t?void 0:t.matchResult)||[],matchMap:(null==t?void 0:t.matchMap)||{}}),M(t,s),L(!1))}))}}),[C,p,f,M,D,o,l]),(0,Ee.useEffect)((()=>{const e=()=>{D.flush(),U.flush()};return Oe.ZP.on(Oe.P,e),()=>Oe.ZP.off(Oe.P,e)}),[D,U]),(0,Ee.useEffect)((()=>()=>p.resetWorker()),[p]);const H=d?pu:gu;return(0,Ve.jsxs)("div",{className:"AUc0W",children:[(0,Ve.jsxs)("div",{className:"rjodX",children:[(0,Ve.jsx)(pl,{children:!i&&(0,Ve.jsx)(cl,{isMatching:T.isMatching,matchNum:u,steps:T.steps,time:T.time,error:c,flavor:n,hasRegex:t.length>0})}),(0,Ve.jsx)(el,{onRegexChange:B,onRegexPaste:F,onDelimiterChange:G,onFlagsChange:V,regex:t,flavor:n,flags:s,delimiter:r})]}),(0,Ve.jsx)("div",{className:"f9BbV",children:i?(0,Ve.jsx)(so,{}):(0,Ve.jsxs)("div",{className:"F69Q6",children:[(0,Ve.jsx)(Il,{onInput:$,matchMap:_.matchMap,waiting:P}),(h||d)&&(0,Ve.jsx)("div",{className:"kPafO",children:(0,Ve.jsx)(H,{matchResult:_.matchResult,testString:f,regex:C.regex,regexParserStatus:C.status,captureGroupMap:C.captureGroupMap,subpatterns:C.subpatterns,captureGroupCount:C.captureGroupCount})})]})})]})};var xu=s(61399);const fu=()=>{const e=(0,Ee.useState)(!1),t=(0,Re.Z)(e,2),s=t[0],n=t[1],r=[{description:(0,Ae.Z)("Switch to regex matching"),shortcuts:[Zt.SWITCH_TO_MATCH]},{description:(0,Ae.Z)("Switch to regex substitution"),shortcuts:[Zt.SWITCH_TO_SUBST]},{description:(0,Ae.Z)("Switch to regex list substitution"),shortcuts:[Zt.SWITCH_TO_LIST]},{description:(0,Ae.Z)("Switch to unit tests"),shortcuts:[Zt.SWITCH_TO_UNIT_TESTS]},{description:(0,Ae.Z)("Open regex debugger"),shortcuts:[Zt.SHOW_DEBUGGER]},{description:(0,Ae.Z)("Open code generator"),shortcuts:[Zt.SHOW_CODE_GEN]},{description:(0,Ae.Z)("Run unit tests (when view is open)"),shortcuts:[Zt.RUN_UNIT_TESTS]}];return(0,Ee.useEffect)((()=>{const e=()=>n(!0);return Oe.ZP.on("key:question",e),()=>Oe.ZP.off("key:question",e)}),[]),(0,Ve.jsx)(xu.Z,{onModalClose:()=>n(!1),isOpen:s,shortcuts:r})},vu=(0,Ee.memo)(fu),bu=()=>{const e=(0,Ne.UO)(),t=e.permalinkFragment,s=e.version,n=(0,we.$5)("getRegex"),r=(0,Re.Z)(n,3),a=r[1],i=r[2];if((0,we.DB)((e=>{e&&null!=t&&!isNaN(s)&&i((0,X.Of)(t,s))}),[i,t,s]),null!=t){if(a)return isNaN(s)||"1"===s?(0,Ve.jsx)(Ie.l_,{to:"/"}):(0,Ve.jsx)(Ie.l_,{to:`/r/${t}/1`});if(isNaN(s))return(0,Ve.jsx)(br,{})}const o=t?`${t}-${s}`:"plain";return(0,Ve.jsxs)("div",{className:"bkz2q",children:[(0,Ve.jsx)(ki,{}),(0,Ve.jsx)(mu,{}),(0,Ve.jsx)(vr,{path:"/codegen",title:(0,Ae.Z)("Code Generator"),children:(0,Ve.jsx)(ir,{})},`code-gen-${o}`),(0,Ve.jsx)(vr,{path:"/debugger",title:(0,Ae.Z)("Regex Debugger"),children:(0,Ve.jsx)(lr,{})},`debugger-${o}`),(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:"/codegen",element:(0,Ve.jsx)(Ve.Fragment,{})}),(0,Ve.jsx)(Ne.AW,{path:"/debugger",element:(0,Ve.jsx)(Ve.Fragment,{})}),(0,Ve.jsx)(Ne.AW,{path:"/",element:(0,Ve.jsx)(Ve.Fragment,{})}),(0,Ve.jsx)(Ne.AW,{path:"*",element:(0,Ve.jsx)(Ie.l_,{to:null!=t?`/r/${t}/${s}`:"/"})})]}),(0,Ve.jsx)(vu,{})]})},ju=({isVisible:e})=>e?(0,Ve.jsx)("div",{className:"wMRs6",children:(0,Ve.jsx)(Ie.$j,{size:He.J7.HC})}):null,Cu=(0,Ee.memo)(ju),Zu=({isLoading:e,children:t})=>(0,Ve.jsxs)(Ve.Fragment,{children:[!e&&t,(0,Ve.jsx)(Cu,{isVisible:e})]}),yu=({active:e,page:t})=>{const s=(0,Ne.TH)(),n=(0,ke.lr)(),r=(0,Re.Z)(n,1)[0],a=Object.assign(Object.assign({},s),{},{search:Ot.B({page:t},r)});return(0,Ve.jsx)(Ie.rU,{to:a,className:_e()("PMAGi",e&&"J4QnP"),noTheme:!0,children:t})},Eu="RnWnK",Tu=({left:e,right:t,nextPage:s,className:n,visible:r})=>{const a=(0,Ne.TH)(),i=(0,ke.lr)(),o=(0,Re.Z)(i,1)[0],l=Object.assign(Object.assign({},a),{},{search:Ot.B({page:s},o)});return(0,Ve.jsxs)(Ie.rU,{to:l,className:_e()("Fa5Yt",!r&&"qE_eB",n),noTheme:!0,"aria-label":e?(0,Ae.Z)("Previous page"):(0,Ae.Z)("Next page"),children:[e&&(0,Ve.jsx)(Pe.jW7,{size:20,className:Eu}),t&&(0,Ve.jsx)(Pe.jfD,{size:20,className:Eu})]})},ku=(0,Ee.memo)(Tu);function Nu(e,t){const s=[];for(let n=e;n<=t;n++)s.push(n);return s}const Su=({pages:e,className:t,currentPage:s})=>{if(e<2)return null;const n=Math.min(e,s),r=(0,M.Z)([].concat(Nu(Math.max(1,n-3),n),Nu(n,Math.min(e,n+3)))).filter((t=>1!==t&&t!==e));return(0,Ve.jsxs)("div",{className:_e()("lt5O_",t),children:[(0,Ve.jsx)(ku,{nextPage:n-1,visible:n>1,left:!0}),(0,Ve.jsx)(yu,{page:1,active:1===n}),r[0]>2&&"...",r.map((e=>(0,Ve.jsx)(yu,{page:e,active:n===e},`page-${e}`))),r[r.length-1]+1<e&&"...",(0,Ve.jsx)(yu,{page:e,active:e===n}),(0,Ve.jsx)(ku,{nextPage:n+1,visible:n<e,right:!0})]})},_u=(0,Ee.memo)(Su),wu="EIMPZ",Au="tMvcj",Ou=({upvotes:e,downvotes:t,userVote:s,permalinkFragment:n,className:r})=>{const a=(0,Te.I0)(),i=(0,Te.v9)((e=>e.general.userId)),o=(0,Ee.useState)(e),l=(0,Re.Z)(o,2),c=l[0],u=l[1],d=(0,Ee.useState)(t),h=(0,Re.Z)(d,2),p=h[0],g=h[1],m=(0,Ee.useState)(s),x=(0,Re.Z)(m,2),f=x[0],v=x[1];(0,Ee.useEffect)((()=>{u(e),g(t),v(s)}),[e,t,s]);const b=(e,t)=>{e.preventDefault(),f===t&&(t=0);let s=f>0?c-1:c,r=f<0?p-1:p;t>0?s++:t<0&&r++,u(s),g(r),v(t),a((0,X._v)(n,t))},j=null!=i,C=Math.round(c-p),Z=Math.max(0,Math.round(c/Math.max(1,c+p)*100)),y=(0,Ae.Z)("{1} upvotes, {2} downvotes ({3}% like it)",Math.round(c),Math.round(p),Z)+(j?"":"\n("+(0,Ae.Z)("You must be signed in to vote")+")");let E=null;return 0===c&&0===p||(E=`hsl(${(Z/100*120).toString(10)}, 100%, 25%)`),(0,Ve.jsx)(Ie.lx,{direction:He.qF.E,text:y,children:(0,Ve.jsxs)("div",{className:_e()("rQI68",r),children:[(0,Ve.jsx)(Ie.Yd,{className:_e()(wu,"IBxjT",f>0&&Au),onClick:e=>b(e,1),disabled:!j,"aria-label":(0,Ae.Z)("Upvote"),children:(0,Ve.jsx)(ns.s$2,{size:16})}),(0,Ve.jsx)("div",{className:"OK2mW",style:{color:E},children:C}),(0,Ve.jsx)(Ie.Yd,{className:_e()(wu,"QSQhw",f<0&&Au),onClick:e=>b(e,-1),disabled:!j,"aria-label":(0,Ae.Z)("Downvote"),children:(0,Ve.jsx)(ns.RiI,{size:16})})]})})},Iu=(0,Ee.memo)(Ou),Ru={fill:"eYKug"},Pu=(0,Ee.memo)((({isFavorite:e,permalinkFragment:t,tooltipDirection:s=He.qF.NW,className:n})=>{const r=(0,Te.I0)(),a=(0,Ee.useCallback)((()=>{r((0,X.fd)(t,!e))}),[t,e,r]);return(0,Ve.jsx)(Ie.hU,{tooltip:e?(0,Ae.Z)("Remove from favorites"):(0,Ae.Z)("Add to favorites"),tooltipDirection:s,onClick:a,className:_e()(Ru.root,e&&Ru.fill,n),children:(0,Ve.jsx)(Pe.iB2,{})})})),Lu=({delimiter:e,flags:t,regex:s,flavor:n,permalinkFragment:r,version:a})=>{const i=(0,Nr.Z)(s,{delimiter:e,flags:t,flavor:n}).tokens;return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Ie.Po,{text:(0,Ae.Z)("Regular Expression"),children:(0,Ve.jsx)("div",{children:(0,Ve.jsx)("span",{className:"tKAH6",children:n})})}),(0,Ve.jsxs)(rr.Z,{className:"fHgtW",children:[(0,Ve.jsx)(Ga,{tokens:i,delimiter:e,flags:t,flavor:n}),(0,Ve.jsx)("div",{className:"LOiuh",children:(0,Ve.jsxs)(Ie.rU,{to:At(r,a),absolute:!0,children:[(0,Ae.Z)("Open regex in editor"),(0,Ve.jsx)(dn.xXr,{className:"L3Eaj"})]})})]})]})},Mu=(0,Ee.memo)(Lu);var Du=s(27484),Uu=s.n(Du),Fu=s(70178),Gu=s.n(Fu),Vu=s(84110),Bu=s.n(Vu);Uu().extend(Bu()),Uu().extend(Gu());const $u=Uu(),Hu=({date:e,author:t,description:s})=>(0,Ve.jsxs)("div",{className:"XL8nr",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Description")}),(0,Ve.jsxs)(rr.Z,{children:[(0,Ve.jsx)(tt,{className:_e()("EcsU0",!s&&"afYTT"),children:s||(0,Ae.Z)("no description available")}),(0,Ve.jsxs)("div",{className:"KPMvl",children:[(0,Ae.Z)("Submitted by")," ",(0,Ve.jsx)("span",{className:"UblEx",children:t||(0,Ae.Z)("anonymous")})," - ",$u.utc(e).fromNow()]})]})]}),qu=(0,Ee.memo)(Hu),zu=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexLibrary.details)),s=(0,Te.v9)((e=>null!=e.general.userId)),n=(0,Ne.UO)().libraryId,r=(0,we.$5)("libraryDetails"),a=(0,Re.Z)(r,3),i=a[0],o=a[1],l=a[2];var c;if((0,we.DB)((()=>{null==t&&l((0,X.xv)(n))}),[l,n,t]),(0,we.kF)((null==t?void 0:t.title)||"Regex Library",R.LIBRARY_META_DESCRIPTION),(0,Ee.useEffect)((()=>()=>e((0,X.bL)(null))),[e]),o)return 404===(null==(c=o.response)?void 0:c.status)?(0,Ve.jsx)(Ie.l_,{to:"/library"}):(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,children:(0,Ae.Z)("There was a problem when trying to fetch the details for this entry. Please try again later.")});if(i||null==t)return(0,Ve.jsx)(Cu,{isVisible:!0});const u=t.regex,d=t.flags,h=t.flavor,p=t.delimiter,g=t.permalinkFragment,m=t.version,x=t.dateModified,f=t.description,v=t.author,b=t.upvotes,j=t.downvotes,C=t.userVote,Z=t.isFavorite;return(0,Ve.jsxs)("div",{className:"Cq6xD",children:[(0,Ve.jsxs)("div",{className:"Lh1uU",children:[!s&&(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Vote"),className:"ULHf7"}),s&&(0,Ve.jsx)(Pu,{isFavorite:!!Z,permalinkFragment:g,tooltipDirection:He.qF.NE,className:"jwNEi"}),(0,Ve.jsx)(Iu,{upvotes:b,downvotes:j,userVote:C,permalinkFragment:g})]}),(0,Ve.jsxs)("div",{className:"INRCS",children:[(0,Ve.jsx)(Mu,{regex:u,flags:d,flavor:h,delimiter:p,permalinkFragment:g,version:m}),(0,Ve.jsx)(qu,{date:x,description:f||void 0,author:v||void 0})]})]})};var Wu=s(26525),Yu=s.n(Wu);function Ku(e){let t=e;return e&&e.length>303&&(t=e.slice(0,300)+"..."),t.split("\n").length>6&&(t=t.split("\n").slice(0,6).join("\n")+"..."),t}const Ju=({title:e,flavor:t,date:s,upvotes:n,downvotes:r,author:a=(0,Ae.Z)("anonymous"),userVote:i,description:o,permalinkFragment:l,isFavorite:c})=>{const u=(0,Te.v9)((e=>null!=e.general.userId)),d=(0,Ne.TH)().search;return(0,Ve.jsxs)("div",{className:"fiYVe",children:[(0,Ve.jsx)(Iu,{upvotes:n,downvotes:r,userVote:i,permalinkFragment:l,className:"BKJlR"}),u&&(0,Ve.jsx)(Pu,{isFavorite:c,permalinkFragment:l,className:"JLiR2"}),(0,Ve.jsx)(Ie.rU,{noTheme:!0,to:`${l}${d}`,className:"wqwfW",children:(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{className:"aqvFS",children:[(0,Ve.jsx)("div",{className:_e()("UYk6r",u&&"P736t"),children:t}),(0,Ve.jsx)("h3",{className:"elKva",children:e})]}),(0,Ve.jsx)("div",{className:_e()("xZqXR",!o&&"LHJqG"),children:Ku(Yu()(o||(0,Ae.Z)("no description available")))}),(0,Ve.jsxs)("div",{className:"RryPT",children:[(0,Ae.Z)("Submitted by")," ",(0,Ve.jsx)("span",{className:"iNeUZ",children:a})," - ",(0,Ve.jsx)("span",{children:$u.utc(s).fromNow()})]})]})})]})},Xu=(0,Ee.memo)(Ju),Qu="m7Th9",ed=({libraryData:e,fetchError:t,didSearch:s})=>t?(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,children:(0,Ae.Z)("There was a problem trying to fetch the library data. Please try again later.")}):0===e.length?(0,Ve.jsx)(Ie.qX,{noMargin:!0,children:s?(0,Ae.Z)("Your search did not match anything"):(0,Ae.Z)("There does not seem to be anything here")}):e.map(((e,t)=>(0,Ve.jsx)(Xu,{title:e.title,description:e.description||void 0,flavor:e.flavor,date:e.dateModified,upvotes:e.upvotes,downvotes:e.downvotes,permalinkFragment:e.permalinkFragment,author:e.author||void 0,userVote:e.userVote||void 0,isFavorite:!!e.isFavorite},`library-entry-${t}`))),td=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.regexLibrary.libraryData)),s=(0,Te.v9)((e=>e.regexLibrary.pages)),n=(0,Te.v9)((e=>{var t;return null==(t=e.regexLibrary.details)?void 0:t.title})),r=(0,ke.lr)(),a=(0,Re.Z)(r,2),i=a[0],o=a[1],l=i.getAll("filterFlavors"),c=i.get("orderBy")||nn().MOST_RECENT,u=i.get("search")||"",d=i.get("page")||1,h=(0,we.$5)("regexLibrary"),p=(0,Re.Z)(h,3),g=p[0],m=p[1],x=p[2];(0,we.vI)((()=>{x((0,X.v0)(d,u,c,l))}),[x,l.join(""),c,u,d]),(0,we.DB)((()=>{0===t.length&&x((0,X.v0)(d,u,c,l))}),[x,l.join(""),c,u,d,t.length]);const f=(0,we.Sf)(o,500,"cancel"),v=(0,Ee.useCallback)(((e="")=>{let t;t=0===u.length&&0!==e.length?nn().RELEVANCE:0===e.length&&c===nn().RELEVANCE?nn().MOST_RECENT:c,f({filterFlavors:l,orderBy:t,search:e})}),[f,l,c,u.length]);return(0,Ee.useEffect)((()=>()=>e((0,X.tP)([]))),[e]),(0,we.kF)("Regex Library",R.LIBRARY_META_DESCRIPTION),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("div",{className:"Mn1lS",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Library entries"),className:Qu}),(0,Ve.jsxs)("label",{className:"SS2G3",children:[(0,Ve.jsx)("span",{className:Qu,children:(0,Ae.Z)("Search library")}),(0,Ve.jsx)(Ie.oi,{defaultValue:u||"",onChange:v,placeholder:(0,Ae.Z)("Search library"),focusOnMount:!0,clearButton:!0})]}),(0,Ve.jsx)(rr.Z,{className:"kyeKv",children:(0,Ve.jsx)(Zu,{isLoading:g,children:(0,Ve.jsx)(ed,{libraryData:t,fetchError:!!m,didSearch:""!==u||l.length>0})})}),(null==t?void 0:t.length)>0&&!m&&(0,Ve.jsx)(_u,{pages:s,currentPage:parseInt(d,10),className:"TkFqs"})]}),(0,Ve.jsx)(Ne.Z5,{children:(0,Ve.jsx)(Ne.AW,{path:":foo/:bar/*",element:(0,Ve.jsx)(Ie.l_,{to:"/library"})})}),(0,Ve.jsx)(vr,{title:n||(0,Ae.Z)("Library Entry"),preserveLocation:!0,path:":libraryId/*",children:(0,Ve.jsx)(zu,{})})]})};var sd=s(61724);const nd=({title:e,children:t})=>(0,Ve.jsxs)("div",{className:"qaldp",children:[(0,Ve.jsx)(Ie.__,{text:e}),(0,Ve.jsx)(rr.Z,{children:t})]}),rd=(0,Ee.memo)(nd),ad="UClnn",id="Ln7r5",od=[50,100,200,400,600,800,1e3,1500,2e3,3e3,4e3,5e3,7500,1e4,15e3,2e4,3e4,4e4,5e4,75e3,1e5],ld={exit:"Cr18H",exitActive:"YmXqP"},cd=["\\n","\\r\\n","\\r"],ud=(0,lt.Z)(ct.JL),dd=()=>{const e=(0,Ee.useState)(!1),t=(0,Re.Z)(e,2),s=t[0],n=t[1],r=(0,Ee.useRef)(),a=(0,Te.I0)(),i=(0,Te.v9)((e=>e.settings)),o=e=>t=>((e,t)=>{let s;null==e.target.checked?(s=e.target.value,""===s||isNaN(s)||(s=parseInt(s,10))):s=e.target.checked;const o=Object.assign(Object.assign({},i),{},{[t]:s});n(!0),a((0,X.I2)(o)),a((0,X.Ot)()),i.language!==o.language&&a((0,X.BF)(o.language)),clearTimeout(r.current),r.current=setTimeout((()=>n(!1)),2e3)})(t,e);return(0,Ee.useEffect)((()=>()=>{clearTimeout(r.current)}),[]),(0,Ve.jsxs)("div",{className:"EGx_u",children:[(0,Ve.jsx)(Ie.uT,{className:"mCG29",classNames:ld,timeout:ud,appear:!1,enter:!1,in:s,children:(0,Ve.jsxs)("div",{className:"aQbMN",children:[(0,Ae.Z)("Saving settings..."),(0,Ve.jsx)(Ie.$j,{size:He.J7.TC,className:"Y06gr"})]})}),(0,Ve.jsxs)(rd,{title:(0,Ae.Z)("General"),children:[(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ae.Z)("Language"),(0,Ve.jsx)("select",{defaultValue:i.language,onChange:o("language"),children:Object.keys(sd).sort().map((e=>(0,Ve.jsx)("option",{value:e,children:sd[e].text},`language-${e}`)))}),(0,Ve.jsxs)(Ie.qX,{className:id,noMargin:!0,children:[(0,Ae.Z)("You can help with translations by visiting the following url:")," ",(0,Ve.jsx)(Ie.rU,{to:"https://r101.cf",absolute:!0,children:"https://r101.cf"})]})]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.alwaysCollapseLeftSidebar,onChange:o("alwaysCollapseLeftSidebar")}),(0,Ae.Z)("Always collapse left sidebar")]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.alwaysCollapseRightSidebar,onChange:o("alwaysCollapseRightSidebar")}),(0,Ae.Z)("Always collapse right sidebar")]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.showWarningUnsavedProgress,onChange:o("showWarningUnsavedProgress")}),(0,Ae.Z)("Show warning popup when trying to leave site with unsaved data")]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.defaultTabBehavior,onChange:o("defaultTabBehavior")}),(0,Ae.Z)("Use the default behavior for the tab key"),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("The tab key will by default switch to the next field in the tabbing order. If this option is disabled, input areas for regex, substitution and test string will instead consume the tab key.")})]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.disableKeyboardShortcuts,onChange:o("disableKeyboardShortcuts")}),(0,Ae.Z)("Disable all keyboard shortcuts")]})]}),(0,Ve.jsx)(rd,{title:(0,Ae.Z)("Theme"),children:(0,Ve.jsxs)(ai,{children:[(0,Ae.Z)("Style"),(0,Ve.jsxs)("select",{defaultValue:i.theme,onChange:o("theme"),children:[(0,Ve.jsx)("option",{value:C.B7,children:(0,Ae.Z)("Automatic")}),(0,Ve.jsx)("option",{value:C.rp,children:(0,Ae.Z)("Light")}),(0,Ve.jsx)("option",{value:C.Py,children:(0,Ae.Z)("Dark")})]})]})}),(0,Ve.jsxs)(rd,{title:(0,Ae.Z)("Editor"),children:[(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ae.Z)("Max Execution Time"),(0,Ve.jsx)("select",{defaultValue:i.maxExecutionTime,onChange:o("maxExecutionTime"),children:od.map((e=>(0,Ve.jsx)("option",{value:e,children:e>1e3?e/1e3+"s":`${e}ms`},`max-time-${e}`)))}),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("This setting affects how long the matcher will try to match your regex before it decides to give up")}),i.maxExecutionTime<1500&&(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,type:He.gr.u_,children:(0,Ae.Z)("Values below {1} are not recommended. Use at your own discretion","1.5s")})]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ae.Z)("Default flavor"),(0,Ve.jsx)("select",{defaultValue:i.defaultFlavor,onChange:o("defaultFlavor"),children:m.all.map((e=>(0,Ve.jsx)("option",{value:e,children:e},`flavor-${e}`)))}),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("Select the flavor you want to use when the site loads. Note: a saved entry's flavor will override this")})]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ae.Z)("Default code generator language"),(0,Ve.jsxs)("select",{defaultValue:i.defaultCodeGenLanguage,onChange:o("defaultCodeGenLanguage"),children:[(0,Ve.jsx)("option",{value:"",children:(0,Ae.Z)("Automatic")},"code-gen-language-auto"),Ws.vI.map((e=>(0,Ve.jsx)("option",{value:e.value,children:e.string},`code-gen-language-${e.value}`)))]}),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("If left to Automatic, the code generator will mirror the currently selected flavor in the editor")})]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.colorizeSyntax,onChange:o("colorizeSyntax")}),(0,Ae.Z)("Highlight Syntax"),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("Enable or disable the syntax highlighting of your regular expression in the editor")})]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.wrapLines,onChange:o("wrapLines")}),(0,Ae.Z)("Wrap Long Lines")]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.regexAreaLineNumbers,onChange:o("regexAreaLineNumbers")}),(0,Ae.Z)("Show Line Numbers in Regex Editor")]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.testAreaLineNumbers,onChange:o("testAreaLineNumbers")}),(0,Ae.Z)("Show Line Numbers in Test String Editor and Substitution Result")]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.editorTooltips,onChange:o("editorTooltips")}),(0,Ae.Z)("Show tooltips"),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("Show informative and helpful tooltips when hovering tokens in the regex editor")})]}),(0,Ve.jsxs)(ai,{children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.displayWhitespace,onChange:o("displayWhitespace")}),(0,Ae.Z)("Visualize whitespace and other special characters")]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.calculateRegexSteps,onChange:o("calculateRegexSteps")}),(0,Ae.Z)("Show how many steps a regular expression takes to evaluate"),(0,Ve.jsxs)(Ie.qX,{className:id,noMargin:!0,children:[(0,Ae.Z)("If you are working on very large and complex expressions, turning this option off will yield improved performance.")," ",(0,Ae.Z)("Only works in supported languages {1}.","(PCRE, PHP)")]})]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ve.jsx)("input",{type:"checkbox",checked:i.nonParticipatingGroups,onChange:o("nonParticipatingGroups")}),(0,Ae.Z)("Include non-participating groups in match result"),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,children:(0,Ae.Z)("This setting determines whether groups in your regex, which did not match anything in the subject string, should be included in the results or not")})]}),(0,Ve.jsxs)(ai,{className:ad,children:[(0,Ae.Z)("Line Separator"),(0,Ve.jsxs)("select",{defaultValue:i.lineSeparator,onChange:o("lineSeparator"),children:[(0,Ve.jsx)("option",{value:"",children:(0,Ae.Z)("Automatic")},"line-sep-automatic"),cd.map((e=>(0,Ve.jsx)("option",{value:e,children:e},`line-sep-${e}`)))]}),(0,Ve.jsxs)(Ie.qX,{className:id,noMargin:!0,children:[(0,Ve.jsx)(Ie.vV,{tag:"div",text:"Pick which line separator to use in the editor. This only affects the parsing of the text when inserted into the editor, any changes within the editor till always use {1}.",ph1:Or("\\n")}),(0,Ve.jsx)(Ie.vV,{tag:"div",text:"The default setting of {1} will split lines on any of {2}, {3} or {4}.",ph1:Or((0,Ae.Z)("Automatic")),ph2:Or("\\n"),ph3:Or("\\r"),ph4:Or("\\r\\n")})]}),(0,Ve.jsx)(Ie.qX,{className:id,noMargin:!0,type:He.gr.u_,children:(0,Ae.Z)("Experimental feature; may be removed in the future.")})]})]})]})},hd=()=>((0,we.kF)("Settings",R.SETTINGS_META_DESCRIPTION),(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:"/",element:(0,Ve.jsx)(dd,{})}),(0,Ve.jsx)(Ne.AW,{path:"*",element:(0,Ve.jsx)(Ie.l_,{to:"/settings"})})]})),pd=({title:e,permalinkFragment:t,version:s,flavor:n})=>{let r;return r=null!=e&&e.length>0?(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("strong",{className:"fQJFj",children:e})," (",t,"/",s,")"]}):`${t}/${s}`,(0,Ve.jsxs)("div",{className:"ultvh",children:[(0,Ve.jsx)(Ie.rU,{to:At(t,s),absolute:!0,children:r}),(0,Ve.jsx)("div",{className:"Qz9r3",children:n})]})},gd=(0,Ee.memo)(pd),md=({onModalClose:e,isOpen:t,title:s="",libraryTitle:n,tags:r=[],historyItemIndex:a,permalinkFragment:o})=>{const l=(0,Te.I0)(),c=(0,Ee.useState)(!1),u=(0,Re.Z)(c,2),d=u[0],h=u[1],p=(0,Ee.useState)(s),g=(0,Re.Z)(p,2),m=g[0],x=g[1],f=(0,Ee.useState)(r),v=(0,Re.Z)(f,2),b=v[0],j=v[1],C=(0,Ee.useState)({isLoading:!1,hasError:!1}),Z=(0,Re.Z)(C,2),y=Z[0],E=Z[1],T=(0,Ee.useCallback)((e=>{j(e),h(!0)}),[]),k=(0,Ee.useCallback)((e=>{x(e),h(!0)}),[]);return(0,Ee.useEffect)((()=>{t&&(x(s),j(r))}),[t,r,s]),(0,Ve.jsxs)(Ye.Z,{onModalClose:e,isOpen:t,isLoading:y.isLoading,children:[(0,Ve.jsx)(Ke.Z,{children:(0,Ae.Z)("Edit account entry")}),(0,Ve.jsx)(Je.Z,{children:(0,Ve.jsx)(Gt,{title:m,libraryTitle:n,tags:b,onTagsChange:T,onTitleChange:k,disabled:y.isLoading})}),(0,Ve.jsxs)(Xe.Z,{children:[y.isLoading&&(0,Ve.jsx)(Ie.$j,{className:"gTWw0",size:He.J7.TC}),y.hasError&&(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Unable to save changes, please try again"),direction:He.qF.N,children:(0,Ve.jsx)("div",{className:"wzCa1",role:"alert",children:(0,Ve.jsx)(Pe.j6O,{size:20})})}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Save"),onClick:async()=>{E({isLoading:!0,hasError:!1});try{await Promise.all([l((0,X.ML)(b,a,o)),l((0,X._1)(m,a,o)),new Promise((e=>setTimeout(e,500)))]),E({isLoading:!1,hasError:!1}),e()}catch(e){i.Z.error("Unable to save account details",e),E({isLoading:!1,hasError:!0})}},className:"cTD4v",disabled:y.isLoading||!d}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Close"),onClick:e,type:He.V5.n1,disabled:y.isLoading})]})]})},xd="YTN_p",fd="QYMY8",vd=({refreshData:e,permalinkFragment:t,version:s,historyItemIndex:n,isOwner:r,dateAdded:a,isFavorite:i,isPrivate:o,isLocked:l,isLibraryEntry:c,regexDeleteCode:u,versionDeleteCode:d,title:h,libraryTitle:p,tags:g})=>{const m=(0,Te.I0)(),x=(0,Te.v9)((e=>e.general.permalinkFragment)),f=(0,Te.v9)((e=>e.general.version)),v=(0,Ee.useState)(!1),b=(0,Re.Z)(v,2),j=b[0],C=b[1],Z=(0,Ee.useState)(!1),y=(0,Re.Z)(Z,2),E=y[0],T=y[1],k=(0,Ee.useCallback)((async()=>{await m(X.Ez(t,n,!i)),null!=x&&x===t&&m(X.jb(!i))}),[m,t,i,n,x]),N=(0,Ee.useCallback)((async()=>{await m(X.JO(t,n,!o))}),[m,t,n,o]),S=(0,Ee.useCallback)((async()=>{await m(X.fU(t,n,!l))}),[m,t,n,l]),_=(0,Ee.useCallback)((()=>C(!0)),[]),w=(0,Ee.useCallback)((()=>C(!1)),[]),A=(0,Ee.useCallback)((()=>T(!0)),[]),O=(0,Ee.useCallback)((()=>T(!1)),[]),I=(0,Ee.useCallback)((async s=>{T(!1),x!==t||s!==Fs&&f!==s||m(X.Bq(null,null,null)),e()}),[m,t,f,e,x]),R=(0,Ee.useMemo)((()=>{const e={deleteCode:u,versions:[]};return null!=d&&e.versions.push({version:s,deleteCode:d}),e}),[s,u,d]);return(0,Ve.jsxs)("div",{className:"W2Ezh",children:[(0,Ve.jsxs)("div",{className:"J1eYs",children:[(0,Ve.jsx)(Ie.lx,{text:i?(0,Ae.Z)("Remove from favorites"):(0,Ae.Z)("Add to favorites"),direction:He.qF.NE,children:(0,Ve.jsx)(Ie.Yd,{onClick:k,children:(0,Ve.jsx)(Pe.iB2,{className:_e()(xd,"wEJsJ",i&&fd),size:16})})}),(0,Ve.jsx)(Ie.lx,{text:(0,Ae.Z)("Edit title and tags"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:_,children:(0,Ve.jsx)(Pe.cpK,{className:_e()(xd,"xO8vv"),size:16})})}),r&&!c&&(0,Ve.jsx)(Ie.lx,{text:o?(0,Ae.Z)("Make permalink public"):(0,Ae.Z)("Make permalink private"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:N,children:(0,Ve.jsx)(Pe.NuV,{className:_e()(xd,o&&fd),size:16})})}),r&&!c&&(0,Ve.jsx)(Ie.lx,{text:l?(0,Ae.Z)("Allow others to edit permalink"):(0,Ae.Z)("Disallow others to edit permalink"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:S,children:(0,Ve.jsx)(Pe.Dx2,{className:_e()(xd,"lEtvT",l&&fd),size:16})})}),null!=R&&(0,Ve.jsx)(Ie.lx,{text:c?(0,Ae.Z)("Delete library entry"):(0,Ae.Z)("Delete permalink"),direction:He.qF.N,children:(0,Ve.jsx)(Ie.Yd,{onClick:A,children:(0,Ve.jsx)(Pe.M$4,{className:_e()(xd,"nbKtJ"),size:16})})})]}),(0,Ve.jsx)("div",{className:"ULefS",children:$u(a).format("YYYY-MM-DD HH:mm")}),(0,Ve.jsx)(md,{isOpen:j,onModalClose:w,title:h,libraryTitle:p,tags:g,historyItemIndex:n,permalinkFragment:t}),null!=R&&(0,Ve.jsx)(Gs,{isOpen:E,onModalClose:O,onConfirmClick:I,deleteCodes:R,permalinkFragment:t})]})},bd="ZZ5Pq",jd=({item:e,historyItemIndex:t,refreshData:s})=>{const n=e.permalinkFragment,r=e.version,a=e.title,i=e.libraryTitle,o=e.flavor,l=e.tags,c=e.regex,u=e.delimiter,d=e.flags;return(0,Ve.jsxs)("div",{className:"yHCCV",children:[(0,Ve.jsx)(vd,Object.assign({refreshData:s,historyItemIndex:t},e)),(0,Ve.jsx)(gd,{permalinkFragment:n,version:r,title:a||i,flavor:o}),(0,Ve.jsxs)("div",{className:"o699z",children:[(0,Ve.jsx)("div",{className:bd,children:u}),(0,Ve.jsx)("div",{className:"cp1os",children:c}),(0,Ve.jsx)("div",{className:bd,children:u}),(0,Ve.jsx)("div",{className:"J2B0P",children:d})]}),(0,Ve.jsx)(Ut,{className:"fyIbf",tags:l,size:He.J7.HC,ignoreEmpty:!0})]})},Cd=(0,Ee.memo)(jd),Zd=({returnTo:e})=>{const t=(0,Ee.useState)(!1),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(0,Ee.useCallback)((()=>r(!1)),[]);return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)(Ie.qX,{className:"WdG4k",type:He.gr.u_,children:[(0,Ve.jsx)(Ie.vV,{tag:"strong",text:"Please {1} by clicking the link or the button in the left sidebar.",ph1:(0,Ve.jsx)(Ie.Yd,{className:"dQeBH",onClick:()=>r(!0),children:(0,Ae.Z)("sign in")})}),(0,Ve.jsxs)("p",{children:[(0,Ae.Z)("You do not have to create an account, just select an existing account from one of the supported service providers.")," ",(0,Ae.Z)("Only the bare minimum information is retrieved and saved in order to identify your account.")]})]}),(0,Ve.jsx)(fn,{onModalClose:a,isOpen:n,returnTo:e})]})},yd="bl5fq",Ed=({scope:e,page:t,emptyMessage:s})=>{const n=(0,ke.lr)(),r=(0,Re.Z)(n,1)[0].getAll("filterTags"),a=r.join(""),i=(0,Te.v9)((e=>e.account.staleData)),o=(0,Te.v9)((e=>e.account.data)),l=(0,we.$5)("getUserData"),c=(0,Re.Z)(l,3),u=c[0],d=c[1],h=c[2],p=(0,Ee.useCallback)((()=>h((0,X.s1)(e,t,r))),[h,a,t,e]);return(0,we.DB)((()=>{i&&h((0,X.s1)(e,t,r))}),[h,i,a,t,e]),(0,we.vI)((()=>{h((0,X.s1)(e,t,r))}),[h,a,t,e]),d?(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,children:(0,Ae.Z)("There was an error while fetching your account data. Please try again later.")}):u||0!==o.length?(0,Ve.jsx)(Zu,{isLoading:u,children:o.map(((t,s)=>(0,Ve.jsx)(Cd,{item:t,filterTags:r,historyItemIndex:s,refreshData:p},`${e}-user-data-item-${s}`)))}):(0,Ve.jsx)(Ie.qX,{noMargin:!0,children:r.length>0?(0,Ae.Z)("Your tag filtration returned no results."):s})},Td=({title:e,scope:t,emptyMessage:s})=>{const n=(0,ke.lr)(),r=(0,Re.Z)(n,1)[0],a=parseInt(r.get("page"),10)||1,i=(0,Te.v9)((e=>e.account.pages)),o=(0,Te.v9)((e=>e.general.userId)),l=null!=o?e:(0,Ae.Z)("Account Page");return(0,we.kF)(l,R.ACCOUNT_META_DESCRIPTION),(0,Ve.jsxs)("div",{className:"Pw4UW",children:[(0,Ve.jsx)(Ie.__,{text:l,className:"rtGnE"}),(0,Ve.jsx)(rr.Z,{className:"mdzfm",children:null==o?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Zd,{}),(0,Ve.jsxs)("p",{className:yd,children:[(0,Ae.Z)("By signing in, all your expressions will be automatically saved to your account, where you have ability to organize and manage them.")," ",(0,Ae.Z)("You can add titles and tags to organize your entries, as well as favorite any expressions.")]}),(0,Ve.jsxs)("p",{className:yd,children:[(0,Ae.Z)("You also get a valuable feature set with regards to your data privacy, where you are given the ability to restrict who can view and edit the information you save.")," ",(0,Ae.Z)("If you want to permanently remove the saved data, you can easily do so from here. The delete link will be automatically tied to your account, so you never have to worry about losing it.")]}),(0,Ve.jsx)(Ie.vV,{tag:"p",text:"By signing in you also get the ability to enhance your skills and participate in the {1} along with thousands of other regex connoisseurs!",ph1:(0,Ve.jsx)(Ie.rU,{to:"/quiz",children:(0,Ae.Z)("regex quiz")})})]}):(0,Ve.jsx)(Ed,{scope:t,emptyMessage:s,page:a})}),(0,Ve.jsx)(_u,{className:"StUEG",currentPage:a,pages:i})]})},kd=()=>{const e=(0,Te.I0)();return(0,Ee.useEffect)((()=>()=>e((0,X.xz)())),[e]),(0,Ve.jsx)("div",{className:"cX9NU",children:(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:pn().MINE,element:(0,Ve.jsx)(Td,{title:(0,Ae.Z)("My Regular Expressions"),scope:pn().MINE,emptyMessage:(0,Ae.Z)("You have not created anything yourself yet.")})}),(0,Ve.jsx)(Ne.AW,{path:pn().FAVORITES,element:(0,Ve.jsx)(Td,{title:(0,Ae.Z)("My Favorites"),scope:pn().FAVORITES,emptyMessage:(0,Ae.Z)("You have not added anything to your favorites yet.")})}),(0,Ve.jsx)(Ne.AW,{path:pn().LIBRARY,element:(0,Ve.jsx)(Td,{title:(0,Ae.Z)("My Library Entries"),scope:pn().LIBRARY,emptyMessage:(0,Ae.Z)("You have not submitted anything to the library yet.")})}),(0,Ve.jsx)(Ne.AW,{path:"*",element:(0,Ve.jsx)(Ie.l_,{to:`/account/${pn().MINE}`})})]})})};var Nd=s(68692);const Sd=({title:e,children:t})=>(0,Ve.jsxs)("div",{className:"bSN9D",children:[(0,Ve.jsx)(Ie.__,{text:e,className:"WnWGc"}),t]}),_d=se()?(0,Ee.lazy)((()=>Promise.all([s.e(87),s.e(781)]).then(s.bind(s,10947)))):()=>{},wd=({regex:e,flags:t,delimiter:s,substitution:n,isSubstitutionTask:r,shortestSolution:a,className:i,taskIdx:o,taskNumber:l,hasSolved:c})=>{const u=(""+e+t+s+s+n).length,d=r?"s"+s+e+s+n+s+t:s+e+s+t;return(0,Ve.jsxs)("div",{className:i,children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Task Statistics")}),(0,Ve.jsxs)(rr.Z,{children:[(0,Ve.jsx)(Ie.vV,{text:"Your shortest solution thus far is {1} characters long. The overall shortest solution is {2} characters long.",ph1:(0,Ve.jsx)("strong",{children:u}),ph2:(0,Ve.jsx)("strong",{children:a})}),(0,Ve.jsx)("div",{className:"uoWfq",children:d}),!c&&(0,Ve.jsx)(Ie.qX,{type:He.gr.pn,className:"oJnCW",children:(0,Ae.Z)("Your previous best entry has been invalidated and this task is no longer marked as completed for you.")}),c&&(0,Ve.jsx)(Ie.I2,{errorClassName:"xEiQv",fallback:(0,Ve.jsx)(Ie.$j,{size:He.J7.TC,className:"Z2tPY"}),children:(0,Ve.jsx)(_d,{taskIdx:o,taskNumber:l,bestSolution:u})})]})]})},Ad=parseFloat(Ue.D6),Od=({regex:e,flags:t,delimiter:s,flavor:n})=>{const r=(0,Te.v9)((e=>e.rightSidebar.activeSubsection));switch(r){case c:return(0,Ve.jsx)(Zi,{title:(0,Ae.Z)("Explanation"),children:(0,Ve.jsx)(Wa,{regex:e,flags:t,delimiter:s,flavor:n})});case d:return(0,Ve.jsx)(Zi,{title:(0,Ae.Z)("Quick Reference"),id:"quickrefParent",children:(0,Ve.jsx)(gi,{})});default:throw new Error(`Unknown subsection '${r}'`)}},Id=({regex:e,flags:t,delimiter:s,flavor:n})=>{const r=(0,we.Sj)(Ad);if((0,Te.v9)((e=>e.settings.alwaysCollapseRightSidebar))||r.width<Ad){const r=[{tooltip:(0,Ae.Z)("View Explanation"),icon:Ct.UCm,key:c},{tooltip:(0,Ae.Z)("View Regex Quick Reference"),icon:Pe.CA9,key:d}];return(0,Ve.jsxs)(ji,{children:[(0,Ve.jsx)(yi,{subsections:r}),(0,Ve.jsx)(Od,{regex:e,flags:t,delimiter:s,flavor:n})]})}return(0,Ve.jsxs)(Er,{children:[(0,Ve.jsx)(mi,{title:(0,Ae.Z)("Explanation"),subsection:c,resizable:!0,children:(0,Ve.jsx)(Wa,{regex:e,flags:t,delimiter:s,flavor:n})}),(0,Ve.jsx)(mi,{title:(0,Ae.Z)("Quick Reference"),subsection:d,id:"quickrefParent",children:(0,Ve.jsx)(gi,{})})]})},Rd=(Qt().shape({taskNumber:Qt().number.isRequired,title:Qt().string.isRequired,description:Qt().string.isRequired,taskType:Qt().string.isRequired,errorMessage:Qt().string,successMessage:Qt().string,totalTests:Qt().number,failingTestNumber:Qt().number,hasSolved:Qt().bool.isRequired,canSolve:Qt().bool.isRequired,shortestSolution:Qt().number}),Qt().shape({regex:Qt().string.isRequired,flags:Qt().string.isRequired,delimiter:Qt().string.isRequired,substitution:Qt().string.isRequired}),Qt().shape({regex:Qt().string,flags:Qt().string,delimiter:Qt().string,substitution:Qt().string}),({entry:e,className:t})=>{const s=e.regex,n=e.flags,r=e.delimiter,a=e.substitution;if(""===s||null==s)return null;const i=(""+s+n+r+r+a).length;return(0,Ve.jsx)("div",{className:t,children:(0,Ae.Z)("Current score: {1}",i)})}),Pd=(0,Ee.memo)(Rd),Ld="H513J",Md="ZVVpX",Dd="vMhEV",Ud=({task:e,error:t,loading:s,totalTasks:n,taskIdx:r})=>t?(0,Ve.jsxs)(Ie.qX,{type:He.gr.pn,children:[(0,Ae.Z)("There was an error querying the server, please try again later:")," ",t.message]}):s?(0,Ve.jsx)(Ie.$j,{size:He.J7.HC,className:"Npsea"}):e.errorMessage?(0,Ve.jsx)(tt,{className:"c7Tes",children:`**Test ${e.failingTestNumber}/${e.totalTests}:** ${e.errorMessage}`}):e.successMessage?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(tt,{className:Md,children:e.successMessage}),r+1<n&&(0,Ve.jsxs)(Ie.rU,{className:"ityDl",to:`/quiz/${r+1}`,children:[(0,Ae.Z)("Next question")," \u2192"]})]}):(0,Ae.Z)("Enter your regex and hit submit to see the result."),Fd=["latest","best"],Gd=({taskIdx:e})=>{const t=(0,Ee.useState)({error:!1,captureGroupCount:0,subpatterns:[]}),s=(0,Re.Z)(t,2),n=s[0],r=s[1],a=(0,Ee.useState)(!1),i=(0,Re.Z)(a,2),o=i[0],l=i[1],c=(0,Ee.useState)({error:!1}),u=(0,Re.Z)(c,2),d=u[0],h=u[1],p=(0,Te.I0)(),g=(0,Te.v9)((e=>e.quiz.allTasks.length)),m=(0,Te.v9)((t=>t.quiz.allTasks[e-1]))||{latest:{},best:{},task:null},f=m.latest,v=m.best,b=(0,E.Z)(m,Fd),j=f.regex,C=f.flags,Z=f.delimiter,y=f.substitution,T=v.regex,k=v.flags,N=v.delimiter,S=v.substitution;(0,we.kF)(`Task ${e} - ${b.title}`,R.QUIZ_META_DESCRIPTION);const _=(0,we.Sf)(((e,t)=>p((0,X.$9)(e,{regex:t}))),R.UPDATE_RESULT_DELAY),w=(0,we.Sf)(((e,t)=>p((0,X.$9)(e,{substitution:t}))),R.UPDATE_RESULT_DELAY),A=(0,Ee.useCallback)((t=>{const s=(0,Nd.e)(t,x().PCRE2);p((0,X.$9)(e-1,{flags:s}))}),[p,e]),O=(0,Ee.useCallback)((t=>p((0,X.$9)(e-1,{delimiter:t}))),[p,e]),I=(0,Ee.useCallback)(((t,s,n,a,i)=>{const o=i.captureGroupCount,l=i.subpatterns;r({error:s,captureGroupCount:o,subpatterns:l}),_(e-1,t)}),[_,e]),P=(0,Ee.useCallback)(((t,s)=>{h({error:s}),w(e-1,t)}),[w,e]),L=(0,Ee.useCallback)((e=>{const t=e.delimiter,s=e.flags,n=e.isSub,r=e.substText;O(t),A(s),n&&Oe.ZP.emit(Oe.l2,r)}),[A,O]),M=(0,we.$5)("submitQuizSolution"),D=(0,Re.Z)(M,3),U=D[0],F=D[1],G=D[2];(0,Ee.useEffect)((()=>{o&&(l(!1),G((0,X.NS)(b.taskNumber,f)))}),[o,G,f,b.taskNumber]);const V=()=>{U||0===j.length||d.error||n.error||(_.flush(),w.flush(),l(!0))};let B=`${(0,Ae.Z)("Task {1}",e)}: ${b.title}`;b.isOptional&&(B+=` (${(0,Ae.Z)("optional")})`);const $="SUB"===b.taskType;return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(Id,{regex:j,flavor:x().PCRE2,flags:C,delimiter:Z}),(0,Ve.jsxs)(Sd,{title:B,children:[(0,Ve.jsx)(rr.Z,{className:"k3Ut5",children:(0,Ve.jsx)(tt,{className:Md,children:b.description})}),(0,Ve.jsxs)("div",{className:"tYBLb",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Regular Expression")}),(0,Ve.jsx)(el,{onRegexChange:I,onRegexPaste:L,onFlagsChange:A,onDelimiterChange:O,onEnterClick:V,delimiter:Z,regex:j,flags:C,flavor:x().PCRE2})]}),$&&(0,Ve.jsxs)("div",{className:"qdCR1",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Substitution")}),(0,Ve.jsx)(lu,{flavor:x().PCRE2,captureGroupCount:n.captureGroupCount,subpatterns:n.subpatterns,defaultValue:y,onEnterClick:V,onChange:P,className:"ICHlo"})]}),(0,Ve.jsxs)("div",{className:"O_glM",children:[(0,Ve.jsx)(Pd,{className:"asiz9",entry:f}),(0,Ve.jsx)(Ie.zx,{text:(0,Ae.Z)("Submit"),onClick:V,disabled:U||0===j.length||!!d.error||!!n.error,className:"nfzMY"})]}),(0,Ve.jsxs)("div",{className:"chvbW",children:[(0,Ve.jsx)(Ie.__,{text:(0,Ae.Z)("Result")}),(0,Ve.jsx)(rr.Z,{children:(0,Ve.jsx)(Ud,{task:b,error:F,loading:U,totalTasks:g,taskIdx:e})})]}),null!=T&&(0,Ve.jsx)("div",{className:Ld,children:(0,Ve.jsx)(wd,{regex:T,flags:k,delimiter:N,substitution:S,isSubstitutionTask:$,shortestSolution:b.shortestSolution,className:Ld,taskNumber:b.taskNumber,hasSolved:b.hasSolved,taskIdx:e})})]})]})},Vd=()=>{const e=(0,Ne.UO)().taskIdx,t=(0,Te.v9)((t=>t.quiz.allTasks[e-1]));return null!=t&&t.canSolve?(0,Ve.jsx)(Gd,{taskIdx:parseInt(e,10)},`quiz-task-${e}`):(0,Ve.jsx)(Ie.l_,{to:"/quiz"})},Bd=["DrRegex","Andreas Zetterlund","Timvde","Zarthus","Davidebyzero"],$d=({notSignedIn:e})=>(0,Ve.jsx)(Sd,{title:(0,Ae.Z)("Regex Quiz"),children:(0,Ve.jsxs)(rr.Z,{className:"d9Wg4",children:[e&&(0,Ve.jsx)(Zd,{returnTo:"/quiz"}),(0,Ve.jsx)("strong",{children:(0,Ae.Z)("Welcome to the regex101 regex quiz!")}),(0,Ve.jsxs)("p",{className:Dd,children:[(0,Ae.Z)("This is an interactive learning tool you can use to improve your understanding of regular expressions, and their different applications.")," ",(0,Ae.Z)("The quiz is divided into a number of different tasks, which each have a short description of the problem for you to solve.")," ",(0,Ae.Z)("Once you have solved each task, you will be presented with statistics over how well others have done in that task, and the next task will be made available to you.")," ",(0,Ae.Z)("After you have finished a task you can continue improving upon your solution, making it shorter, and climb higher into the leader boards.")]}),(0,Ve.jsxs)("p",{className:Dd,children:[(0,Ae.Z)("Do note that these tasks do not necessarily promote best practices in real life scenarios, but rather aim to teach you the fundamentals of writing powerful regular expressions.")," ",(0,Ae.Z)("Parsing HTML with regex is seldom a good idea, despite there being a task in the quiz to do just that.")," ",(0,Ae.Z)("The quiz is evaluated using the PCRE2 engine, which is also available in the main editor if you would like to do some testing.")," ",(0,Ae.Z)("The tasks will get progressively harder, and you will receive less and less hand-holding the further you progress.")]}),(0,Ve.jsxs)("p",{className:Dd,children:[(0,Ae.Z)("If you encounter any issues, quirky behavior or bugs, please open up an issue on github with all the relevant details"),":"," ",(0,Ve.jsx)(Ie.rU,{to:"https://github.com/firasdib/Regex101/issues",absolute:!0,children:"https://github.com/firasdib/Regex101/issues"})]}),(0,Ve.jsxs)("div",{className:Dd,children:[(0,Ae.Z)("A special thanks goes out to the following individuals for their hard work and contributions to the quiz:"),(0,Ve.jsx)("ul",{className:"Qx04x",children:Bd.map((e=>(0,Ve.jsx)("li",{children:e},`credit-quiz-${e}`)))})]}),(0,Ve.jsx)("p",{className:Dd,children:(0,Ve.jsx)("strong",{children:(0,Ae.Z)("Enjoy!")})})]})}),Hd=()=>{const e=(0,Te.I0)(),t=(0,Te.v9)((e=>e.general.userId));return(0,Ee.useEffect)((()=>{e((0,X.hK)(c))}),[e]),(0,we.kF)("Regex Quiz",R.QUIZ_META_DESCRIPTION),null==t?(0,Ve.jsx)($d,{notSignedIn:!0}):(0,Ve.jsx)("div",{className:"jGEqA",children:(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:":taskIdx/*",element:(0,Ve.jsx)(Vd,{})}),(0,Ve.jsx)(Ne.AW,{path:"/",element:(0,Ve.jsx)($d,{})})]})})},qd=()=>(0,Ve.jsxs)("div",{className:"DmUSm",children:[(0,Ve.jsx)("h1",{children:"A critical error has occurred"}),(0,Ve.jsxs)("p",{children:["If possible, open up an issue with as many details as you can here:"," ",(0,Ve.jsx)("a",{href:"https://github.com/firasdib/Regex101/issues",children:"https://github.com/firasdib/Regex101/issues"}),"."]}),(0,Ve.jsx)("p",{children:"It might be a good idea to take a screen shot of your dev console window, if you know how to open it."})]}),zd=()=>{(0,we.YX)(),(0,we.aL)();const e=(0,Te.v9)((e=>e.settings.alwaysCollapseLeftSidebar)),t=(0,Te.v9)((e=>e.settings.alwaysCollapseRightSidebar)),s=(0,Te.v9)((e=>e.regexEditor.hasUnsavedData)),n=(0,Te.v9)((e=>e.settings.showWarningUnsavedProgress));return(0,Ee.useEffect)((()=>{window.requestAnimationFrame((()=>Oe.ZP.emit(Oe.En)))}),[]),(0,Ee.useEffect)((()=>{window.onbeforeunload=e=>{if(n&&s){const t=(0,Ae.Z)("You have made changes since you last saved, leaving the website will result in a permanent loss of the data.");return e.returnValue=t,t}}}),[s,n]),(0,Ve.jsxs)(Ie.SV,{fallback:(0,Ve.jsx)(qd,{}),children:[(0,Ve.jsx)(pt,{}),(0,Ve.jsxs)("div",{className:"HPRlT",children:[(0,Ve.jsx)(ot,{alwaysCollapseLeftSidebar:e,alwaysCollapseRightSidebar:t}),(0,Ve.jsx)(nr,{alwaysCollapseLeftSidebar:e}),(0,Ve.jsx)("div",{className:_e()("QtZzw",e&&"rxgkz"),children:(0,Ve.jsxs)(Ne.Z5,{children:[(0,Ve.jsx)(Ne.AW,{path:"/library/*",element:(0,Ve.jsx)(td,{})}),(0,Ve.jsx)(Ne.AW,{path:"/settings/*",element:(0,Ve.jsx)(hd,{})}),(0,Ve.jsx)(Ne.AW,{path:"/account/*",element:(0,Ve.jsx)(kd,{})}),(0,Ve.jsx)(Ne.AW,{path:"/quiz/*",element:(0,Ve.jsx)(Hd,{})}),(0,Ve.jsx)(Ne.AW,{path:"/r/:permalinkFragment/latest",element:(0,Ve.jsx)(br,{})}),(0,Ve.jsx)(Ne.AW,{path:"/r/:permalinkFragment/:version/*",element:(0,Ve.jsx)(bu,{})}),(0,Ve.jsx)(Ne.AW,{path:"/r/:permalinkFragment/*",element:(0,Ve.jsx)(bu,{})}),(0,Ve.jsx)(Ne.AW,{path:"/*",element:(0,Ve.jsx)(bu,{})})]})})]})]})},Wd=({store:e,promises:t=[]})=>(0,Ve.jsx)(Te.zt,{store:e,children:(0,Ve.jsx)(ke.VK,{children:(0,Ve.jsx)(zd,{})})});let Yd=null,Kd=null;if(Qd())Jd();else{let e;document.addEventListener("readystatechange",e=()=>{Qd()&&(document.removeEventListener("readystatechange",e),Jd())})}async function Jd(){if(window.__LEGACY__)return;Ze.S1(),await(String.fromCodePoint&&window.fetch&&Object.assign&&Object.values&&String.prototype.repeat&&String.prototype.includes&&String.prototype.codePointAt&&String.prototype.trim&&Array.prototype.includes&&Array.prototype.find&&Array.prototype.fill&&Array.prototype.findIndex&&"undefined"!=typeof AbortController&&"ResizeObserver"in window&&"URLSearchParams"in window?(null==window.performance&&(window.performance={}),null==window.performance.now&&(window.performance.now=()=>Date.now()),Promise.resolve()):Promise.all([s.e(889),s.e(429)]).then(s.t.bind(s,34820,23))),function(){const e=window.fetch;window.fetch=function(t,s={}){const n=new AbortController,r=n.signal,i=n.abort.bind(n);return function e(t){if(t instanceof Promise){const s=t;s.then=function(t,s){const n=Object.getPrototypeOf(this).then.call(this,t,s);return e(n)},s.cancel=i}return t}(e(t,Object.assign({signal:r},s))).then(a)}}();const e=await function(){let e;le().setDefaultLevel("info"),i.Z.info("App initialized - version %s","9.0.8"),window.regex101=window.regex101||{};try{e=JSON.parse(decodeURIComponent(window.__INITIAL_STATE__)),i.Z.info("Loaded initial state")}catch(e){return void i.Z.error(new Error("Unable to parse initial state from server"),{state:window.__INITIAL_STATE__})}const t=[ie,de,pe,ge,fe,be,O,je,Ce,ye],s=function(e){const t=function(e){return(t,s)=>e(s.type===h.sk?ne(t,s.value):t,s)}((0,o.UY)(n)),s=function(e){return({dispatch:t,getState:s})=>n=>r=>{const a=n(r),i=e[r.type];if(!i)return a;const o=Q(s(),i.reducersToSave);return ee.Z.save(i.key,o),t((0,X.UF)()),a}}(ae),r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||o.qC,a=(0,o.MT)(t,e,r((0,o.md)(l.Z,s)));return function(e,t){se()&&Object.values(e).forEach((e=>{const s=ee.Z.get(e.key)||{};t.dispatch((0,X.dM)(s))}))}(ae,a),i.Z.info("Store configured"),a}(e);return Promise.all(t.map((e=>e(s)))).catch((e=>{throw e})).catch((e=>i.Z.error("Unable to initialize app",e))).then((()=>s))}();Ze.fo(e),Xd(e),await Ze.PC()}function Xd(e){Yd||(Yd=e);const t=document.querySelector(R.ROOT_ELEMENT);Kd=(0,r.s)(t),Kd.render((0,Ve.jsx)(Wd,{store:e}))}function Qd(){var e,t,s,n;return"interactive"===document.readyState&&!(null==(e=document)||null==(t=e.getElementById("mainCss"))||null==(s=t.sheet)||null==(n=s.cssRules)||!n.length)||"complete"===document.readyState}function eh(){Kd.unmount(),Xd(Yd)}},68654:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n={iconButton:"PRs2u",disabled:"SC8TZ",spinner:"ndNuf",icon:"nstWU"}},84682:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n={reduceMotion:"CwB4E",enter:"RuPoa",enterActive:"SkTVe",leave:"iRxXV",leaveActive:"vXhNJ"}},68417:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n={tokenSample:"T0laQ",plainText:"xq9Cm",keyword:"GedSw",flag:"d_MyJ",info:"hZ6T9",zeroWidth:"KzUpc",token:"KrSXE",flagDisabled:"Vsdwm",tooltip:"fOhwT",icon:"W6jS6",flags:"aBAKk"}},64475:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});const n={selected:"gJDSD",token:"YmAvV",selected2:"bb6Pd","group-0":"Ptqb6","group-1":"MnwcL","group-2":"bSq9j","group-3":"WDFFo","group-4":"BuckL",alternator:"DsO3D",quote:"aZNG2",charClass:"Im6LO",meta:"yyE4U",quantifier:"LEd3h",escaped_string:"HR7qQ",inline_modifiers:"Bzxfi",verb:"BKf2X",subpattern_reference:"xj8ZQ",backreference:"r2GH2",error:"w_XEF",inCharClass:"PQ94p",comment:"yU1q9",cursorover:"OFUcl",mouseoverRelatedLeft:"kUV2_",mouseoverRelatedRight:"qlnVF",mouseoverLeft:"kG5eN",mouseoverRight:"u8QII",mouseoverRelated:"Hkx_o",mouseover:"PqJSq",mouseoverOutlineRelated:"LJQ1R",mouseoverOutline:"cWCLz"}}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(s.exports,s,s.exports,o),s.loaded=!0,s.exports}o.m=a,e=[],o.O=(t,s,n,r)=>{if(!s){var a=1/0;for(u=0;u<e.length;u++){for(var[s,n,r]=e[u],i=!0,l=0;l<s.length;l++)(!1&r||a>=r)&&Object.keys(o.O).every((e=>o.O[e](s[l])))?s.splice(l--,1):(i=!1,r<a&&(a=r));if(i){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[s,n,r]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},s=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var r=Object.create(null);o.r(r);var a={};t=t||[null,s({}),s([]),s(s)];for(var i=2&n&&e;"object"==typeof i&&!~t.indexOf(i);i=s(i))Object.getOwnPropertyNames(i).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,o.d(r,a),r},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,s)=>(o.f[s](e,t),t)),[])),o.u=e=>({87:"vendors-quizStats",101:"markdownContainer",153:"regexDebugger",215:"vendors-markdownContainer",429:"polyfills",483:"vendors-quickref",530:"vendors-sentry",648:"vendors-codeSample",653:"quickref",781:"quizStats",889:"vendors-polyfills",961:"codeSample"}[e]+"."+{87:"054efe3ad0e703a2bed8",101:"3c68a37df18b18628b5c",153:"a353bcb776663689f94f",215:"a785b370b80079b5496d",429:"8b5dc782cd27d04ae66a",483:"9f1fb9975e189e121626",530:"8297ed8fd1b6cf998129",648:"aa65afdce26faff8bda9",653:"13eedec26774e778c5fa",781:"9aebaa4820e96590489e",889:"dd589408f43201889114",961:"00d8d50fd655da6237f2"}[e]+".chunk.js"),o.miniCssF=e=>e+"."+{101:"062c76d479a71b4ef6e7",153:"06b5a40f8cc5f1c21318",653:"de37bf83de58791edb3a",781:"7ba3836d8ae25f7bb111",961:"3f4e47b936fafeb707f0"}[e]+".css",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="regex101:",o.l=(e,t,s,a)=>{if(n[e])n[e].push(t);else{var i,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+s){i=d;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",r+s),i.src=e),n[e]=[t];var h=(t,s)=>{i.onerror=i.onload=null,clearTimeout(p);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(s))),t)return t(s)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),l&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.p="/static/",(()=>{if("undefined"!=typeof document){var e={296:0};o.f.miniCss=(t,s)=>{e[t]?s.push(e[t]):0!==e[t]&&{101:1,153:1,653:1,781:1,961:1}[t]&&s.push(e[t]=(e=>new Promise(((t,s)=>{var n=o.miniCssF(e),r=o.p+n;if(((e,t)=>{for(var s=document.getElementsByTagName("link"),n=0;n<s.length;n++){var r=(i=s[n]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(r===e||r===t))return i}var a=document.getElementsByTagName("style");for(n=0;n<a.length;n++){var i;if((r=(i=a[n]).getAttribute("data-href"))===e||r===t)return i}})(n,r))return t();((e,t,s,n,r)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=s=>{if(a.onerror=a.onload=null,"load"===s.type)n();else{var i=s&&("load"===s.type?"missing":s.type),o=s&&s.target&&s.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=o,a.parentNode&&a.parentNode.removeChild(a),r(l)}},a.href=t,document.head.appendChild(a)})(e,r,0,t,s)})))(t).then((()=>{e[t]=0}),(s=>{throw delete e[t],s})))}}})(),(()=>{var e={296:0};o.f.j=(t,s)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)s.push(n[2]);else{var r=new Promise(((s,r)=>n=e[t]=[s,r]));s.push(n[2]=r);var a=o.p+o.u(t),i=new Error;o.l(a,(s=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=s&&("load"===s.type?"missing":s.type),a=s&&s.target&&s.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",i.name="ChunkLoadError",i.type=r,i.request=a,n[1](i)}}),"chunk-"+t,t)}},o.O.j=t=>0===e[t];var t=(t,s)=>{var n,r,[a,i,l]=s,c=0;if(a.some((t=>0!==e[t]))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);if(l)var u=l(o)}for(t&&t(s);c<a.length;c++)r=a[c],o.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return o.O(u)},s=("undefined"!=typeof self?self:this).webpackChunkregex101=("undefined"!=typeof self?self:this).webpackChunkregex101||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var l=o.O(void 0,[598],(()=>o(16548)));l=o.O(l)})(); |