single-file.js 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.singlefile = {}));
  5. })(this, (function (exports) { 'use strict';
  6. const { Array: Array$1, Object: Object$1, String: String$1, Number: Number$1, BigInt, Math: Math$1, Date: Date$1, Map: Map$2, Set: Set$3, Response, URL: URL$3, Error: Error$1, Uint8Array: Uint8Array$1, Uint16Array, Uint32Array: Uint32Array$1, DataView: DataView$1, Blob: Blob$6, Promise: Promise$1, TextEncoder: TextEncoder$2, TextDecoder: TextDecoder$1, crypto: crypto$1, btoa, TransformStream, ReadableStream, WritableStream, CompressionStream, DecompressionStream, navigator, Worker } = globalThis;
  7. /*
  8. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions are met:
  11. 1. Redistributions of source code must retain the above copyright notice,
  12. this list of conditions and the following disclaimer.
  13. 2. Redistributions in binary form must reproduce the above copyright
  14. notice, this list of conditions and the following disclaimer in
  15. the documentation and/or other materials provided with the distribution.
  16. 3. The names of the authors may not be used to endorse or promote products
  17. derived from this software without specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  19. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  20. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  21. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  24. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  25. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  26. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  27. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. */
  29. const MAX_32_BITS = 0xffffffff;
  30. const MAX_16_BITS = 0xffff;
  31. const COMPRESSION_METHOD_DEFLATE = 0x08;
  32. const COMPRESSION_METHOD_STORE = 0x00;
  33. const COMPRESSION_METHOD_AES = 0x63;
  34. const LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;
  35. const SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;
  36. const DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;
  37. const CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;
  38. const END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;
  39. const ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;
  40. const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;
  41. const END_OF_CENTRAL_DIR_LENGTH = 22;
  42. const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;
  43. const ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;
  44. const ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;
  45. const EXTRAFIELD_TYPE_ZIP64 = 0x0001;
  46. const EXTRAFIELD_TYPE_AES = 0x9901;
  47. const EXTRAFIELD_TYPE_NTFS = 0x000a;
  48. const EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;
  49. const EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;
  50. const EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;
  51. const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;
  52. const EXTRAFIELD_TYPE_USDZ = 0x1986;
  53. const BITFLAG_ENCRYPTED = 0x01;
  54. const BITFLAG_LEVEL = 0x06;
  55. const BITFLAG_DATA_DESCRIPTOR = 0x0008;
  56. const BITFLAG_LANG_ENCODING_FLAG = 0x0800;
  57. const FILE_ATTR_MSDOS_DIR_MASK = 0x10;
  58. const VERSION_DEFLATE = 0x14;
  59. const VERSION_ZIP64 = 0x2D;
  60. const VERSION_AES = 0x33;
  61. const DIRECTORY_SIGNATURE = "/";
  62. const MAX_DATE = new Date$1(2107, 11, 31);
  63. const MIN_DATE = new Date$1(1980, 0, 1);
  64. const UNDEFINED_VALUE = undefined;
  65. const UNDEFINED_TYPE$1 = "undefined";
  66. const FUNCTION_TYPE$1 = "function";
  67. /*
  68. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  69. Redistribution and use in source and binary forms, with or without
  70. modification, are permitted provided that the following conditions are met:
  71. 1. Redistributions of source code must retain the above copyright notice,
  72. this list of conditions and the following disclaimer.
  73. 2. Redistributions in binary form must reproduce the above copyright
  74. notice, this list of conditions and the following disclaimer in
  75. the documentation and/or other materials provided with the distribution.
  76. 3. The names of the authors may not be used to endorse or promote products
  77. derived from this software without specific prior written permission.
  78. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  79. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  80. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  81. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  82. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  83. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  84. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  85. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  86. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  87. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  88. */
  89. class StreamAdapter {
  90. constructor(Codec) {
  91. return class extends TransformStream {
  92. constructor(_format, options) {
  93. const codec = new Codec(options);
  94. super({
  95. transform(chunk, controller) {
  96. controller.enqueue(codec.append(chunk));
  97. },
  98. flush(controller) {
  99. const chunk = codec.flush();
  100. if (chunk) {
  101. controller.enqueue(chunk);
  102. }
  103. }
  104. });
  105. }
  106. };
  107. }
  108. }
  109. /*
  110. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  111. Redistribution and use in source and binary forms, with or without
  112. modification, are permitted provided that the following conditions are met:
  113. 1. Redistributions of source code must retain the above copyright notice,
  114. this list of conditions and the following disclaimer.
  115. 2. Redistributions in binary form must reproduce the above copyright
  116. notice, this list of conditions and the following disclaimer in
  117. the documentation and/or other materials provided with the distribution.
  118. 3. The names of the authors may not be used to endorse or promote products
  119. derived from this software without specific prior written permission.
  120. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  121. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  122. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  123. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  124. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  125. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  126. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  127. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  128. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  129. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  130. */
  131. const MINIMUM_CHUNK_SIZE = 64;
  132. let maxWorkers = 2;
  133. try {
  134. if (typeof navigator != UNDEFINED_TYPE$1 && navigator.hardwareConcurrency) {
  135. maxWorkers = navigator.hardwareConcurrency;
  136. }
  137. } catch (_error) {
  138. // ignored
  139. }
  140. const DEFAULT_CONFIGURATION = {
  141. chunkSize: 512 * 1024,
  142. maxWorkers,
  143. terminateWorkerTimeout: 5000,
  144. useWebWorkers: true,
  145. useCompressionStream: true,
  146. workerScripts: UNDEFINED_VALUE,
  147. CompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE$1 && CompressionStream,
  148. DecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE$1 && DecompressionStream
  149. };
  150. const config = Object$1.assign({}, DEFAULT_CONFIGURATION);
  151. function getConfiguration() {
  152. return config;
  153. }
  154. function getChunkSize(config) {
  155. return Math$1.max(config.chunkSize, MINIMUM_CHUNK_SIZE);
  156. }
  157. function configure(configuration) {
  158. const {
  159. baseURL,
  160. chunkSize,
  161. maxWorkers,
  162. terminateWorkerTimeout,
  163. useCompressionStream,
  164. useWebWorkers,
  165. Deflate,
  166. Inflate,
  167. CompressionStream,
  168. DecompressionStream,
  169. workerScripts
  170. } = configuration;
  171. setIfDefined("baseURL", baseURL);
  172. setIfDefined("chunkSize", chunkSize);
  173. setIfDefined("maxWorkers", maxWorkers);
  174. setIfDefined("terminateWorkerTimeout", terminateWorkerTimeout);
  175. setIfDefined("useCompressionStream", useCompressionStream);
  176. setIfDefined("useWebWorkers", useWebWorkers);
  177. if (Deflate) {
  178. config.CompressionStream = new StreamAdapter(Deflate);
  179. }
  180. if (Inflate) {
  181. config.DecompressionStream = new StreamAdapter(Inflate);
  182. }
  183. setIfDefined("CompressionStream", CompressionStream);
  184. setIfDefined("DecompressionStream", DecompressionStream);
  185. if (workerScripts !== UNDEFINED_VALUE) {
  186. const { deflate, inflate } = workerScripts;
  187. if (deflate || inflate) {
  188. if (!config.workerScripts) {
  189. config.workerScripts = {};
  190. }
  191. }
  192. if (deflate) {
  193. if (!Array$1.isArray(deflate)) {
  194. throw new Error$1("workerScripts.deflate must be an array");
  195. }
  196. config.workerScripts.deflate = deflate;
  197. }
  198. if (inflate) {
  199. if (!Array$1.isArray(inflate)) {
  200. throw new Error$1("workerScripts.inflate must be an array");
  201. }
  202. config.workerScripts.inflate = inflate;
  203. }
  204. }
  205. }
  206. function setIfDefined(propertyName, propertyValue) {
  207. if (propertyValue !== UNDEFINED_VALUE) {
  208. config[propertyName] = propertyValue;
  209. }
  210. }
  211. function e(e){const t=()=>URL$3.createObjectURL(new Blob$6(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:a,Uint16Array:i,Uint32Array:o,Int32Array:l,Map:c,DataView:h,Promise:f,TextEncoder:u,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:v,CompressionStream:y,DecompressionStream:b}=self;class m{constructor(e){return class extends g{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const _=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;_[e]=t}class k{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^_[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class S extends g{constructor(){let e;const t=new k;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new a(4);new h(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=z.getPartial(n);return 32===r?e.concat(t):z._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+z.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=z.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>r.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=z.getPartial(s);return r.push(z.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3==(3&n)&&(t.push(r),r=0);return 3&n&&t.push(z.partial(8*(3&n),r)),t}}},C=class{constructor(e){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const t=this;"string"==typeof e&&(e=D.utf8String.toBits(e));const n=t._buffer=z.concat(t._buffer,e),r=t._length,a=t._length=r+z.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const i=new o(n);let l=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(i.subarray(16*l,16*(l+1))),l+=1;return n.splice(0,16*l),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<<e|t>>>32-e}_block(t){const n=this,s=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=s[0],o=s[1],l=s[2],c=s[3],h=s[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,i)+n._f(e,o,l,c)+h+a[e]+n._key[r.floor(e/20)]|0;h=c,c=l,l=n._S(30,o),o=i,i=t}s[0]=s[0]+i|0,s[1]=s[1]+o|0,s[2]=s[2]+l|0,s[3]=s[3]+c|0,s[4]=s[4]+h|0}},I={getRandomValues(e){const t=new o(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,a=0;a<e.length;a+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[a/4]=4294967296*e()|0}return e}},x={importKey:e=>new x.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,c,f;const u=new ArrayBuffer(a),p=new h(u);let d=0;const g=z;for(t=D.bytes.toBits(t),f=1;(a||1)>d;f++){for(i=o=e.encrypt(g.concat(t,[f])),l=1;n>l;l++)for(o=e.encrypt(o),c=0;c<o.length;c++)i[c]^=o[c];for(l=0;(a||1)>d&&l<i.length;l++)p.setInt32(d,i[l]),d+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=C,r=[[],[]];t._baseHash=[new n,new n];const s=t._baseHash[0].blockSize/32;e.length>s&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},A=void 0!==p&&"function"==typeof p.getRandomValues,T="Invalid password",R="Invalid signature",H="zipjs-abort-check-password";function q(e){return A?p.getRandomValues(e):I.getRandomValues(e)}const B=16,K={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},K),P=t.assign({iterations:1e3,hash:{name:"SHA-1"}},K),E=["deriveBits"],U=[8,12,16],W=[16,24,32],M=10,N=[0,0,0,0],O="undefined",F="function",L=typeof p!=O,j=L&&p.subtle,G=L&&typeof j!=O,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,l,c=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),l=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];l[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,r[a]=h,c=s[l=s[o=s[h]]];let f=16843009*c^65537*l^257*o^16843008*h,u=257*s[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=u=u<<24^u>>>8,t[n][a]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],l=i[1],c=i[2],h=i[3],f=i[4];let u,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],v=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)u=o[g>>>24]^l[w>>16&255]^c[v>>8&255]^h[255&y]^n[b],p=o[w>>>24]^l[v>>16&255]^c[y>>8&255]^h[255&g]^n[b+1],d=o[v>>>24]^l[y>>16&255]^c[g>>8&255]^h[255&w]^n[b+2],y=o[y>>>24]^l[g>>16&255]^c[w>>8&255]^h[255&v]^n[b+3],b+=4,g=u,w=p,v=d;for(let e=0;4>e;e++)a[t?3&-e:e]=f[g>>>24]<<24^f[w>>16&255]<<16^f[v>>8&255]<<8^f[255&y]^n[b++],u=g,g=w,w=v,v=y,y=u;return a}},Q=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=z.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return z.clamp(t,s)}},Y=x.hmacSha1;let Z=L&&G&&typeof j.importKey==F,$=L&&G&&typeof j.deriveBits==F;class ee extends g{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,signed:n,strength:r-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:o,resolveReady:l,ready:c}=n;r?(await(async(e,t,n,r)=>{const a=await re(e,t,n,ae(r,0,U[t])),i=ae(r,U[t]);if(a[0]!=i[0]||a[1]!=i[1])throw new s(T)})(n,o,r,ae(e,0,U[o]+2)),e=ae(e,U[o]+2),i?t.error(new s(H)):l()):await c;const h=new a(e.length-M-(e.length-M)%B);t.enqueue(ne(n,e,h,0,M,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:o}=this;if(r&&n){await o;const l=ae(i,0,i.length-M),c=ae(i,i.length-M);let h=new a;if(l.length){const e=oe(X,l);r.update(e);const t=n.update(e);h=ie(X,t)}if(t){const e=ae(ie(X,r.digest()),0,M);for(let t=0;M>t;t++)if(e[t]!=c[t])throw new s(R)}e.enqueue(h)}}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new f((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:o}=n;let l=new a;r?(l=await(async(e,t,n)=>{const r=q(new a(U[t]));return se(r,await re(e,t,n,r))})(n,s,r),i()):await o;const c=new a(l.length+e.length-e.length%B);c.set(l,0),t.enqueue(ne(n,e,c,l.length,0))},async flush(e){const{ctr:t,hmac:n,pending:s,ready:i}=this;if(n&&t){await i;let o=new a;if(s.length){const e=t.update(oe(X,s));n.update(e),o=ie(X,e)}r.signature=ie(X,n.digest()).slice(0,M),e.enqueue(se(o,r.signature))}}}),r=this}}function ne(e,t,n,r,s,i){const{ctr:o,hmac:l,pending:c}=e,h=t.length-s;let f;for(c.length&&(t=se(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,h-h%B)),f=0;h-B>=f;f+=B){const e=oe(X,ae(t,f,f+B));i&&l.update(e);const s=o.update(e);i||l.update(s),n.set(ie(X,s),f+r)}return e.pending=ae(t,f),n}async function re(n,r,s,i){n.password=null;const o=(e=>{if(void 0===u){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new u).encode(e)})(s),l=await(async(e,t,n,r,s)=>{if(!Z)return x.importKey(t);try{return await j.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,x.importKey(t)}})(0,o,V,0,E),c=await(async(e,t,n)=>{if(!$)return x.pbkdf2(t,e.salt,P.iterations,n);try{return await j.deriveBits(e,t,n)}catch(r){return $=!1,x.pbkdf2(t,e.salt,P.iterations,n)}})(t.assign({salt:i},P),l,8*(2*W[r]+2)),h=new a(c),f=oe(X,ae(h,0,W[r])),p=oe(X,ae(h,W[r],2*W[r])),d=ae(h,2*W[r]);return t.assign(n,{keys:{key:f,authentication:p,passwordVerification:d},ctr:new Q(new J(f),e.from(N)),hmac:new Y(p)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function ie(e,t){return e.fromBits(t)}function oe(e,t){return e.toBits(t)}class le extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;if(n.password){const t=he(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(T);e=e.subarray(12)}r?t.error(new s(H)):t.enqueue(he(n,e))}})}}class ce extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),ue(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=q(new a(12));t[11]=n.passwordVerification,r=new a(e.length+t.length),r.set(fe(n,t),0),s=12}else r=new a(e.length),s=0;r.set(fe(n,e),s),t.enqueue(r)}})}}function he(e,t){const n=new a(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],pe(e,n[r]);return n}function fe(e,t){const n=new a(t.length);for(let r=0;r<t.length;r++)n[r]=de(e)^t[r],pe(e,t[r]);return n}function ue(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,crcKey0:new k(r[0]),crcKey2:new k(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,a]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),s=we(r.imul(we(s+ge(n)),134775813)+1),e.crcKey2.append([s>>>24]),a=~e.crcKey2.get(),e.keys=[n,s,a]}function de(e){const t=2|e.keys[2];return ge(r.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ve="deflate-raw";class ye extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,f=this;let u,p,d=me(super.readable);a&&!o||!l||(u=new S,d=Se(d,u)),s&&(d=ke(d,i,{level:c,chunkSize:t},r,n)),a&&(o?d=Se(d,new ce(e)):(p=new te(e),d=Se(d,p))),_e(f,d,(()=>{let e;a&&!o&&(e=p.signature),a&&!o||!l||(e=new h(u.value.buffer).getUint32(0)),f.signature=e}))}}class be extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:a,encrypted:i,signed:o,signature:l,compressed:c,useCompressionStream:f}=e;let u,p,d=me(super.readable);i&&(a?d=Se(d,new le(e)):(p=new ee(e),d=Se(d,p))),c&&(d=ke(d,f,{chunkSize:t},r,n)),i&&!a||!o||(u=new S,d=Se(d,u)),_e(this,d,(()=>{if((!i||a)&&o){const e=new h(u.value.buffer);if(l!=e.getUint32(0,!1))throw new s(R)}}))}}function me(e){return Se(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function _e(e,n,r){n=Se(n,new g({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function ke(e,t,n,r,s){try{e=Se(e,new(t&&r?r:s)(ve,n))}catch(r){if(!t)throw r;e=Se(e,new s(ve,n))}return e}function Se(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const r=this,{codecType:s}=e;let a;s.startsWith("deflate")?a=ye:s.startsWith("inflate")&&(a=be);let i=0;const o=new a(e,n),l=super.readable,c=new g({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=o;t.assign(r,{signature:e,size:i})}});t.defineProperty(r,"readable",{get:()=>l.pipeThrough(o).pipeThrough(c)})}}const Ce=new c,Ie=new c;let xe=0;async function Ae(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new m(self.Deflate)),self.Inflate&&(s.DecompressionStream=new m(self.Inflate));const a={highWaterMark:1,size:()=>s.chunkSize},i=e.readable||new w({async pull(e){const t=new f((e=>Ce.set(xe,e)));Te({type:"pull",messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},a),o=e.writable||new v({async write(e){let t;const r=new f((e=>t=e));Ie.set(xe,t),Te({type:ze,value:e,messageId:xe}),xe=(xe+1)%n.MAX_SAFE_INTEGER,await r}},a),l=new De(t,s);await i.pipeThrough(l).pipeTo(o,{preventClose:!0,preventAbort:!0});try{await o.getWriter().close()}catch(e){}const{signature:c,size:h}=l;Te({type:"close",result:{signature:c,size:h}})}catch(e){Re(e)}}function Te(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Re(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:a}=e;d({error:{message:t,stack:n,code:r,name:a}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Ae(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(r),done:s})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){Re(e)}}));var He=a,qe=i,Be=l,Ke=new He([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ve=new He([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Pe=new He([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ee=(e,t)=>{for(var n=new qe(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var s=new Be(n[30]);for(r=1;30>r;++r)for(var a=n[r];a<n[r+1];++a)s[a]=a-n[r]<<5|r;return{b:n,r:s}},Ue=Ee(Ke,2),We=Ue.b,Me=Ue.r;We[28]=258,Me[258]=28;for(var Ne=Ee(Ve,0),Oe=Ne.b,Fe=Ne.r,Le=new qe(32768),je=0;32768>je;++je){var Ge=(43690&je)>>1|(21845&je)<<1;Ge=(61680&(Ge=(52428&Ge)>>2|(13107&Ge)<<2))>>4|(3855&Ge)<<4,Le[je]=((65280&Ge)>>8|(255&Ge)<<8)>>1}var Xe=(e,t,n)=>{for(var r=e.length,s=0,a=new qe(t);r>s;++s)e[s]&&++a[e[s]-1];var i,o=new qe(t);for(s=1;t>s;++s)o[s]=o[s-1]+a[s-1]<<1;if(n){i=new qe(1<<t);var l=15-t;for(s=0;r>s;++s)if(e[s])for(var c=s<<4|e[s],h=t-e[s],f=o[e[s]-1]++<<h,u=f|(1<<h)-1;u>=f;++f)i[Le[f]>>l]=c}else for(i=new qe(r),s=0;r>s;++s)e[s]&&(i[s]=Le[o[e[s]-1]++]>>15-e[s]);return i},Je=new He(288);for(je=0;144>je;++je)Je[je]=8;for(je=144;256>je;++je)Je[je]=9;for(je=256;280>je;++je)Je[je]=7;for(je=280;288>je;++je)Je[je]=8;var Qe=new He(32);for(je=0;32>je;++je)Qe[je]=5;var Ye=Xe(Je,9,0),Ze=Xe(Je,9,1),$e=Xe(Qe,5,0),et=Xe(Qe,5,1),tt=e=>{for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},nt=(e,t,n)=>{var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},rt=(e,t)=>{var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},st=e=>(e+7)/8|0,at=(e,t,n)=>((null==t||0>t)&&(t=0),(null==n||n>e.length)&&(n=e.length),new He(e.subarray(t,n))),it=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ot=(e,t,n)=>{var r=new s(t||it[e]);if(r.code=e,s.captureStackTrace&&s.captureStackTrace(r,ot),!n)throw r;return r},lt=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},ct=(e,t,n)=>{n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},ht=(e,t)=>{for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,a=n.slice();if(!s)return{t:vt,l:0};if(1==s){var i=new He(n[0].s+1);return i[n[0].s]=1,{t:i,l:1}}n.sort(((e,t)=>e.f-t.f)),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,h=1,f=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=s-1;)o=n[n[c].f<n[f].f?c++:f++],l=n[c!=h&&n[c].f<n[f].f?c++:f++],n[h++]={s:-1,f:o.f+l.f,l:o,r:l};var u=a[0].s;for(r=1;s>r;++r)a[r].s>u&&(u=a[r].s);var p=new qe(u+1),d=ft(n[h-1],p,0);if(d>t){r=0;var g=0,w=d-t,v=1<<w;for(a.sort(((e,t)=>p[t.s]-p[e.s]||e.f-t.f));s>r;++r){var y=a[r].s;if(p[y]<=t)break;g+=v-(1<<d-p[y]),p[y]=t}for(g>>=w;g>0;){var b=a[r].s;p[b]<t?g-=1<<t-p[b]++-1:++r}for(;r>=0&&g;--r){var m=a[r].s;p[m]==t&&(--p[m],++g)}d=t}return{t:new He(p),l:d}},ft=(e,t,n)=>-1==e.s?r.max(ft(e.l,t,n+1),ft(e.r,t,n+1)):t[e.s]=n,ut=e=>{for(var t=e.length;t&&!e[--t];);for(var n=new qe(++t),r=0,s=e[0],a=1,i=e=>{n[r++]=e},o=1;t>=o;++o)if(e[o]==s&&o!=t)++a;else{if(!s&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(s),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(s);a=1,s=e[o]}return{c:n.subarray(0,r),n:t}},pt=(e,t)=>{for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},dt=(e,t,n)=>{var r=n.length,s=st(t+2);e[s]=255&r,e[s+1]=r>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;r>a;++a)e[s+a+4]=n[a];return 8*(s+4+r)},gt=(e,t,n,r,s,a,i,o,l,c,h)=>{lt(t,h++,n),++s[256];for(var f=ht(s,15),u=f.t,p=f.l,d=ht(a,15),g=d.t,w=d.l,v=ut(u),y=v.c,b=v.n,m=ut(g),_=m.c,k=m.n,S=new qe(19),z=0;z<y.length;++z)++S[31&y[z]];for(z=0;z<_.length;++z)++S[31&_[z]];for(var D=ht(S,7),C=D.t,I=D.l,x=19;x>4&&!C[Pe[x-1]];--x);var A,T,R,H,q=c+5<<3,B=pt(s,Je)+pt(a,Qe)+i,K=pt(s,u)+pt(a,g)+i+14+3*x+pt(S,C)+2*S[16]+3*S[17]+7*S[18];if(l>=0&&B>=q&&K>=q)return dt(t,h,e.subarray(l,l+c));if(lt(t,h,1+(B>K)),h+=2,B>K){A=Xe(u,p,0),T=u,R=Xe(g,w,0),H=g;var V=Xe(C,I,0);for(lt(t,h,b-257),lt(t,h+5,k-1),lt(t,h+10,x-4),h+=14,z=0;x>z;++z)lt(t,h+3*z,C[Pe[z]]);h+=3*x;for(var P=[y,_],E=0;2>E;++E){var U=P[E];for(z=0;z<U.length;++z){var W=31&U[z];lt(t,h,V[W]),h+=C[W],W>15&&(lt(t,h,U[z]>>5&127),h+=U[z]>>12)}}}else A=Ye,T=Je,R=$e,H=Qe;for(z=0;o>z;++z){var M=r[z];if(M>255){ct(t,h,A[257+(W=M>>18&31)]),h+=T[W+257],W>7&&(lt(t,h,M>>23&31),h+=Ke[W]);var N=31&M;ct(t,h,R[N]),h+=H[N],N>3&&(ct(t,h,M>>5&8191),h+=Ve[N])}else ct(t,h,A[M]),h+=T[M]}return ct(t,h,A[256]),h+T[256]},wt=new Be([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vt=new He(0),yt=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new He(98304),this.o.dictionary){var n=this.o.dictionary.subarray(-32768);this.b.set(n,32768-n.length),this.s.i=32768-n.length}}return e.prototype.p=function(e,t){this.ondata(((e,t,n,s,a)=>{if(!a&&(a={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new He(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return((e,t,n,s,a,i)=>{var o=i.z||e.length,l=new He(0+o+5*(1+r.ceil(o/7e3))+0),c=l.subarray(0,l.length-0),h=i.l,f=7&(i.r||0);if(t){f&&(c[0]=i.r>>3);for(var u=wt[t-1],p=u>>13,d=8191&u,g=(1<<n)-1,w=i.p||new qe(32768),v=i.h||new qe(g+1),y=r.ceil(n/3),b=2*y,m=t=>(e[t]^e[t+1]<<y^e[t+2]<<b)&g,_=new Be(25e3),k=new qe(288),S=new qe(32),z=0,D=0,C=i.i||0,I=0,x=i.w||0,A=0;o>C+2;++C){var T=m(C),R=32767&C,H=v[T];if(w[R]=H,v[T]=R,C>=x){var q=o-C;if((z>7e3||I>24576)&&(q>423||!h)){f=gt(e,c,0,_,k,S,D,I,A,C-A,f),I=z=D=0,A=C;for(var B=0;286>B;++B)k[B]=0;for(B=0;30>B;++B)S[B]=0}var K=2,V=0,P=d,E=R-H&32767;if(q>2&&T==m(C-E))for(var U=r.min(p,q)-1,W=r.min(32767,C),M=r.min(258,q);W>=E&&--P&&R!=H;){if(e[C+K]==e[C+K-E]){for(var N=0;M>N&&e[C+N]==e[C+N-E];++N);if(N>K){if(K=N,V=E,N>U)break;var O=r.min(E,N-2),F=0;for(B=0;O>B;++B){var L=C-E+B&32767,j=L-w[L]&32767;j>F&&(F=j,H=L)}}}E+=(R=H)-(H=w[R])&32767}if(V){_[I++]=268435456|Me[K]<<18|Fe[V];var G=31&Me[K],X=31&Fe[V];D+=Ke[G]+Ve[X],++k[257+G],++S[X],x=C+K,++z}else _[I++]=e[C],++k[e[C]]}}for(C=r.max(C,x);o>C;++C)_[I++]=e[C],++k[e[C]];f=gt(e,c,h,_,k,S,D,I,A,C-A,f),h||(i.r=7&f|c[f/8|0]<<3,f-=7,i.h=v,i.p=w,i.i=C,i.w=x)}else{for(C=i.w||0;o+h>C;C+=65535){var J=C+65535;o>J||(c[f/8|0]=h,J=o),f=dt(c,f+1,e.subarray(C,J))}i.i=o}return at(l,0,0+st(f)+0)})(e,null==t.level?6:t.level,null==t.mem?r.ceil(1.5*r.max(8,r.min(13,r.log(e.length)))):12+t.mem,0,0,a)})(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||ot(5),this.s.l&&ot(4);var n=e.length+this.s.z;if(n>this.b.length){if(n>2*this.b.length-32768){var r=new He(-32768&n);r.set(this.b.subarray(0,this.s.z)),this.b=r}var s=this.b.length-this.s.z;s&&(this.b.set(e.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(s),32768),this.s.z=e.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e}(),bt=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var n=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:n?n.length:0},this.o=new He(32768),this.p=new He(0),n&&this.o.set(n)}return e.prototype.e=function(e){if(this.ondata||ot(5),this.d&&ot(4),this.p.length){if(e.length){var t=new He(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=((e,t,n)=>{var s=e.length;if(!s||t.f&&!t.l)return n||new He(0);var a=!n,i=a||2!=t.i,o=t.i;a&&(n=new He(3*s));var l=e=>{var t=n.length;if(e>t){var s=new He(r.max(2*t,e));s.set(n),n=s}},c=t.f||0,h=t.p||0,f=t.b||0,u=t.l,p=t.d,d=t.m,g=t.n,w=8*s;do{if(!u){c=nt(e,h,1);var v=nt(e,h+1,3);if(h+=3,!v){var y=e[(A=st(h)+4)-4]|e[A-3]<<8,b=A+y;if(b>s){o&&ot(0);break}i&&l(f+y),n.set(e.subarray(A,b),f),t.b=f+=y,t.p=h=8*b,t.f=c;continue}if(1==v)u=Ze,p=et,d=9,g=5;else if(2==v){var m=nt(e,h,31)+257,_=nt(e,h+10,15)+4,k=m+nt(e,h+5,31)+1;h+=14;for(var S=new He(k),z=new He(19),D=0;_>D;++D)z[Pe[D]]=nt(e,h+3*D,7);h+=3*_;var C=tt(z),I=(1<<C)-1,x=Xe(z,C,1);for(D=0;k>D;){var A,T=x[nt(e,h,I)];if(h+=15&T,16>(A=T>>4))S[D++]=A;else{var R=0,H=0;for(16==A?(H=3+nt(e,h,3),h+=2,R=S[D-1]):17==A?(H=3+nt(e,h,7),h+=3):18==A&&(H=11+nt(e,h,127),h+=7);H--;)S[D++]=R}}var q=S.subarray(0,m),B=S.subarray(m);d=tt(q),g=tt(B),u=Xe(q,d,1),p=Xe(B,g,1)}else ot(1);if(h>w){o&&ot(0);break}}i&&l(f+131072);for(var K=(1<<d)-1,V=(1<<g)-1,P=h;;P=h){var E=(R=u[rt(e,h)&K])>>4;if((h+=15&R)>w){o&&ot(0);break}if(R||ot(2),256>E)n[f++]=E;else{if(256==E){P=h,u=null;break}var U=E-254;if(E>264){var W=Ke[D=E-257];U=nt(e,h,(1<<W)-1)+We[D],h+=W}var M=p[rt(e,h)&V],N=M>>4;if(M||ot(3),h+=15&M,B=Oe[N],N>3&&(W=Ve[N],B+=rt(e,h)&(1<<W)-1,h+=W),h>w){o&&ot(0);break}i&&l(f+131072);var O=f+U;if(B>f){var F=0-B,L=r.min(B,O);for(0>F+f&&ot(3);L>f;++f)n[f]=undefined[F+f]}for(;O>f;++f)n[f]=n[f-B]}}t.l=u,t.p=P,t.b=f,t.f=c,u&&(c=1,t.m=d,t.d=p,t.n=g)}while(!c);return f!=n.length&&a?at(n,0,f):n.subarray(0,f)})(this.p,this.s,this.o);this.ondata(at(n,t,this.s.b),this.d),this.o=at(n,this.s.b-32768),this.s.b=this.o.length,this.p=at(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),mt="undefined"!=typeof TextDecoder&&new TextDecoder;try{mt.decode(vt,{stream:!0})}catch(e){}function _t(e,n,r){return class{constructor(s){const i=this;var o,l;o=s,l="level",("function"==typeof t.hasOwn?t.hasOwn(o,l):o.hasOwnProperty(l))&&void 0===s.level&&delete s.level,i.codec=new e(t.assign({},n,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new a(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new a(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new a,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}const{Deflate:kt,Inflate:St}=((e,t={},n)=>({Deflate:_t(e.Deflate,t.deflate,n),Inflate:_t(e.Inflate,t.inflate,n)}))({Deflate:yt,Inflate:bt},void 0,((e,t)=>e.ondata=t));self.initCodec=()=>{self.Deflate=kt,self.Inflate=St};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}});}
  212. /*
  213. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  214. Redistribution and use in source and binary forms, with or without
  215. modification, are permitted provided that the following conditions are met:
  216. 1. Redistributions of source code must retain the above copyright notice,
  217. this list of conditions and the following disclaimer.
  218. 2. Redistributions in binary form must reproduce the above copyright
  219. notice, this list of conditions and the following disclaimer in
  220. the documentation and/or other materials provided with the distribution.
  221. 3. The names of the authors may not be used to endorse or promote products
  222. derived from this software without specific prior written permission.
  223. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  224. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  225. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  226. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  227. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  228. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  229. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  230. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  231. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  232. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  233. */
  234. function getMimeType() {
  235. return "application/octet-stream";
  236. }
  237. function initShimAsyncCodec(library, options = {}, registerDataHandler) {
  238. return {
  239. Deflate: createCodecClass(library.Deflate, options.deflate, registerDataHandler),
  240. Inflate: createCodecClass(library.Inflate, options.inflate, registerDataHandler)
  241. };
  242. }
  243. function objectHasOwn(object, propertyName) {
  244. // eslint-disable-next-line no-prototype-builtins
  245. return typeof Object$1.hasOwn === "function" ? Object$1.hasOwn(object, propertyName) : object.hasOwnProperty(propertyName);
  246. }
  247. function createCodecClass(constructor, constructorOptions, registerDataHandler) {
  248. return class {
  249. constructor(options) {
  250. const codecAdapter = this;
  251. const onData = data => {
  252. if (codecAdapter.pendingData) {
  253. const previousPendingData = codecAdapter.pendingData;
  254. codecAdapter.pendingData = new Uint8Array$1(previousPendingData.length + data.length);
  255. const { pendingData } = codecAdapter;
  256. pendingData.set(previousPendingData, 0);
  257. pendingData.set(data, previousPendingData.length);
  258. } else {
  259. codecAdapter.pendingData = new Uint8Array$1(data);
  260. }
  261. };
  262. if (objectHasOwn(options, "level") && options.level === undefined) {
  263. delete options.level;
  264. }
  265. codecAdapter.codec = new constructor(Object$1.assign({}, constructorOptions, options));
  266. registerDataHandler(codecAdapter.codec, onData);
  267. }
  268. append(data) {
  269. this.codec.push(data);
  270. return getResponse(this);
  271. }
  272. flush() {
  273. this.codec.push(new Uint8Array$1(), true);
  274. return getResponse(this);
  275. }
  276. };
  277. function getResponse(codec) {
  278. if (codec.pendingData) {
  279. const output = codec.pendingData;
  280. codec.pendingData = null;
  281. return output;
  282. } else {
  283. return new Uint8Array$1();
  284. }
  285. }
  286. }
  287. /*
  288. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  289. Redistribution and use in source and binary forms, with or without
  290. modification, are permitted provided that the following conditions are met:
  291. 1. Redistributions of source code must retain the above copyright notice,
  292. this list of conditions and the following disclaimer.
  293. 2. Redistributions in binary form must reproduce the above copyright
  294. notice, this list of conditions and the following disclaimer in
  295. the documentation and/or other materials provided with the distribution.
  296. 3. The names of the authors may not be used to endorse or promote products
  297. derived from this software without specific prior written permission.
  298. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  299. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  300. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  301. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  302. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  303. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  304. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  305. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  306. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  307. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  308. */
  309. const table = [];
  310. for (let i = 0; i < 256; i++) {
  311. let t = i;
  312. for (let j = 0; j < 8; j++) {
  313. if (t & 1) {
  314. t = (t >>> 1) ^ 0xEDB88320;
  315. } else {
  316. t = t >>> 1;
  317. }
  318. }
  319. table[i] = t;
  320. }
  321. class Crc32 {
  322. constructor(crc) {
  323. this.crc = crc || -1;
  324. }
  325. append(data) {
  326. let crc = this.crc | 0;
  327. for (let offset = 0, length = data.length | 0; offset < length; offset++) {
  328. crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];
  329. }
  330. this.crc = crc;
  331. }
  332. get() {
  333. return ~this.crc;
  334. }
  335. }
  336. /*
  337. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  338. Redistribution and use in source and binary forms, with or without
  339. modification, are permitted provided that the following conditions are met:
  340. 1. Redistributions of source code must retain the above copyright notice,
  341. this list of conditions and the following disclaimer.
  342. 2. Redistributions in binary form must reproduce the above copyright
  343. notice, this list of conditions and the following disclaimer in
  344. the documentation and/or other materials provided with the distribution.
  345. 3. The names of the authors may not be used to endorse or promote products
  346. derived from this software without specific prior written permission.
  347. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  348. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  349. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  350. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  351. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  352. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  353. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  354. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  355. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  356. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  357. */
  358. class Crc32Stream extends TransformStream {
  359. constructor() {
  360. let stream;
  361. const crc32 = new Crc32();
  362. super({
  363. transform(chunk, controller) {
  364. crc32.append(chunk);
  365. controller.enqueue(chunk);
  366. },
  367. flush() {
  368. const value = new Uint8Array$1(4);
  369. const dataView = new DataView$1(value.buffer);
  370. dataView.setUint32(0, crc32.get());
  371. stream.value = value;
  372. }
  373. });
  374. stream = this;
  375. }
  376. }
  377. /*
  378. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  379. Redistribution and use in source and binary forms, with or without
  380. modification, are permitted provided that the following conditions are met:
  381. 1. Redistributions of source code must retain the above copyright notice,
  382. this list of conditions and the following disclaimer.
  383. 2. Redistributions in binary form must reproduce the above copyright
  384. notice, this list of conditions and the following disclaimer in
  385. the documentation and/or other materials provided with the distribution.
  386. 3. The names of the authors may not be used to endorse or promote products
  387. derived from this software without specific prior written permission.
  388. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  389. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  390. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  391. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  392. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  393. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  394. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  395. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  396. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  397. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  398. */
  399. function encodeText(value) {
  400. if (typeof TextEncoder$2 == "undefined") {
  401. value = unescape(encodeURIComponent(value));
  402. const result = new Uint8Array$1(value.length);
  403. for (let i = 0; i < result.length; i++) {
  404. result[i] = value.charCodeAt(i);
  405. }
  406. return result;
  407. } else {
  408. return new TextEncoder$2().encode(value);
  409. }
  410. }
  411. // Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl
  412. // deno-lint-ignore-file no-this-alias
  413. /*
  414. * SJCL is open. You can use, modify and redistribute it under a BSD
  415. * license or under the GNU GPL, version 2.0.
  416. */
  417. /** @fileOverview Javascript cryptography implementation.
  418. *
  419. * Crush to remove comments, shorten variable names and
  420. * generally reduce transmission size.
  421. *
  422. * @author Emily Stark
  423. * @author Mike Hamburg
  424. * @author Dan Boneh
  425. */
  426. /*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */
  427. /** @fileOverview Arrays of bits, encoded as arrays of Numbers.
  428. *
  429. * @author Emily Stark
  430. * @author Mike Hamburg
  431. * @author Dan Boneh
  432. */
  433. /**
  434. * Arrays of bits, encoded as arrays of Numbers.
  435. * @namespace
  436. * @description
  437. * <p>
  438. * These objects are the currency accepted by SJCL's crypto functions.
  439. * </p>
  440. *
  441. * <p>
  442. * Most of our crypto primitives operate on arrays of 4-byte words internally,
  443. * but many of them can take arguments that are not a multiple of 4 bytes.
  444. * This library encodes arrays of bits (whose size need not be a multiple of 8
  445. * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an
  446. * array of words, 32 bits at a time. Since the words are double-precision
  447. * floating point numbers, they fit some extra data. We use this (in a private,
  448. * possibly-changing manner) to encode the number of bits actually present
  449. * in the last word of the array.
  450. * </p>
  451. *
  452. * <p>
  453. * Because bitwise ops clear this out-of-band data, these arrays can be passed
  454. * to ciphers like AES which want arrays of words.
  455. * </p>
  456. */
  457. const bitArray = {
  458. /**
  459. * Concatenate two bit arrays.
  460. * @param {bitArray} a1 The first array.
  461. * @param {bitArray} a2 The second array.
  462. * @return {bitArray} The concatenation of a1 and a2.
  463. */
  464. concat(a1, a2) {
  465. if (a1.length === 0 || a2.length === 0) {
  466. return a1.concat(a2);
  467. }
  468. const last = a1[a1.length - 1], shift = bitArray.getPartial(last);
  469. if (shift === 32) {
  470. return a1.concat(a2);
  471. } else {
  472. return bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));
  473. }
  474. },
  475. /**
  476. * Find the length of an array of bits.
  477. * @param {bitArray} a The array.
  478. * @return {Number} The length of a, in bits.
  479. */
  480. bitLength(a) {
  481. const l = a.length;
  482. if (l === 0) {
  483. return 0;
  484. }
  485. const x = a[l - 1];
  486. return (l - 1) * 32 + bitArray.getPartial(x);
  487. },
  488. /**
  489. * Truncate an array.
  490. * @param {bitArray} a The array.
  491. * @param {Number} len The length to truncate to, in bits.
  492. * @return {bitArray} A new array, truncated to len bits.
  493. */
  494. clamp(a, len) {
  495. if (a.length * 32 < len) {
  496. return a;
  497. }
  498. a = a.slice(0, Math$1.ceil(len / 32));
  499. const l = a.length;
  500. len = len & 31;
  501. if (l > 0 && len) {
  502. a[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);
  503. }
  504. return a;
  505. },
  506. /**
  507. * Make a partial word for a bit array.
  508. * @param {Number} len The number of bits in the word.
  509. * @param {Number} x The bits.
  510. * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.
  511. * @return {Number} The partial word.
  512. */
  513. partial(len, x, _end) {
  514. if (len === 32) {
  515. return x;
  516. }
  517. return (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;
  518. },
  519. /**
  520. * Get the number of bits used by a partial word.
  521. * @param {Number} x The partial word.
  522. * @return {Number} The number of bits used by the partial word.
  523. */
  524. getPartial(x) {
  525. return Math$1.round(x / 0x10000000000) || 32;
  526. },
  527. /** Shift an array right.
  528. * @param {bitArray} a The array to shift.
  529. * @param {Number} shift The number of bits to shift.
  530. * @param {Number} [carry=0] A byte to carry in
  531. * @param {bitArray} [out=[]] An array to prepend to the output.
  532. * @private
  533. */
  534. _shiftRight(a, shift, carry, out) {
  535. if (out === undefined) {
  536. out = [];
  537. }
  538. for (; shift >= 32; shift -= 32) {
  539. out.push(carry);
  540. carry = 0;
  541. }
  542. if (shift === 0) {
  543. return out.concat(a);
  544. }
  545. for (let i = 0; i < a.length; i++) {
  546. out.push(carry | a[i] >>> shift);
  547. carry = a[i] << (32 - shift);
  548. }
  549. const last2 = a.length ? a[a.length - 1] : 0;
  550. const shift2 = bitArray.getPartial(last2);
  551. out.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));
  552. return out;
  553. }
  554. };
  555. /** @fileOverview Bit array codec implementations.
  556. *
  557. * @author Emily Stark
  558. * @author Mike Hamburg
  559. * @author Dan Boneh
  560. */
  561. /**
  562. * Arrays of bytes
  563. * @namespace
  564. */
  565. const codec = {
  566. bytes: {
  567. /** Convert from a bitArray to an array of bytes. */
  568. fromBits(arr) {
  569. const bl = bitArray.bitLength(arr);
  570. const byteLength = bl / 8;
  571. const out = new Uint8Array$1(byteLength);
  572. let tmp;
  573. for (let i = 0; i < byteLength; i++) {
  574. if ((i & 3) === 0) {
  575. tmp = arr[i / 4];
  576. }
  577. out[i] = tmp >>> 24;
  578. tmp <<= 8;
  579. }
  580. return out;
  581. },
  582. /** Convert from an array of bytes to a bitArray. */
  583. toBits(bytes) {
  584. const out = [];
  585. let i;
  586. let tmp = 0;
  587. for (i = 0; i < bytes.length; i++) {
  588. tmp = tmp << 8 | bytes[i];
  589. if ((i & 3) === 3) {
  590. out.push(tmp);
  591. tmp = 0;
  592. }
  593. }
  594. if (i & 3) {
  595. out.push(bitArray.partial(8 * (i & 3), tmp));
  596. }
  597. return out;
  598. }
  599. }
  600. };
  601. const hash = {};
  602. /**
  603. * Context for a SHA-1 operation in progress.
  604. * @constructor
  605. */
  606. hash.sha1 = class {
  607. constructor(hash) {
  608. const sha1 = this;
  609. /**
  610. * The hash's block size, in bits.
  611. * @constant
  612. */
  613. sha1.blockSize = 512;
  614. /**
  615. * The SHA-1 initialization vector.
  616. * @private
  617. */
  618. sha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];
  619. /**
  620. * The SHA-1 hash key.
  621. * @private
  622. */
  623. sha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];
  624. if (hash) {
  625. sha1._h = hash._h.slice(0);
  626. sha1._buffer = hash._buffer.slice(0);
  627. sha1._length = hash._length;
  628. } else {
  629. sha1.reset();
  630. }
  631. }
  632. /**
  633. * Reset the hash state.
  634. * @return this
  635. */
  636. reset() {
  637. const sha1 = this;
  638. sha1._h = sha1._init.slice(0);
  639. sha1._buffer = [];
  640. sha1._length = 0;
  641. return sha1;
  642. }
  643. /**
  644. * Input several words to the hash.
  645. * @param {bitArray|String} data the data to hash.
  646. * @return this
  647. */
  648. update(data) {
  649. const sha1 = this;
  650. if (typeof data === "string") {
  651. data = codec.utf8String.toBits(data);
  652. }
  653. const b = sha1._buffer = bitArray.concat(sha1._buffer, data);
  654. const ol = sha1._length;
  655. const nl = sha1._length = ol + bitArray.bitLength(data);
  656. if (nl > 9007199254740991) {
  657. throw new Error$1("Cannot hash more than 2^53 - 1 bits");
  658. }
  659. const c = new Uint32Array$1(b);
  660. let j = 0;
  661. for (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;
  662. i += sha1.blockSize) {
  663. sha1._block(c.subarray(16 * j, 16 * (j + 1)));
  664. j += 1;
  665. }
  666. b.splice(0, 16 * j);
  667. return sha1;
  668. }
  669. /**
  670. * Complete hashing and output the hash value.
  671. * @return {bitArray} The hash value, an array of 5 big-endian words. TODO
  672. */
  673. finalize() {
  674. const sha1 = this;
  675. let b = sha1._buffer;
  676. const h = sha1._h;
  677. // Round out and push the buffer
  678. b = bitArray.concat(b, [bitArray.partial(1, 1)]);
  679. // Round out the buffer to a multiple of 16 words, less the 2 length words.
  680. for (let i = b.length + 2; i & 15; i++) {
  681. b.push(0);
  682. }
  683. // append the length
  684. b.push(Math$1.floor(sha1._length / 0x100000000));
  685. b.push(sha1._length | 0);
  686. while (b.length) {
  687. sha1._block(b.splice(0, 16));
  688. }
  689. sha1.reset();
  690. return h;
  691. }
  692. /**
  693. * The SHA-1 logical functions f(0), f(1), ..., f(79).
  694. * @private
  695. */
  696. _f(t, b, c, d) {
  697. if (t <= 19) {
  698. return (b & c) | (~b & d);
  699. } else if (t <= 39) {
  700. return b ^ c ^ d;
  701. } else if (t <= 59) {
  702. return (b & c) | (b & d) | (c & d);
  703. } else if (t <= 79) {
  704. return b ^ c ^ d;
  705. }
  706. }
  707. /**
  708. * Circular left-shift operator.
  709. * @private
  710. */
  711. _S(n, x) {
  712. return (x << n) | (x >>> 32 - n);
  713. }
  714. /**
  715. * Perform one cycle of SHA-1.
  716. * @param {Uint32Array|bitArray} words one block of words.
  717. * @private
  718. */
  719. _block(words) {
  720. const sha1 = this;
  721. const h = sha1._h;
  722. // When words is passed to _block, it has 16 elements. SHA1 _block
  723. // function extends words with new elements (at the end there are 80 elements).
  724. // The problem is that if we use Uint32Array instead of Array,
  725. // the length of Uint32Array cannot be changed. Thus, we replace words with a
  726. // normal Array here.
  727. const w = Array$1(80); // do not use Uint32Array here as the instantiation is slower
  728. for (let j = 0; j < 16; j++) {
  729. w[j] = words[j];
  730. }
  731. let a = h[0];
  732. let b = h[1];
  733. let c = h[2];
  734. let d = h[3];
  735. let e = h[4];
  736. for (let t = 0; t <= 79; t++) {
  737. if (t >= 16) {
  738. w[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);
  739. }
  740. const tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +
  741. sha1._key[Math$1.floor(t / 20)]) | 0;
  742. e = d;
  743. d = c;
  744. c = sha1._S(30, b);
  745. b = a;
  746. a = tmp;
  747. }
  748. h[0] = (h[0] + a) | 0;
  749. h[1] = (h[1] + b) | 0;
  750. h[2] = (h[2] + c) | 0;
  751. h[3] = (h[3] + d) | 0;
  752. h[4] = (h[4] + e) | 0;
  753. }
  754. };
  755. /** @fileOverview Low-level AES implementation.
  756. *
  757. * This file contains a low-level implementation of AES, optimized for
  758. * size and for efficiency on several browsers. It is based on
  759. * OpenSSL's aes_core.c, a public-domain implementation by Vincent
  760. * Rijmen, Antoon Bosselaers and Paulo Barreto.
  761. *
  762. * An older version of this implementation is available in the public
  763. * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,
  764. * Stanford University 2008-2010 and BSD-licensed for liability
  765. * reasons.
  766. *
  767. * @author Emily Stark
  768. * @author Mike Hamburg
  769. * @author Dan Boneh
  770. */
  771. const cipher = {};
  772. /**
  773. * Schedule out an AES key for both encryption and decryption. This
  774. * is a low-level class. Use a cipher mode to do bulk encryption.
  775. *
  776. * @constructor
  777. * @param {Array} key The key as an array of 4, 6 or 8 words.
  778. */
  779. cipher.aes = class {
  780. constructor(key) {
  781. /**
  782. * The expanded S-box and inverse S-box tables. These will be computed
  783. * on the client so that we don't have to send them down the wire.
  784. *
  785. * There are two tables, _tables[0] is for encryption and
  786. * _tables[1] is for decryption.
  787. *
  788. * The first 4 sub-tables are the expanded S-box with MixColumns. The
  789. * last (_tables[01][4]) is the S-box itself.
  790. *
  791. * @private
  792. */
  793. const aes = this;
  794. aes._tables = [[[], [], [], [], []], [[], [], [], [], []]];
  795. if (!aes._tables[0][0][0]) {
  796. aes._precompute();
  797. }
  798. const sbox = aes._tables[0][4];
  799. const decTable = aes._tables[1];
  800. const keyLen = key.length;
  801. let i, encKey, decKey, rcon = 1;
  802. if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {
  803. throw new Error$1("invalid aes key size");
  804. }
  805. aes._key = [encKey = key.slice(0), decKey = []];
  806. // schedule encryption keys
  807. for (i = keyLen; i < 4 * keyLen + 28; i++) {
  808. let tmp = encKey[i - 1];
  809. // apply sbox
  810. if (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {
  811. tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];
  812. // shift rows and add rcon
  813. if (i % keyLen === 0) {
  814. tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;
  815. rcon = rcon << 1 ^ (rcon >> 7) * 283;
  816. }
  817. }
  818. encKey[i] = encKey[i - keyLen] ^ tmp;
  819. }
  820. // schedule decryption keys
  821. for (let j = 0; i; j++, i--) {
  822. const tmp = encKey[j & 3 ? i : i - 4];
  823. if (i <= 4 || j < 4) {
  824. decKey[j] = tmp;
  825. } else {
  826. decKey[j] = decTable[0][sbox[tmp >>> 24]] ^
  827. decTable[1][sbox[tmp >> 16 & 255]] ^
  828. decTable[2][sbox[tmp >> 8 & 255]] ^
  829. decTable[3][sbox[tmp & 255]];
  830. }
  831. }
  832. }
  833. // public
  834. /* Something like this might appear here eventually
  835. name: "AES",
  836. blockSize: 4,
  837. keySizes: [4,6,8],
  838. */
  839. /**
  840. * Encrypt an array of 4 big-endian words.
  841. * @param {Array} data The plaintext.
  842. * @return {Array} The ciphertext.
  843. */
  844. encrypt(data) {
  845. return this._crypt(data, 0);
  846. }
  847. /**
  848. * Decrypt an array of 4 big-endian words.
  849. * @param {Array} data The ciphertext.
  850. * @return {Array} The plaintext.
  851. */
  852. decrypt(data) {
  853. return this._crypt(data, 1);
  854. }
  855. /**
  856. * Expand the S-box tables.
  857. *
  858. * @private
  859. */
  860. _precompute() {
  861. const encTable = this._tables[0];
  862. const decTable = this._tables[1];
  863. const sbox = encTable[4];
  864. const sboxInv = decTable[4];
  865. const d = [];
  866. const th = [];
  867. let xInv, x2, x4, x8;
  868. // Compute double and third tables
  869. for (let i = 0; i < 256; i++) {
  870. th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;
  871. }
  872. for (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {
  873. // Compute sbox
  874. let s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;
  875. s = s >> 8 ^ s & 255 ^ 99;
  876. sbox[x] = s;
  877. sboxInv[s] = x;
  878. // Compute MixColumns
  879. x8 = d[x4 = d[x2 = d[x]]];
  880. let tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;
  881. let tEnc = d[s] * 0x101 ^ s * 0x1010100;
  882. for (let i = 0; i < 4; i++) {
  883. encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;
  884. decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;
  885. }
  886. }
  887. // Compactify. Considerable speedup on Firefox.
  888. for (let i = 0; i < 5; i++) {
  889. encTable[i] = encTable[i].slice(0);
  890. decTable[i] = decTable[i].slice(0);
  891. }
  892. }
  893. /**
  894. * Encryption and decryption core.
  895. * @param {Array} input Four words to be encrypted or decrypted.
  896. * @param dir The direction, 0 for encrypt and 1 for decrypt.
  897. * @return {Array} The four encrypted or decrypted words.
  898. * @private
  899. */
  900. _crypt(input, dir) {
  901. if (input.length !== 4) {
  902. throw new Error$1("invalid aes block size");
  903. }
  904. const key = this._key[dir];
  905. const nInnerRounds = key.length / 4 - 2;
  906. const out = [0, 0, 0, 0];
  907. const table = this._tables[dir];
  908. // load up the tables
  909. const t0 = table[0];
  910. const t1 = table[1];
  911. const t2 = table[2];
  912. const t3 = table[3];
  913. const sbox = table[4];
  914. // state variables a,b,c,d are loaded with pre-whitened data
  915. let a = input[0] ^ key[0];
  916. let b = input[dir ? 3 : 1] ^ key[1];
  917. let c = input[2] ^ key[2];
  918. let d = input[dir ? 1 : 3] ^ key[3];
  919. let kIndex = 4;
  920. let a2, b2, c2;
  921. // Inner rounds. Cribbed from OpenSSL.
  922. for (let i = 0; i < nInnerRounds; i++) {
  923. a2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];
  924. b2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];
  925. c2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];
  926. d = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];
  927. kIndex += 4;
  928. a = a2; b = b2; c = c2;
  929. }
  930. // Last round.
  931. for (let i = 0; i < 4; i++) {
  932. out[dir ? 3 & -i : i] =
  933. sbox[a >>> 24] << 24 ^
  934. sbox[b >> 16 & 255] << 16 ^
  935. sbox[c >> 8 & 255] << 8 ^
  936. sbox[d & 255] ^
  937. key[kIndex++];
  938. a2 = a; a = b; b = c; c = d; d = a2;
  939. }
  940. return out;
  941. }
  942. };
  943. /**
  944. * Random values
  945. * @namespace
  946. */
  947. const random = {
  948. /**
  949. * Generate random words with pure js, cryptographically not as strong & safe as native implementation.
  950. * @param {TypedArray} typedArray The array to fill.
  951. * @return {TypedArray} The random values.
  952. */
  953. getRandomValues(typedArray) {
  954. const words = new Uint32Array$1(typedArray.buffer);
  955. const r = (m_w) => {
  956. let m_z = 0x3ade68b1;
  957. const mask = 0xffffffff;
  958. return function () {
  959. m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;
  960. m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;
  961. const result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;
  962. return result * (Math$1.random() > .5 ? 1 : -1);
  963. };
  964. };
  965. for (let i = 0, rcache; i < typedArray.length; i += 4) {
  966. const _r = r((rcache || Math$1.random()) * 0x100000000);
  967. rcache = _r() * 0x3ade67b7;
  968. words[i / 4] = (_r() * 0x100000000) | 0;
  969. }
  970. return typedArray;
  971. }
  972. };
  973. /** @fileOverview CTR mode implementation.
  974. *
  975. * Special thanks to Roy Nicholson for pointing out a bug in our
  976. * implementation.
  977. *
  978. * @author Emily Stark
  979. * @author Mike Hamburg
  980. * @author Dan Boneh
  981. */
  982. /** Brian Gladman's CTR Mode.
  983. * @constructor
  984. * @param {Object} _prf The aes instance to generate key.
  985. * @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.
  986. */
  987. const mode = {};
  988. /**
  989. * Brian Gladman's CTR Mode.
  990. * @namespace
  991. */
  992. mode.ctrGladman = class {
  993. constructor(prf, iv) {
  994. this._prf = prf;
  995. this._initIv = iv;
  996. this._iv = iv;
  997. }
  998. reset() {
  999. this._iv = this._initIv;
  1000. }
  1001. /** Input some data to calculate.
  1002. * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.
  1003. */
  1004. update(data) {
  1005. return this.calculate(this._prf, data, this._iv);
  1006. }
  1007. incWord(word) {
  1008. if (((word >> 24) & 0xff) === 0xff) { //overflow
  1009. let b1 = (word >> 16) & 0xff;
  1010. let b2 = (word >> 8) & 0xff;
  1011. let b3 = word & 0xff;
  1012. if (b1 === 0xff) { // overflow b1
  1013. b1 = 0;
  1014. if (b2 === 0xff) {
  1015. b2 = 0;
  1016. if (b3 === 0xff) {
  1017. b3 = 0;
  1018. } else {
  1019. ++b3;
  1020. }
  1021. } else {
  1022. ++b2;
  1023. }
  1024. } else {
  1025. ++b1;
  1026. }
  1027. word = 0;
  1028. word += (b1 << 16);
  1029. word += (b2 << 8);
  1030. word += b3;
  1031. } else {
  1032. word += (0x01 << 24);
  1033. }
  1034. return word;
  1035. }
  1036. incCounter(counter) {
  1037. if ((counter[0] = this.incWord(counter[0])) === 0) {
  1038. // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
  1039. counter[1] = this.incWord(counter[1]);
  1040. }
  1041. }
  1042. calculate(prf, data, iv) {
  1043. let l;
  1044. if (!(l = data.length)) {
  1045. return [];
  1046. }
  1047. const bl = bitArray.bitLength(data);
  1048. for (let i = 0; i < l; i += 4) {
  1049. this.incCounter(iv);
  1050. const e = prf.encrypt(iv);
  1051. data[i] ^= e[0];
  1052. data[i + 1] ^= e[1];
  1053. data[i + 2] ^= e[2];
  1054. data[i + 3] ^= e[3];
  1055. }
  1056. return bitArray.clamp(data, bl);
  1057. }
  1058. };
  1059. const misc = {
  1060. importKey(password) {
  1061. return new misc.hmacSha1(codec.bytes.toBits(password));
  1062. },
  1063. pbkdf2(prf, salt, count, length) {
  1064. count = count || 10000;
  1065. if (length < 0 || count < 0) {
  1066. throw new Error$1("invalid params to pbkdf2");
  1067. }
  1068. const byteLength = ((length >> 5) + 1) << 2;
  1069. let u, ui, i, j, k;
  1070. const arrayBuffer = new ArrayBuffer(byteLength);
  1071. const out = new DataView$1(arrayBuffer);
  1072. let outLength = 0;
  1073. const b = bitArray;
  1074. salt = codec.bytes.toBits(salt);
  1075. for (k = 1; outLength < (byteLength || 1); k++) {
  1076. u = ui = prf.encrypt(b.concat(salt, [k]));
  1077. for (i = 1; i < count; i++) {
  1078. ui = prf.encrypt(ui);
  1079. for (j = 0; j < ui.length; j++) {
  1080. u[j] ^= ui[j];
  1081. }
  1082. }
  1083. for (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {
  1084. out.setInt32(outLength, u[i]);
  1085. outLength += 4;
  1086. }
  1087. }
  1088. return arrayBuffer.slice(0, length / 8);
  1089. }
  1090. };
  1091. /** @fileOverview HMAC implementation.
  1092. *
  1093. * @author Emily Stark
  1094. * @author Mike Hamburg
  1095. * @author Dan Boneh
  1096. */
  1097. /** HMAC with the specified hash function.
  1098. * @constructor
  1099. * @param {bitArray} key the key for HMAC.
  1100. * @param {Object} [Hash=hash.sha1] The hash function to use.
  1101. */
  1102. misc.hmacSha1 = class {
  1103. constructor(key) {
  1104. const hmac = this;
  1105. const Hash = hmac._hash = hash.sha1;
  1106. const exKey = [[], []];
  1107. hmac._baseHash = [new Hash(), new Hash()];
  1108. const bs = hmac._baseHash[0].blockSize / 32;
  1109. if (key.length > bs) {
  1110. key = new Hash().update(key).finalize();
  1111. }
  1112. for (let i = 0; i < bs; i++) {
  1113. exKey[0][i] = key[i] ^ 0x36363636;
  1114. exKey[1][i] = key[i] ^ 0x5C5C5C5C;
  1115. }
  1116. hmac._baseHash[0].update(exKey[0]);
  1117. hmac._baseHash[1].update(exKey[1]);
  1118. hmac._resultHash = new Hash(hmac._baseHash[0]);
  1119. }
  1120. reset() {
  1121. const hmac = this;
  1122. hmac._resultHash = new hmac._hash(hmac._baseHash[0]);
  1123. hmac._updated = false;
  1124. }
  1125. update(data) {
  1126. const hmac = this;
  1127. hmac._updated = true;
  1128. hmac._resultHash.update(data);
  1129. }
  1130. digest() {
  1131. const hmac = this;
  1132. const w = hmac._resultHash.finalize();
  1133. const result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();
  1134. hmac.reset();
  1135. return result;
  1136. }
  1137. encrypt(data) {
  1138. if (!this._updated) {
  1139. this.update(data);
  1140. return this.digest(data);
  1141. } else {
  1142. throw new Error$1("encrypt on already updated hmac called!");
  1143. }
  1144. }
  1145. };
  1146. /*
  1147. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1148. Redistribution and use in source and binary forms, with or without
  1149. modification, are permitted provided that the following conditions are met:
  1150. 1. Redistributions of source code must retain the above copyright notice,
  1151. this list of conditions and the following disclaimer.
  1152. 2. Redistributions in binary form must reproduce the above copyright
  1153. notice, this list of conditions and the following disclaimer in
  1154. the documentation and/or other materials provided with the distribution.
  1155. 3. The names of the authors may not be used to endorse or promote products
  1156. derived from this software without specific prior written permission.
  1157. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1158. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1159. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1160. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1161. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1162. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1163. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1164. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1165. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1166. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1167. */
  1168. const GET_RANDOM_VALUES_SUPPORTED = typeof crypto$1 != "undefined" && typeof crypto$1.getRandomValues == "function";
  1169. const ERR_INVALID_PASSWORD = "Invalid password";
  1170. const ERR_INVALID_SIGNATURE = "Invalid signature";
  1171. const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password";
  1172. function getRandomValues(array) {
  1173. if (GET_RANDOM_VALUES_SUPPORTED) {
  1174. return crypto$1.getRandomValues(array);
  1175. } else {
  1176. return random.getRandomValues(array);
  1177. }
  1178. }
  1179. /*
  1180. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1181. Redistribution and use in source and binary forms, with or without
  1182. modification, are permitted provided that the following conditions are met:
  1183. 1. Redistributions of source code must retain the above copyright notice,
  1184. this list of conditions and the following disclaimer.
  1185. 2. Redistributions in binary form must reproduce the above copyright
  1186. notice, this list of conditions and the following disclaimer in
  1187. the documentation and/or other materials provided with the distribution.
  1188. 3. The names of the authors may not be used to endorse or promote products
  1189. derived from this software without specific prior written permission.
  1190. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1191. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1192. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1193. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1194. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1195. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1196. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1197. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1198. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1199. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1200. */
  1201. const BLOCK_LENGTH = 16;
  1202. const RAW_FORMAT = "raw";
  1203. const PBKDF2_ALGORITHM = { name: "PBKDF2" };
  1204. const HASH_ALGORITHM = { name: "HMAC" };
  1205. const HASH_FUNCTION = "SHA-1";
  1206. const BASE_KEY_ALGORITHM = Object$1.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);
  1207. const DERIVED_BITS_ALGORITHM = Object$1.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);
  1208. const DERIVED_BITS_USAGE = ["deriveBits"];
  1209. const SALT_LENGTH = [8, 12, 16];
  1210. const KEY_LENGTH = [16, 24, 32];
  1211. const SIGNATURE_LENGTH = 10;
  1212. const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];
  1213. const UNDEFINED_TYPE = "undefined";
  1214. const FUNCTION_TYPE = "function";
  1215. // deno-lint-ignore valid-typeof
  1216. const CRYPTO_API_SUPPORTED = typeof crypto$1 != UNDEFINED_TYPE;
  1217. const subtle = CRYPTO_API_SUPPORTED && crypto$1.subtle;
  1218. const SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;
  1219. const codecBytes = codec.bytes;
  1220. const Aes = cipher.aes;
  1221. const CtrGladman = mode.ctrGladman;
  1222. const HmacSha1 = misc.hmacSha1;
  1223. let IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;
  1224. let DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;
  1225. class AESDecryptionStream extends TransformStream {
  1226. constructor({ password, signed, encryptionStrength, checkPasswordOnly }) {
  1227. super({
  1228. start() {
  1229. Object$1.assign(this, {
  1230. ready: new Promise$1(resolve => this.resolveReady = resolve),
  1231. password,
  1232. signed,
  1233. strength: encryptionStrength - 1,
  1234. pending: new Uint8Array$1()
  1235. });
  1236. },
  1237. async transform(chunk, controller) {
  1238. const aesCrypto = this;
  1239. const {
  1240. password,
  1241. strength,
  1242. resolveReady,
  1243. ready
  1244. } = aesCrypto;
  1245. if (password) {
  1246. await createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));
  1247. chunk = subarray(chunk, SALT_LENGTH[strength] + 2);
  1248. if (checkPasswordOnly) {
  1249. controller.error(new Error$1(ERR_ABORT_CHECK_PASSWORD));
  1250. } else {
  1251. resolveReady();
  1252. }
  1253. } else {
  1254. await ready;
  1255. }
  1256. const output = new Uint8Array$1(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));
  1257. controller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));
  1258. },
  1259. async flush(controller) {
  1260. const {
  1261. signed,
  1262. ctr,
  1263. hmac,
  1264. pending,
  1265. ready
  1266. } = this;
  1267. if (hmac && ctr) {
  1268. await ready;
  1269. const chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);
  1270. const originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);
  1271. let decryptedChunkArray = new Uint8Array$1();
  1272. if (chunkToDecrypt.length) {
  1273. const encryptedChunk = toBits(codecBytes, chunkToDecrypt);
  1274. hmac.update(encryptedChunk);
  1275. const decryptedChunk = ctr.update(encryptedChunk);
  1276. decryptedChunkArray = fromBits(codecBytes, decryptedChunk);
  1277. }
  1278. if (signed) {
  1279. const signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);
  1280. for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {
  1281. if (signature[indexSignature] != originalSignature[indexSignature]) {
  1282. throw new Error$1(ERR_INVALID_SIGNATURE);
  1283. }
  1284. }
  1285. }
  1286. controller.enqueue(decryptedChunkArray);
  1287. }
  1288. }
  1289. });
  1290. }
  1291. }
  1292. class AESEncryptionStream extends TransformStream {
  1293. constructor({ password, encryptionStrength }) {
  1294. // deno-lint-ignore prefer-const
  1295. let stream;
  1296. super({
  1297. start() {
  1298. Object$1.assign(this, {
  1299. ready: new Promise$1(resolve => this.resolveReady = resolve),
  1300. password,
  1301. strength: encryptionStrength - 1,
  1302. pending: new Uint8Array$1()
  1303. });
  1304. },
  1305. async transform(chunk, controller) {
  1306. const aesCrypto = this;
  1307. const {
  1308. password,
  1309. strength,
  1310. resolveReady,
  1311. ready
  1312. } = aesCrypto;
  1313. let preamble = new Uint8Array$1();
  1314. if (password) {
  1315. preamble = await createEncryptionKeys(aesCrypto, strength, password);
  1316. resolveReady();
  1317. } else {
  1318. await ready;
  1319. }
  1320. const output = new Uint8Array$1(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));
  1321. output.set(preamble, 0);
  1322. controller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));
  1323. },
  1324. async flush(controller) {
  1325. const {
  1326. ctr,
  1327. hmac,
  1328. pending,
  1329. ready
  1330. } = this;
  1331. if (hmac && ctr) {
  1332. await ready;
  1333. let encryptedChunkArray = new Uint8Array$1();
  1334. if (pending.length) {
  1335. const encryptedChunk = ctr.update(toBits(codecBytes, pending));
  1336. hmac.update(encryptedChunk);
  1337. encryptedChunkArray = fromBits(codecBytes, encryptedChunk);
  1338. }
  1339. stream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);
  1340. controller.enqueue(concat(encryptedChunkArray, stream.signature));
  1341. }
  1342. }
  1343. });
  1344. stream = this;
  1345. }
  1346. }
  1347. function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {
  1348. const {
  1349. ctr,
  1350. hmac,
  1351. pending
  1352. } = aesCrypto;
  1353. const inputLength = input.length - paddingEnd;
  1354. if (pending.length) {
  1355. input = concat(pending, input);
  1356. output = expand(output, inputLength - (inputLength % BLOCK_LENGTH));
  1357. }
  1358. let offset;
  1359. for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {
  1360. const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));
  1361. if (verifySignature) {
  1362. hmac.update(inputChunk);
  1363. }
  1364. const outputChunk = ctr.update(inputChunk);
  1365. if (!verifySignature) {
  1366. hmac.update(outputChunk);
  1367. }
  1368. output.set(fromBits(codecBytes, outputChunk), offset + paddingStart);
  1369. }
  1370. aesCrypto.pending = subarray(input, offset);
  1371. return output;
  1372. }
  1373. async function createDecryptionKeys(decrypt, strength, password, preamble) {
  1374. const passwordVerificationKey = await createKeys$1(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));
  1375. const passwordVerification = subarray(preamble, SALT_LENGTH[strength]);
  1376. if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {
  1377. throw new Error$1(ERR_INVALID_PASSWORD);
  1378. }
  1379. }
  1380. async function createEncryptionKeys(encrypt, strength, password) {
  1381. const salt = getRandomValues(new Uint8Array$1(SALT_LENGTH[strength]));
  1382. const passwordVerification = await createKeys$1(encrypt, strength, password, salt);
  1383. return concat(salt, passwordVerification);
  1384. }
  1385. async function createKeys$1(aesCrypto, strength, password, salt) {
  1386. aesCrypto.password = null;
  1387. const encodedPassword = encodeText(password);
  1388. const baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);
  1389. const derivedBits = await deriveBits(Object$1.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));
  1390. const compositeKey = new Uint8Array$1(derivedBits);
  1391. const key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));
  1392. const authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));
  1393. const passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);
  1394. Object$1.assign(aesCrypto, {
  1395. keys: {
  1396. key,
  1397. authentication,
  1398. passwordVerification
  1399. },
  1400. ctr: new CtrGladman(new Aes(key), Array$1.from(COUNTER_DEFAULT_VALUE)),
  1401. hmac: new HmacSha1(authentication)
  1402. });
  1403. return passwordVerification;
  1404. }
  1405. async function importKey(format, password, algorithm, extractable, keyUsages) {
  1406. if (IMPORT_KEY_SUPPORTED) {
  1407. try {
  1408. return await subtle.importKey(format, password, algorithm, extractable, keyUsages);
  1409. } catch (_error) {
  1410. IMPORT_KEY_SUPPORTED = false;
  1411. return misc.importKey(password);
  1412. }
  1413. } else {
  1414. return misc.importKey(password);
  1415. }
  1416. }
  1417. async function deriveBits(algorithm, baseKey, length) {
  1418. if (DERIVE_BITS_SUPPORTED) {
  1419. try {
  1420. return await subtle.deriveBits(algorithm, baseKey, length);
  1421. } catch (_error) {
  1422. DERIVE_BITS_SUPPORTED = false;
  1423. return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);
  1424. }
  1425. } else {
  1426. return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);
  1427. }
  1428. }
  1429. function concat(leftArray, rightArray) {
  1430. let array = leftArray;
  1431. if (leftArray.length + rightArray.length) {
  1432. array = new Uint8Array$1(leftArray.length + rightArray.length);
  1433. array.set(leftArray, 0);
  1434. array.set(rightArray, leftArray.length);
  1435. }
  1436. return array;
  1437. }
  1438. function expand(inputArray, length) {
  1439. if (length && length > inputArray.length) {
  1440. const array = inputArray;
  1441. inputArray = new Uint8Array$1(length);
  1442. inputArray.set(array, 0);
  1443. }
  1444. return inputArray;
  1445. }
  1446. function subarray(array, begin, end) {
  1447. return array.subarray(begin, end);
  1448. }
  1449. function fromBits(codecBytes, chunk) {
  1450. return codecBytes.fromBits(chunk);
  1451. }
  1452. function toBits(codecBytes, chunk) {
  1453. return codecBytes.toBits(chunk);
  1454. }
  1455. /*
  1456. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1457. Redistribution and use in source and binary forms, with or without
  1458. modification, are permitted provided that the following conditions are met:
  1459. 1. Redistributions of source code must retain the above copyright notice,
  1460. this list of conditions and the following disclaimer.
  1461. 2. Redistributions in binary form must reproduce the above copyright
  1462. notice, this list of conditions and the following disclaimer in
  1463. the documentation and/or other materials provided with the distribution.
  1464. 3. The names of the authors may not be used to endorse or promote products
  1465. derived from this software without specific prior written permission.
  1466. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1467. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1468. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1469. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1470. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1471. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1472. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1473. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1474. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1475. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1476. */
  1477. const HEADER_LENGTH = 12;
  1478. class ZipCryptoDecryptionStream extends TransformStream {
  1479. constructor({ password, passwordVerification, checkPasswordOnly }) {
  1480. super({
  1481. start() {
  1482. Object$1.assign(this, {
  1483. password,
  1484. passwordVerification
  1485. });
  1486. createKeys(this, password);
  1487. },
  1488. transform(chunk, controller) {
  1489. const zipCrypto = this;
  1490. if (zipCrypto.password) {
  1491. const decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));
  1492. zipCrypto.password = null;
  1493. if (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {
  1494. throw new Error$1(ERR_INVALID_PASSWORD);
  1495. }
  1496. chunk = chunk.subarray(HEADER_LENGTH);
  1497. }
  1498. if (checkPasswordOnly) {
  1499. controller.error(new Error$1(ERR_ABORT_CHECK_PASSWORD));
  1500. } else {
  1501. controller.enqueue(decrypt(zipCrypto, chunk));
  1502. }
  1503. }
  1504. });
  1505. }
  1506. }
  1507. class ZipCryptoEncryptionStream extends TransformStream {
  1508. constructor({ password, passwordVerification }) {
  1509. super({
  1510. start() {
  1511. Object$1.assign(this, {
  1512. password,
  1513. passwordVerification
  1514. });
  1515. createKeys(this, password);
  1516. },
  1517. transform(chunk, controller) {
  1518. const zipCrypto = this;
  1519. let output;
  1520. let offset;
  1521. if (zipCrypto.password) {
  1522. zipCrypto.password = null;
  1523. const header = getRandomValues(new Uint8Array$1(HEADER_LENGTH));
  1524. header[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;
  1525. output = new Uint8Array$1(chunk.length + header.length);
  1526. output.set(encrypt(zipCrypto, header), 0);
  1527. offset = HEADER_LENGTH;
  1528. } else {
  1529. output = new Uint8Array$1(chunk.length);
  1530. offset = 0;
  1531. }
  1532. output.set(encrypt(zipCrypto, chunk), offset);
  1533. controller.enqueue(output);
  1534. }
  1535. });
  1536. }
  1537. }
  1538. function decrypt(target, input) {
  1539. const output = new Uint8Array$1(input.length);
  1540. for (let index = 0; index < input.length; index++) {
  1541. output[index] = getByte(target) ^ input[index];
  1542. updateKeys(target, output[index]);
  1543. }
  1544. return output;
  1545. }
  1546. function encrypt(target, input) {
  1547. const output = new Uint8Array$1(input.length);
  1548. for (let index = 0; index < input.length; index++) {
  1549. output[index] = getByte(target) ^ input[index];
  1550. updateKeys(target, input[index]);
  1551. }
  1552. return output;
  1553. }
  1554. function createKeys(target, password) {
  1555. const keys = [0x12345678, 0x23456789, 0x34567890];
  1556. Object$1.assign(target, {
  1557. keys,
  1558. crcKey0: new Crc32(keys[0]),
  1559. crcKey2: new Crc32(keys[2]),
  1560. });
  1561. for (let index = 0; index < password.length; index++) {
  1562. updateKeys(target, password.charCodeAt(index));
  1563. }
  1564. }
  1565. function updateKeys(target, byte) {
  1566. let [key0, key1, key2] = target.keys;
  1567. target.crcKey0.append([byte]);
  1568. key0 = ~target.crcKey0.get();
  1569. key1 = getInt32(Math$1.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);
  1570. target.crcKey2.append([key1 >>> 24]);
  1571. key2 = ~target.crcKey2.get();
  1572. target.keys = [key0, key1, key2];
  1573. }
  1574. function getByte(target) {
  1575. const temp = target.keys[2] | 2;
  1576. return getInt8(Math$1.imul(temp, (temp ^ 1)) >>> 8);
  1577. }
  1578. function getInt8(number) {
  1579. return number & 0xFF;
  1580. }
  1581. function getInt32(number) {
  1582. return number & 0xFFFFFFFF;
  1583. }
  1584. /*
  1585. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1586. Redistribution and use in source and binary forms, with or without
  1587. modification, are permitted provided that the following conditions are met:
  1588. 1. Redistributions of source code must retain the above copyright notice,
  1589. this list of conditions and the following disclaimer.
  1590. 2. Redistributions in binary form must reproduce the above copyright
  1591. notice, this list of conditions and the following disclaimer in
  1592. the documentation and/or other materials provided with the distribution.
  1593. 3. The names of the authors may not be used to endorse or promote products
  1594. derived from this software without specific prior written permission.
  1595. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1596. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1597. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1598. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1599. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1600. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1601. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1602. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1603. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1604. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1605. */
  1606. const COMPRESSION_FORMAT = "deflate-raw";
  1607. class DeflateStream extends TransformStream {
  1608. constructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {
  1609. super({});
  1610. const { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;
  1611. const stream = this;
  1612. let crc32Stream, encryptionStream;
  1613. let readable = filterEmptyChunks(super.readable);
  1614. if ((!encrypted || zipCrypto) && signed) {
  1615. crc32Stream = new Crc32Stream();
  1616. readable = pipeThrough(readable, crc32Stream);
  1617. }
  1618. if (compressed) {
  1619. readable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);
  1620. }
  1621. if (encrypted) {
  1622. if (zipCrypto) {
  1623. readable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));
  1624. } else {
  1625. encryptionStream = new AESEncryptionStream(options);
  1626. readable = pipeThrough(readable, encryptionStream);
  1627. }
  1628. }
  1629. setReadable(stream, readable, () => {
  1630. let signature;
  1631. if (encrypted && !zipCrypto) {
  1632. signature = encryptionStream.signature;
  1633. }
  1634. if ((!encrypted || zipCrypto) && signed) {
  1635. signature = new DataView$1(crc32Stream.value.buffer).getUint32(0);
  1636. }
  1637. stream.signature = signature;
  1638. });
  1639. }
  1640. }
  1641. class InflateStream extends TransformStream {
  1642. constructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {
  1643. super({});
  1644. const { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;
  1645. let crc32Stream, decryptionStream;
  1646. let readable = filterEmptyChunks(super.readable);
  1647. if (encrypted) {
  1648. if (zipCrypto) {
  1649. readable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));
  1650. } else {
  1651. decryptionStream = new AESDecryptionStream(options);
  1652. readable = pipeThrough(readable, decryptionStream);
  1653. }
  1654. }
  1655. if (compressed) {
  1656. readable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);
  1657. }
  1658. if ((!encrypted || zipCrypto) && signed) {
  1659. crc32Stream = new Crc32Stream();
  1660. readable = pipeThrough(readable, crc32Stream);
  1661. }
  1662. setReadable(this, readable, () => {
  1663. if ((!encrypted || zipCrypto) && signed) {
  1664. const dataViewSignature = new DataView$1(crc32Stream.value.buffer);
  1665. if (signature != dataViewSignature.getUint32(0, false)) {
  1666. throw new Error$1(ERR_INVALID_SIGNATURE);
  1667. }
  1668. }
  1669. });
  1670. }
  1671. }
  1672. function filterEmptyChunks(readable) {
  1673. return pipeThrough(readable, new TransformStream({
  1674. transform(chunk, controller) {
  1675. if (chunk && chunk.length) {
  1676. controller.enqueue(chunk);
  1677. }
  1678. }
  1679. }));
  1680. }
  1681. function setReadable(stream, readable, flush) {
  1682. readable = pipeThrough(readable, new TransformStream({ flush }));
  1683. Object$1.defineProperty(stream, "readable", {
  1684. get() {
  1685. return readable;
  1686. }
  1687. });
  1688. }
  1689. function pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {
  1690. try {
  1691. const CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;
  1692. readable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));
  1693. } catch (error) {
  1694. if (useCompressionStream) {
  1695. readable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));
  1696. } else {
  1697. throw error;
  1698. }
  1699. }
  1700. return readable;
  1701. }
  1702. function pipeThrough(readable, transformStream) {
  1703. return readable.pipeThrough(transformStream);
  1704. }
  1705. /*
  1706. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1707. Redistribution and use in source and binary forms, with or without
  1708. modification, are permitted provided that the following conditions are met:
  1709. 1. Redistributions of source code must retain the above copyright notice,
  1710. this list of conditions and the following disclaimer.
  1711. 2. Redistributions in binary form must reproduce the above copyright
  1712. notice, this list of conditions and the following disclaimer in
  1713. the documentation and/or other materials provided with the distribution.
  1714. 3. The names of the authors may not be used to endorse or promote products
  1715. derived from this software without specific prior written permission.
  1716. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1717. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1718. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1719. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1720. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1721. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1722. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1723. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1724. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1725. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1726. */
  1727. const MESSAGE_EVENT_TYPE = "message";
  1728. const MESSAGE_START = "start";
  1729. const MESSAGE_PULL = "pull";
  1730. const MESSAGE_DATA = "data";
  1731. const MESSAGE_ACK_DATA = "ack";
  1732. const MESSAGE_CLOSE = "close";
  1733. const CODEC_DEFLATE = "deflate";
  1734. const CODEC_INFLATE = "inflate";
  1735. class CodecStream extends TransformStream {
  1736. constructor(options, config) {
  1737. super({});
  1738. const codec = this;
  1739. const { codecType } = options;
  1740. let Stream;
  1741. if (codecType.startsWith(CODEC_DEFLATE)) {
  1742. Stream = DeflateStream;
  1743. } else if (codecType.startsWith(CODEC_INFLATE)) {
  1744. Stream = InflateStream;
  1745. }
  1746. let size = 0;
  1747. const stream = new Stream(options, config);
  1748. const readable = super.readable;
  1749. const transformStream = new TransformStream({
  1750. transform(chunk, controller) {
  1751. if (chunk && chunk.length) {
  1752. size += chunk.length;
  1753. controller.enqueue(chunk);
  1754. }
  1755. },
  1756. flush() {
  1757. const { signature } = stream;
  1758. Object$1.assign(codec, {
  1759. signature,
  1760. size
  1761. });
  1762. }
  1763. });
  1764. Object$1.defineProperty(codec, "readable", {
  1765. get() {
  1766. return readable.pipeThrough(stream).pipeThrough(transformStream);
  1767. }
  1768. });
  1769. }
  1770. }
  1771. /*
  1772. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  1773. Redistribution and use in source and binary forms, with or without
  1774. modification, are permitted provided that the following conditions are met:
  1775. 1. Redistributions of source code must retain the above copyright notice,
  1776. this list of conditions and the following disclaimer.
  1777. 2. Redistributions in binary form must reproduce the above copyright
  1778. notice, this list of conditions and the following disclaimer in
  1779. the documentation and/or other materials provided with the distribution.
  1780. 3. The names of the authors may not be used to endorse or promote products
  1781. derived from this software without specific prior written permission.
  1782. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  1783. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  1784. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  1785. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  1786. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  1787. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  1788. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  1789. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  1790. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  1791. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1792. */
  1793. // deno-lint-ignore valid-typeof
  1794. const WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE$1;
  1795. class CodecWorker {
  1796. constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {
  1797. const { signal } = streamOptions;
  1798. Object$1.assign(workerData, {
  1799. busy: true,
  1800. readable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),
  1801. writable,
  1802. options: Object$1.assign({}, options),
  1803. scripts,
  1804. transferStreams,
  1805. terminate() {
  1806. const { worker, busy } = workerData;
  1807. if (worker && !busy) {
  1808. worker.terminate();
  1809. workerData.interface = null;
  1810. }
  1811. },
  1812. onTaskFinished() {
  1813. workerData.busy = false;
  1814. onTaskFinished(workerData);
  1815. }
  1816. });
  1817. return (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);
  1818. }
  1819. }
  1820. class ProgressWatcherStream extends TransformStream {
  1821. constructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {
  1822. let chunkOffset = 0;
  1823. super({
  1824. start() {
  1825. if (onstart) {
  1826. callHandler(onstart, size);
  1827. }
  1828. },
  1829. async transform(chunk, controller) {
  1830. chunkOffset += chunk.length;
  1831. if (onprogress) {
  1832. await callHandler(onprogress, chunkOffset, size);
  1833. }
  1834. controller.enqueue(chunk);
  1835. },
  1836. flush() {
  1837. readableSource.size = chunkOffset;
  1838. if (onend) {
  1839. callHandler(onend, chunkOffset);
  1840. }
  1841. }
  1842. }, { highWaterMark: 1, size: () => chunkSize });
  1843. }
  1844. }
  1845. async function callHandler(handler, ...parameters) {
  1846. try {
  1847. await handler(...parameters);
  1848. } catch (_error) {
  1849. // ignored
  1850. }
  1851. }
  1852. function createWorkerInterface(workerData, config) {
  1853. return {
  1854. run: () => runWorker$1(workerData, config)
  1855. };
  1856. }
  1857. function createWebWorkerInterface(workerData, { baseURL, chunkSize }) {
  1858. if (!workerData.interface) {
  1859. Object$1.assign(workerData, {
  1860. worker: getWebWorker(workerData.scripts[0], baseURL, workerData),
  1861. interface: {
  1862. run: () => runWebWorker(workerData, { chunkSize })
  1863. }
  1864. });
  1865. }
  1866. return workerData.interface;
  1867. }
  1868. async function runWorker$1({ options, readable, writable, onTaskFinished }, config) {
  1869. const codecStream = new CodecStream(options, config);
  1870. try {
  1871. await readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });
  1872. const {
  1873. signature,
  1874. size
  1875. } = codecStream;
  1876. return {
  1877. signature,
  1878. size
  1879. };
  1880. } finally {
  1881. onTaskFinished();
  1882. }
  1883. }
  1884. async function runWebWorker(workerData, config) {
  1885. let resolveResult, rejectResult;
  1886. const result = new Promise$1((resolve, reject) => {
  1887. resolveResult = resolve;
  1888. rejectResult = reject;
  1889. });
  1890. Object$1.assign(workerData, {
  1891. reader: null,
  1892. writer: null,
  1893. resolveResult,
  1894. rejectResult,
  1895. result
  1896. });
  1897. const { readable, options, scripts } = workerData;
  1898. const { writable, closed } = watchClosedStream(workerData.writable);
  1899. const streamsTransferred = sendMessage$1({
  1900. type: MESSAGE_START,
  1901. scripts: scripts.slice(1),
  1902. options,
  1903. config,
  1904. readable,
  1905. writable
  1906. }, workerData);
  1907. if (!streamsTransferred) {
  1908. Object$1.assign(workerData, {
  1909. reader: readable.getReader(),
  1910. writer: writable.getWriter()
  1911. });
  1912. }
  1913. const resultValue = await result;
  1914. try {
  1915. await writable.getWriter().close();
  1916. } catch (_error) {
  1917. // ignored
  1918. }
  1919. await closed;
  1920. return resultValue;
  1921. }
  1922. function watchClosedStream(writableSource) {
  1923. const writer = writableSource.getWriter();
  1924. let resolveStreamClosed;
  1925. const closed = new Promise$1(resolve => resolveStreamClosed = resolve);
  1926. const writable = new WritableStream({
  1927. async write(chunk) {
  1928. await writer.ready;
  1929. await writer.write(chunk);
  1930. },
  1931. close() {
  1932. writer.releaseLock();
  1933. resolveStreamClosed();
  1934. },
  1935. abort(reason) {
  1936. return writer.abort(reason);
  1937. }
  1938. });
  1939. return { writable, closed };
  1940. }
  1941. let classicWorkersSupported = true;
  1942. let transferStreamsSupported = true;
  1943. function getWebWorker(url, baseURL, workerData) {
  1944. const workerOptions = { type: "module" };
  1945. let scriptUrl, worker;
  1946. // deno-lint-ignore valid-typeof
  1947. if (typeof url == FUNCTION_TYPE$1) {
  1948. url = url();
  1949. }
  1950. try {
  1951. scriptUrl = new URL$3(url, baseURL);
  1952. } catch (_error) {
  1953. scriptUrl = url;
  1954. }
  1955. if (classicWorkersSupported) {
  1956. try {
  1957. worker = new Worker(scriptUrl);
  1958. } catch (_error) {
  1959. classicWorkersSupported = false;
  1960. worker = new Worker(scriptUrl, workerOptions);
  1961. }
  1962. } else {
  1963. worker = new Worker(scriptUrl, workerOptions);
  1964. }
  1965. worker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));
  1966. return worker;
  1967. }
  1968. function sendMessage$1(message, { worker, writer, onTaskFinished, transferStreams }) {
  1969. try {
  1970. let { value, readable, writable } = message;
  1971. const transferables = [];
  1972. if (value) {
  1973. message.value = value.buffer;
  1974. transferables.push(message.value);
  1975. }
  1976. if (transferStreams && transferStreamsSupported) {
  1977. if (readable) {
  1978. transferables.push(readable);
  1979. }
  1980. if (writable) {
  1981. transferables.push(writable);
  1982. }
  1983. } else {
  1984. message.readable = message.writable = null;
  1985. }
  1986. if (transferables.length) {
  1987. try {
  1988. worker.postMessage(message, transferables);
  1989. return true;
  1990. } catch (_error) {
  1991. transferStreamsSupported = false;
  1992. message.readable = message.writable = null;
  1993. worker.postMessage(message);
  1994. }
  1995. } else {
  1996. worker.postMessage(message);
  1997. }
  1998. } catch (error) {
  1999. if (writer) {
  2000. writer.releaseLock();
  2001. }
  2002. onTaskFinished();
  2003. throw error;
  2004. }
  2005. }
  2006. async function onMessage({ data }, workerData) {
  2007. const { type, value, messageId, result, error } = data;
  2008. const { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;
  2009. try {
  2010. if (error) {
  2011. const { message, stack, code, name } = error;
  2012. const responseError = new Error$1(message);
  2013. Object$1.assign(responseError, { stack, code, name });
  2014. close(responseError);
  2015. } else {
  2016. if (type == MESSAGE_PULL) {
  2017. const { value, done } = await reader.read();
  2018. sendMessage$1({ type: MESSAGE_DATA, value, done, messageId }, workerData);
  2019. }
  2020. if (type == MESSAGE_DATA) {
  2021. await writer.ready;
  2022. await writer.write(new Uint8Array$1(value));
  2023. sendMessage$1({ type: MESSAGE_ACK_DATA, messageId }, workerData);
  2024. }
  2025. if (type == MESSAGE_CLOSE) {
  2026. close(null, result);
  2027. }
  2028. }
  2029. } catch (error) {
  2030. close(error);
  2031. }
  2032. function close(error, result) {
  2033. if (error) {
  2034. rejectResult(error);
  2035. } else {
  2036. resolveResult(result);
  2037. }
  2038. if (writer) {
  2039. writer.releaseLock();
  2040. }
  2041. onTaskFinished();
  2042. }
  2043. }
  2044. /*
  2045. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2046. Redistribution and use in source and binary forms, with or without
  2047. modification, are permitted provided that the following conditions are met:
  2048. 1. Redistributions of source code must retain the above copyright notice,
  2049. this list of conditions and the following disclaimer.
  2050. 2. Redistributions in binary form must reproduce the above copyright
  2051. notice, this list of conditions and the following disclaimer in
  2052. the documentation and/or other materials provided with the distribution.
  2053. 3. The names of the authors may not be used to endorse or promote products
  2054. derived from this software without specific prior written permission.
  2055. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2056. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2057. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2058. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2059. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2060. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2061. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2062. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2063. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2064. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2065. */
  2066. let pool = [];
  2067. const pendingRequests = [];
  2068. let indexWorker = 0;
  2069. async function runWorker(stream, workerOptions) {
  2070. const { options, config } = workerOptions;
  2071. const { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;
  2072. const { workerScripts, maxWorkers, terminateWorkerTimeout } = config;
  2073. workerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;
  2074. const streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;
  2075. workerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));
  2076. workerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];
  2077. options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);
  2078. let worker;
  2079. const workerData = pool.find(workerData => !workerData.busy);
  2080. if (workerData) {
  2081. clearTerminateTimeout(workerData);
  2082. worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);
  2083. } else if (pool.length < maxWorkers) {
  2084. const workerData = { indexWorker };
  2085. indexWorker++;
  2086. pool.push(workerData);
  2087. worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);
  2088. } else {
  2089. worker = await new Promise$1(resolve => pendingRequests.push({ resolve, stream, workerOptions }));
  2090. }
  2091. return worker.run();
  2092. function onTaskFinished(workerData) {
  2093. if (pendingRequests.length) {
  2094. const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);
  2095. resolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));
  2096. } else if (workerData.worker) {
  2097. clearTerminateTimeout(workerData);
  2098. if (Number$1.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {
  2099. workerData.terminateTimeout = setTimeout(() => {
  2100. pool = pool.filter(data => data != workerData);
  2101. workerData.terminate();
  2102. }, terminateWorkerTimeout);
  2103. }
  2104. } else {
  2105. pool = pool.filter(data => data != workerData);
  2106. }
  2107. }
  2108. }
  2109. function clearTerminateTimeout(workerData) {
  2110. const { terminateTimeout } = workerData;
  2111. if (terminateTimeout) {
  2112. clearTimeout(terminateTimeout);
  2113. workerData.terminateTimeout = null;
  2114. }
  2115. }
  2116. function terminateWorkers() {
  2117. pool.forEach(workerData => {
  2118. clearTerminateTimeout(workerData);
  2119. workerData.terminate();
  2120. });
  2121. }
  2122. /*
  2123. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2124. Redistribution and use in source and binary forms, with or without
  2125. modification, are permitted provided that the following conditions are met:
  2126. 1. Redistributions of source code must retain the above copyright notice,
  2127. this list of conditions and the following disclaimer.
  2128. 2. Redistributions in binary form must reproduce the above copyright
  2129. notice, this list of conditions and the following disclaimer in
  2130. the documentation and/or other materials provided with the distribution.
  2131. 3. The names of the authors may not be used to endorse or promote products
  2132. derived from this software without specific prior written permission.
  2133. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2134. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2135. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2136. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2137. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2138. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2139. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2140. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2141. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2142. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2143. */
  2144. const ERR_HTTP_STATUS = "HTTP error ";
  2145. const ERR_HTTP_RANGE = "HTTP Range not supported";
  2146. const ERR_ITERATOR_COMPLETED_TOO_SOON = "Writer iterator completed too soon";
  2147. const CONTENT_TYPE_TEXT_PLAIN = "text/plain";
  2148. const HTTP_HEADER_CONTENT_LENGTH = "Content-Length";
  2149. const HTTP_HEADER_CONTENT_RANGE = "Content-Range";
  2150. const HTTP_HEADER_ACCEPT_RANGES = "Accept-Ranges";
  2151. const HTTP_HEADER_RANGE = "Range";
  2152. const HTTP_HEADER_CONTENT_TYPE = "Content-Type";
  2153. const HTTP_METHOD_HEAD = "HEAD";
  2154. const HTTP_METHOD_GET = "GET";
  2155. const HTTP_RANGE_UNIT = "bytes";
  2156. const DEFAULT_CHUNK_SIZE = 64 * 1024;
  2157. const PROPERTY_NAME_WRITABLE = "writable";
  2158. class Stream {
  2159. constructor() {
  2160. this.size = 0;
  2161. }
  2162. init() {
  2163. this.initialized = true;
  2164. }
  2165. }
  2166. class Reader extends Stream {
  2167. get readable() {
  2168. const reader = this;
  2169. const { chunkSize = DEFAULT_CHUNK_SIZE } = reader;
  2170. const readable = new ReadableStream({
  2171. start() {
  2172. this.chunkOffset = 0;
  2173. },
  2174. async pull(controller) {
  2175. const { offset = 0, size, diskNumberStart } = readable;
  2176. const { chunkOffset } = this;
  2177. controller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math$1.min(chunkSize, size - chunkOffset), diskNumberStart));
  2178. if (chunkOffset + chunkSize > size) {
  2179. controller.close();
  2180. } else {
  2181. this.chunkOffset += chunkSize;
  2182. }
  2183. }
  2184. });
  2185. return readable;
  2186. }
  2187. }
  2188. class Writer extends Stream {
  2189. constructor() {
  2190. super();
  2191. const writer = this;
  2192. const writable = new WritableStream({
  2193. write(chunk) {
  2194. return writer.writeUint8Array(chunk);
  2195. }
  2196. });
  2197. Object$1.defineProperty(writer, PROPERTY_NAME_WRITABLE, {
  2198. get() {
  2199. return writable;
  2200. }
  2201. });
  2202. }
  2203. writeUint8Array() {
  2204. // abstract
  2205. }
  2206. }
  2207. class Data64URIReader extends Reader {
  2208. constructor(dataURI) {
  2209. super();
  2210. let dataEnd = dataURI.length;
  2211. while (dataURI.charAt(dataEnd - 1) == "=") {
  2212. dataEnd--;
  2213. }
  2214. const dataStart = dataURI.indexOf(",") + 1;
  2215. Object$1.assign(this, {
  2216. dataURI,
  2217. dataStart,
  2218. size: Math$1.floor((dataEnd - dataStart) * 0.75)
  2219. });
  2220. }
  2221. readUint8Array(offset, length) {
  2222. const {
  2223. dataStart,
  2224. dataURI
  2225. } = this;
  2226. const dataArray = new Uint8Array$1(length);
  2227. const start = Math$1.floor(offset / 3) * 4;
  2228. const bytes = atob(dataURI.substring(start + dataStart, Math$1.ceil((offset + length) / 3) * 4 + dataStart));
  2229. const delta = offset - Math$1.floor(start / 4) * 3;
  2230. for (let indexByte = delta; indexByte < delta + length; indexByte++) {
  2231. dataArray[indexByte - delta] = bytes.charCodeAt(indexByte);
  2232. }
  2233. return dataArray;
  2234. }
  2235. }
  2236. class Data64URIWriter extends Writer {
  2237. constructor(contentType) {
  2238. super();
  2239. Object$1.assign(this, {
  2240. data: "data:" + (contentType || "") + ";base64,",
  2241. pending: []
  2242. });
  2243. }
  2244. writeUint8Array(array) {
  2245. const writer = this;
  2246. let indexArray = 0;
  2247. let dataString = writer.pending;
  2248. const delta = writer.pending.length;
  2249. writer.pending = "";
  2250. for (indexArray = 0; indexArray < (Math$1.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {
  2251. dataString += String$1.fromCharCode(array[indexArray]);
  2252. }
  2253. for (; indexArray < array.length; indexArray++) {
  2254. writer.pending += String$1.fromCharCode(array[indexArray]);
  2255. }
  2256. if (dataString.length > 2) {
  2257. writer.data += btoa(dataString);
  2258. } else {
  2259. writer.pending = dataString;
  2260. }
  2261. }
  2262. getData() {
  2263. return this.data + btoa(this.pending);
  2264. }
  2265. }
  2266. class BlobReader extends Reader {
  2267. constructor(blob) {
  2268. super();
  2269. Object$1.assign(this, {
  2270. blob,
  2271. size: blob.size
  2272. });
  2273. }
  2274. async readUint8Array(offset, length) {
  2275. const reader = this;
  2276. const offsetEnd = offset + length;
  2277. const blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;
  2278. let arrayBuffer = await blob.arrayBuffer();
  2279. if (arrayBuffer.byteLength > length) {
  2280. arrayBuffer = arrayBuffer.slice(offset, offsetEnd);
  2281. }
  2282. return new Uint8Array$1(arrayBuffer);
  2283. }
  2284. }
  2285. class BlobWriter extends Stream {
  2286. constructor(contentType) {
  2287. super();
  2288. const writer = this;
  2289. const transformStream = new TransformStream();
  2290. const headers = [];
  2291. if (contentType) {
  2292. headers.push([HTTP_HEADER_CONTENT_TYPE, contentType]);
  2293. }
  2294. Object$1.defineProperty(writer, PROPERTY_NAME_WRITABLE, {
  2295. get() {
  2296. return transformStream.writable;
  2297. }
  2298. });
  2299. writer.blob = new Response(transformStream.readable, { headers }).blob();
  2300. }
  2301. getData() {
  2302. return this.blob;
  2303. }
  2304. }
  2305. class TextReader extends BlobReader {
  2306. constructor(text) {
  2307. super(new Blob$6([text], { type: CONTENT_TYPE_TEXT_PLAIN }));
  2308. }
  2309. }
  2310. class TextWriter extends BlobWriter {
  2311. constructor(encoding) {
  2312. super(encoding);
  2313. Object$1.assign(this, {
  2314. encoding,
  2315. utf8: !encoding || encoding.toLowerCase() == "utf-8"
  2316. });
  2317. }
  2318. async getData() {
  2319. const {
  2320. encoding,
  2321. utf8
  2322. } = this;
  2323. const blob = await super.getData();
  2324. if (blob.text && utf8) {
  2325. return blob.text();
  2326. } else {
  2327. const reader = new FileReader();
  2328. return new Promise$1((resolve, reject) => {
  2329. Object$1.assign(reader, {
  2330. onload: ({ target }) => resolve(target.result),
  2331. onerror: () => reject(reader.error)
  2332. });
  2333. reader.readAsText(blob, encoding);
  2334. });
  2335. }
  2336. }
  2337. }
  2338. class FetchReader extends Reader {
  2339. constructor(url, options) {
  2340. super();
  2341. createHtpReader(this, url, options);
  2342. }
  2343. async init() {
  2344. await initHttpReader(this, sendFetchRequest, getFetchRequestData);
  2345. super.init();
  2346. }
  2347. readUint8Array(index, length) {
  2348. return readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);
  2349. }
  2350. }
  2351. class XHRReader extends Reader {
  2352. constructor(url, options) {
  2353. super();
  2354. createHtpReader(this, url, options);
  2355. }
  2356. async init() {
  2357. await initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);
  2358. super.init();
  2359. }
  2360. readUint8Array(index, length) {
  2361. return readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);
  2362. }
  2363. }
  2364. function createHtpReader(httpReader, url, options) {
  2365. const {
  2366. preventHeadRequest,
  2367. useRangeHeader,
  2368. forceRangeRequests
  2369. } = options;
  2370. options = Object$1.assign({}, options);
  2371. delete options.preventHeadRequest;
  2372. delete options.useRangeHeader;
  2373. delete options.forceRangeRequests;
  2374. delete options.useXHR;
  2375. Object$1.assign(httpReader, {
  2376. url,
  2377. options,
  2378. preventHeadRequest,
  2379. useRangeHeader,
  2380. forceRangeRequests
  2381. });
  2382. }
  2383. async function initHttpReader(httpReader, sendRequest, getRequestData) {
  2384. const {
  2385. url,
  2386. useRangeHeader,
  2387. forceRangeRequests
  2388. } = httpReader;
  2389. if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {
  2390. const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));
  2391. if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {
  2392. throw new Error$1(ERR_HTTP_RANGE);
  2393. } else {
  2394. let contentSize;
  2395. const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);
  2396. if (contentRangeHeader) {
  2397. const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/);
  2398. if (splitHeader.length) {
  2399. const headerValue = splitHeader[1];
  2400. if (headerValue && headerValue != "*") {
  2401. contentSize = Number$1(headerValue);
  2402. }
  2403. }
  2404. }
  2405. if (contentSize === UNDEFINED_VALUE) {
  2406. await getContentLength(httpReader, sendRequest, getRequestData);
  2407. } else {
  2408. httpReader.size = contentSize;
  2409. }
  2410. }
  2411. } else {
  2412. await getContentLength(httpReader, sendRequest, getRequestData);
  2413. }
  2414. }
  2415. async function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {
  2416. const {
  2417. useRangeHeader,
  2418. forceRangeRequests,
  2419. options
  2420. } = httpReader;
  2421. if (useRangeHeader || forceRangeRequests) {
  2422. const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));
  2423. if (response.status != 206) {
  2424. throw new Error$1(ERR_HTTP_RANGE);
  2425. }
  2426. return new Uint8Array$1(await response.arrayBuffer());
  2427. } else {
  2428. const { data } = httpReader;
  2429. if (!data) {
  2430. await getRequestData(httpReader, options);
  2431. }
  2432. return new Uint8Array$1(httpReader.data.subarray(index, index + length));
  2433. }
  2434. }
  2435. function getRangeHeaders(httpReader, index = 0, length = 1) {
  2436. return Object$1.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) });
  2437. }
  2438. function getHeaders({ options }) {
  2439. const { headers } = options;
  2440. if (headers) {
  2441. if (Symbol.iterator in headers) {
  2442. return Object$1.fromEntries(headers);
  2443. } else {
  2444. return headers;
  2445. }
  2446. }
  2447. }
  2448. async function getFetchRequestData(httpReader) {
  2449. await getRequestData(httpReader, sendFetchRequest);
  2450. }
  2451. async function getXMLHttpRequestData(httpReader) {
  2452. await getRequestData(httpReader, sendXMLHttpRequest);
  2453. }
  2454. async function getRequestData(httpReader, sendRequest) {
  2455. const response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));
  2456. httpReader.data = new Uint8Array$1(await response.arrayBuffer());
  2457. if (!httpReader.size) {
  2458. httpReader.size = httpReader.data.length;
  2459. }
  2460. }
  2461. async function getContentLength(httpReader, sendRequest, getRequestData) {
  2462. if (httpReader.preventHeadRequest) {
  2463. await getRequestData(httpReader, httpReader.options);
  2464. } else {
  2465. const response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));
  2466. const contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);
  2467. if (contentLength) {
  2468. httpReader.size = Number$1(contentLength);
  2469. } else {
  2470. await getRequestData(httpReader, httpReader.options);
  2471. }
  2472. }
  2473. }
  2474. async function sendFetchRequest(method, { options, url }, headers) {
  2475. const response = await fetch(url, Object$1.assign({}, options, { method, headers }));
  2476. if (response.status < 400) {
  2477. return response;
  2478. } else {
  2479. throw response.status == 416 ? new Error$1(ERR_HTTP_RANGE) : new Error$1(ERR_HTTP_STATUS + (response.statusText || response.status));
  2480. }
  2481. }
  2482. function sendXMLHttpRequest(method, { url }, headers) {
  2483. return new Promise$1((resolve, reject) => {
  2484. const request = new XMLHttpRequest();
  2485. request.addEventListener("load", () => {
  2486. if (request.status < 400) {
  2487. const headers = [];
  2488. request.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(header => {
  2489. const splitHeader = header.trim().split(/\s*:\s*/);
  2490. splitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());
  2491. headers.push(splitHeader);
  2492. });
  2493. resolve({
  2494. status: request.status,
  2495. arrayBuffer: () => request.response,
  2496. headers: new Map$2(headers)
  2497. });
  2498. } else {
  2499. reject(request.status == 416 ? new Error$1(ERR_HTTP_RANGE) : new Error$1(ERR_HTTP_STATUS + (request.statusText || request.status)));
  2500. }
  2501. }, false);
  2502. request.addEventListener("error", event => reject(event.detail ? event.detail.error : new Error$1("Network error")), false);
  2503. request.open(method, url);
  2504. if (headers) {
  2505. for (const entry of Object$1.entries(headers)) {
  2506. request.setRequestHeader(entry[0], entry[1]);
  2507. }
  2508. }
  2509. request.responseType = "arraybuffer";
  2510. request.send();
  2511. });
  2512. }
  2513. class HttpReader extends Reader {
  2514. constructor(url, options = {}) {
  2515. super();
  2516. Object$1.assign(this, {
  2517. url,
  2518. reader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)
  2519. });
  2520. }
  2521. set size(value) {
  2522. // ignored
  2523. }
  2524. get size() {
  2525. return this.reader.size;
  2526. }
  2527. async init() {
  2528. await this.reader.init();
  2529. super.init();
  2530. }
  2531. readUint8Array(index, length) {
  2532. return this.reader.readUint8Array(index, length);
  2533. }
  2534. }
  2535. class HttpRangeReader extends HttpReader {
  2536. constructor(url, options = {}) {
  2537. options.useRangeHeader = true;
  2538. super(url, options);
  2539. }
  2540. }
  2541. class Uint8ArrayReader extends Reader {
  2542. constructor(array) {
  2543. super();
  2544. Object$1.assign(this, {
  2545. array,
  2546. size: array.length
  2547. });
  2548. }
  2549. readUint8Array(index, length) {
  2550. return this.array.slice(index, index + length);
  2551. }
  2552. }
  2553. class Uint8ArrayWriter extends Writer {
  2554. init(initSize = 0) {
  2555. Object$1.assign(this, {
  2556. offset: 0,
  2557. array: new Uint8Array$1(initSize)
  2558. });
  2559. super.init();
  2560. }
  2561. writeUint8Array(array) {
  2562. const writer = this;
  2563. if (writer.offset + array.length > writer.array.length) {
  2564. const previousArray = writer.array;
  2565. writer.array = new Uint8Array$1(previousArray.length + array.length);
  2566. writer.array.set(previousArray);
  2567. }
  2568. writer.array.set(array, writer.offset);
  2569. writer.offset += array.length;
  2570. }
  2571. getData() {
  2572. return this.array;
  2573. }
  2574. }
  2575. class SplitDataReader extends Reader {
  2576. constructor(readers) {
  2577. super();
  2578. this.readers = readers;
  2579. }
  2580. async init() {
  2581. const reader = this;
  2582. const { readers } = reader;
  2583. reader.lastDiskNumber = 0;
  2584. reader.lastDiskOffset = 0;
  2585. await Promise$1.all(readers.map(async (diskReader, indexDiskReader) => {
  2586. await diskReader.init();
  2587. if (indexDiskReader != readers.length - 1) {
  2588. reader.lastDiskOffset += diskReader.size;
  2589. }
  2590. reader.size += diskReader.size;
  2591. }));
  2592. super.init();
  2593. }
  2594. async readUint8Array(offset, length, diskNumber = 0) {
  2595. const reader = this;
  2596. const { readers } = this;
  2597. let result;
  2598. let currentDiskNumber = diskNumber;
  2599. if (currentDiskNumber == -1) {
  2600. currentDiskNumber = readers.length - 1;
  2601. }
  2602. let currentReaderOffset = offset;
  2603. while (currentReaderOffset >= readers[currentDiskNumber].size) {
  2604. currentReaderOffset -= readers[currentDiskNumber].size;
  2605. currentDiskNumber++;
  2606. }
  2607. const currentReader = readers[currentDiskNumber];
  2608. const currentReaderSize = currentReader.size;
  2609. if (currentReaderOffset + length <= currentReaderSize) {
  2610. result = await readUint8Array(currentReader, currentReaderOffset, length);
  2611. } else {
  2612. const chunkLength = currentReaderSize - currentReaderOffset;
  2613. result = new Uint8Array$1(length);
  2614. result.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));
  2615. result.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);
  2616. }
  2617. reader.lastDiskNumber = Math$1.max(currentDiskNumber, reader.lastDiskNumber);
  2618. return result;
  2619. }
  2620. }
  2621. class SplitDataWriter extends Stream {
  2622. constructor(writerGenerator, maxSize = 4294967295) {
  2623. super();
  2624. const zipWriter = this;
  2625. Object$1.assign(zipWriter, {
  2626. diskNumber: 0,
  2627. diskOffset: 0,
  2628. size: 0,
  2629. maxSize,
  2630. availableSize: maxSize
  2631. });
  2632. let diskSourceWriter, diskWritable, diskWriter;
  2633. const writable = new WritableStream({
  2634. async write(chunk) {
  2635. const { availableSize } = zipWriter;
  2636. if (!diskWriter) {
  2637. const { value, done } = await writerGenerator.next();
  2638. if (done && !value) {
  2639. throw new Error$1(ERR_ITERATOR_COMPLETED_TOO_SOON);
  2640. } else {
  2641. diskSourceWriter = value;
  2642. diskSourceWriter.size = 0;
  2643. if (diskSourceWriter.maxSize) {
  2644. zipWriter.maxSize = diskSourceWriter.maxSize;
  2645. }
  2646. zipWriter.availableSize = zipWriter.maxSize;
  2647. await initStream(diskSourceWriter);
  2648. diskWritable = value.writable;
  2649. diskWriter = diskWritable.getWriter();
  2650. }
  2651. await this.write(chunk);
  2652. } else if (chunk.length >= availableSize) {
  2653. await writeChunk(chunk.slice(0, availableSize));
  2654. await closeDisk();
  2655. zipWriter.diskOffset += diskSourceWriter.size;
  2656. zipWriter.diskNumber++;
  2657. diskWriter = null;
  2658. await this.write(chunk.slice(availableSize));
  2659. } else {
  2660. await writeChunk(chunk);
  2661. }
  2662. },
  2663. async close() {
  2664. await diskWriter.ready;
  2665. await closeDisk();
  2666. }
  2667. });
  2668. Object$1.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {
  2669. get() {
  2670. return writable;
  2671. }
  2672. });
  2673. async function writeChunk(chunk) {
  2674. const chunkLength = chunk.length;
  2675. if (chunkLength) {
  2676. await diskWriter.ready;
  2677. await diskWriter.write(chunk);
  2678. diskSourceWriter.size += chunkLength;
  2679. zipWriter.size += chunkLength;
  2680. zipWriter.availableSize -= chunkLength;
  2681. }
  2682. }
  2683. async function closeDisk() {
  2684. diskWritable.size = diskSourceWriter.size;
  2685. await diskWriter.close();
  2686. }
  2687. }
  2688. }
  2689. function isHttpFamily(url) {
  2690. const { baseURL } = getConfiguration();
  2691. const { protocol } = new URL$3(url, baseURL);
  2692. return protocol == "http:" || protocol == "https:";
  2693. }
  2694. async function initStream(stream, initSize) {
  2695. if (stream.init && !stream.initialized) {
  2696. await stream.init(initSize);
  2697. }
  2698. }
  2699. function initReader(reader) {
  2700. if (Array$1.isArray(reader)) {
  2701. reader = new SplitDataReader(reader);
  2702. }
  2703. if (reader instanceof ReadableStream) {
  2704. reader = {
  2705. readable: reader
  2706. };
  2707. }
  2708. return reader;
  2709. }
  2710. function initWriter(writer) {
  2711. if (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE$1) {
  2712. writer = new SplitDataWriter(writer);
  2713. }
  2714. if (writer instanceof WritableStream) {
  2715. writer = {
  2716. writable: writer
  2717. };
  2718. }
  2719. const { writable } = writer;
  2720. if (writable.size === UNDEFINED_VALUE) {
  2721. writable.size = 0;
  2722. }
  2723. const splitZipFile = writer instanceof SplitDataWriter;
  2724. if (!splitZipFile) {
  2725. Object$1.assign(writer, {
  2726. diskNumber: 0,
  2727. diskOffset: 0,
  2728. availableSize: Infinity,
  2729. maxSize: Infinity
  2730. });
  2731. }
  2732. return writer;
  2733. }
  2734. function readUint8Array(reader, offset, size, diskNumber) {
  2735. return reader.readUint8Array(offset, size, diskNumber);
  2736. }
  2737. const SplitZipReader = SplitDataReader;
  2738. const SplitZipWriter = SplitDataWriter;
  2739. /*
  2740. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2741. Redistribution and use in source and binary forms, with or without
  2742. modification, are permitted provided that the following conditions are met:
  2743. 1. Redistributions of source code must retain the above copyright notice,
  2744. this list of conditions and the following disclaimer.
  2745. 2. Redistributions in binary form must reproduce the above copyright
  2746. notice, this list of conditions and the following disclaimer in
  2747. the documentation and/or other materials provided with the distribution.
  2748. 3. The names of the authors may not be used to endorse or promote products
  2749. derived from this software without specific prior written permission.
  2750. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2751. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2752. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2753. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2754. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2755. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2756. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2757. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2758. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2759. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2760. */
  2761. /* global TextDecoder */
  2762. const CP437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");
  2763. const VALID_CP437 = CP437.length == 256;
  2764. function decodeCP437(stringValue) {
  2765. if (VALID_CP437) {
  2766. let result = "";
  2767. for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {
  2768. result += CP437[stringValue[indexCharacter]];
  2769. }
  2770. return result;
  2771. } else {
  2772. return new TextDecoder$1().decode(stringValue);
  2773. }
  2774. }
  2775. /*
  2776. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2777. Redistribution and use in source and binary forms, with or without
  2778. modification, are permitted provided that the following conditions are met:
  2779. 1. Redistributions of source code must retain the above copyright notice,
  2780. this list of conditions and the following disclaimer.
  2781. 2. Redistributions in binary form must reproduce the above copyright
  2782. notice, this list of conditions and the following disclaimer in
  2783. the documentation and/or other materials provided with the distribution.
  2784. 3. The names of the authors may not be used to endorse or promote products
  2785. derived from this software without specific prior written permission.
  2786. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2787. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2788. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2789. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2790. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2791. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2792. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2793. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2794. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2795. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2796. */
  2797. function decodeText(value, encoding) {
  2798. if (encoding && encoding.trim().toLowerCase() == "cp437") {
  2799. return decodeCP437(value);
  2800. } else {
  2801. return new TextDecoder$1(encoding).decode(value);
  2802. }
  2803. }
  2804. /*
  2805. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2806. Redistribution and use in source and binary forms, with or without
  2807. modification, are permitted provided that the following conditions are met:
  2808. 1. Redistributions of source code must retain the above copyright notice,
  2809. this list of conditions and the following disclaimer.
  2810. 2. Redistributions in binary form must reproduce the above copyright
  2811. notice, this list of conditions and the following disclaimer in
  2812. the documentation and/or other materials provided with the distribution.
  2813. 3. The names of the authors may not be used to endorse or promote products
  2814. derived from this software without specific prior written permission.
  2815. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2816. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2817. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2818. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2819. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2820. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2821. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2822. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2823. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2824. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2825. */
  2826. const PROPERTY_NAME_FILENAME = "filename";
  2827. const PROPERTY_NAME_RAW_FILENAME = "rawFilename";
  2828. const PROPERTY_NAME_COMMENT = "comment";
  2829. const PROPERTY_NAME_RAW_COMMENT = "rawComment";
  2830. const PROPERTY_NAME_UNCOMPPRESSED_SIZE = "uncompressedSize";
  2831. const PROPERTY_NAME_COMPPRESSED_SIZE = "compressedSize";
  2832. const PROPERTY_NAME_OFFSET = "offset";
  2833. const PROPERTY_NAME_DISK_NUMBER_START = "diskNumberStart";
  2834. const PROPERTY_NAME_LAST_MODIFICATION_DATE = "lastModDate";
  2835. const PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = "rawLastModDate";
  2836. const PROPERTY_NAME_LAST_ACCESS_DATE = "lastAccessDate";
  2837. const PROPERTY_NAME_RAW_LAST_ACCESS_DATE = "rawLastAccessDate";
  2838. const PROPERTY_NAME_CREATION_DATE = "creationDate";
  2839. const PROPERTY_NAME_RAW_CREATION_DATE = "rawCreationDate";
  2840. const PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = "internalFileAttribute";
  2841. const PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = "externalFileAttribute";
  2842. const PROPERTY_NAME_MS_DOS_COMPATIBLE = "msDosCompatible";
  2843. const PROPERTY_NAME_ZIP64 = "zip64";
  2844. const PROPERTY_NAMES = [
  2845. PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,
  2846. PROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,
  2847. PROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,
  2848. PROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,
  2849. PROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,
  2850. "directory", "bitFlag", "encrypted", "signature", "filenameUTF8", "commentUTF8", "compressionMethod", "version", "versionMadeBy",
  2851. "extraField", "rawExtraField", "extraFieldZip64", "extraFieldUnicodePath", "extraFieldUnicodeComment", "extraFieldAES", "extraFieldNTFS",
  2852. "extraFieldExtendedTimestamp"];
  2853. class Entry {
  2854. constructor(data) {
  2855. PROPERTY_NAMES.forEach(name => this[name] = data[name]);
  2856. }
  2857. }
  2858. /*
  2859. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  2860. Redistribution and use in source and binary forms, with or without
  2861. modification, are permitted provided that the following conditions are met:
  2862. 1. Redistributions of source code must retain the above copyright notice,
  2863. this list of conditions and the following disclaimer.
  2864. 2. Redistributions in binary form must reproduce the above copyright
  2865. notice, this list of conditions and the following disclaimer in
  2866. the documentation and/or other materials provided with the distribution.
  2867. 3. The names of the authors may not be used to endorse or promote products
  2868. derived from this software without specific prior written permission.
  2869. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  2870. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  2871. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  2872. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  2873. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  2874. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  2875. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  2876. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  2877. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  2878. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2879. */
  2880. const ERR_BAD_FORMAT = "File format is not recognized";
  2881. const ERR_EOCDR_NOT_FOUND = "End of central directory not found";
  2882. const ERR_EOCDR_ZIP64_NOT_FOUND = "End of Zip64 central directory not found";
  2883. const ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = "End of Zip64 central directory locator not found";
  2884. const ERR_CENTRAL_DIRECTORY_NOT_FOUND = "Central directory header not found";
  2885. const ERR_LOCAL_FILE_HEADER_NOT_FOUND = "Local file header not found";
  2886. const ERR_EXTRAFIELD_ZIP64_NOT_FOUND = "Zip64 extra field not found";
  2887. const ERR_ENCRYPTED = "File contains encrypted entry";
  2888. const ERR_UNSUPPORTED_ENCRYPTION = "Encryption method not supported";
  2889. const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported";
  2890. const ERR_SPLIT_ZIP_FILE = "Split zip file";
  2891. const CHARSET_UTF8 = "utf-8";
  2892. const CHARSET_CP437 = "cp437";
  2893. const ZIP64_PROPERTIES = [
  2894. [PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],
  2895. [PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],
  2896. [PROPERTY_NAME_OFFSET, MAX_32_BITS],
  2897. [PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]
  2898. ];
  2899. const ZIP64_EXTRACTION = {
  2900. [MAX_16_BITS]: {
  2901. getValue: getUint32,
  2902. bytes: 4
  2903. },
  2904. [MAX_32_BITS]: {
  2905. getValue: getBigUint64,
  2906. bytes: 8
  2907. }
  2908. };
  2909. class ZipReader {
  2910. constructor(reader, options = {}) {
  2911. Object$1.assign(this, {
  2912. reader: initReader(reader),
  2913. options,
  2914. config: getConfiguration()
  2915. });
  2916. }
  2917. async* getEntriesGenerator(options = {}) {
  2918. const zipReader = this;
  2919. let { reader } = zipReader;
  2920. const { config } = zipReader;
  2921. await initStream(reader);
  2922. if (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {
  2923. reader = new BlobReader(await new Response(reader.readable).blob());
  2924. await initStream(reader);
  2925. }
  2926. if (reader.size < END_OF_CENTRAL_DIR_LENGTH) {
  2927. throw new Error$1(ERR_BAD_FORMAT);
  2928. }
  2929. reader.chunkSize = getChunkSize(config);
  2930. const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);
  2931. if (!endOfDirectoryInfo) {
  2932. const signatureArray = await readUint8Array(reader, 0, 4);
  2933. const signatureView = getDataView$1(signatureArray);
  2934. if (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {
  2935. throw new Error$1(ERR_SPLIT_ZIP_FILE);
  2936. } else {
  2937. throw new Error$1(ERR_EOCDR_NOT_FOUND);
  2938. }
  2939. }
  2940. const endOfDirectoryView = getDataView$1(endOfDirectoryInfo);
  2941. let directoryDataLength = getUint32(endOfDirectoryView, 12);
  2942. let directoryDataOffset = getUint32(endOfDirectoryView, 16);
  2943. const commentOffset = endOfDirectoryInfo.offset;
  2944. const commentLength = getUint16(endOfDirectoryView, 20);
  2945. const appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;
  2946. let lastDiskNumber = getUint16(endOfDirectoryView, 4);
  2947. const expectedLastDiskNumber = reader.lastDiskNumber || 0;
  2948. let diskNumber = getUint16(endOfDirectoryView, 6);
  2949. let filesLength = getUint16(endOfDirectoryView, 8);
  2950. let prependedDataLength = 0;
  2951. let startOffset = 0;
  2952. if (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {
  2953. const endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);
  2954. const endOfDirectoryLocatorView = getDataView$1(endOfDirectoryLocatorArray);
  2955. if (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {
  2956. throw new Error$1(ERR_EOCDR_ZIP64_NOT_FOUND);
  2957. }
  2958. directoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);
  2959. let endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);
  2960. let endOfDirectoryView = getDataView$1(endOfDirectoryArray);
  2961. const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;
  2962. if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {
  2963. const originalDirectoryDataOffset = directoryDataOffset;
  2964. directoryDataOffset = expectedDirectoryDataOffset;
  2965. prependedDataLength = directoryDataOffset - originalDirectoryDataOffset;
  2966. endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);
  2967. endOfDirectoryView = getDataView$1(endOfDirectoryArray);
  2968. }
  2969. if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {
  2970. throw new Error$1(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);
  2971. }
  2972. if (lastDiskNumber == MAX_16_BITS) {
  2973. lastDiskNumber = getUint32(endOfDirectoryView, 16);
  2974. }
  2975. if (diskNumber == MAX_16_BITS) {
  2976. diskNumber = getUint32(endOfDirectoryView, 20);
  2977. }
  2978. if (filesLength == MAX_16_BITS) {
  2979. filesLength = getBigUint64(endOfDirectoryView, 32);
  2980. }
  2981. if (directoryDataLength == MAX_32_BITS) {
  2982. directoryDataLength = getBigUint64(endOfDirectoryView, 40);
  2983. }
  2984. directoryDataOffset -= directoryDataLength;
  2985. }
  2986. if (directoryDataOffset >= reader.size) {
  2987. prependedDataLength = reader.size - directoryDataOffset - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;
  2988. directoryDataOffset = reader.size - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;
  2989. }
  2990. if (expectedLastDiskNumber != lastDiskNumber) {
  2991. throw new Error$1(ERR_SPLIT_ZIP_FILE);
  2992. }
  2993. if (directoryDataOffset < 0) {
  2994. throw new Error$1(ERR_BAD_FORMAT);
  2995. }
  2996. let offset = 0;
  2997. let directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);
  2998. let directoryView = getDataView$1(directoryArray);
  2999. if (directoryDataLength) {
  3000. const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;
  3001. if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {
  3002. const originalDirectoryDataOffset = directoryDataOffset;
  3003. directoryDataOffset = expectedDirectoryDataOffset;
  3004. prependedDataLength += directoryDataOffset - originalDirectoryDataOffset;
  3005. directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);
  3006. directoryView = getDataView$1(directoryArray);
  3007. }
  3008. }
  3009. const expectedDirectoryDataLength = endOfDirectoryInfo.offset - directoryDataOffset - (reader.lastDiskOffset || 0);
  3010. if (directoryDataLength != expectedDirectoryDataLength && expectedDirectoryDataLength >= 0) {
  3011. directoryDataLength = expectedDirectoryDataLength;
  3012. directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);
  3013. directoryView = getDataView$1(directoryArray);
  3014. }
  3015. if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {
  3016. throw new Error$1(ERR_BAD_FORMAT);
  3017. }
  3018. const filenameEncoding = getOptionValue$1(zipReader, options, "filenameEncoding");
  3019. const commentEncoding = getOptionValue$1(zipReader, options, "commentEncoding");
  3020. for (let indexFile = 0; indexFile < filesLength; indexFile++) {
  3021. const fileEntry = new ZipEntry(reader, config, zipReader.options);
  3022. if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {
  3023. throw new Error$1(ERR_CENTRAL_DIRECTORY_NOT_FOUND);
  3024. }
  3025. readCommonHeader(fileEntry, directoryView, offset + 6);
  3026. const languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);
  3027. const filenameOffset = offset + 46;
  3028. const extraFieldOffset = filenameOffset + fileEntry.filenameLength;
  3029. const commentOffset = extraFieldOffset + fileEntry.extraFieldLength;
  3030. const versionMadeBy = getUint16(directoryView, offset + 4);
  3031. const msDosCompatible = (versionMadeBy & 0) == 0;
  3032. const rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);
  3033. const commentLength = getUint16(directoryView, offset + 32);
  3034. const endOffset = commentOffset + commentLength;
  3035. const rawComment = directoryArray.subarray(commentOffset, endOffset);
  3036. const filenameUTF8 = languageEncodingFlag;
  3037. const commentUTF8 = languageEncodingFlag;
  3038. const directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);
  3039. const offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;
  3040. Object$1.assign(fileEntry, {
  3041. versionMadeBy,
  3042. msDosCompatible,
  3043. compressedSize: 0,
  3044. uncompressedSize: 0,
  3045. commentLength,
  3046. directory,
  3047. offset: offsetFileEntry,
  3048. diskNumberStart: getUint16(directoryView, offset + 34),
  3049. internalFileAttribute: getUint16(directoryView, offset + 36),
  3050. externalFileAttribute: getUint32(directoryView, offset + 38),
  3051. rawFilename,
  3052. filenameUTF8,
  3053. commentUTF8,
  3054. rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)
  3055. });
  3056. const [filename, comment] = await Promise$1.all([
  3057. decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),
  3058. decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)
  3059. ]);
  3060. Object$1.assign(fileEntry, {
  3061. rawComment,
  3062. filename,
  3063. comment,
  3064. directory: directory || filename.endsWith(DIRECTORY_SIGNATURE)
  3065. });
  3066. startOffset = Math$1.max(offsetFileEntry, startOffset);
  3067. await readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);
  3068. const entry = new Entry(fileEntry);
  3069. entry.getData = (writer, options) => fileEntry.getData(writer, entry, options);
  3070. offset = endOffset;
  3071. const { onprogress } = options;
  3072. if (onprogress) {
  3073. try {
  3074. await onprogress(indexFile + 1, filesLength, new Entry(fileEntry));
  3075. } catch (_error) {
  3076. // ignored
  3077. }
  3078. }
  3079. yield entry;
  3080. }
  3081. const extractPrependedData = getOptionValue$1(zipReader, options, "extractPrependedData");
  3082. const extractAppendedData = getOptionValue$1(zipReader, options, "extractAppendedData");
  3083. if (extractPrependedData) {
  3084. zipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array$1();
  3085. }
  3086. zipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array$1();
  3087. if (extractAppendedData) {
  3088. zipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array$1();
  3089. }
  3090. return true;
  3091. }
  3092. async getEntries(options = {}) {
  3093. const entries = [];
  3094. for await (const entry of this.getEntriesGenerator(options)) {
  3095. entries.push(entry);
  3096. }
  3097. return entries;
  3098. }
  3099. async close() {
  3100. }
  3101. }
  3102. class ZipEntry {
  3103. constructor(reader, config, options) {
  3104. Object$1.assign(this, {
  3105. reader,
  3106. config,
  3107. options
  3108. });
  3109. }
  3110. async getData(writer, fileEntry, options = {}) {
  3111. const zipEntry = this;
  3112. const {
  3113. reader,
  3114. offset,
  3115. diskNumberStart,
  3116. extraFieldAES,
  3117. compressionMethod,
  3118. config,
  3119. bitFlag,
  3120. signature,
  3121. rawLastModDate,
  3122. uncompressedSize,
  3123. compressedSize
  3124. } = zipEntry;
  3125. const localDirectory = fileEntry.localDirectory = {};
  3126. const dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);
  3127. const dataView = getDataView$1(dataArray);
  3128. let password = getOptionValue$1(zipEntry, options, "password");
  3129. password = password && password.length && password;
  3130. if (extraFieldAES) {
  3131. if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {
  3132. throw new Error$1(ERR_UNSUPPORTED_COMPRESSION);
  3133. }
  3134. }
  3135. if (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {
  3136. throw new Error$1(ERR_UNSUPPORTED_COMPRESSION);
  3137. }
  3138. if (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {
  3139. throw new Error$1(ERR_LOCAL_FILE_HEADER_NOT_FOUND);
  3140. }
  3141. readCommonHeader(localDirectory, dataView, 4);
  3142. localDirectory.rawExtraField = localDirectory.extraFieldLength ?
  3143. await readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :
  3144. new Uint8Array$1();
  3145. await readCommonFooter(zipEntry, localDirectory, dataView, 4, true);
  3146. Object$1.assign(fileEntry, {
  3147. lastAccessDate: localDirectory.lastAccessDate,
  3148. creationDate: localDirectory.creationDate
  3149. });
  3150. const encrypted = zipEntry.encrypted && localDirectory.encrypted;
  3151. const zipCrypto = encrypted && !extraFieldAES;
  3152. if (encrypted) {
  3153. if (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {
  3154. throw new Error$1(ERR_UNSUPPORTED_ENCRYPTION);
  3155. } else if (!password) {
  3156. throw new Error$1(ERR_ENCRYPTED);
  3157. }
  3158. }
  3159. const dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;
  3160. const size = compressedSize;
  3161. const readable = reader.readable;
  3162. Object$1.assign(readable, {
  3163. diskNumberStart,
  3164. offset: dataOffset,
  3165. size
  3166. });
  3167. const signal = getOptionValue$1(zipEntry, options, "signal");
  3168. const checkPasswordOnly = getOptionValue$1(zipEntry, options, "checkPasswordOnly");
  3169. if (checkPasswordOnly) {
  3170. writer = new WritableStream();
  3171. }
  3172. writer = initWriter(writer);
  3173. await initStream(writer, uncompressedSize);
  3174. const { writable } = writer;
  3175. const { onstart, onprogress, onend } = options;
  3176. const workerOptions = {
  3177. options: {
  3178. codecType: CODEC_INFLATE,
  3179. password,
  3180. zipCrypto,
  3181. encryptionStrength: extraFieldAES && extraFieldAES.strength,
  3182. signed: getOptionValue$1(zipEntry, options, "checkSignature"),
  3183. passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),
  3184. signature,
  3185. compressed: compressionMethod != 0,
  3186. encrypted,
  3187. useWebWorkers: getOptionValue$1(zipEntry, options, "useWebWorkers"),
  3188. useCompressionStream: getOptionValue$1(zipEntry, options, "useCompressionStream"),
  3189. transferStreams: getOptionValue$1(zipEntry, options, "transferStreams"),
  3190. checkPasswordOnly
  3191. },
  3192. config,
  3193. streamOptions: { signal, size, onstart, onprogress, onend }
  3194. };
  3195. let outputSize = 0;
  3196. try {
  3197. ({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));
  3198. } catch (error) {
  3199. if (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {
  3200. throw error;
  3201. }
  3202. } finally {
  3203. const preventClose = getOptionValue$1(zipEntry, options, "preventClose");
  3204. writable.size += outputSize;
  3205. if (!preventClose && !writable.locked) {
  3206. await writable.getWriter().close();
  3207. }
  3208. }
  3209. return checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable;
  3210. }
  3211. }
  3212. function readCommonHeader(directory, dataView, offset) {
  3213. const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);
  3214. const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;
  3215. const rawLastModDate = getUint32(dataView, offset + 6);
  3216. Object$1.assign(directory, {
  3217. encrypted,
  3218. version: getUint16(dataView, offset),
  3219. bitFlag: {
  3220. level: (rawBitFlag & BITFLAG_LEVEL) >> 1,
  3221. dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,
  3222. languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG
  3223. },
  3224. rawLastModDate,
  3225. lastModDate: getDate(rawLastModDate),
  3226. filenameLength: getUint16(dataView, offset + 22),
  3227. extraFieldLength: getUint16(dataView, offset + 24)
  3228. });
  3229. }
  3230. async function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) {
  3231. const { rawExtraField } = directory;
  3232. const extraField = directory.extraField = new Map$2();
  3233. const rawExtraFieldView = getDataView$1(new Uint8Array$1(rawExtraField));
  3234. let offsetExtraField = 0;
  3235. try {
  3236. while (offsetExtraField < rawExtraField.length) {
  3237. const type = getUint16(rawExtraFieldView, offsetExtraField);
  3238. const size = getUint16(rawExtraFieldView, offsetExtraField + 2);
  3239. extraField.set(type, {
  3240. type,
  3241. data: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)
  3242. });
  3243. offsetExtraField += 4 + size;
  3244. }
  3245. } catch (_error) {
  3246. // ignored
  3247. }
  3248. const compressionMethod = getUint16(dataView, offset + 4);
  3249. Object$1.assign(directory, {
  3250. signature: getUint32(dataView, offset + 10),
  3251. uncompressedSize: getUint32(dataView, offset + 18),
  3252. compressedSize: getUint32(dataView, offset + 14)
  3253. });
  3254. const extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);
  3255. if (extraFieldZip64) {
  3256. readExtraFieldZip64(extraFieldZip64, directory);
  3257. directory.extraFieldZip64 = extraFieldZip64;
  3258. }
  3259. const extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);
  3260. if (extraFieldUnicodePath) {
  3261. await readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);
  3262. directory.extraFieldUnicodePath = extraFieldUnicodePath;
  3263. }
  3264. const extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);
  3265. if (extraFieldUnicodeComment) {
  3266. await readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);
  3267. directory.extraFieldUnicodeComment = extraFieldUnicodeComment;
  3268. }
  3269. const extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);
  3270. if (extraFieldAES) {
  3271. readExtraFieldAES(extraFieldAES, directory, compressionMethod);
  3272. directory.extraFieldAES = extraFieldAES;
  3273. } else {
  3274. directory.compressionMethod = compressionMethod;
  3275. }
  3276. const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);
  3277. if (extraFieldNTFS) {
  3278. readExtraFieldNTFS(extraFieldNTFS, directory);
  3279. directory.extraFieldNTFS = extraFieldNTFS;
  3280. }
  3281. const extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);
  3282. if (extraFieldExtendedTimestamp) {
  3283. readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory);
  3284. directory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;
  3285. }
  3286. const extraFieldUSDZ = extraField.get(EXTRAFIELD_TYPE_USDZ);
  3287. if (extraFieldUSDZ) {
  3288. directory.extraFieldUSDZ = extraFieldUSDZ;
  3289. }
  3290. }
  3291. function readExtraFieldZip64(extraFieldZip64, directory) {
  3292. directory.zip64 = true;
  3293. const extraFieldView = getDataView$1(extraFieldZip64.data);
  3294. const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);
  3295. for (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {
  3296. const [propertyName, max] = missingProperties[indexMissingProperty];
  3297. if (directory[propertyName] == max) {
  3298. const extraction = ZIP64_EXTRACTION[max];
  3299. directory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);
  3300. offset += extraction.bytes;
  3301. } else if (extraFieldZip64[propertyName]) {
  3302. throw new Error$1(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);
  3303. }
  3304. }
  3305. }
  3306. async function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {
  3307. const extraFieldView = getDataView$1(extraFieldUnicode.data);
  3308. const crc32 = new Crc32();
  3309. crc32.append(fileEntry[rawPropertyName]);
  3310. const dataViewSignature = getDataView$1(new Uint8Array$1(4));
  3311. dataViewSignature.setUint32(0, crc32.get(), true);
  3312. const signature = getUint32(extraFieldView, 1);
  3313. Object$1.assign(extraFieldUnicode, {
  3314. version: getUint8(extraFieldView, 0),
  3315. [propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),
  3316. valid: !fileEntry.bitFlag.languageEncodingFlag && signature == getUint32(dataViewSignature, 0)
  3317. });
  3318. if (extraFieldUnicode.valid) {
  3319. directory[propertyName] = extraFieldUnicode[propertyName];
  3320. directory[propertyName + "UTF8"] = true;
  3321. }
  3322. }
  3323. function readExtraFieldAES(extraFieldAES, directory, compressionMethod) {
  3324. const extraFieldView = getDataView$1(extraFieldAES.data);
  3325. const strength = getUint8(extraFieldView, 4);
  3326. Object$1.assign(extraFieldAES, {
  3327. vendorVersion: getUint8(extraFieldView, 0),
  3328. vendorId: getUint8(extraFieldView, 2),
  3329. strength,
  3330. originalCompressionMethod: compressionMethod,
  3331. compressionMethod: getUint16(extraFieldView, 5)
  3332. });
  3333. directory.compressionMethod = extraFieldAES.compressionMethod;
  3334. }
  3335. function readExtraFieldNTFS(extraFieldNTFS, directory) {
  3336. const extraFieldView = getDataView$1(extraFieldNTFS.data);
  3337. let offsetExtraField = 4;
  3338. let tag1Data;
  3339. try {
  3340. while (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {
  3341. const tagValue = getUint16(extraFieldView, offsetExtraField);
  3342. const attributeSize = getUint16(extraFieldView, offsetExtraField + 2);
  3343. if (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {
  3344. tag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);
  3345. }
  3346. offsetExtraField += 4 + attributeSize;
  3347. }
  3348. } catch (_error) {
  3349. // ignored
  3350. }
  3351. try {
  3352. if (tag1Data && tag1Data.length == 24) {
  3353. const tag1View = getDataView$1(tag1Data);
  3354. const rawLastModDate = tag1View.getBigUint64(0, true);
  3355. const rawLastAccessDate = tag1View.getBigUint64(8, true);
  3356. const rawCreationDate = tag1View.getBigUint64(16, true);
  3357. Object$1.assign(extraFieldNTFS, {
  3358. rawLastModDate,
  3359. rawLastAccessDate,
  3360. rawCreationDate
  3361. });
  3362. const lastModDate = getDateNTFS(rawLastModDate);
  3363. const lastAccessDate = getDateNTFS(rawLastAccessDate);
  3364. const creationDate = getDateNTFS(rawCreationDate);
  3365. const extraFieldData = { lastModDate, lastAccessDate, creationDate };
  3366. Object$1.assign(extraFieldNTFS, extraFieldData);
  3367. Object$1.assign(directory, extraFieldData);
  3368. }
  3369. } catch (_error) {
  3370. // ignored
  3371. }
  3372. }
  3373. function readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) {
  3374. const extraFieldView = getDataView$1(extraFieldExtendedTimestamp.data);
  3375. const flags = getUint8(extraFieldView, 0);
  3376. const timeProperties = [];
  3377. const timeRawProperties = [];
  3378. if (localDirectory) {
  3379. if ((flags & 0x1) == 0x1) {
  3380. timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);
  3381. timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);
  3382. }
  3383. if ((flags & 0x2) == 0x2) {
  3384. timeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);
  3385. timeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);
  3386. }
  3387. if ((flags & 0x4) == 0x4) {
  3388. timeProperties.push(PROPERTY_NAME_CREATION_DATE);
  3389. timeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);
  3390. }
  3391. } else if (extraFieldExtendedTimestamp.data.length >= 5) {
  3392. timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);
  3393. timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);
  3394. }
  3395. let offset = 1;
  3396. timeProperties.forEach((propertyName, indexProperty) => {
  3397. if (extraFieldExtendedTimestamp.data.length >= offset + 4) {
  3398. const time = getUint32(extraFieldView, offset);
  3399. directory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date$1(time * 1000);
  3400. const rawPropertyName = timeRawProperties[indexProperty];
  3401. extraFieldExtendedTimestamp[rawPropertyName] = time;
  3402. }
  3403. offset += 4;
  3404. });
  3405. }
  3406. async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {
  3407. const signatureArray = new Uint8Array$1(4);
  3408. const signatureView = getDataView$1(signatureArray);
  3409. setUint32$1(signatureView, 0, signature);
  3410. const maximumBytes = minimumBytes + maximumLength;
  3411. return (await seek(minimumBytes)) || await seek(Math$1.min(maximumBytes, startOffset));
  3412. async function seek(length) {
  3413. const offset = startOffset - length;
  3414. const bytes = await readUint8Array(reader, offset, length);
  3415. for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {
  3416. if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&
  3417. bytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {
  3418. return {
  3419. offset: offset + indexByte,
  3420. buffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer
  3421. };
  3422. }
  3423. }
  3424. }
  3425. }
  3426. function getOptionValue$1(zipReader, options, name) {
  3427. return options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];
  3428. }
  3429. function getDate(timeRaw) {
  3430. const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;
  3431. try {
  3432. return new Date$1(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);
  3433. } catch (_error) {
  3434. // ignored
  3435. }
  3436. }
  3437. function getDateNTFS(timeRaw) {
  3438. return new Date$1((Number$1((timeRaw / BigInt(10000)) - BigInt(11644473600000))));
  3439. }
  3440. function getUint8(view, offset) {
  3441. return view.getUint8(offset);
  3442. }
  3443. function getUint16(view, offset) {
  3444. return view.getUint16(offset, true);
  3445. }
  3446. function getUint32(view, offset) {
  3447. return view.getUint32(offset, true);
  3448. }
  3449. function getBigUint64(view, offset) {
  3450. return Number$1(view.getBigUint64(offset, true));
  3451. }
  3452. function setUint32$1(view, offset, value) {
  3453. view.setUint32(offset, value, true);
  3454. }
  3455. function getDataView$1(array) {
  3456. return new DataView$1(array.buffer);
  3457. }
  3458. /*
  3459. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  3460. Redistribution and use in source and binary forms, with or without
  3461. modification, are permitted provided that the following conditions are met:
  3462. 1. Redistributions of source code must retain the above copyright notice,
  3463. this list of conditions and the following disclaimer.
  3464. 2. Redistributions in binary form must reproduce the above copyright
  3465. notice, this list of conditions and the following disclaimer in
  3466. the documentation and/or other materials provided with the distribution.
  3467. 3. The names of the authors may not be used to endorse or promote products
  3468. derived from this software without specific prior written permission.
  3469. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  3470. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  3471. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  3472. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  3473. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  3474. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  3475. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  3476. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  3477. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  3478. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3479. */
  3480. const ERR_DUPLICATED_NAME = "File already exists";
  3481. const ERR_INVALID_COMMENT = "Zip file comment exceeds 64KB";
  3482. const ERR_INVALID_ENTRY_COMMENT = "File entry comment exceeds 64KB";
  3483. const ERR_INVALID_ENTRY_NAME = "File entry name exceeds 64KB";
  3484. const ERR_INVALID_VERSION = "Version exceeds 65535";
  3485. const ERR_INVALID_ENCRYPTION_STRENGTH = "The strength must equal 1, 2, or 3";
  3486. const ERR_INVALID_EXTRAFIELD_TYPE = "Extra field type exceeds 65535";
  3487. const ERR_INVALID_EXTRAFIELD_DATA = "Extra field data exceeds 64KB";
  3488. const ERR_UNSUPPORTED_FORMAT = "Zip64 is not supported (make sure 'keepOrder' is set to 'true')";
  3489. const EXTRAFIELD_DATA_AES = new Uint8Array$1([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);
  3490. let workers = 0;
  3491. const pendingEntries = [];
  3492. class ZipWriter {
  3493. constructor(writer, options = {}) {
  3494. writer = initWriter(writer);
  3495. Object$1.assign(this, {
  3496. writer,
  3497. addSplitZipSignature: writer instanceof SplitDataWriter,
  3498. options,
  3499. config: getConfiguration(),
  3500. files: new Map$2(),
  3501. filenames: new Set$3(),
  3502. offset: writer.writable.size,
  3503. pendingEntriesSize: 0,
  3504. pendingAddFileCalls: new Set$3(),
  3505. bufferedWrites: 0
  3506. });
  3507. }
  3508. async add(name = "", reader, options = {}) {
  3509. const zipWriter = this;
  3510. const {
  3511. pendingAddFileCalls,
  3512. config
  3513. } = zipWriter;
  3514. if (workers < config.maxWorkers) {
  3515. workers++;
  3516. } else {
  3517. await new Promise$1(resolve => pendingEntries.push(resolve));
  3518. }
  3519. let promiseAddFile;
  3520. try {
  3521. name = name.trim();
  3522. if (zipWriter.filenames.has(name)) {
  3523. throw new Error$1(ERR_DUPLICATED_NAME);
  3524. }
  3525. zipWriter.filenames.add(name);
  3526. promiseAddFile = addFile$1(zipWriter, name, reader, options);
  3527. pendingAddFileCalls.add(promiseAddFile);
  3528. return await promiseAddFile;
  3529. } catch (error) {
  3530. zipWriter.filenames.delete(name);
  3531. throw error;
  3532. } finally {
  3533. pendingAddFileCalls.delete(promiseAddFile);
  3534. const pendingEntry = pendingEntries.shift();
  3535. if (pendingEntry) {
  3536. pendingEntry();
  3537. } else {
  3538. workers--;
  3539. }
  3540. }
  3541. }
  3542. async close(comment = new Uint8Array$1(), options = {}) {
  3543. const zipWriter = this;
  3544. const { pendingAddFileCalls, writer } = this;
  3545. const { writable } = writer;
  3546. while (pendingAddFileCalls.size) {
  3547. await Promise$1.all(Array$1.from(pendingAddFileCalls));
  3548. }
  3549. await closeFile(this, comment, options);
  3550. const preventClose = getOptionValue(zipWriter, options, "preventClose");
  3551. if (!preventClose) {
  3552. await writable.getWriter().close();
  3553. }
  3554. return writer.getData ? writer.getData() : writable;
  3555. }
  3556. }
  3557. async function addFile$1(zipWriter, name, reader, options) {
  3558. name = name.trim();
  3559. if (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {
  3560. name += DIRECTORY_SIGNATURE;
  3561. } else {
  3562. options.directory = name.endsWith(DIRECTORY_SIGNATURE);
  3563. }
  3564. const rawFilename = encodeText(name);
  3565. if (getLength$1(rawFilename) > MAX_16_BITS) {
  3566. throw new Error$1(ERR_INVALID_ENTRY_NAME);
  3567. }
  3568. const comment = options.comment || "";
  3569. const rawComment = encodeText(comment);
  3570. if (getLength$1(rawComment) > MAX_16_BITS) {
  3571. throw new Error$1(ERR_INVALID_ENTRY_COMMENT);
  3572. }
  3573. const version = getOptionValue(zipWriter, options, "version", VERSION_DEFLATE);
  3574. if (version > MAX_16_BITS) {
  3575. throw new Error$1(ERR_INVALID_VERSION);
  3576. }
  3577. const versionMadeBy = getOptionValue(zipWriter, options, "versionMadeBy", 20);
  3578. if (versionMadeBy > MAX_16_BITS) {
  3579. throw new Error$1(ERR_INVALID_VERSION);
  3580. }
  3581. const lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE, new Date$1());
  3582. const lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);
  3583. const creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);
  3584. const msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE, true);
  3585. const internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, 0);
  3586. const externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, 0);
  3587. const password = getOptionValue(zipWriter, options, "password");
  3588. const encryptionStrength = getOptionValue(zipWriter, options, "encryptionStrength", 3);
  3589. const zipCrypto = getOptionValue(zipWriter, options, "zipCrypto");
  3590. const extendedTimestamp = getOptionValue(zipWriter, options, "extendedTimestamp", true);
  3591. const keepOrder = getOptionValue(zipWriter, options, "keepOrder", true);
  3592. const level = getOptionValue(zipWriter, options, "level");
  3593. const useWebWorkers = getOptionValue(zipWriter, options, "useWebWorkers");
  3594. const bufferedWrite = getOptionValue(zipWriter, options, "bufferedWrite");
  3595. const dataDescriptorSignature = getOptionValue(zipWriter, options, "dataDescriptorSignature", false);
  3596. const signal = getOptionValue(zipWriter, options, "signal");
  3597. const useCompressionStream = getOptionValue(zipWriter, options, "useCompressionStream");
  3598. let dataDescriptor = getOptionValue(zipWriter, options, "dataDescriptor", true);
  3599. let zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);
  3600. if (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {
  3601. throw new Error$1(ERR_INVALID_ENCRYPTION_STRENGTH);
  3602. }
  3603. let rawExtraField = new Uint8Array$1();
  3604. const { extraField } = options;
  3605. if (extraField) {
  3606. let extraFieldSize = 0;
  3607. let offset = 0;
  3608. extraField.forEach(data => extraFieldSize += 4 + getLength$1(data));
  3609. rawExtraField = new Uint8Array$1(extraFieldSize);
  3610. extraField.forEach((data, type) => {
  3611. if (type > MAX_16_BITS) {
  3612. throw new Error$1(ERR_INVALID_EXTRAFIELD_TYPE);
  3613. }
  3614. if (getLength$1(data) > MAX_16_BITS) {
  3615. throw new Error$1(ERR_INVALID_EXTRAFIELD_DATA);
  3616. }
  3617. arraySet(rawExtraField, new Uint16Array([type]), offset);
  3618. arraySet(rawExtraField, new Uint16Array([getLength$1(data)]), offset + 2);
  3619. arraySet(rawExtraField, data, offset + 4);
  3620. offset += 4 + getLength$1(data);
  3621. });
  3622. }
  3623. let maximumCompressedSize = 0;
  3624. let maximumEntrySize = 0;
  3625. let uncompressedSize = 0;
  3626. const zip64Enabled = zip64 === true;
  3627. if (reader) {
  3628. reader = initReader(reader);
  3629. await initStream(reader);
  3630. if (reader.size === UNDEFINED_VALUE) {
  3631. dataDescriptor = true;
  3632. if (zip64 || zip64 === UNDEFINED_VALUE) {
  3633. zip64 = true;
  3634. uncompressedSize = maximumCompressedSize = MAX_32_BITS;
  3635. }
  3636. } else {
  3637. uncompressedSize = reader.size;
  3638. maximumCompressedSize = getMaximumCompressedSize(uncompressedSize);
  3639. }
  3640. }
  3641. const { diskOffset, diskNumber, maxSize } = zipWriter.writer;
  3642. const zip64UncompressedSize = zip64Enabled || uncompressedSize >= MAX_32_BITS;
  3643. const zip64CompressedSize = zip64Enabled || maximumCompressedSize >= MAX_32_BITS;
  3644. const zip64Offset = zip64Enabled || zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset >= MAX_32_BITS;
  3645. const supportZip64SplitFile = getOptionValue(zipWriter, options, "supportZip64SplitFile", true);
  3646. const zip64DiskNumberStart = (supportZip64SplitFile && zip64Enabled) || diskNumber + Math$1.ceil(zipWriter.pendingEntriesSize / maxSize) >= MAX_16_BITS;
  3647. if (zip64Offset || zip64UncompressedSize || zip64CompressedSize || zip64DiskNumberStart) {
  3648. if (zip64 === false || !keepOrder) {
  3649. throw new Error$1(ERR_UNSUPPORTED_FORMAT);
  3650. } else {
  3651. zip64 = true;
  3652. }
  3653. }
  3654. zip64 = zip64 || false;
  3655. options = Object$1.assign({}, options, {
  3656. rawFilename,
  3657. rawComment,
  3658. version,
  3659. versionMadeBy,
  3660. lastModDate,
  3661. lastAccessDate,
  3662. creationDate,
  3663. rawExtraField,
  3664. zip64,
  3665. zip64UncompressedSize,
  3666. zip64CompressedSize,
  3667. zip64Offset,
  3668. zip64DiskNumberStart,
  3669. password,
  3670. level,
  3671. useWebWorkers,
  3672. encryptionStrength,
  3673. extendedTimestamp,
  3674. zipCrypto,
  3675. bufferedWrite,
  3676. keepOrder,
  3677. dataDescriptor,
  3678. dataDescriptorSignature,
  3679. signal,
  3680. msDosCompatible,
  3681. internalFileAttribute,
  3682. externalFileAttribute,
  3683. useCompressionStream
  3684. });
  3685. const headerInfo = getHeaderInfo(options);
  3686. const dataDescriptorInfo = getDataDescriptorInfo(options);
  3687. const metadataSize = getLength$1(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray);
  3688. maximumEntrySize = metadataSize + maximumCompressedSize;
  3689. if (zipWriter.options.usdz) {
  3690. maximumEntrySize += maximumEntrySize + 64;
  3691. }
  3692. zipWriter.pendingEntriesSize += maximumEntrySize;
  3693. let fileEntry;
  3694. try {
  3695. fileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo, metadataSize }, options);
  3696. } finally {
  3697. zipWriter.pendingEntriesSize -= maximumEntrySize;
  3698. }
  3699. Object$1.assign(fileEntry, { name, comment, extraField });
  3700. return new Entry(fileEntry);
  3701. }
  3702. async function getFileEntry(zipWriter, name, reader, entryInfo, options) {
  3703. const {
  3704. files,
  3705. writer
  3706. } = zipWriter;
  3707. const {
  3708. keepOrder,
  3709. dataDescriptor,
  3710. signal
  3711. } = options;
  3712. const {
  3713. headerInfo
  3714. } = entryInfo;
  3715. const { usdz } = zipWriter.options;
  3716. const previousFileEntry = Array$1.from(files.values()).pop();
  3717. let fileEntry = {};
  3718. let bufferedWrite;
  3719. let releaseLockWriter;
  3720. let releaseLockCurrentFileEntry;
  3721. let writingBufferedEntryData;
  3722. let writingEntryData;
  3723. let fileWriter;
  3724. files.set(name, fileEntry);
  3725. try {
  3726. let lockPreviousFileEntry;
  3727. if (keepOrder) {
  3728. lockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;
  3729. requestLockCurrentFileEntry();
  3730. }
  3731. if ((options.bufferedWrite || zipWriter.writerLocked || (zipWriter.bufferedWrites && keepOrder) || !dataDescriptor) && !usdz) {
  3732. fileWriter = new BlobWriter();
  3733. fileWriter.writable.size = 0;
  3734. bufferedWrite = true;
  3735. zipWriter.bufferedWrites++;
  3736. await initStream(writer);
  3737. } else {
  3738. fileWriter = writer;
  3739. await requestLockWriter();
  3740. }
  3741. await initStream(fileWriter);
  3742. const { writable } = writer;
  3743. let { diskOffset } = writer;
  3744. if (zipWriter.addSplitZipSignature) {
  3745. delete zipWriter.addSplitZipSignature;
  3746. const signatureArray = new Uint8Array$1(4);
  3747. const signatureArrayView = getDataView(signatureArray);
  3748. setUint32$2(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);
  3749. await writeData$1(writable, signatureArray);
  3750. zipWriter.offset += 4;
  3751. }
  3752. if (usdz) {
  3753. appendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);
  3754. }
  3755. if (!bufferedWrite) {
  3756. await lockPreviousFileEntry;
  3757. await skipDiskIfNeeded(writable);
  3758. }
  3759. const { diskNumber } = writer;
  3760. writingEntryData = true;
  3761. fileEntry.diskNumberStart = diskNumber;
  3762. fileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);
  3763. writingEntryData = false;
  3764. files.set(name, fileEntry);
  3765. fileEntry.filename = name;
  3766. if (bufferedWrite) {
  3767. await fileWriter.writable.getWriter().close();
  3768. let blob = await fileWriter.getData();
  3769. await lockPreviousFileEntry;
  3770. await requestLockWriter();
  3771. writingBufferedEntryData = true;
  3772. if (!dataDescriptor) {
  3773. blob = await writeExtraHeaderInfo(fileEntry, blob, writable, options);
  3774. }
  3775. await skipDiskIfNeeded(writable);
  3776. fileEntry.diskNumberStart = writer.diskNumber;
  3777. diskOffset = writer.diskOffset;
  3778. await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
  3779. writable.size += blob.size;
  3780. writingBufferedEntryData = false;
  3781. }
  3782. fileEntry.offset = zipWriter.offset - diskOffset;
  3783. if (fileEntry.zip64) {
  3784. setZip64ExtraInfo(fileEntry, options);
  3785. } else if (fileEntry.offset >= MAX_32_BITS) {
  3786. throw new Error$1(ERR_UNSUPPORTED_FORMAT);
  3787. }
  3788. zipWriter.offset += fileEntry.length;
  3789. return fileEntry;
  3790. } catch (error) {
  3791. if ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {
  3792. zipWriter.hasCorruptedEntries = true;
  3793. if (error) {
  3794. try {
  3795. error.corruptedEntry = true;
  3796. } catch (_error) {
  3797. // ignored
  3798. }
  3799. }
  3800. if (bufferedWrite) {
  3801. zipWriter.offset += fileWriter.writable.size;
  3802. } else {
  3803. zipWriter.offset = fileWriter.writable.size;
  3804. }
  3805. }
  3806. files.delete(name);
  3807. throw error;
  3808. } finally {
  3809. if (bufferedWrite) {
  3810. zipWriter.bufferedWrites--;
  3811. }
  3812. if (releaseLockCurrentFileEntry) {
  3813. releaseLockCurrentFileEntry();
  3814. }
  3815. if (releaseLockWriter) {
  3816. releaseLockWriter();
  3817. }
  3818. }
  3819. function requestLockCurrentFileEntry() {
  3820. fileEntry.lock = new Promise$1(resolve => releaseLockCurrentFileEntry = resolve);
  3821. }
  3822. async function requestLockWriter() {
  3823. zipWriter.writerLocked = true;
  3824. const { lockWriter } = zipWriter;
  3825. zipWriter.lockWriter = new Promise$1(resolve => releaseLockWriter = () => {
  3826. zipWriter.writerLocked = false;
  3827. resolve();
  3828. });
  3829. await lockWriter;
  3830. }
  3831. async function skipDiskIfNeeded(writable) {
  3832. if (headerInfo.localHeaderArray.length > writer.availableSize) {
  3833. writer.availableSize = 0;
  3834. await writeData$1(writable, new Uint8Array$1());
  3835. }
  3836. }
  3837. }
  3838. async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {
  3839. const {
  3840. headerInfo,
  3841. dataDescriptorInfo,
  3842. metadataSize
  3843. } = entryInfo;
  3844. const {
  3845. localHeaderArray,
  3846. headerArray,
  3847. lastModDate,
  3848. rawLastModDate,
  3849. encrypted,
  3850. compressed,
  3851. version,
  3852. compressionMethod,
  3853. rawExtraFieldExtendedTimestamp,
  3854. extraFieldExtendedTimestampFlag,
  3855. rawExtraFieldNTFS,
  3856. rawExtraFieldAES
  3857. } = headerInfo;
  3858. const { dataDescriptorArray } = dataDescriptorInfo;
  3859. const {
  3860. rawFilename,
  3861. lastAccessDate,
  3862. creationDate,
  3863. password,
  3864. level,
  3865. zip64,
  3866. zip64UncompressedSize,
  3867. zip64CompressedSize,
  3868. zip64Offset,
  3869. zip64DiskNumberStart,
  3870. zipCrypto,
  3871. dataDescriptor,
  3872. directory,
  3873. versionMadeBy,
  3874. rawComment,
  3875. rawExtraField,
  3876. useWebWorkers,
  3877. onstart,
  3878. onprogress,
  3879. onend,
  3880. signal,
  3881. encryptionStrength,
  3882. extendedTimestamp,
  3883. msDosCompatible,
  3884. internalFileAttribute,
  3885. externalFileAttribute,
  3886. useCompressionStream
  3887. } = options;
  3888. const fileEntry = {
  3889. lock,
  3890. versionMadeBy,
  3891. zip64,
  3892. directory: Boolean(directory),
  3893. filenameUTF8: true,
  3894. rawFilename,
  3895. commentUTF8: true,
  3896. rawComment,
  3897. rawExtraFieldExtendedTimestamp,
  3898. rawExtraFieldNTFS,
  3899. rawExtraFieldAES,
  3900. rawExtraField,
  3901. extendedTimestamp,
  3902. msDosCompatible,
  3903. internalFileAttribute,
  3904. externalFileAttribute,
  3905. diskNumberStart
  3906. };
  3907. let compressedSize = 0;
  3908. let uncompressedSize = 0;
  3909. let signature;
  3910. const { writable } = writer;
  3911. if (reader) {
  3912. reader.chunkSize = getChunkSize(config);
  3913. await writeData$1(writable, localHeaderArray);
  3914. const readable = reader.readable;
  3915. const size = readable.size = reader.size;
  3916. const workerOptions = {
  3917. options: {
  3918. codecType: CODEC_DEFLATE,
  3919. level,
  3920. password,
  3921. encryptionStrength,
  3922. zipCrypto: encrypted && zipCrypto,
  3923. passwordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & 0xFF,
  3924. signed: true,
  3925. compressed,
  3926. encrypted,
  3927. useWebWorkers,
  3928. useCompressionStream,
  3929. transferStreams: false
  3930. },
  3931. config,
  3932. streamOptions: { signal, size, onstart, onprogress, onend }
  3933. };
  3934. const result = await runWorker({ readable, writable }, workerOptions);
  3935. writable.size += result.size;
  3936. signature = result.signature;
  3937. uncompressedSize = reader.size = readable.size;
  3938. compressedSize = result.size;
  3939. } else {
  3940. await writeData$1(writable, localHeaderArray);
  3941. }
  3942. let rawExtraFieldZip64;
  3943. if (zip64) {
  3944. let rawExtraFieldZip64Length = 4;
  3945. if (zip64UncompressedSize) {
  3946. rawExtraFieldZip64Length += 8;
  3947. }
  3948. if (zip64CompressedSize) {
  3949. rawExtraFieldZip64Length += 8;
  3950. }
  3951. if (zip64Offset) {
  3952. rawExtraFieldZip64Length += 8;
  3953. }
  3954. if (zip64DiskNumberStart) {
  3955. rawExtraFieldZip64Length += 4;
  3956. }
  3957. rawExtraFieldZip64 = new Uint8Array$1(rawExtraFieldZip64Length);
  3958. } else {
  3959. rawExtraFieldZip64 = new Uint8Array$1();
  3960. }
  3961. setEntryInfo({
  3962. signature,
  3963. rawExtraFieldZip64,
  3964. compressedSize,
  3965. uncompressedSize,
  3966. headerInfo,
  3967. dataDescriptorInfo
  3968. }, options);
  3969. if (dataDescriptor) {
  3970. await writeData$1(writable, dataDescriptorArray);
  3971. }
  3972. Object$1.assign(fileEntry, {
  3973. uncompressedSize,
  3974. compressedSize,
  3975. lastModDate,
  3976. rawLastModDate,
  3977. creationDate,
  3978. lastAccessDate,
  3979. encrypted,
  3980. length: metadataSize + compressedSize,
  3981. compressionMethod,
  3982. version,
  3983. headerArray,
  3984. signature,
  3985. rawExtraFieldZip64,
  3986. extraFieldExtendedTimestampFlag,
  3987. zip64UncompressedSize,
  3988. zip64CompressedSize,
  3989. zip64Offset,
  3990. zip64DiskNumberStart
  3991. });
  3992. return fileEntry;
  3993. }
  3994. function getHeaderInfo(options) {
  3995. const {
  3996. rawFilename,
  3997. lastModDate,
  3998. lastAccessDate,
  3999. creationDate,
  4000. password,
  4001. level,
  4002. zip64,
  4003. zipCrypto,
  4004. dataDescriptor,
  4005. directory,
  4006. rawExtraField,
  4007. encryptionStrength,
  4008. extendedTimestamp
  4009. } = options;
  4010. const compressed = level !== 0 && !directory;
  4011. const encrypted = Boolean(password && getLength$1(password));
  4012. let version = options.version;
  4013. let rawExtraFieldAES;
  4014. if (encrypted && !zipCrypto) {
  4015. rawExtraFieldAES = new Uint8Array$1(getLength$1(EXTRAFIELD_DATA_AES) + 2);
  4016. const extraFieldAESView = getDataView(rawExtraFieldAES);
  4017. setUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);
  4018. arraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);
  4019. setUint8(extraFieldAESView, 8, encryptionStrength);
  4020. } else {
  4021. rawExtraFieldAES = new Uint8Array$1();
  4022. }
  4023. let rawExtraFieldNTFS;
  4024. let rawExtraFieldExtendedTimestamp;
  4025. let extraFieldExtendedTimestampFlag;
  4026. if (extendedTimestamp) {
  4027. rawExtraFieldExtendedTimestamp = new Uint8Array$1(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));
  4028. const extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);
  4029. setUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);
  4030. setUint16(extraFieldExtendedTimestampView, 2, getLength$1(rawExtraFieldExtendedTimestamp) - 4);
  4031. extraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);
  4032. setUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);
  4033. let offset = 5;
  4034. setUint32$2(extraFieldExtendedTimestampView, offset, Math$1.floor(lastModDate.getTime() / 1000));
  4035. offset += 4;
  4036. if (lastAccessDate) {
  4037. setUint32$2(extraFieldExtendedTimestampView, offset, Math$1.floor(lastAccessDate.getTime() / 1000));
  4038. offset += 4;
  4039. }
  4040. if (creationDate) {
  4041. setUint32$2(extraFieldExtendedTimestampView, offset, Math$1.floor(creationDate.getTime() / 1000));
  4042. }
  4043. try {
  4044. rawExtraFieldNTFS = new Uint8Array$1(36);
  4045. const extraFieldNTFSView = getDataView(rawExtraFieldNTFS);
  4046. const lastModTimeNTFS = getTimeNTFS(lastModDate);
  4047. setUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);
  4048. setUint16(extraFieldNTFSView, 2, 32);
  4049. setUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);
  4050. setUint16(extraFieldNTFSView, 10, 24);
  4051. setBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);
  4052. setBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);
  4053. setBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);
  4054. } catch (_error) {
  4055. rawExtraFieldNTFS = new Uint8Array$1();
  4056. }
  4057. } else {
  4058. rawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array$1();
  4059. }
  4060. let bitFlag = BITFLAG_LANG_ENCODING_FLAG;
  4061. if (dataDescriptor) {
  4062. bitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;
  4063. }
  4064. let compressionMethod = COMPRESSION_METHOD_STORE;
  4065. if (compressed) {
  4066. compressionMethod = COMPRESSION_METHOD_DEFLATE;
  4067. }
  4068. if (zip64) {
  4069. version = version > VERSION_ZIP64 ? version : VERSION_ZIP64;
  4070. }
  4071. if (encrypted) {
  4072. bitFlag = bitFlag | BITFLAG_ENCRYPTED;
  4073. if (!zipCrypto) {
  4074. version = version > VERSION_AES ? version : VERSION_AES;
  4075. compressionMethod = COMPRESSION_METHOD_AES;
  4076. if (compressed) {
  4077. rawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;
  4078. }
  4079. }
  4080. }
  4081. const headerArray = new Uint8Array$1(26);
  4082. const headerView = getDataView(headerArray);
  4083. setUint16(headerView, 0, version);
  4084. setUint16(headerView, 2, bitFlag);
  4085. setUint16(headerView, 4, compressionMethod);
  4086. const dateArray = new Uint32Array$1(1);
  4087. const dateView = getDataView(dateArray);
  4088. let lastModDateMsDos;
  4089. if (lastModDate < MIN_DATE) {
  4090. lastModDateMsDos = MIN_DATE;
  4091. } else if (lastModDate > MAX_DATE) {
  4092. lastModDateMsDos = MAX_DATE;
  4093. } else {
  4094. lastModDateMsDos = lastModDate;
  4095. }
  4096. setUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);
  4097. setUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());
  4098. const rawLastModDate = dateArray[0];
  4099. setUint32$2(headerView, 6, rawLastModDate);
  4100. setUint16(headerView, 22, getLength$1(rawFilename));
  4101. const extraFieldLength = getLength$1(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);
  4102. setUint16(headerView, 24, extraFieldLength);
  4103. const localHeaderArray = new Uint8Array$1(30 + getLength$1(rawFilename) + extraFieldLength);
  4104. const localHeaderView = getDataView(localHeaderArray);
  4105. setUint32$2(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);
  4106. arraySet(localHeaderArray, headerArray, 4);
  4107. arraySet(localHeaderArray, rawFilename, 30);
  4108. arraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength$1(rawFilename));
  4109. arraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength$1(rawFilename, rawExtraFieldAES));
  4110. arraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength$1(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));
  4111. arraySet(localHeaderArray, rawExtraField, 30 + getLength$1(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));
  4112. return {
  4113. localHeaderArray,
  4114. headerArray,
  4115. headerView,
  4116. lastModDate,
  4117. rawLastModDate,
  4118. encrypted,
  4119. compressed,
  4120. version,
  4121. compressionMethod,
  4122. extraFieldExtendedTimestampFlag,
  4123. rawExtraFieldExtendedTimestamp,
  4124. rawExtraFieldNTFS,
  4125. rawExtraFieldAES,
  4126. extraFieldLength
  4127. };
  4128. }
  4129. function appendExtraFieldUSDZ(entryInfo, zipWriterOffset) {
  4130. const { headerInfo } = entryInfo;
  4131. let { localHeaderArray, extraFieldLength } = headerInfo;
  4132. let localHeaderArrayView = getDataView(localHeaderArray);
  4133. let extraBytesLength = 64 - ((zipWriterOffset + localHeaderArray.length) % 64);
  4134. if (extraBytesLength < 4) {
  4135. extraBytesLength += 64;
  4136. }
  4137. const rawExtraFieldUSDZ = new Uint8Array$1(extraBytesLength);
  4138. const extraFieldUSDZView = getDataView(rawExtraFieldUSDZ);
  4139. setUint16(extraFieldUSDZView, 0, EXTRAFIELD_TYPE_USDZ);
  4140. setUint16(extraFieldUSDZView, 2, extraBytesLength - 2);
  4141. const previousLocalHeaderArray = localHeaderArray;
  4142. headerInfo.localHeaderArray = localHeaderArray = new Uint8Array$1(previousLocalHeaderArray.length + extraBytesLength);
  4143. arraySet(localHeaderArray, previousLocalHeaderArray);
  4144. arraySet(localHeaderArray, rawExtraFieldUSDZ, previousLocalHeaderArray.length);
  4145. localHeaderArrayView = getDataView(localHeaderArray);
  4146. setUint16(localHeaderArrayView, 28, extraFieldLength + extraBytesLength);
  4147. entryInfo.metadataSize += extraBytesLength;
  4148. }
  4149. function getDataDescriptorInfo(options) {
  4150. const {
  4151. zip64,
  4152. dataDescriptor,
  4153. dataDescriptorSignature
  4154. } = options;
  4155. let dataDescriptorArray = new Uint8Array$1();
  4156. let dataDescriptorView, dataDescriptorOffset = 0;
  4157. if (dataDescriptor) {
  4158. dataDescriptorArray = new Uint8Array$1(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));
  4159. dataDescriptorView = getDataView(dataDescriptorArray);
  4160. if (dataDescriptorSignature) {
  4161. dataDescriptorOffset = 4;
  4162. setUint32$2(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);
  4163. }
  4164. }
  4165. return {
  4166. dataDescriptorArray,
  4167. dataDescriptorView,
  4168. dataDescriptorOffset
  4169. };
  4170. }
  4171. function setEntryInfo(entryInfo, options) {
  4172. const {
  4173. signature,
  4174. rawExtraFieldZip64,
  4175. compressedSize,
  4176. uncompressedSize,
  4177. headerInfo,
  4178. dataDescriptorInfo
  4179. } = entryInfo;
  4180. const {
  4181. headerView,
  4182. encrypted
  4183. } = headerInfo;
  4184. const {
  4185. dataDescriptorView,
  4186. dataDescriptorOffset
  4187. } = dataDescriptorInfo;
  4188. const {
  4189. zip64,
  4190. zip64UncompressedSize,
  4191. zip64CompressedSize,
  4192. zipCrypto,
  4193. dataDescriptor
  4194. } = options;
  4195. if ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {
  4196. setUint32$2(headerView, 10, signature);
  4197. if (dataDescriptor) {
  4198. setUint32$2(dataDescriptorView, dataDescriptorOffset, signature);
  4199. }
  4200. }
  4201. if (zip64) {
  4202. const rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);
  4203. setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);
  4204. setUint16(rawExtraFieldZip64View, 2, rawExtraFieldZip64.length - 4);
  4205. let rawExtraFieldZip64Offset = 4;
  4206. if (zip64UncompressedSize) {
  4207. setUint32$2(headerView, 18, MAX_32_BITS);
  4208. setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(uncompressedSize));
  4209. rawExtraFieldZip64Offset += 8;
  4210. }
  4211. if (zip64CompressedSize) {
  4212. setUint32$2(headerView, 14, MAX_32_BITS);
  4213. setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(compressedSize));
  4214. }
  4215. if (dataDescriptor) {
  4216. setBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));
  4217. setBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));
  4218. }
  4219. } else {
  4220. setUint32$2(headerView, 14, compressedSize);
  4221. setUint32$2(headerView, 18, uncompressedSize);
  4222. if (dataDescriptor) {
  4223. setUint32$2(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);
  4224. setUint32$2(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);
  4225. }
  4226. }
  4227. }
  4228. async function writeExtraHeaderInfo(fileEntry, entryData, writable, { zipCrypto }) {
  4229. let arrayBuffer;
  4230. arrayBuffer = await entryData.slice(0, 26).arrayBuffer();
  4231. if (arrayBuffer.byteLength != 26) {
  4232. arrayBuffer = arrayBuffer.slice(0, 26);
  4233. }
  4234. const arrayBufferView = new DataView$1(arrayBuffer);
  4235. if (!fileEntry.encrypted || zipCrypto) {
  4236. setUint32$2(arrayBufferView, 14, fileEntry.signature);
  4237. }
  4238. if (fileEntry.zip64) {
  4239. setUint32$2(arrayBufferView, 18, MAX_32_BITS);
  4240. setUint32$2(arrayBufferView, 22, MAX_32_BITS);
  4241. } else {
  4242. setUint32$2(arrayBufferView, 18, fileEntry.compressedSize);
  4243. setUint32$2(arrayBufferView, 22, fileEntry.uncompressedSize);
  4244. }
  4245. await writeData$1(writable, new Uint8Array$1(arrayBuffer));
  4246. return entryData.slice(arrayBuffer.byteLength);
  4247. }
  4248. function setZip64ExtraInfo(fileEntry, options) {
  4249. const { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;
  4250. const { zip64UncompressedSize, zip64CompressedSize, zip64Offset, zip64DiskNumberStart } = options;
  4251. const rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);
  4252. let rawExtraFieldZip64Offset = 4;
  4253. if (zip64UncompressedSize) {
  4254. rawExtraFieldZip64Offset += 8;
  4255. }
  4256. if (zip64CompressedSize) {
  4257. rawExtraFieldZip64Offset += 8;
  4258. }
  4259. if (zip64Offset) {
  4260. setBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(offset));
  4261. rawExtraFieldZip64Offset += 8;
  4262. }
  4263. if (zip64DiskNumberStart) {
  4264. setUint32$2(rawExtraFieldZip64View, rawExtraFieldZip64Offset, diskNumberStart);
  4265. }
  4266. }
  4267. async function closeFile(zipWriter, comment, options) {
  4268. const { files, writer } = zipWriter;
  4269. const { diskOffset, writable } = writer;
  4270. let { diskNumber } = writer;
  4271. let offset = 0;
  4272. let directoryDataLength = 0;
  4273. let directoryOffset = zipWriter.offset - diskOffset;
  4274. let filesLength = files.size;
  4275. for (const [, fileEntry] of files) {
  4276. const {
  4277. rawFilename,
  4278. rawExtraFieldZip64,
  4279. rawExtraFieldAES,
  4280. rawComment,
  4281. rawExtraFieldNTFS,
  4282. rawExtraField,
  4283. extendedTimestamp,
  4284. extraFieldExtendedTimestampFlag,
  4285. lastModDate
  4286. } = fileEntry;
  4287. let rawExtraFieldTimestamp;
  4288. if (extendedTimestamp) {
  4289. rawExtraFieldTimestamp = new Uint8Array$1(9);
  4290. const extraFieldExtendedTimestampView = getDataView(rawExtraFieldTimestamp);
  4291. setUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);
  4292. setUint16(extraFieldExtendedTimestampView, 2, 5);
  4293. setUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);
  4294. setUint32$2(extraFieldExtendedTimestampView, 5, Math$1.floor(lastModDate.getTime() / 1000));
  4295. } else {
  4296. rawExtraFieldTimestamp = new Uint8Array$1();
  4297. }
  4298. fileEntry.rawExtraFieldCDExtendedTimestamp = rawExtraFieldTimestamp;
  4299. directoryDataLength += 46 +
  4300. getLength$1(
  4301. rawFilename,
  4302. rawComment,
  4303. rawExtraFieldZip64,
  4304. rawExtraFieldAES,
  4305. rawExtraFieldNTFS,
  4306. rawExtraFieldTimestamp,
  4307. rawExtraField);
  4308. }
  4309. const directoryArray = new Uint8Array$1(directoryDataLength);
  4310. const directoryView = getDataView(directoryArray);
  4311. await initStream(writer);
  4312. let directoryDiskOffset = 0;
  4313. for (const [indexFileEntry, fileEntry] of Array$1.from(files.values()).entries()) {
  4314. const {
  4315. offset: fileEntryOffset,
  4316. rawFilename,
  4317. rawExtraFieldZip64,
  4318. rawExtraFieldAES,
  4319. rawExtraFieldCDExtendedTimestamp,
  4320. rawExtraFieldNTFS,
  4321. rawExtraField,
  4322. rawComment,
  4323. versionMadeBy,
  4324. headerArray,
  4325. directory,
  4326. zip64,
  4327. zip64UncompressedSize,
  4328. zip64CompressedSize,
  4329. zip64DiskNumberStart,
  4330. zip64Offset,
  4331. msDosCompatible,
  4332. internalFileAttribute,
  4333. externalFileAttribute,
  4334. diskNumberStart,
  4335. uncompressedSize,
  4336. compressedSize
  4337. } = fileEntry;
  4338. const extraFieldLength = getLength$1(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);
  4339. setUint32$2(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);
  4340. setUint16(directoryView, offset + 4, versionMadeBy);
  4341. const headerView = getDataView(headerArray);
  4342. if (!zip64UncompressedSize) {
  4343. setUint32$2(headerView, 18, uncompressedSize);
  4344. }
  4345. if (!zip64CompressedSize) {
  4346. setUint32$2(headerView, 14, compressedSize);
  4347. }
  4348. arraySet(directoryArray, headerArray, offset + 6);
  4349. setUint16(directoryView, offset + 30, extraFieldLength);
  4350. setUint16(directoryView, offset + 32, getLength$1(rawComment));
  4351. setUint16(directoryView, offset + 34, zip64 && zip64DiskNumberStart ? MAX_16_BITS : diskNumberStart);
  4352. setUint16(directoryView, offset + 36, internalFileAttribute);
  4353. if (externalFileAttribute) {
  4354. setUint32$2(directoryView, offset + 38, externalFileAttribute);
  4355. } else if (directory && msDosCompatible) {
  4356. setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);
  4357. }
  4358. setUint32$2(directoryView, offset + 42, zip64 && zip64Offset ? MAX_32_BITS : fileEntryOffset);
  4359. arraySet(directoryArray, rawFilename, offset + 46);
  4360. arraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength$1(rawFilename));
  4361. arraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength$1(rawFilename, rawExtraFieldZip64));
  4362. arraySet(directoryArray, rawExtraFieldCDExtendedTimestamp, offset + 46 + getLength$1(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));
  4363. arraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength$1(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp));
  4364. arraySet(directoryArray, rawExtraField, offset + 46 + getLength$1(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS));
  4365. arraySet(directoryArray, rawComment, offset + 46 + getLength$1(rawFilename) + extraFieldLength);
  4366. const directoryEntryLength = 46 + getLength$1(rawFilename, rawComment) + extraFieldLength;
  4367. if (offset - directoryDiskOffset > writer.availableSize) {
  4368. writer.availableSize = 0;
  4369. await writeData$1(writable, directoryArray.slice(directoryDiskOffset, offset));
  4370. directoryDiskOffset = offset;
  4371. }
  4372. offset += directoryEntryLength;
  4373. if (options.onprogress) {
  4374. try {
  4375. await options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));
  4376. } catch (_error) {
  4377. // ignored
  4378. }
  4379. }
  4380. }
  4381. await writeData$1(writable, directoryDiskOffset ? directoryArray.slice(directoryDiskOffset) : directoryArray);
  4382. let lastDiskNumber = writer.diskNumber;
  4383. const { availableSize } = writer;
  4384. if (availableSize < END_OF_CENTRAL_DIR_LENGTH) {
  4385. lastDiskNumber++;
  4386. }
  4387. let zip64 = getOptionValue(zipWriter, options, "zip64");
  4388. if (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS || lastDiskNumber >= MAX_16_BITS) {
  4389. if (zip64 === false) {
  4390. throw new Error$1(ERR_UNSUPPORTED_FORMAT);
  4391. } else {
  4392. zip64 = true;
  4393. }
  4394. }
  4395. const endOfdirectoryArray = new Uint8Array$1(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);
  4396. const endOfdirectoryView = getDataView(endOfdirectoryArray);
  4397. offset = 0;
  4398. if (zip64) {
  4399. setUint32$2(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);
  4400. setBigUint64(endOfdirectoryView, 4, BigInt(44));
  4401. setUint16(endOfdirectoryView, 12, 45);
  4402. setUint16(endOfdirectoryView, 14, 45);
  4403. setUint32$2(endOfdirectoryView, 16, lastDiskNumber);
  4404. setUint32$2(endOfdirectoryView, 20, diskNumber);
  4405. setBigUint64(endOfdirectoryView, 24, BigInt(filesLength));
  4406. setBigUint64(endOfdirectoryView, 32, BigInt(filesLength));
  4407. setBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));
  4408. setBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));
  4409. setUint32$2(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);
  4410. setBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));
  4411. setUint32$2(endOfdirectoryView, 72, lastDiskNumber + 1);
  4412. const supportZip64SplitFile = getOptionValue(zipWriter, options, "supportZip64SplitFile", true);
  4413. if (supportZip64SplitFile) {
  4414. lastDiskNumber = MAX_16_BITS;
  4415. diskNumber = MAX_16_BITS;
  4416. }
  4417. filesLength = MAX_16_BITS;
  4418. directoryOffset = MAX_32_BITS;
  4419. directoryDataLength = MAX_32_BITS;
  4420. offset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;
  4421. }
  4422. setUint32$2(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);
  4423. setUint16(endOfdirectoryView, offset + 4, lastDiskNumber);
  4424. setUint16(endOfdirectoryView, offset + 6, diskNumber);
  4425. setUint16(endOfdirectoryView, offset + 8, filesLength);
  4426. setUint16(endOfdirectoryView, offset + 10, filesLength);
  4427. setUint32$2(endOfdirectoryView, offset + 12, directoryDataLength);
  4428. setUint32$2(endOfdirectoryView, offset + 16, directoryOffset);
  4429. const commentLength = getLength$1(comment);
  4430. if (commentLength) {
  4431. if (commentLength <= MAX_16_BITS) {
  4432. setUint16(endOfdirectoryView, offset + 20, commentLength);
  4433. } else {
  4434. throw new Error$1(ERR_INVALID_COMMENT);
  4435. }
  4436. }
  4437. await writeData$1(writable, endOfdirectoryArray);
  4438. if (commentLength) {
  4439. await writeData$1(writable, comment);
  4440. }
  4441. }
  4442. async function writeData$1(writable, array) {
  4443. const streamWriter = writable.getWriter();
  4444. await streamWriter.ready;
  4445. writable.size += getLength$1(array);
  4446. await streamWriter.write(array);
  4447. streamWriter.releaseLock();
  4448. }
  4449. function getTimeNTFS(date) {
  4450. if (date) {
  4451. return ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));
  4452. }
  4453. }
  4454. function getOptionValue(zipWriter, options, name, defaultValue) {
  4455. const result = options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];
  4456. return result === UNDEFINED_VALUE ? defaultValue : result;
  4457. }
  4458. function getMaximumCompressedSize(uncompressedSize) {
  4459. return uncompressedSize + (5 * (Math$1.floor(uncompressedSize / 16383) + 1));
  4460. }
  4461. function setUint8(view, offset, value) {
  4462. view.setUint8(offset, value);
  4463. }
  4464. function setUint16(view, offset, value) {
  4465. view.setUint16(offset, value, true);
  4466. }
  4467. function setUint32$2(view, offset, value) {
  4468. view.setUint32(offset, value, true);
  4469. }
  4470. function setBigUint64(view, offset, value) {
  4471. view.setBigUint64(offset, value, true);
  4472. }
  4473. function arraySet(array, typedArray, offset) {
  4474. array.set(typedArray, offset);
  4475. }
  4476. function getDataView(array) {
  4477. return new DataView$1(array.buffer);
  4478. }
  4479. function getLength$1(...arrayLikes) {
  4480. let result = 0;
  4481. arrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));
  4482. return result;
  4483. }
  4484. /*
  4485. Copyright (c) 2022 Gildas Lormeau. All rights reserved.
  4486. Redistribution and use in source and binary forms, with or without
  4487. modification, are permitted provided that the following conditions are met:
  4488. 1. Redistributions of source code must retain the above copyright notice,
  4489. this list of conditions and the following disclaimer.
  4490. 2. Redistributions in binary form must reproduce the above copyright
  4491. notice, this list of conditions and the following disclaimer in
  4492. the documentation and/or other materials provided with the distribution.
  4493. 3. The names of the authors may not be used to endorse or promote products
  4494. derived from this software without specific prior written permission.
  4495. THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  4496. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WA RRANTIES OF MERCHANTABILITY AND
  4497. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
  4498. INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
  4499. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  4500. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  4501. OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  4502. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  4503. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  4504. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  4505. */
  4506. let baseURL;
  4507. try {
  4508. baseURL = (typeof document === 'undefined' && typeof location === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('single-file.js', document.baseURI).href));
  4509. } catch (_error) {
  4510. // ignored
  4511. }
  4512. configure({ baseURL });
  4513. e(configure);
  4514. var zip$1 = /*#__PURE__*/Object.freeze({
  4515. __proto__: null,
  4516. BlobReader: BlobReader,
  4517. BlobWriter: BlobWriter,
  4518. Data64URIReader: Data64URIReader,
  4519. Data64URIWriter: Data64URIWriter,
  4520. ERR_BAD_FORMAT: ERR_BAD_FORMAT,
  4521. ERR_CENTRAL_DIRECTORY_NOT_FOUND: ERR_CENTRAL_DIRECTORY_NOT_FOUND,
  4522. ERR_DUPLICATED_NAME: ERR_DUPLICATED_NAME,
  4523. ERR_ENCRYPTED: ERR_ENCRYPTED,
  4524. ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND: ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,
  4525. ERR_EOCDR_NOT_FOUND: ERR_EOCDR_NOT_FOUND,
  4526. ERR_EOCDR_ZIP64_NOT_FOUND: ERR_EOCDR_ZIP64_NOT_FOUND,
  4527. ERR_EXTRAFIELD_ZIP64_NOT_FOUND: ERR_EXTRAFIELD_ZIP64_NOT_FOUND,
  4528. ERR_HTTP_RANGE: ERR_HTTP_RANGE,
  4529. ERR_INVALID_COMMENT: ERR_INVALID_COMMENT,
  4530. ERR_INVALID_ENCRYPTION_STRENGTH: ERR_INVALID_ENCRYPTION_STRENGTH,
  4531. ERR_INVALID_ENTRY_COMMENT: ERR_INVALID_ENTRY_COMMENT,
  4532. ERR_INVALID_ENTRY_NAME: ERR_INVALID_ENTRY_NAME,
  4533. ERR_INVALID_EXTRAFIELD_DATA: ERR_INVALID_EXTRAFIELD_DATA,
  4534. ERR_INVALID_EXTRAFIELD_TYPE: ERR_INVALID_EXTRAFIELD_TYPE,
  4535. ERR_INVALID_PASSWORD: ERR_INVALID_PASSWORD,
  4536. ERR_INVALID_SIGNATURE: ERR_INVALID_SIGNATURE,
  4537. ERR_INVALID_VERSION: ERR_INVALID_VERSION,
  4538. ERR_ITERATOR_COMPLETED_TOO_SOON: ERR_ITERATOR_COMPLETED_TOO_SOON,
  4539. ERR_LOCAL_FILE_HEADER_NOT_FOUND: ERR_LOCAL_FILE_HEADER_NOT_FOUND,
  4540. ERR_SPLIT_ZIP_FILE: ERR_SPLIT_ZIP_FILE,
  4541. ERR_UNSUPPORTED_COMPRESSION: ERR_UNSUPPORTED_COMPRESSION,
  4542. ERR_UNSUPPORTED_ENCRYPTION: ERR_UNSUPPORTED_ENCRYPTION,
  4543. ERR_UNSUPPORTED_FORMAT: ERR_UNSUPPORTED_FORMAT,
  4544. HttpRangeReader: HttpRangeReader,
  4545. HttpReader: HttpReader,
  4546. Reader: Reader,
  4547. SplitDataReader: SplitDataReader,
  4548. SplitDataWriter: SplitDataWriter,
  4549. SplitZipReader: SplitZipReader,
  4550. SplitZipWriter: SplitZipWriter,
  4551. TextReader: TextReader,
  4552. TextWriter: TextWriter,
  4553. Uint8ArrayReader: Uint8ArrayReader,
  4554. Uint8ArrayWriter: Uint8ArrayWriter,
  4555. Writer: Writer,
  4556. ZipReader: ZipReader,
  4557. ZipWriter: ZipWriter,
  4558. configure: configure,
  4559. getMimeType: getMimeType,
  4560. initReader: initReader,
  4561. initShimAsyncCodec: initShimAsyncCodec,
  4562. initStream: initStream,
  4563. initWriter: initWriter,
  4564. readUint8Array: readUint8Array,
  4565. terminateWorkers: terminateWorkers
  4566. });
  4567. /*
  4568. * Copyright 2010-2022 Gildas Lormeau
  4569. * contact : gildas.lormeau <at> gmail.com
  4570. *
  4571. * This file is part of SingleFile.
  4572. *
  4573. * The code in this file is free software: you can redistribute it and/or
  4574. * modify it under the terms of the GNU Affero General Public License
  4575. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  4576. * of the License, or (at your option) any later version.
  4577. *
  4578. * The code in this file is distributed in the hope that it will be useful,
  4579. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  4580. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  4581. * General Public License for more details.
  4582. *
  4583. * As additional permission under GNU AGPL version 3 section 7, you may
  4584. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  4585. * AGPL normally required by section 4, provided you include this license
  4586. * notice and a URL through which recipients can access the Corresponding
  4587. * Source.
  4588. */
  4589. async function extract(content, { password, prompt = () => { }, shadowRootScriptURL, zipOptions = { useWebWorkers: false }, noBlobURL } = {}) {
  4590. const KNOWN_MIMETYPES = {
  4591. "gif": "image/gif",
  4592. "jpg": "image/jpeg",
  4593. "png": "image/png",
  4594. "tif": "image/tiff",
  4595. "tiff": "image/tiff",
  4596. "bmp": "image/bmp",
  4597. "ico": "image/vnd.microsoft.icon",
  4598. "webp": "image/webp",
  4599. "svg": "image/svg+xml",
  4600. "avi": "video/x-msvideo",
  4601. "ogv": "video/ogg",
  4602. "mp4": "video/mp4",
  4603. "mpeg": "video/mpeg",
  4604. "ts": "video/mp2t",
  4605. "webm": "video/webm",
  4606. "3gp": "video/3gpp",
  4607. "3g2": "video/3gpp",
  4608. "mp3": "audio/mpeg",
  4609. "oga": "audio/ogg",
  4610. "mid": "audio/midi",
  4611. "midi": "audio/midi",
  4612. "opus": "audio/opus",
  4613. "wav": "audio/wav",
  4614. "weba": "audio/webm",
  4615. "heif": "image/heif",
  4616. "heic": "image/heic",
  4617. "avif": "image/avif",
  4618. "apng": "image/apng",
  4619. "mov": "video/quicktime",
  4620. "otf": "font/otf",
  4621. "ttf": "font/ttf",
  4622. "woff": "font/woff",
  4623. "woff2": "font/woff2",
  4624. "eot": "application/vnd.ms-fontobject",
  4625. "pdf": "application/pdf"
  4626. };
  4627. const REGEXP_MATCH_STYLESHEET = /stylesheet_[0-9]+\.css/;
  4628. const REGEXP_MATCH_SCRIPT = /scripts\/[0-9]+\.js/;
  4629. const REGEXP_MATCH_ROOT_INDEX = /^([0-9_]+\/)?index\.html$/;
  4630. const REGEXP_MATCH_INDEX = /index\.html$/;
  4631. const REGEXP_MATCH_FRAMES = /frames\//;
  4632. const REGEXP_MATCH_MANIFEST = /manifest\.json$/;
  4633. const CHARSET_UTF8 = ";charset=utf-8";
  4634. const REGEXP_ESCAPE = /([{}()^$&.*?/+|[\\\\]|\]|-)/g;
  4635. if (Array.isArray(content)) {
  4636. content = new Blob([new Uint8Array(content)]);
  4637. }
  4638. zip.configure(zipOptions);
  4639. const blobReader = new zip.BlobReader(content);
  4640. const zipReader = new zip.ZipReader(blobReader);
  4641. const entries = await zipReader.getEntries();
  4642. const options = { password };
  4643. let docContent, origDocContent, url, resources = [], indexPages = [], textResources = [];
  4644. await Promise.all(entries.map(async entry => {
  4645. const { filename } = entry;
  4646. let dataWriter, content, textContent, mimeType;
  4647. const resourceInfo = {};
  4648. if (!options.password && entry.encrypted) {
  4649. options.password = prompt("Please enter the password to view the page");
  4650. }
  4651. if (filename.match(REGEXP_MATCH_INDEX) || filename.match(REGEXP_MATCH_STYLESHEET) || filename.match(REGEXP_MATCH_SCRIPT)) {
  4652. if (filename.match(REGEXP_MATCH_INDEX)) {
  4653. indexPages.push(resourceInfo);
  4654. } else {
  4655. textResources.push(resourceInfo);
  4656. }
  4657. dataWriter = new zip.TextWriter();
  4658. textContent = await entry.getData(dataWriter, options);
  4659. if (filename.match(REGEXP_MATCH_INDEX)) {
  4660. mimeType = "text/html" + CHARSET_UTF8;
  4661. } else {
  4662. if (filename.match(REGEXP_MATCH_STYLESHEET)) {
  4663. mimeType = "text/css" + CHARSET_UTF8;
  4664. } else if (filename.match(REGEXP_MATCH_SCRIPT)) {
  4665. mimeType = "text/javascript" + CHARSET_UTF8;
  4666. }
  4667. }
  4668. } else {
  4669. resources.push(resourceInfo);
  4670. const extension = filename.match(/\.([^.]+)/);
  4671. if (extension && extension[1] && KNOWN_MIMETYPES[extension[1]]) {
  4672. mimeType = KNOWN_MIMETYPES[extension[1]];
  4673. } else {
  4674. mimeType = "application/octet-stream";
  4675. }
  4676. if (filename.match(REGEXP_MATCH_FRAMES) || noBlobURL) {
  4677. content = await entry.getData(new zip.Data64URIWriter(mimeType), options);
  4678. } else {
  4679. const blob = await entry.getData(new zip.BlobWriter(mimeType), options);
  4680. content = URL.createObjectURL(blob);
  4681. }
  4682. }
  4683. const name = entry.filename.match(/^([0-9_]+\/)?(.*)$/)[2];
  4684. let prefixPath = "";
  4685. const prefixPathMatch = filename.match(/(.*\/)[^/]+$/);
  4686. if (prefixPathMatch && prefixPathMatch[1]) {
  4687. prefixPath = prefixPathMatch[1];
  4688. }
  4689. Object.assign(resourceInfo, {
  4690. prefixPath,
  4691. filename: entry.filename,
  4692. name,
  4693. url: entry.comment,
  4694. content,
  4695. mimeType,
  4696. textContent,
  4697. parentResources: []
  4698. });
  4699. }));
  4700. await zipReader.close();
  4701. indexPages.sort(sortByFilenameLengthDec);
  4702. textResources.sort(sortByFilenameLengthInc);
  4703. resources = resources.sort(sortByFilenameLengthDec).concat(...textResources).concat(...indexPages);
  4704. for (const resource of resources) {
  4705. const { filename, prefixPath } = resource;
  4706. let { textContent } = resource;
  4707. if (textContent !== undefined) {
  4708. if (filename.match(REGEXP_MATCH_ROOT_INDEX)) {
  4709. origDocContent = textContent;
  4710. }
  4711. if (!filename.match(REGEXP_MATCH_SCRIPT)) {
  4712. resources.forEach(innerResource => {
  4713. const { filename, parentResources, content } = innerResource;
  4714. if (filename.startsWith(prefixPath) && filename != resource.filename) {
  4715. const relativeFilename = filename.substring(prefixPath.length);
  4716. if (!relativeFilename.match(REGEXP_MATCH_MANIFEST)) {
  4717. if (textContent.includes(relativeFilename)) {
  4718. parentResources.push(resource.filename);
  4719. if (innerResource.textContent === undefined) {
  4720. textContent = replaceAll(textContent, relativeFilename, content);
  4721. }
  4722. }
  4723. }
  4724. }
  4725. });
  4726. resource.textContent = textContent;
  4727. }
  4728. }
  4729. }
  4730. for (const resource of resources) {
  4731. let { textContent, prefixPath, filename } = resource;
  4732. if (textContent !== undefined) {
  4733. if (!filename.match(REGEXP_MATCH_SCRIPT)) {
  4734. const resourceFilename = filename;
  4735. for (const innerResource of resources) {
  4736. const { filename } = innerResource;
  4737. if (filename.startsWith(prefixPath) && filename != resourceFilename) {
  4738. const relativeFilename = filename.substring(prefixPath.length);
  4739. if (!relativeFilename.match(REGEXP_MATCH_MANIFEST)) {
  4740. const position = textContent.indexOf(relativeFilename);
  4741. if (position != -1) {
  4742. innerResource.content = await getContent(innerResource);
  4743. textContent = replaceAll(textContent, relativeFilename, innerResource.content);
  4744. }
  4745. }
  4746. }
  4747. }
  4748. resource.textContent = textContent;
  4749. resource.content = await getContent(resource);
  4750. }
  4751. if (filename.match(REGEXP_MATCH_INDEX)) {
  4752. if (shadowRootScriptURL) {
  4753. resource.textContent = textContent.replace(/<script data-template-shadow-root.*<\/script>/g, "<script data-template-shadow-root src=" + shadowRootScriptURL + "></" + "script>");
  4754. }
  4755. }
  4756. if (filename.match(REGEXP_MATCH_ROOT_INDEX)) {
  4757. docContent = textContent;
  4758. url = resource.url;
  4759. }
  4760. }
  4761. }
  4762. return { docContent, origDocContent, resources, url };
  4763. async function getContent(resource) {
  4764. return resource.filename.match(REGEXP_MATCH_FRAMES) || noBlobURL ? await getDataURI(resource.textContent, resource.mimeType) : URL.createObjectURL(new Blob([resource.textContent], { type: resource.mimeType }));
  4765. }
  4766. async function getDataURI(textContent, mimeType) {
  4767. const reader = new FileReader();
  4768. reader.readAsDataURL(new Blob([textContent], { type: mimeType }));
  4769. return new Promise((resolve, reject) => {
  4770. reader.onload = () => resolve(reader.result.replace(CHARSET_UTF8, ""));
  4771. reader.onerror = reject;
  4772. });
  4773. }
  4774. function replaceAll(string, search, replacement) {
  4775. if (typeof string.replaceAll == "function") {
  4776. return string.replaceAll(search, replacement);
  4777. } else {
  4778. const searchRegExp = new RegExp(search.replace(REGEXP_ESCAPE, "\\$1"), "g");
  4779. return string.replace(searchRegExp, replacement);
  4780. }
  4781. }
  4782. function sortByFilenameLengthDec(resourceLeft, resourceRight) {
  4783. const lengthDifference = resourceRight.filename.length - resourceLeft.filename.length;
  4784. if (lengthDifference) {
  4785. return lengthDifference;
  4786. } else {
  4787. return resourceRight.filename.localeCompare(resourceLeft.filename);
  4788. }
  4789. }
  4790. function sortByFilenameLengthInc(resourceLeft, resourceRight) {
  4791. const lengthDifference = resourceLeft.filename.length - resourceRight.filename.length;
  4792. if (lengthDifference) {
  4793. return lengthDifference;
  4794. } else {
  4795. return resourceLeft.filename.localeCompare(resourceRight.filename);
  4796. }
  4797. }
  4798. }
  4799. /*
  4800. * Copyright 2010-2022 Gildas Lormeau
  4801. * contact : gildas.lormeau <at> gmail.com
  4802. *
  4803. * This file is part of SingleFile.
  4804. *
  4805. * The code in this file is free software: you can redistribute it and/or
  4806. * modify it under the terms of the GNU Affero General Public License
  4807. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  4808. * of the License, or (at your option) any later version.
  4809. *
  4810. * The code in this file is distributed in the hope that it will be useful,
  4811. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  4812. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  4813. * General Public License for more details.
  4814. *
  4815. * As additional permission under GNU AGPL version 3 section 7, you may
  4816. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  4817. * AGPL normally required by section 4, provided you include this license
  4818. * notice and a URL through which recipients can access the Corresponding
  4819. * Source.
  4820. */
  4821. async function display(document, docContent, { disableFramePointerEvents } = {}) {
  4822. docContent = docContent.replace(/<noscript/gi, "<template disabled-noscript");
  4823. docContent = docContent.replaceAll(/<\/noscript/gi, "</template");
  4824. const doc = (new DOMParser()).parseFromString(docContent, "text/html");
  4825. if (disableFramePointerEvents) {
  4826. doc.querySelectorAll("iframe").forEach(element => {
  4827. const pointerEvents = "pointer-events";
  4828. element.style.setProperty("-sf-" + pointerEvents, element.style.getPropertyValue(pointerEvents), element.style.getPropertyPriority(pointerEvents));
  4829. element.style.setProperty(pointerEvents, "none", "important");
  4830. });
  4831. }
  4832. document.open();
  4833. document.write(getDoctypeString(doc));
  4834. document.write(doc.documentElement.outerHTML);
  4835. document.close();
  4836. document.querySelectorAll("template[disabled-noscript]").forEach(element => {
  4837. const noscriptElement = document.createElement("noscript");
  4838. element.removeAttribute("disabled-noscript");
  4839. Array.from(element.attributes).forEach(attribute => noscriptElement.setAttribute(attribute.name, attribute.value));
  4840. noscriptElement.textContent = element.innerHTML;
  4841. element.parentElement.replaceChild(noscriptElement, element);
  4842. });
  4843. document.documentElement.setAttribute("data-sfz", "");
  4844. document.querySelectorAll("link[rel*=icon]").forEach(element => element.parentElement.replaceChild(element, element));
  4845. function getDoctypeString(doc) {
  4846. const docType = doc.doctype;
  4847. let docTypeString = "";
  4848. if (docType) {
  4849. docTypeString = "<!DOCTYPE " + docType.nodeName;
  4850. if (docType.publicId) {
  4851. docTypeString += " PUBLIC \"" + docType.publicId + "\"";
  4852. if (docType.systemId)
  4853. docTypeString += " \"" + docType.systemId + "\"";
  4854. } else if (docType.systemId)
  4855. docTypeString += " SYSTEM \"" + docType.systemId + "\"";
  4856. if (docType.internalSubset)
  4857. docTypeString += " [" + docType.internalSubset + "]";
  4858. docTypeString += "> ";
  4859. }
  4860. return docTypeString;
  4861. }
  4862. }
  4863. /*
  4864. * Copyright 2010-2022 Gildas Lormeau
  4865. * contact : gildas.lormeau <at> gmail.com
  4866. *
  4867. * This file is part of SingleFile.
  4868. *
  4869. * The code in this file is free software: you can redistribute it and/or
  4870. * modify it under the terms of the GNU Affero General Public License
  4871. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  4872. * of the License, or (at your option) any later version.
  4873. *
  4874. * The code in this file is distributed in the hope that it will be useful,
  4875. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  4876. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  4877. * General Public License for more details.
  4878. *
  4879. * As additional permission under GNU AGPL version 3 section 7, you may
  4880. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  4881. * AGPL normally required by section 4, provided you include this license
  4882. * notice and a URL through which recipients can access the Corresponding
  4883. * Source.
  4884. */
  4885. const { Blob: Blob$5, fetch: fetch$2, TextEncoder: TextEncoder$1, DOMParser: DOMParser$2 } = globalThis;
  4886. const NO_COMPRESSION_EXTENSIONS = [".jpg", ".jpeg", ".png", ".avi", ".apng", ".pdf", ".woff2", ".mp4", ".mp3", ".ogg", ".webp", ".webm", ".avi", ".mpeg", ".ts", ".ogv", ".heif", ".heic"];
  4887. const SCRIPT_PATH = "/lib/single-file-zip.min.js";
  4888. const EXTRA_DATA_TAGS = [
  4889. ["<noscript>", "</noscript>"],
  4890. ["<script type=sfz-data>", "</script>"],
  4891. ["<xmp>", "</xmp>"],
  4892. ["<plaintext>", "</plaintext>"]
  4893. ];
  4894. const EMBEDDED_IMAGE_DATA_TAGS = [
  4895. ["<!--", "-->"],
  4896. ...EXTRA_DATA_TAGS,
  4897. ];
  4898. const EXTRA_DATA_REGEXPS = [
  4899. [/<noscript/i, /<\/noscript>/i],
  4900. [/<script/i, /<\/script>/i],
  4901. [/<xmp/i, /<\/xmp>/i],
  4902. [/<plaintext/i, /<\/plaintext>/i]
  4903. ];
  4904. const EMBEDDED_IMAGE_DATA_REGEXPS = [
  4905. [/<!--/i, /-->/i],
  4906. ...EXTRA_DATA_REGEXPS,
  4907. ];
  4908. const CRC32_TABLE = new Uint32Array(256).map((_, indexTable) => {
  4909. let crc = indexTable;
  4910. for (let indexBits = 0; indexBits < 8; indexBits++) {
  4911. crc = crc & 1 ? 0xEDB88320 ^ (crc >>> 1) : crc >>> 1;
  4912. }
  4913. return crc;
  4914. });
  4915. const PNG_IEND_LENGTH = 12;
  4916. const PNG_SIGNATURE_LENGTH = 8;
  4917. const PNG_IHDR_LENGTH = 25;
  4918. const browser$2 = globalThis.browser;
  4919. async function process$9(pageData, options, lastModDate = new Date()) {
  4920. let script;
  4921. if (options.zipScript) {
  4922. script = options.zipScript;
  4923. } else if (browser$2 && browser$2.runtime && browser$2.runtime.getURL) {
  4924. configure({ workerScripts: { deflate: ["/lib/single-file-z-worker.js"] } });
  4925. script = await (await fetch$2(browser$2.runtime.getURL(SCRIPT_PATH))).text();
  4926. }
  4927. const zipDataWriter = new Uint8ArrayWriter();
  4928. zipDataWriter.init();
  4929. zipDataWriter.writable.size = 0;
  4930. let extraDataOffset, extraData, embeddedImageDataOffset, endTag;
  4931. if (options.embeddedImage) {
  4932. options.embeddedImage = Array.from(options.embeddedImage);
  4933. const embeddedImageData = options.embeddedImage.slice(PNG_SIGNATURE_LENGTH + PNG_IHDR_LENGTH, options.embeddedImage.length - PNG_IEND_LENGTH);
  4934. await writeData(zipDataWriter.writable, options.embeddedImage.slice(0, PNG_SIGNATURE_LENGTH + PNG_IHDR_LENGTH));
  4935. if (options.selfExtractingArchive) {
  4936. const embeddedImageText = embeddedImageData.reduce((text, charCode) => text + String.fromCharCode(charCode), "");
  4937. const tagIndex = EMBEDDED_IMAGE_DATA_REGEXPS.findIndex(tests => !embeddedImageText.match(tests[1]));
  4938. let startTag;
  4939. [startTag, endTag] = tagIndex == -1 ? ["", ""] : EMBEDDED_IMAGE_DATA_TAGS[tagIndex];
  4940. const html = getHTMLStartData(pageData, options) + startTag;
  4941. const hmtlData = new Uint8Array([...getLength(html.length + 4), ...new Uint8Array([0x74, 0x54, 0x58, 0x74, 0x50, 0x4e, 0x47, 0]), ...new TextEncoder$1().encode(html)]);
  4942. await writeData(zipDataWriter.writable, hmtlData);
  4943. await writeData(zipDataWriter.writable, getCRC32(hmtlData, 4));
  4944. }
  4945. await writeData(zipDataWriter.writable, embeddedImageData);
  4946. await writeData(zipDataWriter.writable, new Uint8Array(4));
  4947. embeddedImageDataOffset = zipDataWriter.offset;
  4948. await writeData(zipDataWriter.writable, new Uint8Array([0x74, 0x54, 0x58, 0x74, 0x5a, 0x49, 0x50, 0]));
  4949. if (options.selfExtractingArchive) {
  4950. await writeData(zipDataWriter.writable, new TextEncoder$1().encode(endTag));
  4951. }
  4952. }
  4953. if (options.selfExtractingArchive) {
  4954. extraDataOffset = await prependHTMLData(pageData, zipDataWriter, script, options);
  4955. }
  4956. const zipWriter = new ZipWriter(zipDataWriter, { bufferedWrite: true, keepOrder: false, lastModDate });
  4957. const startOffset = zipDataWriter.offset;
  4958. pageData.url = options.url;
  4959. pageData.archiveTime = (new Date()).toISOString();
  4960. await addPageResources(zipWriter, pageData, { password: options.password }, options.createRootDirectory ? String(Date.now()) + "_" + (options.tabId || 0) + "/" : "", options.url);
  4961. const data = await zipWriter.close(null, { preventClose: true });
  4962. if (options.selfExtractingArchive) {
  4963. const insertionsCRLF = [];
  4964. const substitutionsLF = [];
  4965. if (options.extractDataFromPage) {
  4966. if (!options.extractDataFromPageTags) {
  4967. let textContent = "";
  4968. data.slice(startOffset).forEach(charCode => textContent += String.fromCharCode(charCode));
  4969. const matchCommentTags = textContent.match(/<!--/i) || textContent.match(/-->/i);
  4970. if (matchCommentTags) {
  4971. return findExtraDataTags(textContent, pageData, options, lastModDate);
  4972. }
  4973. }
  4974. for (let index = startOffset; index < data.length; index++) {
  4975. if (data[index] == 13) {
  4976. if (data[index + 1] == 10) {
  4977. insertionsCRLF.push(index - startOffset);
  4978. } else {
  4979. substitutionsLF.push(index - startOffset);
  4980. }
  4981. }
  4982. }
  4983. }
  4984. let pageContent = "";
  4985. if (!options.preventAppendedData) {
  4986. if (options.extractDataFromPageTags) {
  4987. pageContent += options.extractDataFromPageTags[1];
  4988. } else {
  4989. pageContent += "-->";
  4990. }
  4991. }
  4992. const endTags = options.preventAppendedData || options.embeddedImage ? "" : "</body></html>";
  4993. if (options.extractDataFromPage) {
  4994. const payload = await Promise.all([
  4995. arrayToBase64(insertionsCRLF),
  4996. arrayToBase64(substitutionsLF)
  4997. ]);
  4998. extraData = "<sfz-extra-data>" + payload.join(",") + "</sfz-extra-data>";
  4999. if (options.preventAppendedData || extraData.length > 65535 - endTags.length - (options.embeddedImage ? PNG_IEND_LENGTH : 0)) {
  5000. if (!options.extraDataSize) {
  5001. options.extraDataSize = Math.floor(extraData.length * 1.001);
  5002. return process$9(pageData, options, lastModDate);
  5003. }
  5004. } else {
  5005. if (options.extraDataSize) {
  5006. options.extraDataSize = undefined;
  5007. return process$9(pageData, options, lastModDate);
  5008. } else {
  5009. pageContent += extraData;
  5010. }
  5011. }
  5012. }
  5013. pageContent += endTags;
  5014. await writeData(zipDataWriter.writable, (new TextEncoder$1()).encode(pageContent));
  5015. }
  5016. await zipDataWriter.writable.close();
  5017. const pageContent = await zipDataWriter.getData();
  5018. if (options.extractDataFromPage && options.extraDataSize !== undefined) {
  5019. if (options.extraDataSize >= extraData.length) {
  5020. pageContent.set(Array.from(extraData).map(character => character.charCodeAt(0)), startOffset - extraDataOffset);
  5021. } else {
  5022. options.extraData = extraData;
  5023. options.extraDataSize = Math.floor(extraData.length * 1.001);
  5024. return process$9(pageData, options, lastModDate);
  5025. }
  5026. }
  5027. if (options.embeddedImage) {
  5028. pageContent.set(getLength(zipDataWriter.offset - embeddedImageDataOffset - 4), embeddedImageDataOffset - 4);
  5029. return new Blob$5([
  5030. pageContent,
  5031. getCRC32(pageContent, embeddedImageDataOffset),
  5032. new Uint8Array(options.embeddedImage.slice(options.embeddedImage.length - PNG_IEND_LENGTH))
  5033. ], { type: "application/octet-stream" });
  5034. } else {
  5035. return new Blob$5([pageContent], { type: "application/octet-stream" });
  5036. }
  5037. }
  5038. function getCRC32(data, indexData = 0) {
  5039. const crcArray = new Uint8Array(4);
  5040. let crc = -1;
  5041. for (; indexData < data.length; indexData++) {
  5042. crc = (crc >>> 8) ^ CRC32_TABLE[(crc ^ data[indexData]) & 0xff];
  5043. }
  5044. crc ^= -1;
  5045. setUint32(crcArray, crc);
  5046. return crcArray;
  5047. }
  5048. function getLength(length) {
  5049. const lengthArray = new Uint8Array(4);
  5050. setUint32(lengthArray, length);
  5051. return lengthArray;
  5052. }
  5053. function setUint32(data, value) {
  5054. data[0] = value >> 24;
  5055. data[1] = value >> 16;
  5056. data[2] = value >> 8;
  5057. data[3] = value;
  5058. }
  5059. async function prependHTMLData(pageData, zipDataWriter, script, options) {
  5060. let pageContent = "";
  5061. if (!options.embeddedImage) {
  5062. pageContent += getHTMLStartData(pageData, options);
  5063. }
  5064. pageContent += "<div id=sfz-wait-message>Please wait...</div>";
  5065. pageContent += "<div id=sfz-error-message><strong>Error</strong>: Cannot open the page from the filesystem.";
  5066. pageContent += "<ul style='line-height:20px;'>";
  5067. pageContent += "<li style='margin-bottom:10px'><strong>Chrome</strong>: Install <a href='https://chrome.google.com/webstore/detail/singlefile/mpiodijhokgodhhofbcjdecpffjipkle'>SingleFile</a> and enable the option \"Allow access to file URLs\" in the details page of the extension (chrome://extensions/?id=mpiodijhokgodhhofbcjdecpffjipkle).</li>";
  5068. pageContent += "<li style='margin-bottom:10px'><strong>Microsoft Edge</strong>: Install <a href='https://microsoftedge.microsoft.com/addons/detail/singlefile/efnbkdcfmcmnhlkaijjjmhjjgladedno'>SingleFile</a> and enable the option \"Allow access to file URLs\" in the details page of the extension (edge://extensions/?id=efnbkdcfmcmnhlkaijjjmhjjgladedno).</li>";
  5069. pageContent += "<li><strong>Safari</strong>: Select \"Security > Disable Local File Restrictions\" in the \"Develop > Developer settings\" menu.</li></ul></div>";
  5070. if (options.insertTextBody) {
  5071. const doc = (new DOMParser$2()).parseFromString(pageData.content, "text/html");
  5072. doc.body.querySelectorAll("style, script, noscript").forEach(element => element.remove());
  5073. let textBody = "";
  5074. if (options.extractDataFromPage) {
  5075. textBody += getPageTitle(pageData) + "\n\n";
  5076. }
  5077. textBody += doc.body.innerText;
  5078. doc.body.querySelectorAll("single-file-note").forEach(node => {
  5079. const template = node.querySelector("template");
  5080. if (template) {
  5081. const docTemplate = (new DOMParser$2()).parseFromString(template.innerHTML, "text/html");
  5082. textBody += "\n" + docTemplate.body.querySelector("textarea").value;
  5083. }
  5084. });
  5085. textBody = textBody.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n +/g, "\n").replace(/\n\n\n+/g, "\n\n").trim();
  5086. pageContent += "\n<main hidden>\n" + textBody + "\n</main>\n";
  5087. }
  5088. const displayOptions = {
  5089. insertEmbeddedImage: Boolean(options.embeddedImage),
  5090. insertEmbeddedScreenshotImage: Boolean(options.embeddedScreenshotImage)
  5091. };
  5092. script = "<script>" +
  5093. script +
  5094. "document.currentScript.remove();" +
  5095. "globalThis.addEventListener('load', () => {" +
  5096. "globalThis.bootstrap=(()=>{let bootstrapStarted;return async content=>{if (bootstrapStarted) return bootstrapStarted; bootstrapStarted = (" +
  5097. extract.toString().replace(/\n|\t/g, "") + ")(content,{prompt}).then(({docContent}) => " +
  5098. display.toString().replace(/\n|\t/g, "") + "(document,docContent," + JSON.stringify(displayOptions) + "));return bootstrapStarted;}})();(" +
  5099. getContent.toString().replace(/\n|\t/g, "") + ")().then(globalThis.bootstrap).then(() => document.dispatchEvent(new CustomEvent(\"single-file-display-infobar\"))).catch(()=>{});" +
  5100. "});" +
  5101. "</script>";
  5102. pageContent += script;
  5103. let extraData = "";
  5104. if (options.extractDataFromPage && options.extraDataSize) {
  5105. const extraTags = "<sfz-extra-data></sfz-extra-data>";
  5106. extraData += extraTags + new Array(options.extraDataSize - extraTags.length).fill(" ").join("");
  5107. }
  5108. pageContent += extraData;
  5109. const startTag = options.extractDataFromPageTags ? options.extractDataFromPageTags[0] : "<!--";
  5110. pageContent += startTag;
  5111. const extraDataOffset = startTag.length + extraData.length;
  5112. await writeData(zipDataWriter.writable, (new TextEncoder$1()).encode(pageContent));
  5113. return extraDataOffset;
  5114. }
  5115. function getHTMLStartData(pageData, options) {
  5116. let pageContent = "";
  5117. if (options.includeBOM && !options.extractDataFromPage && !options.embeddedImage) {
  5118. pageContent += "\ufeff";
  5119. }
  5120. const charset = options.extractDataFromPage ? "windows-1252" : "utf-8";
  5121. const title = options.extractDataFromPage ? "" : getPageTitle(pageData);
  5122. pageContent += options.embeddedImage ? "" : pageData.doctype;
  5123. pageContent += "<html data-sfz>";
  5124. pageContent += pageData.comment && !options.embeddedImage ? "<!--" + pageData.comment + "-->" : "";
  5125. pageContent += "<meta charset=" + charset + "><title>" + title + "</title>";
  5126. if (options.insertCanonicalLink) {
  5127. pageContent += "<link rel=canonical href=\"" + options.url + "\">";
  5128. }
  5129. if (options.insertMetaNoIndex) {
  5130. pageContent += "<meta name=robots content=noindex>";
  5131. }
  5132. if (pageData.viewport) {
  5133. pageContent += "<meta name=viewport content=" + JSON.stringify(pageData.viewport) + ">";
  5134. }
  5135. if (options.insertMetaCSP) {
  5136. pageContent += "<meta http-equiv=content-security-policy content=\"default-src 'none'; connect-src 'self' data: blob:; font-src 'self' data: blob:; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline' data: blob:; frame-src 'self' data: blob:; media-src 'self' data: blob:; script-src 'self' 'unsafe-inline' data: blob:; object-src 'self' data: blob:\">";
  5137. }
  5138. pageContent += "<style>@keyframes display-wait-message{0%{opacity:0}100%{opacity:1}};body{color:transparent};div{color:initial}</style>";
  5139. pageContent += "<body hidden>";
  5140. return pageContent;
  5141. }
  5142. function getPageTitle(pageData) {
  5143. return pageData.title.replace(/</g, "&lt;").replace(/>/g, "&gt;") || "";
  5144. }
  5145. function findExtraDataTags(textContent, pageData, options, lastModDate, indexExtractDataFromPageTags = 0) {
  5146. const regExpsTag = EXTRA_DATA_REGEXPS[indexExtractDataFromPageTags];
  5147. const matchTag = textContent.match(regExpsTag[0]) || textContent.match(regExpsTag[1]);
  5148. if (matchTag) {
  5149. if (indexExtractDataFromPageTags < EXTRA_DATA_TAGS.length - 1) {
  5150. return findExtraDataTags(textContent, pageData, options, lastModDate, indexExtractDataFromPageTags + 1);
  5151. } else {
  5152. options.extractDataFromPage = false;
  5153. return process$9(pageData, options, lastModDate);
  5154. }
  5155. } else {
  5156. options.extractDataFromPageTags = EXTRA_DATA_TAGS[indexExtractDataFromPageTags];
  5157. return process$9(pageData, options, lastModDate);
  5158. }
  5159. }
  5160. async function arrayToBase64(data) {
  5161. const fileReader = new FileReader();
  5162. return await new Promise(resolve => {
  5163. fileReader.onload = event => resolve(event.target.result.substring(37));
  5164. fileReader.readAsDataURL(new Blob$5([new Uint32Array(data)], { type: "application/octet-stream" }));
  5165. });
  5166. }
  5167. async function writeData(writable, array) {
  5168. const streamWriter = writable.getWriter();
  5169. await streamWriter.ready;
  5170. writable.size += array.length;
  5171. await streamWriter.write(array);
  5172. streamWriter.releaseLock();
  5173. }
  5174. async function addPageResources(zipWriter, pageData, options, prefixName, url) {
  5175. const resources = {};
  5176. for (const resourceType of Object.keys(pageData.resources)) {
  5177. for (const data of pageData.resources[resourceType]) {
  5178. data.password = options.password;
  5179. if (data.url && !data.url.startsWith("data:")) {
  5180. resources[data.name] = data.url;
  5181. }
  5182. }
  5183. }
  5184. const jsonContent = JSON.stringify({
  5185. originalUrl: pageData.url,
  5186. title: pageData.title,
  5187. archiveTime: pageData.archiveTime,
  5188. indexFilename: "index.html",
  5189. resources
  5190. }, null, 2);
  5191. await Promise.all([
  5192. Promise.all([
  5193. addFile(zipWriter, prefixName, { name: "index.html", extension: ".html", content: pageData.content, url, password: options.password }),
  5194. addFile(zipWriter, prefixName, { name: "manifest.json", extension: ".json", content: jsonContent, password: options.password })
  5195. ]),
  5196. Promise.all(Object.keys(pageData.resources).map(async resourceType =>
  5197. Promise.all(pageData.resources[resourceType].map(data => {
  5198. if (resourceType == "frames") {
  5199. return addPageResources(zipWriter, data, options, prefixName + data.name, data.url);
  5200. } else {
  5201. return addFile(zipWriter, prefixName, data);
  5202. }
  5203. }))
  5204. ))
  5205. ]);
  5206. }
  5207. async function addFile(zipWriter, prefixName, data) {
  5208. const dataReader = typeof data.content == "string" ? new TextReader(data.content) : new BlobReader(new Blob$5([new Uint8Array(data.content)]));
  5209. const options = { comment: data.url && data.url.startsWith("data:") ? "data:" : data.url, password: data.password, bufferedWrite: true };
  5210. if (NO_COMPRESSION_EXTENSIONS.includes(data.extension)) {
  5211. options.level = 0;
  5212. }
  5213. await zipWriter.add(prefixName + data.name, dataReader, options);
  5214. }
  5215. async function getContent() {
  5216. const { Blob, XMLHttpRequest, fetch, document, stop } = globalThis;
  5217. const characterMap = new Map([
  5218. [65533, 0], [8364, 128], [8218, 130], [402, 131], [8222, 132], [8230, 133], [8224, 134], [8225, 135], [710, 136], [8240, 137],
  5219. [352, 138], [8249, 139], [338, 140], [381, 142], [8216, 145], [8217, 146], [8220, 147], [8221, 148], [8226, 149], [8211, 150],
  5220. [8212, 151], [732, 152], [8482, 153], [353, 154], [8250, 155], [339, 156], [382, 158], [376, 159]
  5221. ]);
  5222. const xhr = new XMLHttpRequest();
  5223. document.body.querySelectorAll("meta, style").forEach(element => document.head.appendChild(element));
  5224. xhr.responseType = "blob";
  5225. xhr.open("GET", "");
  5226. return new Promise((resolve, reject) => {
  5227. xhr.onerror = () => {
  5228. extractPageData().then(resolve).catch(() => {
  5229. displayMessage("sfz-error-message", 2);
  5230. reject();
  5231. });
  5232. };
  5233. xhr.send();
  5234. xhr.onload = () => {
  5235. stop();
  5236. displayMessage("sfz-wait-message", 2);
  5237. resolve(xhr.response);
  5238. };
  5239. });
  5240. function displayMessage(elementId, delay = 0) {
  5241. const element = document.getElementById(elementId);
  5242. if (element) {
  5243. Array.from(document.body.childNodes).forEach(node => {
  5244. if (node.id != elementId) {
  5245. node.remove();
  5246. }
  5247. });
  5248. document.body.hidden = false;
  5249. element.style = "opacity: 0; animation: 0s linear " + delay + "s display-wait-message 1 normal forwards";
  5250. }
  5251. }
  5252. async function extractPageData() {
  5253. const zipDataElement = document.querySelector("sfz-extra-data");
  5254. if (zipDataElement) {
  5255. let dataNode = zipDataElement.nextSibling;
  5256. if (dataNode) {
  5257. if (dataNode.nodeType == Node.TEXT_NODE && dataNode.nextSibling) {
  5258. dataNode = dataNode.nextSibling;
  5259. } else {
  5260. dataNode = zipDataElement.previousSibling;
  5261. }
  5262. } else {
  5263. dataNode = zipDataElement.previousSibling;
  5264. }
  5265. const zipData = [];
  5266. let { textContent } = dataNode;
  5267. displayMessage("sfz-wait-message", 2);
  5268. for (let index = 0; index < textContent.length; index++) {
  5269. const charCode = textContent.charCodeAt(index);
  5270. zipData.push(charCode > 255 ? characterMap.get(charCode) : charCode);
  5271. }
  5272. const [insertionsCRLFData, substitutionsLFData] = zipDataElement.textContent.split(",");
  5273. const insertionsCRLF = await base64ToUint32Array(insertionsCRLFData);
  5274. const substitutionsLF = await base64ToUint32Array(substitutionsLFData);
  5275. insertionsCRLF.forEach(index => zipData.splice(index, 1, 13, 10));
  5276. substitutionsLF.forEach(index => zipData[index] = 13);
  5277. return new Blob([new Uint8Array(zipData)], { type: "application/octet-stream" });
  5278. }
  5279. throw new Error("Extra zip data data not found");
  5280. }
  5281. async function base64ToUint32Array(data) {
  5282. return new Uint32Array(await (await fetch("data:application/octet-stream;base64," + data)).arrayBuffer());
  5283. }
  5284. }
  5285. var compression = /*#__PURE__*/Object.freeze({
  5286. __proto__: null,
  5287. process: process$9
  5288. });
  5289. /*
  5290. * Copyright 2010-2022 Gildas Lormeau
  5291. * contact : gildas.lormeau <at> gmail.com
  5292. *
  5293. * This file is part of SingleFile.
  5294. *
  5295. * The code in this file is free software: you can redistribute it and/or
  5296. * modify it under the terms of the GNU Affero General Public License
  5297. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  5298. * of the License, or (at your option) any later version.
  5299. *
  5300. * The code in this file is distributed in the hope that it will be useful,
  5301. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  5302. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  5303. * General Public License for more details.
  5304. *
  5305. * As additional permission under GNU AGPL version 3 section 7, you may
  5306. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  5307. * AGPL normally required by section 4, provided you include this license
  5308. * notice and a URL through which recipients can access the Corresponding
  5309. * Source.
  5310. */
  5311. /* global globalThis, window */
  5312. const LOAD_DEFERRED_IMAGES_START_EVENT = "single-file-load-deferred-images-start";
  5313. const LOAD_DEFERRED_IMAGES_END_EVENT = "single-file-load-deferred-images-end";
  5314. const LOAD_DEFERRED_IMAGES_KEEP_ZOOM_LEVEL_START_EVENT = "single-file-load-deferred-images-keep-zoom-level-start";
  5315. const LOAD_DEFERRED_IMAGES_KEEP_ZOOM_LEVEL_END_EVENT = "single-file-load-deferred-images-keep-zoom-level-end";
  5316. const LOAD_DEFERRED_IMAGES_RESET_ZOOM_LEVEL_EVENT = "single-file-load-deferred-images-keep-zoom-level-reset";
  5317. const LOAD_DEFERRED_IMAGES_RESET_EVENT = "single-file-load-deferred-images-reset";
  5318. const BLOCK_COOKIES_START_EVENT = "single-file-block-cookies-start";
  5319. const BLOCK_COOKIES_END_EVENT = "single-file-block-cookies-end";
  5320. const DISPATCH_SCROLL_START_EVENT = "single-file-dispatch-scroll-event-start";
  5321. const DISPATCH_SCROLL_END_EVENT = "single-file-dispatch-scroll-event-end";
  5322. const BLOCK_STORAGE_START_EVENT = "single-file-block-storage-start";
  5323. const BLOCK_STORAGE_END_EVENT = "single-file-block-storage-end";
  5324. const LOAD_IMAGE_EVENT = "single-file-load-image";
  5325. const IMAGE_LOADED_EVENT = "single-file-image-loaded";
  5326. const NEW_FONT_FACE_EVENT = "single-file-new-font-face";
  5327. const DELETE_FONT_EVENT = "single-file-delete-font";
  5328. const CLEAR_FONTS_EVENT = "single-file-clear-fonts";
  5329. const FONT_FACE_PROPERTY_NAME = "_singleFile_fontFaces";
  5330. const CustomEvent$1 = globalThis.CustomEvent;
  5331. const document$3 = globalThis.document;
  5332. const Document = globalThis.Document;
  5333. const JSON$6 = globalThis.JSON;
  5334. const MutationObserver$3 = globalThis.MutationObserver;
  5335. let fontFaces;
  5336. if (window[FONT_FACE_PROPERTY_NAME]) {
  5337. fontFaces = window[FONT_FACE_PROPERTY_NAME];
  5338. } else {
  5339. fontFaces = window[FONT_FACE_PROPERTY_NAME] = new Map();
  5340. }
  5341. init$2();
  5342. new MutationObserver$3(init$2).observe(document$3, { childList: true });
  5343. function init$2() {
  5344. if (document$3 instanceof Document) {
  5345. document$3.addEventListener(NEW_FONT_FACE_EVENT, event => {
  5346. const detail = event.detail;
  5347. const key = Object.assign({}, detail);
  5348. delete key.src;
  5349. fontFaces.set(JSON$6.stringify(key), detail);
  5350. });
  5351. document$3.addEventListener(DELETE_FONT_EVENT, event => {
  5352. const detail = event.detail;
  5353. const key = Object.assign({}, detail);
  5354. delete key.src;
  5355. fontFaces.delete(JSON$6.stringify(key));
  5356. });
  5357. document$3.addEventListener(CLEAR_FONTS_EVENT, () => fontFaces = new Map());
  5358. }
  5359. }
  5360. function getFontsData$1() {
  5361. return Array.from(fontFaces.values());
  5362. }
  5363. function loadDeferredImagesStart(options) {
  5364. if (options.loadDeferredImagesBlockCookies) {
  5365. document$3.dispatchEvent(new CustomEvent$1(BLOCK_COOKIES_START_EVENT));
  5366. }
  5367. if (options.loadDeferredImagesBlockStorage) {
  5368. document$3.dispatchEvent(new CustomEvent$1(BLOCK_STORAGE_START_EVENT));
  5369. }
  5370. if (options.loadDeferredImagesDispatchScrollEvent) {
  5371. document$3.dispatchEvent(new CustomEvent$1(DISPATCH_SCROLL_START_EVENT));
  5372. }
  5373. if (options.loadDeferredImagesKeepZoomLevel) {
  5374. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_KEEP_ZOOM_LEVEL_START_EVENT));
  5375. } else {
  5376. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_START_EVENT));
  5377. }
  5378. }
  5379. function loadDeferredImagesEnd(options) {
  5380. if (options.loadDeferredImagesBlockCookies) {
  5381. document$3.dispatchEvent(new CustomEvent$1(BLOCK_COOKIES_END_EVENT));
  5382. }
  5383. if (options.loadDeferredImagesBlockStorage) {
  5384. document$3.dispatchEvent(new CustomEvent$1(BLOCK_STORAGE_END_EVENT));
  5385. }
  5386. if (options.loadDeferredImagesDispatchScrollEvent) {
  5387. document$3.dispatchEvent(new CustomEvent$1(DISPATCH_SCROLL_END_EVENT));
  5388. }
  5389. if (options.loadDeferredImagesKeepZoomLevel) {
  5390. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_KEEP_ZOOM_LEVEL_END_EVENT));
  5391. } else {
  5392. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_END_EVENT));
  5393. }
  5394. }
  5395. function loadDeferredImagesResetZoomLevel(options) {
  5396. if (options.loadDeferredImagesKeepZoomLevel) {
  5397. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_RESET_ZOOM_LEVEL_EVENT));
  5398. } else {
  5399. document$3.dispatchEvent(new CustomEvent$1(LOAD_DEFERRED_IMAGES_RESET_EVENT));
  5400. }
  5401. }
  5402. var contentHooksFrames = /*#__PURE__*/Object.freeze({
  5403. __proto__: null,
  5404. getFontsData: getFontsData$1,
  5405. loadDeferredImagesStart: loadDeferredImagesStart,
  5406. loadDeferredImagesEnd: loadDeferredImagesEnd,
  5407. loadDeferredImagesResetZoomLevel: loadDeferredImagesResetZoomLevel,
  5408. LOAD_IMAGE_EVENT: LOAD_IMAGE_EVENT,
  5409. IMAGE_LOADED_EVENT: IMAGE_LOADED_EVENT
  5410. });
  5411. /*
  5412. * The MIT License (MIT)
  5413. *
  5414. * Author: Gildas Lormeau
  5415. *
  5416. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5417. * of this software and associated documentation files (the "Software"), to deal
  5418. * in the Software without restriction, including without limitation the rights
  5419. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  5420. * copies of the Software, and to permit persons to whom the Software is
  5421. * furnished to do so, subject to the following conditions:
  5422. *
  5423. * The above copyright notice and this permission notice shall be included in all
  5424. * copies or substantial portions of the Software.
  5425. *
  5426. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  5427. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  5428. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  5429. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  5430. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  5431. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  5432. * SOFTWARE.
  5433. */
  5434. // derived from https://github.com/postcss/postcss-selector-parser/blob/master/src/util/unesc.js
  5435. /*
  5436. * The MIT License (MIT)
  5437. * Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
  5438. *
  5439. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5440. * of this software and associated documentation files (the "Software"), to deal
  5441. * in the Software without restriction, including without limitation the rights
  5442. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  5443. * copies of the Software, and to permit persons to whom the Software is
  5444. * furnished to do so, subject to the following conditions:
  5445. *
  5446. * The above copyright notice and this permission notice shall be included in
  5447. * all copies or substantial portions of the Software.
  5448. *
  5449. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  5450. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  5451. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  5452. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  5453. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  5454. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  5455. * THE SOFTWARE.
  5456. */
  5457. const whitespace = "[\\x20\\t\\r\\n\\f]";
  5458. const unescapeRegExp = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig");
  5459. function process$8(str) {
  5460. return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
  5461. const high = "0x" + escaped - 0x10000;
  5462. // NaN means non-codepoint
  5463. // Workaround erroneous numeric interpretation of +"0x"
  5464. // eslint-disable-next-line no-self-compare
  5465. return high !== high || escapedWhitespace
  5466. ? escaped
  5467. : high < 0
  5468. ? // BMP codepoint
  5469. String.fromCharCode(high + 0x10000)
  5470. : // Supplemental Plane codepoint (surrogate pair)
  5471. String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);
  5472. });
  5473. }
  5474. var cssUnescape = /*#__PURE__*/Object.freeze({
  5475. __proto__: null,
  5476. process: process$8
  5477. });
  5478. const SINGLE_FILE_PREFIX = "single-file-";
  5479. const COMMENT_HEADER = "Page saved with SingleFile";
  5480. const SINGLE_FILE_SIGNATURE = "SingleFile";
  5481. const WAIT_FOR_USERSCRIPT_PROPERTY_NAME = "_singleFile_waitForUserScript";
  5482. const MESSAGE_PREFIX = "__frameTree__::";
  5483. const NO_SCRIPT_PROPERTY_NAME = "singleFileDisabledNoscript";
  5484. /*
  5485. * Copyright 2010-2022 Gildas Lormeau
  5486. * contact : gildas.lormeau <at> gmail.com
  5487. *
  5488. * This file is part of SingleFile.
  5489. *
  5490. * The code in this file is free software: you can redistribute it and/or
  5491. * modify it under the terms of the GNU Affero General Public License
  5492. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  5493. * of the License, or (at your option) any later version.
  5494. *
  5495. * The code in this file is distributed in the hope that it will be useful,
  5496. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  5497. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  5498. * General Public License for more details.
  5499. *
  5500. * As additional permission under GNU AGPL version 3 section 7, you may
  5501. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  5502. * AGPL normally required by section 4, provided you include this license
  5503. * notice and a URL through which recipients can access the Corresponding
  5504. * Source.
  5505. */
  5506. const INFOBAR_TAGNAME$1 = "single-file-infobar";
  5507. const INFOBAR_STYLES = `
  5508. .infobar,
  5509. .infobar .infobar-icon,
  5510. .infobar .infobar-link-icon {
  5511. min-inline-size: 28px;
  5512. min-block-size: 28px;
  5513. box-sizing: border-box;
  5514. }
  5515. .infobar,
  5516. .infobar .infobar-close-icon,
  5517. .infobar .infobar-link-icon {
  5518. opacity: 0.7;
  5519. transition: opacity 250ms;
  5520. }
  5521. .infobar:hover,
  5522. .infobar .infobar-close-icon:hover,
  5523. .infobar .infobar-link-icon:hover {
  5524. opacity: 1;
  5525. }
  5526. .infobar,
  5527. .infobar-content {
  5528. display: flex;
  5529. }
  5530. .infobar {
  5531. position: fixed;
  5532. top: 16px;
  5533. right: 16px;
  5534. margin-inline-start: 16px;
  5535. margin-block-end: 16px;
  5536. color: #2d2d2d;
  5537. background-color: #737373;
  5538. border: 2px solid;
  5539. border-color: #eee;
  5540. border-radius: 16px;
  5541. z-index: 2147483647;
  5542. }
  5543. .infobar:valid, .infobar:not(:focus-within) .infobar-content {
  5544. display: none;
  5545. }
  5546. .infobar:focus-within {
  5547. background-color: #f9f9f9;
  5548. border-color: #878787;
  5549. border-radius: 8px;
  5550. opacity: 1;
  5551. transition-property: opacity, background-color, border-color, border-radius,
  5552. color;
  5553. }
  5554. .infobar-content {
  5555. align-items: center;
  5556. }
  5557. .infobar-content span {
  5558. font-family: Arial, Helvetica, sans-serif;
  5559. font-size: 14px;
  5560. line-height: 18px;
  5561. word-break: break-word;
  5562. white-space: pre-wrap;
  5563. margin-inline: 4px;
  5564. margin-block: 4px;
  5565. }
  5566. .infobar .infobar-icon,
  5567. .infobar .infobar-close-icon,
  5568. .infobar .infobar-link-icon {
  5569. cursor: pointer;
  5570. background-position: center;
  5571. background-repeat: no-repeat;
  5572. }
  5573. .infobar .infobar-close-icon,
  5574. .infobar .infobar-link-icon {
  5575. align-self: flex-start;
  5576. }
  5577. .infobar .infobar-icon {
  5578. position: absolute;
  5579. min-inline-size: 24px;
  5580. min-block-size: 24px;
  5581. }
  5582. .infobar:focus-within .infobar-icon {
  5583. z-index: -1;
  5584. background-image: none;
  5585. }
  5586. .infobar .infobar-close-icon {
  5587. min-inline-size: 22px;
  5588. min-block-size: 22px;
  5589. }
  5590. .infobar .infobar-icon {
  5591. background-color: transparent;
  5592. background-size: 70%;
  5593. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHADIRLMaOHwAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAPUExURQAAAIqKioyNjY2OjvDw8L2y1DEAAAABdFJOUwBA5thmAAAAAWJLR0QB/wIt3gAAAGNJREFUSMdjYCAJsLi4OBCQx6/CBQwIGIDPCBcXAkYQUsACU+AwlBVQHg6Eg5pgZBGOboIJZugDFwRwoJECJCUOhJI1wZwzqmBUwagCuipgIqTABG9h7YIKaKGAURAFEF/6AQAO4HqSoDP8bgAAAABJRU5ErkJggg==);
  5594. }
  5595. .infobar .infobar-link-icon {
  5596. background-size: 60%;
  5597. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC);
  5598. }
  5599. .infobar .infobar-close-icon {
  5600. appearance: none;
  5601. background-size: 80%;
  5602. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8VC4EQ6QAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJtJREFUOI3NkrsBgCAMRLFwBPdxBArcfxXFkO8rbKWAAJfHJ9faf9vuYX/749T5NmShm3bEwbe2SxeuM4+2oxDL1cDoKtVUjRy+tH78Cv2CS+wIiQNC1AEhk4AQeUTMWUJMfUJMSEJMSEY8kIx4IONroaYAimNxsXp1PA7PxwfVL8QnowwoVC0lig07wDDVUjAdbAnjwtow/z/bDW7eI4M2KruJAAAAAElFTkSuQmCC);
  5603. }
  5604. `;
  5605. function appendInfobar$1(doc, options, useShadowRoot) {
  5606. if (!doc.querySelector(INFOBAR_TAGNAME$1)) {
  5607. let infoData;
  5608. if (options.infobarContent) {
  5609. infoData = options.infobarContent.replace(/\\n/g, "\n").replace(/\\t/g, "\t");
  5610. } else if (options.saveDate) {
  5611. infoData = options.saveDate;
  5612. }
  5613. infoData = infoData || "No info";
  5614. const parentElement = doc.body.tagName == "BODY" ? doc.body : doc.documentElement;
  5615. const infobarElement = createElement(doc, INFOBAR_TAGNAME$1, parentElement);
  5616. let infobarContainer;
  5617. if (useShadowRoot) {
  5618. infobarContainer = infobarElement.attachShadow({ mode: "open" });
  5619. } else {
  5620. const shadowRootTemplate = doc.createElement("template");
  5621. shadowRootTemplate.setAttribute("shadowrootmode", "open");
  5622. infobarElement.appendChild(shadowRootTemplate);
  5623. infobarContainer = shadowRootTemplate;
  5624. }
  5625. const shadowRootContent = doc.createElement("div");
  5626. const styleElement = doc.createElement("style");
  5627. styleElement.textContent = INFOBAR_STYLES
  5628. .replace(/ {2}/g, "")
  5629. .replace(/\n/g, "")
  5630. .replace(/: /g, ":")
  5631. .replace(/, /g, ",");
  5632. shadowRootContent.appendChild(styleElement);
  5633. const infobarContent = doc.createElement("form");
  5634. infobarContent.classList.add("infobar");
  5635. shadowRootContent.appendChild(infobarContent);
  5636. const iconElement = doc.createElement("span");
  5637. iconElement.tabIndex = -1;
  5638. iconElement.classList.add("infobar-icon");
  5639. infobarContent.appendChild(iconElement);
  5640. const contentElement = doc.createElement("span");
  5641. contentElement.tabIndex = -1;
  5642. contentElement.classList.add("infobar-content");
  5643. const closeButtonElement = doc.createElement("input");
  5644. closeButtonElement.type = "checkbox";
  5645. closeButtonElement.required = true;
  5646. closeButtonElement.classList.add("infobar-close-icon");
  5647. closeButtonElement.title = "Close";
  5648. contentElement.appendChild(closeButtonElement);
  5649. const textElement = doc.createElement("span");
  5650. textElement.textContent = infoData;
  5651. contentElement.appendChild(textElement);
  5652. const linkElement = doc.createElement("a");
  5653. linkElement.classList.add("infobar-link-icon");
  5654. linkElement.target = "_blank";
  5655. linkElement.rel = "noopener noreferrer";
  5656. linkElement.title = "Open source URL: " + options.saveUrl;
  5657. linkElement.href = options.saveUrl;
  5658. contentElement.appendChild(linkElement);
  5659. infobarContent.appendChild(contentElement);
  5660. if (useShadowRoot) {
  5661. infobarContainer.appendChild(shadowRootContent);
  5662. } else {
  5663. const scriptElement = doc.createElement("script");
  5664. let scriptContent = refreshInfobarInfo.toString();
  5665. scriptContent += ";const SINGLE_FILE_SIGNATURE = " + JSON.stringify(SINGLE_FILE_SIGNATURE) + ";";
  5666. scriptContent += extractInfobarData.toString();
  5667. scriptContent += "(" + initInfobar.toString() + ")(document)";
  5668. scriptElement.textContent = scriptContent;
  5669. shadowRootContent.appendChild(scriptElement);
  5670. infobarContainer.innerHTML = shadowRootContent.outerHTML;
  5671. }
  5672. }
  5673. }
  5674. function extractInfobarData(doc) {
  5675. const result = doc.evaluate("//comment()", doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  5676. let singleFileComment = result && result.singleNodeValue;
  5677. if (singleFileComment && singleFileComment.nodeType == Node.COMMENT_NODE && singleFileComment.textContent.includes(SINGLE_FILE_SIGNATURE)) {
  5678. const info = singleFileComment.textContent.split("\n");
  5679. const [, , urlData, ...optionalData] = info;
  5680. const urlMatch = urlData.match(/^ url: (.*) ?$/);
  5681. const saveUrl = urlMatch && urlMatch[1];
  5682. if (saveUrl) {
  5683. let infobarContent, saveDate;
  5684. if (optionalData.length) {
  5685. saveDate = optionalData[0].split("saved date: ")[1];
  5686. if (saveDate) {
  5687. optionalData.shift();
  5688. }
  5689. if (optionalData.length > 1) {
  5690. let content = optionalData[0].split("info: ")[1].trim();
  5691. for (let indexLine = 1; indexLine < optionalData.length - 1; indexLine++) {
  5692. content += "\n" + optionalData[indexLine].trim();
  5693. }
  5694. infobarContent = content.trim();
  5695. }
  5696. }
  5697. return { saveUrl, infobarContent, saveDate };
  5698. }
  5699. }
  5700. }
  5701. function refreshInfobarInfo(doc, { saveUrl, infobarContent, saveDate }) {
  5702. if (saveUrl) {
  5703. const infobarElement = doc.querySelector("single-file-infobar");
  5704. const shadowRootFragment = infobarElement.shadowRoot;
  5705. const infobarContentElement = shadowRootFragment.querySelector(".infobar-content span");
  5706. infobarContentElement.textContent = infobarContent || saveDate;
  5707. const linkElement = shadowRootFragment.querySelector(".infobar-content .infobar-link-icon");
  5708. linkElement.href = saveUrl;
  5709. linkElement.title = "Open source URL: " + saveUrl;
  5710. }
  5711. }
  5712. function initInfobar(doc) {
  5713. const infoData = extractInfobarData(doc);
  5714. if (infoData && infoData.saveUrl) {
  5715. refreshInfobarInfo(doc, infoData);
  5716. }
  5717. }
  5718. function createElement(doc, tagName, parentElement) {
  5719. const element = doc.createElement(tagName);
  5720. parentElement.appendChild(element);
  5721. Array.from(getComputedStyle(element)).forEach(property => element.style.setProperty(property, "initial", "important"));
  5722. return element;
  5723. }
  5724. /*
  5725. * Copyright 2010-2022 Gildas Lormeau
  5726. * contact : gildas.lormeau <at> gmail.com
  5727. *
  5728. * This file is part of SingleFile.
  5729. *
  5730. * The code in this file is free software: you can redistribute it and/or
  5731. * modify it under the terms of the GNU Affero General Public License
  5732. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  5733. * of the License, or (at your option) any later version.
  5734. *
  5735. * The code in this file is distributed in the hope that it will be useful,
  5736. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  5737. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  5738. * General Public License for more details.
  5739. *
  5740. * As additional permission under GNU AGPL version 3 section 7, you may
  5741. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  5742. * AGPL normally required by section 4, provided you include this license
  5743. * notice and a URL through which recipients can access the Corresponding
  5744. * Source.
  5745. */
  5746. const ON_BEFORE_CAPTURE_EVENT_NAME = SINGLE_FILE_PREFIX + "on-before-capture";
  5747. const ON_AFTER_CAPTURE_EVENT_NAME = SINGLE_FILE_PREFIX + "on-after-capture";
  5748. const GET_ADOPTED_STYLESHEETS_REQUEST_EVENT = SINGLE_FILE_PREFIX + "request-get-adopted-stylesheets";
  5749. const GET_ADOPTED_STYLESHEETS_RESPONSE_EVENT = SINGLE_FILE_PREFIX + "response-get-adopted-stylesheets";
  5750. const UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT = SINGLE_FILE_PREFIX + "unregister-request-get-adopted-stylesheets";
  5751. const ON_INIT_USERSCRIPT_EVENT = SINGLE_FILE_PREFIX + "user-script-init";
  5752. const REMOVED_CONTENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "removed-content";
  5753. const HIDDEN_CONTENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "hidden-content";
  5754. const KEPT_CONTENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "kept-content";
  5755. const HIDDEN_FRAME_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "hidden-frame";
  5756. const PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "preserved-space-element";
  5757. const SHADOW_ROOT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "shadow-root-element";
  5758. const WIN_ID_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "win-id";
  5759. const IMAGE_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "image";
  5760. const POSTER_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "poster";
  5761. const VIDEO_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "video";
  5762. const CANVAS_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "canvas";
  5763. const STYLE_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "movable-style";
  5764. const INPUT_VALUE_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "input-value";
  5765. const LAZY_SRC_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "lazy-loaded-src";
  5766. const STYLESHEET_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "stylesheet";
  5767. const DISABLED_NOSCRIPT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "disabled-noscript";
  5768. const SELECTED_CONTENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "selected-content";
  5769. const INVALID_ELEMENT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "invalid-element";
  5770. const ASYNC_SCRIPT_ATTRIBUTE_NAME = "data-" + SINGLE_FILE_PREFIX + "async-script";
  5771. const FLOW_ELEMENTS_SELECTOR = "*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)";
  5772. const KEPT_TAG_NAMES = ["NOSCRIPT", "DISABLED-NOSCRIPT", "META", "LINK", "STYLE", "TITLE", "TEMPLATE", "SOURCE", "OBJECT", "SCRIPT", "HEAD", "BODY"];
  5773. const IGNORED_TAG_NAMES = ["SCRIPT", "NOSCRIPT", "META", "LINK", "TEMPLATE"];
  5774. const REGEXP_SIMPLE_QUOTES_STRING$2 = /^'(.*?)'$/;
  5775. const REGEXP_DOUBLE_QUOTES_STRING$2 = /^"(.*?)"$/;
  5776. const FONT_WEIGHTS = {
  5777. regular: "400",
  5778. normal: "400",
  5779. bold: "700",
  5780. bolder: "700",
  5781. lighter: "100"
  5782. };
  5783. const COMMENT_HEADER_LEGACY = "Archive processed by SingleFile";
  5784. const SINGLE_FILE_UI_ELEMENT_CLASS = "single-file-ui-element";
  5785. const INFOBAR_TAGNAME = INFOBAR_TAGNAME$1;
  5786. const EMPTY_RESOURCE$1 = "data:,";
  5787. const addEventListener = (type, listener, options) => globalThis.addEventListener(type, listener, options);
  5788. const dispatchEvent = event => { try { globalThis.dispatchEvent(event); } catch (error) { /* ignored */ } };
  5789. const JSON$5 = globalThis.JSON;
  5790. const crypto = globalThis.crypto;
  5791. const TextEncoder = globalThis.TextEncoder;
  5792. const Blob$4 = globalThis.Blob;
  5793. const CustomEvent = globalThis.CustomEvent;
  5794. const MutationObserver$2 = globalThis.MutationObserver;
  5795. function initUserScriptHandler() {
  5796. addEventListener(ON_INIT_USERSCRIPT_EVENT, () => globalThis[WAIT_FOR_USERSCRIPT_PROPERTY_NAME] = async eventPrefixName => {
  5797. const event = new CustomEvent(eventPrefixName + "-request", { cancelable: true });
  5798. const promiseResponse = new Promise(resolve => addEventListener(eventPrefixName + "-response", resolve));
  5799. dispatchEvent(event);
  5800. if (event.defaultPrevented) {
  5801. await promiseResponse;
  5802. }
  5803. });
  5804. new MutationObserver$2(initUserScriptHandler).observe(globalThis.document, { childList: true });
  5805. }
  5806. function initDoc(doc) {
  5807. doc.querySelectorAll("meta[http-equiv=refresh]").forEach(element => {
  5808. element.removeAttribute("http-equiv");
  5809. element.setAttribute("disabled-http-equiv", "refresh");
  5810. });
  5811. }
  5812. function preProcessDoc(doc, win, options) {
  5813. doc.querySelectorAll("noscript:not([" + DISABLED_NOSCRIPT_ATTRIBUTE_NAME + "])").forEach(element => {
  5814. element.setAttribute(DISABLED_NOSCRIPT_ATTRIBUTE_NAME, element.textContent);
  5815. element.textContent = "";
  5816. });
  5817. initDoc(doc);
  5818. if (doc.head) {
  5819. doc.head.querySelectorAll(FLOW_ELEMENTS_SELECTOR).forEach(element => element.hidden = true);
  5820. }
  5821. doc.querySelectorAll("svg foreignObject").forEach(element => {
  5822. const flowElements = element.querySelectorAll("html > head > " + FLOW_ELEMENTS_SELECTOR + ", html > body > " + FLOW_ELEMENTS_SELECTOR);
  5823. if (flowElements.length) {
  5824. Array.from(element.childNodes).forEach(node => node.remove());
  5825. flowElements.forEach(flowElement => element.appendChild(flowElement));
  5826. }
  5827. });
  5828. const invalidElements = new Map();
  5829. let elementsInfo;
  5830. if (win && doc.documentElement) {
  5831. doc.querySelectorAll("button button, a a").forEach(element => {
  5832. const placeHolderElement = doc.createElement("template");
  5833. placeHolderElement.setAttribute(INVALID_ELEMENT_ATTRIBUTE_NAME, "");
  5834. placeHolderElement.content.appendChild(element.cloneNode(true));
  5835. invalidElements.set(element, placeHolderElement);
  5836. element.replaceWith(placeHolderElement);
  5837. });
  5838. elementsInfo = getElementsInfo(win, doc, doc.documentElement, options);
  5839. if (options.moveStylesInHead) {
  5840. doc.querySelectorAll("body style, body ~ style").forEach(element => {
  5841. const computedStyle = getComputedStyle$1(win, element);
  5842. if (computedStyle && testHiddenElement(element, computedStyle)) {
  5843. element.setAttribute(STYLE_ATTRIBUTE_NAME, "");
  5844. elementsInfo.markedElements.push(element);
  5845. }
  5846. });
  5847. }
  5848. } else {
  5849. elementsInfo = {
  5850. canvases: [],
  5851. images: [],
  5852. posters: [],
  5853. videos: [],
  5854. usedFonts: [],
  5855. shadowRoots: [],
  5856. markedElements: []
  5857. };
  5858. }
  5859. return {
  5860. canvases: elementsInfo.canvases,
  5861. fonts: getFontsData(),
  5862. stylesheets: getStylesheetsData(doc),
  5863. images: elementsInfo.images,
  5864. posters: elementsInfo.posters,
  5865. videos: elementsInfo.videos,
  5866. usedFonts: Array.from(elementsInfo.usedFonts.values()),
  5867. shadowRoots: elementsInfo.shadowRoots,
  5868. referrer: doc.referrer,
  5869. markedElements: elementsInfo.markedElements,
  5870. invalidElements,
  5871. scrollPosition: { x: win.scrollX, y: win.scrollY },
  5872. adoptedStyleSheets: getStylesheetsContent(doc.adoptedStyleSheets)
  5873. };
  5874. }
  5875. function getElementsInfo(win, doc, element, options, data = { usedFonts: new Map(), canvases: [], images: [], posters: [], videos: [], shadowRoots: [], markedElements: [] }, ascendantHidden) {
  5876. if (element.childNodes) {
  5877. const elements = Array.from(element.childNodes).filter(node => (node instanceof win.HTMLElement) || (node instanceof win.SVGElement) || (node instanceof globalThis.HTMLElement) || (node instanceof globalThis.SVGElement));
  5878. elements.forEach(element => {
  5879. let elementHidden, elementKept, computedStyle;
  5880. if (!options.autoSaveExternalSave && (options.removeHiddenElements || options.removeUnusedFonts || options.compressHTML)) {
  5881. computedStyle = getComputedStyle$1(win, element);
  5882. if ((element instanceof win.HTMLElement) || (element instanceof globalThis.HTMLElement)) {
  5883. if (options.removeHiddenElements) {
  5884. elementKept = ((ascendantHidden || element.closest("html > head")) && KEPT_TAG_NAMES.includes(element.tagName.toUpperCase())) || element.closest("details");
  5885. if (!elementKept) {
  5886. elementHidden = ascendantHidden || testHiddenElement(element, computedStyle);
  5887. if (elementHidden && !IGNORED_TAG_NAMES.includes(element.tagName.toUpperCase())) {
  5888. element.setAttribute(HIDDEN_CONTENT_ATTRIBUTE_NAME, "");
  5889. data.markedElements.push(element);
  5890. }
  5891. }
  5892. }
  5893. }
  5894. if (!elementHidden) {
  5895. if (options.compressHTML && computedStyle) {
  5896. const whiteSpace = computedStyle.getPropertyValue("white-space");
  5897. if (whiteSpace && whiteSpace.startsWith("pre")) {
  5898. element.setAttribute(PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME, "");
  5899. data.markedElements.push(element);
  5900. }
  5901. }
  5902. if (options.removeUnusedFonts) {
  5903. getUsedFont(computedStyle, options, data.usedFonts);
  5904. getUsedFont(getComputedStyle$1(win, element, ":first-letter"), options, data.usedFonts);
  5905. getUsedFont(getComputedStyle$1(win, element, ":before"), options, data.usedFonts);
  5906. getUsedFont(getComputedStyle$1(win, element, ":after"), options, data.usedFonts);
  5907. }
  5908. }
  5909. }
  5910. getResourcesInfo(win, doc, element, options, data, elementHidden, computedStyle);
  5911. const shadowRoot = !((element instanceof win.SVGElement) || (element instanceof globalThis.SVGElement)) && getShadowRoot(element);
  5912. if (shadowRoot && !element.classList.contains(SINGLE_FILE_UI_ELEMENT_CLASS) && element.tagName.toLowerCase() != INFOBAR_TAGNAME) {
  5913. const shadowRootInfo = {};
  5914. element.setAttribute(SHADOW_ROOT_ATTRIBUTE_NAME, data.shadowRoots.length);
  5915. data.markedElements.push(element);
  5916. data.shadowRoots.push(shadowRootInfo);
  5917. try {
  5918. if (shadowRoot.adoptedStyleSheets) {
  5919. if (shadowRoot.adoptedStyleSheets.length) {
  5920. shadowRootInfo.adoptedStyleSheets = getStylesheetsContent(shadowRoot.adoptedStyleSheets);
  5921. } else if (shadowRoot.adoptedStyleSheets.length === undefined) {
  5922. const listener = event => shadowRootInfo.adoptedStyleSheets = event.detail.adoptedStyleSheets;
  5923. shadowRoot.addEventListener(GET_ADOPTED_STYLESHEETS_RESPONSE_EVENT, listener);
  5924. shadowRoot.dispatchEvent(new CustomEvent(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, { bubbles: true }));
  5925. if (!shadowRootInfo.adoptedStyleSheets) {
  5926. element.dispatchEvent(new CustomEvent(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, { bubbles: true }));
  5927. }
  5928. shadowRoot.removeEventListener(GET_ADOPTED_STYLESHEETS_RESPONSE_EVENT, listener);
  5929. }
  5930. }
  5931. } catch (error) {
  5932. // ignored
  5933. }
  5934. getElementsInfo(win, doc, shadowRoot, options, data, elementHidden);
  5935. shadowRootInfo.content = shadowRoot.innerHTML;
  5936. shadowRootInfo.mode = shadowRoot.mode;
  5937. try {
  5938. if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length === undefined) {
  5939. shadowRoot.dispatchEvent(new CustomEvent(UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, { bubbles: true }));
  5940. }
  5941. } catch (error) {
  5942. // ignored
  5943. }
  5944. }
  5945. getElementsInfo(win, doc, element, options, data, elementHidden);
  5946. if (!options.autoSaveExternalSave && options.removeHiddenElements && ascendantHidden) {
  5947. if (elementKept || element.getAttribute(KEPT_CONTENT_ATTRIBUTE_NAME) == "") {
  5948. if (element.parentElement) {
  5949. element.parentElement.setAttribute(KEPT_CONTENT_ATTRIBUTE_NAME, "");
  5950. data.markedElements.push(element.parentElement);
  5951. }
  5952. } else if (elementHidden) {
  5953. element.setAttribute(REMOVED_CONTENT_ATTRIBUTE_NAME, "");
  5954. data.markedElements.push(element);
  5955. }
  5956. }
  5957. });
  5958. }
  5959. return data;
  5960. }
  5961. function getStylesheetsContent(styleSheets) {
  5962. return styleSheets ? Array.from(styleSheets).map(stylesheet => Array.from(stylesheet.cssRules).map(cssRule => cssRule.cssText).join("\n")) : [];
  5963. }
  5964. function getResourcesInfo(win, doc, element, options, data, elementHidden, computedStyle) {
  5965. const tagName = element.tagName && element.tagName.toUpperCase();
  5966. if (tagName == "CANVAS") {
  5967. try {
  5968. data.canvases.push({
  5969. dataURI: element.toDataURL("image/png", ""),
  5970. backgroundColor: computedStyle.getPropertyValue("background-color")
  5971. });
  5972. element.setAttribute(CANVAS_ATTRIBUTE_NAME, data.canvases.length - 1);
  5973. data.markedElements.push(element);
  5974. } catch (error) {
  5975. // ignored
  5976. }
  5977. }
  5978. if (tagName == "IMG") {
  5979. const imageData = {
  5980. currentSrc: elementHidden ?
  5981. EMPTY_RESOURCE$1 :
  5982. (options.loadDeferredImages && element.getAttribute(LAZY_SRC_ATTRIBUTE_NAME)) || element.currentSrc
  5983. };
  5984. data.images.push(imageData);
  5985. element.setAttribute(IMAGE_ATTRIBUTE_NAME, data.images.length - 1);
  5986. data.markedElements.push(element);
  5987. element.removeAttribute(LAZY_SRC_ATTRIBUTE_NAME);
  5988. computedStyle = computedStyle || getComputedStyle$1(win, element);
  5989. if (computedStyle) {
  5990. imageData.size = getSize(win, element, computedStyle);
  5991. const boxShadow = computedStyle.getPropertyValue("box-shadow");
  5992. const backgroundImage = computedStyle.getPropertyValue("background-image");
  5993. if ((!boxShadow || boxShadow == "none") &&
  5994. (!backgroundImage || backgroundImage == "none") &&
  5995. (imageData.size.pxWidth > 1 || imageData.size.pxHeight > 1)) {
  5996. imageData.replaceable = true;
  5997. imageData.backgroundColor = computedStyle.getPropertyValue("background-color");
  5998. imageData.objectFit = computedStyle.getPropertyValue("object-fit");
  5999. imageData.boxSizing = computedStyle.getPropertyValue("box-sizing");
  6000. imageData.objectPosition = computedStyle.getPropertyValue("object-position");
  6001. }
  6002. }
  6003. }
  6004. if (tagName == "VIDEO") {
  6005. const src = element.currentSrc;
  6006. if (src && !src.startsWith("blob:") && !src.startsWith("data:")) {
  6007. const computedStyle = getComputedStyle$1(win, element.parentNode);
  6008. data.videos.push({
  6009. positionParent: computedStyle && computedStyle.getPropertyValue("position"),
  6010. src,
  6011. size: {
  6012. pxWidth: element.clientWidth,
  6013. pxHeight: element.clientHeight
  6014. },
  6015. currentTime: element.currentTime
  6016. });
  6017. element.setAttribute(VIDEO_ATTRIBUTE_NAME, data.videos.length - 1);
  6018. }
  6019. if (!element.getAttribute("poster")) {
  6020. const canvasElement = doc.createElement("canvas");
  6021. const context = canvasElement.getContext("2d");
  6022. canvasElement.width = element.clientWidth;
  6023. canvasElement.height = element.clientHeight;
  6024. try {
  6025. context.drawImage(element, 0, 0, canvasElement.width, canvasElement.height);
  6026. data.posters.push(canvasElement.toDataURL("image/png", ""));
  6027. element.setAttribute(POSTER_ATTRIBUTE_NAME, data.posters.length - 1);
  6028. data.markedElements.push(element);
  6029. } catch (error) {
  6030. // ignored
  6031. }
  6032. }
  6033. }
  6034. if (tagName == "IFRAME") {
  6035. if (elementHidden && options.removeHiddenElements) {
  6036. element.setAttribute(HIDDEN_FRAME_ATTRIBUTE_NAME, "");
  6037. data.markedElements.push(element);
  6038. }
  6039. }
  6040. if (tagName == "INPUT") {
  6041. if (element.type != "password") {
  6042. element.setAttribute(INPUT_VALUE_ATTRIBUTE_NAME, element.value);
  6043. data.markedElements.push(element);
  6044. }
  6045. if (element.type == "radio" || element.type == "checkbox") {
  6046. element.setAttribute(INPUT_VALUE_ATTRIBUTE_NAME, element.checked);
  6047. data.markedElements.push(element);
  6048. }
  6049. }
  6050. if (tagName == "TEXTAREA") {
  6051. element.setAttribute(INPUT_VALUE_ATTRIBUTE_NAME, element.value);
  6052. data.markedElements.push(element);
  6053. }
  6054. if (tagName == "SELECT") {
  6055. element.querySelectorAll("option").forEach(option => {
  6056. if (option.selected) {
  6057. option.setAttribute(INPUT_VALUE_ATTRIBUTE_NAME, "");
  6058. data.markedElements.push(option);
  6059. }
  6060. });
  6061. }
  6062. if (tagName == "SCRIPT") {
  6063. if (element.async && element.getAttribute("async") != "" && element.getAttribute("async") != "async") {
  6064. element.setAttribute(ASYNC_SCRIPT_ATTRIBUTE_NAME, "");
  6065. data.markedElements.push(element);
  6066. }
  6067. element.textContent = element.textContent.replace(/<\/script>/gi, "<\\/script>");
  6068. }
  6069. }
  6070. function getUsedFont(computedStyle, options, usedFonts) {
  6071. if (computedStyle) {
  6072. const fontStyle = computedStyle.getPropertyValue("font-style") || "normal";
  6073. computedStyle.getPropertyValue("font-family").split(",").forEach(fontFamilyName => {
  6074. fontFamilyName = normalizeFontFamily(fontFamilyName);
  6075. if (!options.loadedFonts || options.loadedFonts.find(font => normalizeFontFamily(font.family) == fontFamilyName && font.style == fontStyle)) {
  6076. const fontWeight = getFontWeight(computedStyle.getPropertyValue("font-weight"));
  6077. const fontVariant = computedStyle.getPropertyValue("font-variant") || "normal";
  6078. const value = [fontFamilyName, fontWeight, fontStyle, fontVariant];
  6079. usedFonts.set(JSON$5.stringify(value), [fontFamilyName, fontWeight, fontStyle, fontVariant]);
  6080. }
  6081. });
  6082. }
  6083. }
  6084. function getShadowRoot(element) {
  6085. const chrome = globalThis.chrome;
  6086. if (element.openOrClosedShadowRoot) {
  6087. return element.openOrClosedShadowRoot;
  6088. } else if (chrome && chrome.dom && chrome.dom.openOrClosedShadowRoot) {
  6089. try {
  6090. return chrome.dom.openOrClosedShadowRoot(element);
  6091. } catch (error) {
  6092. return element.shadowRoot;
  6093. }
  6094. } else {
  6095. return element.shadowRoot;
  6096. }
  6097. }
  6098. function appendInfobar(doc, options, useShadowRoot) {
  6099. return appendInfobar$1(doc, options, useShadowRoot);
  6100. }
  6101. function normalizeFontFamily(fontFamilyName = "") {
  6102. return removeQuotes$1(process$8(fontFamilyName.trim())).toLowerCase();
  6103. }
  6104. function testHiddenElement(element, computedStyle) {
  6105. let hidden = false;
  6106. if (computedStyle) {
  6107. const display = computedStyle.getPropertyValue("display");
  6108. const opacity = computedStyle.getPropertyValue("opacity");
  6109. const visibility = computedStyle.getPropertyValue("visibility");
  6110. hidden = display == "none";
  6111. if (!hidden && (opacity == "0" || visibility == "hidden") && element.getBoundingClientRect) {
  6112. const boundingRect = element.getBoundingClientRect();
  6113. hidden = !boundingRect.width && !boundingRect.height;
  6114. }
  6115. }
  6116. return Boolean(hidden);
  6117. }
  6118. function postProcessDoc(doc, markedElements, invalidElements) {
  6119. doc.querySelectorAll("[" + DISABLED_NOSCRIPT_ATTRIBUTE_NAME + "]").forEach(element => {
  6120. element.textContent = element.getAttribute(DISABLED_NOSCRIPT_ATTRIBUTE_NAME);
  6121. element.removeAttribute(DISABLED_NOSCRIPT_ATTRIBUTE_NAME);
  6122. });
  6123. doc.querySelectorAll("meta[disabled-http-equiv]").forEach(element => {
  6124. element.setAttribute("http-equiv", element.getAttribute("disabled-http-equiv"));
  6125. element.removeAttribute("disabled-http-equiv");
  6126. });
  6127. if (doc.head) {
  6128. doc.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach(element => element.removeAttribute("hidden"));
  6129. }
  6130. if (!markedElements) {
  6131. const singleFileAttributes = [REMOVED_CONTENT_ATTRIBUTE_NAME, HIDDEN_FRAME_ATTRIBUTE_NAME, HIDDEN_CONTENT_ATTRIBUTE_NAME, PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME, IMAGE_ATTRIBUTE_NAME, POSTER_ATTRIBUTE_NAME, VIDEO_ATTRIBUTE_NAME, CANVAS_ATTRIBUTE_NAME, INPUT_VALUE_ATTRIBUTE_NAME, SHADOW_ROOT_ATTRIBUTE_NAME, STYLESHEET_ATTRIBUTE_NAME, ASYNC_SCRIPT_ATTRIBUTE_NAME];
  6132. markedElements = doc.querySelectorAll(singleFileAttributes.map(name => "[" + name + "]").join(","));
  6133. }
  6134. markedElements.forEach(element => {
  6135. element.removeAttribute(REMOVED_CONTENT_ATTRIBUTE_NAME);
  6136. element.removeAttribute(HIDDEN_CONTENT_ATTRIBUTE_NAME);
  6137. element.removeAttribute(KEPT_CONTENT_ATTRIBUTE_NAME);
  6138. element.removeAttribute(HIDDEN_FRAME_ATTRIBUTE_NAME);
  6139. element.removeAttribute(PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME);
  6140. element.removeAttribute(IMAGE_ATTRIBUTE_NAME);
  6141. element.removeAttribute(POSTER_ATTRIBUTE_NAME);
  6142. element.removeAttribute(VIDEO_ATTRIBUTE_NAME);
  6143. element.removeAttribute(CANVAS_ATTRIBUTE_NAME);
  6144. element.removeAttribute(INPUT_VALUE_ATTRIBUTE_NAME);
  6145. element.removeAttribute(SHADOW_ROOT_ATTRIBUTE_NAME);
  6146. element.removeAttribute(STYLESHEET_ATTRIBUTE_NAME);
  6147. element.removeAttribute(ASYNC_SCRIPT_ATTRIBUTE_NAME);
  6148. element.removeAttribute(STYLE_ATTRIBUTE_NAME);
  6149. });
  6150. if (invalidElements) {
  6151. invalidElements.forEach((placeholderElement, element) => placeholderElement.replaceWith(element));
  6152. }
  6153. }
  6154. function getStylesheetsData(doc) {
  6155. if (doc) {
  6156. const contents = [];
  6157. doc.querySelectorAll("style").forEach((styleElement, styleIndex) => {
  6158. try {
  6159. if (!styleElement.sheet.disabled) {
  6160. const tempStyleElement = doc.createElement("style");
  6161. tempStyleElement.textContent = styleElement.textContent;
  6162. doc.body.appendChild(tempStyleElement);
  6163. const stylesheet = tempStyleElement.sheet;
  6164. tempStyleElement.remove();
  6165. const textContentStylesheet = Array.from(stylesheet.cssRules).map(cssRule => cssRule.cssText).join("\n");
  6166. const sheetStylesheet = Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText).join("\n");
  6167. if (!stylesheet || textContentStylesheet != sheetStylesheet) {
  6168. styleElement.setAttribute(STYLESHEET_ATTRIBUTE_NAME, styleIndex);
  6169. contents[styleIndex] = Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText).join("\n");
  6170. }
  6171. }
  6172. } catch (error) {
  6173. // ignored
  6174. }
  6175. });
  6176. return contents;
  6177. }
  6178. }
  6179. function getSize(win, imageElement, computedStyle) {
  6180. let pxWidth = imageElement.naturalWidth;
  6181. let pxHeight = imageElement.naturalHeight;
  6182. if (!pxWidth && !pxHeight) {
  6183. const noStyleAttribute = imageElement.getAttribute("style") == null;
  6184. computedStyle = computedStyle || getComputedStyle$1(win, imageElement);
  6185. if (computedStyle) {
  6186. let removeBorderWidth = false;
  6187. if (computedStyle.getPropertyValue("box-sizing") == "content-box") {
  6188. const boxSizingValue = imageElement.style.getPropertyValue("box-sizing");
  6189. const boxSizingPriority = imageElement.style.getPropertyPriority("box-sizing");
  6190. const clientWidth = imageElement.clientWidth;
  6191. imageElement.style.setProperty("box-sizing", "border-box", "important");
  6192. removeBorderWidth = imageElement.clientWidth != clientWidth;
  6193. if (boxSizingValue) {
  6194. imageElement.style.setProperty("box-sizing", boxSizingValue, boxSizingPriority);
  6195. } else {
  6196. imageElement.style.removeProperty("box-sizing");
  6197. }
  6198. }
  6199. let paddingLeft, paddingRight, paddingTop, paddingBottom, borderLeft, borderRight, borderTop, borderBottom;
  6200. paddingLeft = getWidth("padding-left", computedStyle);
  6201. paddingRight = getWidth("padding-right", computedStyle);
  6202. paddingTop = getWidth("padding-top", computedStyle);
  6203. paddingBottom = getWidth("padding-bottom", computedStyle);
  6204. if (removeBorderWidth) {
  6205. borderLeft = getWidth("border-left-width", computedStyle);
  6206. borderRight = getWidth("border-right-width", computedStyle);
  6207. borderTop = getWidth("border-top-width", computedStyle);
  6208. borderBottom = getWidth("border-bottom-width", computedStyle);
  6209. } else {
  6210. borderLeft = borderRight = borderTop = borderBottom = 0;
  6211. }
  6212. pxWidth = Math.max(0, imageElement.clientWidth - paddingLeft - paddingRight - borderLeft - borderRight);
  6213. pxHeight = Math.max(0, imageElement.clientHeight - paddingTop - paddingBottom - borderTop - borderBottom);
  6214. if (noStyleAttribute) {
  6215. imageElement.removeAttribute("style");
  6216. }
  6217. }
  6218. }
  6219. return { pxWidth, pxHeight };
  6220. }
  6221. function getWidth(styleName, computedStyle) {
  6222. if (computedStyle.getPropertyValue(styleName).endsWith("px")) {
  6223. return parseFloat(computedStyle.getPropertyValue(styleName));
  6224. }
  6225. }
  6226. function getFontsData() {
  6227. return getFontsData$1();
  6228. }
  6229. function serialize$1(doc) {
  6230. const docType = doc.doctype;
  6231. let docTypeString = "";
  6232. if (docType) {
  6233. docTypeString = "<!DOCTYPE " + docType.nodeName;
  6234. if (docType.publicId) {
  6235. docTypeString += " PUBLIC \"" + docType.publicId + "\"";
  6236. if (docType.systemId) {
  6237. docTypeString += " \"" + docType.systemId + "\"";
  6238. }
  6239. } else if (docType.systemId) {
  6240. docTypeString += " SYSTEM \"" + docType.systemId + "\"";
  6241. } if (docType.internalSubset) {
  6242. docTypeString += " [" + docType.internalSubset + "]";
  6243. }
  6244. docTypeString += "> ";
  6245. }
  6246. return docTypeString + doc.documentElement.outerHTML;
  6247. }
  6248. function removeQuotes$1(string) {
  6249. if (string.match(REGEXP_SIMPLE_QUOTES_STRING$2)) {
  6250. string = string.replace(REGEXP_SIMPLE_QUOTES_STRING$2, "$1");
  6251. } else {
  6252. string = string.replace(REGEXP_DOUBLE_QUOTES_STRING$2, "$1");
  6253. }
  6254. return string.trim();
  6255. }
  6256. function getFontWeight(weight) {
  6257. return FONT_WEIGHTS[weight.toLowerCase().trim()] || weight;
  6258. }
  6259. function getContentSize(content) {
  6260. return new Blob$4([content]).size;
  6261. }
  6262. async function digest(algo, text) {
  6263. try {
  6264. const hash = await crypto.subtle.digest(algo, new TextEncoder("utf-8").encode(text));
  6265. return hex(hash);
  6266. } catch (error) {
  6267. return "";
  6268. }
  6269. }
  6270. // https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
  6271. function hex(buffer) {
  6272. const hexCodes = [];
  6273. const view = new DataView(buffer);
  6274. for (let i = 0; i < view.byteLength; i += 4) {
  6275. const value = view.getUint32(i);
  6276. const stringValue = value.toString(16);
  6277. const padding = "00000000";
  6278. const paddedValue = (padding + stringValue).slice(-padding.length);
  6279. hexCodes.push(paddedValue);
  6280. }
  6281. return hexCodes.join("");
  6282. }
  6283. function flatten(array) {
  6284. return array.flat ? array.flat() : array.reduce((a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []);
  6285. }
  6286. function getComputedStyle$1(win, element, pseudoElement) {
  6287. try {
  6288. return win.getComputedStyle(element, pseudoElement);
  6289. } catch (error) {
  6290. // ignored
  6291. }
  6292. }
  6293. var helper$4 = /*#__PURE__*/Object.freeze({
  6294. __proto__: null,
  6295. initUserScriptHandler: initUserScriptHandler,
  6296. initDoc: initDoc,
  6297. preProcessDoc: preProcessDoc,
  6298. postProcessDoc: postProcessDoc,
  6299. serialize: serialize$1,
  6300. removeQuotes: removeQuotes$1,
  6301. flatten: flatten,
  6302. getFontWeight: getFontWeight,
  6303. normalizeFontFamily: normalizeFontFamily,
  6304. getShadowRoot: getShadowRoot,
  6305. appendInfobar: appendInfobar,
  6306. getContentSize: getContentSize,
  6307. digest: digest,
  6308. ON_BEFORE_CAPTURE_EVENT_NAME: ON_BEFORE_CAPTURE_EVENT_NAME,
  6309. ON_AFTER_CAPTURE_EVENT_NAME: ON_AFTER_CAPTURE_EVENT_NAME,
  6310. WIN_ID_ATTRIBUTE_NAME: WIN_ID_ATTRIBUTE_NAME,
  6311. PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME: PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME,
  6312. REMOVED_CONTENT_ATTRIBUTE_NAME: REMOVED_CONTENT_ATTRIBUTE_NAME,
  6313. HIDDEN_CONTENT_ATTRIBUTE_NAME: HIDDEN_CONTENT_ATTRIBUTE_NAME,
  6314. HIDDEN_FRAME_ATTRIBUTE_NAME: HIDDEN_FRAME_ATTRIBUTE_NAME,
  6315. IMAGE_ATTRIBUTE_NAME: IMAGE_ATTRIBUTE_NAME,
  6316. POSTER_ATTRIBUTE_NAME: POSTER_ATTRIBUTE_NAME,
  6317. VIDEO_ATTRIBUTE_NAME: VIDEO_ATTRIBUTE_NAME,
  6318. CANVAS_ATTRIBUTE_NAME: CANVAS_ATTRIBUTE_NAME,
  6319. INPUT_VALUE_ATTRIBUTE_NAME: INPUT_VALUE_ATTRIBUTE_NAME,
  6320. SHADOW_ROOT_ATTRIBUTE_NAME: SHADOW_ROOT_ATTRIBUTE_NAME,
  6321. STYLE_ATTRIBUTE_NAME: STYLE_ATTRIBUTE_NAME,
  6322. LAZY_SRC_ATTRIBUTE_NAME: LAZY_SRC_ATTRIBUTE_NAME,
  6323. STYLESHEET_ATTRIBUTE_NAME: STYLESHEET_ATTRIBUTE_NAME,
  6324. SELECTED_CONTENT_ATTRIBUTE_NAME: SELECTED_CONTENT_ATTRIBUTE_NAME,
  6325. INVALID_ELEMENT_ATTRIBUTE_NAME: INVALID_ELEMENT_ATTRIBUTE_NAME,
  6326. ASYNC_SCRIPT_ATTRIBUTE_NAME: ASYNC_SCRIPT_ATTRIBUTE_NAME,
  6327. COMMENT_HEADER: COMMENT_HEADER,
  6328. COMMENT_HEADER_LEGACY: COMMENT_HEADER_LEGACY,
  6329. SINGLE_FILE_UI_ELEMENT_CLASS: SINGLE_FILE_UI_ELEMENT_CLASS,
  6330. EMPTY_RESOURCE: EMPTY_RESOURCE$1,
  6331. INFOBAR_TAGNAME: INFOBAR_TAGNAME,
  6332. WAIT_FOR_USERSCRIPT_PROPERTY_NAME: WAIT_FOR_USERSCRIPT_PROPERTY_NAME,
  6333. MESSAGE_PREFIX: MESSAGE_PREFIX,
  6334. NO_SCRIPT_PROPERTY_NAME: NO_SCRIPT_PROPERTY_NAME
  6335. });
  6336. /*
  6337. * Copyright 2010-2022 Gildas Lormeau
  6338. * contact : gildas.lormeau <at> gmail.com
  6339. *
  6340. * This file is part of SingleFile.
  6341. *
  6342. * The code in this file is free software: you can redistribute it and/or
  6343. * modify it under the terms of the GNU Affero General Public License
  6344. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  6345. * of the License, or (at your option) any later version.
  6346. *
  6347. * The code in this file is distributed in the hope that it will be useful,
  6348. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  6349. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  6350. * General Public License for more details.
  6351. *
  6352. * As additional permission under GNU AGPL version 3 section 7, you may
  6353. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  6354. * AGPL normally required by section 4, provided you include this license
  6355. * notice and a URL through which recipients can access the Corresponding
  6356. * Source.
  6357. */
  6358. const helper$3 = {
  6359. LAZY_SRC_ATTRIBUTE_NAME,
  6360. SINGLE_FILE_UI_ELEMENT_CLASS
  6361. };
  6362. const MAX_IDLE_TIMEOUT_CALLS = 10;
  6363. const ATTRIBUTES_MUTATION_TYPE = "attributes";
  6364. const browser$1 = globalThis.browser;
  6365. const document$2 = globalThis.document;
  6366. const MutationObserver$1 = globalThis.MutationObserver;
  6367. const timeouts = new Map();
  6368. let idleTimeoutCalls;
  6369. if (browser$1 && browser$1.runtime && browser$1.runtime.onMessage && browser$1.runtime.onMessage.addListener) {
  6370. browser$1.runtime.onMessage.addListener(message => {
  6371. if (message.method == "singlefile.lazyTimeout.onTimeout") {
  6372. const timeoutData = timeouts.get(message.type);
  6373. if (timeoutData) {
  6374. timeouts.delete(message.type);
  6375. try {
  6376. timeoutData.callback();
  6377. } catch (error) {
  6378. clearRegularTimeout(message.type);
  6379. }
  6380. }
  6381. }
  6382. });
  6383. }
  6384. async function process$7(options) {
  6385. if (document$2.documentElement) {
  6386. timeouts.clear();
  6387. const bodyHeight = document$2.body ? Math.max(document$2.body.scrollHeight, document$2.documentElement.scrollHeight) : document$2.documentElement.scrollHeight;
  6388. const bodyWidth = document$2.body ? Math.max(document$2.body.scrollWidth, document$2.documentElement.scrollWidth) : document$2.documentElement.scrollWidth;
  6389. if (bodyHeight > globalThis.innerHeight || bodyWidth > globalThis.innerWidth) {
  6390. const maxScrollY = Math.max(bodyHeight - (globalThis.innerHeight * 1.5), 0);
  6391. const maxScrollX = Math.max(bodyWidth - (globalThis.innerWidth * 1.5), 0);
  6392. if (globalThis.scrollY < maxScrollY || globalThis.scrollX < maxScrollX) {
  6393. return triggerLazyLoading(options);
  6394. }
  6395. }
  6396. }
  6397. }
  6398. function resetZoomLevel(options) {
  6399. loadDeferredImagesResetZoomLevel(options);
  6400. }
  6401. function triggerLazyLoading(options) {
  6402. idleTimeoutCalls = 0;
  6403. return new Promise(async resolve => { // eslint-disable-line no-async-promise-executor
  6404. let loadingImages;
  6405. const pendingImages = new Set();
  6406. const observer = new MutationObserver$1(async mutations => {
  6407. mutations = mutations.filter(mutation => mutation.type == ATTRIBUTES_MUTATION_TYPE);
  6408. if (mutations.length) {
  6409. const updated = mutations.filter(mutation => {
  6410. if (mutation.attributeName == "src") {
  6411. mutation.target.setAttribute(helper$3.LAZY_SRC_ATTRIBUTE_NAME, mutation.target.src);
  6412. mutation.target.addEventListener("load", onResourceLoad);
  6413. }
  6414. if (mutation.attributeName == "src" || mutation.attributeName == "srcset" ||
  6415. (mutation.target.tagName && mutation.target.tagName.toUpperCase() == "SOURCE")) {
  6416. return !mutation.target.classList || !mutation.target.classList.contains(helper$3.SINGLE_FILE_UI_ELEMENT_CLASS);
  6417. }
  6418. });
  6419. if (updated.length) {
  6420. loadingImages = true;
  6421. await deferForceLazyLoadEnd(observer, options, cleanupAndResolve);
  6422. if (!pendingImages.size) {
  6423. await deferLazyLoadEnd(observer, options, cleanupAndResolve);
  6424. }
  6425. }
  6426. }
  6427. });
  6428. await setIdleTimeout(options.loadDeferredImagesMaxIdleTime * 2);
  6429. await deferForceLazyLoadEnd(observer, options, cleanupAndResolve);
  6430. observer.observe(document$2, { subtree: true, childList: true, attributes: true });
  6431. document$2.addEventListener(LOAD_IMAGE_EVENT, onImageLoadEvent);
  6432. document$2.addEventListener(IMAGE_LOADED_EVENT, onImageLoadedEvent);
  6433. loadDeferredImagesStart(options);
  6434. async function setIdleTimeout(delay) {
  6435. await setAsyncTimeout("idleTimeout", async () => {
  6436. if (!loadingImages) {
  6437. clearAsyncTimeout("loadTimeout");
  6438. clearAsyncTimeout("maxTimeout");
  6439. lazyLoadEnd(observer, options, cleanupAndResolve);
  6440. } else if (idleTimeoutCalls < MAX_IDLE_TIMEOUT_CALLS) {
  6441. idleTimeoutCalls++;
  6442. clearAsyncTimeout("idleTimeout");
  6443. await setIdleTimeout(Math.max(500, delay / 2));
  6444. }
  6445. }, delay, options.loadDeferredImagesNativeTimeout);
  6446. }
  6447. function onResourceLoad(event) {
  6448. const element = event.target;
  6449. element.removeAttribute(helper$3.LAZY_SRC_ATTRIBUTE_NAME);
  6450. element.removeEventListener("load", onResourceLoad);
  6451. }
  6452. async function onImageLoadEvent(event) {
  6453. loadingImages = true;
  6454. await deferForceLazyLoadEnd(observer, options, cleanupAndResolve);
  6455. await deferLazyLoadEnd(observer, options, cleanupAndResolve);
  6456. if (event.detail) {
  6457. pendingImages.add(event.detail);
  6458. }
  6459. }
  6460. async function onImageLoadedEvent(event) {
  6461. await deferForceLazyLoadEnd(observer, options, cleanupAndResolve);
  6462. await deferLazyLoadEnd(observer, options, cleanupAndResolve);
  6463. pendingImages.delete(event.detail);
  6464. if (!pendingImages.size) {
  6465. await deferLazyLoadEnd(observer, options, cleanupAndResolve);
  6466. }
  6467. }
  6468. function cleanupAndResolve(value) {
  6469. observer.disconnect();
  6470. document$2.removeEventListener(LOAD_IMAGE_EVENT, onImageLoadEvent);
  6471. document$2.removeEventListener(IMAGE_LOADED_EVENT, onImageLoadedEvent);
  6472. resolve(value);
  6473. }
  6474. });
  6475. }
  6476. async function deferLazyLoadEnd(observer, options, resolve) {
  6477. await setAsyncTimeout("loadTimeout", () => lazyLoadEnd(observer, options, resolve), options.loadDeferredImagesMaxIdleTime, options.loadDeferredImagesNativeTimeout);
  6478. }
  6479. async function deferForceLazyLoadEnd(observer, options, resolve) {
  6480. await setAsyncTimeout("maxTimeout", async () => {
  6481. await clearAsyncTimeout("loadTimeout");
  6482. await lazyLoadEnd(observer, options, resolve);
  6483. }, options.loadDeferredImagesMaxIdleTime * 10, options.loadDeferredImagesNativeTimeout);
  6484. }
  6485. async function lazyLoadEnd(observer, options, resolve) {
  6486. await clearAsyncTimeout("idleTimeout");
  6487. loadDeferredImagesEnd(options);
  6488. await setAsyncTimeout("endTimeout", async () => {
  6489. await clearAsyncTimeout("maxTimeout");
  6490. resolve();
  6491. }, options.loadDeferredImagesMaxIdleTime / 2, options.loadDeferredImagesNativeTimeout);
  6492. observer.disconnect();
  6493. }
  6494. async function setAsyncTimeout(type, callback, delay, forceNativeTimeout) {
  6495. if (browser$1 && browser$1.runtime && browser$1.runtime.sendMessage && !forceNativeTimeout) {
  6496. if (!timeouts.get(type) || !timeouts.get(type).pending) {
  6497. const timeoutData = { callback, pending: true };
  6498. timeouts.set(type, timeoutData);
  6499. try {
  6500. await browser$1.runtime.sendMessage({ method: "singlefile.lazyTimeout.setTimeout", type, delay });
  6501. } catch (error) {
  6502. setRegularTimeout(type, callback, delay);
  6503. }
  6504. timeoutData.pending = false;
  6505. }
  6506. } else {
  6507. setRegularTimeout(type, callback, delay);
  6508. }
  6509. }
  6510. function setRegularTimeout(type, callback, delay) {
  6511. const timeoutId = timeouts.get(type);
  6512. if (timeoutId) {
  6513. globalThis.clearTimeout(timeoutId);
  6514. }
  6515. timeouts.set(type, callback);
  6516. globalThis.setTimeout(callback, delay);
  6517. }
  6518. async function clearAsyncTimeout(type) {
  6519. if (browser$1 && browser$1.runtime && browser$1.runtime.sendMessage) {
  6520. try {
  6521. await browser$1.runtime.sendMessage({ method: "singlefile.lazyTimeout.clearTimeout", type });
  6522. } catch (error) {
  6523. clearRegularTimeout(type);
  6524. }
  6525. } else {
  6526. clearRegularTimeout(type);
  6527. }
  6528. }
  6529. function clearRegularTimeout(type) {
  6530. const previousTimeoutId = timeouts.get(type);
  6531. timeouts.delete(type);
  6532. if (previousTimeoutId) {
  6533. globalThis.clearTimeout(previousTimeoutId);
  6534. }
  6535. }
  6536. var contentLazyLoader = /*#__PURE__*/Object.freeze({
  6537. __proto__: null,
  6538. process: process$7,
  6539. resetZoomLevel: resetZoomLevel
  6540. });
  6541. /*
  6542. * Copyright 2010-2022 Gildas Lormeau
  6543. * contact : gildas.lormeau <at> gmail.com
  6544. *
  6545. * This file is part of SingleFile.
  6546. *
  6547. * The code in this file is free software: you can redistribute it and/or
  6548. * modify it under the terms of the GNU Affero General Public License
  6549. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  6550. * of the License, or (at your option) any later version.
  6551. *
  6552. * The code in this file is distributed in the hope that it will be useful,
  6553. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  6554. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  6555. * General Public License for more details.
  6556. *
  6557. * As additional permission under GNU AGPL version 3 section 7, you may
  6558. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  6559. * AGPL normally required by section 4, provided you include this license
  6560. * notice and a URL through which recipients can access the Corresponding
  6561. * Source.
  6562. */
  6563. const helper$2 = {
  6564. ON_BEFORE_CAPTURE_EVENT_NAME,
  6565. ON_AFTER_CAPTURE_EVENT_NAME,
  6566. WIN_ID_ATTRIBUTE_NAME,
  6567. WAIT_FOR_USERSCRIPT_PROPERTY_NAME,
  6568. preProcessDoc,
  6569. serialize: serialize$1,
  6570. postProcessDoc,
  6571. getShadowRoot
  6572. };
  6573. const FRAMES_CSS_SELECTOR = "iframe, frame, object[type=\"text/html\"][data]";
  6574. const ALL_ELEMENTS_CSS_SELECTOR = "*";
  6575. const INIT_REQUEST_MESSAGE = "singlefile.frameTree.initRequest";
  6576. const ACK_INIT_REQUEST_MESSAGE = "singlefile.frameTree.ackInitRequest";
  6577. const CLEANUP_REQUEST_MESSAGE = "singlefile.frameTree.cleanupRequest";
  6578. const INIT_RESPONSE_MESSAGE = "singlefile.frameTree.initResponse";
  6579. const TARGET_ORIGIN = "*";
  6580. const TIMEOUT_INIT_REQUEST_MESSAGE = 5000;
  6581. const TIMEOUT_INIT_RESPONSE_MESSAGE = 10000;
  6582. const TOP_WINDOW_ID = "0";
  6583. const WINDOW_ID_SEPARATOR = ".";
  6584. const TOP_WINDOW = globalThis.window == globalThis.top;
  6585. const browser = globalThis.browser;
  6586. const top = globalThis.top;
  6587. const MessageChannel = globalThis.MessageChannel;
  6588. const document$1 = globalThis.document;
  6589. const JSON$4 = globalThis.JSON;
  6590. const MutationObserver = globalThis.MutationObserver;
  6591. let sessions = globalThis.sessions;
  6592. if (!sessions) {
  6593. sessions = globalThis.sessions = new Map();
  6594. }
  6595. let windowId;
  6596. if (TOP_WINDOW) {
  6597. windowId = TOP_WINDOW_ID;
  6598. if (browser && browser.runtime && browser.runtime.onMessage && browser.runtime.onMessage.addListener) {
  6599. browser.runtime.onMessage.addListener(message => {
  6600. if (message.method == INIT_RESPONSE_MESSAGE) {
  6601. initResponse(message);
  6602. return Promise.resolve({});
  6603. } else if (message.method == ACK_INIT_REQUEST_MESSAGE) {
  6604. clearFrameTimeout("requestTimeouts", message.sessionId, message.windowId);
  6605. createFrameResponseTimeout(message.sessionId, message.windowId);
  6606. return Promise.resolve({});
  6607. }
  6608. });
  6609. }
  6610. }
  6611. init$1();
  6612. new MutationObserver(init$1).observe(document$1, { childList: true });
  6613. function init$1() {
  6614. globalThis.addEventListener("message", async event => {
  6615. if (typeof event.data == "string" && event.data.startsWith(MESSAGE_PREFIX)) {
  6616. event.preventDefault();
  6617. event.stopPropagation();
  6618. const message = JSON$4.parse(event.data.substring(MESSAGE_PREFIX.length));
  6619. if (message.method == INIT_REQUEST_MESSAGE) {
  6620. if (event.source) {
  6621. sendMessage(event.source, { method: ACK_INIT_REQUEST_MESSAGE, windowId: message.windowId, sessionId: message.sessionId });
  6622. }
  6623. if (!TOP_WINDOW) {
  6624. globalThis.stop();
  6625. if (message.options.loadDeferredImages) {
  6626. process$7(message.options);
  6627. }
  6628. await initRequestAsync(message);
  6629. }
  6630. } else if (message.method == ACK_INIT_REQUEST_MESSAGE) {
  6631. clearFrameTimeout("requestTimeouts", message.sessionId, message.windowId);
  6632. createFrameResponseTimeout(message.sessionId, message.windowId);
  6633. } else if (message.method == CLEANUP_REQUEST_MESSAGE) {
  6634. cleanupRequest(message);
  6635. } else if (message.method == INIT_RESPONSE_MESSAGE && sessions.get(message.sessionId)) {
  6636. const port = event.ports[0];
  6637. port.onmessage = event => initResponse(event.data);
  6638. }
  6639. }
  6640. }, true);
  6641. }
  6642. function getAsync(options) {
  6643. const sessionId = getNewSessionId();
  6644. options = JSON$4.parse(JSON$4.stringify(options));
  6645. return new Promise(resolve => {
  6646. sessions.set(sessionId, {
  6647. frames: [],
  6648. requestTimeouts: {},
  6649. responseTimeouts: {},
  6650. resolve: frames => {
  6651. frames.sessionId = sessionId;
  6652. resolve(frames);
  6653. }
  6654. });
  6655. initRequestAsync({ windowId, sessionId, options });
  6656. });
  6657. }
  6658. function getSync(options) {
  6659. const sessionId = getNewSessionId();
  6660. options = JSON$4.parse(JSON$4.stringify(options));
  6661. sessions.set(sessionId, {
  6662. frames: [],
  6663. requestTimeouts: {},
  6664. responseTimeouts: {}
  6665. });
  6666. initRequestSync({ windowId, sessionId, options });
  6667. const frames = sessions.get(sessionId).frames;
  6668. frames.sessionId = sessionId;
  6669. return frames;
  6670. }
  6671. function cleanup(sessionId) {
  6672. sessions.delete(sessionId);
  6673. cleanupRequest({ windowId, sessionId, options: { sessionId } });
  6674. }
  6675. function getNewSessionId() {
  6676. return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("");
  6677. }
  6678. function initRequestSync(message) {
  6679. const sessionId = message.sessionId;
  6680. const waitForUserScript = globalThis[helper$2.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];
  6681. delete globalThis._singleFile_cleaningUp;
  6682. if (!TOP_WINDOW) {
  6683. windowId = globalThis.frameId = message.windowId;
  6684. }
  6685. processFrames(document$1, message.options, windowId, sessionId);
  6686. if (!TOP_WINDOW) {
  6687. if (message.options.userScriptEnabled && waitForUserScript) {
  6688. waitForUserScript(helper$2.ON_BEFORE_CAPTURE_EVENT_NAME);
  6689. }
  6690. sendInitResponse({ frames: [getFrameData(document$1, globalThis, windowId, message.options, message.scrolling)], sessionId, requestedFrameId: document$1.documentElement.dataset.requestedFrameId && windowId });
  6691. if (message.options.userScriptEnabled && waitForUserScript) {
  6692. waitForUserScript(helper$2.ON_AFTER_CAPTURE_EVENT_NAME);
  6693. }
  6694. delete document$1.documentElement.dataset.requestedFrameId;
  6695. }
  6696. }
  6697. async function initRequestAsync(message) {
  6698. const sessionId = message.sessionId;
  6699. const waitForUserScript = globalThis[helper$2.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];
  6700. delete globalThis._singleFile_cleaningUp;
  6701. if (!TOP_WINDOW) {
  6702. windowId = globalThis.frameId = message.windowId;
  6703. }
  6704. processFrames(document$1, message.options, windowId, sessionId);
  6705. if (!TOP_WINDOW) {
  6706. if (message.options.userScriptEnabled && waitForUserScript) {
  6707. await waitForUserScript(helper$2.ON_BEFORE_CAPTURE_EVENT_NAME);
  6708. }
  6709. sendInitResponse({ frames: [getFrameData(document$1, globalThis, windowId, message.options, message.scrolling)], sessionId, requestedFrameId: document$1.documentElement.dataset.requestedFrameId && windowId });
  6710. if (message.options.userScriptEnabled && waitForUserScript) {
  6711. await waitForUserScript(helper$2.ON_AFTER_CAPTURE_EVENT_NAME);
  6712. }
  6713. delete document$1.documentElement.dataset.requestedFrameId;
  6714. }
  6715. }
  6716. function cleanupRequest(message) {
  6717. if (!globalThis._singleFile_cleaningUp) {
  6718. globalThis._singleFile_cleaningUp = true;
  6719. const sessionId = message.sessionId;
  6720. cleanupFrames(getFrames(document$1), message.windowId, sessionId);
  6721. }
  6722. }
  6723. function initResponse(message) {
  6724. message.frames.forEach(frameData => clearFrameTimeout("responseTimeouts", message.sessionId, frameData.windowId));
  6725. const windowData = sessions.get(message.sessionId);
  6726. if (windowData) {
  6727. if (message.requestedFrameId) {
  6728. windowData.requestedFrameId = message.requestedFrameId;
  6729. }
  6730. message.frames.forEach(messageFrameData => {
  6731. let frameData = windowData.frames.find(frameData => messageFrameData.windowId == frameData.windowId);
  6732. if (!frameData) {
  6733. frameData = { windowId: messageFrameData.windowId };
  6734. windowData.frames.push(frameData);
  6735. }
  6736. if (!frameData.processed) {
  6737. frameData.content = messageFrameData.content;
  6738. frameData.baseURI = messageFrameData.baseURI;
  6739. frameData.title = messageFrameData.title;
  6740. frameData.url = messageFrameData.url;
  6741. frameData.canvases = messageFrameData.canvases;
  6742. frameData.fonts = messageFrameData.fonts;
  6743. frameData.stylesheets = messageFrameData.stylesheets;
  6744. frameData.images = messageFrameData.images;
  6745. frameData.posters = messageFrameData.posters;
  6746. frameData.videos = messageFrameData.videos;
  6747. frameData.usedFonts = messageFrameData.usedFonts;
  6748. frameData.shadowRoots = messageFrameData.shadowRoots;
  6749. frameData.processed = messageFrameData.processed;
  6750. frameData.scrollPosition = messageFrameData.scrollPosition;
  6751. frameData.scrolling = messageFrameData.scrolling;
  6752. frameData.adoptedStyleSheets = messageFrameData.adoptedStyleSheets;
  6753. }
  6754. });
  6755. const remainingFrames = windowData.frames.filter(frameData => !frameData.processed).length;
  6756. if (!remainingFrames) {
  6757. windowData.frames = windowData.frames.sort((frame1, frame2) => frame2.windowId.split(WINDOW_ID_SEPARATOR).length - frame1.windowId.split(WINDOW_ID_SEPARATOR).length);
  6758. if (windowData.resolve) {
  6759. if (windowData.requestedFrameId) {
  6760. windowData.frames.forEach(frameData => {
  6761. if (frameData.windowId == windowData.requestedFrameId) {
  6762. frameData.requestedFrame = true;
  6763. }
  6764. });
  6765. }
  6766. windowData.resolve(windowData.frames);
  6767. }
  6768. }
  6769. }
  6770. }
  6771. function processFrames(doc, options, parentWindowId, sessionId) {
  6772. const frameElements = getFrames(doc);
  6773. processFramesAsync(doc, frameElements, options, parentWindowId, sessionId);
  6774. if (frameElements.length) {
  6775. processFramesSync(doc, frameElements, options, parentWindowId, sessionId);
  6776. }
  6777. }
  6778. function processFramesAsync(doc, frameElements, options, parentWindowId, sessionId) {
  6779. const frames = [];
  6780. let requestTimeouts;
  6781. if (sessions.get(sessionId)) {
  6782. requestTimeouts = sessions.get(sessionId).requestTimeouts;
  6783. } else {
  6784. requestTimeouts = {};
  6785. sessions.set(sessionId, { requestTimeouts });
  6786. }
  6787. frameElements.forEach((frameElement, frameIndex) => {
  6788. const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
  6789. frameElement.setAttribute(helper$2.WIN_ID_ATTRIBUTE_NAME, windowId);
  6790. frames.push({ windowId });
  6791. });
  6792. sendInitResponse({ frames, sessionId, requestedFrameId: doc.documentElement.dataset.requestedFrameId && parentWindowId });
  6793. frameElements.forEach((frameElement, frameIndex) => {
  6794. const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
  6795. try {
  6796. sendMessage(frameElement.contentWindow, { method: INIT_REQUEST_MESSAGE, windowId, sessionId, options, scrolling: frameElement.scrolling });
  6797. } catch (error) {
  6798. // ignored
  6799. }
  6800. requestTimeouts[windowId] = globalThis.setTimeout(() => sendInitResponse({ frames: [{ windowId, processed: true }], sessionId }), TIMEOUT_INIT_REQUEST_MESSAGE);
  6801. });
  6802. delete doc.documentElement.dataset.requestedFrameId;
  6803. }
  6804. function processFramesSync(doc, frameElements, options, parentWindowId, sessionId) {
  6805. const frames = [];
  6806. frameElements.forEach((frameElement, frameIndex) => {
  6807. const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
  6808. let frameDoc;
  6809. try {
  6810. frameDoc = frameElement.contentDocument;
  6811. } catch (error) {
  6812. // ignored
  6813. }
  6814. if (frameDoc) {
  6815. try {
  6816. const frameWindow = frameElement.contentWindow;
  6817. frameWindow.stop();
  6818. clearFrameTimeout("requestTimeouts", sessionId, windowId);
  6819. processFrames(frameDoc, options, windowId, sessionId);
  6820. frames.push(getFrameData(frameDoc, frameWindow, windowId, options, frameElement.scrolling));
  6821. } catch (error) {
  6822. frames.push({ windowId, processed: true });
  6823. }
  6824. }
  6825. });
  6826. sendInitResponse({ frames, sessionId, requestedFrameId: doc.documentElement.dataset.requestedFrameId && parentWindowId });
  6827. delete doc.documentElement.dataset.requestedFrameId;
  6828. }
  6829. function clearFrameTimeout(type, sessionId, windowId) {
  6830. const session = sessions.get(sessionId);
  6831. if (session && session[type]) {
  6832. const timeout = session[type][windowId];
  6833. if (timeout) {
  6834. globalThis.clearTimeout(timeout);
  6835. delete session[type][windowId];
  6836. }
  6837. }
  6838. }
  6839. function createFrameResponseTimeout(sessionId, windowId) {
  6840. const session = sessions.get(sessionId);
  6841. if (session && session.responseTimeouts) {
  6842. session.responseTimeouts[windowId] = globalThis.setTimeout(() => sendInitResponse({ frames: [{ windowId: windowId, processed: true }], sessionId: sessionId }), TIMEOUT_INIT_RESPONSE_MESSAGE);
  6843. }
  6844. }
  6845. function cleanupFrames(frameElements, parentWindowId, sessionId) {
  6846. frameElements.forEach((frameElement, frameIndex) => {
  6847. const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
  6848. frameElement.removeAttribute(helper$2.WIN_ID_ATTRIBUTE_NAME);
  6849. try {
  6850. sendMessage(frameElement.contentWindow, { method: CLEANUP_REQUEST_MESSAGE, windowId, sessionId });
  6851. } catch (error) {
  6852. // ignored
  6853. }
  6854. });
  6855. frameElements.forEach((frameElement, frameIndex) => {
  6856. const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
  6857. let frameDoc;
  6858. try {
  6859. frameDoc = frameElement.contentDocument;
  6860. } catch (error) {
  6861. // ignored
  6862. }
  6863. if (frameDoc) {
  6864. try {
  6865. cleanupFrames(getFrames(frameDoc), windowId, sessionId);
  6866. } catch (error) {
  6867. // ignored
  6868. }
  6869. }
  6870. });
  6871. }
  6872. function sendInitResponse(message) {
  6873. message.method = INIT_RESPONSE_MESSAGE;
  6874. try {
  6875. top.singlefile.processors.frameTree.initResponse(message);
  6876. } catch (error) {
  6877. sendMessage(top, message, true);
  6878. }
  6879. }
  6880. function sendMessage(targetWindow, message, useChannel) {
  6881. if (targetWindow == top && browser && browser.runtime && browser.runtime.sendMessage) {
  6882. browser.runtime.sendMessage(message);
  6883. } else {
  6884. if (useChannel) {
  6885. const channel = new MessageChannel();
  6886. targetWindow.postMessage(MESSAGE_PREFIX + JSON$4.stringify({ method: message.method, sessionId: message.sessionId }), TARGET_ORIGIN, [channel.port2]);
  6887. channel.port1.postMessage(message);
  6888. } else {
  6889. targetWindow.postMessage(MESSAGE_PREFIX + JSON$4.stringify(message), TARGET_ORIGIN);
  6890. }
  6891. }
  6892. }
  6893. function getFrameData(document, globalThis, windowId, options, scrolling) {
  6894. const docData = helper$2.preProcessDoc(document, globalThis, options);
  6895. const content = helper$2.serialize(document);
  6896. helper$2.postProcessDoc(document, docData.markedElements, docData.invalidElements);
  6897. const baseURI = document.baseURI.split("#")[0];
  6898. return {
  6899. windowId,
  6900. content,
  6901. baseURI,
  6902. url: document.documentURI,
  6903. title: document.title,
  6904. canvases: docData.canvases,
  6905. fonts: docData.fonts,
  6906. stylesheets: docData.stylesheets,
  6907. images: docData.images,
  6908. posters: docData.posters,
  6909. videos: docData.videos,
  6910. usedFonts: docData.usedFonts,
  6911. shadowRoots: docData.shadowRoots,
  6912. scrollPosition: docData.scrollPosition,
  6913. scrolling,
  6914. adoptedStyleSheets: docData.adoptedStyleSheets,
  6915. processed: true
  6916. };
  6917. }
  6918. function getFrames(document) {
  6919. let frames = Array.from(document.querySelectorAll(FRAMES_CSS_SELECTOR));
  6920. document.querySelectorAll(ALL_ELEMENTS_CSS_SELECTOR).forEach(element => {
  6921. const shadowRoot = helper$2.getShadowRoot(element);
  6922. if (shadowRoot) {
  6923. frames = frames.concat(...shadowRoot.querySelectorAll(FRAMES_CSS_SELECTOR));
  6924. }
  6925. });
  6926. return frames;
  6927. }
  6928. var contentFrameTree = /*#__PURE__*/Object.freeze({
  6929. __proto__: null,
  6930. getAsync: getAsync,
  6931. getSync: getSync,
  6932. cleanup: cleanup,
  6933. initResponse: initResponse,
  6934. TIMEOUT_INIT_REQUEST_MESSAGE: TIMEOUT_INIT_REQUEST_MESSAGE
  6935. });
  6936. /*
  6937. * Copyright 2010-2022 Gildas Lormeau
  6938. * contact : gildas.lormeau <at> gmail.com
  6939. *
  6940. * This file is part of SingleFile.
  6941. *
  6942. * The code in this file is free software: you can redistribute it and/or
  6943. * modify it under the terms of the GNU Affero General Public License
  6944. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  6945. * of the License, or (at your option) any later version.
  6946. *
  6947. * The code in this file is distributed in the hope that it will be useful,
  6948. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  6949. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  6950. * General Public License for more details.
  6951. *
  6952. * As additional permission under GNU AGPL version 3 section 7, you may
  6953. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  6954. * AGPL normally required by section 4, provided you include this license
  6955. * notice and a URL through which recipients can access the Corresponding
  6956. * Source.
  6957. */
  6958. var index$2 = /*#__PURE__*/Object.freeze({
  6959. __proto__: null,
  6960. compression: compression,
  6961. frameTree: contentFrameTree,
  6962. hooksFrames: contentHooksFrames,
  6963. lazy: contentLazyLoader
  6964. });
  6965. // dist/csstree.esm.js from https://github.com/csstree/csstree/tree/612cc5f2922b2304869497d165a0cc65257f7a8b
  6966. /*
  6967. * Copyright (C) 2016-2022 by Roman Dvornov
  6968. *
  6969. * Permission is hereby granted, free of charge, to any person obtaining a copy
  6970. * of this software and associated documentation files (the "Software"), to deal
  6971. * in the Software without restriction, including without limitation the rights
  6972. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6973. * copies of the Software, and to permit persons to whom the Software is
  6974. * furnished to do so, subject to the following conditions:
  6975. *
  6976. * The above copyright notice and this permission notice shall be included in
  6977. * all copies or substantial portions of the Software.
  6978. *
  6979. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  6980. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  6981. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  6982. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  6983. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  6984. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  6985. * THE SOFTWARE.
  6986. */
  6987. var rs=Object.create;var tr=Object.defineProperty;var ns=Object.getOwnPropertyDescriptor;var os=Object.getOwnPropertyNames;var is=Object.getPrototypeOf,as=Object.prototype.hasOwnProperty;var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0});},ss=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of os(t))!as.call(e,o)&&o!==r&&tr(e,o,{get:()=>t[o],enumerable:!(n=ns(t,o))||n.enumerable});return e};var ls=(e,t,r)=>(r=e!=null?rs(is(e)):{},ss(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e));var Jo=Oe(ur=>{var Zo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ur.encode=function(e){if(0<=e&&e<Zo.length)return Zo[e];throw new TypeError("Must be between 0 and 63: "+e)};ur.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,u=43,c=47,a=26,l=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+a:i<=e&&e<=s?e-i+l:e==u?62:e==c?63:-1};});var oi=Oe(hr=>{var ei=Jo(),pr=5,ti=1<<pr,ri=ti-1,ni=ti;function ks(e){return e<0?(-e<<1)+1:(e<<1)+0}function ws(e){var t=(e&1)===1,r=e>>1;return t?-r:r}hr.encode=function(t){var r="",n,o=ks(t);do n=o&ri,o>>>=pr,o>0&&(n|=ni),r+=ei.encode(n);while(o>0);return r};hr.decode=function(t,r,n){var o=t.length,i=0,s=0,u,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ei.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(c&ni),c&=ri,i=i+(c<<s),s+=pr;}while(u);n.value=ws(i),n.rest=r;};});var Et=Oe(K=>{function vs(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}K.getArg=vs;var ii=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ss=/^data:.+\,.+$/;function nt(e){var t=e.match(ii);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}K.urlParse=nt;function Ue(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}K.urlGenerate=Ue;var Cs=32;function As(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var o=t[0];return t[0]=t[n],t[n]=o,t[0].result}var i=e(r);return t.unshift({input:r,result:i}),t.length>Cs&&t.pop(),i}}var mr=As(function(t){var r=t,n=nt(t);if(n){if(!n.path)return t;r=n.path;}for(var o=K.isAbsolute(r),i=[],s=0,u=0;;)if(s=u,u=r.indexOf("/",s),u===-1){i.push(r.slice(s));break}else for(i.push(r.slice(s,u));u<r.length&&r[u]==="/";)u++;for(var c,a=0,u=i.length-1;u>=0;u--)c=i[u],c==="."?i.splice(u,1):c===".."?a++:a>0&&(c===""?(i.splice(u+1,a),a=0):(i.splice(u,2),a--));return r=i.join("/"),r===""&&(r=o?"/":"."),n?(n.path=r,Ue(n)):r});K.normalize=mr;function ai(e,t){e===""&&(e="."),t===""&&(t=".");var r=nt(t),n=nt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ue(r);if(r||t.match(Ss))return t;if(n&&!n.host&&!n.path)return n.host=t,Ue(n);var o=t.charAt(0)==="/"?t:mr(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Ue(n)):o}K.join=ai;K.isAbsolute=function(e){return e.charAt(0)==="/"||ii.test(e)};function Ts(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r;}return Array(r+1).join("../")+t.substr(e.length+1)}K.relative=Ts;var si=function(){var e=Object.create(null);return !("__proto__"in e)}();function li(e){return e}function Es(e){return ci(e)?"$"+e:e}K.toSetString=si?li:Es;function Ls(e){return ci(e)?e.slice(1):e}K.fromSetString=si?li:Ls;function ci(e){if(!e)return !1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return !1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return !1;return !0}function Ps(e,t,r){var n=be(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:be(e.name,t.name)}K.compareByOriginalPositions=Ps;function Is(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:be(e.name,t.name)}K.compareByOriginalPositionsNoSource=Is;function Ds(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=be(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:be(e.name,t.name)}K.compareByGeneratedPositionsDeflated=Ds;function Os(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=be(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:be(e.name,t.name)}K.compareByGeneratedPositionsDeflatedNoLine=Os;function be(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function Ns(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=be(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:be(e.name,t.name)}K.compareByGeneratedPositionsInflated=Ns;function zs(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}K.parseSourceMapInput=zs;function Ms(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=nt(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1));}t=ai(Ue(n),t);}return mr(t)}K.computeSourceURL=Ms;});var pi=Oe(ui=>{var fr=Et(),dr=Object.prototype.hasOwnProperty,Le=typeof Map<"u";function xe(){this._array=[],this._set=Le?new Map:Object.create(null);}xe.fromArray=function(t,r){for(var n=new xe,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};xe.prototype.size=function(){return Le?this._set.size:Object.getOwnPropertyNames(this._set).length};xe.prototype.add=function(t,r){var n=Le?t:fr.toSetString(t),o=Le?this.has(t):dr.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(Le?this._set.set(t,i):this._set[n]=i);};xe.prototype.has=function(t){if(Le)return this._set.has(t);var r=fr.toSetString(t);return dr.call(this._set,r)};xe.prototype.indexOf=function(t){if(Le){var r=this._set.get(t);if(r>=0)return r}else {var n=fr.toSetString(t);if(dr.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};xe.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};xe.prototype.toArray=function(){return this._array.slice()};ui.ArraySet=xe;});var fi=Oe(mi=>{var hi=Et();function Rs(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||hi.compareByGeneratedPositionsInflated(e,t)<=0}function Lt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0};}Lt.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r);};Lt.prototype.add=function(t){Rs(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t));};Lt.prototype.toArray=function(){return this._sorted||(this._array.sort(hi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};mi.MappingList=Lt;});var gi=Oe(di=>{var ot=oi(),q=Et(),Pt=pi().ArraySet,Fs=fi().MappingList;function oe(e){e||(e={}),this._file=q.getArg(e,"file",null),this._sourceRoot=q.getArg(e,"sourceRoot",null),this._skipValidation=q.getArg(e,"skipValidation",!1),this._sources=new Pt,this._names=new Pt,this._mappings=new Fs,this._sourcesContents=null;}oe.prototype._version=3;oe.fromSourceMap=function(t){var r=t.sourceRoot,n=new oe({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=q.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i);}),t.sources.forEach(function(o){var i=o;r!==null&&(i=q.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s);}),n};oe.prototype.addMapping=function(t){var r=q.getArg(t,"generated"),n=q.getArg(t,"original",null),o=q.getArg(t,"source",null),i=q.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i});};oe.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=q.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[q.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[q.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null));};oe.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file;}var i=this._sourceRoot;i!=null&&(o=q.relative(i,o));var s=new Pt,u=new Pt;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var a=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});a.source!=null&&(c.source=a.source,n!=null&&(c.source=q.join(n,c.source)),i!=null&&(c.source=q.relative(i,c.source)),c.originalLine=a.line,c.originalColumn=a.column,a.name!=null&&(c.name=a.name));}var l=c.source;l!=null&&!s.has(l)&&s.add(l);var p=c.name;p!=null&&!u.has(p)&&u.add(p);},this),this._sources=s,this._names=u,t.sources.forEach(function(c){var a=t.sourceContentFor(c);a!=null&&(n!=null&&(c=q.join(n,c)),i!=null&&(c=q.relative(i,c)),this.setSourceContent(c,a));},this);};oe.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};oe.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,u="",c,a,l,p,m=this._mappings.toArray(),f=0,P=m.length;f<P;f++){if(a=m[f],c="",a.generatedLine!==r)for(t=0;a.generatedLine!==r;)c+=";",r++;else if(f>0){if(!q.compareByGeneratedPositionsInflated(a,m[f-1]))continue;c+=",";}c+=ot.encode(a.generatedColumn-t),t=a.generatedColumn,a.source!=null&&(p=this._sources.indexOf(a.source),c+=ot.encode(p-s),s=p,c+=ot.encode(a.originalLine-1-o),o=a.originalLine-1,c+=ot.encode(a.originalColumn-n),n=a.originalColumn,a.name!=null&&(l=this._names.indexOf(a.name),c+=ot.encode(l-i),i=l)),u+=c;}return u};oe.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=q.relative(r,n));var o=q.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};oe.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};oe.prototype.toString=function(){return JSON.stringify(this.toJSON())};di.SourceMapGenerator=oe;});var $e={};b($e,{AtKeyword:()=>I,BadString:()=>Ae,BadUrl:()=>Y,CDC:()=>j,CDO:()=>ue,Colon:()=>O,Comma:()=>G,Comment:()=>E,Delim:()=>g,Dimension:()=>y,EOF:()=>Xe,Function:()=>x,Hash:()=>v,Ident:()=>h,LeftCurlyBracket:()=>M,LeftParenthesis:()=>T,LeftSquareBracket:()=>U,Number:()=>d,Percentage:()=>A,RightCurlyBracket:()=>H,RightParenthesis:()=>w,RightSquareBracket:()=>V,Semicolon:()=>_,String:()=>W,Url:()=>F,WhiteSpace:()=>k});var Xe=0,h=1,x=2,I=3,v=4,W=5,Ae=6,F=7,Y=8,g=9,d=10,A=11,y=12,k=13,ue=14,j=15,O=16,_=17,G=18,U=19,V=20,T=21,w=22,M=23,H=24,E=25;function B(e){return e>=48&&e<=57}function ee(e){return B(e)||e>=65&&e<=70||e>=97&&e<=102}function yt(e){return e>=65&&e<=90}function cs(e){return e>=97&&e<=122}function us(e){return yt(e)||cs(e)}function ps(e){return e>=128}function xt(e){return us(e)||ps(e)||e===95}function Ne(e){return xt(e)||B(e)||e===45}function hs(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function Ze(e){return e===10||e===13||e===12}function pe(e){return Ze(e)||e===32||e===9}function $(e,t){return !(e!==92||Ze(t)||t===0)}function ze(e,t,r){return e===45?xt(t)||t===45||$(t,r):xt(e)?!0:e===92?$(e,t):!1}function kt(e,t,r){return e===43||e===45?B(t)?2:t===46&&B(r)?3:0:e===46?B(t)?2:0:B(e)?1:0}function wt(e){return e===65279||e===65534?1:0}var rr=new Array(128),ms=128,Je=130,nr=131,vt=132,or=133;for(let e=0;e<rr.length;e++)rr[e]=pe(e)&&Je||B(e)&&nr||xt(e)&&vt||hs(e)&&or||e||ms;function St(e){return e<128?rr[e]:vt}function Me(e,t){return t<e.length?e.charCodeAt(t):0}function Ct(e,t,r){return r===13&&Me(e,t+1)===10?2:1}function de(e,t,r){let n=e.charCodeAt(t);return yt(n)&&(n=n|32),n===r}function ge(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return !1;for(let o=t;o<r;o++){let i=n.charCodeAt(o-t),s=e.charCodeAt(o);if(yt(s)&&(s=s|32),s!==i)return !1}return !0}function Uo(e,t){for(;t>=0&&pe(e.charCodeAt(t));t--);return t+1}function et(e,t){for(;t<e.length&&pe(e.charCodeAt(t));t++);return t}function ir(e,t){for(;t<e.length&&B(e.charCodeAt(t));t++);return t}function se(e,t){if(t+=2,ee(Me(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&ee(Me(e,t));t++);let r=Me(e,t);pe(r)&&(t+=Ct(e,t,r));}return t}function tt(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!Ne(r)){if($(r,Me(e,t+1))){t=se(e,t)-1;continue}break}}return t}function Te(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),B(r)&&(t=ir(e,t+1),r=e.charCodeAt(t)),r===46&&B(e.charCodeAt(t+1))&&(t+=2,t=ir(e,t)),de(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),B(r)&&(t=ir(e,t+1+n+1));}return t}function At(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(r===41){t++;break}$(r,Me(e,t+1))&&(t=se(e,t));}return t}function Re(e){if(e.length===1&&!ee(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return (t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Fe=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function Be(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var jo=10,fs=12,qo=13;function Wo(e){let t=e.source,r=t.length,n=t.length>0?wt(t.charCodeAt(0)):0,o=Be(e.lines,r),i=Be(e.columns,r),s=e.startLine,u=e.startColumn;for(let c=n;c<r;c++){let a=t.charCodeAt(c);o[c]=s,i[c]=u++,(a===jo||a===qo||a===fs)&&(a===qo&&c+1<r&&t.charCodeAt(c+1)===jo&&(c++,o[c]=s,i[c]=u),s++,u=1);}o[r]=s,i[r]=u,e.lines=o,e.columns=i,e.computed=!0;}var Tt=class{constructor(){this.lines=null,this.columns=null,this.computed=!1;}setSource(t,r=0,n=1,o=1){this.source=t,this.startOffset=r,this.startLine=n,this.startColumn=o,this.computed=!1;}getLocation(t,r){return this.computed||Wo(this),{source:r,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,r,n){return this.computed||Wo(this),{source:n,start:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]},end:{offset:this.startOffset+r,line:this.lines[r],column:this.columns[r]}}}};var ne=16777215,we=24,ds=new Map([[2,22],[21,22],[19,20],[23,24]]),rt=class{constructor(t,r){this.setSource(t,r);}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset;}setSource(t="",r=()=>{}){t=String(t||"");let n=t.length,o=Be(this.offsetAndType,t.length+1),i=Be(this.balance,t.length+1),s=0,u=0,c=0,a=-1;for(this.offsetAndType=null,this.balance=null,r(t,(l,p,m)=>{switch(l){default:i[s]=n;break;case u:{let f=c&ne;for(c=i[f],u=c>>we,i[s]=f,i[f++]=s;f<s;f++)i[f]===n&&(i[f]=s);break}case 21:case 2:case 19:case 23:i[s]=c,u=ds.get(l),c=u<<we|s;break}o[s++]=l<<we|m,a===-1&&(a=p);}),o[s]=0<<we|n,i[s]=n,i[n]=n;c!==0;){let l=c&ne;c=i[l],i[l]=n;}this.source=t,this.firstCharOffset=a===-1?0:a,this.tokenCount=s,this.offsetAndType=o,this.balance=i,this.reset(),this.next();}lookupType(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t]>>we:0}lookupOffset(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t-1]&ne:this.source.length}lookupValue(t,r){return t+=this.tokenIndex,t<this.tokenCount?ge(this.source,this.offsetAndType[t-1]&ne,this.offsetAndType[t]&ne,r):!1}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&ne:this.offsetAndType[this.tokenCount]&ne:this.firstCharOffset}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBalanceEdge(t){return this.balance[this.tokenIndex]<t}isDelim(t,r){return r?this.lookupType(r)===9&&this.source.charCodeAt(this.lookupOffset(r))===t:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===t}skip(t){let r=this.tokenIndex+t;r<this.tokenCount?(this.tokenIndex=r,this.tokenStart=this.offsetAndType[r-1]&ne,r=this.offsetAndType[r],this.tokenType=r>>we,this.tokenEnd=r&ne):(this.tokenIndex=this.tokenCount,this.next());}next(){let t=this.tokenIndex+1;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.tokenEnd,t=this.offsetAndType[t],this.tokenType=t>>we,this.tokenEnd=t&ne):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length);}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next();}skipUntilBalanced(t,r){let n=t,o,i;e:for(;n<this.tokenCount;n++){if(o=this.balance[n],o<t)break e;switch(i=n>0?this.offsetAndType[n-1]&ne:this.firstCharOffset,r(this.source.charCodeAt(i))){case 1:break e;case 2:n++;break e;default:this.balance[o]===n&&(n=o);}}this.skip(n-this.tokenIndex);}forEachToken(t){for(let r=0,n=this.firstCharOffset;r<this.tokenCount;r++){let o=n,i=this.offsetAndType[r],s=i&ne,u=i>>we;n=s,t(u,o,s,r);}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,o,i)=>{t[i]={idx:i,type:Fe[r],chunk:this.source.substring(n,o),balance:this.balance[i]};}),t}};function ve(e,t){function r(p){return p<u?e.charCodeAt(p):0}function n(){if(a=Te(e,a),ze(r(a),r(a+1),r(a+2))){l=12,a=tt(e,a);return}if(r(a)===37){l=11,a++;return}l=10;}function o(){let p=a;if(a=tt(e,a),ge(e,p,a,"url")&&r(a)===40){if(a=et(e,a+1),r(a)===34||r(a)===39){l=2,a=p+4;return}s();return}if(r(a)===40){l=2,a++;return}l=1;}function i(p){for(p||(p=r(a++)),l=5;a<e.length;a++){let m=e.charCodeAt(a);switch(St(m)){case p:a++;return;case Je:if(Ze(m)){a+=Ct(e,a,m),l=6;return}break;case 92:if(a===e.length-1)break;let f=r(a+1);Ze(f)?a+=Ct(e,a+1,f):$(m,f)&&(a=se(e,a)-1);break}}}function s(){for(l=7,a=et(e,a);a<e.length;a++){let p=e.charCodeAt(a);switch(St(p)){case 41:a++;return;case Je:if(a=et(e,a),r(a)===41||a>=e.length){a<e.length&&a++;return}a=At(e,a),l=8;return;case 34:case 39:case 40:case or:a=At(e,a),l=8;return;case 92:if($(p,r(a+1))){a=se(e,a)-1;break}a=At(e,a),l=8;return}}}e=String(e||"");let u=e.length,c=wt(r(0)),a=c,l;for(;a<u;){let p=e.charCodeAt(a);switch(St(p)){case Je:l=13,a=et(e,a+1);break;case 34:i();break;case 35:Ne(r(a+1))||$(r(a+1),r(a+2))?(l=4,a=tt(e,a+1)):(l=9,a++);break;case 39:i();break;case 40:l=21,a++;break;case 41:l=22,a++;break;case 43:kt(p,r(a+1),r(a+2))?n():(l=9,a++);break;case 44:l=18,a++;break;case 45:kt(p,r(a+1),r(a+2))?n():r(a+1)===45&&r(a+2)===62?(l=15,a=a+3):ze(p,r(a+1),r(a+2))?o():(l=9,a++);break;case 46:kt(p,r(a+1),r(a+2))?n():(l=9,a++);break;case 47:r(a+1)===42?(l=25,a=e.indexOf("*/",a+2),a=a===-1?e.length:a+2):(l=9,a++);break;case 58:l=16,a++;break;case 59:l=17,a++;break;case 60:r(a+1)===33&&r(a+2)===45&&r(a+3)===45?(l=14,a=a+4):(l=9,a++);break;case 64:ze(r(a+1),r(a+2),r(a+3))?(l=3,a=tt(e,a+1)):(l=9,a++);break;case 91:l=19,a++;break;case 92:$(p,r(a+1))?o():(l=9,a++);break;case 93:l=20,a++;break;case 123:l=23,a++;break;case 125:l=24,a++;break;case nr:n();break;case vt:o();break;default:l=9,a++;}t(l,c,c=a);}}var _e=null,D=class{static createItem(t){return {prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null;}createItem(t){return D.createItem(t)}allocateCursor(t,r){let n;return _e!==null?(n=_e,_e=_e.cursor,n.prev=t,n.next=r,n.cursor=this.cursor):n={prev:t,next:r,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=_e,_e=t;}updateCursors(t,r,n,o){let{cursor:i}=this;for(;i!==null;)i.prev===t&&(i.prev=r),i.next===n&&(i.next=o),i=i.cursor;}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data;}get size(){let t=0;for(let r=this.head;r!==null;r=r.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let r=null;this.head=null;for(let n of t){let o=D.createItem(n);r!==null?r.next=o:this.head=o,o.prev=r,r=o;}return this.tail=r,this}toArray(){return [...this]}toJSON(){return [...this]}forEach(t,r=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let o=n.next;n.next=o.next,t.call(r,o.data,o,this);}this.releaseCursor();}forEachRight(t,r=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let o=n.prev;n.prev=o.prev,t.call(r,o.data,o,this);}this.releaseCursor();}reduce(t,r,n=this){let o=this.allocateCursor(null,this.head),i=r,s;for(;o.next!==null;)s=o.next,o.next=s.next,i=t.call(n,i,s.data,s,this);return this.releaseCursor(),i}reduceRight(t,r,n=this){let o=this.allocateCursor(this.tail,null),i=r,s;for(;o.prev!==null;)s=o.prev,o.prev=s.prev,i=t.call(n,i,s.data,s,this);return this.releaseCursor(),i}some(t,r=this){for(let n=this.head;n!==null;n=n.next)if(t.call(r,n.data,n,this))return !0;return !1}map(t,r=this){let n=new D;for(let o=this.head;o!==null;o=o.next)n.appendData(t.call(r,o.data,o,this));return n}filter(t,r=this){let n=new D;for(let o=this.head;o!==null;o=o.next)t.call(r,o.data,o,this)&&n.appendData(o.data);return n}nextUntil(t,r,n=this){if(t===null)return;let o=this.allocateCursor(null,t);for(;o.next!==null;){let i=o.next;if(o.next=i.next,r.call(n,i.data,i,this))break}this.releaseCursor();}prevUntil(t,r,n=this){if(t===null)return;let o=this.allocateCursor(t,null);for(;o.prev!==null;){let i=o.prev;if(o.prev=i.prev,r.call(n,i.data,i,this))break}this.releaseCursor();}clear(){this.head=null,this.tail=null;}copy(){let t=new D;for(let r of this)t.appendData(r);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head!==null?(this.head.prev=t,t.next=this.head):this.tail=t,this.head=t,this}prependData(t){return this.prepend(D.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(D.createItem(t))}insert(t,r=null){if(r!==null)if(this.updateCursors(r.prev,t,r,t),r.prev===null){if(this.head!==r)throw new Error("before doesn't belong to list");this.head=t,r.prev=t,t.next=r,this.updateCursors(null,t);}else r.prev.next=t,t.prev=r.prev,r.prev=t,t.next=r;else this.updateCursors(this.tail,t,null,t),this.tail!==null?(this.tail.next=t,t.prev=this.tail):this.head=t,this.tail=t;return this}insertData(t,r){return this.insert(D.createItem(t),r)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else {if(this.head!==t)throw new Error("item doesn't belong to list");this.head=t.next;}if(t.next!==null)t.next.prev=t.prev;else {if(this.tail!==t)throw new Error("item doesn't belong to list");this.tail=t.prev;}return t.prev=null,t.next=null,t}push(t){this.insert(D.createItem(t));}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(D.createItem(t));}shift(){return this.head!==null?this.remove(this.head):null}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,r){return t.head===null?this:(r!=null?(this.updateCursors(r.prev,t.tail,r,t.head),r.prev!==null?(r.prev.next=t.head,t.head.prev=r.prev):this.head=t.head,r.prev=t.tail,t.tail.next=r):(this.updateCursors(this.tail,t.tail,null,t.head),this.tail!==null?(this.tail.next=t.head,t.head.prev=this.tail):this.head=t.head,this.tail=t.tail),t.head=null,t.tail=null,this)}replace(t,r){"head"in r?this.insertList(r,t):this.insert(r,t),this.remove(t);}};function Ee(e,t){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return (n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
  6988. `)}})}var ar=100,Ho=60,Yo=" ";function Go({source:e,line:t,column:r},n){function o(l,p){return i.slice(l,p).map((m,f)=>String(l+f+1).padStart(c)+" |"+m).join(`
  6989. `)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-n)-1,u=Math.min(t+n,i.length+1),c=Math.max(4,String(u).length)+1,a=0;r+=(Yo.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>ar&&(a=r-Ho+3,r=Ho-2);for(let l=s;l<=u;l++)l>=0&&l<i.length&&(i[l]=i[l].replace(/\t/g,Yo),i[l]=(a>0&&i[l].length>a?"\u2026":"")+i[l].substr(a,ar-2)+(i[l].length>a+ar-1?"\u2026":""));return [o(s,t),new Array(r+c+2).join("-")+"^",o(t,u)].filter(Boolean).join(`
  6990. `)}function sr(e,t,r,n,o){return Object.assign(Ee("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment(s){return Go({source:t,line:n,column:o},isNaN(s)?0:s)},get formattedMessage(){return `Parse error: ${e}
  6991. `+Go({source:t,line:n,column:o},2)}})}function Vo(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(o===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o);}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Ko=()=>{},gs=33,bs=35,lr=59,Qo=123,Xo=0;function xs(e){return function(){return this[e]()}}function cr(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o);}return t}function ys(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:cr(e.atrule),pseudo:cr(e.pseudo),node:cr(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=xs(e.parseContext[r]);break}return {config:t,...t,...t.node}}function $o(e){let t="",r="<unknown>",n=!1,o=Ko,i=!1,s=new Tt,u=Object.assign(new rt,ys(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Vo,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(a){return a===Qo?1:0},consumeUntilLeftCurlyBracketOrSemicolon(a){return a===Qo||a===lr?1:0},consumeUntilExclamationMarkOrSemicolon(a){return a===gs||a===lr?1:0},consumeUntilSemicolonIncluded(a){return a===lr?2:0},createList(){return new D},createSingleNodeList(a){return new D().appendData(a)},getFirstListNode(a){return a&&a.first},getLastListNode(a){return a&&a.last},parseWithFallback(a,l){let p=this.tokenIndex;try{return a.call(this)}catch(m){if(i)throw m;let f=l.call(this,p);return i=!0,o(m,f),i=!1,f}},lookupNonWSType(a){let l;do if(l=this.lookupType(a++),l!==13)return l;while(l!==Xo);return Xo},charCodeAt(a){return a>=0&&a<t.length?t.charCodeAt(a):0},substring(a,l){return t.substring(a,l)},substrToCursor(a){return this.source.substring(a,this.tokenStart)},cmpChar(a,l){return de(t,a,l)},cmpStr(a,l,p){return ge(t,a,l,p)},consume(a){let l=this.tokenStart;return this.eat(a),this.substrToCursor(l)},consumeFunctionName(){let a=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),a},consumeNumber(a){let l=t.substring(this.tokenStart,Te(t,this.tokenStart));return this.eat(a),l},eat(a){if(this.tokenType!==a){let l=Fe[a].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),p=`${/[[\](){}]/.test(l)?`"${l}"`:l} is expected`,m=this.tokenStart;switch(a){case 1:this.tokenType===2||this.tokenType===7?(m=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(bs)&&(this.next(),m++,p="Name is expected");break;case 11:this.tokenType===10&&(m=this.tokenEnd,p="Percent sign is expected");break}this.error(p,m);}this.next();},eatIdent(a){(this.tokenType!==1||this.lookupValue(0,a)===!1)&&this.error(`Identifier "${a}" is expected`),this.next();},eatDelim(a){this.isDelim(a)||this.error(`Delim "${String.fromCharCode(a)}" is expected`),this.next();},getLocation(a,l){return n?s.getLocationRange(a,l,r):null},getLocationFromList(a){if(n){let l=this.getFirstListNode(a),p=this.getLastListNode(a);return s.getLocationRange(l!==null?l.loc.start.offset-s.startOffset:this.tokenStart,p!==null?p.loc.end.offset-s.startOffset:this.tokenStart,r)}return null},error(a,l){let p=typeof l<"u"&&l<t.length?s.getLocation(l):this.eof?s.getLocation(Uo(t,t.length-1)):s.getLocation(this.tokenStart);throw new sr(a||"Unexpected input",t,p.offset,p.line,p.column)}});return Object.assign(function(a,l){t=a,l=l||{},u.setSource(t,ve),s.setSource(t,l.offset,l.line,l.column),r=l.filename||"<unknown>",n=Boolean(l.positions),o=typeof l.onParseError=="function"?l.onParseError:Ko,i=!1,u.parseAtrulePrelude="parseAtrulePrelude"in l?Boolean(l.parseAtrulePrelude):!0,u.parseRulePrelude="parseRulePrelude"in l?Boolean(l.parseRulePrelude):!0,u.parseValue="parseValue"in l?Boolean(l.parseValue):!0,u.parseCustomProperty="parseCustomProperty"in l?Boolean(l.parseCustomProperty):!1;let{context:p="default",onComment:m}=l;if(!(p in u.context))throw new Error("Unknown context `"+p+"`");typeof m=="function"&&u.forEachToken((P,te,X)=>{if(P===25){let S=u.getLocation(te,X),R=ge(t,X-2,X,"*/")?t.slice(te+2,X-2):t.slice(te+2,X);m(R,S);}});let f=u.context[p].call(u,l);return u.eof||u.error(),f},{SyntaxError:sr,config:u.config})}var xi=ls(gi(),1),bi=new Set(["Atrule","Selector","Declaration"]);function yi(e){let t=new xi.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,u=0,c=!1,a=e.node;e.node=function(m){if(m.loc&&m.loc.start&&bi.has(m.type)){let f=m.loc.start.line,P=m.loc.start.column-1;(n.line!==f||n.column!==P)&&(n.line=f,n.column=P,r.line=s,r.column=u,c&&(c=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),c=!0,t.addMapping({source:m.loc.source,original:n,generated:r}));}a.call(this,m),c&&bi.has(m.type)&&(o.line=s,o.column=u);};let l=e.emit;e.emit=function(m,f,P){for(let te=0;te<m.length;te++)m.charCodeAt(te)===10?(s++,u=0):u++;l(m,f,P);};let p=e.result;return e.result=function(){return c&&t.addMapping(i),{css:p(),map:t}},e}var It={};b(It,{safe:()=>br,spec:()=>js});var Bs=43,_s=45,gr=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let r=e.charCodeAt(0);return r>127?32768:r<<8}return e},ki=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],Us=ki.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function wi(e){let t=new Set(e.map(([r,n])=>gr(r)<<16|gr(n)));return function(r,n,o){let i=gr(n,o),s=o.charCodeAt(0);return (s===_s&&n!==1&&n!==2&&n!==15||s===Bs?t.has(r<<16|s<<8):t.has(r<<16|i))&&this.emit(" ",13,!0),i}}var js=wi(ki),br=wi(Us);var qs=92;function Ws(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n;});return}e.children.forEach(this.node,this);}function Hs(e){ve(e,(t,r,n)=>{this.token(t,e.slice(r,n));});}function vi(e){let t=new Map;for(let r in e.node){let n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n);}return function(r,n){let o="",i=0,s={node(c){if(t.has(c.type))t.get(c.type).call(u,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:br,token(c,a){i=this.tokenBefore(i,c,a),this.emit(a,c,!1),c===9&&a.charCodeAt(0)===qs&&this.emit(`
  6992. `,13,!0);},emit(c){o+=c;},result(){return o}};n&&(typeof n.decorator=="function"&&(s=n.decorator(s)),n.sourceMap&&(s=yi(s)),n.mode in It&&(s.tokenBefore=It[n.mode]));let u={node:c=>s.node(c),children:Ws,token:(c,a)=>s.token(c,a),tokenize:Hs};return s.node(r),s.result()}}function Si(e){return {fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof D)&&(r.children=new D().fromArray(r.children));}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof D&&(r.children=r.children.toArray());}}),t}}}var{hasOwnProperty:xr}=Object.prototype,it=function(){};function Ci(e){return typeof e=="function"?e:it}function Ai(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o);}}function Ys(e,t){let r=t.structure,n=[];for(let o in r){if(xr.call(r,o)===!1)continue;let i=r[o],s={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let u of i)u===null?s.nullable=!0:typeof u=="string"?s.type="node":Array.isArray(u)&&(s.type="list");s.type&&n.push(s);}return n.length?{context:t.walkContext,fields:n}:null}function Gs(e){let t={};for(let r in e.node)if(xr.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Ys(r,n);}return t}function Ti(e,t){let r=e.fields.slice(),n=e.context,o=typeof n=="string";return t&&r.reverse(),function(i,s,u,c){let a;o&&(a=s[n],s[n]=i);for(let l of r){let p=i[l.name];if(!l.nullable||p){if(l.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return !0}else if(u(p))return !0}}o&&(s[n]=a);}}function Ei({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return {Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function Li(e){let t=Gs(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let a in t)xr.call(t,a)&&t[a]!==null&&(r[a]=Ti(t[a],!1),n[a]=Ti(t[a],!0));let s=Ei(r),u=Ei(n),c=function(a,l){function p(S,R,ke){let z=m.call(X,S,R,ke);return z===o?!0:z===i?!1:!!(P.hasOwnProperty(S.type)&&P[S.type](S,X,p,te)||f.call(X,S,R,ke)===o)}let m=it,f=it,P=r,te=(S,R,ke,z)=>S||p(R,ke,z),X={break:o,skip:i,root:a,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof l=="function")m=l;else if(l&&(m=Ci(l.enter),f=Ci(l.leave),l.reverse&&(P=n),l.visit)){if(s.hasOwnProperty(l.visit))P=l.reverse?u[l.visit]:s[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");m=Ai(m,l.visit),f=Ai(f,l.visit);}if(m===it&&f===it)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(a);};return c.break=o,c.skip=i,c.find=function(a,l){let p=null;return c(a,function(m,f,P){if(l.call(this,m,f,P))return p=m,o}),p},c.findLast=function(a,l){let p=null;return c(a,{reverse:!0,enter(m,f,P){if(l.call(this,m,f,P))return p=m,o}}),p},c.findAll=function(a,l){let p=[];return c(a,function(m,f,P){l.call(this,m,f,P)&&p.push(m);}),p},c}function Vs(e){return e}function Ks(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function Qs(e){switch(e.type){case"Range":return " ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function Xs(e,t,r,n){let o=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>yr(s,t,r,n)).join(o);return e.explicit||r?(n||i[0]===","?"[":"[ ")+i+(n?"]":" ]"):i}function yr(e,t,r,n){let o;switch(e.type){case"Group":o=Xs(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return yr(e.term,t,r,n)+t(Ks(e),e);case"Type":o="<"+e.name+(e.opts?t(Qs(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function Pe(e,t){let r=Vs,n=!1,o=!1;return typeof t=="function"?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),typeof t.decorate=="function"&&(r=t.decorate)),yr(e,r,n,o)}var Pi={offset:0,line:1,column:1};function $s(e,t){let r=e.tokens,n=e.longestMatch,o=n<r.length&&r[n].node||null,i=o!==t?o:null,s=0,u=0,c=0,a="",l,p;for(let m=0;m<r.length;m++){let f=r[m].value;m===n&&(u=f.length,s=a.length),i!==null&&r[m].node===i&&(m<=n?c++:c=0),a+=f;}return n===r.length||c>1?(l=Dt(i||t,"end")||at(Pi,a),p=at(l)):(l=Dt(i,"start")||at(Dt(t,"start")||Pi,a.slice(0,s)),p=Dt(i,"end")||at(l,a.substr(s,u))),{css:a,mismatchOffset:s,mismatchLength:u,start:l,end:p}}function Dt(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?at(r):r:null}function at({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let i=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=i.length-1,o.column=i.length===1?o.column+n.length:i.pop().length+1;}return o}var je=function(e,t){let r=Ee("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Ii=function(e,t,r,n){let o=Ee("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:u,start:c,end:a}=$s(n,r);return o.rawMessage=e,o.syntax=t?Pe(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=u,o.message=e+`
  6993. syntax: `+o.syntax+`
  6994. value: `+(i||"<empty string>")+`
  6995. --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,c),o.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:c,end:a},o};var Ot=new Map,qe=new Map,Nt=45,zt=Zs,kr=Js,Ym=wr;function Mt(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Nt&&e.charCodeAt(t+1)===Nt}function wr(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Nt&&e.charCodeAt(t+1)!==Nt){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return ""}function Zs(e){if(Ot.has(e))return Ot.get(e);let t=e.toLowerCase(),r=Ot.get(t);if(r===void 0){let n=Mt(t,0),o=n?"":wr(t,0);r=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:n});}return Ot.set(e,r),r}function Js(e){if(qe.has(e))return qe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=Mt(t,r.length);if(!n&&(t=t.toLowerCase(),qe.has(t))){let u=qe.get(t);return qe.set(e,u),u}let o=n?"":wr(t,r.length),i=t.substr(0,r.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return qe.set(e,s),s}var Rt=["initial","inherit","unset","revert","revert-layer"];var lt=43,he=45,vr=110,We=!0,tl=!1;function Cr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function st(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Se(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===lt||o===he){if(r)return 0;t++;}for(;t<e.value.length;t++)if(!B(e.value.charCodeAt(t)))return 0;return n+1}function Sr(e,t,r){let n=!1,o=st(e,t,r);if(e=r(o),e===null)return t;if(e.type!==10)if(Cr(e,lt)||Cr(e,he)){if(n=!0,o=st(r(++o),o,r),e=r(o),e===null||e.type!==10)return 0}else return t;if(!n){let i=e.value.charCodeAt(0);if(i!==lt&&i!==he)return 0}return Se(e,n?0:1,n,o)}function Ar(e,t){let r=0;if(!e)return 0;if(e.type===10)return Se(e,0,tl,r);if(e.type===1&&e.value.charCodeAt(0)===he){if(!de(e.value,1,vr))return 0;switch(e.value.length){case 2:return Sr(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==he?0:(r=st(t(++r),r,t),e=t(r),Se(e,0,We,r));default:return e.value.charCodeAt(2)!==he?0:Se(e,3,We,r)}}else if(e.type===1||Cr(e,lt)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!de(e.value,0,vr))return 0;switch(e.value.length){case 1:return Sr(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==he?0:(r=st(t(++r),r,t),e=t(r),Se(e,0,We,r));default:return e.value.charCodeAt(1)!==he?0:Se(e,2,We,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),o=n===lt||n===he?1:0,i=o;for(;i<e.value.length&&B(e.value.charCodeAt(i));i++);return i===o||!de(e.value,i,vr)?0:i+1===e.value.length?Sr(t(++r),r,t):e.value.charCodeAt(i+1)!==he?0:i+2===e.value.length?(r=st(t(++r),r,t),e=t(r),Se(e,0,We,r)):Se(e,i+2,We,r)}return 0}var rl=43,Di=45,Oi=63,nl=117;function Tr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function ol(e,t){return e.value.charCodeAt(0)===t}function ct(e,t,r){let n=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===Di&&r&&n!==0)return ct(e,t+n+1,!1),6;if(!ee(i)||++n>6)return 0}return n}function Ft(e,t,r){if(!e)return 0;for(;Tr(r(t),Oi);){if(++e>6)return 0;t++;}return t}function Er(e,t){let r=0;if(e===null||e.type!==1||!de(e.value,0,nl)||(e=t(++r),e===null))return 0;if(Tr(e,rl))return e=t(++r),e===null?0:e.type===1?Ft(ct(e,0,!0),++r,t):Tr(e,Oi)?Ft(1,++r,t):0;if(e.type===10){let n=ct(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!ol(e,Di)||!ct(e,1,!1)?0:r+1:Ft(n,r,t))}return e.type===12?Ft(ct(e,1,!0),++r,t):0}var il=["calc(","-moz-calc(","-webkit-calc("],Lr=new Map([[2,22],[21,22],[19,20],[23,24]]);function le(e,t){return t<e.length?e.charCodeAt(t):0}function Ni(e,t){return ge(e,0,e.length,t)}function zi(e,t){for(let r=0;r<t.length;r++)if(Ni(e,t[r]))return !0;return !1}function Mi(e,t){return t!==e.length-2?!1:le(e,t)===92&&B(le(e,t+1))}function Bt(e,t,r){if(e&&e.type==="Range"){let n=Number(r!==void 0&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||e.min!==null&&n<e.min&&typeof e.min!="string"||e.max!==null&&n>e.max&&typeof e.max!="string")return !0}return !1}function al(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Lr.get(e.type);break}o++;}while(e=t(o));return o}function ie(e){return function(t,r,n){return t===null?0:t.type===2&&zi(t.value,il)?al(t,r):e(t,r,n)}}function N(e){return function(t){return t===null||t.type!==e?0:1}}function sl(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return zi(t,Rt)||Ni(t,"default")?0:1}function ll(e){return e===null||e.type!==1||le(e.value,0)!==45||le(e.value,1)!==45?0:1}function cl(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r<t;r++)if(!ee(le(e.value,r)))return 0;return 1}function ul(e){return e===null||e.type!==4||!ze(le(e.value,1),le(e.value,2),le(e.value,3))?0:1}function pl(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(r===0)break e;break;case 9:if(r===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Lr.get(e.type);break}o++;}while(e=t(o));return o}function hl(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Lr.get(e.type);break}o++;}while(e=t(o));return o}function ye(e){return e&&(e=new Set(e)),function(t,r,n){if(t===null||t.type!==12)return 0;let o=Te(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!Mi(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return Bt(n,t.value,o)?0:1}}function ml(e,t,r){return e===null||e.type!==11||Bt(r,e.value,e.value.length-1)?0:1}function Ri(e){return typeof e!="function"&&(e=function(){return 0}),function(t,r,n){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,r,n)}}function fl(e,t,r){if(e===null)return 0;let n=Te(e.value,0);return !(n===e.value.length)&&!Mi(e.value,n)||Bt(r,e.value,n)?0:1}function dl(e,t,r){if(e===null||e.type!==10)return 0;let n=le(e.value,0)===43||le(e.value,0)===45?1:0;for(;n<e.value.length;n++)if(!B(le(e.value,n)))return 0;return Bt(r,e.value,n)?0:1}var gl={"ident-token":N(1),"function-token":N(2),"at-keyword-token":N(3),"hash-token":N(4),"string-token":N(5),"bad-string-token":N(6),"url-token":N(7),"bad-url-token":N(8),"delim-token":N(9),"number-token":N(10),"percentage-token":N(11),"dimension-token":N(12),"whitespace-token":N(13),"CDO-token":N(14),"CDC-token":N(15),"colon-token":N(16),"semicolon-token":N(17),"comma-token":N(18),"[-token":N(19),"]-token":N(20),"(-token":N(21),")-token":N(22),"{-token":N(23),"}-token":N(24)},bl={string:N(5),ident:N(1),percentage:ie(ml),zero:Ri(),number:ie(fl),integer:ie(dl),"custom-ident":sl,"custom-property-name":ll,"hex-color":cl,"id-selector":ul,"an-plus-b":Ar,urange:Er,"declaration-value":pl,"any-value":hl};function xl(e){let{angle:t,decibel:r,frequency:n,flex:o,length:i,resolution:s,semitones:u,time:c}=e||{};return {dimension:ie(ye(null)),angle:ie(ye(t)),decibel:ie(ye(r)),frequency:ie(ye(n)),flex:ie(ye(o)),length:ie(Ri(ye(i))),resolution:ie(ye(s)),semitones:ie(ye(u)),time:ie(ye(c))}}function Fi(e){return {...gl,...bl,...xl(e)}}var _t={};b(_t,{angle:()=>kl,decibel:()=>Al,flex:()=>Cl,frequency:()=>vl,length:()=>yl,resolution:()=>Sl,semitones:()=>Tl,time:()=>wl});var yl=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],kl=["deg","grad","rad","turn"],wl=["s","ms"],vl=["hz","khz"],Sl=["dpi","dpcm","dppx","x"],Cl=["fr"],Al=["db"],Tl=["st"];var $i={};b($i,{SyntaxError:()=>Ut,generate:()=>Pe,parse:()=>Ge,walk:()=>Vt});function Ut(e,t,r){return Object.assign(Ee("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+`
  6996. `+t+`
  6997. --`+new Array((r||t.length)+1).join("-")+"^"})}var El=9,Ll=10,Pl=12,Il=13,Dl=32,jt=class{constructor(t){this.str=t,this.pos=0;}charCodeAt(t){return t<this.str.length?this.str.charCodeAt(t):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(t){return this.charCodeAt(this.findWsEnd(t))}findWsEnd(t){for(;t<this.str.length;t++){let r=this.str.charCodeAt(t);if(r!==Il&&r!==Ll&&r!==Pl&&r!==Dl&&r!==El)break}return t}substringToPos(t){return this.str.substring(this.pos,this.pos=t)}eat(t){this.charCode()!==t&&this.error("Expect `"+String.fromCharCode(t)+"`"),this.pos++;}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(t){throw new Ut(t,this.str,this.pos)}};var Ol=9,Nl=10,zl=12,Ml=13,Rl=32,Yi=33,Dr=35,Bi=38,qt=39,Gi=40,Fl=41,Vi=42,Or=43,Nr=44,_i=45,zr=60,Ki=62,Ir=63,Bl=64,Gt=91,Mr=93,Wt=123,Ui=124,ji=125,qi=8734,ut=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Wi={" ":1,"&&":2,"||":3,"|":4};function Ht(e){return e.substringToPos(e.findWsEnd(e.pos))}function He(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||ut[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Yt(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function _l(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Hi(e){let t=null,r=null;return e.eat(Wt),t=Yt(e),e.charCode()===Nr?(e.pos++,e.charCode()!==ji&&(r=Yt(e))):r=t,e.eat(ji),{min:Number(t),max:r?Number(r):0}}function Ul(e){let t=null,r=!1;switch(e.charCode()){case Vi:e.pos++,t={min:0,max:0};break;case Or:e.pos++,t={min:1,max:0};break;case Ir:e.pos++,t={min:0,max:1};break;case Dr:e.pos++,r=!0,e.charCode()===Wt?t=Hi(e):e.charCode()===Ir?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Wt:t=Hi(e);break;default:return null}return {type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ye(e,t){let r=Ul(e);return r!==null?(r.term=t,e.charCode()===Dr&&e.charCodeAt(e.pos-1)===Or?Ye(e,r):r):t}function Pr(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function jl(e){let t;return e.eat(zr),e.eat(qt),t=He(e),e.eat(qt),e.eat(Ki),Ye(e,{type:"Property",name:t})}function ql(e){let t=null,r=null,n=1;return e.eat(Gt),e.charCode()===_i&&(e.peek(),n=-1),n==-1&&e.charCode()===qi?e.peek():(t=n*Number(Yt(e)),ut[e.charCode()]!==0&&(t+=He(e))),Ht(e),e.eat(Nr),Ht(e),e.charCode()===qi?e.peek():(n=1,e.charCode()===_i&&(e.peek(),n=-1),r=n*Number(Yt(e)),ut[e.charCode()]!==0&&(r+=He(e))),e.eat(Mr),{type:"Range",min:t,max:r}}function Wl(e){let t,r=null;return e.eat(zr),t=He(e),e.charCode()===Gi&&e.nextCharCode()===Fl&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Gt&&(Ht(e),r=ql(e)),e.eat(Ki),Ye(e,{type:"Type",name:t,opts:r})}function Hl(e){let t=He(e);return e.charCode()===Gi?(e.pos++,{type:"Function",name:t}):Ye(e,{type:"Keyword",name:t})}function Yl(e,t){function r(o,i){return {type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((o,i)=>Wi[o]-Wi[i]);t.length>0;){n=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===n?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1));}i!==-1&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n));}return n}function Qi(e){let t=[],r={},n,o=null,i=e.pos;for(;n=Vl(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),r[n.value]=!0):o!==null&&o.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),o=n,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Yl(t,r)||" ",disallowEmpty:!1,explicit:!1}}function Gl(e){let t;return e.eat(Gt),t=Qi(e),e.eat(Mr),t.explicit=!0,e.charCode()===Yi&&(e.pos++,t.disallowEmpty=!0),t}function Vl(e){let t=e.charCode();if(t<128&&ut[t]===1)return Hl(e);switch(t){case Mr:break;case Gt:return Ye(e,Gl(e));case zr:return e.nextCharCode()===qt?jl(e):Wl(e);case Ui:return {type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Ui?2:1))};case Bi:return e.pos++,e.eat(Bi),{type:"Combinator",value:"&&"};case Nr:return e.pos++,{type:"Comma"};case qt:return Ye(e,{type:"String",value:_l(e)});case Rl:case Ol:case Nl:case Ml:case zl:return {type:"Spaces",value:Ht(e)};case Bl:return t=e.nextCharCode(),t<128&&ut[t]===1?(e.pos++,{type:"AtKeyword",name:He(e)}):Pr(e);case Vi:case Or:case Ir:case Dr:case Yi:break;case Wt:if(t=e.nextCharCode(),t<48||t>57)return Pr(e);break;default:return Pr(e)}}function Ge(e){let t=new jt(e),r=Qi(t);return t.pos!==e.length&&t.error("Unexpected input"),r.terms.length===1&&r.terms[0].type==="Group"?r.terms[0]:r}var pt=function(){};function Xi(e){return typeof e=="function"?e:pt}function Vt(e,t,r){function n(s){switch(o.call(r,s),s.type){case"Group":s.terms.forEach(n);break;case"Multiplier":n(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(r,s);}let o=pt,i=pt;if(typeof t=="function"?o=t:t&&(o=Xi(t.enter),i=Xi(t.leave)),o===pt&&i===pt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");n(e);}var Kl={decorator(e){let t=[],r=null;return {...e,node(n){let o=r;r=n,e.node.call(this,n),r=o;},emit(n,o,i){t.push({type:o,value:n,node:i?null:r});},result(){return t}}}};function Ql(e){let t=[];return ve(e,(r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null})),t}function Zi(e,t){return typeof e=="string"?Ql(e):t.generate(e,Kl)}var C={type:"Match"},L={type:"Mismatch"},Kt={type:"DisallowEmpty"},Xl=40,$l=41;function Z(e,t,r){return t===C&&r===L||e===C&&t===C&&r===C?e:(e.type==="If"&&e.else===L&&t===C&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function ea(e){return e.length>2&&e.charCodeAt(e.length-2)===Xl&&e.charCodeAt(e.length-1)===$l}function Ji(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&ea(e.name)}function Rr(e,t,r){switch(e){case" ":{let n=C;for(let o=t.length-1;o>=0;o--){let i=t[o];n=Z(i,n,L);}return n}case"|":{let n=L,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(Ji(s)&&(o===null&&i>0&&Ji(t[i-1])&&(o=Object.create(null),n=Z({type:"Enum",map:o},C,n)),o!==null)){let u=(ea(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(u in o)){o[u]=s;continue}}o=null,n=Z(s,C,n);}return n}case"&&":{if(t.length>5)return {type:"MatchOnce",terms:t,all:!0};let n=L;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Rr(e,t.filter(function(u){return u!==i}),!1):s=C,n=Z(i,s,n);}return n}case"||":{if(t.length>5)return {type:"MatchOnce",terms:t,all:!1};let n=r?C:L;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Rr(e,t.filter(function(u){return u!==i}),!0):s=C,n=Z(i,s,n);}return n}}}function Zl(e){let t=C,r=Fr(e.term);if(e.max===0)r=Z(r,Kt,L),t=Z(r,null,L),t.then=Z(C,C,t),e.comma&&(t.then.else=Z({type:"Comma",syntax:e},t,L));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==C&&(t=Z({type:"Comma",syntax:e},t,L)),t=Z(r,Z(C,C,t),L);if(e.min===0)t=Z(C,C,t);else for(let n=0;n<e.min-1;n++)e.comma&&t!==C&&(t=Z({type:"Comma",syntax:e},t,L)),t=Z(r,t,L);return t}function Fr(e){if(typeof e=="function")return {type:"Generic",fn:e};switch(e.type){case"Group":{let t=Rr(e.combinator,e.terms.map(Fr),!1);return e.disallowEmpty&&(t=Z(t,Kt,L)),t}case"Multiplier":return Zl(e);case"Type":case"Property":return {type:e.type,name:e.name,syntax:e};case"Keyword":return {type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return {type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return {type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return {type:e.type,value:e.value,syntax:e};case"Comma":return {type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function Qt(e,t){return typeof e=="string"&&(e=Ge(e)),{type:"MatchGraph",match:Fr(e),syntax:t||null,source:e}}var {hasOwnProperty:ta}=Object.prototype,Jl=0,ec=1,_r=2,aa=3,ra="Match",tc="Mismatch",rc="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",na=15e3;function oc(e){let t=null,r=null,n=e;for(;n!==null;)r=n.prev,n.prev=t,t=n,n=r;return t}function Br(e,t){if(e.length!==t.length)return !1;for(let r=0;r<e.length;r++){let n=t.charCodeAt(r),o=e.charCodeAt(r);if(o>=65&&o<=90&&(o=o|32),o!==n)return !1}return !0}function ic(e){return e.type!==9?!1:e.value!=="?"}function oa(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||ic(e)}function ia(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function ac(e,t,r){function n(){do R++,S=R<e.length?e[R]:null;while(S!==null&&(S.type===13||S.type===25))}function o(ae){let fe=R+ae;return fe<e.length?e[fe]:null}function i(ae,fe){return {nextState:ae,matchStack:z,syntaxStack:p,thenStack:m,tokenIndex:R,prev:fe}}function s(ae){m={nextState:ae,matchStack:z,syntaxStack:p,prev:m};}function u(ae){f=i(ae,f);}function c(){z={type:ec,syntax:t.syntax,token:S,prev:z},n(),P=null,R>ke&&(ke=R);}function a(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},z={type:_r,syntax:t.syntax,token:z.token,prev:z};}function l(){z.type===_r?z=z.prev:z={type:aa,syntax:p.syntax,token:z.token,prev:z},p=p.prev;}let p=null,m=null,f=null,P=null,te=0,X=null,S=null,R=-1,ke=0,z={type:Jl,syntax:null,token:null,prev:null};for(n();X===null&&++te<na;)switch(t.type){case"Match":if(m===null){if(S!==null&&(R!==e.length-1||S.value!=="\\0"&&S.value!=="\\9")){t=L;break}X=ra;break}if(t=m.nextState,t===Kt)if(m.matchStack===z){t=L;break}else t=C;for(;m.syntaxStack!==p;)l();m=m.prev;break;case"Mismatch":if(P!==null&&P!==!1)(f===null||R>f.tokenIndex)&&(f=P,P=!1);else if(f===null){X=tc;break}t=f.nextState,m=f.thenStack,p=f.syntaxStack,z=f.matchStack,R=f.tokenIndex,S=R<e.length?e[R]:null,f=f.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==L&&u(t.else),t.then!==C&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let Q=t.syntax.terms;if(t.index===Q.length){if(t.mask===0||t.syntax.all){t=L;break}t=C;break}if(t.mask===(1<<Q.length)-1){t=C;break}for(;t.index<Q.length;t.index++){let J=1<<t.index;if((t.mask&J)===0){u(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|J}),t=Q[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(S!==null){let Q=S.value.toLowerCase();if(Q.indexOf("\\")!==-1&&(Q=Q.replace(/\\[09].*$/,"")),ta.call(t.map,Q)){t=t.map[Q];break}}t=L;break;case"Generic":{let Q=p!==null?p.opts:null,J=R+Math.floor(t.fn(S,o,Q));if(!isNaN(J)&&J>R){for(;R<J;)c();t=C;}else t=L;break}case"Type":case"Property":{let Q=t.type==="Type"?"types":"properties",J=ta.call(r,Q)?r[Q][t.name]:null;if(!J||!J.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(P!==!1&&S!==null&&t.type==="Type"&&(t.name==="custom-ident"&&S.type===1||t.name==="length"&&S.value==="0")){P===null&&(P=i(t,f)),t=L;break}a(),t=J.match;break}case"Keyword":{let Q=t.name;if(S!==null){let J=S.value;if(J.indexOf("\\")!==-1&&(J=J.replace(/\\[09].*$/,"")),Br(J,Q)){c(),t=C;break}}t=L;break}case"AtKeyword":case"Function":if(S!==null&&Br(S.value,t.name)){c(),t=C;break}t=L;break;case"Token":if(S!==null&&S.value===t.value){c(),t=C;break}t=L;break;case"Comma":S!==null&&S.type===18?oa(z.token)?t=L:(c(),t=ia(S)?L:C):t=oa(z.token)||ia(S)?C:L;break;case"String":let ae="",fe=R;for(;fe<e.length&&ae.length<t.value.length;fe++)ae+=e[fe].value;if(Br(ae,t.value)){for(;R<fe;)c();t=C;}else t=L;break;default:throw new Error("Unknown node type: "+t.type)}switch(X){case null:console.warn("[csstree-match] BREAK after "+na+" iterations"),X=rc,z=null;break;case ra:for(;p!==null;)l();break;default:z=null;}return {tokens:e,reason:X,iterations:te,match:z,longestMatch:ke}}function Ur(e,t,r){let n=ac(e,t,r||{});if(n.match===null)return n;let o=n.match,i=n.match={syntax:t.syntax||null,match:[]},s=[i];for(o=oc(o).prev;o!==null;){switch(o.type){case _r:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case aa:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node});}o=o.prev;}return n}var qr={};b(qr,{getTrace:()=>sa,isKeyword:()=>cc,isProperty:()=>lc,isType:()=>sc});function sa(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function r(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(r(o.match[i]))return t(o.syntax)&&n.unshift(o.syntax),!0}else if(o.node===e)return n=t(o.syntax)?[o.syntax]:[],!0;return !1}let n=null;return this.matched!==null&&r(this.matched),n}function sc(e,t){return jr(this,e,r=>r.type==="Type"&&r.name===t)}function lc(e,t){return jr(this,e,r=>r.type==="Property"&&r.name===t)}function cc(e){return jr(this,e,t=>t.type==="Keyword")}function jr(e,t,r){let n=sa.call(e,t);return n===null?!1:n.some(r)}function la(e){return "node"in e?e.node:la(e.match[0])}function ca(e){return "node"in e?e.node:ca(e.match[e.match.length-1])}function Wr(e,t,r,n,o){function i(u){if(u.syntax!==null&&u.syntax.type===n&&u.syntax.name===o){let c=la(u),a=ca(u);e.syntax.walk(t,function(l,p,m){if(l===c){let f=new D;do{if(f.appendData(p.data),p.data===a)break;p=p.next;}while(p!==null);s.push({parent:m,nodes:f});}});}Array.isArray(u.match)&&u.match.forEach(i);}let s=[];return r.matched!==null&&i(r.matched),s}var{hasOwnProperty:ht}=Object.prototype;function Hr(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ua(e){return Boolean(e)&&Hr(e.offset)&&Hr(e.line)&&Hr(e.column)}function uc(e,t){return function(n,o){if(!n||n.constructor!==Object)return o(n,"Type of node should be an Object");for(let i in n){let s=!0;if(ht.call(n,i)!==!1){if(i==="type")n.type!==e&&o(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(i==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")i+=".source";else if(!ua(n.loc.start))i+=".start";else if(!ua(n.loc.end))i+=".end";else continue;s=!1;}else if(t.hasOwnProperty(i)){s=!1;for(let u=0;!s&&u<t[i].length;u++){let c=t[i][u];switch(c){case String:s=typeof n[i]=="string";break;case Boolean:s=typeof n[i]=="boolean";break;case null:s=n[i]===null;break;default:typeof c=="string"?s=n[i]&&n[i].type===c:Array.isArray(c)&&(s=n[i]instanceof D);}}}else o(n,"Unknown field `"+i+"` for "+e+" node type");s||o(n,"Bad value for `"+e+"."+i+"`");}}for(let i in t)ht.call(t,i)&&ht.call(n,i)===!1&&o(n,"Field `"+e+"."+i+"` is missed");}}function pc(e,t){let r=t.structure,n={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in r){if(ht.call(r,i)===!1)continue;let s=[],u=n[i]=Array.isArray(r[i])?r[i].slice():[r[i]];for(let c=0;c<u.length;c++){let a=u[c];if(a===String||a===Boolean)s.push(a.name);else if(a===null)s.push("null");else if(typeof a=="string")s.push("<"+a+">");else if(Array.isArray(a))s.push("List");else throw new Error("Wrong value `"+a+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ");}return {docs:o,check:uc(e,n)}}function pa(e){let t={};if(e.node){for(let r in e.node)if(ht.call(e.node,r)){let n=e.node[r];if(n.structure)t[r]=pc(r,n);else throw new Error("Missed `structure` field in `"+r+"` node type definition")}}return t}var hc=Qt(Rt.join(" | "));function Yr(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Pe(e[o].syntax,{compact:t}));return n}function mc(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Pe(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Yr(i.descriptors,t,r)};return n}function fc(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return !0;return !1}function ce(e,t,r){return {matched:e,iterations:r,error:t,...qr}}function Ve(e,t,r,n){let o=Zi(r,e.syntax),i;return fc(o)?ce(null,new Error("Matching for a tree with var() is not supported")):(n&&(i=Ur(o,e.cssWideKeywordsSyntax,e)),(!n||!i.match)&&(i=Ur(o,t.match,e),!i.match)?ce(null,new Ii(i.reason,t.syntax,r,i),i.iterations):ce(i.match,null,i.iterations))}var Ke=class{constructor(t,r,n){if(this.cssWideKeywordsSyntax=hc,this.syntax=r,this.generic=!1,this.units={..._t},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||pa(t),t){if(t.units)for(let o of Object.keys(_t))Array.isArray(t.units[o])&&(this.units[o]=t.units[o]);if(t.types)for(let o in t.types)this.addType_(o,t.types[o]);if(t.generic){this.generic=!0;for(let[o,i]of Object.entries(Fi(this.units)))this.addType_(o,i);}if(t.atrules)for(let o in t.atrules)this.addAtrule_(o,t.atrules[o]);if(t.properties)for(let o in t.properties)this.addProperty_(o,t.properties[o]);}}checkStructure(t){function r(i,s){o.push({node:i,message:s});}let n=this.structure,o=[];return this.syntax.walk(t,function(i){n.hasOwnProperty(i.type)?n[i.type].check(i,r):r(i,"Unknown node type `"+i.type+"`");}),o.length?o:!1}createDescriptor(t,r,n,o=null){let i={type:r,name:n},s={type:r,name:n,parent:o,serializable:typeof t=="string"||t&&typeof t.type=="string",syntax:null,match:null};return typeof t=="function"?s.match=Qt(t,i):(typeof t=="string"?Object.defineProperty(s,"syntax",{get(){return Object.defineProperty(s,"syntax",{value:Ge(t)}),s.syntax}}):s.syntax=t,Object.defineProperty(s,"match",{get(){return Object.defineProperty(s,"match",{value:Qt(s.syntax,i)}),s.match}})),s}addAtrule_(t,r){!r||(this.atrules[t]={type:"Atrule",name:t,prelude:r.prelude?this.createDescriptor(r.prelude,"AtrulePrelude",t):null,descriptors:r.descriptors?Object.keys(r.descriptors).reduce((n,o)=>(n[o]=this.createDescriptor(r.descriptors[o],"AtruleDescriptor",o,t),n),Object.create(null)):null});}addProperty_(t,r){!r||(this.properties[t]=this.createDescriptor(r,"Property",t));}addType_(t,r){!r||(this.types[t]=this.createDescriptor(r,"Type",t));}checkAtruleName(t){if(!this.getAtrule(t))return new je("Unknown at-rule","@"+t)}checkAtrulePrelude(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t);if(!o.prelude&&r)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!r&&!Ve(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t),i=zt(r);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new je("Unknown at-rule descriptor",r)}checkPropertyName(t){if(!this.getProperty(t))return new je("Unknown property",t)}matchAtrulePrelude(t,r){let n=this.checkAtrulePrelude(t,r);if(n)return ce(null,n);let o=this.getAtrule(t);return o.prelude?Ve(this,o.prelude,r||"",!1):ce(null,null)}matchAtruleDescriptor(t,r,n){let o=this.checkAtruleDescriptorName(t,r);if(o)return ce(null,o);let i=this.getAtrule(t),s=zt(r);return Ve(this,i.descriptors[s.name]||i.descriptors[s.basename],n,!1)}matchDeclaration(t){return t.type!=="Declaration"?ce(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,r){if(kr(t).custom)return ce(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(t);return n?ce(null,n):Ve(this,this.getProperty(t),r,!0)}matchType(t,r){let n=this.getType(t);return n?Ve(this,n,r,!1):ce(null,new je("Unknown type",t))}match(t,r){return typeof t!="string"&&(!t||!t.type)?ce(null,new je("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),Ve(this,t,r,!1))}findValueFragments(t,r,n,o){return Wr(this,r,this.matchProperty(t,r),n,o)}findDeclarationValueFragments(t,r,n){return Wr(this,t.value,this.matchDeclaration(t),r,n)}findAllFragments(t,r,n){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,r,n));}}),o}getAtrule(t,r=!0){let n=zt(t);return (n.vendor&&r?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(t,r=!0){let n=this.getAtrule(t,r);return n&&n.prelude||null}getAtruleDescriptor(t,r){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[r]||null}getProperty(t,r=!0){let n=kr(t);return (n.vendor&&r?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(o,i,s,u){if(s.has(i))return s.get(i);s.set(i,!1),u.syntax!==null&&Vt(u.syntax,function(c){if(c.type!=="Type"&&c.type!=="Property")return;let a=c.type==="Type"?o.types:o.properties,l=c.type==="Type"?r:n;(!hasOwnProperty.call(a,c.name)||t(o,c.name,l,a[c.name]))&&s.set(i,!0);},this);}let r=new Map,n=new Map;for(let o in this.types)t(this,o,r,this.types[o]);for(let o in this.properties)t(this,o,n,this.properties[o]);return r=[...r.keys()].filter(o=>r.get(o)),n=[...n.keys()].filter(o=>n.get(o)),r.length||n.length?{types:r,properties:n}:null}dump(t,r){return {generic:this.generic,units:this.units,types:Yr(this.types,!r,t),properties:Yr(this.properties,!r,t),atrules:mc(this.atrules,!r,t)}}toString(){return JSON.stringify(this.dump())}};function Gr(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function ha(e,t){let r=Object.create(null);for(let[n,o]of Object.entries(e))if(o){r[n]={};for(let i of Object.keys(o))t.includes(i)&&(r[n][i]=o[i]);}return r}function mt(e,t){let r={...e};for(let[n,o]of Object.entries(t))switch(n){case"generic":r[n]=Boolean(o);break;case"units":r[n]={...e[n]};for(let[i,s]of Object.entries(o))r[n][i]=Array.isArray(s)?s:[];break;case"atrules":r[n]={...e[n]};for(let[i,s]of Object.entries(o)){let u=r[n][i]||{},c=r[n][i]={prelude:u.prelude||null,descriptors:{...u.descriptors}};if(!!s){c.prelude=s.prelude?Gr(c.prelude,s.prelude):c.prelude||null;for(let[a,l]of Object.entries(s.descriptors||{}))c.descriptors[a]=l?Gr(c.descriptors[a],l):null;Object.keys(c.descriptors).length||(c.descriptors=null);}}break;case"types":case"properties":r[n]={...e[n]};for(let[i,s]of Object.entries(o))r[n][i]=Gr(r[n][i],s);break;case"scope":r[n]={...e[n]};for(let[i,s]of Object.entries(o))r[n][i]={...r[n][i],...s};break;case"parseContext":r[n]={...e[n],...o};break;case"atrule":case"pseudo":r[n]={...e[n],...ha(o,["parse"])};break;case"node":r[n]={...e[n],...ha(o,["name","structure","parse","generate","walkContext"])};break}return r}function ma(e){let t=$o(e),r=Li(e),n=vi(e),{fromPlainObject:o,toPlainObject:i}=Si(r),s={lexer:null,createLexer:u=>new Ke(u,s,s.lexer.structure),tokenize:ve,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(u){let c=mt({},e);return ma(typeof u=="function"?u(c,Object.assign):mt(c,u))}};return s.lexer=new Ke({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var Vr=e=>ma(mt({},e));var fa={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"[<'scroll-timeline-name'>||<'scroll-timeline-axis'>]#","scroll-timeline-axis":"[block|inline|vertical|horizontal]#","scroll-timeline-name":"none|<custom-ident>#","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},nest:{prelude:"<complex-selector-list>",descriptors:null}}};var gt={};b(gt,{AnPlusB:()=>Xr,Atrule:()=>Zr,AtrulePrelude:()=>en,AttributeSelector:()=>nn,Block:()=>an,Brackets:()=>ln,CDC:()=>un,CDO:()=>hn,ClassSelector:()=>fn,Combinator:()=>gn,Comment:()=>xn,Declaration:()=>kn,DeclarationList:()=>Sn,Dimension:()=>An,Function:()=>En,Hash:()=>Pn,IdSelector:()=>Nn,Identifier:()=>Dn,MediaFeature:()=>Mn,MediaQuery:()=>Fn,MediaQueryList:()=>_n,NestingSelector:()=>jn,Nth:()=>Wn,Number:()=>Yn,Operator:()=>Vn,Parentheses:()=>Qn,Percentage:()=>$n,PseudoClassSelector:()=>Jn,PseudoElementSelector:()=>to,Ratio:()=>no,Raw:()=>io,Rule:()=>so,Selector:()=>co,SelectorList:()=>po,String:()=>bo,StyleSheet:()=>yo,TypeSelector:()=>vo,UnicodeRange:()=>Ao,Url:()=>Do,Value:()=>No,WhiteSpace:()=>Mo});var Xr={};b(Xr,{generate:()=>xc,name:()=>gc,parse:()=>Qr,structure:()=>bc});var me=43,re=45,Xt=110,Ie=!0,dc=!1;function $t(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===me||n===re)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)B(this.charCodeAt(r))||this.error("Integer is expected",r);}function Qe(e){return $t.call(this,0,e)}function Ce(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case Xt:r="N is expected";break;case re:r="HyphenMinus is expected";break}this.error(r,this.tokenStart+e);}}function Kr(){let e=0,t=0,r=this.tokenType;for(;r===13||r===25;)r=this.lookupType(++e);if(r!==10)if(this.isDelim(me,e)||this.isDelim(re,e)){t=this.isDelim(me,e)?me:re;do r=this.lookupType(++e);while(r===13||r===25);r!==10&&(this.skip(e),Qe.call(this,Ie));}else return null;return e>0&&this.skip(e),t===0&&(r=this.charCodeAt(this.tokenStart),r!==me&&r!==re&&this.error("Number sign is expected")),Qe.call(this,t!==0),t===re?"-"+this.consume(10):this.consume(10)}var gc="AnPlusB",bc={a:[String,null],b:[String,null]};function Qr(){let e=this.tokenStart,t=null,r=null;if(this.tokenType===10)Qe.call(this,dc),r=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,re))switch(t="-1",Ce.call(this,1,Xt),this.tokenEnd-this.tokenStart){case 2:this.next(),r=Kr.call(this);break;case 3:Ce.call(this,2,re),this.next(),this.skipSC(),Qe.call(this,Ie),r="-"+this.consume(10);break;default:Ce.call(this,2,re),$t.call(this,3,Ie),this.next(),r=this.substrToCursor(e+2);}else if(this.tokenType===1||this.isDelim(me)&&this.lookupType(1)===1){let n=0;switch(t="1",this.isDelim(me)&&(n=1,this.next()),Ce.call(this,0,Xt),this.tokenEnd-this.tokenStart){case 1:this.next(),r=Kr.call(this);break;case 2:Ce.call(this,1,re),this.next(),this.skipSC(),Qe.call(this,Ie),r="-"+this.consume(10);break;default:Ce.call(this,1,re),$t.call(this,2,Ie),this.next(),r=this.substrToCursor(e+n+1);}}else if(this.tokenType===12){let n=this.charCodeAt(this.tokenStart),o=n===me||n===re,i=this.tokenStart+o;for(;i<this.tokenEnd&&B(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),Ce.call(this,i-this.tokenStart,Xt),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),r=Kr.call(this)):(Ce.call(this,i-this.tokenStart+1,re),i+2===this.tokenEnd?(this.next(),this.skipSC(),Qe.call(this,Ie),r="-"+this.consume(10)):($t.call(this,i-this.tokenStart+2,Ie),this.next(),r=this.substrToCursor(i+1)));}else this.error();return t!==null&&t.charCodeAt(0)===me&&(t=t.substr(1)),r!==null&&r.charCodeAt(0)===me&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function xc(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let r=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+r);}else this.tokenize(t);}else this.tokenize(e.b);}var Zr={};b(Zr,{generate:()=>Sc,name:()=>kc,parse:()=>$r,structure:()=>vc,walkContext:()=>wc});function da(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function yc(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return !0;if(t===23||t===3)return !1}return !1}var kc="Atrule",wc="atrule",vc={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function $r(e=!1){let t=this.tokenStart,r,n,o=null,i=null;switch(this.eat(3),r=this.substrToCursor(t+1),n=r.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,r,e),da):o=da.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,n)&&typeof this.atrule[n].block=="function"?i=this.atrule[n].block.call(this,e):i=this.Block(yc.call(this));break}return {type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:r,prelude:o,block:i}}function Sc(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";");}var en={};b(en,{generate:()=>Ec,name:()=>Cc,parse:()=>Jr,structure:()=>Tc,walkContext:()=>Ac});var Cc="AtrulePrelude",Ac="atrulePrelude",Tc={children:[[]]};function Jr(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Ec(e){this.children(e);}var nn={};b(nn,{generate:()=>Mc,name:()=>Nc,parse:()=>rn,structure:()=>zc});var Lc=36,ga=42,Zt=61,Pc=94,tn=124,Ic=126;function Dc(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(ga)?(t=!0,this.next()):this.isDelim(tn)||this.eat(1),this.isDelim(tn)?this.charCodeAt(this.tokenStart+1)!==Zt?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Oc(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Zt&&t!==Ic&&t!==Pc&&t!==Lc&&t!==ga&&t!==tn&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Zt&&(this.isDelim(Zt)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Nc="AttributeSelector",zc={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function rn(){let e=this.tokenStart,t,r=null,n=null,o=null;return this.eat(19),this.skipSC(),t=Dc.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(r=Oc.call(this),this.skipSC(),n=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:r,value:n,flags:o}}function Mc(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]");}var an={};b(an,{generate:()=>jc,name:()=>Bc,parse:()=>on,structure:()=>Uc,walkContext:()=>_c});var Rc=38;function ya(e){return this.Raw(e,null,!0)}function ba(){return this.parseWithFallback(this.Rule,ya)}function xa(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Fc(){if(this.tokenType===17)return xa.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,xa);return this.tokenType===17&&this.next(),e}var Bc="Block",_c="block",Uc={children:[["Atrule","Rule","Declaration"]]};function on(e){let t=e?Fc:ba,r=this.tokenStart,n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule.bind(this,e),ya));break;default:e&&this.isDelim(Rc)?n.push(ba.call(this)):n.push(t.call(this));}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function jc(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";");}),this.token(24,"}");}var ln={};b(ln,{generate:()=>Hc,name:()=>qc,parse:()=>sn,structure:()=>Wc});var qc="Brackets",Wc={children:[[]]};function sn(e,t){let r=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}function Hc(e){this.token(9,"["),this.children(e),this.token(9,"]");}var un={};b(un,{generate:()=>Vc,name:()=>Yc,parse:()=>cn,structure:()=>Gc});var Yc="CDC",Gc=[];function cn(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function Vc(){this.token(15,"-->");}var hn={};b(hn,{generate:()=>Xc,name:()=>Kc,parse:()=>pn,structure:()=>Qc});var Kc="CDO",Qc=[];function pn(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Xc(){this.token(14,"<!--");}var fn={};b(fn,{generate:()=>eu,name:()=>Zc,parse:()=>mn,structure:()=>Jc});var $c=46,Zc="ClassSelector",Jc={name:String};function mn(){return this.eatDelim($c),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function eu(e){this.token(9,"."),this.token(1,e.name);}var gn={};b(gn,{generate:()=>au,name:()=>ou,parse:()=>dn,structure:()=>iu});var tu=43,ka=47,ru=62,nu=126,ou="Combinator",iu={name:String};function dn(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case ru:case tu:case nu:this.next();break;case ka:this.next(),this.eatIdent("deep"),this.eatDelim(ka);break;default:this.error("Combinator is expected");}t=this.substrToCursor(e);break}return {type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function au(e){this.tokenize(e.name);}var xn={};b(xn,{generate:()=>pu,name:()=>cu,parse:()=>bn,structure:()=>uu});var su=42,lu=47,cu="Comment",uu={value:String};function bn(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===su&&this.charCodeAt(t-1)===lu&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function pu(e){this.token(25,"/*"+e.value+"*/");}var kn={};b(kn,{generate:()=>Su,name:()=>ku,parse:()=>yn,structure:()=>vu,walkContext:()=>wu});var va=33,hu=35,mu=36,fu=38,du=42,gu=43,wa=47;function bu(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function xu(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function yu(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(va)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var ku="Declaration",wu="declaration",vu={important:[Boolean,String],property:String,value:["Value","Raw"]};function yn(){let e=this.tokenStart,t=this.tokenIndex,r=Cu.call(this),n=Mt(r),o=n?this.parseCustomProperty:this.parseValue,i=n?xu:bu,s=!1,u;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(n||this.skipSC(),o?u=this.parseWithFallback(yu,i):u=i.call(this,this.tokenIndex),n&&u.type==="Value"&&u.children.isEmpty){for(let a=c-this.tokenIndex;a<=0;a++)if(this.lookupType(a)===13){u.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(va)&&(s=Au.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:r,value:u}}function Su(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important));}function Cu(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case du:case mu:case gu:case hu:case fu:this.next();break;case wa:this.next(),this.isDelim(wa)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function Au(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var Sn={};b(Sn,{generate:()=>Pu,name:()=>Eu,parse:()=>vn,structure:()=>Lu});var Tu=38;function wn(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var Eu="DeclarationList",Lu={children:[["Declaration","Atrule","Rule"]]};function vn(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),wn));break;default:this.isDelim(Tu)?e.push(this.parseWithFallback(this.Rule,wn)):e.push(this.parseWithFallback(this.Declaration,wn));}return {type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Pu(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";");});}var An={};b(An,{generate:()=>Ou,name:()=>Iu,parse:()=>Cn,structure:()=>Du});var Iu="Dimension",Du={value:String,unit:String};function Cn(){let e=this.tokenStart,t=this.consumeNumber(12);return {type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Ou(e){this.token(12,e.value+e.unit);}var En={};b(En,{generate:()=>Ru,name:()=>Nu,parse:()=>Tn,structure:()=>Mu,walkContext:()=>zu});var Nu="Function",zu="function",Mu={name:String,children:[[]]};function Tn(e,t){let r=this.tokenStart,n=this.consumeFunctionName(),o=n.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:n,children:i}}function Ru(e){this.token(2,e.name+"("),this.children(e),this.token(22,")");}var Pn={};b(Pn,{generate:()=>Uu,name:()=>Bu,parse:()=>Ln,structure:()=>_u,xxx:()=>Fu});var Fu="XXX",Bu="Hash",_u={value:String};function Ln(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Uu(e){this.token(4,"#"+e.value);}var Dn={};b(Dn,{generate:()=>Wu,name:()=>ju,parse:()=>In,structure:()=>qu});var ju="Identifier",qu={name:String};function In(){return {type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Wu(e){this.token(1,e.name);}var Nn={};b(Nn,{generate:()=>Gu,name:()=>Hu,parse:()=>On,structure:()=>Yu});var Hu="IdSelector",Yu={name:String};function On(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Gu(e){this.token(9,"#"+e.name);}var Mn={};b(Mn,{generate:()=>Qu,name:()=>Vu,parse:()=>zn,structure:()=>Ku});var Vu="MediaFeature",Ku={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function zn(){let e=this.tokenStart,t,r=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected");}this.skipSC();}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:r}}function Qu(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")");}var Fn={};b(Fn,{generate:()=>Zu,name:()=>Xu,parse:()=>Rn,structure:()=>$u});var Xu="MediaQuery",$u={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Rn(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t);}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function Zu(e){this.children(e);}var _n={};b(_n,{generate:()=>tp,name:()=>Ju,parse:()=>Bn,structure:()=>ep});var Ju="MediaQueryList",ep={children:[["MediaQuery"]]};function Bn(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return {type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function tp(e){this.children(e,()=>this.token(18,","));}var jn={};b(jn,{generate:()=>ip,name:()=>np,parse:()=>Un,structure:()=>op});var rp=38,np="NestingSelector",op={};function Un(){let e=this.tokenStart;return this.eatDelim(rp),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function ip(){this.token(9,"&");}var Wn={};b(Wn,{generate:()=>lp,name:()=>ap,parse:()=>qn,structure:()=>sp});var ap="Nth",sp={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function qn(){this.skipSC();let e=this.tokenStart,t=e,r=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:n,selector:r}}function lp(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector));}var Yn={};b(Yn,{generate:()=>pp,name:()=>cp,parse:()=>Hn,structure:()=>up});var cp="Number",up={value:String};function Hn(){return {type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function pp(e){this.token(10,e.value);}var Vn={};b(Vn,{generate:()=>fp,name:()=>hp,parse:()=>Gn,structure:()=>mp});var hp="Operator",mp={value:String};function Gn(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function fp(e){this.tokenize(e.value);}var Qn={};b(Qn,{generate:()=>bp,name:()=>dp,parse:()=>Kn,structure:()=>gp});var dp="Parentheses",gp={children:[[]]};function Kn(e,t){let r=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function bp(e){this.token(21,"("),this.children(e),this.token(22,")");}var $n={};b($n,{generate:()=>kp,name:()=>xp,parse:()=>Xn,structure:()=>yp});var xp="Percentage",yp={value:String};function Xn(){return {type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function kp(e){this.token(11,e.value+"%");}var Jn={};b(Jn,{generate:()=>Cp,name:()=>wp,parse:()=>Zn,structure:()=>Sp,walkContext:()=>vp});var wp="PseudoClassSelector",vp="function",Sp={name:String,children:[["Raw"],null]};function Zn(){let e=this.tokenStart,t=null,r,n;return this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function Cp(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"));}var to={};b(to,{generate:()=>Lp,name:()=>Ap,parse:()=>eo,structure:()=>Ep,walkContext:()=>Tp});var Ap="PseudoElementSelector",Tp="function",Ep={name:String,children:[["Raw"],null]};function eo(){let e=this.tokenStart,t=null,r,n;return this.eat(16),this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function Lp(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"));}var no={};b(no,{generate:()=>Np,name:()=>Dp,parse:()=>ro,structure:()=>Op});var Pp=47,Ip=46;function Sa(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);!B(r)&&r!==Ip&&this.error("Unsigned number is expected",this.tokenStart-e.length+t);}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var Dp="Ratio",Op={left:String,right:String};function ro(){let e=this.tokenStart,t=Sa.call(this),r;return this.skipSC(),this.eatDelim(Pp),r=Sa.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:r}}function Np(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right);}var io={};b(io,{generate:()=>Fp,name:()=>Mp,parse:()=>oo,structure:()=>Rp});function zp(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var Mp="Raw",Rp={value:String};function oo(e,t,r){let n=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r&&this.tokenStart>n?o=zp.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(n,o),value:this.substring(n,o)}}function Fp(e){this.tokenize(e.value);}var so={};b(so,{generate:()=>qp,name:()=>_p,parse:()=>ao,structure:()=>jp,walkContext:()=>Up});function Ca(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Bp(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var _p="Rule",Up="rule",jp={prelude:["SelectorList","Raw"],block:["Block"]};function ao(){let e=this.tokenIndex,t=this.tokenStart,r,n;return this.parseRulePrelude?r=this.parseWithFallback(Bp,Ca):r=Ca.call(this,e),n=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:r,block:n}}function qp(e){this.node(e.prelude),this.node(e.block);}var co={};b(co,{generate:()=>Yp,name:()=>Wp,parse:()=>lo,structure:()=>Hp});var Wp="Selector",Hp={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function lo(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function Yp(e){this.children(e);}var po={};b(po,{generate:()=>Qp,name:()=>Gp,parse:()=>uo,structure:()=>Kp,walkContext:()=>Vp});var Gp="SelectorList",Vp="selector",Kp={children:[["Selector","Raw"]]};function uo(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return {type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Qp(e){this.children(e,()=>this.token(18,","));}var bo={};b(bo,{generate:()=>Zp,name:()=>Xp,parse:()=>go,structure:()=>$p});var fo={};b(fo,{decode:()=>ft,encode:()=>mo});var ho=92,Aa=34,Ta=39;function ft(e){let t=e.length,r=e.charCodeAt(0),n=r===Aa||r===Ta?1:0,o=n===1&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,i="";for(let s=n;s<=o;s++){let u=e.charCodeAt(s);if(u===ho){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(u=e.charCodeAt(++s),$(ho,u)){let c=s-1,a=se(e,c);s=a-1,i+=Re(e.substring(c+1,a));}else u===13&&e.charCodeAt(s+1)===10&&s++;}else i+=e[s];}return i}function mo(e,t){let r=t?"'":'"',n=t?Ta:Aa,o="",i=!1;for(let s=0;s<e.length;s++){let u=e.charCodeAt(s);if(u===0){o+="\uFFFD";continue}if(u<=31||u===127){o+="\\"+u.toString(16),i=!0;continue}u===n||u===ho?(o+="\\"+e.charAt(s),i=!1):(i&&(ee(u)||pe(u))&&(o+=" "),o+=e.charAt(s),i=!1);}return r+o+r}var Xp="String",$p={value:String};function go(){return {type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:ft(this.consume(5))}}function Zp(e){this.token(5,mo(e.value));}var yo={};b(yo,{generate:()=>nh,name:()=>eh,parse:()=>xo,structure:()=>rh,walkContext:()=>th});var Jp=33;function Ea(e){return this.Raw(e,null,!1)}var eh="StyleSheet",th="stylesheet",rh={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function xo(){let e=this.tokenStart,t=this.createList(),r;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==Jp){this.next();continue}r=this.Comment();break;case 14:r=this.CDO();break;case 15:r=this.CDC();break;case 3:r=this.parseWithFallback(this.Atrule,Ea);break;default:r=this.parseWithFallback(this.Rule,Ea);}t.push(r);}return {type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function nh(e){this.children(e);}var vo={};b(vo,{generate:()=>sh,name:()=>ih,parse:()=>wo,structure:()=>ah});var oh=42,La=124;function ko(){this.tokenType!==1&&this.isDelim(oh)===!1&&this.error("Identifier or asterisk is expected"),this.next();}var ih="TypeSelector",ah={name:String};function wo(){let e=this.tokenStart;return this.isDelim(La)?(this.next(),ko.call(this)):(ko.call(this),this.isDelim(La)&&(this.next(),ko.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function sh(e){this.tokenize(e.name);}var Ao={};b(Ao,{generate:()=>hh,name:()=>uh,parse:()=>Co,structure:()=>ph});var Pa=43,Ia=45,So=63;function dt(e,t){let r=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){let o=this.charCodeAt(n);if(o===Ia&&t&&r!==0)return dt.call(this,e+r+1,!1),-1;ee(o)||this.error(t&&r!==0?"Hyphen minus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n);}return this.next(),r}function Jt(e){let t=0;for(;this.isDelim(So);)++t>e&&this.error("Too many question marks"),this.next();}function lh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Pa?"Plus sign":"Hyphen minus")+" is expected");}function ch(){let e=0;switch(this.tokenType){case 10:if(e=dt.call(this,1,!0),this.isDelim(So)){Jt.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){lh.call(this,Ia),dt.call(this,1,!1);break}break;case 12:e=dt.call(this,1,!0),e>0&&Jt.call(this,6-e);break;default:if(this.eatDelim(Pa),this.tokenType===1){e=dt.call(this,0,!0),e>0&&Jt.call(this,6-e);break}if(this.isDelim(So)){this.next(),Jt.call(this,5);break}this.error("Hex digit or question mark is expected");}}var uh="UnicodeRange",ph={value:String};function Co(){let e=this.tokenStart;return this.eatIdent("u"),ch.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function hh(e){this.tokenize(e.value);}var Do={};b(Do,{generate:()=>yh,name:()=>bh,parse:()=>Io,structure:()=>xh});var Po={};b(Po,{decode:()=>Eo,encode:()=>Lo});var mh=32,To=92,fh=34,dh=39,gh=40,Da=41;function Eo(e){let t=e.length,r=4,n=e.charCodeAt(t-1)===Da?t-2:t-1,o="";for(;r<n&&pe(e.charCodeAt(r));)r++;for(;r<n&&pe(e.charCodeAt(n));)n--;for(let i=r;i<=n;i++){let s=e.charCodeAt(i);if(s===To){if(i===n){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),$(To,s)){let u=i-1,c=se(e,u);i=c-1,o+=Re(e.substring(u+1,c));}else s===13&&e.charCodeAt(i+1)===10&&i++;}else o+=e[i];}return o}function Lo(e){let t="",r=!1;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),r=!0;continue}o===mh||o===To||o===fh||o===dh||o===gh||o===Da?(t+="\\"+e.charAt(n),r=!1):(r&&ee(o)&&(t+=" "),t+=e.charAt(n),r=!1);}return "url("+t+")"}var bh="Url",xh={value:String};function Io(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Eo(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=ft(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected");}return {type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function yh(e){this.token(7,Lo(e.value));}var No={};b(No,{generate:()=>vh,name:()=>kh,parse:()=>Oo,structure:()=>wh});var kh="Value",wh={children:[[]]};function Oo(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return {type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function vh(e){this.children(e);}var Mo={};b(Mo,{generate:()=>Th,name:()=>Ch,parse:()=>zo,structure:()=>Ah});var Sh=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Ch="WhiteSpace",Ah={value:String};function zo(){return this.eat(13),Sh}function Th(e){this.token(13,e.value);}var Oa={generic:!0,...fa,node:gt};var Ro={};b(Ro,{AtrulePrelude:()=>za,Selector:()=>Ra,Value:()=>Ua});var Eh=35,Lh=42,Na=43,Ph=45,Ih=47,Dh=117;function bt(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,Dh)&&this.cmpChar(this.tokenStart+1,Na)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===Ih||t===Lh||t===Na||t===Ph)return this.Operator();t===Eh&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var za={getNode:bt};var Oh=35,Nh=38,zh=42,Mh=43,Rh=47,Ma=46,Fh=62,Bh=124,_h=126;function Uh(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "});}function jh(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Ma&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case Mh:case Fh:case _h:case Rh:return this.Combinator();case Ma:return this.ClassSelector();case zh:case Bh:return this.TypeSelector();case Oh:return this.IdSelector();case Nh:return this.NestingSelector()}break}}}var Ra={onWhiteSpace:Uh,getNode:jh};function Fa(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function Ba(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(r.type==="Value"&&r.children.isEmpty){for(let n=t-this.tokenIndex;n<=0;n++)if(this.lookupType(n)===13){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(r);}return e}function _a(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var Ua={getNode:bt,onWhiteSpace(e,t){_a(e)&&(e.value=" "+e.value),_a(t.last)&&(t.last.value+=" ");},expression:Fa,var:Ba};var ja={parse:{prelude:null,block(){return this.Block(!0)}}};var qa={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected");}return (this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}};var Wa={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}};var Ha={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var Ya={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function qh(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function Wh(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Ga.call(this)}function Ga(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(qh,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(Wh,this.scope.AtrulePrelude);break;default:break e}e.push(t);}return e}var Va={parse:{prelude(){let e=Ga.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}};var Ka={"font-face":ja,import:qa,media:Wa,nest:Ha,page:Ya,supports:Va};var De={parse(){return this.createSingleNodeList(this.SelectorList())}},Fo={parse(){return this.createSingleNodeList(this.Selector())}},Qa={parse(){return this.createSingleNodeList(this.Identifier())}},er={parse(){return this.createSingleNodeList(this.Nth())}},Xa={dir:Qa,has:De,lang:Qa,matches:De,is:De,"-moz-any":De,"-webkit-any":De,where:De,not:De,"nth-child":er,"nth-last-child":er,"nth-last-of-type":er,"nth-of-type":er,slotted:Fo,host:Fo,"host-context":Fo};var Bo={};b(Bo,{AnPlusB:()=>Qr,Atrule:()=>$r,AtrulePrelude:()=>Jr,AttributeSelector:()=>rn,Block:()=>on,Brackets:()=>sn,CDC:()=>cn,CDO:()=>pn,ClassSelector:()=>mn,Combinator:()=>dn,Comment:()=>bn,Declaration:()=>yn,DeclarationList:()=>vn,Dimension:()=>Cn,Function:()=>Tn,Hash:()=>Ln,IdSelector:()=>On,Identifier:()=>In,MediaFeature:()=>zn,MediaQuery:()=>Rn,MediaQueryList:()=>Bn,NestingSelector:()=>Un,Nth:()=>qn,Number:()=>Hn,Operator:()=>Gn,Parentheses:()=>Kn,Percentage:()=>Xn,PseudoClassSelector:()=>Zn,PseudoElementSelector:()=>eo,Ratio:()=>ro,Raw:()=>oo,Rule:()=>ao,Selector:()=>lo,SelectorList:()=>uo,String:()=>go,StyleSheet:()=>xo,TypeSelector:()=>wo,UnicodeRange:()=>Co,Url:()=>Io,Value:()=>Oo,WhiteSpace:()=>zo});var $a={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Ro,atrule:Ka,pseudo:Xa,node:Bo};var Za={node:gt};var Ja=Vr({...Oa,...$a,...Za});var lb="2.3.1";function _o(e){let t={};for(let r in e){let n=e[r];n&&(Array.isArray(n)||n instanceof D?n=n.map(_o):n.constructor===Object&&(n=_o(n))),t[r]=n;}return t}var ts={};b(ts,{decode:()=>Hh,encode:()=>Yh});var es=92;function Hh(e){let t=e.length-1,r="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(o===es){if(n===t)break;if(o=e.charCodeAt(++n),$(es,o)){let i=n-1,s=se(e,i);n=s-1,r+=Re(e.substring(i+1,s));}else o===13&&e.charCodeAt(n+1)===10&&n++;}else r+=e[n];}return r}function Yh(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return "\\-";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n===0){t+="\uFFFD";continue}if(n<=31||n===127||n>=48&&n<=57&&(r===0||r===1&&e.charCodeAt(0)===45)){t+="\\"+n.toString(16)+" ";continue}Ne(n)?t+=e.charAt(r):t+="\\"+e.charAt(r);}return t}var{tokenize:fb,parse:db,generate:gb,lexer:bb,createLexer:xb,walk:yb,find:kb,findLast:wb,findAll:vb,toPlainObject:Sb,fromPlainObject:Cb,fork:Ab}=Ja;
  6998. var cssTree$1 = /*#__PURE__*/Object.freeze({
  6999. __proto__: null,
  7000. Lexer: Ke,
  7001. List: D,
  7002. TokenStream: rt,
  7003. clone: _o,
  7004. createLexer: xb,
  7005. createSyntax: Vr,
  7006. definitionSyntax: $i,
  7007. find: kb,
  7008. findAll: vb,
  7009. findLast: wb,
  7010. fork: Ab,
  7011. fromPlainObject: Cb,
  7012. generate: gb,
  7013. ident: ts,
  7014. isCustomProperty: Mt,
  7015. keyword: zt,
  7016. lexer: bb,
  7017. parse: db,
  7018. property: kr,
  7019. string: fo,
  7020. toPlainObject: Sb,
  7021. tokenNames: Fe,
  7022. tokenTypes: $e,
  7023. tokenize: fb,
  7024. url: Po,
  7025. vendorPrefix: Ym,
  7026. version: lb,
  7027. walk: yb
  7028. });
  7029. /*
  7030. * The MIT License (MIT)
  7031. *
  7032. * Author: Gildas Lormeau
  7033. *
  7034. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7035. * of this software and associated documentation files (the "Software"), to deal
  7036. * in the Software without restriction, including without limitation the rights
  7037. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7038. * copies of the Software, and to permit persons to whom the Software is
  7039. * furnished to do so, subject to the following conditions:
  7040. *
  7041. * The above copyright notice and this permission notice shall be included in all
  7042. * copies or substantial portions of the Software.
  7043. *
  7044. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7045. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  7046. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  7047. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  7048. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  7049. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  7050. * SOFTWARE.
  7051. */
  7052. const REGEXP_SIMPLE_QUOTES_STRING$1 = /^'(.*?)'$/;
  7053. const REGEXP_DOUBLE_QUOTES_STRING$1 = /^"(.*?)"$/;
  7054. const globalKeywords = [
  7055. "inherit",
  7056. "initial",
  7057. "unset"
  7058. ];
  7059. const systemFontKeywords = [
  7060. "caption",
  7061. "icon",
  7062. "menu",
  7063. "message-box",
  7064. "small-caption",
  7065. "status-bar"
  7066. ];
  7067. const fontWeightKeywords = [
  7068. "normal",
  7069. "bold",
  7070. "bolder",
  7071. "lighter",
  7072. "100",
  7073. "200",
  7074. "300",
  7075. "400",
  7076. "500",
  7077. "600",
  7078. "700",
  7079. "800",
  7080. "900"
  7081. ];
  7082. const fontStyleKeywords = [
  7083. "normal",
  7084. "italic",
  7085. "oblique"
  7086. ];
  7087. const fontStretchKeywords = [
  7088. "normal",
  7089. "condensed",
  7090. "semi-condensed",
  7091. "extra-condensed",
  7092. "ultra-condensed",
  7093. "expanded",
  7094. "semi-expanded",
  7095. "extra-expanded",
  7096. "ultra-expanded"
  7097. ];
  7098. const errorPrefix = "[parse-css-font] ";
  7099. function parse(value) {
  7100. const stringValue = gb(value);
  7101. if (systemFontKeywords.indexOf(stringValue) !== -1) {
  7102. return { system: stringValue };
  7103. }
  7104. const tokens = value.children;
  7105. const font = {
  7106. lineHeight: "normal",
  7107. stretch: "normal",
  7108. style: "normal",
  7109. variant: "normal",
  7110. weight: "normal",
  7111. };
  7112. let isLocked = false;
  7113. for (let tokenNode = tokens.head; tokenNode; tokenNode = tokenNode.next) {
  7114. const token = gb(tokenNode.data);
  7115. if (token === "normal" || globalKeywords.indexOf(token) !== -1) {
  7116. ["style", "variant", "weight", "stretch"].forEach((prop) => {
  7117. font[prop] = token;
  7118. });
  7119. isLocked = true;
  7120. continue;
  7121. }
  7122. if (fontWeightKeywords.indexOf(token) !== -1) {
  7123. if (isLocked) {
  7124. continue;
  7125. }
  7126. font.weight = token;
  7127. continue;
  7128. }
  7129. if (fontStyleKeywords.indexOf(token) !== -1) {
  7130. if (isLocked) {
  7131. continue;
  7132. }
  7133. font.style = token;
  7134. continue;
  7135. }
  7136. if (fontStretchKeywords.indexOf(token) !== -1) {
  7137. if (isLocked) {
  7138. continue;
  7139. }
  7140. font.stretch = token;
  7141. continue;
  7142. }
  7143. if (tokenNode.data.type == "Dimension") {
  7144. font.size = gb(tokenNode.data);
  7145. tokenNode = tokenNode.next;
  7146. if (tokenNode && tokenNode.data.type == "Operator" && tokenNode.data.value == "/" && tokenNode.next) {
  7147. tokenNode = tokenNode.next;
  7148. font.lineHeight = gb(tokenNode.data);
  7149. tokenNode = tokenNode.next;
  7150. } else if (tokens.head.data.type == "Operator" && tokens.head.data.value == "/" && tokens.head.next) {
  7151. font.lineHeight = gb(tokens.head.next.data);
  7152. tokenNode = tokens.head.next.next;
  7153. }
  7154. if (!tokenNode) {
  7155. throw error("Missing required font-family.");
  7156. }
  7157. font.family = [];
  7158. let familyName = "";
  7159. while (tokenNode) {
  7160. while (tokenNode && tokenNode.data.type == "Operator" && tokenNode.data.value == ",") {
  7161. tokenNode = tokenNode.next;
  7162. }
  7163. if (tokenNode) {
  7164. if (tokenNode.data.type == "Identifier") {
  7165. while (tokenNode && tokenNode.data.type == "Identifier") {
  7166. familyName += " " + gb(tokenNode.data);
  7167. tokenNode = tokenNode.next;
  7168. }
  7169. } else {
  7170. familyName = removeQuotes(gb(tokenNode.data));
  7171. tokenNode = tokenNode.next;
  7172. }
  7173. }
  7174. familyName = familyName.trim();
  7175. if (familyName) {
  7176. font.family.push(familyName);
  7177. familyName = "";
  7178. }
  7179. }
  7180. return font;
  7181. }
  7182. if (font.variant !== "normal") {
  7183. throw error("Unknown or unsupported font token: " + font.variant);
  7184. }
  7185. if (isLocked) {
  7186. continue;
  7187. }
  7188. font.variant = token;
  7189. }
  7190. throw error("Missing required font-size.");
  7191. }
  7192. function error(message) {
  7193. return new Error(errorPrefix + message);
  7194. }
  7195. function removeQuotes(string) {
  7196. if (string.match(REGEXP_SIMPLE_QUOTES_STRING$1)) {
  7197. string = string.replace(REGEXP_SIMPLE_QUOTES_STRING$1, "$1");
  7198. } else {
  7199. string = string.replace(REGEXP_DOUBLE_QUOTES_STRING$1, "$1");
  7200. }
  7201. return string.trim();
  7202. }
  7203. var cssFontPropertyParser = /*#__PURE__*/Object.freeze({
  7204. __proto__: null,
  7205. parse: parse
  7206. });
  7207. /*
  7208. * The MIT License (MIT)
  7209. *
  7210. * Author: Gildas Lormeau
  7211. *
  7212. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7213. * of this software and associated documentation files (the "Software"), to deal
  7214. * in the Software without restriction, including without limitation the rights
  7215. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7216. * copies of the Software, and to permit persons to whom the Software is
  7217. * furnished to do so, subject to the following conditions:
  7218. *
  7219. * The above copyright notice and this permission notice shall be included in all
  7220. * copies or substantial portions of the Software.
  7221. *
  7222. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7223. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  7224. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  7225. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  7226. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  7227. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  7228. * SOFTWARE.
  7229. */
  7230. // derived from https://github.com/dryoma/postcss-media-query-parser
  7231. /*
  7232. * The MIT License (MIT)
  7233. *
  7234. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7235. * of this software and associated documentation files (the "Software"), to deal
  7236. * in the Software without restriction, including without limitation the rights
  7237. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7238. * copies of the Software, and to permit persons to whom the Software is
  7239. * furnished to do so, subject to the following conditions:
  7240. *
  7241. * The above copyright notice and this permission notice shall be included in
  7242. * all copies or substantial portions of the Software.
  7243. *
  7244. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7245. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  7246. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  7247. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  7248. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  7249. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  7250. * THE SOFTWARE.
  7251. */
  7252. /**
  7253. * Parses a media feature expression, e.g. `max-width: 10px`, `(color)`
  7254. *
  7255. * @param {string} string - the source expression string, can be inside parens
  7256. * @param {Number} index - the index of `string` in the overall input
  7257. *
  7258. * @return {Array} an array of Nodes, the first element being a media feature,
  7259. * the second - its value (may be missing)
  7260. */
  7261. function parseMediaFeature(string, index = 0) {
  7262. const modesEntered = [{
  7263. mode: "normal",
  7264. character: null,
  7265. }];
  7266. const result = [];
  7267. let lastModeIndex = 0, mediaFeature = "", colon = null, mediaFeatureValue = null, indexLocal = index;
  7268. let stringNormalized = string;
  7269. // Strip trailing parens (if any), and correct the starting index
  7270. if (string[0] === "(" && string[string.length - 1] === ")") {
  7271. stringNormalized = string.substring(1, string.length - 1);
  7272. indexLocal++;
  7273. }
  7274. for (let i = 0; i < stringNormalized.length; i++) {
  7275. const character = stringNormalized[i];
  7276. // If entering/exiting a string
  7277. if (character === "'" || character === "\"") {
  7278. if (modesEntered[lastModeIndex].isCalculationEnabled === true) {
  7279. modesEntered.push({
  7280. mode: "string",
  7281. isCalculationEnabled: false,
  7282. character,
  7283. });
  7284. lastModeIndex++;
  7285. } else if (modesEntered[lastModeIndex].mode === "string" &&
  7286. modesEntered[lastModeIndex].character === character &&
  7287. stringNormalized[i - 1] !== "\\"
  7288. ) {
  7289. modesEntered.pop();
  7290. lastModeIndex--;
  7291. }
  7292. }
  7293. // If entering/exiting interpolation
  7294. if (character === "{") {
  7295. modesEntered.push({
  7296. mode: "interpolation",
  7297. isCalculationEnabled: true,
  7298. });
  7299. lastModeIndex++;
  7300. } else if (character === "}") {
  7301. modesEntered.pop();
  7302. lastModeIndex--;
  7303. }
  7304. // If a : is met outside of a string, function call or interpolation, than
  7305. // this : separates a media feature and a value
  7306. if (modesEntered[lastModeIndex].mode === "normal" && character === ":") {
  7307. const mediaFeatureValueStr = stringNormalized.substring(i + 1);
  7308. mediaFeatureValue = {
  7309. type: "value",
  7310. before: /^(\s*)/.exec(mediaFeatureValueStr)[1],
  7311. after: /(\s*)$/.exec(mediaFeatureValueStr)[1],
  7312. value: mediaFeatureValueStr.trim(),
  7313. };
  7314. // +1 for the colon
  7315. mediaFeatureValue.sourceIndex =
  7316. mediaFeatureValue.before.length + i + 1 + indexLocal;
  7317. colon = {
  7318. type: "colon",
  7319. sourceIndex: i + indexLocal,
  7320. after: mediaFeatureValue.before,
  7321. value: ":", // for consistency only
  7322. };
  7323. break;
  7324. }
  7325. mediaFeature += character;
  7326. }
  7327. // Forming a media feature node
  7328. mediaFeature = {
  7329. type: "media-feature",
  7330. before: /^(\s*)/.exec(mediaFeature)[1],
  7331. after: /(\s*)$/.exec(mediaFeature)[1],
  7332. value: mediaFeature.trim(),
  7333. };
  7334. mediaFeature.sourceIndex = mediaFeature.before.length + indexLocal;
  7335. result.push(mediaFeature);
  7336. if (colon !== null) {
  7337. colon.before = mediaFeature.after;
  7338. result.push(colon);
  7339. }
  7340. if (mediaFeatureValue !== null) {
  7341. result.push(mediaFeatureValue);
  7342. }
  7343. return result;
  7344. }
  7345. /**
  7346. * Parses a media query, e.g. `screen and (color)`, `only tv`
  7347. *
  7348. * @param {string} string - the source media query string
  7349. * @param {Number} index - the index of `string` in the overall input
  7350. *
  7351. * @return {Array} an array of Nodes and Containers
  7352. */
  7353. function parseMediaQuery(string, index = 0) {
  7354. const result = [];
  7355. // How many times the parser entered parens/curly braces
  7356. let localLevel = 0;
  7357. // Has any keyword, media type, media feature expression or interpolation
  7358. // ('element' hereafter) started
  7359. let insideSomeValue = false, node;
  7360. function resetNode() {
  7361. return {
  7362. before: "",
  7363. after: "",
  7364. value: "",
  7365. };
  7366. }
  7367. node = resetNode();
  7368. for (let i = 0; i < string.length; i++) {
  7369. const character = string[i];
  7370. // If not yet entered any element
  7371. if (!insideSomeValue) {
  7372. if (character.search(/\s/) !== -1) {
  7373. // A whitespace
  7374. // Don't form 'after' yet; will do it later
  7375. node.before += character;
  7376. } else {
  7377. // Not a whitespace - entering an element
  7378. // Expression start
  7379. if (character === "(") {
  7380. node.type = "media-feature-expression";
  7381. localLevel++;
  7382. }
  7383. node.value = character;
  7384. node.sourceIndex = index + i;
  7385. insideSomeValue = true;
  7386. }
  7387. } else {
  7388. // Already in the middle of some element
  7389. node.value += character;
  7390. // Here parens just increase localLevel and don't trigger a start of
  7391. // a media feature expression (since they can't be nested)
  7392. // Interpolation start
  7393. if (character === "{" || character === "(") { localLevel++; }
  7394. // Interpolation/function call/media feature expression end
  7395. if (character === ")" || character === "}") { localLevel--; }
  7396. }
  7397. // If exited all parens/curlies and the next symbol
  7398. if (insideSomeValue && localLevel === 0 &&
  7399. (character === ")" || i === string.length - 1 ||
  7400. string[i + 1].search(/\s/) !== -1)
  7401. ) {
  7402. if (["not", "only", "and"].indexOf(node.value) !== -1) {
  7403. node.type = "keyword";
  7404. }
  7405. // if it's an expression, parse its contents
  7406. if (node.type === "media-feature-expression") {
  7407. node.nodes = parseMediaFeature(node.value, node.sourceIndex);
  7408. }
  7409. result.push(Array.isArray(node.nodes) ?
  7410. new Container(node) : new Node$1(node));
  7411. node = resetNode();
  7412. insideSomeValue = false;
  7413. }
  7414. }
  7415. // Now process the result array - to specify undefined types of the nodes
  7416. // and specify the `after` prop
  7417. for (let i = 0; i < result.length; i++) {
  7418. node = result[i];
  7419. if (i > 0) { result[i - 1].after = node.before; }
  7420. // Node types. Might not be set because contains interpolation/function
  7421. // calls or fully consists of them
  7422. if (node.type === undefined) {
  7423. if (i > 0) {
  7424. // only `and` can follow an expression
  7425. if (result[i - 1].type === "media-feature-expression") {
  7426. node.type = "keyword";
  7427. continue;
  7428. }
  7429. // Anything after 'only|not' is a media type
  7430. if (result[i - 1].value === "not" || result[i - 1].value === "only") {
  7431. node.type = "media-type";
  7432. continue;
  7433. }
  7434. // Anything after 'and' is an expression
  7435. if (result[i - 1].value === "and") {
  7436. node.type = "media-feature-expression";
  7437. continue;
  7438. }
  7439. if (result[i - 1].type === "media-type") {
  7440. // if it is the last element - it might be an expression
  7441. // or 'and' depending on what is after it
  7442. if (!result[i + 1]) {
  7443. node.type = "media-feature-expression";
  7444. } else {
  7445. node.type = result[i + 1].type === "media-feature-expression" ?
  7446. "keyword" : "media-feature-expression";
  7447. }
  7448. }
  7449. }
  7450. if (i === 0) {
  7451. // `screen`, `fn( ... )`, `#{ ... }`. Not an expression, since then
  7452. // its type would have been set by now
  7453. if (!result[i + 1]) {
  7454. node.type = "media-type";
  7455. continue;
  7456. }
  7457. // `screen and` or `#{...} (max-width: 10px)`
  7458. if (result[i + 1] &&
  7459. (result[i + 1].type === "media-feature-expression" ||
  7460. result[i + 1].type === "keyword")
  7461. ) {
  7462. node.type = "media-type";
  7463. continue;
  7464. }
  7465. if (result[i + 2]) {
  7466. // `screen and (color) ...`
  7467. if (result[i + 2].type === "media-feature-expression") {
  7468. node.type = "media-type";
  7469. result[i + 1].type = "keyword";
  7470. continue;
  7471. }
  7472. // `only screen and ...`
  7473. if (result[i + 2].type === "keyword") {
  7474. node.type = "keyword";
  7475. result[i + 1].type = "media-type";
  7476. continue;
  7477. }
  7478. }
  7479. if (result[i + 3]) {
  7480. // `screen and (color) ...`
  7481. if (result[i + 3].type === "media-feature-expression") {
  7482. node.type = "keyword";
  7483. result[i + 1].type = "media-type";
  7484. result[i + 2].type = "keyword";
  7485. continue;
  7486. }
  7487. }
  7488. }
  7489. }
  7490. }
  7491. return result;
  7492. }
  7493. /**
  7494. * Parses a media query list. Takes a possible `url()` at the start into
  7495. * account, and divides the list into media queries that are parsed separately
  7496. *
  7497. * @param {string} string - the source media query list string
  7498. *
  7499. * @return {Array} an array of Nodes/Containers
  7500. */
  7501. function parseMediaList(string) {
  7502. const result = [];
  7503. let interimIndex = 0, levelLocal = 0;
  7504. // Check for a `url(...)` part (if it is contents of an @import rule)
  7505. const doesHaveUrl = /^(\s*)url\s*\(/.exec(string);
  7506. if (doesHaveUrl !== null) {
  7507. let i = doesHaveUrl[0].length;
  7508. let parenthesesLv = 1;
  7509. while (parenthesesLv > 0) {
  7510. const character = string[i];
  7511. if (character === "(") { parenthesesLv++; }
  7512. if (character === ")") { parenthesesLv--; }
  7513. i++;
  7514. }
  7515. result.unshift(new Node$1({
  7516. type: "url",
  7517. value: string.substring(0, i).trim(),
  7518. sourceIndex: doesHaveUrl[1].length,
  7519. before: doesHaveUrl[1],
  7520. after: /^(\s*)/.exec(string.substring(i))[1],
  7521. }));
  7522. interimIndex = i;
  7523. }
  7524. // Start processing the media query list
  7525. for (let i = interimIndex; i < string.length; i++) {
  7526. const character = string[i];
  7527. // Dividing the media query list into comma-separated media queries
  7528. // Only count commas that are outside of any parens
  7529. // (i.e., not part of function call params list, etc.)
  7530. if (character === "(") { levelLocal++; }
  7531. if (character === ")") { levelLocal--; }
  7532. if (levelLocal === 0 && character === ",") {
  7533. const mediaQueryString = string.substring(interimIndex, i);
  7534. const spaceBefore = /^(\s*)/.exec(mediaQueryString)[1];
  7535. result.push(new Container({
  7536. type: "media-query",
  7537. value: mediaQueryString.trim(),
  7538. sourceIndex: interimIndex + spaceBefore.length,
  7539. nodes: parseMediaQuery(mediaQueryString, interimIndex),
  7540. before: spaceBefore,
  7541. after: /(\s*)$/.exec(mediaQueryString)[1],
  7542. }));
  7543. interimIndex = i + 1;
  7544. }
  7545. }
  7546. const mediaQueryString = string.substring(interimIndex);
  7547. const spaceBefore = /^(\s*)/.exec(mediaQueryString)[1];
  7548. result.push(new Container({
  7549. type: "media-query",
  7550. value: mediaQueryString.trim(),
  7551. sourceIndex: interimIndex + spaceBefore.length,
  7552. nodes: parseMediaQuery(mediaQueryString, interimIndex),
  7553. before: spaceBefore,
  7554. after: /(\s*)$/.exec(mediaQueryString)[1],
  7555. }));
  7556. return result;
  7557. }
  7558. function Container(opts) {
  7559. this.constructor(opts);
  7560. this.nodes = opts.nodes;
  7561. if (this.after === undefined) {
  7562. this.after = this.nodes.length > 0 ?
  7563. this.nodes[this.nodes.length - 1].after : "";
  7564. }
  7565. if (this.before === undefined) {
  7566. this.before = this.nodes.length > 0 ?
  7567. this.nodes[0].before : "";
  7568. }
  7569. if (this.sourceIndex === undefined) {
  7570. this.sourceIndex = this.before.length;
  7571. }
  7572. this.nodes.forEach(node => {
  7573. node.parent = this; // eslint-disable-line no-param-reassign
  7574. });
  7575. }
  7576. Container.prototype = Object.create(Node$1.prototype);
  7577. Container.constructor = Node$1;
  7578. /**
  7579. * Iterate over descendant nodes of the node
  7580. *
  7581. * @param {RegExp|string} filter - Optional. Only nodes with node.type that
  7582. * satisfies the filter will be traversed over
  7583. * @param {function} cb - callback to call on each node. Takes these params:
  7584. * node - the node being processed, i - it's index, nodes - the array
  7585. * of all nodes
  7586. * If false is returned, the iteration breaks
  7587. *
  7588. * @return (boolean) false, if the iteration was broken
  7589. */
  7590. Container.prototype.walk = function walk(filter, cb) {
  7591. const hasFilter = typeof filter === "string" || filter instanceof RegExp;
  7592. const callback = hasFilter ? cb : filter;
  7593. const filterReg = typeof filter === "string" ? new RegExp(filter) : filter;
  7594. for (let i = 0; i < this.nodes.length; i++) {
  7595. const node = this.nodes[i];
  7596. const filtered = hasFilter ? filterReg.test(node.type) : true;
  7597. if (filtered && callback && callback(node, i, this.nodes) === false) {
  7598. return false;
  7599. }
  7600. if (node.nodes && node.walk(filter, cb) === false) { return false; }
  7601. }
  7602. return true;
  7603. };
  7604. /**
  7605. * Iterate over immediate children of the node
  7606. *
  7607. * @param {function} cb - callback to call on each node. Takes these params:
  7608. * node - the node being processed, i - it's index, nodes - the array
  7609. * of all nodes
  7610. * If false is returned, the iteration breaks
  7611. *
  7612. * @return (boolean) false, if the iteration was broken
  7613. */
  7614. Container.prototype.each = function each(cb = () => { }) {
  7615. for (let i = 0; i < this.nodes.length; i++) {
  7616. const node = this.nodes[i];
  7617. if (cb(node, i, this.nodes) === false) { return false; }
  7618. }
  7619. return true;
  7620. };
  7621. /**
  7622. * A very generic node. Pretty much any element of a media query
  7623. */
  7624. function Node$1(opts) {
  7625. this.after = opts.after;
  7626. this.before = opts.before;
  7627. this.type = opts.type;
  7628. this.value = opts.value;
  7629. this.sourceIndex = opts.sourceIndex;
  7630. }
  7631. var cssMediaQueryParser = /*#__PURE__*/Object.freeze({
  7632. __proto__: null,
  7633. parseMediaList: parseMediaList
  7634. });
  7635. /*
  7636. * The MIT License (MIT)
  7637. *
  7638. * Author: Gildas Lormeau
  7639. *
  7640. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7641. * of this software and associated documentation files (the "Software"), to deal
  7642. * in the Software without restriction, including without limitation the rights
  7643. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7644. * copies of the Software, and to permit persons to whom the Software is
  7645. * furnished to do so, subject to the following conditions:
  7646. *
  7647. * The above copyright notice and this permission notice shall be included in all
  7648. * copies or substantial portions of the Software.
  7649. *
  7650. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  7651. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  7652. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  7653. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  7654. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  7655. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  7656. * SOFTWARE.
  7657. */
  7658. // derived from https://github.com/fmarcia/UglifyCSS
  7659. /**
  7660. * UglifyCSS
  7661. * Port of YUI CSS Compressor to NodeJS
  7662. * Author: Franck Marcia - https://github.com/fmarcia
  7663. * MIT licenced
  7664. */
  7665. /**
  7666. * cssmin.js
  7667. * Author: Stoyan Stefanov - http://phpied.com/
  7668. * This is a JavaScript port of the CSS minification tool
  7669. * distributed with YUICompressor, itself a port
  7670. * of the cssmin utility by Isaac Schlueter - http://foohack.com/
  7671. * Permission is hereby granted to use the JavaScript version under the same
  7672. * conditions as the YUICompressor (original YUICompressor note below).
  7673. */
  7674. /**
  7675. * YUI Compressor
  7676. * http://developer.yahoo.com/yui/compressor/
  7677. * Author: Julien Lecomte - http://www.julienlecomte.net/
  7678. * Copyright (c) 2011 Yahoo! Inc. All rights reserved.
  7679. * The copyrights embodied in the content of this file are licensed
  7680. * by Yahoo! Inc. under the BSD (revised) open source license.
  7681. */
  7682. /**
  7683. * @type {string} - placeholder prefix
  7684. */
  7685. const ___PRESERVED_TOKEN_ = "___PRESERVED_TOKEN_";
  7686. /**
  7687. * @typedef {object} options - UglifyCSS options
  7688. * @property {number} [maxLineLen=0] - Maximum line length of uglified CSS
  7689. * @property {boolean} [expandVars=false] - Expand variables
  7690. * @property {boolean} [uglyComments=false] - Removes newlines within preserved comments
  7691. * @property {boolean} [cuteComments=false] - Preserves newlines within and around preserved comments
  7692. * @property {boolean} [debug=false] - Prints full error stack on error
  7693. * @property {string} [output=''] - Output file name
  7694. */
  7695. /**
  7696. * @type {options} - UglifyCSS options
  7697. */
  7698. const defaultOptions = {
  7699. maxLineLen: 0,
  7700. expandVars: false,
  7701. uglyComments: false,
  7702. cuteComments: false,
  7703. debug: false,
  7704. output: ""
  7705. };
  7706. const REGEXP_DATA_URI = /url\(\s*(["']?)data:/g;
  7707. const REGEXP_WHITE_SPACES = /\s+/g;
  7708. const REGEXP_NEW_LINE = /\n/g;
  7709. /**
  7710. * extractDataUrls replaces all data urls with tokens before we start
  7711. * compressing, to avoid performance issues running some of the subsequent
  7712. * regexes against large strings chunks.
  7713. *
  7714. * @param {string} css - CSS content
  7715. * @param {string[]} preservedTokens - Global array of tokens to preserve
  7716. *
  7717. * @return {string} Processed CSS
  7718. */
  7719. function extractDataUrls(css, preservedTokens) {
  7720. // Leave data urls alone to increase parse performance.
  7721. const pattern = REGEXP_DATA_URI;
  7722. const maxIndex = css.length - 1;
  7723. const sb = [];
  7724. let appendIndex = 0, match;
  7725. // Since we need to account for non-base64 data urls, we need to handle
  7726. // ' and ) being part of the data string. Hence switching to indexOf,
  7727. // to determine whether or not we have matching string terminators and
  7728. // handling sb appends directly, instead of using matcher.append* methods.
  7729. while ((match = pattern.exec(css)) !== null) {
  7730. const startIndex = match.index + 4; // 'url('.length()
  7731. let terminator = match[1]; // ', " or empty (not quoted)
  7732. if (terminator.length === 0) {
  7733. terminator = ")";
  7734. }
  7735. let foundTerminator = false, endIndex = pattern.lastIndex - 1;
  7736. while (foundTerminator === false && endIndex + 1 <= maxIndex && endIndex != -1) {
  7737. endIndex = css.indexOf(terminator, endIndex + 1);
  7738. // endIndex == 0 doesn't really apply here
  7739. if ((endIndex > 0) && (css.charAt(endIndex - 1) !== "\\")) {
  7740. foundTerminator = true;
  7741. if (")" != terminator) {
  7742. endIndex = css.indexOf(")", endIndex);
  7743. }
  7744. }
  7745. }
  7746. // Enough searching, start moving stuff over to the buffer
  7747. sb.push(css.substring(appendIndex, match.index));
  7748. if (foundTerminator) {
  7749. let token = css.substring(startIndex, endIndex);
  7750. const parts = token.split(",");
  7751. if (parts.length > 1 && parts[0].slice(-7) == ";base64") {
  7752. token = token.replace(REGEXP_WHITE_SPACES, "");
  7753. } else {
  7754. token = token.replace(REGEXP_NEW_LINE, " ");
  7755. token = token.replace(REGEXP_WHITE_SPACES, " ");
  7756. token = token.replace(REGEXP_PRESERVE_HSLA1, "");
  7757. }
  7758. preservedTokens.push(token);
  7759. const preserver = "url(" + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___)";
  7760. sb.push(preserver);
  7761. appendIndex = endIndex + 1;
  7762. } else {
  7763. // No end terminator found, re-add the whole match. Should we throw/warn here?
  7764. sb.push(css.substring(match.index, pattern.lastIndex));
  7765. appendIndex = pattern.lastIndex;
  7766. }
  7767. }
  7768. sb.push(css.substring(appendIndex));
  7769. return sb.join("");
  7770. }
  7771. const REGEXP_HEX_COLORS = /(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;
  7772. /**
  7773. * compressHexColors compresses hex color values of the form #AABBCC to #ABC.
  7774. *
  7775. * DOES NOT compress CSS ID selectors which match the above pattern (which would
  7776. * break things), like #AddressForm { ... }
  7777. *
  7778. * DOES NOT compress IE filters, which have hex color values (which would break
  7779. * things), like chroma(color='#FFFFFF');
  7780. *
  7781. * DOES NOT compress invalid hex values, like background-color: #aabbccdd
  7782. *
  7783. * @param {string} css - CSS content
  7784. *
  7785. * @return {string} Processed CSS
  7786. */
  7787. function compressHexColors(css) {
  7788. // Look for hex colors inside { ... } (to avoid IDs) and which don't have a =, or a " in front of them (to avoid filters)
  7789. const pattern = REGEXP_HEX_COLORS;
  7790. const sb = [];
  7791. let index = 0, match;
  7792. while ((match = pattern.exec(css)) !== null) {
  7793. sb.push(css.substring(index, match.index));
  7794. const isFilter = match[1];
  7795. if (isFilter) {
  7796. // Restore, maintain case, otherwise filter will break
  7797. sb.push(match[1] + "#" + (match[2] + match[3] + match[4] + match[5] + match[6] + match[7]));
  7798. } else {
  7799. if (match[2].toLowerCase() == match[3].toLowerCase() &&
  7800. match[4].toLowerCase() == match[5].toLowerCase() &&
  7801. match[6].toLowerCase() == match[7].toLowerCase()) {
  7802. // Compress.
  7803. sb.push("#" + (match[3] + match[5] + match[7]).toLowerCase());
  7804. } else {
  7805. // Non compressible color, restore but lower case.
  7806. sb.push("#" + (match[2] + match[3] + match[4] + match[5] + match[6] + match[7]).toLowerCase());
  7807. }
  7808. }
  7809. index = pattern.lastIndex = pattern.lastIndex - match[8].length;
  7810. }
  7811. sb.push(css.substring(index));
  7812. return sb.join("");
  7813. }
  7814. const REGEXP_KEYFRAMES = /@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi;
  7815. const REGEXP_WHITE_SPACE = /(^\s|\s$)/g;
  7816. /** keyframes preserves 0 followed by unit in keyframes steps
  7817. *
  7818. * @param {string} content - CSS content
  7819. * @param {string[]} preservedTokens - Global array of tokens to preserve
  7820. *
  7821. * @return {string} Processed CSS
  7822. */
  7823. function keyframes(content, preservedTokens) {
  7824. const pattern = REGEXP_KEYFRAMES;
  7825. let index = 0, buffer;
  7826. const preserve = (part, i) => {
  7827. part = part.replace(REGEXP_WHITE_SPACE, "");
  7828. if (part.charAt(0) === "0") {
  7829. preservedTokens.push(part);
  7830. buffer[i] = ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
  7831. }
  7832. };
  7833. while (true) { // eslint-disable-line no-constant-condition
  7834. let level = 0;
  7835. buffer = "";
  7836. let startIndex = content.slice(index).search(pattern);
  7837. if (startIndex < 0) {
  7838. break;
  7839. }
  7840. index += startIndex;
  7841. startIndex = index;
  7842. const len = content.length;
  7843. const buffers = [];
  7844. for (; index < len; ++index) {
  7845. const ch = content.charAt(index);
  7846. if (ch === "{") {
  7847. if (level === 0) {
  7848. buffers.push(buffer.replace(REGEXP_WHITE_SPACE, ""));
  7849. } else if (level === 1) {
  7850. buffer = buffer.split(",");
  7851. buffer.forEach(preserve);
  7852. buffers.push(buffer.join(",").replace(REGEXP_WHITE_SPACE, ""));
  7853. }
  7854. buffer = "";
  7855. level += 1;
  7856. } else if (ch === "}") {
  7857. if (level === 2) {
  7858. buffers.push("{" + buffer.replace(REGEXP_WHITE_SPACE, "") + "}");
  7859. buffer = "";
  7860. } else if (level === 1) {
  7861. content = content.slice(0, startIndex) +
  7862. buffers.shift() + "{" +
  7863. buffers.join("") +
  7864. content.slice(index);
  7865. break;
  7866. }
  7867. level -= 1;
  7868. }
  7869. if (level < 0) {
  7870. break;
  7871. } else if (ch !== "{" && ch !== "}") {
  7872. buffer += ch;
  7873. }
  7874. }
  7875. }
  7876. return content;
  7877. }
  7878. /**
  7879. * collectComments collects all comment blocks and return new content with comment placeholders
  7880. *
  7881. * @param {string} content - CSS content
  7882. * @param {string[]} comments - Global array of extracted comments
  7883. *
  7884. * @return {string} Processed CSS
  7885. */
  7886. function collectComments(content, comments) {
  7887. const table = [];
  7888. let from = 0, end;
  7889. while (true) { // eslint-disable-line no-constant-condition
  7890. const start = content.indexOf("/*", from);
  7891. if (start > -1) {
  7892. end = content.indexOf("*/", start + 2);
  7893. if (end > -1) {
  7894. comments.push(content.slice(start + 2, end));
  7895. table.push(content.slice(from, start));
  7896. table.push("/*___PRESERVE_CANDIDATE_COMMENT_" + (comments.length - 1) + "___*/");
  7897. from = end + 2;
  7898. } else {
  7899. // unterminated comment
  7900. end = -2;
  7901. break;
  7902. }
  7903. } else {
  7904. break;
  7905. }
  7906. }
  7907. table.push(content.slice(end + 2));
  7908. return table.join("");
  7909. }
  7910. /**
  7911. * processString uglifies a CSS string
  7912. *
  7913. * @param {string} content - CSS string
  7914. * @param {options} options - UglifyCSS options
  7915. *
  7916. * @return {string} Uglified result
  7917. */
  7918. // const REGEXP_EMPTY_RULES = /[^};{/]+\{\}/g;
  7919. const REGEXP_PRESERVE_STRING1 = /"([^\\"])*"/g;
  7920. const REGEXP_PRESERVE_STRING1_BIS = /"(\\.)*"/g;
  7921. const REGEXP_PRESERVE_STRING1_TER = /"(\\)*"/g;
  7922. const REGEXP_PRESERVE_STRING2 = /'([^\\'])*'/g;
  7923. const REGEXP_PRESERVE_STRING2_BIS = /'(\\.)*'/g;
  7924. const REGEXP_PRESERVE_STRING2_TER = /'(\\)*'/g;
  7925. const REGEXP_MINIFY_ALPHA = /progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi;
  7926. const REGEXP_PRESERVE_TOKEN1 = /\r\n/g;
  7927. const REGEXP_PRESERVE_TOKEN2 = /[\r\n]/g;
  7928. const REGEXP_VARIABLES = /@variables\s*\{\s*([^}]+)\s*\}/g;
  7929. const REGEXP_VARIABLE = /\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi;
  7930. const REGEXP_VARIABLE_VALUE = /var\s*\(\s*([^)]+)\s*\)/g;
  7931. const REGEXP_PRESERVE_CALC = /calc\(([^;}]*)\)/g;
  7932. const REGEXP_TRIM = /(^\s*|\s*$)/g;
  7933. const REGEXP_PRESERVE_CALC2 = /\( /g;
  7934. const REGEXP_PRESERVE_CALC3 = / \)/g;
  7935. const REGEXP_PRESERVE_MATRIX = /\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g;
  7936. const REGEXP_REMOVE_SPACES = /(^|\})(([^{:])+:)+([^{]*{)/g;
  7937. const REGEXP_REMOVE_SPACES2 = /\s+([!{;:>+()\],])/g;
  7938. const REGEXP_REMOVE_SPACES2_BIS = /([^\\])\s+([}])/g;
  7939. const REGEXP_RESTORE_SPACE_IMPORTANT = /!important/g;
  7940. const REGEXP_PSEUDOCLASSCOLON = /___PSEUDOCLASSCOLON___/g;
  7941. const REGEXP_COLUMN = /:/g;
  7942. const REGEXP_PRESERVE_ZERO_UNIT = /\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi;
  7943. const REGEXP_PRESERVE_ZERO_UNIT1 = /(^|\D)0?\.?0(m?s)/gi;
  7944. const REGEXP_PRESERVE_FLEX = /\s*(flex|flex-basis):\s*([^;}]+)/gi;
  7945. const REGEXP_SPACES = /\s+/;
  7946. const REGEXP_PRESERVE_HSLA = /(hsla?)\(([^)]+)\)/g;
  7947. const REGEXP_PRESERVE_HSLA1 = /(^\s+|\s+$)/g;
  7948. const REGEXP_RETAIN_SPACE_IE6 = /:first-(line|letter)(\{|,)/gi;
  7949. const REGEXP_CHARSET = /^(.*)(@charset)( "[^"]*";)/gi;
  7950. const REGEXP_REMOVE_SECOND_CHARSET = /^((\s*)(@charset)( [^;]+;\s*))+/gi;
  7951. const REGEXP_LOWERCASE_DIRECTIVES = /@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi;
  7952. const REGEXP_LOWERCASE_PSEUDO_ELEMENTS = /:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi;
  7953. const REGEXP_CHARSET2 = /^(.*)(@charset "[^"]*";)/g;
  7954. const REGEXP_CHARSET3 = /^(\s*@charset [^;]+;\s*)+/g;
  7955. const REGEXP_LOWERCASE_FUNCTIONS = /:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi;
  7956. const REGEXP_LOWERCASE_FUNCTIONS2 = /([:,( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi;
  7957. const REGEXP_NEWLINE1 = /\s*\/\*/g;
  7958. const REGEXP_NEWLINE2 = /\*\/\s*/g;
  7959. const REGEXP_RESTORE_SPACE1 = /\band\(/gi;
  7960. const REGEXP_RESTORE_SPACE2 = /([^:])not\(/gi;
  7961. const REGEXP_RESTORE_SPACE3 = /\bor\(/gi;
  7962. const REGEXP_REMOVE_SPACES3 = /([!{}:;>+([,])\s+/g;
  7963. const REGEXP_REMOVE_SEMI_COLUMNS = /;+\}/g;
  7964. // const REGEXP_REPLACE_ZERO = /(^|[^.0-9\\])(?:0?\.)?0(?:ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|ms|k?Hz|dpi|dpcm|dppx|%)(?![a-z0-9])/gi;
  7965. const REGEXP_REPLACE_ZERO_DOT = /([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi;
  7966. const REGEXP_REPLACE_4_ZEROS = /:0 0 0 0(;|\})/g;
  7967. const REGEXP_REPLACE_3_ZEROS = /:0 0 0(;|\})/g;
  7968. // const REGEXP_REPLACE_2_ZEROS = /:0 0(;|\})/g;
  7969. const REGEXP_REPLACE_1_ZERO = /(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi;
  7970. const REGEXP_REPLACE_ZERO_DOT_DECIMAL = /(:|\s)0+\.(\d+)/g;
  7971. const REGEXP_REPLACE_RGB = /rgb\s*\(\s*([0-9,\s]+)\s*\)/gi;
  7972. const REGEXP_REPLACE_BORDER_ZERO = /(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi;
  7973. const REGEXP_REPLACE_IE_OPACITY = /progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi;
  7974. const REGEXP_REPLACE_QUERY_FRACTION = /\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g;
  7975. const REGEXP_QUERY_FRACTION = /___QUERY_FRACTION___/g;
  7976. const REGEXP_REPLACE_SEMI_COLUMNS = /;;+/g;
  7977. const REGEXP_REPLACE_HASH_COLOR = /(:|\s)(#f00)(;|})/g;
  7978. const REGEXP_PRESERVED_NEWLINE = /___PRESERVED_NEWLINE___/g;
  7979. const REGEXP_REPLACE_HASH_COLOR_SHORT1 = /(:|\s)(#000080)(;|})/g;
  7980. const REGEXP_REPLACE_HASH_COLOR_SHORT2 = /(:|\s)(#808080)(;|})/g;
  7981. const REGEXP_REPLACE_HASH_COLOR_SHORT3 = /(:|\s)(#808000)(;|})/g;
  7982. const REGEXP_REPLACE_HASH_COLOR_SHORT4 = /(:|\s)(#800080)(;|})/g;
  7983. const REGEXP_REPLACE_HASH_COLOR_SHORT5 = /(:|\s)(#c0c0c0)(;|})/g;
  7984. const REGEXP_REPLACE_HASH_COLOR_SHORT6 = /(:|\s)(#008080)(;|})/g;
  7985. const REGEXP_REPLACE_HASH_COLOR_SHORT7 = /(:|\s)(#ffa500)(;|})/g;
  7986. const REGEXP_REPLACE_HASH_COLOR_SHORT8 = /(:|\s)(#800000)(;|})/g;
  7987. function processString(content = "", options = defaultOptions) {
  7988. const comments = [];
  7989. const preservedTokens = [];
  7990. let pattern;
  7991. const originalContent = content;
  7992. content = extractDataUrls(content, preservedTokens);
  7993. content = collectComments(content, comments);
  7994. preserveString(REGEXP_PRESERVE_STRING1);
  7995. preserveString(REGEXP_PRESERVE_STRING1_BIS);
  7996. preserveString(REGEXP_PRESERVE_STRING1_TER);
  7997. preserveString(REGEXP_PRESERVE_STRING2);
  7998. preserveString(REGEXP_PRESERVE_STRING2_BIS);
  7999. preserveString(REGEXP_PRESERVE_STRING2_TER);
  8000. function preserveString(pattern) {
  8001. content = content.replace(pattern, token => {
  8002. const quote = token.substring(0, 1);
  8003. token = token.slice(1, -1);
  8004. // maybe the string contains a comment-like substring or more? put'em back then
  8005. if (token.indexOf("___PRESERVE_CANDIDATE_COMMENT_") >= 0) {
  8006. for (let i = 0, len = comments.length; i < len; i += 1) {
  8007. token = token.replace("___PRESERVE_CANDIDATE_COMMENT_" + i + "___", comments[i]);
  8008. }
  8009. }
  8010. // minify alpha opacity in filter strings
  8011. token = token.replace(REGEXP_MINIFY_ALPHA, "alpha(opacity=");
  8012. preservedTokens.push(token);
  8013. return quote + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___" + quote;
  8014. });
  8015. }
  8016. // strings are safe, now wrestle the comments
  8017. for (let i = 0, len = comments.length; i < len; i += 1) {
  8018. const token = comments[i];
  8019. const placeholder = "___PRESERVE_CANDIDATE_COMMENT_" + i + "___";
  8020. // ! in the first position of the comment means preserve
  8021. // so push to the preserved tokens keeping the !
  8022. if (token.charAt(0) === "!") {
  8023. if (options.cuteComments) {
  8024. preservedTokens.push(token.substring(1).replace(REGEXP_PRESERVE_TOKEN1, "\n"));
  8025. } else if (options.uglyComments) {
  8026. preservedTokens.push(token.substring(1).replace(REGEXP_PRESERVE_TOKEN2, ""));
  8027. } else {
  8028. preservedTokens.push(token);
  8029. }
  8030. content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
  8031. continue;
  8032. }
  8033. // \ in the last position looks like hack for Mac/IE5
  8034. // shorten that to /*\*/ and the next one to /**/
  8035. if (token.charAt(token.length - 1) === "\\") {
  8036. preservedTokens.push("\\");
  8037. content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
  8038. i = i + 1; // attn: advancing the loop
  8039. preservedTokens.push("");
  8040. content = content.replace(
  8041. "___PRESERVE_CANDIDATE_COMMENT_" + i + "___",
  8042. ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___"
  8043. );
  8044. continue;
  8045. }
  8046. // keep empty comments after child selectors (IE7 hack)
  8047. // e.g. html >/**/ body
  8048. if (token.length === 0) {
  8049. const startIndex = content.indexOf(placeholder);
  8050. if (startIndex > 2) {
  8051. if (content.charAt(startIndex - 3) === ">") {
  8052. preservedTokens.push("");
  8053. content = content.replace(placeholder, ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
  8054. }
  8055. }
  8056. }
  8057. // in all other cases kill the comment
  8058. content = content.replace(`/*${placeholder}*/`, "");
  8059. }
  8060. // parse simple @variables blocks and remove them
  8061. if (options.expandVars) {
  8062. const vars = {};
  8063. pattern = REGEXP_VARIABLES;
  8064. content = content.replace(pattern, (_, f1) => {
  8065. pattern = REGEXP_VARIABLE;
  8066. f1.replace(pattern, (_, f1, f2) => {
  8067. if (f1 && f2) {
  8068. vars[f1] = f2;
  8069. }
  8070. return "";
  8071. });
  8072. return "";
  8073. });
  8074. // replace var(x) with the value of x
  8075. pattern = REGEXP_VARIABLE_VALUE;
  8076. content = content.replace(pattern, (_, f1) => {
  8077. return vars[f1] || "none";
  8078. });
  8079. }
  8080. // normalize all whitespace strings to single spaces. Easier to work with that way.
  8081. content = content.replace(REGEXP_WHITE_SPACES, " ");
  8082. // preserve formulas in calc() before removing spaces
  8083. pattern = REGEXP_PRESERVE_CALC;
  8084. content = content.replace(pattern, (_, f1) => {
  8085. preservedTokens.push(
  8086. "calc(" +
  8087. f1.replace(REGEXP_TRIM, "")
  8088. .replace(REGEXP_PRESERVE_CALC2, "(")
  8089. .replace(REGEXP_PRESERVE_CALC3, ")") +
  8090. ")"
  8091. );
  8092. return ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
  8093. });
  8094. // preserve matrix
  8095. pattern = REGEXP_PRESERVE_MATRIX;
  8096. content = content.replace(pattern, (_, f1) => {
  8097. preservedTokens.push(f1);
  8098. return "filter:progid:DXImageTransform.Microsoft.Matrix(" + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___);";
  8099. });
  8100. // remove the spaces before the things that should not have spaces before them.
  8101. // but, be careful not to turn 'p :link {...}' into 'p:link{...}'
  8102. // swap out any pseudo-class colons with the token, and then swap back.
  8103. try {
  8104. pattern = REGEXP_REMOVE_SPACES;
  8105. content = content.replace(pattern, token => token.replace(REGEXP_COLUMN, "___PSEUDOCLASSCOLON___"));
  8106. } catch (_error) {
  8107. // ignored
  8108. }
  8109. // remove spaces before the things that should not have spaces before them.
  8110. content = content.replace(REGEXP_REMOVE_SPACES2, "$1");
  8111. content = content.replace(REGEXP_REMOVE_SPACES2_BIS, "$1$2");
  8112. // restore spaces for !important
  8113. content = content.replace(REGEXP_RESTORE_SPACE_IMPORTANT, " !important");
  8114. // bring back the colon
  8115. content = content.replace(REGEXP_PSEUDOCLASSCOLON, ":");
  8116. // preserve 0 followed by a time unit for properties using time units
  8117. pattern = REGEXP_PRESERVE_ZERO_UNIT;
  8118. content = content.replace(pattern, (_, f1, f2) => {
  8119. f2 = f2.replace(REGEXP_PRESERVE_ZERO_UNIT1, (_, g1, g2) => {
  8120. preservedTokens.push("0" + g2);
  8121. return g1 + ___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___";
  8122. });
  8123. return f1 + ":" + f2;
  8124. });
  8125. // preserve unit for flex-basis within flex and flex-basis (ie10 bug)
  8126. pattern = REGEXP_PRESERVE_FLEX;
  8127. content = content.replace(pattern, (_, f1, f2) => {
  8128. let f2b = f2.split(REGEXP_SPACES);
  8129. preservedTokens.push(f2b.pop());
  8130. f2b.push(___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
  8131. f2b = f2b.join(" ");
  8132. return `${f1}:${f2b}`;
  8133. });
  8134. // preserve 0% in hsl and hsla color definitions
  8135. content = content.replace(REGEXP_PRESERVE_HSLA, (_, f1, f2) => {
  8136. const f0 = [];
  8137. f2.split(",").forEach(part => {
  8138. part = part.replace(REGEXP_PRESERVE_HSLA1, "");
  8139. if (part === "0%") {
  8140. preservedTokens.push("0%");
  8141. f0.push(___PRESERVED_TOKEN_ + (preservedTokens.length - 1) + "___");
  8142. } else {
  8143. f0.push(part);
  8144. }
  8145. });
  8146. return f1 + "(" + f0.join(",") + ")";
  8147. });
  8148. // preserve 0 followed by unit in keyframes steps (WIP)
  8149. content = keyframes(content, preservedTokens);
  8150. // retain space for special IE6 cases
  8151. content = content.replace(REGEXP_RETAIN_SPACE_IE6, (_, f1, f2) => ":first-" + f1.toLowerCase() + " " + f2);
  8152. // newlines before and after the end of a preserved comment
  8153. if (options.cuteComments) {
  8154. content = content.replace(REGEXP_NEWLINE1, "___PRESERVED_NEWLINE___/*");
  8155. content = content.replace(REGEXP_NEWLINE2, "*/___PRESERVED_NEWLINE___");
  8156. // no space after the end of a preserved comment
  8157. } else {
  8158. content = content.replace(REGEXP_NEWLINE2, "*/");
  8159. }
  8160. // If there are multiple @charset directives, push them to the top of the file.
  8161. pattern = REGEXP_CHARSET;
  8162. content = content.replace(pattern, (_, f1, f2, f3) => f2.toLowerCase() + f3 + f1);
  8163. // When all @charset are at the top, remove the second and after (as they are completely ignored).
  8164. pattern = REGEXP_REMOVE_SECOND_CHARSET;
  8165. content = content.replace(pattern, (_, __, f2, f3, f4) => f2 + f3.toLowerCase() + f4);
  8166. // lowercase some popular @directives (@charset is done right above)
  8167. pattern = REGEXP_LOWERCASE_DIRECTIVES;
  8168. content = content.replace(pattern, (_, f1) => "@" + f1.toLowerCase());
  8169. // lowercase some more common pseudo-elements
  8170. pattern = REGEXP_LOWERCASE_PSEUDO_ELEMENTS;
  8171. content = content.replace(pattern, (_, f1) => ":" + f1.toLowerCase());
  8172. // if there is a @charset, then only allow one, and push to the top of the file.
  8173. content = content.replace(REGEXP_CHARSET2, "$2$1");
  8174. content = content.replace(REGEXP_CHARSET3, "$1");
  8175. // lowercase some more common functions
  8176. pattern = REGEXP_LOWERCASE_FUNCTIONS;
  8177. content = content.replace(pattern, (_, f1) => ":" + f1.toLowerCase() + "(");
  8178. // lower case some common function that can be values
  8179. // NOTE: rgb() isn't useful as we replace with #hex later, as well as and() is already done for us right after this
  8180. pattern = REGEXP_LOWERCASE_FUNCTIONS2;
  8181. content = content.replace(pattern, (_, f1, f2) => f1 + f2.toLowerCase());
  8182. // put the space back in some cases, to support stuff like
  8183. // @media screen and (-webkit-min-device-pixel-ratio:0){
  8184. content = content.replace(REGEXP_RESTORE_SPACE1, "and (");
  8185. content = content.replace(REGEXP_RESTORE_SPACE2, "$1not (");
  8186. content = content.replace(REGEXP_RESTORE_SPACE3, "or (");
  8187. // remove the spaces after the things that should not have spaces after them.
  8188. content = content.replace(REGEXP_REMOVE_SPACES3, "$1");
  8189. // remove unnecessary semicolons
  8190. content = content.replace(REGEXP_REMOVE_SEMI_COLUMNS, "}");
  8191. // replace 0(px,em,%) with 0.
  8192. // content = content.replace(REGEXP_REPLACE_ZERO, "$10");
  8193. // Replace x.0(px,em,%) with x(px,em,%).
  8194. content = content.replace(REGEXP_REPLACE_ZERO_DOT, "$1$2");
  8195. // replace 0 0 0 0; with 0.
  8196. content = content.replace(REGEXP_REPLACE_4_ZEROS, ":0$1");
  8197. content = content.replace(REGEXP_REPLACE_3_ZEROS, ":0$1");
  8198. // content = content.replace(REGEXP_REPLACE_2_ZEROS, ":0$1");
  8199. // replace background-position:0; with background-position:0 0;
  8200. // same for transform-origin and box-shadow
  8201. pattern = REGEXP_REPLACE_1_ZERO;
  8202. content = content.replace(pattern, (_, f1, f2) => f1.toLowerCase() + ":0 0" + f2);
  8203. // replace 0.6 to .6, but only when preceded by : or a white-space
  8204. content = content.replace(REGEXP_REPLACE_ZERO_DOT_DECIMAL, "$1.$2");
  8205. // shorten colors from rgb(51,102,153) to #336699
  8206. // this makes it more likely that it'll get further compressed in the next step.
  8207. pattern = REGEXP_REPLACE_RGB;
  8208. content = content.replace(pattern, (_, f1) => {
  8209. const rgbcolors = f1.split(",");
  8210. let hexcolor = "#";
  8211. for (let i = 0; i < rgbcolors.length; i += 1) {
  8212. let val = parseInt(rgbcolors[i], 10);
  8213. if (val < 16) {
  8214. hexcolor += "0";
  8215. }
  8216. if (val > 255) {
  8217. val = 255;
  8218. }
  8219. hexcolor += val.toString(16);
  8220. }
  8221. return hexcolor;
  8222. });
  8223. // Shorten colors from #AABBCC to #ABC.
  8224. content = compressHexColors(content);
  8225. // Replace #f00 -> red
  8226. content = content.replace(REGEXP_REPLACE_HASH_COLOR, "$1red$3");
  8227. // Replace other short color keywords
  8228. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT1, "$1navy$3");
  8229. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT2, "$1gray$3");
  8230. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT3, "$1olive$3");
  8231. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT4, "$1purple$3");
  8232. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT5, "$1silver$3");
  8233. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT6, "$1teal$3");
  8234. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT7, "$1orange$3");
  8235. content = content.replace(REGEXP_REPLACE_HASH_COLOR_SHORT8, "$1maroon$3");
  8236. // border: none -> border:0
  8237. pattern = REGEXP_REPLACE_BORDER_ZERO;
  8238. content = content.replace(pattern, (_, f1, f2) => f1.toLowerCase() + ":0" + f2);
  8239. // shorter opacity IE filter
  8240. content = content.replace(REGEXP_REPLACE_IE_OPACITY, "alpha(opacity=");
  8241. // Find a fraction that is used for Opera's -o-device-pixel-ratio query
  8242. // Add token to add the '\' back in later
  8243. content = content.replace(REGEXP_REPLACE_QUERY_FRACTION, "($1:$2___QUERY_FRACTION___$3)");
  8244. // remove empty rules.
  8245. // content = content.replace(REGEXP_EMPTY_RULES, "");
  8246. // Add '\' back to fix Opera -o-device-pixel-ratio query
  8247. content = content.replace(REGEXP_QUERY_FRACTION, "/");
  8248. // some source control tools don't like it when files containing lines longer
  8249. // than, say 8000 characters, are checked in. The linebreak option is used in
  8250. // that case to split long lines after a specific column.
  8251. if (options.maxLineLen > 0) {
  8252. const lines = [];
  8253. let line = [];
  8254. for (let i = 0, len = content.length; i < len; i += 1) {
  8255. const ch = content.charAt(i);
  8256. line.push(ch);
  8257. if (ch === "}" && line.length > options.maxLineLen) {
  8258. lines.push(line.join(""));
  8259. line = [];
  8260. }
  8261. }
  8262. if (line.length) {
  8263. lines.push(line.join(""));
  8264. }
  8265. content = lines.join("\n");
  8266. }
  8267. // replace multiple semi-colons in a row by a single one
  8268. // see SF bug #1980989
  8269. content = content.replace(REGEXP_REPLACE_SEMI_COLUMNS, ";");
  8270. // trim the final string (for any leading or trailing white spaces)
  8271. content = content.replace(REGEXP_TRIM, "");
  8272. if (preservedTokens.length > 1000) {
  8273. return originalContent;
  8274. }
  8275. // restore preserved tokens
  8276. for (let i = preservedTokens.length - 1; i >= 0; i--) {
  8277. content = content.replace(___PRESERVED_TOKEN_ + i + "___", preservedTokens[i], "g");
  8278. }
  8279. // restore preserved newlines
  8280. content = content.replace(REGEXP_PRESERVED_NEWLINE, "\n");
  8281. // return
  8282. return content;
  8283. }
  8284. var cssMinifier = /*#__PURE__*/Object.freeze({
  8285. __proto__: null,
  8286. defaultOptions: defaultOptions,
  8287. processString: processString
  8288. });
  8289. /*
  8290. * The MIT License (MIT)
  8291. *
  8292. * Author: Gildas Lormeau
  8293. *
  8294. * Permission is hereby granted, free of charge, to any person obtaining a copy
  8295. * of this software and associated documentation files (the "Software"), to deal
  8296. * in the Software without restriction, including without limitation the rights
  8297. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8298. * copies of the Software, and to permit persons to whom the Software is
  8299. * furnished to do so, subject to the following conditions:
  8300. *
  8301. * The above copyright notice and this permission notice shall be included in all
  8302. * copies or substantial portions of the Software.
  8303. *
  8304. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8305. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8306. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  8307. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  8308. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  8309. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  8310. * SOFTWARE.
  8311. */
  8312. // 1. Let input be the value passed to this algorithm.
  8313. function process$6(input) {
  8314. // UTILITY FUNCTIONS
  8315. // Manual is faster than RegEx
  8316. // http://bjorn.tipling.com/state-and-regular-expressions-in-javascript
  8317. // http://jsperf.com/whitespace-character/5
  8318. function isSpace(c) {
  8319. return (c === "\u0020" || // space
  8320. c === "\u0009" || // horizontal tab
  8321. c === "\u000A" || // new line
  8322. c === "\u000C" || // form feed
  8323. c === "\u000D"); // carriage return
  8324. }
  8325. function collectCharacters(regEx) {
  8326. let chars;
  8327. const match = regEx.exec(input.substring(pos));
  8328. if (match) {
  8329. chars = match[0];
  8330. pos += chars.length;
  8331. return chars;
  8332. }
  8333. }
  8334. const inputLength = input.length;
  8335. // (Don"t use \s, to avoid matching non-breaking space)
  8336. /* eslint-disable no-control-regex */
  8337. const regexLeadingSpaces = /^[ \t\n\r\u000c]+/;
  8338. const regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/;
  8339. const regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/;
  8340. const regexTrailingCommas = /[,]+$/;
  8341. const regexNonNegativeInteger = /^\d+$/;
  8342. /* eslint-enable no-control-regex */
  8343. // ( Positive or negative or unsigned integers or decimals, without or without exponents.
  8344. // Must include at least one digit.
  8345. // According to spec tests any decimal point must be followed by a digit.
  8346. // No leading plus sign is allowed.)
  8347. // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
  8348. const regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
  8349. let url, descriptors, currentDescriptor, state, c,
  8350. // 2. Let position be a pointer into input, initially pointing at the start
  8351. // of the string.
  8352. pos = 0;
  8353. // 3. Let candidates be an initially empty source set.
  8354. const candidates = [];
  8355. // 4. Splitting loop: Collect a sequence of characters that are space
  8356. // characters or U+002C COMMA characters. If any U+002C COMMA characters
  8357. // were collected, that is a parse error.
  8358. while (true) { // eslint-disable-line no-constant-condition
  8359. collectCharacters(regexLeadingCommasOrSpaces);
  8360. // 5. If position is past the end of input, return candidates and abort these steps.
  8361. if (pos >= inputLength) {
  8362. return candidates; // (we"re done, this is the sole return path)
  8363. }
  8364. // 6. Collect a sequence of characters that are not space characters,
  8365. // and let that be url.
  8366. url = collectCharacters(regexLeadingNotSpaces);
  8367. // 7. Let descriptors be a new empty list.
  8368. descriptors = [];
  8369. // 8. If url ends with a U+002C COMMA character (,), follow these substeps:
  8370. // (1). Remove all trailing U+002C COMMA characters from url. If this removed
  8371. // more than one character, that is a parse error.
  8372. if (url.slice(-1) === ",") {
  8373. url = url.replace(regexTrailingCommas, "");
  8374. // (Jump ahead to step 9 to skip tokenization and just push the candidate).
  8375. parseDescriptors();
  8376. // Otherwise, follow these substeps:
  8377. } else {
  8378. tokenize();
  8379. } // (close else of step 8)
  8380. // 16. Return to the step labeled splitting loop.
  8381. } // (Close of big while loop.)
  8382. /**
  8383. * Tokenizes descriptor properties prior to parsing
  8384. * Returns undefined.
  8385. */
  8386. function tokenize() {
  8387. // 8.1. Descriptor tokeniser: Skip whitespace
  8388. collectCharacters(regexLeadingSpaces);
  8389. // 8.2. Let current descriptor be the empty string.
  8390. currentDescriptor = "";
  8391. // 8.3. Let state be in descriptor.
  8392. state = "in descriptor";
  8393. while (true) { // eslint-disable-line no-constant-condition
  8394. // 8.4. Let c be the character at position.
  8395. c = input.charAt(pos);
  8396. // Do the following depending on the value of state.
  8397. // For the purpose of this step, "EOF" is a special character representing
  8398. // that position is past the end of input.
  8399. // In descriptor
  8400. if (state === "in descriptor") {
  8401. // Do the following, depending on the value of c:
  8402. // Space character
  8403. // If current descriptor is not empty, append current descriptor to
  8404. // descriptors and let current descriptor be the empty string.
  8405. // Set state to after descriptor.
  8406. if (isSpace(c)) {
  8407. if (currentDescriptor) {
  8408. descriptors.push(currentDescriptor);
  8409. currentDescriptor = "";
  8410. state = "after descriptor";
  8411. }
  8412. // U+002C COMMA (,)
  8413. // Advance position to the next character in input. If current descriptor
  8414. // is not empty, append current descriptor to descriptors. Jump to the step
  8415. // labeled descriptor parser.
  8416. } else if (c === ",") {
  8417. pos += 1;
  8418. if (currentDescriptor) {
  8419. descriptors.push(currentDescriptor);
  8420. }
  8421. parseDescriptors();
  8422. return;
  8423. // U+0028 LEFT PARENTHESIS (()
  8424. // Append c to current descriptor. Set state to in parens.
  8425. } else if (c === "\u0028") {
  8426. currentDescriptor = currentDescriptor + c;
  8427. state = "in parens";
  8428. // EOF
  8429. // If current descriptor is not empty, append current descriptor to
  8430. // descriptors. Jump to the step labeled descriptor parser.
  8431. } else if (c === "") {
  8432. if (currentDescriptor) {
  8433. descriptors.push(currentDescriptor);
  8434. }
  8435. parseDescriptors();
  8436. return;
  8437. // Anything else
  8438. // Append c to current descriptor.
  8439. } else {
  8440. currentDescriptor = currentDescriptor + c;
  8441. }
  8442. // (end "in descriptor"
  8443. // In parens
  8444. } else if (state === "in parens") {
  8445. // U+0029 RIGHT PARENTHESIS ())
  8446. // Append c to current descriptor. Set state to in descriptor.
  8447. if (c === ")") {
  8448. currentDescriptor = currentDescriptor + c;
  8449. state = "in descriptor";
  8450. // EOF
  8451. // Append current descriptor to descriptors. Jump to the step labeled
  8452. // descriptor parser.
  8453. } else if (c === "") {
  8454. descriptors.push(currentDescriptor);
  8455. parseDescriptors();
  8456. return;
  8457. // Anything else
  8458. // Append c to current descriptor.
  8459. } else {
  8460. currentDescriptor = currentDescriptor + c;
  8461. }
  8462. // After descriptor
  8463. } else if (state === "after descriptor") {
  8464. // Do the following, depending on the value of c:
  8465. // Space character: Stay in this state.
  8466. if (isSpace(c)) ; else if (c === "") {
  8467. parseDescriptors();
  8468. return;
  8469. // Anything else
  8470. // Set state to in descriptor. Set position to the previous character in input.
  8471. } else {
  8472. state = "in descriptor";
  8473. pos -= 1;
  8474. }
  8475. }
  8476. // Advance position to the next character in input.
  8477. pos += 1;
  8478. // Repeat this step.
  8479. } // (close while true loop)
  8480. }
  8481. /**
  8482. * Adds descriptor properties to a candidate, pushes to the candidates array
  8483. * @return undefined
  8484. */
  8485. // Declared outside of the while loop so that it"s only created once.
  8486. function parseDescriptors() {
  8487. // 9. Descriptor parser: Let error be no.
  8488. let pError = false,
  8489. // 10. Let width be absent.
  8490. // 11. Let density be absent.
  8491. // 12. Let future-compat-h be absent. (We"re implementing it now as h)
  8492. w, d, h, i,
  8493. desc, lastChar, value, intVal, floatVal;
  8494. const candidate = {};
  8495. // 13. For each descriptor in descriptors, run the appropriate set of steps
  8496. // from the following list:
  8497. for (i = 0; i < descriptors.length; i++) {
  8498. desc = descriptors[i];
  8499. lastChar = desc[desc.length - 1];
  8500. value = desc.substring(0, desc.length - 1);
  8501. intVal = parseInt(value, 10);
  8502. floatVal = parseFloat(value);
  8503. // If the descriptor consists of a valid non-negative integer followed by
  8504. // a U+0077 LATIN SMALL LETTER W character
  8505. if (regexNonNegativeInteger.test(value) && (lastChar === "w")) {
  8506. // If width and density are not both absent, then let error be yes.
  8507. if (w || d) { pError = true; }
  8508. // Apply the rules for parsing non-negative integers to the descriptor.
  8509. // If the result is zero, let error be yes.
  8510. // Otherwise, let width be the result.
  8511. if (intVal === 0) { pError = true; } else { w = intVal; }
  8512. // If the descriptor consists of a valid floating-point number followed by
  8513. // a U+0078 LATIN SMALL LETTER X character
  8514. } else if (regexFloatingPoint.test(value) && (lastChar === "x")) {
  8515. // If width, density and future-compat-h are not all absent, then let error
  8516. // be yes.
  8517. if (w || d || h) { pError = true; }
  8518. // Apply the rules for parsing floating-point number values to the descriptor.
  8519. // If the result is less than zero, let error be yes. Otherwise, let density
  8520. // be the result.
  8521. if (floatVal < 0) { pError = true; } else { d = floatVal; }
  8522. // If the descriptor consists of a valid non-negative integer followed by
  8523. // a U+0068 LATIN SMALL LETTER H character
  8524. } else if (regexNonNegativeInteger.test(value) && (lastChar === "h")) {
  8525. // If height and density are not both absent, then let error be yes.
  8526. if (h || d) { pError = true; }
  8527. // Apply the rules for parsing non-negative integers to the descriptor.
  8528. // If the result is zero, let error be yes. Otherwise, let future-compat-h
  8529. // be the result.
  8530. if (intVal === 0) { pError = true; } else { h = intVal; }
  8531. // Anything else, Let error be yes.
  8532. } else { pError = true; }
  8533. } // (close step 13 for loop)
  8534. // 15. If error is still no, then append a new image source to candidates whose
  8535. // URL is url, associated with a width width if not absent and a pixel
  8536. // density density if not absent. Otherwise, there is a parse error.
  8537. if (!pError) {
  8538. candidate.url = url;
  8539. if (w) { candidate.w = w; }
  8540. if (d) { candidate.d = d; }
  8541. if (h) { candidate.h = h; }
  8542. candidates.push(candidate);
  8543. } else if (console && console.log) { // eslint-disable-line no-console
  8544. console.log("Invalid srcset descriptor found in \"" + input + "\" at \"" + desc + "\"."); // eslint-disable-line no-console
  8545. }
  8546. } // (close parseDescriptors fn)
  8547. }
  8548. var htmlSrcsetParser = /*#__PURE__*/Object.freeze({
  8549. __proto__: null,
  8550. process: process$6
  8551. });
  8552. /*
  8553. * The MIT License (MIT)
  8554. *
  8555. * Author: Gildas Lormeau
  8556. *
  8557. * Permission is hereby granted, free of charge, to any person obtaining a copy
  8558. * of this software and associated documentation files (the "Software"), to deal
  8559. * in the Software without restriction, including without limitation the rights
  8560. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8561. * copies of the Software, and to permit persons to whom the Software is
  8562. * furnished to do so, subject to the following conditions:
  8563. *
  8564. * The above copyright notice and this permission notice shall be included in all
  8565. * copies or substantial portions of the Software.
  8566. *
  8567. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8568. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8569. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  8570. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  8571. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  8572. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  8573. * SOFTWARE.
  8574. */
  8575. // derived from https://github.com/jsdom/whatwg-mimetype
  8576. /*
  8577. * Copyright © 2017–2018 Domenic Denicola <d@domenic.me>
  8578. *
  8579. * Permission is hereby granted, free of charge, to any person obtaining a copy
  8580. * of this software and associated documentation files (the "Software"), to deal
  8581. * in the Software without restriction, including without limitation the rights
  8582. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8583. * copies of the Software, and to permit persons to whom the Software is
  8584. * furnished to do so, subject to the following conditions:
  8585. * The above copyright notice and this permission notice shall be included in all
  8586. * copies or substantial portions of the Software.
  8587. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  8588. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  8589. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  8590. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  8591. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  8592. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  8593. * SOFTWARE.
  8594. */
  8595. let utils, parser, serializer, MIMEType;
  8596. // lib/utils.js
  8597. {
  8598. utils = {};
  8599. utils.removeLeadingAndTrailingHTTPWhitespace = string => {
  8600. return string.replace(/^[ \t\n\r]+/, "").replace(/[ \t\n\r]+$/, "");
  8601. };
  8602. utils.removeTrailingHTTPWhitespace = string => {
  8603. return string.replace(/[ \t\n\r]+$/, "");
  8604. };
  8605. utils.isHTTPWhitespaceChar = char => {
  8606. return char === " " || char === "\t" || char === "\n" || char === "\r";
  8607. };
  8608. utils.solelyContainsHTTPTokenCodePoints = string => {
  8609. return /^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(string);
  8610. };
  8611. utils.soleyContainsHTTPQuotedStringTokenCodePoints = string => {
  8612. return /^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(string);
  8613. };
  8614. utils.asciiLowercase = string => {
  8615. return string.replace(/[A-Z]/g, l => l.toLowerCase());
  8616. };
  8617. // This variant only implements it with the extract-value flag set.
  8618. utils.collectAnHTTPQuotedString = (input, position) => {
  8619. let value = "";
  8620. position++;
  8621. // eslint-disable-next-line no-constant-condition
  8622. while (true) {
  8623. while (position < input.length && input[position] !== "\"" && input[position] !== "\\") {
  8624. value += input[position];
  8625. ++position;
  8626. }
  8627. if (position >= input.length) {
  8628. break;
  8629. }
  8630. const quoteOrBackslash = input[position];
  8631. ++position;
  8632. if (quoteOrBackslash === "\\") {
  8633. if (position >= input.length) {
  8634. value += "\\";
  8635. break;
  8636. }
  8637. value += input[position];
  8638. ++position;
  8639. } else {
  8640. break;
  8641. }
  8642. }
  8643. return [value, position];
  8644. };
  8645. }
  8646. // lib/serializer.js
  8647. {
  8648. const { solelyContainsHTTPTokenCodePoints } = utils;
  8649. serializer = mimeType => {
  8650. let serialization = `${mimeType.type}/${mimeType.subtype}`;
  8651. if (mimeType.parameters.size === 0) {
  8652. return serialization;
  8653. }
  8654. for (let [name, value] of mimeType.parameters) {
  8655. serialization += ";";
  8656. serialization += name;
  8657. serialization += "=";
  8658. if (!solelyContainsHTTPTokenCodePoints(value) || value.length === 0) {
  8659. value = value.replace(/(["\\])/g, "\\$1");
  8660. value = `"${value}"`;
  8661. }
  8662. serialization += value;
  8663. }
  8664. return serialization;
  8665. };
  8666. }
  8667. // lib/parser.js
  8668. {
  8669. const {
  8670. removeLeadingAndTrailingHTTPWhitespace,
  8671. removeTrailingHTTPWhitespace,
  8672. isHTTPWhitespaceChar,
  8673. solelyContainsHTTPTokenCodePoints,
  8674. soleyContainsHTTPQuotedStringTokenCodePoints,
  8675. asciiLowercase,
  8676. collectAnHTTPQuotedString
  8677. } = utils;
  8678. parser = input => {
  8679. input = removeLeadingAndTrailingHTTPWhitespace(input);
  8680. let position = 0;
  8681. let type = "";
  8682. while (position < input.length && input[position] !== "/") {
  8683. type += input[position];
  8684. ++position;
  8685. }
  8686. if (type.length === 0 || !solelyContainsHTTPTokenCodePoints(type)) {
  8687. return null;
  8688. }
  8689. if (position >= input.length) {
  8690. return null;
  8691. }
  8692. // Skips past "/"
  8693. ++position;
  8694. let subtype = "";
  8695. while (position < input.length && input[position] !== ";") {
  8696. subtype += input[position];
  8697. ++position;
  8698. }
  8699. subtype = removeTrailingHTTPWhitespace(subtype);
  8700. if (subtype.length === 0 || !solelyContainsHTTPTokenCodePoints(subtype)) {
  8701. return null;
  8702. }
  8703. const mimeType = {
  8704. type: asciiLowercase(type),
  8705. subtype: asciiLowercase(subtype),
  8706. parameters: new Map()
  8707. };
  8708. while (position < input.length) {
  8709. // Skip past ";"
  8710. ++position;
  8711. while (isHTTPWhitespaceChar(input[position])) {
  8712. ++position;
  8713. }
  8714. let parameterName = "";
  8715. while (position < input.length && input[position] !== ";" && input[position] !== "=") {
  8716. parameterName += input[position];
  8717. ++position;
  8718. }
  8719. parameterName = asciiLowercase(parameterName);
  8720. if (position < input.length) {
  8721. if (input[position] === ";") {
  8722. continue;
  8723. }
  8724. // Skip past "="
  8725. ++position;
  8726. }
  8727. let parameterValue = null;
  8728. if (input[position] === "\"") {
  8729. [parameterValue, position] = collectAnHTTPQuotedString(input, position);
  8730. while (position < input.length && input[position] !== ";") {
  8731. ++position;
  8732. }
  8733. } else {
  8734. parameterValue = "";
  8735. while (position < input.length && input[position] !== ";") {
  8736. parameterValue += input[position];
  8737. ++position;
  8738. }
  8739. parameterValue = removeTrailingHTTPWhitespace(parameterValue);
  8740. if (parameterValue === "") {
  8741. continue;
  8742. }
  8743. }
  8744. if (parameterName.length > 0 &&
  8745. solelyContainsHTTPTokenCodePoints(parameterName) &&
  8746. soleyContainsHTTPQuotedStringTokenCodePoints(parameterValue) &&
  8747. !mimeType.parameters.has(parameterName)) {
  8748. mimeType.parameters.set(parameterName, parameterValue);
  8749. }
  8750. }
  8751. return mimeType;
  8752. };
  8753. }
  8754. // lib/mime-type.js
  8755. {
  8756. const parse = parser;
  8757. const serialize = serializer;
  8758. const {
  8759. asciiLowercase,
  8760. solelyContainsHTTPTokenCodePoints,
  8761. soleyContainsHTTPQuotedStringTokenCodePoints
  8762. } = utils;
  8763. MIMEType = class MIMEType {
  8764. constructor(string) {
  8765. string = String(string);
  8766. const result = parse(string);
  8767. if (result === null) {
  8768. throw new Error(`Could not parse MIME type string "${string}"`);
  8769. }
  8770. this._type = result.type;
  8771. this._subtype = result.subtype;
  8772. this._parameters = new MIMETypeParameters(result.parameters);
  8773. }
  8774. static parse(string) {
  8775. try {
  8776. return new this(string);
  8777. } catch (e) {
  8778. return null;
  8779. }
  8780. }
  8781. get essence() {
  8782. return `${this.type}/${this.subtype}`;
  8783. }
  8784. get type() {
  8785. return this._type;
  8786. }
  8787. set type(value) {
  8788. value = asciiLowercase(String(value));
  8789. if (value.length === 0) {
  8790. throw new Error("Invalid type: must be a non-empty string");
  8791. }
  8792. if (!solelyContainsHTTPTokenCodePoints(value)) {
  8793. throw new Error(`Invalid type ${value}: must contain only HTTP token code points`);
  8794. }
  8795. this._type = value;
  8796. }
  8797. get subtype() {
  8798. return this._subtype;
  8799. }
  8800. set subtype(value) {
  8801. value = asciiLowercase(String(value));
  8802. if (value.length === 0) {
  8803. throw new Error("Invalid subtype: must be a non-empty string");
  8804. }
  8805. if (!solelyContainsHTTPTokenCodePoints(value)) {
  8806. throw new Error(`Invalid subtype ${value}: must contain only HTTP token code points`);
  8807. }
  8808. this._subtype = value;
  8809. }
  8810. get parameters() {
  8811. return this._parameters;
  8812. }
  8813. toString() {
  8814. // The serialize function works on both "MIME type records" (i.e. the results of parse) and on this class, since
  8815. // this class's interface is identical.
  8816. return serialize(this);
  8817. }
  8818. isJavaScript({ allowParameters = false } = {}) {
  8819. switch (this._type) {
  8820. case "text": {
  8821. switch (this._subtype) {
  8822. case "ecmascript":
  8823. case "javascript":
  8824. case "javascript1.0":
  8825. case "javascript1.1":
  8826. case "javascript1.2":
  8827. case "javascript1.3":
  8828. case "javascript1.4":
  8829. case "javascript1.5":
  8830. case "jscript":
  8831. case "livescript":
  8832. case "x-ecmascript":
  8833. case "x-javascript": {
  8834. return allowParameters || this._parameters.size === 0;
  8835. }
  8836. default: {
  8837. return false;
  8838. }
  8839. }
  8840. }
  8841. case "application": {
  8842. switch (this._subtype) {
  8843. case "ecmascript":
  8844. case "javascript":
  8845. case "x-ecmascript":
  8846. case "x-javascript": {
  8847. return allowParameters || this._parameters.size === 0;
  8848. }
  8849. default: {
  8850. return false;
  8851. }
  8852. }
  8853. }
  8854. default: {
  8855. return false;
  8856. }
  8857. }
  8858. }
  8859. isXML() {
  8860. return (this._subtype === "xml" && (this._type === "text" || this._type === "application")) ||
  8861. this._subtype.endsWith("+xml");
  8862. }
  8863. isHTML() {
  8864. return this._subtype === "html" && this._type === "text";
  8865. }
  8866. };
  8867. class MIMETypeParameters {
  8868. constructor(map) {
  8869. this._map = map;
  8870. }
  8871. get size() {
  8872. return this._map.size;
  8873. }
  8874. get(name) {
  8875. name = asciiLowercase(String(name));
  8876. return this._map.get(name);
  8877. }
  8878. has(name) {
  8879. name = asciiLowercase(String(name));
  8880. return this._map.has(name);
  8881. }
  8882. set(name, value) {
  8883. name = asciiLowercase(String(name));
  8884. value = String(value);
  8885. if (!solelyContainsHTTPTokenCodePoints(name)) {
  8886. throw new Error(`Invalid MIME type parameter name "${name}": only HTTP token code points are valid.`);
  8887. }
  8888. if (!soleyContainsHTTPQuotedStringTokenCodePoints(value)) {
  8889. throw new Error(`Invalid MIME type parameter value "${value}": only HTTP quoted-string token code points are valid.`);
  8890. }
  8891. return this._map.set(name, value);
  8892. }
  8893. clear() {
  8894. this._map.clear();
  8895. }
  8896. delete(name) {
  8897. name = asciiLowercase(String(name));
  8898. return this._map.delete(name);
  8899. }
  8900. forEach(callbackFn, thisArg) {
  8901. this._map.forEach(callbackFn, thisArg);
  8902. }
  8903. keys() {
  8904. return this._map.keys();
  8905. }
  8906. values() {
  8907. return this._map.values();
  8908. }
  8909. entries() {
  8910. return this._map.entries();
  8911. }
  8912. [Symbol.iterator]() {
  8913. return this._map[Symbol.iterator]();
  8914. }
  8915. }
  8916. }
  8917. /*
  8918. * Copyright 2010-2022 Gildas Lormeau
  8919. * contact : gildas.lormeau <at> gmail.com
  8920. *
  8921. * This file is part of SingleFile.
  8922. *
  8923. * The code in this file is free software: you can redistribute it and/or
  8924. * modify it under the terms of the GNU Affero General Public License
  8925. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  8926. * of the License, or (at your option) any later version.
  8927. *
  8928. * The code in this file is distributed in the hope that it will be useful,
  8929. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8930. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  8931. * General Public License for more details.
  8932. *
  8933. * As additional permission under GNU AGPL version 3 section 7, you may
  8934. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  8935. * AGPL normally required by section 4, provided you include this license
  8936. * notice and a URL through which recipients can access the Corresponding
  8937. * Source.
  8938. */
  8939. var index$1 = /*#__PURE__*/Object.freeze({
  8940. __proto__: null,
  8941. zip: zip$1,
  8942. fontPropertyParser: cssFontPropertyParser,
  8943. mediaQueryParser: cssMediaQueryParser,
  8944. cssMinifier: cssMinifier,
  8945. cssUnescape: cssUnescape,
  8946. srcsetParser: htmlSrcsetParser,
  8947. get MIMEType () { return MIMEType; }
  8948. });
  8949. /*
  8950. * Copyright 2010-2022 Gildas Lormeau
  8951. * contact : gildas.lormeau <at> gmail.com
  8952. *
  8953. * This file is part of SingleFile.
  8954. *
  8955. * The code in this file is free software: you can redistribute it and/or
  8956. * modify it under the terms of the GNU Affero General Public License
  8957. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  8958. * of the License, or (at your option) any later version.
  8959. *
  8960. * The code in this file is distributed in the hope that it will be useful,
  8961. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8962. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  8963. * General Public License for more details.
  8964. *
  8965. * As additional permission under GNU AGPL version 3 section 7, you may
  8966. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  8967. * AGPL normally required by section 4, provided you include this license
  8968. * notice and a URL through which recipients can access the Corresponding
  8969. * Source.
  8970. */
  8971. const helper$1 = {
  8972. normalizeFontFamily,
  8973. flatten,
  8974. getFontWeight,
  8975. removeQuotes: removeQuotes$1
  8976. };
  8977. const REGEXP_COMMA = /\s*,\s*/;
  8978. const REGEXP_DASH = /-/;
  8979. const REGEXP_QUESTION_MARK = /\?/g;
  8980. const REGEXP_STARTS_U_PLUS = /^U\+/i;
  8981. const VALID_FONT_STYLES = [/^normal$/, /^italic$/, /^oblique$/, /^oblique\s+/];
  8982. function process$5(doc, stylesheets, styles, options) {
  8983. const stats = { rules: { processed: 0, discarded: 0 }, fonts: { processed: 0, discarded: 0 } };
  8984. const fontsInfo = { declared: [], used: [] };
  8985. const workStyleElement = doc.createElement("style");
  8986. let docContent = "";
  8987. doc.body.appendChild(workStyleElement);
  8988. stylesheets.forEach(stylesheetInfo => {
  8989. const cssRules = stylesheetInfo.stylesheet.children;
  8990. if (cssRules) {
  8991. stats.processed += cssRules.size;
  8992. stats.discarded += cssRules.size;
  8993. getFontsInfo(cssRules, fontsInfo, options);
  8994. docContent = getRulesTextContent(doc, cssRules, workStyleElement, docContent);
  8995. }
  8996. });
  8997. styles.forEach(declarations => {
  8998. const fontFamilyNames = getFontFamilyNames(declarations, options);
  8999. if (fontFamilyNames.length) {
  9000. fontsInfo.used.push(fontFamilyNames);
  9001. }
  9002. docContent = getDeclarationsTextContent(declarations.children, workStyleElement, docContent);
  9003. });
  9004. workStyleElement.remove();
  9005. docContent += doc.body.innerText;
  9006. if (globalThis.getComputedStyle && options.doc) {
  9007. fontsInfo.used = fontsInfo.used.map(fontNames => fontNames.map(familyName => {
  9008. const matchedVar = familyName.match(/^var\((--.*)\)$/);
  9009. if (matchedVar && matchedVar[1]) {
  9010. const computedFamilyName = globalThis.getComputedStyle(options.doc.body).getPropertyValue(matchedVar[1]);
  9011. return (computedFamilyName && computedFamilyName.split(",").map(name => helper$1.normalizeFontFamily(name))) || familyName;
  9012. }
  9013. return familyName;
  9014. }));
  9015. fontsInfo.used = fontsInfo.used.map(fontNames => helper$1.flatten(fontNames));
  9016. }
  9017. const variableFound = fontsInfo.used.find(fontNames => fontNames.find(fontName => fontName.match(/^var\(--/)));
  9018. let unusedFonts, filteredUsedFonts;
  9019. if (variableFound) {
  9020. unusedFonts = [];
  9021. } else {
  9022. filteredUsedFonts = new Map();
  9023. fontsInfo.used.forEach(fontNames => fontNames.forEach(familyName => {
  9024. if (fontsInfo.declared.find(fontInfo => fontInfo.fontFamily == familyName)) {
  9025. const optionalData = options.usedFonts && options.usedFonts.filter(fontInfo => fontInfo[0] == familyName);
  9026. if (optionalData && optionalData.length) {
  9027. filteredUsedFonts.set(familyName, optionalData);
  9028. }
  9029. }
  9030. }));
  9031. unusedFonts = fontsInfo.declared.filter(fontInfo => !filteredUsedFonts.has(fontInfo.fontFamily));
  9032. }
  9033. const docChars = Array.from(new Set(docContent)).map(char => char.charCodeAt(0)).sort((value1, value2) => value1 - value2);
  9034. stylesheets.forEach(stylesheetInfo => {
  9035. const cssRules = stylesheetInfo.stylesheet.children;
  9036. if (cssRules) {
  9037. filterUnusedFonts(cssRules, fontsInfo.declared, unusedFonts, filteredUsedFonts, docChars);
  9038. stats.rules.discarded -= cssRules.size;
  9039. }
  9040. });
  9041. return stats;
  9042. }
  9043. function getFontsInfo(cssRules, fontsInfo, options) {
  9044. cssRules.forEach(ruleData => {
  9045. if (ruleData.type == "Atrule" && (ruleData.name == "media" || ruleData.name == "supports" || ruleData.name == "layer") && ruleData.block && ruleData.block.children) {
  9046. getFontsInfo(ruleData.block.children, fontsInfo, options);
  9047. } else if (ruleData.type == "Rule") {
  9048. const fontFamilyNames = getFontFamilyNames(ruleData.block, options);
  9049. if (fontFamilyNames.length) {
  9050. fontsInfo.used.push(fontFamilyNames);
  9051. }
  9052. } else {
  9053. if (ruleData.type == "Atrule" && ruleData.name == "font-face") {
  9054. const fontFamily = helper$1.normalizeFontFamily(getDeclarationValue(ruleData.block.children, "font-family"));
  9055. if (fontFamily) {
  9056. const fontWeight = getDeclarationValue(ruleData.block.children, "font-weight") || "400";
  9057. const fontStyle = getDeclarationValue(ruleData.block.children, "font-style") || "normal";
  9058. const fontVariant = getDeclarationValue(ruleData.block.children, "font-variant") || "normal";
  9059. fontWeight.split(",").forEach(weightValue =>
  9060. fontsInfo.declared.push({ fontFamily, fontWeight: helper$1.getFontWeight(helper$1.removeQuotes(weightValue)), fontStyle, fontVariant }));
  9061. }
  9062. }
  9063. }
  9064. });
  9065. }
  9066. function filterUnusedFonts(cssRules, declaredFonts, unusedFonts, filteredUsedFonts, docChars) {
  9067. const removedRules = [];
  9068. for (let cssRule = cssRules.head; cssRule; cssRule = cssRule.next) {
  9069. const ruleData = cssRule.data;
  9070. if (ruleData.type == "Atrule" && ruleData.name == "import" && ruleData.prelude && ruleData.prelude.children && ruleData.prelude.children.head.data.importedChildren) {
  9071. filterUnusedFonts(ruleData.prelude.children.head.data.importedChildren, declaredFonts, unusedFonts, filteredUsedFonts, docChars);
  9072. } else if (ruleData.type == "Atrule" && (ruleData.name == "media" || ruleData.name == "supports" || ruleData.name == "layer") && ruleData.block && ruleData.block.children) {
  9073. filterUnusedFonts(ruleData.block.children, declaredFonts, unusedFonts, filteredUsedFonts, docChars);
  9074. } else if (ruleData.type == "Atrule" && ruleData.name == "font-face") {
  9075. const fontFamily = helper$1.normalizeFontFamily(getDeclarationValue(ruleData.block.children, "font-family"));
  9076. if (fontFamily) {
  9077. const unicodeRange = getDeclarationValue(ruleData.block.children, "unicode-range");
  9078. if (unusedFonts.find(fontInfo => fontInfo.fontFamily == fontFamily) || !testUnicodeRange(docChars, unicodeRange) || !testUsedFont(ruleData, fontFamily, declaredFonts, filteredUsedFonts)) {
  9079. removedRules.push(cssRule);
  9080. }
  9081. }
  9082. const removedDeclarations = [];
  9083. for (let declaration = ruleData.block.children.head; declaration; declaration = declaration.next) {
  9084. if (declaration.data.property == "font-display") {
  9085. removedDeclarations.push(declaration);
  9086. }
  9087. }
  9088. if (removedDeclarations.length) {
  9089. removedDeclarations.forEach(removedDeclaration => ruleData.block.children.remove(removedDeclaration));
  9090. }
  9091. }
  9092. }
  9093. removedRules.forEach(cssRule => cssRules.remove(cssRule));
  9094. }
  9095. function testUsedFont(ruleData, familyName, declaredFonts, filteredUsedFonts) {
  9096. let test;
  9097. const optionalUsedFonts = filteredUsedFonts && filteredUsedFonts.get(familyName);
  9098. if (optionalUsedFonts && optionalUsedFonts.length) {
  9099. let fontStyle = getDeclarationValue(ruleData.block.children, "font-style") || "normal";
  9100. if (VALID_FONT_STYLES.find(rule => fontStyle.trim().match(rule))) {
  9101. const fontWeight = helper$1.getFontWeight(getDeclarationValue(ruleData.block.children, "font-weight") || "400");
  9102. const declaredFontsWeights = declaredFonts
  9103. .filter(fontInfo => fontInfo.fontFamily == familyName && fontInfo.fontStyle == fontStyle)
  9104. .map(fontInfo => fontInfo.fontWeight.split(" "))
  9105. .sort((weight1, weight2) => Number.parseInt(weight1[0], 10) - Number.parseInt(weight2[0], 10));
  9106. let usedFontWeights = optionalUsedFonts
  9107. .map(fontInfo => getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights))
  9108. .filter(fontWeight => fontWeight);
  9109. test = testFontweight(fontWeight, usedFontWeights);
  9110. if (!test) {
  9111. usedFontWeights = optionalUsedFonts
  9112. .map(fontInfo => {
  9113. fontInfo = Array.from(fontInfo);
  9114. fontInfo[2] = "normal";
  9115. return getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights);
  9116. })
  9117. .filter(fontWeight => fontWeight);
  9118. test = testFontweight(fontWeight, usedFontWeights);
  9119. if (!test) {
  9120. usedFontWeights = optionalUsedFonts
  9121. .map(fontInfo => {
  9122. fontInfo = Array.from(fontInfo);
  9123. fontInfo[2] = fontStyle = "normal";
  9124. return getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights);
  9125. })
  9126. .filter(fontWeight => fontWeight);
  9127. test = testFontweight(fontWeight, usedFontWeights);
  9128. }
  9129. }
  9130. } else {
  9131. test = true;
  9132. }
  9133. } else {
  9134. test = true;
  9135. }
  9136. return test;
  9137. }
  9138. function testFontweight(fontWeight, usedFontWeights) {
  9139. let test;
  9140. for (const fontWeightValue of fontWeight.split(",")) {
  9141. let { min: fontWeightMin, max: fontWeightMax } = parseFontWeight(fontWeightValue);
  9142. if (!fontWeightMax) {
  9143. fontWeightMax = 900;
  9144. }
  9145. test = test || usedFontWeights.find(usedFontWeight => {
  9146. let { min: usedFontWeightMin, max: usedFontWeightMax } = parseFontWeight(usedFontWeight);
  9147. if (!usedFontWeightMax) {
  9148. usedFontWeightMax = usedFontWeightMin;
  9149. }
  9150. return usedFontWeightMin >= fontWeightMin && usedFontWeightMax <= fontWeightMax;
  9151. });
  9152. }
  9153. return test;
  9154. }
  9155. function parseFontWeight(fontWeight) {
  9156. const fontWeightValues = fontWeight.split(" ");
  9157. const min = Number.parseInt(helper$1.getFontWeight(fontWeightValues[0]), 10);
  9158. const max = fontWeightValues[1] && Number.parseInt(helper$1.getFontWeight(fontWeightValues[1]), 10);
  9159. return {
  9160. min, max
  9161. };
  9162. }
  9163. function getDeclarationValue(declarations, propertyName) {
  9164. let property;
  9165. if (declarations) {
  9166. property = declarations.filter(declaration => declaration.property == propertyName).tail;
  9167. }
  9168. if (property) {
  9169. try {
  9170. return helper$1.removeQuotes(gb(property.data.value)).toLowerCase();
  9171. } catch (error) {
  9172. // ignored
  9173. }
  9174. }
  9175. }
  9176. function getFontFamilyNames(declarations, options) {
  9177. let fontFamilyName = declarations.children.filter(node => node.property == "font-family").tail;
  9178. let fontFamilyNames = [];
  9179. if (fontFamilyName) {
  9180. if (fontFamilyName.data.value.children) {
  9181. parseFamilyNames(fontFamilyName.data.value, fontFamilyNames);
  9182. } else {
  9183. fontFamilyName = gb(fontFamilyName.data.value);
  9184. if (fontFamilyName) {
  9185. fontFamilyNames.push(helper$1.normalizeFontFamily(fontFamilyName));
  9186. }
  9187. }
  9188. }
  9189. const font = declarations.children.filter(node => node.property == "font").tail;
  9190. if (font && font.data && font.data.value) {
  9191. try {
  9192. let value = font.data.value;
  9193. let fontFamilyName = gb(value);
  9194. const matchedVar = fontFamilyName.match(/^var\((--.*)\)$/);
  9195. if (matchedVar && matchedVar[1]) {
  9196. value = db(globalThis.getComputedStyle(options.doc.body).getPropertyValue(matchedVar[1]), { context: "value" });
  9197. }
  9198. const parsedFont = parse(value);
  9199. parsedFont.family.forEach(familyName => fontFamilyNames.push(helper$1.normalizeFontFamily(familyName)));
  9200. } catch (error) {
  9201. // ignored
  9202. }
  9203. }
  9204. return fontFamilyNames;
  9205. }
  9206. function parseFamilyNames(fontFamilyNameTokenData, fontFamilyNames) {
  9207. let nextToken = fontFamilyNameTokenData.children.head;
  9208. while (nextToken) {
  9209. if (nextToken.data.type == "Identifier") {
  9210. let familyName = nextToken.data.name;
  9211. let nextIdentifierToken = nextToken.next;
  9212. while (nextIdentifierToken && nextIdentifierToken.data.type != "Operator" && nextIdentifierToken.data.value != ",") {
  9213. familyName += " " + nextIdentifierToken.data.name;
  9214. nextIdentifierToken = nextIdentifierToken.next;
  9215. }
  9216. fontFamilyNames.push(helper$1.normalizeFontFamily(familyName));
  9217. nextToken = nextToken.next;
  9218. } else if (nextToken.data.type == "Function" && nextToken.data.name == "var" && nextToken.data.children) {
  9219. const varName = nextToken.data.children.head.data.name;
  9220. fontFamilyNames.push(helper$1.normalizeFontFamily("var(" + varName + ")"));
  9221. let nextValueToken = nextToken.data.children.head.next;
  9222. while (nextValueToken && nextValueToken.data.type == "Operator" && nextValueToken.data.value == ",") {
  9223. nextValueToken = nextValueToken.next;
  9224. }
  9225. const fallbackToken = nextValueToken;
  9226. if (fallbackToken) {
  9227. if (fallbackToken.data.children) {
  9228. parseFamilyNames(fallbackToken.data, fontFamilyNames);
  9229. } else {
  9230. fontFamilyNames.push(helper$1.normalizeFontFamily(fallbackToken.data.value));
  9231. }
  9232. }
  9233. nextToken = nextToken.next;
  9234. } else if (nextToken.data.type == "String") {
  9235. fontFamilyNames.push(helper$1.normalizeFontFamily(nextToken.data.value));
  9236. nextToken = nextToken.next;
  9237. } else if (nextToken.data.type == "Number") {
  9238. fontFamilyNames.push(helper$1.normalizeFontFamily(String(nextToken.data.value)));
  9239. nextToken = nextToken.next;
  9240. } else {
  9241. nextToken = nextToken.next;
  9242. }
  9243. }
  9244. }
  9245. function getUsedFontWeight(fontInfo, fontStyle, fontWeights) {
  9246. let foundWeight;
  9247. fontWeights = fontWeights.map(weights => weights.map(value => String(Number.parseInt(value, 10))));
  9248. if (fontInfo[2] == fontStyle) {
  9249. let fontWeight = Number(fontInfo[1]);
  9250. if (fontWeights.length > 1) {
  9251. if (fontWeight >= 400 && fontWeight <= 500) {
  9252. foundWeight = fontWeights.find(weights => weights[0] >= fontWeight && weights[0] <= 500);
  9253. if (!foundWeight) {
  9254. foundWeight = findDescendingFontWeight(fontWeight, fontWeights);
  9255. }
  9256. if (!foundWeight) {
  9257. foundWeight = findAscendingFontWeight(fontWeight, fontWeights);
  9258. }
  9259. }
  9260. if (fontWeight < 400) {
  9261. foundWeight = fontWeights.slice().reverse().find(weights => weights[weights.length - 1] <= fontWeight);
  9262. if (!foundWeight) {
  9263. foundWeight = findAscendingFontWeight(fontWeight, fontWeights);
  9264. }
  9265. }
  9266. if (fontWeight > 500) {
  9267. foundWeight = fontWeights.find(weights => weights[0] >= fontWeight);
  9268. if (!foundWeight) {
  9269. foundWeight = findDescendingFontWeight(fontWeight, fontWeights);
  9270. }
  9271. }
  9272. if (!foundWeight) {
  9273. foundWeight = fontWeights.find(weights => weights[0] <= fontWeight && weights[weights.length - 1] >= fontWeight);
  9274. }
  9275. } else {
  9276. foundWeight = fontWeights[0];
  9277. }
  9278. }
  9279. return foundWeight ? foundWeight.join(" ") : undefined;
  9280. }
  9281. function findDescendingFontWeight(fontWeight, fontWeights) {
  9282. return fontWeights.slice().reverse().find(weights => weights[weights.length - 1] < fontWeight);
  9283. }
  9284. function findAscendingFontWeight(fontWeight, fontWeights) {
  9285. return fontWeights.find(weights => weights[0] > fontWeight);
  9286. }
  9287. function getRulesTextContent(doc, cssRules, workStylesheet, content) {
  9288. cssRules.forEach(ruleData => {
  9289. if (ruleData.block && ruleData.block.children && ruleData.prelude && ruleData.prelude.children) {
  9290. if (ruleData.type == "Atrule" && (ruleData.name == "media" || ruleData.name == "supports" || ruleData.name == "layer")) {
  9291. content = getRulesTextContent(doc, ruleData.block.children, workStylesheet, content);
  9292. } else if (ruleData.type == "Rule") {
  9293. content = getDeclarationsTextContent(ruleData.block.children, workStylesheet, content);
  9294. }
  9295. }
  9296. });
  9297. return content;
  9298. }
  9299. function getDeclarationsTextContent(declarations, workStylesheet, content) {
  9300. const contentText = getDeclarationUnescapedValue(declarations, "content", workStylesheet);
  9301. const quotesText = getDeclarationUnescapedValue(declarations, "quotes", workStylesheet);
  9302. if (!content.includes(contentText)) {
  9303. content += contentText;
  9304. }
  9305. if (!content.includes(quotesText)) {
  9306. content += quotesText;
  9307. }
  9308. return content;
  9309. }
  9310. function getDeclarationUnescapedValue(declarations, property, workStylesheet) {
  9311. const rawValue = getDeclarationValue(declarations, property) || "";
  9312. if (rawValue) {
  9313. workStylesheet.textContent = "tmp { content:\"" + rawValue + "\"}";
  9314. if (workStylesheet.sheet && workStylesheet.sheet.cssRules) {
  9315. return helper$1.removeQuotes(workStylesheet.sheet.cssRules[0].style.getPropertyValue("content"));
  9316. } else {
  9317. return rawValue;
  9318. }
  9319. }
  9320. return "";
  9321. }
  9322. function testUnicodeRange(docCharCodes, unicodeRange) {
  9323. if (unicodeRange) {
  9324. const unicodeRanges = unicodeRange.split(REGEXP_COMMA);
  9325. const result = unicodeRanges.filter(rangeValue => {
  9326. const range = rangeValue.split(REGEXP_DASH);
  9327. if (range.length == 2) {
  9328. range[0] = transformRange(range[0]);
  9329. range[1] = transformRange(range[1]);
  9330. } else if (range.length == 1) {
  9331. if (range[0].includes("?")) {
  9332. const firstRange = range[0];
  9333. const secondRange = firstRange;
  9334. range[0] = transformRange(firstRange.replace(REGEXP_QUESTION_MARK, "0"));
  9335. range[1] = transformRange(secondRange.replace(REGEXP_QUESTION_MARK, "F"));
  9336. } else if (range[0]) {
  9337. range[0] = transformRange(range[0]);
  9338. }
  9339. }
  9340. if (!range[0] || docCharCodes.find(charCode => charCode >= range[0] && charCode <= range[1])) {
  9341. return true;
  9342. }
  9343. });
  9344. return (!unicodeRanges.length || result.length);
  9345. }
  9346. return true;
  9347. }
  9348. function transformRange(range) {
  9349. range = range.replace(REGEXP_STARTS_U_PLUS, "");
  9350. return parseInt(range, 16);
  9351. }
  9352. var cssFontsMinifier = /*#__PURE__*/Object.freeze({
  9353. __proto__: null,
  9354. process: process$5
  9355. });
  9356. /*
  9357. * Copyright 2010-2022 Gildas Lormeau
  9358. * contact : gildas.lormeau <at> gmail.com
  9359. *
  9360. * This file is part of SingleFile.
  9361. *
  9362. * The code in this file is free software: you can redistribute it and/or
  9363. * modify it under the terms of the GNU Affero General Public License
  9364. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  9365. * of the License, or (at your option) any later version.
  9366. *
  9367. * The code in this file is distributed in the hope that it will be useful,
  9368. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9369. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  9370. * General Public License for more details.
  9371. *
  9372. * As additional permission under GNU AGPL version 3 section 7, you may
  9373. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  9374. * AGPL normally required by section 4, provided you include this license
  9375. * notice and a URL through which recipients can access the Corresponding
  9376. * Source.
  9377. */
  9378. const MEDIA_ALL$2 = "all";
  9379. const IGNORED_PSEUDO_ELEMENTS = ["after", "before", "first-letter", "first-line", "placeholder", "selection", "part", "marker"];
  9380. const SINGLE_FILE_HIDDEN_CLASS_NAME = "sf-hidden";
  9381. const DISPLAY_STYLE = "display";
  9382. const REGEXP_VENDOR_IDENTIFIER = /-(ms|webkit|moz|o)-/;
  9383. class MatchedRules {
  9384. constructor(doc, stylesheets, styles) {
  9385. this.doc = doc;
  9386. this.mediaAllInfo = createMediaInfo(MEDIA_ALL$2);
  9387. const matchedElementsCache = new Map();
  9388. let sheetIndex = 0;
  9389. const workStyleSheet = doc.createElement("style");
  9390. doc.body.appendChild(workStyleSheet);
  9391. const workStyleElement = doc.createElement("span");
  9392. doc.body.appendChild(workStyleElement);
  9393. stylesheets.forEach((stylesheetInfo, key) => {
  9394. if (!stylesheetInfo.scoped && !key.urlNode) {
  9395. const cssRules = stylesheetInfo.stylesheet.children;
  9396. if (cssRules) {
  9397. if (stylesheetInfo.mediaText && stylesheetInfo.mediaText != MEDIA_ALL$2) {
  9398. const mediaInfo = createMediaInfo(stylesheetInfo.mediaText);
  9399. this.mediaAllInfo.medias.set("style-" + sheetIndex + "-" + stylesheetInfo.mediaText, mediaInfo);
  9400. getMatchedElementsRules(doc, cssRules, stylesheets, mediaInfo, sheetIndex, styles, matchedElementsCache, workStyleSheet);
  9401. } else {
  9402. getMatchedElementsRules(doc, cssRules, stylesheets, this.mediaAllInfo, sheetIndex, styles, matchedElementsCache, workStyleSheet);
  9403. }
  9404. }
  9405. }
  9406. sheetIndex++;
  9407. });
  9408. sortRules(this.mediaAllInfo);
  9409. computeCascade(this.mediaAllInfo, [], this.mediaAllInfo, workStyleSheet, workStyleElement);
  9410. workStyleSheet.remove();
  9411. workStyleElement.remove();
  9412. }
  9413. getMediaAllInfo() {
  9414. return this.mediaAllInfo;
  9415. }
  9416. }
  9417. function getMediaAllInfo(doc, stylesheets, styles) {
  9418. return new MatchedRules(doc, stylesheets, styles).getMediaAllInfo();
  9419. }
  9420. function createMediaInfo(media) {
  9421. const mediaInfo = {
  9422. media: media,
  9423. elements: new Map(),
  9424. medias: new Map(),
  9425. rules: new Map(),
  9426. pseudoRules: new Map()
  9427. };
  9428. if (media == MEDIA_ALL$2) {
  9429. mediaInfo.matchedStyles = new Map();
  9430. }
  9431. return mediaInfo;
  9432. }
  9433. function getMatchedElementsRules(doc, cssRules, stylesheets, mediaInfo, sheetIndex, styles, matchedElementsCache, workStylesheet, indexes = {
  9434. mediaIndex: 0, ruleIndex: 0
  9435. }) {
  9436. cssRules.forEach(ruleData => {
  9437. if (ruleData.type == "Atrule" && ruleData.name == "import" && ruleData.prelude && ruleData.prelude.children && ruleData.prelude.children.head.data.importedChildren) {
  9438. getMatchedElementsRules(doc, ruleData.prelude.children.head.data.importedChildren, stylesheets, mediaInfo, sheetIndex, styles, matchedElementsCache, workStylesheet, indexes);
  9439. } else if (ruleData.block && ruleData.block.children && ruleData.prelude && ruleData.prelude.children) {
  9440. if (ruleData.type == "Atrule" && ruleData.name == "media") {
  9441. const mediaText = gb(ruleData.prelude);
  9442. const ruleMediaInfo = createMediaInfo(mediaText);
  9443. mediaInfo.medias.set("rule-" + sheetIndex + "-" + indexes.mediaIndex + "-" + mediaText, ruleMediaInfo);
  9444. getMatchedElementsRules(doc, ruleData.block.children, stylesheets, ruleMediaInfo, sheetIndex, styles, matchedElementsCache, workStylesheet);
  9445. indexes.mediaIndex++;
  9446. } else if (ruleData.type == "Rule") {
  9447. const selectors = ruleData.prelude.children.toArray();
  9448. const selectorsText = ruleData.prelude.children.toArray().map(selector => gb(selector));
  9449. const ruleInfo = { ruleData, mediaInfo, ruleIndex: indexes.ruleIndex, sheetIndex, matchedSelectors: new Set(), declarations: new Set(), selectors, selectorsText };
  9450. if (!invalidSelector(selectorsText.join(","), workStylesheet) || selectorsText.find(selectorText => selectorText.includes("|"))) {
  9451. for (let selector = ruleData.prelude.children.head, selectorIndex = 0; selector; selector = selector.next, selectorIndex++) {
  9452. const selectorText = selectorsText[selectorIndex];
  9453. const selectorInfo = { selector, selectorText, ruleInfo };
  9454. getMatchedElementsSelector(doc, selectorInfo, styles, matchedElementsCache);
  9455. }
  9456. }
  9457. indexes.ruleIndex++;
  9458. }
  9459. }
  9460. });
  9461. }
  9462. function invalidSelector(selectorText, workStylesheet) {
  9463. workStylesheet.textContent = selectorText + "{}";
  9464. return workStylesheet.sheet ? !workStylesheet.sheet.cssRules.length : workStylesheet.sheet;
  9465. }
  9466. function getMatchedElementsSelector(doc, selectorInfo, styles, matchedElementsCache) {
  9467. const filteredSelectorText = getFilteredSelector(selectorInfo.selector, selectorInfo.selectorText);
  9468. const selectorText = filteredSelectorText != selectorInfo.selectorText ? filteredSelectorText : selectorInfo.selectorText;
  9469. const cachedMatchedElements = matchedElementsCache.get(selectorText);
  9470. let matchedElements = cachedMatchedElements;
  9471. if (!matchedElements) {
  9472. try {
  9473. matchedElements = doc.querySelectorAll(selectorText);
  9474. if (selectorText != "." + SINGLE_FILE_HIDDEN_CLASS_NAME) {
  9475. matchedElements = Array.from(doc.querySelectorAll(selectorText)).filter(matchedElement =>
  9476. !matchedElement.classList.contains(SINGLE_FILE_HIDDEN_CLASS_NAME) &&
  9477. (matchedElement.style.getPropertyValue(DISPLAY_STYLE) != "none" || matchedElement.style.getPropertyPriority("display") != "important")
  9478. );
  9479. }
  9480. } catch (error) {
  9481. // ignored
  9482. }
  9483. }
  9484. if (matchedElements) {
  9485. if (!cachedMatchedElements) {
  9486. matchedElementsCache.set(selectorText, matchedElements);
  9487. }
  9488. if (matchedElements.length) {
  9489. if (filteredSelectorText == selectorInfo.selectorText) {
  9490. matchedElements.forEach(element => addRule(element, selectorInfo, styles));
  9491. } else {
  9492. let pseudoSelectors = selectorInfo.ruleInfo.mediaInfo.pseudoRules.get(selectorInfo.ruleInfo.ruleData);
  9493. if (!pseudoSelectors) {
  9494. pseudoSelectors = new Set();
  9495. selectorInfo.ruleInfo.mediaInfo.pseudoRules.set(selectorInfo.ruleInfo.ruleData, pseudoSelectors);
  9496. }
  9497. pseudoSelectors.add(selectorInfo.selectorText);
  9498. }
  9499. }
  9500. }
  9501. }
  9502. function getFilteredSelector(selector, selectorText) {
  9503. const removedSelectors = [];
  9504. let namespaceFound;
  9505. selector = { data: db(gb(selector.data), { context: "selector" }) };
  9506. filterNamespace(selector);
  9507. if (namespaceFound) {
  9508. selectorText = gb(selector.data).trim();
  9509. }
  9510. filterPseudoClasses(selector);
  9511. if (removedSelectors.length) {
  9512. removedSelectors.forEach(({ parentSelector, selector }) => {
  9513. if (parentSelector.data.children.size == 0 || !selector.prev || selector.prev.data.type == "Combinator" || selector.prev.data.type == "WhiteSpace") {
  9514. parentSelector.data.children.replace(selector, db("*", { context: "selector" }).children.head);
  9515. } else {
  9516. parentSelector.data.children.remove(selector);
  9517. }
  9518. });
  9519. selectorText = gb(selector.data).trim();
  9520. }
  9521. return selectorText;
  9522. function filterPseudoClasses(selector, parentSelector) {
  9523. if (selector.data.children) {
  9524. for (let childSelector = selector.data.children.head; childSelector; childSelector = childSelector.next) {
  9525. filterPseudoClasses(childSelector, selector);
  9526. }
  9527. }
  9528. if ((selector.data.type == "PseudoClassSelector") ||
  9529. (selector.data.type == "PseudoElementSelector" && (testVendorPseudo(selector) || IGNORED_PSEUDO_ELEMENTS.includes(selector.data.name)))) {
  9530. removedSelectors.push({ parentSelector, selector });
  9531. }
  9532. }
  9533. function filterNamespace(selector) {
  9534. if (selector.data.children) {
  9535. for (let childSelector = selector.data.children.head; childSelector; childSelector = childSelector.next) {
  9536. filterNamespace(childSelector);
  9537. }
  9538. }
  9539. if (selector.data.type == "TypeSelector" && selector.data.name.includes("|")) {
  9540. namespaceFound = true;
  9541. selector.data.name = selector.data.name.substring(selector.data.name.lastIndexOf("|") + 1);
  9542. }
  9543. }
  9544. function testVendorPseudo(selector) {
  9545. const name = selector.data.name;
  9546. return name.startsWith("-") || name.startsWith("\\-");
  9547. }
  9548. }
  9549. function addRule(element, selectorInfo, styles) {
  9550. const mediaInfo = selectorInfo.ruleInfo.mediaInfo;
  9551. const elementStyle = styles.get(element);
  9552. let elementInfo = mediaInfo.elements.get(element);
  9553. if (!elementInfo) {
  9554. elementInfo = [];
  9555. if (elementStyle) {
  9556. elementInfo.push({ styleInfo: { styleData: elementStyle, declarations: new Set() } });
  9557. }
  9558. mediaInfo.elements.set(element, elementInfo);
  9559. }
  9560. const specificity = computeSpecificity(selectorInfo.selector.data);
  9561. specificity.ruleIndex = selectorInfo.ruleInfo.ruleIndex;
  9562. specificity.sheetIndex = selectorInfo.ruleInfo.sheetIndex;
  9563. selectorInfo.specificity = specificity;
  9564. elementInfo.push(selectorInfo);
  9565. }
  9566. function computeCascade(mediaInfo, parentMediaInfo, mediaAllInfo, workStylesheet, workStyleElement) {
  9567. mediaInfo.elements.forEach((elementInfo/*, element*/) =>
  9568. getDeclarationsInfo(elementInfo, workStylesheet, workStyleElement/*, element*/).forEach((declarationsInfo, property) => {
  9569. if (declarationsInfo.selectorInfo.ruleInfo || mediaInfo == mediaAllInfo) {
  9570. let info;
  9571. if (declarationsInfo.selectorInfo.ruleInfo) {
  9572. info = declarationsInfo.selectorInfo.ruleInfo;
  9573. const ruleData = info.ruleData;
  9574. const ascendantMedia = [mediaInfo, ...parentMediaInfo].find(media => media.rules.get(ruleData)) || mediaInfo;
  9575. ascendantMedia.rules.set(ruleData, info);
  9576. if (ruleData) {
  9577. info.matchedSelectors.add(declarationsInfo.selectorInfo.selectorText);
  9578. }
  9579. } else {
  9580. info = declarationsInfo.selectorInfo.styleInfo;
  9581. const styleData = info.styleData;
  9582. const matchedStyleInfo = mediaAllInfo.matchedStyles.get(styleData);
  9583. if (!matchedStyleInfo) {
  9584. mediaAllInfo.matchedStyles.set(styleData, info);
  9585. }
  9586. }
  9587. if (!info.declarations.has(property)) {
  9588. info.declarations.add(property);
  9589. }
  9590. }
  9591. }));
  9592. delete mediaInfo.elements;
  9593. mediaInfo.medias.forEach(childMediaInfo => computeCascade(childMediaInfo, [mediaInfo, ...parentMediaInfo], mediaAllInfo, workStylesheet, workStyleElement));
  9594. }
  9595. function getDeclarationsInfo(elementInfo, workStylesheet, workStyleElement/*, element*/) {
  9596. const declarationsInfo = new Map();
  9597. const processedProperties = new Set();
  9598. elementInfo.forEach(selectorInfo => {
  9599. let declarations;
  9600. if (selectorInfo.styleInfo) {
  9601. declarations = selectorInfo.styleInfo.styleData.children;
  9602. } else {
  9603. declarations = selectorInfo.ruleInfo.ruleData.block.children;
  9604. }
  9605. processDeclarations(declarationsInfo, declarations, selectorInfo, processedProperties, workStylesheet, workStyleElement);
  9606. });
  9607. return declarationsInfo;
  9608. }
  9609. function processDeclarations(declarationsInfo, declarations, selectorInfo, processedProperties, workStylesheet, workStyleElement) {
  9610. for (let declaration = declarations.tail; declaration; declaration = declaration.prev) {
  9611. const declarationData = declaration.data;
  9612. const declarationText = gb(declarationData);
  9613. if (declarationData.type == "Declaration" &&
  9614. (declarationText.match(REGEXP_VENDOR_IDENTIFIER) || !processedProperties.has(declarationData.property) || declarationData.important) && !invalidDeclaration(declarationText, workStyleElement)) {
  9615. const declarationInfo = declarationsInfo.get(declarationData);
  9616. if (!declarationInfo || (declarationData.important && !declarationInfo.important)) {
  9617. declarationsInfo.set(declarationData, { selectorInfo, important: declarationData.important });
  9618. if (!declarationText.match(REGEXP_VENDOR_IDENTIFIER)) {
  9619. processedProperties.add(declarationData.property);
  9620. }
  9621. }
  9622. }
  9623. }
  9624. }
  9625. function invalidDeclaration(declarationText, workStyleElement) {
  9626. let invalidDeclaration;
  9627. workStyleElement.style = declarationText;
  9628. if (!workStyleElement.style.length) {
  9629. if (!declarationText.match(REGEXP_VENDOR_IDENTIFIER)) {
  9630. invalidDeclaration = true;
  9631. }
  9632. }
  9633. return invalidDeclaration;
  9634. }
  9635. function sortRules(media) {
  9636. media.elements.forEach(elementRules => elementRules.sort((ruleInfo1, ruleInfo2) =>
  9637. ruleInfo1.styleInfo && !ruleInfo2.styleInfo ? -1 :
  9638. !ruleInfo1.styleInfo && ruleInfo2.styleInfo ? 1 :
  9639. compareSpecificity(ruleInfo1.specificity, ruleInfo2.specificity)));
  9640. media.medias.forEach(sortRules);
  9641. }
  9642. function computeSpecificity(selector, specificity = { a: 0, b: 0, c: 0 }) {
  9643. if (selector.type == "IdSelector") {
  9644. specificity.a++;
  9645. }
  9646. if (selector.type == "ClassSelector" || selector.type == "AttributeSelector" || (selector.type == "PseudoClassSelector" && selector.name != "not")) {
  9647. specificity.b++;
  9648. }
  9649. if ((selector.type == "TypeSelector" && selector.name != "*") || selector.type == "PseudoElementSelector") {
  9650. specificity.c++;
  9651. }
  9652. if (selector.children) {
  9653. selector.children.forEach(selector => computeSpecificity(selector, specificity));
  9654. }
  9655. return specificity;
  9656. }
  9657. function compareSpecificity(specificity1, specificity2) {
  9658. if (specificity1.a > specificity2.a) {
  9659. return -1;
  9660. } else if (specificity1.a < specificity2.a) {
  9661. return 1;
  9662. } else if (specificity1.b > specificity2.b) {
  9663. return -1;
  9664. } else if (specificity1.b < specificity2.b) {
  9665. return 1;
  9666. } else if (specificity1.c > specificity2.c) {
  9667. return -1;
  9668. } else if (specificity1.c < specificity2.c) {
  9669. return 1;
  9670. } else if (specificity1.sheetIndex > specificity2.sheetIndex) {
  9671. return -1;
  9672. } else if (specificity1.sheetIndex < specificity2.sheetIndex) {
  9673. return 1;
  9674. } else if (specificity1.ruleIndex > specificity2.ruleIndex) {
  9675. return -1;
  9676. } else if (specificity1.ruleIndex < specificity2.ruleIndex) {
  9677. return 1;
  9678. } else {
  9679. return -1;
  9680. }
  9681. }
  9682. var cssMatchedRules = /*#__PURE__*/Object.freeze({
  9683. __proto__: null,
  9684. getMediaAllInfo: getMediaAllInfo
  9685. });
  9686. /*
  9687. * Copyright 2010-2022 Gildas Lormeau
  9688. * contact : gildas.lormeau <at> gmail.com
  9689. *
  9690. * This file is part of SingleFile.
  9691. *
  9692. * The code in this file is free software: you can redistribute it and/or
  9693. * modify it under the terms of the GNU Affero General Public License
  9694. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  9695. * of the License, or (at your option) any later version.
  9696. *
  9697. * The code in this file is distributed in the hope that it will be useful,
  9698. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9699. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  9700. * General Public License for more details.
  9701. *
  9702. * As additional permission under GNU AGPL version 3 section 7, you may
  9703. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  9704. * AGPL normally required by section 4, provided you include this license
  9705. * notice and a URL through which recipients can access the Corresponding
  9706. * Source.
  9707. */
  9708. const helper = {
  9709. flatten
  9710. };
  9711. const MEDIA_ALL$1 = "all";
  9712. const MEDIA_SCREEN = "screen";
  9713. function process$4(stylesheets) {
  9714. const stats = { processed: 0, discarded: 0 };
  9715. stylesheets.forEach((stylesheetInfo, key) => {
  9716. if (matchesMediaType(stylesheetInfo.mediaText || MEDIA_ALL$1) && stylesheetInfo.stylesheet.children) {
  9717. const removedRules = processRules$1(stylesheetInfo.stylesheet.children, stats);
  9718. removedRules.forEach(({ cssRules, cssRule }) => cssRules.remove(cssRule));
  9719. } else {
  9720. stylesheets.delete(key);
  9721. if (key.element) {
  9722. key.element.remove();
  9723. }
  9724. }
  9725. });
  9726. return stats;
  9727. }
  9728. function processRules$1(cssRules, stats, removedRules = []) {
  9729. for (let cssRule = cssRules.head; cssRule; cssRule = cssRule.next) {
  9730. const ruleData = cssRule.data;
  9731. if (ruleData.type == "Atrule" && ruleData.name == "media" && ruleData.block && ruleData.block.children && ruleData.prelude && ruleData.prelude.children) {
  9732. stats.processed++;
  9733. if (matchesMediaType(gb(ruleData.prelude))) {
  9734. processRules$1(ruleData.block.children, stats, removedRules);
  9735. } else {
  9736. removedRules.push({ cssRules, cssRule });
  9737. stats.discarded++;
  9738. }
  9739. }
  9740. }
  9741. return removedRules;
  9742. }
  9743. function matchesMediaType(mediaText) {
  9744. const foundMediaTypes = helper.flatten(parseMediaList(mediaText).map(node => getMediaTypes(node)));
  9745. return foundMediaTypes.find(mediaTypeInfo =>
  9746. (!mediaTypeInfo.not && (mediaTypeInfo.value == MEDIA_SCREEN || mediaTypeInfo.value == MEDIA_ALL$1)) ||
  9747. (mediaTypeInfo.not && (mediaTypeInfo.value != MEDIA_SCREEN && mediaTypeInfo.value != MEDIA_ALL$1)));
  9748. }
  9749. function getMediaTypes(parentNode, mediaTypes = []) {
  9750. parentNode.nodes.map((node, indexNode) => {
  9751. if (node.type == "media-query") {
  9752. return getMediaTypes(node);
  9753. } else {
  9754. if (node.type == "media-type") {
  9755. const nodeMediaType = {
  9756. not: Boolean(indexNode && parentNode.nodes[0].type == "keyword" && parentNode.nodes[0].value == "not"),
  9757. value: node.value
  9758. };
  9759. mediaTypes.push(nodeMediaType);
  9760. }
  9761. }
  9762. });
  9763. if (!mediaTypes.length) {
  9764. mediaTypes.push({ not: false, value: MEDIA_ALL$1 });
  9765. }
  9766. return mediaTypes;
  9767. }
  9768. var cssMediasAltMinifier = /*#__PURE__*/Object.freeze({
  9769. __proto__: null,
  9770. process: process$4
  9771. });
  9772. /*
  9773. * Copyright 2010-2022 Gildas Lormeau
  9774. * contact : gildas.lormeau <at> gmail.com
  9775. *
  9776. * This file is part of SingleFile.
  9777. *
  9778. * The code in this file is free software: you can redistribute it and/or
  9779. * modify it under the terms of the GNU Affero General Public License
  9780. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  9781. * of the License, or (at your option) any later version.
  9782. *
  9783. * The code in this file is distributed in the hope that it will be useful,
  9784. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9785. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  9786. * General Public License for more details.
  9787. *
  9788. * As additional permission under GNU AGPL version 3 section 7, you may
  9789. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  9790. * AGPL normally required by section 4, provided you include this license
  9791. * notice and a URL through which recipients can access the Corresponding
  9792. * Source.
  9793. */
  9794. function process$3(stylesheets, styles, mediaAllInfo) {
  9795. const stats = { processed: 0, discarded: 0 };
  9796. let sheetIndex = 0;
  9797. stylesheets.forEach((stylesheetInfo, key) => {
  9798. if (!stylesheetInfo.scoped && !key.urlNode) {
  9799. const cssRules = stylesheetInfo.stylesheet.children;
  9800. if (cssRules) {
  9801. stats.processed += cssRules.size;
  9802. stats.discarded += cssRules.size;
  9803. let mediaInfo;
  9804. if (stylesheetInfo.mediaText && stylesheetInfo.mediaText != "all") {
  9805. mediaInfo = mediaAllInfo.medias.get("style-" + sheetIndex + "-" + stylesheetInfo.mediaText);
  9806. } else {
  9807. mediaInfo = mediaAllInfo;
  9808. }
  9809. processRules(cssRules, sheetIndex, mediaInfo);
  9810. stats.discarded -= cssRules.size;
  9811. }
  9812. }
  9813. sheetIndex++;
  9814. });
  9815. styles.forEach(style => processStyleAttribute(style, mediaAllInfo));
  9816. return stats;
  9817. }
  9818. function processRules(cssRules, sheetIndex, mediaInfo, indexes = { mediaRuleIndex: 0 }) {
  9819. const removedCssRules = [];
  9820. for (let cssRule = cssRules.head; cssRule; cssRule = cssRule.next) {
  9821. const ruleData = cssRule.data;
  9822. if (ruleData.type == "Atrule" && ruleData.name == "import" && ruleData.prelude && ruleData.prelude.children && ruleData.prelude.children.head.data.importedChildren) {
  9823. processRules(ruleData.prelude.children.head.data.importedChildren, sheetIndex, mediaInfo, indexes);
  9824. } else if (ruleData.block && ruleData.block.children && ruleData.prelude && ruleData.prelude.children) {
  9825. if (ruleData.type == "Atrule" && ruleData.name == "media") {
  9826. const mediaText = gb(ruleData.prelude);
  9827. processRules(ruleData.block.children, sheetIndex, mediaInfo.medias.get("rule-" + sheetIndex + "-" + indexes.mediaRuleIndex + "-" + mediaText));
  9828. indexes.mediaRuleIndex++;
  9829. } else if (ruleData.type == "Rule") {
  9830. const ruleInfo = mediaInfo.rules.get(ruleData);
  9831. const pseudoSelectors = mediaInfo.pseudoRules.get(ruleData);
  9832. if (!ruleInfo && !pseudoSelectors) {
  9833. removedCssRules.push(cssRule);
  9834. } else if (ruleInfo) {
  9835. processRuleInfo(ruleData, ruleInfo, pseudoSelectors);
  9836. if (!ruleData.prelude.children.size || !ruleData.block.children.size) {
  9837. removedCssRules.push(cssRule);
  9838. }
  9839. }
  9840. }
  9841. } else {
  9842. if (!ruleData || ruleData.type == "Raw" || (ruleData.type == "Rule" && (!ruleData.prelude || ruleData.prelude.type == "Raw"))) {
  9843. removedCssRules.push(cssRule);
  9844. }
  9845. }
  9846. }
  9847. removedCssRules.forEach(cssRule => cssRules.remove(cssRule));
  9848. }
  9849. function processRuleInfo(ruleData, ruleInfo, pseudoSelectors) {
  9850. const removedDeclarations = [];
  9851. const removedSelectors = [];
  9852. let pseudoSelectorFound;
  9853. for (let selector = ruleData.prelude.children.head; selector; selector = selector.next) {
  9854. const selectorText = gb(selector.data);
  9855. if (pseudoSelectors && pseudoSelectors.has(selectorText)) {
  9856. pseudoSelectorFound = true;
  9857. }
  9858. if (!ruleInfo.matchedSelectors.has(selectorText) && (!pseudoSelectors || !pseudoSelectors.has(selectorText))) {
  9859. removedSelectors.push(selector);
  9860. }
  9861. }
  9862. if (!pseudoSelectorFound) {
  9863. for (let declaration = ruleData.block.children.tail; declaration; declaration = declaration.prev) {
  9864. if (!ruleInfo.declarations.has(declaration.data)) {
  9865. removedDeclarations.push(declaration);
  9866. }
  9867. }
  9868. }
  9869. removedDeclarations.forEach(declaration => ruleData.block.children.remove(declaration));
  9870. removedSelectors.forEach(selector => ruleData.prelude.children.remove(selector));
  9871. }
  9872. function processStyleAttribute(styleData, mediaAllInfo) {
  9873. const removedDeclarations = [];
  9874. const styleInfo = mediaAllInfo.matchedStyles.get(styleData);
  9875. if (styleInfo) {
  9876. let propertyFound;
  9877. for (let declaration = styleData.children.head; declaration && !propertyFound; declaration = declaration.next) {
  9878. if (!styleInfo.declarations.has(declaration.data)) {
  9879. removedDeclarations.push(declaration);
  9880. }
  9881. }
  9882. removedDeclarations.forEach(declaration => styleData.children.remove(declaration));
  9883. }
  9884. }
  9885. var cssRulesMinifier = /*#__PURE__*/Object.freeze({
  9886. __proto__: null,
  9887. process: process$3
  9888. });
  9889. /*
  9890. * Copyright 2010-2022 Gildas Lormeau
  9891. * contact : gildas.lormeau <at> gmail.com
  9892. *
  9893. * This file is part of SingleFile.
  9894. *
  9895. * The code in this file is free software: you can redistribute it and/or
  9896. * modify it under the terms of the GNU Affero General Public License
  9897. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  9898. * of the License, or (at your option) any later version.
  9899. *
  9900. * The code in this file is distributed in the hope that it will be useful,
  9901. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9902. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  9903. * General Public License for more details.
  9904. *
  9905. * As additional permission under GNU AGPL version 3 section 7, you may
  9906. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  9907. * AGPL normally required by section 4, provided you include this license
  9908. * notice and a URL through which recipients can access the Corresponding
  9909. * Source.
  9910. */
  9911. const EMPTY_RESOURCE = "data:,";
  9912. function process$2(doc) {
  9913. doc.querySelectorAll("picture").forEach(pictureElement => {
  9914. const imgElement = pictureElement.querySelector("img");
  9915. if (imgElement) {
  9916. let { src, srcset } = getImgSrcData(imgElement);
  9917. if (!src) {
  9918. const data = getSourceSrcData(Array.from(pictureElement.querySelectorAll("source")).reverse());
  9919. src = data.src;
  9920. if (!srcset) {
  9921. srcset = data.srcset;
  9922. }
  9923. }
  9924. setSrc({ src, srcset }, imgElement, pictureElement);
  9925. }
  9926. });
  9927. doc.querySelectorAll(":not(picture) > img[srcset]").forEach(imgElement => setSrc(getImgSrcData(imgElement), imgElement));
  9928. }
  9929. function getImgSrcData(imgElement) {
  9930. let src = imgElement.getAttribute("src");
  9931. if (src == EMPTY_RESOURCE) {
  9932. src = null;
  9933. }
  9934. let srcset = getSourceSrc(imgElement.getAttribute("srcset"));
  9935. if (srcset == EMPTY_RESOURCE) {
  9936. srcset = null;
  9937. }
  9938. return { src, srcset };
  9939. }
  9940. function getSourceSrcData(sources) {
  9941. let source = sources.find(source => source.src);
  9942. let src = source && source.src;
  9943. let srcset = source && source.srcset;
  9944. if (!src) {
  9945. source = sources.find(source => getSourceSrc(source.src));
  9946. src = source && source.src;
  9947. if (src == EMPTY_RESOURCE) {
  9948. src = null;
  9949. }
  9950. }
  9951. if (!srcset) {
  9952. source = sources.find(source => getSourceSrc(source.srcset));
  9953. srcset = source && source.srcset;
  9954. if (srcset == EMPTY_RESOURCE) {
  9955. srcset = null;
  9956. }
  9957. }
  9958. return { src, srcset };
  9959. }
  9960. function setSrc(srcData, imgElement, pictureElement) {
  9961. if (srcData.src) {
  9962. imgElement.setAttribute("src", srcData.src);
  9963. imgElement.setAttribute("srcset", "");
  9964. imgElement.setAttribute("sizes", "");
  9965. } else {
  9966. imgElement.setAttribute("src", EMPTY_RESOURCE);
  9967. if (srcData.srcset) {
  9968. imgElement.setAttribute("srcset", srcData.srcset);
  9969. } else {
  9970. imgElement.setAttribute("srcset", "");
  9971. imgElement.setAttribute("sizes", "");
  9972. }
  9973. }
  9974. if (pictureElement) {
  9975. pictureElement.querySelectorAll("source").forEach(sourceElement => sourceElement.remove());
  9976. }
  9977. }
  9978. function getSourceSrc(sourceSrcSet) {
  9979. if (sourceSrcSet) {
  9980. try {
  9981. const srcset = process$6(sourceSrcSet);
  9982. if (srcset.length) {
  9983. return (srcset.find(srcset => srcset.url)).url;
  9984. }
  9985. } catch (error) {
  9986. // ignored
  9987. }
  9988. }
  9989. }
  9990. var htmlImagesAltMinifier = /*#__PURE__*/Object.freeze({
  9991. __proto__: null,
  9992. process: process$2
  9993. });
  9994. /*
  9995. * Copyright 2010-2022 Gildas Lormeau
  9996. * contact : gildas.lormeau <at> gmail.com
  9997. *
  9998. * This file is part of SingleFile.
  9999. *
  10000. * The code in this file is free software: you can redistribute it and/or
  10001. * modify it under the terms of the GNU Affero General Public License
  10002. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  10003. * of the License, or (at your option) any later version.
  10004. *
  10005. * The code in this file is distributed in the hope that it will be useful,
  10006. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10007. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  10008. * General Public License for more details.
  10009. *
  10010. * As additional permission under GNU AGPL version 3 section 7, you may
  10011. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  10012. * AGPL normally required by section 4, provided you include this license
  10013. * notice and a URL through which recipients can access the Corresponding
  10014. * Source.
  10015. */
  10016. // Derived from the work of Kirill Maltsev - https://github.com/posthtml/htmlnano
  10017. // Source: https://github.com/kangax/html-minifier/issues/63
  10018. const booleanAttributes = [
  10019. "allowfullscreen",
  10020. "async",
  10021. "autofocus",
  10022. "autoplay",
  10023. "checked",
  10024. "compact",
  10025. "controls",
  10026. "declare",
  10027. "default",
  10028. "defaultchecked",
  10029. "defaultmuted",
  10030. "defaultselected",
  10031. "defer",
  10032. "disabled",
  10033. "enabled",
  10034. "formnovalidate",
  10035. "hidden",
  10036. "indeterminate",
  10037. "inert",
  10038. "ismap",
  10039. "itemscope",
  10040. "loop",
  10041. "multiple",
  10042. "muted",
  10043. "nohref",
  10044. "noresize",
  10045. "noshade",
  10046. "novalidate",
  10047. "nowrap",
  10048. "open",
  10049. "pauseonexit",
  10050. "readonly",
  10051. "required",
  10052. "reversed",
  10053. "scoped",
  10054. "seamless",
  10055. "selected",
  10056. "sortable",
  10057. "truespeed",
  10058. "typemustmatch",
  10059. "visible"
  10060. ];
  10061. const noWhitespaceCollapseElements = ["SCRIPT", "STYLE", "PRE", "TEXTAREA"];
  10062. // Source: https://www.w3.org/TR/html4/sgml/dtd.html#events (Generic Attributes)
  10063. const safeToRemoveAttrs = [
  10064. "id",
  10065. "class",
  10066. "style",
  10067. "lang",
  10068. "dir",
  10069. "onclick",
  10070. "ondblclick",
  10071. "onmousedown",
  10072. "onmouseup",
  10073. "onmouseover",
  10074. "onmousemove",
  10075. "onmouseout",
  10076. "onkeypress",
  10077. "onkeydown",
  10078. "onkeyup"
  10079. ];
  10080. const redundantAttributes = {
  10081. "FORM": {
  10082. "method": "get"
  10083. },
  10084. "SCRIPT": {
  10085. "language": "javascript",
  10086. "type": "text/javascript",
  10087. // Remove attribute if the function returns false
  10088. "charset": node => {
  10089. // The charset attribute only really makes sense on “external” SCRIPT elements:
  10090. // http://perfectionkills.com/optimizing-html/#8_script_charset
  10091. return !node.getAttribute("src");
  10092. }
  10093. },
  10094. "STYLE": {
  10095. "media": "all",
  10096. "type": "text/css"
  10097. },
  10098. "LINK": {
  10099. "media": "all"
  10100. }
  10101. };
  10102. const REGEXP_WHITESPACE = /[ \t\f\r]+/g;
  10103. const REGEXP_NEWLINE = /[\n]+/g;
  10104. const REGEXP_ENDS_WHITESPACE = /^\s+$/;
  10105. const NodeFilter_SHOW_ALL = 4294967295;
  10106. const Node_ELEMENT_NODE$1 = 1;
  10107. const Node_TEXT_NODE$1 = 3;
  10108. const Node_COMMENT_NODE$1 = 8;
  10109. const modules = [
  10110. collapseBooleanAttributes,
  10111. mergeTextNodes,
  10112. collapseWhitespace,
  10113. removeComments,
  10114. removeEmptyAttributes,
  10115. removeRedundantAttributes,
  10116. compressJSONLD
  10117. ];
  10118. function process$1(doc, options) {
  10119. removeEmptyInlineElements(doc);
  10120. const nodesWalker = doc.createTreeWalker(doc.documentElement, NodeFilter_SHOW_ALL, null, false);
  10121. let node = nodesWalker.nextNode();
  10122. while (node) {
  10123. const deletedNode = modules.find(module => module(node, options));
  10124. const previousNode = node;
  10125. node = nodesWalker.nextNode();
  10126. if (deletedNode) {
  10127. previousNode.remove();
  10128. }
  10129. }
  10130. }
  10131. function collapseBooleanAttributes(node) {
  10132. if (node.nodeType == Node_ELEMENT_NODE$1) {
  10133. Array.from(node.attributes).forEach(attribute => {
  10134. if (booleanAttributes.includes(attribute.name)) {
  10135. node.setAttribute(attribute.name, "");
  10136. }
  10137. });
  10138. }
  10139. }
  10140. function mergeTextNodes(node) {
  10141. if (node.nodeType == Node_TEXT_NODE$1) {
  10142. if (node.previousSibling && node.previousSibling.nodeType == Node_TEXT_NODE$1) {
  10143. node.textContent = node.previousSibling.textContent + node.textContent;
  10144. node.previousSibling.remove();
  10145. }
  10146. }
  10147. }
  10148. function collapseWhitespace(node, options) {
  10149. if (node.nodeType == Node_TEXT_NODE$1) {
  10150. let element = node.parentElement;
  10151. const spacePreserved = element.getAttribute(options.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME) == "";
  10152. if (!spacePreserved) {
  10153. const textContent = node.textContent;
  10154. let noWhitespace = noWhitespaceCollapse(element);
  10155. while (noWhitespace) {
  10156. element = element.parentElement;
  10157. noWhitespace = element && noWhitespaceCollapse(element);
  10158. }
  10159. if ((!element || noWhitespace) && textContent.length > 1) {
  10160. node.textContent = textContent.replace(REGEXP_WHITESPACE, getWhiteSpace(node)).replace(REGEXP_NEWLINE, "\n");
  10161. }
  10162. }
  10163. }
  10164. }
  10165. function getWhiteSpace(node) {
  10166. return node.parentElement && getTagName$1(node.parentElement) == "HEAD" ? "\n" : " ";
  10167. }
  10168. function noWhitespaceCollapse(element) {
  10169. return element && !noWhitespaceCollapseElements.includes(getTagName$1(element));
  10170. }
  10171. function removeComments(node) {
  10172. if (node.nodeType == Node_COMMENT_NODE$1 && getTagName$1(node.parentElement) != "HTML") {
  10173. return !node.textContent.toLowerCase().trim().startsWith("[if");
  10174. }
  10175. }
  10176. function removeEmptyAttributes(node) {
  10177. if (node.nodeType == Node_ELEMENT_NODE$1) {
  10178. Array.from(node.attributes).forEach(attribute => {
  10179. if (safeToRemoveAttrs.includes(attribute.name.toLowerCase())) {
  10180. const attributeValue = node.getAttribute(attribute.name);
  10181. if (attributeValue == "" || (attributeValue || "").match(REGEXP_ENDS_WHITESPACE)) {
  10182. node.removeAttribute(attribute.name);
  10183. }
  10184. }
  10185. });
  10186. }
  10187. }
  10188. function removeRedundantAttributes(node) {
  10189. if (node.nodeType == Node_ELEMENT_NODE$1) {
  10190. const tagRedundantAttributes = redundantAttributes[getTagName$1(node)];
  10191. if (tagRedundantAttributes) {
  10192. Object.keys(tagRedundantAttributes).forEach(redundantAttributeName => {
  10193. const tagRedundantAttributeValue = tagRedundantAttributes[redundantAttributeName];
  10194. if (typeof tagRedundantAttributeValue == "function" ? tagRedundantAttributeValue(node) : node.getAttribute(redundantAttributeName) == tagRedundantAttributeValue) {
  10195. node.removeAttribute(redundantAttributeName);
  10196. }
  10197. });
  10198. }
  10199. }
  10200. }
  10201. function compressJSONLD(node) {
  10202. if (node.nodeType == Node_ELEMENT_NODE$1 && getTagName$1(node) == "SCRIPT" && node.type == "application/ld+json" && node.textContent.trim()) {
  10203. try {
  10204. node.textContent = JSON.stringify(JSON.parse(node.textContent));
  10205. } catch (error) {
  10206. // ignored
  10207. }
  10208. }
  10209. }
  10210. function removeEmptyInlineElements(doc) {
  10211. doc.querySelectorAll("style, script:not([src])").forEach(element => {
  10212. if (!element.textContent.trim()) {
  10213. element.remove();
  10214. }
  10215. });
  10216. }
  10217. function getTagName$1(element) {
  10218. return element.tagName && element.tagName.toUpperCase();
  10219. }
  10220. var htmlMinifier = /*#__PURE__*/Object.freeze({
  10221. __proto__: null,
  10222. process: process$1
  10223. });
  10224. /*
  10225. * Copyright 2010-2022 Gildas Lormeau
  10226. * contact : gildas.lormeau <at> gmail.com
  10227. *
  10228. * This file is part of SingleFile.
  10229. *
  10230. * The code in this file is free software: you can redistribute it and/or
  10231. * modify it under the terms of the GNU Affero General Public License
  10232. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  10233. * of the License, or (at your option) any later version.
  10234. *
  10235. * The code in this file is distributed in the hope that it will be useful,
  10236. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10237. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  10238. * General Public License for more details.
  10239. *
  10240. * As additional permission under GNU AGPL version 3 section 7, you may
  10241. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  10242. * AGPL normally required by section 4, provided you include this license
  10243. * notice and a URL through which recipients can access the Corresponding
  10244. * Source.
  10245. */
  10246. const SELF_CLOSED_TAG_NAMES = ["AREA", "BASE", "BR", "COL", "COMMAND", "EMBED", "HR", "IMG", "INPUT", "KEYGEN", "LINK", "META", "PARAM", "SOURCE", "TRACK", "WBR"];
  10247. const Node_ELEMENT_NODE = 1;
  10248. const Node_TEXT_NODE = 3;
  10249. const Node_COMMENT_NODE = 8;
  10250. // see https://www.w3.org/TR/html5/syntax.html#optional-tags
  10251. const OMITTED_START_TAGS = [
  10252. { tagName: "HEAD", accept: element => !element.childNodes.length || element.childNodes[0].nodeType == Node_ELEMENT_NODE },
  10253. { tagName: "BODY", accept: element => !element.childNodes.length }
  10254. ];
  10255. const OMITTED_END_TAGS = [
  10256. { tagName: "HTML", accept: next => !next || next.nodeType != Node_COMMENT_NODE },
  10257. { tagName: "HEAD", accept: next => !next || (next.nodeType != Node_COMMENT_NODE && (next.nodeType != Node_TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
  10258. { tagName: "BODY", accept: next => !next || next.nodeType != Node_COMMENT_NODE },
  10259. { tagName: "LI", accept: (next, element) => (!next && element.parentElement && (getTagName(element.parentElement) == "UL" || getTagName(element.parentElement) == "OL")) || (next && ["LI"].includes(getTagName(next))) },
  10260. { tagName: "DT", accept: next => !next || ["DT", "DD"].includes(getTagName(next)) },
  10261. { tagName: "P", accept: next => next && ["ADDRESS", "ARTICLE", "ASIDE", "BLOCKQUOTE", "DETAILS", "DIV", "DL", "FIELDSET", "FIGCAPTION", "FIGURE", "FOOTER", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HEADER", "HR", "MAIN", "NAV", "OL", "P", "PRE", "SECTION", "TABLE", "UL"].includes(getTagName(next)) },
  10262. { tagName: "DD", accept: next => !next || ["DT", "DD"].includes(getTagName(next)) },
  10263. { tagName: "RT", accept: next => !next || ["RT", "RP"].includes(getTagName(next)) },
  10264. { tagName: "RP", accept: next => !next || ["RT", "RP"].includes(getTagName(next)) },
  10265. { tagName: "OPTGROUP", accept: next => !next || ["OPTGROUP"].includes(getTagName(next)) },
  10266. { tagName: "OPTION", accept: next => !next || ["OPTION", "OPTGROUP"].includes(getTagName(next)) },
  10267. { tagName: "COLGROUP", accept: next => !next || (next.nodeType != Node_COMMENT_NODE && (next.nodeType != Node_TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
  10268. { tagName: "CAPTION", accept: next => !next || (next.nodeType != Node_COMMENT_NODE && (next.nodeType != Node_TEXT_NODE || !startsWithSpaceChar(next.textContent))) },
  10269. { tagName: "THEAD", accept: next => !next || ["TBODY", "TFOOT"].includes(getTagName(next)) },
  10270. { tagName: "TBODY", accept: next => !next || ["TBODY", "TFOOT"].includes(getTagName(next)) },
  10271. { tagName: "TFOOT", accept: next => !next },
  10272. { tagName: "TR", accept: next => !next || ["TR"].includes(getTagName(next)) },
  10273. { tagName: "TD", accept: next => !next || ["TD", "TH"].includes(getTagName(next)) },
  10274. { tagName: "TH", accept: next => !next || ["TD", "TH"].includes(getTagName(next)) }
  10275. ];
  10276. const TEXT_NODE_TAGS = ["STYLE", "SCRIPT", "XMP", "IFRAME", "NOEMBED", "NOFRAMES", "PLAINTEXT", "NOSCRIPT"];
  10277. function process(doc, compressHTML) {
  10278. const docType = doc.doctype;
  10279. let docTypeString = "";
  10280. if (docType) {
  10281. docTypeString = "<!DOCTYPE " + docType.nodeName;
  10282. if (docType.publicId) {
  10283. docTypeString += " PUBLIC \"" + docType.publicId + "\"";
  10284. if (docType.systemId)
  10285. docTypeString += " \"" + docType.systemId + "\"";
  10286. } else if (docType.systemId)
  10287. docTypeString += " SYSTEM \"" + docType.systemId + "\"";
  10288. if (docType.internalSubset)
  10289. docTypeString += " [" + docType.internalSubset + "]";
  10290. docTypeString += "> ";
  10291. }
  10292. return docTypeString + serialize(doc.documentElement, compressHTML);
  10293. }
  10294. function serialize(node, compressHTML, isSVG) {
  10295. if (node.nodeType == Node_TEXT_NODE) {
  10296. return serializeTextNode(node);
  10297. } else if (node.nodeType == Node_COMMENT_NODE) {
  10298. return serializeCommentNode(node);
  10299. } else if (node.nodeType == Node_ELEMENT_NODE) {
  10300. return serializeElement(node, compressHTML, isSVG);
  10301. }
  10302. }
  10303. function serializeTextNode(textNode) {
  10304. const parentNode = textNode.parentNode;
  10305. let parentTagName;
  10306. if (parentNode && parentNode.nodeType == Node_ELEMENT_NODE) {
  10307. parentTagName = getTagName(parentNode);
  10308. }
  10309. if (!parentTagName || TEXT_NODE_TAGS.includes(parentTagName)) {
  10310. if (parentTagName == "SCRIPT" || parentTagName == "STYLE") {
  10311. return textNode.textContent.replace(/<\//gi, "<\\/").replace(/\/>/gi, "\\/>");
  10312. }
  10313. return textNode.textContent;
  10314. } else {
  10315. return textNode.textContent.replace(/&/g, "&amp;").replace(/\u00a0/g, "&nbsp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
  10316. }
  10317. }
  10318. function serializeCommentNode(commentNode) {
  10319. return "<!--" + commentNode.textContent + "-->";
  10320. }
  10321. function serializeElement(element, compressHTML, isSVG) {
  10322. const tagName = getTagName(element);
  10323. const omittedStartTag = compressHTML && OMITTED_START_TAGS.find(omittedStartTag => tagName == getTagName(omittedStartTag) && omittedStartTag.accept(element));
  10324. let content = "";
  10325. if (!omittedStartTag || element.attributes.length) {
  10326. content = "<" + tagName.toLowerCase();
  10327. Array.from(element.attributes).forEach(attribute => content += serializeAttribute(attribute, element, compressHTML));
  10328. content += ">";
  10329. }
  10330. if (tagName == "TEMPLATE" && !element.childNodes.length) {
  10331. content += element.innerHTML;
  10332. } else {
  10333. Array.from(element.childNodes).forEach(childNode => content += serialize(childNode, compressHTML, isSVG || tagName == "svg"));
  10334. }
  10335. const omittedEndTag = compressHTML && OMITTED_END_TAGS.find(omittedEndTag => tagName == getTagName(omittedEndTag) && omittedEndTag.accept(element.nextSibling, element));
  10336. if (isSVG || (!omittedEndTag && !SELF_CLOSED_TAG_NAMES.includes(tagName))) {
  10337. content += "</" + tagName.toLowerCase() + ">";
  10338. }
  10339. return content;
  10340. }
  10341. function serializeAttribute(attribute, element, compressHTML) {
  10342. const name = attribute.name;
  10343. let content = "";
  10344. if (!name.match(/["'>/=]/)) {
  10345. let value = attribute.value;
  10346. if (compressHTML && name == "class") {
  10347. value = Array.from(element.classList).map(className => className.trim()).join(" ");
  10348. }
  10349. let simpleQuotesValue;
  10350. value = value.replace(/&/g, "&amp;").replace(/\u00a0/g, "&nbsp;");
  10351. if (value.includes("\"")) {
  10352. if (value.includes("'") || !compressHTML) {
  10353. value = value.replace(/"/g, "&quot;");
  10354. } else {
  10355. simpleQuotesValue = true;
  10356. }
  10357. }
  10358. const invalidUnquotedValue = !compressHTML || value.match(/[ \t\n\f\r'"`=<>]/);
  10359. content += " ";
  10360. if (!attribute.namespace) {
  10361. content += name;
  10362. } else if (attribute.namespaceURI == "http://www.w3.org/XML/1998/namespace") {
  10363. content += "xml:" + name;
  10364. } else if (attribute.namespaceURI == "http://www.w3.org/2000/xmlns/") {
  10365. if (name !== "xmlns") {
  10366. content += "xmlns:";
  10367. }
  10368. content += name;
  10369. } else if (attribute.namespaceURI == "http://www.w3.org/1999/xlink") {
  10370. content += "xlink:" + name;
  10371. } else {
  10372. content += name;
  10373. }
  10374. if (value != "") {
  10375. content += "=";
  10376. if (invalidUnquotedValue) {
  10377. content += simpleQuotesValue ? "'" : "\"";
  10378. }
  10379. content += value;
  10380. if (invalidUnquotedValue) {
  10381. content += simpleQuotesValue ? "'" : "\"";
  10382. }
  10383. }
  10384. }
  10385. return content;
  10386. }
  10387. function startsWithSpaceChar(textContent) {
  10388. return Boolean(textContent.match(/^[ \t\n\f\r]/));
  10389. }
  10390. function getTagName(element) {
  10391. return element.tagName && element.tagName.toUpperCase();
  10392. }
  10393. var htmlSerializer = /*#__PURE__*/Object.freeze({
  10394. __proto__: null,
  10395. process: process
  10396. });
  10397. /*
  10398. * Copyright 2010-2022 Gildas Lormeau
  10399. * contact : gildas.lormeau <at> gmail.com
  10400. *
  10401. * This file is part of SingleFile.
  10402. *
  10403. * The code in this file is free software: you can redistribute it and/or
  10404. * modify it under the terms of the GNU Affero General Public License
  10405. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  10406. * of the License, or (at your option) any later version.
  10407. *
  10408. * The code in this file is distributed in the hope that it will be useful,
  10409. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10410. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  10411. * General Public License for more details.
  10412. *
  10413. * As additional permission under GNU AGPL version 3 section 7, you may
  10414. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  10415. * AGPL normally required by section 4, provided you include this license
  10416. * notice and a URL through which recipients can access the Corresponding
  10417. * Source.
  10418. */
  10419. function peg$subclass(child, parent) {
  10420. function ctor() { this.constructor = child; }
  10421. ctor.prototype = parent.prototype;
  10422. child.prototype = new ctor();
  10423. }
  10424. function peg$SyntaxError(message, expected, found, location) {
  10425. this.message = message;
  10426. this.expected = expected;
  10427. this.found = found;
  10428. this.location = location;
  10429. this.name = "SyntaxError";
  10430. if (typeof Error.captureStackTrace === "function") {
  10431. Error.captureStackTrace(this, peg$SyntaxError);
  10432. }
  10433. }
  10434. peg$subclass(peg$SyntaxError, Error);
  10435. peg$SyntaxError.buildMessage = function (expected, found) {
  10436. var DESCRIBE_EXPECTATION_FNS = {
  10437. literal: function (expectation) {
  10438. return "\"" + literalEscape(expectation.text) + "\"";
  10439. },
  10440. "class": function (expectation) {
  10441. var escapedParts = "",
  10442. i;
  10443. for (i = 0; i < expectation.parts.length; i++) {
  10444. escapedParts += expectation.parts[i] instanceof Array
  10445. ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1])
  10446. : classEscape(expectation.parts[i]);
  10447. }
  10448. return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
  10449. },
  10450. any: function () {
  10451. return "any character";
  10452. },
  10453. end: function () {
  10454. return "end of input";
  10455. },
  10456. other: function (expectation) {
  10457. return expectation.description;
  10458. }
  10459. };
  10460. function hex(ch) {
  10461. return ch.charCodeAt(0).toString(16).toUpperCase();
  10462. }
  10463. function literalEscape(s) {
  10464. return s
  10465. .replace(/\\/g, "\\\\")
  10466. .replace(/"/g, "\\\"")
  10467. .replace(/\0/g, "\\0")
  10468. .replace(/\t/g, "\\t")
  10469. .replace(/\n/g, "\\n")
  10470. .replace(/\r/g, "\\r")
  10471. .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
  10472. .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
  10473. }
  10474. function classEscape(s) {
  10475. return s
  10476. .replace(/\\/g, "\\\\")
  10477. .replace(/\]/g, "\\]")
  10478. .replace(/\^/g, "\\^")
  10479. .replace(/-/g, "\\-")
  10480. .replace(/\0/g, "\\0")
  10481. .replace(/\t/g, "\\t")
  10482. .replace(/\n/g, "\\n")
  10483. .replace(/\r/g, "\\r")
  10484. .replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
  10485. .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
  10486. }
  10487. function describeExpectation(expectation) {
  10488. return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
  10489. }
  10490. function describeExpected(expected) {
  10491. var descriptions = new Array(expected.length),
  10492. i, j;
  10493. for (i = 0; i < expected.length; i++) {
  10494. descriptions[i] = describeExpectation(expected[i]);
  10495. }
  10496. descriptions.sort();
  10497. if (descriptions.length > 0) {
  10498. for (i = 1, j = 1; i < descriptions.length; i++) {
  10499. if (descriptions[i - 1] !== descriptions[i]) {
  10500. descriptions[j] = descriptions[i];
  10501. j++;
  10502. }
  10503. }
  10504. descriptions.length = j;
  10505. }
  10506. switch (descriptions.length) {
  10507. case 1:
  10508. return descriptions[0];
  10509. case 2:
  10510. return descriptions[0] + " or " + descriptions[1];
  10511. default:
  10512. return descriptions.slice(0, -1).join(", ")
  10513. + ", or "
  10514. + descriptions[descriptions.length - 1];
  10515. }
  10516. }
  10517. function describeFound(found) {
  10518. return found ? "\"" + literalEscape(found) + "\"" : "end of input";
  10519. }
  10520. return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
  10521. };
  10522. async function peg$parse(input, options) {
  10523. options = options !== void 0 ? options : {};
  10524. var peg$FAILED = {},
  10525. peg$startRuleFunctions = { start: peg$parsestart },
  10526. peg$startRuleFunction = peg$parsestart,
  10527. peg$c0 = function (expression) { return expression.join(""); },
  10528. peg$c1 = "|",
  10529. peg$c2 = peg$literalExpectation("|", false),
  10530. peg$c3 = function (value) { return value; },
  10531. peg$c4 = "%",
  10532. peg$c5 = peg$literalExpectation("%", false),
  10533. peg$c6 = "<",
  10534. peg$c7 = peg$literalExpectation("<", false),
  10535. peg$c8 = ">",
  10536. peg$c9 = peg$literalExpectation(">", false),
  10537. peg$c10 = function (name, args, length) { return options.callFunction(name, args, length); },
  10538. peg$c11 = "{",
  10539. peg$c12 = peg$literalExpectation("{", false),
  10540. peg$c13 = "}",
  10541. peg$c14 = peg$literalExpectation("}", false),
  10542. peg$c15 = function (name, length) { return options.getVariableValue(name, length); },
  10543. peg$c16 = "[",
  10544. peg$c17 = peg$literalExpectation("[", false),
  10545. peg$c18 = "]",
  10546. peg$c19 = peg$literalExpectation("]", false),
  10547. peg$c20 = function (length, unit) { return { length, unit }; },
  10548. peg$c21 = "ch",
  10549. peg$c22 = peg$literalExpectation("ch", false),
  10550. peg$c23 = /^[a-z0-9-]/,
  10551. peg$c24 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false),
  10552. peg$c25 = function () { return text(); },
  10553. peg$c26 = /^[0-9]/,
  10554. peg$c27 = peg$classExpectation([["0", "9"]], false, false),
  10555. peg$c28 = function () { return Number(text()); },
  10556. peg$c29 = "\\\\%",
  10557. peg$c30 = peg$literalExpectation("\\\\%", false),
  10558. peg$c31 = "\\\\{",
  10559. peg$c32 = peg$literalExpectation("\\\\{", false),
  10560. peg$c33 = "\\\\|",
  10561. peg$c34 = peg$literalExpectation("\\\\|", false),
  10562. peg$c35 = "\\\\>",
  10563. peg$c36 = peg$literalExpectation("\\\\>", false),
  10564. peg$c37 = peg$anyExpectation(),
  10565. peg$currPos = 0,
  10566. peg$savedPos = 0,
  10567. peg$posDetailsCache = [{ line: 1, column: 1 }],
  10568. peg$maxFailPos = 0,
  10569. peg$maxFailExpected = [],
  10570. peg$silentFails = 0,
  10571. peg$result;
  10572. if ("startRule" in options) {
  10573. if (!(options.startRule in peg$startRuleFunctions)) {
  10574. throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
  10575. }
  10576. peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
  10577. }
  10578. function text() {
  10579. return input.substring(peg$savedPos, peg$currPos);
  10580. }
  10581. function peg$literalExpectation(text, ignoreCase) {
  10582. return { type: "literal", text: text, ignoreCase: ignoreCase };
  10583. }
  10584. function peg$classExpectation(parts, inverted, ignoreCase) {
  10585. return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
  10586. }
  10587. function peg$anyExpectation() {
  10588. return { type: "any" };
  10589. }
  10590. function peg$endExpectation() {
  10591. return { type: "end" };
  10592. }
  10593. function peg$computePosDetails(pos) {
  10594. var details = peg$posDetailsCache[pos], p;
  10595. if (details) {
  10596. return details;
  10597. } else {
  10598. p = pos - 1;
  10599. while (!peg$posDetailsCache[p]) {
  10600. p--;
  10601. }
  10602. details = peg$posDetailsCache[p];
  10603. details = {
  10604. line: details.line,
  10605. column: details.column
  10606. };
  10607. while (p < pos) {
  10608. if (input.charCodeAt(p) === 10) {
  10609. details.line++;
  10610. details.column = 1;
  10611. } else {
  10612. details.column++;
  10613. }
  10614. p++;
  10615. }
  10616. peg$posDetailsCache[pos] = details;
  10617. return details;
  10618. }
  10619. }
  10620. function peg$computeLocation(startPos, endPos) {
  10621. var startPosDetails = peg$computePosDetails(startPos),
  10622. endPosDetails = peg$computePosDetails(endPos);
  10623. return {
  10624. start: {
  10625. offset: startPos,
  10626. line: startPosDetails.line,
  10627. column: startPosDetails.column
  10628. },
  10629. end: {
  10630. offset: endPos,
  10631. line: endPosDetails.line,
  10632. column: endPosDetails.column
  10633. }
  10634. };
  10635. }
  10636. function peg$fail(expected) {
  10637. if (peg$currPos < peg$maxFailPos) { return; }
  10638. if (peg$currPos > peg$maxFailPos) {
  10639. peg$maxFailPos = peg$currPos;
  10640. peg$maxFailExpected = [];
  10641. }
  10642. peg$maxFailExpected.push(expected);
  10643. }
  10644. function peg$buildStructuredError(expected, found, location) {
  10645. return new peg$SyntaxError(
  10646. peg$SyntaxError.buildMessage(expected, found),
  10647. expected,
  10648. found,
  10649. location
  10650. );
  10651. }
  10652. async function peg$parsestart() {
  10653. var s0;
  10654. s0 = await peg$parseexpression();
  10655. return s0;
  10656. }
  10657. async function peg$parseexpression() {
  10658. var s0, s1, s2;
  10659. s0 = peg$currPos;
  10660. s1 = [];
  10661. s2 = await peg$parsestatement();
  10662. while (s2 !== peg$FAILED) {
  10663. s1.push(s2);
  10664. s2 = await peg$parsestatement();
  10665. }
  10666. if (s1 !== peg$FAILED) {
  10667. peg$savedPos = s0;
  10668. s1 = peg$c0(s1);
  10669. }
  10670. s0 = s1;
  10671. return s0;
  10672. }
  10673. async function peg$parsestatement() {
  10674. var s0;
  10675. s0 = await peg$parsefunctionCall();
  10676. if (s0 === peg$FAILED) {
  10677. s0 = await peg$parsevariable();
  10678. if (s0 === peg$FAILED) {
  10679. s0 = peg$parsetext();
  10680. }
  10681. }
  10682. return s0;
  10683. }
  10684. async function peg$parsearg() {
  10685. var s0, s1, s2;
  10686. s0 = peg$currPos;
  10687. if (input.charCodeAt(peg$currPos) === 124) {
  10688. s1 = peg$c1;
  10689. peg$currPos++;
  10690. } else {
  10691. s1 = peg$FAILED;
  10692. if (peg$silentFails === 0) { peg$fail(peg$c2); }
  10693. }
  10694. if (s1 !== peg$FAILED) {
  10695. s2 = await peg$parseexpression();
  10696. if (s2 !== peg$FAILED) {
  10697. peg$savedPos = s0;
  10698. s1 = peg$c3(s2);
  10699. s0 = s1;
  10700. } else {
  10701. peg$currPos = s0;
  10702. s0 = peg$FAILED;
  10703. }
  10704. } else {
  10705. peg$currPos = s0;
  10706. s0 = peg$FAILED;
  10707. }
  10708. return s0;
  10709. }
  10710. async function peg$parseoptionalArgs() {
  10711. var s0, s1;
  10712. s0 = [];
  10713. s1 = await peg$parsearg();
  10714. if (s1 !== peg$FAILED) {
  10715. while (s1 !== peg$FAILED) {
  10716. s0.push(s1);
  10717. s1 = await peg$parsearg();
  10718. }
  10719. } else {
  10720. s0 = peg$FAILED;
  10721. }
  10722. return s0;
  10723. }
  10724. async function peg$parseargs() {
  10725. var s0, s1, s2;
  10726. s0 = peg$currPos;
  10727. s1 = await peg$parseexpression();
  10728. if (s1 !== peg$FAILED) {
  10729. s2 = await peg$parseoptionalArgs();
  10730. if (s2 === peg$FAILED) {
  10731. s2 = null;
  10732. }
  10733. if (s2 !== peg$FAILED) {
  10734. s1 = [s1, s2];
  10735. s0 = s1;
  10736. } else {
  10737. peg$currPos = s0;
  10738. s0 = peg$FAILED;
  10739. }
  10740. } else {
  10741. peg$currPos = s0;
  10742. s0 = peg$FAILED;
  10743. }
  10744. return s0;
  10745. }
  10746. async function peg$parsefunctionCall() {
  10747. var s0, s1, s2, s3, s4, s5, s6;
  10748. s0 = peg$currPos;
  10749. if (input.charCodeAt(peg$currPos) === 37) {
  10750. s1 = peg$c4;
  10751. peg$currPos++;
  10752. } else {
  10753. s1 = peg$FAILED;
  10754. if (peg$silentFails === 0) { peg$fail(peg$c5); }
  10755. }
  10756. if (s1 !== peg$FAILED) {
  10757. s2 = peg$parseidentifier();
  10758. if (s2 !== peg$FAILED) {
  10759. if (input.charCodeAt(peg$currPos) === 60) {
  10760. s3 = peg$c6;
  10761. peg$currPos++;
  10762. } else {
  10763. s3 = peg$FAILED;
  10764. if (peg$silentFails === 0) { peg$fail(peg$c7); }
  10765. }
  10766. if (s3 !== peg$FAILED) {
  10767. s4 = await peg$parseargs();
  10768. if (s4 !== peg$FAILED) {
  10769. if (input.charCodeAt(peg$currPos) === 62) {
  10770. s5 = peg$c8;
  10771. peg$currPos++;
  10772. } else {
  10773. s5 = peg$FAILED;
  10774. if (peg$silentFails === 0) { peg$fail(peg$c9); }
  10775. }
  10776. if (s5 !== peg$FAILED) {
  10777. s6 = peg$parseresultLength();
  10778. if (s6 === peg$FAILED) {
  10779. s6 = null;
  10780. }
  10781. if (s6 !== peg$FAILED) {
  10782. peg$savedPos = s0;
  10783. s1 = await peg$c10(s2, s4, s6);
  10784. s0 = s1;
  10785. } else {
  10786. peg$currPos = s0;
  10787. s0 = peg$FAILED;
  10788. }
  10789. } else {
  10790. peg$currPos = s0;
  10791. s0 = peg$FAILED;
  10792. }
  10793. } else {
  10794. peg$currPos = s0;
  10795. s0 = peg$FAILED;
  10796. }
  10797. } else {
  10798. peg$currPos = s0;
  10799. s0 = peg$FAILED;
  10800. }
  10801. } else {
  10802. peg$currPos = s0;
  10803. s0 = peg$FAILED;
  10804. }
  10805. } else {
  10806. peg$currPos = s0;
  10807. s0 = peg$FAILED;
  10808. }
  10809. return s0;
  10810. }
  10811. async function peg$parsevariable() {
  10812. var s0, s1, s2, s3, s4;
  10813. s0 = peg$currPos;
  10814. if (input.charCodeAt(peg$currPos) === 123) {
  10815. s1 = peg$c11;
  10816. peg$currPos++;
  10817. } else {
  10818. s1 = peg$FAILED;
  10819. if (peg$silentFails === 0) { peg$fail(peg$c12); }
  10820. }
  10821. if (s1 !== peg$FAILED) {
  10822. s2 = peg$parseidentifier();
  10823. if (s2 !== peg$FAILED) {
  10824. if (input.charCodeAt(peg$currPos) === 125) {
  10825. s3 = peg$c13;
  10826. peg$currPos++;
  10827. } else {
  10828. s3 = peg$FAILED;
  10829. if (peg$silentFails === 0) { peg$fail(peg$c14); }
  10830. }
  10831. if (s3 !== peg$FAILED) {
  10832. s4 = peg$parseresultLength();
  10833. if (s4 === peg$FAILED) {
  10834. s4 = null;
  10835. }
  10836. if (s4 !== peg$FAILED) {
  10837. peg$savedPos = s0;
  10838. s1 = await peg$c15(s2, s4);
  10839. s0 = s1;
  10840. } else {
  10841. peg$currPos = s0;
  10842. s0 = peg$FAILED;
  10843. }
  10844. } else {
  10845. peg$currPos = s0;
  10846. s0 = peg$FAILED;
  10847. }
  10848. } else {
  10849. peg$currPos = s0;
  10850. s0 = peg$FAILED;
  10851. }
  10852. } else {
  10853. peg$currPos = s0;
  10854. s0 = peg$FAILED;
  10855. }
  10856. return s0;
  10857. }
  10858. function peg$parseresultLength() {
  10859. var s0, s1, s2, s3, s4;
  10860. s0 = peg$currPos;
  10861. if (input.charCodeAt(peg$currPos) === 91) {
  10862. s1 = peg$c16;
  10863. peg$currPos++;
  10864. } else {
  10865. s1 = peg$FAILED;
  10866. if (peg$silentFails === 0) { peg$fail(peg$c17); }
  10867. }
  10868. if (s1 !== peg$FAILED) {
  10869. s2 = peg$parsenumber();
  10870. if (s2 !== peg$FAILED) {
  10871. s3 = peg$parselengthUnit();
  10872. if (s3 !== peg$FAILED) {
  10873. if (input.charCodeAt(peg$currPos) === 93) {
  10874. s4 = peg$c18;
  10875. peg$currPos++;
  10876. } else {
  10877. s4 = peg$FAILED;
  10878. if (peg$silentFails === 0) { peg$fail(peg$c19); }
  10879. }
  10880. if (s4 !== peg$FAILED) {
  10881. peg$savedPos = s0;
  10882. s1 = peg$c20(s2, s3);
  10883. s0 = s1;
  10884. } else {
  10885. peg$currPos = s0;
  10886. s0 = peg$FAILED;
  10887. }
  10888. } else {
  10889. peg$currPos = s0;
  10890. s0 = peg$FAILED;
  10891. }
  10892. } else {
  10893. peg$currPos = s0;
  10894. s0 = peg$FAILED;
  10895. }
  10896. } else {
  10897. peg$currPos = s0;
  10898. s0 = peg$FAILED;
  10899. }
  10900. return s0;
  10901. }
  10902. function peg$parselengthUnit() {
  10903. var s0;
  10904. if (input.substr(peg$currPos, 2) === peg$c21) {
  10905. s0 = peg$c21;
  10906. peg$currPos += 2;
  10907. } else {
  10908. s0 = peg$FAILED;
  10909. if (peg$silentFails === 0) { peg$fail(peg$c22); }
  10910. }
  10911. if (s0 === peg$FAILED) {
  10912. s0 = null;
  10913. }
  10914. return s0;
  10915. }
  10916. function peg$parseidentifier() {
  10917. var s0, s1, s2;
  10918. s0 = peg$currPos;
  10919. s1 = [];
  10920. if (peg$c23.test(input.charAt(peg$currPos))) {
  10921. s2 = input.charAt(peg$currPos);
  10922. peg$currPos++;
  10923. } else {
  10924. s2 = peg$FAILED;
  10925. if (peg$silentFails === 0) { peg$fail(peg$c24); }
  10926. }
  10927. if (s2 !== peg$FAILED) {
  10928. while (s2 !== peg$FAILED) {
  10929. s1.push(s2);
  10930. if (peg$c23.test(input.charAt(peg$currPos))) {
  10931. s2 = input.charAt(peg$currPos);
  10932. peg$currPos++;
  10933. } else {
  10934. s2 = peg$FAILED;
  10935. if (peg$silentFails === 0) { peg$fail(peg$c24); }
  10936. }
  10937. }
  10938. } else {
  10939. s1 = peg$FAILED;
  10940. }
  10941. if (s1 !== peg$FAILED) {
  10942. peg$savedPos = s0;
  10943. s1 = peg$c25();
  10944. }
  10945. s0 = s1;
  10946. return s0;
  10947. }
  10948. function peg$parsenumber() {
  10949. var s0, s1, s2;
  10950. s0 = peg$currPos;
  10951. s1 = [];
  10952. if (peg$c26.test(input.charAt(peg$currPos))) {
  10953. s2 = input.charAt(peg$currPos);
  10954. peg$currPos++;
  10955. } else {
  10956. s2 = peg$FAILED;
  10957. if (peg$silentFails === 0) { peg$fail(peg$c27); }
  10958. }
  10959. if (s2 !== peg$FAILED) {
  10960. while (s2 !== peg$FAILED) {
  10961. s1.push(s2);
  10962. if (peg$c26.test(input.charAt(peg$currPos))) {
  10963. s2 = input.charAt(peg$currPos);
  10964. peg$currPos++;
  10965. } else {
  10966. s2 = peg$FAILED;
  10967. if (peg$silentFails === 0) { peg$fail(peg$c27); }
  10968. }
  10969. }
  10970. } else {
  10971. s1 = peg$FAILED;
  10972. }
  10973. if (s1 !== peg$FAILED) {
  10974. peg$savedPos = s0;
  10975. s1 = peg$c28();
  10976. }
  10977. s0 = s1;
  10978. return s0;
  10979. }
  10980. function peg$parsetext() {
  10981. var s0, s1, s2;
  10982. s0 = peg$currPos;
  10983. s1 = [];
  10984. s2 = peg$parsechar();
  10985. if (s2 !== peg$FAILED) {
  10986. while (s2 !== peg$FAILED) {
  10987. s1.push(s2);
  10988. s2 = peg$parsechar();
  10989. }
  10990. } else {
  10991. s1 = peg$FAILED;
  10992. }
  10993. if (s1 !== peg$FAILED) {
  10994. peg$savedPos = s0;
  10995. s1 = peg$c25();
  10996. }
  10997. s0 = s1;
  10998. return s0;
  10999. }
  11000. function peg$parsechar() {
  11001. var s0, s1, s2, s3, s4, s5;
  11002. s0 = peg$currPos;
  11003. s1 = peg$currPos;
  11004. peg$silentFails++;
  11005. if (input.charCodeAt(peg$currPos) === 37) {
  11006. s2 = peg$c4;
  11007. peg$currPos++;
  11008. } else {
  11009. s2 = peg$FAILED;
  11010. if (peg$silentFails === 0) { peg$fail(peg$c5); }
  11011. }
  11012. peg$silentFails--;
  11013. if (s2 === peg$FAILED) {
  11014. s1 = void 0;
  11015. } else {
  11016. peg$currPos = s1;
  11017. s1 = peg$FAILED;
  11018. }
  11019. if (s1 !== peg$FAILED) {
  11020. s2 = peg$currPos;
  11021. peg$silentFails++;
  11022. if (input.charCodeAt(peg$currPos) === 123) {
  11023. s3 = peg$c11;
  11024. peg$currPos++;
  11025. } else {
  11026. s3 = peg$FAILED;
  11027. if (peg$silentFails === 0) { peg$fail(peg$c12); }
  11028. }
  11029. peg$silentFails--;
  11030. if (s3 === peg$FAILED) {
  11031. s2 = void 0;
  11032. } else {
  11033. peg$currPos = s2;
  11034. s2 = peg$FAILED;
  11035. }
  11036. if (s2 !== peg$FAILED) {
  11037. s3 = peg$currPos;
  11038. peg$silentFails++;
  11039. if (input.charCodeAt(peg$currPos) === 124) {
  11040. s4 = peg$c1;
  11041. peg$currPos++;
  11042. } else {
  11043. s4 = peg$FAILED;
  11044. if (peg$silentFails === 0) { peg$fail(peg$c2); }
  11045. }
  11046. peg$silentFails--;
  11047. if (s4 === peg$FAILED) {
  11048. s3 = void 0;
  11049. } else {
  11050. peg$currPos = s3;
  11051. s3 = peg$FAILED;
  11052. }
  11053. if (s3 !== peg$FAILED) {
  11054. s4 = peg$currPos;
  11055. peg$silentFails++;
  11056. if (input.charCodeAt(peg$currPos) === 62) {
  11057. s5 = peg$c8;
  11058. peg$currPos++;
  11059. } else {
  11060. s5 = peg$FAILED;
  11061. if (peg$silentFails === 0) { peg$fail(peg$c9); }
  11062. }
  11063. peg$silentFails--;
  11064. if (s5 === peg$FAILED) {
  11065. s4 = void 0;
  11066. } else {
  11067. peg$currPos = s4;
  11068. s4 = peg$FAILED;
  11069. }
  11070. if (s4 !== peg$FAILED) {
  11071. s5 = peg$parseescapedChar();
  11072. if (s5 !== peg$FAILED) {
  11073. s1 = [s1, s2, s3, s4, s5];
  11074. s0 = s1;
  11075. } else {
  11076. peg$currPos = s0;
  11077. s0 = peg$FAILED;
  11078. }
  11079. } else {
  11080. peg$currPos = s0;
  11081. s0 = peg$FAILED;
  11082. }
  11083. } else {
  11084. peg$currPos = s0;
  11085. s0 = peg$FAILED;
  11086. }
  11087. } else {
  11088. peg$currPos = s0;
  11089. s0 = peg$FAILED;
  11090. }
  11091. } else {
  11092. peg$currPos = s0;
  11093. s0 = peg$FAILED;
  11094. }
  11095. return s0;
  11096. }
  11097. function peg$parseescapedChar() {
  11098. var s0;
  11099. if (input.substr(peg$currPos, 3) === peg$c29) {
  11100. s0 = peg$c29;
  11101. peg$currPos += 3;
  11102. } else {
  11103. s0 = peg$FAILED;
  11104. if (peg$silentFails === 0) { peg$fail(peg$c30); }
  11105. }
  11106. if (s0 === peg$FAILED) {
  11107. if (input.substr(peg$currPos, 3) === peg$c31) {
  11108. s0 = peg$c31;
  11109. peg$currPos += 3;
  11110. } else {
  11111. s0 = peg$FAILED;
  11112. if (peg$silentFails === 0) { peg$fail(peg$c32); }
  11113. }
  11114. if (s0 === peg$FAILED) {
  11115. if (input.substr(peg$currPos, 3) === peg$c33) {
  11116. s0 = peg$c33;
  11117. peg$currPos += 3;
  11118. } else {
  11119. s0 = peg$FAILED;
  11120. if (peg$silentFails === 0) { peg$fail(peg$c34); }
  11121. }
  11122. if (s0 === peg$FAILED) {
  11123. if (input.substr(peg$currPos, 3) === peg$c35) {
  11124. s0 = peg$c35;
  11125. peg$currPos += 3;
  11126. } else {
  11127. s0 = peg$FAILED;
  11128. if (peg$silentFails === 0) { peg$fail(peg$c36); }
  11129. }
  11130. if (s0 === peg$FAILED) {
  11131. if (input.length > peg$currPos) {
  11132. s0 = input.charAt(peg$currPos);
  11133. peg$currPos++;
  11134. } else {
  11135. s0 = peg$FAILED;
  11136. if (peg$silentFails === 0) { peg$fail(peg$c37); }
  11137. }
  11138. }
  11139. }
  11140. }
  11141. }
  11142. return s0;
  11143. }
  11144. peg$result = await peg$startRuleFunction();
  11145. if (peg$result !== peg$FAILED && peg$currPos === input.length) {
  11146. return peg$result;
  11147. } else {
  11148. if (peg$result !== peg$FAILED && peg$currPos < input.length) {
  11149. peg$fail(peg$endExpectation());
  11150. }
  11151. throw peg$buildStructuredError(
  11152. peg$maxFailExpected,
  11153. peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
  11154. peg$maxFailPos < input.length
  11155. ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
  11156. : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
  11157. );
  11158. }
  11159. }
  11160. /*
  11161. * Copyright 2010-2022 Gildas Lormeau
  11162. * contact : gildas.lormeau <at> gmail.com
  11163. *
  11164. * This file is part of SingleFile.
  11165. *
  11166. * The code in this file is free software: you can redistribute it and/or
  11167. * modify it under the terms of the GNU Affero General Public License
  11168. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  11169. * of the License, or (at your option) any later version.
  11170. *
  11171. * The code in this file is distributed in the hope that it will be useful,
  11172. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11173. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  11174. * General Public License for more details.
  11175. *
  11176. * As additional permission under GNU AGPL version 3 section 7, you may
  11177. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  11178. * AGPL normally required by section 4, provided you include this license
  11179. * notice and a URL through which recipients can access the Corresponding
  11180. * Source.
  11181. */
  11182. const Blob$3 = globalThis.Blob;
  11183. const FileReader$3 = globalThis.FileReader;
  11184. const URL$2 = globalThis.URL;
  11185. const URLSearchParams$1 = globalThis.URLSearchParams;
  11186. // eslint-disable-next-line quotes
  11187. const DEFAULT_REPLACED_CHARACTERS$1 = ["~", "+", "\\\\", "?", "%", "*", ":", "|", '"', "<", ">", "\x00-\x1f", "\x7F"];
  11188. const DEFAULT_REPLACEMENT_CHARACTER$1 = "_";
  11189. const REGEXP_ESCAPE = /([{}()^$&.*?/+|[\\\\]|\]|-)/g;
  11190. const EMOJI_NAMES = {
  11191. "😀": "grinning-face",
  11192. "😃": "grinning-face-with-big-eyes",
  11193. "😄": "grinning-face-with-smiling-eyes",
  11194. "😁": "beaming-face-with-smiling-eyes",
  11195. "😆": "grinning-squinting-face",
  11196. "😅": "grinning-face-with-sweat",
  11197. "🤣": "rolling-on-the-floor-laughing",
  11198. "😂": "face-with-tears-of-joy",
  11199. "🙂": "slightly-smiling-face",
  11200. "🙃": "upside-down-face",
  11201. "🫠": "melting-face",
  11202. "😉": "winking-face",
  11203. "😊": "smiling-face-with-smiling-eyes",
  11204. "😇": "smiling-face-with-halo",
  11205. "🥰": "smiling-face-with-hearts",
  11206. "😍": "smiling-face-with-heart-eyes",
  11207. "🤩": "star-struck",
  11208. "😘": "face-blowing-a-kiss",
  11209. "😗": "kissing-face",
  11210. "☺": "smiling-face",
  11211. "😚": "kissing-face-with-closed-eyes",
  11212. "😙": "kissing-face-with-smiling-eyes",
  11213. "🥲": "smiling-face-with-tear",
  11214. "😋": "face-savoring-food",
  11215. "😛": "face-with-tongue",
  11216. "😜": "winking-face-with-tongue",
  11217. "🤪": "zany-face",
  11218. "😝": "squinting-face-with-tongue",
  11219. "🤑": "money-mouth-face",
  11220. "🤗": "smiling-face-with-open-hands",
  11221. "🤭": "face-with-hand-over-mouth",
  11222. "🫢": "face-with-open-eyes-and-hand-over-mouth",
  11223. "🫣": "face-with-peeking-eye",
  11224. "🤫": "shushing-face",
  11225. "🤔": "thinking-face",
  11226. "🫡": "saluting-face",
  11227. "🤐": "zipper-mouth-face",
  11228. "🤨": "face-with-raised-eyebrow",
  11229. "😐": "neutral-face",
  11230. "😑": "expressionless-face",
  11231. "😶": "face-without-mouth",
  11232. "🫥": "dotted-line-face",
  11233. "😶‍🌫️": "face-in-clouds",
  11234. "😏": "smirking-face",
  11235. "😒": "unamused-face",
  11236. "🙄": "face-with-rolling-eyes",
  11237. "😬": "grimacing-face",
  11238. "😮‍💨": "face-exhaling",
  11239. "🤥": "lying-face",
  11240. "🫨": "⊛-shaking-face",
  11241. "😌": "relieved-face",
  11242. "😔": "pensive-face",
  11243. "😪": "sleepy-face",
  11244. "🤤": "drooling-face",
  11245. "😴": "sleeping-face",
  11246. "😷": "face-with-medical-mask",
  11247. "🤒": "face-with-thermometer",
  11248. "🤕": "face-with-head-bandage",
  11249. "🤢": "nauseated-face",
  11250. "🤮": "face-vomiting",
  11251. "🤧": "sneezing-face",
  11252. "🥵": "hot-face",
  11253. "🥶": "cold-face",
  11254. "🥴": "woozy-face",
  11255. "😵": "face-with-crossed-out-eyes",
  11256. "😵‍💫": "face-with-spiral-eyes",
  11257. "🤯": "exploding-head",
  11258. "🤠": "cowboy-hat-face",
  11259. "🥳": "partying-face",
  11260. "🥸": "disguised-face",
  11261. "😎": "smiling-face-with-sunglasses",
  11262. "🤓": "nerd-face",
  11263. "🧐": "face-with-monocle",
  11264. "😕": "confused-face",
  11265. "🫤": "face-with-diagonal-mouth",
  11266. "😟": "worried-face",
  11267. "🙁": "slightly-frowning-face",
  11268. "☹": "frowning-face",
  11269. "😮": "face-with-open-mouth",
  11270. "😯": "hushed-face",
  11271. "😲": "astonished-face",
  11272. "😳": "flushed-face",
  11273. "🥺": "pleading-face",
  11274. "🥹": "face-holding-back-tears",
  11275. "😦": "frowning-face-with-open-mouth",
  11276. "😧": "anguished-face",
  11277. "😨": "fearful-face",
  11278. "😰": "anxious-face-with-sweat",
  11279. "😥": "sad-but-relieved-face",
  11280. "😢": "crying-face",
  11281. "😭": "loudly-crying-face",
  11282. "😱": "face-screaming-in-fear",
  11283. "😖": "confounded-face",
  11284. "😣": "persevering-face",
  11285. "😞": "disappointed-face",
  11286. "😓": "downcast-face-with-sweat",
  11287. "😩": "weary-face",
  11288. "😫": "tired-face",
  11289. "🥱": "yawning-face",
  11290. "😤": "face-with-steam-from-nose",
  11291. "😡": "enraged-face",
  11292. "😠": "angry-face",
  11293. "🤬": "face-with-symbols-on-mouth",
  11294. "😈": "smiling-face-with-horns",
  11295. "👿": "angry-face-with-horns",
  11296. "💀": "skull",
  11297. "☠": "skull-and-crossbones",
  11298. "💩": "pile-of-poo",
  11299. "🤡": "clown-face",
  11300. "👹": "ogre",
  11301. "👺": "goblin",
  11302. "👻": "ghost",
  11303. "👽": "alien",
  11304. "👾": "alien-monster",
  11305. "🤖": "robot",
  11306. "😺": "grinning-cat",
  11307. "😸": "grinning-cat-with-smiling-eyes",
  11308. "😹": "cat-with-tears-of-joy",
  11309. "😻": "smiling-cat-with-heart-eyes",
  11310. "😼": "cat-with-wry-smile",
  11311. "😽": "kissing-cat",
  11312. "🙀": "weary-cat",
  11313. "😿": "crying-cat",
  11314. "😾": "pouting-cat",
  11315. "🙈": "see-no-evil-monkey",
  11316. "🙉": "hear-no-evil-monkey",
  11317. "🙊": "speak-no-evil-monkey",
  11318. "💌": "love-letter",
  11319. "💘": "heart-with-arrow",
  11320. "💝": "heart-with-ribbon",
  11321. "💖": "sparkling-heart",
  11322. "💗": "growing-heart",
  11323. "💓": "beating-heart",
  11324. "💞": "revolving-hearts",
  11325. "💕": "two-hearts",
  11326. "💟": "heart-decoration",
  11327. "❣": "heart-exclamation",
  11328. "💔": "broken-heart",
  11329. "❤️‍🔥": "heart-on-fire",
  11330. "❤️‍🩹": "mending-heart",
  11331. "❤": "red-heart",
  11332. "🩷": "⊛-pink-heart",
  11333. "🧡": "orange-heart",
  11334. "💛": "yellow-heart",
  11335. "💚": "green-heart",
  11336. "💙": "blue-heart",
  11337. "🩵": "⊛-light-blue-heart",
  11338. "💜": "purple-heart",
  11339. "🤎": "brown-heart",
  11340. "🖤": "black-heart",
  11341. "🩶": "⊛-grey-heart",
  11342. "🤍": "white-heart",
  11343. "💋": "kiss-mark",
  11344. "💯": "hundred-points",
  11345. "💢": "anger-symbol",
  11346. "💥": "collision",
  11347. "💫": "dizzy",
  11348. "💦": "sweat-droplets",
  11349. "💨": "dashing-away",
  11350. "🕳": "hole",
  11351. "💬": "speech-balloon",
  11352. "👁️‍🗨️": "eye-in-speech-bubble",
  11353. "🗨": "left-speech-bubble",
  11354. "🗯": "right-anger-bubble",
  11355. "💭": "thought-balloon",
  11356. "💤": "zzz",
  11357. "👋": "waving-hand",
  11358. "🤚": "raised-back-of-hand",
  11359. "🖐": "hand-with-fingers-splayed",
  11360. "✋": "raised-hand",
  11361. "🖖": "vulcan-salute",
  11362. "🫱": "rightwards-hand",
  11363. "🫲": "leftwards-hand",
  11364. "🫳": "palm-down-hand",
  11365. "🫴": "palm-up-hand",
  11366. "🫷": "⊛-leftwards-pushing-hand",
  11367. "🫸": "⊛-rightwards-pushing-hand",
  11368. "👌": "ok-hand",
  11369. "🤌": "pinched-fingers",
  11370. "🤏": "pinching-hand",
  11371. "✌": "victory-hand",
  11372. "🤞": "crossed-fingers",
  11373. "🫰": "hand-with-index-finger-and-thumb-crossed",
  11374. "🤟": "love-you-gesture",
  11375. "🤘": "sign-of-the-horns",
  11376. "🤙": "call-me-hand",
  11377. "👈": "backhand-index-pointing-left",
  11378. "👉": "backhand-index-pointing-right",
  11379. "👆": "backhand-index-pointing-up",
  11380. "🖕": "middle-finger",
  11381. "👇": "backhand-index-pointing-down",
  11382. "☝": "index-pointing-up",
  11383. "🫵": "index-pointing-at-the-viewer",
  11384. "👍": "thumbs-up",
  11385. "👎": "thumbs-down",
  11386. "✊": "raised-fist",
  11387. "👊": "oncoming-fist",
  11388. "🤛": "left-facing-fist",
  11389. "🤜": "right-facing-fist",
  11390. "👏": "clapping-hands",
  11391. "🙌": "raising-hands",
  11392. "🫶": "heart-hands",
  11393. "👐": "open-hands",
  11394. "🤲": "palms-up-together",
  11395. "🤝": "handshake",
  11396. "🙏": "folded-hands",
  11397. "✍": "writing-hand",
  11398. "💅": "nail-polish",
  11399. "🤳": "selfie",
  11400. "💪": "flexed-biceps",
  11401. "🦾": "mechanical-arm",
  11402. "🦿": "mechanical-leg",
  11403. "🦵": "leg",
  11404. "🦶": "foot",
  11405. "👂": "ear",
  11406. "🦻": "ear-with-hearing-aid",
  11407. "👃": "nose",
  11408. "🧠": "brain",
  11409. "🫀": "anatomical-heart",
  11410. "🫁": "lungs",
  11411. "🦷": "tooth",
  11412. "🦴": "bone",
  11413. "👀": "eyes",
  11414. "👁": "eye",
  11415. "👅": "tongue",
  11416. "👄": "mouth",
  11417. "🫦": "biting-lip",
  11418. "👶": "baby",
  11419. "🧒": "child",
  11420. "👦": "boy",
  11421. "👧": "girl",
  11422. "🧑": "person",
  11423. "👱": "person-blond-hair",
  11424. "👨": "man",
  11425. "🧔": "person-beard",
  11426. "🧔‍♂️": "man-beard",
  11427. "🧔‍♀️": "woman-beard",
  11428. "👨‍🦰": "man-red-hair",
  11429. "👨‍🦱": "man-curly-hair",
  11430. "👨‍🦳": "man-white-hair",
  11431. "👨‍🦲": "man-bald",
  11432. "👩": "woman",
  11433. "👩‍🦰": "woman-red-hair",
  11434. "🧑‍🦰": "person-red-hair",
  11435. "👩‍🦱": "woman-curly-hair",
  11436. "🧑‍🦱": "person-curly-hair",
  11437. "👩‍🦳": "woman-white-hair",
  11438. "🧑‍🦳": "person-white-hair",
  11439. "👩‍🦲": "woman-bald",
  11440. "🧑‍🦲": "person-bald",
  11441. "👱‍♀️": "woman-blond-hair",
  11442. "👱‍♂️": "man-blond-hair",
  11443. "🧓": "older-person",
  11444. "👴": "old-man",
  11445. "👵": "old-woman",
  11446. "🙍": "person-frowning",
  11447. "🙍‍♂️": "man-frowning",
  11448. "🙍‍♀️": "woman-frowning",
  11449. "🙎": "person-pouting",
  11450. "🙎‍♂️": "man-pouting",
  11451. "🙎‍♀️": "woman-pouting",
  11452. "🙅": "person-gesturing-no",
  11453. "🙅‍♂️": "man-gesturing-no",
  11454. "🙅‍♀️": "woman-gesturing-no",
  11455. "🙆": "person-gesturing-ok",
  11456. "🙆‍♂️": "man-gesturing-ok",
  11457. "🙆‍♀️": "woman-gesturing-ok",
  11458. "💁": "person-tipping-hand",
  11459. "💁‍♂️": "man-tipping-hand",
  11460. "💁‍♀️": "woman-tipping-hand",
  11461. "🙋": "person-raising-hand",
  11462. "🙋‍♂️": "man-raising-hand",
  11463. "🙋‍♀️": "woman-raising-hand",
  11464. "🧏": "deaf-person",
  11465. "🧏‍♂️": "deaf-man",
  11466. "🧏‍♀️": "deaf-woman",
  11467. "🙇": "person-bowing",
  11468. "🙇‍♂️": "man-bowing",
  11469. "🙇‍♀️": "woman-bowing",
  11470. "🤦": "person-facepalming",
  11471. "🤦‍♂️": "man-facepalming",
  11472. "🤦‍♀️": "woman-facepalming",
  11473. "🤷": "person-shrugging",
  11474. "🤷‍♂️": "man-shrugging",
  11475. "🤷‍♀️": "woman-shrugging",
  11476. "🧑‍⚕️": "health-worker",
  11477. "👨‍⚕️": "man-health-worker",
  11478. "👩‍⚕️": "woman-health-worker",
  11479. "🧑‍🎓": "student",
  11480. "👨‍🎓": "man-student",
  11481. "👩‍🎓": "woman-student",
  11482. "🧑‍🏫": "teacher",
  11483. "👨‍🏫": "man-teacher",
  11484. "👩‍🏫": "woman-teacher",
  11485. "🧑‍⚖️": "judge",
  11486. "👨‍⚖️": "man-judge",
  11487. "👩‍⚖️": "woman-judge",
  11488. "🧑‍🌾": "farmer",
  11489. "👨‍🌾": "man-farmer",
  11490. "👩‍🌾": "woman-farmer",
  11491. "🧑‍🍳": "cook",
  11492. "👨‍🍳": "man-cook",
  11493. "👩‍🍳": "woman-cook",
  11494. "🧑‍🔧": "mechanic",
  11495. "👨‍🔧": "man-mechanic",
  11496. "👩‍🔧": "woman-mechanic",
  11497. "🧑‍🏭": "factory-worker",
  11498. "👨‍🏭": "man-factory-worker",
  11499. "👩‍🏭": "woman-factory-worker",
  11500. "🧑‍💼": "office-worker",
  11501. "👨‍💼": "man-office-worker",
  11502. "👩‍💼": "woman-office-worker",
  11503. "🧑‍🔬": "scientist",
  11504. "👨‍🔬": "man-scientist",
  11505. "👩‍🔬": "woman-scientist",
  11506. "🧑‍💻": "technologist",
  11507. "👨‍💻": "man-technologist",
  11508. "👩‍💻": "woman-technologist",
  11509. "🧑‍🎤": "singer",
  11510. "👨‍🎤": "man-singer",
  11511. "👩‍🎤": "woman-singer",
  11512. "🧑‍🎨": "artist",
  11513. "👨‍🎨": "man-artist",
  11514. "👩‍🎨": "woman-artist",
  11515. "🧑‍✈️": "pilot",
  11516. "👨‍✈️": "man-pilot",
  11517. "👩‍✈️": "woman-pilot",
  11518. "🧑‍🚀": "astronaut",
  11519. "👨‍🚀": "man-astronaut",
  11520. "👩‍🚀": "woman-astronaut",
  11521. "🧑‍🚒": "firefighter",
  11522. "👨‍🚒": "man-firefighter",
  11523. "👩‍🚒": "woman-firefighter",
  11524. "👮": "police-officer",
  11525. "👮‍♂️": "man-police-officer",
  11526. "👮‍♀️": "woman-police-officer",
  11527. "🕵": "detective",
  11528. "🕵️‍♂️": "man-detective",
  11529. "🕵️‍♀️": "woman-detective",
  11530. "💂": "guard",
  11531. "💂‍♂️": "man-guard",
  11532. "💂‍♀️": "woman-guard",
  11533. "🥷": "ninja",
  11534. "👷": "construction-worker",
  11535. "👷‍♂️": "man-construction-worker",
  11536. "👷‍♀️": "woman-construction-worker",
  11537. "🫅": "person-with-crown",
  11538. "🤴": "prince",
  11539. "👸": "princess",
  11540. "👳": "person-wearing-turban",
  11541. "👳‍♂️": "man-wearing-turban",
  11542. "👳‍♀️": "woman-wearing-turban",
  11543. "👲": "person-with-skullcap",
  11544. "🧕": "woman-with-headscarf",
  11545. "🤵": "person-in-tuxedo",
  11546. "🤵‍♂️": "man-in-tuxedo",
  11547. "🤵‍♀️": "woman-in-tuxedo",
  11548. "👰": "person-with-veil",
  11549. "👰‍♂️": "man-with-veil",
  11550. "👰‍♀️": "woman-with-veil",
  11551. "🤰": "pregnant-woman",
  11552. "🫃": "pregnant-man",
  11553. "🫄": "pregnant-person",
  11554. "🤱": "breast-feeding",
  11555. "👩‍🍼": "woman-feeding-baby",
  11556. "👨‍🍼": "man-feeding-baby",
  11557. "🧑‍🍼": "person-feeding-baby",
  11558. "👼": "baby-angel",
  11559. "🎅": "santa-claus",
  11560. "🤶": "mrs-claus",
  11561. "🧑‍🎄": "mx-claus",
  11562. "🦸": "superhero",
  11563. "🦸‍♂️": "man-superhero",
  11564. "🦸‍♀️": "woman-superhero",
  11565. "🦹": "supervillain",
  11566. "🦹‍♂️": "man-supervillain",
  11567. "🦹‍♀️": "woman-supervillain",
  11568. "🧙": "mage",
  11569. "🧙‍♂️": "man-mage",
  11570. "🧙‍♀️": "woman-mage",
  11571. "🧚": "fairy",
  11572. "🧚‍♂️": "man-fairy",
  11573. "🧚‍♀️": "woman-fairy",
  11574. "🧛": "vampire",
  11575. "🧛‍♂️": "man-vampire",
  11576. "🧛‍♀️": "woman-vampire",
  11577. "🧜": "merperson",
  11578. "🧜‍♂️": "merman",
  11579. "🧜‍♀️": "mermaid",
  11580. "🧝": "elf",
  11581. "🧝‍♂️": "man-elf",
  11582. "🧝‍♀️": "woman-elf",
  11583. "🧞": "genie",
  11584. "🧞‍♂️": "man-genie",
  11585. "🧞‍♀️": "woman-genie",
  11586. "🧟": "zombie",
  11587. "🧟‍♂️": "man-zombie",
  11588. "🧟‍♀️": "woman-zombie",
  11589. "🧌": "troll",
  11590. "💆": "person-getting-massage",
  11591. "💆‍♂️": "man-getting-massage",
  11592. "💆‍♀️": "woman-getting-massage",
  11593. "💇": "person-getting-haircut",
  11594. "💇‍♂️": "man-getting-haircut",
  11595. "💇‍♀️": "woman-getting-haircut",
  11596. "🚶": "person-walking",
  11597. "🚶‍♂️": "man-walking",
  11598. "🚶‍♀️": "woman-walking",
  11599. "🧍": "person-standing",
  11600. "🧍‍♂️": "man-standing",
  11601. "🧍‍♀️": "woman-standing",
  11602. "🧎": "person-kneeling",
  11603. "🧎‍♂️": "man-kneeling",
  11604. "🧎‍♀️": "woman-kneeling",
  11605. "🧑‍🦯": "person-with-white-cane",
  11606. "👨‍🦯": "man-with-white-cane",
  11607. "👩‍🦯": "woman-with-white-cane",
  11608. "🧑‍🦼": "person-in-motorized-wheelchair",
  11609. "👨‍🦼": "man-in-motorized-wheelchair",
  11610. "👩‍🦼": "woman-in-motorized-wheelchair",
  11611. "🧑‍🦽": "person-in-manual-wheelchair",
  11612. "👨‍🦽": "man-in-manual-wheelchair",
  11613. "👩‍🦽": "woman-in-manual-wheelchair",
  11614. "🏃": "person-running",
  11615. "🏃‍♂️": "man-running",
  11616. "🏃‍♀️": "woman-running",
  11617. "💃": "woman-dancing",
  11618. "🕺": "man-dancing",
  11619. "🕴": "person-in-suit-levitating",
  11620. "👯": "people-with-bunny-ears",
  11621. "👯‍♂️": "men-with-bunny-ears",
  11622. "👯‍♀️": "women-with-bunny-ears",
  11623. "🧖": "person-in-steamy-room",
  11624. "🧖‍♂️": "man-in-steamy-room",
  11625. "🧖‍♀️": "woman-in-steamy-room",
  11626. "🧗": "person-climbing",
  11627. "🧗‍♂️": "man-climbing",
  11628. "🧗‍♀️": "woman-climbing",
  11629. "🤺": "person-fencing",
  11630. "🏇": "horse-racing",
  11631. "⛷": "skier",
  11632. "🏂": "snowboarder",
  11633. "🏌": "person-golfing",
  11634. "🏌️‍♂️": "man-golfing",
  11635. "🏌️‍♀️": "woman-golfing",
  11636. "🏄": "person-surfing",
  11637. "🏄‍♂️": "man-surfing",
  11638. "🏄‍♀️": "woman-surfing",
  11639. "🚣": "person-rowing-boat",
  11640. "🚣‍♂️": "man-rowing-boat",
  11641. "🚣‍♀️": "woman-rowing-boat",
  11642. "🏊": "person-swimming",
  11643. "🏊‍♂️": "man-swimming",
  11644. "🏊‍♀️": "woman-swimming",
  11645. "⛹": "person-bouncing-ball",
  11646. "⛹️‍♂️": "man-bouncing-ball",
  11647. "⛹️‍♀️": "woman-bouncing-ball",
  11648. "🏋": "person-lifting-weights",
  11649. "🏋️‍♂️": "man-lifting-weights",
  11650. "🏋️‍♀️": "woman-lifting-weights",
  11651. "🚴": "person-biking",
  11652. "🚴‍♂️": "man-biking",
  11653. "🚴‍♀️": "woman-biking",
  11654. "🚵": "person-mountain-biking",
  11655. "🚵‍♂️": "man-mountain-biking",
  11656. "🚵‍♀️": "woman-mountain-biking",
  11657. "🤸": "person-cartwheeling",
  11658. "🤸‍♂️": "man-cartwheeling",
  11659. "🤸‍♀️": "woman-cartwheeling",
  11660. "🤼": "people-wrestling",
  11661. "🤼‍♂️": "men-wrestling",
  11662. "🤼‍♀️": "women-wrestling",
  11663. "🤽": "person-playing-water-polo",
  11664. "🤽‍♂️": "man-playing-water-polo",
  11665. "🤽‍♀️": "woman-playing-water-polo",
  11666. "🤾": "person-playing-handball",
  11667. "🤾‍♂️": "man-playing-handball",
  11668. "🤾‍♀️": "woman-playing-handball",
  11669. "🤹": "person-juggling",
  11670. "🤹‍♂️": "man-juggling",
  11671. "🤹‍♀️": "woman-juggling",
  11672. "🧘": "person-in-lotus-position",
  11673. "🧘‍♂️": "man-in-lotus-position",
  11674. "🧘‍♀️": "woman-in-lotus-position",
  11675. "🛀": "person-taking-bath",
  11676. "🛌": "person-in-bed",
  11677. "🧑‍🤝‍🧑": "people-holding-hands",
  11678. "👭": "women-holding-hands",
  11679. "👫": "woman-and-man-holding-hands",
  11680. "👬": "men-holding-hands",
  11681. "💏": "kiss",
  11682. "👩‍❤️‍💋‍👨": "kiss-woman,-man",
  11683. "👨‍❤️‍💋‍👨": "kiss-man,-man",
  11684. "👩‍❤️‍💋‍👩": "kiss-woman,-woman",
  11685. "💑": "couple-with-heart",
  11686. "👩‍❤️‍👨": "couple-with-heart-woman,-man",
  11687. "👨‍❤️‍👨": "couple-with-heart-man,-man",
  11688. "👩‍❤️‍👩": "couple-with-heart-woman,-woman",
  11689. "👪": "family",
  11690. "👨‍👩‍👦": "family-man,-woman,-boy",
  11691. "👨‍👩‍👧": "family-man,-woman,-girl",
  11692. "👨‍👩‍👧‍👦": "family-man,-woman,-girl,-boy",
  11693. "👨‍👩‍👦‍👦": "family-man,-woman,-boy,-boy",
  11694. "👨‍👩‍👧‍👧": "family-man,-woman,-girl,-girl",
  11695. "👨‍👨‍👦": "family-man,-man,-boy",
  11696. "👨‍👨‍👧": "family-man,-man,-girl",
  11697. "👨‍👨‍👧‍👦": "family-man,-man,-girl,-boy",
  11698. "👨‍👨‍👦‍👦": "family-man,-man,-boy,-boy",
  11699. "👨‍👨‍👧‍👧": "family-man,-man,-girl,-girl",
  11700. "👩‍👩‍👦": "family-woman,-woman,-boy",
  11701. "👩‍👩‍👧": "family-woman,-woman,-girl",
  11702. "👩‍👩‍👧‍👦": "family-woman,-woman,-girl,-boy",
  11703. "👩‍👩‍👦‍👦": "family-woman,-woman,-boy,-boy",
  11704. "👩‍👩‍👧‍👧": "family-woman,-woman,-girl,-girl",
  11705. "👨‍👦": "family-man,-boy",
  11706. "👨‍👦‍👦": "family-man,-boy,-boy",
  11707. "👨‍👧": "family-man,-girl",
  11708. "👨‍👧‍👦": "family-man,-girl,-boy",
  11709. "👨‍👧‍👧": "family-man,-girl,-girl",
  11710. "👩‍👦": "family-woman,-boy",
  11711. "👩‍👦‍👦": "family-woman,-boy,-boy",
  11712. "👩‍👧": "family-woman,-girl",
  11713. "👩‍👧‍👦": "family-woman,-girl,-boy",
  11714. "👩‍👧‍👧": "family-woman,-girl,-girl",
  11715. "🗣": "speaking-head",
  11716. "👤": "bust-in-silhouette",
  11717. "👥": "busts-in-silhouette",
  11718. "🫂": "people-hugging",
  11719. "👣": "footprints",
  11720. "🦰": "red-hair",
  11721. "🦱": "curly-hair",
  11722. "🦳": "white-hair",
  11723. "🦲": "bald",
  11724. "🐵": "monkey-face",
  11725. "🐒": "monkey",
  11726. "🦍": "gorilla",
  11727. "🦧": "orangutan",
  11728. "🐶": "dog-face",
  11729. "🐕": "dog",
  11730. "🦮": "guide-dog",
  11731. "🐕‍🦺": "service-dog",
  11732. "🐩": "poodle",
  11733. "🐺": "wolf",
  11734. "🦊": "fox",
  11735. "🦝": "raccoon",
  11736. "🐱": "cat-face",
  11737. "🐈": "cat",
  11738. "🐈‍⬛": "black-cat",
  11739. "🦁": "lion",
  11740. "🐯": "tiger-face",
  11741. "🐅": "tiger",
  11742. "🐆": "leopard",
  11743. "🐴": "horse-face",
  11744. "🫎": "⊛-moose",
  11745. "🫏": "⊛-donkey",
  11746. "🐎": "horse",
  11747. "🦄": "unicorn",
  11748. "🦓": "zebra",
  11749. "🦌": "deer",
  11750. "🦬": "bison",
  11751. "🐮": "cow-face",
  11752. "🐂": "ox",
  11753. "🐃": "water-buffalo",
  11754. "🐄": "cow",
  11755. "🐷": "pig-face",
  11756. "🐖": "pig",
  11757. "🐗": "boar",
  11758. "🐽": "pig-nose",
  11759. "🐏": "ram",
  11760. "🐑": "ewe",
  11761. "🐐": "goat",
  11762. "🐪": "camel",
  11763. "🐫": "two-hump-camel",
  11764. "🦙": "llama",
  11765. "🦒": "giraffe",
  11766. "🐘": "elephant",
  11767. "🦣": "mammoth",
  11768. "🦏": "rhinoceros",
  11769. "🦛": "hippopotamus",
  11770. "🐭": "mouse-face",
  11771. "🐁": "mouse",
  11772. "🐀": "rat",
  11773. "🐹": "hamster",
  11774. "🐰": "rabbit-face",
  11775. "🐇": "rabbit",
  11776. "🐿": "chipmunk",
  11777. "🦫": "beaver",
  11778. "🦔": "hedgehog",
  11779. "🦇": "bat",
  11780. "🐻": "bear",
  11781. "🐻‍❄️": "polar-bear",
  11782. "🐨": "koala",
  11783. "🐼": "panda",
  11784. "🦥": "sloth",
  11785. "🦦": "otter",
  11786. "🦨": "skunk",
  11787. "🦘": "kangaroo",
  11788. "🦡": "badger",
  11789. "🐾": "paw-prints",
  11790. "🦃": "turkey",
  11791. "🐔": "chicken",
  11792. "🐓": "rooster",
  11793. "🐣": "hatching-chick",
  11794. "🐤": "baby-chick",
  11795. "🐥": "front-facing-baby-chick",
  11796. "🐦": "bird",
  11797. "🐧": "penguin",
  11798. "🕊": "dove",
  11799. "🦅": "eagle",
  11800. "🦆": "duck",
  11801. "🦢": "swan",
  11802. "🦉": "owl",
  11803. "🦤": "dodo",
  11804. "🪶": "feather",
  11805. "🦩": "flamingo",
  11806. "🦚": "peacock",
  11807. "🦜": "parrot",
  11808. "🪽": "⊛-wing",
  11809. "🐦‍⬛": "⊛-black-bird",
  11810. "🪿": "⊛-goose",
  11811. "🐸": "frog",
  11812. "🐊": "crocodile",
  11813. "🐢": "turtle",
  11814. "🦎": "lizard",
  11815. "🐍": "snake",
  11816. "🐲": "dragon-face",
  11817. "🐉": "dragon",
  11818. "🦕": "sauropod",
  11819. "🦖": "t-rex",
  11820. "🐳": "spouting-whale",
  11821. "🐋": "whale",
  11822. "🐬": "dolphin",
  11823. "🦭": "seal",
  11824. "🐟": "fish",
  11825. "🐠": "tropical-fish",
  11826. "🐡": "blowfish",
  11827. "🦈": "shark",
  11828. "🐙": "octopus",
  11829. "🐚": "spiral-shell",
  11830. "🪸": "coral",
  11831. "🪼": "⊛-jellyfish",
  11832. "🐌": "snail",
  11833. "🦋": "butterfly",
  11834. "🐛": "bug",
  11835. "🐜": "ant",
  11836. "🐝": "honeybee",
  11837. "🪲": "beetle",
  11838. "🐞": "lady-beetle",
  11839. "🦗": "cricket",
  11840. "🪳": "cockroach",
  11841. "🕷": "spider",
  11842. "🕸": "spider-web",
  11843. "🦂": "scorpion",
  11844. "🦟": "mosquito",
  11845. "🪰": "fly",
  11846. "🪱": "worm",
  11847. "🦠": "microbe",
  11848. "💐": "bouquet",
  11849. "🌸": "cherry-blossom",
  11850. "💮": "white-flower",
  11851. "🪷": "lotus",
  11852. "🏵": "rosette",
  11853. "🌹": "rose",
  11854. "🥀": "wilted-flower",
  11855. "🌺": "hibiscus",
  11856. "🌻": "sunflower",
  11857. "🌼": "blossom",
  11858. "🌷": "tulip",
  11859. "🪻": "⊛-hyacinth",
  11860. "🌱": "seedling",
  11861. "🪴": "potted-plant",
  11862. "🌲": "evergreen-tree",
  11863. "🌳": "deciduous-tree",
  11864. "🌴": "palm-tree",
  11865. "🌵": "cactus",
  11866. "🌾": "sheaf-of-rice",
  11867. "🌿": "herb",
  11868. "☘": "shamrock",
  11869. "🍀": "four-leaf-clover",
  11870. "🍁": "maple-leaf",
  11871. "🍂": "fallen-leaf",
  11872. "🍃": "leaf-fluttering-in-wind",
  11873. "🪹": "empty-nest",
  11874. "🪺": "nest-with-eggs",
  11875. "🍄": "mushroom",
  11876. "🍇": "grapes",
  11877. "🍈": "melon",
  11878. "🍉": "watermelon",
  11879. "🍊": "tangerine",
  11880. "🍋": "lemon",
  11881. "🍌": "banana",
  11882. "🍍": "pineapple",
  11883. "🥭": "mango",
  11884. "🍎": "red-apple",
  11885. "🍏": "green-apple",
  11886. "🍐": "pear",
  11887. "🍑": "peach",
  11888. "🍒": "cherries",
  11889. "🍓": "strawberry",
  11890. "🫐": "blueberries",
  11891. "🥝": "kiwi-fruit",
  11892. "🍅": "tomato",
  11893. "🫒": "olive",
  11894. "🥥": "coconut",
  11895. "🥑": "avocado",
  11896. "🍆": "eggplant",
  11897. "🥔": "potato",
  11898. "🥕": "carrot",
  11899. "🌽": "ear-of-corn",
  11900. "🌶": "hot-pepper",
  11901. "🫑": "bell-pepper",
  11902. "🥒": "cucumber",
  11903. "🥬": "leafy-green",
  11904. "🥦": "broccoli",
  11905. "🧄": "garlic",
  11906. "🧅": "onion",
  11907. "🥜": "peanuts",
  11908. "🫘": "beans",
  11909. "🌰": "chestnut",
  11910. "🫚": "⊛-ginger-root",
  11911. "🫛": "⊛-pea-pod",
  11912. "🍞": "bread",
  11913. "🥐": "croissant",
  11914. "🥖": "baguette-bread",
  11915. "🫓": "flatbread",
  11916. "🥨": "pretzel",
  11917. "🥯": "bagel",
  11918. "🥞": "pancakes",
  11919. "🧇": "waffle",
  11920. "🧀": "cheese-wedge",
  11921. "🍖": "meat-on-bone",
  11922. "🍗": "poultry-leg",
  11923. "🥩": "cut-of-meat",
  11924. "🥓": "bacon",
  11925. "🍔": "hamburger",
  11926. "🍟": "french-fries",
  11927. "🍕": "pizza",
  11928. "🌭": "hot-dog",
  11929. "🥪": "sandwich",
  11930. "🌮": "taco",
  11931. "🌯": "burrito",
  11932. "🫔": "tamale",
  11933. "🥙": "stuffed-flatbread",
  11934. "🧆": "falafel",
  11935. "🥚": "egg",
  11936. "🍳": "cooking",
  11937. "🥘": "shallow-pan-of-food",
  11938. "🍲": "pot-of-food",
  11939. "🫕": "fondue",
  11940. "🥣": "bowl-with-spoon",
  11941. "🥗": "green-salad",
  11942. "🍿": "popcorn",
  11943. "🧈": "butter",
  11944. "🧂": "salt",
  11945. "🥫": "canned-food",
  11946. "🍱": "bento-box",
  11947. "🍘": "rice-cracker",
  11948. "🍙": "rice-ball",
  11949. "🍚": "cooked-rice",
  11950. "🍛": "curry-rice",
  11951. "🍜": "steaming-bowl",
  11952. "🍝": "spaghetti",
  11953. "🍠": "roasted-sweet-potato",
  11954. "🍢": "oden",
  11955. "🍣": "sushi",
  11956. "🍤": "fried-shrimp",
  11957. "🍥": "fish-cake-with-swirl",
  11958. "🥮": "moon-cake",
  11959. "🍡": "dango",
  11960. "🥟": "dumpling",
  11961. "🥠": "fortune-cookie",
  11962. "🥡": "takeout-box",
  11963. "🦀": "crab",
  11964. "🦞": "lobster",
  11965. "🦐": "shrimp",
  11966. "🦑": "squid",
  11967. "🦪": "oyster",
  11968. "🍦": "soft-ice-cream",
  11969. "🍧": "shaved-ice",
  11970. "🍨": "ice-cream",
  11971. "🍩": "doughnut",
  11972. "🍪": "cookie",
  11973. "🎂": "birthday-cake",
  11974. "🍰": "shortcake",
  11975. "🧁": "cupcake",
  11976. "🥧": "pie",
  11977. "🍫": "chocolate-bar",
  11978. "🍬": "candy",
  11979. "🍭": "lollipop",
  11980. "🍮": "custard",
  11981. "🍯": "honey-pot",
  11982. "🍼": "baby-bottle",
  11983. "🥛": "glass-of-milk",
  11984. "☕": "hot-beverage",
  11985. "🫖": "teapot",
  11986. "🍵": "teacup-without-handle",
  11987. "🍶": "sake",
  11988. "🍾": "bottle-with-popping-cork",
  11989. "🍷": "wine-glass",
  11990. "🍸": "cocktail-glass",
  11991. "🍹": "tropical-drink",
  11992. "🍺": "beer-mug",
  11993. "🍻": "clinking-beer-mugs",
  11994. "🥂": "clinking-glasses",
  11995. "🥃": "tumbler-glass",
  11996. "🫗": "pouring-liquid",
  11997. "🥤": "cup-with-straw",
  11998. "🧋": "bubble-tea",
  11999. "🧃": "beverage-box",
  12000. "🧉": "mate",
  12001. "🧊": "ice",
  12002. "🥢": "chopsticks",
  12003. "🍽": "fork-and-knife-with-plate",
  12004. "🍴": "fork-and-knife",
  12005. "🥄": "spoon",
  12006. "🔪": "kitchen-knife",
  12007. "🫙": "jar",
  12008. "🏺": "amphora",
  12009. "🌍": "globe-showing-europe-africa",
  12010. "🌎": "globe-showing-americas",
  12011. "🌏": "globe-showing-asia-australia",
  12012. "🌐": "globe-with-meridians",
  12013. "🗺": "world-map",
  12014. "🗾": "map-of-japan",
  12015. "🧭": "compass",
  12016. "🏔": "snow-capped-mountain",
  12017. "⛰": "mountain",
  12018. "🌋": "volcano",
  12019. "🗻": "mount-fuji",
  12020. "🏕": "camping",
  12021. "🏖": "beach-with-umbrella",
  12022. "🏜": "desert",
  12023. "🏝": "desert-island",
  12024. "🏞": "national-park",
  12025. "🏟": "stadium",
  12026. "🏛": "classical-building",
  12027. "🏗": "building-construction",
  12028. "🧱": "brick",
  12029. "🪨": "rock",
  12030. "🪵": "wood",
  12031. "🛖": "hut",
  12032. "🏘": "houses",
  12033. "🏚": "derelict-house",
  12034. "🏠": "house",
  12035. "🏡": "house-with-garden",
  12036. "🏢": "office-building",
  12037. "🏣": "japanese-post-office",
  12038. "🏤": "post-office",
  12039. "🏥": "hospital",
  12040. "🏦": "bank",
  12041. "🏨": "hotel",
  12042. "🏩": "love-hotel",
  12043. "🏪": "convenience-store",
  12044. "🏫": "school",
  12045. "🏬": "department-store",
  12046. "🏭": "factory",
  12047. "🏯": "japanese-castle",
  12048. "🏰": "castle",
  12049. "💒": "wedding",
  12050. "🗼": "tokyo-tower",
  12051. "🗽": "statue-of-liberty",
  12052. "⛪": "church",
  12053. "🕌": "mosque",
  12054. "🛕": "hindu-temple",
  12055. "🕍": "synagogue",
  12056. "⛩": "shinto-shrine",
  12057. "🕋": "kaaba",
  12058. "⛲": "fountain",
  12059. "⛺": "tent",
  12060. "🌁": "foggy",
  12061. "🌃": "night-with-stars",
  12062. "🏙": "cityscape",
  12063. "🌄": "sunrise-over-mountains",
  12064. "🌅": "sunrise",
  12065. "🌆": "cityscape-at-dusk",
  12066. "🌇": "sunset",
  12067. "🌉": "bridge-at-night",
  12068. "♨": "hot-springs",
  12069. "🎠": "carousel-horse",
  12070. "🛝": "playground-slide",
  12071. "🎡": "ferris-wheel",
  12072. "🎢": "roller-coaster",
  12073. "💈": "barber-pole",
  12074. "🎪": "circus-tent",
  12075. "🚂": "locomotive",
  12076. "🚃": "railway-car",
  12077. "🚄": "high-speed-train",
  12078. "🚅": "bullet-train",
  12079. "🚆": "train",
  12080. "🚇": "metro",
  12081. "🚈": "light-rail",
  12082. "🚉": "station",
  12083. "🚊": "tram",
  12084. "🚝": "monorail",
  12085. "🚞": "mountain-railway",
  12086. "🚋": "tram-car",
  12087. "🚌": "bus",
  12088. "🚍": "oncoming-bus",
  12089. "🚎": "trolleybus",
  12090. "🚐": "minibus",
  12091. "🚑": "ambulance",
  12092. "🚒": "fire-engine",
  12093. "🚓": "police-car",
  12094. "🚔": "oncoming-police-car",
  12095. "🚕": "taxi",
  12096. "🚖": "oncoming-taxi",
  12097. "🚗": "automobile",
  12098. "🚘": "oncoming-automobile",
  12099. "🚙": "sport-utility-vehicle",
  12100. "🛻": "pickup-truck",
  12101. "🚚": "delivery-truck",
  12102. "🚛": "articulated-lorry",
  12103. "🚜": "tractor",
  12104. "🏎": "racing-car",
  12105. "🏍": "motorcycle",
  12106. "🛵": "motor-scooter",
  12107. "🦽": "manual-wheelchair",
  12108. "🦼": "motorized-wheelchair",
  12109. "🛺": "auto-rickshaw",
  12110. "🚲": "bicycle",
  12111. "🛴": "kick-scooter",
  12112. "🛹": "skateboard",
  12113. "🛼": "roller-skate",
  12114. "🚏": "bus-stop",
  12115. "🛣": "motorway",
  12116. "🛤": "railway-track",
  12117. "🛢": "oil-drum",
  12118. "⛽": "fuel-pump",
  12119. "🛞": "wheel",
  12120. "🚨": "police-car-light",
  12121. "🚥": "horizontal-traffic-light",
  12122. "🚦": "vertical-traffic-light",
  12123. "🛑": "stop-sign",
  12124. "🚧": "construction",
  12125. "⚓": "anchor",
  12126. "🛟": "ring-buoy",
  12127. "⛵": "sailboat",
  12128. "🛶": "canoe",
  12129. "🚤": "speedboat",
  12130. "🛳": "passenger-ship",
  12131. "⛴": "ferry",
  12132. "🛥": "motor-boat",
  12133. "🚢": "ship",
  12134. "✈": "airplane",
  12135. "🛩": "small-airplane",
  12136. "🛫": "airplane-departure",
  12137. "🛬": "airplane-arrival",
  12138. "🪂": "parachute",
  12139. "💺": "seat",
  12140. "🚁": "helicopter",
  12141. "🚟": "suspension-railway",
  12142. "🚠": "mountain-cableway",
  12143. "🚡": "aerial-tramway",
  12144. "🛰": "satellite",
  12145. "🚀": "rocket",
  12146. "🛸": "flying-saucer",
  12147. "🛎": "bellhop-bell",
  12148. "🧳": "luggage",
  12149. "⌛": "hourglass-done",
  12150. "⏳": "hourglass-not-done",
  12151. "⌚": "watch",
  12152. "⏰": "alarm-clock",
  12153. "⏱": "stopwatch",
  12154. "⏲": "timer-clock",
  12155. "🕰": "mantelpiece-clock",
  12156. "🕛": "twelve-o-clock",
  12157. "🕧": "twelve-thirty",
  12158. "🕐": "one-o-clock",
  12159. "🕜": "one-thirty",
  12160. "🕑": "two-o-clock",
  12161. "🕝": "two-thirty",
  12162. "🕒": "three-o-clock",
  12163. "🕞": "three-thirty",
  12164. "🕓": "four-o-clock",
  12165. "🕟": "four-thirty",
  12166. "🕔": "five-o-clock",
  12167. "🕠": "five-thirty",
  12168. "🕕": "six-o-clock",
  12169. "🕡": "six-thirty",
  12170. "🕖": "seven-o-clock",
  12171. "🕢": "seven-thirty",
  12172. "🕗": "eight-o-clock",
  12173. "🕣": "eight-thirty",
  12174. "🕘": "nine-o-clock",
  12175. "🕤": "nine-thirty",
  12176. "🕙": "ten-o-clock",
  12177. "🕥": "ten-thirty",
  12178. "🕚": "eleven-o-clock",
  12179. "🕦": "eleven-thirty",
  12180. "🌑": "new-moon",
  12181. "🌒": "waxing-crescent-moon",
  12182. "🌓": "first-quarter-moon",
  12183. "🌔": "waxing-gibbous-moon",
  12184. "🌕": "full-moon",
  12185. "🌖": "waning-gibbous-moon",
  12186. "🌗": "last-quarter-moon",
  12187. "🌘": "waning-crescent-moon",
  12188. "🌙": "crescent-moon",
  12189. "🌚": "new-moon-face",
  12190. "🌛": "first-quarter-moon-face",
  12191. "🌜": "last-quarter-moon-face",
  12192. "🌡": "thermometer",
  12193. "☀": "sun",
  12194. "🌝": "full-moon-face",
  12195. "🌞": "sun-with-face",
  12196. "🪐": "ringed-planet",
  12197. "⭐": "star",
  12198. "🌟": "glowing-star",
  12199. "🌠": "shooting-star",
  12200. "🌌": "milky-way",
  12201. "☁": "cloud",
  12202. "⛅": "sun-behind-cloud",
  12203. "⛈": "cloud-with-lightning-and-rain",
  12204. "🌤": "sun-behind-small-cloud",
  12205. "🌥": "sun-behind-large-cloud",
  12206. "🌦": "sun-behind-rain-cloud",
  12207. "🌧": "cloud-with-rain",
  12208. "🌨": "cloud-with-snow",
  12209. "🌩": "cloud-with-lightning",
  12210. "🌪": "tornado",
  12211. "🌫": "fog",
  12212. "🌬": "wind-face",
  12213. "🌀": "cyclone",
  12214. "🌈": "rainbow",
  12215. "🌂": "closed-umbrella",
  12216. "☂": "umbrella",
  12217. "☔": "umbrella-with-rain-drops",
  12218. "⛱": "umbrella-on-ground",
  12219. "⚡": "high-voltage",
  12220. "❄": "snowflake",
  12221. "☃": "snowman",
  12222. "⛄": "snowman-without-snow",
  12223. "☄": "comet",
  12224. "🔥": "fire",
  12225. "💧": "droplet",
  12226. "🌊": "water-wave",
  12227. "🎃": "jack-o-lantern",
  12228. "🎄": "christmas-tree",
  12229. "🎆": "fireworks",
  12230. "🎇": "sparkler",
  12231. "🧨": "firecracker",
  12232. "✨": "sparkles",
  12233. "🎈": "balloon",
  12234. "🎉": "party-popper",
  12235. "🎊": "confetti-ball",
  12236. "🎋": "tanabata-tree",
  12237. "🎍": "pine-decoration",
  12238. "🎎": "japanese-dolls",
  12239. "🎏": "carp-streamer",
  12240. "🎐": "wind-chime",
  12241. "🎑": "moon-viewing-ceremony",
  12242. "🧧": "red-envelope",
  12243. "🎀": "ribbon",
  12244. "🎁": "wrapped-gift",
  12245. "🎗": "reminder-ribbon",
  12246. "🎟": "admission-tickets",
  12247. "🎫": "ticket",
  12248. "🎖": "military-medal",
  12249. "🏆": "trophy",
  12250. "🏅": "sports-medal",
  12251. "🥇": "1st-place-medal",
  12252. "🥈": "2nd-place-medal",
  12253. "🥉": "3rd-place-medal",
  12254. "⚽": "soccer-ball",
  12255. "⚾": "baseball",
  12256. "🥎": "softball",
  12257. "🏀": "basketball",
  12258. "🏐": "volleyball",
  12259. "🏈": "american-football",
  12260. "🏉": "rugby-football",
  12261. "🎾": "tennis",
  12262. "🥏": "flying-disc",
  12263. "🎳": "bowling",
  12264. "🏏": "cricket-game",
  12265. "🏑": "field-hockey",
  12266. "🏒": "ice-hockey",
  12267. "🥍": "lacrosse",
  12268. "🏓": "ping-pong",
  12269. "🏸": "badminton",
  12270. "🥊": "boxing-glove",
  12271. "🥋": "martial-arts-uniform",
  12272. "🥅": "goal-net",
  12273. "⛳": "flag-in-hole",
  12274. "⛸": "ice-skate",
  12275. "🎣": "fishing-pole",
  12276. "🤿": "diving-mask",
  12277. "🎽": "running-shirt",
  12278. "🎿": "skis",
  12279. "🛷": "sled",
  12280. "🥌": "curling-stone",
  12281. "🎯": "bullseye",
  12282. "🪀": "yo-yo",
  12283. "🪁": "kite",
  12284. "🔫": "water-pistol",
  12285. "🎱": "pool-8-ball",
  12286. "🔮": "crystal-ball",
  12287. "🪄": "magic-wand",
  12288. "🎮": "video-game",
  12289. "🕹": "joystick",
  12290. "🎰": "slot-machine",
  12291. "🎲": "game-die",
  12292. "🧩": "puzzle-piece",
  12293. "🧸": "teddy-bear",
  12294. "🪅": "piñata",
  12295. "🪩": "mirror-ball",
  12296. "🪆": "nesting-dolls",
  12297. "♠": "spade-suit",
  12298. "♥": "heart-suit",
  12299. "♦": "diamond-suit",
  12300. "♣": "club-suit",
  12301. "♟": "chess-pawn",
  12302. "🃏": "joker",
  12303. "🀄": "mahjong-red-dragon",
  12304. "🎴": "flower-playing-cards",
  12305. "🎭": "performing-arts",
  12306. "🖼": "framed-picture",
  12307. "🎨": "artist-palette",
  12308. "🧵": "thread",
  12309. "🪡": "sewing-needle",
  12310. "🧶": "yarn",
  12311. "🪢": "knot",
  12312. "👓": "glasses",
  12313. "🕶": "sunglasses",
  12314. "🥽": "goggles",
  12315. "🥼": "lab-coat",
  12316. "🦺": "safety-vest",
  12317. "👔": "necktie",
  12318. "👕": "t-shirt",
  12319. "👖": "jeans",
  12320. "🧣": "scarf",
  12321. "🧤": "gloves",
  12322. "🧥": "coat",
  12323. "🧦": "socks",
  12324. "👗": "dress",
  12325. "👘": "kimono",
  12326. "🥻": "sari",
  12327. "🩱": "one-piece-swimsuit",
  12328. "🩲": "briefs",
  12329. "🩳": "shorts",
  12330. "👙": "bikini",
  12331. "👚": "woman-s-clothes",
  12332. "🪭": "⊛-folding-hand-fan",
  12333. "👛": "purse",
  12334. "👜": "handbag",
  12335. "👝": "clutch-bag",
  12336. "🛍": "shopping-bags",
  12337. "🎒": "backpack",
  12338. "🩴": "thong-sandal",
  12339. "👞": "man-s-shoe",
  12340. "👟": "running-shoe",
  12341. "🥾": "hiking-boot",
  12342. "🥿": "flat-shoe",
  12343. "👠": "high-heeled-shoe",
  12344. "👡": "woman-s-sandal",
  12345. "🩰": "ballet-shoes",
  12346. "👢": "woman-s-boot",
  12347. "🪮": "⊛-hair-pick",
  12348. "👑": "crown",
  12349. "👒": "woman-s-hat",
  12350. "🎩": "top-hat",
  12351. "🎓": "graduation-cap",
  12352. "🧢": "billed-cap",
  12353. "🪖": "military-helmet",
  12354. "⛑": "rescue-worker-s-helmet",
  12355. "📿": "prayer-beads",
  12356. "💄": "lipstick",
  12357. "💍": "ring",
  12358. "💎": "gem-stone",
  12359. "🔇": "muted-speaker",
  12360. "🔈": "speaker-low-volume",
  12361. "🔉": "speaker-medium-volume",
  12362. "🔊": "speaker-high-volume",
  12363. "📢": "loudspeaker",
  12364. "📣": "megaphone",
  12365. "📯": "postal-horn",
  12366. "🔔": "bell",
  12367. "🔕": "bell-with-slash",
  12368. "🎼": "musical-score",
  12369. "🎵": "musical-note",
  12370. "🎶": "musical-notes",
  12371. "🎙": "studio-microphone",
  12372. "🎚": "level-slider",
  12373. "🎛": "control-knobs",
  12374. "🎤": "microphone",
  12375. "🎧": "headphone",
  12376. "📻": "radio",
  12377. "🎷": "saxophone",
  12378. "🪗": "accordion",
  12379. "🎸": "guitar",
  12380. "🎹": "musical-keyboard",
  12381. "🎺": "trumpet",
  12382. "🎻": "violin",
  12383. "🪕": "banjo",
  12384. "🥁": "drum",
  12385. "🪘": "long-drum",
  12386. "🪇": "maracas",
  12387. "🪈": "flute",
  12388. "📱": "mobile-phone",
  12389. "📲": "mobile-phone-with-arrow",
  12390. "☎": "telephone",
  12391. "📞": "telephone-receiver",
  12392. "📟": "pager",
  12393. "📠": "fax-machine",
  12394. "🔋": "battery",
  12395. "🪫": "low-battery",
  12396. "🔌": "electric-plug",
  12397. "💻": "laptop",
  12398. "🖥": "desktop-computer",
  12399. "🖨": "printer",
  12400. "⌨": "keyboard",
  12401. "🖱": "computer-mouse",
  12402. "🖲": "trackball",
  12403. "💽": "computer-disk",
  12404. "💾": "floppy-disk",
  12405. "💿": "optical-disk",
  12406. "📀": "dvd",
  12407. "🧮": "abacus",
  12408. "🎥": "movie-camera",
  12409. "🎞": "film-frames",
  12410. "📽": "film-projector",
  12411. "🎬": "clapper-board",
  12412. "📺": "television",
  12413. "📷": "camera",
  12414. "📸": "camera-with-flash",
  12415. "📹": "video-camera",
  12416. "📼": "videocassette",
  12417. "🔍": "magnifying-glass-tilted-left",
  12418. "🔎": "magnifying-glass-tilted-right",
  12419. "🕯": "candle",
  12420. "💡": "light-bulb",
  12421. "🔦": "flashlight",
  12422. "🏮": "red-paper-lantern",
  12423. "🪔": "diya-lamp",
  12424. "📔": "notebook-with-decorative-cover",
  12425. "📕": "closed-book",
  12426. "📖": "open-book",
  12427. "📗": "green-book",
  12428. "📘": "blue-book",
  12429. "📙": "orange-book",
  12430. "📚": "books",
  12431. "📓": "notebook",
  12432. "📒": "ledger",
  12433. "📃": "page-with-curl",
  12434. "📜": "scroll",
  12435. "📄": "page-facing-up",
  12436. "📰": "newspaper",
  12437. "🗞": "rolled-up-newspaper",
  12438. "📑": "bookmark-tabs",
  12439. "🔖": "bookmark",
  12440. "🏷": "label",
  12441. "💰": "money-bag",
  12442. "🪙": "coin",
  12443. "💴": "yen-banknote",
  12444. "💵": "dollar-banknote",
  12445. "💶": "euro-banknote",
  12446. "💷": "pound-banknote",
  12447. "💸": "money-with-wings",
  12448. "💳": "credit-card",
  12449. "🧾": "receipt",
  12450. "💹": "chart-increasing-with-yen",
  12451. "✉": "envelope",
  12452. "📧": "e-mail",
  12453. "📨": "incoming-envelope",
  12454. "📩": "envelope-with-arrow",
  12455. "📤": "outbox-tray",
  12456. "📥": "inbox-tray",
  12457. "📦": "package",
  12458. "📫": "closed-mailbox-with-raised-flag",
  12459. "📪": "closed-mailbox-with-lowered-flag",
  12460. "📬": "open-mailbox-with-raised-flag",
  12461. "📭": "open-mailbox-with-lowered-flag",
  12462. "📮": "postbox",
  12463. "🗳": "ballot-box-with-ballot",
  12464. "✏": "pencil",
  12465. "✒": "black-nib",
  12466. "🖋": "fountain-pen",
  12467. "🖊": "pen",
  12468. "🖌": "paintbrush",
  12469. "🖍": "crayon",
  12470. "📝": "memo",
  12471. "💼": "briefcase",
  12472. "📁": "file-folder",
  12473. "📂": "open-file-folder",
  12474. "🗂": "card-index-dividers",
  12475. "📅": "calendar",
  12476. "📆": "tear-off-calendar",
  12477. "🗒": "spiral-notepad",
  12478. "🗓": "spiral-calendar",
  12479. "📇": "card-index",
  12480. "📈": "chart-increasing",
  12481. "📉": "chart-decreasing",
  12482. "📊": "bar-chart",
  12483. "📋": "clipboard",
  12484. "📌": "pushpin",
  12485. "📍": "round-pushpin",
  12486. "📎": "paperclip",
  12487. "🖇": "linked-paperclips",
  12488. "📏": "straight-ruler",
  12489. "📐": "triangular-ruler",
  12490. "✂": "scissors",
  12491. "🗃": "card-file-box",
  12492. "🗄": "file-cabinet",
  12493. "🗑": "wastebasket",
  12494. "🔒": "locked",
  12495. "🔓": "unlocked",
  12496. "🔏": "locked-with-pen",
  12497. "🔐": "locked-with-key",
  12498. "🔑": "key",
  12499. "🗝": "old-key",
  12500. "🔨": "hammer",
  12501. "🪓": "axe",
  12502. "⛏": "pick",
  12503. "⚒": "hammer-and-pick",
  12504. "🛠": "hammer-and-wrench",
  12505. "🗡": "dagger",
  12506. "⚔": "crossed-swords",
  12507. "💣": "bomb",
  12508. "🪃": "boomerang",
  12509. "🏹": "bow-and-arrow",
  12510. "🛡": "shield",
  12511. "🪚": "carpentry-saw",
  12512. "🔧": "wrench",
  12513. "🪛": "screwdriver",
  12514. "🔩": "nut-and-bolt",
  12515. "⚙": "gear",
  12516. "🗜": "clamp",
  12517. "⚖": "balance-scale",
  12518. "🦯": "white-cane",
  12519. "🔗": "link",
  12520. "⛓": "chains",
  12521. "🪝": "hook",
  12522. "🧰": "toolbox",
  12523. "🧲": "magnet",
  12524. "🪜": "ladder",
  12525. "⚗": "alembic",
  12526. "🧪": "test-tube",
  12527. "🧫": "petri-dish",
  12528. "🧬": "dna",
  12529. "🔬": "microscope",
  12530. "🔭": "telescope",
  12531. "📡": "satellite-antenna",
  12532. "💉": "syringe",
  12533. "🩸": "drop-of-blood",
  12534. "💊": "pill",
  12535. "🩹": "adhesive-bandage",
  12536. "🩼": "crutch",
  12537. "🩺": "stethoscope",
  12538. "🩻": "x-ray",
  12539. "🚪": "door",
  12540. "🛗": "elevator",
  12541. "🪞": "mirror",
  12542. "🪟": "window",
  12543. "🛏": "bed",
  12544. "🛋": "couch-and-lamp",
  12545. "🪑": "chair",
  12546. "🚽": "toilet",
  12547. "🪠": "plunger",
  12548. "🚿": "shower",
  12549. "🛁": "bathtub",
  12550. "🪤": "mouse-trap",
  12551. "🪒": "razor",
  12552. "🧴": "lotion-bottle",
  12553. "🧷": "safety-pin",
  12554. "🧹": "broom",
  12555. "🧺": "basket",
  12556. "🧻": "roll-of-paper",
  12557. "🪣": "bucket",
  12558. "🧼": "soap",
  12559. "🫧": "bubbles",
  12560. "🪥": "toothbrush",
  12561. "🧽": "sponge",
  12562. "🧯": "fire-extinguisher",
  12563. "🛒": "shopping-cart",
  12564. "🚬": "cigarette",
  12565. "⚰": "coffin",
  12566. "🪦": "headstone",
  12567. "⚱": "funeral-urn",
  12568. "🧿": "nazar-amulet",
  12569. "🪬": "hamsa",
  12570. "🗿": "moai",
  12571. "🪧": "placard",
  12572. "🪪": "identification-card",
  12573. "🏧": "atm-sign",
  12574. "🚮": "litter-in-bin-sign",
  12575. "🚰": "potable-water",
  12576. "♿": "wheelchair-symbol",
  12577. "🚹": "men-s-room",
  12578. "🚺": "women-s-room",
  12579. "🚻": "restroom",
  12580. "🚼": "baby-symbol",
  12581. "🚾": "water-closet",
  12582. "🛂": "passport-control",
  12583. "🛃": "customs",
  12584. "🛄": "baggage-claim",
  12585. "🛅": "left-luggage",
  12586. "⚠": "warning",
  12587. "🚸": "children-crossing",
  12588. "⛔": "no-entry",
  12589. "🚫": "prohibited",
  12590. "🚳": "no-bicycles",
  12591. "🚭": "no-smoking",
  12592. "🚯": "no-littering",
  12593. "🚱": "non-potable-water",
  12594. "🚷": "no-pedestrians",
  12595. "📵": "no-mobile-phones",
  12596. "🔞": "no-one-under-eighteen",
  12597. "☢": "radioactive",
  12598. "☣": "biohazard",
  12599. "⬆": "up-arrow",
  12600. "↗": "up-right-arrow",
  12601. "➡": "right-arrow",
  12602. "↘": "down-right-arrow",
  12603. "⬇": "down-arrow",
  12604. "↙": "down-left-arrow",
  12605. "⬅": "left-arrow",
  12606. "↖": "up-left-arrow",
  12607. "↕": "up-down-arrow",
  12608. "↔": "left-right-arrow",
  12609. "↩": "right-arrow-curving-left",
  12610. "↪": "left-arrow-curving-right",
  12611. "⤴": "right-arrow-curving-up",
  12612. "⤵": "right-arrow-curving-down",
  12613. "🔃": "clockwise-vertical-arrows",
  12614. "🔄": "counterclockwise-arrows-button",
  12615. "🔙": "back-arrow",
  12616. "🔚": "end-arrow",
  12617. "🔛": "on!-arrow",
  12618. "🔜": "soon-arrow",
  12619. "🔝": "top-arrow",
  12620. "🛐": "place-of-worship",
  12621. "⚛": "atom-symbol",
  12622. "🕉": "om",
  12623. "✡": "star-of-david",
  12624. "☸": "wheel-of-dharma",
  12625. "☯": "yin-yang",
  12626. "✝": "latin-cross",
  12627. "☦": "orthodox-cross",
  12628. "☪": "star-and-crescent",
  12629. "☮": "peace-symbol",
  12630. "🕎": "menorah",
  12631. "🔯": "dotted-six-pointed-star",
  12632. "🪯": "⊛-khanda",
  12633. "♈": "aries",
  12634. "♉": "taurus",
  12635. "♊": "gemini",
  12636. "♋": "cancer",
  12637. "♌": "leo",
  12638. "♍": "virgo",
  12639. "♎": "libra",
  12640. "♏": "scorpio",
  12641. "♐": "sagittarius",
  12642. "♑": "capricorn",
  12643. "♒": "aquarius",
  12644. "♓": "pisces",
  12645. "⛎": "ophiuchus",
  12646. "🔀": "shuffle-tracks-button",
  12647. "🔁": "repeat-button",
  12648. "🔂": "repeat-single-button",
  12649. "▶": "play-button",
  12650. "⏩": "fast-forward-button",
  12651. "⏭": "next-track-button",
  12652. "⏯": "play-or-pause-button",
  12653. "◀": "reverse-button",
  12654. "⏪": "fast-reverse-button",
  12655. "⏮": "last-track-button",
  12656. "🔼": "upwards-button",
  12657. "⏫": "fast-up-button",
  12658. "🔽": "downwards-button",
  12659. "⏬": "fast-down-button",
  12660. "⏸": "pause-button",
  12661. "⏹": "stop-button",
  12662. "⏺": "record-button",
  12663. "⏏": "eject-button",
  12664. "🎦": "cinema",
  12665. "🔅": "dim-button",
  12666. "🔆": "bright-button",
  12667. "📶": "antenna-bars",
  12668. "🛜": "⊛-wireless",
  12669. "📳": "vibration-mode",
  12670. "📴": "mobile-phone-off",
  12671. "♀": "female-sign",
  12672. "♂": "male-sign",
  12673. "⚧": "transgender-symbol",
  12674. "✖": "multiply",
  12675. "➕": "plus",
  12676. "➖": "minus",
  12677. "➗": "divide",
  12678. "🟰": "heavy-equals-sign",
  12679. "♾": "infinity",
  12680. "‼": "double-exclamation-mark",
  12681. "⁉": "exclamation-question-mark",
  12682. "❓": "red-question-mark",
  12683. "❔": "white-question-mark",
  12684. "❕": "white-exclamation-mark",
  12685. "❗": "red-exclamation-mark",
  12686. "〰": "wavy-dash",
  12687. "💱": "currency-exchange",
  12688. "💲": "heavy-dollar-sign",
  12689. "⚕": "medical-symbol",
  12690. "♻": "recycling-symbol",
  12691. "⚜": "fleur-de-lis",
  12692. "🔱": "trident-emblem",
  12693. "📛": "name-badge",
  12694. "🔰": "japanese-symbol-for-beginner",
  12695. "⭕": "hollow-red-circle",
  12696. "✅": "check-mark-button",
  12697. "☑": "check-box-with-check",
  12698. "✔": "check-mark",
  12699. "❌": "cross-mark",
  12700. "❎": "cross-mark-button",
  12701. "➰": "curly-loop",
  12702. "➿": "double-curly-loop",
  12703. "〽": "part-alternation-mark",
  12704. "✳": "eight-spoked-asterisk",
  12705. "✴": "eight-pointed-star",
  12706. "❇": "sparkle",
  12707. "©": "copyright",
  12708. "®": "registered",
  12709. "™": "trade-mark",
  12710. "#️⃣": "keycap-#",
  12711. "*️⃣": "keycap-*",
  12712. "0️⃣": "keycap-0",
  12713. "1️⃣": "keycap-1",
  12714. "2️⃣": "keycap-2",
  12715. "3️⃣": "keycap-3",
  12716. "4️⃣": "keycap-4",
  12717. "5️⃣": "keycap-5",
  12718. "6️⃣": "keycap-6",
  12719. "7️⃣": "keycap-7",
  12720. "8️⃣": "keycap-8",
  12721. "9️⃣": "keycap-9",
  12722. "🔟": "keycap-10",
  12723. "🔠": "input-latin-uppercase",
  12724. "🔡": "input-latin-lowercase",
  12725. "🔢": "input-numbers",
  12726. "🔣": "input-symbols",
  12727. "🔤": "input-latin-letters",
  12728. "🅰": "a-button-(blood-type)",
  12729. "🆎": "ab-button-(blood-type)",
  12730. "🅱": "b-button-(blood-type)",
  12731. "🆑": "cl-button",
  12732. "🆒": "cool-button",
  12733. "🆓": "free-button",
  12734. ℹ: "information",
  12735. "🆔": "id-button",
  12736. "Ⓜ": "circled-m",
  12737. "🆕": "new-button",
  12738. "🆖": "ng-button",
  12739. "🅾": "o-button-(blood-type)",
  12740. "🆗": "ok-button",
  12741. "🅿": "p-button",
  12742. "🆘": "sos-button",
  12743. "🆙": "up!-button",
  12744. "🆚": "vs-button",
  12745. "🈁": "japanese-here-button",
  12746. "🈂": "japanese-service-charge-button",
  12747. "🈷": "japanese-monthly-amount-button",
  12748. "🈶": "japanese-not-free-of-charge-button",
  12749. "🈯": "japanese-reserved-button",
  12750. "🉐": "japanese-bargain-button",
  12751. "🈹": "japanese-discount-button",
  12752. "🈚": "japanese-free-of-charge-button",
  12753. "🈲": "japanese-prohibited-button",
  12754. "🉑": "japanese-acceptable-button",
  12755. "🈸": "japanese-application-button",
  12756. "🈴": "japanese-passing-grade-button",
  12757. "🈳": "japanese-vacancy-button",
  12758. "㊗": "japanese-congratulations-button",
  12759. "㊙": "japanese-secret-button",
  12760. "🈺": "japanese-open-for-business-button",
  12761. "🈵": "japanese-no-vacancy-button",
  12762. "🔴": "red-circle",
  12763. "🟠": "orange-circle",
  12764. "🟡": "yellow-circle",
  12765. "🟢": "green-circle",
  12766. "🔵": "blue-circle",
  12767. "🟣": "purple-circle",
  12768. "🟤": "brown-circle",
  12769. "⚫": "black-circle",
  12770. "⚪": "white-circle",
  12771. "🟥": "red-square",
  12772. "🟧": "orange-square",
  12773. "🟨": "yellow-square",
  12774. "🟩": "green-square",
  12775. "🟦": "blue-square",
  12776. "🟪": "purple-square",
  12777. "🟫": "brown-square",
  12778. "⬛": "black-large-square",
  12779. "⬜": "white-large-square",
  12780. "◼": "black-medium-square",
  12781. "◻": "white-medium-square",
  12782. "◾": "black-medium-small-square",
  12783. "◽": "white-medium-small-square",
  12784. "▪": "black-small-square",
  12785. "▫": "white-small-square",
  12786. "🔶": "large-orange-diamond",
  12787. "🔷": "large-blue-diamond",
  12788. "🔸": "small-orange-diamond",
  12789. "🔹": "small-blue-diamond",
  12790. "🔺": "red-triangle-pointed-up",
  12791. "🔻": "red-triangle-pointed-down",
  12792. "💠": "diamond-with-a-dot",
  12793. "🔘": "radio-button",
  12794. "🔳": "white-square-button",
  12795. "🔲": "black-square-button",
  12796. "🏁": "chequered-flag",
  12797. "🚩": "triangular-flag",
  12798. "🎌": "crossed-flags",
  12799. "🏴": "black-flag",
  12800. "🏳": "white-flag",
  12801. "🏳️‍🌈": "rainbow-flag",
  12802. "🏳️‍⚧️": "transgender-flag",
  12803. "🏴‍☠️": "pirate-flag",
  12804. "🇦🇨": "flag-ascension-island",
  12805. "🇦🇩": "flag-andorra",
  12806. "🇦🇪": "flag-united-arab-emirates",
  12807. "🇦🇫": "flag-afghanistan",
  12808. "🇦🇬": "flag-antigua-and-barbuda",
  12809. "🇦🇮": "flag-anguilla",
  12810. "🇦🇱": "flag-albania",
  12811. "🇦🇲": "flag-armenia",
  12812. "🇦🇴": "flag-angola",
  12813. "🇦🇶": "flag-antarctica",
  12814. "🇦🇷": "flag-argentina",
  12815. "🇦🇸": "flag-american-samoa",
  12816. "🇦🇹": "flag-austria",
  12817. "🇦🇺": "flag-australia",
  12818. "🇦🇼": "flag-aruba",
  12819. "🇦🇽": "flag-åland-islands",
  12820. "🇦🇿": "flag-azerbaijan",
  12821. "🇧🇦": "flag-bosnia-and-herzegovina",
  12822. "🇧🇧": "flag-barbados",
  12823. "🇧🇩": "flag-bangladesh",
  12824. "🇧🇪": "flag-belgium",
  12825. "🇧🇫": "flag-burkina-faso",
  12826. "🇧🇬": "flag-bulgaria",
  12827. "🇧🇭": "flag-bahrain",
  12828. "🇧🇮": "flag-burundi",
  12829. "🇧🇯": "flag-benin",
  12830. "🇧🇱": "flag-st-barthelemy",
  12831. "🇧🇲": "flag-bermuda",
  12832. "🇧🇳": "flag-brunei",
  12833. "🇧🇴": "flag-bolivia",
  12834. "🇧🇶": "flag-caribbean-netherlands",
  12835. "🇧🇷": "flag-brazil",
  12836. "🇧🇸": "flag-bahamas",
  12837. "🇧🇹": "flag-bhutan",
  12838. "🇧🇻": "flag-bouvet-island",
  12839. "🇧🇼": "flag-botswana",
  12840. "🇧🇾": "flag-belarus",
  12841. "🇧🇿": "flag-belize",
  12842. "🇨🇦": "flag-canada",
  12843. "🇨🇨": "flag-cocos-(keeling)-islands",
  12844. "🇨🇩": "flag-congo---kinshasa",
  12845. "🇨🇫": "flag-central-african-republic",
  12846. "🇨🇬": "flag-congo---brazzaville",
  12847. "🇨🇭": "flag-switzerland",
  12848. "🇨🇮": "flag-côte-d-ivoire",
  12849. "🇨🇰": "flag-cook-islands",
  12850. "🇨🇱": "flag-chile",
  12851. "🇨🇲": "flag-cameroon",
  12852. "🇨🇳": "flag-china",
  12853. "🇨🇴": "flag-colombia",
  12854. "🇨🇵": "flag-clipperton-island",
  12855. "🇨🇷": "flag-costa-rica",
  12856. "🇨🇺": "flag-cuba",
  12857. "🇨🇻": "flag-cape-verde",
  12858. "🇨🇼": "flag-curaçao",
  12859. "🇨🇽": "flag-christmas-island",
  12860. "🇨🇾": "flag-cyprus",
  12861. "🇨🇿": "flag-czechia",
  12862. "🇩🇪": "flag-germany",
  12863. "🇩🇬": "flag-diego-garcia",
  12864. "🇩🇯": "flag-djibouti",
  12865. "🇩🇰": "flag-denmark",
  12866. "🇩🇲": "flag-dominica",
  12867. "🇩🇴": "flag-dominican-republic",
  12868. "🇩🇿": "flag-algeria",
  12869. "🇪🇦": "flag-ceuta-and-melilla",
  12870. "🇪🇨": "flag-ecuador",
  12871. "🇪🇪": "flag-estonia",
  12872. "🇪🇬": "flag-egypt",
  12873. "🇪🇭": "flag-western-sahara",
  12874. "🇪🇷": "flag-eritrea",
  12875. "🇪🇸": "flag-spain",
  12876. "🇪🇹": "flag-ethiopia",
  12877. "🇪🇺": "flag-european-union",
  12878. "🇫🇮": "flag-finland",
  12879. "🇫🇯": "flag-fiji",
  12880. "🇫🇰": "flag-falkland-islands",
  12881. "🇫🇲": "flag-micronesia",
  12882. "🇫🇴": "flag-faroe-islands",
  12883. "🇫🇷": "flag-france",
  12884. "🇬🇦": "flag-gabon",
  12885. "🇬🇧": "flag-united-kingdom",
  12886. "🇬🇩": "flag-grenada",
  12887. "🇬🇪": "flag-georgia",
  12888. "🇬🇫": "flag-french-guiana",
  12889. "🇬🇬": "flag-guernsey",
  12890. "🇬🇭": "flag-ghana",
  12891. "🇬🇮": "flag-gibraltar",
  12892. "🇬🇱": "flag-greenland",
  12893. "🇬🇲": "flag-gambia",
  12894. "🇬🇳": "flag-guinea",
  12895. "🇬🇵": "flag-guadeloupe",
  12896. "🇬🇶": "flag-equatorial-guinea",
  12897. "🇬🇷": "flag-greece",
  12898. "🇬🇸": "flag-south-georgia-and-south-sandwich-islands",
  12899. "🇬🇹": "flag-guatemala",
  12900. "🇬🇺": "flag-guam",
  12901. "🇬🇼": "flag-guinea-bissau",
  12902. "🇬🇾": "flag-guyana",
  12903. "🇭🇰": "flag-hong-kong-sar-china",
  12904. "🇭🇲": "flag-heard-and-mcdonald-islands",
  12905. "🇭🇳": "flag-honduras",
  12906. "🇭🇷": "flag-croatia",
  12907. "🇭🇹": "flag-haiti",
  12908. "🇭🇺": "flag-hungary",
  12909. "🇮🇨": "flag-canary-islands",
  12910. "🇮🇩": "flag-indonesia",
  12911. "🇮🇪": "flag-ireland",
  12912. "🇮🇱": "flag-israel",
  12913. "🇮🇲": "flag-isle-of-man",
  12914. "🇮🇳": "flag-india",
  12915. "🇮🇴": "flag-british-indian-ocean-territory",
  12916. "🇮🇶": "flag-iraq",
  12917. "🇮🇷": "flag-iran",
  12918. "🇮🇸": "flag-iceland",
  12919. "🇮🇹": "flag-italy",
  12920. "🇯🇪": "flag-jersey",
  12921. "🇯🇲": "flag-jamaica",
  12922. "🇯🇴": "flag-jordan",
  12923. "🇯🇵": "flag-japan",
  12924. "🇰🇪": "flag-kenya",
  12925. "🇰🇬": "flag-kyrgyzstan",
  12926. "🇰🇭": "flag-cambodia",
  12927. "🇰🇮": "flag-kiribati",
  12928. "🇰🇲": "flag-comoros",
  12929. "🇰🇳": "flag-st-kitts-and-nevis",
  12930. "🇰🇵": "flag-north-korea",
  12931. "🇰🇷": "flag-south-korea",
  12932. "🇰🇼": "flag-kuwait",
  12933. "🇰🇾": "flag-cayman-islands",
  12934. "🇰🇿": "flag-kazakhstan",
  12935. "🇱🇦": "flag-laos",
  12936. "🇱🇧": "flag-lebanon",
  12937. "🇱🇨": "flag-st-lucia",
  12938. "🇱🇮": "flag-liechtenstein",
  12939. "🇱🇰": "flag-sri-lanka",
  12940. "🇱🇷": "flag-liberia",
  12941. "🇱🇸": "flag-lesotho",
  12942. "🇱🇹": "flag-lithuania",
  12943. "🇱🇺": "flag-luxembourg",
  12944. "🇱🇻": "flag-latvia",
  12945. "🇱🇾": "flag-libya",
  12946. "🇲🇦": "flag-morocco",
  12947. "🇲🇨": "flag-monaco",
  12948. "🇲🇩": "flag-moldova",
  12949. "🇲🇪": "flag-montenegro",
  12950. "🇲🇫": "flag-st-martin",
  12951. "🇲🇬": "flag-madagascar",
  12952. "🇲🇭": "flag-marshall-islands",
  12953. "🇲🇰": "flag-north-macedonia",
  12954. "🇲🇱": "flag-mali",
  12955. "🇲🇲": "flag-myanmar-(burma)",
  12956. "🇲🇳": "flag-mongolia",
  12957. "🇲🇴": "flag-macao-sar-china",
  12958. "🇲🇵": "flag-northern-mariana-islands",
  12959. "🇲🇶": "flag-martinique",
  12960. "🇲🇷": "flag-mauritania",
  12961. "🇲🇸": "flag-montserrat",
  12962. "🇲🇹": "flag-malta",
  12963. "🇲🇺": "flag-mauritius",
  12964. "🇲🇻": "flag-maldives",
  12965. "🇲🇼": "flag-malawi",
  12966. "🇲🇽": "flag-mexico",
  12967. "🇲🇾": "flag-malaysia",
  12968. "🇲🇿": "flag-mozambique",
  12969. "🇳🇦": "flag-namibia",
  12970. "🇳🇨": "flag-new-caledonia",
  12971. "🇳🇪": "flag-niger",
  12972. "🇳🇫": "flag-norfolk-island",
  12973. "🇳🇬": "flag-nigeria",
  12974. "🇳🇮": "flag-nicaragua",
  12975. "🇳🇱": "flag-netherlands",
  12976. "🇳🇴": "flag-norway",
  12977. "🇳🇵": "flag-nepal",
  12978. "🇳🇷": "flag-nauru",
  12979. "🇳🇺": "flag-niue",
  12980. "🇳🇿": "flag-new-zealand",
  12981. "🇴🇲": "flag-oman",
  12982. "🇵🇦": "flag-panama",
  12983. "🇵🇪": "flag-peru",
  12984. "🇵🇫": "flag-french-polynesia",
  12985. "🇵🇬": "flag-papua-new-guinea",
  12986. "🇵🇭": "flag-philippines",
  12987. "🇵🇰": "flag-pakistan",
  12988. "🇵🇱": "flag-poland",
  12989. "🇵🇲": "flag-st-pierre-and-miquelon",
  12990. "🇵🇳": "flag-pitcairn-islands",
  12991. "🇵🇷": "flag-puerto-rico",
  12992. "🇵🇸": "flag-palestinian-territories",
  12993. "🇵🇹": "flag-portugal",
  12994. "🇵🇼": "flag-palau",
  12995. "🇵🇾": "flag-paraguay",
  12996. "🇶🇦": "flag-qatar",
  12997. "🇷🇪": "flag-reunion",
  12998. "🇷🇴": "flag-romania",
  12999. "🇷🇸": "flag-serbia",
  13000. "🇷🇺": "flag-russia",
  13001. "🇷🇼": "flag-rwanda",
  13002. "🇸🇦": "flag-saudi-arabia",
  13003. "🇸🇧": "flag-solomon-islands",
  13004. "🇸🇨": "flag-seychelles",
  13005. "🇸🇩": "flag-sudan",
  13006. "🇸🇪": "flag-sweden",
  13007. "🇸🇬": "flag-singapore",
  13008. "🇸🇭": "flag-st-helena",
  13009. "🇸🇮": "flag-slovenia",
  13010. "🇸🇯": "flag-svalbard-and-jan-mayen",
  13011. "🇸🇰": "flag-slovakia",
  13012. "🇸🇱": "flag-sierra-leone",
  13013. "🇸🇲": "flag-san-marino",
  13014. "🇸🇳": "flag-senegal",
  13015. "🇸🇴": "flag-somalia",
  13016. "🇸🇷": "flag-suriname",
  13017. "🇸🇸": "flag-south-sudan",
  13018. "🇸🇹": "flag-são-tome-and-príncipe",
  13019. "🇸🇻": "flag-el-salvador",
  13020. "🇸🇽": "flag-sint-maarten",
  13021. "🇸🇾": "flag-syria",
  13022. "🇸🇿": "flag-eswatini",
  13023. "🇹🇦": "flag-tristan-da-cunha",
  13024. "🇹🇨": "flag-turks-and-caicos-islands",
  13025. "🇹🇩": "flag-chad",
  13026. "🇹🇫": "flag-french-southern-territories",
  13027. "🇹🇬": "flag-togo",
  13028. "🇹🇭": "flag-thailand",
  13029. "🇹🇯": "flag-tajikistan",
  13030. "🇹🇰": "flag-tokelau",
  13031. "🇹🇱": "flag-timor-leste",
  13032. "🇹🇲": "flag-turkmenistan",
  13033. "🇹🇳": "flag-tunisia",
  13034. "🇹🇴": "flag-tonga",
  13035. "🇹🇷": "flag-turkey",
  13036. "🇹🇹": "flag-trinidad-and-tobago",
  13037. "🇹🇻": "flag-tuvalu",
  13038. "🇹🇼": "flag-taiwan",
  13039. "🇹🇿": "flag-tanzania",
  13040. "🇺🇦": "flag-ukraine",
  13041. "🇺🇬": "flag-uganda",
  13042. "🇺🇲": "flag-us-outlying-islands",
  13043. "🇺🇳": "flag-united-nations",
  13044. "🇺🇸": "flag-united-states",
  13045. "🇺🇾": "flag-uruguay",
  13046. "🇺🇿": "flag-uzbekistan",
  13047. "🇻🇦": "flag-vatican-city",
  13048. "🇻🇨": "flag-st-vincent-and-grenadines",
  13049. "🇻🇪": "flag-venezuela",
  13050. "🇻🇬": "flag-british-virgin-islands",
  13051. "🇻🇮": "flag-us-virgin-islands",
  13052. "🇻🇳": "flag-vietnam",
  13053. "🇻🇺": "flag-vanuatu",
  13054. "🇼🇫": "flag-wallis-and-futuna",
  13055. "🇼🇸": "flag-samoa",
  13056. "🇽🇰": "flag-kosovo",
  13057. "🇾🇪": "flag-yemen",
  13058. "🇾🇹": "flag-mayotte",
  13059. "🇿🇦": "flag-south-africa",
  13060. "🇿🇲": "flag-zambia",
  13061. "🇿🇼": "flag-zimbabwe",
  13062. "🏴󠁧󠁢󠁥󠁮󠁧󠁿": "flag-england",
  13063. "🏴󠁧󠁢󠁳󠁣󠁴󠁿": "flag-scotland",
  13064. "🏴󠁧󠁢󠁷󠁬󠁳󠁿": "flag-wales"
  13065. };
  13066. const EMOJIS = Object.keys(EMOJI_NAMES);
  13067. // https://publicsuffix.org/list/public_suffix_list.dat
  13068. const PUBLIC_SUFFIX_LIST = `
  13069. // This Source Code Form is subject to the terms of the Mozilla Public
  13070. // License, v. 2.0. If a copy of the MPL was not distributed with this
  13071. // file, You can obtain one at https://mozilla.org/MPL/2.0/.
  13072. // Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat,
  13073. // rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported.
  13074. // Instructions on pulling and using this list can be found at https://publicsuffix.org/list/.
  13075. // ===BEGIN ICANN DOMAINS===
  13076. // ac : http://nic.ac/rules.htm
  13077. ac
  13078. com.ac
  13079. edu.ac
  13080. gov.ac
  13081. net.ac
  13082. mil.ac
  13083. org.ac
  13084. // ad : https://en.wikipedia.org/wiki/.ad
  13085. ad
  13086. nom.ad
  13087. // ae : https://tdra.gov.ae/en/aeda/ae-policies
  13088. ae
  13089. co.ae
  13090. net.ae
  13091. org.ae
  13092. sch.ae
  13093. ac.ae
  13094. gov.ae
  13095. mil.ae
  13096. // aero : see https://www.information.aero/index.php?id=66
  13097. aero
  13098. accident-investigation.aero
  13099. accident-prevention.aero
  13100. aerobatic.aero
  13101. aeroclub.aero
  13102. aerodrome.aero
  13103. agents.aero
  13104. aircraft.aero
  13105. airline.aero
  13106. airport.aero
  13107. air-surveillance.aero
  13108. airtraffic.aero
  13109. air-traffic-control.aero
  13110. ambulance.aero
  13111. amusement.aero
  13112. association.aero
  13113. author.aero
  13114. ballooning.aero
  13115. broker.aero
  13116. caa.aero
  13117. cargo.aero
  13118. catering.aero
  13119. certification.aero
  13120. championship.aero
  13121. charter.aero
  13122. civilaviation.aero
  13123. club.aero
  13124. conference.aero
  13125. consultant.aero
  13126. consulting.aero
  13127. control.aero
  13128. council.aero
  13129. crew.aero
  13130. design.aero
  13131. dgca.aero
  13132. educator.aero
  13133. emergency.aero
  13134. engine.aero
  13135. engineer.aero
  13136. entertainment.aero
  13137. equipment.aero
  13138. exchange.aero
  13139. express.aero
  13140. federation.aero
  13141. flight.aero
  13142. fuel.aero
  13143. gliding.aero
  13144. government.aero
  13145. groundhandling.aero
  13146. group.aero
  13147. hanggliding.aero
  13148. homebuilt.aero
  13149. insurance.aero
  13150. journal.aero
  13151. journalist.aero
  13152. leasing.aero
  13153. logistics.aero
  13154. magazine.aero
  13155. maintenance.aero
  13156. media.aero
  13157. microlight.aero
  13158. modelling.aero
  13159. navigation.aero
  13160. parachuting.aero
  13161. paragliding.aero
  13162. passenger-association.aero
  13163. pilot.aero
  13164. press.aero
  13165. production.aero
  13166. recreation.aero
  13167. repbody.aero
  13168. res.aero
  13169. research.aero
  13170. rotorcraft.aero
  13171. safety.aero
  13172. scientist.aero
  13173. services.aero
  13174. show.aero
  13175. skydiving.aero
  13176. software.aero
  13177. student.aero
  13178. trader.aero
  13179. trading.aero
  13180. trainer.aero
  13181. union.aero
  13182. workinggroup.aero
  13183. works.aero
  13184. // af : http://www.nic.af/help.jsp
  13185. af
  13186. gov.af
  13187. com.af
  13188. org.af
  13189. net.af
  13190. edu.af
  13191. // ag : http://www.nic.ag/prices.htm
  13192. ag
  13193. com.ag
  13194. org.ag
  13195. net.ag
  13196. co.ag
  13197. nom.ag
  13198. // ai : http://nic.com.ai/
  13199. ai
  13200. off.ai
  13201. com.ai
  13202. net.ai
  13203. org.ai
  13204. // al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
  13205. al
  13206. com.al
  13207. edu.al
  13208. gov.al
  13209. mil.al
  13210. net.al
  13211. org.al
  13212. // am : https://www.amnic.net/policy/en/Policy_EN.pdf
  13213. am
  13214. co.am
  13215. com.am
  13216. commune.am
  13217. net.am
  13218. org.am
  13219. // ao : https://en.wikipedia.org/wiki/.ao
  13220. // http://www.dns.ao/REGISTR.DOC
  13221. ao
  13222. ed.ao
  13223. gv.ao
  13224. og.ao
  13225. co.ao
  13226. pb.ao
  13227. it.ao
  13228. // aq : https://en.wikipedia.org/wiki/.aq
  13229. aq
  13230. // ar : https://nic.ar/es/nic-argentina/normativa
  13231. ar
  13232. bet.ar
  13233. com.ar
  13234. coop.ar
  13235. edu.ar
  13236. gob.ar
  13237. gov.ar
  13238. int.ar
  13239. mil.ar
  13240. musica.ar
  13241. mutual.ar
  13242. net.ar
  13243. org.ar
  13244. senasa.ar
  13245. tur.ar
  13246. // arpa : https://en.wikipedia.org/wiki/.arpa
  13247. // Confirmed by registry <iana-questions@icann.org> 2008-06-18
  13248. arpa
  13249. e164.arpa
  13250. in-addr.arpa
  13251. ip6.arpa
  13252. iris.arpa
  13253. uri.arpa
  13254. urn.arpa
  13255. // as : https://en.wikipedia.org/wiki/.as
  13256. as
  13257. gov.as
  13258. // asia : https://en.wikipedia.org/wiki/.asia
  13259. asia
  13260. // at : https://en.wikipedia.org/wiki/.at
  13261. // Confirmed by registry <it@nic.at> 2008-06-17
  13262. at
  13263. ac.at
  13264. co.at
  13265. gv.at
  13266. or.at
  13267. sth.ac.at
  13268. // au : https://en.wikipedia.org/wiki/.au
  13269. // http://www.auda.org.au/
  13270. au
  13271. // 2LDs
  13272. com.au
  13273. net.au
  13274. org.au
  13275. edu.au
  13276. gov.au
  13277. asn.au
  13278. id.au
  13279. // Historic 2LDs (closed to new registration, but sites still exist)
  13280. info.au
  13281. conf.au
  13282. oz.au
  13283. // CGDNs - http://www.cgdn.org.au/
  13284. act.au
  13285. nsw.au
  13286. nt.au
  13287. qld.au
  13288. sa.au
  13289. tas.au
  13290. vic.au
  13291. wa.au
  13292. // 3LDs
  13293. act.edu.au
  13294. catholic.edu.au
  13295. // eq.edu.au - Removed at the request of the Queensland Department of Education
  13296. nsw.edu.au
  13297. nt.edu.au
  13298. qld.edu.au
  13299. sa.edu.au
  13300. tas.edu.au
  13301. vic.edu.au
  13302. wa.edu.au
  13303. // act.gov.au Bug 984824 - Removed at request of Greg Tankard
  13304. // nsw.gov.au Bug 547985 - Removed at request of <Shae.Donelan@services.nsw.gov.au>
  13305. // nt.gov.au Bug 940478 - Removed at request of Greg Connors <Greg.Connors@nt.gov.au>
  13306. qld.gov.au
  13307. sa.gov.au
  13308. tas.gov.au
  13309. vic.gov.au
  13310. wa.gov.au
  13311. // 4LDs
  13312. // education.tas.edu.au - Removed at the request of the Department of Education Tasmania
  13313. schools.nsw.edu.au
  13314. // aw : https://en.wikipedia.org/wiki/.aw
  13315. aw
  13316. com.aw
  13317. // ax : https://en.wikipedia.org/wiki/.ax
  13318. ax
  13319. // az : https://en.wikipedia.org/wiki/.az
  13320. az
  13321. com.az
  13322. net.az
  13323. int.az
  13324. gov.az
  13325. org.az
  13326. edu.az
  13327. info.az
  13328. pp.az
  13329. mil.az
  13330. name.az
  13331. pro.az
  13332. biz.az
  13333. // ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf
  13334. ba
  13335. com.ba
  13336. edu.ba
  13337. gov.ba
  13338. mil.ba
  13339. net.ba
  13340. org.ba
  13341. // bb : https://en.wikipedia.org/wiki/.bb
  13342. bb
  13343. biz.bb
  13344. co.bb
  13345. com.bb
  13346. edu.bb
  13347. gov.bb
  13348. info.bb
  13349. net.bb
  13350. org.bb
  13351. store.bb
  13352. tv.bb
  13353. // bd : https://en.wikipedia.org/wiki/.bd
  13354. *.bd
  13355. // be : https://en.wikipedia.org/wiki/.be
  13356. // Confirmed by registry <tech@dns.be> 2008-06-08
  13357. be
  13358. ac.be
  13359. // bf : https://en.wikipedia.org/wiki/.bf
  13360. bf
  13361. gov.bf
  13362. // bg : https://en.wikipedia.org/wiki/.bg
  13363. // https://www.register.bg/user/static/rules/en/index.html
  13364. bg
  13365. a.bg
  13366. b.bg
  13367. c.bg
  13368. d.bg
  13369. e.bg
  13370. f.bg
  13371. g.bg
  13372. h.bg
  13373. i.bg
  13374. j.bg
  13375. k.bg
  13376. l.bg
  13377. m.bg
  13378. n.bg
  13379. o.bg
  13380. p.bg
  13381. q.bg
  13382. r.bg
  13383. s.bg
  13384. t.bg
  13385. u.bg
  13386. v.bg
  13387. w.bg
  13388. x.bg
  13389. y.bg
  13390. z.bg
  13391. 0.bg
  13392. 1.bg
  13393. 2.bg
  13394. 3.bg
  13395. 4.bg
  13396. 5.bg
  13397. 6.bg
  13398. 7.bg
  13399. 8.bg
  13400. 9.bg
  13401. // bh : https://en.wikipedia.org/wiki/.bh
  13402. bh
  13403. com.bh
  13404. edu.bh
  13405. net.bh
  13406. org.bh
  13407. gov.bh
  13408. // bi : https://en.wikipedia.org/wiki/.bi
  13409. // http://whois.nic.bi/
  13410. bi
  13411. co.bi
  13412. com.bi
  13413. edu.bi
  13414. or.bi
  13415. org.bi
  13416. // biz : https://en.wikipedia.org/wiki/.biz
  13417. biz
  13418. // bj : https://nic.bj/bj-suffixes.txt
  13419. // submitted by registry <contact@nic.bj>
  13420. bj
  13421. africa.bj
  13422. agro.bj
  13423. architectes.bj
  13424. assur.bj
  13425. avocats.bj
  13426. co.bj
  13427. com.bj
  13428. eco.bj
  13429. econo.bj
  13430. edu.bj
  13431. info.bj
  13432. loisirs.bj
  13433. money.bj
  13434. net.bj
  13435. org.bj
  13436. ote.bj
  13437. resto.bj
  13438. restaurant.bj
  13439. tourism.bj
  13440. univ.bj
  13441. // bm : http://www.bermudanic.bm/dnr-text.txt
  13442. bm
  13443. com.bm
  13444. edu.bm
  13445. gov.bm
  13446. net.bm
  13447. org.bm
  13448. // bn : http://www.bnnic.bn/faqs
  13449. bn
  13450. com.bn
  13451. edu.bn
  13452. gov.bn
  13453. net.bn
  13454. org.bn
  13455. // bo : https://nic.bo/delegacion2015.php#h-1.10
  13456. bo
  13457. com.bo
  13458. edu.bo
  13459. gob.bo
  13460. int.bo
  13461. org.bo
  13462. net.bo
  13463. mil.bo
  13464. tv.bo
  13465. web.bo
  13466. // Social Domains
  13467. academia.bo
  13468. agro.bo
  13469. arte.bo
  13470. blog.bo
  13471. bolivia.bo
  13472. ciencia.bo
  13473. cooperativa.bo
  13474. democracia.bo
  13475. deporte.bo
  13476. ecologia.bo
  13477. economia.bo
  13478. empresa.bo
  13479. indigena.bo
  13480. industria.bo
  13481. info.bo
  13482. medicina.bo
  13483. movimiento.bo
  13484. musica.bo
  13485. natural.bo
  13486. nombre.bo
  13487. noticias.bo
  13488. patria.bo
  13489. politica.bo
  13490. profesional.bo
  13491. plurinacional.bo
  13492. pueblo.bo
  13493. revista.bo
  13494. salud.bo
  13495. tecnologia.bo
  13496. tksat.bo
  13497. transporte.bo
  13498. wiki.bo
  13499. // br : http://registro.br/dominio/categoria.html
  13500. // Submitted by registry <fneves@registro.br>
  13501. br
  13502. 9guacu.br
  13503. abc.br
  13504. adm.br
  13505. adv.br
  13506. agr.br
  13507. aju.br
  13508. am.br
  13509. anani.br
  13510. aparecida.br
  13511. app.br
  13512. arq.br
  13513. art.br
  13514. ato.br
  13515. b.br
  13516. barueri.br
  13517. belem.br
  13518. bhz.br
  13519. bib.br
  13520. bio.br
  13521. blog.br
  13522. bmd.br
  13523. boavista.br
  13524. bsb.br
  13525. campinagrande.br
  13526. campinas.br
  13527. caxias.br
  13528. cim.br
  13529. cng.br
  13530. cnt.br
  13531. com.br
  13532. contagem.br
  13533. coop.br
  13534. coz.br
  13535. cri.br
  13536. cuiaba.br
  13537. curitiba.br
  13538. def.br
  13539. des.br
  13540. det.br
  13541. dev.br
  13542. ecn.br
  13543. eco.br
  13544. edu.br
  13545. emp.br
  13546. enf.br
  13547. eng.br
  13548. esp.br
  13549. etc.br
  13550. eti.br
  13551. far.br
  13552. feira.br
  13553. flog.br
  13554. floripa.br
  13555. fm.br
  13556. fnd.br
  13557. fortal.br
  13558. fot.br
  13559. foz.br
  13560. fst.br
  13561. g12.br
  13562. geo.br
  13563. ggf.br
  13564. goiania.br
  13565. gov.br
  13566. // gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil
  13567. ac.gov.br
  13568. al.gov.br
  13569. am.gov.br
  13570. ap.gov.br
  13571. ba.gov.br
  13572. ce.gov.br
  13573. df.gov.br
  13574. es.gov.br
  13575. go.gov.br
  13576. ma.gov.br
  13577. mg.gov.br
  13578. ms.gov.br
  13579. mt.gov.br
  13580. pa.gov.br
  13581. pb.gov.br
  13582. pe.gov.br
  13583. pi.gov.br
  13584. pr.gov.br
  13585. rj.gov.br
  13586. rn.gov.br
  13587. ro.gov.br
  13588. rr.gov.br
  13589. rs.gov.br
  13590. sc.gov.br
  13591. se.gov.br
  13592. sp.gov.br
  13593. to.gov.br
  13594. gru.br
  13595. imb.br
  13596. ind.br
  13597. inf.br
  13598. jab.br
  13599. jampa.br
  13600. jdf.br
  13601. joinville.br
  13602. jor.br
  13603. jus.br
  13604. leg.br
  13605. lel.br
  13606. log.br
  13607. londrina.br
  13608. macapa.br
  13609. maceio.br
  13610. manaus.br
  13611. maringa.br
  13612. mat.br
  13613. med.br
  13614. mil.br
  13615. morena.br
  13616. mp.br
  13617. mus.br
  13618. natal.br
  13619. net.br
  13620. niteroi.br
  13621. *.nom.br
  13622. not.br
  13623. ntr.br
  13624. odo.br
  13625. ong.br
  13626. org.br
  13627. osasco.br
  13628. palmas.br
  13629. poa.br
  13630. ppg.br
  13631. pro.br
  13632. psc.br
  13633. psi.br
  13634. pvh.br
  13635. qsl.br
  13636. radio.br
  13637. rec.br
  13638. recife.br
  13639. rep.br
  13640. ribeirao.br
  13641. rio.br
  13642. riobranco.br
  13643. riopreto.br
  13644. salvador.br
  13645. sampa.br
  13646. santamaria.br
  13647. santoandre.br
  13648. saobernardo.br
  13649. saogonca.br
  13650. seg.br
  13651. sjc.br
  13652. slg.br
  13653. slz.br
  13654. sorocaba.br
  13655. srv.br
  13656. taxi.br
  13657. tc.br
  13658. tec.br
  13659. teo.br
  13660. the.br
  13661. tmp.br
  13662. trd.br
  13663. tur.br
  13664. tv.br
  13665. udi.br
  13666. vet.br
  13667. vix.br
  13668. vlog.br
  13669. wiki.br
  13670. zlg.br
  13671. // bs : http://www.nic.bs/rules.html
  13672. bs
  13673. com.bs
  13674. net.bs
  13675. org.bs
  13676. edu.bs
  13677. gov.bs
  13678. // bt : https://en.wikipedia.org/wiki/.bt
  13679. bt
  13680. com.bt
  13681. edu.bt
  13682. gov.bt
  13683. net.bt
  13684. org.bt
  13685. // bv : No registrations at this time.
  13686. // Submitted by registry <jarle@uninett.no>
  13687. bv
  13688. // bw : https://en.wikipedia.org/wiki/.bw
  13689. // http://www.gobin.info/domainname/bw.doc
  13690. // list of other 2nd level tlds ?
  13691. bw
  13692. co.bw
  13693. org.bw
  13694. // by : https://en.wikipedia.org/wiki/.by
  13695. // http://tld.by/rules_2006_en.html
  13696. // list of other 2nd level tlds ?
  13697. by
  13698. gov.by
  13699. mil.by
  13700. // Official information does not indicate that com.by is a reserved
  13701. // second-level domain, but it's being used as one (see www.google.com.by and
  13702. // www.yahoo.com.by, for example), so we list it here for safety's sake.
  13703. com.by
  13704. // http://hoster.by/
  13705. of.by
  13706. // bz : https://en.wikipedia.org/wiki/.bz
  13707. // http://www.belizenic.bz/
  13708. bz
  13709. com.bz
  13710. net.bz
  13711. org.bz
  13712. edu.bz
  13713. gov.bz
  13714. // ca : https://en.wikipedia.org/wiki/.ca
  13715. ca
  13716. // ca geographical names
  13717. ab.ca
  13718. bc.ca
  13719. mb.ca
  13720. nb.ca
  13721. nf.ca
  13722. nl.ca
  13723. ns.ca
  13724. nt.ca
  13725. nu.ca
  13726. on.ca
  13727. pe.ca
  13728. qc.ca
  13729. sk.ca
  13730. yk.ca
  13731. // gc.ca: https://en.wikipedia.org/wiki/.gc.ca
  13732. // see also: http://registry.gc.ca/en/SubdomainFAQ
  13733. gc.ca
  13734. // cat : https://en.wikipedia.org/wiki/.cat
  13735. cat
  13736. // cc : https://en.wikipedia.org/wiki/.cc
  13737. cc
  13738. // cd : https://en.wikipedia.org/wiki/.cd
  13739. // see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
  13740. cd
  13741. gov.cd
  13742. // cf : https://en.wikipedia.org/wiki/.cf
  13743. cf
  13744. // cg : https://en.wikipedia.org/wiki/.cg
  13745. cg
  13746. // ch : https://en.wikipedia.org/wiki/.ch
  13747. ch
  13748. // ci : https://en.wikipedia.org/wiki/.ci
  13749. // http://www.nic.ci/index.php?page=charte
  13750. ci
  13751. org.ci
  13752. or.ci
  13753. com.ci
  13754. co.ci
  13755. edu.ci
  13756. ed.ci
  13757. ac.ci
  13758. net.ci
  13759. go.ci
  13760. asso.ci
  13761. aéroport.ci
  13762. int.ci
  13763. presse.ci
  13764. md.ci
  13765. gouv.ci
  13766. // ck : https://en.wikipedia.org/wiki/.ck
  13767. *.ck
  13768. !www.ck
  13769. // cl : https://www.nic.cl
  13770. // Confirmed by .CL registry <hsalgado@nic.cl>
  13771. cl
  13772. co.cl
  13773. gob.cl
  13774. gov.cl
  13775. mil.cl
  13776. // cm : https://en.wikipedia.org/wiki/.cm plus bug 981927
  13777. cm
  13778. co.cm
  13779. com.cm
  13780. gov.cm
  13781. net.cm
  13782. // cn : https://en.wikipedia.org/wiki/.cn
  13783. // Submitted by registry <tanyaling@cnnic.cn>
  13784. cn
  13785. ac.cn
  13786. com.cn
  13787. edu.cn
  13788. gov.cn
  13789. net.cn
  13790. org.cn
  13791. mil.cn
  13792. 公司.cn
  13793. 网络.cn
  13794. 網絡.cn
  13795. // cn geographic names
  13796. ah.cn
  13797. bj.cn
  13798. cq.cn
  13799. fj.cn
  13800. gd.cn
  13801. gs.cn
  13802. gz.cn
  13803. gx.cn
  13804. ha.cn
  13805. hb.cn
  13806. he.cn
  13807. hi.cn
  13808. hl.cn
  13809. hn.cn
  13810. jl.cn
  13811. js.cn
  13812. jx.cn
  13813. ln.cn
  13814. nm.cn
  13815. nx.cn
  13816. qh.cn
  13817. sc.cn
  13818. sd.cn
  13819. sh.cn
  13820. sn.cn
  13821. sx.cn
  13822. tj.cn
  13823. xj.cn
  13824. xz.cn
  13825. yn.cn
  13826. zj.cn
  13827. hk.cn
  13828. mo.cn
  13829. tw.cn
  13830. // co : https://en.wikipedia.org/wiki/.co
  13831. // Submitted by registry <tecnico@uniandes.edu.co>
  13832. co
  13833. arts.co
  13834. com.co
  13835. edu.co
  13836. firm.co
  13837. gov.co
  13838. info.co
  13839. int.co
  13840. mil.co
  13841. net.co
  13842. nom.co
  13843. org.co
  13844. rec.co
  13845. web.co
  13846. // com : https://en.wikipedia.org/wiki/.com
  13847. com
  13848. // coop : https://en.wikipedia.org/wiki/.coop
  13849. coop
  13850. // cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
  13851. cr
  13852. ac.cr
  13853. co.cr
  13854. ed.cr
  13855. fi.cr
  13856. go.cr
  13857. or.cr
  13858. sa.cr
  13859. // cu : https://en.wikipedia.org/wiki/.cu
  13860. cu
  13861. com.cu
  13862. edu.cu
  13863. org.cu
  13864. net.cu
  13865. gov.cu
  13866. inf.cu
  13867. // cv : https://en.wikipedia.org/wiki/.cv
  13868. // cv : http://www.dns.cv/tldcv_portal/do?com=DS;5446457100;111;+PAGE(4000018)+K-CAT-CODIGO(RDOM)+RCNT(100); <- registration rules
  13869. cv
  13870. com.cv
  13871. edu.cv
  13872. int.cv
  13873. nome.cv
  13874. org.cv
  13875. // cw : http://www.una.cw/cw_registry/
  13876. // Confirmed by registry <registry@una.net> 2013-03-26
  13877. cw
  13878. com.cw
  13879. edu.cw
  13880. net.cw
  13881. org.cw
  13882. // cx : https://en.wikipedia.org/wiki/.cx
  13883. // list of other 2nd level tlds ?
  13884. cx
  13885. gov.cx
  13886. // cy : http://www.nic.cy/
  13887. // Submitted by registry Panayiotou Fotia <cydns@ucy.ac.cy>
  13888. // namespace policies URL https://www.nic.cy/portal//sites/default/files/symfonia_gia_eggrafi.pdf
  13889. cy
  13890. ac.cy
  13891. biz.cy
  13892. com.cy
  13893. ekloges.cy
  13894. gov.cy
  13895. ltd.cy
  13896. mil.cy
  13897. net.cy
  13898. org.cy
  13899. press.cy
  13900. pro.cy
  13901. tm.cy
  13902. // cz : https://en.wikipedia.org/wiki/.cz
  13903. cz
  13904. // de : https://en.wikipedia.org/wiki/.de
  13905. // Confirmed by registry <ops@denic.de> (with technical
  13906. // reservations) 2008-07-01
  13907. de
  13908. // dj : https://en.wikipedia.org/wiki/.dj
  13909. dj
  13910. // dk : https://en.wikipedia.org/wiki/.dk
  13911. // Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17
  13912. dk
  13913. // dm : https://en.wikipedia.org/wiki/.dm
  13914. dm
  13915. com.dm
  13916. net.dm
  13917. org.dm
  13918. edu.dm
  13919. gov.dm
  13920. // do : https://en.wikipedia.org/wiki/.do
  13921. do
  13922. art.do
  13923. com.do
  13924. edu.do
  13925. gob.do
  13926. gov.do
  13927. mil.do
  13928. net.do
  13929. org.do
  13930. sld.do
  13931. web.do
  13932. // dz : http://www.nic.dz/images/pdf_nic/charte.pdf
  13933. dz
  13934. art.dz
  13935. asso.dz
  13936. com.dz
  13937. edu.dz
  13938. gov.dz
  13939. org.dz
  13940. net.dz
  13941. pol.dz
  13942. soc.dz
  13943. tm.dz
  13944. // ec : http://www.nic.ec/reg/paso1.asp
  13945. // Submitted by registry <vabboud@nic.ec>
  13946. ec
  13947. com.ec
  13948. info.ec
  13949. net.ec
  13950. fin.ec
  13951. k12.ec
  13952. med.ec
  13953. pro.ec
  13954. org.ec
  13955. edu.ec
  13956. gov.ec
  13957. gob.ec
  13958. mil.ec
  13959. // edu : https://en.wikipedia.org/wiki/.edu
  13960. edu
  13961. // ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
  13962. ee
  13963. edu.ee
  13964. gov.ee
  13965. riik.ee
  13966. lib.ee
  13967. med.ee
  13968. com.ee
  13969. pri.ee
  13970. aip.ee
  13971. org.ee
  13972. fie.ee
  13973. // eg : https://en.wikipedia.org/wiki/.eg
  13974. eg
  13975. com.eg
  13976. edu.eg
  13977. eun.eg
  13978. gov.eg
  13979. mil.eg
  13980. name.eg
  13981. net.eg
  13982. org.eg
  13983. sci.eg
  13984. // er : https://en.wikipedia.org/wiki/.er
  13985. *.er
  13986. // es : https://www.nic.es/site_ingles/ingles/dominios/index.html
  13987. es
  13988. com.es
  13989. nom.es
  13990. org.es
  13991. gob.es
  13992. edu.es
  13993. // et : https://en.wikipedia.org/wiki/.et
  13994. et
  13995. com.et
  13996. gov.et
  13997. org.et
  13998. edu.et
  13999. biz.et
  14000. name.et
  14001. info.et
  14002. net.et
  14003. // eu : https://en.wikipedia.org/wiki/.eu
  14004. eu
  14005. // fi : https://en.wikipedia.org/wiki/.fi
  14006. fi
  14007. // aland.fi : https://en.wikipedia.org/wiki/.ax
  14008. // This domain is being phased out in favor of .ax. As there are still many
  14009. // domains under aland.fi, we still keep it on the list until aland.fi is
  14010. // completely removed.
  14011. // TODO: Check for updates (expected to be phased out around Q1/2009)
  14012. aland.fi
  14013. // fj : http://domains.fj/
  14014. // Submitted by registry <garth.miller@cocca.org.nz> 2020-02-11
  14015. fj
  14016. ac.fj
  14017. biz.fj
  14018. com.fj
  14019. gov.fj
  14020. info.fj
  14021. mil.fj
  14022. name.fj
  14023. net.fj
  14024. org.fj
  14025. pro.fj
  14026. // fk : https://en.wikipedia.org/wiki/.fk
  14027. *.fk
  14028. // fm : https://en.wikipedia.org/wiki/.fm
  14029. com.fm
  14030. edu.fm
  14031. net.fm
  14032. org.fm
  14033. fm
  14034. // fo : https://en.wikipedia.org/wiki/.fo
  14035. fo
  14036. // fr : https://www.afnic.fr/ https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  14037. fr
  14038. asso.fr
  14039. com.fr
  14040. gouv.fr
  14041. nom.fr
  14042. prd.fr
  14043. tm.fr
  14044. // Other SLDs now selfmanaged out of AFNIC range. Former "domaines sectoriels", still registration suffixes
  14045. avoues.fr
  14046. cci.fr
  14047. greta.fr
  14048. huissier-justice.fr
  14049. // ga : https://en.wikipedia.org/wiki/.ga
  14050. ga
  14051. // gb : This registry is effectively dormant
  14052. // Submitted by registry <Damien.Shaw@ja.net>
  14053. gb
  14054. // gd : https://en.wikipedia.org/wiki/.gd
  14055. edu.gd
  14056. gov.gd
  14057. gd
  14058. // ge : http://www.nic.net.ge/policy_en.pdf
  14059. ge
  14060. com.ge
  14061. edu.ge
  14062. gov.ge
  14063. org.ge
  14064. mil.ge
  14065. net.ge
  14066. pvt.ge
  14067. // gf : https://en.wikipedia.org/wiki/.gf
  14068. gf
  14069. // gg : http://www.channelisles.net/register-domains/
  14070. // Confirmed by registry <nigel@channelisles.net> 2013-11-28
  14071. gg
  14072. co.gg
  14073. net.gg
  14074. org.gg
  14075. // gh : https://en.wikipedia.org/wiki/.gh
  14076. // see also: http://www.nic.gh/reg_now.php
  14077. // Although domains directly at second level are not possible at the moment,
  14078. // they have been possible for some time and may come back.
  14079. gh
  14080. com.gh
  14081. edu.gh
  14082. gov.gh
  14083. org.gh
  14084. mil.gh
  14085. // gi : http://www.nic.gi/rules.html
  14086. gi
  14087. com.gi
  14088. ltd.gi
  14089. gov.gi
  14090. mod.gi
  14091. edu.gi
  14092. org.gi
  14093. // gl : https://en.wikipedia.org/wiki/.gl
  14094. // http://nic.gl
  14095. gl
  14096. co.gl
  14097. com.gl
  14098. edu.gl
  14099. net.gl
  14100. org.gl
  14101. // gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm
  14102. gm
  14103. // gn : http://psg.com/dns/gn/gn.txt
  14104. // Submitted by registry <randy@psg.com>
  14105. gn
  14106. ac.gn
  14107. com.gn
  14108. edu.gn
  14109. gov.gn
  14110. org.gn
  14111. net.gn
  14112. // gov : https://en.wikipedia.org/wiki/.gov
  14113. gov
  14114. // gp : http://www.nic.gp/index.php?lang=en
  14115. gp
  14116. com.gp
  14117. net.gp
  14118. mobi.gp
  14119. edu.gp
  14120. org.gp
  14121. asso.gp
  14122. // gq : https://en.wikipedia.org/wiki/.gq
  14123. gq
  14124. // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
  14125. // Submitted by registry <segred@ics.forth.gr>
  14126. gr
  14127. com.gr
  14128. edu.gr
  14129. net.gr
  14130. org.gr
  14131. gov.gr
  14132. // gs : https://en.wikipedia.org/wiki/.gs
  14133. gs
  14134. // gt : https://www.gt/sitio/registration_policy.php?lang=en
  14135. gt
  14136. com.gt
  14137. edu.gt
  14138. gob.gt
  14139. ind.gt
  14140. mil.gt
  14141. net.gt
  14142. org.gt
  14143. // gu : http://gadao.gov.gu/register.html
  14144. // University of Guam : https://www.uog.edu
  14145. // Submitted by uognoc@triton.uog.edu
  14146. gu
  14147. com.gu
  14148. edu.gu
  14149. gov.gu
  14150. guam.gu
  14151. info.gu
  14152. net.gu
  14153. org.gu
  14154. web.gu
  14155. // gw : https://en.wikipedia.org/wiki/.gw
  14156. // gw : https://nic.gw/regras/
  14157. gw
  14158. // gy : https://en.wikipedia.org/wiki/.gy
  14159. // http://registry.gy/
  14160. gy
  14161. co.gy
  14162. com.gy
  14163. edu.gy
  14164. gov.gy
  14165. net.gy
  14166. org.gy
  14167. // hk : https://www.hkirc.hk
  14168. // Submitted by registry <hk.tech@hkirc.hk>
  14169. hk
  14170. com.hk
  14171. edu.hk
  14172. gov.hk
  14173. idv.hk
  14174. net.hk
  14175. org.hk
  14176. 公司.hk
  14177. 教育.hk
  14178. 敎育.hk
  14179. 政府.hk
  14180. 個人.hk
  14181. 个人.hk
  14182. 箇人.hk
  14183. 網络.hk
  14184. 网络.hk
  14185. 组織.hk
  14186. 網絡.hk
  14187. 网絡.hk
  14188. 组织.hk
  14189. 組織.hk
  14190. 組织.hk
  14191. // hm : https://en.wikipedia.org/wiki/.hm
  14192. hm
  14193. // hn : http://www.nic.hn/politicas/ps02,,05.html
  14194. hn
  14195. com.hn
  14196. edu.hn
  14197. org.hn
  14198. net.hn
  14199. mil.hn
  14200. gob.hn
  14201. // hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
  14202. hr
  14203. iz.hr
  14204. from.hr
  14205. name.hr
  14206. com.hr
  14207. // ht : http://www.nic.ht/info/charte.cfm
  14208. ht
  14209. com.ht
  14210. shop.ht
  14211. firm.ht
  14212. info.ht
  14213. adult.ht
  14214. net.ht
  14215. pro.ht
  14216. org.ht
  14217. med.ht
  14218. art.ht
  14219. coop.ht
  14220. pol.ht
  14221. asso.ht
  14222. edu.ht
  14223. rel.ht
  14224. gouv.ht
  14225. perso.ht
  14226. // hu : http://www.domain.hu/domain/English/sld.html
  14227. // Confirmed by registry <pasztor@iszt.hu> 2008-06-12
  14228. hu
  14229. co.hu
  14230. info.hu
  14231. org.hu
  14232. priv.hu
  14233. sport.hu
  14234. tm.hu
  14235. 2000.hu
  14236. agrar.hu
  14237. bolt.hu
  14238. casino.hu
  14239. city.hu
  14240. erotica.hu
  14241. erotika.hu
  14242. film.hu
  14243. forum.hu
  14244. games.hu
  14245. hotel.hu
  14246. ingatlan.hu
  14247. jogasz.hu
  14248. konyvelo.hu
  14249. lakas.hu
  14250. media.hu
  14251. news.hu
  14252. reklam.hu
  14253. sex.hu
  14254. shop.hu
  14255. suli.hu
  14256. szex.hu
  14257. tozsde.hu
  14258. utazas.hu
  14259. video.hu
  14260. // id : https://pandi.id/en/domain/registration-requirements/
  14261. id
  14262. ac.id
  14263. biz.id
  14264. co.id
  14265. desa.id
  14266. go.id
  14267. mil.id
  14268. my.id
  14269. net.id
  14270. or.id
  14271. ponpes.id
  14272. sch.id
  14273. web.id
  14274. // ie : https://en.wikipedia.org/wiki/.ie
  14275. ie
  14276. gov.ie
  14277. // il : http://www.isoc.org.il/domains/
  14278. // see also: https://en.isoc.org.il/il-cctld/registration-rules
  14279. // ISOC-IL (operated by .il Registry)
  14280. il
  14281. ac.il
  14282. co.il
  14283. gov.il
  14284. idf.il
  14285. k12.il
  14286. muni.il
  14287. net.il
  14288. org.il
  14289. // xn--4dbrk0ce ("Israel", Hebrew) : IL
  14290. ישראל
  14291. // xn--4dbgdty6c.xn--4dbrk0ce.
  14292. אקדמיה.ישראל
  14293. // xn--5dbhl8d.xn--4dbrk0ce.
  14294. ישוב.ישראל
  14295. // xn--8dbq2a.xn--4dbrk0ce.
  14296. צהל.ישראל
  14297. // xn--hebda8b.xn--4dbrk0ce.
  14298. ממשל.ישראל
  14299. // im : https://www.nic.im/
  14300. // Submitted by registry <info@nic.im>
  14301. im
  14302. ac.im
  14303. co.im
  14304. com.im
  14305. ltd.co.im
  14306. net.im
  14307. org.im
  14308. plc.co.im
  14309. tt.im
  14310. tv.im
  14311. // in : https://en.wikipedia.org/wiki/.in
  14312. // see also: https://registry.in/policies
  14313. // Please note, that nic.in is not an official eTLD, but used by most
  14314. // government institutions.
  14315. in
  14316. 5g.in
  14317. 6g.in
  14318. ac.in
  14319. ai.in
  14320. am.in
  14321. bihar.in
  14322. biz.in
  14323. business.in
  14324. ca.in
  14325. cn.in
  14326. co.in
  14327. com.in
  14328. coop.in
  14329. cs.in
  14330. delhi.in
  14331. dr.in
  14332. edu.in
  14333. er.in
  14334. firm.in
  14335. gen.in
  14336. gov.in
  14337. gujarat.in
  14338. ind.in
  14339. info.in
  14340. int.in
  14341. internet.in
  14342. io.in
  14343. me.in
  14344. mil.in
  14345. net.in
  14346. nic.in
  14347. org.in
  14348. pg.in
  14349. post.in
  14350. pro.in
  14351. res.in
  14352. travel.in
  14353. tv.in
  14354. uk.in
  14355. up.in
  14356. us.in
  14357. // info : https://en.wikipedia.org/wiki/.info
  14358. info
  14359. // int : https://en.wikipedia.org/wiki/.int
  14360. // Confirmed by registry <iana-questions@icann.org> 2008-06-18
  14361. int
  14362. eu.int
  14363. // io : http://www.nic.io/rules.htm
  14364. // list of other 2nd level tlds ?
  14365. io
  14366. com.io
  14367. // iq : http://www.cmc.iq/english/iq/iqregister1.htm
  14368. iq
  14369. gov.iq
  14370. edu.iq
  14371. mil.iq
  14372. com.iq
  14373. org.iq
  14374. net.iq
  14375. // ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
  14376. // Also see http://www.nic.ir/Internationalized_Domain_Names
  14377. // Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16
  14378. ir
  14379. ac.ir
  14380. co.ir
  14381. gov.ir
  14382. id.ir
  14383. net.ir
  14384. org.ir
  14385. sch.ir
  14386. // xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH)
  14387. ایران.ir
  14388. // xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH)
  14389. ايران.ir
  14390. // is : http://www.isnic.is/domain/rules.php
  14391. // Confirmed by registry <marius@isgate.is> 2008-12-06
  14392. is
  14393. net.is
  14394. com.is
  14395. edu.is
  14396. gov.is
  14397. org.is
  14398. int.is
  14399. // it : https://en.wikipedia.org/wiki/.it
  14400. it
  14401. gov.it
  14402. edu.it
  14403. // Reserved geo-names (regions and provinces):
  14404. // https://www.nic.it/sites/default/files/archivio/docs/Regulation_assignation_v7.1.pdf
  14405. // Regions
  14406. abr.it
  14407. abruzzo.it
  14408. aosta-valley.it
  14409. aostavalley.it
  14410. bas.it
  14411. basilicata.it
  14412. cal.it
  14413. calabria.it
  14414. cam.it
  14415. campania.it
  14416. emilia-romagna.it
  14417. emiliaromagna.it
  14418. emr.it
  14419. friuli-v-giulia.it
  14420. friuli-ve-giulia.it
  14421. friuli-vegiulia.it
  14422. friuli-venezia-giulia.it
  14423. friuli-veneziagiulia.it
  14424. friuli-vgiulia.it
  14425. friuliv-giulia.it
  14426. friulive-giulia.it
  14427. friulivegiulia.it
  14428. friulivenezia-giulia.it
  14429. friuliveneziagiulia.it
  14430. friulivgiulia.it
  14431. fvg.it
  14432. laz.it
  14433. lazio.it
  14434. lig.it
  14435. liguria.it
  14436. lom.it
  14437. lombardia.it
  14438. lombardy.it
  14439. lucania.it
  14440. mar.it
  14441. marche.it
  14442. mol.it
  14443. molise.it
  14444. piedmont.it
  14445. piemonte.it
  14446. pmn.it
  14447. pug.it
  14448. puglia.it
  14449. sar.it
  14450. sardegna.it
  14451. sardinia.it
  14452. sic.it
  14453. sicilia.it
  14454. sicily.it
  14455. taa.it
  14456. tos.it
  14457. toscana.it
  14458. trentin-sud-tirol.it
  14459. trentin-süd-tirol.it
  14460. trentin-sudtirol.it
  14461. trentin-südtirol.it
  14462. trentin-sued-tirol.it
  14463. trentin-suedtirol.it
  14464. trentino-a-adige.it
  14465. trentino-aadige.it
  14466. trentino-alto-adige.it
  14467. trentino-altoadige.it
  14468. trentino-s-tirol.it
  14469. trentino-stirol.it
  14470. trentino-sud-tirol.it
  14471. trentino-süd-tirol.it
  14472. trentino-sudtirol.it
  14473. trentino-südtirol.it
  14474. trentino-sued-tirol.it
  14475. trentino-suedtirol.it
  14476. trentino.it
  14477. trentinoa-adige.it
  14478. trentinoaadige.it
  14479. trentinoalto-adige.it
  14480. trentinoaltoadige.it
  14481. trentinos-tirol.it
  14482. trentinostirol.it
  14483. trentinosud-tirol.it
  14484. trentinosüd-tirol.it
  14485. trentinosudtirol.it
  14486. trentinosüdtirol.it
  14487. trentinosued-tirol.it
  14488. trentinosuedtirol.it
  14489. trentinsud-tirol.it
  14490. trentinsüd-tirol.it
  14491. trentinsudtirol.it
  14492. trentinsüdtirol.it
  14493. trentinsued-tirol.it
  14494. trentinsuedtirol.it
  14495. tuscany.it
  14496. umb.it
  14497. umbria.it
  14498. val-d-aosta.it
  14499. val-daosta.it
  14500. vald-aosta.it
  14501. valdaosta.it
  14502. valle-aosta.it
  14503. valle-d-aosta.it
  14504. valle-daosta.it
  14505. valleaosta.it
  14506. valled-aosta.it
  14507. valledaosta.it
  14508. vallee-aoste.it
  14509. vallée-aoste.it
  14510. vallee-d-aoste.it
  14511. vallée-d-aoste.it
  14512. valleeaoste.it
  14513. valléeaoste.it
  14514. valleedaoste.it
  14515. valléedaoste.it
  14516. vao.it
  14517. vda.it
  14518. ven.it
  14519. veneto.it
  14520. // Provinces
  14521. ag.it
  14522. agrigento.it
  14523. al.it
  14524. alessandria.it
  14525. alto-adige.it
  14526. altoadige.it
  14527. an.it
  14528. ancona.it
  14529. andria-barletta-trani.it
  14530. andria-trani-barletta.it
  14531. andriabarlettatrani.it
  14532. andriatranibarletta.it
  14533. ao.it
  14534. aosta.it
  14535. aoste.it
  14536. ap.it
  14537. aq.it
  14538. aquila.it
  14539. ar.it
  14540. arezzo.it
  14541. ascoli-piceno.it
  14542. ascolipiceno.it
  14543. asti.it
  14544. at.it
  14545. av.it
  14546. avellino.it
  14547. ba.it
  14548. balsan-sudtirol.it
  14549. balsan-südtirol.it
  14550. balsan-suedtirol.it
  14551. balsan.it
  14552. bari.it
  14553. barletta-trani-andria.it
  14554. barlettatraniandria.it
  14555. belluno.it
  14556. benevento.it
  14557. bergamo.it
  14558. bg.it
  14559. bi.it
  14560. biella.it
  14561. bl.it
  14562. bn.it
  14563. bo.it
  14564. bologna.it
  14565. bolzano-altoadige.it
  14566. bolzano.it
  14567. bozen-sudtirol.it
  14568. bozen-südtirol.it
  14569. bozen-suedtirol.it
  14570. bozen.it
  14571. br.it
  14572. brescia.it
  14573. brindisi.it
  14574. bs.it
  14575. bt.it
  14576. bulsan-sudtirol.it
  14577. bulsan-südtirol.it
  14578. bulsan-suedtirol.it
  14579. bulsan.it
  14580. bz.it
  14581. ca.it
  14582. cagliari.it
  14583. caltanissetta.it
  14584. campidano-medio.it
  14585. campidanomedio.it
  14586. campobasso.it
  14587. carbonia-iglesias.it
  14588. carboniaiglesias.it
  14589. carrara-massa.it
  14590. carraramassa.it
  14591. caserta.it
  14592. catania.it
  14593. catanzaro.it
  14594. cb.it
  14595. ce.it
  14596. cesena-forli.it
  14597. cesena-forlì.it
  14598. cesenaforli.it
  14599. cesenaforlì.it
  14600. ch.it
  14601. chieti.it
  14602. ci.it
  14603. cl.it
  14604. cn.it
  14605. co.it
  14606. como.it
  14607. cosenza.it
  14608. cr.it
  14609. cremona.it
  14610. crotone.it
  14611. cs.it
  14612. ct.it
  14613. cuneo.it
  14614. cz.it
  14615. dell-ogliastra.it
  14616. dellogliastra.it
  14617. en.it
  14618. enna.it
  14619. fc.it
  14620. fe.it
  14621. fermo.it
  14622. ferrara.it
  14623. fg.it
  14624. fi.it
  14625. firenze.it
  14626. florence.it
  14627. fm.it
  14628. foggia.it
  14629. forli-cesena.it
  14630. forlì-cesena.it
  14631. forlicesena.it
  14632. forlìcesena.it
  14633. fr.it
  14634. frosinone.it
  14635. ge.it
  14636. genoa.it
  14637. genova.it
  14638. go.it
  14639. gorizia.it
  14640. gr.it
  14641. grosseto.it
  14642. iglesias-carbonia.it
  14643. iglesiascarbonia.it
  14644. im.it
  14645. imperia.it
  14646. is.it
  14647. isernia.it
  14648. kr.it
  14649. la-spezia.it
  14650. laquila.it
  14651. laspezia.it
  14652. latina.it
  14653. lc.it
  14654. le.it
  14655. lecce.it
  14656. lecco.it
  14657. li.it
  14658. livorno.it
  14659. lo.it
  14660. lodi.it
  14661. lt.it
  14662. lu.it
  14663. lucca.it
  14664. macerata.it
  14665. mantova.it
  14666. massa-carrara.it
  14667. massacarrara.it
  14668. matera.it
  14669. mb.it
  14670. mc.it
  14671. me.it
  14672. medio-campidano.it
  14673. mediocampidano.it
  14674. messina.it
  14675. mi.it
  14676. milan.it
  14677. milano.it
  14678. mn.it
  14679. mo.it
  14680. modena.it
  14681. monza-brianza.it
  14682. monza-e-della-brianza.it
  14683. monza.it
  14684. monzabrianza.it
  14685. monzaebrianza.it
  14686. monzaedellabrianza.it
  14687. ms.it
  14688. mt.it
  14689. na.it
  14690. naples.it
  14691. napoli.it
  14692. no.it
  14693. novara.it
  14694. nu.it
  14695. nuoro.it
  14696. og.it
  14697. ogliastra.it
  14698. olbia-tempio.it
  14699. olbiatempio.it
  14700. or.it
  14701. oristano.it
  14702. ot.it
  14703. pa.it
  14704. padova.it
  14705. padua.it
  14706. palermo.it
  14707. parma.it
  14708. pavia.it
  14709. pc.it
  14710. pd.it
  14711. pe.it
  14712. perugia.it
  14713. pesaro-urbino.it
  14714. pesarourbino.it
  14715. pescara.it
  14716. pg.it
  14717. pi.it
  14718. piacenza.it
  14719. pisa.it
  14720. pistoia.it
  14721. pn.it
  14722. po.it
  14723. pordenone.it
  14724. potenza.it
  14725. pr.it
  14726. prato.it
  14727. pt.it
  14728. pu.it
  14729. pv.it
  14730. pz.it
  14731. ra.it
  14732. ragusa.it
  14733. ravenna.it
  14734. rc.it
  14735. re.it
  14736. reggio-calabria.it
  14737. reggio-emilia.it
  14738. reggiocalabria.it
  14739. reggioemilia.it
  14740. rg.it
  14741. ri.it
  14742. rieti.it
  14743. rimini.it
  14744. rm.it
  14745. rn.it
  14746. ro.it
  14747. roma.it
  14748. rome.it
  14749. rovigo.it
  14750. sa.it
  14751. salerno.it
  14752. sassari.it
  14753. savona.it
  14754. si.it
  14755. siena.it
  14756. siracusa.it
  14757. so.it
  14758. sondrio.it
  14759. sp.it
  14760. sr.it
  14761. ss.it
  14762. suedtirol.it
  14763. südtirol.it
  14764. sv.it
  14765. ta.it
  14766. taranto.it
  14767. te.it
  14768. tempio-olbia.it
  14769. tempioolbia.it
  14770. teramo.it
  14771. terni.it
  14772. tn.it
  14773. to.it
  14774. torino.it
  14775. tp.it
  14776. tr.it
  14777. trani-andria-barletta.it
  14778. trani-barletta-andria.it
  14779. traniandriabarletta.it
  14780. tranibarlettaandria.it
  14781. trapani.it
  14782. trento.it
  14783. treviso.it
  14784. trieste.it
  14785. ts.it
  14786. turin.it
  14787. tv.it
  14788. ud.it
  14789. udine.it
  14790. urbino-pesaro.it
  14791. urbinopesaro.it
  14792. va.it
  14793. varese.it
  14794. vb.it
  14795. vc.it
  14796. ve.it
  14797. venezia.it
  14798. venice.it
  14799. verbania.it
  14800. vercelli.it
  14801. verona.it
  14802. vi.it
  14803. vibo-valentia.it
  14804. vibovalentia.it
  14805. vicenza.it
  14806. viterbo.it
  14807. vr.it
  14808. vs.it
  14809. vt.it
  14810. vv.it
  14811. // je : http://www.channelisles.net/register-domains/
  14812. // Confirmed by registry <nigel@channelisles.net> 2013-11-28
  14813. je
  14814. co.je
  14815. net.je
  14816. org.je
  14817. // jm : http://www.com.jm/register.html
  14818. *.jm
  14819. // jo : http://www.dns.jo/Registration_policy.aspx
  14820. jo
  14821. com.jo
  14822. org.jo
  14823. net.jo
  14824. edu.jo
  14825. sch.jo
  14826. gov.jo
  14827. mil.jo
  14828. name.jo
  14829. // jobs : https://en.wikipedia.org/wiki/.jobs
  14830. jobs
  14831. // jp : https://en.wikipedia.org/wiki/.jp
  14832. // http://jprs.co.jp/en/jpdomain.html
  14833. // Submitted by registry <info@jprs.jp>
  14834. jp
  14835. // jp organizational type names
  14836. ac.jp
  14837. ad.jp
  14838. co.jp
  14839. ed.jp
  14840. go.jp
  14841. gr.jp
  14842. lg.jp
  14843. ne.jp
  14844. or.jp
  14845. // jp prefecture type names
  14846. aichi.jp
  14847. akita.jp
  14848. aomori.jp
  14849. chiba.jp
  14850. ehime.jp
  14851. fukui.jp
  14852. fukuoka.jp
  14853. fukushima.jp
  14854. gifu.jp
  14855. gunma.jp
  14856. hiroshima.jp
  14857. hokkaido.jp
  14858. hyogo.jp
  14859. ibaraki.jp
  14860. ishikawa.jp
  14861. iwate.jp
  14862. kagawa.jp
  14863. kagoshima.jp
  14864. kanagawa.jp
  14865. kochi.jp
  14866. kumamoto.jp
  14867. kyoto.jp
  14868. mie.jp
  14869. miyagi.jp
  14870. miyazaki.jp
  14871. nagano.jp
  14872. nagasaki.jp
  14873. nara.jp
  14874. niigata.jp
  14875. oita.jp
  14876. okayama.jp
  14877. okinawa.jp
  14878. osaka.jp
  14879. saga.jp
  14880. saitama.jp
  14881. shiga.jp
  14882. shimane.jp
  14883. shizuoka.jp
  14884. tochigi.jp
  14885. tokushima.jp
  14886. tokyo.jp
  14887. tottori.jp
  14888. toyama.jp
  14889. wakayama.jp
  14890. yamagata.jp
  14891. yamaguchi.jp
  14892. yamanashi.jp
  14893. 栃木.jp
  14894. 愛知.jp
  14895. 愛媛.jp
  14896. 兵庫.jp
  14897. 熊本.jp
  14898. 茨城.jp
  14899. 北海道.jp
  14900. 千葉.jp
  14901. 和歌山.jp
  14902. 長崎.jp
  14903. 長野.jp
  14904. 新潟.jp
  14905. 青森.jp
  14906. 静岡.jp
  14907. 東京.jp
  14908. 石川.jp
  14909. 埼玉.jp
  14910. 三重.jp
  14911. 京都.jp
  14912. 佐賀.jp
  14913. 大分.jp
  14914. 大阪.jp
  14915. 奈良.jp
  14916. 宮城.jp
  14917. 宮崎.jp
  14918. 富山.jp
  14919. 山口.jp
  14920. 山形.jp
  14921. 山梨.jp
  14922. 岩手.jp
  14923. 岐阜.jp
  14924. 岡山.jp
  14925. 島根.jp
  14926. 広島.jp
  14927. 徳島.jp
  14928. 沖縄.jp
  14929. 滋賀.jp
  14930. 神奈川.jp
  14931. 福井.jp
  14932. 福岡.jp
  14933. 福島.jp
  14934. 秋田.jp
  14935. 群馬.jp
  14936. 香川.jp
  14937. 高知.jp
  14938. 鳥取.jp
  14939. 鹿児島.jp
  14940. // jp geographic type names
  14941. // http://jprs.jp/doc/rule/saisoku-1.html
  14942. *.kawasaki.jp
  14943. *.kitakyushu.jp
  14944. *.kobe.jp
  14945. *.nagoya.jp
  14946. *.sapporo.jp
  14947. *.sendai.jp
  14948. *.yokohama.jp
  14949. !city.kawasaki.jp
  14950. !city.kitakyushu.jp
  14951. !city.kobe.jp
  14952. !city.nagoya.jp
  14953. !city.sapporo.jp
  14954. !city.sendai.jp
  14955. !city.yokohama.jp
  14956. // 4th level registration
  14957. aisai.aichi.jp
  14958. ama.aichi.jp
  14959. anjo.aichi.jp
  14960. asuke.aichi.jp
  14961. chiryu.aichi.jp
  14962. chita.aichi.jp
  14963. fuso.aichi.jp
  14964. gamagori.aichi.jp
  14965. handa.aichi.jp
  14966. hazu.aichi.jp
  14967. hekinan.aichi.jp
  14968. higashiura.aichi.jp
  14969. ichinomiya.aichi.jp
  14970. inazawa.aichi.jp
  14971. inuyama.aichi.jp
  14972. isshiki.aichi.jp
  14973. iwakura.aichi.jp
  14974. kanie.aichi.jp
  14975. kariya.aichi.jp
  14976. kasugai.aichi.jp
  14977. kira.aichi.jp
  14978. kiyosu.aichi.jp
  14979. komaki.aichi.jp
  14980. konan.aichi.jp
  14981. kota.aichi.jp
  14982. mihama.aichi.jp
  14983. miyoshi.aichi.jp
  14984. nishio.aichi.jp
  14985. nisshin.aichi.jp
  14986. obu.aichi.jp
  14987. oguchi.aichi.jp
  14988. oharu.aichi.jp
  14989. okazaki.aichi.jp
  14990. owariasahi.aichi.jp
  14991. seto.aichi.jp
  14992. shikatsu.aichi.jp
  14993. shinshiro.aichi.jp
  14994. shitara.aichi.jp
  14995. tahara.aichi.jp
  14996. takahama.aichi.jp
  14997. tobishima.aichi.jp
  14998. toei.aichi.jp
  14999. togo.aichi.jp
  15000. tokai.aichi.jp
  15001. tokoname.aichi.jp
  15002. toyoake.aichi.jp
  15003. toyohashi.aichi.jp
  15004. toyokawa.aichi.jp
  15005. toyone.aichi.jp
  15006. toyota.aichi.jp
  15007. tsushima.aichi.jp
  15008. yatomi.aichi.jp
  15009. akita.akita.jp
  15010. daisen.akita.jp
  15011. fujisato.akita.jp
  15012. gojome.akita.jp
  15013. hachirogata.akita.jp
  15014. happou.akita.jp
  15015. higashinaruse.akita.jp
  15016. honjo.akita.jp
  15017. honjyo.akita.jp
  15018. ikawa.akita.jp
  15019. kamikoani.akita.jp
  15020. kamioka.akita.jp
  15021. katagami.akita.jp
  15022. kazuno.akita.jp
  15023. kitaakita.akita.jp
  15024. kosaka.akita.jp
  15025. kyowa.akita.jp
  15026. misato.akita.jp
  15027. mitane.akita.jp
  15028. moriyoshi.akita.jp
  15029. nikaho.akita.jp
  15030. noshiro.akita.jp
  15031. odate.akita.jp
  15032. oga.akita.jp
  15033. ogata.akita.jp
  15034. semboku.akita.jp
  15035. yokote.akita.jp
  15036. yurihonjo.akita.jp
  15037. aomori.aomori.jp
  15038. gonohe.aomori.jp
  15039. hachinohe.aomori.jp
  15040. hashikami.aomori.jp
  15041. hiranai.aomori.jp
  15042. hirosaki.aomori.jp
  15043. itayanagi.aomori.jp
  15044. kuroishi.aomori.jp
  15045. misawa.aomori.jp
  15046. mutsu.aomori.jp
  15047. nakadomari.aomori.jp
  15048. noheji.aomori.jp
  15049. oirase.aomori.jp
  15050. owani.aomori.jp
  15051. rokunohe.aomori.jp
  15052. sannohe.aomori.jp
  15053. shichinohe.aomori.jp
  15054. shingo.aomori.jp
  15055. takko.aomori.jp
  15056. towada.aomori.jp
  15057. tsugaru.aomori.jp
  15058. tsuruta.aomori.jp
  15059. abiko.chiba.jp
  15060. asahi.chiba.jp
  15061. chonan.chiba.jp
  15062. chosei.chiba.jp
  15063. choshi.chiba.jp
  15064. chuo.chiba.jp
  15065. funabashi.chiba.jp
  15066. futtsu.chiba.jp
  15067. hanamigawa.chiba.jp
  15068. ichihara.chiba.jp
  15069. ichikawa.chiba.jp
  15070. ichinomiya.chiba.jp
  15071. inzai.chiba.jp
  15072. isumi.chiba.jp
  15073. kamagaya.chiba.jp
  15074. kamogawa.chiba.jp
  15075. kashiwa.chiba.jp
  15076. katori.chiba.jp
  15077. katsuura.chiba.jp
  15078. kimitsu.chiba.jp
  15079. kisarazu.chiba.jp
  15080. kozaki.chiba.jp
  15081. kujukuri.chiba.jp
  15082. kyonan.chiba.jp
  15083. matsudo.chiba.jp
  15084. midori.chiba.jp
  15085. mihama.chiba.jp
  15086. minamiboso.chiba.jp
  15087. mobara.chiba.jp
  15088. mutsuzawa.chiba.jp
  15089. nagara.chiba.jp
  15090. nagareyama.chiba.jp
  15091. narashino.chiba.jp
  15092. narita.chiba.jp
  15093. noda.chiba.jp
  15094. oamishirasato.chiba.jp
  15095. omigawa.chiba.jp
  15096. onjuku.chiba.jp
  15097. otaki.chiba.jp
  15098. sakae.chiba.jp
  15099. sakura.chiba.jp
  15100. shimofusa.chiba.jp
  15101. shirako.chiba.jp
  15102. shiroi.chiba.jp
  15103. shisui.chiba.jp
  15104. sodegaura.chiba.jp
  15105. sosa.chiba.jp
  15106. tako.chiba.jp
  15107. tateyama.chiba.jp
  15108. togane.chiba.jp
  15109. tohnosho.chiba.jp
  15110. tomisato.chiba.jp
  15111. urayasu.chiba.jp
  15112. yachimata.chiba.jp
  15113. yachiyo.chiba.jp
  15114. yokaichiba.chiba.jp
  15115. yokoshibahikari.chiba.jp
  15116. yotsukaido.chiba.jp
  15117. ainan.ehime.jp
  15118. honai.ehime.jp
  15119. ikata.ehime.jp
  15120. imabari.ehime.jp
  15121. iyo.ehime.jp
  15122. kamijima.ehime.jp
  15123. kihoku.ehime.jp
  15124. kumakogen.ehime.jp
  15125. masaki.ehime.jp
  15126. matsuno.ehime.jp
  15127. matsuyama.ehime.jp
  15128. namikata.ehime.jp
  15129. niihama.ehime.jp
  15130. ozu.ehime.jp
  15131. saijo.ehime.jp
  15132. seiyo.ehime.jp
  15133. shikokuchuo.ehime.jp
  15134. tobe.ehime.jp
  15135. toon.ehime.jp
  15136. uchiko.ehime.jp
  15137. uwajima.ehime.jp
  15138. yawatahama.ehime.jp
  15139. echizen.fukui.jp
  15140. eiheiji.fukui.jp
  15141. fukui.fukui.jp
  15142. ikeda.fukui.jp
  15143. katsuyama.fukui.jp
  15144. mihama.fukui.jp
  15145. minamiechizen.fukui.jp
  15146. obama.fukui.jp
  15147. ohi.fukui.jp
  15148. ono.fukui.jp
  15149. sabae.fukui.jp
  15150. sakai.fukui.jp
  15151. takahama.fukui.jp
  15152. tsuruga.fukui.jp
  15153. wakasa.fukui.jp
  15154. ashiya.fukuoka.jp
  15155. buzen.fukuoka.jp
  15156. chikugo.fukuoka.jp
  15157. chikuho.fukuoka.jp
  15158. chikujo.fukuoka.jp
  15159. chikushino.fukuoka.jp
  15160. chikuzen.fukuoka.jp
  15161. chuo.fukuoka.jp
  15162. dazaifu.fukuoka.jp
  15163. fukuchi.fukuoka.jp
  15164. hakata.fukuoka.jp
  15165. higashi.fukuoka.jp
  15166. hirokawa.fukuoka.jp
  15167. hisayama.fukuoka.jp
  15168. iizuka.fukuoka.jp
  15169. inatsuki.fukuoka.jp
  15170. kaho.fukuoka.jp
  15171. kasuga.fukuoka.jp
  15172. kasuya.fukuoka.jp
  15173. kawara.fukuoka.jp
  15174. keisen.fukuoka.jp
  15175. koga.fukuoka.jp
  15176. kurate.fukuoka.jp
  15177. kurogi.fukuoka.jp
  15178. kurume.fukuoka.jp
  15179. minami.fukuoka.jp
  15180. miyako.fukuoka.jp
  15181. miyama.fukuoka.jp
  15182. miyawaka.fukuoka.jp
  15183. mizumaki.fukuoka.jp
  15184. munakata.fukuoka.jp
  15185. nakagawa.fukuoka.jp
  15186. nakama.fukuoka.jp
  15187. nishi.fukuoka.jp
  15188. nogata.fukuoka.jp
  15189. ogori.fukuoka.jp
  15190. okagaki.fukuoka.jp
  15191. okawa.fukuoka.jp
  15192. oki.fukuoka.jp
  15193. omuta.fukuoka.jp
  15194. onga.fukuoka.jp
  15195. onojo.fukuoka.jp
  15196. oto.fukuoka.jp
  15197. saigawa.fukuoka.jp
  15198. sasaguri.fukuoka.jp
  15199. shingu.fukuoka.jp
  15200. shinyoshitomi.fukuoka.jp
  15201. shonai.fukuoka.jp
  15202. soeda.fukuoka.jp
  15203. sue.fukuoka.jp
  15204. tachiarai.fukuoka.jp
  15205. tagawa.fukuoka.jp
  15206. takata.fukuoka.jp
  15207. toho.fukuoka.jp
  15208. toyotsu.fukuoka.jp
  15209. tsuiki.fukuoka.jp
  15210. ukiha.fukuoka.jp
  15211. umi.fukuoka.jp
  15212. usui.fukuoka.jp
  15213. yamada.fukuoka.jp
  15214. yame.fukuoka.jp
  15215. yanagawa.fukuoka.jp
  15216. yukuhashi.fukuoka.jp
  15217. aizubange.fukushima.jp
  15218. aizumisato.fukushima.jp
  15219. aizuwakamatsu.fukushima.jp
  15220. asakawa.fukushima.jp
  15221. bandai.fukushima.jp
  15222. date.fukushima.jp
  15223. fukushima.fukushima.jp
  15224. furudono.fukushima.jp
  15225. futaba.fukushima.jp
  15226. hanawa.fukushima.jp
  15227. higashi.fukushima.jp
  15228. hirata.fukushima.jp
  15229. hirono.fukushima.jp
  15230. iitate.fukushima.jp
  15231. inawashiro.fukushima.jp
  15232. ishikawa.fukushima.jp
  15233. iwaki.fukushima.jp
  15234. izumizaki.fukushima.jp
  15235. kagamiishi.fukushima.jp
  15236. kaneyama.fukushima.jp
  15237. kawamata.fukushima.jp
  15238. kitakata.fukushima.jp
  15239. kitashiobara.fukushima.jp
  15240. koori.fukushima.jp
  15241. koriyama.fukushima.jp
  15242. kunimi.fukushima.jp
  15243. miharu.fukushima.jp
  15244. mishima.fukushima.jp
  15245. namie.fukushima.jp
  15246. nango.fukushima.jp
  15247. nishiaizu.fukushima.jp
  15248. nishigo.fukushima.jp
  15249. okuma.fukushima.jp
  15250. omotego.fukushima.jp
  15251. ono.fukushima.jp
  15252. otama.fukushima.jp
  15253. samegawa.fukushima.jp
  15254. shimogo.fukushima.jp
  15255. shirakawa.fukushima.jp
  15256. showa.fukushima.jp
  15257. soma.fukushima.jp
  15258. sukagawa.fukushima.jp
  15259. taishin.fukushima.jp
  15260. tamakawa.fukushima.jp
  15261. tanagura.fukushima.jp
  15262. tenei.fukushima.jp
  15263. yabuki.fukushima.jp
  15264. yamato.fukushima.jp
  15265. yamatsuri.fukushima.jp
  15266. yanaizu.fukushima.jp
  15267. yugawa.fukushima.jp
  15268. anpachi.gifu.jp
  15269. ena.gifu.jp
  15270. gifu.gifu.jp
  15271. ginan.gifu.jp
  15272. godo.gifu.jp
  15273. gujo.gifu.jp
  15274. hashima.gifu.jp
  15275. hichiso.gifu.jp
  15276. hida.gifu.jp
  15277. higashishirakawa.gifu.jp
  15278. ibigawa.gifu.jp
  15279. ikeda.gifu.jp
  15280. kakamigahara.gifu.jp
  15281. kani.gifu.jp
  15282. kasahara.gifu.jp
  15283. kasamatsu.gifu.jp
  15284. kawaue.gifu.jp
  15285. kitagata.gifu.jp
  15286. mino.gifu.jp
  15287. minokamo.gifu.jp
  15288. mitake.gifu.jp
  15289. mizunami.gifu.jp
  15290. motosu.gifu.jp
  15291. nakatsugawa.gifu.jp
  15292. ogaki.gifu.jp
  15293. sakahogi.gifu.jp
  15294. seki.gifu.jp
  15295. sekigahara.gifu.jp
  15296. shirakawa.gifu.jp
  15297. tajimi.gifu.jp
  15298. takayama.gifu.jp
  15299. tarui.gifu.jp
  15300. toki.gifu.jp
  15301. tomika.gifu.jp
  15302. wanouchi.gifu.jp
  15303. yamagata.gifu.jp
  15304. yaotsu.gifu.jp
  15305. yoro.gifu.jp
  15306. annaka.gunma.jp
  15307. chiyoda.gunma.jp
  15308. fujioka.gunma.jp
  15309. higashiagatsuma.gunma.jp
  15310. isesaki.gunma.jp
  15311. itakura.gunma.jp
  15312. kanna.gunma.jp
  15313. kanra.gunma.jp
  15314. katashina.gunma.jp
  15315. kawaba.gunma.jp
  15316. kiryu.gunma.jp
  15317. kusatsu.gunma.jp
  15318. maebashi.gunma.jp
  15319. meiwa.gunma.jp
  15320. midori.gunma.jp
  15321. minakami.gunma.jp
  15322. naganohara.gunma.jp
  15323. nakanojo.gunma.jp
  15324. nanmoku.gunma.jp
  15325. numata.gunma.jp
  15326. oizumi.gunma.jp
  15327. ora.gunma.jp
  15328. ota.gunma.jp
  15329. shibukawa.gunma.jp
  15330. shimonita.gunma.jp
  15331. shinto.gunma.jp
  15332. showa.gunma.jp
  15333. takasaki.gunma.jp
  15334. takayama.gunma.jp
  15335. tamamura.gunma.jp
  15336. tatebayashi.gunma.jp
  15337. tomioka.gunma.jp
  15338. tsukiyono.gunma.jp
  15339. tsumagoi.gunma.jp
  15340. ueno.gunma.jp
  15341. yoshioka.gunma.jp
  15342. asaminami.hiroshima.jp
  15343. daiwa.hiroshima.jp
  15344. etajima.hiroshima.jp
  15345. fuchu.hiroshima.jp
  15346. fukuyama.hiroshima.jp
  15347. hatsukaichi.hiroshima.jp
  15348. higashihiroshima.hiroshima.jp
  15349. hongo.hiroshima.jp
  15350. jinsekikogen.hiroshima.jp
  15351. kaita.hiroshima.jp
  15352. kui.hiroshima.jp
  15353. kumano.hiroshima.jp
  15354. kure.hiroshima.jp
  15355. mihara.hiroshima.jp
  15356. miyoshi.hiroshima.jp
  15357. naka.hiroshima.jp
  15358. onomichi.hiroshima.jp
  15359. osakikamijima.hiroshima.jp
  15360. otake.hiroshima.jp
  15361. saka.hiroshima.jp
  15362. sera.hiroshima.jp
  15363. seranishi.hiroshima.jp
  15364. shinichi.hiroshima.jp
  15365. shobara.hiroshima.jp
  15366. takehara.hiroshima.jp
  15367. abashiri.hokkaido.jp
  15368. abira.hokkaido.jp
  15369. aibetsu.hokkaido.jp
  15370. akabira.hokkaido.jp
  15371. akkeshi.hokkaido.jp
  15372. asahikawa.hokkaido.jp
  15373. ashibetsu.hokkaido.jp
  15374. ashoro.hokkaido.jp
  15375. assabu.hokkaido.jp
  15376. atsuma.hokkaido.jp
  15377. bibai.hokkaido.jp
  15378. biei.hokkaido.jp
  15379. bifuka.hokkaido.jp
  15380. bihoro.hokkaido.jp
  15381. biratori.hokkaido.jp
  15382. chippubetsu.hokkaido.jp
  15383. chitose.hokkaido.jp
  15384. date.hokkaido.jp
  15385. ebetsu.hokkaido.jp
  15386. embetsu.hokkaido.jp
  15387. eniwa.hokkaido.jp
  15388. erimo.hokkaido.jp
  15389. esan.hokkaido.jp
  15390. esashi.hokkaido.jp
  15391. fukagawa.hokkaido.jp
  15392. fukushima.hokkaido.jp
  15393. furano.hokkaido.jp
  15394. furubira.hokkaido.jp
  15395. haboro.hokkaido.jp
  15396. hakodate.hokkaido.jp
  15397. hamatonbetsu.hokkaido.jp
  15398. hidaka.hokkaido.jp
  15399. higashikagura.hokkaido.jp
  15400. higashikawa.hokkaido.jp
  15401. hiroo.hokkaido.jp
  15402. hokuryu.hokkaido.jp
  15403. hokuto.hokkaido.jp
  15404. honbetsu.hokkaido.jp
  15405. horokanai.hokkaido.jp
  15406. horonobe.hokkaido.jp
  15407. ikeda.hokkaido.jp
  15408. imakane.hokkaido.jp
  15409. ishikari.hokkaido.jp
  15410. iwamizawa.hokkaido.jp
  15411. iwanai.hokkaido.jp
  15412. kamifurano.hokkaido.jp
  15413. kamikawa.hokkaido.jp
  15414. kamishihoro.hokkaido.jp
  15415. kamisunagawa.hokkaido.jp
  15416. kamoenai.hokkaido.jp
  15417. kayabe.hokkaido.jp
  15418. kembuchi.hokkaido.jp
  15419. kikonai.hokkaido.jp
  15420. kimobetsu.hokkaido.jp
  15421. kitahiroshima.hokkaido.jp
  15422. kitami.hokkaido.jp
  15423. kiyosato.hokkaido.jp
  15424. koshimizu.hokkaido.jp
  15425. kunneppu.hokkaido.jp
  15426. kuriyama.hokkaido.jp
  15427. kuromatsunai.hokkaido.jp
  15428. kushiro.hokkaido.jp
  15429. kutchan.hokkaido.jp
  15430. kyowa.hokkaido.jp
  15431. mashike.hokkaido.jp
  15432. matsumae.hokkaido.jp
  15433. mikasa.hokkaido.jp
  15434. minamifurano.hokkaido.jp
  15435. mombetsu.hokkaido.jp
  15436. moseushi.hokkaido.jp
  15437. mukawa.hokkaido.jp
  15438. muroran.hokkaido.jp
  15439. naie.hokkaido.jp
  15440. nakagawa.hokkaido.jp
  15441. nakasatsunai.hokkaido.jp
  15442. nakatombetsu.hokkaido.jp
  15443. nanae.hokkaido.jp
  15444. nanporo.hokkaido.jp
  15445. nayoro.hokkaido.jp
  15446. nemuro.hokkaido.jp
  15447. niikappu.hokkaido.jp
  15448. niki.hokkaido.jp
  15449. nishiokoppe.hokkaido.jp
  15450. noboribetsu.hokkaido.jp
  15451. numata.hokkaido.jp
  15452. obihiro.hokkaido.jp
  15453. obira.hokkaido.jp
  15454. oketo.hokkaido.jp
  15455. okoppe.hokkaido.jp
  15456. otaru.hokkaido.jp
  15457. otobe.hokkaido.jp
  15458. otofuke.hokkaido.jp
  15459. otoineppu.hokkaido.jp
  15460. oumu.hokkaido.jp
  15461. ozora.hokkaido.jp
  15462. pippu.hokkaido.jp
  15463. rankoshi.hokkaido.jp
  15464. rebun.hokkaido.jp
  15465. rikubetsu.hokkaido.jp
  15466. rishiri.hokkaido.jp
  15467. rishirifuji.hokkaido.jp
  15468. saroma.hokkaido.jp
  15469. sarufutsu.hokkaido.jp
  15470. shakotan.hokkaido.jp
  15471. shari.hokkaido.jp
  15472. shibecha.hokkaido.jp
  15473. shibetsu.hokkaido.jp
  15474. shikabe.hokkaido.jp
  15475. shikaoi.hokkaido.jp
  15476. shimamaki.hokkaido.jp
  15477. shimizu.hokkaido.jp
  15478. shimokawa.hokkaido.jp
  15479. shinshinotsu.hokkaido.jp
  15480. shintoku.hokkaido.jp
  15481. shiranuka.hokkaido.jp
  15482. shiraoi.hokkaido.jp
  15483. shiriuchi.hokkaido.jp
  15484. sobetsu.hokkaido.jp
  15485. sunagawa.hokkaido.jp
  15486. taiki.hokkaido.jp
  15487. takasu.hokkaido.jp
  15488. takikawa.hokkaido.jp
  15489. takinoue.hokkaido.jp
  15490. teshikaga.hokkaido.jp
  15491. tobetsu.hokkaido.jp
  15492. tohma.hokkaido.jp
  15493. tomakomai.hokkaido.jp
  15494. tomari.hokkaido.jp
  15495. toya.hokkaido.jp
  15496. toyako.hokkaido.jp
  15497. toyotomi.hokkaido.jp
  15498. toyoura.hokkaido.jp
  15499. tsubetsu.hokkaido.jp
  15500. tsukigata.hokkaido.jp
  15501. urakawa.hokkaido.jp
  15502. urausu.hokkaido.jp
  15503. uryu.hokkaido.jp
  15504. utashinai.hokkaido.jp
  15505. wakkanai.hokkaido.jp
  15506. wassamu.hokkaido.jp
  15507. yakumo.hokkaido.jp
  15508. yoichi.hokkaido.jp
  15509. aioi.hyogo.jp
  15510. akashi.hyogo.jp
  15511. ako.hyogo.jp
  15512. amagasaki.hyogo.jp
  15513. aogaki.hyogo.jp
  15514. asago.hyogo.jp
  15515. ashiya.hyogo.jp
  15516. awaji.hyogo.jp
  15517. fukusaki.hyogo.jp
  15518. goshiki.hyogo.jp
  15519. harima.hyogo.jp
  15520. himeji.hyogo.jp
  15521. ichikawa.hyogo.jp
  15522. inagawa.hyogo.jp
  15523. itami.hyogo.jp
  15524. kakogawa.hyogo.jp
  15525. kamigori.hyogo.jp
  15526. kamikawa.hyogo.jp
  15527. kasai.hyogo.jp
  15528. kasuga.hyogo.jp
  15529. kawanishi.hyogo.jp
  15530. miki.hyogo.jp
  15531. minamiawaji.hyogo.jp
  15532. nishinomiya.hyogo.jp
  15533. nishiwaki.hyogo.jp
  15534. ono.hyogo.jp
  15535. sanda.hyogo.jp
  15536. sannan.hyogo.jp
  15537. sasayama.hyogo.jp
  15538. sayo.hyogo.jp
  15539. shingu.hyogo.jp
  15540. shinonsen.hyogo.jp
  15541. shiso.hyogo.jp
  15542. sumoto.hyogo.jp
  15543. taishi.hyogo.jp
  15544. taka.hyogo.jp
  15545. takarazuka.hyogo.jp
  15546. takasago.hyogo.jp
  15547. takino.hyogo.jp
  15548. tamba.hyogo.jp
  15549. tatsuno.hyogo.jp
  15550. toyooka.hyogo.jp
  15551. yabu.hyogo.jp
  15552. yashiro.hyogo.jp
  15553. yoka.hyogo.jp
  15554. yokawa.hyogo.jp
  15555. ami.ibaraki.jp
  15556. asahi.ibaraki.jp
  15557. bando.ibaraki.jp
  15558. chikusei.ibaraki.jp
  15559. daigo.ibaraki.jp
  15560. fujishiro.ibaraki.jp
  15561. hitachi.ibaraki.jp
  15562. hitachinaka.ibaraki.jp
  15563. hitachiomiya.ibaraki.jp
  15564. hitachiota.ibaraki.jp
  15565. ibaraki.ibaraki.jp
  15566. ina.ibaraki.jp
  15567. inashiki.ibaraki.jp
  15568. itako.ibaraki.jp
  15569. iwama.ibaraki.jp
  15570. joso.ibaraki.jp
  15571. kamisu.ibaraki.jp
  15572. kasama.ibaraki.jp
  15573. kashima.ibaraki.jp
  15574. kasumigaura.ibaraki.jp
  15575. koga.ibaraki.jp
  15576. miho.ibaraki.jp
  15577. mito.ibaraki.jp
  15578. moriya.ibaraki.jp
  15579. naka.ibaraki.jp
  15580. namegata.ibaraki.jp
  15581. oarai.ibaraki.jp
  15582. ogawa.ibaraki.jp
  15583. omitama.ibaraki.jp
  15584. ryugasaki.ibaraki.jp
  15585. sakai.ibaraki.jp
  15586. sakuragawa.ibaraki.jp
  15587. shimodate.ibaraki.jp
  15588. shimotsuma.ibaraki.jp
  15589. shirosato.ibaraki.jp
  15590. sowa.ibaraki.jp
  15591. suifu.ibaraki.jp
  15592. takahagi.ibaraki.jp
  15593. tamatsukuri.ibaraki.jp
  15594. tokai.ibaraki.jp
  15595. tomobe.ibaraki.jp
  15596. tone.ibaraki.jp
  15597. toride.ibaraki.jp
  15598. tsuchiura.ibaraki.jp
  15599. tsukuba.ibaraki.jp
  15600. uchihara.ibaraki.jp
  15601. ushiku.ibaraki.jp
  15602. yachiyo.ibaraki.jp
  15603. yamagata.ibaraki.jp
  15604. yawara.ibaraki.jp
  15605. yuki.ibaraki.jp
  15606. anamizu.ishikawa.jp
  15607. hakui.ishikawa.jp
  15608. hakusan.ishikawa.jp
  15609. kaga.ishikawa.jp
  15610. kahoku.ishikawa.jp
  15611. kanazawa.ishikawa.jp
  15612. kawakita.ishikawa.jp
  15613. komatsu.ishikawa.jp
  15614. nakanoto.ishikawa.jp
  15615. nanao.ishikawa.jp
  15616. nomi.ishikawa.jp
  15617. nonoichi.ishikawa.jp
  15618. noto.ishikawa.jp
  15619. shika.ishikawa.jp
  15620. suzu.ishikawa.jp
  15621. tsubata.ishikawa.jp
  15622. tsurugi.ishikawa.jp
  15623. uchinada.ishikawa.jp
  15624. wajima.ishikawa.jp
  15625. fudai.iwate.jp
  15626. fujisawa.iwate.jp
  15627. hanamaki.iwate.jp
  15628. hiraizumi.iwate.jp
  15629. hirono.iwate.jp
  15630. ichinohe.iwate.jp
  15631. ichinoseki.iwate.jp
  15632. iwaizumi.iwate.jp
  15633. iwate.iwate.jp
  15634. joboji.iwate.jp
  15635. kamaishi.iwate.jp
  15636. kanegasaki.iwate.jp
  15637. karumai.iwate.jp
  15638. kawai.iwate.jp
  15639. kitakami.iwate.jp
  15640. kuji.iwate.jp
  15641. kunohe.iwate.jp
  15642. kuzumaki.iwate.jp
  15643. miyako.iwate.jp
  15644. mizusawa.iwate.jp
  15645. morioka.iwate.jp
  15646. ninohe.iwate.jp
  15647. noda.iwate.jp
  15648. ofunato.iwate.jp
  15649. oshu.iwate.jp
  15650. otsuchi.iwate.jp
  15651. rikuzentakata.iwate.jp
  15652. shiwa.iwate.jp
  15653. shizukuishi.iwate.jp
  15654. sumita.iwate.jp
  15655. tanohata.iwate.jp
  15656. tono.iwate.jp
  15657. yahaba.iwate.jp
  15658. yamada.iwate.jp
  15659. ayagawa.kagawa.jp
  15660. higashikagawa.kagawa.jp
  15661. kanonji.kagawa.jp
  15662. kotohira.kagawa.jp
  15663. manno.kagawa.jp
  15664. marugame.kagawa.jp
  15665. mitoyo.kagawa.jp
  15666. naoshima.kagawa.jp
  15667. sanuki.kagawa.jp
  15668. tadotsu.kagawa.jp
  15669. takamatsu.kagawa.jp
  15670. tonosho.kagawa.jp
  15671. uchinomi.kagawa.jp
  15672. utazu.kagawa.jp
  15673. zentsuji.kagawa.jp
  15674. akune.kagoshima.jp
  15675. amami.kagoshima.jp
  15676. hioki.kagoshima.jp
  15677. isa.kagoshima.jp
  15678. isen.kagoshima.jp
  15679. izumi.kagoshima.jp
  15680. kagoshima.kagoshima.jp
  15681. kanoya.kagoshima.jp
  15682. kawanabe.kagoshima.jp
  15683. kinko.kagoshima.jp
  15684. kouyama.kagoshima.jp
  15685. makurazaki.kagoshima.jp
  15686. matsumoto.kagoshima.jp
  15687. minamitane.kagoshima.jp
  15688. nakatane.kagoshima.jp
  15689. nishinoomote.kagoshima.jp
  15690. satsumasendai.kagoshima.jp
  15691. soo.kagoshima.jp
  15692. tarumizu.kagoshima.jp
  15693. yusui.kagoshima.jp
  15694. aikawa.kanagawa.jp
  15695. atsugi.kanagawa.jp
  15696. ayase.kanagawa.jp
  15697. chigasaki.kanagawa.jp
  15698. ebina.kanagawa.jp
  15699. fujisawa.kanagawa.jp
  15700. hadano.kanagawa.jp
  15701. hakone.kanagawa.jp
  15702. hiratsuka.kanagawa.jp
  15703. isehara.kanagawa.jp
  15704. kaisei.kanagawa.jp
  15705. kamakura.kanagawa.jp
  15706. kiyokawa.kanagawa.jp
  15707. matsuda.kanagawa.jp
  15708. minamiashigara.kanagawa.jp
  15709. miura.kanagawa.jp
  15710. nakai.kanagawa.jp
  15711. ninomiya.kanagawa.jp
  15712. odawara.kanagawa.jp
  15713. oi.kanagawa.jp
  15714. oiso.kanagawa.jp
  15715. sagamihara.kanagawa.jp
  15716. samukawa.kanagawa.jp
  15717. tsukui.kanagawa.jp
  15718. yamakita.kanagawa.jp
  15719. yamato.kanagawa.jp
  15720. yokosuka.kanagawa.jp
  15721. yugawara.kanagawa.jp
  15722. zama.kanagawa.jp
  15723. zushi.kanagawa.jp
  15724. aki.kochi.jp
  15725. geisei.kochi.jp
  15726. hidaka.kochi.jp
  15727. higashitsuno.kochi.jp
  15728. ino.kochi.jp
  15729. kagami.kochi.jp
  15730. kami.kochi.jp
  15731. kitagawa.kochi.jp
  15732. kochi.kochi.jp
  15733. mihara.kochi.jp
  15734. motoyama.kochi.jp
  15735. muroto.kochi.jp
  15736. nahari.kochi.jp
  15737. nakamura.kochi.jp
  15738. nankoku.kochi.jp
  15739. nishitosa.kochi.jp
  15740. niyodogawa.kochi.jp
  15741. ochi.kochi.jp
  15742. okawa.kochi.jp
  15743. otoyo.kochi.jp
  15744. otsuki.kochi.jp
  15745. sakawa.kochi.jp
  15746. sukumo.kochi.jp
  15747. susaki.kochi.jp
  15748. tosa.kochi.jp
  15749. tosashimizu.kochi.jp
  15750. toyo.kochi.jp
  15751. tsuno.kochi.jp
  15752. umaji.kochi.jp
  15753. yasuda.kochi.jp
  15754. yusuhara.kochi.jp
  15755. amakusa.kumamoto.jp
  15756. arao.kumamoto.jp
  15757. aso.kumamoto.jp
  15758. choyo.kumamoto.jp
  15759. gyokuto.kumamoto.jp
  15760. kamiamakusa.kumamoto.jp
  15761. kikuchi.kumamoto.jp
  15762. kumamoto.kumamoto.jp
  15763. mashiki.kumamoto.jp
  15764. mifune.kumamoto.jp
  15765. minamata.kumamoto.jp
  15766. minamioguni.kumamoto.jp
  15767. nagasu.kumamoto.jp
  15768. nishihara.kumamoto.jp
  15769. oguni.kumamoto.jp
  15770. ozu.kumamoto.jp
  15771. sumoto.kumamoto.jp
  15772. takamori.kumamoto.jp
  15773. uki.kumamoto.jp
  15774. uto.kumamoto.jp
  15775. yamaga.kumamoto.jp
  15776. yamato.kumamoto.jp
  15777. yatsushiro.kumamoto.jp
  15778. ayabe.kyoto.jp
  15779. fukuchiyama.kyoto.jp
  15780. higashiyama.kyoto.jp
  15781. ide.kyoto.jp
  15782. ine.kyoto.jp
  15783. joyo.kyoto.jp
  15784. kameoka.kyoto.jp
  15785. kamo.kyoto.jp
  15786. kita.kyoto.jp
  15787. kizu.kyoto.jp
  15788. kumiyama.kyoto.jp
  15789. kyotamba.kyoto.jp
  15790. kyotanabe.kyoto.jp
  15791. kyotango.kyoto.jp
  15792. maizuru.kyoto.jp
  15793. minami.kyoto.jp
  15794. minamiyamashiro.kyoto.jp
  15795. miyazu.kyoto.jp
  15796. muko.kyoto.jp
  15797. nagaokakyo.kyoto.jp
  15798. nakagyo.kyoto.jp
  15799. nantan.kyoto.jp
  15800. oyamazaki.kyoto.jp
  15801. sakyo.kyoto.jp
  15802. seika.kyoto.jp
  15803. tanabe.kyoto.jp
  15804. uji.kyoto.jp
  15805. ujitawara.kyoto.jp
  15806. wazuka.kyoto.jp
  15807. yamashina.kyoto.jp
  15808. yawata.kyoto.jp
  15809. asahi.mie.jp
  15810. inabe.mie.jp
  15811. ise.mie.jp
  15812. kameyama.mie.jp
  15813. kawagoe.mie.jp
  15814. kiho.mie.jp
  15815. kisosaki.mie.jp
  15816. kiwa.mie.jp
  15817. komono.mie.jp
  15818. kumano.mie.jp
  15819. kuwana.mie.jp
  15820. matsusaka.mie.jp
  15821. meiwa.mie.jp
  15822. mihama.mie.jp
  15823. minamiise.mie.jp
  15824. misugi.mie.jp
  15825. miyama.mie.jp
  15826. nabari.mie.jp
  15827. shima.mie.jp
  15828. suzuka.mie.jp
  15829. tado.mie.jp
  15830. taiki.mie.jp
  15831. taki.mie.jp
  15832. tamaki.mie.jp
  15833. toba.mie.jp
  15834. tsu.mie.jp
  15835. udono.mie.jp
  15836. ureshino.mie.jp
  15837. watarai.mie.jp
  15838. yokkaichi.mie.jp
  15839. furukawa.miyagi.jp
  15840. higashimatsushima.miyagi.jp
  15841. ishinomaki.miyagi.jp
  15842. iwanuma.miyagi.jp
  15843. kakuda.miyagi.jp
  15844. kami.miyagi.jp
  15845. kawasaki.miyagi.jp
  15846. marumori.miyagi.jp
  15847. matsushima.miyagi.jp
  15848. minamisanriku.miyagi.jp
  15849. misato.miyagi.jp
  15850. murata.miyagi.jp
  15851. natori.miyagi.jp
  15852. ogawara.miyagi.jp
  15853. ohira.miyagi.jp
  15854. onagawa.miyagi.jp
  15855. osaki.miyagi.jp
  15856. rifu.miyagi.jp
  15857. semine.miyagi.jp
  15858. shibata.miyagi.jp
  15859. shichikashuku.miyagi.jp
  15860. shikama.miyagi.jp
  15861. shiogama.miyagi.jp
  15862. shiroishi.miyagi.jp
  15863. tagajo.miyagi.jp
  15864. taiwa.miyagi.jp
  15865. tome.miyagi.jp
  15866. tomiya.miyagi.jp
  15867. wakuya.miyagi.jp
  15868. watari.miyagi.jp
  15869. yamamoto.miyagi.jp
  15870. zao.miyagi.jp
  15871. aya.miyazaki.jp
  15872. ebino.miyazaki.jp
  15873. gokase.miyazaki.jp
  15874. hyuga.miyazaki.jp
  15875. kadogawa.miyazaki.jp
  15876. kawaminami.miyazaki.jp
  15877. kijo.miyazaki.jp
  15878. kitagawa.miyazaki.jp
  15879. kitakata.miyazaki.jp
  15880. kitaura.miyazaki.jp
  15881. kobayashi.miyazaki.jp
  15882. kunitomi.miyazaki.jp
  15883. kushima.miyazaki.jp
  15884. mimata.miyazaki.jp
  15885. miyakonojo.miyazaki.jp
  15886. miyazaki.miyazaki.jp
  15887. morotsuka.miyazaki.jp
  15888. nichinan.miyazaki.jp
  15889. nishimera.miyazaki.jp
  15890. nobeoka.miyazaki.jp
  15891. saito.miyazaki.jp
  15892. shiiba.miyazaki.jp
  15893. shintomi.miyazaki.jp
  15894. takaharu.miyazaki.jp
  15895. takanabe.miyazaki.jp
  15896. takazaki.miyazaki.jp
  15897. tsuno.miyazaki.jp
  15898. achi.nagano.jp
  15899. agematsu.nagano.jp
  15900. anan.nagano.jp
  15901. aoki.nagano.jp
  15902. asahi.nagano.jp
  15903. azumino.nagano.jp
  15904. chikuhoku.nagano.jp
  15905. chikuma.nagano.jp
  15906. chino.nagano.jp
  15907. fujimi.nagano.jp
  15908. hakuba.nagano.jp
  15909. hara.nagano.jp
  15910. hiraya.nagano.jp
  15911. iida.nagano.jp
  15912. iijima.nagano.jp
  15913. iiyama.nagano.jp
  15914. iizuna.nagano.jp
  15915. ikeda.nagano.jp
  15916. ikusaka.nagano.jp
  15917. ina.nagano.jp
  15918. karuizawa.nagano.jp
  15919. kawakami.nagano.jp
  15920. kiso.nagano.jp
  15921. kisofukushima.nagano.jp
  15922. kitaaiki.nagano.jp
  15923. komagane.nagano.jp
  15924. komoro.nagano.jp
  15925. matsukawa.nagano.jp
  15926. matsumoto.nagano.jp
  15927. miasa.nagano.jp
  15928. minamiaiki.nagano.jp
  15929. minamimaki.nagano.jp
  15930. minamiminowa.nagano.jp
  15931. minowa.nagano.jp
  15932. miyada.nagano.jp
  15933. miyota.nagano.jp
  15934. mochizuki.nagano.jp
  15935. nagano.nagano.jp
  15936. nagawa.nagano.jp
  15937. nagiso.nagano.jp
  15938. nakagawa.nagano.jp
  15939. nakano.nagano.jp
  15940. nozawaonsen.nagano.jp
  15941. obuse.nagano.jp
  15942. ogawa.nagano.jp
  15943. okaya.nagano.jp
  15944. omachi.nagano.jp
  15945. omi.nagano.jp
  15946. ookuwa.nagano.jp
  15947. ooshika.nagano.jp
  15948. otaki.nagano.jp
  15949. otari.nagano.jp
  15950. sakae.nagano.jp
  15951. sakaki.nagano.jp
  15952. saku.nagano.jp
  15953. sakuho.nagano.jp
  15954. shimosuwa.nagano.jp
  15955. shinanomachi.nagano.jp
  15956. shiojiri.nagano.jp
  15957. suwa.nagano.jp
  15958. suzaka.nagano.jp
  15959. takagi.nagano.jp
  15960. takamori.nagano.jp
  15961. takayama.nagano.jp
  15962. tateshina.nagano.jp
  15963. tatsuno.nagano.jp
  15964. togakushi.nagano.jp
  15965. togura.nagano.jp
  15966. tomi.nagano.jp
  15967. ueda.nagano.jp
  15968. wada.nagano.jp
  15969. yamagata.nagano.jp
  15970. yamanouchi.nagano.jp
  15971. yasaka.nagano.jp
  15972. yasuoka.nagano.jp
  15973. chijiwa.nagasaki.jp
  15974. futsu.nagasaki.jp
  15975. goto.nagasaki.jp
  15976. hasami.nagasaki.jp
  15977. hirado.nagasaki.jp
  15978. iki.nagasaki.jp
  15979. isahaya.nagasaki.jp
  15980. kawatana.nagasaki.jp
  15981. kuchinotsu.nagasaki.jp
  15982. matsuura.nagasaki.jp
  15983. nagasaki.nagasaki.jp
  15984. obama.nagasaki.jp
  15985. omura.nagasaki.jp
  15986. oseto.nagasaki.jp
  15987. saikai.nagasaki.jp
  15988. sasebo.nagasaki.jp
  15989. seihi.nagasaki.jp
  15990. shimabara.nagasaki.jp
  15991. shinkamigoto.nagasaki.jp
  15992. togitsu.nagasaki.jp
  15993. tsushima.nagasaki.jp
  15994. unzen.nagasaki.jp
  15995. ando.nara.jp
  15996. gose.nara.jp
  15997. heguri.nara.jp
  15998. higashiyoshino.nara.jp
  15999. ikaruga.nara.jp
  16000. ikoma.nara.jp
  16001. kamikitayama.nara.jp
  16002. kanmaki.nara.jp
  16003. kashiba.nara.jp
  16004. kashihara.nara.jp
  16005. katsuragi.nara.jp
  16006. kawai.nara.jp
  16007. kawakami.nara.jp
  16008. kawanishi.nara.jp
  16009. koryo.nara.jp
  16010. kurotaki.nara.jp
  16011. mitsue.nara.jp
  16012. miyake.nara.jp
  16013. nara.nara.jp
  16014. nosegawa.nara.jp
  16015. oji.nara.jp
  16016. ouda.nara.jp
  16017. oyodo.nara.jp
  16018. sakurai.nara.jp
  16019. sango.nara.jp
  16020. shimoichi.nara.jp
  16021. shimokitayama.nara.jp
  16022. shinjo.nara.jp
  16023. soni.nara.jp
  16024. takatori.nara.jp
  16025. tawaramoto.nara.jp
  16026. tenkawa.nara.jp
  16027. tenri.nara.jp
  16028. uda.nara.jp
  16029. yamatokoriyama.nara.jp
  16030. yamatotakada.nara.jp
  16031. yamazoe.nara.jp
  16032. yoshino.nara.jp
  16033. aga.niigata.jp
  16034. agano.niigata.jp
  16035. gosen.niigata.jp
  16036. itoigawa.niigata.jp
  16037. izumozaki.niigata.jp
  16038. joetsu.niigata.jp
  16039. kamo.niigata.jp
  16040. kariwa.niigata.jp
  16041. kashiwazaki.niigata.jp
  16042. minamiuonuma.niigata.jp
  16043. mitsuke.niigata.jp
  16044. muika.niigata.jp
  16045. murakami.niigata.jp
  16046. myoko.niigata.jp
  16047. nagaoka.niigata.jp
  16048. niigata.niigata.jp
  16049. ojiya.niigata.jp
  16050. omi.niigata.jp
  16051. sado.niigata.jp
  16052. sanjo.niigata.jp
  16053. seiro.niigata.jp
  16054. seirou.niigata.jp
  16055. sekikawa.niigata.jp
  16056. shibata.niigata.jp
  16057. tagami.niigata.jp
  16058. tainai.niigata.jp
  16059. tochio.niigata.jp
  16060. tokamachi.niigata.jp
  16061. tsubame.niigata.jp
  16062. tsunan.niigata.jp
  16063. uonuma.niigata.jp
  16064. yahiko.niigata.jp
  16065. yoita.niigata.jp
  16066. yuzawa.niigata.jp
  16067. beppu.oita.jp
  16068. bungoono.oita.jp
  16069. bungotakada.oita.jp
  16070. hasama.oita.jp
  16071. hiji.oita.jp
  16072. himeshima.oita.jp
  16073. hita.oita.jp
  16074. kamitsue.oita.jp
  16075. kokonoe.oita.jp
  16076. kuju.oita.jp
  16077. kunisaki.oita.jp
  16078. kusu.oita.jp
  16079. oita.oita.jp
  16080. saiki.oita.jp
  16081. taketa.oita.jp
  16082. tsukumi.oita.jp
  16083. usa.oita.jp
  16084. usuki.oita.jp
  16085. yufu.oita.jp
  16086. akaiwa.okayama.jp
  16087. asakuchi.okayama.jp
  16088. bizen.okayama.jp
  16089. hayashima.okayama.jp
  16090. ibara.okayama.jp
  16091. kagamino.okayama.jp
  16092. kasaoka.okayama.jp
  16093. kibichuo.okayama.jp
  16094. kumenan.okayama.jp
  16095. kurashiki.okayama.jp
  16096. maniwa.okayama.jp
  16097. misaki.okayama.jp
  16098. nagi.okayama.jp
  16099. niimi.okayama.jp
  16100. nishiawakura.okayama.jp
  16101. okayama.okayama.jp
  16102. satosho.okayama.jp
  16103. setouchi.okayama.jp
  16104. shinjo.okayama.jp
  16105. shoo.okayama.jp
  16106. soja.okayama.jp
  16107. takahashi.okayama.jp
  16108. tamano.okayama.jp
  16109. tsuyama.okayama.jp
  16110. wake.okayama.jp
  16111. yakage.okayama.jp
  16112. aguni.okinawa.jp
  16113. ginowan.okinawa.jp
  16114. ginoza.okinawa.jp
  16115. gushikami.okinawa.jp
  16116. haebaru.okinawa.jp
  16117. higashi.okinawa.jp
  16118. hirara.okinawa.jp
  16119. iheya.okinawa.jp
  16120. ishigaki.okinawa.jp
  16121. ishikawa.okinawa.jp
  16122. itoman.okinawa.jp
  16123. izena.okinawa.jp
  16124. kadena.okinawa.jp
  16125. kin.okinawa.jp
  16126. kitadaito.okinawa.jp
  16127. kitanakagusuku.okinawa.jp
  16128. kumejima.okinawa.jp
  16129. kunigami.okinawa.jp
  16130. minamidaito.okinawa.jp
  16131. motobu.okinawa.jp
  16132. nago.okinawa.jp
  16133. naha.okinawa.jp
  16134. nakagusuku.okinawa.jp
  16135. nakijin.okinawa.jp
  16136. nanjo.okinawa.jp
  16137. nishihara.okinawa.jp
  16138. ogimi.okinawa.jp
  16139. okinawa.okinawa.jp
  16140. onna.okinawa.jp
  16141. shimoji.okinawa.jp
  16142. taketomi.okinawa.jp
  16143. tarama.okinawa.jp
  16144. tokashiki.okinawa.jp
  16145. tomigusuku.okinawa.jp
  16146. tonaki.okinawa.jp
  16147. urasoe.okinawa.jp
  16148. uruma.okinawa.jp
  16149. yaese.okinawa.jp
  16150. yomitan.okinawa.jp
  16151. yonabaru.okinawa.jp
  16152. yonaguni.okinawa.jp
  16153. zamami.okinawa.jp
  16154. abeno.osaka.jp
  16155. chihayaakasaka.osaka.jp
  16156. chuo.osaka.jp
  16157. daito.osaka.jp
  16158. fujiidera.osaka.jp
  16159. habikino.osaka.jp
  16160. hannan.osaka.jp
  16161. higashiosaka.osaka.jp
  16162. higashisumiyoshi.osaka.jp
  16163. higashiyodogawa.osaka.jp
  16164. hirakata.osaka.jp
  16165. ibaraki.osaka.jp
  16166. ikeda.osaka.jp
  16167. izumi.osaka.jp
  16168. izumiotsu.osaka.jp
  16169. izumisano.osaka.jp
  16170. kadoma.osaka.jp
  16171. kaizuka.osaka.jp
  16172. kanan.osaka.jp
  16173. kashiwara.osaka.jp
  16174. katano.osaka.jp
  16175. kawachinagano.osaka.jp
  16176. kishiwada.osaka.jp
  16177. kita.osaka.jp
  16178. kumatori.osaka.jp
  16179. matsubara.osaka.jp
  16180. minato.osaka.jp
  16181. minoh.osaka.jp
  16182. misaki.osaka.jp
  16183. moriguchi.osaka.jp
  16184. neyagawa.osaka.jp
  16185. nishi.osaka.jp
  16186. nose.osaka.jp
  16187. osakasayama.osaka.jp
  16188. sakai.osaka.jp
  16189. sayama.osaka.jp
  16190. sennan.osaka.jp
  16191. settsu.osaka.jp
  16192. shijonawate.osaka.jp
  16193. shimamoto.osaka.jp
  16194. suita.osaka.jp
  16195. tadaoka.osaka.jp
  16196. taishi.osaka.jp
  16197. tajiri.osaka.jp
  16198. takaishi.osaka.jp
  16199. takatsuki.osaka.jp
  16200. tondabayashi.osaka.jp
  16201. toyonaka.osaka.jp
  16202. toyono.osaka.jp
  16203. yao.osaka.jp
  16204. ariake.saga.jp
  16205. arita.saga.jp
  16206. fukudomi.saga.jp
  16207. genkai.saga.jp
  16208. hamatama.saga.jp
  16209. hizen.saga.jp
  16210. imari.saga.jp
  16211. kamimine.saga.jp
  16212. kanzaki.saga.jp
  16213. karatsu.saga.jp
  16214. kashima.saga.jp
  16215. kitagata.saga.jp
  16216. kitahata.saga.jp
  16217. kiyama.saga.jp
  16218. kouhoku.saga.jp
  16219. kyuragi.saga.jp
  16220. nishiarita.saga.jp
  16221. ogi.saga.jp
  16222. omachi.saga.jp
  16223. ouchi.saga.jp
  16224. saga.saga.jp
  16225. shiroishi.saga.jp
  16226. taku.saga.jp
  16227. tara.saga.jp
  16228. tosu.saga.jp
  16229. yoshinogari.saga.jp
  16230. arakawa.saitama.jp
  16231. asaka.saitama.jp
  16232. chichibu.saitama.jp
  16233. fujimi.saitama.jp
  16234. fujimino.saitama.jp
  16235. fukaya.saitama.jp
  16236. hanno.saitama.jp
  16237. hanyu.saitama.jp
  16238. hasuda.saitama.jp
  16239. hatogaya.saitama.jp
  16240. hatoyama.saitama.jp
  16241. hidaka.saitama.jp
  16242. higashichichibu.saitama.jp
  16243. higashimatsuyama.saitama.jp
  16244. honjo.saitama.jp
  16245. ina.saitama.jp
  16246. iruma.saitama.jp
  16247. iwatsuki.saitama.jp
  16248. kamiizumi.saitama.jp
  16249. kamikawa.saitama.jp
  16250. kamisato.saitama.jp
  16251. kasukabe.saitama.jp
  16252. kawagoe.saitama.jp
  16253. kawaguchi.saitama.jp
  16254. kawajima.saitama.jp
  16255. kazo.saitama.jp
  16256. kitamoto.saitama.jp
  16257. koshigaya.saitama.jp
  16258. kounosu.saitama.jp
  16259. kuki.saitama.jp
  16260. kumagaya.saitama.jp
  16261. matsubushi.saitama.jp
  16262. minano.saitama.jp
  16263. misato.saitama.jp
  16264. miyashiro.saitama.jp
  16265. miyoshi.saitama.jp
  16266. moroyama.saitama.jp
  16267. nagatoro.saitama.jp
  16268. namegawa.saitama.jp
  16269. niiza.saitama.jp
  16270. ogano.saitama.jp
  16271. ogawa.saitama.jp
  16272. ogose.saitama.jp
  16273. okegawa.saitama.jp
  16274. omiya.saitama.jp
  16275. otaki.saitama.jp
  16276. ranzan.saitama.jp
  16277. ryokami.saitama.jp
  16278. saitama.saitama.jp
  16279. sakado.saitama.jp
  16280. satte.saitama.jp
  16281. sayama.saitama.jp
  16282. shiki.saitama.jp
  16283. shiraoka.saitama.jp
  16284. soka.saitama.jp
  16285. sugito.saitama.jp
  16286. toda.saitama.jp
  16287. tokigawa.saitama.jp
  16288. tokorozawa.saitama.jp
  16289. tsurugashima.saitama.jp
  16290. urawa.saitama.jp
  16291. warabi.saitama.jp
  16292. yashio.saitama.jp
  16293. yokoze.saitama.jp
  16294. yono.saitama.jp
  16295. yorii.saitama.jp
  16296. yoshida.saitama.jp
  16297. yoshikawa.saitama.jp
  16298. yoshimi.saitama.jp
  16299. aisho.shiga.jp
  16300. gamo.shiga.jp
  16301. higashiomi.shiga.jp
  16302. hikone.shiga.jp
  16303. koka.shiga.jp
  16304. konan.shiga.jp
  16305. kosei.shiga.jp
  16306. koto.shiga.jp
  16307. kusatsu.shiga.jp
  16308. maibara.shiga.jp
  16309. moriyama.shiga.jp
  16310. nagahama.shiga.jp
  16311. nishiazai.shiga.jp
  16312. notogawa.shiga.jp
  16313. omihachiman.shiga.jp
  16314. otsu.shiga.jp
  16315. ritto.shiga.jp
  16316. ryuoh.shiga.jp
  16317. takashima.shiga.jp
  16318. takatsuki.shiga.jp
  16319. torahime.shiga.jp
  16320. toyosato.shiga.jp
  16321. yasu.shiga.jp
  16322. akagi.shimane.jp
  16323. ama.shimane.jp
  16324. gotsu.shimane.jp
  16325. hamada.shimane.jp
  16326. higashiizumo.shimane.jp
  16327. hikawa.shimane.jp
  16328. hikimi.shimane.jp
  16329. izumo.shimane.jp
  16330. kakinoki.shimane.jp
  16331. masuda.shimane.jp
  16332. matsue.shimane.jp
  16333. misato.shimane.jp
  16334. nishinoshima.shimane.jp
  16335. ohda.shimane.jp
  16336. okinoshima.shimane.jp
  16337. okuizumo.shimane.jp
  16338. shimane.shimane.jp
  16339. tamayu.shimane.jp
  16340. tsuwano.shimane.jp
  16341. unnan.shimane.jp
  16342. yakumo.shimane.jp
  16343. yasugi.shimane.jp
  16344. yatsuka.shimane.jp
  16345. arai.shizuoka.jp
  16346. atami.shizuoka.jp
  16347. fuji.shizuoka.jp
  16348. fujieda.shizuoka.jp
  16349. fujikawa.shizuoka.jp
  16350. fujinomiya.shizuoka.jp
  16351. fukuroi.shizuoka.jp
  16352. gotemba.shizuoka.jp
  16353. haibara.shizuoka.jp
  16354. hamamatsu.shizuoka.jp
  16355. higashiizu.shizuoka.jp
  16356. ito.shizuoka.jp
  16357. iwata.shizuoka.jp
  16358. izu.shizuoka.jp
  16359. izunokuni.shizuoka.jp
  16360. kakegawa.shizuoka.jp
  16361. kannami.shizuoka.jp
  16362. kawanehon.shizuoka.jp
  16363. kawazu.shizuoka.jp
  16364. kikugawa.shizuoka.jp
  16365. kosai.shizuoka.jp
  16366. makinohara.shizuoka.jp
  16367. matsuzaki.shizuoka.jp
  16368. minamiizu.shizuoka.jp
  16369. mishima.shizuoka.jp
  16370. morimachi.shizuoka.jp
  16371. nishiizu.shizuoka.jp
  16372. numazu.shizuoka.jp
  16373. omaezaki.shizuoka.jp
  16374. shimada.shizuoka.jp
  16375. shimizu.shizuoka.jp
  16376. shimoda.shizuoka.jp
  16377. shizuoka.shizuoka.jp
  16378. susono.shizuoka.jp
  16379. yaizu.shizuoka.jp
  16380. yoshida.shizuoka.jp
  16381. ashikaga.tochigi.jp
  16382. bato.tochigi.jp
  16383. haga.tochigi.jp
  16384. ichikai.tochigi.jp
  16385. iwafune.tochigi.jp
  16386. kaminokawa.tochigi.jp
  16387. kanuma.tochigi.jp
  16388. karasuyama.tochigi.jp
  16389. kuroiso.tochigi.jp
  16390. mashiko.tochigi.jp
  16391. mibu.tochigi.jp
  16392. moka.tochigi.jp
  16393. motegi.tochigi.jp
  16394. nasu.tochigi.jp
  16395. nasushiobara.tochigi.jp
  16396. nikko.tochigi.jp
  16397. nishikata.tochigi.jp
  16398. nogi.tochigi.jp
  16399. ohira.tochigi.jp
  16400. ohtawara.tochigi.jp
  16401. oyama.tochigi.jp
  16402. sakura.tochigi.jp
  16403. sano.tochigi.jp
  16404. shimotsuke.tochigi.jp
  16405. shioya.tochigi.jp
  16406. takanezawa.tochigi.jp
  16407. tochigi.tochigi.jp
  16408. tsuga.tochigi.jp
  16409. ujiie.tochigi.jp
  16410. utsunomiya.tochigi.jp
  16411. yaita.tochigi.jp
  16412. aizumi.tokushima.jp
  16413. anan.tokushima.jp
  16414. ichiba.tokushima.jp
  16415. itano.tokushima.jp
  16416. kainan.tokushima.jp
  16417. komatsushima.tokushima.jp
  16418. matsushige.tokushima.jp
  16419. mima.tokushima.jp
  16420. minami.tokushima.jp
  16421. miyoshi.tokushima.jp
  16422. mugi.tokushima.jp
  16423. nakagawa.tokushima.jp
  16424. naruto.tokushima.jp
  16425. sanagochi.tokushima.jp
  16426. shishikui.tokushima.jp
  16427. tokushima.tokushima.jp
  16428. wajiki.tokushima.jp
  16429. adachi.tokyo.jp
  16430. akiruno.tokyo.jp
  16431. akishima.tokyo.jp
  16432. aogashima.tokyo.jp
  16433. arakawa.tokyo.jp
  16434. bunkyo.tokyo.jp
  16435. chiyoda.tokyo.jp
  16436. chofu.tokyo.jp
  16437. chuo.tokyo.jp
  16438. edogawa.tokyo.jp
  16439. fuchu.tokyo.jp
  16440. fussa.tokyo.jp
  16441. hachijo.tokyo.jp
  16442. hachioji.tokyo.jp
  16443. hamura.tokyo.jp
  16444. higashikurume.tokyo.jp
  16445. higashimurayama.tokyo.jp
  16446. higashiyamato.tokyo.jp
  16447. hino.tokyo.jp
  16448. hinode.tokyo.jp
  16449. hinohara.tokyo.jp
  16450. inagi.tokyo.jp
  16451. itabashi.tokyo.jp
  16452. katsushika.tokyo.jp
  16453. kita.tokyo.jp
  16454. kiyose.tokyo.jp
  16455. kodaira.tokyo.jp
  16456. koganei.tokyo.jp
  16457. kokubunji.tokyo.jp
  16458. komae.tokyo.jp
  16459. koto.tokyo.jp
  16460. kouzushima.tokyo.jp
  16461. kunitachi.tokyo.jp
  16462. machida.tokyo.jp
  16463. meguro.tokyo.jp
  16464. minato.tokyo.jp
  16465. mitaka.tokyo.jp
  16466. mizuho.tokyo.jp
  16467. musashimurayama.tokyo.jp
  16468. musashino.tokyo.jp
  16469. nakano.tokyo.jp
  16470. nerima.tokyo.jp
  16471. ogasawara.tokyo.jp
  16472. okutama.tokyo.jp
  16473. ome.tokyo.jp
  16474. oshima.tokyo.jp
  16475. ota.tokyo.jp
  16476. setagaya.tokyo.jp
  16477. shibuya.tokyo.jp
  16478. shinagawa.tokyo.jp
  16479. shinjuku.tokyo.jp
  16480. suginami.tokyo.jp
  16481. sumida.tokyo.jp
  16482. tachikawa.tokyo.jp
  16483. taito.tokyo.jp
  16484. tama.tokyo.jp
  16485. toshima.tokyo.jp
  16486. chizu.tottori.jp
  16487. hino.tottori.jp
  16488. kawahara.tottori.jp
  16489. koge.tottori.jp
  16490. kotoura.tottori.jp
  16491. misasa.tottori.jp
  16492. nanbu.tottori.jp
  16493. nichinan.tottori.jp
  16494. sakaiminato.tottori.jp
  16495. tottori.tottori.jp
  16496. wakasa.tottori.jp
  16497. yazu.tottori.jp
  16498. yonago.tottori.jp
  16499. asahi.toyama.jp
  16500. fuchu.toyama.jp
  16501. fukumitsu.toyama.jp
  16502. funahashi.toyama.jp
  16503. himi.toyama.jp
  16504. imizu.toyama.jp
  16505. inami.toyama.jp
  16506. johana.toyama.jp
  16507. kamiichi.toyama.jp
  16508. kurobe.toyama.jp
  16509. nakaniikawa.toyama.jp
  16510. namerikawa.toyama.jp
  16511. nanto.toyama.jp
  16512. nyuzen.toyama.jp
  16513. oyabe.toyama.jp
  16514. taira.toyama.jp
  16515. takaoka.toyama.jp
  16516. tateyama.toyama.jp
  16517. toga.toyama.jp
  16518. tonami.toyama.jp
  16519. toyama.toyama.jp
  16520. unazuki.toyama.jp
  16521. uozu.toyama.jp
  16522. yamada.toyama.jp
  16523. arida.wakayama.jp
  16524. aridagawa.wakayama.jp
  16525. gobo.wakayama.jp
  16526. hashimoto.wakayama.jp
  16527. hidaka.wakayama.jp
  16528. hirogawa.wakayama.jp
  16529. inami.wakayama.jp
  16530. iwade.wakayama.jp
  16531. kainan.wakayama.jp
  16532. kamitonda.wakayama.jp
  16533. katsuragi.wakayama.jp
  16534. kimino.wakayama.jp
  16535. kinokawa.wakayama.jp
  16536. kitayama.wakayama.jp
  16537. koya.wakayama.jp
  16538. koza.wakayama.jp
  16539. kozagawa.wakayama.jp
  16540. kudoyama.wakayama.jp
  16541. kushimoto.wakayama.jp
  16542. mihama.wakayama.jp
  16543. misato.wakayama.jp
  16544. nachikatsuura.wakayama.jp
  16545. shingu.wakayama.jp
  16546. shirahama.wakayama.jp
  16547. taiji.wakayama.jp
  16548. tanabe.wakayama.jp
  16549. wakayama.wakayama.jp
  16550. yuasa.wakayama.jp
  16551. yura.wakayama.jp
  16552. asahi.yamagata.jp
  16553. funagata.yamagata.jp
  16554. higashine.yamagata.jp
  16555. iide.yamagata.jp
  16556. kahoku.yamagata.jp
  16557. kaminoyama.yamagata.jp
  16558. kaneyama.yamagata.jp
  16559. kawanishi.yamagata.jp
  16560. mamurogawa.yamagata.jp
  16561. mikawa.yamagata.jp
  16562. murayama.yamagata.jp
  16563. nagai.yamagata.jp
  16564. nakayama.yamagata.jp
  16565. nanyo.yamagata.jp
  16566. nishikawa.yamagata.jp
  16567. obanazawa.yamagata.jp
  16568. oe.yamagata.jp
  16569. oguni.yamagata.jp
  16570. ohkura.yamagata.jp
  16571. oishida.yamagata.jp
  16572. sagae.yamagata.jp
  16573. sakata.yamagata.jp
  16574. sakegawa.yamagata.jp
  16575. shinjo.yamagata.jp
  16576. shirataka.yamagata.jp
  16577. shonai.yamagata.jp
  16578. takahata.yamagata.jp
  16579. tendo.yamagata.jp
  16580. tozawa.yamagata.jp
  16581. tsuruoka.yamagata.jp
  16582. yamagata.yamagata.jp
  16583. yamanobe.yamagata.jp
  16584. yonezawa.yamagata.jp
  16585. yuza.yamagata.jp
  16586. abu.yamaguchi.jp
  16587. hagi.yamaguchi.jp
  16588. hikari.yamaguchi.jp
  16589. hofu.yamaguchi.jp
  16590. iwakuni.yamaguchi.jp
  16591. kudamatsu.yamaguchi.jp
  16592. mitou.yamaguchi.jp
  16593. nagato.yamaguchi.jp
  16594. oshima.yamaguchi.jp
  16595. shimonoseki.yamaguchi.jp
  16596. shunan.yamaguchi.jp
  16597. tabuse.yamaguchi.jp
  16598. tokuyama.yamaguchi.jp
  16599. toyota.yamaguchi.jp
  16600. ube.yamaguchi.jp
  16601. yuu.yamaguchi.jp
  16602. chuo.yamanashi.jp
  16603. doshi.yamanashi.jp
  16604. fuefuki.yamanashi.jp
  16605. fujikawa.yamanashi.jp
  16606. fujikawaguchiko.yamanashi.jp
  16607. fujiyoshida.yamanashi.jp
  16608. hayakawa.yamanashi.jp
  16609. hokuto.yamanashi.jp
  16610. ichikawamisato.yamanashi.jp
  16611. kai.yamanashi.jp
  16612. kofu.yamanashi.jp
  16613. koshu.yamanashi.jp
  16614. kosuge.yamanashi.jp
  16615. minami-alps.yamanashi.jp
  16616. minobu.yamanashi.jp
  16617. nakamichi.yamanashi.jp
  16618. nanbu.yamanashi.jp
  16619. narusawa.yamanashi.jp
  16620. nirasaki.yamanashi.jp
  16621. nishikatsura.yamanashi.jp
  16622. oshino.yamanashi.jp
  16623. otsuki.yamanashi.jp
  16624. showa.yamanashi.jp
  16625. tabayama.yamanashi.jp
  16626. tsuru.yamanashi.jp
  16627. uenohara.yamanashi.jp
  16628. yamanakako.yamanashi.jp
  16629. yamanashi.yamanashi.jp
  16630. // ke : http://www.kenic.or.ke/index.php/en/ke-domains/ke-domains
  16631. ke
  16632. ac.ke
  16633. co.ke
  16634. go.ke
  16635. info.ke
  16636. me.ke
  16637. mobi.ke
  16638. ne.ke
  16639. or.ke
  16640. sc.ke
  16641. // kg : http://www.domain.kg/dmn_n.html
  16642. kg
  16643. org.kg
  16644. net.kg
  16645. com.kg
  16646. edu.kg
  16647. gov.kg
  16648. mil.kg
  16649. // kh : http://www.mptc.gov.kh/dns_registration.htm
  16650. *.kh
  16651. // ki : http://www.ki/dns/index.html
  16652. ki
  16653. edu.ki
  16654. biz.ki
  16655. net.ki
  16656. org.ki
  16657. gov.ki
  16658. info.ki
  16659. com.ki
  16660. // km : https://en.wikipedia.org/wiki/.km
  16661. // http://www.domaine.km/documents/charte.doc
  16662. km
  16663. org.km
  16664. nom.km
  16665. gov.km
  16666. prd.km
  16667. tm.km
  16668. edu.km
  16669. mil.km
  16670. ass.km
  16671. com.km
  16672. // These are only mentioned as proposed suggestions at domaine.km, but
  16673. // https://en.wikipedia.org/wiki/.km says they're available for registration:
  16674. coop.km
  16675. asso.km
  16676. presse.km
  16677. medecin.km
  16678. notaires.km
  16679. pharmaciens.km
  16680. veterinaire.km
  16681. gouv.km
  16682. // kn : https://en.wikipedia.org/wiki/.kn
  16683. // http://www.dot.kn/domainRules.html
  16684. kn
  16685. net.kn
  16686. org.kn
  16687. edu.kn
  16688. gov.kn
  16689. // kp : http://www.kcce.kp/en_index.php
  16690. kp
  16691. com.kp
  16692. edu.kp
  16693. gov.kp
  16694. org.kp
  16695. rep.kp
  16696. tra.kp
  16697. // kr : https://en.wikipedia.org/wiki/.kr
  16698. // see also: http://domain.nida.or.kr/eng/registration.jsp
  16699. kr
  16700. ac.kr
  16701. co.kr
  16702. es.kr
  16703. go.kr
  16704. hs.kr
  16705. kg.kr
  16706. mil.kr
  16707. ms.kr
  16708. ne.kr
  16709. or.kr
  16710. pe.kr
  16711. re.kr
  16712. sc.kr
  16713. // kr geographical names
  16714. busan.kr
  16715. chungbuk.kr
  16716. chungnam.kr
  16717. daegu.kr
  16718. daejeon.kr
  16719. gangwon.kr
  16720. gwangju.kr
  16721. gyeongbuk.kr
  16722. gyeonggi.kr
  16723. gyeongnam.kr
  16724. incheon.kr
  16725. jeju.kr
  16726. jeonbuk.kr
  16727. jeonnam.kr
  16728. seoul.kr
  16729. ulsan.kr
  16730. // kw : https://www.nic.kw/policies/
  16731. // Confirmed by registry <nic.tech@citra.gov.kw>
  16732. kw
  16733. com.kw
  16734. edu.kw
  16735. emb.kw
  16736. gov.kw
  16737. ind.kw
  16738. net.kw
  16739. org.kw
  16740. // ky : http://www.icta.ky/da_ky_reg_dom.php
  16741. // Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17
  16742. ky
  16743. com.ky
  16744. edu.ky
  16745. net.ky
  16746. org.ky
  16747. // kz : https://en.wikipedia.org/wiki/.kz
  16748. // see also: http://www.nic.kz/rules/index.jsp
  16749. kz
  16750. org.kz
  16751. edu.kz
  16752. net.kz
  16753. gov.kz
  16754. mil.kz
  16755. com.kz
  16756. // la : https://en.wikipedia.org/wiki/.la
  16757. // Submitted by registry <gavin.brown@nic.la>
  16758. la
  16759. int.la
  16760. net.la
  16761. info.la
  16762. edu.la
  16763. gov.la
  16764. per.la
  16765. com.la
  16766. org.la
  16767. // lb : https://en.wikipedia.org/wiki/.lb
  16768. // Submitted by registry <randy@psg.com>
  16769. lb
  16770. com.lb
  16771. edu.lb
  16772. gov.lb
  16773. net.lb
  16774. org.lb
  16775. // lc : https://en.wikipedia.org/wiki/.lc
  16776. // see also: http://www.nic.lc/rules.htm
  16777. lc
  16778. com.lc
  16779. net.lc
  16780. co.lc
  16781. org.lc
  16782. edu.lc
  16783. gov.lc
  16784. // li : https://en.wikipedia.org/wiki/.li
  16785. li
  16786. // lk : https://www.nic.lk/index.php/domain-registration/lk-domain-naming-structure
  16787. lk
  16788. gov.lk
  16789. sch.lk
  16790. net.lk
  16791. int.lk
  16792. com.lk
  16793. org.lk
  16794. edu.lk
  16795. ngo.lk
  16796. soc.lk
  16797. web.lk
  16798. ltd.lk
  16799. assn.lk
  16800. grp.lk
  16801. hotel.lk
  16802. ac.lk
  16803. // lr : http://psg.com/dns/lr/lr.txt
  16804. // Submitted by registry <randy@psg.com>
  16805. lr
  16806. com.lr
  16807. edu.lr
  16808. gov.lr
  16809. org.lr
  16810. net.lr
  16811. // ls : http://www.nic.ls/
  16812. // Confirmed by registry <lsadmin@nic.ls>
  16813. ls
  16814. ac.ls
  16815. biz.ls
  16816. co.ls
  16817. edu.ls
  16818. gov.ls
  16819. info.ls
  16820. net.ls
  16821. org.ls
  16822. sc.ls
  16823. // lt : https://en.wikipedia.org/wiki/.lt
  16824. lt
  16825. // gov.lt : http://www.gov.lt/index_en.php
  16826. gov.lt
  16827. // lu : http://www.dns.lu/en/
  16828. lu
  16829. // lv : http://www.nic.lv/DNS/En/generic.php
  16830. lv
  16831. com.lv
  16832. edu.lv
  16833. gov.lv
  16834. org.lv
  16835. mil.lv
  16836. id.lv
  16837. net.lv
  16838. asn.lv
  16839. conf.lv
  16840. // ly : http://www.nic.ly/regulations.php
  16841. ly
  16842. com.ly
  16843. net.ly
  16844. gov.ly
  16845. plc.ly
  16846. edu.ly
  16847. sch.ly
  16848. med.ly
  16849. org.ly
  16850. id.ly
  16851. // ma : https://en.wikipedia.org/wiki/.ma
  16852. // http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
  16853. ma
  16854. co.ma
  16855. net.ma
  16856. gov.ma
  16857. org.ma
  16858. ac.ma
  16859. press.ma
  16860. // mc : http://www.nic.mc/
  16861. mc
  16862. tm.mc
  16863. asso.mc
  16864. // md : https://en.wikipedia.org/wiki/.md
  16865. md
  16866. // me : https://en.wikipedia.org/wiki/.me
  16867. me
  16868. co.me
  16869. net.me
  16870. org.me
  16871. edu.me
  16872. ac.me
  16873. gov.me
  16874. its.me
  16875. priv.me
  16876. // mg : http://nic.mg/nicmg/?page_id=39
  16877. mg
  16878. org.mg
  16879. nom.mg
  16880. gov.mg
  16881. prd.mg
  16882. tm.mg
  16883. edu.mg
  16884. mil.mg
  16885. com.mg
  16886. co.mg
  16887. // mh : https://en.wikipedia.org/wiki/.mh
  16888. mh
  16889. // mil : https://en.wikipedia.org/wiki/.mil
  16890. mil
  16891. // mk : https://en.wikipedia.org/wiki/.mk
  16892. // see also: http://dns.marnet.net.mk/postapka.php
  16893. mk
  16894. com.mk
  16895. org.mk
  16896. net.mk
  16897. edu.mk
  16898. gov.mk
  16899. inf.mk
  16900. name.mk
  16901. // ml : http://www.gobin.info/domainname/ml-template.doc
  16902. // see also: https://en.wikipedia.org/wiki/.ml
  16903. ml
  16904. com.ml
  16905. edu.ml
  16906. gouv.ml
  16907. gov.ml
  16908. net.ml
  16909. org.ml
  16910. presse.ml
  16911. // mm : https://en.wikipedia.org/wiki/.mm
  16912. *.mm
  16913. // mn : https://en.wikipedia.org/wiki/.mn
  16914. mn
  16915. gov.mn
  16916. edu.mn
  16917. org.mn
  16918. // mo : http://www.monic.net.mo/
  16919. mo
  16920. com.mo
  16921. net.mo
  16922. org.mo
  16923. edu.mo
  16924. gov.mo
  16925. // mobi : https://en.wikipedia.org/wiki/.mobi
  16926. mobi
  16927. // mp : http://www.dot.mp/
  16928. // Confirmed by registry <dcamacho@saipan.com> 2008-06-17
  16929. mp
  16930. // mq : https://en.wikipedia.org/wiki/.mq
  16931. mq
  16932. // mr : https://en.wikipedia.org/wiki/.mr
  16933. mr
  16934. gov.mr
  16935. // ms : http://www.nic.ms/pdf/MS_Domain_Name_Rules.pdf
  16936. ms
  16937. com.ms
  16938. edu.ms
  16939. gov.ms
  16940. net.ms
  16941. org.ms
  16942. // mt : https://www.nic.org.mt/go/policy
  16943. // Submitted by registry <help@nic.org.mt>
  16944. mt
  16945. com.mt
  16946. edu.mt
  16947. net.mt
  16948. org.mt
  16949. // mu : https://en.wikipedia.org/wiki/.mu
  16950. mu
  16951. com.mu
  16952. net.mu
  16953. org.mu
  16954. gov.mu
  16955. ac.mu
  16956. co.mu
  16957. or.mu
  16958. // museum : https://welcome.museum/wp-content/uploads/2018/05/20180525-Registration-Policy-MUSEUM-EN_VF-2.pdf https://welcome.museum/buy-your-dot-museum-2/
  16959. museum
  16960. // mv : https://en.wikipedia.org/wiki/.mv
  16961. // "mv" included because, contra Wikipedia, google.mv exists.
  16962. mv
  16963. aero.mv
  16964. biz.mv
  16965. com.mv
  16966. coop.mv
  16967. edu.mv
  16968. gov.mv
  16969. info.mv
  16970. int.mv
  16971. mil.mv
  16972. museum.mv
  16973. name.mv
  16974. net.mv
  16975. org.mv
  16976. pro.mv
  16977. // mw : http://www.registrar.mw/
  16978. mw
  16979. ac.mw
  16980. biz.mw
  16981. co.mw
  16982. com.mw
  16983. coop.mw
  16984. edu.mw
  16985. gov.mw
  16986. int.mw
  16987. museum.mw
  16988. net.mw
  16989. org.mw
  16990. // mx : http://www.nic.mx/
  16991. // Submitted by registry <farias@nic.mx>
  16992. mx
  16993. com.mx
  16994. org.mx
  16995. gob.mx
  16996. edu.mx
  16997. net.mx
  16998. // my : http://www.mynic.my/
  16999. // Available strings: https://mynic.my/resources/domains/buying-a-domain/
  17000. my
  17001. biz.my
  17002. com.my
  17003. edu.my
  17004. gov.my
  17005. mil.my
  17006. name.my
  17007. net.my
  17008. org.my
  17009. // mz : http://www.uem.mz/
  17010. // Submitted by registry <antonio@uem.mz>
  17011. mz
  17012. ac.mz
  17013. adv.mz
  17014. co.mz
  17015. edu.mz
  17016. gov.mz
  17017. mil.mz
  17018. net.mz
  17019. org.mz
  17020. // na : http://www.na-nic.com.na/
  17021. // http://www.info.na/domain/
  17022. na
  17023. info.na
  17024. pro.na
  17025. name.na
  17026. school.na
  17027. or.na
  17028. dr.na
  17029. us.na
  17030. mx.na
  17031. ca.na
  17032. in.na
  17033. cc.na
  17034. tv.na
  17035. ws.na
  17036. mobi.na
  17037. co.na
  17038. com.na
  17039. org.na
  17040. // name : has 2nd-level tlds, but there's no list of them
  17041. name
  17042. // nc : http://www.cctld.nc/
  17043. nc
  17044. asso.nc
  17045. nom.nc
  17046. // ne : https://en.wikipedia.org/wiki/.ne
  17047. ne
  17048. // net : https://en.wikipedia.org/wiki/.net
  17049. net
  17050. // nf : https://en.wikipedia.org/wiki/.nf
  17051. nf
  17052. com.nf
  17053. net.nf
  17054. per.nf
  17055. rec.nf
  17056. web.nf
  17057. arts.nf
  17058. firm.nf
  17059. info.nf
  17060. other.nf
  17061. store.nf
  17062. // ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds
  17063. ng
  17064. com.ng
  17065. edu.ng
  17066. gov.ng
  17067. i.ng
  17068. mil.ng
  17069. mobi.ng
  17070. name.ng
  17071. net.ng
  17072. org.ng
  17073. sch.ng
  17074. // ni : http://www.nic.ni/
  17075. ni
  17076. ac.ni
  17077. biz.ni
  17078. co.ni
  17079. com.ni
  17080. edu.ni
  17081. gob.ni
  17082. in.ni
  17083. info.ni
  17084. int.ni
  17085. mil.ni
  17086. net.ni
  17087. nom.ni
  17088. org.ni
  17089. web.ni
  17090. // nl : https://en.wikipedia.org/wiki/.nl
  17091. // https://www.sidn.nl/
  17092. // ccTLD for the Netherlands
  17093. nl
  17094. // no : https://www.norid.no/en/om-domenenavn/regelverk-for-no/
  17095. // Norid geographical second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-b/
  17096. // Norid category second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-c/
  17097. // Norid category second-level domains managed by parties other than Norid : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-d/
  17098. // RSS feed: https://teknisk.norid.no/en/feed/
  17099. no
  17100. // Norid category second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-c/
  17101. fhs.no
  17102. vgs.no
  17103. fylkesbibl.no
  17104. folkebibl.no
  17105. museum.no
  17106. idrett.no
  17107. priv.no
  17108. // Norid category second-level domains managed by parties other than Norid : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-d/
  17109. mil.no
  17110. stat.no
  17111. dep.no
  17112. kommune.no
  17113. herad.no
  17114. // Norid geographical second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-b/
  17115. // counties
  17116. aa.no
  17117. ah.no
  17118. bu.no
  17119. fm.no
  17120. hl.no
  17121. hm.no
  17122. jan-mayen.no
  17123. mr.no
  17124. nl.no
  17125. nt.no
  17126. of.no
  17127. ol.no
  17128. oslo.no
  17129. rl.no
  17130. sf.no
  17131. st.no
  17132. svalbard.no
  17133. tm.no
  17134. tr.no
  17135. va.no
  17136. vf.no
  17137. // primary and lower secondary schools per county
  17138. gs.aa.no
  17139. gs.ah.no
  17140. gs.bu.no
  17141. gs.fm.no
  17142. gs.hl.no
  17143. gs.hm.no
  17144. gs.jan-mayen.no
  17145. gs.mr.no
  17146. gs.nl.no
  17147. gs.nt.no
  17148. gs.of.no
  17149. gs.ol.no
  17150. gs.oslo.no
  17151. gs.rl.no
  17152. gs.sf.no
  17153. gs.st.no
  17154. gs.svalbard.no
  17155. gs.tm.no
  17156. gs.tr.no
  17157. gs.va.no
  17158. gs.vf.no
  17159. // cities
  17160. akrehamn.no
  17161. åkrehamn.no
  17162. algard.no
  17163. ålgård.no
  17164. arna.no
  17165. brumunddal.no
  17166. bryne.no
  17167. bronnoysund.no
  17168. brønnøysund.no
  17169. drobak.no
  17170. drøbak.no
  17171. egersund.no
  17172. fetsund.no
  17173. floro.no
  17174. florø.no
  17175. fredrikstad.no
  17176. hokksund.no
  17177. honefoss.no
  17178. hønefoss.no
  17179. jessheim.no
  17180. jorpeland.no
  17181. jørpeland.no
  17182. kirkenes.no
  17183. kopervik.no
  17184. krokstadelva.no
  17185. langevag.no
  17186. langevåg.no
  17187. leirvik.no
  17188. mjondalen.no
  17189. mjøndalen.no
  17190. mo-i-rana.no
  17191. mosjoen.no
  17192. mosjøen.no
  17193. nesoddtangen.no
  17194. orkanger.no
  17195. osoyro.no
  17196. osøyro.no
  17197. raholt.no
  17198. råholt.no
  17199. sandnessjoen.no
  17200. sandnessjøen.no
  17201. skedsmokorset.no
  17202. slattum.no
  17203. spjelkavik.no
  17204. stathelle.no
  17205. stavern.no
  17206. stjordalshalsen.no
  17207. stjørdalshalsen.no
  17208. tananger.no
  17209. tranby.no
  17210. vossevangen.no
  17211. // communities
  17212. afjord.no
  17213. åfjord.no
  17214. agdenes.no
  17215. al.no
  17216. ål.no
  17217. alesund.no
  17218. ålesund.no
  17219. alstahaug.no
  17220. alta.no
  17221. áltá.no
  17222. alaheadju.no
  17223. álaheadju.no
  17224. alvdal.no
  17225. amli.no
  17226. åmli.no
  17227. amot.no
  17228. åmot.no
  17229. andebu.no
  17230. andoy.no
  17231. andøy.no
  17232. andasuolo.no
  17233. ardal.no
  17234. årdal.no
  17235. aremark.no
  17236. arendal.no
  17237. ås.no
  17238. aseral.no
  17239. åseral.no
  17240. asker.no
  17241. askim.no
  17242. askvoll.no
  17243. askoy.no
  17244. askøy.no
  17245. asnes.no
  17246. åsnes.no
  17247. audnedaln.no
  17248. aukra.no
  17249. aure.no
  17250. aurland.no
  17251. aurskog-holand.no
  17252. aurskog-høland.no
  17253. austevoll.no
  17254. austrheim.no
  17255. averoy.no
  17256. averøy.no
  17257. balestrand.no
  17258. ballangen.no
  17259. balat.no
  17260. bálát.no
  17261. balsfjord.no
  17262. bahccavuotna.no
  17263. báhccavuotna.no
  17264. bamble.no
  17265. bardu.no
  17266. beardu.no
  17267. beiarn.no
  17268. bajddar.no
  17269. bájddar.no
  17270. baidar.no
  17271. báidár.no
  17272. berg.no
  17273. bergen.no
  17274. berlevag.no
  17275. berlevåg.no
  17276. bearalvahki.no
  17277. bearalváhki.no
  17278. bindal.no
  17279. birkenes.no
  17280. bjarkoy.no
  17281. bjarkøy.no
  17282. bjerkreim.no
  17283. bjugn.no
  17284. bodo.no
  17285. bodø.no
  17286. badaddja.no
  17287. bådåddjå.no
  17288. budejju.no
  17289. bokn.no
  17290. bremanger.no
  17291. bronnoy.no
  17292. brønnøy.no
  17293. bygland.no
  17294. bykle.no
  17295. barum.no
  17296. bærum.no
  17297. bo.telemark.no
  17298. bø.telemark.no
  17299. bo.nordland.no
  17300. bø.nordland.no
  17301. bievat.no
  17302. bievát.no
  17303. bomlo.no
  17304. bømlo.no
  17305. batsfjord.no
  17306. båtsfjord.no
  17307. bahcavuotna.no
  17308. báhcavuotna.no
  17309. dovre.no
  17310. drammen.no
  17311. drangedal.no
  17312. dyroy.no
  17313. dyrøy.no
  17314. donna.no
  17315. dønna.no
  17316. eid.no
  17317. eidfjord.no
  17318. eidsberg.no
  17319. eidskog.no
  17320. eidsvoll.no
  17321. eigersund.no
  17322. elverum.no
  17323. enebakk.no
  17324. engerdal.no
  17325. etne.no
  17326. etnedal.no
  17327. evenes.no
  17328. evenassi.no
  17329. evenášši.no
  17330. evje-og-hornnes.no
  17331. farsund.no
  17332. fauske.no
  17333. fuossko.no
  17334. fuoisku.no
  17335. fedje.no
  17336. fet.no
  17337. finnoy.no
  17338. finnøy.no
  17339. fitjar.no
  17340. fjaler.no
  17341. fjell.no
  17342. flakstad.no
  17343. flatanger.no
  17344. flekkefjord.no
  17345. flesberg.no
  17346. flora.no
  17347. fla.no
  17348. flå.no
  17349. folldal.no
  17350. forsand.no
  17351. fosnes.no
  17352. frei.no
  17353. frogn.no
  17354. froland.no
  17355. frosta.no
  17356. frana.no
  17357. fræna.no
  17358. froya.no
  17359. frøya.no
  17360. fusa.no
  17361. fyresdal.no
  17362. forde.no
  17363. førde.no
  17364. gamvik.no
  17365. gangaviika.no
  17366. gáŋgaviika.no
  17367. gaular.no
  17368. gausdal.no
  17369. gildeskal.no
  17370. gildeskål.no
  17371. giske.no
  17372. gjemnes.no
  17373. gjerdrum.no
  17374. gjerstad.no
  17375. gjesdal.no
  17376. gjovik.no
  17377. gjøvik.no
  17378. gloppen.no
  17379. gol.no
  17380. gran.no
  17381. grane.no
  17382. granvin.no
  17383. gratangen.no
  17384. grimstad.no
  17385. grong.no
  17386. kraanghke.no
  17387. kråanghke.no
  17388. grue.no
  17389. gulen.no
  17390. hadsel.no
  17391. halden.no
  17392. halsa.no
  17393. hamar.no
  17394. hamaroy.no
  17395. habmer.no
  17396. hábmer.no
  17397. hapmir.no
  17398. hápmir.no
  17399. hammerfest.no
  17400. hammarfeasta.no
  17401. hámmárfeasta.no
  17402. haram.no
  17403. hareid.no
  17404. harstad.no
  17405. hasvik.no
  17406. aknoluokta.no
  17407. ákŋoluokta.no
  17408. hattfjelldal.no
  17409. aarborte.no
  17410. haugesund.no
  17411. hemne.no
  17412. hemnes.no
  17413. hemsedal.no
  17414. heroy.more-og-romsdal.no
  17415. herøy.møre-og-romsdal.no
  17416. heroy.nordland.no
  17417. herøy.nordland.no
  17418. hitra.no
  17419. hjartdal.no
  17420. hjelmeland.no
  17421. hobol.no
  17422. hobøl.no
  17423. hof.no
  17424. hol.no
  17425. hole.no
  17426. holmestrand.no
  17427. holtalen.no
  17428. holtålen.no
  17429. hornindal.no
  17430. horten.no
  17431. hurdal.no
  17432. hurum.no
  17433. hvaler.no
  17434. hyllestad.no
  17435. hagebostad.no
  17436. hægebostad.no
  17437. hoyanger.no
  17438. høyanger.no
  17439. hoylandet.no
  17440. høylandet.no
  17441. ha.no
  17442. hå.no
  17443. ibestad.no
  17444. inderoy.no
  17445. inderøy.no
  17446. iveland.no
  17447. jevnaker.no
  17448. jondal.no
  17449. jolster.no
  17450. jølster.no
  17451. karasjok.no
  17452. karasjohka.no
  17453. kárášjohka.no
  17454. karlsoy.no
  17455. galsa.no
  17456. gálsá.no
  17457. karmoy.no
  17458. karmøy.no
  17459. kautokeino.no
  17460. guovdageaidnu.no
  17461. klepp.no
  17462. klabu.no
  17463. klæbu.no
  17464. kongsberg.no
  17465. kongsvinger.no
  17466. kragero.no
  17467. kragerø.no
  17468. kristiansand.no
  17469. kristiansund.no
  17470. krodsherad.no
  17471. krødsherad.no
  17472. kvalsund.no
  17473. rahkkeravju.no
  17474. ráhkkerávju.no
  17475. kvam.no
  17476. kvinesdal.no
  17477. kvinnherad.no
  17478. kviteseid.no
  17479. kvitsoy.no
  17480. kvitsøy.no
  17481. kvafjord.no
  17482. kvæfjord.no
  17483. giehtavuoatna.no
  17484. kvanangen.no
  17485. kvænangen.no
  17486. navuotna.no
  17487. návuotna.no
  17488. kafjord.no
  17489. kåfjord.no
  17490. gaivuotna.no
  17491. gáivuotna.no
  17492. larvik.no
  17493. lavangen.no
  17494. lavagis.no
  17495. loabat.no
  17496. loabát.no
  17497. lebesby.no
  17498. davvesiida.no
  17499. leikanger.no
  17500. leirfjord.no
  17501. leka.no
  17502. leksvik.no
  17503. lenvik.no
  17504. leangaviika.no
  17505. leaŋgaviika.no
  17506. lesja.no
  17507. levanger.no
  17508. lier.no
  17509. lierne.no
  17510. lillehammer.no
  17511. lillesand.no
  17512. lindesnes.no
  17513. lindas.no
  17514. lindås.no
  17515. lom.no
  17516. loppa.no
  17517. lahppi.no
  17518. láhppi.no
  17519. lund.no
  17520. lunner.no
  17521. luroy.no
  17522. lurøy.no
  17523. luster.no
  17524. lyngdal.no
  17525. lyngen.no
  17526. ivgu.no
  17527. lardal.no
  17528. lerdal.no
  17529. lærdal.no
  17530. lodingen.no
  17531. lødingen.no
  17532. lorenskog.no
  17533. lørenskog.no
  17534. loten.no
  17535. løten.no
  17536. malvik.no
  17537. masoy.no
  17538. måsøy.no
  17539. muosat.no
  17540. muosát.no
  17541. mandal.no
  17542. marker.no
  17543. marnardal.no
  17544. masfjorden.no
  17545. meland.no
  17546. meldal.no
  17547. melhus.no
  17548. meloy.no
  17549. meløy.no
  17550. meraker.no
  17551. meråker.no
  17552. moareke.no
  17553. moåreke.no
  17554. midsund.no
  17555. midtre-gauldal.no
  17556. modalen.no
  17557. modum.no
  17558. molde.no
  17559. moskenes.no
  17560. moss.no
  17561. mosvik.no
  17562. malselv.no
  17563. målselv.no
  17564. malatvuopmi.no
  17565. málatvuopmi.no
  17566. namdalseid.no
  17567. aejrie.no
  17568. namsos.no
  17569. namsskogan.no
  17570. naamesjevuemie.no
  17571. nååmesjevuemie.no
  17572. laakesvuemie.no
  17573. nannestad.no
  17574. narvik.no
  17575. narviika.no
  17576. naustdal.no
  17577. nedre-eiker.no
  17578. nes.akershus.no
  17579. nes.buskerud.no
  17580. nesna.no
  17581. nesodden.no
  17582. nesseby.no
  17583. unjarga.no
  17584. unjárga.no
  17585. nesset.no
  17586. nissedal.no
  17587. nittedal.no
  17588. nord-aurdal.no
  17589. nord-fron.no
  17590. nord-odal.no
  17591. norddal.no
  17592. nordkapp.no
  17593. davvenjarga.no
  17594. davvenjárga.no
  17595. nordre-land.no
  17596. nordreisa.no
  17597. raisa.no
  17598. ráisa.no
  17599. nore-og-uvdal.no
  17600. notodden.no
  17601. naroy.no
  17602. nærøy.no
  17603. notteroy.no
  17604. nøtterøy.no
  17605. odda.no
  17606. oksnes.no
  17607. øksnes.no
  17608. oppdal.no
  17609. oppegard.no
  17610. oppegård.no
  17611. orkdal.no
  17612. orland.no
  17613. ørland.no
  17614. orskog.no
  17615. ørskog.no
  17616. orsta.no
  17617. ørsta.no
  17618. os.hedmark.no
  17619. os.hordaland.no
  17620. osen.no
  17621. osteroy.no
  17622. osterøy.no
  17623. ostre-toten.no
  17624. østre-toten.no
  17625. overhalla.no
  17626. ovre-eiker.no
  17627. øvre-eiker.no
  17628. oyer.no
  17629. øyer.no
  17630. oygarden.no
  17631. øygarden.no
  17632. oystre-slidre.no
  17633. øystre-slidre.no
  17634. porsanger.no
  17635. porsangu.no
  17636. porsáŋgu.no
  17637. porsgrunn.no
  17638. radoy.no
  17639. radøy.no
  17640. rakkestad.no
  17641. rana.no
  17642. ruovat.no
  17643. randaberg.no
  17644. rauma.no
  17645. rendalen.no
  17646. rennebu.no
  17647. rennesoy.no
  17648. rennesøy.no
  17649. rindal.no
  17650. ringebu.no
  17651. ringerike.no
  17652. ringsaker.no
  17653. rissa.no
  17654. risor.no
  17655. risør.no
  17656. roan.no
  17657. rollag.no
  17658. rygge.no
  17659. ralingen.no
  17660. rælingen.no
  17661. rodoy.no
  17662. rødøy.no
  17663. romskog.no
  17664. rømskog.no
  17665. roros.no
  17666. røros.no
  17667. rost.no
  17668. røst.no
  17669. royken.no
  17670. røyken.no
  17671. royrvik.no
  17672. røyrvik.no
  17673. rade.no
  17674. råde.no
  17675. salangen.no
  17676. siellak.no
  17677. saltdal.no
  17678. salat.no
  17679. sálát.no
  17680. sálat.no
  17681. samnanger.no
  17682. sande.more-og-romsdal.no
  17683. sande.møre-og-romsdal.no
  17684. sande.vestfold.no
  17685. sandefjord.no
  17686. sandnes.no
  17687. sandoy.no
  17688. sandøy.no
  17689. sarpsborg.no
  17690. sauda.no
  17691. sauherad.no
  17692. sel.no
  17693. selbu.no
  17694. selje.no
  17695. seljord.no
  17696. sigdal.no
  17697. siljan.no
  17698. sirdal.no
  17699. skaun.no
  17700. skedsmo.no
  17701. ski.no
  17702. skien.no
  17703. skiptvet.no
  17704. skjervoy.no
  17705. skjervøy.no
  17706. skierva.no
  17707. skiervá.no
  17708. skjak.no
  17709. skjåk.no
  17710. skodje.no
  17711. skanland.no
  17712. skånland.no
  17713. skanit.no
  17714. skánit.no
  17715. smola.no
  17716. smøla.no
  17717. snillfjord.no
  17718. snasa.no
  17719. snåsa.no
  17720. snoasa.no
  17721. snaase.no
  17722. snåase.no
  17723. sogndal.no
  17724. sokndal.no
  17725. sola.no
  17726. solund.no
  17727. songdalen.no
  17728. sortland.no
  17729. spydeberg.no
  17730. stange.no
  17731. stavanger.no
  17732. steigen.no
  17733. steinkjer.no
  17734. stjordal.no
  17735. stjørdal.no
  17736. stokke.no
  17737. stor-elvdal.no
  17738. stord.no
  17739. stordal.no
  17740. storfjord.no
  17741. omasvuotna.no
  17742. strand.no
  17743. stranda.no
  17744. stryn.no
  17745. sula.no
  17746. suldal.no
  17747. sund.no
  17748. sunndal.no
  17749. surnadal.no
  17750. sveio.no
  17751. svelvik.no
  17752. sykkylven.no
  17753. sogne.no
  17754. søgne.no
  17755. somna.no
  17756. sømna.no
  17757. sondre-land.no
  17758. søndre-land.no
  17759. sor-aurdal.no
  17760. sør-aurdal.no
  17761. sor-fron.no
  17762. sør-fron.no
  17763. sor-odal.no
  17764. sør-odal.no
  17765. sor-varanger.no
  17766. sør-varanger.no
  17767. matta-varjjat.no
  17768. mátta-várjjat.no
  17769. sorfold.no
  17770. sørfold.no
  17771. sorreisa.no
  17772. sørreisa.no
  17773. sorum.no
  17774. sørum.no
  17775. tana.no
  17776. deatnu.no
  17777. time.no
  17778. tingvoll.no
  17779. tinn.no
  17780. tjeldsund.no
  17781. dielddanuorri.no
  17782. tjome.no
  17783. tjøme.no
  17784. tokke.no
  17785. tolga.no
  17786. torsken.no
  17787. tranoy.no
  17788. tranøy.no
  17789. tromso.no
  17790. tromsø.no
  17791. tromsa.no
  17792. romsa.no
  17793. trondheim.no
  17794. troandin.no
  17795. trysil.no
  17796. trana.no
  17797. træna.no
  17798. trogstad.no
  17799. trøgstad.no
  17800. tvedestrand.no
  17801. tydal.no
  17802. tynset.no
  17803. tysfjord.no
  17804. divtasvuodna.no
  17805. divttasvuotna.no
  17806. tysnes.no
  17807. tysvar.no
  17808. tysvær.no
  17809. tonsberg.no
  17810. tønsberg.no
  17811. ullensaker.no
  17812. ullensvang.no
  17813. ulvik.no
  17814. utsira.no
  17815. vadso.no
  17816. vadsø.no
  17817. cahcesuolo.no
  17818. čáhcesuolo.no
  17819. vaksdal.no
  17820. valle.no
  17821. vang.no
  17822. vanylven.no
  17823. vardo.no
  17824. vardø.no
  17825. varggat.no
  17826. várggát.no
  17827. vefsn.no
  17828. vaapste.no
  17829. vega.no
  17830. vegarshei.no
  17831. vegårshei.no
  17832. vennesla.no
  17833. verdal.no
  17834. verran.no
  17835. vestby.no
  17836. vestnes.no
  17837. vestre-slidre.no
  17838. vestre-toten.no
  17839. vestvagoy.no
  17840. vestvågøy.no
  17841. vevelstad.no
  17842. vik.no
  17843. vikna.no
  17844. vindafjord.no
  17845. volda.no
  17846. voss.no
  17847. varoy.no
  17848. værøy.no
  17849. vagan.no
  17850. vågan.no
  17851. voagat.no
  17852. vagsoy.no
  17853. vågsøy.no
  17854. vaga.no
  17855. vågå.no
  17856. valer.ostfold.no
  17857. våler.østfold.no
  17858. valer.hedmark.no
  17859. våler.hedmark.no
  17860. // np : http://www.mos.com.np/register.html
  17861. *.np
  17862. // nr : http://cenpac.net.nr/dns/index.html
  17863. // Submitted by registry <technician@cenpac.net.nr>
  17864. nr
  17865. biz.nr
  17866. info.nr
  17867. gov.nr
  17868. edu.nr
  17869. org.nr
  17870. net.nr
  17871. com.nr
  17872. // nu : https://en.wikipedia.org/wiki/.nu
  17873. nu
  17874. // nz : https://en.wikipedia.org/wiki/.nz
  17875. // Submitted by registry <jay@nzrs.net.nz>
  17876. nz
  17877. ac.nz
  17878. co.nz
  17879. cri.nz
  17880. geek.nz
  17881. gen.nz
  17882. govt.nz
  17883. health.nz
  17884. iwi.nz
  17885. kiwi.nz
  17886. maori.nz
  17887. mil.nz
  17888. māori.nz
  17889. net.nz
  17890. org.nz
  17891. parliament.nz
  17892. school.nz
  17893. // om : https://en.wikipedia.org/wiki/.om
  17894. om
  17895. co.om
  17896. com.om
  17897. edu.om
  17898. gov.om
  17899. med.om
  17900. museum.om
  17901. net.om
  17902. org.om
  17903. pro.om
  17904. // onion : https://tools.ietf.org/html/rfc7686
  17905. onion
  17906. // org : https://en.wikipedia.org/wiki/.org
  17907. org
  17908. // pa : http://www.nic.pa/
  17909. // Some additional second level "domains" resolve directly as hostnames, such as
  17910. // pannet.pa, so we add a rule for "pa".
  17911. pa
  17912. ac.pa
  17913. gob.pa
  17914. com.pa
  17915. org.pa
  17916. sld.pa
  17917. edu.pa
  17918. net.pa
  17919. ing.pa
  17920. abo.pa
  17921. med.pa
  17922. nom.pa
  17923. // pe : https://www.nic.pe/InformeFinalComision.pdf
  17924. pe
  17925. edu.pe
  17926. gob.pe
  17927. nom.pe
  17928. mil.pe
  17929. org.pe
  17930. com.pe
  17931. net.pe
  17932. // pf : http://www.gobin.info/domainname/formulaire-pf.pdf
  17933. pf
  17934. com.pf
  17935. org.pf
  17936. edu.pf
  17937. // pg : https://en.wikipedia.org/wiki/.pg
  17938. *.pg
  17939. // ph : http://www.domains.ph/FAQ2.asp
  17940. // Submitted by registry <jed@email.com.ph>
  17941. ph
  17942. com.ph
  17943. net.ph
  17944. org.ph
  17945. gov.ph
  17946. edu.ph
  17947. ngo.ph
  17948. mil.ph
  17949. i.ph
  17950. // pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
  17951. pk
  17952. com.pk
  17953. net.pk
  17954. edu.pk
  17955. org.pk
  17956. fam.pk
  17957. biz.pk
  17958. web.pk
  17959. gov.pk
  17960. gob.pk
  17961. gok.pk
  17962. gon.pk
  17963. gop.pk
  17964. gos.pk
  17965. info.pk
  17966. // pl http://www.dns.pl/english/index.html
  17967. // Submitted by registry
  17968. pl
  17969. com.pl
  17970. net.pl
  17971. org.pl
  17972. // pl functional domains (http://www.dns.pl/english/index.html)
  17973. aid.pl
  17974. agro.pl
  17975. atm.pl
  17976. auto.pl
  17977. biz.pl
  17978. edu.pl
  17979. gmina.pl
  17980. gsm.pl
  17981. info.pl
  17982. mail.pl
  17983. miasta.pl
  17984. media.pl
  17985. mil.pl
  17986. nieruchomosci.pl
  17987. nom.pl
  17988. pc.pl
  17989. powiat.pl
  17990. priv.pl
  17991. realestate.pl
  17992. rel.pl
  17993. sex.pl
  17994. shop.pl
  17995. sklep.pl
  17996. sos.pl
  17997. szkola.pl
  17998. targi.pl
  17999. tm.pl
  18000. tourism.pl
  18001. travel.pl
  18002. turystyka.pl
  18003. // Government domains
  18004. gov.pl
  18005. ap.gov.pl
  18006. griw.gov.pl
  18007. ic.gov.pl
  18008. is.gov.pl
  18009. kmpsp.gov.pl
  18010. konsulat.gov.pl
  18011. kppsp.gov.pl
  18012. kwp.gov.pl
  18013. kwpsp.gov.pl
  18014. mup.gov.pl
  18015. mw.gov.pl
  18016. oia.gov.pl
  18017. oirm.gov.pl
  18018. oke.gov.pl
  18019. oow.gov.pl
  18020. oschr.gov.pl
  18021. oum.gov.pl
  18022. pa.gov.pl
  18023. pinb.gov.pl
  18024. piw.gov.pl
  18025. po.gov.pl
  18026. pr.gov.pl
  18027. psp.gov.pl
  18028. psse.gov.pl
  18029. pup.gov.pl
  18030. rzgw.gov.pl
  18031. sa.gov.pl
  18032. sdn.gov.pl
  18033. sko.gov.pl
  18034. so.gov.pl
  18035. sr.gov.pl
  18036. starostwo.gov.pl
  18037. ug.gov.pl
  18038. ugim.gov.pl
  18039. um.gov.pl
  18040. umig.gov.pl
  18041. upow.gov.pl
  18042. uppo.gov.pl
  18043. us.gov.pl
  18044. uw.gov.pl
  18045. uzs.gov.pl
  18046. wif.gov.pl
  18047. wiih.gov.pl
  18048. winb.gov.pl
  18049. wios.gov.pl
  18050. witd.gov.pl
  18051. wiw.gov.pl
  18052. wkz.gov.pl
  18053. wsa.gov.pl
  18054. wskr.gov.pl
  18055. wsse.gov.pl
  18056. wuoz.gov.pl
  18057. wzmiuw.gov.pl
  18058. zp.gov.pl
  18059. zpisdn.gov.pl
  18060. // pl regional domains (http://www.dns.pl/english/index.html)
  18061. augustow.pl
  18062. babia-gora.pl
  18063. bedzin.pl
  18064. beskidy.pl
  18065. bialowieza.pl
  18066. bialystok.pl
  18067. bielawa.pl
  18068. bieszczady.pl
  18069. boleslawiec.pl
  18070. bydgoszcz.pl
  18071. bytom.pl
  18072. cieszyn.pl
  18073. czeladz.pl
  18074. czest.pl
  18075. dlugoleka.pl
  18076. elblag.pl
  18077. elk.pl
  18078. glogow.pl
  18079. gniezno.pl
  18080. gorlice.pl
  18081. grajewo.pl
  18082. ilawa.pl
  18083. jaworzno.pl
  18084. jelenia-gora.pl
  18085. jgora.pl
  18086. kalisz.pl
  18087. kazimierz-dolny.pl
  18088. karpacz.pl
  18089. kartuzy.pl
  18090. kaszuby.pl
  18091. katowice.pl
  18092. kepno.pl
  18093. ketrzyn.pl
  18094. klodzko.pl
  18095. kobierzyce.pl
  18096. kolobrzeg.pl
  18097. konin.pl
  18098. konskowola.pl
  18099. kutno.pl
  18100. lapy.pl
  18101. lebork.pl
  18102. legnica.pl
  18103. lezajsk.pl
  18104. limanowa.pl
  18105. lomza.pl
  18106. lowicz.pl
  18107. lubin.pl
  18108. lukow.pl
  18109. malbork.pl
  18110. malopolska.pl
  18111. mazowsze.pl
  18112. mazury.pl
  18113. mielec.pl
  18114. mielno.pl
  18115. mragowo.pl
  18116. naklo.pl
  18117. nowaruda.pl
  18118. nysa.pl
  18119. olawa.pl
  18120. olecko.pl
  18121. olkusz.pl
  18122. olsztyn.pl
  18123. opoczno.pl
  18124. opole.pl
  18125. ostroda.pl
  18126. ostroleka.pl
  18127. ostrowiec.pl
  18128. ostrowwlkp.pl
  18129. pila.pl
  18130. pisz.pl
  18131. podhale.pl
  18132. podlasie.pl
  18133. polkowice.pl
  18134. pomorze.pl
  18135. pomorskie.pl
  18136. prochowice.pl
  18137. pruszkow.pl
  18138. przeworsk.pl
  18139. pulawy.pl
  18140. radom.pl
  18141. rawa-maz.pl
  18142. rybnik.pl
  18143. rzeszow.pl
  18144. sanok.pl
  18145. sejny.pl
  18146. slask.pl
  18147. slupsk.pl
  18148. sosnowiec.pl
  18149. stalowa-wola.pl
  18150. skoczow.pl
  18151. starachowice.pl
  18152. stargard.pl
  18153. suwalki.pl
  18154. swidnica.pl
  18155. swiebodzin.pl
  18156. swinoujscie.pl
  18157. szczecin.pl
  18158. szczytno.pl
  18159. tarnobrzeg.pl
  18160. tgory.pl
  18161. turek.pl
  18162. tychy.pl
  18163. ustka.pl
  18164. walbrzych.pl
  18165. warmia.pl
  18166. warszawa.pl
  18167. waw.pl
  18168. wegrow.pl
  18169. wielun.pl
  18170. wlocl.pl
  18171. wloclawek.pl
  18172. wodzislaw.pl
  18173. wolomin.pl
  18174. wroclaw.pl
  18175. zachpomor.pl
  18176. zagan.pl
  18177. zarow.pl
  18178. zgora.pl
  18179. zgorzelec.pl
  18180. // pm : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  18181. pm
  18182. // pn : http://www.government.pn/PnRegistry/policies.htm
  18183. pn
  18184. gov.pn
  18185. co.pn
  18186. org.pn
  18187. edu.pn
  18188. net.pn
  18189. // post : https://en.wikipedia.org/wiki/.post
  18190. post
  18191. // pr : http://www.nic.pr/index.asp?f=1
  18192. pr
  18193. com.pr
  18194. net.pr
  18195. org.pr
  18196. gov.pr
  18197. edu.pr
  18198. isla.pr
  18199. pro.pr
  18200. biz.pr
  18201. info.pr
  18202. name.pr
  18203. // these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr
  18204. est.pr
  18205. prof.pr
  18206. ac.pr
  18207. // pro : http://registry.pro/get-pro
  18208. pro
  18209. aaa.pro
  18210. aca.pro
  18211. acct.pro
  18212. avocat.pro
  18213. bar.pro
  18214. cpa.pro
  18215. eng.pro
  18216. jur.pro
  18217. law.pro
  18218. med.pro
  18219. recht.pro
  18220. // ps : https://en.wikipedia.org/wiki/.ps
  18221. // http://www.nic.ps/registration/policy.html#reg
  18222. ps
  18223. edu.ps
  18224. gov.ps
  18225. sec.ps
  18226. plo.ps
  18227. com.ps
  18228. org.ps
  18229. net.ps
  18230. // pt : https://www.dns.pt/en/domain/pt-terms-and-conditions-registration-rules/
  18231. pt
  18232. net.pt
  18233. gov.pt
  18234. org.pt
  18235. edu.pt
  18236. int.pt
  18237. publ.pt
  18238. com.pt
  18239. nome.pt
  18240. // pw : https://en.wikipedia.org/wiki/.pw
  18241. pw
  18242. co.pw
  18243. ne.pw
  18244. or.pw
  18245. ed.pw
  18246. go.pw
  18247. belau.pw
  18248. // py : http://www.nic.py/pautas.html#seccion_9
  18249. // Submitted by registry
  18250. py
  18251. com.py
  18252. coop.py
  18253. edu.py
  18254. gov.py
  18255. mil.py
  18256. net.py
  18257. org.py
  18258. // qa : http://domains.qa/en/
  18259. qa
  18260. com.qa
  18261. edu.qa
  18262. gov.qa
  18263. mil.qa
  18264. name.qa
  18265. net.qa
  18266. org.qa
  18267. sch.qa
  18268. // re : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  18269. re
  18270. asso.re
  18271. com.re
  18272. nom.re
  18273. // ro : http://www.rotld.ro/
  18274. ro
  18275. arts.ro
  18276. com.ro
  18277. firm.ro
  18278. info.ro
  18279. nom.ro
  18280. nt.ro
  18281. org.ro
  18282. rec.ro
  18283. store.ro
  18284. tm.ro
  18285. www.ro
  18286. // rs : https://www.rnids.rs/en/domains/national-domains
  18287. rs
  18288. ac.rs
  18289. co.rs
  18290. edu.rs
  18291. gov.rs
  18292. in.rs
  18293. org.rs
  18294. // ru : https://cctld.ru/files/pdf/docs/en/rules_ru-rf.pdf
  18295. // Submitted by George Georgievsky <gug@cctld.ru>
  18296. ru
  18297. // rw : https://www.ricta.org.rw/sites/default/files/resources/registry_registrar_contract_0.pdf
  18298. rw
  18299. ac.rw
  18300. co.rw
  18301. coop.rw
  18302. gov.rw
  18303. mil.rw
  18304. net.rw
  18305. org.rw
  18306. // sa : http://www.nic.net.sa/
  18307. sa
  18308. com.sa
  18309. net.sa
  18310. org.sa
  18311. gov.sa
  18312. med.sa
  18313. pub.sa
  18314. edu.sa
  18315. sch.sa
  18316. // sb : http://www.sbnic.net.sb/
  18317. // Submitted by registry <lee.humphries@telekom.com.sb>
  18318. sb
  18319. com.sb
  18320. edu.sb
  18321. gov.sb
  18322. net.sb
  18323. org.sb
  18324. // sc : http://www.nic.sc/
  18325. sc
  18326. com.sc
  18327. gov.sc
  18328. net.sc
  18329. org.sc
  18330. edu.sc
  18331. // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
  18332. // Submitted by registry <admin@isoc.sd>
  18333. sd
  18334. com.sd
  18335. net.sd
  18336. org.sd
  18337. edu.sd
  18338. med.sd
  18339. tv.sd
  18340. gov.sd
  18341. info.sd
  18342. // se : https://en.wikipedia.org/wiki/.se
  18343. // Submitted by registry <patrik.wallstrom@iis.se>
  18344. se
  18345. a.se
  18346. ac.se
  18347. b.se
  18348. bd.se
  18349. brand.se
  18350. c.se
  18351. d.se
  18352. e.se
  18353. f.se
  18354. fh.se
  18355. fhsk.se
  18356. fhv.se
  18357. g.se
  18358. h.se
  18359. i.se
  18360. k.se
  18361. komforb.se
  18362. kommunalforbund.se
  18363. komvux.se
  18364. l.se
  18365. lanbib.se
  18366. m.se
  18367. n.se
  18368. naturbruksgymn.se
  18369. o.se
  18370. org.se
  18371. p.se
  18372. parti.se
  18373. pp.se
  18374. press.se
  18375. r.se
  18376. s.se
  18377. t.se
  18378. tm.se
  18379. u.se
  18380. w.se
  18381. x.se
  18382. y.se
  18383. z.se
  18384. // sg : http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines
  18385. sg
  18386. com.sg
  18387. net.sg
  18388. org.sg
  18389. gov.sg
  18390. edu.sg
  18391. per.sg
  18392. // sh : http://nic.sh/rules.htm
  18393. sh
  18394. com.sh
  18395. net.sh
  18396. gov.sh
  18397. org.sh
  18398. mil.sh
  18399. // si : https://en.wikipedia.org/wiki/.si
  18400. si
  18401. // sj : No registrations at this time.
  18402. // Submitted by registry <jarle@uninett.no>
  18403. sj
  18404. // sk : https://en.wikipedia.org/wiki/.sk
  18405. // list of 2nd level domains ?
  18406. sk
  18407. // sl : http://www.nic.sl
  18408. // Submitted by registry <adam@neoip.com>
  18409. sl
  18410. com.sl
  18411. net.sl
  18412. edu.sl
  18413. gov.sl
  18414. org.sl
  18415. // sm : https://en.wikipedia.org/wiki/.sm
  18416. sm
  18417. // sn : https://en.wikipedia.org/wiki/.sn
  18418. sn
  18419. art.sn
  18420. com.sn
  18421. edu.sn
  18422. gouv.sn
  18423. org.sn
  18424. perso.sn
  18425. univ.sn
  18426. // so : http://sonic.so/policies/
  18427. so
  18428. com.so
  18429. edu.so
  18430. gov.so
  18431. me.so
  18432. net.so
  18433. org.so
  18434. // sr : https://en.wikipedia.org/wiki/.sr
  18435. sr
  18436. // ss : https://registry.nic.ss/
  18437. // Submitted by registry <technical@nic.ss>
  18438. ss
  18439. biz.ss
  18440. com.ss
  18441. edu.ss
  18442. gov.ss
  18443. me.ss
  18444. net.ss
  18445. org.ss
  18446. sch.ss
  18447. // st : http://www.nic.st/html/policyrules/
  18448. st
  18449. co.st
  18450. com.st
  18451. consulado.st
  18452. edu.st
  18453. embaixada.st
  18454. mil.st
  18455. net.st
  18456. org.st
  18457. principe.st
  18458. saotome.st
  18459. store.st
  18460. // su : https://en.wikipedia.org/wiki/.su
  18461. su
  18462. // sv : http://www.svnet.org.sv/niveldos.pdf
  18463. sv
  18464. com.sv
  18465. edu.sv
  18466. gob.sv
  18467. org.sv
  18468. red.sv
  18469. // sx : https://en.wikipedia.org/wiki/.sx
  18470. // Submitted by registry <jcvignes@openregistry.com>
  18471. sx
  18472. gov.sx
  18473. // sy : https://en.wikipedia.org/wiki/.sy
  18474. // see also: http://www.gobin.info/domainname/sy.doc
  18475. sy
  18476. edu.sy
  18477. gov.sy
  18478. net.sy
  18479. mil.sy
  18480. com.sy
  18481. org.sy
  18482. // sz : https://en.wikipedia.org/wiki/.sz
  18483. // http://www.sispa.org.sz/
  18484. sz
  18485. co.sz
  18486. ac.sz
  18487. org.sz
  18488. // tc : https://en.wikipedia.org/wiki/.tc
  18489. tc
  18490. // td : https://en.wikipedia.org/wiki/.td
  18491. td
  18492. // tel: https://en.wikipedia.org/wiki/.tel
  18493. // http://www.telnic.org/
  18494. tel
  18495. // tf : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  18496. tf
  18497. // tg : https://en.wikipedia.org/wiki/.tg
  18498. // http://www.nic.tg/
  18499. tg
  18500. // th : https://en.wikipedia.org/wiki/.th
  18501. // Submitted by registry <krit@thains.co.th>
  18502. th
  18503. ac.th
  18504. co.th
  18505. go.th
  18506. in.th
  18507. mi.th
  18508. net.th
  18509. or.th
  18510. // tj : http://www.nic.tj/policy.html
  18511. tj
  18512. ac.tj
  18513. biz.tj
  18514. co.tj
  18515. com.tj
  18516. edu.tj
  18517. go.tj
  18518. gov.tj
  18519. int.tj
  18520. mil.tj
  18521. name.tj
  18522. net.tj
  18523. nic.tj
  18524. org.tj
  18525. test.tj
  18526. web.tj
  18527. // tk : https://en.wikipedia.org/wiki/.tk
  18528. tk
  18529. // tl : https://en.wikipedia.org/wiki/.tl
  18530. tl
  18531. gov.tl
  18532. // tm : http://www.nic.tm/local.html
  18533. tm
  18534. com.tm
  18535. co.tm
  18536. org.tm
  18537. net.tm
  18538. nom.tm
  18539. gov.tm
  18540. mil.tm
  18541. edu.tm
  18542. // tn : http://www.registre.tn/fr/
  18543. // https://whois.ati.tn/
  18544. tn
  18545. com.tn
  18546. ens.tn
  18547. fin.tn
  18548. gov.tn
  18549. ind.tn
  18550. info.tn
  18551. intl.tn
  18552. mincom.tn
  18553. nat.tn
  18554. net.tn
  18555. org.tn
  18556. perso.tn
  18557. tourism.tn
  18558. // to : https://en.wikipedia.org/wiki/.to
  18559. // Submitted by registry <egullich@colo.to>
  18560. to
  18561. com.to
  18562. gov.to
  18563. net.to
  18564. org.to
  18565. edu.to
  18566. mil.to
  18567. // tr : https://nic.tr/
  18568. // https://nic.tr/forms/eng/policies.pdf
  18569. // https://nic.tr/index.php?USRACTN=PRICELST
  18570. tr
  18571. av.tr
  18572. bbs.tr
  18573. bel.tr
  18574. biz.tr
  18575. com.tr
  18576. dr.tr
  18577. edu.tr
  18578. gen.tr
  18579. gov.tr
  18580. info.tr
  18581. mil.tr
  18582. k12.tr
  18583. kep.tr
  18584. name.tr
  18585. net.tr
  18586. org.tr
  18587. pol.tr
  18588. tel.tr
  18589. tsk.tr
  18590. tv.tr
  18591. web.tr
  18592. // Used by Northern Cyprus
  18593. nc.tr
  18594. // Used by government agencies of Northern Cyprus
  18595. gov.nc.tr
  18596. // tt : http://www.nic.tt/
  18597. tt
  18598. co.tt
  18599. com.tt
  18600. org.tt
  18601. net.tt
  18602. biz.tt
  18603. info.tt
  18604. pro.tt
  18605. int.tt
  18606. coop.tt
  18607. jobs.tt
  18608. mobi.tt
  18609. travel.tt
  18610. museum.tt
  18611. aero.tt
  18612. name.tt
  18613. gov.tt
  18614. edu.tt
  18615. // tv : https://en.wikipedia.org/wiki/.tv
  18616. // Not listing any 2LDs as reserved since none seem to exist in practice,
  18617. // Wikipedia notwithstanding.
  18618. tv
  18619. // tw : https://en.wikipedia.org/wiki/.tw
  18620. tw
  18621. edu.tw
  18622. gov.tw
  18623. mil.tw
  18624. com.tw
  18625. net.tw
  18626. org.tw
  18627. idv.tw
  18628. game.tw
  18629. ebiz.tw
  18630. club.tw
  18631. 網路.tw
  18632. 組織.tw
  18633. 商業.tw
  18634. // tz : http://www.tznic.or.tz/index.php/domains
  18635. // Submitted by registry <manager@tznic.or.tz>
  18636. tz
  18637. ac.tz
  18638. co.tz
  18639. go.tz
  18640. hotel.tz
  18641. info.tz
  18642. me.tz
  18643. mil.tz
  18644. mobi.tz
  18645. ne.tz
  18646. or.tz
  18647. sc.tz
  18648. tv.tz
  18649. // ua : https://hostmaster.ua/policy/?ua
  18650. // Submitted by registry <dk@cctld.ua>
  18651. ua
  18652. // ua 2LD
  18653. com.ua
  18654. edu.ua
  18655. gov.ua
  18656. in.ua
  18657. net.ua
  18658. org.ua
  18659. // ua geographic names
  18660. // https://hostmaster.ua/2ld/
  18661. cherkassy.ua
  18662. cherkasy.ua
  18663. chernigov.ua
  18664. chernihiv.ua
  18665. chernivtsi.ua
  18666. chernovtsy.ua
  18667. ck.ua
  18668. cn.ua
  18669. cr.ua
  18670. crimea.ua
  18671. cv.ua
  18672. dn.ua
  18673. dnepropetrovsk.ua
  18674. dnipropetrovsk.ua
  18675. donetsk.ua
  18676. dp.ua
  18677. if.ua
  18678. ivano-frankivsk.ua
  18679. kh.ua
  18680. kharkiv.ua
  18681. kharkov.ua
  18682. kherson.ua
  18683. khmelnitskiy.ua
  18684. khmelnytskyi.ua
  18685. kiev.ua
  18686. kirovograd.ua
  18687. km.ua
  18688. kr.ua
  18689. kropyvnytskyi.ua
  18690. krym.ua
  18691. ks.ua
  18692. kv.ua
  18693. kyiv.ua
  18694. lg.ua
  18695. lt.ua
  18696. lugansk.ua
  18697. luhansk.ua
  18698. lutsk.ua
  18699. lv.ua
  18700. lviv.ua
  18701. mk.ua
  18702. mykolaiv.ua
  18703. nikolaev.ua
  18704. od.ua
  18705. odesa.ua
  18706. odessa.ua
  18707. pl.ua
  18708. poltava.ua
  18709. rivne.ua
  18710. rovno.ua
  18711. rv.ua
  18712. sb.ua
  18713. sebastopol.ua
  18714. sevastopol.ua
  18715. sm.ua
  18716. sumy.ua
  18717. te.ua
  18718. ternopil.ua
  18719. uz.ua
  18720. uzhgorod.ua
  18721. uzhhorod.ua
  18722. vinnica.ua
  18723. vinnytsia.ua
  18724. vn.ua
  18725. volyn.ua
  18726. yalta.ua
  18727. zakarpattia.ua
  18728. zaporizhzhe.ua
  18729. zaporizhzhia.ua
  18730. zhitomir.ua
  18731. zhytomyr.ua
  18732. zp.ua
  18733. zt.ua
  18734. // ug : https://www.registry.co.ug/
  18735. ug
  18736. co.ug
  18737. or.ug
  18738. ac.ug
  18739. sc.ug
  18740. go.ug
  18741. ne.ug
  18742. com.ug
  18743. org.ug
  18744. // uk : https://en.wikipedia.org/wiki/.uk
  18745. // Submitted by registry <Michael.Daly@nominet.org.uk>
  18746. uk
  18747. ac.uk
  18748. co.uk
  18749. gov.uk
  18750. ltd.uk
  18751. me.uk
  18752. net.uk
  18753. nhs.uk
  18754. org.uk
  18755. plc.uk
  18756. police.uk
  18757. *.sch.uk
  18758. // us : https://en.wikipedia.org/wiki/.us
  18759. us
  18760. dni.us
  18761. fed.us
  18762. isa.us
  18763. kids.us
  18764. nsn.us
  18765. // us geographic names
  18766. ak.us
  18767. al.us
  18768. ar.us
  18769. as.us
  18770. az.us
  18771. ca.us
  18772. co.us
  18773. ct.us
  18774. dc.us
  18775. de.us
  18776. fl.us
  18777. ga.us
  18778. gu.us
  18779. hi.us
  18780. ia.us
  18781. id.us
  18782. il.us
  18783. in.us
  18784. ks.us
  18785. ky.us
  18786. la.us
  18787. ma.us
  18788. md.us
  18789. me.us
  18790. mi.us
  18791. mn.us
  18792. mo.us
  18793. ms.us
  18794. mt.us
  18795. nc.us
  18796. nd.us
  18797. ne.us
  18798. nh.us
  18799. nj.us
  18800. nm.us
  18801. nv.us
  18802. ny.us
  18803. oh.us
  18804. ok.us
  18805. or.us
  18806. pa.us
  18807. pr.us
  18808. ri.us
  18809. sc.us
  18810. sd.us
  18811. tn.us
  18812. tx.us
  18813. ut.us
  18814. vi.us
  18815. vt.us
  18816. va.us
  18817. wa.us
  18818. wi.us
  18819. wv.us
  18820. wy.us
  18821. // The registrar notes several more specific domains available in each state,
  18822. // such as state.*.us, dst.*.us, etc., but resolution of these is somewhat
  18823. // haphazard; in some states these domains resolve as addresses, while in others
  18824. // only subdomains are available, or even nothing at all. We include the
  18825. // most common ones where it's clear that different sites are different
  18826. // entities.
  18827. k12.ak.us
  18828. k12.al.us
  18829. k12.ar.us
  18830. k12.as.us
  18831. k12.az.us
  18832. k12.ca.us
  18833. k12.co.us
  18834. k12.ct.us
  18835. k12.dc.us
  18836. k12.fl.us
  18837. k12.ga.us
  18838. k12.gu.us
  18839. // k12.hi.us Bug 614565 - Hawaii has a state-wide DOE login
  18840. k12.ia.us
  18841. k12.id.us
  18842. k12.il.us
  18843. k12.in.us
  18844. k12.ks.us
  18845. k12.ky.us
  18846. k12.la.us
  18847. k12.ma.us
  18848. k12.md.us
  18849. k12.me.us
  18850. k12.mi.us
  18851. k12.mn.us
  18852. k12.mo.us
  18853. k12.ms.us
  18854. k12.mt.us
  18855. k12.nc.us
  18856. // k12.nd.us Bug 1028347 - Removed at request of Travis Rosso <trossow@nd.gov>
  18857. k12.ne.us
  18858. k12.nh.us
  18859. k12.nj.us
  18860. k12.nm.us
  18861. k12.nv.us
  18862. k12.ny.us
  18863. k12.oh.us
  18864. k12.ok.us
  18865. k12.or.us
  18866. k12.pa.us
  18867. k12.pr.us
  18868. // k12.ri.us Removed at request of Kim Cournoyer <netsupport@staff.ri.net>
  18869. k12.sc.us
  18870. // k12.sd.us Bug 934131 - Removed at request of James Booze <James.Booze@k12.sd.us>
  18871. k12.tn.us
  18872. k12.tx.us
  18873. k12.ut.us
  18874. k12.vi.us
  18875. k12.vt.us
  18876. k12.va.us
  18877. k12.wa.us
  18878. k12.wi.us
  18879. // k12.wv.us Bug 947705 - Removed at request of Verne Britton <verne@wvnet.edu>
  18880. k12.wy.us
  18881. cc.ak.us
  18882. cc.al.us
  18883. cc.ar.us
  18884. cc.as.us
  18885. cc.az.us
  18886. cc.ca.us
  18887. cc.co.us
  18888. cc.ct.us
  18889. cc.dc.us
  18890. cc.de.us
  18891. cc.fl.us
  18892. cc.ga.us
  18893. cc.gu.us
  18894. cc.hi.us
  18895. cc.ia.us
  18896. cc.id.us
  18897. cc.il.us
  18898. cc.in.us
  18899. cc.ks.us
  18900. cc.ky.us
  18901. cc.la.us
  18902. cc.ma.us
  18903. cc.md.us
  18904. cc.me.us
  18905. cc.mi.us
  18906. cc.mn.us
  18907. cc.mo.us
  18908. cc.ms.us
  18909. cc.mt.us
  18910. cc.nc.us
  18911. cc.nd.us
  18912. cc.ne.us
  18913. cc.nh.us
  18914. cc.nj.us
  18915. cc.nm.us
  18916. cc.nv.us
  18917. cc.ny.us
  18918. cc.oh.us
  18919. cc.ok.us
  18920. cc.or.us
  18921. cc.pa.us
  18922. cc.pr.us
  18923. cc.ri.us
  18924. cc.sc.us
  18925. cc.sd.us
  18926. cc.tn.us
  18927. cc.tx.us
  18928. cc.ut.us
  18929. cc.vi.us
  18930. cc.vt.us
  18931. cc.va.us
  18932. cc.wa.us
  18933. cc.wi.us
  18934. cc.wv.us
  18935. cc.wy.us
  18936. lib.ak.us
  18937. lib.al.us
  18938. lib.ar.us
  18939. lib.as.us
  18940. lib.az.us
  18941. lib.ca.us
  18942. lib.co.us
  18943. lib.ct.us
  18944. lib.dc.us
  18945. // lib.de.us Issue #243 - Moved to Private section at request of Ed Moore <Ed.Moore@lib.de.us>
  18946. lib.fl.us
  18947. lib.ga.us
  18948. lib.gu.us
  18949. lib.hi.us
  18950. lib.ia.us
  18951. lib.id.us
  18952. lib.il.us
  18953. lib.in.us
  18954. lib.ks.us
  18955. lib.ky.us
  18956. lib.la.us
  18957. lib.ma.us
  18958. lib.md.us
  18959. lib.me.us
  18960. lib.mi.us
  18961. lib.mn.us
  18962. lib.mo.us
  18963. lib.ms.us
  18964. lib.mt.us
  18965. lib.nc.us
  18966. lib.nd.us
  18967. lib.ne.us
  18968. lib.nh.us
  18969. lib.nj.us
  18970. lib.nm.us
  18971. lib.nv.us
  18972. lib.ny.us
  18973. lib.oh.us
  18974. lib.ok.us
  18975. lib.or.us
  18976. lib.pa.us
  18977. lib.pr.us
  18978. lib.ri.us
  18979. lib.sc.us
  18980. lib.sd.us
  18981. lib.tn.us
  18982. lib.tx.us
  18983. lib.ut.us
  18984. lib.vi.us
  18985. lib.vt.us
  18986. lib.va.us
  18987. lib.wa.us
  18988. lib.wi.us
  18989. // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold <arnold@wvlc.lib.wv.us>
  18990. lib.wy.us
  18991. // k12.ma.us contains school districts in Massachusetts. The 4LDs are
  18992. // managed independently except for private (PVT), charter (CHTR) and
  18993. // parochial (PAROCH) schools. Those are delegated directly to the
  18994. // 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
  18995. pvt.k12.ma.us
  18996. chtr.k12.ma.us
  18997. paroch.k12.ma.us
  18998. // Merit Network, Inc. maintains the registry for =~ /(k12|cc|lib).mi.us/ and the following
  18999. // see also: http://domreg.merit.edu
  19000. // see also: whois -h whois.domreg.merit.edu help
  19001. ann-arbor.mi.us
  19002. cog.mi.us
  19003. dst.mi.us
  19004. eaton.mi.us
  19005. gen.mi.us
  19006. mus.mi.us
  19007. tec.mi.us
  19008. washtenaw.mi.us
  19009. // uy : http://www.nic.org.uy/
  19010. uy
  19011. com.uy
  19012. edu.uy
  19013. gub.uy
  19014. mil.uy
  19015. net.uy
  19016. org.uy
  19017. // uz : http://www.reg.uz/
  19018. uz
  19019. co.uz
  19020. com.uz
  19021. net.uz
  19022. org.uz
  19023. // va : https://en.wikipedia.org/wiki/.va
  19024. va
  19025. // vc : https://en.wikipedia.org/wiki/.vc
  19026. // Submitted by registry <kshah@ca.afilias.info>
  19027. vc
  19028. com.vc
  19029. net.vc
  19030. org.vc
  19031. gov.vc
  19032. mil.vc
  19033. edu.vc
  19034. // ve : https://registro.nic.ve/
  19035. // Submitted by registry nic@nic.ve and nicve@conatel.gob.ve
  19036. ve
  19037. arts.ve
  19038. bib.ve
  19039. co.ve
  19040. com.ve
  19041. e12.ve
  19042. edu.ve
  19043. firm.ve
  19044. gob.ve
  19045. gov.ve
  19046. info.ve
  19047. int.ve
  19048. mil.ve
  19049. net.ve
  19050. nom.ve
  19051. org.ve
  19052. rar.ve
  19053. rec.ve
  19054. store.ve
  19055. tec.ve
  19056. web.ve
  19057. // vg : https://en.wikipedia.org/wiki/.vg
  19058. vg
  19059. // vi : http://www.nic.vi/newdomainform.htm
  19060. // http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other
  19061. // TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they
  19062. // are available for registration (which they do not seem to be).
  19063. vi
  19064. co.vi
  19065. com.vi
  19066. k12.vi
  19067. net.vi
  19068. org.vi
  19069. // vn : https://www.vnnic.vn/en/domain/cctld-vn
  19070. // https://vnnic.vn/sites/default/files/tailieu/vn.cctld.domains.txt
  19071. vn
  19072. ac.vn
  19073. ai.vn
  19074. biz.vn
  19075. com.vn
  19076. edu.vn
  19077. gov.vn
  19078. health.vn
  19079. id.vn
  19080. info.vn
  19081. int.vn
  19082. io.vn
  19083. name.vn
  19084. net.vn
  19085. org.vn
  19086. pro.vn
  19087. // vn geographical names
  19088. angiang.vn
  19089. bacgiang.vn
  19090. backan.vn
  19091. baclieu.vn
  19092. bacninh.vn
  19093. baria-vungtau.vn
  19094. bentre.vn
  19095. binhdinh.vn
  19096. binhduong.vn
  19097. binhphuoc.vn
  19098. binhthuan.vn
  19099. camau.vn
  19100. cantho.vn
  19101. caobang.vn
  19102. daklak.vn
  19103. daknong.vn
  19104. danang.vn
  19105. dienbien.vn
  19106. dongnai.vn
  19107. dongthap.vn
  19108. gialai.vn
  19109. hagiang.vn
  19110. haiduong.vn
  19111. haiphong.vn
  19112. hanam.vn
  19113. hanoi.vn
  19114. hatinh.vn
  19115. haugiang.vn
  19116. hoabinh.vn
  19117. hungyen.vn
  19118. khanhhoa.vn
  19119. kiengiang.vn
  19120. kontum.vn
  19121. laichau.vn
  19122. lamdong.vn
  19123. langson.vn
  19124. laocai.vn
  19125. longan.vn
  19126. namdinh.vn
  19127. nghean.vn
  19128. ninhbinh.vn
  19129. ninhthuan.vn
  19130. phutho.vn
  19131. phuyen.vn
  19132. quangbinh.vn
  19133. quangnam.vn
  19134. quangngai.vn
  19135. quangninh.vn
  19136. quangtri.vn
  19137. soctrang.vn
  19138. sonla.vn
  19139. tayninh.vn
  19140. thaibinh.vn
  19141. thainguyen.vn
  19142. thanhhoa.vn
  19143. thanhphohochiminh.vn
  19144. thuathienhue.vn
  19145. tiengiang.vn
  19146. travinh.vn
  19147. tuyenquang.vn
  19148. vinhlong.vn
  19149. vinhphuc.vn
  19150. yenbai.vn
  19151. // vu : https://en.wikipedia.org/wiki/.vu
  19152. // http://www.vunic.vu/
  19153. vu
  19154. com.vu
  19155. edu.vu
  19156. net.vu
  19157. org.vu
  19158. // wf : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  19159. wf
  19160. // ws : https://en.wikipedia.org/wiki/.ws
  19161. // http://samoanic.ws/index.dhtml
  19162. ws
  19163. com.ws
  19164. net.ws
  19165. org.ws
  19166. gov.ws
  19167. edu.ws
  19168. // yt : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
  19169. yt
  19170. // IDN ccTLDs
  19171. // When submitting patches, please maintain a sort by ISO 3166 ccTLD, then
  19172. // U-label, and follow this format:
  19173. // // A-Label ("<Latin renderings>", <language name>[, variant info]) : <ISO 3166 ccTLD>
  19174. // // [sponsoring org]
  19175. // U-Label
  19176. // xn--mgbaam7a8h ("Emerat", Arabic) : AE
  19177. // http://nic.ae/english/arabicdomain/rules.jsp
  19178. امارات
  19179. // xn--y9a3aq ("hye", Armenian) : AM
  19180. // ISOC AM (operated by .am Registry)
  19181. հայ
  19182. // xn--54b7fta0cc ("Bangla", Bangla) : BD
  19183. বাংলা
  19184. // xn--90ae ("bg", Bulgarian) : BG
  19185. бг
  19186. // xn--mgbcpq6gpa1a ("albahrain", Arabic) : BH
  19187. البحرين
  19188. // xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY
  19189. // Operated by .by registry
  19190. бел
  19191. // xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN
  19192. // CNNIC
  19193. // http://cnnic.cn/html/Dir/2005/10/11/3218.htm
  19194. 中国
  19195. // xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN
  19196. // CNNIC
  19197. // http://cnnic.cn/html/Dir/2005/10/11/3218.htm
  19198. 中國
  19199. // xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ
  19200. الجزائر
  19201. // xn--wgbh1c ("Egypt/Masr", Arabic) : EG
  19202. // http://www.dotmasr.eg/
  19203. مصر
  19204. // xn--e1a4c ("eu", Cyrillic) : EU
  19205. // https://eurid.eu
  19206. ею
  19207. // xn--qxa6a ("eu", Greek) : EU
  19208. // https://eurid.eu
  19209. ευ
  19210. // xn--mgbah1a3hjkrd ("Mauritania", Arabic) : MR
  19211. موريتانيا
  19212. // xn--node ("ge", Georgian Mkhedruli) : GE
  19213. გე
  19214. // xn--qxam ("el", Greek) : GR
  19215. // Hellenic Ministry of Infrastructure, Transport, and Networks
  19216. ελ
  19217. // xn--j6w193g ("Hong Kong", Chinese) : HK
  19218. // https://www.hkirc.hk
  19219. // Submitted by registry <hk.tech@hkirc.hk>
  19220. // https://www.hkirc.hk/content.jsp?id=30#!/34
  19221. 香港
  19222. 公司.香港
  19223. 教育.香港
  19224. 政府.香港
  19225. 個人.香港
  19226. 網絡.香港
  19227. 組織.香港
  19228. // xn--2scrj9c ("Bharat", Kannada) : IN
  19229. // India
  19230. ಭಾರತ
  19231. // xn--3hcrj9c ("Bharat", Oriya) : IN
  19232. // India
  19233. ଭାରତ
  19234. // xn--45br5cyl ("Bharatam", Assamese) : IN
  19235. // India
  19236. ভাৰত
  19237. // xn--h2breg3eve ("Bharatam", Sanskrit) : IN
  19238. // India
  19239. भारतम्
  19240. // xn--h2brj9c8c ("Bharot", Santali) : IN
  19241. // India
  19242. भारोत
  19243. // xn--mgbgu82a ("Bharat", Sindhi) : IN
  19244. // India
  19245. ڀارت
  19246. // xn--rvc1e0am3e ("Bharatam", Malayalam) : IN
  19247. // India
  19248. ഭാരതം
  19249. // xn--h2brj9c ("Bharat", Devanagari) : IN
  19250. // India
  19251. भारत
  19252. // xn--mgbbh1a ("Bharat", Kashmiri) : IN
  19253. // India
  19254. بارت
  19255. // xn--mgbbh1a71e ("Bharat", Arabic) : IN
  19256. // India
  19257. بھارت
  19258. // xn--fpcrj9c3d ("Bharat", Telugu) : IN
  19259. // India
  19260. భారత్
  19261. // xn--gecrj9c ("Bharat", Gujarati) : IN
  19262. // India
  19263. ભારત
  19264. // xn--s9brj9c ("Bharat", Gurmukhi) : IN
  19265. // India
  19266. ਭਾਰਤ
  19267. // xn--45brj9c ("Bharat", Bengali) : IN
  19268. // India
  19269. ভারত
  19270. // xn--xkc2dl3a5ee0h ("India", Tamil) : IN
  19271. // India
  19272. இந்தியா
  19273. // xn--mgba3a4f16a ("Iran", Persian) : IR
  19274. ایران
  19275. // xn--mgba3a4fra ("Iran", Arabic) : IR
  19276. ايران
  19277. // xn--mgbtx2b ("Iraq", Arabic) : IQ
  19278. // Communications and Media Commission
  19279. عراق
  19280. // xn--mgbayh7gpa ("al-Ordon", Arabic) : JO
  19281. // National Information Technology Center (NITC)
  19282. // Royal Scientific Society, Al-Jubeiha
  19283. الاردن
  19284. // xn--3e0b707e ("Republic of Korea", Hangul) : KR
  19285. 한국
  19286. // xn--80ao21a ("Kaz", Kazakh) : KZ
  19287. қаз
  19288. // xn--q7ce6a ("Lao", Lao) : LA
  19289. ລາວ
  19290. // xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK
  19291. // https://nic.lk
  19292. ලංකා
  19293. // xn--xkc2al3hye2a ("Ilangai", Tamil) : LK
  19294. // https://nic.lk
  19295. இலங்கை
  19296. // xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA
  19297. المغرب
  19298. // xn--d1alf ("mkd", Macedonian) : MK
  19299. // MARnet
  19300. мкд
  19301. // xn--l1acc ("mon", Mongolian) : MN
  19302. мон
  19303. // xn--mix891f ("Macao", Chinese, Traditional) : MO
  19304. // MONIC / HNET Asia (Registry Operator for .mo)
  19305. 澳門
  19306. // xn--mix082f ("Macao", Chinese, Simplified) : MO
  19307. 澳门
  19308. // xn--mgbx4cd0ab ("Malaysia", Malay) : MY
  19309. مليسيا
  19310. // xn--mgb9awbf ("Oman", Arabic) : OM
  19311. عمان
  19312. // xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK
  19313. پاکستان
  19314. // xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK
  19315. پاكستان
  19316. // xn--ygbi2ammx ("Falasteen", Arabic) : PS
  19317. // The Palestinian National Internet Naming Authority (PNINA)
  19318. // http://www.pnina.ps
  19319. فلسطين
  19320. // xn--90a3ac ("srb", Cyrillic) : RS
  19321. // https://www.rnids.rs/en/domains/national-domains
  19322. срб
  19323. пр.срб
  19324. орг.срб
  19325. обр.срб
  19326. од.срб
  19327. упр.срб
  19328. ак.срб
  19329. // xn--p1ai ("rf", Russian-Cyrillic) : RU
  19330. // https://cctld.ru/files/pdf/docs/en/rules_ru-rf.pdf
  19331. // Submitted by George Georgievsky <gug@cctld.ru>
  19332. рф
  19333. // xn--wgbl6a ("Qatar", Arabic) : QA
  19334. // http://www.ict.gov.qa/
  19335. قطر
  19336. // xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA
  19337. // http://www.nic.net.sa/
  19338. السعودية
  19339. // xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA
  19340. السعودیة
  19341. // xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA
  19342. السعودیۃ
  19343. // xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA
  19344. السعوديه
  19345. // xn--mgbpl2fh ("sudan", Arabic) : SD
  19346. // Operated by .sd registry
  19347. سودان
  19348. // xn--yfro4i67o Singapore ("Singapore", Chinese) : SG
  19349. 新加坡
  19350. // xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG
  19351. சிங்கப்பூர்
  19352. // xn--ogbpf8fl ("Syria", Arabic) : SY
  19353. سورية
  19354. // xn--mgbtf8fl ("Syria", Arabic, variant) : SY
  19355. سوريا
  19356. // xn--o3cw4h ("Thai", Thai) : TH
  19357. // http://www.thnic.co.th
  19358. ไทย
  19359. ศึกษา.ไทย
  19360. ธุรกิจ.ไทย
  19361. รัฐบาล.ไทย
  19362. ทหาร.ไทย
  19363. เน็ต.ไทย
  19364. องค์กร.ไทย
  19365. // xn--pgbs0dh ("Tunisia", Arabic) : TN
  19366. // http://nic.tn
  19367. تونس
  19368. // xn--kpry57d ("Taiwan", Chinese, Traditional) : TW
  19369. // http://www.twnic.net/english/dn/dn_07a.htm
  19370. 台灣
  19371. // xn--kprw13d ("Taiwan", Chinese, Simplified) : TW
  19372. // http://www.twnic.net/english/dn/dn_07a.htm
  19373. 台湾
  19374. // xn--nnx388a ("Taiwan", Chinese, variant) : TW
  19375. 臺灣
  19376. // xn--j1amh ("ukr", Cyrillic) : UA
  19377. укр
  19378. // xn--mgb2ddes ("AlYemen", Arabic) : YE
  19379. اليمن
  19380. // xxx : http://icmregistry.com
  19381. xxx
  19382. // ye : http://www.y.net.ye/services/domain_name.htm
  19383. ye
  19384. com.ye
  19385. edu.ye
  19386. gov.ye
  19387. net.ye
  19388. mil.ye
  19389. org.ye
  19390. // za : https://www.zadna.org.za/content/page/domain-information/
  19391. ac.za
  19392. agric.za
  19393. alt.za
  19394. co.za
  19395. edu.za
  19396. gov.za
  19397. grondar.za
  19398. law.za
  19399. mil.za
  19400. net.za
  19401. ngo.za
  19402. nic.za
  19403. nis.za
  19404. nom.za
  19405. org.za
  19406. school.za
  19407. tm.za
  19408. web.za
  19409. // zm : https://zicta.zm/
  19410. // Submitted by registry <info@zicta.zm>
  19411. zm
  19412. ac.zm
  19413. biz.zm
  19414. co.zm
  19415. com.zm
  19416. edu.zm
  19417. gov.zm
  19418. info.zm
  19419. mil.zm
  19420. net.zm
  19421. org.zm
  19422. sch.zm
  19423. // zw : https://www.potraz.gov.zw/
  19424. // Confirmed by registry <bmtengwa@potraz.gov.zw> 2017-01-25
  19425. zw
  19426. ac.zw
  19427. co.zw
  19428. gov.zw
  19429. mil.zw
  19430. org.zw
  19431. // newGTLDs
  19432. // List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2023-10-20T15:11:50Z
  19433. // This list is auto-generated, don't edit it manually.
  19434. // aaa : American Automobile Association, Inc.
  19435. // https://www.iana.org/domains/root/db/aaa.html
  19436. aaa
  19437. // aarp : AARP
  19438. // https://www.iana.org/domains/root/db/aarp.html
  19439. aarp
  19440. // abb : ABB Ltd
  19441. // https://www.iana.org/domains/root/db/abb.html
  19442. abb
  19443. // abbott : Abbott Laboratories, Inc.
  19444. // https://www.iana.org/domains/root/db/abbott.html
  19445. abbott
  19446. // abbvie : AbbVie Inc.
  19447. // https://www.iana.org/domains/root/db/abbvie.html
  19448. abbvie
  19449. // abc : Disney Enterprises, Inc.
  19450. // https://www.iana.org/domains/root/db/abc.html
  19451. abc
  19452. // able : Able Inc.
  19453. // https://www.iana.org/domains/root/db/able.html
  19454. able
  19455. // abogado : Registry Services, LLC
  19456. // https://www.iana.org/domains/root/db/abogado.html
  19457. abogado
  19458. // abudhabi : Abu Dhabi Systems and Information Centre
  19459. // https://www.iana.org/domains/root/db/abudhabi.html
  19460. abudhabi
  19461. // academy : Binky Moon, LLC
  19462. // https://www.iana.org/domains/root/db/academy.html
  19463. academy
  19464. // accenture : Accenture plc
  19465. // https://www.iana.org/domains/root/db/accenture.html
  19466. accenture
  19467. // accountant : dot Accountant Limited
  19468. // https://www.iana.org/domains/root/db/accountant.html
  19469. accountant
  19470. // accountants : Binky Moon, LLC
  19471. // https://www.iana.org/domains/root/db/accountants.html
  19472. accountants
  19473. // aco : ACO Severin Ahlmann GmbH & Co. KG
  19474. // https://www.iana.org/domains/root/db/aco.html
  19475. aco
  19476. // actor : Dog Beach, LLC
  19477. // https://www.iana.org/domains/root/db/actor.html
  19478. actor
  19479. // ads : Charleston Road Registry Inc.
  19480. // https://www.iana.org/domains/root/db/ads.html
  19481. ads
  19482. // adult : ICM Registry AD LLC
  19483. // https://www.iana.org/domains/root/db/adult.html
  19484. adult
  19485. // aeg : Aktiebolaget Electrolux
  19486. // https://www.iana.org/domains/root/db/aeg.html
  19487. aeg
  19488. // aetna : Aetna Life Insurance Company
  19489. // https://www.iana.org/domains/root/db/aetna.html
  19490. aetna
  19491. // afl : Australian Football League
  19492. // https://www.iana.org/domains/root/db/afl.html
  19493. afl
  19494. // africa : ZA Central Registry NPC trading as Registry.Africa
  19495. // https://www.iana.org/domains/root/db/africa.html
  19496. africa
  19497. // agakhan : Fondation Aga Khan (Aga Khan Foundation)
  19498. // https://www.iana.org/domains/root/db/agakhan.html
  19499. agakhan
  19500. // agency : Binky Moon, LLC
  19501. // https://www.iana.org/domains/root/db/agency.html
  19502. agency
  19503. // aig : American International Group, Inc.
  19504. // https://www.iana.org/domains/root/db/aig.html
  19505. aig
  19506. // airbus : Airbus S.A.S.
  19507. // https://www.iana.org/domains/root/db/airbus.html
  19508. airbus
  19509. // airforce : Dog Beach, LLC
  19510. // https://www.iana.org/domains/root/db/airforce.html
  19511. airforce
  19512. // airtel : Bharti Airtel Limited
  19513. // https://www.iana.org/domains/root/db/airtel.html
  19514. airtel
  19515. // akdn : Fondation Aga Khan (Aga Khan Foundation)
  19516. // https://www.iana.org/domains/root/db/akdn.html
  19517. akdn
  19518. // alibaba : Alibaba Group Holding Limited
  19519. // https://www.iana.org/domains/root/db/alibaba.html
  19520. alibaba
  19521. // alipay : Alibaba Group Holding Limited
  19522. // https://www.iana.org/domains/root/db/alipay.html
  19523. alipay
  19524. // allfinanz : Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
  19525. // https://www.iana.org/domains/root/db/allfinanz.html
  19526. allfinanz
  19527. // allstate : Allstate Fire and Casualty Insurance Company
  19528. // https://www.iana.org/domains/root/db/allstate.html
  19529. allstate
  19530. // ally : Ally Financial Inc.
  19531. // https://www.iana.org/domains/root/db/ally.html
  19532. ally
  19533. // alsace : Region Grand Est
  19534. // https://www.iana.org/domains/root/db/alsace.html
  19535. alsace
  19536. // alstom : ALSTOM
  19537. // https://www.iana.org/domains/root/db/alstom.html
  19538. alstom
  19539. // amazon : Amazon Registry Services, Inc.
  19540. // https://www.iana.org/domains/root/db/amazon.html
  19541. amazon
  19542. // americanexpress : American Express Travel Related Services Company, Inc.
  19543. // https://www.iana.org/domains/root/db/americanexpress.html
  19544. americanexpress
  19545. // americanfamily : AmFam, Inc.
  19546. // https://www.iana.org/domains/root/db/americanfamily.html
  19547. americanfamily
  19548. // amex : American Express Travel Related Services Company, Inc.
  19549. // https://www.iana.org/domains/root/db/amex.html
  19550. amex
  19551. // amfam : AmFam, Inc.
  19552. // https://www.iana.org/domains/root/db/amfam.html
  19553. amfam
  19554. // amica : Amica Mutual Insurance Company
  19555. // https://www.iana.org/domains/root/db/amica.html
  19556. amica
  19557. // amsterdam : Gemeente Amsterdam
  19558. // https://www.iana.org/domains/root/db/amsterdam.html
  19559. amsterdam
  19560. // analytics : Campus IP LLC
  19561. // https://www.iana.org/domains/root/db/analytics.html
  19562. analytics
  19563. // android : Charleston Road Registry Inc.
  19564. // https://www.iana.org/domains/root/db/android.html
  19565. android
  19566. // anquan : Beijing Qihu Keji Co., Ltd.
  19567. // https://www.iana.org/domains/root/db/anquan.html
  19568. anquan
  19569. // anz : Australia and New Zealand Banking Group Limited
  19570. // https://www.iana.org/domains/root/db/anz.html
  19571. anz
  19572. // aol : Oath Inc.
  19573. // https://www.iana.org/domains/root/db/aol.html
  19574. aol
  19575. // apartments : Binky Moon, LLC
  19576. // https://www.iana.org/domains/root/db/apartments.html
  19577. apartments
  19578. // app : Charleston Road Registry Inc.
  19579. // https://www.iana.org/domains/root/db/app.html
  19580. app
  19581. // apple : Apple Inc.
  19582. // https://www.iana.org/domains/root/db/apple.html
  19583. apple
  19584. // aquarelle : Aquarelle.com
  19585. // https://www.iana.org/domains/root/db/aquarelle.html
  19586. aquarelle
  19587. // arab : League of Arab States
  19588. // https://www.iana.org/domains/root/db/arab.html
  19589. arab
  19590. // aramco : Aramco Services Company
  19591. // https://www.iana.org/domains/root/db/aramco.html
  19592. aramco
  19593. // archi : Identity Digital Limited
  19594. // https://www.iana.org/domains/root/db/archi.html
  19595. archi
  19596. // army : Dog Beach, LLC
  19597. // https://www.iana.org/domains/root/db/army.html
  19598. army
  19599. // art : UK Creative Ideas Limited
  19600. // https://www.iana.org/domains/root/db/art.html
  19601. art
  19602. // arte : Association Relative à la Télévision Européenne G.E.I.E.
  19603. // https://www.iana.org/domains/root/db/arte.html
  19604. arte
  19605. // asda : Wal-Mart Stores, Inc.
  19606. // https://www.iana.org/domains/root/db/asda.html
  19607. asda
  19608. // associates : Binky Moon, LLC
  19609. // https://www.iana.org/domains/root/db/associates.html
  19610. associates
  19611. // athleta : The Gap, Inc.
  19612. // https://www.iana.org/domains/root/db/athleta.html
  19613. athleta
  19614. // attorney : Dog Beach, LLC
  19615. // https://www.iana.org/domains/root/db/attorney.html
  19616. attorney
  19617. // auction : Dog Beach, LLC
  19618. // https://www.iana.org/domains/root/db/auction.html
  19619. auction
  19620. // audi : AUDI Aktiengesellschaft
  19621. // https://www.iana.org/domains/root/db/audi.html
  19622. audi
  19623. // audible : Amazon Registry Services, Inc.
  19624. // https://www.iana.org/domains/root/db/audible.html
  19625. audible
  19626. // audio : XYZ.COM LLC
  19627. // https://www.iana.org/domains/root/db/audio.html
  19628. audio
  19629. // auspost : Australian Postal Corporation
  19630. // https://www.iana.org/domains/root/db/auspost.html
  19631. auspost
  19632. // author : Amazon Registry Services, Inc.
  19633. // https://www.iana.org/domains/root/db/author.html
  19634. author
  19635. // auto : XYZ.COM LLC
  19636. // https://www.iana.org/domains/root/db/auto.html
  19637. auto
  19638. // autos : XYZ.COM LLC
  19639. // https://www.iana.org/domains/root/db/autos.html
  19640. autos
  19641. // avianca : Avianca Inc.
  19642. // https://www.iana.org/domains/root/db/avianca.html
  19643. avianca
  19644. // aws : AWS Registry LLC
  19645. // https://www.iana.org/domains/root/db/aws.html
  19646. aws
  19647. // axa : AXA Group Operations SAS
  19648. // https://www.iana.org/domains/root/db/axa.html
  19649. axa
  19650. // azure : Microsoft Corporation
  19651. // https://www.iana.org/domains/root/db/azure.html
  19652. azure
  19653. // baby : XYZ.COM LLC
  19654. // https://www.iana.org/domains/root/db/baby.html
  19655. baby
  19656. // baidu : Baidu, Inc.
  19657. // https://www.iana.org/domains/root/db/baidu.html
  19658. baidu
  19659. // banamex : Citigroup Inc.
  19660. // https://www.iana.org/domains/root/db/banamex.html
  19661. banamex
  19662. // bananarepublic : The Gap, Inc.
  19663. // https://www.iana.org/domains/root/db/bananarepublic.html
  19664. bananarepublic
  19665. // band : Dog Beach, LLC
  19666. // https://www.iana.org/domains/root/db/band.html
  19667. band
  19668. // bank : fTLD Registry Services LLC
  19669. // https://www.iana.org/domains/root/db/bank.html
  19670. bank
  19671. // bar : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
  19672. // https://www.iana.org/domains/root/db/bar.html
  19673. bar
  19674. // barcelona : Municipi de Barcelona
  19675. // https://www.iana.org/domains/root/db/barcelona.html
  19676. barcelona
  19677. // barclaycard : Barclays Bank PLC
  19678. // https://www.iana.org/domains/root/db/barclaycard.html
  19679. barclaycard
  19680. // barclays : Barclays Bank PLC
  19681. // https://www.iana.org/domains/root/db/barclays.html
  19682. barclays
  19683. // barefoot : Gallo Vineyards, Inc.
  19684. // https://www.iana.org/domains/root/db/barefoot.html
  19685. barefoot
  19686. // bargains : Binky Moon, LLC
  19687. // https://www.iana.org/domains/root/db/bargains.html
  19688. bargains
  19689. // baseball : MLB Advanced Media DH, LLC
  19690. // https://www.iana.org/domains/root/db/baseball.html
  19691. baseball
  19692. // basketball : Fédération Internationale de Basketball (FIBA)
  19693. // https://www.iana.org/domains/root/db/basketball.html
  19694. basketball
  19695. // bauhaus : Werkhaus GmbH
  19696. // https://www.iana.org/domains/root/db/bauhaus.html
  19697. bauhaus
  19698. // bayern : Bayern Connect GmbH
  19699. // https://www.iana.org/domains/root/db/bayern.html
  19700. bayern
  19701. // bbc : British Broadcasting Corporation
  19702. // https://www.iana.org/domains/root/db/bbc.html
  19703. bbc
  19704. // bbt : BB&T Corporation
  19705. // https://www.iana.org/domains/root/db/bbt.html
  19706. bbt
  19707. // bbva : BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
  19708. // https://www.iana.org/domains/root/db/bbva.html
  19709. bbva
  19710. // bcg : The Boston Consulting Group, Inc.
  19711. // https://www.iana.org/domains/root/db/bcg.html
  19712. bcg
  19713. // bcn : Municipi de Barcelona
  19714. // https://www.iana.org/domains/root/db/bcn.html
  19715. bcn
  19716. // beats : Beats Electronics, LLC
  19717. // https://www.iana.org/domains/root/db/beats.html
  19718. beats
  19719. // beauty : XYZ.COM LLC
  19720. // https://www.iana.org/domains/root/db/beauty.html
  19721. beauty
  19722. // beer : Registry Services, LLC
  19723. // https://www.iana.org/domains/root/db/beer.html
  19724. beer
  19725. // bentley : Bentley Motors Limited
  19726. // https://www.iana.org/domains/root/db/bentley.html
  19727. bentley
  19728. // berlin : dotBERLIN GmbH & Co. KG
  19729. // https://www.iana.org/domains/root/db/berlin.html
  19730. berlin
  19731. // best : BestTLD Pty Ltd
  19732. // https://www.iana.org/domains/root/db/best.html
  19733. best
  19734. // bestbuy : BBY Solutions, Inc.
  19735. // https://www.iana.org/domains/root/db/bestbuy.html
  19736. bestbuy
  19737. // bet : Identity Digital Limited
  19738. // https://www.iana.org/domains/root/db/bet.html
  19739. bet
  19740. // bharti : Bharti Enterprises (Holding) Private Limited
  19741. // https://www.iana.org/domains/root/db/bharti.html
  19742. bharti
  19743. // bible : American Bible Society
  19744. // https://www.iana.org/domains/root/db/bible.html
  19745. bible
  19746. // bid : dot Bid Limited
  19747. // https://www.iana.org/domains/root/db/bid.html
  19748. bid
  19749. // bike : Binky Moon, LLC
  19750. // https://www.iana.org/domains/root/db/bike.html
  19751. bike
  19752. // bing : Microsoft Corporation
  19753. // https://www.iana.org/domains/root/db/bing.html
  19754. bing
  19755. // bingo : Binky Moon, LLC
  19756. // https://www.iana.org/domains/root/db/bingo.html
  19757. bingo
  19758. // bio : Identity Digital Limited
  19759. // https://www.iana.org/domains/root/db/bio.html
  19760. bio
  19761. // black : Identity Digital Limited
  19762. // https://www.iana.org/domains/root/db/black.html
  19763. black
  19764. // blackfriday : Registry Services, LLC
  19765. // https://www.iana.org/domains/root/db/blackfriday.html
  19766. blackfriday
  19767. // blockbuster : Dish DBS Corporation
  19768. // https://www.iana.org/domains/root/db/blockbuster.html
  19769. blockbuster
  19770. // blog : Knock Knock WHOIS There, LLC
  19771. // https://www.iana.org/domains/root/db/blog.html
  19772. blog
  19773. // bloomberg : Bloomberg IP Holdings LLC
  19774. // https://www.iana.org/domains/root/db/bloomberg.html
  19775. bloomberg
  19776. // blue : Identity Digital Limited
  19777. // https://www.iana.org/domains/root/db/blue.html
  19778. blue
  19779. // bms : Bristol-Myers Squibb Company
  19780. // https://www.iana.org/domains/root/db/bms.html
  19781. bms
  19782. // bmw : Bayerische Motoren Werke Aktiengesellschaft
  19783. // https://www.iana.org/domains/root/db/bmw.html
  19784. bmw
  19785. // bnpparibas : BNP Paribas
  19786. // https://www.iana.org/domains/root/db/bnpparibas.html
  19787. bnpparibas
  19788. // boats : XYZ.COM LLC
  19789. // https://www.iana.org/domains/root/db/boats.html
  19790. boats
  19791. // boehringer : Boehringer Ingelheim International GmbH
  19792. // https://www.iana.org/domains/root/db/boehringer.html
  19793. boehringer
  19794. // bofa : Bank of America Corporation
  19795. // https://www.iana.org/domains/root/db/bofa.html
  19796. bofa
  19797. // bom : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
  19798. // https://www.iana.org/domains/root/db/bom.html
  19799. bom
  19800. // bond : ShortDot SA
  19801. // https://www.iana.org/domains/root/db/bond.html
  19802. bond
  19803. // boo : Charleston Road Registry Inc.
  19804. // https://www.iana.org/domains/root/db/boo.html
  19805. boo
  19806. // book : Amazon Registry Services, Inc.
  19807. // https://www.iana.org/domains/root/db/book.html
  19808. book
  19809. // booking : Booking.com B.V.
  19810. // https://www.iana.org/domains/root/db/booking.html
  19811. booking
  19812. // bosch : Robert Bosch GMBH
  19813. // https://www.iana.org/domains/root/db/bosch.html
  19814. bosch
  19815. // bostik : Bostik SA
  19816. // https://www.iana.org/domains/root/db/bostik.html
  19817. bostik
  19818. // boston : Registry Services, LLC
  19819. // https://www.iana.org/domains/root/db/boston.html
  19820. boston
  19821. // bot : Amazon Registry Services, Inc.
  19822. // https://www.iana.org/domains/root/db/bot.html
  19823. bot
  19824. // boutique : Binky Moon, LLC
  19825. // https://www.iana.org/domains/root/db/boutique.html
  19826. boutique
  19827. // box : Intercap Registry Inc.
  19828. // https://www.iana.org/domains/root/db/box.html
  19829. box
  19830. // bradesco : Banco Bradesco S.A.
  19831. // https://www.iana.org/domains/root/db/bradesco.html
  19832. bradesco
  19833. // bridgestone : Bridgestone Corporation
  19834. // https://www.iana.org/domains/root/db/bridgestone.html
  19835. bridgestone
  19836. // broadway : Celebrate Broadway, Inc.
  19837. // https://www.iana.org/domains/root/db/broadway.html
  19838. broadway
  19839. // broker : Dog Beach, LLC
  19840. // https://www.iana.org/domains/root/db/broker.html
  19841. broker
  19842. // brother : Brother Industries, Ltd.
  19843. // https://www.iana.org/domains/root/db/brother.html
  19844. brother
  19845. // brussels : DNS.be vzw
  19846. // https://www.iana.org/domains/root/db/brussels.html
  19847. brussels
  19848. // build : Plan Bee LLC
  19849. // https://www.iana.org/domains/root/db/build.html
  19850. build
  19851. // builders : Binky Moon, LLC
  19852. // https://www.iana.org/domains/root/db/builders.html
  19853. builders
  19854. // business : Binky Moon, LLC
  19855. // https://www.iana.org/domains/root/db/business.html
  19856. business
  19857. // buy : Amazon Registry Services, Inc.
  19858. // https://www.iana.org/domains/root/db/buy.html
  19859. buy
  19860. // buzz : DOTSTRATEGY CO.
  19861. // https://www.iana.org/domains/root/db/buzz.html
  19862. buzz
  19863. // bzh : Association www.bzh
  19864. // https://www.iana.org/domains/root/db/bzh.html
  19865. bzh
  19866. // cab : Binky Moon, LLC
  19867. // https://www.iana.org/domains/root/db/cab.html
  19868. cab
  19869. // cafe : Binky Moon, LLC
  19870. // https://www.iana.org/domains/root/db/cafe.html
  19871. cafe
  19872. // cal : Charleston Road Registry Inc.
  19873. // https://www.iana.org/domains/root/db/cal.html
  19874. cal
  19875. // call : Amazon Registry Services, Inc.
  19876. // https://www.iana.org/domains/root/db/call.html
  19877. call
  19878. // calvinklein : PVH gTLD Holdings LLC
  19879. // https://www.iana.org/domains/root/db/calvinklein.html
  19880. calvinklein
  19881. // cam : Cam Connecting SARL
  19882. // https://www.iana.org/domains/root/db/cam.html
  19883. cam
  19884. // camera : Binky Moon, LLC
  19885. // https://www.iana.org/domains/root/db/camera.html
  19886. camera
  19887. // camp : Binky Moon, LLC
  19888. // https://www.iana.org/domains/root/db/camp.html
  19889. camp
  19890. // canon : Canon Inc.
  19891. // https://www.iana.org/domains/root/db/canon.html
  19892. canon
  19893. // capetown : ZA Central Registry NPC trading as ZA Central Registry
  19894. // https://www.iana.org/domains/root/db/capetown.html
  19895. capetown
  19896. // capital : Binky Moon, LLC
  19897. // https://www.iana.org/domains/root/db/capital.html
  19898. capital
  19899. // capitalone : Capital One Financial Corporation
  19900. // https://www.iana.org/domains/root/db/capitalone.html
  19901. capitalone
  19902. // car : XYZ.COM LLC
  19903. // https://www.iana.org/domains/root/db/car.html
  19904. car
  19905. // caravan : Caravan International, Inc.
  19906. // https://www.iana.org/domains/root/db/caravan.html
  19907. caravan
  19908. // cards : Binky Moon, LLC
  19909. // https://www.iana.org/domains/root/db/cards.html
  19910. cards
  19911. // care : Binky Moon, LLC
  19912. // https://www.iana.org/domains/root/db/care.html
  19913. care
  19914. // career : dotCareer LLC
  19915. // https://www.iana.org/domains/root/db/career.html
  19916. career
  19917. // careers : Binky Moon, LLC
  19918. // https://www.iana.org/domains/root/db/careers.html
  19919. careers
  19920. // cars : XYZ.COM LLC
  19921. // https://www.iana.org/domains/root/db/cars.html
  19922. cars
  19923. // casa : Registry Services, LLC
  19924. // https://www.iana.org/domains/root/db/casa.html
  19925. casa
  19926. // case : Digity, LLC
  19927. // https://www.iana.org/domains/root/db/case.html
  19928. case
  19929. // cash : Binky Moon, LLC
  19930. // https://www.iana.org/domains/root/db/cash.html
  19931. cash
  19932. // casino : Binky Moon, LLC
  19933. // https://www.iana.org/domains/root/db/casino.html
  19934. casino
  19935. // catering : Binky Moon, LLC
  19936. // https://www.iana.org/domains/root/db/catering.html
  19937. catering
  19938. // catholic : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  19939. // https://www.iana.org/domains/root/db/catholic.html
  19940. catholic
  19941. // cba : COMMONWEALTH BANK OF AUSTRALIA
  19942. // https://www.iana.org/domains/root/db/cba.html
  19943. cba
  19944. // cbn : The Christian Broadcasting Network, Inc.
  19945. // https://www.iana.org/domains/root/db/cbn.html
  19946. cbn
  19947. // cbre : CBRE, Inc.
  19948. // https://www.iana.org/domains/root/db/cbre.html
  19949. cbre
  19950. // cbs : CBS Domains Inc.
  19951. // https://www.iana.org/domains/root/db/cbs.html
  19952. cbs
  19953. // center : Binky Moon, LLC
  19954. // https://www.iana.org/domains/root/db/center.html
  19955. center
  19956. // ceo : XYZ.COM LLC
  19957. // https://www.iana.org/domains/root/db/ceo.html
  19958. ceo
  19959. // cern : European Organization for Nuclear Research ("CERN")
  19960. // https://www.iana.org/domains/root/db/cern.html
  19961. cern
  19962. // cfa : CFA Institute
  19963. // https://www.iana.org/domains/root/db/cfa.html
  19964. cfa
  19965. // cfd : ShortDot SA
  19966. // https://www.iana.org/domains/root/db/cfd.html
  19967. cfd
  19968. // chanel : Chanel International B.V.
  19969. // https://www.iana.org/domains/root/db/chanel.html
  19970. chanel
  19971. // channel : Charleston Road Registry Inc.
  19972. // https://www.iana.org/domains/root/db/channel.html
  19973. channel
  19974. // charity : Public Interest Registry
  19975. // https://www.iana.org/domains/root/db/charity.html
  19976. charity
  19977. // chase : JPMorgan Chase Bank, National Association
  19978. // https://www.iana.org/domains/root/db/chase.html
  19979. chase
  19980. // chat : Binky Moon, LLC
  19981. // https://www.iana.org/domains/root/db/chat.html
  19982. chat
  19983. // cheap : Binky Moon, LLC
  19984. // https://www.iana.org/domains/root/db/cheap.html
  19985. cheap
  19986. // chintai : CHINTAI Corporation
  19987. // https://www.iana.org/domains/root/db/chintai.html
  19988. chintai
  19989. // christmas : XYZ.COM LLC
  19990. // https://www.iana.org/domains/root/db/christmas.html
  19991. christmas
  19992. // chrome : Charleston Road Registry Inc.
  19993. // https://www.iana.org/domains/root/db/chrome.html
  19994. chrome
  19995. // church : Binky Moon, LLC
  19996. // https://www.iana.org/domains/root/db/church.html
  19997. church
  19998. // cipriani : Hotel Cipriani Srl
  19999. // https://www.iana.org/domains/root/db/cipriani.html
  20000. cipriani
  20001. // circle : Amazon Registry Services, Inc.
  20002. // https://www.iana.org/domains/root/db/circle.html
  20003. circle
  20004. // cisco : Cisco Technology, Inc.
  20005. // https://www.iana.org/domains/root/db/cisco.html
  20006. cisco
  20007. // citadel : Citadel Domain LLC
  20008. // https://www.iana.org/domains/root/db/citadel.html
  20009. citadel
  20010. // citi : Citigroup Inc.
  20011. // https://www.iana.org/domains/root/db/citi.html
  20012. citi
  20013. // citic : CITIC Group Corporation
  20014. // https://www.iana.org/domains/root/db/citic.html
  20015. citic
  20016. // city : Binky Moon, LLC
  20017. // https://www.iana.org/domains/root/db/city.html
  20018. city
  20019. // claims : Binky Moon, LLC
  20020. // https://www.iana.org/domains/root/db/claims.html
  20021. claims
  20022. // cleaning : Binky Moon, LLC
  20023. // https://www.iana.org/domains/root/db/cleaning.html
  20024. cleaning
  20025. // click : Internet Naming Company LLC
  20026. // https://www.iana.org/domains/root/db/click.html
  20027. click
  20028. // clinic : Binky Moon, LLC
  20029. // https://www.iana.org/domains/root/db/clinic.html
  20030. clinic
  20031. // clinique : The Estée Lauder Companies Inc.
  20032. // https://www.iana.org/domains/root/db/clinique.html
  20033. clinique
  20034. // clothing : Binky Moon, LLC
  20035. // https://www.iana.org/domains/root/db/clothing.html
  20036. clothing
  20037. // cloud : Aruba PEC S.p.A.
  20038. // https://www.iana.org/domains/root/db/cloud.html
  20039. cloud
  20040. // club : Registry Services, LLC
  20041. // https://www.iana.org/domains/root/db/club.html
  20042. club
  20043. // clubmed : Club Méditerranée S.A.
  20044. // https://www.iana.org/domains/root/db/clubmed.html
  20045. clubmed
  20046. // coach : Binky Moon, LLC
  20047. // https://www.iana.org/domains/root/db/coach.html
  20048. coach
  20049. // codes : Binky Moon, LLC
  20050. // https://www.iana.org/domains/root/db/codes.html
  20051. codes
  20052. // coffee : Binky Moon, LLC
  20053. // https://www.iana.org/domains/root/db/coffee.html
  20054. coffee
  20055. // college : XYZ.COM LLC
  20056. // https://www.iana.org/domains/root/db/college.html
  20057. college
  20058. // cologne : dotKoeln GmbH
  20059. // https://www.iana.org/domains/root/db/cologne.html
  20060. cologne
  20061. // comcast : Comcast IP Holdings I, LLC
  20062. // https://www.iana.org/domains/root/db/comcast.html
  20063. comcast
  20064. // commbank : COMMONWEALTH BANK OF AUSTRALIA
  20065. // https://www.iana.org/domains/root/db/commbank.html
  20066. commbank
  20067. // community : Binky Moon, LLC
  20068. // https://www.iana.org/domains/root/db/community.html
  20069. community
  20070. // company : Binky Moon, LLC
  20071. // https://www.iana.org/domains/root/db/company.html
  20072. company
  20073. // compare : Registry Services, LLC
  20074. // https://www.iana.org/domains/root/db/compare.html
  20075. compare
  20076. // computer : Binky Moon, LLC
  20077. // https://www.iana.org/domains/root/db/computer.html
  20078. computer
  20079. // comsec : VeriSign, Inc.
  20080. // https://www.iana.org/domains/root/db/comsec.html
  20081. comsec
  20082. // condos : Binky Moon, LLC
  20083. // https://www.iana.org/domains/root/db/condos.html
  20084. condos
  20085. // construction : Binky Moon, LLC
  20086. // https://www.iana.org/domains/root/db/construction.html
  20087. construction
  20088. // consulting : Dog Beach, LLC
  20089. // https://www.iana.org/domains/root/db/consulting.html
  20090. consulting
  20091. // contact : Dog Beach, LLC
  20092. // https://www.iana.org/domains/root/db/contact.html
  20093. contact
  20094. // contractors : Binky Moon, LLC
  20095. // https://www.iana.org/domains/root/db/contractors.html
  20096. contractors
  20097. // cooking : Registry Services, LLC
  20098. // https://www.iana.org/domains/root/db/cooking.html
  20099. cooking
  20100. // cool : Binky Moon, LLC
  20101. // https://www.iana.org/domains/root/db/cool.html
  20102. cool
  20103. // corsica : Collectivité de Corse
  20104. // https://www.iana.org/domains/root/db/corsica.html
  20105. corsica
  20106. // country : Internet Naming Company LLC
  20107. // https://www.iana.org/domains/root/db/country.html
  20108. country
  20109. // coupon : Amazon Registry Services, Inc.
  20110. // https://www.iana.org/domains/root/db/coupon.html
  20111. coupon
  20112. // coupons : Binky Moon, LLC
  20113. // https://www.iana.org/domains/root/db/coupons.html
  20114. coupons
  20115. // courses : Registry Services, LLC
  20116. // https://www.iana.org/domains/root/db/courses.html
  20117. courses
  20118. // cpa : American Institute of Certified Public Accountants
  20119. // https://www.iana.org/domains/root/db/cpa.html
  20120. cpa
  20121. // credit : Binky Moon, LLC
  20122. // https://www.iana.org/domains/root/db/credit.html
  20123. credit
  20124. // creditcard : Binky Moon, LLC
  20125. // https://www.iana.org/domains/root/db/creditcard.html
  20126. creditcard
  20127. // creditunion : DotCooperation LLC
  20128. // https://www.iana.org/domains/root/db/creditunion.html
  20129. creditunion
  20130. // cricket : dot Cricket Limited
  20131. // https://www.iana.org/domains/root/db/cricket.html
  20132. cricket
  20133. // crown : Crown Equipment Corporation
  20134. // https://www.iana.org/domains/root/db/crown.html
  20135. crown
  20136. // crs : Federated Co-operatives Limited
  20137. // https://www.iana.org/domains/root/db/crs.html
  20138. crs
  20139. // cruise : Viking River Cruises (Bermuda) Ltd.
  20140. // https://www.iana.org/domains/root/db/cruise.html
  20141. cruise
  20142. // cruises : Binky Moon, LLC
  20143. // https://www.iana.org/domains/root/db/cruises.html
  20144. cruises
  20145. // cuisinella : SCHMIDT GROUPE S.A.S.
  20146. // https://www.iana.org/domains/root/db/cuisinella.html
  20147. cuisinella
  20148. // cymru : Nominet UK
  20149. // https://www.iana.org/domains/root/db/cymru.html
  20150. cymru
  20151. // cyou : ShortDot SA
  20152. // https://www.iana.org/domains/root/db/cyou.html
  20153. cyou
  20154. // dabur : Dabur India Limited
  20155. // https://www.iana.org/domains/root/db/dabur.html
  20156. dabur
  20157. // dad : Charleston Road Registry Inc.
  20158. // https://www.iana.org/domains/root/db/dad.html
  20159. dad
  20160. // dance : Dog Beach, LLC
  20161. // https://www.iana.org/domains/root/db/dance.html
  20162. dance
  20163. // data : Dish DBS Corporation
  20164. // https://www.iana.org/domains/root/db/data.html
  20165. data
  20166. // date : dot Date Limited
  20167. // https://www.iana.org/domains/root/db/date.html
  20168. date
  20169. // dating : Binky Moon, LLC
  20170. // https://www.iana.org/domains/root/db/dating.html
  20171. dating
  20172. // datsun : NISSAN MOTOR CO., LTD.
  20173. // https://www.iana.org/domains/root/db/datsun.html
  20174. datsun
  20175. // day : Charleston Road Registry Inc.
  20176. // https://www.iana.org/domains/root/db/day.html
  20177. day
  20178. // dclk : Charleston Road Registry Inc.
  20179. // https://www.iana.org/domains/root/db/dclk.html
  20180. dclk
  20181. // dds : Registry Services, LLC
  20182. // https://www.iana.org/domains/root/db/dds.html
  20183. dds
  20184. // deal : Amazon Registry Services, Inc.
  20185. // https://www.iana.org/domains/root/db/deal.html
  20186. deal
  20187. // dealer : Intercap Registry Inc.
  20188. // https://www.iana.org/domains/root/db/dealer.html
  20189. dealer
  20190. // deals : Binky Moon, LLC
  20191. // https://www.iana.org/domains/root/db/deals.html
  20192. deals
  20193. // degree : Dog Beach, LLC
  20194. // https://www.iana.org/domains/root/db/degree.html
  20195. degree
  20196. // delivery : Binky Moon, LLC
  20197. // https://www.iana.org/domains/root/db/delivery.html
  20198. delivery
  20199. // dell : Dell Inc.
  20200. // https://www.iana.org/domains/root/db/dell.html
  20201. dell
  20202. // deloitte : Deloitte Touche Tohmatsu
  20203. // https://www.iana.org/domains/root/db/deloitte.html
  20204. deloitte
  20205. // delta : Delta Air Lines, Inc.
  20206. // https://www.iana.org/domains/root/db/delta.html
  20207. delta
  20208. // democrat : Dog Beach, LLC
  20209. // https://www.iana.org/domains/root/db/democrat.html
  20210. democrat
  20211. // dental : Binky Moon, LLC
  20212. // https://www.iana.org/domains/root/db/dental.html
  20213. dental
  20214. // dentist : Dog Beach, LLC
  20215. // https://www.iana.org/domains/root/db/dentist.html
  20216. dentist
  20217. // desi : Desi Networks LLC
  20218. // https://www.iana.org/domains/root/db/desi.html
  20219. desi
  20220. // design : Registry Services, LLC
  20221. // https://www.iana.org/domains/root/db/design.html
  20222. design
  20223. // dev : Charleston Road Registry Inc.
  20224. // https://www.iana.org/domains/root/db/dev.html
  20225. dev
  20226. // dhl : Deutsche Post AG
  20227. // https://www.iana.org/domains/root/db/dhl.html
  20228. dhl
  20229. // diamonds : Binky Moon, LLC
  20230. // https://www.iana.org/domains/root/db/diamonds.html
  20231. diamonds
  20232. // diet : XYZ.COM LLC
  20233. // https://www.iana.org/domains/root/db/diet.html
  20234. diet
  20235. // digital : Binky Moon, LLC
  20236. // https://www.iana.org/domains/root/db/digital.html
  20237. digital
  20238. // direct : Binky Moon, LLC
  20239. // https://www.iana.org/domains/root/db/direct.html
  20240. direct
  20241. // directory : Binky Moon, LLC
  20242. // https://www.iana.org/domains/root/db/directory.html
  20243. directory
  20244. // discount : Binky Moon, LLC
  20245. // https://www.iana.org/domains/root/db/discount.html
  20246. discount
  20247. // discover : Discover Financial Services
  20248. // https://www.iana.org/domains/root/db/discover.html
  20249. discover
  20250. // dish : Dish DBS Corporation
  20251. // https://www.iana.org/domains/root/db/dish.html
  20252. dish
  20253. // diy : Lifestyle Domain Holdings, Inc.
  20254. // https://www.iana.org/domains/root/db/diy.html
  20255. diy
  20256. // dnp : Dai Nippon Printing Co., Ltd.
  20257. // https://www.iana.org/domains/root/db/dnp.html
  20258. dnp
  20259. // docs : Charleston Road Registry Inc.
  20260. // https://www.iana.org/domains/root/db/docs.html
  20261. docs
  20262. // doctor : Binky Moon, LLC
  20263. // https://www.iana.org/domains/root/db/doctor.html
  20264. doctor
  20265. // dog : Binky Moon, LLC
  20266. // https://www.iana.org/domains/root/db/dog.html
  20267. dog
  20268. // domains : Binky Moon, LLC
  20269. // https://www.iana.org/domains/root/db/domains.html
  20270. domains
  20271. // dot : Dish DBS Corporation
  20272. // https://www.iana.org/domains/root/db/dot.html
  20273. dot
  20274. // download : dot Support Limited
  20275. // https://www.iana.org/domains/root/db/download.html
  20276. download
  20277. // drive : Charleston Road Registry Inc.
  20278. // https://www.iana.org/domains/root/db/drive.html
  20279. drive
  20280. // dtv : Dish DBS Corporation
  20281. // https://www.iana.org/domains/root/db/dtv.html
  20282. dtv
  20283. // dubai : Dubai Smart Government Department
  20284. // https://www.iana.org/domains/root/db/dubai.html
  20285. dubai
  20286. // dunlop : The Goodyear Tire & Rubber Company
  20287. // https://www.iana.org/domains/root/db/dunlop.html
  20288. dunlop
  20289. // dupont : DuPont Specialty Products USA, LLC
  20290. // https://www.iana.org/domains/root/db/dupont.html
  20291. dupont
  20292. // durban : ZA Central Registry NPC trading as ZA Central Registry
  20293. // https://www.iana.org/domains/root/db/durban.html
  20294. durban
  20295. // dvag : Deutsche Vermögensberatung Aktiengesellschaft DVAG
  20296. // https://www.iana.org/domains/root/db/dvag.html
  20297. dvag
  20298. // dvr : DISH Technologies L.L.C.
  20299. // https://www.iana.org/domains/root/db/dvr.html
  20300. dvr
  20301. // earth : Interlink Systems Innovation Institute K.K.
  20302. // https://www.iana.org/domains/root/db/earth.html
  20303. earth
  20304. // eat : Charleston Road Registry Inc.
  20305. // https://www.iana.org/domains/root/db/eat.html
  20306. eat
  20307. // eco : Big Room Inc.
  20308. // https://www.iana.org/domains/root/db/eco.html
  20309. eco
  20310. // edeka : EDEKA Verband kaufmännischer Genossenschaften e.V.
  20311. // https://www.iana.org/domains/root/db/edeka.html
  20312. edeka
  20313. // education : Binky Moon, LLC
  20314. // https://www.iana.org/domains/root/db/education.html
  20315. education
  20316. // email : Binky Moon, LLC
  20317. // https://www.iana.org/domains/root/db/email.html
  20318. email
  20319. // emerck : Merck KGaA
  20320. // https://www.iana.org/domains/root/db/emerck.html
  20321. emerck
  20322. // energy : Binky Moon, LLC
  20323. // https://www.iana.org/domains/root/db/energy.html
  20324. energy
  20325. // engineer : Dog Beach, LLC
  20326. // https://www.iana.org/domains/root/db/engineer.html
  20327. engineer
  20328. // engineering : Binky Moon, LLC
  20329. // https://www.iana.org/domains/root/db/engineering.html
  20330. engineering
  20331. // enterprises : Binky Moon, LLC
  20332. // https://www.iana.org/domains/root/db/enterprises.html
  20333. enterprises
  20334. // epson : Seiko Epson Corporation
  20335. // https://www.iana.org/domains/root/db/epson.html
  20336. epson
  20337. // equipment : Binky Moon, LLC
  20338. // https://www.iana.org/domains/root/db/equipment.html
  20339. equipment
  20340. // ericsson : Telefonaktiebolaget L M Ericsson
  20341. // https://www.iana.org/domains/root/db/ericsson.html
  20342. ericsson
  20343. // erni : ERNI Group Holding AG
  20344. // https://www.iana.org/domains/root/db/erni.html
  20345. erni
  20346. // esq : Charleston Road Registry Inc.
  20347. // https://www.iana.org/domains/root/db/esq.html
  20348. esq
  20349. // estate : Binky Moon, LLC
  20350. // https://www.iana.org/domains/root/db/estate.html
  20351. estate
  20352. // etisalat : Emirates Telecommunications Corporation (trading as Etisalat)
  20353. // https://www.iana.org/domains/root/db/etisalat.html
  20354. etisalat
  20355. // eurovision : European Broadcasting Union (EBU)
  20356. // https://www.iana.org/domains/root/db/eurovision.html
  20357. eurovision
  20358. // eus : Puntueus Fundazioa
  20359. // https://www.iana.org/domains/root/db/eus.html
  20360. eus
  20361. // events : Binky Moon, LLC
  20362. // https://www.iana.org/domains/root/db/events.html
  20363. events
  20364. // exchange : Binky Moon, LLC
  20365. // https://www.iana.org/domains/root/db/exchange.html
  20366. exchange
  20367. // expert : Binky Moon, LLC
  20368. // https://www.iana.org/domains/root/db/expert.html
  20369. expert
  20370. // exposed : Binky Moon, LLC
  20371. // https://www.iana.org/domains/root/db/exposed.html
  20372. exposed
  20373. // express : Binky Moon, LLC
  20374. // https://www.iana.org/domains/root/db/express.html
  20375. express
  20376. // extraspace : Extra Space Storage LLC
  20377. // https://www.iana.org/domains/root/db/extraspace.html
  20378. extraspace
  20379. // fage : Fage International S.A.
  20380. // https://www.iana.org/domains/root/db/fage.html
  20381. fage
  20382. // fail : Binky Moon, LLC
  20383. // https://www.iana.org/domains/root/db/fail.html
  20384. fail
  20385. // fairwinds : FairWinds Partners, LLC
  20386. // https://www.iana.org/domains/root/db/fairwinds.html
  20387. fairwinds
  20388. // faith : dot Faith Limited
  20389. // https://www.iana.org/domains/root/db/faith.html
  20390. faith
  20391. // family : Dog Beach, LLC
  20392. // https://www.iana.org/domains/root/db/family.html
  20393. family
  20394. // fan : Dog Beach, LLC
  20395. // https://www.iana.org/domains/root/db/fan.html
  20396. fan
  20397. // fans : ZDNS International Limited
  20398. // https://www.iana.org/domains/root/db/fans.html
  20399. fans
  20400. // farm : Binky Moon, LLC
  20401. // https://www.iana.org/domains/root/db/farm.html
  20402. farm
  20403. // farmers : Farmers Insurance Exchange
  20404. // https://www.iana.org/domains/root/db/farmers.html
  20405. farmers
  20406. // fashion : Registry Services, LLC
  20407. // https://www.iana.org/domains/root/db/fashion.html
  20408. fashion
  20409. // fast : Amazon Registry Services, Inc.
  20410. // https://www.iana.org/domains/root/db/fast.html
  20411. fast
  20412. // fedex : Federal Express Corporation
  20413. // https://www.iana.org/domains/root/db/fedex.html
  20414. fedex
  20415. // feedback : Top Level Spectrum, Inc.
  20416. // https://www.iana.org/domains/root/db/feedback.html
  20417. feedback
  20418. // ferrari : Fiat Chrysler Automobiles N.V.
  20419. // https://www.iana.org/domains/root/db/ferrari.html
  20420. ferrari
  20421. // ferrero : Ferrero Trading Lux S.A.
  20422. // https://www.iana.org/domains/root/db/ferrero.html
  20423. ferrero
  20424. // fidelity : Fidelity Brokerage Services LLC
  20425. // https://www.iana.org/domains/root/db/fidelity.html
  20426. fidelity
  20427. // fido : Rogers Communications Canada Inc.
  20428. // https://www.iana.org/domains/root/db/fido.html
  20429. fido
  20430. // film : Motion Picture Domain Registry Pty Ltd
  20431. // https://www.iana.org/domains/root/db/film.html
  20432. film
  20433. // final : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
  20434. // https://www.iana.org/domains/root/db/final.html
  20435. final
  20436. // finance : Binky Moon, LLC
  20437. // https://www.iana.org/domains/root/db/finance.html
  20438. finance
  20439. // financial : Binky Moon, LLC
  20440. // https://www.iana.org/domains/root/db/financial.html
  20441. financial
  20442. // fire : Amazon Registry Services, Inc.
  20443. // https://www.iana.org/domains/root/db/fire.html
  20444. fire
  20445. // firestone : Bridgestone Licensing Services, Inc
  20446. // https://www.iana.org/domains/root/db/firestone.html
  20447. firestone
  20448. // firmdale : Firmdale Holdings Limited
  20449. // https://www.iana.org/domains/root/db/firmdale.html
  20450. firmdale
  20451. // fish : Binky Moon, LLC
  20452. // https://www.iana.org/domains/root/db/fish.html
  20453. fish
  20454. // fishing : Registry Services, LLC
  20455. // https://www.iana.org/domains/root/db/fishing.html
  20456. fishing
  20457. // fit : Registry Services, LLC
  20458. // https://www.iana.org/domains/root/db/fit.html
  20459. fit
  20460. // fitness : Binky Moon, LLC
  20461. // https://www.iana.org/domains/root/db/fitness.html
  20462. fitness
  20463. // flickr : Flickr, Inc.
  20464. // https://www.iana.org/domains/root/db/flickr.html
  20465. flickr
  20466. // flights : Binky Moon, LLC
  20467. // https://www.iana.org/domains/root/db/flights.html
  20468. flights
  20469. // flir : FLIR Systems, Inc.
  20470. // https://www.iana.org/domains/root/db/flir.html
  20471. flir
  20472. // florist : Binky Moon, LLC
  20473. // https://www.iana.org/domains/root/db/florist.html
  20474. florist
  20475. // flowers : XYZ.COM LLC
  20476. // https://www.iana.org/domains/root/db/flowers.html
  20477. flowers
  20478. // fly : Charleston Road Registry Inc.
  20479. // https://www.iana.org/domains/root/db/fly.html
  20480. fly
  20481. // foo : Charleston Road Registry Inc.
  20482. // https://www.iana.org/domains/root/db/foo.html
  20483. foo
  20484. // food : Lifestyle Domain Holdings, Inc.
  20485. // https://www.iana.org/domains/root/db/food.html
  20486. food
  20487. // football : Binky Moon, LLC
  20488. // https://www.iana.org/domains/root/db/football.html
  20489. football
  20490. // ford : Ford Motor Company
  20491. // https://www.iana.org/domains/root/db/ford.html
  20492. ford
  20493. // forex : Dog Beach, LLC
  20494. // https://www.iana.org/domains/root/db/forex.html
  20495. forex
  20496. // forsale : Dog Beach, LLC
  20497. // https://www.iana.org/domains/root/db/forsale.html
  20498. forsale
  20499. // forum : Fegistry, LLC
  20500. // https://www.iana.org/domains/root/db/forum.html
  20501. forum
  20502. // foundation : Public Interest Registry
  20503. // https://www.iana.org/domains/root/db/foundation.html
  20504. foundation
  20505. // fox : FOX Registry, LLC
  20506. // https://www.iana.org/domains/root/db/fox.html
  20507. fox
  20508. // free : Amazon Registry Services, Inc.
  20509. // https://www.iana.org/domains/root/db/free.html
  20510. free
  20511. // fresenius : Fresenius Immobilien-Verwaltungs-GmbH
  20512. // https://www.iana.org/domains/root/db/fresenius.html
  20513. fresenius
  20514. // frl : FRLregistry B.V.
  20515. // https://www.iana.org/domains/root/db/frl.html
  20516. frl
  20517. // frogans : OP3FT
  20518. // https://www.iana.org/domains/root/db/frogans.html
  20519. frogans
  20520. // frontier : Frontier Communications Corporation
  20521. // https://www.iana.org/domains/root/db/frontier.html
  20522. frontier
  20523. // ftr : Frontier Communications Corporation
  20524. // https://www.iana.org/domains/root/db/ftr.html
  20525. ftr
  20526. // fujitsu : Fujitsu Limited
  20527. // https://www.iana.org/domains/root/db/fujitsu.html
  20528. fujitsu
  20529. // fun : Radix FZC DMCC
  20530. // https://www.iana.org/domains/root/db/fun.html
  20531. fun
  20532. // fund : Binky Moon, LLC
  20533. // https://www.iana.org/domains/root/db/fund.html
  20534. fund
  20535. // furniture : Binky Moon, LLC
  20536. // https://www.iana.org/domains/root/db/furniture.html
  20537. furniture
  20538. // futbol : Dog Beach, LLC
  20539. // https://www.iana.org/domains/root/db/futbol.html
  20540. futbol
  20541. // fyi : Binky Moon, LLC
  20542. // https://www.iana.org/domains/root/db/fyi.html
  20543. fyi
  20544. // gal : Asociación puntoGAL
  20545. // https://www.iana.org/domains/root/db/gal.html
  20546. gal
  20547. // gallery : Binky Moon, LLC
  20548. // https://www.iana.org/domains/root/db/gallery.html
  20549. gallery
  20550. // gallo : Gallo Vineyards, Inc.
  20551. // https://www.iana.org/domains/root/db/gallo.html
  20552. gallo
  20553. // gallup : Gallup, Inc.
  20554. // https://www.iana.org/domains/root/db/gallup.html
  20555. gallup
  20556. // game : XYZ.COM LLC
  20557. // https://www.iana.org/domains/root/db/game.html
  20558. game
  20559. // games : Dog Beach, LLC
  20560. // https://www.iana.org/domains/root/db/games.html
  20561. games
  20562. // gap : The Gap, Inc.
  20563. // https://www.iana.org/domains/root/db/gap.html
  20564. gap
  20565. // garden : Registry Services, LLC
  20566. // https://www.iana.org/domains/root/db/garden.html
  20567. garden
  20568. // gay : Registry Services, LLC
  20569. // https://www.iana.org/domains/root/db/gay.html
  20570. gay
  20571. // gbiz : Charleston Road Registry Inc.
  20572. // https://www.iana.org/domains/root/db/gbiz.html
  20573. gbiz
  20574. // gdn : Joint Stock Company "Navigation-information systems"
  20575. // https://www.iana.org/domains/root/db/gdn.html
  20576. gdn
  20577. // gea : GEA Group Aktiengesellschaft
  20578. // https://www.iana.org/domains/root/db/gea.html
  20579. gea
  20580. // gent : Easyhost BV
  20581. // https://www.iana.org/domains/root/db/gent.html
  20582. gent
  20583. // genting : Resorts World Inc Pte. Ltd.
  20584. // https://www.iana.org/domains/root/db/genting.html
  20585. genting
  20586. // george : Wal-Mart Stores, Inc.
  20587. // https://www.iana.org/domains/root/db/george.html
  20588. george
  20589. // ggee : GMO Internet, Inc.
  20590. // https://www.iana.org/domains/root/db/ggee.html
  20591. ggee
  20592. // gift : DotGift, LLC
  20593. // https://www.iana.org/domains/root/db/gift.html
  20594. gift
  20595. // gifts : Binky Moon, LLC
  20596. // https://www.iana.org/domains/root/db/gifts.html
  20597. gifts
  20598. // gives : Public Interest Registry
  20599. // https://www.iana.org/domains/root/db/gives.html
  20600. gives
  20601. // giving : Public Interest Registry
  20602. // https://www.iana.org/domains/root/db/giving.html
  20603. giving
  20604. // glass : Binky Moon, LLC
  20605. // https://www.iana.org/domains/root/db/glass.html
  20606. glass
  20607. // gle : Charleston Road Registry Inc.
  20608. // https://www.iana.org/domains/root/db/gle.html
  20609. gle
  20610. // global : Identity Digital Limited
  20611. // https://www.iana.org/domains/root/db/global.html
  20612. global
  20613. // globo : Globo Comunicação e Participações S.A
  20614. // https://www.iana.org/domains/root/db/globo.html
  20615. globo
  20616. // gmail : Charleston Road Registry Inc.
  20617. // https://www.iana.org/domains/root/db/gmail.html
  20618. gmail
  20619. // gmbh : Binky Moon, LLC
  20620. // https://www.iana.org/domains/root/db/gmbh.html
  20621. gmbh
  20622. // gmo : GMO Internet, Inc.
  20623. // https://www.iana.org/domains/root/db/gmo.html
  20624. gmo
  20625. // gmx : 1&1 Mail & Media GmbH
  20626. // https://www.iana.org/domains/root/db/gmx.html
  20627. gmx
  20628. // godaddy : Go Daddy East, LLC
  20629. // https://www.iana.org/domains/root/db/godaddy.html
  20630. godaddy
  20631. // gold : Binky Moon, LLC
  20632. // https://www.iana.org/domains/root/db/gold.html
  20633. gold
  20634. // goldpoint : YODOBASHI CAMERA CO.,LTD.
  20635. // https://www.iana.org/domains/root/db/goldpoint.html
  20636. goldpoint
  20637. // golf : Binky Moon, LLC
  20638. // https://www.iana.org/domains/root/db/golf.html
  20639. golf
  20640. // goo : NTT Resonant Inc.
  20641. // https://www.iana.org/domains/root/db/goo.html
  20642. goo
  20643. // goodyear : The Goodyear Tire & Rubber Company
  20644. // https://www.iana.org/domains/root/db/goodyear.html
  20645. goodyear
  20646. // goog : Charleston Road Registry Inc.
  20647. // https://www.iana.org/domains/root/db/goog.html
  20648. goog
  20649. // google : Charleston Road Registry Inc.
  20650. // https://www.iana.org/domains/root/db/google.html
  20651. google
  20652. // gop : Republican State Leadership Committee, Inc.
  20653. // https://www.iana.org/domains/root/db/gop.html
  20654. gop
  20655. // got : Amazon Registry Services, Inc.
  20656. // https://www.iana.org/domains/root/db/got.html
  20657. got
  20658. // grainger : Grainger Registry Services, LLC
  20659. // https://www.iana.org/domains/root/db/grainger.html
  20660. grainger
  20661. // graphics : Binky Moon, LLC
  20662. // https://www.iana.org/domains/root/db/graphics.html
  20663. graphics
  20664. // gratis : Binky Moon, LLC
  20665. // https://www.iana.org/domains/root/db/gratis.html
  20666. gratis
  20667. // green : Identity Digital Limited
  20668. // https://www.iana.org/domains/root/db/green.html
  20669. green
  20670. // gripe : Binky Moon, LLC
  20671. // https://www.iana.org/domains/root/db/gripe.html
  20672. gripe
  20673. // grocery : Wal-Mart Stores, Inc.
  20674. // https://www.iana.org/domains/root/db/grocery.html
  20675. grocery
  20676. // group : Binky Moon, LLC
  20677. // https://www.iana.org/domains/root/db/group.html
  20678. group
  20679. // guardian : The Guardian Life Insurance Company of America
  20680. // https://www.iana.org/domains/root/db/guardian.html
  20681. guardian
  20682. // gucci : Guccio Gucci S.p.a.
  20683. // https://www.iana.org/domains/root/db/gucci.html
  20684. gucci
  20685. // guge : Charleston Road Registry Inc.
  20686. // https://www.iana.org/domains/root/db/guge.html
  20687. guge
  20688. // guide : Binky Moon, LLC
  20689. // https://www.iana.org/domains/root/db/guide.html
  20690. guide
  20691. // guitars : XYZ.COM LLC
  20692. // https://www.iana.org/domains/root/db/guitars.html
  20693. guitars
  20694. // guru : Binky Moon, LLC
  20695. // https://www.iana.org/domains/root/db/guru.html
  20696. guru
  20697. // hair : XYZ.COM LLC
  20698. // https://www.iana.org/domains/root/db/hair.html
  20699. hair
  20700. // hamburg : Hamburg Top-Level-Domain GmbH
  20701. // https://www.iana.org/domains/root/db/hamburg.html
  20702. hamburg
  20703. // hangout : Charleston Road Registry Inc.
  20704. // https://www.iana.org/domains/root/db/hangout.html
  20705. hangout
  20706. // haus : Dog Beach, LLC
  20707. // https://www.iana.org/domains/root/db/haus.html
  20708. haus
  20709. // hbo : HBO Registry Services, Inc.
  20710. // https://www.iana.org/domains/root/db/hbo.html
  20711. hbo
  20712. // hdfc : HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
  20713. // https://www.iana.org/domains/root/db/hdfc.html
  20714. hdfc
  20715. // hdfcbank : HDFC Bank Limited
  20716. // https://www.iana.org/domains/root/db/hdfcbank.html
  20717. hdfcbank
  20718. // health : Registry Services, LLC
  20719. // https://www.iana.org/domains/root/db/health.html
  20720. health
  20721. // healthcare : Binky Moon, LLC
  20722. // https://www.iana.org/domains/root/db/healthcare.html
  20723. healthcare
  20724. // help : Innovation service Limited
  20725. // https://www.iana.org/domains/root/db/help.html
  20726. help
  20727. // helsinki : City of Helsinki
  20728. // https://www.iana.org/domains/root/db/helsinki.html
  20729. helsinki
  20730. // here : Charleston Road Registry Inc.
  20731. // https://www.iana.org/domains/root/db/here.html
  20732. here
  20733. // hermes : HERMES INTERNATIONAL
  20734. // https://www.iana.org/domains/root/db/hermes.html
  20735. hermes
  20736. // hiphop : Dot Hip Hop, LLC
  20737. // https://www.iana.org/domains/root/db/hiphop.html
  20738. hiphop
  20739. // hisamitsu : Hisamitsu Pharmaceutical Co.,Inc.
  20740. // https://www.iana.org/domains/root/db/hisamitsu.html
  20741. hisamitsu
  20742. // hitachi : Hitachi, Ltd.
  20743. // https://www.iana.org/domains/root/db/hitachi.html
  20744. hitachi
  20745. // hiv : Internet Naming Company LLC
  20746. // https://www.iana.org/domains/root/db/hiv.html
  20747. hiv
  20748. // hkt : PCCW-HKT DataCom Services Limited
  20749. // https://www.iana.org/domains/root/db/hkt.html
  20750. hkt
  20751. // hockey : Binky Moon, LLC
  20752. // https://www.iana.org/domains/root/db/hockey.html
  20753. hockey
  20754. // holdings : Binky Moon, LLC
  20755. // https://www.iana.org/domains/root/db/holdings.html
  20756. holdings
  20757. // holiday : Binky Moon, LLC
  20758. // https://www.iana.org/domains/root/db/holiday.html
  20759. holiday
  20760. // homedepot : Home Depot Product Authority, LLC
  20761. // https://www.iana.org/domains/root/db/homedepot.html
  20762. homedepot
  20763. // homegoods : The TJX Companies, Inc.
  20764. // https://www.iana.org/domains/root/db/homegoods.html
  20765. homegoods
  20766. // homes : XYZ.COM LLC
  20767. // https://www.iana.org/domains/root/db/homes.html
  20768. homes
  20769. // homesense : The TJX Companies, Inc.
  20770. // https://www.iana.org/domains/root/db/homesense.html
  20771. homesense
  20772. // honda : Honda Motor Co., Ltd.
  20773. // https://www.iana.org/domains/root/db/honda.html
  20774. honda
  20775. // horse : Registry Services, LLC
  20776. // https://www.iana.org/domains/root/db/horse.html
  20777. horse
  20778. // hospital : Binky Moon, LLC
  20779. // https://www.iana.org/domains/root/db/hospital.html
  20780. hospital
  20781. // host : Radix FZC DMCC
  20782. // https://www.iana.org/domains/root/db/host.html
  20783. host
  20784. // hosting : XYZ.COM LLC
  20785. // https://www.iana.org/domains/root/db/hosting.html
  20786. hosting
  20787. // hot : Amazon Registry Services, Inc.
  20788. // https://www.iana.org/domains/root/db/hot.html
  20789. hot
  20790. // hotels : Booking.com B.V.
  20791. // https://www.iana.org/domains/root/db/hotels.html
  20792. hotels
  20793. // hotmail : Microsoft Corporation
  20794. // https://www.iana.org/domains/root/db/hotmail.html
  20795. hotmail
  20796. // house : Binky Moon, LLC
  20797. // https://www.iana.org/domains/root/db/house.html
  20798. house
  20799. // how : Charleston Road Registry Inc.
  20800. // https://www.iana.org/domains/root/db/how.html
  20801. how
  20802. // hsbc : HSBC Global Services (UK) Limited
  20803. // https://www.iana.org/domains/root/db/hsbc.html
  20804. hsbc
  20805. // hughes : Hughes Satellite Systems Corporation
  20806. // https://www.iana.org/domains/root/db/hughes.html
  20807. hughes
  20808. // hyatt : Hyatt GTLD, L.L.C.
  20809. // https://www.iana.org/domains/root/db/hyatt.html
  20810. hyatt
  20811. // hyundai : Hyundai Motor Company
  20812. // https://www.iana.org/domains/root/db/hyundai.html
  20813. hyundai
  20814. // ibm : International Business Machines Corporation
  20815. // https://www.iana.org/domains/root/db/ibm.html
  20816. ibm
  20817. // icbc : Industrial and Commercial Bank of China Limited
  20818. // https://www.iana.org/domains/root/db/icbc.html
  20819. icbc
  20820. // ice : IntercontinentalExchange, Inc.
  20821. // https://www.iana.org/domains/root/db/ice.html
  20822. ice
  20823. // icu : ShortDot SA
  20824. // https://www.iana.org/domains/root/db/icu.html
  20825. icu
  20826. // ieee : IEEE Global LLC
  20827. // https://www.iana.org/domains/root/db/ieee.html
  20828. ieee
  20829. // ifm : ifm electronic gmbh
  20830. // https://www.iana.org/domains/root/db/ifm.html
  20831. ifm
  20832. // ikano : Ikano S.A.
  20833. // https://www.iana.org/domains/root/db/ikano.html
  20834. ikano
  20835. // imamat : Fondation Aga Khan (Aga Khan Foundation)
  20836. // https://www.iana.org/domains/root/db/imamat.html
  20837. imamat
  20838. // imdb : Amazon Registry Services, Inc.
  20839. // https://www.iana.org/domains/root/db/imdb.html
  20840. imdb
  20841. // immo : Binky Moon, LLC
  20842. // https://www.iana.org/domains/root/db/immo.html
  20843. immo
  20844. // immobilien : Dog Beach, LLC
  20845. // https://www.iana.org/domains/root/db/immobilien.html
  20846. immobilien
  20847. // inc : Intercap Registry Inc.
  20848. // https://www.iana.org/domains/root/db/inc.html
  20849. inc
  20850. // industries : Binky Moon, LLC
  20851. // https://www.iana.org/domains/root/db/industries.html
  20852. industries
  20853. // infiniti : NISSAN MOTOR CO., LTD.
  20854. // https://www.iana.org/domains/root/db/infiniti.html
  20855. infiniti
  20856. // ing : Charleston Road Registry Inc.
  20857. // https://www.iana.org/domains/root/db/ing.html
  20858. ing
  20859. // ink : Registry Services, LLC
  20860. // https://www.iana.org/domains/root/db/ink.html
  20861. ink
  20862. // institute : Binky Moon, LLC
  20863. // https://www.iana.org/domains/root/db/institute.html
  20864. institute
  20865. // insurance : fTLD Registry Services LLC
  20866. // https://www.iana.org/domains/root/db/insurance.html
  20867. insurance
  20868. // insure : Binky Moon, LLC
  20869. // https://www.iana.org/domains/root/db/insure.html
  20870. insure
  20871. // international : Binky Moon, LLC
  20872. // https://www.iana.org/domains/root/db/international.html
  20873. international
  20874. // intuit : Intuit Administrative Services, Inc.
  20875. // https://www.iana.org/domains/root/db/intuit.html
  20876. intuit
  20877. // investments : Binky Moon, LLC
  20878. // https://www.iana.org/domains/root/db/investments.html
  20879. investments
  20880. // ipiranga : Ipiranga Produtos de Petroleo S.A.
  20881. // https://www.iana.org/domains/root/db/ipiranga.html
  20882. ipiranga
  20883. // irish : Binky Moon, LLC
  20884. // https://www.iana.org/domains/root/db/irish.html
  20885. irish
  20886. // ismaili : Fondation Aga Khan (Aga Khan Foundation)
  20887. // https://www.iana.org/domains/root/db/ismaili.html
  20888. ismaili
  20889. // ist : Istanbul Metropolitan Municipality
  20890. // https://www.iana.org/domains/root/db/ist.html
  20891. ist
  20892. // istanbul : Istanbul Metropolitan Municipality
  20893. // https://www.iana.org/domains/root/db/istanbul.html
  20894. istanbul
  20895. // itau : Itau Unibanco Holding S.A.
  20896. // https://www.iana.org/domains/root/db/itau.html
  20897. itau
  20898. // itv : ITV Services Limited
  20899. // https://www.iana.org/domains/root/db/itv.html
  20900. itv
  20901. // jaguar : Jaguar Land Rover Ltd
  20902. // https://www.iana.org/domains/root/db/jaguar.html
  20903. jaguar
  20904. // java : Oracle Corporation
  20905. // https://www.iana.org/domains/root/db/java.html
  20906. java
  20907. // jcb : JCB Co., Ltd.
  20908. // https://www.iana.org/domains/root/db/jcb.html
  20909. jcb
  20910. // jeep : FCA US LLC.
  20911. // https://www.iana.org/domains/root/db/jeep.html
  20912. jeep
  20913. // jetzt : Binky Moon, LLC
  20914. // https://www.iana.org/domains/root/db/jetzt.html
  20915. jetzt
  20916. // jewelry : Binky Moon, LLC
  20917. // https://www.iana.org/domains/root/db/jewelry.html
  20918. jewelry
  20919. // jio : Reliance Industries Limited
  20920. // https://www.iana.org/domains/root/db/jio.html
  20921. jio
  20922. // jll : Jones Lang LaSalle Incorporated
  20923. // https://www.iana.org/domains/root/db/jll.html
  20924. jll
  20925. // jmp : Matrix IP LLC
  20926. // https://www.iana.org/domains/root/db/jmp.html
  20927. jmp
  20928. // jnj : Johnson & Johnson Services, Inc.
  20929. // https://www.iana.org/domains/root/db/jnj.html
  20930. jnj
  20931. // joburg : ZA Central Registry NPC trading as ZA Central Registry
  20932. // https://www.iana.org/domains/root/db/joburg.html
  20933. joburg
  20934. // jot : Amazon Registry Services, Inc.
  20935. // https://www.iana.org/domains/root/db/jot.html
  20936. jot
  20937. // joy : Amazon Registry Services, Inc.
  20938. // https://www.iana.org/domains/root/db/joy.html
  20939. joy
  20940. // jpmorgan : JPMorgan Chase Bank, National Association
  20941. // https://www.iana.org/domains/root/db/jpmorgan.html
  20942. jpmorgan
  20943. // jprs : Japan Registry Services Co., Ltd.
  20944. // https://www.iana.org/domains/root/db/jprs.html
  20945. jprs
  20946. // juegos : Internet Naming Company LLC
  20947. // https://www.iana.org/domains/root/db/juegos.html
  20948. juegos
  20949. // juniper : JUNIPER NETWORKS, INC.
  20950. // https://www.iana.org/domains/root/db/juniper.html
  20951. juniper
  20952. // kaufen : Dog Beach, LLC
  20953. // https://www.iana.org/domains/root/db/kaufen.html
  20954. kaufen
  20955. // kddi : KDDI CORPORATION
  20956. // https://www.iana.org/domains/root/db/kddi.html
  20957. kddi
  20958. // kerryhotels : Kerry Trading Co. Limited
  20959. // https://www.iana.org/domains/root/db/kerryhotels.html
  20960. kerryhotels
  20961. // kerrylogistics : Kerry Trading Co. Limited
  20962. // https://www.iana.org/domains/root/db/kerrylogistics.html
  20963. kerrylogistics
  20964. // kerryproperties : Kerry Trading Co. Limited
  20965. // https://www.iana.org/domains/root/db/kerryproperties.html
  20966. kerryproperties
  20967. // kfh : Kuwait Finance House
  20968. // https://www.iana.org/domains/root/db/kfh.html
  20969. kfh
  20970. // kia : KIA MOTORS CORPORATION
  20971. // https://www.iana.org/domains/root/db/kia.html
  20972. kia
  20973. // kids : DotKids Foundation Limited
  20974. // https://www.iana.org/domains/root/db/kids.html
  20975. kids
  20976. // kim : Identity Digital Limited
  20977. // https://www.iana.org/domains/root/db/kim.html
  20978. kim
  20979. // kinder : Ferrero Trading Lux S.A.
  20980. // https://www.iana.org/domains/root/db/kinder.html
  20981. kinder
  20982. // kindle : Amazon Registry Services, Inc.
  20983. // https://www.iana.org/domains/root/db/kindle.html
  20984. kindle
  20985. // kitchen : Binky Moon, LLC
  20986. // https://www.iana.org/domains/root/db/kitchen.html
  20987. kitchen
  20988. // kiwi : DOT KIWI LIMITED
  20989. // https://www.iana.org/domains/root/db/kiwi.html
  20990. kiwi
  20991. // koeln : dotKoeln GmbH
  20992. // https://www.iana.org/domains/root/db/koeln.html
  20993. koeln
  20994. // komatsu : Komatsu Ltd.
  20995. // https://www.iana.org/domains/root/db/komatsu.html
  20996. komatsu
  20997. // kosher : Kosher Marketing Assets LLC
  20998. // https://www.iana.org/domains/root/db/kosher.html
  20999. kosher
  21000. // kpmg : KPMG International Cooperative (KPMG International Genossenschaft)
  21001. // https://www.iana.org/domains/root/db/kpmg.html
  21002. kpmg
  21003. // kpn : Koninklijke KPN N.V.
  21004. // https://www.iana.org/domains/root/db/kpn.html
  21005. kpn
  21006. // krd : KRG Department of Information Technology
  21007. // https://www.iana.org/domains/root/db/krd.html
  21008. krd
  21009. // kred : KredTLD Pty Ltd
  21010. // https://www.iana.org/domains/root/db/kred.html
  21011. kred
  21012. // kuokgroup : Kerry Trading Co. Limited
  21013. // https://www.iana.org/domains/root/db/kuokgroup.html
  21014. kuokgroup
  21015. // kyoto : Academic Institution: Kyoto Jyoho Gakuen
  21016. // https://www.iana.org/domains/root/db/kyoto.html
  21017. kyoto
  21018. // lacaixa : Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la Caixa”
  21019. // https://www.iana.org/domains/root/db/lacaixa.html
  21020. lacaixa
  21021. // lamborghini : Automobili Lamborghini S.p.A.
  21022. // https://www.iana.org/domains/root/db/lamborghini.html
  21023. lamborghini
  21024. // lamer : The Estée Lauder Companies Inc.
  21025. // https://www.iana.org/domains/root/db/lamer.html
  21026. lamer
  21027. // lancaster : LANCASTER
  21028. // https://www.iana.org/domains/root/db/lancaster.html
  21029. lancaster
  21030. // land : Binky Moon, LLC
  21031. // https://www.iana.org/domains/root/db/land.html
  21032. land
  21033. // landrover : Jaguar Land Rover Ltd
  21034. // https://www.iana.org/domains/root/db/landrover.html
  21035. landrover
  21036. // lanxess : LANXESS Corporation
  21037. // https://www.iana.org/domains/root/db/lanxess.html
  21038. lanxess
  21039. // lasalle : Jones Lang LaSalle Incorporated
  21040. // https://www.iana.org/domains/root/db/lasalle.html
  21041. lasalle
  21042. // lat : XYZ.COM LLC
  21043. // https://www.iana.org/domains/root/db/lat.html
  21044. lat
  21045. // latino : Dish DBS Corporation
  21046. // https://www.iana.org/domains/root/db/latino.html
  21047. latino
  21048. // latrobe : La Trobe University
  21049. // https://www.iana.org/domains/root/db/latrobe.html
  21050. latrobe
  21051. // law : Registry Services, LLC
  21052. // https://www.iana.org/domains/root/db/law.html
  21053. law
  21054. // lawyer : Dog Beach, LLC
  21055. // https://www.iana.org/domains/root/db/lawyer.html
  21056. lawyer
  21057. // lds : IRI Domain Management, LLC
  21058. // https://www.iana.org/domains/root/db/lds.html
  21059. lds
  21060. // lease : Binky Moon, LLC
  21061. // https://www.iana.org/domains/root/db/lease.html
  21062. lease
  21063. // leclerc : A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
  21064. // https://www.iana.org/domains/root/db/leclerc.html
  21065. leclerc
  21066. // lefrak : LeFrak Organization, Inc.
  21067. // https://www.iana.org/domains/root/db/lefrak.html
  21068. lefrak
  21069. // legal : Binky Moon, LLC
  21070. // https://www.iana.org/domains/root/db/legal.html
  21071. legal
  21072. // lego : LEGO Juris A/S
  21073. // https://www.iana.org/domains/root/db/lego.html
  21074. lego
  21075. // lexus : TOYOTA MOTOR CORPORATION
  21076. // https://www.iana.org/domains/root/db/lexus.html
  21077. lexus
  21078. // lgbt : Identity Digital Limited
  21079. // https://www.iana.org/domains/root/db/lgbt.html
  21080. lgbt
  21081. // lidl : Schwarz Domains und Services GmbH & Co. KG
  21082. // https://www.iana.org/domains/root/db/lidl.html
  21083. lidl
  21084. // life : Binky Moon, LLC
  21085. // https://www.iana.org/domains/root/db/life.html
  21086. life
  21087. // lifeinsurance : American Council of Life Insurers
  21088. // https://www.iana.org/domains/root/db/lifeinsurance.html
  21089. lifeinsurance
  21090. // lifestyle : Lifestyle Domain Holdings, Inc.
  21091. // https://www.iana.org/domains/root/db/lifestyle.html
  21092. lifestyle
  21093. // lighting : Binky Moon, LLC
  21094. // https://www.iana.org/domains/root/db/lighting.html
  21095. lighting
  21096. // like : Amazon Registry Services, Inc.
  21097. // https://www.iana.org/domains/root/db/like.html
  21098. like
  21099. // lilly : Eli Lilly and Company
  21100. // https://www.iana.org/domains/root/db/lilly.html
  21101. lilly
  21102. // limited : Binky Moon, LLC
  21103. // https://www.iana.org/domains/root/db/limited.html
  21104. limited
  21105. // limo : Binky Moon, LLC
  21106. // https://www.iana.org/domains/root/db/limo.html
  21107. limo
  21108. // lincoln : Ford Motor Company
  21109. // https://www.iana.org/domains/root/db/lincoln.html
  21110. lincoln
  21111. // link : Nova Registry Ltd
  21112. // https://www.iana.org/domains/root/db/link.html
  21113. link
  21114. // lipsy : Lipsy Ltd
  21115. // https://www.iana.org/domains/root/db/lipsy.html
  21116. lipsy
  21117. // live : Dog Beach, LLC
  21118. // https://www.iana.org/domains/root/db/live.html
  21119. live
  21120. // living : Lifestyle Domain Holdings, Inc.
  21121. // https://www.iana.org/domains/root/db/living.html
  21122. living
  21123. // llc : Identity Digital Limited
  21124. // https://www.iana.org/domains/root/db/llc.html
  21125. llc
  21126. // llp : Intercap Registry Inc.
  21127. // https://www.iana.org/domains/root/db/llp.html
  21128. llp
  21129. // loan : dot Loan Limited
  21130. // https://www.iana.org/domains/root/db/loan.html
  21131. loan
  21132. // loans : Binky Moon, LLC
  21133. // https://www.iana.org/domains/root/db/loans.html
  21134. loans
  21135. // locker : Orange Domains LLC
  21136. // https://www.iana.org/domains/root/db/locker.html
  21137. locker
  21138. // locus : Locus Analytics LLC
  21139. // https://www.iana.org/domains/root/db/locus.html
  21140. locus
  21141. // lol : XYZ.COM LLC
  21142. // https://www.iana.org/domains/root/db/lol.html
  21143. lol
  21144. // london : Dot London Domains Limited
  21145. // https://www.iana.org/domains/root/db/london.html
  21146. london
  21147. // lotte : Lotte Holdings Co., Ltd.
  21148. // https://www.iana.org/domains/root/db/lotte.html
  21149. lotte
  21150. // lotto : Identity Digital Limited
  21151. // https://www.iana.org/domains/root/db/lotto.html
  21152. lotto
  21153. // love : Merchant Law Group LLP
  21154. // https://www.iana.org/domains/root/db/love.html
  21155. love
  21156. // lpl : LPL Holdings, Inc.
  21157. // https://www.iana.org/domains/root/db/lpl.html
  21158. lpl
  21159. // lplfinancial : LPL Holdings, Inc.
  21160. // https://www.iana.org/domains/root/db/lplfinancial.html
  21161. lplfinancial
  21162. // ltd : Binky Moon, LLC
  21163. // https://www.iana.org/domains/root/db/ltd.html
  21164. ltd
  21165. // ltda : InterNetX, Corp
  21166. // https://www.iana.org/domains/root/db/ltda.html
  21167. ltda
  21168. // lundbeck : H. Lundbeck A/S
  21169. // https://www.iana.org/domains/root/db/lundbeck.html
  21170. lundbeck
  21171. // luxe : Registry Services, LLC
  21172. // https://www.iana.org/domains/root/db/luxe.html
  21173. luxe
  21174. // luxury : Luxury Partners, LLC
  21175. // https://www.iana.org/domains/root/db/luxury.html
  21176. luxury
  21177. // madrid : Comunidad de Madrid
  21178. // https://www.iana.org/domains/root/db/madrid.html
  21179. madrid
  21180. // maif : Mutuelle Assurance Instituteur France (MAIF)
  21181. // https://www.iana.org/domains/root/db/maif.html
  21182. maif
  21183. // maison : Binky Moon, LLC
  21184. // https://www.iana.org/domains/root/db/maison.html
  21185. maison
  21186. // makeup : XYZ.COM LLC
  21187. // https://www.iana.org/domains/root/db/makeup.html
  21188. makeup
  21189. // man : MAN SE
  21190. // https://www.iana.org/domains/root/db/man.html
  21191. man
  21192. // management : Binky Moon, LLC
  21193. // https://www.iana.org/domains/root/db/management.html
  21194. management
  21195. // mango : PUNTO FA S.L.
  21196. // https://www.iana.org/domains/root/db/mango.html
  21197. mango
  21198. // map : Charleston Road Registry Inc.
  21199. // https://www.iana.org/domains/root/db/map.html
  21200. map
  21201. // market : Dog Beach, LLC
  21202. // https://www.iana.org/domains/root/db/market.html
  21203. market
  21204. // marketing : Binky Moon, LLC
  21205. // https://www.iana.org/domains/root/db/marketing.html
  21206. marketing
  21207. // markets : Dog Beach, LLC
  21208. // https://www.iana.org/domains/root/db/markets.html
  21209. markets
  21210. // marriott : Marriott Worldwide Corporation
  21211. // https://www.iana.org/domains/root/db/marriott.html
  21212. marriott
  21213. // marshalls : The TJX Companies, Inc.
  21214. // https://www.iana.org/domains/root/db/marshalls.html
  21215. marshalls
  21216. // mattel : Mattel Sites, Inc.
  21217. // https://www.iana.org/domains/root/db/mattel.html
  21218. mattel
  21219. // mba : Binky Moon, LLC
  21220. // https://www.iana.org/domains/root/db/mba.html
  21221. mba
  21222. // mckinsey : McKinsey Holdings, Inc.
  21223. // https://www.iana.org/domains/root/db/mckinsey.html
  21224. mckinsey
  21225. // med : Medistry LLC
  21226. // https://www.iana.org/domains/root/db/med.html
  21227. med
  21228. // media : Binky Moon, LLC
  21229. // https://www.iana.org/domains/root/db/media.html
  21230. media
  21231. // meet : Charleston Road Registry Inc.
  21232. // https://www.iana.org/domains/root/db/meet.html
  21233. meet
  21234. // melbourne : The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation
  21235. // https://www.iana.org/domains/root/db/melbourne.html
  21236. melbourne
  21237. // meme : Charleston Road Registry Inc.
  21238. // https://www.iana.org/domains/root/db/meme.html
  21239. meme
  21240. // memorial : Dog Beach, LLC
  21241. // https://www.iana.org/domains/root/db/memorial.html
  21242. memorial
  21243. // men : Exclusive Registry Limited
  21244. // https://www.iana.org/domains/root/db/men.html
  21245. men
  21246. // menu : Dot Menu Registry, LLC
  21247. // https://www.iana.org/domains/root/db/menu.html
  21248. menu
  21249. // merckmsd : MSD Registry Holdings, Inc.
  21250. // https://www.iana.org/domains/root/db/merckmsd.html
  21251. merckmsd
  21252. // miami : Registry Services, LLC
  21253. // https://www.iana.org/domains/root/db/miami.html
  21254. miami
  21255. // microsoft : Microsoft Corporation
  21256. // https://www.iana.org/domains/root/db/microsoft.html
  21257. microsoft
  21258. // mini : Bayerische Motoren Werke Aktiengesellschaft
  21259. // https://www.iana.org/domains/root/db/mini.html
  21260. mini
  21261. // mint : Intuit Administrative Services, Inc.
  21262. // https://www.iana.org/domains/root/db/mint.html
  21263. mint
  21264. // mit : Massachusetts Institute of Technology
  21265. // https://www.iana.org/domains/root/db/mit.html
  21266. mit
  21267. // mitsubishi : Mitsubishi Corporation
  21268. // https://www.iana.org/domains/root/db/mitsubishi.html
  21269. mitsubishi
  21270. // mlb : MLB Advanced Media DH, LLC
  21271. // https://www.iana.org/domains/root/db/mlb.html
  21272. mlb
  21273. // mls : The Canadian Real Estate Association
  21274. // https://www.iana.org/domains/root/db/mls.html
  21275. mls
  21276. // mma : MMA IARD
  21277. // https://www.iana.org/domains/root/db/mma.html
  21278. mma
  21279. // mobile : Dish DBS Corporation
  21280. // https://www.iana.org/domains/root/db/mobile.html
  21281. mobile
  21282. // moda : Dog Beach, LLC
  21283. // https://www.iana.org/domains/root/db/moda.html
  21284. moda
  21285. // moe : Interlink Systems Innovation Institute K.K.
  21286. // https://www.iana.org/domains/root/db/moe.html
  21287. moe
  21288. // moi : Amazon Registry Services, Inc.
  21289. // https://www.iana.org/domains/root/db/moi.html
  21290. moi
  21291. // mom : XYZ.COM LLC
  21292. // https://www.iana.org/domains/root/db/mom.html
  21293. mom
  21294. // monash : Monash University
  21295. // https://www.iana.org/domains/root/db/monash.html
  21296. monash
  21297. // money : Binky Moon, LLC
  21298. // https://www.iana.org/domains/root/db/money.html
  21299. money
  21300. // monster : XYZ.COM LLC
  21301. // https://www.iana.org/domains/root/db/monster.html
  21302. monster
  21303. // mormon : IRI Domain Management, LLC
  21304. // https://www.iana.org/domains/root/db/mormon.html
  21305. mormon
  21306. // mortgage : Dog Beach, LLC
  21307. // https://www.iana.org/domains/root/db/mortgage.html
  21308. mortgage
  21309. // moscow : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
  21310. // https://www.iana.org/domains/root/db/moscow.html
  21311. moscow
  21312. // moto : Motorola Trademark Holdings, LLC
  21313. // https://www.iana.org/domains/root/db/moto.html
  21314. moto
  21315. // motorcycles : XYZ.COM LLC
  21316. // https://www.iana.org/domains/root/db/motorcycles.html
  21317. motorcycles
  21318. // mov : Charleston Road Registry Inc.
  21319. // https://www.iana.org/domains/root/db/mov.html
  21320. mov
  21321. // movie : Binky Moon, LLC
  21322. // https://www.iana.org/domains/root/db/movie.html
  21323. movie
  21324. // msd : MSD Registry Holdings, Inc.
  21325. // https://www.iana.org/domains/root/db/msd.html
  21326. msd
  21327. // mtn : MTN Dubai Limited
  21328. // https://www.iana.org/domains/root/db/mtn.html
  21329. mtn
  21330. // mtr : MTR Corporation Limited
  21331. // https://www.iana.org/domains/root/db/mtr.html
  21332. mtr
  21333. // music : DotMusic Limited
  21334. // https://www.iana.org/domains/root/db/music.html
  21335. music
  21336. // nab : National Australia Bank Limited
  21337. // https://www.iana.org/domains/root/db/nab.html
  21338. nab
  21339. // nagoya : GMO Registry, Inc.
  21340. // https://www.iana.org/domains/root/db/nagoya.html
  21341. nagoya
  21342. // natura : NATURA COSMÉTICOS S.A.
  21343. // https://www.iana.org/domains/root/db/natura.html
  21344. natura
  21345. // navy : Dog Beach, LLC
  21346. // https://www.iana.org/domains/root/db/navy.html
  21347. navy
  21348. // nba : NBA REGISTRY, LLC
  21349. // https://www.iana.org/domains/root/db/nba.html
  21350. nba
  21351. // nec : NEC Corporation
  21352. // https://www.iana.org/domains/root/db/nec.html
  21353. nec
  21354. // netbank : COMMONWEALTH BANK OF AUSTRALIA
  21355. // https://www.iana.org/domains/root/db/netbank.html
  21356. netbank
  21357. // netflix : Netflix, Inc.
  21358. // https://www.iana.org/domains/root/db/netflix.html
  21359. netflix
  21360. // network : Binky Moon, LLC
  21361. // https://www.iana.org/domains/root/db/network.html
  21362. network
  21363. // neustar : NeuStar, Inc.
  21364. // https://www.iana.org/domains/root/db/neustar.html
  21365. neustar
  21366. // new : Charleston Road Registry Inc.
  21367. // https://www.iana.org/domains/root/db/new.html
  21368. new
  21369. // news : Dog Beach, LLC
  21370. // https://www.iana.org/domains/root/db/news.html
  21371. news
  21372. // next : Next plc
  21373. // https://www.iana.org/domains/root/db/next.html
  21374. next
  21375. // nextdirect : Next plc
  21376. // https://www.iana.org/domains/root/db/nextdirect.html
  21377. nextdirect
  21378. // nexus : Charleston Road Registry Inc.
  21379. // https://www.iana.org/domains/root/db/nexus.html
  21380. nexus
  21381. // nfl : NFL Reg Ops LLC
  21382. // https://www.iana.org/domains/root/db/nfl.html
  21383. nfl
  21384. // ngo : Public Interest Registry
  21385. // https://www.iana.org/domains/root/db/ngo.html
  21386. ngo
  21387. // nhk : Japan Broadcasting Corporation (NHK)
  21388. // https://www.iana.org/domains/root/db/nhk.html
  21389. nhk
  21390. // nico : DWANGO Co., Ltd.
  21391. // https://www.iana.org/domains/root/db/nico.html
  21392. nico
  21393. // nike : NIKE, Inc.
  21394. // https://www.iana.org/domains/root/db/nike.html
  21395. nike
  21396. // nikon : NIKON CORPORATION
  21397. // https://www.iana.org/domains/root/db/nikon.html
  21398. nikon
  21399. // ninja : Dog Beach, LLC
  21400. // https://www.iana.org/domains/root/db/ninja.html
  21401. ninja
  21402. // nissan : NISSAN MOTOR CO., LTD.
  21403. // https://www.iana.org/domains/root/db/nissan.html
  21404. nissan
  21405. // nissay : Nippon Life Insurance Company
  21406. // https://www.iana.org/domains/root/db/nissay.html
  21407. nissay
  21408. // nokia : Nokia Corporation
  21409. // https://www.iana.org/domains/root/db/nokia.html
  21410. nokia
  21411. // norton : NortonLifeLock Inc.
  21412. // https://www.iana.org/domains/root/db/norton.html
  21413. norton
  21414. // now : Amazon Registry Services, Inc.
  21415. // https://www.iana.org/domains/root/db/now.html
  21416. now
  21417. // nowruz : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  21418. // https://www.iana.org/domains/root/db/nowruz.html
  21419. nowruz
  21420. // nowtv : Starbucks (HK) Limited
  21421. // https://www.iana.org/domains/root/db/nowtv.html
  21422. nowtv
  21423. // nra : NRA Holdings Company, INC.
  21424. // https://www.iana.org/domains/root/db/nra.html
  21425. nra
  21426. // nrw : Minds + Machines GmbH
  21427. // https://www.iana.org/domains/root/db/nrw.html
  21428. nrw
  21429. // ntt : NIPPON TELEGRAPH AND TELEPHONE CORPORATION
  21430. // https://www.iana.org/domains/root/db/ntt.html
  21431. ntt
  21432. // nyc : The City of New York by and through the New York City Department of Information Technology & Telecommunications
  21433. // https://www.iana.org/domains/root/db/nyc.html
  21434. nyc
  21435. // obi : OBI Group Holding SE & Co. KGaA
  21436. // https://www.iana.org/domains/root/db/obi.html
  21437. obi
  21438. // observer : Fegistry, LLC
  21439. // https://www.iana.org/domains/root/db/observer.html
  21440. observer
  21441. // office : Microsoft Corporation
  21442. // https://www.iana.org/domains/root/db/office.html
  21443. office
  21444. // okinawa : BRregistry, Inc.
  21445. // https://www.iana.org/domains/root/db/okinawa.html
  21446. okinawa
  21447. // olayan : Competrol (Luxembourg) Sarl
  21448. // https://www.iana.org/domains/root/db/olayan.html
  21449. olayan
  21450. // olayangroup : Competrol (Luxembourg) Sarl
  21451. // https://www.iana.org/domains/root/db/olayangroup.html
  21452. olayangroup
  21453. // oldnavy : The Gap, Inc.
  21454. // https://www.iana.org/domains/root/db/oldnavy.html
  21455. oldnavy
  21456. // ollo : Dish DBS Corporation
  21457. // https://www.iana.org/domains/root/db/ollo.html
  21458. ollo
  21459. // omega : The Swatch Group Ltd
  21460. // https://www.iana.org/domains/root/db/omega.html
  21461. omega
  21462. // one : One.com A/S
  21463. // https://www.iana.org/domains/root/db/one.html
  21464. one
  21465. // ong : Public Interest Registry
  21466. // https://www.iana.org/domains/root/db/ong.html
  21467. ong
  21468. // onl : iRegistry GmbH
  21469. // https://www.iana.org/domains/root/db/onl.html
  21470. onl
  21471. // online : Radix FZC DMCC
  21472. // https://www.iana.org/domains/root/db/online.html
  21473. online
  21474. // ooo : INFIBEAM AVENUES LIMITED
  21475. // https://www.iana.org/domains/root/db/ooo.html
  21476. ooo
  21477. // open : American Express Travel Related Services Company, Inc.
  21478. // https://www.iana.org/domains/root/db/open.html
  21479. open
  21480. // oracle : Oracle Corporation
  21481. // https://www.iana.org/domains/root/db/oracle.html
  21482. oracle
  21483. // orange : Orange Brand Services Limited
  21484. // https://www.iana.org/domains/root/db/orange.html
  21485. orange
  21486. // organic : Identity Digital Limited
  21487. // https://www.iana.org/domains/root/db/organic.html
  21488. organic
  21489. // origins : The Estée Lauder Companies Inc.
  21490. // https://www.iana.org/domains/root/db/origins.html
  21491. origins
  21492. // osaka : Osaka Registry Co., Ltd.
  21493. // https://www.iana.org/domains/root/db/osaka.html
  21494. osaka
  21495. // otsuka : Otsuka Holdings Co., Ltd.
  21496. // https://www.iana.org/domains/root/db/otsuka.html
  21497. otsuka
  21498. // ott : Dish DBS Corporation
  21499. // https://www.iana.org/domains/root/db/ott.html
  21500. ott
  21501. // ovh : MédiaBC
  21502. // https://www.iana.org/domains/root/db/ovh.html
  21503. ovh
  21504. // page : Charleston Road Registry Inc.
  21505. // https://www.iana.org/domains/root/db/page.html
  21506. page
  21507. // panasonic : Panasonic Holdings Corporation
  21508. // https://www.iana.org/domains/root/db/panasonic.html
  21509. panasonic
  21510. // paris : City of Paris
  21511. // https://www.iana.org/domains/root/db/paris.html
  21512. paris
  21513. // pars : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  21514. // https://www.iana.org/domains/root/db/pars.html
  21515. pars
  21516. // partners : Binky Moon, LLC
  21517. // https://www.iana.org/domains/root/db/partners.html
  21518. partners
  21519. // parts : Binky Moon, LLC
  21520. // https://www.iana.org/domains/root/db/parts.html
  21521. parts
  21522. // party : Blue Sky Registry Limited
  21523. // https://www.iana.org/domains/root/db/party.html
  21524. party
  21525. // pay : Amazon Registry Services, Inc.
  21526. // https://www.iana.org/domains/root/db/pay.html
  21527. pay
  21528. // pccw : PCCW Enterprises Limited
  21529. // https://www.iana.org/domains/root/db/pccw.html
  21530. pccw
  21531. // pet : Identity Digital Limited
  21532. // https://www.iana.org/domains/root/db/pet.html
  21533. pet
  21534. // pfizer : Pfizer Inc.
  21535. // https://www.iana.org/domains/root/db/pfizer.html
  21536. pfizer
  21537. // pharmacy : National Association of Boards of Pharmacy
  21538. // https://www.iana.org/domains/root/db/pharmacy.html
  21539. pharmacy
  21540. // phd : Charleston Road Registry Inc.
  21541. // https://www.iana.org/domains/root/db/phd.html
  21542. phd
  21543. // philips : Koninklijke Philips N.V.
  21544. // https://www.iana.org/domains/root/db/philips.html
  21545. philips
  21546. // phone : Dish DBS Corporation
  21547. // https://www.iana.org/domains/root/db/phone.html
  21548. phone
  21549. // photo : Registry Services, LLC
  21550. // https://www.iana.org/domains/root/db/photo.html
  21551. photo
  21552. // photography : Binky Moon, LLC
  21553. // https://www.iana.org/domains/root/db/photography.html
  21554. photography
  21555. // photos : Binky Moon, LLC
  21556. // https://www.iana.org/domains/root/db/photos.html
  21557. photos
  21558. // physio : PhysBiz Pty Ltd
  21559. // https://www.iana.org/domains/root/db/physio.html
  21560. physio
  21561. // pics : XYZ.COM LLC
  21562. // https://www.iana.org/domains/root/db/pics.html
  21563. pics
  21564. // pictet : Pictet Europe S.A.
  21565. // https://www.iana.org/domains/root/db/pictet.html
  21566. pictet
  21567. // pictures : Binky Moon, LLC
  21568. // https://www.iana.org/domains/root/db/pictures.html
  21569. pictures
  21570. // pid : Top Level Spectrum, Inc.
  21571. // https://www.iana.org/domains/root/db/pid.html
  21572. pid
  21573. // pin : Amazon Registry Services, Inc.
  21574. // https://www.iana.org/domains/root/db/pin.html
  21575. pin
  21576. // ping : Ping Registry Provider, Inc.
  21577. // https://www.iana.org/domains/root/db/ping.html
  21578. ping
  21579. // pink : Identity Digital Limited
  21580. // https://www.iana.org/domains/root/db/pink.html
  21581. pink
  21582. // pioneer : Pioneer Corporation
  21583. // https://www.iana.org/domains/root/db/pioneer.html
  21584. pioneer
  21585. // pizza : Binky Moon, LLC
  21586. // https://www.iana.org/domains/root/db/pizza.html
  21587. pizza
  21588. // place : Binky Moon, LLC
  21589. // https://www.iana.org/domains/root/db/place.html
  21590. place
  21591. // play : Charleston Road Registry Inc.
  21592. // https://www.iana.org/domains/root/db/play.html
  21593. play
  21594. // playstation : Sony Interactive Entertainment Inc.
  21595. // https://www.iana.org/domains/root/db/playstation.html
  21596. playstation
  21597. // plumbing : Binky Moon, LLC
  21598. // https://www.iana.org/domains/root/db/plumbing.html
  21599. plumbing
  21600. // plus : Binky Moon, LLC
  21601. // https://www.iana.org/domains/root/db/plus.html
  21602. plus
  21603. // pnc : PNC Domain Co., LLC
  21604. // https://www.iana.org/domains/root/db/pnc.html
  21605. pnc
  21606. // pohl : Deutsche Vermögensberatung Aktiengesellschaft DVAG
  21607. // https://www.iana.org/domains/root/db/pohl.html
  21608. pohl
  21609. // poker : Identity Digital Limited
  21610. // https://www.iana.org/domains/root/db/poker.html
  21611. poker
  21612. // politie : Politie Nederland
  21613. // https://www.iana.org/domains/root/db/politie.html
  21614. politie
  21615. // porn : ICM Registry PN LLC
  21616. // https://www.iana.org/domains/root/db/porn.html
  21617. porn
  21618. // pramerica : Prudential Financial, Inc.
  21619. // https://www.iana.org/domains/root/db/pramerica.html
  21620. pramerica
  21621. // praxi : Praxi S.p.A.
  21622. // https://www.iana.org/domains/root/db/praxi.html
  21623. praxi
  21624. // press : Radix FZC DMCC
  21625. // https://www.iana.org/domains/root/db/press.html
  21626. press
  21627. // prime : Amazon Registry Services, Inc.
  21628. // https://www.iana.org/domains/root/db/prime.html
  21629. prime
  21630. // prod : Charleston Road Registry Inc.
  21631. // https://www.iana.org/domains/root/db/prod.html
  21632. prod
  21633. // productions : Binky Moon, LLC
  21634. // https://www.iana.org/domains/root/db/productions.html
  21635. productions
  21636. // prof : Charleston Road Registry Inc.
  21637. // https://www.iana.org/domains/root/db/prof.html
  21638. prof
  21639. // progressive : Progressive Casualty Insurance Company
  21640. // https://www.iana.org/domains/root/db/progressive.html
  21641. progressive
  21642. // promo : Identity Digital Limited
  21643. // https://www.iana.org/domains/root/db/promo.html
  21644. promo
  21645. // properties : Binky Moon, LLC
  21646. // https://www.iana.org/domains/root/db/properties.html
  21647. properties
  21648. // property : Digital Property Infrastructure Limited
  21649. // https://www.iana.org/domains/root/db/property.html
  21650. property
  21651. // protection : XYZ.COM LLC
  21652. // https://www.iana.org/domains/root/db/protection.html
  21653. protection
  21654. // pru : Prudential Financial, Inc.
  21655. // https://www.iana.org/domains/root/db/pru.html
  21656. pru
  21657. // prudential : Prudential Financial, Inc.
  21658. // https://www.iana.org/domains/root/db/prudential.html
  21659. prudential
  21660. // pub : Dog Beach, LLC
  21661. // https://www.iana.org/domains/root/db/pub.html
  21662. pub
  21663. // pwc : PricewaterhouseCoopers LLP
  21664. // https://www.iana.org/domains/root/db/pwc.html
  21665. pwc
  21666. // qpon : dotQPON LLC
  21667. // https://www.iana.org/domains/root/db/qpon.html
  21668. qpon
  21669. // quebec : PointQuébec Inc
  21670. // https://www.iana.org/domains/root/db/quebec.html
  21671. quebec
  21672. // quest : XYZ.COM LLC
  21673. // https://www.iana.org/domains/root/db/quest.html
  21674. quest
  21675. // racing : Premier Registry Limited
  21676. // https://www.iana.org/domains/root/db/racing.html
  21677. racing
  21678. // radio : European Broadcasting Union (EBU)
  21679. // https://www.iana.org/domains/root/db/radio.html
  21680. radio
  21681. // read : Amazon Registry Services, Inc.
  21682. // https://www.iana.org/domains/root/db/read.html
  21683. read
  21684. // realestate : dotRealEstate LLC
  21685. // https://www.iana.org/domains/root/db/realestate.html
  21686. realestate
  21687. // realtor : Real Estate Domains LLC
  21688. // https://www.iana.org/domains/root/db/realtor.html
  21689. realtor
  21690. // realty : Internet Naming Company LLC
  21691. // https://www.iana.org/domains/root/db/realty.html
  21692. realty
  21693. // recipes : Binky Moon, LLC
  21694. // https://www.iana.org/domains/root/db/recipes.html
  21695. recipes
  21696. // red : Identity Digital Limited
  21697. // https://www.iana.org/domains/root/db/red.html
  21698. red
  21699. // redstone : Redstone Haute Couture Co., Ltd.
  21700. // https://www.iana.org/domains/root/db/redstone.html
  21701. redstone
  21702. // redumbrella : Travelers TLD, LLC
  21703. // https://www.iana.org/domains/root/db/redumbrella.html
  21704. redumbrella
  21705. // rehab : Dog Beach, LLC
  21706. // https://www.iana.org/domains/root/db/rehab.html
  21707. rehab
  21708. // reise : Binky Moon, LLC
  21709. // https://www.iana.org/domains/root/db/reise.html
  21710. reise
  21711. // reisen : Binky Moon, LLC
  21712. // https://www.iana.org/domains/root/db/reisen.html
  21713. reisen
  21714. // reit : National Association of Real Estate Investment Trusts, Inc.
  21715. // https://www.iana.org/domains/root/db/reit.html
  21716. reit
  21717. // reliance : Reliance Industries Limited
  21718. // https://www.iana.org/domains/root/db/reliance.html
  21719. reliance
  21720. // ren : ZDNS International Limited
  21721. // https://www.iana.org/domains/root/db/ren.html
  21722. ren
  21723. // rent : XYZ.COM LLC
  21724. // https://www.iana.org/domains/root/db/rent.html
  21725. rent
  21726. // rentals : Binky Moon, LLC
  21727. // https://www.iana.org/domains/root/db/rentals.html
  21728. rentals
  21729. // repair : Binky Moon, LLC
  21730. // https://www.iana.org/domains/root/db/repair.html
  21731. repair
  21732. // report : Binky Moon, LLC
  21733. // https://www.iana.org/domains/root/db/report.html
  21734. report
  21735. // republican : Dog Beach, LLC
  21736. // https://www.iana.org/domains/root/db/republican.html
  21737. republican
  21738. // rest : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
  21739. // https://www.iana.org/domains/root/db/rest.html
  21740. rest
  21741. // restaurant : Binky Moon, LLC
  21742. // https://www.iana.org/domains/root/db/restaurant.html
  21743. restaurant
  21744. // review : dot Review Limited
  21745. // https://www.iana.org/domains/root/db/review.html
  21746. review
  21747. // reviews : Dog Beach, LLC
  21748. // https://www.iana.org/domains/root/db/reviews.html
  21749. reviews
  21750. // rexroth : Robert Bosch GMBH
  21751. // https://www.iana.org/domains/root/db/rexroth.html
  21752. rexroth
  21753. // rich : iRegistry GmbH
  21754. // https://www.iana.org/domains/root/db/rich.html
  21755. rich
  21756. // richardli : Pacific Century Asset Management (HK) Limited
  21757. // https://www.iana.org/domains/root/db/richardli.html
  21758. richardli
  21759. // ricoh : Ricoh Company, Ltd.
  21760. // https://www.iana.org/domains/root/db/ricoh.html
  21761. ricoh
  21762. // ril : Reliance Industries Limited
  21763. // https://www.iana.org/domains/root/db/ril.html
  21764. ril
  21765. // rio : Empresa Municipal de Informática SA - IPLANRIO
  21766. // https://www.iana.org/domains/root/db/rio.html
  21767. rio
  21768. // rip : Dog Beach, LLC
  21769. // https://www.iana.org/domains/root/db/rip.html
  21770. rip
  21771. // rocher : Ferrero Trading Lux S.A.
  21772. // https://www.iana.org/domains/root/db/rocher.html
  21773. rocher
  21774. // rocks : Dog Beach, LLC
  21775. // https://www.iana.org/domains/root/db/rocks.html
  21776. rocks
  21777. // rodeo : Registry Services, LLC
  21778. // https://www.iana.org/domains/root/db/rodeo.html
  21779. rodeo
  21780. // rogers : Rogers Communications Canada Inc.
  21781. // https://www.iana.org/domains/root/db/rogers.html
  21782. rogers
  21783. // room : Amazon Registry Services, Inc.
  21784. // https://www.iana.org/domains/root/db/room.html
  21785. room
  21786. // rsvp : Charleston Road Registry Inc.
  21787. // https://www.iana.org/domains/root/db/rsvp.html
  21788. rsvp
  21789. // rugby : World Rugby Strategic Developments Limited
  21790. // https://www.iana.org/domains/root/db/rugby.html
  21791. rugby
  21792. // ruhr : dotSaarland GmbH
  21793. // https://www.iana.org/domains/root/db/ruhr.html
  21794. ruhr
  21795. // run : Binky Moon, LLC
  21796. // https://www.iana.org/domains/root/db/run.html
  21797. run
  21798. // rwe : RWE AG
  21799. // https://www.iana.org/domains/root/db/rwe.html
  21800. rwe
  21801. // ryukyu : BRregistry, Inc.
  21802. // https://www.iana.org/domains/root/db/ryukyu.html
  21803. ryukyu
  21804. // saarland : dotSaarland GmbH
  21805. // https://www.iana.org/domains/root/db/saarland.html
  21806. saarland
  21807. // safe : Amazon Registry Services, Inc.
  21808. // https://www.iana.org/domains/root/db/safe.html
  21809. safe
  21810. // safety : Safety Registry Services, LLC.
  21811. // https://www.iana.org/domains/root/db/safety.html
  21812. safety
  21813. // sakura : SAKURA Internet Inc.
  21814. // https://www.iana.org/domains/root/db/sakura.html
  21815. sakura
  21816. // sale : Dog Beach, LLC
  21817. // https://www.iana.org/domains/root/db/sale.html
  21818. sale
  21819. // salon : Binky Moon, LLC
  21820. // https://www.iana.org/domains/root/db/salon.html
  21821. salon
  21822. // samsclub : Wal-Mart Stores, Inc.
  21823. // https://www.iana.org/domains/root/db/samsclub.html
  21824. samsclub
  21825. // samsung : SAMSUNG SDS CO., LTD
  21826. // https://www.iana.org/domains/root/db/samsung.html
  21827. samsung
  21828. // sandvik : Sandvik AB
  21829. // https://www.iana.org/domains/root/db/sandvik.html
  21830. sandvik
  21831. // sandvikcoromant : Sandvik AB
  21832. // https://www.iana.org/domains/root/db/sandvikcoromant.html
  21833. sandvikcoromant
  21834. // sanofi : Sanofi
  21835. // https://www.iana.org/domains/root/db/sanofi.html
  21836. sanofi
  21837. // sap : SAP AG
  21838. // https://www.iana.org/domains/root/db/sap.html
  21839. sap
  21840. // sarl : Binky Moon, LLC
  21841. // https://www.iana.org/domains/root/db/sarl.html
  21842. sarl
  21843. // sas : Research IP LLC
  21844. // https://www.iana.org/domains/root/db/sas.html
  21845. sas
  21846. // save : Amazon Registry Services, Inc.
  21847. // https://www.iana.org/domains/root/db/save.html
  21848. save
  21849. // saxo : Saxo Bank A/S
  21850. // https://www.iana.org/domains/root/db/saxo.html
  21851. saxo
  21852. // sbi : STATE BANK OF INDIA
  21853. // https://www.iana.org/domains/root/db/sbi.html
  21854. sbi
  21855. // sbs : ShortDot SA
  21856. // https://www.iana.org/domains/root/db/sbs.html
  21857. sbs
  21858. // sca : SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
  21859. // https://www.iana.org/domains/root/db/sca.html
  21860. sca
  21861. // scb : The Siam Commercial Bank Public Company Limited ("SCB")
  21862. // https://www.iana.org/domains/root/db/scb.html
  21863. scb
  21864. // schaeffler : Schaeffler Technologies AG & Co. KG
  21865. // https://www.iana.org/domains/root/db/schaeffler.html
  21866. schaeffler
  21867. // schmidt : SCHMIDT GROUPE S.A.S.
  21868. // https://www.iana.org/domains/root/db/schmidt.html
  21869. schmidt
  21870. // scholarships : Scholarships.com, LLC
  21871. // https://www.iana.org/domains/root/db/scholarships.html
  21872. scholarships
  21873. // school : Binky Moon, LLC
  21874. // https://www.iana.org/domains/root/db/school.html
  21875. school
  21876. // schule : Binky Moon, LLC
  21877. // https://www.iana.org/domains/root/db/schule.html
  21878. schule
  21879. // schwarz : Schwarz Domains und Services GmbH & Co. KG
  21880. // https://www.iana.org/domains/root/db/schwarz.html
  21881. schwarz
  21882. // science : dot Science Limited
  21883. // https://www.iana.org/domains/root/db/science.html
  21884. science
  21885. // scot : Dot Scot Registry Limited
  21886. // https://www.iana.org/domains/root/db/scot.html
  21887. scot
  21888. // search : Charleston Road Registry Inc.
  21889. // https://www.iana.org/domains/root/db/search.html
  21890. search
  21891. // seat : SEAT, S.A. (Sociedad Unipersonal)
  21892. // https://www.iana.org/domains/root/db/seat.html
  21893. seat
  21894. // secure : Amazon Registry Services, Inc.
  21895. // https://www.iana.org/domains/root/db/secure.html
  21896. secure
  21897. // security : XYZ.COM LLC
  21898. // https://www.iana.org/domains/root/db/security.html
  21899. security
  21900. // seek : Seek Limited
  21901. // https://www.iana.org/domains/root/db/seek.html
  21902. seek
  21903. // select : Registry Services, LLC
  21904. // https://www.iana.org/domains/root/db/select.html
  21905. select
  21906. // sener : Sener Ingeniería y Sistemas, S.A.
  21907. // https://www.iana.org/domains/root/db/sener.html
  21908. sener
  21909. // services : Binky Moon, LLC
  21910. // https://www.iana.org/domains/root/db/services.html
  21911. services
  21912. // seven : Seven West Media Ltd
  21913. // https://www.iana.org/domains/root/db/seven.html
  21914. seven
  21915. // sew : SEW-EURODRIVE GmbH & Co KG
  21916. // https://www.iana.org/domains/root/db/sew.html
  21917. sew
  21918. // sex : ICM Registry SX LLC
  21919. // https://www.iana.org/domains/root/db/sex.html
  21920. sex
  21921. // sexy : Internet Naming Company LLC
  21922. // https://www.iana.org/domains/root/db/sexy.html
  21923. sexy
  21924. // sfr : Societe Francaise du Radiotelephone - SFR
  21925. // https://www.iana.org/domains/root/db/sfr.html
  21926. sfr
  21927. // shangrila : Shangri‐La International Hotel Management Limited
  21928. // https://www.iana.org/domains/root/db/shangrila.html
  21929. shangrila
  21930. // sharp : Sharp Corporation
  21931. // https://www.iana.org/domains/root/db/sharp.html
  21932. sharp
  21933. // shaw : Shaw Cablesystems G.P.
  21934. // https://www.iana.org/domains/root/db/shaw.html
  21935. shaw
  21936. // shell : Shell Information Technology International Inc
  21937. // https://www.iana.org/domains/root/db/shell.html
  21938. shell
  21939. // shia : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  21940. // https://www.iana.org/domains/root/db/shia.html
  21941. shia
  21942. // shiksha : Identity Digital Limited
  21943. // https://www.iana.org/domains/root/db/shiksha.html
  21944. shiksha
  21945. // shoes : Binky Moon, LLC
  21946. // https://www.iana.org/domains/root/db/shoes.html
  21947. shoes
  21948. // shop : GMO Registry, Inc.
  21949. // https://www.iana.org/domains/root/db/shop.html
  21950. shop
  21951. // shopping : Binky Moon, LLC
  21952. // https://www.iana.org/domains/root/db/shopping.html
  21953. shopping
  21954. // shouji : Beijing Qihu Keji Co., Ltd.
  21955. // https://www.iana.org/domains/root/db/shouji.html
  21956. shouji
  21957. // show : Binky Moon, LLC
  21958. // https://www.iana.org/domains/root/db/show.html
  21959. show
  21960. // showtime : CBS Domains Inc.
  21961. // https://www.iana.org/domains/root/db/showtime.html
  21962. showtime
  21963. // silk : Amazon Registry Services, Inc.
  21964. // https://www.iana.org/domains/root/db/silk.html
  21965. silk
  21966. // sina : Sina Corporation
  21967. // https://www.iana.org/domains/root/db/sina.html
  21968. sina
  21969. // singles : Binky Moon, LLC
  21970. // https://www.iana.org/domains/root/db/singles.html
  21971. singles
  21972. // site : Radix FZC DMCC
  21973. // https://www.iana.org/domains/root/db/site.html
  21974. site
  21975. // ski : Identity Digital Limited
  21976. // https://www.iana.org/domains/root/db/ski.html
  21977. ski
  21978. // skin : XYZ.COM LLC
  21979. // https://www.iana.org/domains/root/db/skin.html
  21980. skin
  21981. // sky : Sky International AG
  21982. // https://www.iana.org/domains/root/db/sky.html
  21983. sky
  21984. // skype : Microsoft Corporation
  21985. // https://www.iana.org/domains/root/db/skype.html
  21986. skype
  21987. // sling : DISH Technologies L.L.C.
  21988. // https://www.iana.org/domains/root/db/sling.html
  21989. sling
  21990. // smart : Smart Communications, Inc. (SMART)
  21991. // https://www.iana.org/domains/root/db/smart.html
  21992. smart
  21993. // smile : Amazon Registry Services, Inc.
  21994. // https://www.iana.org/domains/root/db/smile.html
  21995. smile
  21996. // sncf : Société Nationale SNCF
  21997. // https://www.iana.org/domains/root/db/sncf.html
  21998. sncf
  21999. // soccer : Binky Moon, LLC
  22000. // https://www.iana.org/domains/root/db/soccer.html
  22001. soccer
  22002. // social : Dog Beach, LLC
  22003. // https://www.iana.org/domains/root/db/social.html
  22004. social
  22005. // softbank : SoftBank Group Corp.
  22006. // https://www.iana.org/domains/root/db/softbank.html
  22007. softbank
  22008. // software : Dog Beach, LLC
  22009. // https://www.iana.org/domains/root/db/software.html
  22010. software
  22011. // sohu : Sohu.com Limited
  22012. // https://www.iana.org/domains/root/db/sohu.html
  22013. sohu
  22014. // solar : Binky Moon, LLC
  22015. // https://www.iana.org/domains/root/db/solar.html
  22016. solar
  22017. // solutions : Binky Moon, LLC
  22018. // https://www.iana.org/domains/root/db/solutions.html
  22019. solutions
  22020. // song : Amazon Registry Services, Inc.
  22021. // https://www.iana.org/domains/root/db/song.html
  22022. song
  22023. // sony : Sony Corporation
  22024. // https://www.iana.org/domains/root/db/sony.html
  22025. sony
  22026. // soy : Charleston Road Registry Inc.
  22027. // https://www.iana.org/domains/root/db/soy.html
  22028. soy
  22029. // spa : Asia Spa and Wellness Promotion Council Limited
  22030. // https://www.iana.org/domains/root/db/spa.html
  22031. spa
  22032. // space : Radix FZC DMCC
  22033. // https://www.iana.org/domains/root/db/space.html
  22034. space
  22035. // sport : SportAccord
  22036. // https://www.iana.org/domains/root/db/sport.html
  22037. sport
  22038. // spot : Amazon Registry Services, Inc.
  22039. // https://www.iana.org/domains/root/db/spot.html
  22040. spot
  22041. // srl : InterNetX, Corp
  22042. // https://www.iana.org/domains/root/db/srl.html
  22043. srl
  22044. // stada : STADA Arzneimittel AG
  22045. // https://www.iana.org/domains/root/db/stada.html
  22046. stada
  22047. // staples : Staples, Inc.
  22048. // https://www.iana.org/domains/root/db/staples.html
  22049. staples
  22050. // star : Star India Private Limited
  22051. // https://www.iana.org/domains/root/db/star.html
  22052. star
  22053. // statebank : STATE BANK OF INDIA
  22054. // https://www.iana.org/domains/root/db/statebank.html
  22055. statebank
  22056. // statefarm : State Farm Mutual Automobile Insurance Company
  22057. // https://www.iana.org/domains/root/db/statefarm.html
  22058. statefarm
  22059. // stc : Saudi Telecom Company
  22060. // https://www.iana.org/domains/root/db/stc.html
  22061. stc
  22062. // stcgroup : Saudi Telecom Company
  22063. // https://www.iana.org/domains/root/db/stcgroup.html
  22064. stcgroup
  22065. // stockholm : Stockholms kommun
  22066. // https://www.iana.org/domains/root/db/stockholm.html
  22067. stockholm
  22068. // storage : XYZ.COM LLC
  22069. // https://www.iana.org/domains/root/db/storage.html
  22070. storage
  22071. // store : Radix FZC DMCC
  22072. // https://www.iana.org/domains/root/db/store.html
  22073. store
  22074. // stream : dot Stream Limited
  22075. // https://www.iana.org/domains/root/db/stream.html
  22076. stream
  22077. // studio : Dog Beach, LLC
  22078. // https://www.iana.org/domains/root/db/studio.html
  22079. studio
  22080. // study : Registry Services, LLC
  22081. // https://www.iana.org/domains/root/db/study.html
  22082. study
  22083. // style : Binky Moon, LLC
  22084. // https://www.iana.org/domains/root/db/style.html
  22085. style
  22086. // sucks : Vox Populi Registry Ltd.
  22087. // https://www.iana.org/domains/root/db/sucks.html
  22088. sucks
  22089. // supplies : Binky Moon, LLC
  22090. // https://www.iana.org/domains/root/db/supplies.html
  22091. supplies
  22092. // supply : Binky Moon, LLC
  22093. // https://www.iana.org/domains/root/db/supply.html
  22094. supply
  22095. // support : Binky Moon, LLC
  22096. // https://www.iana.org/domains/root/db/support.html
  22097. support
  22098. // surf : Registry Services, LLC
  22099. // https://www.iana.org/domains/root/db/surf.html
  22100. surf
  22101. // surgery : Binky Moon, LLC
  22102. // https://www.iana.org/domains/root/db/surgery.html
  22103. surgery
  22104. // suzuki : SUZUKI MOTOR CORPORATION
  22105. // https://www.iana.org/domains/root/db/suzuki.html
  22106. suzuki
  22107. // swatch : The Swatch Group Ltd
  22108. // https://www.iana.org/domains/root/db/swatch.html
  22109. swatch
  22110. // swiss : Swiss Confederation
  22111. // https://www.iana.org/domains/root/db/swiss.html
  22112. swiss
  22113. // sydney : State of New South Wales, Department of Premier and Cabinet
  22114. // https://www.iana.org/domains/root/db/sydney.html
  22115. sydney
  22116. // systems : Binky Moon, LLC
  22117. // https://www.iana.org/domains/root/db/systems.html
  22118. systems
  22119. // tab : Tabcorp Holdings Limited
  22120. // https://www.iana.org/domains/root/db/tab.html
  22121. tab
  22122. // taipei : Taipei City Government
  22123. // https://www.iana.org/domains/root/db/taipei.html
  22124. taipei
  22125. // talk : Amazon Registry Services, Inc.
  22126. // https://www.iana.org/domains/root/db/talk.html
  22127. talk
  22128. // taobao : Alibaba Group Holding Limited
  22129. // https://www.iana.org/domains/root/db/taobao.html
  22130. taobao
  22131. // target : Target Domain Holdings, LLC
  22132. // https://www.iana.org/domains/root/db/target.html
  22133. target
  22134. // tatamotors : Tata Motors Ltd
  22135. // https://www.iana.org/domains/root/db/tatamotors.html
  22136. tatamotors
  22137. // tatar : Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic"
  22138. // https://www.iana.org/domains/root/db/tatar.html
  22139. tatar
  22140. // tattoo : Registry Services, LLC
  22141. // https://www.iana.org/domains/root/db/tattoo.html
  22142. tattoo
  22143. // tax : Binky Moon, LLC
  22144. // https://www.iana.org/domains/root/db/tax.html
  22145. tax
  22146. // taxi : Binky Moon, LLC
  22147. // https://www.iana.org/domains/root/db/taxi.html
  22148. taxi
  22149. // tci : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  22150. // https://www.iana.org/domains/root/db/tci.html
  22151. tci
  22152. // tdk : TDK Corporation
  22153. // https://www.iana.org/domains/root/db/tdk.html
  22154. tdk
  22155. // team : Binky Moon, LLC
  22156. // https://www.iana.org/domains/root/db/team.html
  22157. team
  22158. // tech : Radix FZC DMCC
  22159. // https://www.iana.org/domains/root/db/tech.html
  22160. tech
  22161. // technology : Binky Moon, LLC
  22162. // https://www.iana.org/domains/root/db/technology.html
  22163. technology
  22164. // temasek : Temasek Holdings (Private) Limited
  22165. // https://www.iana.org/domains/root/db/temasek.html
  22166. temasek
  22167. // tennis : Binky Moon, LLC
  22168. // https://www.iana.org/domains/root/db/tennis.html
  22169. tennis
  22170. // teva : Teva Pharmaceutical Industries Limited
  22171. // https://www.iana.org/domains/root/db/teva.html
  22172. teva
  22173. // thd : Home Depot Product Authority, LLC
  22174. // https://www.iana.org/domains/root/db/thd.html
  22175. thd
  22176. // theater : Binky Moon, LLC
  22177. // https://www.iana.org/domains/root/db/theater.html
  22178. theater
  22179. // theatre : XYZ.COM LLC
  22180. // https://www.iana.org/domains/root/db/theatre.html
  22181. theatre
  22182. // tiaa : Teachers Insurance and Annuity Association of America
  22183. // https://www.iana.org/domains/root/db/tiaa.html
  22184. tiaa
  22185. // tickets : XYZ.COM LLC
  22186. // https://www.iana.org/domains/root/db/tickets.html
  22187. tickets
  22188. // tienda : Binky Moon, LLC
  22189. // https://www.iana.org/domains/root/db/tienda.html
  22190. tienda
  22191. // tips : Binky Moon, LLC
  22192. // https://www.iana.org/domains/root/db/tips.html
  22193. tips
  22194. // tires : Binky Moon, LLC
  22195. // https://www.iana.org/domains/root/db/tires.html
  22196. tires
  22197. // tirol : punkt Tirol GmbH
  22198. // https://www.iana.org/domains/root/db/tirol.html
  22199. tirol
  22200. // tjmaxx : The TJX Companies, Inc.
  22201. // https://www.iana.org/domains/root/db/tjmaxx.html
  22202. tjmaxx
  22203. // tjx : The TJX Companies, Inc.
  22204. // https://www.iana.org/domains/root/db/tjx.html
  22205. tjx
  22206. // tkmaxx : The TJX Companies, Inc.
  22207. // https://www.iana.org/domains/root/db/tkmaxx.html
  22208. tkmaxx
  22209. // tmall : Alibaba Group Holding Limited
  22210. // https://www.iana.org/domains/root/db/tmall.html
  22211. tmall
  22212. // today : Binky Moon, LLC
  22213. // https://www.iana.org/domains/root/db/today.html
  22214. today
  22215. // tokyo : GMO Registry, Inc.
  22216. // https://www.iana.org/domains/root/db/tokyo.html
  22217. tokyo
  22218. // tools : Binky Moon, LLC
  22219. // https://www.iana.org/domains/root/db/tools.html
  22220. tools
  22221. // top : .TOP Registry
  22222. // https://www.iana.org/domains/root/db/top.html
  22223. top
  22224. // toray : Toray Industries, Inc.
  22225. // https://www.iana.org/domains/root/db/toray.html
  22226. toray
  22227. // toshiba : TOSHIBA Corporation
  22228. // https://www.iana.org/domains/root/db/toshiba.html
  22229. toshiba
  22230. // total : TotalEnergies SE
  22231. // https://www.iana.org/domains/root/db/total.html
  22232. total
  22233. // tours : Binky Moon, LLC
  22234. // https://www.iana.org/domains/root/db/tours.html
  22235. tours
  22236. // town : Binky Moon, LLC
  22237. // https://www.iana.org/domains/root/db/town.html
  22238. town
  22239. // toyota : TOYOTA MOTOR CORPORATION
  22240. // https://www.iana.org/domains/root/db/toyota.html
  22241. toyota
  22242. // toys : Binky Moon, LLC
  22243. // https://www.iana.org/domains/root/db/toys.html
  22244. toys
  22245. // trade : Elite Registry Limited
  22246. // https://www.iana.org/domains/root/db/trade.html
  22247. trade
  22248. // trading : Dog Beach, LLC
  22249. // https://www.iana.org/domains/root/db/trading.html
  22250. trading
  22251. // training : Binky Moon, LLC
  22252. // https://www.iana.org/domains/root/db/training.html
  22253. training
  22254. // travel : Dog Beach, LLC
  22255. // https://www.iana.org/domains/root/db/travel.html
  22256. travel
  22257. // travelers : Travelers TLD, LLC
  22258. // https://www.iana.org/domains/root/db/travelers.html
  22259. travelers
  22260. // travelersinsurance : Travelers TLD, LLC
  22261. // https://www.iana.org/domains/root/db/travelersinsurance.html
  22262. travelersinsurance
  22263. // trust : Internet Naming Company LLC
  22264. // https://www.iana.org/domains/root/db/trust.html
  22265. trust
  22266. // trv : Travelers TLD, LLC
  22267. // https://www.iana.org/domains/root/db/trv.html
  22268. trv
  22269. // tube : Latin American Telecom LLC
  22270. // https://www.iana.org/domains/root/db/tube.html
  22271. tube
  22272. // tui : TUI AG
  22273. // https://www.iana.org/domains/root/db/tui.html
  22274. tui
  22275. // tunes : Amazon Registry Services, Inc.
  22276. // https://www.iana.org/domains/root/db/tunes.html
  22277. tunes
  22278. // tushu : Amazon Registry Services, Inc.
  22279. // https://www.iana.org/domains/root/db/tushu.html
  22280. tushu
  22281. // tvs : T V SUNDRAM IYENGAR & SONS LIMITED
  22282. // https://www.iana.org/domains/root/db/tvs.html
  22283. tvs
  22284. // ubank : National Australia Bank Limited
  22285. // https://www.iana.org/domains/root/db/ubank.html
  22286. ubank
  22287. // ubs : UBS AG
  22288. // https://www.iana.org/domains/root/db/ubs.html
  22289. ubs
  22290. // unicom : China United Network Communications Corporation Limited
  22291. // https://www.iana.org/domains/root/db/unicom.html
  22292. unicom
  22293. // university : Binky Moon, LLC
  22294. // https://www.iana.org/domains/root/db/university.html
  22295. university
  22296. // uno : Radix FZC DMCC
  22297. // https://www.iana.org/domains/root/db/uno.html
  22298. uno
  22299. // uol : UBN INTERNET LTDA.
  22300. // https://www.iana.org/domains/root/db/uol.html
  22301. uol
  22302. // ups : UPS Market Driver, Inc.
  22303. // https://www.iana.org/domains/root/db/ups.html
  22304. ups
  22305. // vacations : Binky Moon, LLC
  22306. // https://www.iana.org/domains/root/db/vacations.html
  22307. vacations
  22308. // vana : Lifestyle Domain Holdings, Inc.
  22309. // https://www.iana.org/domains/root/db/vana.html
  22310. vana
  22311. // vanguard : The Vanguard Group, Inc.
  22312. // https://www.iana.org/domains/root/db/vanguard.html
  22313. vanguard
  22314. // vegas : Dot Vegas, Inc.
  22315. // https://www.iana.org/domains/root/db/vegas.html
  22316. vegas
  22317. // ventures : Binky Moon, LLC
  22318. // https://www.iana.org/domains/root/db/ventures.html
  22319. ventures
  22320. // verisign : VeriSign, Inc.
  22321. // https://www.iana.org/domains/root/db/verisign.html
  22322. verisign
  22323. // versicherung : tldbox GmbH
  22324. // https://www.iana.org/domains/root/db/versicherung.html
  22325. versicherung
  22326. // vet : Dog Beach, LLC
  22327. // https://www.iana.org/domains/root/db/vet.html
  22328. vet
  22329. // viajes : Binky Moon, LLC
  22330. // https://www.iana.org/domains/root/db/viajes.html
  22331. viajes
  22332. // video : Dog Beach, LLC
  22333. // https://www.iana.org/domains/root/db/video.html
  22334. video
  22335. // vig : VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
  22336. // https://www.iana.org/domains/root/db/vig.html
  22337. vig
  22338. // viking : Viking River Cruises (Bermuda) Ltd.
  22339. // https://www.iana.org/domains/root/db/viking.html
  22340. viking
  22341. // villas : Binky Moon, LLC
  22342. // https://www.iana.org/domains/root/db/villas.html
  22343. villas
  22344. // vin : Binky Moon, LLC
  22345. // https://www.iana.org/domains/root/db/vin.html
  22346. vin
  22347. // vip : Registry Services, LLC
  22348. // https://www.iana.org/domains/root/db/vip.html
  22349. vip
  22350. // virgin : Virgin Enterprises Limited
  22351. // https://www.iana.org/domains/root/db/virgin.html
  22352. virgin
  22353. // visa : Visa Worldwide Pte. Limited
  22354. // https://www.iana.org/domains/root/db/visa.html
  22355. visa
  22356. // vision : Binky Moon, LLC
  22357. // https://www.iana.org/domains/root/db/vision.html
  22358. vision
  22359. // viva : Saudi Telecom Company
  22360. // https://www.iana.org/domains/root/db/viva.html
  22361. viva
  22362. // vivo : Telefonica Brasil S.A.
  22363. // https://www.iana.org/domains/root/db/vivo.html
  22364. vivo
  22365. // vlaanderen : DNS.be vzw
  22366. // https://www.iana.org/domains/root/db/vlaanderen.html
  22367. vlaanderen
  22368. // vodka : Registry Services, LLC
  22369. // https://www.iana.org/domains/root/db/vodka.html
  22370. vodka
  22371. // volkswagen : Volkswagen Group of America Inc.
  22372. // https://www.iana.org/domains/root/db/volkswagen.html
  22373. volkswagen
  22374. // volvo : Volvo Holding Sverige Aktiebolag
  22375. // https://www.iana.org/domains/root/db/volvo.html
  22376. volvo
  22377. // vote : Monolith Registry LLC
  22378. // https://www.iana.org/domains/root/db/vote.html
  22379. vote
  22380. // voting : Valuetainment Corp.
  22381. // https://www.iana.org/domains/root/db/voting.html
  22382. voting
  22383. // voto : Monolith Registry LLC
  22384. // https://www.iana.org/domains/root/db/voto.html
  22385. voto
  22386. // voyage : Binky Moon, LLC
  22387. // https://www.iana.org/domains/root/db/voyage.html
  22388. voyage
  22389. // wales : Nominet UK
  22390. // https://www.iana.org/domains/root/db/wales.html
  22391. wales
  22392. // walmart : Wal-Mart Stores, Inc.
  22393. // https://www.iana.org/domains/root/db/walmart.html
  22394. walmart
  22395. // walter : Sandvik AB
  22396. // https://www.iana.org/domains/root/db/walter.html
  22397. walter
  22398. // wang : Zodiac Wang Limited
  22399. // https://www.iana.org/domains/root/db/wang.html
  22400. wang
  22401. // wanggou : Amazon Registry Services, Inc.
  22402. // https://www.iana.org/domains/root/db/wanggou.html
  22403. wanggou
  22404. // watch : Binky Moon, LLC
  22405. // https://www.iana.org/domains/root/db/watch.html
  22406. watch
  22407. // watches : Identity Digital Limited
  22408. // https://www.iana.org/domains/root/db/watches.html
  22409. watches
  22410. // weather : International Business Machines Corporation
  22411. // https://www.iana.org/domains/root/db/weather.html
  22412. weather
  22413. // weatherchannel : International Business Machines Corporation
  22414. // https://www.iana.org/domains/root/db/weatherchannel.html
  22415. weatherchannel
  22416. // webcam : dot Webcam Limited
  22417. // https://www.iana.org/domains/root/db/webcam.html
  22418. webcam
  22419. // weber : Saint-Gobain Weber SA
  22420. // https://www.iana.org/domains/root/db/weber.html
  22421. weber
  22422. // website : Radix FZC DMCC
  22423. // https://www.iana.org/domains/root/db/website.html
  22424. website
  22425. // wedding : Registry Services, LLC
  22426. // https://www.iana.org/domains/root/db/wedding.html
  22427. wedding
  22428. // weibo : Sina Corporation
  22429. // https://www.iana.org/domains/root/db/weibo.html
  22430. weibo
  22431. // weir : Weir Group IP Limited
  22432. // https://www.iana.org/domains/root/db/weir.html
  22433. weir
  22434. // whoswho : Who's Who Registry
  22435. // https://www.iana.org/domains/root/db/whoswho.html
  22436. whoswho
  22437. // wien : punkt.wien GmbH
  22438. // https://www.iana.org/domains/root/db/wien.html
  22439. wien
  22440. // wiki : Registry Services, LLC
  22441. // https://www.iana.org/domains/root/db/wiki.html
  22442. wiki
  22443. // williamhill : William Hill Organization Limited
  22444. // https://www.iana.org/domains/root/db/williamhill.html
  22445. williamhill
  22446. // win : First Registry Limited
  22447. // https://www.iana.org/domains/root/db/win.html
  22448. win
  22449. // windows : Microsoft Corporation
  22450. // https://www.iana.org/domains/root/db/windows.html
  22451. windows
  22452. // wine : Binky Moon, LLC
  22453. // https://www.iana.org/domains/root/db/wine.html
  22454. wine
  22455. // winners : The TJX Companies, Inc.
  22456. // https://www.iana.org/domains/root/db/winners.html
  22457. winners
  22458. // wme : William Morris Endeavor Entertainment, LLC
  22459. // https://www.iana.org/domains/root/db/wme.html
  22460. wme
  22461. // wolterskluwer : Wolters Kluwer N.V.
  22462. // https://www.iana.org/domains/root/db/wolterskluwer.html
  22463. wolterskluwer
  22464. // woodside : Woodside Petroleum Limited
  22465. // https://www.iana.org/domains/root/db/woodside.html
  22466. woodside
  22467. // work : Registry Services, LLC
  22468. // https://www.iana.org/domains/root/db/work.html
  22469. work
  22470. // works : Binky Moon, LLC
  22471. // https://www.iana.org/domains/root/db/works.html
  22472. works
  22473. // world : Binky Moon, LLC
  22474. // https://www.iana.org/domains/root/db/world.html
  22475. world
  22476. // wow : Amazon Registry Services, Inc.
  22477. // https://www.iana.org/domains/root/db/wow.html
  22478. wow
  22479. // wtc : World Trade Centers Association, Inc.
  22480. // https://www.iana.org/domains/root/db/wtc.html
  22481. wtc
  22482. // wtf : Binky Moon, LLC
  22483. // https://www.iana.org/domains/root/db/wtf.html
  22484. wtf
  22485. // xbox : Microsoft Corporation
  22486. // https://www.iana.org/domains/root/db/xbox.html
  22487. xbox
  22488. // xerox : Xerox DNHC LLC
  22489. // https://www.iana.org/domains/root/db/xerox.html
  22490. xerox
  22491. // xfinity : Comcast IP Holdings I, LLC
  22492. // https://www.iana.org/domains/root/db/xfinity.html
  22493. xfinity
  22494. // xihuan : Beijing Qihu Keji Co., Ltd.
  22495. // https://www.iana.org/domains/root/db/xihuan.html
  22496. xihuan
  22497. // xin : Elegant Leader Limited
  22498. // https://www.iana.org/domains/root/db/xin.html
  22499. xin
  22500. // xn--11b4c3d : VeriSign Sarl
  22501. // https://www.iana.org/domains/root/db/xn--11b4c3d.html
  22502. कॉम
  22503. // xn--1ck2e1b : Amazon Registry Services, Inc.
  22504. // https://www.iana.org/domains/root/db/xn--1ck2e1b.html
  22505. セール
  22506. // xn--1qqw23a : Guangzhou YU Wei Information Technology Co., Ltd.
  22507. // https://www.iana.org/domains/root/db/xn--1qqw23a.html
  22508. 佛山
  22509. // xn--30rr7y : Excellent First Limited
  22510. // https://www.iana.org/domains/root/db/xn--30rr7y.html
  22511. 慈善
  22512. // xn--3bst00m : Eagle Horizon Limited
  22513. // https://www.iana.org/domains/root/db/xn--3bst00m.html
  22514. 集团
  22515. // xn--3ds443g : TLD REGISTRY LIMITED OY
  22516. // https://www.iana.org/domains/root/db/xn--3ds443g.html
  22517. 在线
  22518. // xn--3pxu8k : VeriSign Sarl
  22519. // https://www.iana.org/domains/root/db/xn--3pxu8k.html
  22520. 点看
  22521. // xn--42c2d9a : VeriSign Sarl
  22522. // https://www.iana.org/domains/root/db/xn--42c2d9a.html
  22523. คอม
  22524. // xn--45q11c : Zodiac Gemini Ltd
  22525. // https://www.iana.org/domains/root/db/xn--45q11c.html
  22526. 八卦
  22527. // xn--4gbrim : Helium TLDs Ltd
  22528. // https://www.iana.org/domains/root/db/xn--4gbrim.html
  22529. موقع
  22530. // xn--55qw42g : China Organizational Name Administration Center
  22531. // https://www.iana.org/domains/root/db/xn--55qw42g.html
  22532. 公益
  22533. // xn--55qx5d : China Internet Network Information Center (CNNIC)
  22534. // https://www.iana.org/domains/root/db/xn--55qx5d.html
  22535. 公司
  22536. // xn--5su34j936bgsg : Shangri‐La International Hotel Management Limited
  22537. // https://www.iana.org/domains/root/db/xn--5su34j936bgsg.html
  22538. 香格里拉
  22539. // xn--5tzm5g : Global Website TLD Asia Limited
  22540. // https://www.iana.org/domains/root/db/xn--5tzm5g.html
  22541. 网站
  22542. // xn--6frz82g : Identity Digital Limited
  22543. // https://www.iana.org/domains/root/db/xn--6frz82g.html
  22544. 移动
  22545. // xn--6qq986b3xl : Tycoon Treasure Limited
  22546. // https://www.iana.org/domains/root/db/xn--6qq986b3xl.html
  22547. 我爱你
  22548. // xn--80adxhks : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID)
  22549. // https://www.iana.org/domains/root/db/xn--80adxhks.html
  22550. москва
  22551. // xn--80aqecdr1a : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  22552. // https://www.iana.org/domains/root/db/xn--80aqecdr1a.html
  22553. католик
  22554. // xn--80asehdb : CORE Association
  22555. // https://www.iana.org/domains/root/db/xn--80asehdb.html
  22556. онлайн
  22557. // xn--80aswg : CORE Association
  22558. // https://www.iana.org/domains/root/db/xn--80aswg.html
  22559. сайт
  22560. // xn--8y0a063a : China United Network Communications Corporation Limited
  22561. // https://www.iana.org/domains/root/db/xn--8y0a063a.html
  22562. 联通
  22563. // xn--9dbq2a : VeriSign Sarl
  22564. // https://www.iana.org/domains/root/db/xn--9dbq2a.html
  22565. קום
  22566. // xn--9et52u : RISE VICTORY LIMITED
  22567. // https://www.iana.org/domains/root/db/xn--9et52u.html
  22568. 时尚
  22569. // xn--9krt00a : Sina Corporation
  22570. // https://www.iana.org/domains/root/db/xn--9krt00a.html
  22571. 微博
  22572. // xn--b4w605ferd : Temasek Holdings (Private) Limited
  22573. // https://www.iana.org/domains/root/db/xn--b4w605ferd.html
  22574. 淡马锡
  22575. // xn--bck1b9a5dre4c : Amazon Registry Services, Inc.
  22576. // https://www.iana.org/domains/root/db/xn--bck1b9a5dre4c.html
  22577. ファッション
  22578. // xn--c1avg : Public Interest Registry
  22579. // https://www.iana.org/domains/root/db/xn--c1avg.html
  22580. орг
  22581. // xn--c2br7g : VeriSign Sarl
  22582. // https://www.iana.org/domains/root/db/xn--c2br7g.html
  22583. नेट
  22584. // xn--cck2b3b : Amazon Registry Services, Inc.
  22585. // https://www.iana.org/domains/root/db/xn--cck2b3b.html
  22586. ストア
  22587. // xn--cckwcxetd : Amazon Registry Services, Inc.
  22588. // https://www.iana.org/domains/root/db/xn--cckwcxetd.html
  22589. アマゾン
  22590. // xn--cg4bki : SAMSUNG SDS CO., LTD
  22591. // https://www.iana.org/domains/root/db/xn--cg4bki.html
  22592. 삼성
  22593. // xn--czr694b : Internet DotTrademark Organisation Limited
  22594. // https://www.iana.org/domains/root/db/xn--czr694b.html
  22595. 商标
  22596. // xn--czrs0t : Binky Moon, LLC
  22597. // https://www.iana.org/domains/root/db/xn--czrs0t.html
  22598. 商店
  22599. // xn--czru2d : Zodiac Aquarius Limited
  22600. // https://www.iana.org/domains/root/db/xn--czru2d.html
  22601. 商城
  22602. // xn--d1acj3b : The Foundation for Network Initiatives “The Smart Internet”
  22603. // https://www.iana.org/domains/root/db/xn--d1acj3b.html
  22604. дети
  22605. // xn--eckvdtc9d : Amazon Registry Services, Inc.
  22606. // https://www.iana.org/domains/root/db/xn--eckvdtc9d.html
  22607. ポイント
  22608. // xn--efvy88h : Guangzhou YU Wei Information Technology Co., Ltd.
  22609. // https://www.iana.org/domains/root/db/xn--efvy88h.html
  22610. 新闻
  22611. // xn--fct429k : Amazon Registry Services, Inc.
  22612. // https://www.iana.org/domains/root/db/xn--fct429k.html
  22613. 家電
  22614. // xn--fhbei : VeriSign Sarl
  22615. // https://www.iana.org/domains/root/db/xn--fhbei.html
  22616. كوم
  22617. // xn--fiq228c5hs : TLD REGISTRY LIMITED OY
  22618. // https://www.iana.org/domains/root/db/xn--fiq228c5hs.html
  22619. 中文网
  22620. // xn--fiq64b : CITIC Group Corporation
  22621. // https://www.iana.org/domains/root/db/xn--fiq64b.html
  22622. 中信
  22623. // xn--fjq720a : Binky Moon, LLC
  22624. // https://www.iana.org/domains/root/db/xn--fjq720a.html
  22625. 娱乐
  22626. // xn--flw351e : Charleston Road Registry Inc.
  22627. // https://www.iana.org/domains/root/db/xn--flw351e.html
  22628. 谷歌
  22629. // xn--fzys8d69uvgm : PCCW Enterprises Limited
  22630. // https://www.iana.org/domains/root/db/xn--fzys8d69uvgm.html
  22631. 電訊盈科
  22632. // xn--g2xx48c : Nawang Heli(Xiamen) Network Service Co., LTD.
  22633. // https://www.iana.org/domains/root/db/xn--g2xx48c.html
  22634. 购物
  22635. // xn--gckr3f0f : Amazon Registry Services, Inc.
  22636. // https://www.iana.org/domains/root/db/xn--gckr3f0f.html
  22637. クラウド
  22638. // xn--gk3at1e : Amazon Registry Services, Inc.
  22639. // https://www.iana.org/domains/root/db/xn--gk3at1e.html
  22640. 通販
  22641. // xn--hxt814e : Zodiac Taurus Limited
  22642. // https://www.iana.org/domains/root/db/xn--hxt814e.html
  22643. 网店
  22644. // xn--i1b6b1a6a2e : Public Interest Registry
  22645. // https://www.iana.org/domains/root/db/xn--i1b6b1a6a2e.html
  22646. संगठन
  22647. // xn--imr513n : Internet DotTrademark Organisation Limited
  22648. // https://www.iana.org/domains/root/db/xn--imr513n.html
  22649. 餐厅
  22650. // xn--io0a7i : China Internet Network Information Center (CNNIC)
  22651. // https://www.iana.org/domains/root/db/xn--io0a7i.html
  22652. 网络
  22653. // xn--j1aef : VeriSign Sarl
  22654. // https://www.iana.org/domains/root/db/xn--j1aef.html
  22655. ком
  22656. // xn--jlq480n2rg : Amazon Registry Services, Inc.
  22657. // https://www.iana.org/domains/root/db/xn--jlq480n2rg.html
  22658. 亚马逊
  22659. // xn--jvr189m : Amazon Registry Services, Inc.
  22660. // https://www.iana.org/domains/root/db/xn--jvr189m.html
  22661. 食品
  22662. // xn--kcrx77d1x4a : Koninklijke Philips N.V.
  22663. // https://www.iana.org/domains/root/db/xn--kcrx77d1x4a.html
  22664. 飞利浦
  22665. // xn--kput3i : Beijing RITT-Net Technology Development Co., Ltd
  22666. // https://www.iana.org/domains/root/db/xn--kput3i.html
  22667. 手机
  22668. // xn--mgba3a3ejt : Aramco Services Company
  22669. // https://www.iana.org/domains/root/db/xn--mgba3a3ejt.html
  22670. ارامكو
  22671. // xn--mgba7c0bbn0a : Competrol (Luxembourg) Sarl
  22672. // https://www.iana.org/domains/root/db/xn--mgba7c0bbn0a.html
  22673. العليان
  22674. // xn--mgbaakc7dvf : Emirates Telecommunications Corporation (trading as Etisalat)
  22675. // https://www.iana.org/domains/root/db/xn--mgbaakc7dvf.html
  22676. اتصالات
  22677. // xn--mgbab2bd : CORE Association
  22678. // https://www.iana.org/domains/root/db/xn--mgbab2bd.html
  22679. بازار
  22680. // xn--mgbca7dzdo : Abu Dhabi Systems and Information Centre
  22681. // https://www.iana.org/domains/root/db/xn--mgbca7dzdo.html
  22682. ابوظبي
  22683. // xn--mgbi4ecexp : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  22684. // https://www.iana.org/domains/root/db/xn--mgbi4ecexp.html
  22685. كاثوليك
  22686. // xn--mgbt3dhd : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
  22687. // https://www.iana.org/domains/root/db/xn--mgbt3dhd.html
  22688. همراه
  22689. // xn--mk1bu44c : VeriSign Sarl
  22690. // https://www.iana.org/domains/root/db/xn--mk1bu44c.html
  22691. 닷컴
  22692. // xn--mxtq1m : Net-Chinese Co., Ltd.
  22693. // https://www.iana.org/domains/root/db/xn--mxtq1m.html
  22694. 政府
  22695. // xn--ngbc5azd : International Domain Registry Pty. Ltd.
  22696. // https://www.iana.org/domains/root/db/xn--ngbc5azd.html
  22697. شبكة
  22698. // xn--ngbe9e0a : Kuwait Finance House
  22699. // https://www.iana.org/domains/root/db/xn--ngbe9e0a.html
  22700. بيتك
  22701. // xn--ngbrx : League of Arab States
  22702. // https://www.iana.org/domains/root/db/xn--ngbrx.html
  22703. عرب
  22704. // xn--nqv7f : Public Interest Registry
  22705. // https://www.iana.org/domains/root/db/xn--nqv7f.html
  22706. 机构
  22707. // xn--nqv7fs00ema : Public Interest Registry
  22708. // https://www.iana.org/domains/root/db/xn--nqv7fs00ema.html
  22709. 组织机构
  22710. // xn--nyqy26a : Stable Tone Limited
  22711. // https://www.iana.org/domains/root/db/xn--nyqy26a.html
  22712. 健康
  22713. // xn--otu796d : Jiang Yu Liang Cai Technology Company Limited
  22714. // https://www.iana.org/domains/root/db/xn--otu796d.html
  22715. 招聘
  22716. // xn--p1acf : Rusnames Limited
  22717. // https://www.iana.org/domains/root/db/xn--p1acf.html
  22718. рус
  22719. // xn--pssy2u : VeriSign Sarl
  22720. // https://www.iana.org/domains/root/db/xn--pssy2u.html
  22721. 大拿
  22722. // xn--q9jyb4c : Charleston Road Registry Inc.
  22723. // https://www.iana.org/domains/root/db/xn--q9jyb4c.html
  22724. みんな
  22725. // xn--qcka1pmc : Charleston Road Registry Inc.
  22726. // https://www.iana.org/domains/root/db/xn--qcka1pmc.html
  22727. グーグル
  22728. // xn--rhqv96g : Stable Tone Limited
  22729. // https://www.iana.org/domains/root/db/xn--rhqv96g.html
  22730. 世界
  22731. // xn--rovu88b : Amazon Registry Services, Inc.
  22732. // https://www.iana.org/domains/root/db/xn--rovu88b.html
  22733. 書籍
  22734. // xn--ses554g : KNET Co., Ltd.
  22735. // https://www.iana.org/domains/root/db/xn--ses554g.html
  22736. 网址
  22737. // xn--t60b56a : VeriSign Sarl
  22738. // https://www.iana.org/domains/root/db/xn--t60b56a.html
  22739. 닷넷
  22740. // xn--tckwe : VeriSign Sarl
  22741. // https://www.iana.org/domains/root/db/xn--tckwe.html
  22742. コム
  22743. // xn--tiq49xqyj : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication)
  22744. // https://www.iana.org/domains/root/db/xn--tiq49xqyj.html
  22745. 天主教
  22746. // xn--unup4y : Binky Moon, LLC
  22747. // https://www.iana.org/domains/root/db/xn--unup4y.html
  22748. 游戏
  22749. // xn--vermgensberater-ctb : Deutsche Vermögensberatung Aktiengesellschaft DVAG
  22750. // https://www.iana.org/domains/root/db/xn--vermgensberater-ctb.html
  22751. vermögensberater
  22752. // xn--vermgensberatung-pwb : Deutsche Vermögensberatung Aktiengesellschaft DVAG
  22753. // https://www.iana.org/domains/root/db/xn--vermgensberatung-pwb.html
  22754. vermögensberatung
  22755. // xn--vhquv : Binky Moon, LLC
  22756. // https://www.iana.org/domains/root/db/xn--vhquv.html
  22757. 企业
  22758. // xn--vuq861b : Beijing Tele-info Technology Co., Ltd.
  22759. // https://www.iana.org/domains/root/db/xn--vuq861b.html
  22760. 信息
  22761. // xn--w4r85el8fhu5dnra : Kerry Trading Co. Limited
  22762. // https://www.iana.org/domains/root/db/xn--w4r85el8fhu5dnra.html
  22763. 嘉里大酒店
  22764. // xn--w4rs40l : Kerry Trading Co. Limited
  22765. // https://www.iana.org/domains/root/db/xn--w4rs40l.html
  22766. 嘉里
  22767. // xn--xhq521b : Guangzhou YU Wei Information Technology Co., Ltd.
  22768. // https://www.iana.org/domains/root/db/xn--xhq521b.html
  22769. 广东
  22770. // xn--zfr164b : China Organizational Name Administration Center
  22771. // https://www.iana.org/domains/root/db/xn--zfr164b.html
  22772. 政务
  22773. // xyz : XYZ.COM LLC
  22774. // https://www.iana.org/domains/root/db/xyz.html
  22775. xyz
  22776. // yachts : XYZ.COM LLC
  22777. // https://www.iana.org/domains/root/db/yachts.html
  22778. yachts
  22779. // yahoo : Oath Inc.
  22780. // https://www.iana.org/domains/root/db/yahoo.html
  22781. yahoo
  22782. // yamaxun : Amazon Registry Services, Inc.
  22783. // https://www.iana.org/domains/root/db/yamaxun.html
  22784. yamaxun
  22785. // yandex : Yandex Europe B.V.
  22786. // https://www.iana.org/domains/root/db/yandex.html
  22787. yandex
  22788. // yodobashi : YODOBASHI CAMERA CO.,LTD.
  22789. // https://www.iana.org/domains/root/db/yodobashi.html
  22790. yodobashi
  22791. // yoga : Registry Services, LLC
  22792. // https://www.iana.org/domains/root/db/yoga.html
  22793. yoga
  22794. // yokohama : GMO Registry, Inc.
  22795. // https://www.iana.org/domains/root/db/yokohama.html
  22796. yokohama
  22797. // you : Amazon Registry Services, Inc.
  22798. // https://www.iana.org/domains/root/db/you.html
  22799. you
  22800. // youtube : Charleston Road Registry Inc.
  22801. // https://www.iana.org/domains/root/db/youtube.html
  22802. youtube
  22803. // yun : Beijing Qihu Keji Co., Ltd.
  22804. // https://www.iana.org/domains/root/db/yun.html
  22805. yun
  22806. // zappos : Amazon Registry Services, Inc.
  22807. // https://www.iana.org/domains/root/db/zappos.html
  22808. zappos
  22809. // zara : Industria de Diseño Textil, S.A. (INDITEX, S.A.)
  22810. // https://www.iana.org/domains/root/db/zara.html
  22811. zara
  22812. // zero : Amazon Registry Services, Inc.
  22813. // https://www.iana.org/domains/root/db/zero.html
  22814. zero
  22815. // zip : Charleston Road Registry Inc.
  22816. // https://www.iana.org/domains/root/db/zip.html
  22817. zip
  22818. // zone : Binky Moon, LLC
  22819. // https://www.iana.org/domains/root/db/zone.html
  22820. zone
  22821. // zuerich : Kanton Zürich (Canton of Zurich)
  22822. // https://www.iana.org/domains/root/db/zuerich.html
  22823. zuerich
  22824. // ===END ICANN DOMAINS===
  22825. // ===BEGIN PRIVATE DOMAINS===
  22826. // (Note: these are in alphabetical order by company name)
  22827. // 1GB LLC : https://www.1gb.ua/
  22828. // Submitted by 1GB LLC <noc@1gb.com.ua>
  22829. cc.ua
  22830. inf.ua
  22831. ltd.ua
  22832. // 611coin : https://611project.org/
  22833. 611.to
  22834. // Aaron Marais' Gitlab pages: https://lab.aaronleem.co.za
  22835. // Submitted by Aaron Marais <its_me@aaronleem.co.za>
  22836. graphox.us
  22837. // accesso Technology Group, plc. : https://accesso.com/
  22838. // Submitted by accesso Team <accessoecommerce@accesso.com>
  22839. *.devcdnaccesso.com
  22840. // Acorn Labs : https://acorn.io
  22841. // Submitted by Craig Jellick <domains@acorn.io>
  22842. *.on-acorn.io
  22843. // ActiveTrail: https://www.activetrail.biz/
  22844. // Submitted by Ofer Kalaora <postmaster@activetrail.com>
  22845. activetrail.biz
  22846. // Adobe : https://www.adobe.com/
  22847. // Submitted by Ian Boston <boston@adobe.com> and Lars Trieloff <trieloff@adobe.com>
  22848. adobeaemcloud.com
  22849. *.dev.adobeaemcloud.com
  22850. hlx.live
  22851. adobeaemcloud.net
  22852. hlx.page
  22853. hlx3.page
  22854. // Adobe Developer Platform : https://developer.adobe.com
  22855. // Submitted by Jesse MacFadyen<jessem@adobe.com>
  22856. adobeio-static.net
  22857. adobeioruntime.net
  22858. // Agnat sp. z o.o. : https://domena.pl
  22859. // Submitted by Przemyslaw Plewa <it-admin@domena.pl>
  22860. beep.pl
  22861. // Airkit : https://www.airkit.com/
  22862. // Submitted by Grant Cooksey <security@airkit.com>
  22863. airkitapps.com
  22864. airkitapps-au.com
  22865. airkitapps.eu
  22866. // Aiven: https://aiven.io/
  22867. // Submitted by Etienne Stalmans <security@aiven.io>
  22868. aivencloud.com
  22869. // Akamai : https://www.akamai.com/
  22870. // Submitted by Akamai Team <publicsuffixlist@akamai.com>
  22871. akadns.net
  22872. akamai.net
  22873. akamai-staging.net
  22874. akamaiedge.net
  22875. akamaiedge-staging.net
  22876. akamaihd.net
  22877. akamaihd-staging.net
  22878. akamaiorigin.net
  22879. akamaiorigin-staging.net
  22880. akamaized.net
  22881. akamaized-staging.net
  22882. edgekey.net
  22883. edgekey-staging.net
  22884. edgesuite.net
  22885. edgesuite-staging.net
  22886. // alboto.ca : http://alboto.ca
  22887. // Submitted by Anton Avramov <avramov@alboto.ca>
  22888. barsy.ca
  22889. // Alces Software Ltd : http://alces-software.com
  22890. // Submitted by Mark J. Titorenko <mark.titorenko@alces-software.com>
  22891. *.compute.estate
  22892. *.alces.network
  22893. // all-inkl.com : https://all-inkl.com
  22894. // Submitted by Werner Kaltofen <wk@all-inkl.com>
  22895. kasserver.com
  22896. // Altervista: https://www.altervista.org
  22897. // Submitted by Carlo Cannas <tech_staff@altervista.it>
  22898. altervista.org
  22899. // alwaysdata : https://www.alwaysdata.com
  22900. // Submitted by Cyril <admin@alwaysdata.com>
  22901. alwaysdata.net
  22902. // Amaze Software : https://amaze.co
  22903. // Submitted by Domain Admin <domainadmin@amaze.co>
  22904. myamaze.net
  22905. // Amazon : https://www.amazon.com/
  22906. // Submitted by AWS Security <psl-maintainers@amazon.com>
  22907. // Subsections of Amazon/subsidiaries will appear until "concludes" tag
  22908. // Amazon CloudFront
  22909. // Submitted by Donavan Miller <donavanm@amazon.com>
  22910. // Reference: 54144616-fd49-4435-8535-19c6a601bdb3
  22911. cloudfront.net
  22912. // Amazon EC2
  22913. // Submitted by Luke Wells <psl-maintainers@amazon.com>
  22914. // Reference: 4c38fa71-58ac-4768-99e5-689c1767e537
  22915. *.compute.amazonaws.com
  22916. *.compute-1.amazonaws.com
  22917. *.compute.amazonaws.com.cn
  22918. us-east-1.amazonaws.com
  22919. // Amazon S3
  22920. // Submitted by Luke Wells <psl-maintainers@amazon.com>
  22921. // Reference: d068bd97-f0a9-4838-a6d8-954b622ef4ae
  22922. s3.cn-north-1.amazonaws.com.cn
  22923. s3.dualstack.ap-northeast-1.amazonaws.com
  22924. s3.dualstack.ap-northeast-2.amazonaws.com
  22925. s3.ap-northeast-2.amazonaws.com
  22926. s3-website.ap-northeast-2.amazonaws.com
  22927. s3.dualstack.ap-south-1.amazonaws.com
  22928. s3.ap-south-1.amazonaws.com
  22929. s3-website.ap-south-1.amazonaws.com
  22930. s3.dualstack.ap-southeast-1.amazonaws.com
  22931. s3.dualstack.ap-southeast-2.amazonaws.com
  22932. s3.dualstack.ca-central-1.amazonaws.com
  22933. s3.ca-central-1.amazonaws.com
  22934. s3-website.ca-central-1.amazonaws.com
  22935. s3.dualstack.eu-central-1.amazonaws.com
  22936. s3.eu-central-1.amazonaws.com
  22937. s3-website.eu-central-1.amazonaws.com
  22938. s3.dualstack.eu-west-1.amazonaws.com
  22939. s3.dualstack.eu-west-2.amazonaws.com
  22940. s3.eu-west-2.amazonaws.com
  22941. s3-website.eu-west-2.amazonaws.com
  22942. s3.dualstack.eu-west-3.amazonaws.com
  22943. s3.eu-west-3.amazonaws.com
  22944. s3-website.eu-west-3.amazonaws.com
  22945. s3.amazonaws.com
  22946. s3-ap-northeast-1.amazonaws.com
  22947. s3-ap-northeast-2.amazonaws.com
  22948. s3-ap-south-1.amazonaws.com
  22949. s3-ap-southeast-1.amazonaws.com
  22950. s3-ap-southeast-2.amazonaws.com
  22951. s3-ca-central-1.amazonaws.com
  22952. s3-eu-central-1.amazonaws.com
  22953. s3-eu-west-1.amazonaws.com
  22954. s3-eu-west-2.amazonaws.com
  22955. s3-eu-west-3.amazonaws.com
  22956. s3-external-1.amazonaws.com
  22957. s3-fips-us-gov-west-1.amazonaws.com
  22958. s3-sa-east-1.amazonaws.com
  22959. s3-us-east-2.amazonaws.com
  22960. s3-us-gov-west-1.amazonaws.com
  22961. s3-us-west-1.amazonaws.com
  22962. s3-us-west-2.amazonaws.com
  22963. s3-website-ap-northeast-1.amazonaws.com
  22964. s3-website-ap-southeast-1.amazonaws.com
  22965. s3-website-ap-southeast-2.amazonaws.com
  22966. s3-website-eu-west-1.amazonaws.com
  22967. s3-website-sa-east-1.amazonaws.com
  22968. s3-website-us-east-1.amazonaws.com
  22969. s3-website-us-west-1.amazonaws.com
  22970. s3-website-us-west-2.amazonaws.com
  22971. s3.dualstack.sa-east-1.amazonaws.com
  22972. s3.dualstack.us-east-1.amazonaws.com
  22973. s3.dualstack.us-east-2.amazonaws.com
  22974. s3.us-east-2.amazonaws.com
  22975. s3-website.us-east-2.amazonaws.com
  22976. // Analytics on AWS
  22977. // Submitted by AWS Security <psl-maintainers@amazon.com>
  22978. // Reference: c02c3a80-f8a0-4fd2-b719-48ea8b7c28de
  22979. analytics-gateway.ap-northeast-1.amazonaws.com
  22980. analytics-gateway.eu-west-1.amazonaws.com
  22981. analytics-gateway.us-east-1.amazonaws.com
  22982. analytics-gateway.us-east-2.amazonaws.com
  22983. analytics-gateway.us-west-2.amazonaws.com
  22984. // AWS Cloud9
  22985. // Submitted by: AWS Security <psl-maintainers@amazon.com>
  22986. // Reference: 05c44955-977c-4b57-938a-f2af92733f9f
  22987. webview-assets.aws-cloud9.af-south-1.amazonaws.com
  22988. vfs.cloud9.af-south-1.amazonaws.com
  22989. webview-assets.cloud9.af-south-1.amazonaws.com
  22990. webview-assets.aws-cloud9.ap-east-1.amazonaws.com
  22991. vfs.cloud9.ap-east-1.amazonaws.com
  22992. webview-assets.cloud9.ap-east-1.amazonaws.com
  22993. webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com
  22994. vfs.cloud9.ap-northeast-1.amazonaws.com
  22995. webview-assets.cloud9.ap-northeast-1.amazonaws.com
  22996. webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com
  22997. vfs.cloud9.ap-northeast-2.amazonaws.com
  22998. webview-assets.cloud9.ap-northeast-2.amazonaws.com
  22999. webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com
  23000. vfs.cloud9.ap-northeast-3.amazonaws.com
  23001. webview-assets.cloud9.ap-northeast-3.amazonaws.com
  23002. webview-assets.aws-cloud9.ap-south-1.amazonaws.com
  23003. vfs.cloud9.ap-south-1.amazonaws.com
  23004. webview-assets.cloud9.ap-south-1.amazonaws.com
  23005. webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com
  23006. vfs.cloud9.ap-southeast-1.amazonaws.com
  23007. webview-assets.cloud9.ap-southeast-1.amazonaws.com
  23008. webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com
  23009. vfs.cloud9.ap-southeast-2.amazonaws.com
  23010. webview-assets.cloud9.ap-southeast-2.amazonaws.com
  23011. webview-assets.aws-cloud9.ca-central-1.amazonaws.com
  23012. vfs.cloud9.ca-central-1.amazonaws.com
  23013. webview-assets.cloud9.ca-central-1.amazonaws.com
  23014. webview-assets.aws-cloud9.eu-central-1.amazonaws.com
  23015. vfs.cloud9.eu-central-1.amazonaws.com
  23016. webview-assets.cloud9.eu-central-1.amazonaws.com
  23017. webview-assets.aws-cloud9.eu-north-1.amazonaws.com
  23018. vfs.cloud9.eu-north-1.amazonaws.com
  23019. webview-assets.cloud9.eu-north-1.amazonaws.com
  23020. webview-assets.aws-cloud9.eu-south-1.amazonaws.com
  23021. vfs.cloud9.eu-south-1.amazonaws.com
  23022. webview-assets.cloud9.eu-south-1.amazonaws.com
  23023. webview-assets.aws-cloud9.eu-west-1.amazonaws.com
  23024. vfs.cloud9.eu-west-1.amazonaws.com
  23025. webview-assets.cloud9.eu-west-1.amazonaws.com
  23026. webview-assets.aws-cloud9.eu-west-2.amazonaws.com
  23027. vfs.cloud9.eu-west-2.amazonaws.com
  23028. webview-assets.cloud9.eu-west-2.amazonaws.com
  23029. webview-assets.aws-cloud9.eu-west-3.amazonaws.com
  23030. vfs.cloud9.eu-west-3.amazonaws.com
  23031. webview-assets.cloud9.eu-west-3.amazonaws.com
  23032. webview-assets.aws-cloud9.me-south-1.amazonaws.com
  23033. vfs.cloud9.me-south-1.amazonaws.com
  23034. webview-assets.cloud9.me-south-1.amazonaws.com
  23035. webview-assets.aws-cloud9.sa-east-1.amazonaws.com
  23036. vfs.cloud9.sa-east-1.amazonaws.com
  23037. webview-assets.cloud9.sa-east-1.amazonaws.com
  23038. webview-assets.aws-cloud9.us-east-1.amazonaws.com
  23039. vfs.cloud9.us-east-1.amazonaws.com
  23040. webview-assets.cloud9.us-east-1.amazonaws.com
  23041. webview-assets.aws-cloud9.us-east-2.amazonaws.com
  23042. vfs.cloud9.us-east-2.amazonaws.com
  23043. webview-assets.cloud9.us-east-2.amazonaws.com
  23044. webview-assets.aws-cloud9.us-west-1.amazonaws.com
  23045. vfs.cloud9.us-west-1.amazonaws.com
  23046. webview-assets.cloud9.us-west-1.amazonaws.com
  23047. webview-assets.aws-cloud9.us-west-2.amazonaws.com
  23048. vfs.cloud9.us-west-2.amazonaws.com
  23049. webview-assets.cloud9.us-west-2.amazonaws.com
  23050. // AWS Elastic Beanstalk
  23051. // Submitted by Luke Wells <psl-maintainers@amazon.com>
  23052. // Reference: aa202394-43a0-4857-b245-8db04549137e
  23053. cn-north-1.eb.amazonaws.com.cn
  23054. cn-northwest-1.eb.amazonaws.com.cn
  23055. elasticbeanstalk.com
  23056. ap-northeast-1.elasticbeanstalk.com
  23057. ap-northeast-2.elasticbeanstalk.com
  23058. ap-northeast-3.elasticbeanstalk.com
  23059. ap-south-1.elasticbeanstalk.com
  23060. ap-southeast-1.elasticbeanstalk.com
  23061. ap-southeast-2.elasticbeanstalk.com
  23062. ca-central-1.elasticbeanstalk.com
  23063. eu-central-1.elasticbeanstalk.com
  23064. eu-west-1.elasticbeanstalk.com
  23065. eu-west-2.elasticbeanstalk.com
  23066. eu-west-3.elasticbeanstalk.com
  23067. sa-east-1.elasticbeanstalk.com
  23068. us-east-1.elasticbeanstalk.com
  23069. us-east-2.elasticbeanstalk.com
  23070. us-gov-west-1.elasticbeanstalk.com
  23071. us-west-1.elasticbeanstalk.com
  23072. us-west-2.elasticbeanstalk.com
  23073. // (AWS) Elastic Load Balancing
  23074. // Submitted by Luke Wells <psl-maintainers@amazon.com>
  23075. // Reference: 12a3d528-1bac-4433-a359-a395867ffed2
  23076. *.elb.amazonaws.com.cn
  23077. *.elb.amazonaws.com
  23078. // AWS Global Accelerator
  23079. // Submitted by Daniel Massaguer <psl-maintainers@amazon.com>
  23080. // Reference: d916759d-a08b-4241-b536-4db887383a6a
  23081. awsglobalaccelerator.com
  23082. // eero
  23083. // Submitted by Yue Kang <eero-dynamic-dns@amazon.com>
  23084. // Reference: 264afe70-f62c-4c02-8ab9-b5281ed24461
  23085. eero.online
  23086. eero-stage.online
  23087. // concludes Amazon
  23088. // Amune : https://amune.org/
  23089. // Submitted by Team Amune <cert@amune.org>
  23090. t3l3p0rt.net
  23091. tele.amune.org
  23092. // Apigee : https://apigee.com/
  23093. // Submitted by Apigee Security Team <security@apigee.com>
  23094. apigee.io
  23095. // Apphud : https://apphud.com
  23096. // Submitted by Alexander Selivanov <alex@apphud.com>
  23097. siiites.com
  23098. // Appspace : https://www.appspace.com
  23099. // Submitted by Appspace Security Team <security@appspace.com>
  23100. appspacehosted.com
  23101. appspaceusercontent.com
  23102. // Appudo UG (haftungsbeschränkt) : https://www.appudo.com
  23103. // Submitted by Alexander Hochbaum <admin@appudo.com>
  23104. appudo.net
  23105. // Aptible : https://www.aptible.com/
  23106. // Submitted by Thomas Orozco <thomas@aptible.com>
  23107. on-aptible.com
  23108. // ASEINet : https://www.aseinet.com/
  23109. // Submitted by Asei SEKIGUCHI <mail@aseinet.com>
  23110. user.aseinet.ne.jp
  23111. gv.vc
  23112. d.gv.vc
  23113. // Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/
  23114. // Submitted by Hector Martin <marcan@euskalencounter.org>
  23115. user.party.eus
  23116. // Association potager.org : https://potager.org/
  23117. // Submitted by Lunar <jardiniers@potager.org>
  23118. pimienta.org
  23119. poivron.org
  23120. potager.org
  23121. sweetpepper.org
  23122. // ASUSTOR Inc. : http://www.asustor.com
  23123. // Submitted by Vincent Tseng <vincenttseng@asustor.com>
  23124. myasustor.com
  23125. // Atlassian : https://atlassian.com
  23126. // Submitted by Sam Smyth <devloop@atlassian.com>
  23127. cdn.prod.atlassian-dev.net
  23128. // Authentick UG (haftungsbeschränkt) : https://authentick.net
  23129. // Submitted by Lukas Reschke <lukas@authentick.net>
  23130. translated.page
  23131. // Autocode : https://autocode.com
  23132. // Submitted by Jacob Lee <jacob@autocode.com>
  23133. autocode.dev
  23134. // AVM : https://avm.de
  23135. // Submitted by Andreas Weise <a.weise@avm.de>
  23136. myfritz.net
  23137. // AVStack Pte. Ltd. : https://avstack.io
  23138. // Submitted by Jasper Hugo <jasper@avstack.io>
  23139. onavstack.net
  23140. // AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com
  23141. // Submitted by James Kennedy <domains@advisorwebsites.com>
  23142. *.awdev.ca
  23143. *.advisor.ws
  23144. // AZ.pl sp. z.o.o: https://az.pl
  23145. // Submitted by Krzysztof Wolski <krzysztof.wolski@home.eu>
  23146. ecommerce-shop.pl
  23147. // b-data GmbH : https://www.b-data.io
  23148. // Submitted by Olivier Benz <olivier.benz@b-data.ch>
  23149. b-data.io
  23150. // backplane : https://www.backplane.io
  23151. // Submitted by Anthony Voutas <anthony@backplane.io>
  23152. backplaneapp.io
  23153. // Balena : https://www.balena.io
  23154. // Submitted by Petros Angelatos <petrosagg@balena.io>
  23155. balena-devices.com
  23156. // University of Banja Luka : https://unibl.org
  23157. // Domains for Republic of Srpska administrative entity.
  23158. // Submitted by Marko Ivanovic <kormang@hotmail.rs>
  23159. rs.ba
  23160. // Banzai Cloud
  23161. // Submitted by Janos Matyas <info@banzaicloud.com>
  23162. *.banzai.cloud
  23163. app.banzaicloud.io
  23164. *.backyards.banzaicloud.io
  23165. // BASE, Inc. : https://binc.jp
  23166. // Submitted by Yuya NAGASAWA <public-suffix-list@binc.jp>
  23167. base.ec
  23168. official.ec
  23169. buyshop.jp
  23170. fashionstore.jp
  23171. handcrafted.jp
  23172. kawaiishop.jp
  23173. supersale.jp
  23174. theshop.jp
  23175. shopselect.net
  23176. base.shop
  23177. // BeagleBoard.org Foundation : https://beagleboard.org
  23178. // Submitted by Jason Kridner <jkridner@beagleboard.org>
  23179. beagleboard.io
  23180. // Beget Ltd
  23181. // Submitted by Lev Nekrasov <lnekrasov@beget.com>
  23182. *.beget.app
  23183. // BetaInABox
  23184. // Submitted by Adrian <adrian@betainabox.com>
  23185. betainabox.com
  23186. // BinaryLane : http://www.binarylane.com
  23187. // Submitted by Nathan O'Sullivan <nathan@mammoth.com.au>
  23188. bnr.la
  23189. // Bitbucket : http://bitbucket.org
  23190. // Submitted by Andy Ortlieb <aortlieb@atlassian.com>
  23191. bitbucket.io
  23192. // Blackbaud, Inc. : https://www.blackbaud.com
  23193. // Submitted by Paul Crowder <paul.crowder@blackbaud.com>
  23194. blackbaudcdn.net
  23195. // Blatech : http://www.blatech.net
  23196. // Submitted by Luke Bratch <luke@bratch.co.uk>
  23197. of.je
  23198. // Blue Bite, LLC : https://bluebite.com
  23199. // Submitted by Joshua Weiss <admin.engineering@bluebite.com>
  23200. bluebite.io
  23201. // Boomla : https://boomla.com
  23202. // Submitted by Tibor Halter <thalter@boomla.com>
  23203. boomla.net
  23204. // Boutir : https://www.boutir.com
  23205. // Submitted by Eric Ng Ka Ka <ngkaka@boutir.com>
  23206. boutir.com
  23207. // Boxfuse : https://boxfuse.com
  23208. // Submitted by Axel Fontaine <axel@boxfuse.com>
  23209. boxfuse.io
  23210. // bplaced : https://www.bplaced.net/
  23211. // Submitted by Miroslav Bozic <security@bplaced.net>
  23212. square7.ch
  23213. bplaced.com
  23214. bplaced.de
  23215. square7.de
  23216. bplaced.net
  23217. square7.net
  23218. // Brendly : https://brendly.rs
  23219. // Submitted by Dusan Radovanovic <dusan.radovanovic@brendly.rs>
  23220. shop.brendly.rs
  23221. // BrowserSafetyMark
  23222. // Submitted by Dave Tharp <browsersafetymark.io@quicinc.com>
  23223. browsersafetymark.io
  23224. // Bytemark Hosting : https://www.bytemark.co.uk
  23225. // Submitted by Paul Cammish <paul.cammish@bytemark.co.uk>
  23226. uk0.bigv.io
  23227. dh.bytemark.co.uk
  23228. vm.bytemark.co.uk
  23229. // Caf.js Labs LLC : https://www.cafjs.com
  23230. // Submitted by Antonio Lain <antlai@cafjs.com>
  23231. cafjs.com
  23232. // callidomus : https://www.callidomus.com/
  23233. // Submitted by Marcus Popp <admin@callidomus.com>
  23234. mycd.eu
  23235. // Canva Pty Ltd : https://canva.com/
  23236. // Submitted by Joel Aquilina <publicsuffixlist@canva.com>
  23237. canva-apps.cn
  23238. canva-apps.com
  23239. // Carrd : https://carrd.co
  23240. // Submitted by AJ <aj@carrd.co>
  23241. drr.ac
  23242. uwu.ai
  23243. carrd.co
  23244. crd.co
  23245. ju.mp
  23246. // CentralNic : http://www.centralnic.com/names/domains
  23247. // Submitted by registry <gavin.brown@centralnic.com>
  23248. ae.org
  23249. br.com
  23250. cn.com
  23251. com.de
  23252. com.se
  23253. de.com
  23254. eu.com
  23255. gb.net
  23256. hu.net
  23257. jp.net
  23258. jpn.com
  23259. mex.com
  23260. ru.com
  23261. sa.com
  23262. se.net
  23263. uk.com
  23264. uk.net
  23265. us.com
  23266. za.bz
  23267. za.com
  23268. // No longer operated by CentralNic, these entries should be adopted and/or removed by current operators
  23269. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23270. ar.com
  23271. hu.com
  23272. kr.com
  23273. no.com
  23274. qc.com
  23275. uy.com
  23276. // Africa.com Web Solutions Ltd : https://registry.africa.com
  23277. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23278. africa.com
  23279. // iDOT Services Limited : http://www.domain.gr.com
  23280. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23281. gr.com
  23282. // Radix FZC : http://domains.in.net
  23283. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23284. in.net
  23285. web.in
  23286. // US REGISTRY LLC : http://us.org
  23287. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23288. us.org
  23289. // co.com Registry, LLC : https://registry.co.com
  23290. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23291. co.com
  23292. // Roar Domains LLC : https://roar.basketball/
  23293. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23294. aus.basketball
  23295. nz.basketball
  23296. // BRS Media : https://brsmedia.com/
  23297. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  23298. radio.am
  23299. radio.fm
  23300. // c.la : http://www.c.la/
  23301. c.la
  23302. // certmgr.org : https://certmgr.org
  23303. // Submitted by B. Blechschmidt <hostmaster@certmgr.org>
  23304. certmgr.org
  23305. // Cityhost LLC : https://cityhost.ua
  23306. // Submitted by Maksym Rivtin <support@cityhost.net.ua>
  23307. cx.ua
  23308. // Civilized Discourse Construction Kit, Inc. : https://www.discourse.org/
  23309. // Submitted by Rishabh Nambiar & Michael Brown <team@discourse.org>
  23310. discourse.group
  23311. discourse.team
  23312. // Clever Cloud : https://www.clever-cloud.com/
  23313. // Submitted by Quentin Adam <noc@clever-cloud.com>
  23314. cleverapps.io
  23315. // Clerk : https://www.clerk.dev
  23316. // Submitted by Colin Sidoti <systems@clerk.dev>
  23317. clerk.app
  23318. clerkstage.app
  23319. *.lcl.dev
  23320. *.lclstage.dev
  23321. *.stg.dev
  23322. *.stgstage.dev
  23323. // ClickRising : https://clickrising.com/
  23324. // Submitted by Umut Gumeli <infrastructure-publicsuffixlist@clickrising.com>
  23325. clickrising.net
  23326. // Cloud66 : https://www.cloud66.com/
  23327. // Submitted by Khash Sajadi <khash@cloud66.com>
  23328. c66.me
  23329. cloud66.ws
  23330. cloud66.zone
  23331. // CloudAccess.net : https://www.cloudaccess.net/
  23332. // Submitted by Pawel Panek <noc@cloudaccess.net>
  23333. jdevcloud.com
  23334. wpdevcloud.com
  23335. cloudaccess.host
  23336. freesite.host
  23337. cloudaccess.net
  23338. // cloudControl : https://www.cloudcontrol.com/
  23339. // Submitted by Tobias Wilken <tw@cloudcontrol.com>
  23340. cloudcontrolled.com
  23341. cloudcontrolapp.com
  23342. // Cloudera, Inc. : https://www.cloudera.com/
  23343. // Submitted by Kedarnath Waikar <security@cloudera.com>
  23344. *.cloudera.site
  23345. // Cloudflare, Inc. : https://www.cloudflare.com/
  23346. // Submitted by Cloudflare Team <publicsuffixlist@cloudflare.com>
  23347. cf-ipfs.com
  23348. cloudflare-ipfs.com
  23349. trycloudflare.com
  23350. pages.dev
  23351. r2.dev
  23352. workers.dev
  23353. // Clovyr : https://clovyr.io
  23354. // Submitted by Patrick Nielsen <patrick@clovyr.io>
  23355. wnext.app
  23356. // co.ca : http://registry.co.ca/
  23357. co.ca
  23358. // Co & Co : https://co-co.nl/
  23359. // Submitted by Govert Versluis <govert@co-co.nl>
  23360. *.otap.co
  23361. // i-registry s.r.o. : http://www.i-registry.cz/
  23362. // Submitted by Martin Semrad <semrad@i-registry.cz>
  23363. co.cz
  23364. // CDN77.com : http://www.cdn77.com
  23365. // Submitted by Jan Krpes <jan.krpes@cdn77.com>
  23366. c.cdn77.org
  23367. cdn77-ssl.net
  23368. r.cdn77.net
  23369. rsc.cdn77.org
  23370. ssl.origin.cdn77-secure.org
  23371. // Cloud DNS Ltd : http://www.cloudns.net
  23372. // Submitted by Aleksander Hristov <noc@cloudns.net>
  23373. cloudns.asia
  23374. cloudns.biz
  23375. cloudns.club
  23376. cloudns.cc
  23377. cloudns.eu
  23378. cloudns.in
  23379. cloudns.info
  23380. cloudns.org
  23381. cloudns.pro
  23382. cloudns.pw
  23383. cloudns.us
  23384. // CNPY : https://cnpy.gdn
  23385. // Submitted by Angelo Gladding <angelo@lahacker.net>
  23386. cnpy.gdn
  23387. // Codeberg e. V. : https://codeberg.org
  23388. // Submitted by Moritz Marquardt <git@momar.de>
  23389. codeberg.page
  23390. // CoDNS B.V.
  23391. co.nl
  23392. co.no
  23393. // Combell.com : https://www.combell.com
  23394. // Submitted by Thomas Wouters <thomas.wouters@combellgroup.com>
  23395. webhosting.be
  23396. hosting-cluster.nl
  23397. // Coordination Center for TLD RU and XN--P1AI : https://cctld.ru/en/domains/domens_ru/reserved/
  23398. // Submitted by George Georgievsky <gug@cctld.ru>
  23399. ac.ru
  23400. edu.ru
  23401. gov.ru
  23402. int.ru
  23403. mil.ru
  23404. test.ru
  23405. // COSIMO GmbH : http://www.cosimo.de
  23406. // Submitted by Rene Marticke <rmarticke@cosimo.de>
  23407. dyn.cosidns.de
  23408. dynamisches-dns.de
  23409. dnsupdater.de
  23410. internet-dns.de
  23411. l-o-g-i-n.de
  23412. dynamic-dns.info
  23413. feste-ip.net
  23414. knx-server.net
  23415. static-access.net
  23416. // Craynic, s.r.o. : http://www.craynic.com/
  23417. // Submitted by Ales Krajnik <ales.krajnik@craynic.com>
  23418. realm.cz
  23419. // Cryptonomic : https://cryptonomic.net/
  23420. // Submitted by Andrew Cady <public-suffix-list@cryptonomic.net>
  23421. *.cryptonomic.net
  23422. // Cupcake : https://cupcake.io/
  23423. // Submitted by Jonathan Rudenberg <jonathan@cupcake.io>
  23424. cupcake.is
  23425. // Curv UG : https://curv-labs.de/
  23426. // Submitted by Marvin Wiesner <Marvin@curv-labs.de>
  23427. curv.dev
  23428. // Customer OCI - Oracle Dyn https://cloud.oracle.com/home https://dyn.com/dns/
  23429. // Submitted by Gregory Drake <support@dyn.com>
  23430. // Note: This is intended to also include customer-oci.com due to wildcards implicitly including the current label
  23431. *.customer-oci.com
  23432. *.oci.customer-oci.com
  23433. *.ocp.customer-oci.com
  23434. *.ocs.customer-oci.com
  23435. // cyon GmbH : https://www.cyon.ch/
  23436. // Submitted by Dominic Luechinger <dol@cyon.ch>
  23437. cyon.link
  23438. cyon.site
  23439. // Danger Science Group: https://dangerscience.com/
  23440. // Submitted by Skylar MacDonald <skylar@dangerscience.com>
  23441. fnwk.site
  23442. folionetwork.site
  23443. platform0.app
  23444. // Daplie, Inc : https://daplie.com
  23445. // Submitted by AJ ONeal <aj@daplie.com>
  23446. daplie.me
  23447. localhost.daplie.me
  23448. // Datto, Inc. : https://www.datto.com/
  23449. // Submitted by Philipp Heckel <ph@datto.com>
  23450. dattolocal.com
  23451. dattorelay.com
  23452. dattoweb.com
  23453. mydatto.com
  23454. dattolocal.net
  23455. mydatto.net
  23456. // Dansk.net : http://www.dansk.net/
  23457. // Submitted by Anani Voule <digital@digital.co.dk>
  23458. biz.dk
  23459. co.dk
  23460. firm.dk
  23461. reg.dk
  23462. store.dk
  23463. // dappnode.io : https://dappnode.io/
  23464. // Submitted by Abel Boldu / DAppNode Team <community@dappnode.io>
  23465. dyndns.dappnode.io
  23466. // dapps.earth : https://dapps.earth/
  23467. // Submitted by Daniil Burdakov <icqkill@gmail.com>
  23468. *.dapps.earth
  23469. *.bzz.dapps.earth
  23470. // Dark, Inc. : https://darklang.com
  23471. // Submitted by Paul Biggar <ops@darklang.com>
  23472. builtwithdark.com
  23473. // DataDetect, LLC. : https://datadetect.com
  23474. // Submitted by Andrew Banchich <abanchich@sceven.com>
  23475. demo.datadetect.com
  23476. instance.datadetect.com
  23477. // Datawire, Inc : https://www.datawire.io
  23478. // Submitted by Richard Li <secalert@datawire.io>
  23479. edgestack.me
  23480. // DDNS5 : https://ddns5.com
  23481. // Submitted by Cameron Elliott <cameron@cameronelliott.com>
  23482. ddns5.com
  23483. // Debian : https://www.debian.org/
  23484. // Submitted by Peter Palfrader / Debian Sysadmin Team <dsa-publicsuffixlist@debian.org>
  23485. debian.net
  23486. // Deno Land Inc : https://deno.com/
  23487. // Submitted by Luca Casonato <hostmaster@deno.com>
  23488. deno.dev
  23489. deno-staging.dev
  23490. // deSEC : https://desec.io/
  23491. // Submitted by Peter Thomassen <peter@desec.io>
  23492. dedyn.io
  23493. // Deta: https://www.deta.sh/
  23494. // Submitted by Aavash Shrestha <aavash@deta.sh>
  23495. deta.app
  23496. deta.dev
  23497. // Diher Solutions : https://diher.solutions
  23498. // Submitted by Didi Hermawan <mail@diher.solutions>
  23499. *.rss.my.id
  23500. *.diher.solutions
  23501. // Discord Inc : https://discord.com
  23502. // Submitted by Sahn Lam <slam@discordapp.com>
  23503. discordsays.com
  23504. discordsez.com
  23505. // DNS Africa Ltd https://dns.business
  23506. // Submitted by Calvin Browne <calvin@dns.business>
  23507. jozi.biz
  23508. // DNShome : https://www.dnshome.de/
  23509. // Submitted by Norbert Auler <mail@dnshome.de>
  23510. dnshome.de
  23511. // DotArai : https://www.dotarai.com/
  23512. // Submitted by Atsadawat Netcharadsang <atsadawat@dotarai.co.th>
  23513. online.th
  23514. shop.th
  23515. // DrayTek Corp. : https://www.draytek.com/
  23516. // Submitted by Paul Fang <mis@draytek.com>
  23517. drayddns.com
  23518. // DreamCommerce : https://shoper.pl/
  23519. // Submitted by Konrad Kotarba <konrad.kotarba@dreamcommerce.com>
  23520. shoparena.pl
  23521. // DreamHost : http://www.dreamhost.com/
  23522. // Submitted by Andrew Farmer <andrew.farmer@dreamhost.com>
  23523. dreamhosters.com
  23524. // Drobo : http://www.drobo.com/
  23525. // Submitted by Ricardo Padilha <rpadilha@drobo.com>
  23526. mydrobo.com
  23527. // Drud Holdings, LLC. : https://www.drud.com/
  23528. // Submitted by Kevin Bridges <kevin@drud.com>
  23529. drud.io
  23530. drud.us
  23531. // DuckDNS : http://www.duckdns.org/
  23532. // Submitted by Richard Harper <richard@duckdns.org>
  23533. duckdns.org
  23534. // Bip : https://bip.sh
  23535. // Submitted by Joel Kennedy <joel@bip.sh>
  23536. bip.sh
  23537. // bitbridge.net : Submitted by Craig Welch, abeliidev@gmail.com
  23538. bitbridge.net
  23539. // dy.fi : http://dy.fi/
  23540. // Submitted by Heikki Hannikainen <hessu@hes.iki.fi>
  23541. dy.fi
  23542. tunk.org
  23543. // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/
  23544. dyndns-at-home.com
  23545. dyndns-at-work.com
  23546. dyndns-blog.com
  23547. dyndns-free.com
  23548. dyndns-home.com
  23549. dyndns-ip.com
  23550. dyndns-mail.com
  23551. dyndns-office.com
  23552. dyndns-pics.com
  23553. dyndns-remote.com
  23554. dyndns-server.com
  23555. dyndns-web.com
  23556. dyndns-wiki.com
  23557. dyndns-work.com
  23558. dyndns.biz
  23559. dyndns.info
  23560. dyndns.org
  23561. dyndns.tv
  23562. at-band-camp.net
  23563. ath.cx
  23564. barrel-of-knowledge.info
  23565. barrell-of-knowledge.info
  23566. better-than.tv
  23567. blogdns.com
  23568. blogdns.net
  23569. blogdns.org
  23570. blogsite.org
  23571. boldlygoingnowhere.org
  23572. broke-it.net
  23573. buyshouses.net
  23574. cechire.com
  23575. dnsalias.com
  23576. dnsalias.net
  23577. dnsalias.org
  23578. dnsdojo.com
  23579. dnsdojo.net
  23580. dnsdojo.org
  23581. does-it.net
  23582. doesntexist.com
  23583. doesntexist.org
  23584. dontexist.com
  23585. dontexist.net
  23586. dontexist.org
  23587. doomdns.com
  23588. doomdns.org
  23589. dvrdns.org
  23590. dyn-o-saur.com
  23591. dynalias.com
  23592. dynalias.net
  23593. dynalias.org
  23594. dynathome.net
  23595. dyndns.ws
  23596. endofinternet.net
  23597. endofinternet.org
  23598. endoftheinternet.org
  23599. est-a-la-maison.com
  23600. est-a-la-masion.com
  23601. est-le-patron.com
  23602. est-mon-blogueur.com
  23603. for-better.biz
  23604. for-more.biz
  23605. for-our.info
  23606. for-some.biz
  23607. for-the.biz
  23608. forgot.her.name
  23609. forgot.his.name
  23610. from-ak.com
  23611. from-al.com
  23612. from-ar.com
  23613. from-az.net
  23614. from-ca.com
  23615. from-co.net
  23616. from-ct.com
  23617. from-dc.com
  23618. from-de.com
  23619. from-fl.com
  23620. from-ga.com
  23621. from-hi.com
  23622. from-ia.com
  23623. from-id.com
  23624. from-il.com
  23625. from-in.com
  23626. from-ks.com
  23627. from-ky.com
  23628. from-la.net
  23629. from-ma.com
  23630. from-md.com
  23631. from-me.org
  23632. from-mi.com
  23633. from-mn.com
  23634. from-mo.com
  23635. from-ms.com
  23636. from-mt.com
  23637. from-nc.com
  23638. from-nd.com
  23639. from-ne.com
  23640. from-nh.com
  23641. from-nj.com
  23642. from-nm.com
  23643. from-nv.com
  23644. from-ny.net
  23645. from-oh.com
  23646. from-ok.com
  23647. from-or.com
  23648. from-pa.com
  23649. from-pr.com
  23650. from-ri.com
  23651. from-sc.com
  23652. from-sd.com
  23653. from-tn.com
  23654. from-tx.com
  23655. from-ut.com
  23656. from-va.com
  23657. from-vt.com
  23658. from-wa.com
  23659. from-wi.com
  23660. from-wv.com
  23661. from-wy.com
  23662. ftpaccess.cc
  23663. fuettertdasnetz.de
  23664. game-host.org
  23665. game-server.cc
  23666. getmyip.com
  23667. gets-it.net
  23668. go.dyndns.org
  23669. gotdns.com
  23670. gotdns.org
  23671. groks-the.info
  23672. groks-this.info
  23673. ham-radio-op.net
  23674. here-for-more.info
  23675. hobby-site.com
  23676. hobby-site.org
  23677. home.dyndns.org
  23678. homedns.org
  23679. homeftp.net
  23680. homeftp.org
  23681. homeip.net
  23682. homelinux.com
  23683. homelinux.net
  23684. homelinux.org
  23685. homeunix.com
  23686. homeunix.net
  23687. homeunix.org
  23688. iamallama.com
  23689. in-the-band.net
  23690. is-a-anarchist.com
  23691. is-a-blogger.com
  23692. is-a-bookkeeper.com
  23693. is-a-bruinsfan.org
  23694. is-a-bulls-fan.com
  23695. is-a-candidate.org
  23696. is-a-caterer.com
  23697. is-a-celticsfan.org
  23698. is-a-chef.com
  23699. is-a-chef.net
  23700. is-a-chef.org
  23701. is-a-conservative.com
  23702. is-a-cpa.com
  23703. is-a-cubicle-slave.com
  23704. is-a-democrat.com
  23705. is-a-designer.com
  23706. is-a-doctor.com
  23707. is-a-financialadvisor.com
  23708. is-a-geek.com
  23709. is-a-geek.net
  23710. is-a-geek.org
  23711. is-a-green.com
  23712. is-a-guru.com
  23713. is-a-hard-worker.com
  23714. is-a-hunter.com
  23715. is-a-knight.org
  23716. is-a-landscaper.com
  23717. is-a-lawyer.com
  23718. is-a-liberal.com
  23719. is-a-libertarian.com
  23720. is-a-linux-user.org
  23721. is-a-llama.com
  23722. is-a-musician.com
  23723. is-a-nascarfan.com
  23724. is-a-nurse.com
  23725. is-a-painter.com
  23726. is-a-patsfan.org
  23727. is-a-personaltrainer.com
  23728. is-a-photographer.com
  23729. is-a-player.com
  23730. is-a-republican.com
  23731. is-a-rockstar.com
  23732. is-a-socialist.com
  23733. is-a-soxfan.org
  23734. is-a-student.com
  23735. is-a-teacher.com
  23736. is-a-techie.com
  23737. is-a-therapist.com
  23738. is-an-accountant.com
  23739. is-an-actor.com
  23740. is-an-actress.com
  23741. is-an-anarchist.com
  23742. is-an-artist.com
  23743. is-an-engineer.com
  23744. is-an-entertainer.com
  23745. is-by.us
  23746. is-certified.com
  23747. is-found.org
  23748. is-gone.com
  23749. is-into-anime.com
  23750. is-into-cars.com
  23751. is-into-cartoons.com
  23752. is-into-games.com
  23753. is-leet.com
  23754. is-lost.org
  23755. is-not-certified.com
  23756. is-saved.org
  23757. is-slick.com
  23758. is-uberleet.com
  23759. is-very-bad.org
  23760. is-very-evil.org
  23761. is-very-good.org
  23762. is-very-nice.org
  23763. is-very-sweet.org
  23764. is-with-theband.com
  23765. isa-geek.com
  23766. isa-geek.net
  23767. isa-geek.org
  23768. isa-hockeynut.com
  23769. issmarterthanyou.com
  23770. isteingeek.de
  23771. istmein.de
  23772. kicks-ass.net
  23773. kicks-ass.org
  23774. knowsitall.info
  23775. land-4-sale.us
  23776. lebtimnetz.de
  23777. leitungsen.de
  23778. likes-pie.com
  23779. likescandy.com
  23780. merseine.nu
  23781. mine.nu
  23782. misconfused.org
  23783. mypets.ws
  23784. myphotos.cc
  23785. neat-url.com
  23786. office-on-the.net
  23787. on-the-web.tv
  23788. podzone.net
  23789. podzone.org
  23790. readmyblog.org
  23791. saves-the-whales.com
  23792. scrapper-site.net
  23793. scrapping.cc
  23794. selfip.biz
  23795. selfip.com
  23796. selfip.info
  23797. selfip.net
  23798. selfip.org
  23799. sells-for-less.com
  23800. sells-for-u.com
  23801. sells-it.net
  23802. sellsyourhome.org
  23803. servebbs.com
  23804. servebbs.net
  23805. servebbs.org
  23806. serveftp.net
  23807. serveftp.org
  23808. servegame.org
  23809. shacknet.nu
  23810. simple-url.com
  23811. space-to-rent.com
  23812. stuff-4-sale.org
  23813. stuff-4-sale.us
  23814. teaches-yoga.com
  23815. thruhere.net
  23816. traeumtgerade.de
  23817. webhop.biz
  23818. webhop.info
  23819. webhop.net
  23820. webhop.org
  23821. worse-than.tv
  23822. writesthisblog.com
  23823. // ddnss.de : https://www.ddnss.de/
  23824. // Submitted by Robert Niedziela <webmaster@ddnss.de>
  23825. ddnss.de
  23826. dyn.ddnss.de
  23827. dyndns.ddnss.de
  23828. dyndns1.de
  23829. dyn-ip24.de
  23830. home-webserver.de
  23831. dyn.home-webserver.de
  23832. myhome-server.de
  23833. ddnss.org
  23834. // Definima : http://www.definima.com/
  23835. // Submitted by Maxence Bitterli <maxence@definima.com>
  23836. definima.net
  23837. definima.io
  23838. // DigitalOcean App Platform : https://www.digitalocean.com/products/app-platform/
  23839. // Submitted by Braxton Huggins <psl-maintainers@digitalocean.com>
  23840. ondigitalocean.app
  23841. // DigitalOcean Spaces : https://www.digitalocean.com/products/spaces/
  23842. // Submitted by Robin H. Johnson <psl-maintainers@digitalocean.com>
  23843. *.digitaloceanspaces.com
  23844. // dnstrace.pro : https://dnstrace.pro/
  23845. // Submitted by Chris Partridge <chris@partridge.tech>
  23846. bci.dnstrace.pro
  23847. // Dynu.com : https://www.dynu.com/
  23848. // Submitted by Sue Ye <sue@dynu.com>
  23849. ddnsfree.com
  23850. ddnsgeek.com
  23851. giize.com
  23852. gleeze.com
  23853. kozow.com
  23854. loseyourip.com
  23855. ooguy.com
  23856. theworkpc.com
  23857. casacam.net
  23858. dynu.net
  23859. accesscam.org
  23860. camdvr.org
  23861. freeddns.org
  23862. mywire.org
  23863. webredirect.org
  23864. myddns.rocks
  23865. blogsite.xyz
  23866. // dynv6 : https://dynv6.com
  23867. // Submitted by Dominik Menke <dom@digineo.de>
  23868. dynv6.net
  23869. // E4YOU spol. s.r.o. : https://e4you.cz/
  23870. // Submitted by Vladimir Dudr <info@e4you.cz>
  23871. e4.cz
  23872. // Easypanel : https://easypanel.io
  23873. // Submitted by Andrei Canta <andrei@easypanel.io>
  23874. easypanel.app
  23875. easypanel.host
  23876. // Elementor : Elementor Ltd.
  23877. // Submitted by Anton Barkan <antonb@elementor.com>
  23878. elementor.cloud
  23879. elementor.cool
  23880. // En root‽ : https://en-root.org
  23881. // Submitted by Emmanuel Raviart <emmanuel@raviart.com>
  23882. en-root.fr
  23883. // Enalean SAS: https://www.enalean.com
  23884. // Submitted by Thomas Cottier <thomas.cottier@enalean.com>
  23885. mytuleap.com
  23886. tuleap-partners.com
  23887. // Encoretivity AB: https://encore.dev
  23888. // Submitted by André Eriksson <andre@encore.dev>
  23889. encr.app
  23890. encoreapi.com
  23891. // ECG Robotics, Inc: https://ecgrobotics.org
  23892. // Submitted by <frc1533@ecgrobotics.org>
  23893. onred.one
  23894. staging.onred.one
  23895. // encoway GmbH : https://www.encoway.de
  23896. // Submitted by Marcel Daus <cloudops@encoway.de>
  23897. eu.encoway.cloud
  23898. // EU.org https://eu.org/
  23899. // Submitted by Pierre Beyssac <hostmaster@eu.org>
  23900. eu.org
  23901. al.eu.org
  23902. asso.eu.org
  23903. at.eu.org
  23904. au.eu.org
  23905. be.eu.org
  23906. bg.eu.org
  23907. ca.eu.org
  23908. cd.eu.org
  23909. ch.eu.org
  23910. cn.eu.org
  23911. cy.eu.org
  23912. cz.eu.org
  23913. de.eu.org
  23914. dk.eu.org
  23915. edu.eu.org
  23916. ee.eu.org
  23917. es.eu.org
  23918. fi.eu.org
  23919. fr.eu.org
  23920. gr.eu.org
  23921. hr.eu.org
  23922. hu.eu.org
  23923. ie.eu.org
  23924. il.eu.org
  23925. in.eu.org
  23926. int.eu.org
  23927. is.eu.org
  23928. it.eu.org
  23929. jp.eu.org
  23930. kr.eu.org
  23931. lt.eu.org
  23932. lu.eu.org
  23933. lv.eu.org
  23934. mc.eu.org
  23935. me.eu.org
  23936. mk.eu.org
  23937. mt.eu.org
  23938. my.eu.org
  23939. net.eu.org
  23940. ng.eu.org
  23941. nl.eu.org
  23942. no.eu.org
  23943. nz.eu.org
  23944. paris.eu.org
  23945. pl.eu.org
  23946. pt.eu.org
  23947. q-a.eu.org
  23948. ro.eu.org
  23949. ru.eu.org
  23950. se.eu.org
  23951. si.eu.org
  23952. sk.eu.org
  23953. tr.eu.org
  23954. uk.eu.org
  23955. us.eu.org
  23956. // Eurobyte : https://eurobyte.ru
  23957. // Submitted by Evgeniy Subbotin <e.subbotin@eurobyte.ru>
  23958. eurodir.ru
  23959. // Evennode : http://www.evennode.com/
  23960. // Submitted by Michal Kralik <support@evennode.com>
  23961. eu-1.evennode.com
  23962. eu-2.evennode.com
  23963. eu-3.evennode.com
  23964. eu-4.evennode.com
  23965. us-1.evennode.com
  23966. us-2.evennode.com
  23967. us-3.evennode.com
  23968. us-4.evennode.com
  23969. // eDirect Corp. : https://hosting.url.com.tw/
  23970. // Submitted by C.S. chang <cschang@corp.url.com.tw>
  23971. twmail.cc
  23972. twmail.net
  23973. twmail.org
  23974. mymailer.com.tw
  23975. url.tw
  23976. // Fabrica Technologies, Inc. : https://www.fabrica.dev/
  23977. // Submitted by Eric Jiang <eric@fabrica.dev>
  23978. onfabrica.com
  23979. // Facebook, Inc.
  23980. // Submitted by Peter Ruibal <public-suffix@fb.com>
  23981. apps.fbsbx.com
  23982. // FAITID : https://faitid.org/
  23983. // Submitted by Maxim Alzoba <tech.contact@faitid.org>
  23984. // https://www.flexireg.net/stat_info
  23985. ru.net
  23986. adygeya.ru
  23987. bashkiria.ru
  23988. bir.ru
  23989. cbg.ru
  23990. com.ru
  23991. dagestan.ru
  23992. grozny.ru
  23993. kalmykia.ru
  23994. kustanai.ru
  23995. marine.ru
  23996. mordovia.ru
  23997. msk.ru
  23998. mytis.ru
  23999. nalchik.ru
  24000. nov.ru
  24001. pyatigorsk.ru
  24002. spb.ru
  24003. vladikavkaz.ru
  24004. vladimir.ru
  24005. abkhazia.su
  24006. adygeya.su
  24007. aktyubinsk.su
  24008. arkhangelsk.su
  24009. armenia.su
  24010. ashgabad.su
  24011. azerbaijan.su
  24012. balashov.su
  24013. bashkiria.su
  24014. bryansk.su
  24015. bukhara.su
  24016. chimkent.su
  24017. dagestan.su
  24018. east-kazakhstan.su
  24019. exnet.su
  24020. georgia.su
  24021. grozny.su
  24022. ivanovo.su
  24023. jambyl.su
  24024. kalmykia.su
  24025. kaluga.su
  24026. karacol.su
  24027. karaganda.su
  24028. karelia.su
  24029. khakassia.su
  24030. krasnodar.su
  24031. kurgan.su
  24032. kustanai.su
  24033. lenug.su
  24034. mangyshlak.su
  24035. mordovia.su
  24036. msk.su
  24037. murmansk.su
  24038. nalchik.su
  24039. navoi.su
  24040. north-kazakhstan.su
  24041. nov.su
  24042. obninsk.su
  24043. penza.su
  24044. pokrovsk.su
  24045. sochi.su
  24046. spb.su
  24047. tashkent.su
  24048. termez.su
  24049. togliatti.su
  24050. troitsk.su
  24051. tselinograd.su
  24052. tula.su
  24053. tuva.su
  24054. vladikavkaz.su
  24055. vladimir.su
  24056. vologda.su
  24057. // Fancy Bits, LLC : http://getchannels.com
  24058. // Submitted by Aman Gupta <aman@getchannels.com>
  24059. channelsdvr.net
  24060. u.channelsdvr.net
  24061. // Fastly Inc. : http://www.fastly.com/
  24062. // Submitted by Fastly Security <security@fastly.com>
  24063. edgecompute.app
  24064. fastly-edge.com
  24065. fastly-terrarium.com
  24066. fastlylb.net
  24067. map.fastlylb.net
  24068. freetls.fastly.net
  24069. map.fastly.net
  24070. a.prod.fastly.net
  24071. global.prod.fastly.net
  24072. a.ssl.fastly.net
  24073. b.ssl.fastly.net
  24074. global.ssl.fastly.net
  24075. // Fastmail : https://www.fastmail.com/
  24076. // Submitted by Marc Bradshaw <marc@fastmailteam.com>
  24077. *.user.fm
  24078. // FASTVPS EESTI OU : https://fastvps.ru/
  24079. // Submitted by Likhachev Vasiliy <lihachev@fastvps.ru>
  24080. fastvps-server.com
  24081. fastvps.host
  24082. myfast.host
  24083. fastvps.site
  24084. myfast.space
  24085. // Fedora : https://fedoraproject.org/
  24086. // submitted by Patrick Uiterwijk <puiterwijk@fedoraproject.org>
  24087. fedorainfracloud.org
  24088. fedorapeople.org
  24089. cloud.fedoraproject.org
  24090. app.os.fedoraproject.org
  24091. app.os.stg.fedoraproject.org
  24092. // FearWorks Media Ltd. : https://fearworksmedia.co.uk
  24093. // submitted by Keith Fairley <domains@fearworksmedia.co.uk>
  24094. conn.uk
  24095. copro.uk
  24096. hosp.uk
  24097. // Fermax : https://fermax.com/
  24098. // submitted by Koen Van Isterdael <k.vanisterdael@fermax.be>
  24099. mydobiss.com
  24100. // FH Muenster : https://www.fh-muenster.de
  24101. // Submitted by Robin Naundorf <r.naundorf@fh-muenster.de>
  24102. fh-muenster.io
  24103. // Filegear Inc. : https://www.filegear.com
  24104. // Submitted by Jason Zhu <jason@owtware.com>
  24105. filegear.me
  24106. filegear-au.me
  24107. filegear-de.me
  24108. filegear-gb.me
  24109. filegear-ie.me
  24110. filegear-jp.me
  24111. filegear-sg.me
  24112. // Firebase, Inc.
  24113. // Submitted by Chris Raynor <chris@firebase.com>
  24114. firebaseapp.com
  24115. // Firewebkit : https://www.firewebkit.com
  24116. // Submitted by Majid Qureshi <mqureshi@amrayn.com>
  24117. fireweb.app
  24118. // FLAP : https://www.flap.cloud
  24119. // Submitted by Louis Chemineau <louis@chmn.me>
  24120. flap.id
  24121. // FlashDrive : https://flashdrive.io
  24122. // Submitted by Eric Chan <support@flashdrive.io>
  24123. onflashdrive.app
  24124. fldrv.com
  24125. // fly.io: https://fly.io
  24126. // Submitted by Kurt Mackey <kurt@fly.io>
  24127. fly.dev
  24128. edgeapp.net
  24129. shw.io
  24130. // Flynn : https://flynn.io
  24131. // Submitted by Jonathan Rudenberg <jonathan@flynn.io>
  24132. flynnhosting.net
  24133. // Forgerock : https://www.forgerock.com
  24134. // Submitted by Roderick Parr <roderick.parr@forgerock.com>
  24135. forgeblocks.com
  24136. id.forgerock.io
  24137. // Framer : https://www.framer.com
  24138. // Submitted by Koen Rouwhorst <koenrh@framer.com>
  24139. framer.app
  24140. framercanvas.com
  24141. framer.media
  24142. framer.photos
  24143. framer.website
  24144. framer.wiki
  24145. // Frusky MEDIA&PR : https://www.frusky.de
  24146. // Submitted by Victor Pupynin <hallo@frusky.de>
  24147. *.frusky.de
  24148. // RavPage : https://www.ravpage.co.il
  24149. // Submitted by Roni Horowitz <roni@responder.co.il>
  24150. ravpage.co.il
  24151. // Frederik Braun https://frederik-braun.com
  24152. // Submitted by Frederik Braun <fb@frederik-braun.com>
  24153. 0e.vc
  24154. // Freebox : http://www.freebox.fr
  24155. // Submitted by Romain Fliedel <rfliedel@freebox.fr>
  24156. freebox-os.com
  24157. freeboxos.com
  24158. fbx-os.fr
  24159. fbxos.fr
  24160. freebox-os.fr
  24161. freeboxos.fr
  24162. // freedesktop.org : https://www.freedesktop.org
  24163. // Submitted by Daniel Stone <daniel@fooishbar.org>
  24164. freedesktop.org
  24165. // freemyip.com : https://freemyip.com
  24166. // Submitted by Cadence <contact@freemyip.com>
  24167. freemyip.com
  24168. // FunkFeuer - Verein zur Förderung freier Netze : https://www.funkfeuer.at
  24169. // Submitted by Daniel A. Maierhofer <vorstand@funkfeuer.at>
  24170. wien.funkfeuer.at
  24171. // Futureweb OG : http://www.futureweb.at
  24172. // Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at>
  24173. *.futurecms.at
  24174. *.ex.futurecms.at
  24175. *.in.futurecms.at
  24176. futurehosting.at
  24177. futuremailing.at
  24178. *.ex.ortsinfo.at
  24179. *.kunden.ortsinfo.at
  24180. *.statics.cloud
  24181. // GDS : https://www.gov.uk/service-manual/technology/managing-domain-names
  24182. // Submitted by Stephen Ford <hostmaster@digital.cabinet-office.gov.uk>
  24183. independent-commission.uk
  24184. independent-inquest.uk
  24185. independent-inquiry.uk
  24186. independent-panel.uk
  24187. independent-review.uk
  24188. public-inquiry.uk
  24189. royal-commission.uk
  24190. campaign.gov.uk
  24191. service.gov.uk
  24192. // CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk
  24193. // Submitted by Jamie Tanna <jamie.tanna@digital.cabinet-office.gov.uk>
  24194. api.gov.uk
  24195. // Gehirn Inc. : https://www.gehirn.co.jp/
  24196. // Submitted by Kohei YOSHIDA <tech@gehirn.co.jp>
  24197. gehirn.ne.jp
  24198. usercontent.jp
  24199. // Gentlent, Inc. : https://www.gentlent.com
  24200. // Submitted by Tom Klein <tom@gentlent.com>
  24201. gentapps.com
  24202. gentlentapis.com
  24203. lab.ms
  24204. cdn-edges.net
  24205. // Ghost Foundation : https://ghost.org
  24206. // Submitted by Matt Hanley <security@ghost.org>
  24207. ghost.io
  24208. // GignoSystemJapan: http://gsj.bz
  24209. // Submitted by GignoSystemJapan <kakutou-ec@gsj.bz>
  24210. gsj.bz
  24211. // GitHub, Inc.
  24212. // Submitted by Patrick Toomey <security@github.com>
  24213. githubusercontent.com
  24214. githubpreview.dev
  24215. github.io
  24216. // GitLab, Inc.
  24217. // Submitted by Alex Hanselka <alex@gitlab.com>
  24218. gitlab.io
  24219. // Gitplac.si - https://gitplac.si
  24220. // Submitted by Aljaž Starc <me@aljaxus.eu>
  24221. gitapp.si
  24222. gitpage.si
  24223. // Glitch, Inc : https://glitch.com
  24224. // Submitted by Mads Hartmann <mads@glitch.com>
  24225. glitch.me
  24226. // Global NOG Alliance : https://nogalliance.org/
  24227. // Submitted by Sander Steffann <sander@nogalliance.org>
  24228. nog.community
  24229. // Globe Hosting SRL : https://www.globehosting.com/
  24230. // Submitted by Gavin Brown <gavin.brown@centralnic.com>
  24231. co.ro
  24232. shop.ro
  24233. // GMO Pepabo, Inc. : https://pepabo.com/
  24234. // Submitted by Hosting Div <admin@pepabo.com>
  24235. lolipop.io
  24236. angry.jp
  24237. babyblue.jp
  24238. babymilk.jp
  24239. backdrop.jp
  24240. bambina.jp
  24241. bitter.jp
  24242. blush.jp
  24243. boo.jp
  24244. boy.jp
  24245. boyfriend.jp
  24246. but.jp
  24247. candypop.jp
  24248. capoo.jp
  24249. catfood.jp
  24250. cheap.jp
  24251. chicappa.jp
  24252. chillout.jp
  24253. chips.jp
  24254. chowder.jp
  24255. chu.jp
  24256. ciao.jp
  24257. cocotte.jp
  24258. coolblog.jp
  24259. cranky.jp
  24260. cutegirl.jp
  24261. daa.jp
  24262. deca.jp
  24263. deci.jp
  24264. digick.jp
  24265. egoism.jp
  24266. fakefur.jp
  24267. fem.jp
  24268. flier.jp
  24269. floppy.jp
  24270. fool.jp
  24271. frenchkiss.jp
  24272. girlfriend.jp
  24273. girly.jp
  24274. gloomy.jp
  24275. gonna.jp
  24276. greater.jp
  24277. hacca.jp
  24278. heavy.jp
  24279. her.jp
  24280. hiho.jp
  24281. hippy.jp
  24282. holy.jp
  24283. hungry.jp
  24284. icurus.jp
  24285. itigo.jp
  24286. jellybean.jp
  24287. kikirara.jp
  24288. kill.jp
  24289. kilo.jp
  24290. kuron.jp
  24291. littlestar.jp
  24292. lolipopmc.jp
  24293. lolitapunk.jp
  24294. lomo.jp
  24295. lovepop.jp
  24296. lovesick.jp
  24297. main.jp
  24298. mods.jp
  24299. mond.jp
  24300. mongolian.jp
  24301. moo.jp
  24302. namaste.jp
  24303. nikita.jp
  24304. nobushi.jp
  24305. noor.jp
  24306. oops.jp
  24307. parallel.jp
  24308. parasite.jp
  24309. pecori.jp
  24310. peewee.jp
  24311. penne.jp
  24312. pepper.jp
  24313. perma.jp
  24314. pigboat.jp
  24315. pinoko.jp
  24316. punyu.jp
  24317. pupu.jp
  24318. pussycat.jp
  24319. pya.jp
  24320. raindrop.jp
  24321. readymade.jp
  24322. sadist.jp
  24323. schoolbus.jp
  24324. secret.jp
  24325. staba.jp
  24326. stripper.jp
  24327. sub.jp
  24328. sunnyday.jp
  24329. thick.jp
  24330. tonkotsu.jp
  24331. under.jp
  24332. upper.jp
  24333. velvet.jp
  24334. verse.jp
  24335. versus.jp
  24336. vivian.jp
  24337. watson.jp
  24338. weblike.jp
  24339. whitesnow.jp
  24340. zombie.jp
  24341. heteml.net
  24342. // GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/
  24343. // Submitted by Tom Whitwell <gov-uk-paas-support@digital.cabinet-office.gov.uk>
  24344. cloudapps.digital
  24345. london.cloudapps.digital
  24346. // GOV.UK Pay : https://www.payments.service.gov.uk/
  24347. // Submitted by Richard Baker <richard.baker@digital.cabinet-office.gov.uk>
  24348. pymnt.uk
  24349. // UKHomeOffice : https://www.gov.uk/government/organisations/home-office
  24350. // Submitted by Jon Shanks <jon.shanks@digital.homeoffice.gov.uk>
  24351. homeoffice.gov.uk
  24352. // GlobeHosting, Inc.
  24353. // Submitted by Zoltan Egresi <egresi@globehosting.com>
  24354. ro.im
  24355. // GoIP DNS Services : http://www.goip.de
  24356. // Submitted by Christian Poulter <milchstrasse@goip.de>
  24357. goip.de
  24358. // Google, Inc.
  24359. // Submitted by Eduardo Vela <evn@google.com>
  24360. run.app
  24361. a.run.app
  24362. web.app
  24363. *.0emm.com
  24364. appspot.com
  24365. *.r.appspot.com
  24366. codespot.com
  24367. googleapis.com
  24368. googlecode.com
  24369. pagespeedmobilizer.com
  24370. publishproxy.com
  24371. withgoogle.com
  24372. withyoutube.com
  24373. *.gateway.dev
  24374. cloud.goog
  24375. translate.goog
  24376. *.usercontent.goog
  24377. cloudfunctions.net
  24378. blogspot.ae
  24379. blogspot.al
  24380. blogspot.am
  24381. blogspot.ba
  24382. blogspot.be
  24383. blogspot.bg
  24384. blogspot.bj
  24385. blogspot.ca
  24386. blogspot.cf
  24387. blogspot.ch
  24388. blogspot.cl
  24389. blogspot.co.at
  24390. blogspot.co.id
  24391. blogspot.co.il
  24392. blogspot.co.ke
  24393. blogspot.co.nz
  24394. blogspot.co.uk
  24395. blogspot.co.za
  24396. blogspot.com
  24397. blogspot.com.ar
  24398. blogspot.com.au
  24399. blogspot.com.br
  24400. blogspot.com.by
  24401. blogspot.com.co
  24402. blogspot.com.cy
  24403. blogspot.com.ee
  24404. blogspot.com.eg
  24405. blogspot.com.es
  24406. blogspot.com.mt
  24407. blogspot.com.ng
  24408. blogspot.com.tr
  24409. blogspot.com.uy
  24410. blogspot.cv
  24411. blogspot.cz
  24412. blogspot.de
  24413. blogspot.dk
  24414. blogspot.fi
  24415. blogspot.fr
  24416. blogspot.gr
  24417. blogspot.hk
  24418. blogspot.hr
  24419. blogspot.hu
  24420. blogspot.ie
  24421. blogspot.in
  24422. blogspot.is
  24423. blogspot.it
  24424. blogspot.jp
  24425. blogspot.kr
  24426. blogspot.li
  24427. blogspot.lt
  24428. blogspot.lu
  24429. blogspot.md
  24430. blogspot.mk
  24431. blogspot.mr
  24432. blogspot.mx
  24433. blogspot.my
  24434. blogspot.nl
  24435. blogspot.no
  24436. blogspot.pe
  24437. blogspot.pt
  24438. blogspot.qa
  24439. blogspot.re
  24440. blogspot.ro
  24441. blogspot.rs
  24442. blogspot.ru
  24443. blogspot.se
  24444. blogspot.sg
  24445. blogspot.si
  24446. blogspot.sk
  24447. blogspot.sn
  24448. blogspot.td
  24449. blogspot.tw
  24450. blogspot.ug
  24451. blogspot.vn
  24452. // Goupile : https://goupile.fr
  24453. // Submitted by Niels Martignene <hello@goupile.fr>
  24454. goupile.fr
  24455. // Government of the Netherlands: https://www.government.nl
  24456. // Submitted by <domeinnaam@minaz.nl>
  24457. gov.nl
  24458. // Group 53, LLC : https://www.group53.com
  24459. // Submitted by Tyler Todd <noc@nova53.net>
  24460. awsmppl.com
  24461. // GünstigBestellen : https://günstigbestellen.de
  24462. // Submitted by Furkan Akkoc <info@hendelzon.de>
  24463. günstigbestellen.de
  24464. günstigliefern.de
  24465. // Hakaran group: http://hakaran.cz
  24466. // Submitted by Arseniy Sokolov <security@hakaran.cz>
  24467. fin.ci
  24468. free.hr
  24469. caa.li
  24470. ua.rs
  24471. conf.se
  24472. // Handshake : https://handshake.org
  24473. // Submitted by Mike Damm <md@md.vc>
  24474. hs.zone
  24475. hs.run
  24476. // Hashbang : https://hashbang.sh
  24477. hashbang.sh
  24478. // Hasura : https://hasura.io
  24479. // Submitted by Shahidh K Muhammed <shahidh@hasura.io>
  24480. hasura.app
  24481. hasura-app.io
  24482. // Heilbronn University of Applied Sciences - Faculty Informatics (GitLab Pages): https://www.hs-heilbronn.de
  24483. // Submitted by Richard Zowalla <mi-admin@hs-heilbronn.de>
  24484. pages.it.hs-heilbronn.de
  24485. // Hepforge : https://www.hepforge.org
  24486. // Submitted by David Grellscheid <admin@hepforge.org>
  24487. hepforge.org
  24488. // Heroku : https://www.heroku.com/
  24489. // Submitted by Tom Maher <tmaher@heroku.com>
  24490. herokuapp.com
  24491. herokussl.com
  24492. // Hibernating Rhinos
  24493. // Submitted by Oren Eini <oren@ravendb.net>
  24494. ravendb.cloud
  24495. ravendb.community
  24496. ravendb.me
  24497. development.run
  24498. ravendb.run
  24499. // home.pl S.A.: https://home.pl
  24500. // Submitted by Krzysztof Wolski <krzysztof.wolski@home.eu>
  24501. homesklep.pl
  24502. // Hong Kong Productivity Council: https://www.hkpc.org/
  24503. // Submitted by SECaaS Team <summchan@hkpc.org>
  24504. secaas.hk
  24505. // Hoplix : https://www.hoplix.com
  24506. // Submitted by Danilo De Franco<info@hoplix.shop>
  24507. hoplix.shop
  24508. // HOSTBIP REGISTRY : https://www.hostbip.com/
  24509. // Submitted by Atanunu Igbunuroghene <publicsuffixlist@hostbip.com>
  24510. orx.biz
  24511. biz.gl
  24512. col.ng
  24513. firm.ng
  24514. gen.ng
  24515. ltd.ng
  24516. ngo.ng
  24517. edu.scot
  24518. sch.so
  24519. // HostFly : https://www.ie.ua
  24520. // Submitted by Bohdan Dub <support@hostfly.com.ua>
  24521. ie.ua
  24522. // HostyHosting (hostyhosting.com)
  24523. hostyhosting.io
  24524. // Häkkinen.fi
  24525. // Submitted by Eero Häkkinen <Eero+psl@Häkkinen.fi>
  24526. häkkinen.fi
  24527. // Ici la Lune : http://www.icilalune.com/
  24528. // Submitted by Simon Morvan <simon@icilalune.com>
  24529. *.moonscale.io
  24530. moonscale.net
  24531. // iki.fi
  24532. // Submitted by Hannu Aronsson <haa@iki.fi>
  24533. iki.fi
  24534. // iliad italia: https://www.iliad.it
  24535. // Submitted by Marios Makassikis <mmakassikis@freebox.fr>
  24536. ibxos.it
  24537. iliadboxos.it
  24538. // Impertrix Solutions : <https://impertrixcdn.com>
  24539. // Submitted by Zhixiang Zhao <csuite@impertrix.com>
  24540. impertrixcdn.com
  24541. impertrix.com
  24542. // Incsub, LLC: https://incsub.com/
  24543. // Submitted by Aaron Edwards <sysadmins@incsub.com>
  24544. smushcdn.com
  24545. wphostedmail.com
  24546. wpmucdn.com
  24547. tempurl.host
  24548. wpmudev.host
  24549. // Individual Network Berlin e.V. : https://www.in-berlin.de/
  24550. // Submitted by Christian Seitz <chris@in-berlin.de>
  24551. dyn-berlin.de
  24552. in-berlin.de
  24553. in-brb.de
  24554. in-butter.de
  24555. in-dsl.de
  24556. in-dsl.net
  24557. in-dsl.org
  24558. in-vpn.de
  24559. in-vpn.net
  24560. in-vpn.org
  24561. // info.at : http://www.info.at/
  24562. biz.at
  24563. info.at
  24564. // info.cx : http://info.cx
  24565. // Submitted by Jacob Slater <whois@igloo.to>
  24566. info.cx
  24567. // Interlegis : http://www.interlegis.leg.br
  24568. // Submitted by Gabriel Ferreira <registrobr@interlegis.leg.br>
  24569. ac.leg.br
  24570. al.leg.br
  24571. am.leg.br
  24572. ap.leg.br
  24573. ba.leg.br
  24574. ce.leg.br
  24575. df.leg.br
  24576. es.leg.br
  24577. go.leg.br
  24578. ma.leg.br
  24579. mg.leg.br
  24580. ms.leg.br
  24581. mt.leg.br
  24582. pa.leg.br
  24583. pb.leg.br
  24584. pe.leg.br
  24585. pi.leg.br
  24586. pr.leg.br
  24587. rj.leg.br
  24588. rn.leg.br
  24589. ro.leg.br
  24590. rr.leg.br
  24591. rs.leg.br
  24592. sc.leg.br
  24593. se.leg.br
  24594. sp.leg.br
  24595. to.leg.br
  24596. // intermetrics GmbH : https://pixolino.com/
  24597. // Submitted by Wolfgang Schwarz <admin@intermetrics.de>
  24598. pixolino.com
  24599. // Internet-Pro, LLP: https://netangels.ru/
  24600. // Submitted by Vasiliy Sheredeko <piphon@gmail.com>
  24601. na4u.ru
  24602. // iopsys software solutions AB : https://iopsys.eu/
  24603. // Submitted by Roman Azarenko <roman.azarenko@iopsys.eu>
  24604. iopsys.se
  24605. // IPiFony Systems, Inc. : https://www.ipifony.com/
  24606. // Submitted by Matthew Hardeman <mhardeman@ipifony.com>
  24607. ipifony.net
  24608. // IServ GmbH : https://iserv.de
  24609. // Submitted by Mario Hoberg <info@iserv.de>
  24610. iservschule.de
  24611. mein-iserv.de
  24612. schulplattform.de
  24613. schulserver.de
  24614. test-iserv.de
  24615. iserv.dev
  24616. // I-O DATA DEVICE, INC. : http://www.iodata.com/
  24617. // Submitted by Yuji Minagawa <domains-admin@iodata.jp>
  24618. iobb.net
  24619. // Jelastic, Inc. : https://jelastic.com/
  24620. // Submitted by Ihor Kolodyuk <ik@jelastic.com>
  24621. mel.cloudlets.com.au
  24622. cloud.interhostsolutions.be
  24623. mycloud.by
  24624. alp1.ae.flow.ch
  24625. appengine.flow.ch
  24626. es-1.axarnet.cloud
  24627. diadem.cloud
  24628. vip.jelastic.cloud
  24629. jele.cloud
  24630. it1.eur.aruba.jenv-aruba.cloud
  24631. it1.jenv-aruba.cloud
  24632. keliweb.cloud
  24633. cs.keliweb.cloud
  24634. oxa.cloud
  24635. tn.oxa.cloud
  24636. uk.oxa.cloud
  24637. primetel.cloud
  24638. uk.primetel.cloud
  24639. ca.reclaim.cloud
  24640. uk.reclaim.cloud
  24641. us.reclaim.cloud
  24642. ch.trendhosting.cloud
  24643. de.trendhosting.cloud
  24644. jele.club
  24645. amscompute.com
  24646. dopaas.com
  24647. paas.hosted-by-previder.com
  24648. rag-cloud.hosteur.com
  24649. rag-cloud-ch.hosteur.com
  24650. jcloud.ik-server.com
  24651. jcloud-ver-jpc.ik-server.com
  24652. demo.jelastic.com
  24653. kilatiron.com
  24654. paas.massivegrid.com
  24655. jed.wafaicloud.com
  24656. lon.wafaicloud.com
  24657. ryd.wafaicloud.com
  24658. j.scaleforce.com.cy
  24659. jelastic.dogado.eu
  24660. fi.cloudplatform.fi
  24661. demo.datacenter.fi
  24662. paas.datacenter.fi
  24663. jele.host
  24664. mircloud.host
  24665. paas.beebyte.io
  24666. sekd1.beebyteapp.io
  24667. jele.io
  24668. cloud-fr1.unispace.io
  24669. jc.neen.it
  24670. cloud.jelastic.open.tim.it
  24671. jcloud.kz
  24672. upaas.kazteleport.kz
  24673. cloudjiffy.net
  24674. fra1-de.cloudjiffy.net
  24675. west1-us.cloudjiffy.net
  24676. jls-sto1.elastx.net
  24677. jls-sto2.elastx.net
  24678. jls-sto3.elastx.net
  24679. faststacks.net
  24680. fr-1.paas.massivegrid.net
  24681. lon-1.paas.massivegrid.net
  24682. lon-2.paas.massivegrid.net
  24683. ny-1.paas.massivegrid.net
  24684. ny-2.paas.massivegrid.net
  24685. sg-1.paas.massivegrid.net
  24686. jelastic.saveincloud.net
  24687. nordeste-idc.saveincloud.net
  24688. j.scaleforce.net
  24689. jelastic.tsukaeru.net
  24690. sdscloud.pl
  24691. unicloud.pl
  24692. mircloud.ru
  24693. jelastic.regruhosting.ru
  24694. enscaled.sg
  24695. jele.site
  24696. jelastic.team
  24697. orangecloud.tn
  24698. j.layershift.co.uk
  24699. phx.enscaled.us
  24700. mircloud.us
  24701. // Jino : https://www.jino.ru
  24702. // Submitted by Sergey Ulyashin <ulyashin@jino.ru>
  24703. myjino.ru
  24704. *.hosting.myjino.ru
  24705. *.landing.myjino.ru
  24706. *.spectrum.myjino.ru
  24707. *.vps.myjino.ru
  24708. // Jotelulu S.L. : https://jotelulu.com
  24709. // Submitted by Daniel Fariña <ingenieria@jotelulu.com>
  24710. jotelulu.cloud
  24711. // Joyent : https://www.joyent.com/
  24712. // Submitted by Brian Bennett <brian.bennett@joyent.com>
  24713. *.triton.zone
  24714. *.cns.joyent.com
  24715. // JS.ORG : http://dns.js.org
  24716. // Submitted by Stefan Keim <admin@js.org>
  24717. js.org
  24718. // KaasHosting : http://www.kaashosting.nl/
  24719. // Submitted by Wouter Bakker <hostmaster@kaashosting.nl>
  24720. kaas.gg
  24721. khplay.nl
  24722. // Kakao : https://www.kakaocorp.com/
  24723. // Submitted by JaeYoong Lee <cec@kakaocorp.com>
  24724. ktistory.com
  24725. // Kapsi : https://kapsi.fi
  24726. // Submitted by Tomi Juntunen <erani@kapsi.fi>
  24727. kapsi.fi
  24728. // Keyweb AG : https://www.keyweb.de
  24729. // Submitted by Martin Dannehl <postmaster@keymachine.de>
  24730. keymachine.de
  24731. // KingHost : https://king.host
  24732. // Submitted by Felipe Keller Braz <felipebraz@kinghost.com.br>
  24733. kinghost.net
  24734. uni5.net
  24735. // KnightPoint Systems, LLC : http://www.knightpoint.com/
  24736. // Submitted by Roy Keene <rkeene@knightpoint.com>
  24737. knightpoint.systems
  24738. // KoobinEvent, SL: https://www.koobin.com
  24739. // Submitted by Iván Oliva <ivan.oliva@koobin.com>
  24740. koobin.events
  24741. // KUROKU LTD : https://kuroku.ltd/
  24742. // Submitted by DisposaBoy <security@oya.to>
  24743. oya.to
  24744. // Katholieke Universiteit Leuven: https://www.kuleuven.be
  24745. // Submitted by Abuse KU Leuven <abuse@kuleuven.be>
  24746. kuleuven.cloud
  24747. ezproxy.kuleuven.be
  24748. // .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf
  24749. co.krd
  24750. edu.krd
  24751. // Krellian Ltd. : https://krellian.com
  24752. // Submitted by Ben Francis <ben@krellian.com>
  24753. krellian.net
  24754. webthings.io
  24755. // LCube - Professional hosting e.K. : https://www.lcube-webhosting.de
  24756. // Submitted by Lars Laehn <info@lcube.de>
  24757. git-repos.de
  24758. lcube-server.de
  24759. svn-repos.de
  24760. // Leadpages : https://www.leadpages.net
  24761. // Submitted by Greg Dallavalle <domains@leadpages.net>
  24762. leadpages.co
  24763. lpages.co
  24764. lpusercontent.com
  24765. // Lelux.fi : https://lelux.fi/
  24766. // Submitted by Lelux Admin <publisuffix@lelux.site>
  24767. lelux.site
  24768. // Lifetime Hosting : https://Lifetime.Hosting/
  24769. // Submitted by Mike Fillator <support@lifetime.hosting>
  24770. co.business
  24771. co.education
  24772. co.events
  24773. co.financial
  24774. co.network
  24775. co.place
  24776. co.technology
  24777. // Lightmaker Property Manager, Inc. : https://app.lmpm.com/
  24778. // Submitted by Greg Holland <greg.holland@lmpm.com>
  24779. app.lmpm.com
  24780. // linkyard ldt: https://www.linkyard.ch/
  24781. // Submitted by Mario Siegenthaler <mario.siegenthaler@linkyard.ch>
  24782. linkyard.cloud
  24783. linkyard-cloud.ch
  24784. // Linode : https://linode.com
  24785. // Submitted by <security@linode.com>
  24786. members.linode.com
  24787. *.nodebalancer.linode.com
  24788. *.linodeobjects.com
  24789. ip.linodeusercontent.com
  24790. // LiquidNet Ltd : http://www.liquidnetlimited.com/
  24791. // Submitted by Victor Velchev <admin@liquidnetlimited.com>
  24792. we.bs
  24793. // Localcert : https://localcert.dev
  24794. // Submitted by Lann Martin <security@localcert.dev>
  24795. *.user.localcert.dev
  24796. // localzone.xyz
  24797. // Submitted by Kenny Niehage <hello@yahe.sh>
  24798. localzone.xyz
  24799. // Log'in Line : https://www.loginline.com/
  24800. // Submitted by Rémi Mach <remi.mach@loginline.com>
  24801. loginline.app
  24802. loginline.dev
  24803. loginline.io
  24804. loginline.services
  24805. loginline.site
  24806. // Lokalized : https://lokalized.nl
  24807. // Submitted by Noah Taheij <noah@lokalized.nl>
  24808. servers.run
  24809. // Lõhmus Family, The
  24810. // Submitted by Heiki Lõhmus <hostmaster at lohmus dot me>
  24811. lohmus.me
  24812. // LubMAN UMCS Sp. z o.o : https://lubman.pl/
  24813. // Submitted by Ireneusz Maliszewski <ireneusz.maliszewski@lubman.pl>
  24814. krasnik.pl
  24815. leczna.pl
  24816. lubartow.pl
  24817. lublin.pl
  24818. poniatowa.pl
  24819. swidnik.pl
  24820. // Lug.org.uk : https://lug.org.uk
  24821. // Submitted by Jon Spriggs <admin@lug.org.uk>
  24822. glug.org.uk
  24823. lug.org.uk
  24824. lugs.org.uk
  24825. // Lukanet Ltd : https://lukanet.com
  24826. // Submitted by Anton Avramov <register@lukanet.com>
  24827. barsy.bg
  24828. barsy.co.uk
  24829. barsyonline.co.uk
  24830. barsycenter.com
  24831. barsyonline.com
  24832. barsy.club
  24833. barsy.de
  24834. barsy.eu
  24835. barsy.in
  24836. barsy.info
  24837. barsy.io
  24838. barsy.me
  24839. barsy.menu
  24840. barsy.mobi
  24841. barsy.net
  24842. barsy.online
  24843. barsy.org
  24844. barsy.pro
  24845. barsy.pub
  24846. barsy.ro
  24847. barsy.shop
  24848. barsy.site
  24849. barsy.support
  24850. barsy.uk
  24851. // Magento Commerce
  24852. // Submitted by Damien Tournoud <dtournoud@magento.cloud>
  24853. *.magentosite.cloud
  24854. // May First - People Link : https://mayfirst.org/
  24855. // Submitted by Jamie McClelland <info@mayfirst.org>
  24856. mayfirst.info
  24857. mayfirst.org
  24858. // Mail.Ru Group : https://hb.cldmail.ru
  24859. // Submitted by Ilya Zaretskiy <zaretskiy@corp.mail.ru>
  24860. hb.cldmail.ru
  24861. // Mail Transfer Platform : https://www.neupeer.com
  24862. // Submitted by Li Hui <lihui@neupeer.com>
  24863. cn.vu
  24864. // Maze Play: https://www.mazeplay.com
  24865. // Submitted by Adam Humpherys <adam@mws.dev>
  24866. mazeplay.com
  24867. // mcpe.me : https://mcpe.me
  24868. // Submitted by Noa Heyl <hi@noa.dev>
  24869. mcpe.me
  24870. // McHost : https://mchost.ru
  24871. // Submitted by Evgeniy Subbotin <e.subbotin@mchost.ru>
  24872. mcdir.me
  24873. mcdir.ru
  24874. mcpre.ru
  24875. vps.mcdir.ru
  24876. // Mediatech : https://mediatech.by
  24877. // Submitted by Evgeniy Kozhuhovskiy <ugenk@mediatech.by>
  24878. mediatech.by
  24879. mediatech.dev
  24880. // Medicom Health : https://medicomhealth.com
  24881. // Submitted by Michael Olson <molson@medicomhealth.com>
  24882. hra.health
  24883. // Memset hosting : https://www.memset.com
  24884. // Submitted by Tom Whitwell <domains@memset.com>
  24885. miniserver.com
  24886. memset.net
  24887. // Messerli Informatik AG : https://www.messerli.ch/
  24888. // Submitted by Ruben Schmidmeister <psl-maintainers@messerli.ch>
  24889. messerli.app
  24890. // MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/
  24891. // Submitted by Zdeněk Šustr <zdenek.sustr@cesnet.cz>
  24892. *.cloud.metacentrum.cz
  24893. custom.metacentrum.cz
  24894. // MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/
  24895. // Submitted by Radim Janča <janca@cesnet.cz>
  24896. flt.cloud.muni.cz
  24897. usr.cloud.muni.cz
  24898. // Meteor Development Group : https://www.meteor.com/hosting
  24899. // Submitted by Pierre Carrier <pierre@meteor.com>
  24900. meteorapp.com
  24901. eu.meteorapp.com
  24902. // Michau Enterprises Limited : http://www.co.pl/
  24903. co.pl
  24904. // Microsoft Corporation : http://microsoft.com
  24905. // Submitted by Public Suffix List Admin <msftpsladmin@microsoft.com>
  24906. *.azurecontainer.io
  24907. azurewebsites.net
  24908. azure-mobile.net
  24909. cloudapp.net
  24910. azurestaticapps.net
  24911. 1.azurestaticapps.net
  24912. 2.azurestaticapps.net
  24913. 3.azurestaticapps.net
  24914. centralus.azurestaticapps.net
  24915. eastasia.azurestaticapps.net
  24916. eastus2.azurestaticapps.net
  24917. westeurope.azurestaticapps.net
  24918. westus2.azurestaticapps.net
  24919. // minion.systems : http://minion.systems
  24920. // Submitted by Robert Böttinger <r@minion.systems>
  24921. csx.cc
  24922. // Mintere : https://mintere.com/
  24923. // Submitted by Ben Aubin <security@mintere.com>
  24924. mintere.site
  24925. // MobileEducation, LLC : https://joinforte.com
  24926. // Submitted by Grayson Martin <grayson.martin@mobileeducation.us>
  24927. forte.id
  24928. // Mozilla Corporation : https://mozilla.com
  24929. // Submitted by Ben Francis <bfrancis@mozilla.com>
  24930. mozilla-iot.org
  24931. // Mozilla Foundation : https://mozilla.org/
  24932. // Submitted by glob <glob@mozilla.com>
  24933. bmoattachments.org
  24934. // MSK-IX : https://www.msk-ix.ru/
  24935. // Submitted by Khannanov Roman <r.khannanov@msk-ix.ru>
  24936. net.ru
  24937. org.ru
  24938. pp.ru
  24939. // Mythic Beasts : https://www.mythic-beasts.com
  24940. // Submitted by Paul Cammish <kelduum@mythic-beasts.com>
  24941. hostedpi.com
  24942. customer.mythic-beasts.com
  24943. caracal.mythic-beasts.com
  24944. fentiger.mythic-beasts.com
  24945. lynx.mythic-beasts.com
  24946. ocelot.mythic-beasts.com
  24947. oncilla.mythic-beasts.com
  24948. onza.mythic-beasts.com
  24949. sphinx.mythic-beasts.com
  24950. vs.mythic-beasts.com
  24951. x.mythic-beasts.com
  24952. yali.mythic-beasts.com
  24953. cust.retrosnub.co.uk
  24954. // Nabu Casa : https://www.nabucasa.com
  24955. // Submitted by Paulus Schoutsen <infra@nabucasa.com>
  24956. ui.nabu.casa
  24957. // Net at Work Gmbh : https://www.netatwork.de
  24958. // Submitted by Jan Jaeschke <jan.jaeschke@netatwork.de>
  24959. cloud.nospamproxy.com
  24960. // Netlify : https://www.netlify.com
  24961. // Submitted by Jessica Parsons <jessica@netlify.com>
  24962. netlify.app
  24963. // Neustar Inc.
  24964. // Submitted by Trung Tran <Trung.Tran@neustar.biz>
  24965. 4u.com
  24966. // ngrok : https://ngrok.com/
  24967. // Submitted by Alan Shreve <alan@ngrok.com>
  24968. ngrok.app
  24969. ngrok-free.app
  24970. ngrok.dev
  24971. ngrok-free.dev
  24972. ngrok.io
  24973. ap.ngrok.io
  24974. au.ngrok.io
  24975. eu.ngrok.io
  24976. in.ngrok.io
  24977. jp.ngrok.io
  24978. sa.ngrok.io
  24979. us.ngrok.io
  24980. ngrok.pizza
  24981. // Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/
  24982. // Submitted by Nicholas Ford <nick@nimbushosting.co.uk>
  24983. nh-serv.co.uk
  24984. // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
  24985. // Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
  24986. nfshost.com
  24987. // Noop : https://noop.app
  24988. // Submitted by Nathaniel Schweinberg <noop@rearc.io>
  24989. *.developer.app
  24990. noop.app
  24991. // Northflank Ltd. : https://northflank.com/
  24992. // Submitted by Marco Suter <marco@northflank.com>
  24993. *.northflank.app
  24994. *.build.run
  24995. *.code.run
  24996. *.database.run
  24997. *.migration.run
  24998. // Noticeable : https://noticeable.io
  24999. // Submitted by Laurent Pellegrino <security@noticeable.io>
  25000. noticeable.news
  25001. // Now-DNS : https://now-dns.com
  25002. // Submitted by Steve Russell <steve@now-dns.com>
  25003. dnsking.ch
  25004. mypi.co
  25005. n4t.co
  25006. 001www.com
  25007. ddnslive.com
  25008. myiphost.com
  25009. forumz.info
  25010. 16-b.it
  25011. 32-b.it
  25012. 64-b.it
  25013. soundcast.me
  25014. tcp4.me
  25015. dnsup.net
  25016. hicam.net
  25017. now-dns.net
  25018. ownip.net
  25019. vpndns.net
  25020. dynserv.org
  25021. now-dns.org
  25022. x443.pw
  25023. now-dns.top
  25024. ntdll.top
  25025. freeddns.us
  25026. crafting.xyz
  25027. zapto.xyz
  25028. // nsupdate.info : https://www.nsupdate.info/
  25029. // Submitted by Thomas Waldmann <info@nsupdate.info>
  25030. nsupdate.info
  25031. nerdpol.ovh
  25032. // No-IP.com : https://noip.com/
  25033. // Submitted by Deven Reza <publicsuffixlist@noip.com>
  25034. blogsyte.com
  25035. brasilia.me
  25036. cable-modem.org
  25037. ciscofreak.com
  25038. collegefan.org
  25039. couchpotatofries.org
  25040. damnserver.com
  25041. ddns.me
  25042. ditchyourip.com
  25043. dnsfor.me
  25044. dnsiskinky.com
  25045. dvrcam.info
  25046. dynns.com
  25047. eating-organic.net
  25048. fantasyleague.cc
  25049. geekgalaxy.com
  25050. golffan.us
  25051. health-carereform.com
  25052. homesecuritymac.com
  25053. homesecuritypc.com
  25054. hopto.me
  25055. ilovecollege.info
  25056. loginto.me
  25057. mlbfan.org
  25058. mmafan.biz
  25059. myactivedirectory.com
  25060. mydissent.net
  25061. myeffect.net
  25062. mymediapc.net
  25063. mypsx.net
  25064. mysecuritycamera.com
  25065. mysecuritycamera.net
  25066. mysecuritycamera.org
  25067. net-freaks.com
  25068. nflfan.org
  25069. nhlfan.net
  25070. no-ip.ca
  25071. no-ip.co.uk
  25072. no-ip.net
  25073. noip.us
  25074. onthewifi.com
  25075. pgafan.net
  25076. point2this.com
  25077. pointto.us
  25078. privatizehealthinsurance.net
  25079. quicksytes.com
  25080. read-books.org
  25081. securitytactics.com
  25082. serveexchange.com
  25083. servehumour.com
  25084. servep2p.com
  25085. servesarcasm.com
  25086. stufftoread.com
  25087. ufcfan.org
  25088. unusualperson.com
  25089. workisboring.com
  25090. 3utilities.com
  25091. bounceme.net
  25092. ddns.net
  25093. ddnsking.com
  25094. gotdns.ch
  25095. hopto.org
  25096. myftp.biz
  25097. myftp.org
  25098. myvnc.com
  25099. no-ip.biz
  25100. no-ip.info
  25101. no-ip.org
  25102. noip.me
  25103. redirectme.net
  25104. servebeer.com
  25105. serveblog.net
  25106. servecounterstrike.com
  25107. serveftp.com
  25108. servegame.com
  25109. servehalflife.com
  25110. servehttp.com
  25111. serveirc.com
  25112. serveminecraft.net
  25113. servemp3.com
  25114. servepics.com
  25115. servequake.com
  25116. sytes.net
  25117. webhop.me
  25118. zapto.org
  25119. // NodeArt : https://nodeart.io
  25120. // Submitted by Konstantin Nosov <Nosov@nodeart.io>
  25121. stage.nodeart.io
  25122. // Nucleos Inc. : https://nucleos.com
  25123. // Submitted by Piotr Zduniak <piotr@nucleos.com>
  25124. pcloud.host
  25125. // NYC.mn : http://www.information.nyc.mn
  25126. // Submitted by Matthew Brown <mattbrown@nyc.mn>
  25127. nyc.mn
  25128. // Observable, Inc. : https://observablehq.com
  25129. // Submitted by Mike Bostock <dns@observablehq.com>
  25130. static.observableusercontent.com
  25131. // Octopodal Solutions, LLC. : https://ulterius.io/
  25132. // Submitted by Andrew Sampson <andrew@ulterius.io>
  25133. cya.gg
  25134. // OMG.LOL : <https://omg.lol>
  25135. // Submitted by Adam Newbold <adam@omg.lol>
  25136. omg.lol
  25137. // Omnibond Systems, LLC. : https://www.omnibond.com
  25138. // Submitted by Cole Estep <cole@omnibond.com>
  25139. cloudycluster.net
  25140. // OmniWe Limited: https://omniwe.com
  25141. // Submitted by Vicary Archangel <vicary@omniwe.com>
  25142. omniwe.site
  25143. // One.com: https://www.one.com/
  25144. // Submitted by Jacob Bunk Nielsen <jbn@one.com>
  25145. 123hjemmeside.dk
  25146. 123hjemmeside.no
  25147. 123homepage.it
  25148. 123kotisivu.fi
  25149. 123minsida.se
  25150. 123miweb.es
  25151. 123paginaweb.pt
  25152. 123sait.ru
  25153. 123siteweb.fr
  25154. 123webseite.at
  25155. 123webseite.de
  25156. 123website.be
  25157. 123website.ch
  25158. 123website.lu
  25159. 123website.nl
  25160. service.one
  25161. simplesite.com
  25162. simplesite.com.br
  25163. simplesite.gr
  25164. simplesite.pl
  25165. // One Fold Media : http://www.onefoldmedia.com/
  25166. // Submitted by Eddie Jones <eddie@onefoldmedia.com>
  25167. nid.io
  25168. // Open Social : https://www.getopensocial.com/
  25169. // Submitted by Alexander Varwijk <security@getopensocial.com>
  25170. opensocial.site
  25171. // OpenCraft GmbH : http://opencraft.com/
  25172. // Submitted by Sven Marnach <sven@opencraft.com>
  25173. opencraft.hosting
  25174. // OpenResearch GmbH: https://openresearch.com/
  25175. // Submitted by Philipp Schmid <ops@openresearch.com>
  25176. orsites.com
  25177. // Opera Software, A.S.A.
  25178. // Submitted by Yngve Pettersen <yngve@opera.com>
  25179. operaunite.com
  25180. // Orange : https://www.orange.com
  25181. // Submitted by Alexandre Linte <alexandre.linte@orange.com>
  25182. tech.orange
  25183. // Oursky Limited : https://authgear.com/, https://skygear.io/
  25184. // Submitted by Authgear Team <hello@authgear.com>, Skygear Developer <hello@skygear.io>
  25185. authgear-staging.com
  25186. authgearapps.com
  25187. skygearapp.com
  25188. // OutSystems
  25189. // Submitted by Duarte Santos <domain-admin@outsystemscloud.com>
  25190. outsystemscloud.com
  25191. // OVHcloud: https://ovhcloud.com
  25192. // Submitted by Vincent Cassé <vincent.casse@ovhcloud.com>
  25193. *.webpaas.ovh.net
  25194. *.hosting.ovh.net
  25195. // OwnProvider GmbH: http://www.ownprovider.com
  25196. // Submitted by Jan Moennich <jan.moennich@ownprovider.com>
  25197. ownprovider.com
  25198. own.pm
  25199. // OwO : https://whats-th.is/
  25200. // Submitted by Dean Sheather <dean@deansheather.com>
  25201. *.owo.codes
  25202. // OX : http://www.ox.rs
  25203. // Submitted by Adam Grand <webmaster@mail.ox.rs>
  25204. ox.rs
  25205. // oy.lc
  25206. // Submitted by Charly Coste <changaco@changaco.oy.lc>
  25207. oy.lc
  25208. // Pagefog : https://pagefog.com/
  25209. // Submitted by Derek Myers <derek@pagefog.com>
  25210. pgfog.com
  25211. // Pagefront : https://www.pagefronthq.com/
  25212. // Submitted by Jason Kriss <jason@pagefronthq.com>
  25213. pagefrontapp.com
  25214. // PageXL : https://pagexl.com
  25215. // Submitted by Yann Guichard <yann@pagexl.com>
  25216. pagexl.com
  25217. // Paywhirl, Inc : https://paywhirl.com/
  25218. // Submitted by Daniel Netzer <dan@paywhirl.com>
  25219. *.paywhirl.com
  25220. // pcarrier.ca Software Inc: https://pcarrier.ca/
  25221. // Submitted by Pierre Carrier <pc@rrier.ca>
  25222. bar0.net
  25223. bar1.net
  25224. bar2.net
  25225. rdv.to
  25226. // .pl domains (grandfathered)
  25227. art.pl
  25228. gliwice.pl
  25229. krakow.pl
  25230. poznan.pl
  25231. wroc.pl
  25232. zakopane.pl
  25233. // Pantheon Systems, Inc. : https://pantheon.io/
  25234. // Submitted by Gary Dylina <gary@pantheon.io>
  25235. pantheonsite.io
  25236. gotpantheon.com
  25237. // Peplink | Pepwave : http://peplink.com/
  25238. // Submitted by Steve Leung <steveleung@peplink.com>
  25239. mypep.link
  25240. // Perspecta : https://perspecta.com/
  25241. // Submitted by Kenneth Van Alstyne <kvanalstyne@perspecta.com>
  25242. perspecta.cloud
  25243. // PE Ulyanov Kirill Sergeevich : https://airy.host
  25244. // Submitted by Kirill Ulyanov <k.ulyanov@airy.host>
  25245. lk3.ru
  25246. // Planet-Work : https://www.planet-work.com/
  25247. // Submitted by Frédéric VANNIÈRE <f.vanniere@planet-work.com>
  25248. on-web.fr
  25249. // Platform.sh : https://platform.sh
  25250. // Submitted by Nikola Kotur <nikola@platform.sh>
  25251. bc.platform.sh
  25252. ent.platform.sh
  25253. eu.platform.sh
  25254. us.platform.sh
  25255. *.platformsh.site
  25256. *.tst.site
  25257. // Platter: https://platter.dev
  25258. // Submitted by Patrick Flor <patrick@platter.dev>
  25259. platter-app.com
  25260. platter-app.dev
  25261. platterp.us
  25262. // Plesk : https://www.plesk.com/
  25263. // Submitted by Anton Akhtyamov <program-managers@plesk.com>
  25264. pdns.page
  25265. plesk.page
  25266. pleskns.com
  25267. // Port53 : https://port53.io/
  25268. // Submitted by Maximilian Schieder <maxi@zeug.co>
  25269. dyn53.io
  25270. // Porter : https://porter.run/
  25271. // Submitted by Rudraksh MK <rudi@porter.run>
  25272. onporter.run
  25273. // Positive Codes Technology Company : http://co.bn/faq.html
  25274. // Submitted by Zulfais <pc@co.bn>
  25275. co.bn
  25276. // Postman, Inc : https://postman.com
  25277. // Submitted by Rahul Dhawan <security@postman.com>
  25278. postman-echo.com
  25279. pstmn.io
  25280. mock.pstmn.io
  25281. httpbin.org
  25282. //prequalifyme.today : https://prequalifyme.today
  25283. //Submitted by DeepakTiwari deepak@ivylead.io
  25284. prequalifyme.today
  25285. // prgmr.com : https://prgmr.com/
  25286. // Submitted by Sarah Newman <owner@prgmr.com>
  25287. xen.prgmr.com
  25288. // priv.at : http://www.nic.priv.at/
  25289. // Submitted by registry <lendl@nic.at>
  25290. priv.at
  25291. // privacytools.io : https://www.privacytools.io/
  25292. // Submitted by Jonah Aragon <jonah@privacytools.io>
  25293. prvcy.page
  25294. // Protocol Labs : https://protocol.ai/
  25295. // Submitted by Michael Burns <noc@protocol.ai>
  25296. *.dweb.link
  25297. // Protonet GmbH : http://protonet.io
  25298. // Submitted by Martin Meier <admin@protonet.io>
  25299. protonet.io
  25300. // Publication Presse Communication SARL : https://ppcom.fr
  25301. // Submitted by Yaacov Akiba Slama <admin@chirurgiens-dentistes-en-france.fr>
  25302. chirurgiens-dentistes-en-france.fr
  25303. byen.site
  25304. // pubtls.org: https://www.pubtls.org
  25305. // Submitted by Kor Nielsen <kor@pubtls.org>
  25306. pubtls.org
  25307. // PythonAnywhere LLP: https://www.pythonanywhere.com
  25308. // Submitted by Giles Thomas <giles@pythonanywhere.com>
  25309. pythonanywhere.com
  25310. eu.pythonanywhere.com
  25311. // QOTO, Org.
  25312. // Submitted by Jeffrey Phillips Freeman <jeffrey.freeman@qoto.org>
  25313. qoto.io
  25314. // Qualifio : https://qualifio.com/
  25315. // Submitted by Xavier De Cock <xdecock@gmail.com>
  25316. qualifioapp.com
  25317. // Quality Unit: https://qualityunit.com
  25318. // Submitted by Vasyl Tsalko <vtsalko@qualityunit.com>
  25319. ladesk.com
  25320. // QuickBackend: https://www.quickbackend.com
  25321. // Submitted by Dani Biro <dani@pymet.com>
  25322. qbuser.com
  25323. // Rad Web Hosting: https://radwebhosting.com
  25324. // Submitted by Scott Claeys <s.claeys@radwebhosting.com>
  25325. cloudsite.builders
  25326. // Redgate Software: https://red-gate.com
  25327. // Submitted by Andrew Farries <andrew.farries@red-gate.com>
  25328. instances.spawn.cc
  25329. // Redstar Consultants : https://www.redstarconsultants.com/
  25330. // Submitted by Jons Slemmer <jons@redstarconsultants.com>
  25331. instantcloud.cn
  25332. // Russian Academy of Sciences
  25333. // Submitted by Tech Support <support@rasnet.ru>
  25334. ras.ru
  25335. // QA2
  25336. // Submitted by Daniel Dent (https://www.danieldent.com/)
  25337. qa2.com
  25338. // QCX
  25339. // Submitted by Cassandra Beelen <cassandra@beelen.one>
  25340. qcx.io
  25341. *.sys.qcx.io
  25342. // QNAP System Inc : https://www.qnap.com
  25343. // Submitted by Nick Chang <nickchang@qnap.com>
  25344. dev-myqnapcloud.com
  25345. alpha-myqnapcloud.com
  25346. myqnapcloud.com
  25347. // Quip : https://quip.com
  25348. // Submitted by Patrick Linehan <plinehan@quip.com>
  25349. *.quipelements.com
  25350. // Qutheory LLC : http://qutheory.io
  25351. // Submitted by Jonas Schwartz <jonas@qutheory.io>
  25352. vapor.cloud
  25353. vaporcloud.io
  25354. // Rackmaze LLC : https://www.rackmaze.com
  25355. // Submitted by Kirill Pertsev <kika@rackmaze.com>
  25356. rackmaze.com
  25357. rackmaze.net
  25358. // Rakuten Games, Inc : https://dev.viberplay.io
  25359. // Submitted by Joshua Zhang <public-suffix@rgames.jp>
  25360. g.vbrplsbx.io
  25361. // Rancher Labs, Inc : https://rancher.com
  25362. // Submitted by Vincent Fiduccia <domains@rancher.com>
  25363. *.on-k3s.io
  25364. *.on-rancher.cloud
  25365. *.on-rio.io
  25366. // Read The Docs, Inc : https://www.readthedocs.org
  25367. // Submitted by David Fischer <team@readthedocs.org>
  25368. readthedocs.io
  25369. // Red Hat, Inc. OpenShift : https://openshift.redhat.com/
  25370. // Submitted by Tim Kramer <tkramer@rhcloud.com>
  25371. rhcloud.com
  25372. // Render : https://render.com
  25373. // Submitted by Anurag Goel <dev@render.com>
  25374. app.render.com
  25375. onrender.com
  25376. // Repl.it : https://repl.it
  25377. // Submitted by Lincoln Bergeson <lincoln@replit.com>
  25378. firewalledreplit.co
  25379. id.firewalledreplit.co
  25380. repl.co
  25381. id.repl.co
  25382. repl.run
  25383. // Resin.io : https://resin.io
  25384. // Submitted by Tim Perry <tim@resin.io>
  25385. resindevice.io
  25386. devices.resinstaging.io
  25387. // RethinkDB : https://www.rethinkdb.com/
  25388. // Submitted by Chris Kastorff <info@rethinkdb.com>
  25389. hzc.io
  25390. // Revitalised Limited : http://www.revitalised.co.uk
  25391. // Submitted by Jack Price <jack@revitalised.co.uk>
  25392. wellbeingzone.eu
  25393. wellbeingzone.co.uk
  25394. // Rico Developments Limited : https://adimo.co
  25395. // Submitted by Colin Brown <hello@adimo.co>
  25396. adimo.co.uk
  25397. // Riseup Networks : https://riseup.net
  25398. // Submitted by Micah Anderson <micah@riseup.net>
  25399. itcouldbewor.se
  25400. // Rochester Institute of Technology : http://www.rit.edu/
  25401. // Submitted by Jennifer Herting <jchits@rit.edu>
  25402. git-pages.rit.edu
  25403. // Rocky Enterprise Software Foundation : https://resf.org
  25404. // Submitted by Neil Hanlon <neil@resf.org>
  25405. rocky.page
  25406. // Rusnames Limited: http://rusnames.ru/
  25407. // Submitted by Sergey Zotov <admin@rusnames.ru>
  25408. биз.рус
  25409. ком.рус
  25410. крым.рус
  25411. мир.рус
  25412. мск.рус
  25413. орг.рус
  25414. самара.рус
  25415. сочи.рус
  25416. спб.рус
  25417. я.рус
  25418. // SAKURA Internet Inc. : https://www.sakura.ad.jp/
  25419. // Submitted by Internet Service Department <rs-vendor-ml@sakura.ad.jp>
  25420. 180r.com
  25421. dojin.com
  25422. sakuratan.com
  25423. sakuraweb.com
  25424. x0.com
  25425. 2-d.jp
  25426. bona.jp
  25427. crap.jp
  25428. daynight.jp
  25429. eek.jp
  25430. flop.jp
  25431. halfmoon.jp
  25432. jeez.jp
  25433. matrix.jp
  25434. mimoza.jp
  25435. ivory.ne.jp
  25436. mail-box.ne.jp
  25437. mints.ne.jp
  25438. mokuren.ne.jp
  25439. opal.ne.jp
  25440. sakura.ne.jp
  25441. sumomo.ne.jp
  25442. topaz.ne.jp
  25443. netgamers.jp
  25444. nyanta.jp
  25445. o0o0.jp
  25446. rdy.jp
  25447. rgr.jp
  25448. rulez.jp
  25449. s3.isk01.sakurastorage.jp
  25450. s3.isk02.sakurastorage.jp
  25451. saloon.jp
  25452. sblo.jp
  25453. skr.jp
  25454. tank.jp
  25455. uh-oh.jp
  25456. undo.jp
  25457. rs.webaccel.jp
  25458. user.webaccel.jp
  25459. websozai.jp
  25460. xii.jp
  25461. squares.net
  25462. jpn.org
  25463. kirara.st
  25464. x0.to
  25465. from.tv
  25466. sakura.tv
  25467. // Salesforce.com, Inc. https://salesforce.com/
  25468. // Submitted by Michael Biven <mbiven@salesforce.com>
  25469. *.builder.code.com
  25470. *.dev-builder.code.com
  25471. *.stg-builder.code.com
  25472. // Sandstorm Development Group, Inc. : https://sandcats.io/
  25473. // Submitted by Asheesh Laroia <asheesh@sandstorm.io>
  25474. sandcats.io
  25475. // SBE network solutions GmbH : https://www.sbe.de/
  25476. // Submitted by Norman Meilick <nm@sbe.de>
  25477. logoip.de
  25478. logoip.com
  25479. // Scaleway : https://www.scaleway.com/
  25480. // Submitted by Rémy Léone <rleone@scaleway.com>
  25481. fr-par-1.baremetal.scw.cloud
  25482. fr-par-2.baremetal.scw.cloud
  25483. nl-ams-1.baremetal.scw.cloud
  25484. fnc.fr-par.scw.cloud
  25485. functions.fnc.fr-par.scw.cloud
  25486. k8s.fr-par.scw.cloud
  25487. nodes.k8s.fr-par.scw.cloud
  25488. s3.fr-par.scw.cloud
  25489. s3-website.fr-par.scw.cloud
  25490. whm.fr-par.scw.cloud
  25491. priv.instances.scw.cloud
  25492. pub.instances.scw.cloud
  25493. k8s.scw.cloud
  25494. k8s.nl-ams.scw.cloud
  25495. nodes.k8s.nl-ams.scw.cloud
  25496. s3.nl-ams.scw.cloud
  25497. s3-website.nl-ams.scw.cloud
  25498. whm.nl-ams.scw.cloud
  25499. k8s.pl-waw.scw.cloud
  25500. nodes.k8s.pl-waw.scw.cloud
  25501. s3.pl-waw.scw.cloud
  25502. s3-website.pl-waw.scw.cloud
  25503. scalebook.scw.cloud
  25504. smartlabeling.scw.cloud
  25505. dedibox.fr
  25506. // schokokeks.org GbR : https://schokokeks.org/
  25507. // Submitted by Hanno Böck <hanno@schokokeks.org>
  25508. schokokeks.net
  25509. // Scottish Government: https://www.gov.scot
  25510. // Submitted by Martin Ellis <martin.ellis@gov.scot>
  25511. gov.scot
  25512. service.gov.scot
  25513. // Scry Security : http://www.scrysec.com
  25514. // Submitted by Shante Adam <shante@skyhat.io>
  25515. scrysec.com
  25516. // Securepoint GmbH : https://www.securepoint.de
  25517. // Submitted by Erik Anders <erik.anders@securepoint.de>
  25518. firewall-gateway.com
  25519. firewall-gateway.de
  25520. my-gateway.de
  25521. my-router.de
  25522. spdns.de
  25523. spdns.eu
  25524. firewall-gateway.net
  25525. my-firewall.org
  25526. myfirewall.org
  25527. spdns.org
  25528. // Seidat : https://www.seidat.com
  25529. // Submitted by Artem Kondratev <accounts@seidat.com>
  25530. seidat.net
  25531. // Sellfy : https://sellfy.com
  25532. // Submitted by Yuriy Romadin <contact@sellfy.com>
  25533. sellfy.store
  25534. // Senseering GmbH : https://www.senseering.de
  25535. // Submitted by Felix Mönckemeyer <f.moenckemeyer@senseering.de>
  25536. senseering.net
  25537. // Sendmsg: https://www.sendmsg.co.il
  25538. // Submitted by Assaf Stern <domains@comstar.co.il>
  25539. minisite.ms
  25540. // Service Magnet : https://myservicemagnet.com
  25541. // Submitted by Dave Sanders <dave@myservicemagnet.com>
  25542. magnet.page
  25543. // Service Online LLC : http://drs.ua/
  25544. // Submitted by Serhii Bulakh <support@drs.ua>
  25545. biz.ua
  25546. co.ua
  25547. pp.ua
  25548. // Shift Crypto AG : https://shiftcrypto.ch
  25549. // Submitted by alex <alex@shiftcrypto.ch>
  25550. shiftcrypto.dev
  25551. shiftcrypto.io
  25552. // ShiftEdit : https://shiftedit.net/
  25553. // Submitted by Adam Jimenez <adam@shiftcreate.com>
  25554. shiftedit.io
  25555. // Shopblocks : http://www.shopblocks.com/
  25556. // Submitted by Alex Bowers <alex@shopblocks.com>
  25557. myshopblocks.com
  25558. // Shopify : https://www.shopify.com
  25559. // Submitted by Alex Richter <alex.richter@shopify.com>
  25560. myshopify.com
  25561. // Shopit : https://www.shopitcommerce.com/
  25562. // Submitted by Craig McMahon <craig@shopitcommerce.com>
  25563. shopitsite.com
  25564. // shopware AG : https://shopware.com
  25565. // Submitted by Jens Küper <cloud@shopware.com>
  25566. shopware.store
  25567. // Siemens Mobility GmbH
  25568. // Submitted by Oliver Graebner <security@mo-siemens.io>
  25569. mo-siemens.io
  25570. // SinaAppEngine : http://sae.sina.com.cn/
  25571. // Submitted by SinaAppEngine <saesupport@sinacloud.com>
  25572. 1kapp.com
  25573. appchizi.com
  25574. applinzi.com
  25575. sinaapp.com
  25576. vipsinaapp.com
  25577. // Siteleaf : https://www.siteleaf.com/
  25578. // Submitted by Skylar Challand <support@siteleaf.com>
  25579. siteleaf.net
  25580. // Skyhat : http://www.skyhat.io
  25581. // Submitted by Shante Adam <shante@skyhat.io>
  25582. bounty-full.com
  25583. alpha.bounty-full.com
  25584. beta.bounty-full.com
  25585. // Smallregistry by Promopixel SARL: https://www.smallregistry.net
  25586. // Former AFNIC's SLDs
  25587. // Submitted by Jérôme Lipowicz <support@promopixel.com>
  25588. aeroport.fr
  25589. avocat.fr
  25590. chambagri.fr
  25591. chirurgiens-dentistes.fr
  25592. experts-comptables.fr
  25593. medecin.fr
  25594. notaires.fr
  25595. pharmacien.fr
  25596. port.fr
  25597. veterinaire.fr
  25598. // Small Technology Foundation : https://small-tech.org
  25599. // Submitted by Aral Balkan <aral@small-tech.org>
  25600. small-web.org
  25601. // Smoove.io : https://www.smoove.io/
  25602. // Submitted by Dan Kozak <dan@smoove.io>
  25603. vp4.me
  25604. // Snowflake Inc : https://www.snowflake.com/
  25605. // Submitted by Faith Olapade <faith.olapade@snowflake.com>
  25606. snowflake.app
  25607. privatelink.snowflake.app
  25608. streamlit.app
  25609. streamlitapp.com
  25610. // Snowplow Analytics : https://snowplowanalytics.com/
  25611. // Submitted by Ian Streeter <ian@snowplowanalytics.com>
  25612. try-snowplow.com
  25613. // SourceHut : https://sourcehut.org
  25614. // Submitted by Drew DeVault <sir@cmpwn.com>
  25615. srht.site
  25616. // Stackhero : https://www.stackhero.io
  25617. // Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
  25618. stackhero-network.com
  25619. // Staclar : https://staclar.com
  25620. // Submitted by Q Misell <q@staclar.com>
  25621. musician.io
  25622. // Submitted by Matthias Merkel <matthias.merkel@staclar.com>
  25623. novecore.site
  25624. // staticland : https://static.land
  25625. // Submitted by Seth Vincent <sethvincent@gmail.com>
  25626. static.land
  25627. dev.static.land
  25628. sites.static.land
  25629. // Storebase : https://www.storebase.io
  25630. // Submitted by Tony Schirmer <tony@storebase.io>
  25631. storebase.store
  25632. // Strategic System Consulting (eApps Hosting): https://www.eapps.com/
  25633. // Submitted by Alex Oancea <aoancea@cloudscale365.com>
  25634. vps-host.net
  25635. atl.jelastic.vps-host.net
  25636. njs.jelastic.vps-host.net
  25637. ric.jelastic.vps-host.net
  25638. // Sony Interactive Entertainment LLC : https://sie.com/
  25639. // Submitted by David Coles <david.coles@sony.com>
  25640. playstation-cloud.com
  25641. // SourceLair PC : https://www.sourcelair.com
  25642. // Submitted by Antonis Kalipetis <akalipetis@sourcelair.com>
  25643. apps.lair.io
  25644. *.stolos.io
  25645. // SpaceKit : https://www.spacekit.io/
  25646. // Submitted by Reza Akhavan <spacekit.io@gmail.com>
  25647. spacekit.io
  25648. // SpeedPartner GmbH: https://www.speedpartner.de/
  25649. // Submitted by Stefan Neufeind <info@speedpartner.de>
  25650. customer.speedpartner.de
  25651. // Spreadshop (sprd.net AG) : https://www.spreadshop.com/
  25652. // Submitted by Martin Breest <security@spreadshop.com>
  25653. myspreadshop.at
  25654. myspreadshop.com.au
  25655. myspreadshop.be
  25656. myspreadshop.ca
  25657. myspreadshop.ch
  25658. myspreadshop.com
  25659. myspreadshop.de
  25660. myspreadshop.dk
  25661. myspreadshop.es
  25662. myspreadshop.fi
  25663. myspreadshop.fr
  25664. myspreadshop.ie
  25665. myspreadshop.it
  25666. myspreadshop.net
  25667. myspreadshop.nl
  25668. myspreadshop.no
  25669. myspreadshop.pl
  25670. myspreadshop.se
  25671. myspreadshop.co.uk
  25672. // Standard Library : https://stdlib.com
  25673. // Submitted by Jacob Lee <jacob@stdlib.com>
  25674. api.stdlib.com
  25675. // Storipress : https://storipress.com
  25676. // Submitted by Benno Liu <benno@storipress.com>
  25677. storipress.app
  25678. // Storj Labs Inc. : https://storj.io/
  25679. // Submitted by Philip Hutchins <hostmaster@storj.io>
  25680. storj.farm
  25681. // Studenten Net Twente : http://www.snt.utwente.nl/
  25682. // Submitted by Silke Hofstra <syscom@snt.utwente.nl>
  25683. utwente.io
  25684. // Student-Run Computing Facility : https://www.srcf.net/
  25685. // Submitted by Edwin Balani <sysadmins@srcf.net>
  25686. soc.srcf.net
  25687. user.srcf.net
  25688. // Sub 6 Limited: http://www.sub6.com
  25689. // Submitted by Dan Miller <dm@sub6.com>
  25690. temp-dns.com
  25691. // Supabase : https://supabase.io
  25692. // Submitted by Inian Parameshwaran <security@supabase.io>
  25693. supabase.co
  25694. supabase.in
  25695. supabase.net
  25696. su.paba.se
  25697. // Symfony, SAS : https://symfony.com/
  25698. // Submitted by Fabien Potencier <fabien@symfony.com>
  25699. *.s5y.io
  25700. *.sensiosite.cloud
  25701. // Syncloud : https://syncloud.org
  25702. // Submitted by Boris Rybalkin <syncloud@syncloud.it>
  25703. syncloud.it
  25704. // Synology, Inc. : https://www.synology.com/
  25705. // Submitted by Rony Weng <ronyweng@synology.com>
  25706. dscloud.biz
  25707. direct.quickconnect.cn
  25708. dsmynas.com
  25709. familyds.com
  25710. diskstation.me
  25711. dscloud.me
  25712. i234.me
  25713. myds.me
  25714. synology.me
  25715. dscloud.mobi
  25716. dsmynas.net
  25717. familyds.net
  25718. dsmynas.org
  25719. familyds.org
  25720. vpnplus.to
  25721. direct.quickconnect.to
  25722. // Tabit Technologies Ltd. : https://tabit.cloud/
  25723. // Submitted by Oren Agiv <oren@tabit.cloud>
  25724. tabitorder.co.il
  25725. mytabit.co.il
  25726. mytabit.com
  25727. // TAIFUN Software AG : http://taifun-software.de
  25728. // Submitted by Bjoern Henke <dev-server@taifun-software.de>
  25729. taifun-dns.de
  25730. // Tailscale Inc. : https://www.tailscale.com
  25731. // Submitted by David Anderson <danderson@tailscale.com>
  25732. beta.tailscale.net
  25733. ts.net
  25734. // TASK geographical domains (www.task.gda.pl/uslugi/dns)
  25735. gda.pl
  25736. gdansk.pl
  25737. gdynia.pl
  25738. med.pl
  25739. sopot.pl
  25740. // team.blue https://team.blue
  25741. // Submitted by Cedric Dubois <cedric.dubois@team.blue>
  25742. site.tb-hosting.com
  25743. // Teckids e.V. : https://www.teckids.org
  25744. // Submitted by Dominik George <dominik.george@teckids.org>
  25745. edugit.io
  25746. s3.teckids.org
  25747. // Telebit : https://telebit.cloud
  25748. // Submitted by AJ ONeal <aj@telebit.cloud>
  25749. telebit.app
  25750. telebit.io
  25751. *.telebit.xyz
  25752. // Thingdust AG : https://thingdust.com/
  25753. // Submitted by Adrian Imboden <adi@thingdust.com>
  25754. *.firenet.ch
  25755. *.svc.firenet.ch
  25756. reservd.com
  25757. thingdustdata.com
  25758. cust.dev.thingdust.io
  25759. cust.disrec.thingdust.io
  25760. cust.prod.thingdust.io
  25761. cust.testing.thingdust.io
  25762. reservd.dev.thingdust.io
  25763. reservd.disrec.thingdust.io
  25764. reservd.testing.thingdust.io
  25765. // ticket i/O GmbH : https://ticket.io
  25766. // Submitted by Christian Franke <it@ticket.io>
  25767. tickets.io
  25768. // Tlon.io : https://tlon.io
  25769. // Submitted by Mark Staarink <mark@tlon.io>
  25770. arvo.network
  25771. azimuth.network
  25772. tlon.network
  25773. // Tor Project, Inc. : https://torproject.org
  25774. // Submitted by Antoine Beaupré <anarcat@torproject.org
  25775. torproject.net
  25776. pages.torproject.net
  25777. // TownNews.com : http://www.townnews.com
  25778. // Submitted by Dustin Ward <dward@townnews.com>
  25779. bloxcms.com
  25780. townnews-staging.com
  25781. // TrafficPlex GmbH : https://www.trafficplex.de/
  25782. // Submitted by Phillipp Röll <phillipp.roell@trafficplex.de>
  25783. 12hp.at
  25784. 2ix.at
  25785. 4lima.at
  25786. lima-city.at
  25787. 12hp.ch
  25788. 2ix.ch
  25789. 4lima.ch
  25790. lima-city.ch
  25791. trafficplex.cloud
  25792. de.cool
  25793. 12hp.de
  25794. 2ix.de
  25795. 4lima.de
  25796. lima-city.de
  25797. 1337.pictures
  25798. clan.rip
  25799. lima-city.rocks
  25800. webspace.rocks
  25801. lima.zone
  25802. // TransIP : https://www.transip.nl
  25803. // Submitted by Rory Breuk <rbreuk@transip.nl>
  25804. *.transurl.be
  25805. *.transurl.eu
  25806. *.transurl.nl
  25807. // TransIP: https://www.transip.nl
  25808. // Submitted by Cedric Dubois <cedric.dubois@team.blue>
  25809. site.transip.me
  25810. // TuxFamily : http://tuxfamily.org
  25811. // Submitted by TuxFamily administrators <adm@staff.tuxfamily.org>
  25812. tuxfamily.org
  25813. // TwoDNS : https://www.twodns.de/
  25814. // Submitted by TwoDNS-Support <support@two-dns.de>
  25815. dd-dns.de
  25816. diskstation.eu
  25817. diskstation.org
  25818. dray-dns.de
  25819. draydns.de
  25820. dyn-vpn.de
  25821. dynvpn.de
  25822. mein-vigor.de
  25823. my-vigor.de
  25824. my-wan.de
  25825. syno-ds.de
  25826. synology-diskstation.de
  25827. synology-ds.de
  25828. // Typedream : https://typedream.com
  25829. // Submitted by Putri Karunia <putri@typedream.com>
  25830. typedream.app
  25831. // Typeform : https://www.typeform.com
  25832. // Submitted by Sergi Ferriz <sergi.ferriz@typeform.com>
  25833. pro.typeform.com
  25834. // Uberspace : https://uberspace.de
  25835. // Submitted by Moritz Werner <mwerner@jonaspasche.com>
  25836. uber.space
  25837. *.uberspace.de
  25838. // UDR Limited : http://www.udr.hk.com
  25839. // Submitted by registry <hostmaster@udr.hk.com>
  25840. hk.com
  25841. hk.org
  25842. ltd.hk
  25843. inc.hk
  25844. // UK Intis Telecom LTD : https://it.com
  25845. // Submitted by ITComdomains <to@it.com>
  25846. it.com
  25847. // UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
  25848. // see also: whois -h whois.udr.org.yt help
  25849. // Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt>
  25850. name.pm
  25851. sch.tf
  25852. biz.wf
  25853. sch.wf
  25854. org.yt
  25855. // United Gameserver GmbH : https://united-gameserver.de
  25856. // Submitted by Stefan Schwarz <sysadm@united-gameserver.de>
  25857. virtualuser.de
  25858. virtual-user.de
  25859. // Upli : https://upli.io
  25860. // Submitted by Lenny Bakkalian <lenny.bakkalian@gmail.com>
  25861. upli.io
  25862. // urown.net : https://urown.net
  25863. // Submitted by Hostmaster <hostmaster@urown.net>
  25864. urown.cloud
  25865. dnsupdate.info
  25866. // .US
  25867. // Submitted by Ed Moore <Ed.Moore@lib.de.us>
  25868. lib.de.us
  25869. // VeryPositive SIA : http://very.lv
  25870. // Submitted by Danko Aleksejevs <danko@very.lv>
  25871. 2038.io
  25872. // Vercel, Inc : https://vercel.com/
  25873. // Submitted by Connor Davis <security@vercel.com>
  25874. vercel.app
  25875. vercel.dev
  25876. now.sh
  25877. // Viprinet Europe GmbH : http://www.viprinet.com
  25878. // Submitted by Simon Kissel <hostmaster@viprinet.com>
  25879. router.management
  25880. // Virtual-Info : https://www.virtual-info.info/
  25881. // Submitted by Adnan RIHAN <hostmaster@v-info.info>
  25882. v-info.info
  25883. // Voorloper.com: https://voorloper.com
  25884. // Submitted by Nathan van Bakel <info@voorloper.com>
  25885. voorloper.cloud
  25886. // Voxel.sh DNS : https://voxel.sh/dns/
  25887. // Submitted by Mia Rehlinger <dns@voxel.sh>
  25888. neko.am
  25889. nyaa.am
  25890. be.ax
  25891. cat.ax
  25892. es.ax
  25893. eu.ax
  25894. gg.ax
  25895. mc.ax
  25896. us.ax
  25897. xy.ax
  25898. nl.ci
  25899. xx.gl
  25900. app.gp
  25901. blog.gt
  25902. de.gt
  25903. to.gt
  25904. be.gy
  25905. cc.hn
  25906. blog.kg
  25907. io.kg
  25908. jp.kg
  25909. tv.kg
  25910. uk.kg
  25911. us.kg
  25912. de.ls
  25913. at.md
  25914. de.md
  25915. jp.md
  25916. to.md
  25917. indie.porn
  25918. vxl.sh
  25919. ch.tc
  25920. me.tc
  25921. we.tc
  25922. nyan.to
  25923. at.vg
  25924. blog.vu
  25925. dev.vu
  25926. me.vu
  25927. // V.UA Domain Administrator : https://domain.v.ua/
  25928. // Submitted by Serhii Rostilo <sergey@rostilo.kiev.ua>
  25929. v.ua
  25930. // Vultr Objects : https://www.vultr.com/products/object-storage/
  25931. // Submitted by Niels Maumenee <storage@vultr.com>
  25932. *.vultrobjects.com
  25933. // Waffle Computer Inc., Ltd. : https://docs.waffleinfo.com
  25934. // Submitted by Masayuki Note <masa@blade.wafflecell.com>
  25935. wafflecell.com
  25936. // WebHare bv: https://www.webhare.com/
  25937. // Submitted by Arnold Hendriks <info@webhare.com>
  25938. *.webhare.dev
  25939. // WebHotelier Technologies Ltd: https://www.webhotelier.net/
  25940. // Submitted by Apostolos Tsakpinis <apostolos.tsakpinis@gmail.com>
  25941. reserve-online.net
  25942. reserve-online.com
  25943. bookonline.app
  25944. hotelwithflight.com
  25945. // WeDeploy by Liferay, Inc. : https://www.wedeploy.com
  25946. // Submitted by Henrique Vicente <security@wedeploy.com>
  25947. wedeploy.io
  25948. wedeploy.me
  25949. wedeploy.sh
  25950. // Western Digital Technologies, Inc : https://www.wdc.com
  25951. // Submitted by Jung Jin <jungseok.jin@wdc.com>
  25952. remotewd.com
  25953. // WIARD Enterprises : https://wiardweb.com
  25954. // Submitted by Kidd Hustle <kiddhustle@wiardweb.com>
  25955. pages.wiardweb.com
  25956. // Wikimedia Labs : https://wikitech.wikimedia.org
  25957. // Submitted by Arturo Borrero Gonzalez <aborrero@wikimedia.org>
  25958. wmflabs.org
  25959. toolforge.org
  25960. wmcloud.org
  25961. // WISP : https://wisp.gg
  25962. // Submitted by Stepan Fedotov <stepan@wisp.gg>
  25963. panel.gg
  25964. daemon.panel.gg
  25965. // Wizard Zines : https://wizardzines.com
  25966. // Submitted by Julia Evans <julia@wizardzines.com>
  25967. messwithdns.com
  25968. // WoltLab GmbH : https://www.woltlab.com
  25969. // Submitted by Tim Düsterhus <security@woltlab.cloud>
  25970. woltlab-demo.com
  25971. myforum.community
  25972. community-pro.de
  25973. diskussionsbereich.de
  25974. community-pro.net
  25975. meinforum.net
  25976. // Woods Valldata : https://www.woodsvalldata.co.uk/
  25977. // Submitted by Chris Whittle <chris.whittle@woodsvalldata.co.uk>
  25978. affinitylottery.org.uk
  25979. raffleentry.org.uk
  25980. weeklylottery.org.uk
  25981. // WP Engine : https://wpengine.com/
  25982. // Submitted by Michael Smith <michael.smith@wpengine.com>
  25983. // Submitted by Brandon DuRette <brandon.durette@wpengine.com>
  25984. wpenginepowered.com
  25985. js.wpenginepowered.com
  25986. // Wix.com, Inc. : https://www.wix.com
  25987. // Submitted by Shahar Talmi <shahar@wix.com>
  25988. wixsite.com
  25989. editorx.io
  25990. wixstudio.io
  25991. wix.run
  25992. // XenonCloud GbR: https://xenoncloud.net
  25993. // Submitted by Julian Uphoff <publicsuffixlist@xenoncloud.net>
  25994. half.host
  25995. // XnBay Technology : http://www.xnbay.com/
  25996. // Submitted by XnBay Developer <developer.xncloud@gmail.com>
  25997. xnbay.com
  25998. u2.xnbay.com
  25999. u2-local.xnbay.com
  26000. // XS4ALL Internet bv : https://www.xs4all.nl/
  26001. // Submitted by Daniel Mostertman <unixbeheer+publicsuffix@xs4all.net>
  26002. cistron.nl
  26003. demon.nl
  26004. xs4all.space
  26005. // Yandex.Cloud LLC: https://cloud.yandex.com
  26006. // Submitted by Alexander Lodin <security+psl@yandex-team.ru>
  26007. yandexcloud.net
  26008. storage.yandexcloud.net
  26009. website.yandexcloud.net
  26010. // YesCourse Pty Ltd : https://yescourse.com
  26011. // Submitted by Atul Bhouraskar <atul@yescourse.com>
  26012. official.academy
  26013. // Yola : https://www.yola.com/
  26014. // Submitted by Stefano Rivera <stefano@yola.com>
  26015. yolasite.com
  26016. // Yombo : https://yombo.net
  26017. // Submitted by Mitch Schwenk <mitch@yombo.net>
  26018. ybo.faith
  26019. yombo.me
  26020. homelink.one
  26021. ybo.party
  26022. ybo.review
  26023. ybo.science
  26024. ybo.trade
  26025. // Yunohost : https://yunohost.org
  26026. // Submitted by Valentin Grimaud <security@yunohost.org>
  26027. ynh.fr
  26028. nohost.me
  26029. noho.st
  26030. // ZaNiC : http://www.za.net/
  26031. // Submitted by registry <hostmaster@nic.za.net>
  26032. za.net
  26033. za.org
  26034. // Zine EOOD : https://zine.bg/
  26035. // Submitted by Martin Angelov <martin@zine.bg>
  26036. bss.design
  26037. // Zitcom A/S : https://www.zitcom.dk
  26038. // Submitted by Emil Stahl <esp@zitcom.dk>
  26039. basicserver.io
  26040. virtualserver.io
  26041. enterprisecloud.nu
  26042. // ===END PRIVATE DOMAINS===
  26043. `.split("\n").filter(line => !line.startsWith("//") && line.trim().length > 0).sort((lineLeft, lineRight) => lineRight.length - lineLeft.length);
  26044. async function formatFilename(content, doc, options) {
  26045. let filename = (await evalTemplate(options.filenameTemplate, options, content, doc)) || "";
  26046. filename = filename.trim();
  26047. if (options.replaceEmojisInFilename) {
  26048. EMOJIS.forEach(emoji => (filename = replaceAll(filename, emoji, " _" + EMOJI_NAMES[emoji] + "_ ")));
  26049. }
  26050. const replacementCharacter = options.filenameReplacementCharacter;
  26051. filename = getValidFilename(filename, options.filenameReplacedCharacters, replacementCharacter);
  26052. if (!options.backgroundSave) {
  26053. filename = filename.replace(/\//g, replacementCharacter);
  26054. }
  26055. if (!options.keepFilename && ((options.filenameMaxLengthUnit == "bytes" && getContentSize(filename) > options.filenameMaxLength) || filename.length > options.filenameMaxLength)) {
  26056. const extensionMatch = filename.match(/(\.[^.]{3,4})$/);
  26057. const extension = extensionMatch && extensionMatch[0] && extensionMatch[0].length > 1 ? extensionMatch[0] : "";
  26058. filename = options.filenameMaxLengthUnit == "bytes" ? await truncateText(filename, options.filenameMaxLength - extension.length) : filename.substring(0, options.filenameMaxLength - extension.length);
  26059. filename = filename + "…" + extension;
  26060. }
  26061. if (!filename) {
  26062. filename = "Unnamed page";
  26063. }
  26064. if (filename.startsWith(".")) {
  26065. filename = "Unnamed page" + filename;
  26066. }
  26067. return filename.trim();
  26068. }
  26069. async function evalTemplate(template = "", options, content, doc, dontReplaceSlash) {
  26070. const url = new URL$2(options.saveUrl);
  26071. const urlHref = decode(url.href);
  26072. const params = Array.from(new URLSearchParams$1(url.search));
  26073. const bookmarkFolder = (options.bookmarkFolders && options.bookmarkFolders.join("/")) || "";
  26074. const dontReplaceSlashIfUndefined = dontReplaceSlash === undefined ? true : dontReplaceSlash;
  26075. const urlSuffix = PUBLIC_SUFFIX_LIST.find(urlTopLevelDomainName => url.hostname.endsWith("." + urlTopLevelDomainName) && urlTopLevelDomainName);
  26076. const urlDomainName = urlSuffix ? url.hostname.substring(0, url.hostname.length - urlSuffix.length - 1) : url.hostname;
  26077. const indexLastDotCharacter = urlDomainName.lastIndexOf(".");
  26078. let urlSubDomains = urlDomainName.substring(0, indexLastDotCharacter == -1 ? 0 : indexLastDotCharacter);
  26079. const urlDomain = urlDomainName.substring(urlSubDomains.length ? urlSubDomains.length + 1 : 0);
  26080. const urlRoot = urlDomain + "." + urlSuffix;
  26081. if (urlSubDomains.startsWith("www.")) {
  26082. urlSubDomains = urlSubDomains.substring(4);
  26083. } else if (urlSubDomains == "www") {
  26084. urlSubDomains = "";
  26085. }
  26086. const variables = {
  26087. "page-title": { getter: () => options.title },
  26088. "page-heading": { getter: () => options.info.heading },
  26089. "page-language": { getter: () => options.info.lang },
  26090. "page-description": { getter: () => options.info.description },
  26091. "page-author": { getter: () => options.info.author },
  26092. "page-creator": { getter: () => options.info.creator },
  26093. "page-publisher": { getter: () => options.info.publisher },
  26094. "url-hash": { getter: () => url.hash.substring(1) },
  26095. "url-host": { getter: () => url.host.replace(/\/$/, "") },
  26096. "url-hostname": { getter: () => url.hostname.replace(/\/$/, "") },
  26097. "url-hostname-suffix": { getter: () => urlSuffix },
  26098. "url-hostname-domain": { getter: () => urlDomain },
  26099. "url-hostname-root": { getter: () => urlRoot },
  26100. "url-hostname-subdomains": { getter: () => urlSubDomains },
  26101. "url-href": { getter: () => urlHref, dontReplaceSlash: dontReplaceSlashIfUndefined },
  26102. "url-href-digest-sha-1": { getter: urlHref ? async () => digest("SHA-1", urlHref) : "" },
  26103. "url-href-flat": { getter: () => decode(url.href), dontReplaceSlash: false },
  26104. "url-referrer": { getter: () => decode(options.referrer), dontReplaceSlash: dontReplaceSlashIfUndefined },
  26105. "url-referrer-flat": { getter: () => decode(options.referrer), dontReplaceSlash: false },
  26106. "url-password": { getter: () => url.password },
  26107. "url-pathname": { getter: () => decode(url.pathname).replace(/^\//, "").replace(/\/$/, ""), dontReplaceSlash: dontReplaceSlashIfUndefined },
  26108. "url-pathname-flat": { getter: () => decode(url.pathname), dontReplaceSlash: false },
  26109. "url-port": { getter: () => url.port },
  26110. "url-protocol": { getter: () => url.protocol },
  26111. "url-search": { getter: () => url.search.substring(1) },
  26112. "url-username": { getter: () => url.username },
  26113. "tab-id": { getter: () => String(options.tabId) },
  26114. "tab-index": { getter: () => String(options.tabIndex) },
  26115. "url-last-segment": { getter: () => decode(getLastSegment(url, options.filenameReplacementCharacter)) },
  26116. "bookmark-pathname": { getter: () => bookmarkFolder, dontReplaceSlash: dontReplaceSlashIfUndefined },
  26117. "bookmark-pathname-flat": { getter: () => bookmarkFolder, dontReplaceSlash: false },
  26118. "profile-name": { getter: () => options.profileName },
  26119. "filename-extension": { getter: () => getFilenameExtension(options) },
  26120. "save-action": { getter: () => options.selected ? "selection" : "page" }
  26121. };
  26122. if (content) {
  26123. variables["digest-sha-256"] = { getter: async () => digest("SHA-256", content) };
  26124. variables["digest-sha-384"] = { getter: async () => digest("SHA-384", content) };
  26125. variables["digest-sha-512"] = { getter: async () => digest("SHA-512", content) };
  26126. }
  26127. if (options.saveDate) {
  26128. addDateVariables(options.saveDate);
  26129. }
  26130. if (options.visitDate) {
  26131. addDateVariables(options.visitDate, "visit-");
  26132. }
  26133. const functions = {
  26134. "if-empty": (...values) => {
  26135. const defaultValue = values.pop();
  26136. const foundValue = values.find(value => value);
  26137. return foundValue ? foundValue : defaultValue;
  26138. },
  26139. "if-not-empty": (...values) => {
  26140. const defaultValue = values.pop();
  26141. const foundValue = values.find(value => value);
  26142. return foundValue ? defaultValue : foundValue;
  26143. },
  26144. "if-equals": (value, otherValue, trueValue, falseValue) => value == otherValue ? trueValue : falseValue,
  26145. "if-not-equals": (value, otherValue, trueValue, falseValue) => value != otherValue ? trueValue : falseValue,
  26146. "if-contains": (value, otherValue, trueValue, falseValue) => otherValue && value.includes(otherValue) ? trueValue : falseValue,
  26147. "if-not-contains": (value, otherValue, trueValue, falseValue) => otherValue && !value.includes(otherValue) ? trueValue : falseValue,
  26148. "substring": (value, start, end) => value.substring(start, end),
  26149. "lowercase": value => value.toLowerCase(),
  26150. "uppercase": value => value.toUpperCase(),
  26151. "capitalize": value => value.charAt(0).toUpperCase() + value.slice(1),
  26152. "replace": (value, searchValue, replaceValue) => searchValue && replaceValue ? replaceAll(value, searchValue, replaceValue) : value,
  26153. "trim": value => value.trim(),
  26154. "trim-left": value => value.trimLeft(),
  26155. "trim-right": value => value.trimRight(),
  26156. "pad-left": (value, length, padString) => length > 0 ? value.padStart(length, padString) : value,
  26157. "pad-right": (value, length, padString) => length > 0 ? value.padEnd(length, padString) : value,
  26158. "repeat": (value, count) => count > 0 ? value.repeat(count) : "",
  26159. "index-of": (value, searchValue, fromIndex) => value.indexOf(searchValue, fromIndex),
  26160. "last-index-of": (value, searchValue, fromIndex) => value.lastIndexOf(searchValue, fromIndex),
  26161. "length": value => value.length,
  26162. "url-search-name": (index = 0) => params[index] && params[index][0],
  26163. "url-search-value": (index = 0) => params[index] && params[index][1],
  26164. "url-search-named-value": name => {
  26165. const param = params.find(param => param[0] == name);
  26166. return (param && param[1]);
  26167. },
  26168. "url-search": name => {
  26169. const param = params.find(param => param[0] == name);
  26170. return (param && param[1]);
  26171. },
  26172. "url-segment": (index = 0) => {
  26173. const segments = decode(url.pathname).split("/");
  26174. segments.pop();
  26175. segments.push(getLastSegment(url, options.filenameReplacementCharacter));
  26176. return segments[index];
  26177. },
  26178. "url-hostname-subdomain": (index = 0) => {
  26179. const subdomains = urlSubDomains.split(".");
  26180. return subdomains[subdomains.length - index - 1];
  26181. },
  26182. "stringify": value => { try { return JSON.stringify(value); } catch (error) { return value; } },
  26183. "encode-uri": value => { try { return encodeURI(value); } catch (error) { return value; } },
  26184. "decode-uri": value => { try { return decodeURI(value); } catch (error) { return value; } },
  26185. "encode-uri-component": value => { try { return encodeURIComponent(value); } catch (error) { return value; } },
  26186. "decode-uri-component": value => { try { return decodeURIComponent(value); } catch (error) { return value; } }
  26187. };
  26188. if (doc) {
  26189. functions["page-element-text"] = (selector) => {
  26190. const element = doc.querySelector(selector);
  26191. return element && element.textContent;
  26192. };
  26193. functions["page-element-attribute"] = (selector, attribute) => {
  26194. const element = doc.querySelector(selector);
  26195. return element && element.getAttribute(attribute);
  26196. };
  26197. }
  26198. template = replaceAll(template, "\\%", "\\\\%");
  26199. template = replaceAll(template, "\\{", "\\\\{");
  26200. template = replaceAll(template, "\\|", "\\\\|");
  26201. template = replaceAll(template, "\\>", "\\\\>");
  26202. let result = (await peg$parse(template, {
  26203. async callFunction(name, [argument, optionalArguments], lengthData) {
  26204. const fn = functions[name];
  26205. if (fn) {
  26206. argument = argument.replace(/\\\\(.)/g, "$1");
  26207. if (!optionalArguments) {
  26208. optionalArguments = [];
  26209. }
  26210. optionalArguments = optionalArguments
  26211. .map(argument => argument.replace(/\\\\(.)/g, "$1"))
  26212. .filter(argument => argument != undefined && argument != null && argument != "");
  26213. if ((argument != undefined && argument != null && argument != "") || optionalArguments.length > 0) {
  26214. try {
  26215. return await getValue(() => fn(argument, ...optionalArguments), true, options.filenameReplacementCharacter, lengthData);
  26216. } catch (error) {
  26217. return "";
  26218. }
  26219. } else {
  26220. return "";
  26221. }
  26222. } else {
  26223. return "";
  26224. }
  26225. },
  26226. getVariableValue(name, lengthData) {
  26227. const variable = variables[name];
  26228. if (variable) {
  26229. return getValue(variable.getter, variable.dontReplaceSlash, options.filenameReplacementCharacter, lengthData);
  26230. } else {
  26231. return "";
  26232. }
  26233. }
  26234. }));
  26235. result = replaceAll(result, "\\\\%", "%");
  26236. result = replaceAll(result, "\\\\{", "{");
  26237. result = replaceAll(result, "\\\\|", "|");
  26238. result = replaceAll(result, "\\\\>", ">");
  26239. return result;
  26240. function addDateVariables(date, prefix = "") {
  26241. variables[prefix + "datetime-iso"] = { getter: () => date.toISOString() };
  26242. variables[prefix + "date-iso"] = { getter: () => date.toISOString().split("T")[0] };
  26243. variables[prefix + "time-iso"] = { getter: () => date.toISOString().split("T")[1].split("Z")[0] };
  26244. variables[prefix + "date-locale"] = { getter: () => date.toLocaleDateString() };
  26245. variables[prefix + "time-locale"] = { getter: () => date.toLocaleTimeString() };
  26246. variables[prefix + "day-locale"] = { getter: () => String(date.getDate()).padStart(2, "0") };
  26247. variables[prefix + "month-locale"] = { getter: () => String(date.getMonth() + 1).padStart(2, "0") };
  26248. variables[prefix + "year-locale"] = { getter: () => String(date.getFullYear()) };
  26249. variables[prefix + "datetime-locale"] = { getter: () => date.toLocaleString() };
  26250. variables[prefix + "datetime-utc"] = { getter: () => date.toUTCString() };
  26251. variables[prefix + "day-utc"] = { getter: () => String(date.getUTCDate()).padStart(2, "0") };
  26252. variables[prefix + "month-utc"] = { getter: () => String(date.getUTCMonth() + 1).padStart(2, "0") };
  26253. variables[prefix + "year-utc"] = { getter: () => String(date.getUTCFullYear()) };
  26254. variables[prefix + "hours-locale"] = { getter: () => String(date.getHours()).padStart(2, "0") };
  26255. variables[prefix + "minutes-locale"] = { getter: () => String(date.getMinutes()).padStart(2, "0") };
  26256. variables[prefix + "seconds-locale"] = { getter: () => String(date.getSeconds()).padStart(2, "0") };
  26257. variables[prefix + "hours-utc"] = { getter: () => String(date.getUTCHours()).padStart(2, "0") };
  26258. variables[prefix + "minutes-utc"] = { getter: () => String(date.getUTCMinutes()).padStart(2, "0") };
  26259. variables[prefix + "seconds-utc"] = { getter: () => String(date.getUTCSeconds()).padStart(2, "0") };
  26260. variables[prefix + "time-ms"] = { getter: () => String(date.getTime()) };
  26261. }
  26262. }
  26263. function replaceAll(string, search, replacement) {
  26264. if (typeof string.replaceAll == "function") {
  26265. return string.replaceAll(search, replacement);
  26266. } else {
  26267. const searchRegExp = new RegExp(search.replace(REGEXP_ESCAPE, "\\$1"), "g");
  26268. return string.replace(searchRegExp, replacement);
  26269. }
  26270. }
  26271. async function getValue(valueGetter, dontReplaceSlash, replacementCharacter, lengthData) {
  26272. const { maxLength, maxCharLength } = extractMaxLength(lengthData);
  26273. let value = (await valueGetter()) || "";
  26274. if (!dontReplaceSlash) {
  26275. value = value.replace(/\/+/g, replacementCharacter);
  26276. }
  26277. if (maxLength) {
  26278. value = await truncateText(value, maxLength);
  26279. } else if (maxCharLength) {
  26280. value = value.substring(0, maxCharLength);
  26281. }
  26282. return value;
  26283. }
  26284. function extractMaxLength(lengthData) {
  26285. if (lengthData) {
  26286. const { unit, length } = lengthData;
  26287. let maxLength, maxCharLength;
  26288. if (unit == "char") {
  26289. maxCharLength = length;
  26290. } else {
  26291. maxLength = length;
  26292. }
  26293. return { maxLength, maxCharLength };
  26294. } else {
  26295. return {};
  26296. }
  26297. }
  26298. function decode(value) {
  26299. try {
  26300. return decodeURI(value);
  26301. } catch (error) {
  26302. return value;
  26303. }
  26304. }
  26305. function getLastSegment(url, replacementCharacter) {
  26306. let lastSegmentMatch = url.pathname.match(/\/([^/]+)$/),
  26307. lastSegment = lastSegmentMatch && lastSegmentMatch[0];
  26308. if (!lastSegment) {
  26309. lastSegmentMatch = url.href.match(/([^/]+)\/?$/);
  26310. lastSegment = lastSegmentMatch && lastSegmentMatch[0];
  26311. }
  26312. if (!lastSegment) {
  26313. lastSegmentMatch = lastSegment.match(/(.*)\.[^.]+$/);
  26314. lastSegment = lastSegmentMatch && lastSegmentMatch[0];
  26315. }
  26316. if (!lastSegment) {
  26317. lastSegment = url.hostname.replace(/\/+/g, replacementCharacter).replace(/\/$/, "");
  26318. }
  26319. lastSegmentMatch = lastSegment.match(/(.*)\.[^.]+$/);
  26320. if (lastSegmentMatch && lastSegmentMatch[1]) {
  26321. lastSegment = lastSegmentMatch[1];
  26322. }
  26323. lastSegment = lastSegment.replace(/\/$/, "").replace(/^\//, "");
  26324. return lastSegment;
  26325. }
  26326. function getValidFilename(filename, replacedCharacters = DEFAULT_REPLACED_CHARACTERS$1, replacementCharacter = DEFAULT_REPLACEMENT_CHARACTER$1) {
  26327. replacedCharacters.forEach(replacedCharacter => (filename = filename.replace(new RegExp("[" + replacedCharacter + "]+", "g"), replacementCharacter)));
  26328. filename = filename
  26329. .replace(/\.\.\//g, "")
  26330. .replace(/^\/+/, "")
  26331. .replace(/\/+/g, "/")
  26332. .replace(/\/$/, "")
  26333. .replace(/\.$/, "")
  26334. .replace(/\.\//g, "." + replacementCharacter)
  26335. .replace(/\/\./g, "/" + replacementCharacter);
  26336. return filename;
  26337. }
  26338. function truncateText(content, maxSize) {
  26339. const blob = new Blob$3([content]);
  26340. const reader = new FileReader$3();
  26341. reader.readAsText(blob.slice(0, maxSize));
  26342. return new Promise((resolve, reject) => {
  26343. reader.addEventListener(
  26344. "load",
  26345. () => {
  26346. if (content.startsWith(reader.result)) {
  26347. resolve(reader.result);
  26348. } else {
  26349. truncateText(content, maxSize - 1)
  26350. .then(resolve)
  26351. .catch(reject);
  26352. }
  26353. },
  26354. false
  26355. );
  26356. reader.addEventListener("error", reject, false);
  26357. });
  26358. }
  26359. function getFilenameExtension(options) {
  26360. if (options.compressContent) {
  26361. if (options.selfExtractingArchive) {
  26362. if (options.extractDataFromPage) {
  26363. return "u.zip.html";
  26364. } else {
  26365. return "zip.html";
  26366. }
  26367. } else {
  26368. return "zip";
  26369. }
  26370. } else {
  26371. return "html";
  26372. }
  26373. }
  26374. var templateFormatter = /*#__PURE__*/Object.freeze({
  26375. __proto__: null,
  26376. formatFilename: formatFilename,
  26377. evalTemplate: evalTemplate
  26378. });
  26379. /*
  26380. * Copyright 2010-2022 Gildas Lormeau
  26381. * contact : gildas.lormeau <at> gmail.com
  26382. *
  26383. * This file is part of SingleFile.
  26384. *
  26385. * The code in this file is free software: you can redistribute it and/or
  26386. * modify it under the terms of the GNU Affero General Public License
  26387. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  26388. * of the License, or (at your option) any later version.
  26389. *
  26390. * The code in this file is distributed in the hope that it will be useful,
  26391. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26392. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  26393. * General Public License for more details.
  26394. *
  26395. * As additional permission under GNU AGPL version 3 section 7, you may
  26396. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  26397. * AGPL normally required by section 4, provided you include this license
  26398. * notice and a URL through which recipients can access the Corresponding
  26399. * Source.
  26400. */
  26401. var index = /*#__PURE__*/Object.freeze({
  26402. __proto__: null,
  26403. fontsMinifier: cssFontsMinifier,
  26404. matchedRules: cssMatchedRules,
  26405. mediasAltMinifier: cssMediasAltMinifier,
  26406. cssRulesMinifier: cssRulesMinifier,
  26407. imagesAltMinifier: htmlImagesAltMinifier,
  26408. htmlMinifier: htmlMinifier,
  26409. serializer: htmlSerializer,
  26410. templateFormatter: templateFormatter
  26411. });
  26412. /*
  26413. * Copyright 2010-2022 Gildas Lormeau
  26414. * contact : gildas.lormeau <at> gmail.com
  26415. *
  26416. * This file is part of SingleFile.
  26417. *
  26418. * The code in this file is free software: you can redistribute it and/or
  26419. * modify it under the terms of the GNU Affero General Public License
  26420. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  26421. * of the License, or (at your option) any later version.
  26422. *
  26423. * The code in this file is distributed in the hope that it will be useful,
  26424. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26425. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  26426. * General Public License for more details.
  26427. *
  26428. * As additional permission under GNU AGPL version 3 section 7, you may
  26429. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  26430. * AGPL normally required by section 4, provided you include this license
  26431. * notice and a URL through which recipients can access the Corresponding
  26432. * Source.
  26433. */
  26434. const DATA_URI_PREFIX$1 = "data:";
  26435. const ABOUT_BLANK_URI$3 = "about:blank";
  26436. const REGEXP_URL_HASH = /(#.+?)$/;
  26437. const BLOB_URI_PREFIX$1 = "blob:";
  26438. const HTTP_URI_PREFIX$1 = /^https?:\/\//;
  26439. const FILE_URI_PREFIX$1 = /^file:\/\//;
  26440. const EMPTY_URL$1 = /^https?:\/\/+\s*$/;
  26441. const NOT_EMPTY_URL$1 = /^(https?:\/\/|file:\/\/|blob:).+/;
  26442. const PREFIX_DATA_URI_IMAGE_SVG$1 = "data:image/svg+xml";
  26443. const UTF8_CHARSET$3 = "utf-8";
  26444. const REGEXP_URL_FUNCTION = /(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g;
  26445. const REGEXP_URL_SIMPLE_QUOTES_FN = /url\s*\(\s*'(.*?)'\s*\)/i;
  26446. const REGEXP_URL_DOUBLE_QUOTES_FN = /url\s*\(\s*"(.*?)"\s*\)/i;
  26447. const REGEXP_URL_NO_QUOTES_FN = /url\s*\(\s*(.*?)\s*\)/i;
  26448. const REGEXP_SIMPLE_QUOTES_STRING = /^'(.*?)'$/;
  26449. const REGEXP_DOUBLE_QUOTES_STRING = /^"(.*?)"$/;
  26450. const REGEXP_URL_FUNCTION_WOFF = /^url\(\s*["']?data:font\/(woff2?)/;
  26451. const REGEXP_URL_FUNCTION_WOFF_ALT = /^url\(\s*["']?data:application\/x-font-(woff)/;
  26452. const REGEXP_FONT_FORMAT = /\.([^.?#]+)((\?|#).*?)?$/;
  26453. const REGEXP_FONT_FORMAT_VALUE = /format\((.*?)\)\s*,?$/;
  26454. const REGEXP_FONT_SRC = /(.*?)\s*,?$/;
  26455. const MEDIA_ALL = "all";
  26456. const FONT_STRETCHES = {
  26457. "ultra-condensed": "50%",
  26458. "extra-condensed": "62.5%",
  26459. "condensed": "75%",
  26460. "semi-condensed": "87.5%",
  26461. "normal": "100%",
  26462. "semi-expanded": "112.5%",
  26463. "expanded": "125%",
  26464. "extra-expanded": "150%",
  26465. "ultra-expanded": "200%"
  26466. };
  26467. const Blob$2 = globalThis.Blob;
  26468. const FileReader$2 = globalThis.FileReader;
  26469. let util$3, cssTree;
  26470. function getProcessorHelperCommonClass(utilInstance, cssTreeInstance) {
  26471. util$3 = utilInstance;
  26472. cssTree = cssTreeInstance;
  26473. return ProcessorHelperCommon;
  26474. }
  26475. class ProcessorHelperCommon {
  26476. async processPageResources(doc, baseURI, options, resources, styles, batchRequest) {
  26477. const processAttributeArgs = [
  26478. ["link[href][rel*=\"icon\"]", "href", true],
  26479. ["object[type=\"image/svg+xml\"], object[type=\"image/svg-xml\"], object[data*=\".svg\"]", "data"],
  26480. ["img[src], input[src][type=image]", "src", false, true],
  26481. ["embed[src*=\".svg\"]", "src"],
  26482. ["video[poster]", "poster"],
  26483. ["*[background]", "background"],
  26484. ["image", "xlink:href"],
  26485. ["image", "href"]
  26486. ];
  26487. if (options.blockImages) {
  26488. doc.querySelectorAll("svg").forEach(element => element.remove());
  26489. }
  26490. let resourcePromises = processAttributeArgs.map(([selector, attributeName, removeElementIfMissing, processDuplicates]) =>
  26491. this.processAttribute(doc.querySelectorAll(selector), attributeName, baseURI, options, "image", resources, removeElementIfMissing, batchRequest, styles, processDuplicates)
  26492. );
  26493. resourcePromises = resourcePromises.concat([
  26494. this.processXLinks(doc.querySelectorAll("use"), doc, baseURI, options, batchRequest),
  26495. this.processSrcset(doc.querySelectorAll("img[srcset], source[srcset]"), baseURI, options, resources, batchRequest)
  26496. ]);
  26497. resourcePromises.push(this.processAttribute(doc.querySelectorAll("object[data*=\".pdf\"]"), "data", baseURI, options, null, resources, false, batchRequest, styles));
  26498. resourcePromises.push(this.processAttribute(doc.querySelectorAll("embed[src*=\".pdf\"]"), "src", baseURI, options, null, resources, false, batchRequest, styles));
  26499. resourcePromises.push(this.processAttribute(doc.querySelectorAll("audio[src], audio > source[src]"), "src", baseURI, options, "audio", resources, false, batchRequest, styles));
  26500. resourcePromises.push(this.processAttribute(doc.querySelectorAll("video[src], video > source[src]"), "src", baseURI, options, "video", resources, false, batchRequest, styles));
  26501. resourcePromises.push(this.processAttribute(doc.querySelectorAll("audio track[src], video track[src]"), "src", baseURI, options, null, resources, false, batchRequest, styles));
  26502. resourcePromises.push(this.processAttribute(doc.querySelectorAll("model[src]"), "src", baseURI, options, null, resources, false, batchRequest, styles));
  26503. await Promise.all(resourcePromises);
  26504. if (options.saveFavicon) {
  26505. this.processShortcutIcons(doc);
  26506. }
  26507. }
  26508. async processXLinks(resourceElements, doc, baseURI, options, batchRequest) {
  26509. let attributeName = "xlink:href";
  26510. await Promise.all(Array.from(resourceElements).map(async resourceElement => {
  26511. let originalResourceURL = resourceElement.getAttribute(attributeName);
  26512. if (originalResourceURL == null) {
  26513. attributeName = "href";
  26514. originalResourceURL = resourceElement.getAttribute(attributeName);
  26515. }
  26516. if (options.saveOriginalURLs && !isDataURL$1(originalResourceURL)) {
  26517. resourceElement.setAttribute("data-sf-original-href", originalResourceURL);
  26518. }
  26519. let resourceURL = normalizeURL$1(originalResourceURL);
  26520. if (!options.blockImages) {
  26521. if (testValidPath$1(resourceURL) && !testIgnoredPath$1(resourceURL)) {
  26522. resourceElement.setAttribute(attributeName, util$3.EMPTY_RESOURCE);
  26523. try {
  26524. resourceURL = util$3.resolveURL(resourceURL, baseURI);
  26525. } catch (error) {
  26526. // ignored
  26527. }
  26528. if (testValidURL$1(resourceURL)) {
  26529. const hashMatch = originalResourceURL.match(REGEXP_URL_HASH);
  26530. if (originalResourceURL.startsWith(baseURI + "#")) {
  26531. resourceElement.setAttribute(attributeName, hashMatch[0]);
  26532. } else {
  26533. const response = await batchRequest.addURL(resourceURL, { expectedType: "image" });
  26534. const svgDoc = util$3.parseSVGContent(response.content);
  26535. if (hashMatch && hashMatch[0]) {
  26536. let symbolElement;
  26537. try {
  26538. symbolElement = svgDoc.querySelector(hashMatch[0]);
  26539. } catch (error) {
  26540. // ignored
  26541. }
  26542. if (symbolElement) {
  26543. resourceElement.setAttribute(attributeName, hashMatch[0]);
  26544. resourceElement.parentElement.insertBefore(symbolElement, resourceElement.parentElement.firstChild);
  26545. }
  26546. } else {
  26547. resourceElement.setAttribute(attributeName, PREFIX_DATA_URI_IMAGE_SVG$1 + "," + response.content);
  26548. }
  26549. }
  26550. }
  26551. } else if (resourceURL == options.url) {
  26552. resourceElement.setAttribute(attributeName, originalResourceURL.substring(resourceURL.length));
  26553. }
  26554. } else {
  26555. resourceElement.setAttribute(attributeName, util$3.EMPTY_RESOURCE);
  26556. }
  26557. }));
  26558. }
  26559. async processStylesheet(cssRules, baseURI, options, resources, batchRequest) {
  26560. const promises = [];
  26561. const removedRules = [];
  26562. const processorHelper = this;
  26563. for (let cssRule = cssRules.head; cssRule; cssRule = cssRule.next) {
  26564. const ruleData = cssRule.data;
  26565. if (ruleData.type == "Atrule" && ruleData.name == "charset") {
  26566. removedRules.push(cssRule);
  26567. } else if (ruleData.block && ruleData.block.children) {
  26568. if (ruleData.type == "Rule") {
  26569. promises.push(processorHelper.processStyle(ruleData, options, resources, batchRequest));
  26570. } else if (ruleData.type == "Atrule" && (ruleData.name == "media" || ruleData.name == "supports")) {
  26571. promises.push(processorHelper.processStylesheet(ruleData.block.children, baseURI, options, resources, batchRequest));
  26572. } else if (ruleData.type == "Atrule" && (ruleData.name == "media" || ruleData.name == "layer")) {
  26573. promises.push(processorHelper.processStylesheet(ruleData.block.children, baseURI, options, resources, batchRequest));
  26574. } else if (ruleData.type == "Atrule" && ruleData.name == "font-face") {
  26575. promises.push(processFontFaceRule(ruleData));
  26576. }
  26577. }
  26578. }
  26579. removedRules.forEach(cssRule => cssRules.remove(cssRule));
  26580. await Promise.all(promises);
  26581. async function processFontFaceRule(ruleData) {
  26582. const urls = getUrlFunctions(ruleData);
  26583. await Promise.all(urls.map(async urlNode => {
  26584. const originalResourceURL = urlNode.value;
  26585. if (!options.blockFonts) {
  26586. const resourceURL = normalizeURL$1(originalResourceURL);
  26587. if (!testIgnoredPath$1(resourceURL) && testValidURL$1(resourceURL)) {
  26588. await processorHelper.processFont(resourceURL, urlNode, originalResourceURL, baseURI, options, resources, batchRequest);
  26589. }
  26590. } else {
  26591. urlNode.value = util$3.EMPTY_RESOURCE;
  26592. }
  26593. }));
  26594. }
  26595. }
  26596. async processSrcset(resourceElements, baseURI, options, resources, batchRequest) {
  26597. await Promise.all(Array.from(resourceElements).map(async resourceElement => {
  26598. const originSrcset = resourceElement.getAttribute("srcset");
  26599. const srcset = util$3.parseSrcset(originSrcset);
  26600. if (options.saveOriginalURLs && !isDataURL$1(originSrcset)) {
  26601. resourceElement.setAttribute("data-sf-original-srcset", originSrcset);
  26602. }
  26603. if (!options.blockImages) {
  26604. const srcsetValues = await Promise.all(srcset.map(async srcsetValue => {
  26605. let resourceURL = normalizeURL$1(srcsetValue.url);
  26606. if (!testIgnoredPath$1(resourceURL)) {
  26607. if (testValidPath$1(resourceURL)) {
  26608. try {
  26609. resourceURL = util$3.resolveURL(resourceURL, baseURI);
  26610. } catch (error) {
  26611. // ignored
  26612. }
  26613. if (testValidURL$1(resourceURL)) {
  26614. return this.processImageSrcset(resourceURL, srcsetValue, resources, batchRequest);
  26615. } else {
  26616. return "";
  26617. }
  26618. } else {
  26619. return "";
  26620. }
  26621. } else {
  26622. return resourceURL + (srcsetValue.w ? " " + srcsetValue.w + "w" : srcsetValue.d ? " " + srcsetValue.d + "x" : "");
  26623. }
  26624. }));
  26625. resourceElement.setAttribute("srcset", srcsetValues.join(", "));
  26626. } else {
  26627. resourceElement.setAttribute("srcset", "");
  26628. }
  26629. }));
  26630. }
  26631. setBackgroundImage(element, url, style) {
  26632. element.style.setProperty("background-blend-mode", "normal", "important");
  26633. element.style.setProperty("background-clip", "content-box", "important");
  26634. element.style.setProperty("background-position", style && style["background-position"] ? style["background-position"] : "center", "important");
  26635. element.style.setProperty("background-color", style && style["background-color"] ? style["background-color"] : "transparent", "important");
  26636. element.style.setProperty("background-image", url, "important");
  26637. element.style.setProperty("background-size", style && style["background-size"] ? style["background-size"] : "100% 100%", "important");
  26638. element.style.setProperty("background-origin", "content-box", "important");
  26639. element.style.setProperty("background-repeat", "no-repeat", "important");
  26640. }
  26641. async getStylesheetContent(resourceURL, options) {
  26642. const content = await util$3.getContent(resourceURL, {
  26643. inline: !options.compressContent,
  26644. maxResourceSize: options.maxResourceSize,
  26645. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  26646. validateTextContentType: true,
  26647. frameId: options.frameId,
  26648. charset: options.charset,
  26649. resourceReferrer: options.resourceReferrer,
  26650. baseURI: options.baseURI,
  26651. blockMixedContent: options.blockMixedContent,
  26652. expectedType: "stylesheet",
  26653. acceptHeaders: options.acceptHeaders,
  26654. networkTimeout: options.networkTimeout
  26655. });
  26656. if (!(matchCharsetEquals(content.data, content.charset) || matchCharsetEquals(content.data, options.charset))) {
  26657. options = Object.assign({}, options, { charset: getCharset(content.data) });
  26658. return util$3.getContent(resourceURL, {
  26659. inline: !options.compressContent,
  26660. maxResourceSize: options.maxResourceSize,
  26661. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  26662. validateTextContentType: true,
  26663. frameId: options.frameId,
  26664. charset: options.charset,
  26665. resourceReferrer: options.resourceReferrer,
  26666. baseURI: options.baseURI,
  26667. blockMixedContent: options.blockMixedContent,
  26668. expectedType: "stylesheet",
  26669. acceptHeaders: options.acceptHeaders,
  26670. networkTimeout: options.networkTimeout
  26671. });
  26672. } else {
  26673. return content;
  26674. }
  26675. }
  26676. processShortcutIcons(doc) {
  26677. let shortcutIcon = findShortcutIcon(Array.from(doc.querySelectorAll("link[href][rel=\"shortcut icon\"]")));
  26678. if (!shortcutIcon) {
  26679. shortcutIcon = findShortcutIcon(Array.from(doc.querySelectorAll("link[href][rel=\"icon\"]")));
  26680. }
  26681. if (!shortcutIcon) {
  26682. shortcutIcon = findShortcutIcon(Array.from(doc.querySelectorAll("link[href][rel*=\"icon\"]")));
  26683. if (shortcutIcon) {
  26684. shortcutIcon.rel = "shortcut icon";
  26685. }
  26686. }
  26687. if (shortcutIcon) {
  26688. doc.querySelectorAll("link[href][rel*=\"icon\"]").forEach(linkElement => {
  26689. if (linkElement != shortcutIcon) {
  26690. linkElement.remove();
  26691. }
  26692. });
  26693. }
  26694. }
  26695. removeSingleLineCssComments(stylesheet) {
  26696. if (stylesheet.children) {
  26697. const removedRules = [];
  26698. for (let cssRule = stylesheet.children.head; cssRule; cssRule = cssRule.next) {
  26699. const ruleData = cssRule.data;
  26700. if (ruleData.type == "Raw" && ruleData.value && ruleData.value.trim().startsWith("//")) {
  26701. removedRules.push(cssRule);
  26702. }
  26703. }
  26704. removedRules.forEach(cssRule => stylesheet.children.remove(cssRule));
  26705. }
  26706. }
  26707. replacePseudoClassDefined(stylesheet) {
  26708. const removedSelectors = [];
  26709. if (stylesheet.children) {
  26710. for (let cssRule = stylesheet.children.head; cssRule; cssRule = cssRule.next) {
  26711. const ruleData = cssRule.data;
  26712. if (ruleData.type == "Rule" && ruleData.prelude && ruleData.prelude.children) {
  26713. for (let selector = ruleData.prelude.children.head; selector; selector = selector.next) {
  26714. replacePseudoDefinedSelector(selector, ruleData.prelude);
  26715. }
  26716. }
  26717. }
  26718. }
  26719. if (removedSelectors.length) {
  26720. removedSelectors.forEach(({ parentSelector, selector }) => {
  26721. if (parentSelector.data.children.size == 0 || !selector.prev || selector.prev.data.type == "Combinator" || selector.prev.data.type == "WhiteSpace") {
  26722. parentSelector.data.children.replace(selector, cssTree.parse("*", { context: "selector" }).children.head);
  26723. } else {
  26724. parentSelector.data.children.remove(selector);
  26725. }
  26726. });
  26727. }
  26728. function replacePseudoDefinedSelector(selector, parentSelector) {
  26729. if (selector.data.children) {
  26730. for (let childSelector = selector.data.children.head; childSelector; childSelector = childSelector.next) {
  26731. replacePseudoDefinedSelector(childSelector, selector);
  26732. }
  26733. }
  26734. if (selector.data.type == "PseudoClassSelector" && selector.data.name == "defined") {
  26735. removedSelectors.push({ parentSelector, selector });
  26736. }
  26737. }
  26738. }
  26739. resolveStylesheetURLs(stylesheet, baseURI, workStylesheet) {
  26740. const urls = getUrlFunctions(stylesheet);
  26741. urls.map(urlNode => {
  26742. const originalResourceURL = urlNode.value;
  26743. let resourceURL = normalizeURL$1(originalResourceURL);
  26744. if (!testIgnoredPath$1(resourceURL)) {
  26745. workStylesheet.textContent = "tmp { content:\"" + resourceURL + "\"}";
  26746. if (workStylesheet.sheet && workStylesheet.sheet.cssRules) {
  26747. resourceURL = util$3.removeQuotes(workStylesheet.sheet.cssRules[0].style.getPropertyValue("content"));
  26748. }
  26749. if (!testIgnoredPath$1(resourceURL)) {
  26750. if (!resourceURL || testValidPath$1(resourceURL)) {
  26751. let resolvedURL;
  26752. if (!originalResourceURL.startsWith("#")) {
  26753. try {
  26754. resolvedURL = util$3.resolveURL(resourceURL, baseURI);
  26755. } catch (error) {
  26756. // ignored
  26757. }
  26758. }
  26759. if (testValidURL$1(resolvedURL)) {
  26760. urlNode.value = resolvedURL;
  26761. }
  26762. } else {
  26763. urlNode.value = util$3.EMPTY_RESOURCE;
  26764. }
  26765. }
  26766. }
  26767. });
  26768. }
  26769. async removeAlternativeFonts(doc, stylesheets, fonts, fontTests) {
  26770. const fontsDetails = {
  26771. fonts: new Map(),
  26772. medias: new Map(),
  26773. supports: new Map(),
  26774. layers: new Map()
  26775. };
  26776. const stats = { rules: { processed: 0, discarded: 0 }, fonts: { processed: 0, discarded: 0 } };
  26777. let sheetIndex = 0;
  26778. stylesheets.forEach(stylesheetInfo => {
  26779. const cssRules = stylesheetInfo.stylesheet.children;
  26780. if (cssRules) {
  26781. stats.rules.processed += cssRules.size;
  26782. stats.rules.discarded += cssRules.size;
  26783. if (stylesheetInfo.mediaText && stylesheetInfo.mediaText != MEDIA_ALL) {
  26784. const mediaFontsDetails = this.createFontsDetailsInfo();
  26785. fontsDetails.medias.set("media-" + sheetIndex + "-" + stylesheetInfo.mediaText, mediaFontsDetails);
  26786. this.getFontsDetails(doc, cssRules, sheetIndex, mediaFontsDetails);
  26787. } else {
  26788. this.getFontsDetails(doc, cssRules, sheetIndex, fontsDetails);
  26789. }
  26790. }
  26791. sheetIndex++;
  26792. });
  26793. processFontDetails(fontsDetails);
  26794. await Promise.all([...stylesheets].map(async ([, stylesheetInfo], sheetIndex) => {
  26795. const cssRules = stylesheetInfo.stylesheet.children;
  26796. const media = stylesheetInfo.mediaText;
  26797. if (cssRules) {
  26798. if (media && media != MEDIA_ALL) {
  26799. await this.processFontFaceRules(cssRules, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + media), fonts, fontTests, stats);
  26800. } else {
  26801. await this.processFontFaceRules(cssRules, sheetIndex, fontsDetails, fonts, fontTests, stats);
  26802. }
  26803. stats.rules.discarded -= cssRules.size;
  26804. }
  26805. }));
  26806. return stats;
  26807. }
  26808. async processFontFaceRules(cssRules, sheetIndex, fontsDetails, fonts, fontTests, stats) {
  26809. const removedRules = [];
  26810. let mediaIndex = 0, supportsIndex = 0, layerIndex = 0;
  26811. for (let cssRule = cssRules.head; cssRule; cssRule = cssRule.next) {
  26812. const ruleData = cssRule.data;
  26813. if (ruleData.type == "Atrule" && ruleData.name == "media" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26814. const mediaText = cssTree.generate(ruleData.prelude);
  26815. await this.processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + mediaIndex + "-" + mediaText), fonts, fontTests, stats);
  26816. mediaIndex++;
  26817. } else if (ruleData.type == "Atrule" && ruleData.name == "supports" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26818. const supportsText = cssTree.generate(ruleData.prelude);
  26819. await this.processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.supports.get("supports-" + sheetIndex + "-" + supportsIndex + "-" + supportsText), fonts, fontTests, stats);
  26820. supportsIndex++;
  26821. } else if (ruleData.type == "Atrule" && ruleData.name == "layer" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26822. const layerText = cssTree.generate(ruleData.prelude);
  26823. await this.processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.layers.get("layer-" + sheetIndex + "-" + layerIndex + "-" + layerText), fonts, fontTests, stats);
  26824. layerIndex++;
  26825. } else if (ruleData.type == "Atrule" && ruleData.name == "font-face") {
  26826. const key = this.getFontKey(ruleData);
  26827. const fontInfo = fontsDetails.fonts.get(key);
  26828. if (fontInfo) {
  26829. await this.processFontFaceRule(ruleData, fontInfo, fonts, fontTests, stats);
  26830. } else {
  26831. removedRules.push(cssRule);
  26832. }
  26833. }
  26834. }
  26835. removedRules.forEach(cssRule => cssRules.remove(cssRule));
  26836. }
  26837. getFontsDetails(doc, cssRules, sheetIndex, mediaFontsDetails) {
  26838. let mediaIndex = 0, supportsIndex = 0, layerIndex = 0;
  26839. cssRules.forEach(ruleData => {
  26840. if (ruleData.type == "Atrule" && ruleData.name == "media" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26841. const mediaText = cssTree.generate(ruleData.prelude);
  26842. const fontsDetails = this.createFontsDetailsInfo();
  26843. mediaFontsDetails.medias.set("media-" + sheetIndex + "-" + mediaIndex + "-" + mediaText, fontsDetails);
  26844. mediaIndex++;
  26845. this.getFontsDetails(doc, ruleData.block.children, sheetIndex, fontsDetails);
  26846. } else if (ruleData.type == "Atrule" && ruleData.name == "supports" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26847. const supportsText = cssTree.generate(ruleData.prelude);
  26848. const fontsDetails = this.createFontsDetailsInfo();
  26849. mediaFontsDetails.supports.set("supports-" + sheetIndex + "-" + supportsIndex + "-" + supportsText, fontsDetails);
  26850. supportsIndex++;
  26851. this.getFontsDetails(doc, ruleData.block.children, sheetIndex, fontsDetails);
  26852. } else if (ruleData.type == "Atrule" && ruleData.name == "layer" && ruleData.block && ruleData.block.children && ruleData.prelude) {
  26853. const layerText = cssTree.generate(ruleData.prelude);
  26854. const fontsDetails = this.createFontsDetailsInfo();
  26855. mediaFontsDetails.layers.set("layer-" + sheetIndex + "-" + layerIndex + "-" + layerText, fontsDetails);
  26856. layerIndex++;
  26857. this.getFontsDetails(doc, ruleData.block.children, sheetIndex, fontsDetails);
  26858. } else if (ruleData.type == "Atrule" && ruleData.name == "font-face" && ruleData.block && ruleData.block.children) {
  26859. const fontKey = this.getFontKey(ruleData);
  26860. let fontInfo = mediaFontsDetails.fonts.get(fontKey);
  26861. if (!fontInfo) {
  26862. fontInfo = [];
  26863. mediaFontsDetails.fonts.set(fontKey, fontInfo);
  26864. }
  26865. const src = this.getPropertyValue(ruleData, "src");
  26866. if (src) {
  26867. const fontSources = src.match(REGEXP_URL_FUNCTION);
  26868. if (fontSources) {
  26869. fontSources.forEach(source => {
  26870. if (fontInfo.includes(source)) {
  26871. fontInfo.splice(fontInfo.indexOf(source), 1);
  26872. }
  26873. fontInfo.unshift(source);
  26874. });
  26875. }
  26876. }
  26877. }
  26878. });
  26879. }
  26880. createFontsDetailsInfo() {
  26881. return {
  26882. fonts: new Map(),
  26883. medias: new Map(),
  26884. supports: new Map(),
  26885. layers: new Map()
  26886. };
  26887. }
  26888. getFontKey(ruleData) {
  26889. return JSON.stringify([
  26890. normalizeFontFamily(this.getPropertyValue(ruleData, "font-family")),
  26891. getFontWeight(this.getPropertyValue(ruleData, "font-weight") || "400"),
  26892. this.getPropertyValue(ruleData, "font-style") || "normal",
  26893. this.getPropertyValue(ruleData, "unicode-range"),
  26894. getFontStretch(this.getPropertyValue(ruleData, "font-stretch")),
  26895. this.getPropertyValue(ruleData, "font-variant") || "normal",
  26896. this.getPropertyValue(ruleData, "font-feature-settings"),
  26897. this.getPropertyValue(ruleData, "font-variation-settings")
  26898. ]);
  26899. }
  26900. getPropertyValue(ruleData, propertyName) {
  26901. let property;
  26902. if (ruleData.block.children) {
  26903. property = ruleData.block.children.filter(node => {
  26904. try {
  26905. return node.property == propertyName && !cssTree.generate(node.value).match(/\\9$/);
  26906. } catch (error) {
  26907. return node.property == propertyName;
  26908. }
  26909. }).tail;
  26910. }
  26911. if (property) {
  26912. try {
  26913. return cssTree.generate(property.data.value);
  26914. } catch (error) {
  26915. // ignored
  26916. }
  26917. }
  26918. }
  26919. }
  26920. function processFontDetails(fontsDetails, fontResources) {
  26921. fontsDetails.fonts.forEach((fontInfo, fontKey) => {
  26922. fontsDetails.fonts.set(fontKey, fontInfo.map(fontSource => {
  26923. const fontFormatMatch = fontSource.match(REGEXP_FONT_FORMAT_VALUE);
  26924. let fontFormat;
  26925. const fontUrl = getURL(fontSource);
  26926. if (fontFormatMatch && fontFormatMatch[1]) {
  26927. fontFormat = fontFormatMatch[1].replace(REGEXP_SIMPLE_QUOTES_STRING, "$1").replace(REGEXP_DOUBLE_QUOTES_STRING, "$1").toLowerCase();
  26928. }
  26929. if (!fontFormat) {
  26930. const fontFormatMatch = fontSource.match(REGEXP_URL_FUNCTION_WOFF);
  26931. if (fontFormatMatch && fontFormatMatch[1]) {
  26932. fontFormat = fontFormatMatch[1];
  26933. } else {
  26934. const fontFormatMatch = fontSource.match(REGEXP_URL_FUNCTION_WOFF_ALT);
  26935. if (fontFormatMatch && fontFormatMatch[1]) {
  26936. fontFormat = fontFormatMatch[1];
  26937. }
  26938. }
  26939. }
  26940. if (!fontFormat && fontUrl) {
  26941. const fontFormatMatch = fontUrl.match(REGEXP_FONT_FORMAT);
  26942. if (fontFormatMatch && fontFormatMatch[1]) {
  26943. fontFormat = fontFormatMatch[1];
  26944. }
  26945. }
  26946. if (fontResources) {
  26947. const fontResource = Array.from(fontResources.values()).find(info => info.name == fontUrl);
  26948. return { src: fontSource.match(REGEXP_FONT_SRC)[1], fontUrl, format: fontFormat, contentType: fontResource && fontResource.contentType };
  26949. } else {
  26950. return { src: fontSource.match(REGEXP_FONT_SRC)[1], fontUrl, format: fontFormat };
  26951. }
  26952. }));
  26953. });
  26954. if (fontResources) {
  26955. fontsDetails.medias.forEach(mediaFontsDetails => processFontDetails(mediaFontsDetails, fontResources));
  26956. fontsDetails.supports.forEach(supportsFontsDetails => processFontDetails(supportsFontsDetails, fontResources));
  26957. fontsDetails.layers.forEach(layerFontsDetails => processFontDetails(layerFontsDetails, fontResources));
  26958. } else {
  26959. fontsDetails.medias.forEach(mediaFontsDetails => processFontDetails(mediaFontsDetails));
  26960. fontsDetails.supports.forEach(supportsFontsDetails => processFontDetails(supportsFontsDetails));
  26961. fontsDetails.layers.forEach(layerFontsDetails => processFontDetails(layerFontsDetails));
  26962. }
  26963. }
  26964. function getUpdatedResourceContent(resourceURL, options) {
  26965. if (options.rootDocument && options.updatedResources[resourceURL]) {
  26966. options.updatedResources[resourceURL].retrieved = true;
  26967. return options.updatedResources[resourceURL].content;
  26968. }
  26969. }
  26970. function normalizeURL$1(url) {
  26971. if (!url || url.startsWith(DATA_URI_PREFIX$1)) {
  26972. return url;
  26973. } else {
  26974. return url.split("#")[0];
  26975. }
  26976. }
  26977. function matchCharsetEquals(stylesheetContent = "", charset = UTF8_CHARSET$3) {
  26978. const stylesheetCharset = getCharset(stylesheetContent);
  26979. if (stylesheetCharset) {
  26980. return stylesheetCharset == charset.toLowerCase();
  26981. } else {
  26982. return true;
  26983. }
  26984. }
  26985. function getCharset(stylesheetContent = "") {
  26986. const match = stylesheetContent.match(/^@charset\s+"([^"]*)";/i);
  26987. if (match && match[1]) {
  26988. return match[1].toLowerCase().trim();
  26989. }
  26990. }
  26991. function getUrlFunctions(declarationList) {
  26992. return cssTree.findAll(declarationList, node => node.type == "Url");
  26993. }
  26994. function getImportFunctions(declarationList) {
  26995. return cssTree.findAll(declarationList, node => node.type == "Atrule" && node.name == "import");
  26996. }
  26997. function findShortcutIcon(shortcutIcons) {
  26998. shortcutIcons = shortcutIcons.filter(linkElement => linkElement.href != util$3.EMPTY_RESOURCE);
  26999. shortcutIcons.sort((linkElement1, linkElement2) => (parseInt(linkElement2.sizes, 10) || 16) - (parseInt(linkElement1.sizes, 10) || 16));
  27000. return shortcutIcons[0];
  27001. }
  27002. function isDataURL$1(url) {
  27003. return url && (url.startsWith(DATA_URI_PREFIX$1) || url.startsWith(BLOB_URI_PREFIX$1));
  27004. }
  27005. function replaceOriginalURLs(stylesheetContent) {
  27006. return stylesheetContent.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g, "/* original URL: $1 */url(");
  27007. }
  27008. function testIgnoredPath$1(resourceURL) {
  27009. return resourceURL && (resourceURL.startsWith(DATA_URI_PREFIX$1) || resourceURL == ABOUT_BLANK_URI$3);
  27010. }
  27011. function testValidPath$1(resourceURL) {
  27012. return resourceURL && !resourceURL.match(EMPTY_URL$1);
  27013. }
  27014. function testValidURL$1(resourceURL) {
  27015. return testValidPath$1(resourceURL) && (resourceURL.match(HTTP_URI_PREFIX$1) || resourceURL.match(FILE_URI_PREFIX$1) || resourceURL.startsWith(BLOB_URI_PREFIX$1)) && resourceURL.match(NOT_EMPTY_URL$1);
  27016. }
  27017. function getURL(urlFunction) {
  27018. urlFunction = urlFunction.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g, "");
  27019. const urlMatch = urlFunction.match(REGEXP_URL_SIMPLE_QUOTES_FN) ||
  27020. urlFunction.match(REGEXP_URL_DOUBLE_QUOTES_FN) ||
  27021. urlFunction.match(REGEXP_URL_NO_QUOTES_FN);
  27022. return urlMatch && urlMatch[1];
  27023. }
  27024. function getFontStretch(stretch) {
  27025. return FONT_STRETCHES[stretch] || stretch;
  27026. }
  27027. function toDataURI(content, contentType, charset) {
  27028. return new Promise((resolve, reject) => {
  27029. const reader = new FileReader$2();
  27030. reader.onload = () => resolve(reader.result);
  27031. reader.onerror = () => reject(new Error(reader.error));
  27032. reader.readAsDataURL(new Blob$2([content], { type: (contentType || "") + (charset ? ";charset=" + charset : "") }));
  27033. });
  27034. }
  27035. /*
  27036. * Copyright 2010-2022 Gildas Lormeau
  27037. * contact : gildas.lormeau <at> gmail.com
  27038. *
  27039. * This file is part of SingleFile.
  27040. *
  27041. * The code in this file is free software: you can redistribute it and/or
  27042. * modify it under the terms of the GNU Affero General Public License
  27043. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  27044. * of the License, or (at your option) any later version.
  27045. *
  27046. * The code in this file is distributed in the hope that it will be useful,
  27047. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  27048. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  27049. * General Public License for more details.
  27050. *
  27051. * As additional permission under GNU AGPL version 3 section 7, you may
  27052. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  27053. * AGPL normally required by section 4, provided you include this license
  27054. * notice and a URL through which recipients can access the Corresponding
  27055. * Source.
  27056. */
  27057. const JSON$3 = globalThis.JSON;
  27058. const FontFace$1 = globalThis.FontFace;
  27059. const Set$2 = globalThis.Set;
  27060. const setTimeout$1 = globalThis.setTimeout;
  27061. const clearTimeout$1 = globalThis.clearTimeout;
  27062. const Image = globalThis.Image;
  27063. const ABOUT_BLANK_URI$2 = "about:blank";
  27064. const UTF8_CHARSET$2 = "utf-8";
  27065. const PREFIX_DATA_URI_IMAGE_SVG = "data:image/svg+xml";
  27066. const PREFIXES_FORBIDDEN_DATA_URI = ["data:text/"];
  27067. const SCRIPT_TAG_FOUND = /<script/gi;
  27068. const NOSCRIPT_TAG_FOUND = /<noscript/gi;
  27069. const CANVAS_TAG_FOUND = /<canvas/gi;
  27070. const SINGLE_FILE_VARIABLE_NAME_PREFIX$1 = "--sf-img-";
  27071. const SINGLE_FILE_VARIABLE_MAX_SIZE = 512 * 1024;
  27072. const EMPTY_URL_SOURCE$1 = /^url\(["']?data:[^,]*,?["']?\)/;
  27073. const LOCAL_SOURCE$1 = "local(";
  27074. const FONT_MAX_LOAD_DELAY$1 = 5000;
  27075. let util$2;
  27076. function getProcessorHelperClass$2(utilInstance) {
  27077. util$2 = utilInstance;
  27078. const ProcessorHelperCommon = getProcessorHelperCommonClass(util$2, cssTree$1);
  27079. return class ProcessorHelper extends ProcessorHelperCommon {
  27080. async processLinkElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement) {
  27081. if (element.tagName.toUpperCase() == "LINK" && element.charset) {
  27082. options.charset = element.charset;
  27083. }
  27084. await this.processStylesheetElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement);
  27085. }
  27086. async processStylesheetElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement) {
  27087. let stylesheet;
  27088. stylesheets.set(element, stylesheetInfo);
  27089. if (!options.blockStylesheets) {
  27090. if (element.tagName.toUpperCase() == "LINK") {
  27091. stylesheet = await this.resolveLinkStylesheetURLs(element.href, baseURI, options, workStyleElement);
  27092. } else {
  27093. stylesheet = db(element.textContent, { context: "stylesheet", parseCustomProperty: true });
  27094. const importFound = await this.resolveImportURLs(stylesheet, baseURI, options, workStyleElement);
  27095. if (importFound) {
  27096. stylesheet = db(gb(stylesheet), { context: "stylesheet", parseCustomProperty: true });
  27097. }
  27098. }
  27099. }
  27100. if (stylesheet && stylesheet.children) {
  27101. if (options.compressCSS) {
  27102. this.removeSingleLineCssComments(stylesheet);
  27103. }
  27104. this.replacePseudoClassDefined(stylesheet);
  27105. stylesheetInfo.stylesheet = stylesheet;
  27106. } else {
  27107. stylesheets.delete(element);
  27108. }
  27109. }
  27110. replaceStylesheets(doc, stylesheets, options) {
  27111. doc.querySelectorAll("style").forEach(styleElement => {
  27112. const stylesheetInfo = stylesheets.get(styleElement);
  27113. if (stylesheetInfo) {
  27114. stylesheets.delete(styleElement);
  27115. styleElement.textContent = this.generateStylesheetContent(stylesheetInfo.stylesheet, options);
  27116. if (stylesheetInfo.mediaText) {
  27117. styleElement.media = stylesheetInfo.mediaText;
  27118. }
  27119. } else {
  27120. styleElement.remove();
  27121. }
  27122. });
  27123. doc.querySelectorAll("link[rel*=stylesheet]").forEach(linkElement => {
  27124. const stylesheetInfo = stylesheets.get(linkElement);
  27125. if (stylesheetInfo) {
  27126. stylesheets.delete(linkElement);
  27127. const styleElement = doc.createElement("style");
  27128. if (stylesheetInfo.mediaText) {
  27129. styleElement.media = stylesheetInfo.mediaText;
  27130. }
  27131. styleElement.textContent = this.generateStylesheetContent(stylesheetInfo.stylesheet, options);
  27132. linkElement.parentElement.replaceChild(styleElement, linkElement);
  27133. } else {
  27134. linkElement.remove();
  27135. }
  27136. });
  27137. }
  27138. async resolveImportURLs(stylesheet, baseURI, options, workStylesheet, importedStyleSheets = new Set$2()) {
  27139. let importFound;
  27140. this.resolveStylesheetURLs(stylesheet, baseURI, workStylesheet);
  27141. const imports = getImportFunctions(stylesheet);
  27142. await Promise.all(imports.map(async node => {
  27143. const urlNode = kb(node, node => node.type == "Url") || kb(node, node => node.type == "String");
  27144. if (urlNode) {
  27145. let resourceURL = normalizeURL$1(urlNode.value);
  27146. if (!testIgnoredPath$1(resourceURL) && testValidPath$1(resourceURL)) {
  27147. urlNode.value = util$2.EMPTY_RESOURCE;
  27148. try {
  27149. resourceURL = util$2.resolveURL(resourceURL, baseURI);
  27150. } catch (error) {
  27151. // ignored
  27152. }
  27153. if (testValidURL$1(resourceURL) && !importedStyleSheets.has(resourceURL)) {
  27154. options.inline = true;
  27155. const content = await this.getStylesheetContent(resourceURL, options);
  27156. resourceURL = content.resourceURL;
  27157. content.data = getUpdatedResourceContent(resourceURL, options) || content.data;
  27158. if (content.data && content.data.match(/^<!doctype /i)) {
  27159. content.data = "";
  27160. }
  27161. const mediaQueryListNode = kb(node, node => node.type == "MediaQueryList");
  27162. if (mediaQueryListNode) {
  27163. content.data = this.wrapMediaQuery(content.data, gb(mediaQueryListNode));
  27164. }
  27165. content.data = content.data.replace(/:defined/gi, "*");
  27166. const importedStylesheet = db(content.data, { context: "stylesheet", parseCustomProperty: true });
  27167. const ancestorStyleSheets = new Set$2(importedStyleSheets);
  27168. ancestorStyleSheets.add(resourceURL);
  27169. await this.resolveImportURLs(importedStylesheet, resourceURL, options, workStylesheet, ancestorStyleSheets);
  27170. for (let keyName of Object.keys(importedStylesheet)) {
  27171. node[keyName] = importedStylesheet[keyName];
  27172. }
  27173. importFound = true;
  27174. }
  27175. }
  27176. }
  27177. }));
  27178. return importFound;
  27179. }
  27180. async resolveLinkStylesheetURLs(resourceURL, baseURI, options, workStylesheet) {
  27181. resourceURL = normalizeURL$1(resourceURL);
  27182. if (resourceURL && resourceURL != baseURI && resourceURL != ABOUT_BLANK_URI$2) {
  27183. const content = await util$2.getContent(resourceURL, {
  27184. inline: true,
  27185. maxResourceSize: options.maxResourceSize,
  27186. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27187. charset: options.charset,
  27188. frameId: options.frameId,
  27189. resourceReferrer: options.resourceReferrer,
  27190. validateTextContentType: true,
  27191. baseURI: baseURI,
  27192. blockMixedContent: options.blockMixedContent,
  27193. expectedType: "stylesheet",
  27194. acceptHeaders: options.acceptHeaders,
  27195. networkTimeout: options.networkTimeout
  27196. });
  27197. if (!(matchCharsetEquals(content.data, content.charset) || matchCharsetEquals(content.data, options.charset))) {
  27198. options = Object.assign({}, options, { charset: getCharset(content.data) });
  27199. return this.resolveLinkStylesheetURLs(resourceURL, baseURI, options, workStylesheet);
  27200. }
  27201. resourceURL = content.resourceURL;
  27202. content.data = getUpdatedResourceContent(content.resourceURL, options) || content.data;
  27203. if (content.data && content.data.match(/^<!doctype /i)) {
  27204. content.data = "";
  27205. }
  27206. content.data = content.data.replace(/:defined/gi, "*");
  27207. let stylesheet = db(content.data, { context: "stylesheet", parseCustomProperty: true });
  27208. const importFound = await this.resolveImportURLs(stylesheet, resourceURL, options, workStylesheet);
  27209. if (importFound) {
  27210. stylesheet = db(gb(stylesheet), { context: "stylesheet", parseCustomProperty: true });
  27211. }
  27212. return stylesheet;
  27213. }
  27214. }
  27215. async processFrame(frameElement, pageData) {
  27216. let sandbox = "allow-popups allow-top-navigation allow-top-navigation-by-user-activation";
  27217. if (pageData.content.match(NOSCRIPT_TAG_FOUND) || pageData.content.match(CANVAS_TAG_FOUND) || pageData.content.match(SCRIPT_TAG_FOUND)) {
  27218. sandbox += " allow-scripts allow-same-origin";
  27219. }
  27220. frameElement.setAttribute("sandbox", sandbox);
  27221. if (frameElement.tagName.toUpperCase() == "OBJECT") {
  27222. frameElement.setAttribute("data", "data:text/html," + pageData.content);
  27223. } else {
  27224. if (frameElement.tagName.toUpperCase() == "FRAME") {
  27225. frameElement.setAttribute("src", "data:text/html," + pageData.content.replace(/%/g, "%25").replace(/#/g, "%23"));
  27226. } else {
  27227. frameElement.setAttribute("srcdoc", pageData.content);
  27228. frameElement.removeAttribute("src");
  27229. }
  27230. }
  27231. }
  27232. async processFont(resourceURL, urlNode, originalResourceURL, baseURI, options, resources, batchRequest) {
  27233. let { content } = await batchRequest.addURL(resourceURL, {
  27234. asBinary: true,
  27235. expectedType: "font",
  27236. baseURI,
  27237. blockMixedContent: options.blockMixedContent
  27238. });
  27239. let resourceURLs = resources.fonts.get(urlNode);
  27240. if (!resourceURLs) {
  27241. resourceURLs = [];
  27242. resources.fonts.set(urlNode, resourceURLs);
  27243. }
  27244. resourceURLs.push(resourceURL);
  27245. if (!isDataURL$1(resourceURL) && options.saveOriginalURLs) {
  27246. urlNode.value = "-sf-url-original(" + JSON$3.stringify(originalResourceURL) + ") " + content;
  27247. } else {
  27248. urlNode.value = content;
  27249. }
  27250. }
  27251. async processStyle(ruleData, options, resources, batchRequest) {
  27252. const urls = getUrlFunctions(ruleData);
  27253. await Promise.all(urls.map(async urlNode => {
  27254. const originalResourceURL = urlNode.value;
  27255. if (!options.blockImages) {
  27256. const resourceURL = normalizeURL$1(originalResourceURL);
  27257. if (!testIgnoredPath$1(resourceURL) && testValidURL$1(resourceURL)) {
  27258. let { content, indexResource, duplicate } = await batchRequest.addURL(resourceURL, { asBinary: true, expectedType: "image", groupDuplicates: options.groupDuplicateImages });
  27259. if (!originalResourceURL.startsWith("#")) {
  27260. const maxSizeDuplicateImages = options.maxSizeDuplicateImages || SINGLE_FILE_VARIABLE_MAX_SIZE;
  27261. if (duplicate && options.groupDuplicateImages && util$2.getContentSize(content) < maxSizeDuplicateImages) {
  27262. const varNode = db("var(" + SINGLE_FILE_VARIABLE_NAME_PREFIX$1 + indexResource + ")", { context: "value" });
  27263. for (let keyName of Object.keys(varNode.children.head.data)) {
  27264. urlNode[keyName] = varNode.children.head.data[keyName];
  27265. }
  27266. resources.cssVariables.set(indexResource, { content, url: originalResourceURL });
  27267. } else {
  27268. if (!isDataURL$1(resourceURL) && options.saveOriginalURLs) {
  27269. urlNode.value = "-sf-url-original(" + JSON$3.stringify(originalResourceURL) + ") " + content;
  27270. } else {
  27271. urlNode.value = content;
  27272. }
  27273. }
  27274. }
  27275. }
  27276. } else {
  27277. urlNode.value = util$2.EMPTY_RESOURCE;
  27278. }
  27279. }));
  27280. }
  27281. async processAttribute(resourceElements, attributeName, baseURI, options, expectedType, resources, removeElementIfMissing, batchRequest, styles, processDuplicates) {
  27282. await Promise.all(Array.from(resourceElements).map(async resourceElement => {
  27283. let resourceURL = resourceElement.getAttribute(attributeName);
  27284. if (resourceURL != null) {
  27285. resourceURL = normalizeURL$1(resourceURL);
  27286. let originURL = resourceElement.dataset.singleFileOriginURL;
  27287. if (options.saveOriginalURLs && !isDataURL$1(resourceURL)) {
  27288. resourceElement.setAttribute("data-sf-original-" + attributeName, resourceURL);
  27289. }
  27290. delete resourceElement.dataset.singleFileOriginURL;
  27291. if (!expectedType || !options["block" + expectedType.charAt(0).toUpperCase() + expectedType.substring(1) + "s"]) {
  27292. if (!testIgnoredPath$1(resourceURL)) {
  27293. setAttributeEmpty(resourceElement, attributeName, expectedType);
  27294. if (testValidPath$1(resourceURL)) {
  27295. try {
  27296. resourceURL = util$2.resolveURL(resourceURL, baseURI);
  27297. } catch (error) {
  27298. // ignored
  27299. }
  27300. if (testValidURL$1(resourceURL)) {
  27301. const declaredContentType = ["OBJECT", "EMBED"].includes(resourceElement.tagName.toUpperCase()) ? resourceElement.getAttribute("type") : "";
  27302. const groupDuplicates = options.groupDuplicateImages && resourceElement.tagName.toUpperCase() == "IMG" && attributeName == "src";
  27303. let { content, indexResource, duplicate } = await batchRequest.addURL(
  27304. resourceURL,
  27305. { asBinary: true, expectedType, contentType: declaredContentType, groupDuplicates });
  27306. if (originURL) {
  27307. if (this.testEmptyResource(content)) {
  27308. try {
  27309. originURL = util$2.resolveURL(originURL, baseURI);
  27310. } catch (error) {
  27311. // ignored
  27312. }
  27313. try {
  27314. resourceURL = originURL;
  27315. content = (await util$2.getContent(resourceURL, {
  27316. asBinary: true,
  27317. inline: true,
  27318. expectedType,
  27319. contentType: declaredContentType,
  27320. maxResourceSize: options.maxResourceSize,
  27321. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27322. frameId: options.windowId,
  27323. resourceReferrer: options.resourceReferrer,
  27324. acceptHeaders: options.acceptHeaders,
  27325. networkTimeout: options.networkTimeout
  27326. })).data;
  27327. } catch (error) {
  27328. // ignored
  27329. }
  27330. }
  27331. }
  27332. if (removeElementIfMissing && this.testEmptyResource(content)) {
  27333. resourceElement.remove();
  27334. } else if (!this.testEmptyResource(content)) {
  27335. let forbiddenPrefixFound = PREFIXES_FORBIDDEN_DATA_URI.filter(prefixDataURI => content.startsWith(prefixDataURI)).length;
  27336. if (expectedType == "image") {
  27337. if (forbiddenPrefixFound && Image) {
  27338. forbiddenPrefixFound = await new Promise((resolve) => {
  27339. const image = new Image();
  27340. const timeoutId = setTimeout$1(() => resolve(true), 100);
  27341. image.src = content;
  27342. image.onload = () => cleanupAndResolve();
  27343. image.onerror = () => cleanupAndResolve(true);
  27344. function cleanupAndResolve(value) {
  27345. clearTimeout$1(timeoutId);
  27346. resolve(value);
  27347. }
  27348. });
  27349. }
  27350. if (!forbiddenPrefixFound) {
  27351. const isSVG = content.startsWith(PREFIX_DATA_URI_IMAGE_SVG);
  27352. const maxSizeDuplicateImages = options.maxSizeDuplicateImages || SINGLE_FILE_VARIABLE_MAX_SIZE;
  27353. if (processDuplicates && duplicate && !isSVG && util$2.getContentSize(content) < maxSizeDuplicateImages) {
  27354. if (this.replaceImageSource(resourceElement, SINGLE_FILE_VARIABLE_NAME_PREFIX$1 + indexResource, options)) {
  27355. resources.cssVariables.set(indexResource, { content, url: originURL });
  27356. const declarationList = db(resourceElement.getAttribute("style"), { context: "declarationList", parseCustomProperty: true });
  27357. styles.set(resourceElement, declarationList);
  27358. } else {
  27359. resourceElement.setAttribute(attributeName, content);
  27360. }
  27361. } else {
  27362. resourceElement.setAttribute(attributeName, content);
  27363. }
  27364. }
  27365. } else {
  27366. resourceElement.setAttribute(attributeName, content);
  27367. }
  27368. }
  27369. }
  27370. }
  27371. }
  27372. } else {
  27373. setAttributeEmpty(resourceElement, attributeName, expectedType);
  27374. }
  27375. }
  27376. }));
  27377. function setAttributeEmpty(resourceElement, attributeName, expectedType) {
  27378. if (expectedType == "video" || expectedType == "audio") {
  27379. resourceElement.removeAttribute(attributeName);
  27380. } else {
  27381. resourceElement.setAttribute(attributeName, util$2.EMPTY_RESOURCE);
  27382. }
  27383. }
  27384. }
  27385. async processImageSrcset(resourceURL, srcsetValue, resources, batchRequest) {
  27386. const { content } = await batchRequest.addURL(resourceURL, { asBinary: true, expectedType: "image" });
  27387. const forbiddenPrefixFound = PREFIXES_FORBIDDEN_DATA_URI.filter(prefixDataURI => content.startsWith(prefixDataURI)).length;
  27388. if (forbiddenPrefixFound) {
  27389. return "";
  27390. }
  27391. return content + (srcsetValue.w ? " " + srcsetValue.w + "w" : srcsetValue.d ? " " + srcsetValue.d + "x" : "");
  27392. }
  27393. testEmptyResource(resource) {
  27394. return resource == util$2.EMPTY_RESOURCE;
  27395. }
  27396. generateStylesheetContent(stylesheet, options) {
  27397. let stylesheetContent = gb(stylesheet);
  27398. if (options.compressCSS) {
  27399. stylesheetContent = util$2.compressCSS(stylesheetContent);
  27400. }
  27401. if (options.saveOriginalURLs) {
  27402. stylesheetContent = replaceOriginalURLs(stylesheetContent);
  27403. }
  27404. return stylesheetContent;
  27405. }
  27406. replaceImageSource(imgElement, variableName, options) {
  27407. const attributeValue = imgElement.getAttribute(util$2.IMAGE_ATTRIBUTE_NAME);
  27408. if (attributeValue) {
  27409. const imageData = options.images[Number(imgElement.getAttribute(util$2.IMAGE_ATTRIBUTE_NAME))];
  27410. if (imageData && imageData.replaceable) {
  27411. imgElement.setAttribute("src", `${PREFIX_DATA_URI_IMAGE_SVG},<svg xmlns="http://www.w3.org/2000/svg" width="${imageData.size.pxWidth}" height="${imageData.size.pxHeight}"><rect fill-opacity="0"/></svg>`);
  27412. const backgroundStyle = {};
  27413. const backgroundSize = (imageData.objectFit == "content" || imageData.objectFit == "cover") && imageData.objectFit;
  27414. if (backgroundSize) {
  27415. backgroundStyle["background-size"] = imageData.objectFit;
  27416. }
  27417. if (imageData.objectPosition) {
  27418. backgroundStyle["background-position"] = imageData.objectPosition;
  27419. }
  27420. if (imageData.backgroundColor) {
  27421. backgroundStyle["background-color"] = imageData.backgroundColor;
  27422. }
  27423. this.setBackgroundImage(imgElement, "var(" + variableName + ")", backgroundStyle);
  27424. imgElement.removeAttribute(util$2.IMAGE_ATTRIBUTE_NAME);
  27425. return true;
  27426. }
  27427. }
  27428. }
  27429. wrapMediaQuery(stylesheetContent, mediaQuery) {
  27430. if (mediaQuery) {
  27431. return "@media " + mediaQuery + "{ " + stylesheetContent + " }";
  27432. } else {
  27433. return stylesheetContent;
  27434. }
  27435. }
  27436. getAdditionalPageData() {
  27437. return {};
  27438. }
  27439. async processScript(element, resourceURL, options, charset, batchRequest) {
  27440. let content = getUpdatedResourceContent(resourceURL, options);
  27441. if (content) {
  27442. content = await toDataURI(content, "text/javascript", charset);
  27443. } else {
  27444. const result = await batchRequest.addURL(resourceURL, {
  27445. asBinary: true,
  27446. inline: true,
  27447. charset: charset != UTF8_CHARSET$2 && charset,
  27448. maxResourceSize: options.maxResourceSize,
  27449. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27450. frameId: options.windowId,
  27451. resourceReferrer: options.resourceReferrer,
  27452. baseURI: options.baseURI,
  27453. blockMixedContent: options.blockMixedContent,
  27454. expectedType: "script",
  27455. acceptHeaders: options.acceptHeaders,
  27456. networkTimeout: options.networkTimeout
  27457. });
  27458. content = result.content;
  27459. }
  27460. element.setAttribute("src", content);
  27461. }
  27462. setMetaCSP(metaElement) {
  27463. metaElement.content = "default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:; object-src 'self' data:; frame-src 'self' data:;";
  27464. }
  27465. removeUnusedStylesheets(doc) {
  27466. doc.querySelectorAll("link[rel*=stylesheet][rel*=alternate][title]").forEach(element => element.remove());
  27467. }
  27468. async processFontFaceRule(ruleData, fontInfo, fontDeclarations, fontTests, stats) {
  27469. const removedNodes = [];
  27470. for (let node = ruleData.block.children.head; node; node = node.next) {
  27471. if (node.data.property == "src") {
  27472. removedNodes.push(node);
  27473. }
  27474. }
  27475. removedNodes.pop();
  27476. removedNodes.forEach(node => ruleData.block.children.remove(node));
  27477. const srcDeclaration = ruleData.block.children.filter(node => node.property == "src").tail;
  27478. if (srcDeclaration) {
  27479. await Promise.all(fontInfo.map(async source => {
  27480. if (fontTests.has(source.src)) {
  27481. source.valid = fontTests.get(source.src);
  27482. } else {
  27483. if (FontFace$1 && source.fontUrl) {
  27484. const fontFace = new FontFace$1("test-font", source.src);
  27485. try {
  27486. let timeout;
  27487. await Promise.race([
  27488. fontFace.load().then(() => fontFace.loaded).then(() => { source.valid = true; globalThis.clearTimeout(timeout); }),
  27489. new Promise(resolve => timeout = globalThis.setTimeout(() => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY$1))
  27490. ]);
  27491. } catch (error) {
  27492. const urlNodes = vb(srcDeclaration.data, node => node.type == "Url");
  27493. const declarationFontURLs = Array.from(fontDeclarations).find(([node]) => urlNodes.includes(node) && node.value == source.fontUrl);
  27494. if (declarationFontURLs && declarationFontURLs[1].length) {
  27495. const fontURL = declarationFontURLs[1][0];
  27496. if (fontURL) {
  27497. const fontFace = new FontFace$1("test-font", "url(" + fontURL + ")");
  27498. try {
  27499. let timeout;
  27500. await Promise.race([
  27501. fontFace.load().then(() => fontFace.loaded).then(() => { source.valid = true; globalThis.clearTimeout(timeout); }),
  27502. new Promise(resolve => timeout = globalThis.setTimeout(() => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY$1))
  27503. ]);
  27504. } catch (error) {
  27505. // ignored
  27506. }
  27507. }
  27508. } else {
  27509. source.valid = true;
  27510. }
  27511. }
  27512. } else {
  27513. source.valid = true;
  27514. }
  27515. fontTests.set(source.src, source.valid);
  27516. }
  27517. }));
  27518. const findSourceByFormat = (fontFormat, testValidity) => util$2.findLast(fontInfo, source => !source.src.match(EMPTY_URL_SOURCE$1) && source.format == fontFormat && (!testValidity || source.valid));
  27519. const filterSources = fontSource => fontInfo.filter(source => source == fontSource || source.src.startsWith(LOCAL_SOURCE$1));
  27520. stats.fonts.processed += fontInfo.length;
  27521. stats.fonts.discarded += fontInfo.length;
  27522. const woffFontFound =
  27523. findSourceByFormat("woff2-variations", true) || findSourceByFormat("woff2", true) || findSourceByFormat("woff", true);
  27524. if (woffFontFound) {
  27525. fontInfo = filterSources(woffFontFound);
  27526. } else {
  27527. const ttfFontFound =
  27528. findSourceByFormat("truetype-variations", true) || findSourceByFormat("truetype", true);
  27529. if (ttfFontFound) {
  27530. fontInfo = filterSources(ttfFontFound);
  27531. } else {
  27532. const otfFontFound =
  27533. findSourceByFormat("opentype") || findSourceByFormat("embedded-opentype");
  27534. if (otfFontFound) {
  27535. fontInfo = filterSources(otfFontFound);
  27536. } else {
  27537. fontInfo = fontInfo.filter(source => !source.src.match(EMPTY_URL_SOURCE$1) && (source.valid) || source.src.startsWith(LOCAL_SOURCE$1));
  27538. }
  27539. }
  27540. }
  27541. stats.fonts.discarded -= fontInfo.length;
  27542. fontInfo.reverse();
  27543. try {
  27544. srcDeclaration.data.value = db(fontInfo.map(fontSource => fontSource.src).join(","), { context: "value", parseCustomProperty: true });
  27545. }
  27546. catch (error) {
  27547. // ignored
  27548. }
  27549. }
  27550. }
  27551. };
  27552. }
  27553. /*
  27554. * Copyright 2010-2022 Gildas Lormeau
  27555. * contact : gildas.lormeau <at> gmail.com
  27556. *
  27557. * This file is part of SingleFile.
  27558. *
  27559. * The code in this file is free software: you can redistribute it and/or
  27560. * modify it under the terms of the GNU Affero General Public License
  27561. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  27562. * of the License, or (at your option) any later version.
  27563. *
  27564. * The code in this file is distributed in the hope that it will be useful,
  27565. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  27566. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  27567. * General Public License for more details.
  27568. *
  27569. * As additional permission under GNU AGPL version 3 section 7, you may
  27570. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  27571. * AGPL normally required by section 4, provided you include this license
  27572. * notice and a URL through which recipients can access the Corresponding
  27573. * Source.
  27574. */
  27575. const JSON$2 = globalThis.JSON;
  27576. const FontFace = globalThis.FontFace;
  27577. const ABOUT_BLANK_URI$1 = "about:blank";
  27578. const UTF8_CHARSET$1 = "utf-8";
  27579. const EMPTY_URL_SOURCE = /^url\(["']?data:[^,]*,?["']?\)/;
  27580. const LOCAL_SOURCE = "local(";
  27581. const FONT_MAX_LOAD_DELAY = 5000;
  27582. let util$1;
  27583. function getProcessorHelperClass$1(utilInstance) {
  27584. util$1 = utilInstance;
  27585. const ProcessorHelperCommon = getProcessorHelperCommonClass(util$1, cssTree$1);
  27586. return class ProcessorHelper extends ProcessorHelperCommon {
  27587. async processLinkElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement, resources) {
  27588. if (element.tagName.toUpperCase() == "LINK") {
  27589. element.removeAttribute("integrity");
  27590. if (element.charset) {
  27591. options.charset = element.charset;
  27592. }
  27593. stylesheetInfo.url = element.href;
  27594. }
  27595. await this.processStylesheetElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement, resources);
  27596. }
  27597. async processStylesheetElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement, resources) {
  27598. if (!options.blockStylesheets) {
  27599. stylesheets.set({ element }, stylesheetInfo);
  27600. if (element.tagName.toUpperCase() == "LINK") {
  27601. await this.resolveLinkStylesheetURLs(stylesheetInfo, element, element.href, baseURI, options, workStyleElement, resources, stylesheets);
  27602. } else {
  27603. stylesheetInfo.stylesheet = db(element.textContent, { context: "stylesheet", parseCustomProperty: true });
  27604. await this.resolveImportURLs(stylesheetInfo, baseURI, options, workStyleElement, resources, stylesheets);
  27605. }
  27606. } else {
  27607. if (element.tagName.toUpperCase() == "LINK") {
  27608. element.href = util$1.EMPTY_RESOURCE;
  27609. } else {
  27610. element.textContent = "";
  27611. }
  27612. }
  27613. }
  27614. replaceStylesheets(doc, stylesheets, options, resources) {
  27615. const entries = Array.from(stylesheets).reverse();
  27616. for (const [key, stylesheetInfo] of entries) {
  27617. if (key.urlNode) {
  27618. const name = "stylesheet_" + resources.stylesheets.size + ".css";
  27619. if (!isDataURL$1(stylesheetInfo.url) && options.saveOriginalURLs) {
  27620. key.urlNode.value = "-sf-url-original(" + JSON$2.stringify(stylesheetInfo.url) + ") " + name;
  27621. } else {
  27622. key.urlNode.value = name;
  27623. }
  27624. resources.stylesheets.set(resources.stylesheets.size, { name, stylesheet: stylesheetInfo.stylesheet });
  27625. } else {
  27626. if (key.element.tagName.toUpperCase() == "LINK") {
  27627. const linkElement = key.element;
  27628. const name = "stylesheet_" + resources.stylesheets.size + ".css";
  27629. linkElement.setAttribute("href", name);
  27630. resources.stylesheets.set(resources.stylesheets.size, { name, stylesheet: stylesheetInfo.stylesheet });
  27631. } else {
  27632. const styleElement = key.element;
  27633. styleElement.textContent = this.generateStylesheetContent(stylesheetInfo.stylesheet, options);
  27634. }
  27635. }
  27636. }
  27637. for (const [, stylesheetResource] of resources.stylesheets) {
  27638. stylesheetResource.content = this.generateStylesheetContent(stylesheetResource.stylesheet, options);
  27639. stylesheetResource.stylesheet = null;
  27640. }
  27641. }
  27642. async resolveImportURLs(stylesheetInfo, baseURI, options, workStylesheet, resources, stylesheets) {
  27643. const stylesheet = stylesheetInfo.stylesheet;
  27644. const scoped = stylesheetInfo.scoped;
  27645. this.resolveStylesheetURLs(stylesheet, baseURI, workStylesheet);
  27646. const imports = getImportFunctions(stylesheet);
  27647. await Promise.all(imports.map(async node => {
  27648. const urlNode = kb(node, node => node.type == "Url") || kb(node, node => node.type == "String");
  27649. if (urlNode) {
  27650. let resourceURL = normalizeURL$1(urlNode.value);
  27651. if (!testIgnoredPath$1(resourceURL) && testValidPath$1(resourceURL)) {
  27652. urlNode.value = util$1.EMPTY_RESOURCE;
  27653. try {
  27654. resourceURL = util$1.resolveURL(resourceURL, baseURI);
  27655. } catch (error) {
  27656. // ignored
  27657. }
  27658. if (testValidURL$1(resourceURL)) {
  27659. const mediaQueryListNode = kb(node, node => node.type == "MediaQueryList");
  27660. let mediaText;
  27661. if (mediaQueryListNode) {
  27662. mediaText = gb(mediaQueryListNode);
  27663. }
  27664. const existingStylesheet = Array.from(stylesheets).find(([, stylesheetInfo]) => stylesheetInfo.resourceURL == resourceURL);
  27665. let stylesheet;
  27666. if (existingStylesheet) {
  27667. stylesheet = existingStylesheet[1].stylesheet;
  27668. stylesheets.set({ urlNode }, {
  27669. url: resourceURL,
  27670. stylesheet,
  27671. scoped
  27672. });
  27673. } else {
  27674. const stylesheetInfo = {
  27675. scoped,
  27676. mediaText
  27677. };
  27678. const content = await this.getStylesheetContent(resourceURL, options);
  27679. stylesheetInfo.url = resourceURL = content.resourceURL;
  27680. content.data = getUpdatedResourceContent(resourceURL, options) || content.data;
  27681. stylesheetInfo.stylesheet = db(content.data, { context: "stylesheet", parseCustomProperty: true });
  27682. stylesheet = stylesheetInfo.stylesheet;
  27683. await this.resolveImportURLs(stylesheetInfo, resourceURL, options, workStylesheet, resources, stylesheets);
  27684. stylesheets.set({ urlNode }, stylesheetInfo);
  27685. }
  27686. urlNode.importedChildren = stylesheet.children;
  27687. }
  27688. }
  27689. }
  27690. }));
  27691. }
  27692. async resolveLinkStylesheetURLs(stylesheetInfo, element, resourceURL, baseURI, options, workStylesheet, resources, stylesheets) {
  27693. resourceURL = normalizeURL$1(resourceURL);
  27694. if (resourceURL && resourceURL != baseURI && resourceURL != ABOUT_BLANK_URI$1) {
  27695. const existingStylesheet = Array.from(stylesheets).find(([, otherStylesheetInfo]) => otherStylesheetInfo.resourceURL == resourceURL);
  27696. if (existingStylesheet) {
  27697. stylesheets.set({ element }, {
  27698. url: resourceURL,
  27699. stylesheet: existingStylesheet[1].stylesheet,
  27700. mediaText: stylesheetInfo.mediaText
  27701. });
  27702. } else {
  27703. const content = await util$1.getContent(resourceURL, {
  27704. maxResourceSize: options.maxResourceSize,
  27705. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27706. charset: options.charset,
  27707. frameId: options.frameId,
  27708. resourceReferrer: options.resourceReferrer,
  27709. validateTextContentType: true,
  27710. baseURI: baseURI,
  27711. blockMixedContent: options.blockMixedContent,
  27712. expectedType: "stylesheet",
  27713. acceptHeaders: options.acceptHeaders,
  27714. networkTimeout: options.networkTimeout
  27715. });
  27716. if (!(matchCharsetEquals(content.data, content.charset) || matchCharsetEquals(content.data, options.charset))) {
  27717. options = Object.assign({}, options, { charset: getCharset(content.data) });
  27718. this.resolveLinkStylesheetURLs(stylesheetInfo, element, resourceURL, baseURI, options, workStylesheet, resources, stylesheets);
  27719. }
  27720. resourceURL = content.resourceURL;
  27721. content.data = getUpdatedResourceContent(content.resourceURL, options) || content.data;
  27722. stylesheetInfo.stylesheet = db(content.data, { context: "stylesheet", parseCustomProperty: true });
  27723. await this.resolveImportURLs(stylesheetInfo, resourceURL, options, workStylesheet, resources, stylesheets);
  27724. }
  27725. }
  27726. }
  27727. async processFrame(frameElement, pageData, resources, frameWindowId, frameData) {
  27728. const name = "frames/" + resources.frames.size + "/";
  27729. if (frameElement.tagName.toUpperCase() == "OBJECT") {
  27730. frameElement.setAttribute("data", name + "index.html");
  27731. } else {
  27732. frameElement.setAttribute("src", name + "index.html");
  27733. }
  27734. resources.frames.set(frameWindowId, { name, content: pageData.content, resources: pageData.resources, url: frameData.url });
  27735. }
  27736. async processFont(resourceURL, urlNode, originalResourceURL, baseURI, options, resources, batchRequest) {
  27737. let { content, extension, indexResource, contentType } = await batchRequest.addURL(resourceURL, {
  27738. asBinary: true,
  27739. expectedType: "font",
  27740. baseURI,
  27741. blockMixedContent: options.blockMixedContent
  27742. });
  27743. const name = "fonts/" + indexResource + extension;
  27744. if (!isDataURL$1(resourceURL) && options.saveOriginalURLs) {
  27745. urlNode.value = "-sf-url-original(" + JSON$2.stringify(originalResourceURL) + ") " + name;
  27746. } else {
  27747. urlNode.value = name;
  27748. }
  27749. resources.fonts.set(indexResource, { name, content, extension, contentType, url: resourceURL });
  27750. }
  27751. async processStyle(ruleData, options, resources, batchRequest) {
  27752. const urls = getUrlFunctions(ruleData);
  27753. await Promise.all(urls.map(async urlNode => {
  27754. const originalResourceURL = urlNode.value;
  27755. if (!options.blockImages) {
  27756. const resourceURL = normalizeURL$1(originalResourceURL);
  27757. if (!testIgnoredPath$1(resourceURL) && testValidURL$1(resourceURL)) {
  27758. let { content, indexResource, contentType, extension } = await batchRequest.addURL(resourceURL,
  27759. { asBinary: true, expectedType: "image" });
  27760. const name = "images/" + indexResource + extension;
  27761. if (!isDataURL$1(resourceURL) && options.saveOriginalURLs) {
  27762. urlNode.value = "-sf-url-original(" + JSON$2.stringify(originalResourceURL) + ") " + name;
  27763. } else {
  27764. urlNode.value = name;
  27765. }
  27766. resources.images.set(indexResource, { name, content, extension, contentType, url: resourceURL });
  27767. }
  27768. } else {
  27769. urlNode.value = util$1.EMPTY_RESOURCE;
  27770. }
  27771. }));
  27772. }
  27773. async processAttribute(resourceElements, attributeName, baseURI, options, expectedType, resources, removeElementIfMissing, batchRequest) {
  27774. await Promise.all(Array.from(resourceElements).map(async resourceElement => {
  27775. let resourceURL = resourceElement.getAttribute(attributeName);
  27776. if (resourceURL != null) {
  27777. resourceURL = normalizeURL$1(resourceURL);
  27778. let originURL = resourceElement.dataset.singleFileOriginURL;
  27779. if (options.saveOriginalURLs && !isDataURL$1(resourceURL)) {
  27780. resourceElement.setAttribute("data-sf-original-" + attributeName, resourceURL);
  27781. }
  27782. delete resourceElement.dataset.singleFileOriginURL;
  27783. if (!expectedType || !options["block" + expectedType.charAt(0).toUpperCase() + expectedType.substring(1) + "s"]) {
  27784. if (!testIgnoredPath$1(resourceURL)) {
  27785. setAttributeEmpty(resourceElement, attributeName, expectedType);
  27786. if (testValidPath$1(resourceURL)) {
  27787. try {
  27788. resourceURL = util$1.resolveURL(resourceURL, baseURI);
  27789. } catch (error) {
  27790. // ignored
  27791. }
  27792. if (testValidURL$1(resourceURL)) {
  27793. const declaredContentType = ["OBJECT", "EMBED"].includes(resourceElement.tagName.toUpperCase()) ? resourceElement.getAttribute("type") : "";
  27794. let { content, indexResource, extension, contentType } = await batchRequest.addURL(resourceURL,
  27795. { asBinary: true, expectedType, contentType: declaredContentType });
  27796. if (originURL) {
  27797. if (this.testEmptyResource(content)) {
  27798. try {
  27799. originURL = util$1.resolveURL(originURL, baseURI);
  27800. } catch (error) {
  27801. // ignored
  27802. }
  27803. try {
  27804. resourceURL = originURL;
  27805. content = (await util$1.getContent(resourceURL, {
  27806. asBinary: true,
  27807. expectedType,
  27808. contentType: declaredContentType,
  27809. maxResourceSize: options.maxResourceSize,
  27810. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27811. frameId: options.windowId,
  27812. resourceReferrer: options.resourceReferrer,
  27813. acceptHeaders: options.acceptHeaders,
  27814. networkTimeout: options.networkTimeout
  27815. })).data;
  27816. } catch (error) {
  27817. // ignored
  27818. }
  27819. }
  27820. }
  27821. if (removeElementIfMissing && this.testEmptyResource(content)) {
  27822. resourceElement.remove();
  27823. } else if (!this.testEmptyResource(content)) {
  27824. const name = "images/" + indexResource + extension;
  27825. resourceElement.setAttribute(attributeName, name);
  27826. resources.images.set(indexResource, { name, content, extension, contentType, url: resourceURL });
  27827. }
  27828. }
  27829. }
  27830. }
  27831. } else {
  27832. setAttributeEmpty(resourceElement, attributeName, expectedType);
  27833. }
  27834. }
  27835. }));
  27836. function setAttributeEmpty(resourceElement, attributeName, expectedType) {
  27837. if (expectedType == "video" || expectedType == "audio") {
  27838. resourceElement.removeAttribute(attributeName);
  27839. } else {
  27840. resourceElement.setAttribute(attributeName, util$1.EMPTY_RESOURCE);
  27841. }
  27842. }
  27843. }
  27844. async processImageSrcset(resourceURL, srcsetValue, resources, batchRequest) {
  27845. const { content, indexResource, extension, contentType } = await batchRequest.addURL(resourceURL, { asBinary: true, expectedType: "image" });
  27846. const name = "images/" + indexResource + extension;
  27847. resources.images.set(indexResource, { name, content, extension, contentType, url: resourceURL });
  27848. return name + (srcsetValue.w ? " " + srcsetValue.w + "w" : srcsetValue.d ? " " + srcsetValue.d + "x" : "");
  27849. }
  27850. testEmptyResource(resource) {
  27851. return !resource;
  27852. }
  27853. generateStylesheetContent(stylesheet, options) {
  27854. if (options.compressCSS) {
  27855. this.removeSingleLineCssComments(stylesheet);
  27856. }
  27857. this.replacePseudoClassDefined(stylesheet);
  27858. let stylesheetContent = gb(stylesheet);
  27859. if (options.compressCSS) {
  27860. stylesheetContent = util$1.compressCSS(stylesheetContent);
  27861. }
  27862. if (options.saveOriginalURLs) {
  27863. stylesheetContent = replaceOriginalURLs(stylesheetContent);
  27864. }
  27865. return stylesheetContent;
  27866. }
  27867. getAdditionalPageData(doc, content, pageResources) {
  27868. const resources = {};
  27869. let textContent = content;
  27870. pageResources.stylesheets.forEach(resource => textContent += resource.content);
  27871. Object.keys(pageResources).forEach(resourceType => {
  27872. const unusedResources = Array.from(pageResources[resourceType]).filter(([, value]) => !textContent.includes(value.name));
  27873. unusedResources.forEach(([indexResource]) => pageResources[resourceType].delete(indexResource));
  27874. resources[resourceType] = Array.from(pageResources[resourceType].values());
  27875. });
  27876. const viewportElement = doc.head.querySelector("meta[name=viewport]");
  27877. const viewport = viewportElement ? viewportElement.content : null;
  27878. const doctype = util$1.getDoctypeString(doc);
  27879. return {
  27880. doctype,
  27881. resources,
  27882. viewport
  27883. };
  27884. }
  27885. async processScript(element, resourceURL, options, charset, batchRequest, resources) {
  27886. let { content, indexResource, extension, contentType } = await batchRequest.addURL(resourceURL, {
  27887. asBinary: true,
  27888. charset: charset != UTF8_CHARSET$1 && charset,
  27889. maxResourceSize: options.maxResourceSize,
  27890. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  27891. frameId: options.windowId,
  27892. resourceReferrer: options.resourceReferrer,
  27893. baseURI: options.baseURI,
  27894. blockMixedContent: options.blockMixedContent,
  27895. expectedType: "script",
  27896. acceptHeaders: options.acceptHeaders,
  27897. networkTimeout: options.networkTimeout
  27898. });
  27899. content = getUpdatedResourceContent(resourceURL, options) || content;
  27900. const name = "scripts/" + indexResource + extension;
  27901. element.setAttribute("src", name);
  27902. resources.scripts.set(indexResource, { name, content, extension, contentType, url: resourceURL });
  27903. }
  27904. setMetaCSP(metaElement) {
  27905. metaElement.content = "default-src 'none'; connect-src 'self' data: blob:; font-src 'self' data: blob:; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline' data: blob:; frame-src 'self' data: blob:; media-src 'self' data: blob:; script-src 'self' 'unsafe-inline' data: blob:; object-src 'self' data: blob:;";
  27906. }
  27907. removeUnusedStylesheets() {
  27908. }
  27909. async processFontFaceRule(ruleData, fontInfo, fontResources, fontTests, stats) {
  27910. await Promise.all(fontInfo.map(async source => {
  27911. if (fontTests.has(source.src)) {
  27912. source.valid = fontTests.get(source.src);
  27913. } else {
  27914. if (FontFace && source.fontUrl) {
  27915. const resourceEntry = [...fontResources].find(([, resource]) => source.fontUrl && resource.name == source.fontUrl);
  27916. if (resourceEntry) {
  27917. const resource = resourceEntry[1];
  27918. const fontFace = new FontFace("test-font", new Uint8Array(resource.content).buffer);
  27919. try {
  27920. let timeout;
  27921. await Promise.race([
  27922. fontFace.load().then(() => fontFace.loaded).then(() => { source.valid = true; globalThis.clearTimeout(timeout); }),
  27923. new Promise(resolve => timeout = globalThis.setTimeout(() => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY))
  27924. ]);
  27925. } catch (error) {
  27926. const fontFace = new FontFace("test-font", "url(" + resource.url + ")");
  27927. try {
  27928. let timeout;
  27929. await Promise.race([
  27930. fontFace.load().then(() => fontFace.loaded).then(() => { source.valid = true; globalThis.clearTimeout(timeout); }),
  27931. new Promise(resolve => timeout = globalThis.setTimeout(() => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY))
  27932. ]);
  27933. } catch (error) {
  27934. // ignored
  27935. }
  27936. }
  27937. } else {
  27938. source.valid = true;
  27939. }
  27940. } else {
  27941. source.valid = true;
  27942. }
  27943. fontTests.set(source.src, source.valid);
  27944. }
  27945. }));
  27946. const findSourceByFormat = (fontFormat, testValidity) => util$1.findLast(fontInfo, source => !source.src.match(EMPTY_URL_SOURCE) && source.format == fontFormat && (!testValidity || source.valid));
  27947. const findSourceByContentType = (contentType, testValidity) => util$1.findLast(fontInfo, source => !source.src.match(EMPTY_URL_SOURCE) && source.contentType == contentType && (!testValidity || source.valid));
  27948. const filterSources = fontSource => fontInfo.filter(source => source == fontSource || source.src.startsWith(LOCAL_SOURCE));
  27949. stats.fonts.processed += fontInfo.length;
  27950. stats.fonts.discarded += fontInfo.length;
  27951. const woffFontFound =
  27952. findSourceByFormat("woff2-variations", true) || findSourceByFormat("woff2", true) || findSourceByFormat("woff", true) ||
  27953. findSourceByContentType("font/woff2", true) || findSourceByContentType("font/woff", true) || findSourceByContentType("application/font-woff", true) || findSourceByContentType("application/x-font-woff", true);
  27954. if (woffFontFound) {
  27955. fontInfo = filterSources(woffFontFound);
  27956. } else {
  27957. const ttfFontFound =
  27958. findSourceByFormat("truetype-variations", true) || findSourceByFormat("truetype", true) ||
  27959. findSourceByContentType("font/ttf", true) || findSourceByContentType("application/x-font-ttf", true) || findSourceByContentType("application/x-font-ttf", true) || findSourceByContentType("application/x-font-truetype", true);
  27960. if (ttfFontFound) {
  27961. fontInfo = filterSources(ttfFontFound);
  27962. } else {
  27963. const otfFontFound =
  27964. findSourceByFormat("opentype") || findSourceByFormat("embedded-opentype") ||
  27965. findSourceByContentType("font/otf") || findSourceByContentType("application/x-font-opentype") || findSourceByContentType("application/font-sfnt");
  27966. if (otfFontFound) {
  27967. fontInfo = filterSources(otfFontFound);
  27968. } else {
  27969. fontInfo = fontInfo.filter(source => !source.src.match(EMPTY_URL_SOURCE) && (source.valid) || source.src.startsWith(LOCAL_SOURCE));
  27970. }
  27971. }
  27972. }
  27973. stats.fonts.discarded -= fontInfo.length;
  27974. const removedNodes = [];
  27975. for (let node = ruleData.block.children.head; node; node = node.next) {
  27976. if (node.data.property == "src") {
  27977. removedNodes.push(node);
  27978. }
  27979. }
  27980. removedNodes.pop();
  27981. removedNodes.forEach(node => ruleData.block.children.remove(node));
  27982. const srcDeclaration = ruleData.block.children.filter(node => node.property == "src").tail;
  27983. if (srcDeclaration) {
  27984. fontInfo.reverse();
  27985. try {
  27986. srcDeclaration.data.value = db(fontInfo.map(fontSource => fontSource.src).join(","), { context: "value", parseCustomProperty: true });
  27987. }
  27988. catch (error) {
  27989. // ignored
  27990. }
  27991. }
  27992. }
  27993. };
  27994. }
  27995. /*
  27996. * Copyright 2010-2022 Gildas Lormeau
  27997. * contact : gildas.lormeau <at> gmail.com
  27998. *
  27999. * This file is part of SingleFile.
  28000. *
  28001. * The code in this file is free software: you can redistribute it and/or
  28002. * modify it under the terms of the GNU Affero General Public License
  28003. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  28004. * of the License, or (at your option) any later version.
  28005. *
  28006. * The code in this file is distributed in the hope that it will be useful,
  28007. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  28008. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  28009. * General Public License for more details.
  28010. *
  28011. * As additional permission under GNU AGPL version 3 section 7, you may
  28012. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  28013. * AGPL normally required by section 4, provided you include this license
  28014. * notice and a URL through which recipients can access the Corresponding
  28015. * Source.
  28016. */
  28017. function getProcessorHelperClass(options, utilInstance) {
  28018. return options.compressContent ? getProcessorHelperClass$1(utilInstance) : getProcessorHelperClass$2(utilInstance);
  28019. }
  28020. /*
  28021. * Copyright 2010-2022 Gildas Lormeau
  28022. * contact : gildas.lormeau <at> gmail.com
  28023. *
  28024. * This file is part of SingleFile.
  28025. *
  28026. * The code in this file is free software: you can redistribute it and/or
  28027. * modify it under the terms of the GNU Affero General Public License
  28028. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  28029. * of the License, or (at your option) any later version.
  28030. *
  28031. * The code in this file is distributed in the hope that it will be useful,
  28032. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  28033. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  28034. * General Public License for more details.
  28035. *
  28036. * As additional permission under GNU AGPL version 3 section 7, you may
  28037. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  28038. * AGPL normally required by section 4, provided you include this license
  28039. * notice and a URL through which recipients can access the Corresponding
  28040. * Source.
  28041. */
  28042. const Set$1 = globalThis.Set;
  28043. const Map$1 = globalThis.Map;
  28044. const JSON$1 = globalThis.JSON;
  28045. let util;
  28046. function getClass(...args) {
  28047. [util] = args;
  28048. return SingleFileClass;
  28049. }
  28050. class SingleFileClass {
  28051. constructor(options) {
  28052. this.options = options;
  28053. const ProcessorHelper = getProcessorHelperClass(options, util);
  28054. this.processorHelper = new ProcessorHelper();
  28055. }
  28056. async run() {
  28057. const waitForUserScript = globalThis[util.WAIT_FOR_USERSCRIPT_PROPERTY_NAME];
  28058. if (this.options.userScriptEnabled && waitForUserScript) {
  28059. await waitForUserScript(util.ON_BEFORE_CAPTURE_EVENT_NAME);
  28060. }
  28061. this.runner = new Runner(this.options, this.processorHelper, true);
  28062. await this.runner.loadPage();
  28063. await this.runner.initialize();
  28064. if (this.options.userScriptEnabled && waitForUserScript) {
  28065. await waitForUserScript(util.ON_AFTER_CAPTURE_EVENT_NAME);
  28066. }
  28067. await this.runner.run();
  28068. }
  28069. cancel() {
  28070. this.cancelled = true;
  28071. if (this.runner) {
  28072. this.runner.cancel();
  28073. }
  28074. }
  28075. getPageData() {
  28076. return this.runner.getPageData();
  28077. }
  28078. }
  28079. // -------------
  28080. // ProgressEvent
  28081. // -------------
  28082. const PAGE_LOADING = "page-loading";
  28083. const PAGE_LOADED = "page-loaded";
  28084. const RESOURCES_INITIALIZING = "resource-initializing";
  28085. const RESOURCES_INITIALIZED = "resources-initialized";
  28086. const RESOURCE_LOADED = "resource-loaded";
  28087. const PAGE_ENDED = "page-ended";
  28088. const STAGE_STARTED = "stage-started";
  28089. const STAGE_ENDED = "stage-ended";
  28090. class ProgressEvent {
  28091. constructor(type, detail) {
  28092. return { type, detail, PAGE_LOADING, PAGE_LOADED, RESOURCES_INITIALIZING, RESOURCES_INITIALIZED, RESOURCE_LOADED, PAGE_ENDED, STAGE_STARTED, STAGE_ENDED };
  28093. }
  28094. }
  28095. // ------
  28096. // Runner
  28097. // ------
  28098. const RESOLVE_URLS_STAGE = 0;
  28099. const REPLACE_DATA_STAGE = 1;
  28100. const REPLACE_DOCS_STAGE = 2;
  28101. const POST_PROCESS_STAGE = 3;
  28102. const FINALIZE_STAGE = 4;
  28103. const STAGES = [{
  28104. sequential: [
  28105. { action: "preProcessPage" },
  28106. { option: "loadDeferredImagesKeepZoomLevel", action: "resetZoomLevel" },
  28107. { action: "replaceStyleContents" },
  28108. { action: "replaceInvalidElements" },
  28109. { action: "resetCharsetMeta" },
  28110. { action: "resetReferrerMeta" },
  28111. { option: "saveFavicon", action: "saveFavicon" },
  28112. { action: "insertFonts" },
  28113. { action: "insertShadowRootContents" },
  28114. { action: "replaceCanvasElements" },
  28115. { action: "setInputValues" },
  28116. { option: "moveStylesInHead", action: "moveStylesInHead" },
  28117. { option: "blockScripts", action: "removeEmbedScripts" },
  28118. { option: "selected", action: "removeUnselectedElements" },
  28119. { option: "blockVideos", action: "insertVideoPosters" },
  28120. { option: "blockVideos", action: "insertVideoLinks" },
  28121. { option: "removeFrames", action: "removeFrames" },
  28122. { action: "removeDiscardedResources" },
  28123. { option: "removeHiddenElements", action: "removeHiddenElements" },
  28124. { action: "saveScrollPosition" },
  28125. { action: "resolveHrefs" },
  28126. { action: "resolveStyleAttributeURLs" }
  28127. ],
  28128. parallel: [
  28129. { option: "blockVideos", action: "insertMissingVideoPosters" },
  28130. { action: "resolveStylesheetsURLs" },
  28131. { option: "!removeFrames", action: "resolveFrameURLs" }
  28132. ]
  28133. }, {
  28134. sequential: [
  28135. { option: "removeUnusedStyles", action: "removeUnusedStyles" },
  28136. { option: "removeAlternativeMedias", action: "removeAlternativeMedias" },
  28137. { option: "removeUnusedFonts", action: "removeUnusedFonts" }
  28138. ],
  28139. parallel: [
  28140. { action: "processStylesheets" },
  28141. { action: "processStyleAttributes" },
  28142. { action: "processPageResources" },
  28143. { action: "processScripts" }
  28144. ]
  28145. }, {
  28146. sequential: [
  28147. { option: "removeAlternativeImages", action: "removeAlternativeImages" }
  28148. ],
  28149. parallel: [
  28150. { option: "removeAlternativeFonts", action: "removeAlternativeFonts" },
  28151. { option: "!removeFrames", action: "processFrames" }
  28152. ]
  28153. }, {
  28154. sequential: [
  28155. { action: "replaceStylesheets" },
  28156. { action: "replaceStyleAttributes" },
  28157. { action: "insertVariables" },
  28158. { option: "compressHTML", action: "compressHTML" },
  28159. { action: "cleanupPage" }
  28160. ],
  28161. parallel: [
  28162. { option: "enableMaff", action: "insertMAFFMetaData" },
  28163. { action: "setDocInfo" }
  28164. ]
  28165. }, {
  28166. sequential: [
  28167. { action: "loadOptionsFromPage" },
  28168. { option: "saveFilenameTemplateData", action: "saveFilenameTemplateData" },
  28169. ]
  28170. }];
  28171. class Runner {
  28172. constructor(options, processorHelper, root) {
  28173. const rootDocDefined = root && options.doc;
  28174. this.root = root;
  28175. this.options = options;
  28176. this.options.url = this.options.url || (rootDocDefined && this.options.doc.documentURI);
  28177. const matchResourceReferrer = this.options.url.match(/^.*\//);
  28178. this.options.resourceReferrer = this.options.passReferrerOnError && matchResourceReferrer && matchResourceReferrer[0];
  28179. this.options.baseURI = rootDocDefined && this.options.doc.baseURI;
  28180. this.options.rootDocument = root;
  28181. this.options.updatedResources = this.options.updatedResources || {};
  28182. this.options.fontTests = new Map$1();
  28183. this.batchRequest = new BatchRequest();
  28184. this.processor = new Processor(options, processorHelper, this.batchRequest);
  28185. if (rootDocDefined) {
  28186. const docData = util.preProcessDoc(this.options.doc, this.options.win, this.options);
  28187. this.options.canvases = docData.canvases;
  28188. this.options.fonts = docData.fonts;
  28189. this.options.stylesheets = docData.stylesheets;
  28190. this.options.images = docData.images;
  28191. this.options.posters = docData.posters;
  28192. this.options.videos = docData.videos;
  28193. this.options.usedFonts = docData.usedFonts;
  28194. this.options.shadowRoots = docData.shadowRoots;
  28195. this.options.referrer = docData.referrer;
  28196. this.options.adoptedStyleSheets = docData.adoptedStyleSheets;
  28197. this.markedElements = docData.markedElements;
  28198. this.invalidElements = docData.invalidElements;
  28199. }
  28200. if (this.options.saveRawPage) {
  28201. this.options.removeFrames = true;
  28202. }
  28203. this.options.content = this.options.content || (rootDocDefined ? util.serialize(this.options.doc) : null);
  28204. this.onprogress = options.onprogress || (() => { });
  28205. }
  28206. async loadPage() {
  28207. await this.onprogress(new ProgressEvent(PAGE_LOADING, { pageURL: this.options.url, frame: !this.root, options: this.options, }));
  28208. await this.processor.loadPage(this.options.content);
  28209. await this.onprogress(new ProgressEvent(PAGE_LOADED, { pageURL: this.options.url, frame: !this.root, options: this.options }));
  28210. }
  28211. async initialize() {
  28212. await this.onprogress(new ProgressEvent(RESOURCES_INITIALIZING, { pageURL: this.options.url, options: this.options }));
  28213. await this.executeStage(RESOLVE_URLS_STAGE);
  28214. this.pendingPromises = this.executeStage(REPLACE_DATA_STAGE);
  28215. if (this.root && this.options.doc) {
  28216. util.postProcessDoc(this.options.doc, this.markedElements, this.invalidElements);
  28217. }
  28218. }
  28219. cancel() {
  28220. this.cancelled = true;
  28221. this.batchRequest.cancel();
  28222. if (this.root) {
  28223. if (this.options.frames) {
  28224. this.options.frames.forEach(cancelRunner);
  28225. }
  28226. }
  28227. function cancelRunner(resourceData) {
  28228. if (resourceData.runner) {
  28229. resourceData.runner.cancel();
  28230. }
  28231. }
  28232. }
  28233. async run() {
  28234. if (this.root) {
  28235. this.processor.initialize(this.batchRequest);
  28236. await this.onprogress(new ProgressEvent(RESOURCES_INITIALIZED, { pageURL: this.options.url, max: this.processor.maxResources, options: this.options }));
  28237. }
  28238. await this.batchRequest.run(async detail => {
  28239. detail.pageURL = this.options.url;
  28240. detail.options = this.options;
  28241. await this.onprogress(new ProgressEvent(RESOURCE_LOADED, detail));
  28242. }, this.options);
  28243. await this.pendingPromises;
  28244. this.options.doc = null;
  28245. this.options.win = null;
  28246. await this.executeStage(REPLACE_DOCS_STAGE);
  28247. await this.executeStage(POST_PROCESS_STAGE);
  28248. await this.executeStage(FINALIZE_STAGE);
  28249. this.processor.finalize();
  28250. }
  28251. getDocument() {
  28252. return this.processor.doc;
  28253. }
  28254. getStyleSheets() {
  28255. return this.processor.stylesheets;
  28256. }
  28257. async getPageData() {
  28258. if (this.root) {
  28259. await this.onprogress(new ProgressEvent(PAGE_ENDED, { pageURL: this.options.url, options: this.options }));
  28260. }
  28261. return this.processor.getPageData();
  28262. }
  28263. async executeStage(step) {
  28264. const frame = !this.root;
  28265. await this.onprogress(new ProgressEvent(STAGE_STARTED, { pageURL: this.options.url, step, frame, options: this.options }));
  28266. for (const task of STAGES[step].sequential) {
  28267. if (!this.cancelled) {
  28268. this.executeTask(task);
  28269. }
  28270. }
  28271. let parallelTasksPromise;
  28272. if (STAGES[step].parallel) {
  28273. parallelTasksPromise = await Promise.all(STAGES[step].parallel.map(async task => {
  28274. if (!this.cancelled) {
  28275. await this.executeTask(task);
  28276. }
  28277. }));
  28278. } else {
  28279. parallelTasksPromise = Promise.resolve();
  28280. }
  28281. await this.onprogress(new ProgressEvent(STAGE_ENDED, { pageURL: this.options.url, step, frame, options: this.options }));
  28282. return parallelTasksPromise;
  28283. }
  28284. executeTask(task) {
  28285. if (!task.option || ((task.option.startsWith("!") && !this.options[task.option]) || this.options[task.option])) {
  28286. return this.processor[task.action]();
  28287. }
  28288. }
  28289. }
  28290. // ------------
  28291. // BatchRequest
  28292. // ------------
  28293. class BatchRequest {
  28294. constructor() {
  28295. this.requests = new Map$1();
  28296. this.duplicates = new Map$1();
  28297. }
  28298. addURL(resourceURL, { asBinary, expectedType, groupDuplicates, baseURI, blockMixedContent, contentType } = {}) {
  28299. return new Promise((resolve, reject) => {
  28300. const requestKey = JSON$1.stringify([resourceURL, asBinary, expectedType, baseURI, blockMixedContent, contentType]);
  28301. let resourceRequests = this.requests.get(requestKey);
  28302. if (!resourceRequests) {
  28303. resourceRequests = [];
  28304. this.requests.set(requestKey, resourceRequests);
  28305. }
  28306. const callbacks = { resolve, reject };
  28307. resourceRequests.push(callbacks);
  28308. if (groupDuplicates) {
  28309. let duplicateRequests = this.duplicates.get(requestKey);
  28310. if (!duplicateRequests) {
  28311. duplicateRequests = [];
  28312. this.duplicates.set(requestKey, duplicateRequests);
  28313. }
  28314. duplicateRequests.push(callbacks);
  28315. }
  28316. });
  28317. }
  28318. getMaxResources() {
  28319. return this.requests.size;
  28320. }
  28321. run(onloadListener, options) {
  28322. const resourceURLs = [...this.requests.keys()];
  28323. let indexResource = 0;
  28324. return Promise.all(resourceURLs.map(async requestKey => {
  28325. const [resourceURL, asBinary, expectedType, baseURI, blockMixedContent, contentType] = JSON$1.parse(requestKey);
  28326. const resourceRequests = this.requests.get(requestKey);
  28327. try {
  28328. const currentIndexResource = indexResource;
  28329. indexResource = indexResource + 1;
  28330. const content = await util.getContent(resourceURL, {
  28331. asBinary,
  28332. inline: !options.compressContent,
  28333. expectedType,
  28334. contentType,
  28335. maxResourceSize: options.maxResourceSize,
  28336. maxResourceSizeEnabled: options.maxResourceSizeEnabled,
  28337. frameId: options.windowId,
  28338. resourceReferrer: options.resourceReferrer,
  28339. baseURI,
  28340. blockMixedContent,
  28341. acceptHeaders: options.acceptHeaders,
  28342. networkTimeout: options.networkTimeout
  28343. });
  28344. await onloadListener({ url: resourceURL });
  28345. if (!this.cancelled) {
  28346. const extension = util.getContentTypeExtension(content.contentType) || util.getFilenameExtension(resourceURL, options.filenameReplacedCharacters, options.filenameReplacementCharacter);
  28347. resourceRequests.forEach(callbacks => {
  28348. const duplicateCallbacks = this.duplicates.get(requestKey);
  28349. const duplicate = duplicateCallbacks && duplicateCallbacks.length > 1 && duplicateCallbacks.includes(callbacks);
  28350. callbacks.resolve({ content: content.data, indexResource: currentIndexResource, duplicate, contentType: content.contentType, extension });
  28351. });
  28352. }
  28353. } catch (error) {
  28354. indexResource = indexResource + 1;
  28355. await onloadListener({ url: resourceURL });
  28356. resourceRequests.forEach(resourceRequest => resourceRequest.reject(error));
  28357. }
  28358. this.requests.delete(requestKey);
  28359. }));
  28360. }
  28361. cancel() {
  28362. this.cancelled = true;
  28363. const resourceURLs = [...this.requests.keys()];
  28364. resourceURLs.forEach(requestKey => {
  28365. const resourceRequests = this.requests.get(requestKey);
  28366. resourceRequests.forEach(callbacks => callbacks.reject());
  28367. this.requests.delete(requestKey);
  28368. });
  28369. }
  28370. }
  28371. // ---------
  28372. // Processor
  28373. // ---------
  28374. const SHADOWROOT_ATTRIBUTE_NAME = "shadowrootmode";
  28375. const SCRIPT_TEMPLATE_SHADOW_ROOT = "data-template-shadow-root";
  28376. const SCRIPT_OPTIONS = "data-single-file-options";
  28377. const UTF8_CHARSET = "utf-8";
  28378. class Processor {
  28379. constructor(options, processorHelper, batchRequest) {
  28380. this.options = options;
  28381. this.processorHelper = processorHelper;
  28382. this.stats = new Stats(options);
  28383. this.baseURI = normalizeURL(options.baseURI || options.url);
  28384. this.batchRequest = batchRequest;
  28385. this.stylesheets = new Map$1();
  28386. this.styles = new Map$1();
  28387. this.resources = {
  28388. cssVariables: new Map$1(),
  28389. fonts: new Map$1(),
  28390. stylesheets: new Map$1(),
  28391. scripts: new Map$1(),
  28392. images: new Map$1(),
  28393. frames: new Map$1()
  28394. };
  28395. this.fontTests = options.fontTests;
  28396. }
  28397. initialize() {
  28398. this.options.saveDate = new Date();
  28399. this.options.saveUrl = this.options.url;
  28400. if (this.options.enableMaff) {
  28401. this.maffMetaDataPromise = this.batchRequest.addURL(util.resolveURL("index.rdf", this.options.baseURI || this.options.url), { expectedType: "document" });
  28402. }
  28403. this.maxResources = this.batchRequest.getMaxResources();
  28404. if (!this.options.saveRawPage && !this.options.removeFrames && this.options.frames) {
  28405. this.options.frames.forEach(frameData => this.maxResources += frameData.maxResources || 0);
  28406. }
  28407. this.stats.set("processed", "resources", this.maxResources);
  28408. }
  28409. async loadPage(pageContent, charset) {
  28410. let content;
  28411. if (!pageContent || this.options.saveRawPage) {
  28412. content = await util.getContent(this.baseURI, {
  28413. inline: !this.options.compressContent,
  28414. maxResourceSize: this.options.maxResourceSize,
  28415. maxResourceSizeEnabled: this.options.maxResourceSizeEnabled,
  28416. charset,
  28417. frameId: this.options.windowId,
  28418. resourceReferrer: this.options.resourceReferrer,
  28419. expectedType: "document",
  28420. acceptHeaders: this.options.acceptHeaders,
  28421. networkTimeout: this.options.networkTimeout
  28422. });
  28423. pageContent = content.data || "";
  28424. }
  28425. this.doc = util.parseDocContent(pageContent, this.baseURI);
  28426. if (this.options.saveRawPage) {
  28427. let charset;
  28428. this.doc.querySelectorAll("meta[charset]").forEach(element => {
  28429. if (!charset) {
  28430. charset = element.getAttribute("charset").trim().toLowerCase();
  28431. }
  28432. });
  28433. if (!charset) {
  28434. this.doc.querySelectorAll("meta[http-equiv=\"content-type\"]").forEach(element => {
  28435. const charsetDeclaration = element.content.split(";")[1];
  28436. if (charsetDeclaration && !charset) {
  28437. charset = charsetDeclaration.split("=")[1].trim().toLowerCase();
  28438. }
  28439. });
  28440. }
  28441. if (charset && content.charset && charset != content.charset.toLowerCase()) {
  28442. return this.loadPage(pageContent, charset);
  28443. }
  28444. }
  28445. this.workStyleElement = this.doc.createElement("style");
  28446. this.doc.body.appendChild(this.workStyleElement);
  28447. this.onEventAttributeNames = getOnEventAttributeNames(this.doc);
  28448. }
  28449. finalize() {
  28450. if (this.workStyleElement.parentNode) {
  28451. this.workStyleElement.remove();
  28452. }
  28453. }
  28454. async getPageData() {
  28455. let commentText;
  28456. util.postProcessDoc(this.doc);
  28457. const url = util.parseURL(this.baseURI);
  28458. if (this.options.insertSingleFileComment) {
  28459. const firstComment = this.doc.documentElement.firstChild;
  28460. let infobarURL = this.options.saveUrl, infobarSaveDate = this.options.saveDate;
  28461. if (firstComment.nodeType == 8 && (firstComment.textContent.includes(util.COMMENT_HEADER_LEGACY) || firstComment.textContent.includes(util.COMMENT_HEADER))) {
  28462. const info = this.doc.documentElement.firstChild.textContent.split("\n");
  28463. try {
  28464. const [, , url, saveDate] = info;
  28465. infobarURL = url.split("url: ")[1].trim();
  28466. infobarSaveDate = saveDate.split("saved date: ")[1];
  28467. firstComment.remove();
  28468. } catch (error) {
  28469. // ignored
  28470. }
  28471. }
  28472. const infobarContent = (this.options.infobarContent || "").replace(/\\n/g, "\n").replace(/\\t/g, "\t");
  28473. commentText = "\n " + (this.options.useLegacyCommentHeader ? util.COMMENT_HEADER_LEGACY : util.COMMENT_HEADER) +
  28474. " \n url: " + infobarURL +
  28475. (this.options.removeSavedDate ? " " : " \n saved date: " + infobarSaveDate) +
  28476. (infobarContent ? " \n info: " + infobarContent : "") + "\n";
  28477. const commentNode = this.doc.createComment(commentText);
  28478. this.doc.documentElement.insertBefore(commentNode, this.doc.documentElement.firstChild);
  28479. }
  28480. const legacyInfobarElement = this.doc.querySelector("singlefile-infobar");
  28481. if (legacyInfobarElement) {
  28482. legacyInfobarElement.remove();
  28483. }
  28484. const infobarElement = this.doc.querySelector(util.INFOBAR_TAGNAME);
  28485. if (infobarElement) {
  28486. infobarElement.remove();
  28487. }
  28488. if (this.options.includeInfobar) {
  28489. util.appendInfobar(this.doc, this.options);
  28490. }
  28491. if (this.doc.querySelector("template[" + SHADOWROOT_ATTRIBUTE_NAME + "]") || (this.options.shadowRoots && this.options.shadowRoots.length)) {
  28492. if (this.options.blockScripts) {
  28493. this.doc.querySelectorAll("script[" + SCRIPT_TEMPLATE_SHADOW_ROOT + "]").forEach(element => element.remove());
  28494. }
  28495. const scriptElement = this.doc.createElement("script");
  28496. scriptElement.setAttribute(SCRIPT_TEMPLATE_SHADOW_ROOT, "");
  28497. scriptElement.textContent = `(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[${SHADOWROOT_ATTRIBUTE_NAME}]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("${SHADOWROOT_ATTRIBUTE_NAME}")});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()`;
  28498. this.doc.body.appendChild(scriptElement);
  28499. }
  28500. if (this.options.insertCanonicalLink && this.options.saveUrl.match(HTTP_URI_PREFIX)) {
  28501. let canonicalLink = this.doc.querySelector("link[rel=canonical]");
  28502. if (!canonicalLink) {
  28503. canonicalLink = this.doc.createElement("link");
  28504. canonicalLink.setAttribute("rel", "canonical");
  28505. this.doc.head.appendChild(canonicalLink);
  28506. }
  28507. if (canonicalLink && !canonicalLink.href) {
  28508. canonicalLink.href = this.options.saveUrl;
  28509. }
  28510. }
  28511. if (this.options.insertMetaCSP) {
  28512. const metaElement = this.doc.createElement("meta");
  28513. metaElement.httpEquiv = "content-security-policy";
  28514. this.processorHelper.setMetaCSP(metaElement);
  28515. this.doc.head.appendChild(metaElement);
  28516. }
  28517. if (this.options.insertMetaNoIndex) {
  28518. let metaElement = this.doc.querySelector("meta[name=robots][content*=noindex]");
  28519. if (!metaElement) {
  28520. metaElement = this.doc.createElement("meta");
  28521. metaElement.setAttribute("name", "robots");
  28522. metaElement.setAttribute("content", "noindex");
  28523. this.doc.head.appendChild(metaElement);
  28524. }
  28525. }
  28526. const styleElement = this.doc.createElement("style");
  28527. styleElement.textContent = "img[src=\"data:,\"],source[src=\"data:,\"]{display:none!important}";
  28528. this.doc.head.appendChild(styleElement);
  28529. this.doc.head.querySelectorAll("noscript").forEach(element => element.parentElement.appendChild(element));
  28530. let size;
  28531. if (this.options.displayStats) {
  28532. size = util.getContentSize(this.doc.documentElement.outerHTML);
  28533. }
  28534. const content = util.serialize(this.doc, this.options.compressHTML);
  28535. if (this.options.displayStats) {
  28536. const contentSize = util.getContentSize(content);
  28537. this.stats.set("processed", "HTML bytes", contentSize);
  28538. this.stats.add("discarded", "HTML bytes", size - contentSize);
  28539. }
  28540. const filename = await util.formatFilename(content, this.doc, this.options);
  28541. const mimeType = util.getMimeType(this.options);
  28542. const matchTitle = this.baseURI.match(/([^/]*)\/?(\.html?.*)$/) || this.baseURI.match(/\/\/([^/]*)\/?$/);
  28543. const additionalData = this.processorHelper.getAdditionalPageData(this.doc, content, this.resources);
  28544. const pageData = Object.assign({
  28545. stats: this.stats.data,
  28546. title: this.options.title || (this.baseURI && matchTitle ? matchTitle[1] : url.hostname ? url.hostname : ""),
  28547. filename,
  28548. mimeType,
  28549. content,
  28550. comment: commentText,
  28551. }, additionalData);
  28552. if (this.options.addProof) {
  28553. pageData.hash = await util.digest("SHA-256", content);
  28554. }
  28555. if (this.options.retrieveLinks) {
  28556. pageData.links = Array.from(new Set$1(Array.from(this.doc.links).map(linkElement => linkElement.href)));
  28557. }
  28558. return pageData;
  28559. }
  28560. preProcessPage() {
  28561. this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => {
  28562. if ((this.options.win && element instanceof this.options.win.HTMLElement) || element instanceof globalThis.HTMLElement) {
  28563. this.doc.head.appendChild(element);
  28564. }
  28565. });
  28566. if (this.options.images && !this.options.saveRawPage) {
  28567. this.doc.querySelectorAll("img[" + util.IMAGE_ATTRIBUTE_NAME + "]").forEach(imgElement => {
  28568. const attributeValue = imgElement.getAttribute(util.IMAGE_ATTRIBUTE_NAME);
  28569. if (attributeValue) {
  28570. const imageData = this.options.images[Number(attributeValue)];
  28571. if (imageData) {
  28572. if (this.options.removeHiddenElements && (
  28573. (imageData.size && !imageData.size.pxWidth && !imageData.size.pxHeight) ||
  28574. imgElement.getAttribute(util.HIDDEN_CONTENT_ATTRIBUTE_NAME) == "")
  28575. ) {
  28576. imgElement.setAttribute("src", util.EMPTY_RESOURCE);
  28577. } else {
  28578. if (imageData.currentSrc) {
  28579. imgElement.dataset.singleFileOriginURL = imgElement.getAttribute("src");
  28580. imgElement.setAttribute("src", imageData.currentSrc);
  28581. }
  28582. if (this.options.loadDeferredImages) {
  28583. if ((!imgElement.getAttribute("src") || imgElement.getAttribute("src") == util.EMPTY_RESOURCE) && imgElement.getAttribute("data-src")) {
  28584. imageData.src = imgElement.dataset.src;
  28585. imgElement.setAttribute("src", imgElement.dataset.src);
  28586. imgElement.removeAttribute("data-src");
  28587. }
  28588. }
  28589. }
  28590. }
  28591. }
  28592. });
  28593. if (this.options.loadDeferredImages) {
  28594. this.doc.querySelectorAll("img[data-srcset]").forEach(imgElement => {
  28595. if (!imgElement.getAttribute("srcset") && imgElement.getAttribute("data-srcset")) {
  28596. imgElement.setAttribute("srcset", imgElement.dataset.srcset);
  28597. imgElement.removeAttribute("data-srcset");
  28598. }
  28599. });
  28600. }
  28601. }
  28602. }
  28603. loadOptionsFromPage() {
  28604. const optionsElement = this.doc.body.querySelector("script[type=\"application/json\"][" + SCRIPT_OPTIONS + "]");
  28605. if (optionsElement) {
  28606. const options = JSON$1.parse(optionsElement.textContent);
  28607. Object.keys(options).forEach(option => this.options[option] = options[option]);
  28608. this.options.saveDate = new Date(this.options.saveDate);
  28609. this.options.visitDate = new Date(this.options.visitDate);
  28610. }
  28611. }
  28612. saveFilenameTemplateData() {
  28613. const optionsElement = this.doc.querySelector("script[" + SCRIPT_OPTIONS + "][type=\"application/json\"]");
  28614. if (!optionsElement) {
  28615. const optionsElement = this.doc.createElement("script");
  28616. optionsElement.type = "application/json";
  28617. optionsElement.setAttribute(SCRIPT_OPTIONS, "");
  28618. optionsElement.textContent = JSON$1.stringify({
  28619. saveUrl: this.options.url,
  28620. saveDate: this.options.saveDate.getTime(),
  28621. visitDate: this.options.visitDate.getTime(),
  28622. filenameTemplate: this.options.filenameTemplate,
  28623. filenameReplacedCharacters: this.options.filenameReplacedCharacters,
  28624. filenameReplacementCharacter: this.options.filenameReplacementCharacter,
  28625. filenameMaxLengthUnit: this.options.filenameMaxLengthUnit,
  28626. filenameMaxLength: this.options.filenameMaxLength,
  28627. replaceEmojisInFilename: this.options.replaceEmojisInFilename,
  28628. compressContent: this.options.compressContent,
  28629. selfExtractingArchive: this.options.selfExtractingArchive,
  28630. extractDataFromPage: this.options.extractDataFromPage,
  28631. referrer: this.options.referrer,
  28632. title: this.options.title,
  28633. info: this.options.info
  28634. });
  28635. if (this.doc.body.firstChild) {
  28636. this.doc.body.insertBefore(optionsElement, this.doc.body.firstChild);
  28637. } else {
  28638. this.doc.body.appendChild(optionsElement);
  28639. }
  28640. }
  28641. }
  28642. replaceStyleContents() {
  28643. if (this.options.stylesheets) {
  28644. this.doc.querySelectorAll("style").forEach((styleElement, styleIndex) => {
  28645. const attributeValue = styleElement.getAttribute(util.STYLESHEET_ATTRIBUTE_NAME);
  28646. if (attributeValue) {
  28647. const stylesheetContent = this.options.stylesheets[Number(styleIndex)];
  28648. if (stylesheetContent) {
  28649. styleElement.textContent = stylesheetContent;
  28650. }
  28651. }
  28652. });
  28653. }
  28654. if (this.options.adoptedStyleSheets && this.options.adoptedStyleSheets.length) {
  28655. const styleElement = this.doc.createElement("style");
  28656. styleElement.textContent = this.options.adoptedStyleSheets.join("\n");
  28657. this.doc.body.appendChild(styleElement);
  28658. }
  28659. }
  28660. removeUnselectedElements() {
  28661. removeUnmarkedElements(this.doc.body);
  28662. this.doc.body.removeAttribute(util.SELECTED_CONTENT_ATTRIBUTE_NAME);
  28663. function removeUnmarkedElements(element) {
  28664. let selectedElementFound = false;
  28665. Array.from(element.childNodes).forEach(node => {
  28666. if (node.nodeType == 1) {
  28667. const isSelectedElement = node.getAttribute(util.SELECTED_CONTENT_ATTRIBUTE_NAME) == "";
  28668. selectedElementFound = selectedElementFound || isSelectedElement;
  28669. if (isSelectedElement) {
  28670. node.removeAttribute(util.SELECTED_CONTENT_ATTRIBUTE_NAME);
  28671. removeUnmarkedElements(node);
  28672. } else if (selectedElementFound) {
  28673. removeNode(node);
  28674. } else {
  28675. hideNode(node);
  28676. }
  28677. }
  28678. });
  28679. }
  28680. function removeNode(node) {
  28681. if ((node.nodeType != 1 || !node.querySelector("svg,style,link")) && canHideNode(node)) {
  28682. node.remove();
  28683. } else {
  28684. hideNode(node);
  28685. }
  28686. }
  28687. function hideNode(node) {
  28688. if (canHideNode(node)) {
  28689. node.style.setProperty("display", "none", "important");
  28690. node.removeAttribute("src");
  28691. node.removeAttribute("srcset");
  28692. node.removeAttribute("srcdoc");
  28693. Array.from(node.childNodes).forEach(removeNode);
  28694. }
  28695. }
  28696. function canHideNode(node) {
  28697. if (node.nodeType == 1) {
  28698. const tagName = node.tagName && node.tagName.toUpperCase();
  28699. return tagName != "SVG" && tagName != "STYLE" && tagName != "LINK";
  28700. }
  28701. }
  28702. }
  28703. insertVideoPosters() {
  28704. if (this.options.posters) {
  28705. this.doc.querySelectorAll("video, video > source").forEach(element => {
  28706. let videoElement;
  28707. if (element.tagName.toUpperCase() == "VIDEO") {
  28708. videoElement = element;
  28709. } else {
  28710. videoElement = element.parentElement;
  28711. }
  28712. const attributeValue = element.getAttribute(util.POSTER_ATTRIBUTE_NAME);
  28713. if (attributeValue) {
  28714. const posterURL = this.options.posters[Number(attributeValue)];
  28715. if (!videoElement.getAttribute("poster") && posterURL) {
  28716. videoElement.setAttribute("poster", posterURL);
  28717. }
  28718. }
  28719. });
  28720. }
  28721. }
  28722. insertVideoLinks() {
  28723. const LINK_ICON = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC";
  28724. const ICON_SIZE = "16px";
  28725. this.doc.querySelectorAll("video").forEach(videoElement => {
  28726. const attributeValue = videoElement.getAttribute(util.VIDEO_ATTRIBUTE_NAME);
  28727. if (attributeValue) {
  28728. const videoData = this.options.videos[Number(attributeValue)];
  28729. const src = videoData.src || videoElement.src;
  28730. if (videoElement && src) {
  28731. const linkElement = this.doc.createElement("a");
  28732. const imgElement = this.doc.createElement("img");
  28733. linkElement.href = src;
  28734. linkElement.target = "_blank";
  28735. linkElement.style.setProperty("z-index", 2147483647, "important");
  28736. linkElement.style.setProperty("position", "absolute", "important");
  28737. linkElement.style.setProperty("top", "8px", "important");
  28738. linkElement.style.setProperty("left", "8px", "important");
  28739. linkElement.style.setProperty("width", ICON_SIZE, "important");
  28740. linkElement.style.setProperty("height", ICON_SIZE, "important");
  28741. linkElement.style.setProperty("min-width", ICON_SIZE, "important");
  28742. linkElement.style.setProperty("min-height", ICON_SIZE, "important");
  28743. linkElement.style.setProperty("max-width", ICON_SIZE, "important");
  28744. linkElement.style.setProperty("max-height", ICON_SIZE, "important");
  28745. imgElement.src = LINK_ICON;
  28746. imgElement.style.setProperty("width", ICON_SIZE, "important");
  28747. imgElement.style.setProperty("height", ICON_SIZE, "important");
  28748. imgElement.style.setProperty("min-width", ICON_SIZE, "important");
  28749. imgElement.style.setProperty("min-height", ICON_SIZE, "important");
  28750. imgElement.style.setProperty("max-width", ICON_SIZE, "important");
  28751. imgElement.style.setProperty("max-height", ICON_SIZE, "important");
  28752. linkElement.appendChild(imgElement);
  28753. videoElement.insertAdjacentElement("afterend", linkElement);
  28754. const positionInlineParent = videoElement.parentNode.style.getPropertyValue("position");
  28755. if ((!videoData.positionParent && (!positionInlineParent || positionInlineParent != "static")) || videoData.positionParent == "static") {
  28756. videoElement.parentNode.style.setProperty("position", "relative", "important");
  28757. }
  28758. }
  28759. }
  28760. });
  28761. }
  28762. removeFrames() {
  28763. const frameElements = this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]");
  28764. this.stats.set("discarded", "frames", frameElements.length);
  28765. this.stats.set("processed", "frames", frameElements.length);
  28766. this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]").forEach(element => element.remove());
  28767. }
  28768. removeEmbedScripts() {
  28769. const JAVASCRIPT_URI_PREFIX = "javascript:";
  28770. const DISABLED_SCRIPT = "javascript:void(0)";
  28771. this.onEventAttributeNames.forEach(attributeName => this.doc.querySelectorAll("[" + attributeName + "]").forEach(element => element.removeAttribute(attributeName)));
  28772. this.doc.querySelectorAll("[href]").forEach(element => {
  28773. if (element.href && element.href.match && element.href.trim().startsWith(JAVASCRIPT_URI_PREFIX)) {
  28774. element.setAttribute("href", DISABLED_SCRIPT);
  28775. }
  28776. });
  28777. this.doc.querySelectorAll("[src]").forEach(element => {
  28778. if (element.src && element.src.trim().startsWith(JAVASCRIPT_URI_PREFIX)) {
  28779. element.setAttribute("src", DISABLED_SCRIPT);
  28780. }
  28781. });
  28782. const scriptElements = this.doc.querySelectorAll("script:not([type=\"application/ld+json\"]):not([" + SCRIPT_TEMPLATE_SHADOW_ROOT + "]):not([" + SCRIPT_OPTIONS + "])");
  28783. this.stats.set("discarded", "scripts", scriptElements.length);
  28784. this.stats.set("processed", "scripts", scriptElements.length);
  28785. scriptElements.forEach(element => element.remove());
  28786. }
  28787. removeDiscardedResources() {
  28788. this.doc.querySelectorAll("." + util.SINGLE_FILE_UI_ELEMENT_CLASS).forEach(element => element.remove());
  28789. const noscriptPlaceholders = new Map$1();
  28790. this.doc.querySelectorAll("noscript").forEach(noscriptElement => {
  28791. const placeholderElement = this.doc.createElement("div");
  28792. placeholderElement.innerHTML = noscriptElement.dataset[util.NO_SCRIPT_PROPERTY_NAME];
  28793. noscriptElement.replaceWith(placeholderElement);
  28794. noscriptPlaceholders.set(placeholderElement, noscriptElement);
  28795. });
  28796. this.doc.querySelectorAll("meta[http-equiv=refresh], meta[disabled-http-equiv]").forEach(element => element.remove());
  28797. noscriptPlaceholders.forEach((noscriptElement, placeholderElement) => {
  28798. noscriptElement.dataset[util.NO_SCRIPT_PROPERTY_NAME] = placeholderElement.innerHTML;
  28799. placeholderElement.replaceWith(noscriptElement);
  28800. });
  28801. this.doc.querySelectorAll("meta[http-equiv=\"content-security-policy\"]").forEach(element => element.remove());
  28802. const objectElements = this.doc.querySelectorAll("applet, object[data]:not([type=\"image/svg+xml\"]):not([type=\"image/svg-xml\"]):not([type=\"text/html\"]):not([data*=\".svg\"]):not([data*=\".pdf\"]), embed[src]:not([src*=\".svg\"]):not([src*=\".pdf\"])");
  28803. this.stats.set("discarded", "objects", objectElements.length);
  28804. this.stats.set("processed", "objects", objectElements.length);
  28805. objectElements.forEach(element => element.remove());
  28806. const replacedAttributeValue = this.doc.querySelectorAll("link[rel~=preconnect], link[rel~=prerender], link[rel~=dns-prefetch], link[rel~=preload], link[rel~=manifest], link[rel~=prefetch], link[rel~=modulepreload]");
  28807. replacedAttributeValue.forEach(element => {
  28808. const relValue = element
  28809. .getAttribute("rel")
  28810. .replace(/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest|modulepreload)/g, "")
  28811. .trim();
  28812. if (relValue.length) {
  28813. element.setAttribute("rel", relValue);
  28814. } else {
  28815. element.remove();
  28816. }
  28817. });
  28818. this.processorHelper.removeUnusedStylesheets(this.doc);
  28819. this.doc.querySelectorAll("link[rel*=stylesheet]:not([href]),link[rel*=stylesheet][href=\"\"]").forEach(element => element.remove());
  28820. if (this.options.removeHiddenElements) {
  28821. this.doc.querySelectorAll("input[type=hidden]").forEach(element => element.remove());
  28822. }
  28823. if (!this.options.saveFavicon) {
  28824. this.doc.querySelectorAll("link[rel*=\"icon\"]").forEach(element => element.remove());
  28825. }
  28826. this.doc.querySelectorAll("a[ping]").forEach(element => element.removeAttribute("ping"));
  28827. this.doc.querySelectorAll("link[rel=import][href]").forEach(element => element.remove());
  28828. }
  28829. replaceInvalidElements() {
  28830. this.doc.querySelectorAll("template[" + util.INVALID_ELEMENT_ATTRIBUTE_NAME + "]").forEach(templateElement => {
  28831. const placeHolderElement = this.doc.createElement("span");
  28832. if (templateElement.content) {
  28833. const originalElement = templateElement.content.firstChild;
  28834. if (originalElement) {
  28835. if (originalElement.hasAttributes()) {
  28836. Array.from(originalElement.attributes).forEach(attribute => {
  28837. try {
  28838. placeHolderElement.setAttribute(attribute.name, attribute.value);
  28839. } catch (error) {
  28840. // ignored
  28841. }
  28842. });
  28843. }
  28844. originalElement.childNodes.forEach(childNode => placeHolderElement.appendChild(childNode.cloneNode(true)));
  28845. }
  28846. templateElement.replaceWith(placeHolderElement);
  28847. }
  28848. });
  28849. }
  28850. resetCharsetMeta() {
  28851. let charset;
  28852. this.doc.querySelectorAll("meta[charset], meta[http-equiv=\"content-type\"]").forEach(element => {
  28853. const charsetDeclaration = element.content.split(";")[1];
  28854. if (charsetDeclaration && !charset) {
  28855. charset = charsetDeclaration.split("=")[1];
  28856. if (charset) {
  28857. this.charset = charset.trim().toLowerCase();
  28858. }
  28859. }
  28860. element.remove();
  28861. });
  28862. const metaElement = this.doc.createElement("meta");
  28863. metaElement.setAttribute("charset", UTF8_CHARSET);
  28864. if (this.doc.head.firstChild) {
  28865. this.doc.head.insertBefore(metaElement, this.doc.head.firstChild);
  28866. } else {
  28867. this.doc.head.appendChild(metaElement);
  28868. }
  28869. }
  28870. resetReferrerMeta() {
  28871. this.doc.querySelectorAll("meta[name=referrer]").forEach(element => element.remove());
  28872. const metaElement = this.doc.createElement("meta");
  28873. metaElement.setAttribute("name", "referrer");
  28874. metaElement.setAttribute("content", "no-referrer");
  28875. this.doc.head.appendChild(metaElement);
  28876. }
  28877. setInputValues() {
  28878. this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach(input => {
  28879. const value = input.getAttribute(util.INPUT_VALUE_ATTRIBUTE_NAME);
  28880. input.setAttribute("value", value || "");
  28881. });
  28882. this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach(input => {
  28883. const value = input.getAttribute(util.INPUT_VALUE_ATTRIBUTE_NAME);
  28884. if (value == "true") {
  28885. input.setAttribute("checked", "");
  28886. }
  28887. });
  28888. this.doc.querySelectorAll("textarea").forEach(textarea => {
  28889. const value = textarea.getAttribute(util.INPUT_VALUE_ATTRIBUTE_NAME);
  28890. textarea.textContent = value || "";
  28891. });
  28892. this.doc.querySelectorAll("select").forEach(select => {
  28893. select.querySelectorAll("option").forEach(option => {
  28894. const selected = option.getAttribute(util.INPUT_VALUE_ATTRIBUTE_NAME) != null;
  28895. if (selected) {
  28896. option.setAttribute("selected", "");
  28897. }
  28898. });
  28899. });
  28900. }
  28901. moveStylesInHead() {
  28902. this.doc.querySelectorAll("style").forEach(stylesheet => {
  28903. if (stylesheet.getAttribute(util.STYLE_ATTRIBUTE_NAME) == "") {
  28904. this.doc.head.appendChild(stylesheet);
  28905. }
  28906. });
  28907. }
  28908. saveFavicon() {
  28909. let faviconElement = this.doc.querySelector("link[href][rel=\"shortcut icon\"]");
  28910. if (!faviconElement) {
  28911. faviconElement = this.doc.querySelector("link[href][rel=\"icon\"]");
  28912. }
  28913. if (!faviconElement) {
  28914. faviconElement = this.doc.createElement("link");
  28915. faviconElement.setAttribute("type", "image/x-icon");
  28916. faviconElement.setAttribute("rel", "shortcut icon");
  28917. faviconElement.setAttribute("href", "/favicon.ico");
  28918. }
  28919. this.doc.head.appendChild(faviconElement);
  28920. }
  28921. saveScrollPosition() {
  28922. if (this.options.scrollPosition && this.options.scrolling == "no" && (this.options.scrollPosition.x || this.options.scrollPosition.y)) {
  28923. const scriptElement = this.doc.createElement("script");
  28924. scriptElement.textContent = "document.currentScript.remove();addEventListener(\"load\",()=>scrollTo(" + this.options.scrollPosition.x + "," + this.options.scrollPosition.y + "))";
  28925. this.doc.body.appendChild(scriptElement);
  28926. }
  28927. }
  28928. replaceCanvasElements() {
  28929. if (this.options.canvases) {
  28930. this.doc.querySelectorAll("canvas").forEach(canvasElement => {
  28931. const attributeValue = canvasElement.getAttribute(util.CANVAS_ATTRIBUTE_NAME);
  28932. if (attributeValue) {
  28933. const canvasData = this.options.canvases[Number(attributeValue)];
  28934. if (canvasData) {
  28935. const backgroundStyle = {};
  28936. if (canvasData.backgroundColor) {
  28937. backgroundStyle["background-color"] = canvasData.backgroundColor;
  28938. }
  28939. this.processorHelper.setBackgroundImage(canvasElement, "url(" + canvasData.dataURI + ")", backgroundStyle);
  28940. this.stats.add("processed", "canvas", 1);
  28941. }
  28942. }
  28943. });
  28944. }
  28945. }
  28946. insertFonts() {
  28947. if (this.options.fonts && this.options.fonts.length) {
  28948. let firstStylesheet = this.doc.querySelector("style, link[rel=stylesheet]"), previousStyleElement;
  28949. this.options.fonts.forEach(fontData => {
  28950. if (fontData["font-family"] && fontData.src) {
  28951. let stylesheetContent = "@font-face{";
  28952. let stylesContent = "";
  28953. Object.keys(fontData).forEach(fontStyle => {
  28954. if (stylesContent) {
  28955. stylesContent += ";";
  28956. }
  28957. stylesContent += fontStyle + ":" + fontData[fontStyle];
  28958. });
  28959. stylesheetContent += stylesContent + "}";
  28960. const styleElement = this.doc.createElement("style");
  28961. styleElement.textContent = stylesheetContent;
  28962. if (previousStyleElement) {
  28963. previousStyleElement.insertAdjacentElement("afterend", styleElement);
  28964. } else if (firstStylesheet) {
  28965. firstStylesheet.parentElement.insertBefore(styleElement, firstStylesheet);
  28966. } else {
  28967. this.doc.head.appendChild(styleElement);
  28968. }
  28969. previousStyleElement = styleElement;
  28970. }
  28971. });
  28972. }
  28973. }
  28974. removeHiddenElements() {
  28975. const hiddenElements = this.doc.querySelectorAll("[" + util.HIDDEN_CONTENT_ATTRIBUTE_NAME + "]");
  28976. const removedElements = this.doc.querySelectorAll("[" + util.REMOVED_CONTENT_ATTRIBUTE_NAME + "]");
  28977. this.stats.set("discarded", "hidden elements", removedElements.length);
  28978. this.stats.set("processed", "hidden elements", removedElements.length);
  28979. if (hiddenElements.length) {
  28980. const className = "sf-hidden";
  28981. const stylesheetContent = "." + className + "{display:none!important}";
  28982. let foundStylesheet = false;
  28983. this.doc.querySelectorAll("style").forEach(styleElement => {
  28984. if (styleElement.textContent == stylesheetContent) {
  28985. foundStylesheet = true;
  28986. }
  28987. });
  28988. if (!foundStylesheet) {
  28989. const styleElement = this.doc.createElement("style");
  28990. styleElement.textContent = stylesheetContent;
  28991. this.doc.head.appendChild(styleElement);
  28992. }
  28993. hiddenElements.forEach(element => {
  28994. if (element.style.getPropertyValue("display") != "none") {
  28995. if (element.style.getPropertyPriority("display") == "important") {
  28996. element.style.setProperty("display", "none", "important");
  28997. } else if (!element.classList.contains(className)) {
  28998. element.classList.add(className);
  28999. }
  29000. }
  29001. });
  29002. }
  29003. removedElements.forEach(element => element.remove());
  29004. }
  29005. resolveHrefs() {
  29006. this.doc.querySelectorAll("a[href], area[href], link[href]").forEach(element => {
  29007. const href = element.getAttribute("href").trim();
  29008. if (element.tagName.toUpperCase() == "LINK" && element.rel.includes("stylesheet")) {
  29009. if (this.options.saveOriginalURLs && !isDataURL(href)) {
  29010. element.setAttribute("data-sf-original-href", href);
  29011. }
  29012. }
  29013. if (!testIgnoredPath(href)) {
  29014. let resolvedURL;
  29015. try {
  29016. resolvedURL = util.resolveURL(href, this.options.baseURI || this.options.url);
  29017. } catch (error) {
  29018. // ignored
  29019. }
  29020. if (resolvedURL) {
  29021. const url = normalizeURL(this.options.url);
  29022. if (resolvedURL.startsWith(url + "#") && !resolvedURL.startsWith(url + "#!") && !this.options.resolveFragmentIdentifierURLs) {
  29023. resolvedURL = resolvedURL.substring(url.length);
  29024. }
  29025. try {
  29026. element.setAttribute("href", resolvedURL);
  29027. } catch (error) {
  29028. // ignored
  29029. }
  29030. }
  29031. }
  29032. });
  29033. }
  29034. async insertMissingVideoPosters() {
  29035. await Promise.all(Array.from(this.doc.querySelectorAll("video[src], video > source[src]")).map(async element => {
  29036. let videoElement;
  29037. if (element.tagName.toUpperCase() == "VIDEO") {
  29038. videoElement = element;
  29039. } else {
  29040. videoElement = element.parentElement;
  29041. }
  29042. if (!videoElement.poster) {
  29043. const attributeValue = videoElement.getAttribute(util.VIDEO_ATTRIBUTE_NAME);
  29044. if (attributeValue) {
  29045. const videoData = this.options.videos[Number(attributeValue)];
  29046. const src = videoData.src || videoElement.src;
  29047. if (src) {
  29048. const temporaryVideoElement = this.doc.createElement("video");
  29049. temporaryVideoElement.src = src;
  29050. temporaryVideoElement.style.setProperty("width", videoData.size.pxWidth + "px", "important");
  29051. temporaryVideoElement.style.setProperty("height", videoData.size.pxHeight + "px", "important");
  29052. temporaryVideoElement.style.setProperty("display", "none", "important");
  29053. temporaryVideoElement.crossOrigin = "anonymous";
  29054. const canvasElement = this.doc.createElement("canvas");
  29055. const context = canvasElement.getContext("2d");
  29056. this.options.doc.body.appendChild(temporaryVideoElement);
  29057. return new Promise(resolve => {
  29058. temporaryVideoElement.currentTime = videoData.currentTime;
  29059. temporaryVideoElement.oncanplay = () => {
  29060. canvasElement.width = videoData.size.pxWidth;
  29061. canvasElement.height = videoData.size.pxHeight;
  29062. context.drawImage(temporaryVideoElement, 0, 0, canvasElement.width, canvasElement.height);
  29063. try {
  29064. videoElement.poster = canvasElement.toDataURL("image/png", "");
  29065. } catch (error) {
  29066. // ignored
  29067. }
  29068. temporaryVideoElement.remove();
  29069. resolve();
  29070. };
  29071. temporaryVideoElement.onerror = () => {
  29072. temporaryVideoElement.remove();
  29073. resolve();
  29074. };
  29075. });
  29076. }
  29077. }
  29078. }
  29079. }));
  29080. }
  29081. resolveStyleAttributeURLs() {
  29082. this.doc.querySelectorAll("[style]").forEach(element => {
  29083. if (this.options.blockStylesheets) {
  29084. element.removeAttribute("style");
  29085. } else {
  29086. const styleContent = element.getAttribute("style");
  29087. const declarationList = db(styleContent, { context: "declarationList", parseCustomProperty: true });
  29088. this.processorHelper.resolveStylesheetURLs(declarationList, this.baseURI, this.workStyleElement);
  29089. this.styles.set(element, declarationList);
  29090. }
  29091. });
  29092. }
  29093. async resolveStylesheetsURLs() {
  29094. await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map(async element => {
  29095. const options = Object.assign({}, this.options, { charset: this.charset });
  29096. let mediaText;
  29097. if (element.media) {
  29098. mediaText = element.media.toLowerCase();
  29099. }
  29100. const scoped = Boolean(element.closest("[" + SHADOWROOT_ATTRIBUTE_NAME + "]"));
  29101. const stylesheetInfo = {
  29102. mediaText,
  29103. scoped
  29104. };
  29105. await this.processorHelper.processLinkElement(element, stylesheetInfo, this.stylesheets, this.baseURI, options, this.workStyleElement, this.resources);
  29106. }));
  29107. if (this.options.rootDocument) {
  29108. const newResources = Object.keys(this.options.updatedResources)
  29109. .filter(url => this.options.updatedResources[url].type == "stylesheet" && !this.options.updatedResources[url].retrieved)
  29110. .map(url => this.options.updatedResources[url]);
  29111. await Promise.all(newResources.map(async resource => {
  29112. resource.retrieved = true;
  29113. if (!this.options.blockStylesheets) {
  29114. const stylesheetInfo = {};
  29115. const element = this.doc.createElement("style");
  29116. this.doc.body.appendChild(element);
  29117. element.textContent = resource.content;
  29118. await this.processorHelper.processStylesheetElement(element, stylesheetInfo, this.stylesheets, this.baseURI, this.options, this.workStyleElement, this.resources);
  29119. }
  29120. }));
  29121. }
  29122. }
  29123. async resolveFrameURLs() {
  29124. const processorHelper = this.processorHelper;
  29125. if (!this.options.saveRawPage) {
  29126. const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
  29127. await Promise.all(frameElements.map(async frameElement => {
  29128. if (frameElement.tagName.toUpperCase() == "OBJECT") {
  29129. frameElement.setAttribute("data", "data:text/html,");
  29130. } else {
  29131. const src = frameElement.getAttribute("src");
  29132. if (this.options.saveOriginalURLs && src && !isDataURL(src)) {
  29133. frameElement.setAttribute("data-sf-original-src", src);
  29134. }
  29135. frameElement.removeAttribute("src");
  29136. frameElement.removeAttribute("srcdoc");
  29137. }
  29138. Array.from(frameElement.childNodes).forEach(node => node.remove());
  29139. const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
  29140. if (this.options.frames && frameWindowId) {
  29141. const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);
  29142. if (frameData) {
  29143. await initializeProcessor(frameData, frameElement, frameWindowId, this.batchRequest, Object.create(this.options));
  29144. }
  29145. }
  29146. }));
  29147. }
  29148. async function initializeProcessor(frameData, frameElement, frameWindowId, batchRequest, options) {
  29149. options.insertSingleFileComment = false;
  29150. options.insertCanonicalLink = false;
  29151. options.insertMetaNoIndex = false;
  29152. options.saveFavicon = false;
  29153. options.includeInfobar = false;
  29154. options.saveFilenameTemplateData = false;
  29155. options.selected = false;
  29156. options.embeddedImage = null;
  29157. options.url = frameData.baseURI;
  29158. options.windowId = frameWindowId;
  29159. if (frameData.content) {
  29160. options.content = frameData.content;
  29161. options.canvases = frameData.canvases;
  29162. options.fonts = frameData.fonts;
  29163. options.stylesheets = frameData.stylesheets;
  29164. options.images = frameData.images;
  29165. options.posters = frameData.posters;
  29166. options.videos = frameData.videos;
  29167. options.usedFonts = frameData.usedFonts;
  29168. options.shadowRoots = frameData.shadowRoots;
  29169. options.scrollPosition = frameData.scrollPosition;
  29170. options.scrolling = frameData.scrolling;
  29171. options.adoptedStyleSheets = frameData.adoptedStyleSheets;
  29172. frameData.runner = new Runner(options, processorHelper);
  29173. frameData.frameElement = frameElement;
  29174. await frameData.runner.loadPage();
  29175. await frameData.runner.initialize();
  29176. frameData.maxResources = batchRequest.getMaxResources();
  29177. }
  29178. }
  29179. }
  29180. insertShadowRootContents() {
  29181. const doc = this.doc;
  29182. const options = this.options;
  29183. if (options.shadowRoots && options.shadowRoots.length) {
  29184. processElement(this.doc);
  29185. }
  29186. function processElement(element) {
  29187. const shadowRootElements = Array.from(element.querySelectorAll("[" + util.SHADOW_ROOT_ATTRIBUTE_NAME + "]"));
  29188. shadowRootElements.forEach(element => {
  29189. const attributeValue = element.getAttribute(util.SHADOW_ROOT_ATTRIBUTE_NAME);
  29190. if (attributeValue) {
  29191. const shadowRootData = options.shadowRoots[Number(attributeValue)];
  29192. if (shadowRootData) {
  29193. const templateElement = doc.createElement("template");
  29194. templateElement.setAttribute(SHADOWROOT_ATTRIBUTE_NAME, shadowRootData.mode);
  29195. if (shadowRootData.adoptedStyleSheets && shadowRootData.adoptedStyleSheets.length) {
  29196. shadowRootData.adoptedStyleSheets.forEach(stylesheetContent => {
  29197. const styleElement = doc.createElement("style");
  29198. styleElement.textContent = stylesheetContent;
  29199. templateElement.appendChild(styleElement);
  29200. });
  29201. }
  29202. const shadowDoc = util.parseDocContent(shadowRootData.content);
  29203. if (shadowDoc.head) {
  29204. const metaCharset = shadowDoc.head.querySelector("meta[charset]");
  29205. if (metaCharset) {
  29206. metaCharset.remove();
  29207. }
  29208. shadowDoc.head.childNodes.forEach(node => templateElement.appendChild(shadowDoc.importNode(node, true)));
  29209. }
  29210. if (shadowDoc.body) {
  29211. shadowDoc.body.childNodes.forEach(node => templateElement.appendChild(shadowDoc.importNode(node, true)));
  29212. }
  29213. processElement(templateElement);
  29214. if (element.firstChild) {
  29215. element.insertBefore(templateElement, element.firstChild);
  29216. } else {
  29217. element.appendChild(templateElement);
  29218. }
  29219. }
  29220. }
  29221. });
  29222. }
  29223. }
  29224. removeUnusedStyles() {
  29225. if (!this.mediaAllInfo) {
  29226. this.mediaAllInfo = util.getMediaAllInfo(this.doc, this.stylesheets, this.styles);
  29227. }
  29228. const stats = util.minifyCSSRules(this.stylesheets, this.styles, this.mediaAllInfo);
  29229. this.stats.set("processed", "CSS rules", stats.processed);
  29230. this.stats.set("discarded", "CSS rules", stats.discarded);
  29231. }
  29232. removeUnusedFonts() {
  29233. util.removeUnusedFonts(this.doc, this.stylesheets, this.styles, this.options);
  29234. }
  29235. removeAlternativeMedias() {
  29236. const stats = util.minifyMedias(this.stylesheets);
  29237. this.stats.set("processed", "medias", stats.processed);
  29238. this.stats.set("discarded", "medias", stats.discarded);
  29239. }
  29240. async processStylesheets() {
  29241. await Promise.all([...this.stylesheets].map(([, stylesheetInfo]) =>
  29242. this.processorHelper.processStylesheet(stylesheetInfo.stylesheet.children, this.baseURI, this.options, this.resources, this.batchRequest)
  29243. ));
  29244. }
  29245. async processStyleAttributes() {
  29246. return Promise.all([...this.styles].map(([, stylesheet]) =>
  29247. this.processorHelper.processStyle(stylesheet, this.options, this.resources, this.batchRequest)
  29248. ));
  29249. }
  29250. async processPageResources() {
  29251. await this.processorHelper.processPageResources(this.doc, this.baseURI, this.options, this.resources, this.styles, this.batchRequest);
  29252. }
  29253. async processScripts() {
  29254. await Promise.all(Array.from(this.doc.querySelectorAll("script[src]")).map(async element => {
  29255. let resourceURL;
  29256. let scriptSrc;
  29257. scriptSrc = element.getAttribute("src");
  29258. if (this.options.saveOriginalURLs && !isDataURL(scriptSrc)) {
  29259. element.setAttribute("data-sf-original-src", scriptSrc);
  29260. }
  29261. element.removeAttribute("integrity");
  29262. if (!this.options.blockScripts) {
  29263. element.textContent = "";
  29264. try {
  29265. resourceURL = util.resolveURL(scriptSrc, this.baseURI);
  29266. } catch (error) {
  29267. // ignored
  29268. }
  29269. if (testValidURL(resourceURL)) {
  29270. element.removeAttribute("src");
  29271. await this.processorHelper.processScript(element, resourceURL, this.options, this.charset, this.batchRequest, this.resources);
  29272. if (element.getAttribute("async") == "async" || element.getAttribute(util.ASYNC_SCRIPT_ATTRIBUTE_NAME) == "") {
  29273. element.setAttribute("async", "");
  29274. }
  29275. }
  29276. } else {
  29277. element.removeAttribute("src");
  29278. }
  29279. this.stats.add("processed", "scripts", 1);
  29280. }));
  29281. }
  29282. removeAlternativeImages() {
  29283. util.removeAlternativeImages(this.doc);
  29284. }
  29285. async removeAlternativeFonts() {
  29286. await this.processorHelper.removeAlternativeFonts(this.doc, this.stylesheets, this.resources.fonts, this.options.fontTests);
  29287. }
  29288. async processFrames() {
  29289. if (this.options.frames) {
  29290. const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
  29291. await Promise.all(frameElements.map(async frameElement => {
  29292. const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
  29293. if (frameWindowId) {
  29294. const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);
  29295. if (frameData) {
  29296. this.options.frames = this.options.frames.filter(frame => frame.windowId != frameWindowId);
  29297. if (frameData.runner && frameElement.getAttribute(util.HIDDEN_FRAME_ATTRIBUTE_NAME) != "") {
  29298. this.stats.add("processed", "frames", 1);
  29299. await frameData.runner.run();
  29300. const pageData = await frameData.runner.getPageData();
  29301. frameElement.removeAttribute(util.WIN_ID_ATTRIBUTE_NAME);
  29302. this.processorHelper.processFrame(frameElement, pageData, this.resources, frameWindowId, frameData);
  29303. this.stats.addAll(pageData);
  29304. } else {
  29305. frameElement.removeAttribute(util.WIN_ID_ATTRIBUTE_NAME);
  29306. this.stats.add("discarded", "frames", 1);
  29307. }
  29308. }
  29309. }
  29310. }));
  29311. }
  29312. }
  29313. replaceStylesheets() {
  29314. this.processorHelper.replaceStylesheets(this.doc, this.stylesheets, this.options, this.resources);
  29315. }
  29316. replaceStyleAttributes() {
  29317. this.doc.querySelectorAll("[style]").forEach(element => {
  29318. const declarationList = this.styles.get(element);
  29319. if (declarationList) {
  29320. this.styles.delete(element);
  29321. element.setAttribute("style", this.processorHelper.generateStylesheetContent(declarationList, this.options));
  29322. } else {
  29323. element.setAttribute("style", "");
  29324. }
  29325. });
  29326. }
  29327. insertVariables() {
  29328. const { cssVariables } = this.resources;
  29329. if (cssVariables.size) {
  29330. const styleElement = this.doc.createElement("style");
  29331. const firstStyleElement = this.doc.head.querySelector("style");
  29332. if (firstStyleElement) {
  29333. this.doc.head.insertBefore(styleElement, firstStyleElement);
  29334. } else {
  29335. this.doc.head.appendChild(styleElement);
  29336. }
  29337. let stylesheetContent = "";
  29338. cssVariables.forEach(({ content, url }, indexResource) => {
  29339. cssVariables.delete(indexResource);
  29340. if (stylesheetContent) {
  29341. stylesheetContent += ";";
  29342. }
  29343. stylesheetContent += `${SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource}: `;
  29344. if (this.options.saveOriginalURLs) {
  29345. stylesheetContent += `/* original URL: ${url} */ `;
  29346. }
  29347. stylesheetContent += `url("${content}")`;
  29348. });
  29349. styleElement.textContent = ":root{" + stylesheetContent + "}";
  29350. }
  29351. }
  29352. compressHTML() {
  29353. let size;
  29354. if (this.options.displayStats) {
  29355. size = util.getContentSize(this.doc.documentElement.outerHTML);
  29356. }
  29357. util.minifyHTML(this.doc, { PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME: util.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME });
  29358. if (this.options.displayStats) {
  29359. this.stats.add("discarded", "HTML bytes", size - util.getContentSize(this.doc.documentElement.outerHTML));
  29360. }
  29361. }
  29362. cleanupPage() {
  29363. this.doc.querySelectorAll("base").forEach(element => element.remove());
  29364. const metaCharset = this.doc.head.querySelector("meta[charset]");
  29365. if (metaCharset) {
  29366. this.doc.head.insertBefore(metaCharset, this.doc.head.firstChild);
  29367. if (this.doc.head.querySelectorAll("*").length == 1 && this.doc.body.childNodes.length == 0) {
  29368. this.doc.head.querySelector("meta[charset]").remove();
  29369. }
  29370. }
  29371. }
  29372. resetZoomLevel() {
  29373. const transform = this.doc.documentElement.style.getPropertyValue("-sf-transform");
  29374. const transformPriority = this.doc.documentElement.style.getPropertyPriority("-sf-transform");
  29375. const transformOrigin = this.doc.documentElement.style.getPropertyValue("-sf-transform-origin");
  29376. const transformOriginPriority = this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin");
  29377. const minHeight = this.doc.documentElement.style.getPropertyValue("-sf-min-height");
  29378. const minHeightPriority = this.doc.documentElement.style.getPropertyPriority("-sf-min-height");
  29379. this.doc.documentElement.style.setProperty("transform", transform, transformPriority);
  29380. this.doc.documentElement.style.setProperty("transform-origin", transformOrigin, transformOriginPriority);
  29381. this.doc.documentElement.style.setProperty("min-height", minHeight, minHeightPriority);
  29382. this.doc.documentElement.style.removeProperty("-sf-transform");
  29383. this.doc.documentElement.style.removeProperty("-sf-transform-origin");
  29384. this.doc.documentElement.style.removeProperty("-sf-min-height");
  29385. }
  29386. async insertMAFFMetaData() {
  29387. const maffMetaData = await this.maffMetaDataPromise;
  29388. if (maffMetaData && maffMetaData.content) {
  29389. const NAMESPACE_RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
  29390. const maffDoc = util.parseXMLContent(maffMetaData.content);
  29391. const originalURLElement = maffDoc.querySelector("RDF > Description > originalurl");
  29392. const archiveTimeElement = maffDoc.querySelector("RDF > Description > archivetime");
  29393. if (originalURLElement) {
  29394. this.options.saveUrl = originalURLElement.getAttributeNS(NAMESPACE_RDF, "resource");
  29395. }
  29396. if (archiveTimeElement) {
  29397. const value = archiveTimeElement.getAttributeNS(NAMESPACE_RDF, "resource");
  29398. if (value) {
  29399. const date = new Date(value);
  29400. if (!isNaN(date.getTime())) {
  29401. this.options.saveDate = new Date(value);
  29402. }
  29403. }
  29404. }
  29405. }
  29406. }
  29407. async setDocInfo() {
  29408. const titleElement = this.doc.querySelector("title");
  29409. const descriptionElement = this.doc.querySelector("meta[name=description]");
  29410. const authorElement = this.doc.querySelector("meta[name=author]");
  29411. const creatorElement = this.doc.querySelector("meta[name=creator]");
  29412. const publisherElement = this.doc.querySelector("meta[name=publisher]");
  29413. const headingElement = this.doc.querySelector("h1");
  29414. this.options.title = titleElement ? titleElement.textContent.trim() : "";
  29415. this.options.info = {
  29416. description: descriptionElement && descriptionElement.content ? descriptionElement.content.trim() : "",
  29417. lang: this.doc.documentElement.lang,
  29418. author: authorElement && authorElement.content ? authorElement.content.trim() : "",
  29419. creator: creatorElement && creatorElement.content ? creatorElement.content.trim() : "",
  29420. publisher: publisherElement && publisherElement.content ? publisherElement.content.trim() : "",
  29421. heading: headingElement && headingElement.textContent ? headingElement.textContent.trim() : ""
  29422. };
  29423. this.options.infobarContent = await util.evalTemplate(this.options.infobarTemplate, this.options, null, this.doc, true);
  29424. }
  29425. }
  29426. // ----
  29427. // Util
  29428. // ----
  29429. const DATA_URI_PREFIX = "data:";
  29430. const ABOUT_BLANK_URI = "about:blank";
  29431. const BLOB_URI_PREFIX = "blob:";
  29432. const HTTP_URI_PREFIX = /^https?:\/\//;
  29433. const FILE_URI_PREFIX = /^file:\/\//;
  29434. const EMPTY_URL = /^https?:\/\/+\s*$/;
  29435. const NOT_EMPTY_URL = /^(https?:\/\/|file:\/\/|blob:).+/;
  29436. const SINGLE_FILE_VARIABLE_NAME_PREFIX = "--sf-img-";
  29437. function normalizeURL(url) {
  29438. if (!url || url.startsWith(DATA_URI_PREFIX)) {
  29439. return url;
  29440. } else {
  29441. return url.split("#")[0];
  29442. }
  29443. }
  29444. function getOnEventAttributeNames(doc) {
  29445. const element = doc.createElement("div");
  29446. const attributeNames = [];
  29447. for (const propertyName in element) {
  29448. if (propertyName.startsWith("on")) {
  29449. attributeNames.push(propertyName);
  29450. }
  29451. }
  29452. attributeNames.push("onunload");
  29453. return attributeNames;
  29454. }
  29455. function isDataURL(url) {
  29456. return url && (url.startsWith(DATA_URI_PREFIX) || url.startsWith(BLOB_URI_PREFIX));
  29457. }
  29458. function testIgnoredPath(resourceURL) {
  29459. return resourceURL && (resourceURL.startsWith(DATA_URI_PREFIX) || resourceURL == ABOUT_BLANK_URI);
  29460. }
  29461. function testValidPath(resourceURL) {
  29462. return resourceURL && !resourceURL.match(EMPTY_URL);
  29463. }
  29464. function testValidURL(resourceURL) {
  29465. return testValidPath(resourceURL) && (resourceURL.match(HTTP_URI_PREFIX) || resourceURL.match(FILE_URI_PREFIX) || resourceURL.startsWith(BLOB_URI_PREFIX)) && resourceURL.match(NOT_EMPTY_URL);
  29466. }
  29467. // -----
  29468. // Stats
  29469. // -----
  29470. const STATS_DEFAULT_VALUES = {
  29471. discarded: {
  29472. "HTML bytes": 0,
  29473. "hidden elements": 0,
  29474. scripts: 0,
  29475. objects: 0,
  29476. "audio sources": 0,
  29477. "video sources": 0,
  29478. frames: 0,
  29479. "CSS rules": 0,
  29480. canvas: 0,
  29481. stylesheets: 0,
  29482. resources: 0,
  29483. medias: 0
  29484. },
  29485. processed: {
  29486. "HTML bytes": 0,
  29487. "hidden elements": 0,
  29488. scripts: 0,
  29489. objects: 0,
  29490. "audio sources": 0,
  29491. "video sources": 0,
  29492. frames: 0,
  29493. "CSS rules": 0,
  29494. canvas: 0,
  29495. stylesheets: 0,
  29496. resources: 0,
  29497. medias: 0
  29498. }
  29499. };
  29500. class Stats {
  29501. constructor(options) {
  29502. this.options = options;
  29503. if (options.displayStats) {
  29504. this.data = JSON$1.parse(JSON$1.stringify(STATS_DEFAULT_VALUES));
  29505. }
  29506. }
  29507. set(type, subType, value) {
  29508. if (this.options.displayStats) {
  29509. this.data[type][subType] = value;
  29510. }
  29511. }
  29512. add(type, subType, value) {
  29513. if (this.options.displayStats) {
  29514. this.data[type][subType] += value;
  29515. }
  29516. }
  29517. addAll(pageData) {
  29518. if (this.options.displayStats) {
  29519. Object.keys(this.data.discarded).forEach(key => this.add("discarded", key, pageData.stats.discarded[key] || 0));
  29520. Object.keys(this.data.processed).forEach(key => this.add("processed", key, pageData.stats.processed[key] || 0));
  29521. }
  29522. }
  29523. }
  29524. /*
  29525. * Copyright 2010-2022 Gildas Lormeau
  29526. * contact : gildas.lormeau <at> gmail.com
  29527. *
  29528. * This file is part of SingleFile.
  29529. *
  29530. * The code in this file is free software: you can redistribute it and/or
  29531. * modify it under the terms of the GNU Affero General Public License
  29532. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  29533. * of the License, or (at your option) any later version.
  29534. *
  29535. * The code in this file is distributed in the hope that it will be useful,
  29536. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  29537. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  29538. * General Public License for more details.
  29539. *
  29540. * As additional permission under GNU AGPL version 3 section 7, you may
  29541. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  29542. * AGPL normally required by section 4, provided you include this license
  29543. * notice and a URL through which recipients can access the Corresponding
  29544. * Source.
  29545. */
  29546. const DEBUG = false;
  29547. const ONE_MB = 1024 * 1024;
  29548. const PREFIX_CONTENT_TYPE_TEXT = "text/";
  29549. const DEFAULT_REPLACED_CHARACTERS = ["~", "+", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\x00-\x1f", "\x7F"];
  29550. const DEFAULT_REPLACEMENT_CHARACTER = "_";
  29551. const CONTENT_TYPE_EXTENSIONS = {
  29552. "image/svg+xml": ".svg",
  29553. "image/png": ".png",
  29554. "image/gif": ".gif",
  29555. "image/tiff": ".tiff",
  29556. "image/bmp": ".bmp",
  29557. "image/x-icon": ".ico",
  29558. "image/heif": ".heif",
  29559. "image/heic": ".heic",
  29560. "image/avif": ".avif",
  29561. "image/apng": ".apng",
  29562. "image/jpeg": ".jpg",
  29563. "image/webp": ".webp",
  29564. "audio/mpeg": ".mp3",
  29565. "audio/ogg": ".ogg",
  29566. "audio/wav": ".wav",
  29567. "audio/webm": ".webm",
  29568. "video/3gpp": ".3gp",
  29569. "video/3gpp2": ".3g2",
  29570. "video/mpeg": ".mpeg",
  29571. "video/quicktime": ".mov",
  29572. "video/x-msvideo": ".avi",
  29573. "video/webm": ".webm",
  29574. "video/ogg": ".ogv",
  29575. "video/mp4": ".mp4",
  29576. "video/mp2t": ".ts",
  29577. "font/otf": ".otf",
  29578. "font/ttf": ".ttf",
  29579. "font/woff": ".woff",
  29580. "font/woff2": ".woff2",
  29581. "application/vnd.ms-fontobject": ".eot",
  29582. "font/collection": ".ttc"
  29583. };
  29584. const CONTENT_TYPE_OCTET_STREAM = "application/octet-stream";
  29585. const URL$1 = globalThis.URL;
  29586. const DOMParser$1 = globalThis.DOMParser;
  29587. const Blob$1 = globalThis.Blob;
  29588. const FileReader$1 = globalThis.FileReader;
  29589. const fetch$1 = (url, options) => globalThis.fetch(url, options);
  29590. const TextDecoder = globalThis.TextDecoder;
  29591. const URLSearchParams = globalThis.URLSearchParams;
  29592. function getInstance(utilOptions) {
  29593. utilOptions = utilOptions || {};
  29594. utilOptions.fetch = utilOptions.fetch || fetch$1;
  29595. utilOptions.frameFetch = utilOptions.frameFetch || utilOptions.fetch || fetch$1;
  29596. return {
  29597. getDoctypeString,
  29598. getFilenameExtension(resourceURL, replacedCharacters, replacementCharacter) {
  29599. let matchExtension;
  29600. try {
  29601. matchExtension = new URL$1(resourceURL).pathname.match(/(\.[^\\/.]*)$/);
  29602. } catch (error) {
  29603. // ignored
  29604. }
  29605. return ((matchExtension && matchExtension[1] && this.getValidFilename(matchExtension[1], replacedCharacters, replacementCharacter)) || "").toLowerCase();
  29606. },
  29607. getContentTypeExtension(contentType) {
  29608. return CONTENT_TYPE_EXTENSIONS[contentType] || "";
  29609. },
  29610. getContent,
  29611. parseURL(resourceURL, baseURI) {
  29612. if (baseURI === undefined) {
  29613. return new URL$1(resourceURL);
  29614. } else {
  29615. return new URL$1(resourceURL, baseURI);
  29616. }
  29617. },
  29618. resolveURL(resourceURL, baseURI) {
  29619. return this.parseURL(resourceURL, baseURI).href;
  29620. },
  29621. getSearchParams(searchParams) {
  29622. return Array.from(new URLSearchParams(searchParams));
  29623. },
  29624. getValidFilename(filename, replacedCharacters = DEFAULT_REPLACED_CHARACTERS, replacementCharacter = DEFAULT_REPLACEMENT_CHARACTER) {
  29625. replacedCharacters.forEach(replacedCharacter => filename = filename.replace(new RegExp("[" + replacedCharacter + "]+", "g"), replacementCharacter));
  29626. filename = filename
  29627. .replace(/\.\.\//g, "")
  29628. .replace(/^\/+/, "")
  29629. .replace(/\/+/g, "/")
  29630. .replace(/\/$/, "")
  29631. .replace(/\.$/, "")
  29632. .replace(/\.\//g, "." + replacementCharacter)
  29633. .replace(/\/\./g, "/" + replacementCharacter);
  29634. return filename;
  29635. },
  29636. parseDocContent(content, baseURI) {
  29637. const doc = (new DOMParser$1()).parseFromString(content, "text/html");
  29638. if (!doc.head) {
  29639. doc.documentElement.insertBefore(doc.createElement("HEAD"), doc.body);
  29640. }
  29641. let baseElement = doc.querySelector("base");
  29642. if (!baseElement || !baseElement.getAttribute("href")) {
  29643. if (baseElement) {
  29644. baseElement.remove();
  29645. }
  29646. baseElement = doc.createElement("base");
  29647. baseElement.setAttribute("href", baseURI);
  29648. doc.head.insertBefore(baseElement, doc.head.firstChild);
  29649. }
  29650. return doc;
  29651. },
  29652. parseXMLContent(content) {
  29653. return (new DOMParser$1()).parseFromString(content, "text/xml");
  29654. },
  29655. parseSVGContent(content) {
  29656. const doc = (new DOMParser$1()).parseFromString(content, "image/svg+xml");
  29657. if (doc.querySelector("parsererror")) {
  29658. return (new DOMParser$1()).parseFromString(content, "text/html");
  29659. } else {
  29660. return doc;
  29661. }
  29662. },
  29663. async digest(algo, text) {
  29664. return digest(algo, text);
  29665. },
  29666. getContentSize(content) {
  29667. return getContentSize(content);
  29668. },
  29669. formatFilename(content, doc, options) {
  29670. return formatFilename(content, doc, options);
  29671. },
  29672. getMimeType(options) {
  29673. return !options.compressContent || options.selfExtractingArchive ? "text/html" : "application/zip";
  29674. },
  29675. async evalTemplate(template, options, content, doc, dontReplaceSlash) {
  29676. return evalTemplate(template, options, content, doc, dontReplaceSlash);
  29677. },
  29678. minifyHTML(doc, options) {
  29679. return process$1(doc, options);
  29680. },
  29681. minifyCSSRules(stylesheets, styles, mediaAllInfo) {
  29682. return process$3(stylesheets, styles, mediaAllInfo);
  29683. },
  29684. removeUnusedFonts(doc, stylesheets, styles, options) {
  29685. return process$5(doc, stylesheets, styles, options);
  29686. },
  29687. getMediaAllInfo(doc, stylesheets, styles) {
  29688. return getMediaAllInfo(doc, stylesheets, styles);
  29689. },
  29690. compressCSS(content, options) {
  29691. return processString(content, options);
  29692. },
  29693. minifyMedias(stylesheets) {
  29694. return process$4(stylesheets);
  29695. },
  29696. removeAlternativeImages(doc) {
  29697. return process$2(doc);
  29698. },
  29699. parseSrcset(srcset) {
  29700. return process$6(srcset);
  29701. },
  29702. preProcessDoc(doc, win, options) {
  29703. return preProcessDoc(doc, win, options);
  29704. },
  29705. postProcessDoc(doc, markedElements, invalidElements) {
  29706. postProcessDoc(doc, markedElements, invalidElements);
  29707. },
  29708. serialize(doc, compressHTML) {
  29709. return process(doc, compressHTML);
  29710. },
  29711. removeQuotes(string) {
  29712. return removeQuotes$1(string);
  29713. },
  29714. appendInfobar(doc, options) {
  29715. return appendInfobar(doc, options);
  29716. },
  29717. findLast(array, callback) {
  29718. if (array.findLast && typeof array.findLast == "function") {
  29719. return array.findLast(callback);
  29720. } else {
  29721. let index = array.length;
  29722. while (index--) {
  29723. if (callback(array[index], index, array)) {
  29724. return array[index];
  29725. }
  29726. }
  29727. }
  29728. },
  29729. ON_BEFORE_CAPTURE_EVENT_NAME: ON_BEFORE_CAPTURE_EVENT_NAME,
  29730. ON_AFTER_CAPTURE_EVENT_NAME: ON_AFTER_CAPTURE_EVENT_NAME,
  29731. WIN_ID_ATTRIBUTE_NAME: WIN_ID_ATTRIBUTE_NAME,
  29732. REMOVED_CONTENT_ATTRIBUTE_NAME: REMOVED_CONTENT_ATTRIBUTE_NAME,
  29733. HIDDEN_CONTENT_ATTRIBUTE_NAME: HIDDEN_CONTENT_ATTRIBUTE_NAME,
  29734. HIDDEN_FRAME_ATTRIBUTE_NAME: HIDDEN_FRAME_ATTRIBUTE_NAME,
  29735. IMAGE_ATTRIBUTE_NAME: IMAGE_ATTRIBUTE_NAME,
  29736. POSTER_ATTRIBUTE_NAME: POSTER_ATTRIBUTE_NAME,
  29737. VIDEO_ATTRIBUTE_NAME: VIDEO_ATTRIBUTE_NAME,
  29738. CANVAS_ATTRIBUTE_NAME: CANVAS_ATTRIBUTE_NAME,
  29739. STYLE_ATTRIBUTE_NAME: STYLE_ATTRIBUTE_NAME,
  29740. INPUT_VALUE_ATTRIBUTE_NAME: INPUT_VALUE_ATTRIBUTE_NAME,
  29741. SHADOW_ROOT_ATTRIBUTE_NAME: SHADOW_ROOT_ATTRIBUTE_NAME,
  29742. PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME: PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME,
  29743. STYLESHEET_ATTRIBUTE_NAME: STYLESHEET_ATTRIBUTE_NAME,
  29744. SELECTED_CONTENT_ATTRIBUTE_NAME: SELECTED_CONTENT_ATTRIBUTE_NAME,
  29745. INVALID_ELEMENT_ATTRIBUTE_NAME: INVALID_ELEMENT_ATTRIBUTE_NAME,
  29746. COMMENT_HEADER: COMMENT_HEADER,
  29747. COMMENT_HEADER_LEGACY: COMMENT_HEADER_LEGACY,
  29748. SINGLE_FILE_UI_ELEMENT_CLASS: SINGLE_FILE_UI_ELEMENT_CLASS,
  29749. EMPTY_RESOURCE: EMPTY_RESOURCE$1,
  29750. INFOBAR_TAGNAME: INFOBAR_TAGNAME,
  29751. WAIT_FOR_USERSCRIPT_PROPERTY_NAME: WAIT_FOR_USERSCRIPT_PROPERTY_NAME,
  29752. NO_SCRIPT_PROPERTY_NAME: NO_SCRIPT_PROPERTY_NAME
  29753. };
  29754. async function getContent(resourceURL, options) {
  29755. let response, startTime, networkTimeoutId, networkTimeoutPromise, resolveNetworkTimeoutPromise;
  29756. const fetchResource = utilOptions.fetch;
  29757. const fetchFrameResource = utilOptions.frameFetch;
  29758. if (options.blockMixedContent && /^https:/i.test(options.baseURI) && !/^https:/i.test(resourceURL)) {
  29759. return getFetchResponse(resourceURL, options);
  29760. }
  29761. if (options.networkTimeout) {
  29762. networkTimeoutPromise = new Promise((resolve, reject) => {
  29763. resolveNetworkTimeoutPromise = resolve;
  29764. networkTimeoutId = globalThis.setTimeout(() => reject(new Error("network timeout")), options.networkTimeout);
  29765. });
  29766. } else {
  29767. networkTimeoutPromise = new Promise(resolve => {
  29768. resolveNetworkTimeoutPromise = resolve;
  29769. });
  29770. }
  29771. try {
  29772. const accept = options.acceptHeaders ? options.acceptHeaders[options.expectedType] : "*/*";
  29773. if (options.frameId) {
  29774. try {
  29775. response = await Promise.race([
  29776. fetchFrameResource(resourceURL, { frameId: options.frameId, referrer: options.resourceReferrer, headers: { accept } }),
  29777. networkTimeoutPromise
  29778. ]);
  29779. } catch (error) {
  29780. response = await Promise.race([
  29781. fetchResource(resourceURL, { headers: { accept } }),
  29782. networkTimeoutPromise
  29783. ]);
  29784. }
  29785. } else {
  29786. response = await Promise.race([
  29787. fetchResource(resourceURL, { referrer: options.resourceReferrer, headers: { accept } }),
  29788. networkTimeoutPromise
  29789. ]);
  29790. }
  29791. } catch (error) {
  29792. return getFetchResponse(resourceURL, options);
  29793. } finally {
  29794. resolveNetworkTimeoutPromise();
  29795. if (options.networkTimeout) {
  29796. globalThis.clearTimeout(networkTimeoutId);
  29797. }
  29798. }
  29799. let buffer;
  29800. try {
  29801. buffer = await response.arrayBuffer();
  29802. } catch (error) {
  29803. return options.inline ? { data: options.asBinary ? EMPTY_RESOURCE$1 : "", resourceURL } : { resourceURL };
  29804. }
  29805. resourceURL = response.url || resourceURL;
  29806. let contentType = "", charset;
  29807. try {
  29808. const mimeType = new MIMEType(response.headers.get("content-type"));
  29809. contentType = mimeType.type + "/" + mimeType.subtype;
  29810. charset = mimeType.parameters.get("charset");
  29811. } catch (error) {
  29812. // ignored
  29813. }
  29814. if (!contentType || (contentType == CONTENT_TYPE_OCTET_STREAM && options.asBinary)) {
  29815. contentType = guessMIMEType(options.expectedType, buffer);
  29816. if (!contentType) {
  29817. contentType = options.contentType ? options.contentType : options.asBinary ? CONTENT_TYPE_OCTET_STREAM : "";
  29818. }
  29819. }
  29820. if (!charset && options.charset) {
  29821. charset = options.charset;
  29822. }
  29823. if (options.asBinary) {
  29824. if (response.status >= 400) {
  29825. return getFetchResponse(resourceURL, options);
  29826. }
  29827. try {
  29828. if (DEBUG) ;
  29829. if (options.maxResourceSizeEnabled && buffer.byteLength > options.maxResourceSize * ONE_MB) {
  29830. return getFetchResponse(resourceURL, options);
  29831. } else {
  29832. return getFetchResponse(resourceURL, options, buffer, null, contentType);
  29833. }
  29834. } catch (error) {
  29835. return getFetchResponse(resourceURL, options);
  29836. }
  29837. } else {
  29838. if (response.status >= 400 || (options.validateTextContentType && contentType && !contentType.startsWith(PREFIX_CONTENT_TYPE_TEXT))) {
  29839. return getFetchResponse(resourceURL, options);
  29840. }
  29841. if (!charset) {
  29842. charset = "utf-8";
  29843. }
  29844. if (options.maxResourceSizeEnabled && buffer.byteLength > options.maxResourceSize * ONE_MB) {
  29845. return getFetchResponse(resourceURL, options, null, charset);
  29846. } else {
  29847. try {
  29848. return getFetchResponse(resourceURL, options, buffer, charset, contentType);
  29849. } catch (error) {
  29850. return getFetchResponse(resourceURL, options, null, charset);
  29851. }
  29852. }
  29853. }
  29854. }
  29855. }
  29856. async function getFetchResponse(resourceURL, options, data, charset, contentType) {
  29857. if (data) {
  29858. if (options.asBinary) {
  29859. if (options.inline) {
  29860. const reader = new FileReader$1();
  29861. reader.readAsDataURL(new Blob$1([data], { type: contentType + (options.charset ? ";charset=" + options.charset : "") }));
  29862. data = await new Promise((resolve, reject) => {
  29863. reader.addEventListener("load", () => resolve(reader.result), false);
  29864. reader.addEventListener("error", reject, false);
  29865. });
  29866. } else {
  29867. data = new Uint8Array(data);
  29868. }
  29869. } else {
  29870. const firstBytes = new Uint8Array(data.slice(0, 4));
  29871. if (firstBytes[0] == 132 && firstBytes[1] == 49 && firstBytes[2] == 149 && firstBytes[3] == 51) {
  29872. charset = "gb18030";
  29873. } else if (firstBytes[0] == 255 && firstBytes[1] == 254) {
  29874. charset = "utf-16le";
  29875. } else if (firstBytes[0] == 254 && firstBytes[1] == 255) {
  29876. charset = "utf-16be";
  29877. }
  29878. try {
  29879. data = new TextDecoder(charset).decode(data);
  29880. } catch (error) {
  29881. charset = "utf-8";
  29882. data = new TextDecoder(charset).decode(data);
  29883. }
  29884. data = data.replace(/\ufeff/gi, "");
  29885. }
  29886. } else if (options.inline) {
  29887. data = options.asBinary ? EMPTY_RESOURCE$1 : "";
  29888. }
  29889. return { data, resourceURL, charset, contentType };
  29890. }
  29891. function guessMIMEType(expectedType, buffer) {
  29892. if (expectedType == "image") {
  29893. if (compareBytes([255, 255, 255, 255], [0, 0, 1, 0])) {
  29894. return "image/x-icon";
  29895. }
  29896. if (compareBytes([255, 255, 255, 255], [0, 0, 2, 0])) {
  29897. return "image/x-icon";
  29898. }
  29899. if (compareBytes([255, 255], [78, 77])) {
  29900. return "image/bmp";
  29901. }
  29902. if (compareBytes([255, 255, 255, 255, 255, 255], [71, 73, 70, 56, 57, 97])) {
  29903. return "image/gif";
  29904. }
  29905. if (compareBytes([255, 255, 255, 255, 255, 255], [71, 73, 70, 56, 59, 97])) {
  29906. return "image/gif";
  29907. }
  29908. if (compareBytes([255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255], [82, 73, 70, 70, 0, 0, 0, 0, 87, 69, 66, 80, 86, 80])) {
  29909. return "image/webp";
  29910. }
  29911. if (compareBytes([255, 255, 255, 255, 255, 255, 255, 255], [137, 80, 78, 71, 13, 10, 26, 10])) {
  29912. return "image/png";
  29913. }
  29914. if (compareBytes([255, 255, 255], [255, 216, 255])) {
  29915. return "image/jpeg";
  29916. }
  29917. }
  29918. if (expectedType == "font") {
  29919. if (compareBytes([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255],
  29920. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 80])) {
  29921. return "application/vnd.ms-fontobject";
  29922. }
  29923. if (compareBytes([255, 255, 255, 255], [0, 1, 0, 0])) {
  29924. return "font/ttf";
  29925. }
  29926. if (compareBytes([255, 255, 255, 255], [79, 84, 84, 79])) {
  29927. return "font/otf";
  29928. }
  29929. if (compareBytes([255, 255, 255, 255], [116, 116, 99, 102])) {
  29930. return "font/collection";
  29931. }
  29932. if (compareBytes([255, 255, 255, 255], [119, 79, 70, 70])) {
  29933. return "font/woff";
  29934. }
  29935. if (compareBytes([255, 255, 255, 255], [119, 79, 70, 50])) {
  29936. return "font/woff2";
  29937. }
  29938. }
  29939. if (expectedType == "video") {
  29940. if (compareBytes([0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255], [0, 0, 0, 0, 102, 116, 121, 112, 105, 115, 111, 109])) {
  29941. return "video/mp4";
  29942. }
  29943. if (compareBytes([255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255], [82, 73, 70, 70, 0, 0, 0, 0, 87, 65, 86, 69])) {
  29944. return "video/x-msvideo";
  29945. }
  29946. if (compareBytes([255, 255, 255, 255], [0, 0, 1, 179]) || compareBytes([255, 255, 255, 255], [0, 0, 1, 186])) {
  29947. return "video/mpeg";
  29948. }
  29949. if (compareBytes([255, 255, 255, 255], [79, 103, 103, 83])) {
  29950. return "video/ogg";
  29951. }
  29952. if (compareBytes([255], [71])) {
  29953. return "video/mp2t";
  29954. }
  29955. if (compareBytes([255, 255, 255, 255], [26, 69, 223, 163])) {
  29956. return "video/webm";
  29957. }
  29958. if (compareBytes([0, 0, 0, 0, 255, 255, 255, 255, 255, 255], [0, 0, 0, 0, 102, 116, 121, 112, 51, 103])) {
  29959. return "video/3gpp";
  29960. }
  29961. }
  29962. if (expectedType == "audio") {
  29963. if (compareBytes([255, 255], [255, 249]) || compareBytes([255, 255], [255, 254])) {
  29964. return "audio/aac";
  29965. }
  29966. if (compareBytes([255, 255, 255, 255], [77, 84, 104, 100])) {
  29967. return "audio/midi";
  29968. }
  29969. if (compareBytes([255, 255, 255, 255], [0, 0, 1, 179]) || compareBytes([255, 255, 255, 255], [0, 0, 1, 186])) {
  29970. return "audio/mpeg";
  29971. }
  29972. if (compareBytes([255, 255], [255, 251]) || compareBytes([255, 255], [255, 243]) || compareBytes([255, 255], [255, 242]) || compareBytes([255, 255, 255], [73, 68, 51])) {
  29973. return "audio/mpeg";
  29974. }
  29975. if (compareBytes([255, 255, 255, 255], [79, 103, 103, 83])) {
  29976. return "audio/ogg";
  29977. }
  29978. if (compareBytes([255, 255, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255], [82, 73, 70, 70, 0, 0, 0, 0, 87, 65, 86, 69])) {
  29979. return "audio/wav";
  29980. }
  29981. if (compareBytes([255, 255, 255, 255], [26, 69, 223, 163])) {
  29982. return "audio/webm";
  29983. }
  29984. if (compareBytes([0, 0, 0, 0, 255, 255, 255, 255, 255, 255], [0, 0, 0, 0, 102, 116, 121, 112, 51, 103])) {
  29985. return "audio/3gpp";
  29986. }
  29987. }
  29988. function compareBytes(mask, pattern) {
  29989. let patternMatch = true, index = 0;
  29990. if (buffer.byteLength >= pattern.length) {
  29991. const value = new Uint8Array(buffer, 0, mask.length);
  29992. for (index = 0; index < mask.length && patternMatch; index++) {
  29993. patternMatch = patternMatch && ((value[index] & mask[index]) == pattern[index]);
  29994. }
  29995. return patternMatch;
  29996. }
  29997. }
  29998. }
  29999. function getDoctypeString(doc) {
  30000. const docType = doc.doctype;
  30001. let docTypeString = "";
  30002. if (docType) {
  30003. docTypeString = "<!DOCTYPE " + docType.nodeName;
  30004. if (docType.publicId) {
  30005. docTypeString += " PUBLIC \"" + docType.publicId + "\"";
  30006. if (docType.systemId)
  30007. docTypeString += " \"" + docType.systemId + "\"";
  30008. } else if (docType.systemId)
  30009. docTypeString += " SYSTEM \"" + docType.systemId + "\"";
  30010. if (docType.internalSubset)
  30011. docTypeString += " [" + docType.internalSubset + "]";
  30012. docTypeString += "> ";
  30013. }
  30014. return docTypeString;
  30015. }
  30016. function log(...args) {
  30017. console.log("S-File <browser>", ...args); // eslint-disable-line no-console
  30018. }
  30019. /*
  30020. * Copyright 2010-2022 Gildas Lormeau
  30021. * contact : gildas.lormeau <at> gmail.com
  30022. *
  30023. * This file is part of SingleFile.
  30024. *
  30025. * The code in this file is free software: you can redistribute it and/or
  30026. * modify it under the terms of the GNU Affero General Public License
  30027. * (GNU AGPL) as published by the Free Software Foundation, either version 3
  30028. * of the License, or (at your option) any later version.
  30029. *
  30030. * The code in this file is distributed in the hope that it will be useful,
  30031. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  30032. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
  30033. * General Public License for more details.
  30034. *
  30035. * As additional permission under GNU AGPL version 3 section 7, you may
  30036. * distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
  30037. * AGPL normally required by section 4, provided you include this license
  30038. * notice and a URL through which recipients can access the Corresponding
  30039. * Source.
  30040. */
  30041. exports.SingleFile = void 0;
  30042. function init(initOptions) {
  30043. if (typeof exports.SingleFile == "undefined") {
  30044. exports.SingleFile = getClass(getInstance(initOptions));
  30045. }
  30046. }
  30047. async function getPageData(options = {}, initOptions, doc = globalThis.document, win = globalThis) {
  30048. const frames = contentFrameTree;
  30049. let framesSessionId;
  30050. init(initOptions);
  30051. if (doc && win) {
  30052. initDoc(doc);
  30053. const preInitializationPromises = [];
  30054. if (!options.saveRawPage) {
  30055. let lazyLoadPromise;
  30056. if (options.loadDeferredImages) {
  30057. lazyLoadPromise = process$7(options);
  30058. if (options.loadDeferredImagesBeforeFrames) {
  30059. await lazyLoadPromise;
  30060. }
  30061. }
  30062. if (!options.removeFrames && frames && globalThis.frames) {
  30063. let frameTreePromise;
  30064. if (options.loadDeferredImages) {
  30065. frameTreePromise = new Promise(resolve => globalThis.setTimeout(() => resolve(frames.getAsync(options)), options.loadDeferredImagesBeforeFrames || !options.loadDeferredImages ? 0 : options.loadDeferredImagesMaxIdleTime));
  30066. } else {
  30067. frameTreePromise = frames.getAsync(options);
  30068. }
  30069. if (options.loadDeferredImagesBeforeFrames) {
  30070. options.frames = await frameTreePromise;
  30071. } else {
  30072. preInitializationPromises.push(frameTreePromise);
  30073. }
  30074. }
  30075. if (options.loadDeferredImages && !options.loadDeferredImagesBeforeFrames) {
  30076. preInitializationPromises.push(lazyLoadPromise);
  30077. }
  30078. }
  30079. if (!options.loadDeferredImagesBeforeFrames) {
  30080. [options.frames] = await Promise.all(preInitializationPromises);
  30081. }
  30082. framesSessionId = options.frames && options.frames.sessionId;
  30083. }
  30084. options.doc = doc;
  30085. options.win = win;
  30086. options.insertCanonicalLink = true;
  30087. const externalOnProgress = options.onprogress;
  30088. options.onprogress = async event => {
  30089. if (event.type === event.RESOURCES_INITIALIZED && doc && win && options.loadDeferredImages) {
  30090. resetZoomLevel(options);
  30091. }
  30092. if (externalOnProgress) {
  30093. await externalOnProgress(event);
  30094. }
  30095. };
  30096. const processor = new exports.SingleFile(options);
  30097. await processor.run();
  30098. if (framesSessionId) {
  30099. frames.cleanup(framesSessionId);
  30100. }
  30101. const pageData = await processor.getPageData();
  30102. if (options.compressContent) {
  30103. const blob = await process$9(pageData, {
  30104. insertTextBody: options.insertTextBody,
  30105. url: options.url,
  30106. createRootDirectory: options.createRootDirectory,
  30107. selfExtractingArchive: options.selfExtractingArchive,
  30108. extractDataFromPage: options.extractDataFromPage,
  30109. preventAppendedData: options.preventAppendedData,
  30110. insertCanonicalLink: options.insertCanonicalLink,
  30111. insertMetaNoIndex: options.insertMetaNoIndex,
  30112. insertMetaCSP: options.insertMetaCSP,
  30113. password: options.password,
  30114. zipScript: options.zipScript,
  30115. embeddedImage: options.embeddedImage
  30116. });
  30117. delete pageData.resources;
  30118. const reader = new globalThis.FileReader();
  30119. reader.readAsArrayBuffer(blob);
  30120. const arrayBuffer = await new Promise((resolve, reject) => {
  30121. reader.addEventListener("load", () => resolve(reader.result), false);
  30122. reader.addEventListener("error", event => reject(event.detail.error), false);
  30123. });
  30124. pageData.content = Array.from(new Uint8Array(arrayBuffer));
  30125. }
  30126. return pageData;
  30127. }
  30128. exports.getPageData = getPageData;
  30129. exports.helper = helper$4;
  30130. exports.init = init;
  30131. exports.modules = index;
  30132. exports.processors = index$2;
  30133. exports.vendor = index$1;
  30134. Object.defineProperty(exports, '__esModule', { value: true });
  30135. }));