build2.js 199 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378
  1. import { i as __require, t as __commonJSMin } from "./chunk.js";
  2. import { t as require_lib } from "./lib.js";
  3. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/fs.js
  4. var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.getFileSystem = getFileSystem;
  7. exports.setFileSystem = setFileSystem;
  8. let fileSystem = {
  9. readFile: () => {
  10. throw Error("readFile not implemented");
  11. },
  12. writeFile: () => {
  13. throw Error("writeFile not implemented");
  14. }
  15. };
  16. function setFileSystem(fs) {
  17. fileSystem.readFile = fs.readFile;
  18. fileSystem.writeFile = fs.writeFile;
  19. }
  20. function getFileSystem() {
  21. return fileSystem;
  22. }
  23. }));
  24. //#endregion
  25. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/unquote.js
  26. var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
  27. Object.defineProperty(exports, "__esModule", { value: true });
  28. exports.default = unquote;
  29. const reg = /['"]/;
  30. function unquote(str) {
  31. if (!str) return "";
  32. if (reg.test(str.charAt(0))) str = str.substr(1);
  33. if (reg.test(str.charAt(str.length - 1))) str = str.substr(0, str.length - 1);
  34. return str;
  35. }
  36. }));
  37. //#endregion
  38. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/replaceValueSymbols.js
  39. var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  40. const matchValueName = /[$]?[\w-]+/g;
  41. const replaceValueSymbols = (value, replacements) => {
  42. let matches;
  43. while (matches = matchValueName.exec(value)) {
  44. const replacement = replacements[matches[0]];
  45. if (replacement) {
  46. value = value.slice(0, matches.index) + replacement + value.slice(matchValueName.lastIndex);
  47. matchValueName.lastIndex -= matches[0].length - replacement.length;
  48. }
  49. }
  50. return value;
  51. };
  52. module.exports = replaceValueSymbols;
  53. }));
  54. //#endregion
  55. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/replaceSymbols.js
  56. var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  57. const replaceValueSymbols = require_replaceValueSymbols();
  58. const replaceSymbols = (css, replacements) => {
  59. css.walk((node) => {
  60. if (node.type === "decl" && node.value) node.value = replaceValueSymbols(node.value.toString(), replacements);
  61. else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols(node.selector.toString(), replacements);
  62. else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols(node.params.toString(), replacements);
  63. });
  64. };
  65. module.exports = replaceSymbols;
  66. }));
  67. //#endregion
  68. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/extractICSS.js
  69. var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  70. const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
  71. const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
  72. const getDeclsObject = (rule) => {
  73. const object = {};
  74. rule.walkDecls((decl) => {
  75. const before = decl.raws.before ? decl.raws.before.trim() : "";
  76. object[before + decl.prop] = decl.value;
  77. });
  78. return object;
  79. };
  80. /**
  81. *
  82. * @param {string} css
  83. * @param {boolean} removeRules
  84. * @param {'auto' | 'rule' | 'at-rule'} mode
  85. */
  86. const extractICSS = (css, removeRules = true, mode = "auto") => {
  87. const icssImports = {};
  88. const icssExports = {};
  89. function addImports(node, path) {
  90. const unquoted = path.replace(/'|"/g, "");
  91. icssImports[unquoted] = Object.assign(icssImports[unquoted] || {}, getDeclsObject(node));
  92. if (removeRules) node.remove();
  93. }
  94. function addExports(node) {
  95. Object.assign(icssExports, getDeclsObject(node));
  96. if (removeRules) node.remove();
  97. }
  98. css.each((node) => {
  99. if (node.type === "rule" && mode !== "at-rule") {
  100. if (node.selector.slice(0, 7) === ":import") {
  101. const matches = importPattern.exec(node.selector);
  102. if (matches) addImports(node, matches[1]);
  103. }
  104. if (node.selector === ":export") addExports(node);
  105. }
  106. if (node.type === "atrule" && mode !== "rule") {
  107. if (node.name === "icss-import") {
  108. const matches = balancedQuotes.exec(node.params);
  109. if (matches) addImports(node, matches[1]);
  110. }
  111. if (node.name === "icss-export") addExports(node);
  112. }
  113. });
  114. return {
  115. icssImports,
  116. icssExports
  117. };
  118. };
  119. module.exports = extractICSS;
  120. }));
  121. //#endregion
  122. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/createICSSRules.js
  123. var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  124. const createImports = (imports, postcss, mode = "rule") => {
  125. return Object.keys(imports).map((path) => {
  126. const aliases = imports[path];
  127. const declarations = Object.keys(aliases).map((key) => postcss.decl({
  128. prop: key,
  129. value: aliases[key],
  130. raws: { before: "\n " }
  131. }));
  132. const hasDeclarations = declarations.length > 0;
  133. const rule = mode === "rule" ? postcss.rule({
  134. selector: `:import('${path}')`,
  135. raws: { after: hasDeclarations ? "\n" : "" }
  136. }) : postcss.atRule({
  137. name: "icss-import",
  138. params: `'${path}'`,
  139. raws: { after: hasDeclarations ? "\n" : "" }
  140. });
  141. if (hasDeclarations) rule.append(declarations);
  142. return rule;
  143. });
  144. };
  145. const createExports = (exports$7, postcss, mode = "rule") => {
  146. const declarations = Object.keys(exports$7).map((key) => postcss.decl({
  147. prop: key,
  148. value: exports$7[key],
  149. raws: { before: "\n " }
  150. }));
  151. if (declarations.length === 0) return [];
  152. const rule = mode === "rule" ? postcss.rule({
  153. selector: `:export`,
  154. raws: { after: "\n" }
  155. }) : postcss.atRule({
  156. name: "icss-export",
  157. raws: { after: "\n" }
  158. });
  159. rule.append(declarations);
  160. return [rule];
  161. };
  162. const createICSSRules = (imports, exports$8, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$8, postcss, mode)];
  163. module.exports = createICSSRules;
  164. }));
  165. //#endregion
  166. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.8/node_modules/icss-utils/src/index.js
  167. var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  168. module.exports = {
  169. replaceValueSymbols: require_replaceValueSymbols(),
  170. replaceSymbols: require_replaceSymbols(),
  171. extractICSS: require_extractICSS(),
  172. createICSSRules: require_createICSSRules()
  173. };
  174. }));
  175. //#endregion
  176. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/Parser.js
  177. var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
  178. Object.defineProperty(exports, "__esModule", { value: true });
  179. exports.default = void 0;
  180. var _icssUtils = require_src$4();
  181. const importRegexp = /^:import\((.+)\)$/;
  182. var Parser = class {
  183. constructor(pathFetcher, trace) {
  184. this.pathFetcher = pathFetcher;
  185. this.plugin = this.plugin.bind(this);
  186. this.exportTokens = {};
  187. this.translations = {};
  188. this.trace = trace;
  189. }
  190. plugin() {
  191. const parser = this;
  192. return {
  193. postcssPlugin: "css-modules-parser",
  194. async OnceExit(css) {
  195. await Promise.all(parser.fetchAllImports(css));
  196. parser.linkImportedSymbols(css);
  197. return parser.extractExports(css);
  198. }
  199. };
  200. }
  201. fetchAllImports(css) {
  202. let imports = [];
  203. css.each((node) => {
  204. if (node.type == "rule" && node.selector.match(importRegexp)) imports.push(this.fetchImport(node, css.source.input.from, imports.length));
  205. });
  206. return imports;
  207. }
  208. linkImportedSymbols(css) {
  209. (0, _icssUtils.replaceSymbols)(css, this.translations);
  210. }
  211. extractExports(css) {
  212. css.each((node) => {
  213. if (node.type == "rule" && node.selector == ":export") this.handleExport(node);
  214. });
  215. }
  216. handleExport(exportNode) {
  217. exportNode.each((decl) => {
  218. if (decl.type == "decl") {
  219. Object.keys(this.translations).forEach((translation) => {
  220. decl.value = decl.value.replace(translation, this.translations[translation]);
  221. });
  222. this.exportTokens[decl.prop] = decl.value;
  223. }
  224. });
  225. exportNode.remove();
  226. }
  227. async fetchImport(importNode, relativeTo, depNr) {
  228. const file = importNode.selector.match(importRegexp)[1];
  229. const depTrace = this.trace + String.fromCharCode(depNr);
  230. const exports$6 = await this.pathFetcher(file, relativeTo, depTrace);
  231. try {
  232. importNode.each((decl) => {
  233. if (decl.type == "decl") this.translations[decl.prop] = exports$6[decl.value];
  234. });
  235. importNode.remove();
  236. } catch (err) {
  237. console.log(err);
  238. }
  239. }
  240. };
  241. exports.default = Parser;
  242. }));
  243. //#endregion
  244. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/saveJSON.js
  245. var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
  246. Object.defineProperty(exports, "__esModule", { value: true });
  247. exports.default = saveJSON;
  248. var _fs = require_fs();
  249. function saveJSON(cssFile, json) {
  250. return new Promise((resolve, reject) => {
  251. const { writeFile } = (0, _fs.getFileSystem)();
  252. writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json));
  253. });
  254. }
  255. }));
  256. //#endregion
  257. //#region ../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js
  258. var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  259. /**
  260. * lodash (Custom Build) <https://lodash.com/>
  261. * Build: `lodash modularize exports="npm" -o ./`
  262. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  263. * Released under MIT license <https://lodash.com/license>
  264. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  265. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  266. */
  267. /** Used as references for various `Number` constants. */
  268. var INFINITY = Infinity;
  269. /** `Object#toString` result references. */
  270. var symbolTag = "[object Symbol]";
  271. /** Used to match words composed of alphanumeric characters. */
  272. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  273. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  274. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  275. /** Used to compose unicode character classes. */
  276. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  277. /** Used to compose unicode capture groups. */
  278. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  279. /** Used to compose unicode regexes. */
  280. var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
  281. rsNonAstral,
  282. rsRegional,
  283. rsSurrPair
  284. ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
  285. rsDingbat,
  286. rsRegional,
  287. rsSurrPair
  288. ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
  289. rsNonAstral + rsCombo + "?",
  290. rsCombo,
  291. rsRegional,
  292. rsSurrPair,
  293. rsAstral
  294. ].join("|") + ")";
  295. /** Used to match apostrophes. */
  296. var reApos = RegExp(rsApos, "g");
  297. /**
  298. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  299. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  300. */
  301. var reComboMark = RegExp(rsCombo, "g");
  302. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  303. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  304. /** Used to match complex or compound words. */
  305. var reUnicodeWord = RegExp([
  306. rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
  307. rsBreak,
  308. rsUpper,
  309. "$"
  310. ].join("|") + ")",
  311. rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
  312. rsBreak,
  313. rsUpper + rsLowerMisc,
  314. "$"
  315. ].join("|") + ")",
  316. rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
  317. rsUpper + "+" + rsOptUpperContr,
  318. rsDigits,
  319. rsEmoji
  320. ].join("|"), "g");
  321. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  322. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + "]");
  323. /** Used to detect strings that need a more robust regexp to match words. */
  324. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  325. /** Used to map Latin Unicode letters to basic Latin letters. */
  326. var deburredLetters = {
  327. "À": "A",
  328. "Á": "A",
  329. "Â": "A",
  330. "Ã": "A",
  331. "Ä": "A",
  332. "Å": "A",
  333. "à": "a",
  334. "á": "a",
  335. "â": "a",
  336. "ã": "a",
  337. "ä": "a",
  338. "å": "a",
  339. "Ç": "C",
  340. "ç": "c",
  341. "Ð": "D",
  342. "ð": "d",
  343. "È": "E",
  344. "É": "E",
  345. "Ê": "E",
  346. "Ë": "E",
  347. "è": "e",
  348. "é": "e",
  349. "ê": "e",
  350. "ë": "e",
  351. "Ì": "I",
  352. "Í": "I",
  353. "Î": "I",
  354. "Ï": "I",
  355. "ì": "i",
  356. "í": "i",
  357. "î": "i",
  358. "ï": "i",
  359. "Ñ": "N",
  360. "ñ": "n",
  361. "Ò": "O",
  362. "Ó": "O",
  363. "Ô": "O",
  364. "Õ": "O",
  365. "Ö": "O",
  366. "Ø": "O",
  367. "ò": "o",
  368. "ó": "o",
  369. "ô": "o",
  370. "õ": "o",
  371. "ö": "o",
  372. "ø": "o",
  373. "Ù": "U",
  374. "Ú": "U",
  375. "Û": "U",
  376. "Ü": "U",
  377. "ù": "u",
  378. "ú": "u",
  379. "û": "u",
  380. "ü": "u",
  381. "Ý": "Y",
  382. "ý": "y",
  383. "ÿ": "y",
  384. "Æ": "Ae",
  385. "æ": "ae",
  386. "Þ": "Th",
  387. "þ": "th",
  388. "ß": "ss",
  389. "Ā": "A",
  390. "Ă": "A",
  391. "Ą": "A",
  392. "ā": "a",
  393. "ă": "a",
  394. "ą": "a",
  395. "Ć": "C",
  396. "Ĉ": "C",
  397. "Ċ": "C",
  398. "Č": "C",
  399. "ć": "c",
  400. "ĉ": "c",
  401. "ċ": "c",
  402. "č": "c",
  403. "Ď": "D",
  404. "Đ": "D",
  405. "ď": "d",
  406. "đ": "d",
  407. "Ē": "E",
  408. "Ĕ": "E",
  409. "Ė": "E",
  410. "Ę": "E",
  411. "Ě": "E",
  412. "ē": "e",
  413. "ĕ": "e",
  414. "ė": "e",
  415. "ę": "e",
  416. "ě": "e",
  417. "Ĝ": "G",
  418. "Ğ": "G",
  419. "Ġ": "G",
  420. "Ģ": "G",
  421. "ĝ": "g",
  422. "ğ": "g",
  423. "ġ": "g",
  424. "ģ": "g",
  425. "Ĥ": "H",
  426. "Ħ": "H",
  427. "ĥ": "h",
  428. "ħ": "h",
  429. "Ĩ": "I",
  430. "Ī": "I",
  431. "Ĭ": "I",
  432. "Į": "I",
  433. "İ": "I",
  434. "ĩ": "i",
  435. "ī": "i",
  436. "ĭ": "i",
  437. "į": "i",
  438. "ı": "i",
  439. "Ĵ": "J",
  440. "ĵ": "j",
  441. "Ķ": "K",
  442. "ķ": "k",
  443. "ĸ": "k",
  444. "Ĺ": "L",
  445. "Ļ": "L",
  446. "Ľ": "L",
  447. "Ŀ": "L",
  448. "Ł": "L",
  449. "ĺ": "l",
  450. "ļ": "l",
  451. "ľ": "l",
  452. "ŀ": "l",
  453. "ł": "l",
  454. "Ń": "N",
  455. "Ņ": "N",
  456. "Ň": "N",
  457. "Ŋ": "N",
  458. "ń": "n",
  459. "ņ": "n",
  460. "ň": "n",
  461. "ŋ": "n",
  462. "Ō": "O",
  463. "Ŏ": "O",
  464. "Ő": "O",
  465. "ō": "o",
  466. "ŏ": "o",
  467. "ő": "o",
  468. "Ŕ": "R",
  469. "Ŗ": "R",
  470. "Ř": "R",
  471. "ŕ": "r",
  472. "ŗ": "r",
  473. "ř": "r",
  474. "Ś": "S",
  475. "Ŝ": "S",
  476. "Ş": "S",
  477. "Š": "S",
  478. "ś": "s",
  479. "ŝ": "s",
  480. "ş": "s",
  481. "š": "s",
  482. "Ţ": "T",
  483. "Ť": "T",
  484. "Ŧ": "T",
  485. "ţ": "t",
  486. "ť": "t",
  487. "ŧ": "t",
  488. "Ũ": "U",
  489. "Ū": "U",
  490. "Ŭ": "U",
  491. "Ů": "U",
  492. "Ű": "U",
  493. "Ų": "U",
  494. "ũ": "u",
  495. "ū": "u",
  496. "ŭ": "u",
  497. "ů": "u",
  498. "ű": "u",
  499. "ų": "u",
  500. "Ŵ": "W",
  501. "ŵ": "w",
  502. "Ŷ": "Y",
  503. "ŷ": "y",
  504. "Ÿ": "Y",
  505. "Ź": "Z",
  506. "Ż": "Z",
  507. "Ž": "Z",
  508. "ź": "z",
  509. "ż": "z",
  510. "ž": "z",
  511. "IJ": "IJ",
  512. "ij": "ij",
  513. "Œ": "Oe",
  514. "œ": "oe",
  515. "ʼn": "'n",
  516. "ſ": "ss"
  517. };
  518. /** Used as a reference to the global object. */
  519. var root = typeof global == "object" && global && global.Object === Object && global || typeof self == "object" && self && self.Object === Object && self || Function("return this")();
  520. /**
  521. * A specialized version of `_.reduce` for arrays without support for
  522. * iteratee shorthands.
  523. *
  524. * @private
  525. * @param {Array} [array] The array to iterate over.
  526. * @param {Function} iteratee The function invoked per iteration.
  527. * @param {*} [accumulator] The initial value.
  528. * @param {boolean} [initAccum] Specify using the first element of `array` as
  529. * the initial value.
  530. * @returns {*} Returns the accumulated value.
  531. */
  532. function arrayReduce(array, iteratee, accumulator, initAccum) {
  533. var index = -1, length = array ? array.length : 0;
  534. if (initAccum && length) accumulator = array[++index];
  535. while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
  536. return accumulator;
  537. }
  538. /**
  539. * Converts an ASCII `string` to an array.
  540. *
  541. * @private
  542. * @param {string} string The string to convert.
  543. * @returns {Array} Returns the converted array.
  544. */
  545. function asciiToArray(string) {
  546. return string.split("");
  547. }
  548. /**
  549. * Splits an ASCII `string` into an array of its words.
  550. *
  551. * @private
  552. * @param {string} The string to inspect.
  553. * @returns {Array} Returns the words of `string`.
  554. */
  555. function asciiWords(string) {
  556. return string.match(reAsciiWord) || [];
  557. }
  558. /**
  559. * The base implementation of `_.propertyOf` without support for deep paths.
  560. *
  561. * @private
  562. * @param {Object} object The object to query.
  563. * @returns {Function} Returns the new accessor function.
  564. */
  565. function basePropertyOf(object) {
  566. return function(key) {
  567. return object == null ? void 0 : object[key];
  568. };
  569. }
  570. /**
  571. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  572. * letters to basic Latin letters.
  573. *
  574. * @private
  575. * @param {string} letter The matched letter to deburr.
  576. * @returns {string} Returns the deburred letter.
  577. */
  578. var deburrLetter = basePropertyOf(deburredLetters);
  579. /**
  580. * Checks if `string` contains Unicode symbols.
  581. *
  582. * @private
  583. * @param {string} string The string to inspect.
  584. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  585. */
  586. function hasUnicode(string) {
  587. return reHasUnicode.test(string);
  588. }
  589. /**
  590. * Checks if `string` contains a word composed of Unicode symbols.
  591. *
  592. * @private
  593. * @param {string} string The string to inspect.
  594. * @returns {boolean} Returns `true` if a word is found, else `false`.
  595. */
  596. function hasUnicodeWord(string) {
  597. return reHasUnicodeWord.test(string);
  598. }
  599. /**
  600. * Converts `string` to an array.
  601. *
  602. * @private
  603. * @param {string} string The string to convert.
  604. * @returns {Array} Returns the converted array.
  605. */
  606. function stringToArray(string) {
  607. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  608. }
  609. /**
  610. * Converts a Unicode `string` to an array.
  611. *
  612. * @private
  613. * @param {string} string The string to convert.
  614. * @returns {Array} Returns the converted array.
  615. */
  616. function unicodeToArray(string) {
  617. return string.match(reUnicode) || [];
  618. }
  619. /**
  620. * Splits a Unicode `string` into an array of its words.
  621. *
  622. * @private
  623. * @param {string} The string to inspect.
  624. * @returns {Array} Returns the words of `string`.
  625. */
  626. function unicodeWords(string) {
  627. return string.match(reUnicodeWord) || [];
  628. }
  629. /**
  630. * Used to resolve the
  631. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  632. * of values.
  633. */
  634. var objectToString = Object.prototype.toString;
  635. /** Built-in value references. */
  636. var Symbol = root.Symbol;
  637. /** Used to convert symbols to primitives and strings. */
  638. var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
  639. /**
  640. * The base implementation of `_.slice` without an iteratee call guard.
  641. *
  642. * @private
  643. * @param {Array} array The array to slice.
  644. * @param {number} [start=0] The start position.
  645. * @param {number} [end=array.length] The end position.
  646. * @returns {Array} Returns the slice of `array`.
  647. */
  648. function baseSlice(array, start, end) {
  649. var index = -1, length = array.length;
  650. if (start < 0) start = -start > length ? 0 : length + start;
  651. end = end > length ? length : end;
  652. if (end < 0) end += length;
  653. length = start > end ? 0 : end - start >>> 0;
  654. start >>>= 0;
  655. var result = Array(length);
  656. while (++index < length) result[index] = array[index + start];
  657. return result;
  658. }
  659. /**
  660. * The base implementation of `_.toString` which doesn't convert nullish
  661. * values to empty strings.
  662. *
  663. * @private
  664. * @param {*} value The value to process.
  665. * @returns {string} Returns the string.
  666. */
  667. function baseToString(value) {
  668. if (typeof value == "string") return value;
  669. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  670. var result = value + "";
  671. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  672. }
  673. /**
  674. * Casts `array` to a slice if it's needed.
  675. *
  676. * @private
  677. * @param {Array} array The array to inspect.
  678. * @param {number} start The start position.
  679. * @param {number} [end=array.length] The end position.
  680. * @returns {Array} Returns the cast slice.
  681. */
  682. function castSlice(array, start, end) {
  683. var length = array.length;
  684. end = end === void 0 ? length : end;
  685. return !start && end >= length ? array : baseSlice(array, start, end);
  686. }
  687. /**
  688. * Creates a function like `_.lowerFirst`.
  689. *
  690. * @private
  691. * @param {string} methodName The name of the `String` case method to use.
  692. * @returns {Function} Returns the new case function.
  693. */
  694. function createCaseFirst(methodName) {
  695. return function(string) {
  696. string = toString(string);
  697. var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
  698. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  699. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  700. return chr[methodName]() + trailing;
  701. };
  702. }
  703. /**
  704. * Creates a function like `_.camelCase`.
  705. *
  706. * @private
  707. * @param {Function} callback The function to combine each word.
  708. * @returns {Function} Returns the new compounder function.
  709. */
  710. function createCompounder(callback) {
  711. return function(string) {
  712. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  713. };
  714. }
  715. /**
  716. * Checks if `value` is object-like. A value is object-like if it's not `null`
  717. * and has a `typeof` result of "object".
  718. *
  719. * @static
  720. * @memberOf _
  721. * @since 4.0.0
  722. * @category Lang
  723. * @param {*} value The value to check.
  724. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  725. * @example
  726. *
  727. * _.isObjectLike({});
  728. * // => true
  729. *
  730. * _.isObjectLike([1, 2, 3]);
  731. * // => true
  732. *
  733. * _.isObjectLike(_.noop);
  734. * // => false
  735. *
  736. * _.isObjectLike(null);
  737. * // => false
  738. */
  739. function isObjectLike(value) {
  740. return !!value && typeof value == "object";
  741. }
  742. /**
  743. * Checks if `value` is classified as a `Symbol` primitive or object.
  744. *
  745. * @static
  746. * @memberOf _
  747. * @since 4.0.0
  748. * @category Lang
  749. * @param {*} value The value to check.
  750. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  751. * @example
  752. *
  753. * _.isSymbol(Symbol.iterator);
  754. * // => true
  755. *
  756. * _.isSymbol('abc');
  757. * // => false
  758. */
  759. function isSymbol(value) {
  760. return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
  761. }
  762. /**
  763. * Converts `value` to a string. An empty string is returned for `null`
  764. * and `undefined` values. The sign of `-0` is preserved.
  765. *
  766. * @static
  767. * @memberOf _
  768. * @since 4.0.0
  769. * @category Lang
  770. * @param {*} value The value to process.
  771. * @returns {string} Returns the string.
  772. * @example
  773. *
  774. * _.toString(null);
  775. * // => ''
  776. *
  777. * _.toString(-0);
  778. * // => '-0'
  779. *
  780. * _.toString([1, 2, 3]);
  781. * // => '1,2,3'
  782. */
  783. function toString(value) {
  784. return value == null ? "" : baseToString(value);
  785. }
  786. /**
  787. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  788. *
  789. * @static
  790. * @memberOf _
  791. * @since 3.0.0
  792. * @category String
  793. * @param {string} [string=''] The string to convert.
  794. * @returns {string} Returns the camel cased string.
  795. * @example
  796. *
  797. * _.camelCase('Foo Bar');
  798. * // => 'fooBar'
  799. *
  800. * _.camelCase('--foo-bar--');
  801. * // => 'fooBar'
  802. *
  803. * _.camelCase('__FOO_BAR__');
  804. * // => 'fooBar'
  805. */
  806. var camelCase = createCompounder(function(result, word, index) {
  807. word = word.toLowerCase();
  808. return result + (index ? capitalize(word) : word);
  809. });
  810. /**
  811. * Converts the first character of `string` to upper case and the remaining
  812. * to lower case.
  813. *
  814. * @static
  815. * @memberOf _
  816. * @since 3.0.0
  817. * @category String
  818. * @param {string} [string=''] The string to capitalize.
  819. * @returns {string} Returns the capitalized string.
  820. * @example
  821. *
  822. * _.capitalize('FRED');
  823. * // => 'Fred'
  824. */
  825. function capitalize(string) {
  826. return upperFirst(toString(string).toLowerCase());
  827. }
  828. /**
  829. * Deburrs `string` by converting
  830. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  831. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  832. * letters to basic Latin letters and removing
  833. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  834. *
  835. * @static
  836. * @memberOf _
  837. * @since 3.0.0
  838. * @category String
  839. * @param {string} [string=''] The string to deburr.
  840. * @returns {string} Returns the deburred string.
  841. * @example
  842. *
  843. * _.deburr('déjà vu');
  844. * // => 'deja vu'
  845. */
  846. function deburr(string) {
  847. string = toString(string);
  848. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  849. }
  850. /**
  851. * Converts the first character of `string` to upper case.
  852. *
  853. * @static
  854. * @memberOf _
  855. * @since 4.0.0
  856. * @category String
  857. * @param {string} [string=''] The string to convert.
  858. * @returns {string} Returns the converted string.
  859. * @example
  860. *
  861. * _.upperFirst('fred');
  862. * // => 'Fred'
  863. *
  864. * _.upperFirst('FRED');
  865. * // => 'FRED'
  866. */
  867. var upperFirst = createCaseFirst("toUpperCase");
  868. /**
  869. * Splits `string` into an array of its words.
  870. *
  871. * @static
  872. * @memberOf _
  873. * @since 3.0.0
  874. * @category String
  875. * @param {string} [string=''] The string to inspect.
  876. * @param {RegExp|string} [pattern] The pattern to match words.
  877. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  878. * @returns {Array} Returns the words of `string`.
  879. * @example
  880. *
  881. * _.words('fred, barney, & pebbles');
  882. * // => ['fred', 'barney', 'pebbles']
  883. *
  884. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  885. * // => ['fred', 'barney', '&', 'pebbles']
  886. */
  887. function words(string, pattern, guard) {
  888. string = toString(string);
  889. pattern = guard ? void 0 : pattern;
  890. if (pattern === void 0) return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  891. return string.match(pattern) || [];
  892. }
  893. module.exports = camelCase;
  894. }));
  895. //#endregion
  896. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/localsConvention.js
  897. var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
  898. Object.defineProperty(exports, "__esModule", { value: true });
  899. exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
  900. var _lodash = _interopRequireDefault(require_lodash_camelcase());
  901. function _interopRequireDefault(obj) {
  902. return obj && obj.__esModule ? obj : { default: obj };
  903. }
  904. function dashesCamelCase(string) {
  905. return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
  906. }
  907. function makeLocalsConventionReducer(localsConvention, inputFile) {
  908. const isFunc = typeof localsConvention === "function";
  909. return (tokens, [className, value]) => {
  910. if (isFunc) {
  911. const convention = localsConvention(className, value, inputFile);
  912. tokens[convention] = value;
  913. return tokens;
  914. }
  915. switch (localsConvention) {
  916. case "camelCase":
  917. tokens[className] = value;
  918. tokens[(0, _lodash.default)(className)] = value;
  919. break;
  920. case "camelCaseOnly":
  921. tokens[(0, _lodash.default)(className)] = value;
  922. break;
  923. case "dashes":
  924. tokens[className] = value;
  925. tokens[dashesCamelCase(className)] = value;
  926. break;
  927. case "dashesOnly":
  928. tokens[dashesCamelCase(className)] = value;
  929. break;
  930. }
  931. return tokens;
  932. };
  933. }
  934. }));
  935. //#endregion
  936. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/FileSystemLoader.js
  937. var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
  938. Object.defineProperty(exports, "__esModule", { value: true });
  939. exports.default = void 0;
  940. var _postcss$1 = _interopRequireDefault(__require("postcss"));
  941. var _path = _interopRequireDefault(__require("path"));
  942. var _Parser = _interopRequireDefault(require_Parser());
  943. var _fs = require_fs();
  944. function _interopRequireDefault(obj) {
  945. return obj && obj.__esModule ? obj : { default: obj };
  946. }
  947. var Core = class Core {
  948. constructor(plugins) {
  949. this.plugins = plugins || Core.defaultPlugins;
  950. }
  951. async load(sourceString, sourcePath, trace, pathFetcher) {
  952. const parser = new _Parser.default(pathFetcher, trace);
  953. const plugins = this.plugins.concat([parser.plugin()]);
  954. return {
  955. injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css,
  956. exportTokens: parser.exportTokens
  957. };
  958. }
  959. };
  960. const traceKeySorter = (a, b) => {
  961. if (a.length < b.length) return a < b.substring(0, a.length) ? -1 : 1;
  962. if (a.length > b.length) return a.substring(0, b.length) <= b ? -1 : 1;
  963. return a < b ? -1 : 1;
  964. };
  965. var FileSystemLoader = class {
  966. constructor(root, plugins, fileResolve) {
  967. if (root === "/" && process.platform === "win32") {
  968. const cwdDrive = process.cwd().slice(0, 3);
  969. if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`);
  970. root = cwdDrive;
  971. }
  972. this.root = root;
  973. this.fileResolve = fileResolve;
  974. this.sources = {};
  975. this.traces = {};
  976. this.importNr = 0;
  977. this.core = new Core(plugins);
  978. this.tokensByFile = {};
  979. this.fs = (0, _fs.getFileSystem)();
  980. }
  981. async fetch(_newPath, relativeTo, _trace) {
  982. const newPath = _newPath.replace(/^["']|["']$/g, "");
  983. const trace = _trace || String.fromCharCode(this.importNr++);
  984. const useFileResolve = typeof this.fileResolve === "function";
  985. const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve();
  986. if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) throw new Error("The returned path from the \"fileResolve\" option must be absolute.");
  987. const relativeDir = _path.default.dirname(relativeTo);
  988. const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
  989. let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
  990. if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
  991. fileRelativePath = __require.resolve(newPath);
  992. } catch (e) {}
  993. const tokens = this.tokensByFile[fileRelativePath];
  994. if (tokens) return tokens;
  995. return new Promise((resolve, reject) => {
  996. this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
  997. if (err) reject(err);
  998. const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
  999. this.sources[fileRelativePath] = injectableSource;
  1000. this.traces[trace] = fileRelativePath;
  1001. this.tokensByFile[fileRelativePath] = exportTokens;
  1002. resolve(exportTokens);
  1003. });
  1004. });
  1005. }
  1006. get finalSource() {
  1007. const traces = this.traces;
  1008. const sources = this.sources;
  1009. let written = /* @__PURE__ */ new Set();
  1010. return Object.keys(traces).sort(traceKeySorter).map((key) => {
  1011. const filename = traces[key];
  1012. if (written.has(filename)) return null;
  1013. written.add(filename);
  1014. return sources[filename];
  1015. }).join("");
  1016. }
  1017. };
  1018. exports.default = FileSystemLoader;
  1019. }));
  1020. //#endregion
  1021. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.8/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
  1022. var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1023. const PERMANENT_MARKER = 2;
  1024. const TEMPORARY_MARKER = 1;
  1025. function createError(node, graph) {
  1026. const er = /* @__PURE__ */ new Error("Nondeterministic import's order");
  1027. er.nodes = [node, graph[node].find((relatedNode) => graph[relatedNode].indexOf(node) > -1)];
  1028. return er;
  1029. }
  1030. function walkGraph(node, graph, state, result, strict) {
  1031. if (state[node] === PERMANENT_MARKER) return;
  1032. if (state[node] === TEMPORARY_MARKER) {
  1033. if (strict) return createError(node, graph);
  1034. return;
  1035. }
  1036. state[node] = TEMPORARY_MARKER;
  1037. const children = graph[node];
  1038. const length = children.length;
  1039. for (let i = 0; i < length; ++i) {
  1040. const error = walkGraph(children[i], graph, state, result, strict);
  1041. if (error instanceof Error) return error;
  1042. }
  1043. state[node] = PERMANENT_MARKER;
  1044. result.push(node);
  1045. }
  1046. function topologicalSort(graph, strict) {
  1047. const result = [];
  1048. const state = {};
  1049. const nodes = Object.keys(graph);
  1050. const length = nodes.length;
  1051. for (let i = 0; i < length; ++i) {
  1052. const er = walkGraph(nodes[i], graph, state, result, strict);
  1053. if (er instanceof Error) return er;
  1054. }
  1055. return result;
  1056. }
  1057. module.exports = topologicalSort;
  1058. }));
  1059. //#endregion
  1060. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.8/node_modules/postcss-modules-extract-imports/src/index.js
  1061. var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1062. const topologicalSort = require_topologicalSort();
  1063. const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
  1064. const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
  1065. const VISITED_MARKER = 1;
  1066. /**
  1067. * :import('G') {}
  1068. *
  1069. * Rule
  1070. * composes: ... from 'A'
  1071. * composes: ... from 'B'
  1072. * Rule
  1073. * composes: ... from 'A'
  1074. * composes: ... from 'A'
  1075. * composes: ... from 'C'
  1076. *
  1077. * Results in:
  1078. *
  1079. * graph: {
  1080. * G: [],
  1081. * A: [],
  1082. * B: ['A'],
  1083. * C: ['A'],
  1084. * }
  1085. */
  1086. function addImportToGraph(importId, parentId, graph, visited) {
  1087. const siblingsId = parentId + "_siblings";
  1088. const visitedId = parentId + "_" + importId;
  1089. if (visited[visitedId] !== VISITED_MARKER) {
  1090. if (!Array.isArray(visited[siblingsId])) visited[siblingsId] = [];
  1091. const siblings = visited[siblingsId];
  1092. if (Array.isArray(graph[importId])) graph[importId] = graph[importId].concat(siblings);
  1093. else graph[importId] = siblings.slice();
  1094. visited[visitedId] = VISITED_MARKER;
  1095. siblings.push(importId);
  1096. }
  1097. }
  1098. module.exports = (options = {}) => {
  1099. let importIndex = 0;
  1100. const createImportedName = typeof options.createImportedName !== "function" ? (importName) => `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` : options.createImportedName;
  1101. const failOnWrongOrder = options.failOnWrongOrder;
  1102. return {
  1103. postcssPlugin: "postcss-modules-extract-imports",
  1104. prepare() {
  1105. const graph = {};
  1106. const visited = {};
  1107. const existingImports = {};
  1108. const importDecls = {};
  1109. const imports = {};
  1110. return { Once(root, postcss) {
  1111. root.walkRules((rule) => {
  1112. const matches = icssImport.exec(rule.selector);
  1113. if (matches) {
  1114. const [, doubleQuotePath, singleQuotePath] = matches;
  1115. const importPath = doubleQuotePath || singleQuotePath;
  1116. addImportToGraph(importPath, "root", graph, visited);
  1117. existingImports[importPath] = rule;
  1118. }
  1119. });
  1120. root.walkDecls(/^composes$/, (declaration) => {
  1121. const multiple = declaration.value.split(",");
  1122. const values = [];
  1123. multiple.forEach((value) => {
  1124. const matches = value.trim().match(matchImports);
  1125. if (!matches) {
  1126. values.push(value);
  1127. return;
  1128. }
  1129. let tmpSymbols;
  1130. let [, symbols, doubleQuotePath, singleQuotePath, global] = matches;
  1131. if (global) tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`);
  1132. else {
  1133. const importPath = doubleQuotePath || singleQuotePath;
  1134. let parent = declaration.parent;
  1135. let parentIndexes = "";
  1136. while (parent.type !== "root") {
  1137. parentIndexes = parent.parent.index(parent) + "_" + parentIndexes;
  1138. parent = parent.parent;
  1139. }
  1140. const { selector } = declaration.parent;
  1141. addImportToGraph(importPath, `_${parentIndexes}${selector}`, graph, visited);
  1142. importDecls[importPath] = declaration;
  1143. imports[importPath] = imports[importPath] || {};
  1144. tmpSymbols = symbols.split(/\s+/).map((s) => {
  1145. if (!imports[importPath][s]) imports[importPath][s] = createImportedName(s, importPath);
  1146. return imports[importPath][s];
  1147. });
  1148. }
  1149. values.push(tmpSymbols.join(" "));
  1150. });
  1151. declaration.value = values.join(", ");
  1152. });
  1153. const importsOrder = topologicalSort(graph, failOnWrongOrder);
  1154. if (importsOrder instanceof Error) throw importDecls[importsOrder.nodes.find((importPath) => importDecls.hasOwnProperty(importPath))].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath) => "`" + importPath + "`").join(", ") + ".", {
  1155. plugin: "postcss-modules-extract-imports",
  1156. word: "composes"
  1157. });
  1158. let lastImportRule;
  1159. importsOrder.forEach((path) => {
  1160. const importedSymbols = imports[path];
  1161. let rule = existingImports[path];
  1162. if (!rule && importedSymbols) {
  1163. rule = postcss.rule({
  1164. selector: `:import("${path}")`,
  1165. raws: { after: "\n" }
  1166. });
  1167. if (lastImportRule) root.insertAfter(lastImportRule, rule);
  1168. else root.prepend(rule);
  1169. }
  1170. lastImportRule = rule;
  1171. if (!importedSymbols) return;
  1172. Object.keys(importedSymbols).forEach((importedSymbol) => {
  1173. rule.append(postcss.decl({
  1174. value: importedSymbol,
  1175. prop: importedSymbols[importedSymbol],
  1176. raws: { before: "\n " }
  1177. }));
  1178. });
  1179. });
  1180. } };
  1181. }
  1182. };
  1183. };
  1184. module.exports.postcss = true;
  1185. }));
  1186. //#endregion
  1187. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js
  1188. var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1189. const MAX_SHORT_STRING = Math.floor(65472 / 4) & -4;
  1190. var WasmHash = class {
  1191. /**
  1192. * @param {WebAssembly.Instance} instance wasm instance
  1193. * @param {WebAssembly.Instance[]} instancesPool pool of instances
  1194. * @param {number} chunkSize size of data chunks passed to wasm
  1195. * @param {number} digestSize size of digest returned by wasm
  1196. */
  1197. constructor(instance, instancesPool, chunkSize, digestSize) {
  1198. const exports$2 = instance.exports;
  1199. exports$2.init();
  1200. this.exports = exports$2;
  1201. this.mem = Buffer.from(exports$2.memory.buffer, 0, 65536);
  1202. this.buffered = 0;
  1203. this.instancesPool = instancesPool;
  1204. this.chunkSize = chunkSize;
  1205. this.digestSize = digestSize;
  1206. }
  1207. reset() {
  1208. this.buffered = 0;
  1209. this.exports.init();
  1210. }
  1211. /**
  1212. * @param {Buffer | string} data data
  1213. * @param {BufferEncoding=} encoding encoding
  1214. * @returns {this} itself
  1215. */
  1216. update(data, encoding) {
  1217. if (typeof data === "string") {
  1218. while (data.length > MAX_SHORT_STRING) {
  1219. this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding);
  1220. data = data.slice(MAX_SHORT_STRING);
  1221. }
  1222. this._updateWithShortString(data, encoding);
  1223. return this;
  1224. }
  1225. this._updateWithBuffer(data);
  1226. return this;
  1227. }
  1228. /**
  1229. * @param {string} data data
  1230. * @param {BufferEncoding=} encoding encoding
  1231. * @returns {void}
  1232. */
  1233. _updateWithShortString(data, encoding) {
  1234. const { exports: exports$3, buffered, mem, chunkSize } = this;
  1235. let endPos;
  1236. if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") {
  1237. endPos = buffered;
  1238. for (let i = 0; i < data.length; i++) {
  1239. const cc = data.charCodeAt(i);
  1240. if (cc < 128) mem[endPos++] = cc;
  1241. else if (cc < 2048) {
  1242. mem[endPos] = cc >> 6 | 192;
  1243. mem[endPos + 1] = cc & 63 | 128;
  1244. endPos += 2;
  1245. } else {
  1246. endPos += mem.write(data.slice(i), endPos, encoding);
  1247. break;
  1248. }
  1249. }
  1250. } else if (encoding === "latin1") {
  1251. endPos = buffered;
  1252. for (let i = 0; i < data.length; i++) {
  1253. const cc = data.charCodeAt(i);
  1254. mem[endPos++] = cc;
  1255. }
  1256. } else endPos = buffered + mem.write(data, buffered, encoding);
  1257. else endPos = buffered + mem.write(data, buffered, encoding);
  1258. if (endPos < chunkSize) this.buffered = endPos;
  1259. else {
  1260. const l = endPos & ~(this.chunkSize - 1);
  1261. exports$3.update(l);
  1262. const newBuffered = endPos - l;
  1263. this.buffered = newBuffered;
  1264. if (newBuffered > 0) mem.copyWithin(0, l, endPos);
  1265. }
  1266. }
  1267. /**
  1268. * @param {Buffer} data data
  1269. * @returns {void}
  1270. */
  1271. _updateWithBuffer(data) {
  1272. const { exports: exports$4, buffered, mem } = this;
  1273. const length = data.length;
  1274. if (buffered + length < this.chunkSize) {
  1275. data.copy(mem, buffered, 0, length);
  1276. this.buffered += length;
  1277. } else {
  1278. const l = buffered + length & ~(this.chunkSize - 1);
  1279. if (l > 65536) {
  1280. let i = 65536 - buffered;
  1281. data.copy(mem, buffered, 0, i);
  1282. exports$4.update(65536);
  1283. const stop = l - buffered - 65536;
  1284. while (i < stop) {
  1285. data.copy(mem, 0, i, i + 65536);
  1286. exports$4.update(65536);
  1287. i += 65536;
  1288. }
  1289. data.copy(mem, 0, i, l - buffered);
  1290. exports$4.update(l - buffered - i);
  1291. } else {
  1292. data.copy(mem, buffered, 0, l - buffered);
  1293. exports$4.update(l);
  1294. }
  1295. const newBuffered = length + buffered - l;
  1296. this.buffered = newBuffered;
  1297. if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length);
  1298. }
  1299. }
  1300. digest(type) {
  1301. const { exports: exports$5, buffered, mem, digestSize } = this;
  1302. exports$5.final(buffered);
  1303. this.instancesPool.push(this);
  1304. const hex = mem.toString("latin1", 0, digestSize);
  1305. if (type === "hex") return hex;
  1306. if (type === "binary" || !type) return Buffer.from(hex, "hex");
  1307. return Buffer.from(hex, "hex").toString(type);
  1308. }
  1309. };
  1310. const create = (wasmModule, instancesPool, chunkSize, digestSize) => {
  1311. if (instancesPool.length > 0) {
  1312. const old = instancesPool.pop();
  1313. old.reset();
  1314. return old;
  1315. } else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
  1316. };
  1317. module.exports = create;
  1318. module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING;
  1319. }));
  1320. //#endregion
  1321. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js
  1322. var require_xxhash64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1323. const create = require_wasm_hash();
  1324. const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64"));
  1325. module.exports = create.bind(null, xxhash64, [], 32, 16);
  1326. }));
  1327. //#endregion
  1328. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js
  1329. var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1330. const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
  1331. var BatchedHash = class {
  1332. constructor(hash) {
  1333. this.string = void 0;
  1334. this.encoding = void 0;
  1335. this.hash = hash;
  1336. }
  1337. /**
  1338. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1339. * @param {string|Buffer} data data
  1340. * @param {string=} inputEncoding data encoding
  1341. * @returns {this} updated hash
  1342. */
  1343. update(data, inputEncoding) {
  1344. if (this.string !== void 0) {
  1345. if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
  1346. this.string += data;
  1347. return this;
  1348. }
  1349. this.hash.update(this.string, this.encoding);
  1350. this.string = void 0;
  1351. }
  1352. if (typeof data === "string") if (data.length < MAX_SHORT_STRING && (!inputEncoding || !inputEncoding.startsWith("ba"))) {
  1353. this.string = data;
  1354. this.encoding = inputEncoding;
  1355. } else this.hash.update(data, inputEncoding);
  1356. else this.hash.update(data);
  1357. return this;
  1358. }
  1359. /**
  1360. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1361. * @param {string=} encoding encoding of the return value
  1362. * @returns {string|Buffer} digest
  1363. */
  1364. digest(encoding) {
  1365. if (this.string !== void 0) this.hash.update(this.string, this.encoding);
  1366. return this.hash.digest(encoding);
  1367. }
  1368. };
  1369. module.exports = BatchedHash;
  1370. }));
  1371. //#endregion
  1372. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js
  1373. var require_md4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1374. const create = require_wasm_hash();
  1375. const md4 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64"));
  1376. module.exports = create.bind(null, md4, [], 64, 32);
  1377. }));
  1378. //#endregion
  1379. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js
  1380. var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1381. const BULK_SIZE = 2e3;
  1382. const digestCaches = {};
  1383. var BulkUpdateDecorator = class {
  1384. /**
  1385. * @param {Hash | function(): Hash} hashOrFactory function to create a hash
  1386. * @param {string=} hashKey key for caching
  1387. */
  1388. constructor(hashOrFactory, hashKey) {
  1389. this.hashKey = hashKey;
  1390. if (typeof hashOrFactory === "function") {
  1391. this.hashFactory = hashOrFactory;
  1392. this.hash = void 0;
  1393. } else {
  1394. this.hashFactory = void 0;
  1395. this.hash = hashOrFactory;
  1396. }
  1397. this.buffer = "";
  1398. }
  1399. /**
  1400. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1401. * @param {string|Buffer} data data
  1402. * @param {string=} inputEncoding data encoding
  1403. * @returns {this} updated hash
  1404. */
  1405. update(data, inputEncoding) {
  1406. if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
  1407. if (this.hash === void 0) this.hash = this.hashFactory();
  1408. if (this.buffer.length > 0) {
  1409. this.hash.update(this.buffer);
  1410. this.buffer = "";
  1411. }
  1412. this.hash.update(data, inputEncoding);
  1413. } else {
  1414. this.buffer += data;
  1415. if (this.buffer.length > BULK_SIZE) {
  1416. if (this.hash === void 0) this.hash = this.hashFactory();
  1417. this.hash.update(this.buffer);
  1418. this.buffer = "";
  1419. }
  1420. }
  1421. return this;
  1422. }
  1423. /**
  1424. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1425. * @param {string=} encoding encoding of the return value
  1426. * @returns {string|Buffer} digest
  1427. */
  1428. digest(encoding) {
  1429. let digestCache;
  1430. const buffer = this.buffer;
  1431. if (this.hash === void 0) {
  1432. const cacheKey = `${this.hashKey}-${encoding}`;
  1433. digestCache = digestCaches[cacheKey];
  1434. if (digestCache === void 0) digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
  1435. const cacheEntry = digestCache.get(buffer);
  1436. if (cacheEntry !== void 0) return cacheEntry;
  1437. this.hash = this.hashFactory();
  1438. }
  1439. if (buffer.length > 0) this.hash.update(buffer);
  1440. const digestResult = this.hash.digest(encoding);
  1441. if (digestCache !== void 0) digestCache.set(buffer, digestResult);
  1442. return digestResult;
  1443. }
  1444. };
  1445. module.exports = BulkUpdateDecorator;
  1446. }));
  1447. //#endregion
  1448. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js
  1449. var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1450. const baseEncodeTables = {
  1451. 26: "abcdefghijklmnopqrstuvwxyz",
  1452. 32: "123456789abcdefghjkmnpqrstuvwxyz",
  1453. 36: "0123456789abcdefghijklmnopqrstuvwxyz",
  1454. 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1455. 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1456. 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1457. 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1458. 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
  1459. };
  1460. /**
  1461. * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian
  1462. * @param {number} divisor The divisor
  1463. * @return {number} Modulo (remainder) of the division
  1464. */
  1465. function divmod32(uint32Array, divisor) {
  1466. let carry = 0;
  1467. for (let i = uint32Array.length - 1; i >= 0; i--) {
  1468. const value = carry * 4294967296 + uint32Array[i];
  1469. carry = value % divisor;
  1470. uint32Array[i] = Math.floor(value / divisor);
  1471. }
  1472. return carry;
  1473. }
  1474. function encodeBufferToBase(buffer, base, length) {
  1475. const encodeTable = baseEncodeTables[base];
  1476. if (!encodeTable) throw new Error("Unknown encoding base" + base);
  1477. const limit = Math.ceil(buffer.length * 8 / Math.log2(base));
  1478. length = Math.min(length, limit);
  1479. const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4));
  1480. buffer.copy(Buffer.from(uint32Array.buffer));
  1481. let output = "";
  1482. for (let i = 0; i < length; i++) output = encodeTable[divmod32(uint32Array, base)] + output;
  1483. return output;
  1484. }
  1485. let crypto = void 0;
  1486. let createXXHash64 = void 0;
  1487. let createMd4 = void 0;
  1488. let BatchedHash = void 0;
  1489. let BulkUpdateDecorator = void 0;
  1490. function getHashDigest(buffer, algorithm, digestType, maxLength) {
  1491. algorithm = algorithm || "xxhash64";
  1492. maxLength = maxLength || 9999;
  1493. let hash;
  1494. if (algorithm === "xxhash64") {
  1495. if (createXXHash64 === void 0) {
  1496. createXXHash64 = require_xxhash64();
  1497. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1498. }
  1499. hash = new BatchedHash(createXXHash64());
  1500. } else if (algorithm === "md4") {
  1501. if (createMd4 === void 0) {
  1502. createMd4 = require_md4();
  1503. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1504. }
  1505. hash = new BatchedHash(createMd4());
  1506. } else if (algorithm === "native-md4") {
  1507. if (typeof crypto === "undefined") {
  1508. crypto = __require("crypto");
  1509. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1510. }
  1511. hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
  1512. } else {
  1513. if (typeof crypto === "undefined") {
  1514. crypto = __require("crypto");
  1515. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1516. }
  1517. hash = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
  1518. }
  1519. hash.update(buffer);
  1520. if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength);
  1521. return hash.digest(digestType || "hex").substr(0, maxLength);
  1522. }
  1523. module.exports = getHashDigest;
  1524. }));
  1525. //#endregion
  1526. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js
  1527. var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1528. const path$1 = __require("path");
  1529. const getHashDigest = require_getHashDigest();
  1530. function interpolateName(loaderContext, name, options = {}) {
  1531. let filename;
  1532. const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
  1533. if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0);
  1534. else filename = name || "[hash].[ext]";
  1535. const context = options.context;
  1536. const content = options.content;
  1537. const regExp = options.regExp;
  1538. let ext = "bin";
  1539. let basename = "file";
  1540. let directory = "";
  1541. let folder = "";
  1542. let query = "";
  1543. if (loaderContext.resourcePath) {
  1544. const parsed = path$1.parse(loaderContext.resourcePath);
  1545. let resourcePath = loaderContext.resourcePath;
  1546. if (parsed.ext) ext = parsed.ext.substr(1);
  1547. if (parsed.dir) {
  1548. basename = parsed.name;
  1549. resourcePath = parsed.dir + path$1.sep;
  1550. }
  1551. if (typeof context !== "undefined") {
  1552. directory = path$1.relative(context, resourcePath + "_").replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1553. directory = directory.substr(0, directory.length - 1);
  1554. } else directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1555. if (directory.length <= 1) directory = "";
  1556. else folder = path$1.basename(directory);
  1557. }
  1558. if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) {
  1559. query = loaderContext.resourceQuery;
  1560. const hashIdx = query.indexOf("#");
  1561. if (hashIdx >= 0) query = query.substr(0, hashIdx);
  1562. }
  1563. let url = filename;
  1564. if (content) url = url.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
  1565. url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
  1566. if (regExp && loaderContext.resourcePath) {
  1567. const match = loaderContext.resourcePath.match(new RegExp(regExp));
  1568. match && match.forEach((matched, i) => {
  1569. url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched);
  1570. });
  1571. }
  1572. if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options);
  1573. return url;
  1574. }
  1575. module.exports = interpolateName;
  1576. }));
  1577. //#endregion
  1578. //#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js
  1579. var require_generic_names = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1580. var interpolateName = require_interpolateName();
  1581. var path = __require("path");
  1582. /**
  1583. * @param {string} pattern
  1584. * @param {object} options
  1585. * @param {string} options.context
  1586. * @param {string} options.hashPrefix
  1587. * @return {function}
  1588. */
  1589. module.exports = function createGenerator(pattern, options) {
  1590. options = options || {};
  1591. var context = options && typeof options.context === "string" ? options.context : process.cwd();
  1592. var hashPrefix = options && typeof options.hashPrefix === "string" ? options.hashPrefix : "";
  1593. /**
  1594. * @param {string} localName Usually a class name
  1595. * @param {string} filepath Absolute path
  1596. * @return {string}
  1597. */
  1598. return function generate(localName, filepath) {
  1599. var name = pattern.replace(/\[local\]/gi, localName);
  1600. return interpolateName({ resourcePath: filepath }, name, {
  1601. content: hashPrefix + path.relative(context, filepath).replace(/\\/g, "/") + "\0" + localName,
  1602. context
  1603. }).replace(/* @__PURE__ */ new RegExp("[^a-zA-Z0-9\\-_\xA0-￿]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1");
  1604. };
  1605. };
  1606. }));
  1607. //#endregion
  1608. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/unesc.js
  1609. var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1610. exports.__esModule = true;
  1611. exports["default"] = unesc;
  1612. /**
  1613. *
  1614. * @param {string} str
  1615. * @returns {[string, number]|undefined}
  1616. */
  1617. function gobbleHex(str) {
  1618. var lower = str.toLowerCase();
  1619. var hex = "";
  1620. var spaceTerminated = false;
  1621. for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
  1622. var code = lower.charCodeAt(i);
  1623. var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
  1624. spaceTerminated = code === 32;
  1625. if (!valid) break;
  1626. hex += lower[i];
  1627. }
  1628. if (hex.length === 0) return;
  1629. var codePoint = parseInt(hex, 16);
  1630. if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex.length + (spaceTerminated ? 1 : 0)];
  1631. return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
  1632. }
  1633. var CONTAINS_ESCAPE = /\\/;
  1634. function unesc(str) {
  1635. if (!CONTAINS_ESCAPE.test(str)) return str;
  1636. var ret = "";
  1637. for (var i = 0; i < str.length; i++) {
  1638. if (str[i] === "\\") {
  1639. var gobbled = gobbleHex(str.slice(i + 1, i + 7));
  1640. if (gobbled !== void 0) {
  1641. ret += gobbled[0];
  1642. i += gobbled[1];
  1643. continue;
  1644. }
  1645. if (str[i + 1] === "\\") {
  1646. ret += "\\";
  1647. i++;
  1648. continue;
  1649. }
  1650. if (str.length === i + 1) ret += str[i];
  1651. continue;
  1652. }
  1653. ret += str[i];
  1654. }
  1655. return ret;
  1656. }
  1657. module.exports = exports.default;
  1658. }));
  1659. //#endregion
  1660. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/getProp.js
  1661. var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1662. exports.__esModule = true;
  1663. exports["default"] = getProp;
  1664. function getProp(obj) {
  1665. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1666. while (props.length > 0) {
  1667. var prop = props.shift();
  1668. if (!obj[prop]) return;
  1669. obj = obj[prop];
  1670. }
  1671. return obj;
  1672. }
  1673. module.exports = exports.default;
  1674. }));
  1675. //#endregion
  1676. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/ensureObject.js
  1677. var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1678. exports.__esModule = true;
  1679. exports["default"] = ensureObject;
  1680. function ensureObject(obj) {
  1681. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1682. while (props.length > 0) {
  1683. var prop = props.shift();
  1684. if (!obj[prop]) obj[prop] = {};
  1685. obj = obj[prop];
  1686. }
  1687. }
  1688. module.exports = exports.default;
  1689. }));
  1690. //#endregion
  1691. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/stripComments.js
  1692. var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1693. exports.__esModule = true;
  1694. exports["default"] = stripComments;
  1695. function stripComments(str) {
  1696. var s = "";
  1697. var commentStart = str.indexOf("/*");
  1698. var lastEnd = 0;
  1699. while (commentStart >= 0) {
  1700. s = s + str.slice(lastEnd, commentStart);
  1701. var commentEnd = str.indexOf("*/", commentStart + 2);
  1702. if (commentEnd < 0) return s;
  1703. lastEnd = commentEnd + 2;
  1704. commentStart = str.indexOf("/*", lastEnd);
  1705. }
  1706. s = s + str.slice(lastEnd);
  1707. return s;
  1708. }
  1709. module.exports = exports.default;
  1710. }));
  1711. //#endregion
  1712. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/index.js
  1713. var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
  1714. exports.__esModule = true;
  1715. exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
  1716. exports.unesc = _interopRequireDefault(require_unesc())["default"];
  1717. exports.getProp = _interopRequireDefault(require_getProp())["default"];
  1718. exports.ensureObject = _interopRequireDefault(require_ensureObject())["default"];
  1719. exports.stripComments = _interopRequireDefault(require_stripComments())["default"];
  1720. function _interopRequireDefault(obj) {
  1721. return obj && obj.__esModule ? obj : { "default": obj };
  1722. }
  1723. }));
  1724. //#endregion
  1725. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/node.js
  1726. var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1727. exports.__esModule = true;
  1728. exports["default"] = void 0;
  1729. var _util = require_util();
  1730. function _defineProperties(target, props) {
  1731. for (var i = 0; i < props.length; i++) {
  1732. var descriptor = props[i];
  1733. descriptor.enumerable = descriptor.enumerable || false;
  1734. descriptor.configurable = true;
  1735. if ("value" in descriptor) descriptor.writable = true;
  1736. Object.defineProperty(target, descriptor.key, descriptor);
  1737. }
  1738. }
  1739. function _createClass(Constructor, protoProps, staticProps) {
  1740. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1741. if (staticProps) _defineProperties(Constructor, staticProps);
  1742. Object.defineProperty(Constructor, "prototype", { writable: false });
  1743. return Constructor;
  1744. }
  1745. var cloneNode = function cloneNode(obj, parent) {
  1746. if (typeof obj !== "object" || obj === null) return obj;
  1747. var cloned = new obj.constructor();
  1748. for (var i in obj) {
  1749. if (!obj.hasOwnProperty(i)) continue;
  1750. var value = obj[i];
  1751. if (i === "parent" && typeof value === "object") {
  1752. if (parent) cloned[i] = parent;
  1753. } else if (value instanceof Array) cloned[i] = value.map(function(j) {
  1754. return cloneNode(j, cloned);
  1755. });
  1756. else cloned[i] = cloneNode(value, cloned);
  1757. }
  1758. return cloned;
  1759. };
  1760. exports["default"] = /* @__PURE__ */ function() {
  1761. function Node(opts) {
  1762. if (opts === void 0) opts = {};
  1763. Object.assign(this, opts);
  1764. this.spaces = this.spaces || {};
  1765. this.spaces.before = this.spaces.before || "";
  1766. this.spaces.after = this.spaces.after || "";
  1767. }
  1768. var _proto = Node.prototype;
  1769. _proto.remove = function remove() {
  1770. if (this.parent) this.parent.removeChild(this);
  1771. this.parent = void 0;
  1772. return this;
  1773. };
  1774. _proto.replaceWith = function replaceWith() {
  1775. if (this.parent) {
  1776. for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
  1777. this.remove();
  1778. }
  1779. return this;
  1780. };
  1781. _proto.next = function next() {
  1782. return this.parent.at(this.parent.index(this) + 1);
  1783. };
  1784. _proto.prev = function prev() {
  1785. return this.parent.at(this.parent.index(this) - 1);
  1786. };
  1787. _proto.clone = function clone(overrides) {
  1788. if (overrides === void 0) overrides = {};
  1789. var cloned = cloneNode(this);
  1790. for (var name in overrides) cloned[name] = overrides[name];
  1791. return cloned;
  1792. };
  1793. _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
  1794. if (!this.raws) this.raws = {};
  1795. var originalValue = this[name];
  1796. var originalEscaped = this.raws[name];
  1797. this[name] = originalValue + value;
  1798. if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
  1799. else delete this.raws[name];
  1800. };
  1801. _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
  1802. if (!this.raws) this.raws = {};
  1803. this[name] = value;
  1804. this.raws[name] = valueEscaped;
  1805. };
  1806. _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
  1807. this[name] = value;
  1808. if (this.raws) delete this.raws[name];
  1809. };
  1810. _proto.isAtPosition = function isAtPosition(line, column) {
  1811. if (this.source && this.source.start && this.source.end) {
  1812. if (this.source.start.line > line) return false;
  1813. if (this.source.end.line < line) return false;
  1814. if (this.source.start.line === line && this.source.start.column > column) return false;
  1815. if (this.source.end.line === line && this.source.end.column < column) return false;
  1816. return true;
  1817. }
  1818. };
  1819. _proto.stringifyProperty = function stringifyProperty(name) {
  1820. return this.raws && this.raws[name] || this[name];
  1821. };
  1822. _proto.valueToString = function valueToString() {
  1823. return String(this.stringifyProperty("value"));
  1824. };
  1825. _proto.toString = function toString() {
  1826. return [
  1827. this.rawSpaceBefore,
  1828. this.valueToString(),
  1829. this.rawSpaceAfter
  1830. ].join("");
  1831. };
  1832. _createClass(Node, [{
  1833. key: "rawSpaceBefore",
  1834. get: function get() {
  1835. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
  1836. if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
  1837. return rawSpace || "";
  1838. },
  1839. set: function set(raw) {
  1840. (0, _util.ensureObject)(this, "raws", "spaces");
  1841. this.raws.spaces.before = raw;
  1842. }
  1843. }, {
  1844. key: "rawSpaceAfter",
  1845. get: function get() {
  1846. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
  1847. if (rawSpace === void 0) rawSpace = this.spaces.after;
  1848. return rawSpace || "";
  1849. },
  1850. set: function set(raw) {
  1851. (0, _util.ensureObject)(this, "raws", "spaces");
  1852. this.raws.spaces.after = raw;
  1853. }
  1854. }]);
  1855. return Node;
  1856. }();
  1857. module.exports = exports.default;
  1858. }));
  1859. //#endregion
  1860. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/types.js
  1861. var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
  1862. exports.__esModule = true;
  1863. exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
  1864. exports.TAG = "tag";
  1865. exports.STRING = "string";
  1866. exports.SELECTOR = "selector";
  1867. exports.ROOT = "root";
  1868. exports.PSEUDO = "pseudo";
  1869. exports.NESTING = "nesting";
  1870. exports.ID = "id";
  1871. exports.COMMENT = "comment";
  1872. exports.COMBINATOR = "combinator";
  1873. exports.CLASS = "class";
  1874. exports.ATTRIBUTE = "attribute";
  1875. exports.UNIVERSAL = "universal";
  1876. }));
  1877. //#endregion
  1878. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/container.js
  1879. var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1880. exports.__esModule = true;
  1881. exports["default"] = void 0;
  1882. var _node = _interopRequireDefault(require_node$1());
  1883. var types = _interopRequireWildcard(require_types());
  1884. function _getRequireWildcardCache(nodeInterop) {
  1885. if (typeof WeakMap !== "function") return null;
  1886. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  1887. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  1888. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  1889. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  1890. })(nodeInterop);
  1891. }
  1892. function _interopRequireWildcard(obj, nodeInterop) {
  1893. if (!nodeInterop && obj && obj.__esModule) return obj;
  1894. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  1895. var cache = _getRequireWildcardCache(nodeInterop);
  1896. if (cache && cache.has(obj)) return cache.get(obj);
  1897. var newObj = {};
  1898. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  1899. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  1900. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  1901. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  1902. else newObj[key] = obj[key];
  1903. }
  1904. newObj["default"] = obj;
  1905. if (cache) cache.set(obj, newObj);
  1906. return newObj;
  1907. }
  1908. function _interopRequireDefault(obj) {
  1909. return obj && obj.__esModule ? obj : { "default": obj };
  1910. }
  1911. function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  1912. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  1913. if (it) return (it = it.call(o)).next.bind(it);
  1914. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  1915. if (it) o = it;
  1916. var i = 0;
  1917. return function() {
  1918. if (i >= o.length) return { done: true };
  1919. return {
  1920. done: false,
  1921. value: o[i++]
  1922. };
  1923. };
  1924. }
  1925. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  1926. }
  1927. function _unsupportedIterableToArray(o, minLen) {
  1928. if (!o) return;
  1929. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  1930. var n = Object.prototype.toString.call(o).slice(8, -1);
  1931. if (n === "Object" && o.constructor) n = o.constructor.name;
  1932. if (n === "Map" || n === "Set") return Array.from(o);
  1933. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  1934. }
  1935. function _arrayLikeToArray(arr, len) {
  1936. if (len == null || len > arr.length) len = arr.length;
  1937. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  1938. return arr2;
  1939. }
  1940. function _defineProperties(target, props) {
  1941. for (var i = 0; i < props.length; i++) {
  1942. var descriptor = props[i];
  1943. descriptor.enumerable = descriptor.enumerable || false;
  1944. descriptor.configurable = true;
  1945. if ("value" in descriptor) descriptor.writable = true;
  1946. Object.defineProperty(target, descriptor.key, descriptor);
  1947. }
  1948. }
  1949. function _createClass(Constructor, protoProps, staticProps) {
  1950. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1951. if (staticProps) _defineProperties(Constructor, staticProps);
  1952. Object.defineProperty(Constructor, "prototype", { writable: false });
  1953. return Constructor;
  1954. }
  1955. function _inheritsLoose(subClass, superClass) {
  1956. subClass.prototype = Object.create(superClass.prototype);
  1957. subClass.prototype.constructor = subClass;
  1958. _setPrototypeOf(subClass, superClass);
  1959. }
  1960. function _setPrototypeOf(o, p) {
  1961. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1962. o.__proto__ = p;
  1963. return o;
  1964. };
  1965. return _setPrototypeOf(o, p);
  1966. }
  1967. exports["default"] = /* @__PURE__ */ function(_Node) {
  1968. _inheritsLoose(Container, _Node);
  1969. function Container(opts) {
  1970. var _this = _Node.call(this, opts) || this;
  1971. if (!_this.nodes) _this.nodes = [];
  1972. return _this;
  1973. }
  1974. var _proto = Container.prototype;
  1975. _proto.append = function append(selector) {
  1976. selector.parent = this;
  1977. this.nodes.push(selector);
  1978. return this;
  1979. };
  1980. _proto.prepend = function prepend(selector) {
  1981. selector.parent = this;
  1982. this.nodes.unshift(selector);
  1983. for (var id in this.indexes) this.indexes[id]++;
  1984. return this;
  1985. };
  1986. _proto.at = function at(index) {
  1987. return this.nodes[index];
  1988. };
  1989. _proto.index = function index(child) {
  1990. if (typeof child === "number") return child;
  1991. return this.nodes.indexOf(child);
  1992. };
  1993. _proto.removeChild = function removeChild(child) {
  1994. child = this.index(child);
  1995. this.at(child).parent = void 0;
  1996. this.nodes.splice(child, 1);
  1997. var index;
  1998. for (var id in this.indexes) {
  1999. index = this.indexes[id];
  2000. if (index >= child) this.indexes[id] = index - 1;
  2001. }
  2002. return this;
  2003. };
  2004. _proto.removeAll = function removeAll() {
  2005. for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
  2006. var node = _step.value;
  2007. node.parent = void 0;
  2008. }
  2009. this.nodes = [];
  2010. return this;
  2011. };
  2012. _proto.empty = function empty() {
  2013. return this.removeAll();
  2014. };
  2015. _proto.insertAfter = function insertAfter(oldNode, newNode) {
  2016. var _this$nodes;
  2017. newNode.parent = this;
  2018. var oldIndex = this.index(oldNode);
  2019. var resetNode = [];
  2020. for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
  2021. (_this$nodes = this.nodes).splice.apply(_this$nodes, [
  2022. oldIndex + 1,
  2023. 0,
  2024. newNode
  2025. ].concat(resetNode));
  2026. newNode.parent = this;
  2027. var index;
  2028. for (var id in this.indexes) {
  2029. index = this.indexes[id];
  2030. if (oldIndex < index) this.indexes[id] = index + arguments.length - 1;
  2031. }
  2032. return this;
  2033. };
  2034. _proto.insertBefore = function insertBefore(oldNode, newNode) {
  2035. var _this$nodes2;
  2036. newNode.parent = this;
  2037. var oldIndex = this.index(oldNode);
  2038. var resetNode = [];
  2039. for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
  2040. (_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
  2041. oldIndex,
  2042. 0,
  2043. newNode
  2044. ].concat(resetNode));
  2045. newNode.parent = this;
  2046. var index;
  2047. for (var id in this.indexes) {
  2048. index = this.indexes[id];
  2049. if (index >= oldIndex) this.indexes[id] = index + arguments.length - 1;
  2050. }
  2051. return this;
  2052. };
  2053. _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
  2054. var found = void 0;
  2055. this.each(function(node) {
  2056. if (node.atPosition) {
  2057. var foundChild = node.atPosition(line, col);
  2058. if (foundChild) {
  2059. found = foundChild;
  2060. return false;
  2061. }
  2062. } else if (node.isAtPosition(line, col)) {
  2063. found = node;
  2064. return false;
  2065. }
  2066. });
  2067. return found;
  2068. };
  2069. _proto.atPosition = function atPosition(line, col) {
  2070. if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
  2071. else return;
  2072. };
  2073. _proto._inferEndPosition = function _inferEndPosition() {
  2074. if (this.last && this.last.source && this.last.source.end) {
  2075. this.source = this.source || {};
  2076. this.source.end = this.source.end || {};
  2077. Object.assign(this.source.end, this.last.source.end);
  2078. }
  2079. };
  2080. _proto.each = function each(callback) {
  2081. if (!this.lastEach) this.lastEach = 0;
  2082. if (!this.indexes) this.indexes = {};
  2083. this.lastEach++;
  2084. var id = this.lastEach;
  2085. this.indexes[id] = 0;
  2086. if (!this.length) return;
  2087. var index, result;
  2088. while (this.indexes[id] < this.length) {
  2089. index = this.indexes[id];
  2090. result = callback(this.at(index), index);
  2091. if (result === false) break;
  2092. this.indexes[id] += 1;
  2093. }
  2094. delete this.indexes[id];
  2095. if (result === false) return false;
  2096. };
  2097. _proto.walk = function walk(callback) {
  2098. return this.each(function(node, i) {
  2099. var result = callback(node, i);
  2100. if (result !== false && node.length) result = node.walk(callback);
  2101. if (result === false) return false;
  2102. });
  2103. };
  2104. _proto.walkAttributes = function walkAttributes(callback) {
  2105. var _this2 = this;
  2106. return this.walk(function(selector) {
  2107. if (selector.type === types.ATTRIBUTE) return callback.call(_this2, selector);
  2108. });
  2109. };
  2110. _proto.walkClasses = function walkClasses(callback) {
  2111. var _this3 = this;
  2112. return this.walk(function(selector) {
  2113. if (selector.type === types.CLASS) return callback.call(_this3, selector);
  2114. });
  2115. };
  2116. _proto.walkCombinators = function walkCombinators(callback) {
  2117. var _this4 = this;
  2118. return this.walk(function(selector) {
  2119. if (selector.type === types.COMBINATOR) return callback.call(_this4, selector);
  2120. });
  2121. };
  2122. _proto.walkComments = function walkComments(callback) {
  2123. var _this5 = this;
  2124. return this.walk(function(selector) {
  2125. if (selector.type === types.COMMENT) return callback.call(_this5, selector);
  2126. });
  2127. };
  2128. _proto.walkIds = function walkIds(callback) {
  2129. var _this6 = this;
  2130. return this.walk(function(selector) {
  2131. if (selector.type === types.ID) return callback.call(_this6, selector);
  2132. });
  2133. };
  2134. _proto.walkNesting = function walkNesting(callback) {
  2135. var _this7 = this;
  2136. return this.walk(function(selector) {
  2137. if (selector.type === types.NESTING) return callback.call(_this7, selector);
  2138. });
  2139. };
  2140. _proto.walkPseudos = function walkPseudos(callback) {
  2141. var _this8 = this;
  2142. return this.walk(function(selector) {
  2143. if (selector.type === types.PSEUDO) return callback.call(_this8, selector);
  2144. });
  2145. };
  2146. _proto.walkTags = function walkTags(callback) {
  2147. var _this9 = this;
  2148. return this.walk(function(selector) {
  2149. if (selector.type === types.TAG) return callback.call(_this9, selector);
  2150. });
  2151. };
  2152. _proto.walkUniversals = function walkUniversals(callback) {
  2153. var _this10 = this;
  2154. return this.walk(function(selector) {
  2155. if (selector.type === types.UNIVERSAL) return callback.call(_this10, selector);
  2156. });
  2157. };
  2158. _proto.split = function split(callback) {
  2159. var _this11 = this;
  2160. var current = [];
  2161. return this.reduce(function(memo, node, index) {
  2162. var split = callback.call(_this11, node);
  2163. current.push(node);
  2164. if (split) {
  2165. memo.push(current);
  2166. current = [];
  2167. } else if (index === _this11.length - 1) memo.push(current);
  2168. return memo;
  2169. }, []);
  2170. };
  2171. _proto.map = function map(callback) {
  2172. return this.nodes.map(callback);
  2173. };
  2174. _proto.reduce = function reduce(callback, memo) {
  2175. return this.nodes.reduce(callback, memo);
  2176. };
  2177. _proto.every = function every(callback) {
  2178. return this.nodes.every(callback);
  2179. };
  2180. _proto.some = function some(callback) {
  2181. return this.nodes.some(callback);
  2182. };
  2183. _proto.filter = function filter(callback) {
  2184. return this.nodes.filter(callback);
  2185. };
  2186. _proto.sort = function sort(callback) {
  2187. return this.nodes.sort(callback);
  2188. };
  2189. _proto.toString = function toString() {
  2190. return this.map(String).join("");
  2191. };
  2192. _createClass(Container, [
  2193. {
  2194. key: "first",
  2195. get: function get() {
  2196. return this.at(0);
  2197. }
  2198. },
  2199. {
  2200. key: "last",
  2201. get: function get() {
  2202. return this.at(this.length - 1);
  2203. }
  2204. },
  2205. {
  2206. key: "length",
  2207. get: function get() {
  2208. return this.nodes.length;
  2209. }
  2210. }
  2211. ]);
  2212. return Container;
  2213. }(_node["default"]);
  2214. module.exports = exports.default;
  2215. }));
  2216. //#endregion
  2217. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/root.js
  2218. var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2219. exports.__esModule = true;
  2220. exports["default"] = void 0;
  2221. var _container = _interopRequireDefault(require_container());
  2222. var _types = require_types();
  2223. function _interopRequireDefault(obj) {
  2224. return obj && obj.__esModule ? obj : { "default": obj };
  2225. }
  2226. function _defineProperties(target, props) {
  2227. for (var i = 0; i < props.length; i++) {
  2228. var descriptor = props[i];
  2229. descriptor.enumerable = descriptor.enumerable || false;
  2230. descriptor.configurable = true;
  2231. if ("value" in descriptor) descriptor.writable = true;
  2232. Object.defineProperty(target, descriptor.key, descriptor);
  2233. }
  2234. }
  2235. function _createClass(Constructor, protoProps, staticProps) {
  2236. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2237. if (staticProps) _defineProperties(Constructor, staticProps);
  2238. Object.defineProperty(Constructor, "prototype", { writable: false });
  2239. return Constructor;
  2240. }
  2241. function _inheritsLoose(subClass, superClass) {
  2242. subClass.prototype = Object.create(superClass.prototype);
  2243. subClass.prototype.constructor = subClass;
  2244. _setPrototypeOf(subClass, superClass);
  2245. }
  2246. function _setPrototypeOf(o, p) {
  2247. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2248. o.__proto__ = p;
  2249. return o;
  2250. };
  2251. return _setPrototypeOf(o, p);
  2252. }
  2253. exports["default"] = /* @__PURE__ */ function(_Container) {
  2254. _inheritsLoose(Root, _Container);
  2255. function Root(opts) {
  2256. var _this = _Container.call(this, opts) || this;
  2257. _this.type = _types.ROOT;
  2258. return _this;
  2259. }
  2260. var _proto = Root.prototype;
  2261. _proto.toString = function toString() {
  2262. var str = this.reduce(function(memo, selector) {
  2263. memo.push(String(selector));
  2264. return memo;
  2265. }, []).join(",");
  2266. return this.trailingComma ? str + "," : str;
  2267. };
  2268. _proto.error = function error(message, options) {
  2269. if (this._error) return this._error(message, options);
  2270. else return new Error(message);
  2271. };
  2272. _createClass(Root, [{
  2273. key: "errorGenerator",
  2274. set: function set(handler) {
  2275. this._error = handler;
  2276. }
  2277. }]);
  2278. return Root;
  2279. }(_container["default"]);
  2280. module.exports = exports.default;
  2281. }));
  2282. //#endregion
  2283. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/selector.js
  2284. var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2285. exports.__esModule = true;
  2286. exports["default"] = void 0;
  2287. var _container = _interopRequireDefault(require_container());
  2288. var _types = require_types();
  2289. function _interopRequireDefault(obj) {
  2290. return obj && obj.__esModule ? obj : { "default": obj };
  2291. }
  2292. function _inheritsLoose(subClass, superClass) {
  2293. subClass.prototype = Object.create(superClass.prototype);
  2294. subClass.prototype.constructor = subClass;
  2295. _setPrototypeOf(subClass, superClass);
  2296. }
  2297. function _setPrototypeOf(o, p) {
  2298. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2299. o.__proto__ = p;
  2300. return o;
  2301. };
  2302. return _setPrototypeOf(o, p);
  2303. }
  2304. exports["default"] = /* @__PURE__ */ function(_Container) {
  2305. _inheritsLoose(Selector, _Container);
  2306. function Selector(opts) {
  2307. var _this = _Container.call(this, opts) || this;
  2308. _this.type = _types.SELECTOR;
  2309. return _this;
  2310. }
  2311. return Selector;
  2312. }(_container["default"]);
  2313. module.exports = exports.default;
  2314. }));
  2315. //#endregion
  2316. //#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
  2317. /*! https://mths.be/cssesc v3.0.0 by @mathias */
  2318. var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2319. var hasOwnProperty = {}.hasOwnProperty;
  2320. var merge = function merge(options, defaults) {
  2321. if (!options) return defaults;
  2322. var result = {};
  2323. for (var key in defaults) result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
  2324. return result;
  2325. };
  2326. var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
  2327. var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
  2328. var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
  2329. var cssesc = function cssesc(string, options) {
  2330. options = merge(options, cssesc.options);
  2331. if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
  2332. var quote = options.quotes == "double" ? "\"" : "'";
  2333. var isIdentifier = options.isIdentifier;
  2334. var firstChar = string.charAt(0);
  2335. var output = "";
  2336. var counter = 0;
  2337. var length = string.length;
  2338. while (counter < length) {
  2339. var character = string.charAt(counter++);
  2340. var codePoint = character.charCodeAt();
  2341. var value = void 0;
  2342. if (codePoint < 32 || codePoint > 126) {
  2343. if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
  2344. var extra = string.charCodeAt(counter++);
  2345. if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
  2346. else counter--;
  2347. }
  2348. value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2349. } else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
  2350. else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2351. else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2352. else if (character == "\\" || !isIdentifier && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) value = "\\" + character;
  2353. else value = character;
  2354. output += value;
  2355. }
  2356. if (isIdentifier) {
  2357. if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
  2358. else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
  2359. }
  2360. output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
  2361. if ($1 && $1.length % 2) return $0;
  2362. return ($1 || "") + $2;
  2363. });
  2364. if (!isIdentifier && options.wrap) return quote + output + quote;
  2365. return output;
  2366. };
  2367. cssesc.options = {
  2368. "escapeEverything": false,
  2369. "isIdentifier": false,
  2370. "quotes": "single",
  2371. "wrap": false
  2372. };
  2373. cssesc.version = "3.0.0";
  2374. module.exports = cssesc;
  2375. }));
  2376. //#endregion
  2377. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/className.js
  2378. var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2379. exports.__esModule = true;
  2380. exports["default"] = void 0;
  2381. var _cssesc = _interopRequireDefault(require_cssesc());
  2382. var _util = require_util();
  2383. var _node = _interopRequireDefault(require_node$1());
  2384. var _types = require_types();
  2385. function _interopRequireDefault(obj) {
  2386. return obj && obj.__esModule ? obj : { "default": obj };
  2387. }
  2388. function _defineProperties(target, props) {
  2389. for (var i = 0; i < props.length; i++) {
  2390. var descriptor = props[i];
  2391. descriptor.enumerable = descriptor.enumerable || false;
  2392. descriptor.configurable = true;
  2393. if ("value" in descriptor) descriptor.writable = true;
  2394. Object.defineProperty(target, descriptor.key, descriptor);
  2395. }
  2396. }
  2397. function _createClass(Constructor, protoProps, staticProps) {
  2398. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2399. if (staticProps) _defineProperties(Constructor, staticProps);
  2400. Object.defineProperty(Constructor, "prototype", { writable: false });
  2401. return Constructor;
  2402. }
  2403. function _inheritsLoose(subClass, superClass) {
  2404. subClass.prototype = Object.create(superClass.prototype);
  2405. subClass.prototype.constructor = subClass;
  2406. _setPrototypeOf(subClass, superClass);
  2407. }
  2408. function _setPrototypeOf(o, p) {
  2409. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2410. o.__proto__ = p;
  2411. return o;
  2412. };
  2413. return _setPrototypeOf(o, p);
  2414. }
  2415. exports["default"] = /* @__PURE__ */ function(_Node) {
  2416. _inheritsLoose(ClassName, _Node);
  2417. function ClassName(opts) {
  2418. var _this = _Node.call(this, opts) || this;
  2419. _this.type = _types.CLASS;
  2420. _this._constructed = true;
  2421. return _this;
  2422. }
  2423. var _proto = ClassName.prototype;
  2424. _proto.valueToString = function valueToString() {
  2425. return "." + _Node.prototype.valueToString.call(this);
  2426. };
  2427. _createClass(ClassName, [{
  2428. key: "value",
  2429. get: function get() {
  2430. return this._value;
  2431. },
  2432. set: function set(v) {
  2433. if (this._constructed) {
  2434. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2435. if (escaped !== v) {
  2436. (0, _util.ensureObject)(this, "raws");
  2437. this.raws.value = escaped;
  2438. } else if (this.raws) delete this.raws.value;
  2439. }
  2440. this._value = v;
  2441. }
  2442. }]);
  2443. return ClassName;
  2444. }(_node["default"]);
  2445. module.exports = exports.default;
  2446. }));
  2447. //#endregion
  2448. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/comment.js
  2449. var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2450. exports.__esModule = true;
  2451. exports["default"] = void 0;
  2452. var _node = _interopRequireDefault(require_node$1());
  2453. var _types = require_types();
  2454. function _interopRequireDefault(obj) {
  2455. return obj && obj.__esModule ? obj : { "default": obj };
  2456. }
  2457. function _inheritsLoose(subClass, superClass) {
  2458. subClass.prototype = Object.create(superClass.prototype);
  2459. subClass.prototype.constructor = subClass;
  2460. _setPrototypeOf(subClass, superClass);
  2461. }
  2462. function _setPrototypeOf(o, p) {
  2463. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2464. o.__proto__ = p;
  2465. return o;
  2466. };
  2467. return _setPrototypeOf(o, p);
  2468. }
  2469. exports["default"] = /* @__PURE__ */ function(_Node) {
  2470. _inheritsLoose(Comment, _Node);
  2471. function Comment(opts) {
  2472. var _this = _Node.call(this, opts) || this;
  2473. _this.type = _types.COMMENT;
  2474. return _this;
  2475. }
  2476. return Comment;
  2477. }(_node["default"]);
  2478. module.exports = exports.default;
  2479. }));
  2480. //#endregion
  2481. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/id.js
  2482. var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2483. exports.__esModule = true;
  2484. exports["default"] = void 0;
  2485. var _node = _interopRequireDefault(require_node$1());
  2486. var _types = require_types();
  2487. function _interopRequireDefault(obj) {
  2488. return obj && obj.__esModule ? obj : { "default": obj };
  2489. }
  2490. function _inheritsLoose(subClass, superClass) {
  2491. subClass.prototype = Object.create(superClass.prototype);
  2492. subClass.prototype.constructor = subClass;
  2493. _setPrototypeOf(subClass, superClass);
  2494. }
  2495. function _setPrototypeOf(o, p) {
  2496. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2497. o.__proto__ = p;
  2498. return o;
  2499. };
  2500. return _setPrototypeOf(o, p);
  2501. }
  2502. exports["default"] = /* @__PURE__ */ function(_Node) {
  2503. _inheritsLoose(ID, _Node);
  2504. function ID(opts) {
  2505. var _this = _Node.call(this, opts) || this;
  2506. _this.type = _types.ID;
  2507. return _this;
  2508. }
  2509. var _proto = ID.prototype;
  2510. _proto.valueToString = function valueToString() {
  2511. return "#" + _Node.prototype.valueToString.call(this);
  2512. };
  2513. return ID;
  2514. }(_node["default"]);
  2515. module.exports = exports.default;
  2516. }));
  2517. //#endregion
  2518. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/namespace.js
  2519. var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2520. exports.__esModule = true;
  2521. exports["default"] = void 0;
  2522. var _cssesc = _interopRequireDefault(require_cssesc());
  2523. var _util = require_util();
  2524. var _node = _interopRequireDefault(require_node$1());
  2525. function _interopRequireDefault(obj) {
  2526. return obj && obj.__esModule ? obj : { "default": obj };
  2527. }
  2528. function _defineProperties(target, props) {
  2529. for (var i = 0; i < props.length; i++) {
  2530. var descriptor = props[i];
  2531. descriptor.enumerable = descriptor.enumerable || false;
  2532. descriptor.configurable = true;
  2533. if ("value" in descriptor) descriptor.writable = true;
  2534. Object.defineProperty(target, descriptor.key, descriptor);
  2535. }
  2536. }
  2537. function _createClass(Constructor, protoProps, staticProps) {
  2538. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2539. if (staticProps) _defineProperties(Constructor, staticProps);
  2540. Object.defineProperty(Constructor, "prototype", { writable: false });
  2541. return Constructor;
  2542. }
  2543. function _inheritsLoose(subClass, superClass) {
  2544. subClass.prototype = Object.create(superClass.prototype);
  2545. subClass.prototype.constructor = subClass;
  2546. _setPrototypeOf(subClass, superClass);
  2547. }
  2548. function _setPrototypeOf(o, p) {
  2549. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2550. o.__proto__ = p;
  2551. return o;
  2552. };
  2553. return _setPrototypeOf(o, p);
  2554. }
  2555. exports["default"] = /* @__PURE__ */ function(_Node) {
  2556. _inheritsLoose(Namespace, _Node);
  2557. function Namespace() {
  2558. return _Node.apply(this, arguments) || this;
  2559. }
  2560. var _proto = Namespace.prototype;
  2561. _proto.qualifiedName = function qualifiedName(value) {
  2562. if (this.namespace) return this.namespaceString + "|" + value;
  2563. else return value;
  2564. };
  2565. _proto.valueToString = function valueToString() {
  2566. return this.qualifiedName(_Node.prototype.valueToString.call(this));
  2567. };
  2568. _createClass(Namespace, [
  2569. {
  2570. key: "namespace",
  2571. get: function get() {
  2572. return this._namespace;
  2573. },
  2574. set: function set(namespace) {
  2575. if (namespace === true || namespace === "*" || namespace === "&") {
  2576. this._namespace = namespace;
  2577. if (this.raws) delete this.raws.namespace;
  2578. return;
  2579. }
  2580. var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true });
  2581. this._namespace = namespace;
  2582. if (escaped !== namespace) {
  2583. (0, _util.ensureObject)(this, "raws");
  2584. this.raws.namespace = escaped;
  2585. } else if (this.raws) delete this.raws.namespace;
  2586. }
  2587. },
  2588. {
  2589. key: "ns",
  2590. get: function get() {
  2591. return this._namespace;
  2592. },
  2593. set: function set(namespace) {
  2594. this.namespace = namespace;
  2595. }
  2596. },
  2597. {
  2598. key: "namespaceString",
  2599. get: function get() {
  2600. if (this.namespace) {
  2601. var ns = this.stringifyProperty("namespace");
  2602. if (ns === true) return "";
  2603. else return ns;
  2604. } else return "";
  2605. }
  2606. }
  2607. ]);
  2608. return Namespace;
  2609. }(_node["default"]);
  2610. module.exports = exports.default;
  2611. }));
  2612. //#endregion
  2613. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/tag.js
  2614. var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2615. exports.__esModule = true;
  2616. exports["default"] = void 0;
  2617. var _namespace = _interopRequireDefault(require_namespace());
  2618. var _types = require_types();
  2619. function _interopRequireDefault(obj) {
  2620. return obj && obj.__esModule ? obj : { "default": obj };
  2621. }
  2622. function _inheritsLoose(subClass, superClass) {
  2623. subClass.prototype = Object.create(superClass.prototype);
  2624. subClass.prototype.constructor = subClass;
  2625. _setPrototypeOf(subClass, superClass);
  2626. }
  2627. function _setPrototypeOf(o, p) {
  2628. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2629. o.__proto__ = p;
  2630. return o;
  2631. };
  2632. return _setPrototypeOf(o, p);
  2633. }
  2634. exports["default"] = /* @__PURE__ */ function(_Namespace) {
  2635. _inheritsLoose(Tag, _Namespace);
  2636. function Tag(opts) {
  2637. var _this = _Namespace.call(this, opts) || this;
  2638. _this.type = _types.TAG;
  2639. return _this;
  2640. }
  2641. return Tag;
  2642. }(_namespace["default"]);
  2643. module.exports = exports.default;
  2644. }));
  2645. //#endregion
  2646. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/string.js
  2647. var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2648. exports.__esModule = true;
  2649. exports["default"] = void 0;
  2650. var _node = _interopRequireDefault(require_node$1());
  2651. var _types = require_types();
  2652. function _interopRequireDefault(obj) {
  2653. return obj && obj.__esModule ? obj : { "default": obj };
  2654. }
  2655. function _inheritsLoose(subClass, superClass) {
  2656. subClass.prototype = Object.create(superClass.prototype);
  2657. subClass.prototype.constructor = subClass;
  2658. _setPrototypeOf(subClass, superClass);
  2659. }
  2660. function _setPrototypeOf(o, p) {
  2661. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2662. o.__proto__ = p;
  2663. return o;
  2664. };
  2665. return _setPrototypeOf(o, p);
  2666. }
  2667. exports["default"] = /* @__PURE__ */ function(_Node) {
  2668. _inheritsLoose(String, _Node);
  2669. function String(opts) {
  2670. var _this = _Node.call(this, opts) || this;
  2671. _this.type = _types.STRING;
  2672. return _this;
  2673. }
  2674. return String;
  2675. }(_node["default"]);
  2676. module.exports = exports.default;
  2677. }));
  2678. //#endregion
  2679. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
  2680. var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2681. exports.__esModule = true;
  2682. exports["default"] = void 0;
  2683. var _container = _interopRequireDefault(require_container());
  2684. var _types = require_types();
  2685. function _interopRequireDefault(obj) {
  2686. return obj && obj.__esModule ? obj : { "default": obj };
  2687. }
  2688. function _inheritsLoose(subClass, superClass) {
  2689. subClass.prototype = Object.create(superClass.prototype);
  2690. subClass.prototype.constructor = subClass;
  2691. _setPrototypeOf(subClass, superClass);
  2692. }
  2693. function _setPrototypeOf(o, p) {
  2694. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2695. o.__proto__ = p;
  2696. return o;
  2697. };
  2698. return _setPrototypeOf(o, p);
  2699. }
  2700. exports["default"] = /* @__PURE__ */ function(_Container) {
  2701. _inheritsLoose(Pseudo, _Container);
  2702. function Pseudo(opts) {
  2703. var _this = _Container.call(this, opts) || this;
  2704. _this.type = _types.PSEUDO;
  2705. return _this;
  2706. }
  2707. var _proto = Pseudo.prototype;
  2708. _proto.toString = function toString() {
  2709. var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
  2710. return [
  2711. this.rawSpaceBefore,
  2712. this.stringifyProperty("value"),
  2713. params,
  2714. this.rawSpaceAfter
  2715. ].join("");
  2716. };
  2717. return Pseudo;
  2718. }(_container["default"]);
  2719. module.exports = exports.default;
  2720. }));
  2721. //#endregion
  2722. //#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
  2723. var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2724. /**
  2725. * For Node.js, simply re-export the core `util.deprecate` function.
  2726. */
  2727. module.exports = __require("util").deprecate;
  2728. }));
  2729. //#endregion
  2730. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/attribute.js
  2731. var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
  2732. exports.__esModule = true;
  2733. exports["default"] = void 0;
  2734. exports.unescapeValue = unescapeValue;
  2735. var _cssesc = _interopRequireDefault(require_cssesc());
  2736. var _unesc = _interopRequireDefault(require_unesc());
  2737. var _namespace = _interopRequireDefault(require_namespace());
  2738. var _types = require_types();
  2739. var _CSSESC_QUOTE_OPTIONS;
  2740. function _interopRequireDefault(obj) {
  2741. return obj && obj.__esModule ? obj : { "default": obj };
  2742. }
  2743. function _defineProperties(target, props) {
  2744. for (var i = 0; i < props.length; i++) {
  2745. var descriptor = props[i];
  2746. descriptor.enumerable = descriptor.enumerable || false;
  2747. descriptor.configurable = true;
  2748. if ("value" in descriptor) descriptor.writable = true;
  2749. Object.defineProperty(target, descriptor.key, descriptor);
  2750. }
  2751. }
  2752. function _createClass(Constructor, protoProps, staticProps) {
  2753. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  2754. if (staticProps) _defineProperties(Constructor, staticProps);
  2755. Object.defineProperty(Constructor, "prototype", { writable: false });
  2756. return Constructor;
  2757. }
  2758. function _inheritsLoose(subClass, superClass) {
  2759. subClass.prototype = Object.create(superClass.prototype);
  2760. subClass.prototype.constructor = subClass;
  2761. _setPrototypeOf(subClass, superClass);
  2762. }
  2763. function _setPrototypeOf(o, p) {
  2764. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2765. o.__proto__ = p;
  2766. return o;
  2767. };
  2768. return _setPrototypeOf(o, p);
  2769. }
  2770. var deprecate = require_node();
  2771. var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
  2772. var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
  2773. var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
  2774. var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
  2775. function unescapeValue(value) {
  2776. var deprecatedUsage = false;
  2777. var quoteMark = null;
  2778. var unescaped = value;
  2779. var m = unescaped.match(WRAPPED_IN_QUOTES);
  2780. if (m) {
  2781. quoteMark = m[1];
  2782. unescaped = m[2];
  2783. }
  2784. unescaped = (0, _unesc["default"])(unescaped);
  2785. if (unescaped !== value) deprecatedUsage = true;
  2786. return {
  2787. deprecatedUsage,
  2788. unescaped,
  2789. quoteMark
  2790. };
  2791. }
  2792. function handleDeprecatedContructorOpts(opts) {
  2793. if (opts.quoteMark !== void 0) return opts;
  2794. if (opts.value === void 0) return opts;
  2795. warnOfDeprecatedConstructor();
  2796. var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped;
  2797. if (!opts.raws) opts.raws = {};
  2798. if (opts.raws.value === void 0) opts.raws.value = opts.value;
  2799. opts.value = unescaped;
  2800. opts.quoteMark = quoteMark;
  2801. return opts;
  2802. }
  2803. var Attribute = /* @__PURE__ */ function(_Namespace) {
  2804. _inheritsLoose(Attribute, _Namespace);
  2805. function Attribute(opts) {
  2806. var _this;
  2807. if (opts === void 0) opts = {};
  2808. _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
  2809. _this.type = _types.ATTRIBUTE;
  2810. _this.raws = _this.raws || {};
  2811. Object.defineProperty(_this.raws, "unquoted", {
  2812. get: deprecate(function() {
  2813. return _this.value;
  2814. }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
  2815. set: deprecate(function() {
  2816. return _this.value;
  2817. }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
  2818. });
  2819. _this._constructed = true;
  2820. return _this;
  2821. }
  2822. /**
  2823. * Returns the Attribute's value quoted such that it would be legal to use
  2824. * in the value of a css file. The original value's quotation setting
  2825. * used for stringification is left unchanged. See `setValue(value, options)`
  2826. * if you want to control the quote settings of a new value for the attribute.
  2827. *
  2828. * You can also change the quotation used for the current value by setting quoteMark.
  2829. *
  2830. * Options:
  2831. * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
  2832. * option is not set, the original value for quoteMark will be used. If
  2833. * indeterminate, a double quote is used. The legal values are:
  2834. * * `null` - the value will be unquoted and characters will be escaped as necessary.
  2835. * * `'` - the value will be quoted with a single quote and single quotes are escaped.
  2836. * * `"` - the value will be quoted with a double quote and double quotes are escaped.
  2837. * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
  2838. * over the quoteMark option value.
  2839. * * smart {boolean} - if true, will select a quote mark based on the value
  2840. * and the other options specified here. See the `smartQuoteMark()`
  2841. * method.
  2842. **/
  2843. var _proto = Attribute.prototype;
  2844. _proto.getQuotedValue = function getQuotedValue(options) {
  2845. if (options === void 0) options = {};
  2846. var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
  2847. return (0, _cssesc["default"])(this._value, cssescopts);
  2848. };
  2849. _proto._determineQuoteMark = function _determineQuoteMark(options) {
  2850. return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
  2851. };
  2852. _proto.setValue = function setValue(value, options) {
  2853. if (options === void 0) options = {};
  2854. this._value = value;
  2855. this._quoteMark = this._determineQuoteMark(options);
  2856. this._syncRawValue();
  2857. };
  2858. _proto.smartQuoteMark = function smartQuoteMark(options) {
  2859. var v = this.value;
  2860. var numSingleQuotes = v.replace(/[^']/g, "").length;
  2861. var numDoubleQuotes = v.replace(/[^"]/g, "").length;
  2862. if (numSingleQuotes + numDoubleQuotes === 0) {
  2863. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2864. if (escaped === v) return Attribute.NO_QUOTE;
  2865. else {
  2866. var pref = this.preferredQuoteMark(options);
  2867. if (pref === Attribute.NO_QUOTE) {
  2868. var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
  2869. if ((0, _cssesc["default"])(v, CSSESC_QUOTE_OPTIONS[quote]).length < escaped.length) return quote;
  2870. }
  2871. return pref;
  2872. }
  2873. } else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
  2874. else if (numDoubleQuotes < numSingleQuotes) return Attribute.DOUBLE_QUOTE;
  2875. else return Attribute.SINGLE_QUOTE;
  2876. };
  2877. _proto.preferredQuoteMark = function preferredQuoteMark(options) {
  2878. var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
  2879. if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
  2880. if (quoteMark === void 0) quoteMark = Attribute.DOUBLE_QUOTE;
  2881. return quoteMark;
  2882. };
  2883. _proto._syncRawValue = function _syncRawValue() {
  2884. var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
  2885. if (rawValue === this._value) {
  2886. if (this.raws) delete this.raws.value;
  2887. } else this.raws.value = rawValue;
  2888. };
  2889. _proto._handleEscapes = function _handleEscapes(prop, value) {
  2890. if (this._constructed) {
  2891. var escaped = (0, _cssesc["default"])(value, { isIdentifier: true });
  2892. if (escaped !== value) this.raws[prop] = escaped;
  2893. else delete this.raws[prop];
  2894. }
  2895. };
  2896. _proto._spacesFor = function _spacesFor(name) {
  2897. return Object.assign({
  2898. before: "",
  2899. after: ""
  2900. }, this.spaces[name] || {}, this.raws.spaces && this.raws.spaces[name] || {});
  2901. };
  2902. _proto._stringFor = function _stringFor(name, spaceName, concat) {
  2903. if (spaceName === void 0) spaceName = name;
  2904. if (concat === void 0) concat = defaultAttrConcat;
  2905. var attrSpaces = this._spacesFor(spaceName);
  2906. return concat(this.stringifyProperty(name), attrSpaces);
  2907. };
  2908. _proto.offsetOf = function offsetOf(name) {
  2909. var count = 1;
  2910. var attributeSpaces = this._spacesFor("attribute");
  2911. count += attributeSpaces.before.length;
  2912. if (name === "namespace" || name === "ns") return this.namespace ? count : -1;
  2913. if (name === "attributeNS") return count;
  2914. count += this.namespaceString.length;
  2915. if (this.namespace) count += 1;
  2916. if (name === "attribute") return count;
  2917. count += this.stringifyProperty("attribute").length;
  2918. count += attributeSpaces.after.length;
  2919. var operatorSpaces = this._spacesFor("operator");
  2920. count += operatorSpaces.before.length;
  2921. var operator = this.stringifyProperty("operator");
  2922. if (name === "operator") return operator ? count : -1;
  2923. count += operator.length;
  2924. count += operatorSpaces.after.length;
  2925. var valueSpaces = this._spacesFor("value");
  2926. count += valueSpaces.before.length;
  2927. var value = this.stringifyProperty("value");
  2928. if (name === "value") return value ? count : -1;
  2929. count += value.length;
  2930. count += valueSpaces.after.length;
  2931. var insensitiveSpaces = this._spacesFor("insensitive");
  2932. count += insensitiveSpaces.before.length;
  2933. if (name === "insensitive") return this.insensitive ? count : -1;
  2934. return -1;
  2935. };
  2936. _proto.toString = function toString() {
  2937. var _this2 = this;
  2938. var selector = [this.rawSpaceBefore, "["];
  2939. selector.push(this._stringFor("qualifiedAttribute", "attribute"));
  2940. if (this.operator && (this.value || this.value === "")) {
  2941. selector.push(this._stringFor("operator"));
  2942. selector.push(this._stringFor("value"));
  2943. selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
  2944. if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
  2945. return defaultAttrConcat(attrValue, attrSpaces);
  2946. }));
  2947. }
  2948. selector.push("]");
  2949. selector.push(this.rawSpaceAfter);
  2950. return selector.join("");
  2951. };
  2952. _createClass(Attribute, [
  2953. {
  2954. key: "quoted",
  2955. get: function get() {
  2956. var qm = this.quoteMark;
  2957. return qm === "'" || qm === "\"";
  2958. },
  2959. set: function set(value) {
  2960. warnOfDeprecatedQuotedAssignment();
  2961. }
  2962. },
  2963. {
  2964. key: "quoteMark",
  2965. get: function get() {
  2966. return this._quoteMark;
  2967. },
  2968. set: function set(quoteMark) {
  2969. if (!this._constructed) {
  2970. this._quoteMark = quoteMark;
  2971. return;
  2972. }
  2973. if (this._quoteMark !== quoteMark) {
  2974. this._quoteMark = quoteMark;
  2975. this._syncRawValue();
  2976. }
  2977. }
  2978. },
  2979. {
  2980. key: "qualifiedAttribute",
  2981. get: function get() {
  2982. return this.qualifiedName(this.raws.attribute || this.attribute);
  2983. }
  2984. },
  2985. {
  2986. key: "insensitiveFlag",
  2987. get: function get() {
  2988. return this.insensitive ? "i" : "";
  2989. }
  2990. },
  2991. {
  2992. key: "value",
  2993. get: function get() {
  2994. return this._value;
  2995. },
  2996. set: function set(v) {
  2997. if (this._constructed) {
  2998. var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
  2999. if (deprecatedUsage) warnOfDeprecatedValueAssignment();
  3000. if (unescaped === this._value && quoteMark === this._quoteMark) return;
  3001. this._value = unescaped;
  3002. this._quoteMark = quoteMark;
  3003. this._syncRawValue();
  3004. } else this._value = v;
  3005. }
  3006. },
  3007. {
  3008. key: "insensitive",
  3009. get: function get() {
  3010. return this._insensitive;
  3011. },
  3012. set: function set(insensitive) {
  3013. if (!insensitive) {
  3014. this._insensitive = false;
  3015. if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
  3016. }
  3017. this._insensitive = insensitive;
  3018. }
  3019. },
  3020. {
  3021. key: "attribute",
  3022. get: function get() {
  3023. return this._attribute;
  3024. },
  3025. set: function set(name) {
  3026. this._handleEscapes("attribute", name);
  3027. this._attribute = name;
  3028. }
  3029. }
  3030. ]);
  3031. return Attribute;
  3032. }(_namespace["default"]);
  3033. exports["default"] = Attribute;
  3034. Attribute.NO_QUOTE = null;
  3035. Attribute.SINGLE_QUOTE = "'";
  3036. Attribute.DOUBLE_QUOTE = "\"";
  3037. var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
  3038. "'": {
  3039. quotes: "single",
  3040. wrap: true
  3041. },
  3042. "\"": {
  3043. quotes: "double",
  3044. wrap: true
  3045. }
  3046. }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS);
  3047. function defaultAttrConcat(attrValue, attrSpaces) {
  3048. return "" + attrSpaces.before + attrValue + attrSpaces.after;
  3049. }
  3050. }));
  3051. //#endregion
  3052. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/universal.js
  3053. var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3054. exports.__esModule = true;
  3055. exports["default"] = void 0;
  3056. var _namespace = _interopRequireDefault(require_namespace());
  3057. var _types = require_types();
  3058. function _interopRequireDefault(obj) {
  3059. return obj && obj.__esModule ? obj : { "default": obj };
  3060. }
  3061. function _inheritsLoose(subClass, superClass) {
  3062. subClass.prototype = Object.create(superClass.prototype);
  3063. subClass.prototype.constructor = subClass;
  3064. _setPrototypeOf(subClass, superClass);
  3065. }
  3066. function _setPrototypeOf(o, p) {
  3067. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3068. o.__proto__ = p;
  3069. return o;
  3070. };
  3071. return _setPrototypeOf(o, p);
  3072. }
  3073. exports["default"] = /* @__PURE__ */ function(_Namespace) {
  3074. _inheritsLoose(Universal, _Namespace);
  3075. function Universal(opts) {
  3076. var _this = _Namespace.call(this, opts) || this;
  3077. _this.type = _types.UNIVERSAL;
  3078. _this.value = "*";
  3079. return _this;
  3080. }
  3081. return Universal;
  3082. }(_namespace["default"]);
  3083. module.exports = exports.default;
  3084. }));
  3085. //#endregion
  3086. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/combinator.js
  3087. var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3088. exports.__esModule = true;
  3089. exports["default"] = void 0;
  3090. var _node = _interopRequireDefault(require_node$1());
  3091. var _types = require_types();
  3092. function _interopRequireDefault(obj) {
  3093. return obj && obj.__esModule ? obj : { "default": obj };
  3094. }
  3095. function _inheritsLoose(subClass, superClass) {
  3096. subClass.prototype = Object.create(superClass.prototype);
  3097. subClass.prototype.constructor = subClass;
  3098. _setPrototypeOf(subClass, superClass);
  3099. }
  3100. function _setPrototypeOf(o, p) {
  3101. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3102. o.__proto__ = p;
  3103. return o;
  3104. };
  3105. return _setPrototypeOf(o, p);
  3106. }
  3107. exports["default"] = /* @__PURE__ */ function(_Node) {
  3108. _inheritsLoose(Combinator, _Node);
  3109. function Combinator(opts) {
  3110. var _this = _Node.call(this, opts) || this;
  3111. _this.type = _types.COMBINATOR;
  3112. return _this;
  3113. }
  3114. return Combinator;
  3115. }(_node["default"]);
  3116. module.exports = exports.default;
  3117. }));
  3118. //#endregion
  3119. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/nesting.js
  3120. var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3121. exports.__esModule = true;
  3122. exports["default"] = void 0;
  3123. var _node = _interopRequireDefault(require_node$1());
  3124. var _types = require_types();
  3125. function _interopRequireDefault(obj) {
  3126. return obj && obj.__esModule ? obj : { "default": obj };
  3127. }
  3128. function _inheritsLoose(subClass, superClass) {
  3129. subClass.prototype = Object.create(superClass.prototype);
  3130. subClass.prototype.constructor = subClass;
  3131. _setPrototypeOf(subClass, superClass);
  3132. }
  3133. function _setPrototypeOf(o, p) {
  3134. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  3135. o.__proto__ = p;
  3136. return o;
  3137. };
  3138. return _setPrototypeOf(o, p);
  3139. }
  3140. exports["default"] = /* @__PURE__ */ function(_Node) {
  3141. _inheritsLoose(Nesting, _Node);
  3142. function Nesting(opts) {
  3143. var _this = _Node.call(this, opts) || this;
  3144. _this.type = _types.NESTING;
  3145. _this.value = "&";
  3146. return _this;
  3147. }
  3148. return Nesting;
  3149. }(_node["default"]);
  3150. module.exports = exports.default;
  3151. }));
  3152. //#endregion
  3153. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/sortAscending.js
  3154. var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3155. exports.__esModule = true;
  3156. exports["default"] = sortAscending;
  3157. function sortAscending(list) {
  3158. return list.sort(function(a, b) {
  3159. return a - b;
  3160. });
  3161. }
  3162. module.exports = exports.default;
  3163. }));
  3164. //#endregion
  3165. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenTypes.js
  3166. var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
  3167. exports.__esModule = true;
  3168. exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
  3169. exports.ampersand = 38;
  3170. exports.asterisk = 42;
  3171. exports.at = 64;
  3172. exports.comma = 44;
  3173. exports.colon = 58;
  3174. exports.semicolon = 59;
  3175. exports.openParenthesis = 40;
  3176. exports.closeParenthesis = 41;
  3177. exports.openSquare = 91;
  3178. exports.closeSquare = 93;
  3179. exports.dollar = 36;
  3180. exports.tilde = 126;
  3181. exports.caret = 94;
  3182. exports.plus = 43;
  3183. exports.equals = 61;
  3184. exports.pipe = 124;
  3185. exports.greaterThan = 62;
  3186. exports.space = 32;
  3187. var singleQuote = 39;
  3188. exports.singleQuote = singleQuote;
  3189. exports.doubleQuote = 34;
  3190. exports.slash = 47;
  3191. exports.bang = 33;
  3192. exports.backslash = 92;
  3193. exports.cr = 13;
  3194. exports.feed = 12;
  3195. exports.newline = 10;
  3196. exports.tab = 9;
  3197. exports.str = singleQuote;
  3198. exports.comment = -1;
  3199. exports.word = -2;
  3200. exports.combinator = -3;
  3201. }));
  3202. //#endregion
  3203. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/tokenize.js
  3204. var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
  3205. exports.__esModule = true;
  3206. exports.FIELDS = void 0;
  3207. exports["default"] = tokenize;
  3208. var t = _interopRequireWildcard(require_tokenTypes());
  3209. var _unescapable, _wordDelimiters;
  3210. function _getRequireWildcardCache(nodeInterop) {
  3211. if (typeof WeakMap !== "function") return null;
  3212. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3213. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3214. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  3215. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  3216. })(nodeInterop);
  3217. }
  3218. function _interopRequireWildcard(obj, nodeInterop) {
  3219. if (!nodeInterop && obj && obj.__esModule) return obj;
  3220. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3221. var cache = _getRequireWildcardCache(nodeInterop);
  3222. if (cache && cache.has(obj)) return cache.get(obj);
  3223. var newObj = {};
  3224. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3225. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3226. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3227. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3228. else newObj[key] = obj[key];
  3229. }
  3230. newObj["default"] = obj;
  3231. if (cache) cache.set(obj, newObj);
  3232. return newObj;
  3233. }
  3234. var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
  3235. var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
  3236. var hex = {};
  3237. var hexChars = "0123456789abcdefABCDEF";
  3238. for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
  3239. /**
  3240. * Returns the last index of the bar css word
  3241. * @param {string} css The string in which the word begins
  3242. * @param {number} start The index into the string where word's first letter occurs
  3243. */
  3244. function consumeWord(css, start) {
  3245. var next = start;
  3246. var code;
  3247. do {
  3248. code = css.charCodeAt(next);
  3249. if (wordDelimiters[code]) return next - 1;
  3250. else if (code === t.backslash) next = consumeEscape(css, next) + 1;
  3251. else next++;
  3252. } while (next < css.length);
  3253. return next - 1;
  3254. }
  3255. /**
  3256. * Returns the last index of the escape sequence
  3257. * @param {string} css The string in which the sequence begins
  3258. * @param {number} start The index into the string where escape character (`\`) occurs.
  3259. */
  3260. function consumeEscape(css, start) {
  3261. var next = start;
  3262. var code = css.charCodeAt(next + 1);
  3263. if (unescapable[code]) {} else if (hex[code]) {
  3264. var hexDigits = 0;
  3265. do {
  3266. next++;
  3267. hexDigits++;
  3268. code = css.charCodeAt(next + 1);
  3269. } while (hex[code] && hexDigits < 6);
  3270. if (hexDigits < 6 && code === t.space) next++;
  3271. } else next++;
  3272. return next;
  3273. }
  3274. exports.FIELDS = {
  3275. TYPE: 0,
  3276. START_LINE: 1,
  3277. START_COL: 2,
  3278. END_LINE: 3,
  3279. END_COL: 4,
  3280. START_POS: 5,
  3281. END_POS: 6
  3282. };
  3283. function tokenize(input) {
  3284. var tokens = [];
  3285. var css = input.css.valueOf();
  3286. var length = css.length;
  3287. var offset = -1;
  3288. var line = 1;
  3289. var start = 0;
  3290. var end = 0;
  3291. var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
  3292. function unclosed(what, fix) {
  3293. if (input.safe) {
  3294. css += fix;
  3295. next = css.length - 1;
  3296. } else throw input.error("Unclosed " + what, line, start - offset, start);
  3297. }
  3298. while (start < length) {
  3299. code = css.charCodeAt(start);
  3300. if (code === t.newline) {
  3301. offset = start;
  3302. line += 1;
  3303. }
  3304. switch (code) {
  3305. case t.space:
  3306. case t.tab:
  3307. case t.newline:
  3308. case t.cr:
  3309. case t.feed:
  3310. next = start;
  3311. do {
  3312. next += 1;
  3313. code = css.charCodeAt(next);
  3314. if (code === t.newline) {
  3315. offset = next;
  3316. line += 1;
  3317. }
  3318. } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
  3319. tokenType = t.space;
  3320. endLine = line;
  3321. endColumn = next - offset - 1;
  3322. end = next;
  3323. break;
  3324. case t.plus:
  3325. case t.greaterThan:
  3326. case t.tilde:
  3327. case t.pipe:
  3328. next = start;
  3329. do {
  3330. next += 1;
  3331. code = css.charCodeAt(next);
  3332. } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
  3333. tokenType = t.combinator;
  3334. endLine = line;
  3335. endColumn = start - offset;
  3336. end = next;
  3337. break;
  3338. case t.asterisk:
  3339. case t.ampersand:
  3340. case t.bang:
  3341. case t.comma:
  3342. case t.equals:
  3343. case t.dollar:
  3344. case t.caret:
  3345. case t.openSquare:
  3346. case t.closeSquare:
  3347. case t.colon:
  3348. case t.semicolon:
  3349. case t.openParenthesis:
  3350. case t.closeParenthesis:
  3351. next = start;
  3352. tokenType = code;
  3353. endLine = line;
  3354. endColumn = start - offset;
  3355. end = next + 1;
  3356. break;
  3357. case t.singleQuote:
  3358. case t.doubleQuote:
  3359. quote = code === t.singleQuote ? "'" : "\"";
  3360. next = start;
  3361. do {
  3362. escaped = false;
  3363. next = css.indexOf(quote, next + 1);
  3364. if (next === -1) unclosed("quote", quote);
  3365. escapePos = next;
  3366. while (css.charCodeAt(escapePos - 1) === t.backslash) {
  3367. escapePos -= 1;
  3368. escaped = !escaped;
  3369. }
  3370. } while (escaped);
  3371. tokenType = t.str;
  3372. endLine = line;
  3373. endColumn = start - offset;
  3374. end = next + 1;
  3375. break;
  3376. default:
  3377. if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
  3378. next = css.indexOf("*/", start + 2) + 1;
  3379. if (next === 0) unclosed("comment", "*/");
  3380. content = css.slice(start, next + 1);
  3381. lines = content.split("\n");
  3382. last = lines.length - 1;
  3383. if (last > 0) {
  3384. nextLine = line + last;
  3385. nextOffset = next - lines[last].length;
  3386. } else {
  3387. nextLine = line;
  3388. nextOffset = offset;
  3389. }
  3390. tokenType = t.comment;
  3391. line = nextLine;
  3392. endLine = nextLine;
  3393. endColumn = next - nextOffset;
  3394. } else if (code === t.slash) {
  3395. next = start;
  3396. tokenType = code;
  3397. endLine = line;
  3398. endColumn = start - offset;
  3399. end = next + 1;
  3400. } else {
  3401. next = consumeWord(css, start);
  3402. tokenType = t.word;
  3403. endLine = line;
  3404. endColumn = next - offset;
  3405. }
  3406. end = next + 1;
  3407. break;
  3408. }
  3409. tokens.push([
  3410. tokenType,
  3411. line,
  3412. start - offset,
  3413. endLine,
  3414. endColumn,
  3415. start,
  3416. end
  3417. ]);
  3418. if (nextOffset) {
  3419. offset = nextOffset;
  3420. nextOffset = null;
  3421. }
  3422. start = end;
  3423. }
  3424. return tokens;
  3425. }
  3426. }));
  3427. //#endregion
  3428. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/parser.js
  3429. var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3430. exports.__esModule = true;
  3431. exports["default"] = void 0;
  3432. var _root = _interopRequireDefault(require_root());
  3433. var _selector = _interopRequireDefault(require_selector());
  3434. var _className = _interopRequireDefault(require_className());
  3435. var _comment = _interopRequireDefault(require_comment());
  3436. var _id = _interopRequireDefault(require_id());
  3437. var _tag = _interopRequireDefault(require_tag());
  3438. var _string = _interopRequireDefault(require_string());
  3439. var _pseudo = _interopRequireDefault(require_pseudo());
  3440. var _attribute = _interopRequireWildcard(require_attribute());
  3441. var _universal = _interopRequireDefault(require_universal());
  3442. var _combinator = _interopRequireDefault(require_combinator());
  3443. var _nesting = _interopRequireDefault(require_nesting());
  3444. var _sortAscending = _interopRequireDefault(require_sortAscending());
  3445. var _tokenize = _interopRequireWildcard(require_tokenize());
  3446. var tokens = _interopRequireWildcard(require_tokenTypes());
  3447. var types = _interopRequireWildcard(require_types());
  3448. var _util = require_util();
  3449. var _WHITESPACE_TOKENS, _Object$assign;
  3450. function _getRequireWildcardCache(nodeInterop) {
  3451. if (typeof WeakMap !== "function") return null;
  3452. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3453. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3454. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  3455. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  3456. })(nodeInterop);
  3457. }
  3458. function _interopRequireWildcard(obj, nodeInterop) {
  3459. if (!nodeInterop && obj && obj.__esModule) return obj;
  3460. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3461. var cache = _getRequireWildcardCache(nodeInterop);
  3462. if (cache && cache.has(obj)) return cache.get(obj);
  3463. var newObj = {};
  3464. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3465. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3466. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3467. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3468. else newObj[key] = obj[key];
  3469. }
  3470. newObj["default"] = obj;
  3471. if (cache) cache.set(obj, newObj);
  3472. return newObj;
  3473. }
  3474. function _interopRequireDefault(obj) {
  3475. return obj && obj.__esModule ? obj : { "default": obj };
  3476. }
  3477. function _defineProperties(target, props) {
  3478. for (var i = 0; i < props.length; i++) {
  3479. var descriptor = props[i];
  3480. descriptor.enumerable = descriptor.enumerable || false;
  3481. descriptor.configurable = true;
  3482. if ("value" in descriptor) descriptor.writable = true;
  3483. Object.defineProperty(target, descriptor.key, descriptor);
  3484. }
  3485. }
  3486. function _createClass(Constructor, protoProps, staticProps) {
  3487. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3488. if (staticProps) _defineProperties(Constructor, staticProps);
  3489. Object.defineProperty(Constructor, "prototype", { writable: false });
  3490. return Constructor;
  3491. }
  3492. var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
  3493. var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
  3494. function tokenStart(token) {
  3495. return {
  3496. line: token[_tokenize.FIELDS.START_LINE],
  3497. column: token[_tokenize.FIELDS.START_COL]
  3498. };
  3499. }
  3500. function tokenEnd(token) {
  3501. return {
  3502. line: token[_tokenize.FIELDS.END_LINE],
  3503. column: token[_tokenize.FIELDS.END_COL]
  3504. };
  3505. }
  3506. function getSource(startLine, startColumn, endLine, endColumn) {
  3507. return {
  3508. start: {
  3509. line: startLine,
  3510. column: startColumn
  3511. },
  3512. end: {
  3513. line: endLine,
  3514. column: endColumn
  3515. }
  3516. };
  3517. }
  3518. function getTokenSource(token) {
  3519. return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
  3520. }
  3521. function getTokenSourceSpan(startToken, endToken) {
  3522. if (!startToken) return;
  3523. return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
  3524. }
  3525. function unescapeProp(node, prop) {
  3526. var value = node[prop];
  3527. if (typeof value !== "string") return;
  3528. if (value.indexOf("\\") !== -1) {
  3529. (0, _util.ensureObject)(node, "raws");
  3530. node[prop] = (0, _util.unesc)(value);
  3531. if (node.raws[prop] === void 0) node.raws[prop] = value;
  3532. }
  3533. return node;
  3534. }
  3535. function indexesOf(array, item) {
  3536. var i = -1;
  3537. var indexes = [];
  3538. while ((i = array.indexOf(item, i + 1)) !== -1) indexes.push(i);
  3539. return indexes;
  3540. }
  3541. function uniqs() {
  3542. var list = Array.prototype.concat.apply([], arguments);
  3543. return list.filter(function(item, i) {
  3544. return i === list.indexOf(item);
  3545. });
  3546. }
  3547. exports["default"] = /* @__PURE__ */ function() {
  3548. function Parser(rule, options) {
  3549. if (options === void 0) options = {};
  3550. this.rule = rule;
  3551. this.options = Object.assign({
  3552. lossy: false,
  3553. safe: false
  3554. }, options);
  3555. this.position = 0;
  3556. this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
  3557. this.tokens = (0, _tokenize["default"])({
  3558. css: this.css,
  3559. error: this._errorGenerator(),
  3560. safe: this.options.safe
  3561. });
  3562. var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
  3563. this.root = new _root["default"]({ source: rootSource });
  3564. this.root.errorGenerator = this._errorGenerator();
  3565. var selector = new _selector["default"]({
  3566. source: { start: {
  3567. line: 1,
  3568. column: 1
  3569. } },
  3570. sourceIndex: 0
  3571. });
  3572. this.root.append(selector);
  3573. this.current = selector;
  3574. this.loop();
  3575. }
  3576. var _proto = Parser.prototype;
  3577. _proto._errorGenerator = function _errorGenerator() {
  3578. var _this = this;
  3579. return function(message, errorOptions) {
  3580. if (typeof _this.rule === "string") return new Error(message);
  3581. return _this.rule.error(message, errorOptions);
  3582. };
  3583. };
  3584. _proto.attribute = function attribute() {
  3585. var attr = [];
  3586. var startingToken = this.currToken;
  3587. this.position++;
  3588. while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
  3589. attr.push(this.currToken);
  3590. this.position++;
  3591. }
  3592. if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3593. var len = attr.length;
  3594. var node = {
  3595. source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
  3596. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  3597. };
  3598. if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]);
  3599. var pos = 0;
  3600. var spaceBefore = "";
  3601. var commentBefore = "";
  3602. var lastAdded = null;
  3603. var spaceAfterMeaningfulToken = false;
  3604. while (pos < len) {
  3605. var token = attr[pos];
  3606. var content = this.content(token);
  3607. var next = attr[pos + 1];
  3608. switch (token[_tokenize.FIELDS.TYPE]) {
  3609. case tokens.space:
  3610. spaceAfterMeaningfulToken = true;
  3611. if (this.options.lossy) break;
  3612. if (lastAdded) {
  3613. (0, _util.ensureObject)(node, "spaces", lastAdded);
  3614. node.spaces[lastAdded].after = (node.spaces[lastAdded].after || "") + content;
  3615. var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
  3616. if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
  3617. } else {
  3618. spaceBefore = spaceBefore + content;
  3619. commentBefore = commentBefore + content;
  3620. }
  3621. break;
  3622. case tokens.asterisk:
  3623. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3624. node.operator = content;
  3625. lastAdded = "operator";
  3626. } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
  3627. if (spaceBefore) {
  3628. (0, _util.ensureObject)(node, "spaces", "attribute");
  3629. node.spaces.attribute.before = spaceBefore;
  3630. spaceBefore = "";
  3631. }
  3632. if (commentBefore) {
  3633. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3634. node.raws.spaces.attribute.before = spaceBefore;
  3635. commentBefore = "";
  3636. }
  3637. node.namespace = (node.namespace || "") + content;
  3638. if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content;
  3639. lastAdded = "namespace";
  3640. }
  3641. spaceAfterMeaningfulToken = false;
  3642. break;
  3643. case tokens.dollar: if (lastAdded === "value") {
  3644. var oldRawValue = (0, _util.getProp)(node, "raws", "value");
  3645. node.value += "$";
  3646. if (oldRawValue) node.raws.value = oldRawValue + "$";
  3647. break;
  3648. }
  3649. case tokens.caret:
  3650. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3651. node.operator = content;
  3652. lastAdded = "operator";
  3653. }
  3654. spaceAfterMeaningfulToken = false;
  3655. break;
  3656. case tokens.combinator:
  3657. if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3658. node.operator = content;
  3659. lastAdded = "operator";
  3660. }
  3661. if (content !== "|") {
  3662. spaceAfterMeaningfulToken = false;
  3663. break;
  3664. }
  3665. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3666. node.operator = content;
  3667. lastAdded = "operator";
  3668. } else if (!node.namespace && !node.attribute) node.namespace = true;
  3669. spaceAfterMeaningfulToken = false;
  3670. break;
  3671. case tokens.word:
  3672. if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
  3673. node.namespace = content;
  3674. lastAdded = "namespace";
  3675. } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
  3676. if (spaceBefore) {
  3677. (0, _util.ensureObject)(node, "spaces", "attribute");
  3678. node.spaces.attribute.before = spaceBefore;
  3679. spaceBefore = "";
  3680. }
  3681. if (commentBefore) {
  3682. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3683. node.raws.spaces.attribute.before = commentBefore;
  3684. commentBefore = "";
  3685. }
  3686. node.attribute = (node.attribute || "") + content;
  3687. if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content;
  3688. lastAdded = "attribute";
  3689. } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
  3690. var _unescaped = (0, _util.unesc)(content);
  3691. var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || "";
  3692. var oldValue = node.value || "";
  3693. node.value = oldValue + _unescaped;
  3694. node.quoteMark = null;
  3695. if (_unescaped !== content || _oldRawValue) {
  3696. (0, _util.ensureObject)(node, "raws");
  3697. node.raws.value = (_oldRawValue || oldValue) + content;
  3698. }
  3699. lastAdded = "value";
  3700. } else {
  3701. var insensitive = content === "i" || content === "I";
  3702. if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
  3703. node.insensitive = insensitive;
  3704. if (!insensitive || content === "I") {
  3705. (0, _util.ensureObject)(node, "raws");
  3706. node.raws.insensitiveFlag = content;
  3707. }
  3708. lastAdded = "insensitive";
  3709. if (spaceBefore) {
  3710. (0, _util.ensureObject)(node, "spaces", "insensitive");
  3711. node.spaces.insensitive.before = spaceBefore;
  3712. spaceBefore = "";
  3713. }
  3714. if (commentBefore) {
  3715. (0, _util.ensureObject)(node, "raws", "spaces", "insensitive");
  3716. node.raws.spaces.insensitive.before = commentBefore;
  3717. commentBefore = "";
  3718. }
  3719. } else if (node.value || node.value === "") {
  3720. lastAdded = "value";
  3721. node.value += content;
  3722. if (node.raws.value) node.raws.value += content;
  3723. }
  3724. }
  3725. spaceAfterMeaningfulToken = false;
  3726. break;
  3727. case tokens.str:
  3728. if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
  3729. var _unescapeValue = (0, _attribute.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
  3730. node.value = unescaped;
  3731. node.quoteMark = quoteMark;
  3732. lastAdded = "value";
  3733. (0, _util.ensureObject)(node, "raws");
  3734. node.raws.value = content;
  3735. spaceAfterMeaningfulToken = false;
  3736. break;
  3737. case tokens.equals:
  3738. if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content);
  3739. if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] });
  3740. node.operator = node.operator ? node.operator + content : content;
  3741. lastAdded = "operator";
  3742. spaceAfterMeaningfulToken = false;
  3743. break;
  3744. case tokens.comment:
  3745. if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
  3746. var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || "";
  3747. var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
  3748. (0, _util.ensureObject)(node, "raws", "spaces", lastAdded);
  3749. node.raws.spaces[lastAdded].after = rawLastComment + content;
  3750. } else {
  3751. var lastValue = node[lastAdded] || "";
  3752. var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue;
  3753. (0, _util.ensureObject)(node, "raws");
  3754. node.raws[lastAdded] = rawLastValue + content;
  3755. }
  3756. else commentBefore = commentBefore + content;
  3757. break;
  3758. default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] });
  3759. }
  3760. pos++;
  3761. }
  3762. unescapeProp(node, "attribute");
  3763. unescapeProp(node, "namespace");
  3764. this.newNode(new _attribute["default"](node));
  3765. this.position++;
  3766. };
  3767. _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
  3768. if (stopPosition < 0) stopPosition = this.tokens.length;
  3769. var startPosition = this.position;
  3770. var nodes = [];
  3771. var space = "";
  3772. var lastComment = void 0;
  3773. do
  3774. if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
  3775. if (!this.options.lossy) space += this.content();
  3776. } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
  3777. var spaces = {};
  3778. if (space) {
  3779. spaces.before = space;
  3780. space = "";
  3781. }
  3782. lastComment = new _comment["default"]({
  3783. value: this.content(),
  3784. source: getTokenSource(this.currToken),
  3785. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3786. spaces
  3787. });
  3788. nodes.push(lastComment);
  3789. }
  3790. while (++this.position < stopPosition);
  3791. if (space) {
  3792. if (lastComment) lastComment.spaces.after = space;
  3793. else if (!this.options.lossy) {
  3794. var firstToken = this.tokens[startPosition];
  3795. var lastToken = this.tokens[this.position - 1];
  3796. nodes.push(new _string["default"]({
  3797. value: "",
  3798. source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
  3799. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3800. spaces: {
  3801. before: space,
  3802. after: ""
  3803. }
  3804. }));
  3805. }
  3806. }
  3807. return nodes;
  3808. };
  3809. _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
  3810. var _this2 = this;
  3811. if (requiredSpace === void 0) requiredSpace = false;
  3812. var space = "";
  3813. var rawSpace = "";
  3814. nodes.forEach(function(n) {
  3815. var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
  3816. var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
  3817. space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
  3818. rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
  3819. });
  3820. if (rawSpace === space) rawSpace = void 0;
  3821. return {
  3822. space,
  3823. rawSpace
  3824. };
  3825. };
  3826. _proto.isNamedCombinator = function isNamedCombinator(position) {
  3827. if (position === void 0) position = this.position;
  3828. return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
  3829. };
  3830. _proto.namedCombinator = function namedCombinator() {
  3831. if (this.isNamedCombinator()) {
  3832. var nameRaw = this.content(this.tokens[this.position + 1]);
  3833. var name = (0, _util.unesc)(nameRaw).toLowerCase();
  3834. var raws = {};
  3835. if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
  3836. var node = new _combinator["default"]({
  3837. value: "/" + name + "/",
  3838. source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
  3839. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3840. raws
  3841. });
  3842. this.position = this.position + 3;
  3843. return node;
  3844. } else this.unexpected();
  3845. };
  3846. _proto.combinator = function combinator() {
  3847. var _this3 = this;
  3848. if (this.content() === "|") return this.namespace();
  3849. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
  3850. if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  3851. var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3852. if (nodes.length > 0) {
  3853. var last = this.current.last;
  3854. if (last) {
  3855. var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
  3856. if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
  3857. last.spaces.after += space;
  3858. } else nodes.forEach(function(n) {
  3859. return _this3.newNode(n);
  3860. });
  3861. }
  3862. return;
  3863. }
  3864. var firstToken = this.currToken;
  3865. var spaceOrDescendantSelectorNodes = void 0;
  3866. if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3867. var node;
  3868. if (this.isNamedCombinator()) node = this.namedCombinator();
  3869. else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
  3870. node = new _combinator["default"]({
  3871. value: this.content(),
  3872. source: getTokenSource(this.currToken),
  3873. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
  3874. });
  3875. this.position++;
  3876. } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
  3877. if (node) {
  3878. if (spaceOrDescendantSelectorNodes) {
  3879. var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace;
  3880. node.spaces.before = _space;
  3881. node.rawSpaceBefore = _rawSpace;
  3882. }
  3883. } else {
  3884. var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace;
  3885. if (!_rawSpace2) _rawSpace2 = _space2;
  3886. var spaces = {};
  3887. var raws = { spaces: {} };
  3888. if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) {
  3889. spaces.before = _space2.slice(0, _space2.length - 1);
  3890. raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
  3891. } else if (_space2[0] === " " && _rawSpace2[0] === " ") {
  3892. spaces.after = _space2.slice(1);
  3893. raws.spaces.after = _rawSpace2.slice(1);
  3894. } else raws.value = _rawSpace2;
  3895. node = new _combinator["default"]({
  3896. value: " ",
  3897. source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
  3898. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3899. spaces,
  3900. raws
  3901. });
  3902. }
  3903. if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
  3904. node.spaces.after = this.optionalSpace(this.content());
  3905. this.position++;
  3906. }
  3907. return this.newNode(node);
  3908. };
  3909. _proto.comma = function comma() {
  3910. if (this.position === this.tokens.length - 1) {
  3911. this.root.trailingComma = true;
  3912. this.position++;
  3913. return;
  3914. }
  3915. this.current._inferEndPosition();
  3916. var selector = new _selector["default"]({
  3917. source: { start: tokenStart(this.tokens[this.position + 1]) },
  3918. sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
  3919. });
  3920. this.current.parent.append(selector);
  3921. this.current = selector;
  3922. this.position++;
  3923. };
  3924. _proto.comment = function comment() {
  3925. var current = this.currToken;
  3926. this.newNode(new _comment["default"]({
  3927. value: this.content(),
  3928. source: getTokenSource(current),
  3929. sourceIndex: current[_tokenize.FIELDS.START_POS]
  3930. }));
  3931. this.position++;
  3932. };
  3933. _proto.error = function error(message, opts) {
  3934. throw this.root.error(message, opts);
  3935. };
  3936. _proto.missingBackslash = function missingBackslash() {
  3937. return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] });
  3938. };
  3939. _proto.missingParenthesis = function missingParenthesis() {
  3940. return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  3941. };
  3942. _proto.missingSquareBracket = function missingSquareBracket() {
  3943. return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3944. };
  3945. _proto.unexpected = function unexpected() {
  3946. return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
  3947. };
  3948. _proto.unexpectedPipe = function unexpectedPipe() {
  3949. return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
  3950. };
  3951. _proto.namespace = function namespace() {
  3952. var before = this.prevToken && this.content(this.prevToken) || true;
  3953. if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
  3954. this.position++;
  3955. return this.word(before);
  3956. } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
  3957. this.position++;
  3958. return this.universal(before);
  3959. }
  3960. this.unexpectedPipe();
  3961. };
  3962. _proto.nesting = function nesting() {
  3963. if (this.nextToken) {
  3964. if (this.content(this.nextToken) === "|") {
  3965. this.position++;
  3966. return;
  3967. }
  3968. }
  3969. var current = this.currToken;
  3970. this.newNode(new _nesting["default"]({
  3971. value: this.content(),
  3972. source: getTokenSource(current),
  3973. sourceIndex: current[_tokenize.FIELDS.START_POS]
  3974. }));
  3975. this.position++;
  3976. };
  3977. _proto.parentheses = function parentheses() {
  3978. var last = this.current.last;
  3979. var unbalanced = 1;
  3980. this.position++;
  3981. if (last && last.type === types.PSEUDO) {
  3982. var selector = new _selector["default"]({
  3983. source: { start: tokenStart(this.tokens[this.position]) },
  3984. sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
  3985. });
  3986. var cache = this.current;
  3987. last.append(selector);
  3988. this.current = selector;
  3989. while (this.position < this.tokens.length && unbalanced) {
  3990. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  3991. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  3992. if (unbalanced) this.parse();
  3993. else {
  3994. this.current.source.end = tokenEnd(this.currToken);
  3995. this.current.parent.source.end = tokenEnd(this.currToken);
  3996. this.position++;
  3997. }
  3998. }
  3999. this.current = cache;
  4000. } else {
  4001. var parenStart = this.currToken;
  4002. var parenValue = "(";
  4003. var parenEnd;
  4004. while (this.position < this.tokens.length && unbalanced) {
  4005. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4006. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4007. parenEnd = this.currToken;
  4008. parenValue += this.parseParenthesisToken(this.currToken);
  4009. this.position++;
  4010. }
  4011. if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
  4012. else this.newNode(new _string["default"]({
  4013. value: parenValue,
  4014. source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
  4015. sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
  4016. }));
  4017. }
  4018. if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4019. };
  4020. _proto.pseudo = function pseudo() {
  4021. var _this4 = this;
  4022. var pseudoStr = "";
  4023. var startingToken = this.currToken;
  4024. while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
  4025. pseudoStr += this.content();
  4026. this.position++;
  4027. }
  4028. if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
  4029. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
  4030. pseudoStr += first;
  4031. _this4.newNode(new _pseudo["default"]({
  4032. value: pseudoStr,
  4033. source: getTokenSourceSpan(startingToken, _this4.currToken),
  4034. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  4035. }));
  4036. if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] });
  4037. });
  4038. else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
  4039. };
  4040. _proto.space = function space() {
  4041. var content = this.content();
  4042. if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
  4043. return node.type === "comment";
  4044. })) {
  4045. this.spaces = this.optionalSpace(content);
  4046. this.position++;
  4047. } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  4048. this.current.last.spaces.after = this.optionalSpace(content);
  4049. this.position++;
  4050. } else this.combinator();
  4051. };
  4052. _proto.string = function string() {
  4053. var current = this.currToken;
  4054. this.newNode(new _string["default"]({
  4055. value: this.content(),
  4056. source: getTokenSource(current),
  4057. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4058. }));
  4059. this.position++;
  4060. };
  4061. _proto.universal = function universal(namespace) {
  4062. var nextToken = this.nextToken;
  4063. if (nextToken && this.content(nextToken) === "|") {
  4064. this.position++;
  4065. return this.namespace();
  4066. }
  4067. var current = this.currToken;
  4068. this.newNode(new _universal["default"]({
  4069. value: this.content(),
  4070. source: getTokenSource(current),
  4071. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4072. }), namespace);
  4073. this.position++;
  4074. };
  4075. _proto.splitWord = function splitWord(namespace, firstCallback) {
  4076. var _this5 = this;
  4077. var nextToken = this.nextToken;
  4078. var word = this.content();
  4079. while (nextToken && ~[
  4080. tokens.dollar,
  4081. tokens.caret,
  4082. tokens.equals,
  4083. tokens.word
  4084. ].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
  4085. this.position++;
  4086. var current = this.content();
  4087. word += current;
  4088. if (current.lastIndexOf("\\") === current.length - 1) {
  4089. var next = this.nextToken;
  4090. if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
  4091. word += this.requiredSpace(this.content(next));
  4092. this.position++;
  4093. }
  4094. }
  4095. nextToken = this.nextToken;
  4096. }
  4097. var hasClass = indexesOf(word, ".").filter(function(i) {
  4098. var escapedDot = word[i - 1] === "\\";
  4099. var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
  4100. return !escapedDot && !isKeyframesPercent;
  4101. });
  4102. var hasId = indexesOf(word, "#").filter(function(i) {
  4103. return word[i - 1] !== "\\";
  4104. });
  4105. var interpolations = indexesOf(word, "#{");
  4106. if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
  4107. return !~interpolations.indexOf(hashIndex);
  4108. });
  4109. var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
  4110. indices.forEach(function(ind, i) {
  4111. var index = indices[i + 1] || word.length;
  4112. var value = word.slice(ind, index);
  4113. if (i === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
  4114. var node;
  4115. var current = _this5.currToken;
  4116. var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
  4117. var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
  4118. if (~hasClass.indexOf(ind)) {
  4119. var classNameOpts = {
  4120. value: value.slice(1),
  4121. source,
  4122. sourceIndex
  4123. };
  4124. node = new _className["default"](unescapeProp(classNameOpts, "value"));
  4125. } else if (~hasId.indexOf(ind)) {
  4126. var idOpts = {
  4127. value: value.slice(1),
  4128. source,
  4129. sourceIndex
  4130. };
  4131. node = new _id["default"](unescapeProp(idOpts, "value"));
  4132. } else {
  4133. var tagOpts = {
  4134. value,
  4135. source,
  4136. sourceIndex
  4137. };
  4138. unescapeProp(tagOpts, "value");
  4139. node = new _tag["default"](tagOpts);
  4140. }
  4141. _this5.newNode(node, namespace);
  4142. namespace = null;
  4143. });
  4144. this.position++;
  4145. };
  4146. _proto.word = function word(namespace) {
  4147. var nextToken = this.nextToken;
  4148. if (nextToken && this.content(nextToken) === "|") {
  4149. this.position++;
  4150. return this.namespace();
  4151. }
  4152. return this.splitWord(namespace);
  4153. };
  4154. _proto.loop = function loop() {
  4155. while (this.position < this.tokens.length) this.parse(true);
  4156. this.current._inferEndPosition();
  4157. return this.root;
  4158. };
  4159. _proto.parse = function parse(throwOnParenthesis) {
  4160. switch (this.currToken[_tokenize.FIELDS.TYPE]) {
  4161. case tokens.space:
  4162. this.space();
  4163. break;
  4164. case tokens.comment:
  4165. this.comment();
  4166. break;
  4167. case tokens.openParenthesis:
  4168. this.parentheses();
  4169. break;
  4170. case tokens.closeParenthesis:
  4171. if (throwOnParenthesis) this.missingParenthesis();
  4172. break;
  4173. case tokens.openSquare:
  4174. this.attribute();
  4175. break;
  4176. case tokens.dollar:
  4177. case tokens.caret:
  4178. case tokens.equals:
  4179. case tokens.word:
  4180. this.word();
  4181. break;
  4182. case tokens.colon:
  4183. this.pseudo();
  4184. break;
  4185. case tokens.comma:
  4186. this.comma();
  4187. break;
  4188. case tokens.asterisk:
  4189. this.universal();
  4190. break;
  4191. case tokens.ampersand:
  4192. this.nesting();
  4193. break;
  4194. case tokens.slash:
  4195. case tokens.combinator:
  4196. this.combinator();
  4197. break;
  4198. case tokens.str:
  4199. this.string();
  4200. break;
  4201. case tokens.closeSquare: this.missingSquareBracket();
  4202. case tokens.semicolon: this.missingBackslash();
  4203. default: this.unexpected();
  4204. }
  4205. };
  4206. _proto.expected = function expected(description, index, found) {
  4207. if (Array.isArray(description)) {
  4208. var last = description.pop();
  4209. description = description.join(", ") + " or " + last;
  4210. }
  4211. var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
  4212. if (!found) return this.error("Expected " + an + " " + description + ".", { index });
  4213. return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
  4214. };
  4215. _proto.requiredSpace = function requiredSpace(space) {
  4216. return this.options.lossy ? " " : space;
  4217. };
  4218. _proto.optionalSpace = function optionalSpace(space) {
  4219. return this.options.lossy ? "" : space;
  4220. };
  4221. _proto.lossySpace = function lossySpace(space, required) {
  4222. if (this.options.lossy) return required ? " " : "";
  4223. else return space;
  4224. };
  4225. _proto.parseParenthesisToken = function parseParenthesisToken(token) {
  4226. var content = this.content(token);
  4227. if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
  4228. else return content;
  4229. };
  4230. _proto.newNode = function newNode(node, namespace) {
  4231. if (namespace) {
  4232. if (/^ +$/.test(namespace)) {
  4233. if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
  4234. namespace = true;
  4235. }
  4236. node.namespace = namespace;
  4237. unescapeProp(node, "namespace");
  4238. }
  4239. if (this.spaces) {
  4240. node.spaces.before = this.spaces;
  4241. this.spaces = "";
  4242. }
  4243. return this.current.append(node);
  4244. };
  4245. _proto.content = function content(token) {
  4246. if (token === void 0) token = this.currToken;
  4247. return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
  4248. };
  4249. /**
  4250. * returns the index of the next non-whitespace, non-comment token.
  4251. * returns -1 if no meaningful token is found.
  4252. */
  4253. _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
  4254. if (startPosition === void 0) startPosition = this.position + 1;
  4255. var searchPosition = startPosition;
  4256. while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
  4257. searchPosition++;
  4258. continue;
  4259. } else return searchPosition;
  4260. return -1;
  4261. };
  4262. _createClass(Parser, [
  4263. {
  4264. key: "currToken",
  4265. get: function get() {
  4266. return this.tokens[this.position];
  4267. }
  4268. },
  4269. {
  4270. key: "nextToken",
  4271. get: function get() {
  4272. return this.tokens[this.position + 1];
  4273. }
  4274. },
  4275. {
  4276. key: "prevToken",
  4277. get: function get() {
  4278. return this.tokens[this.position - 1];
  4279. }
  4280. }
  4281. ]);
  4282. return Parser;
  4283. }();
  4284. module.exports = exports.default;
  4285. }));
  4286. //#endregion
  4287. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/processor.js
  4288. var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4289. exports.__esModule = true;
  4290. exports["default"] = void 0;
  4291. var _parser = _interopRequireDefault(require_parser());
  4292. function _interopRequireDefault(obj) {
  4293. return obj && obj.__esModule ? obj : { "default": obj };
  4294. }
  4295. exports["default"] = /* @__PURE__ */ function() {
  4296. function Processor(func, options) {
  4297. this.func = func || function noop() {};
  4298. this.funcRes = null;
  4299. this.options = options;
  4300. }
  4301. var _proto = Processor.prototype;
  4302. _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
  4303. if (options === void 0) options = {};
  4304. if (Object.assign({}, this.options, options).updateSelector === false) return false;
  4305. else return typeof rule !== "string";
  4306. };
  4307. _proto._isLossy = function _isLossy(options) {
  4308. if (options === void 0) options = {};
  4309. if (Object.assign({}, this.options, options).lossless === false) return true;
  4310. else return false;
  4311. };
  4312. _proto._root = function _root(rule, options) {
  4313. if (options === void 0) options = {};
  4314. return new _parser["default"](rule, this._parseOptions(options)).root;
  4315. };
  4316. _proto._parseOptions = function _parseOptions(options) {
  4317. return { lossy: this._isLossy(options) };
  4318. };
  4319. _proto._run = function _run(rule, options) {
  4320. var _this = this;
  4321. if (options === void 0) options = {};
  4322. return new Promise(function(resolve, reject) {
  4323. try {
  4324. var root = _this._root(rule, options);
  4325. Promise.resolve(_this.func(root)).then(function(transform) {
  4326. var string = void 0;
  4327. if (_this._shouldUpdateSelector(rule, options)) {
  4328. string = root.toString();
  4329. rule.selector = string;
  4330. }
  4331. return {
  4332. transform,
  4333. root,
  4334. string
  4335. };
  4336. }).then(resolve, reject);
  4337. } catch (e) {
  4338. reject(e);
  4339. return;
  4340. }
  4341. });
  4342. };
  4343. _proto._runSync = function _runSync(rule, options) {
  4344. if (options === void 0) options = {};
  4345. var root = this._root(rule, options);
  4346. var transform = this.func(root);
  4347. if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
  4348. var string = void 0;
  4349. if (options.updateSelector && typeof rule !== "string") {
  4350. string = root.toString();
  4351. rule.selector = string;
  4352. }
  4353. return {
  4354. transform,
  4355. root,
  4356. string
  4357. };
  4358. };
  4359. _proto.ast = function ast(rule, options) {
  4360. return this._run(rule, options).then(function(result) {
  4361. return result.root;
  4362. });
  4363. };
  4364. _proto.astSync = function astSync(rule, options) {
  4365. return this._runSync(rule, options).root;
  4366. };
  4367. _proto.transform = function transform(rule, options) {
  4368. return this._run(rule, options).then(function(result) {
  4369. return result.transform;
  4370. });
  4371. };
  4372. _proto.transformSync = function transformSync(rule, options) {
  4373. return this._runSync(rule, options).transform;
  4374. };
  4375. _proto.process = function process(rule, options) {
  4376. return this._run(rule, options).then(function(result) {
  4377. return result.string || result.root.toString();
  4378. });
  4379. };
  4380. _proto.processSync = function processSync(rule, options) {
  4381. var result = this._runSync(rule, options);
  4382. return result.string || result.root.toString();
  4383. };
  4384. return Processor;
  4385. }();
  4386. module.exports = exports.default;
  4387. }));
  4388. //#endregion
  4389. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/constructors.js
  4390. var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4391. exports.__esModule = true;
  4392. exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
  4393. var _attribute = _interopRequireDefault(require_attribute());
  4394. var _className = _interopRequireDefault(require_className());
  4395. var _combinator = _interopRequireDefault(require_combinator());
  4396. var _comment = _interopRequireDefault(require_comment());
  4397. var _id = _interopRequireDefault(require_id());
  4398. var _nesting = _interopRequireDefault(require_nesting());
  4399. var _pseudo = _interopRequireDefault(require_pseudo());
  4400. var _root = _interopRequireDefault(require_root());
  4401. var _selector = _interopRequireDefault(require_selector());
  4402. var _string = _interopRequireDefault(require_string());
  4403. var _tag = _interopRequireDefault(require_tag());
  4404. var _universal = _interopRequireDefault(require_universal());
  4405. function _interopRequireDefault(obj) {
  4406. return obj && obj.__esModule ? obj : { "default": obj };
  4407. }
  4408. exports.attribute = function attribute(opts) {
  4409. return new _attribute["default"](opts);
  4410. };
  4411. exports.className = function className(opts) {
  4412. return new _className["default"](opts);
  4413. };
  4414. exports.combinator = function combinator(opts) {
  4415. return new _combinator["default"](opts);
  4416. };
  4417. exports.comment = function comment(opts) {
  4418. return new _comment["default"](opts);
  4419. };
  4420. exports.id = function id(opts) {
  4421. return new _id["default"](opts);
  4422. };
  4423. exports.nesting = function nesting(opts) {
  4424. return new _nesting["default"](opts);
  4425. };
  4426. exports.pseudo = function pseudo(opts) {
  4427. return new _pseudo["default"](opts);
  4428. };
  4429. exports.root = function root(opts) {
  4430. return new _root["default"](opts);
  4431. };
  4432. exports.selector = function selector(opts) {
  4433. return new _selector["default"](opts);
  4434. };
  4435. exports.string = function string(opts) {
  4436. return new _string["default"](opts);
  4437. };
  4438. exports.tag = function tag(opts) {
  4439. return new _tag["default"](opts);
  4440. };
  4441. exports.universal = function universal(opts) {
  4442. return new _universal["default"](opts);
  4443. };
  4444. }));
  4445. //#endregion
  4446. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/guards.js
  4447. var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
  4448. exports.__esModule = true;
  4449. exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
  4450. exports.isContainer = isContainer;
  4451. exports.isIdentifier = void 0;
  4452. exports.isNamespace = isNamespace;
  4453. exports.isNesting = void 0;
  4454. exports.isNode = isNode;
  4455. exports.isPseudo = void 0;
  4456. exports.isPseudoClass = isPseudoClass;
  4457. exports.isPseudoElement = isPseudoElement;
  4458. exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
  4459. var _types = require_types();
  4460. var _IS_TYPE;
  4461. var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
  4462. function isNode(node) {
  4463. return typeof node === "object" && IS_TYPE[node.type];
  4464. }
  4465. function isNodeType(type, node) {
  4466. return isNode(node) && node.type === type;
  4467. }
  4468. var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
  4469. exports.isAttribute = isAttribute;
  4470. exports.isClassName = isNodeType.bind(null, _types.CLASS);
  4471. exports.isCombinator = isNodeType.bind(null, _types.COMBINATOR);
  4472. exports.isComment = isNodeType.bind(null, _types.COMMENT);
  4473. exports.isIdentifier = isNodeType.bind(null, _types.ID);
  4474. exports.isNesting = isNodeType.bind(null, _types.NESTING);
  4475. var isPseudo = isNodeType.bind(null, _types.PSEUDO);
  4476. exports.isPseudo = isPseudo;
  4477. exports.isRoot = isNodeType.bind(null, _types.ROOT);
  4478. exports.isSelector = isNodeType.bind(null, _types.SELECTOR);
  4479. exports.isString = isNodeType.bind(null, _types.STRING);
  4480. var isTag = isNodeType.bind(null, _types.TAG);
  4481. exports.isTag = isTag;
  4482. exports.isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
  4483. function isPseudoElement(node) {
  4484. return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
  4485. }
  4486. function isPseudoClass(node) {
  4487. return isPseudo(node) && !isPseudoElement(node);
  4488. }
  4489. function isContainer(node) {
  4490. return !!(isNode(node) && node.walk);
  4491. }
  4492. function isNamespace(node) {
  4493. return isAttribute(node) || isTag(node);
  4494. }
  4495. }));
  4496. //#endregion
  4497. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/selectors/index.js
  4498. var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4499. exports.__esModule = true;
  4500. var _types = require_types();
  4501. Object.keys(_types).forEach(function(key) {
  4502. if (key === "default" || key === "__esModule") return;
  4503. if (key in exports && exports[key] === _types[key]) return;
  4504. exports[key] = _types[key];
  4505. });
  4506. var _constructors = require_constructors();
  4507. Object.keys(_constructors).forEach(function(key) {
  4508. if (key === "default" || key === "__esModule") return;
  4509. if (key in exports && exports[key] === _constructors[key]) return;
  4510. exports[key] = _constructors[key];
  4511. });
  4512. var _guards = require_guards();
  4513. Object.keys(_guards).forEach(function(key) {
  4514. if (key === "default" || key === "__esModule") return;
  4515. if (key in exports && exports[key] === _guards[key]) return;
  4516. exports[key] = _guards[key];
  4517. });
  4518. }));
  4519. //#endregion
  4520. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/index.js
  4521. var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4522. exports.__esModule = true;
  4523. exports["default"] = void 0;
  4524. var _processor = _interopRequireDefault(require_processor());
  4525. var selectors = _interopRequireWildcard(require_selectors());
  4526. function _getRequireWildcardCache(nodeInterop) {
  4527. if (typeof WeakMap !== "function") return null;
  4528. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  4529. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  4530. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  4531. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  4532. })(nodeInterop);
  4533. }
  4534. function _interopRequireWildcard(obj, nodeInterop) {
  4535. if (!nodeInterop && obj && obj.__esModule) return obj;
  4536. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  4537. var cache = _getRequireWildcardCache(nodeInterop);
  4538. if (cache && cache.has(obj)) return cache.get(obj);
  4539. var newObj = {};
  4540. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  4541. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  4542. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  4543. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  4544. else newObj[key] = obj[key];
  4545. }
  4546. newObj["default"] = obj;
  4547. if (cache) cache.set(obj, newObj);
  4548. return newObj;
  4549. }
  4550. function _interopRequireDefault(obj) {
  4551. return obj && obj.__esModule ? obj : { "default": obj };
  4552. }
  4553. var parser = function parser(processor) {
  4554. return new _processor["default"](processor);
  4555. };
  4556. Object.assign(parser, selectors);
  4557. delete parser.__esModule;
  4558. exports["default"] = parser;
  4559. module.exports = exports.default;
  4560. }));
  4561. //#endregion
  4562. //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.8/node_modules/postcss-modules-local-by-default/src/index.js
  4563. var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4564. const selectorParser = require_dist();
  4565. const valueParser = require_lib();
  4566. const { extractICSS } = require_src$4();
  4567. const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
  4568. const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore";
  4569. const isSpacing = (node) => node.type === "combinator" && node.value === " ";
  4570. const isPureCheckDisabled = (root) => {
  4571. for (const node of root.nodes) {
  4572. if (node.type !== "comment") return false;
  4573. if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true;
  4574. }
  4575. return false;
  4576. };
  4577. function getIgnoreComment(node) {
  4578. if (!node.parent) return;
  4579. const indexInParent = node.parent.index(node);
  4580. for (let i = indexInParent - 1; i >= 0; i--) {
  4581. const prevNode = node.parent.nodes[i];
  4582. if (prevNode.type === "comment") {
  4583. if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode;
  4584. } else break;
  4585. }
  4586. }
  4587. function normalizeNodeArray(nodes) {
  4588. const array = [];
  4589. nodes.forEach((x) => {
  4590. if (Array.isArray(x)) normalizeNodeArray(x).forEach((item) => {
  4591. array.push(item);
  4592. });
  4593. else if (x) array.push(x);
  4594. });
  4595. if (array.length > 0 && isSpacing(array[array.length - 1])) array.pop();
  4596. return array;
  4597. }
  4598. const isPureSelectorSymbol = Symbol("is-pure-selector");
  4599. function localizeNode(rule, mode, localAliasMap) {
  4600. const transform = (node, context) => {
  4601. if (context.ignoreNextSpacing && !isSpacing(node)) throw new Error("Missing whitespace after " + context.ignoreNextSpacing);
  4602. if (context.enforceNoSpacing && isSpacing(node)) throw new Error("Missing whitespace before " + context.enforceNoSpacing);
  4603. let newNodes;
  4604. switch (node.type) {
  4605. case "root": {
  4606. let resultingGlobal;
  4607. context.hasPureGlobals = false;
  4608. newNodes = node.nodes.map((n) => {
  4609. const nContext = {
  4610. global: context.global,
  4611. lastWasSpacing: true,
  4612. hasLocals: false,
  4613. explicit: false
  4614. };
  4615. n = transform(n, nContext);
  4616. if (typeof resultingGlobal === "undefined") resultingGlobal = nContext.global;
  4617. else if (resultingGlobal !== nContext.global) throw new Error("Inconsistent rule global/local result in rule \"" + node + "\" (multiple selectors must result in the same mode for the rule)");
  4618. if (!nContext.hasLocals) context.hasPureGlobals = true;
  4619. return n;
  4620. });
  4621. context.global = resultingGlobal;
  4622. node.nodes = normalizeNodeArray(newNodes);
  4623. break;
  4624. }
  4625. case "selector":
  4626. newNodes = node.map((childNode) => transform(childNode, context));
  4627. node = node.clone();
  4628. node.nodes = normalizeNodeArray(newNodes);
  4629. break;
  4630. case "combinator":
  4631. if (isSpacing(node)) {
  4632. if (context.ignoreNextSpacing) {
  4633. context.ignoreNextSpacing = false;
  4634. context.lastWasSpacing = false;
  4635. context.enforceNoSpacing = false;
  4636. return null;
  4637. }
  4638. context.lastWasSpacing = true;
  4639. return node;
  4640. }
  4641. break;
  4642. case "pseudo": {
  4643. let childContext;
  4644. const isNested = !!node.length;
  4645. const isScoped = node.value === ":local" || node.value === ":global";
  4646. if (node.value === ":import" || node.value === ":export") context.hasLocals = true;
  4647. else if (isNested) {
  4648. if (isScoped) {
  4649. if (node.nodes.length === 0) throw new Error(`${node.value}() can't be empty`);
  4650. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4651. childContext = {
  4652. global: node.value === ":global",
  4653. inside: node.value,
  4654. hasLocals: false,
  4655. explicit: true
  4656. };
  4657. newNodes = node.map((childNode) => transform(childNode, childContext)).reduce((acc, next) => acc.concat(next.nodes), []);
  4658. if (newNodes.length) {
  4659. const { before, after } = node.spaces;
  4660. const first = newNodes[0];
  4661. const last = newNodes[newNodes.length - 1];
  4662. first.spaces = {
  4663. before,
  4664. after: first.spaces.after
  4665. };
  4666. last.spaces = {
  4667. before: last.spaces.before,
  4668. after
  4669. };
  4670. }
  4671. node = newNodes;
  4672. break;
  4673. } else {
  4674. childContext = {
  4675. global: context.global,
  4676. inside: context.inside,
  4677. lastWasSpacing: true,
  4678. hasLocals: false,
  4679. explicit: context.explicit
  4680. };
  4681. newNodes = node.map((childNode) => {
  4682. const newContext = {
  4683. ...childContext,
  4684. enforceNoSpacing: false
  4685. };
  4686. const result = transform(childNode, newContext);
  4687. childContext.global = newContext.global;
  4688. childContext.hasLocals = newContext.hasLocals;
  4689. return result;
  4690. });
  4691. node = node.clone();
  4692. node.nodes = normalizeNodeArray(newNodes);
  4693. if (childContext.hasLocals) context.hasLocals = true;
  4694. }
  4695. break;
  4696. } else if (isScoped) {
  4697. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4698. const addBackSpacing = !!node.spaces.before;
  4699. context.ignoreNextSpacing = context.lastWasSpacing ? node.value : false;
  4700. context.enforceNoSpacing = context.lastWasSpacing ? false : node.value;
  4701. context.global = node.value === ":global";
  4702. context.explicit = true;
  4703. return addBackSpacing ? selectorParser.combinator({ value: " " }) : null;
  4704. }
  4705. break;
  4706. }
  4707. case "id":
  4708. case "class": {
  4709. if (!node.value) throw new Error("Invalid class or id selector syntax");
  4710. if (context.global) break;
  4711. const isImportedValue = localAliasMap.has(node.value);
  4712. if (!isImportedValue || isImportedValue && context.explicit) {
  4713. const innerNode = node.clone();
  4714. innerNode.spaces = {
  4715. before: "",
  4716. after: ""
  4717. };
  4718. node = selectorParser.pseudo({
  4719. value: ":local",
  4720. nodes: [innerNode],
  4721. spaces: node.spaces
  4722. });
  4723. context.hasLocals = true;
  4724. }
  4725. break;
  4726. }
  4727. case "nesting": if (node.value === "&") context.hasLocals = rule.parent[isPureSelectorSymbol];
  4728. }
  4729. context.lastWasSpacing = false;
  4730. context.ignoreNextSpacing = false;
  4731. context.enforceNoSpacing = false;
  4732. return node;
  4733. };
  4734. const rootContext = {
  4735. global: mode === "global",
  4736. hasPureGlobals: false
  4737. };
  4738. rootContext.selector = selectorParser((root) => {
  4739. transform(root, rootContext);
  4740. }).processSync(rule, {
  4741. updateSelector: false,
  4742. lossless: true
  4743. });
  4744. return rootContext;
  4745. }
  4746. function localizeDeclNode(node, context) {
  4747. switch (node.type) {
  4748. case "word":
  4749. if (context.localizeNextItem) {
  4750. if (!context.localAliasMap.has(node.value)) {
  4751. node.value = ":local(" + node.value + ")";
  4752. context.localizeNextItem = false;
  4753. }
  4754. }
  4755. break;
  4756. case "function":
  4757. if (context.options && context.options.rewriteUrl && node.value.toLowerCase() === "url") node.nodes.map((nestedNode) => {
  4758. if (nestedNode.type !== "string" && nestedNode.type !== "word") return;
  4759. let newUrl = context.options.rewriteUrl(context.global, nestedNode.value);
  4760. switch (nestedNode.type) {
  4761. case "string":
  4762. if (nestedNode.quote === "'") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'");
  4763. if (nestedNode.quote === "\"") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, "\\\"");
  4764. break;
  4765. case "word":
  4766. newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1");
  4767. break;
  4768. }
  4769. nestedNode.value = newUrl;
  4770. });
  4771. break;
  4772. }
  4773. return node;
  4774. }
  4775. const specialKeywords = [
  4776. "none",
  4777. "inherit",
  4778. "initial",
  4779. "revert",
  4780. "revert-layer",
  4781. "unset"
  4782. ];
  4783. function localizeDeclarationValues(localize, declaration, context) {
  4784. const valueNodes = valueParser(declaration.value);
  4785. valueNodes.walk((node, index, nodes) => {
  4786. if (node.type === "function" && (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")) return false;
  4787. if (node.type === "word" && specialKeywords.includes(node.value.toLowerCase())) return;
  4788. nodes[index] = localizeDeclNode(node, {
  4789. options: context.options,
  4790. global: context.global,
  4791. localizeNextItem: localize && !context.global,
  4792. localAliasMap: context.localAliasMap
  4793. });
  4794. });
  4795. declaration.value = valueNodes.toString();
  4796. }
  4797. const validIdent = /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
  4798. const animationKeywords = {
  4799. $normal: 1,
  4800. $reverse: 1,
  4801. $alternate: 1,
  4802. "$alternate-reverse": 1,
  4803. $forwards: 1,
  4804. $backwards: 1,
  4805. $both: 1,
  4806. $infinite: 1,
  4807. $paused: 1,
  4808. $running: 1,
  4809. $ease: 1,
  4810. "$ease-in": 1,
  4811. "$ease-out": 1,
  4812. "$ease-in-out": 1,
  4813. $linear: 1,
  4814. "$step-end": 1,
  4815. "$step-start": 1,
  4816. $none: Infinity,
  4817. $initial: Infinity,
  4818. $inherit: Infinity,
  4819. $unset: Infinity,
  4820. $revert: Infinity,
  4821. "$revert-layer": Infinity
  4822. };
  4823. function localizeDeclaration(declaration, context) {
  4824. if (/animation(-name)?$/i.test(declaration.prop)) {
  4825. let parsedAnimationKeywords = {};
  4826. declaration.value = valueParser(declaration.value).walk((node) => {
  4827. if (node.type === "div") {
  4828. parsedAnimationKeywords = {};
  4829. return;
  4830. } else if (node.type === "function" && node.value.toLowerCase() === "local" && node.nodes.length === 1) {
  4831. node.type = "word";
  4832. node.value = node.nodes[0].value;
  4833. return localizeDeclNode(node, {
  4834. options: context.options,
  4835. global: context.global,
  4836. localizeNextItem: true,
  4837. localAliasMap: context.localAliasMap
  4838. });
  4839. } else if (node.type === "function") {
  4840. if (node.value.toLowerCase() === "global" && node.nodes.length === 1) {
  4841. node.type = "word";
  4842. node.value = node.nodes[0].value;
  4843. }
  4844. return false;
  4845. } else if (node.type !== "word") return;
  4846. const value = node.type === "word" ? node.value.toLowerCase() : null;
  4847. let shouldParseAnimationName = false;
  4848. if (value && validIdent.test(value)) if ("$" + value in animationKeywords) {
  4849. parsedAnimationKeywords["$" + value] = "$" + value in parsedAnimationKeywords ? parsedAnimationKeywords["$" + value] + 1 : 0;
  4850. shouldParseAnimationName = parsedAnimationKeywords["$" + value] >= animationKeywords["$" + value];
  4851. } else shouldParseAnimationName = true;
  4852. return localizeDeclNode(node, {
  4853. options: context.options,
  4854. global: context.global,
  4855. localizeNextItem: shouldParseAnimationName && !context.global,
  4856. localAliasMap: context.localAliasMap
  4857. });
  4858. }).toString();
  4859. return;
  4860. }
  4861. if (/url\(/i.test(declaration.value)) return localizeDeclarationValues(false, declaration, context);
  4862. }
  4863. const isPureSelector = (context, rule) => {
  4864. if (!rule.parent || rule.type === "root") return !context.hasPureGlobals;
  4865. if (rule.type === "rule" && rule[isPureSelectorSymbol]) return rule[isPureSelectorSymbol] || isPureSelector(context, rule.parent);
  4866. return !context.hasPureGlobals || isPureSelector(context, rule.parent);
  4867. };
  4868. const isNodeWithoutDeclarations = (rule) => {
  4869. if (rule.nodes.length > 0) return !rule.nodes.every((item) => item.type === "rule" || item.type === "atrule" && !isNodeWithoutDeclarations(item));
  4870. return true;
  4871. };
  4872. module.exports = (options = {}) => {
  4873. if (options && options.mode && options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") throw new Error("options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")");
  4874. const pureMode = options && options.mode === "pure";
  4875. const globalMode = options && options.mode === "global";
  4876. return {
  4877. postcssPlugin: "postcss-modules-local-by-default",
  4878. prepare() {
  4879. const localAliasMap = /* @__PURE__ */ new Map();
  4880. return { Once(root) {
  4881. const { icssImports } = extractICSS(root, false);
  4882. const enforcePureMode = pureMode && !isPureCheckDisabled(root);
  4883. Object.keys(icssImports).forEach((key) => {
  4884. Object.keys(icssImports[key]).forEach((prop) => {
  4885. localAliasMap.set(prop, icssImports[key][prop]);
  4886. });
  4887. });
  4888. root.walkAtRules((atRule) => {
  4889. if (/keyframes$/i.test(atRule.name)) {
  4890. const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params);
  4891. const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params);
  4892. let globalKeyframes = globalMode;
  4893. if (globalMatch) {
  4894. if (enforcePureMode) {
  4895. const ignoreComment = getIgnoreComment(atRule);
  4896. if (!ignoreComment) throw atRule.error("@keyframes :global(...) is not allowed in pure mode");
  4897. else ignoreComment.remove();
  4898. }
  4899. atRule.params = globalMatch[1];
  4900. globalKeyframes = true;
  4901. } else if (localMatch) {
  4902. atRule.params = localMatch[0];
  4903. globalKeyframes = false;
  4904. } else if (atRule.params && !globalMode && !localAliasMap.has(atRule.params)) atRule.params = ":local(" + atRule.params + ")";
  4905. atRule.walkDecls((declaration) => {
  4906. localizeDeclaration(declaration, {
  4907. localAliasMap,
  4908. options,
  4909. global: globalKeyframes
  4910. });
  4911. });
  4912. } else if (/scope$/i.test(atRule.name)) {
  4913. if (atRule.params) {
  4914. const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0;
  4915. if (ignoreComment) ignoreComment.remove();
  4916. atRule.params = atRule.params.split("to").map((item) => {
  4917. const selector = item.trim().slice(1, -1).trim();
  4918. const context = localizeNode(selector, options.mode, localAliasMap);
  4919. context.options = options;
  4920. context.localAliasMap = localAliasMap;
  4921. if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  4922. return `(${context.selector})`;
  4923. }).join(" to ");
  4924. }
  4925. atRule.nodes.forEach((declaration) => {
  4926. if (declaration.type === "decl") localizeDeclaration(declaration, {
  4927. localAliasMap,
  4928. options,
  4929. global: globalMode
  4930. });
  4931. });
  4932. } else if (atRule.nodes) atRule.nodes.forEach((declaration) => {
  4933. if (declaration.type === "decl") localizeDeclaration(declaration, {
  4934. localAliasMap,
  4935. options,
  4936. global: globalMode
  4937. });
  4938. });
  4939. });
  4940. root.walkRules((rule) => {
  4941. if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return;
  4942. const context = localizeNode(rule, options.mode, localAliasMap);
  4943. context.options = options;
  4944. context.localAliasMap = localAliasMap;
  4945. const ignoreComment = enforcePureMode ? getIgnoreComment(rule) : void 0;
  4946. const isNotPure = enforcePureMode && !isPureSelector(context, rule);
  4947. if (isNotPure && isNodeWithoutDeclarations(rule) && !ignoreComment) throw rule.error("Selector \"" + rule.selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  4948. else if (ignoreComment) ignoreComment.remove();
  4949. if (pureMode) rule[isPureSelectorSymbol] = !isNotPure;
  4950. rule.selector = context.selector;
  4951. if (rule.nodes) rule.nodes.forEach((declaration) => localizeDeclaration(declaration, context));
  4952. });
  4953. } };
  4954. }
  4955. };
  4956. };
  4957. module.exports.postcss = true;
  4958. }));
  4959. //#endregion
  4960. //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.8/node_modules/postcss-modules-scope/src/index.js
  4961. var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4962. const selectorParser = require_dist();
  4963. const hasOwnProperty = Object.prototype.hasOwnProperty;
  4964. function isNestedRule(rule) {
  4965. if (!rule.parent || rule.parent.type === "root") return false;
  4966. if (rule.parent.type === "rule") return true;
  4967. return isNestedRule(rule.parent);
  4968. }
  4969. function getSingleLocalNamesForComposes(root, rule) {
  4970. if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
  4971. return root.nodes.map((node) => {
  4972. if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root}"`);
  4973. node = node.nodes[0];
  4974. if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4975. node = node.first;
  4976. if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4977. node = node.first;
  4978. if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root + "\", \"" + node + "\" is weird");
  4979. return node.value;
  4980. });
  4981. }
  4982. const unescapeRegExp = /* @__PURE__ */ new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig");
  4983. function unescape(str) {
  4984. return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
  4985. const high = "0x" + escaped - 65536;
  4986. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  4987. });
  4988. }
  4989. const plugin = (options = {}) => {
  4990. const generateScopedName = options && options.generateScopedName || plugin.generateScopedName;
  4991. const generateExportEntry = options && options.generateExportEntry || plugin.generateExportEntry;
  4992. const exportGlobals = options && options.exportGlobals;
  4993. return {
  4994. postcssPlugin: "postcss-modules-scope",
  4995. Once(root, { rule }) {
  4996. const exports$1 = Object.create(null);
  4997. function exportScopedName(name, rawName, node) {
  4998. const scopedName = generateScopedName(rawName ? rawName : name, root.source.input.from, root.source.input.css, node);
  4999. const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root.source.input.from, root.source.input.css, node);
  5000. exports$1[key] = exports$1[key] || [];
  5001. if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value);
  5002. return scopedName;
  5003. }
  5004. function localizeNode(node) {
  5005. switch (node.type) {
  5006. case "selector":
  5007. node.nodes = node.map((item) => localizeNode(item));
  5008. return node;
  5009. case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5010. case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5011. case "attribute": if (node.attribute === "class" && node.operator === "=") return selectorParser.attribute({
  5012. attribute: node.attribute,
  5013. operator: node.operator,
  5014. quoteMark: "'",
  5015. value: exportScopedName(node.value, null, null)
  5016. });
  5017. }
  5018. throw new Error(`${node.type} ("${node}") is not allowed in a :local block`);
  5019. }
  5020. function traverseNode(node) {
  5021. switch (node.type) {
  5022. case "pseudo": if (node.value === ":local") {
  5023. if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block");
  5024. const selector = localizeNode(node.first);
  5025. selector.first.spaces = node.spaces;
  5026. const nextNode = node.next();
  5027. if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector.last.value)) selector.last.spaces.after = " ";
  5028. node.replaceWith(selector);
  5029. return;
  5030. }
  5031. case "root":
  5032. case "selector":
  5033. node.each((item) => traverseNode(item));
  5034. break;
  5035. case "id":
  5036. case "class":
  5037. if (exportGlobals) exports$1[node.value] = [node.value];
  5038. break;
  5039. }
  5040. return node;
  5041. }
  5042. const importedNames = {};
  5043. root.walkRules(/^:import\(.+\)$/, (rule) => {
  5044. rule.walkDecls((decl) => {
  5045. importedNames[decl.prop] = true;
  5046. });
  5047. });
  5048. root.walkRules((rule) => {
  5049. let parsedSelector = selectorParser().astSync(rule);
  5050. rule.selector = traverseNode(parsedSelector.clone()).toString();
  5051. rule.walkDecls(/^(composes|compose-with)$/i, (decl) => {
  5052. const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent);
  5053. decl.value.split(",").forEach((value) => {
  5054. value.trim().split(/\s+/).forEach((className) => {
  5055. const global = /^global\(([^)]+)\)$/.exec(className);
  5056. if (global) localNames.forEach((exportedName) => {
  5057. exports$1[exportedName].push(global[1]);
  5058. });
  5059. else if (hasOwnProperty.call(importedNames, className)) localNames.forEach((exportedName) => {
  5060. exports$1[exportedName].push(className);
  5061. });
  5062. else if (hasOwnProperty.call(exports$1, className)) localNames.forEach((exportedName) => {
  5063. exports$1[className].forEach((item) => {
  5064. exports$1[exportedName].push(item);
  5065. });
  5066. });
  5067. else throw decl.error(`referenced class name "${className}" in ${decl.prop} not found`);
  5068. });
  5069. });
  5070. decl.remove();
  5071. });
  5072. rule.walkDecls((decl) => {
  5073. if (!/:local\s*\((.+?)\)/.test(decl.value)) return;
  5074. let tokens = decl.value.split(/(,|'[^']*'|"[^"]*")/);
  5075. tokens = tokens.map((token, idx) => {
  5076. if (idx === 0 || tokens[idx - 1] === ",") {
  5077. let result = token;
  5078. const localMatch = /:local\s*\((.+?)\)/.exec(token);
  5079. if (localMatch) {
  5080. const input = localMatch.input;
  5081. const matchPattern = localMatch[0];
  5082. const matchVal = localMatch[1];
  5083. const newVal = exportScopedName(matchVal);
  5084. result = input.replace(matchPattern, newVal);
  5085. } else return token;
  5086. return result;
  5087. } else return token;
  5088. });
  5089. decl.value = tokens.join("");
  5090. });
  5091. });
  5092. root.walkAtRules(/keyframes$/i, (atRule) => {
  5093. const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
  5094. if (!localMatch) return;
  5095. atRule.params = exportScopedName(localMatch[1]);
  5096. });
  5097. root.walkAtRules(/scope$/i, (atRule) => {
  5098. if (atRule.params) atRule.params = atRule.params.split("to").map((item) => {
  5099. const selector = item.trim().slice(1, -1).trim();
  5100. if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector)) return `(${selector})`;
  5101. return `(${traverseNode(selectorParser().astSync(selector)).toString()})`;
  5102. }).join(" to ");
  5103. });
  5104. const exportedNames = Object.keys(exports$1);
  5105. if (exportedNames.length > 0) {
  5106. const exportRule = rule({ selector: ":export" });
  5107. exportedNames.forEach((exportedName) => exportRule.append({
  5108. prop: exportedName,
  5109. value: exports$1[exportedName].join(" "),
  5110. raws: { before: "\n " }
  5111. }));
  5112. root.append(exportRule);
  5113. }
  5114. }
  5115. };
  5116. };
  5117. plugin.postcss = true;
  5118. plugin.generateScopedName = function(name, path) {
  5119. return `_${path.replace(/\.[^./\\]+$/, "").replace(/[\W_]+/g, "_").replace(/^_|_$/g, "")}__${name}`.trim();
  5120. };
  5121. plugin.generateExportEntry = function(name, scopedName) {
  5122. return {
  5123. key: unescape(name),
  5124. value: unescape(scopedName)
  5125. };
  5126. };
  5127. module.exports = plugin;
  5128. }));
  5129. //#endregion
  5130. //#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js
  5131. var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5132. function hash(str) {
  5133. var hash = 5381, i = str.length;
  5134. while (i) hash = hash * 33 ^ str.charCodeAt(--i);
  5135. return hash >>> 0;
  5136. }
  5137. module.exports = hash;
  5138. }));
  5139. //#endregion
  5140. //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.8/node_modules/postcss-modules-values/src/index.js
  5141. var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5142. const ICSSUtils = require_src$4();
  5143. const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
  5144. const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/;
  5145. const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/;
  5146. module.exports = (options) => {
  5147. let importIndex = 0;
  5148. const createImportedName = options && options.createImportedName || ((importName) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`);
  5149. return {
  5150. postcssPlugin: "postcss-modules-values",
  5151. prepare(result) {
  5152. const importAliases = [];
  5153. const definitions = {};
  5154. return { Once(root, postcss) {
  5155. root.walkAtRules(/value/i, (atRule) => {
  5156. const matches = atRule.params.match(matchImports);
  5157. if (matches) {
  5158. let [, aliases, path] = matches;
  5159. if (definitions[path]) path = definitions[path];
  5160. const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => {
  5161. const tokens = matchImport.exec(alias);
  5162. if (tokens) {
  5163. const [, theirName, myName = theirName] = tokens;
  5164. const importedName = createImportedName(myName);
  5165. definitions[myName] = importedName;
  5166. return {
  5167. theirName,
  5168. importedName
  5169. };
  5170. } else throw new Error(`@import statement "${alias}" is invalid!`);
  5171. });
  5172. importAliases.push({
  5173. path,
  5174. imports
  5175. });
  5176. atRule.remove();
  5177. return;
  5178. }
  5179. if (atRule.params.indexOf("@value") !== -1) result.warn("Invalid value definition: " + atRule.params);
  5180. let [, key, value] = `${atRule.params}${atRule.raws.between}`.match(matchValueDefinition);
  5181. const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, "");
  5182. if (normalizedValue.length === 0) {
  5183. result.warn("Invalid value definition: " + atRule.params);
  5184. atRule.remove();
  5185. return;
  5186. }
  5187. if (!/^\s+$/.test(normalizedValue)) value = value.trim();
  5188. definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
  5189. atRule.remove();
  5190. });
  5191. if (!Object.keys(definitions).length) return;
  5192. ICSSUtils.replaceSymbols(root, definitions);
  5193. const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({
  5194. value: definitions[key],
  5195. prop: key,
  5196. raws: { before: "\n " }
  5197. }));
  5198. if (exportDeclarations.length > 0) {
  5199. const exportRule = postcss.rule({
  5200. selector: ":export",
  5201. raws: { after: "\n" }
  5202. });
  5203. exportRule.append(exportDeclarations);
  5204. root.prepend(exportRule);
  5205. }
  5206. importAliases.reverse().forEach(({ path, imports }) => {
  5207. const importRule = postcss.rule({
  5208. selector: `:import(${path})`,
  5209. raws: { after: "\n" }
  5210. });
  5211. imports.forEach(({ theirName, importedName }) => {
  5212. importRule.append({
  5213. value: theirName,
  5214. prop: importedName,
  5215. raws: { before: "\n " }
  5216. });
  5217. });
  5218. root.prepend(importRule);
  5219. });
  5220. } };
  5221. }
  5222. };
  5223. };
  5224. module.exports.postcss = true;
  5225. }));
  5226. //#endregion
  5227. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/scoping.js
  5228. var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
  5229. Object.defineProperty(exports, "__esModule", { value: true });
  5230. exports.behaviours = void 0;
  5231. exports.getDefaultPlugins = getDefaultPlugins;
  5232. exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour;
  5233. exports.getScopedNameGenerator = getScopedNameGenerator;
  5234. var _postcssModulesExtractImports = _interopRequireDefault(require_src$3());
  5235. var _genericNames = _interopRequireDefault(require_generic_names());
  5236. var _postcssModulesLocalByDefault = _interopRequireDefault(require_src$2());
  5237. var _postcssModulesScope = _interopRequireDefault(require_src$1());
  5238. var _stringHash = _interopRequireDefault(require_string_hash());
  5239. var _postcssModulesValues = _interopRequireDefault(require_src());
  5240. function _interopRequireDefault(obj) {
  5241. return obj && obj.__esModule ? obj : { default: obj };
  5242. }
  5243. const behaviours = {
  5244. LOCAL: "local",
  5245. GLOBAL: "global"
  5246. };
  5247. exports.behaviours = behaviours;
  5248. function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) {
  5249. const scope = (0, _postcssModulesScope.default)({
  5250. generateScopedName,
  5251. exportGlobals
  5252. });
  5253. return {
  5254. [behaviours.LOCAL]: [
  5255. _postcssModulesValues.default,
  5256. (0, _postcssModulesLocalByDefault.default)({ mode: "local" }),
  5257. _postcssModulesExtractImports.default,
  5258. scope
  5259. ],
  5260. [behaviours.GLOBAL]: [
  5261. _postcssModulesValues.default,
  5262. (0, _postcssModulesLocalByDefault.default)({ mode: "global" }),
  5263. _postcssModulesExtractImports.default,
  5264. scope
  5265. ]
  5266. }[behaviour];
  5267. }
  5268. function isValidBehaviour(behaviour) {
  5269. return Object.keys(behaviours).map((key) => behaviours[key]).indexOf(behaviour) > -1;
  5270. }
  5271. function getDefaultScopeBehaviour(scopeBehaviour) {
  5272. return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
  5273. }
  5274. function generateScopedNameDefault(name, filename, css) {
  5275. const i = css.indexOf(`.${name}`);
  5276. const lineNumber = css.substr(0, i).split(/[\r\n]/).length;
  5277. return `_${name}_${(0, _stringHash.default)(css).toString(36).substr(0, 5)}_${lineNumber}`;
  5278. }
  5279. function getScopedNameGenerator(generateScopedName, hashPrefix) {
  5280. const scopedNameGenerator = generateScopedName || generateScopedNameDefault;
  5281. if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
  5282. return (0, _genericNames.default)(scopedNameGenerator, {
  5283. context: process.cwd(),
  5284. hashPrefix
  5285. });
  5286. }
  5287. }));
  5288. //#endregion
  5289. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/pluginFactory.js
  5290. var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
  5291. Object.defineProperty(exports, "__esModule", { value: true });
  5292. exports.makePlugin = makePlugin;
  5293. var _postcss = _interopRequireDefault(__require("postcss"));
  5294. var _unquote = _interopRequireDefault(require_unquote());
  5295. var _Parser = _interopRequireDefault(require_Parser());
  5296. var _saveJSON = _interopRequireDefault(require_saveJSON());
  5297. var _localsConvention = require_localsConvention();
  5298. var _FileSystemLoader = _interopRequireDefault(require_FileSystemLoader());
  5299. var _scoping = require_scoping();
  5300. function _interopRequireDefault(obj) {
  5301. return obj && obj.__esModule ? obj : { default: obj };
  5302. }
  5303. const PLUGIN_NAME = "postcss-modules";
  5304. function isGlobalModule(globalModules, inputFile) {
  5305. return globalModules.some((regex) => inputFile.match(regex));
  5306. }
  5307. function getDefaultPluginsList(opts, inputFile) {
  5308. const globalModulesList = opts.globalModulePaths || null;
  5309. const exportGlobals = opts.exportGlobals || false;
  5310. const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour);
  5311. const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix);
  5312. if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) return (0, _scoping.getDefaultPlugins)({
  5313. behaviour: _scoping.behaviours.GLOBAL,
  5314. generateScopedName,
  5315. exportGlobals
  5316. });
  5317. return (0, _scoping.getDefaultPlugins)({
  5318. behaviour: defaultBehaviour,
  5319. generateScopedName,
  5320. exportGlobals
  5321. });
  5322. }
  5323. function getLoader(opts, plugins) {
  5324. const root = typeof opts.root === "undefined" ? "/" : opts.root;
  5325. return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve);
  5326. }
  5327. function isOurPlugin(plugin) {
  5328. return plugin.postcssPlugin === PLUGIN_NAME;
  5329. }
  5330. function makePlugin(opts) {
  5331. return {
  5332. postcssPlugin: PLUGIN_NAME,
  5333. async OnceExit(css, { result }) {
  5334. const getJSON = opts.getJSON || _saveJSON.default;
  5335. const inputFile = css.source.input.file;
  5336. const pluginList = getDefaultPluginsList(opts, inputFile);
  5337. const resultPluginIndex = result.processor.plugins.findIndex((plugin) => isOurPlugin(plugin));
  5338. if (resultPluginIndex === -1) throw new Error("Plugin missing from options.");
  5339. const loader = getLoader(opts, [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList]);
  5340. const fetcher = async (file, relativeTo, depTrace) => {
  5341. const unquoteFile = (0, _unquote.default)(file);
  5342. return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
  5343. };
  5344. const parser = new _Parser.default(fetcher);
  5345. await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { from: inputFile });
  5346. const out = loader.finalSource;
  5347. if (out) css.prepend(out);
  5348. if (opts.localsConvention) {
  5349. const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile);
  5350. parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {});
  5351. }
  5352. result.messages.push({
  5353. type: "export",
  5354. plugin: "postcss-modules",
  5355. exportTokens: parser.exportTokens
  5356. });
  5357. return getJSON(css.source.input.file, parser.exportTokens, result.opts.to);
  5358. }
  5359. };
  5360. }
  5361. }));
  5362. //#endregion
  5363. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.8/node_modules/postcss-modules/build/index.js
  5364. var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5365. var _fs = __require("fs");
  5366. var _fs2 = require_fs();
  5367. var _pluginFactory = require_pluginFactory();
  5368. (0, _fs2.setFileSystem)({
  5369. readFile: _fs.readFile,
  5370. writeFile: _fs.writeFile
  5371. });
  5372. module.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts);
  5373. module.exports.postcss = true;
  5374. }));
  5375. //#endregion
  5376. export default require_build();
  5377. export {};